@danhachuel/prodmaker 0.1.10 → 0.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,74 +0,0 @@
1
- function cd(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const a in r)if(a!=="default"&&!(a in e)){const s=Object.getOwnPropertyDescriptor(r,a);s&&Object.defineProperty(e,a,s.get?s:{enumerable:!0,get:()=>r[a]})}}}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 a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const s of a)if(s.type==="childList")for(const i of s.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(a){const s={};return a.integrity&&(s.integrity=a.integrity),a.referrerPolicy&&(s.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?s.credentials="include":a.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(a){if(a.ep)return;a.ep=!0;const s=n(a);fetch(a.href,s)}})();function dd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Oo={exports:{}},kl={},Do={exports:{}},B={};/**
2
- * @license React
3
- * react.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var fr=Symbol.for("react.element"),pd=Symbol.for("react.portal"),fd=Symbol.for("react.fragment"),hd=Symbol.for("react.strict_mode"),md=Symbol.for("react.profiler"),vd=Symbol.for("react.provider"),gd=Symbol.for("react.context"),xd=Symbol.for("react.forward_ref"),yd=Symbol.for("react.suspense"),jd=Symbol.for("react.memo"),Sd=Symbol.for("react.lazy"),ii=Symbol.iterator;function wd(e){return e===null||typeof e!="object"?null:(e=ii&&e[ii]||e["@@iterator"],typeof e=="function"?e:null)}var Ro={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},$o=Object.assign,Fo={};function kn(e,t,n){this.props=e,this.context=t,this.refs=Fo,this.updater=n||Ro}kn.prototype.isReactComponent={};kn.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")};kn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Mo(){}Mo.prototype=kn.prototype;function ds(e,t,n){this.props=e,this.context=t,this.refs=Fo,this.updater=n||Ro}var ps=ds.prototype=new Mo;ps.constructor=ds;$o(ps,kn.prototype);ps.isPureReactComponent=!0;var oi=Array.isArray,bo=Object.prototype.hasOwnProperty,fs={current:null},Bo={key:!0,ref:!0,__self:!0,__source:!0};function Uo(e,t,n){var r,a={},s=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(s=""+t.key),t)bo.call(t,r)&&!Bo.hasOwnProperty(r)&&(a[r]=t[r]);var o=arguments.length-2;if(o===1)a.children=n;else if(1<o){for(var u=Array(o),c=0;c<o;c++)u[c]=arguments[c+2];a.children=u}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)a[r]===void 0&&(a[r]=o[r]);return{$$typeof:fr,type:e,key:s,ref:i,props:a,_owner:fs.current}}function kd(e,t){return{$$typeof:fr,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function hs(e){return typeof e=="object"&&e!==null&&e.$$typeof===fr}function Cd(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var ui=/\/+/g;function Bl(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Cd(""+e.key):t.toString(36)}function Br(e,t,n,r,a){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(s){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case fr:case pd:i=!0}}if(i)return i=e,a=a(i),e=r===""?"."+Bl(i,0):r,oi(a)?(n="",e!=null&&(n=e.replace(ui,"$&/")+"/"),Br(a,t,n,"",function(c){return c})):a!=null&&(hs(a)&&(a=kd(a,n+(!a.key||i&&i.key===a.key?"":(""+a.key).replace(ui,"$&/")+"/")+e)),t.push(a)),1;if(i=0,r=r===""?".":r+":",oi(e))for(var o=0;o<e.length;o++){s=e[o];var u=r+Bl(s,o);i+=Br(s,t,n,u,a)}else if(u=wd(e),typeof u=="function")for(e=u.call(e),o=0;!(s=e.next()).done;)s=s.value,u=r+Bl(s,o++),i+=Br(s,t,n,u,a);else if(s==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function wr(e,t,n){if(e==null)return e;var r=[],a=0;return Br(e,r,"","",function(s){return t.call(n,s,a++)}),r}function Nd(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 je={current:null},Ur={transition:null},Ed={ReactCurrentDispatcher:je,ReactCurrentBatchConfig:Ur,ReactCurrentOwner:fs};function Vo(){throw Error("act(...) is not supported in production builds of React.")}B.Children={map:wr,forEach:function(e,t,n){wr(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return wr(e,function(){t++}),t},toArray:function(e){return wr(e,function(t){return t})||[]},only:function(e){if(!hs(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};B.Component=kn;B.Fragment=fd;B.Profiler=md;B.PureComponent=ds;B.StrictMode=hd;B.Suspense=yd;B.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ed;B.act=Vo;B.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=$o({},e.props),a=e.key,s=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,i=fs.current),t.key!==void 0&&(a=""+t.key),e.type&&e.type.defaultProps)var o=e.type.defaultProps;for(u in t)bo.call(t,u)&&!Bo.hasOwnProperty(u)&&(r[u]=t[u]===void 0&&o!==void 0?o[u]:t[u])}var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){o=Array(u);for(var c=0;c<u;c++)o[c]=arguments[c+2];r.children=o}return{$$typeof:fr,type:e.type,key:a,ref:s,props:r,_owner:i}};B.createContext=function(e){return e={$$typeof:gd,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:vd,_context:e},e.Consumer=e};B.createElement=Uo;B.createFactory=function(e){var t=Uo.bind(null,e);return t.type=e,t};B.createRef=function(){return{current:null}};B.forwardRef=function(e){return{$$typeof:xd,render:e}};B.isValidElement=hs;B.lazy=function(e){return{$$typeof:Sd,_payload:{_status:-1,_result:e},_init:Nd}};B.memo=function(e,t){return{$$typeof:jd,type:e,compare:t===void 0?null:t}};B.startTransition=function(e){var t=Ur.transition;Ur.transition={};try{e()}finally{Ur.transition=t}};B.unstable_act=Vo;B.useCallback=function(e,t){return je.current.useCallback(e,t)};B.useContext=function(e){return je.current.useContext(e)};B.useDebugValue=function(){};B.useDeferredValue=function(e){return je.current.useDeferredValue(e)};B.useEffect=function(e,t){return je.current.useEffect(e,t)};B.useId=function(){return je.current.useId()};B.useImperativeHandle=function(e,t,n){return je.current.useImperativeHandle(e,t,n)};B.useInsertionEffect=function(e,t){return je.current.useInsertionEffect(e,t)};B.useLayoutEffect=function(e,t){return je.current.useLayoutEffect(e,t)};B.useMemo=function(e,t){return je.current.useMemo(e,t)};B.useReducer=function(e,t,n){return je.current.useReducer(e,t,n)};B.useRef=function(e){return je.current.useRef(e)};B.useState=function(e){return je.current.useState(e)};B.useSyncExternalStore=function(e,t,n){return je.current.useSyncExternalStore(e,t,n)};B.useTransition=function(){return je.current.useTransition()};B.version="18.3.1";Do.exports=B;var v=Do.exports;const Wo=dd(v),Pd=cd({__proto__:null,default:Wo},[v]);/**
10
- * @license React
11
- * react-jsx-runtime.production.min.js
12
- *
13
- * Copyright (c) Facebook, Inc. and its affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var _d=v,Td=Symbol.for("react.element"),Ld=Symbol.for("react.fragment"),Ad=Object.prototype.hasOwnProperty,zd=_d.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Id={key:!0,ref:!0,__self:!0,__source:!0};function Ho(e,t,n){var r,a={},s=null,i=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)Ad.call(t,r)&&!Id.hasOwnProperty(r)&&(a[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)a[r]===void 0&&(a[r]=t[r]);return{$$typeof:Td,type:e,key:s,ref:i,props:a,_owner:zd.current}}kl.Fragment=Ld;kl.jsx=Ho;kl.jsxs=Ho;Oo.exports=kl;var l=Oo.exports,Go={exports:{}},Ie={},Qo={exports:{}},Ko={};/**
18
- * @license React
19
- * scheduler.production.min.js
20
- *
21
- * Copyright (c) Facebook, Inc. and its affiliates.
22
- *
23
- * This source code is licensed under the MIT license found in the
24
- * LICENSE file in the root directory of this source tree.
25
- */(function(e){function t(I,M){var L=I.length;I.push(M);e:for(;0<L;){var F=L-1>>>1,_=I[F];if(0<a(_,M))I[F]=M,I[L]=_,L=F;else break e}}function n(I){return I.length===0?null:I[0]}function r(I){if(I.length===0)return null;var M=I[0],L=I.pop();if(L!==M){I[0]=L;e:for(var F=0,_=I.length,W=_>>>1;F<W;){var Re=2*(F+1)-1,Ve=I[Re],It=Re+1,Sr=I[It];if(0>a(Ve,L))It<_&&0>a(Sr,Ve)?(I[F]=Sr,I[It]=L,F=It):(I[F]=Ve,I[Re]=L,F=Re);else if(It<_&&0>a(Sr,L))I[F]=Sr,I[It]=L,F=It;else break e}}return M}function a(I,M){var L=I.sortIndex-M.sortIndex;return L!==0?L:I.id-M.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var i=Date,o=i.now();e.unstable_now=function(){return i.now()-o}}var u=[],c=[],g=1,m=null,p=3,j=!1,S=!1,k=!1,N=typeof setTimeout=="function"?setTimeout:null,h=typeof clearTimeout=="function"?clearTimeout:null,d=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function f(I){for(var M=n(c);M!==null;){if(M.callback===null)r(c);else if(M.startTime<=I)r(c),M.sortIndex=M.expirationTime,t(u,M);else break;M=n(c)}}function y(I){if(k=!1,f(I),!S)if(n(u)!==null)S=!0,T(C);else{var M=n(c);M!==null&&b(y,M.startTime-I)}}function C(I,M){S=!1,k&&(k=!1,h(P),P=-1),j=!0;var L=p;try{for(f(M),m=n(u);m!==null&&(!(m.expirationTime>M)||I&&!R());){var F=m.callback;if(typeof F=="function"){m.callback=null,p=m.priorityLevel;var _=F(m.expirationTime<=M);M=e.unstable_now(),typeof _=="function"?m.callback=_:m===n(u)&&r(u),f(M)}else r(u);m=n(u)}if(m!==null)var W=!0;else{var Re=n(c);Re!==null&&b(y,Re.startTime-M),W=!1}return W}finally{m=null,p=L,j=!1}}var A=!1,E=null,P=-1,x=5,w=-1;function R(){return!(e.unstable_now()-w<x)}function U(){if(E!==null){var I=e.unstable_now();w=I;var M=!0;try{M=E(!0,I)}finally{M?G():(A=!1,E=null)}}else A=!1}var G;if(typeof d=="function")G=function(){d(U)};else if(typeof MessageChannel<"u"){var ge=new MessageChannel,_e=ge.port2;ge.port1.onmessage=U,G=function(){_e.postMessage(null)}}else G=function(){N(U,0)};function T(I){E=I,A||(A=!0,G())}function b(I,M){P=N(function(){I(e.unstable_now())},M)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(I){I.callback=null},e.unstable_continueExecution=function(){S||j||(S=!0,T(C))},e.unstable_forceFrameRate=function(I){0>I||125<I?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):x=0<I?Math.floor(1e3/I):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(I){switch(p){case 1:case 2:case 3:var M=3;break;default:M=p}var L=p;p=M;try{return I()}finally{p=L}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(I,M){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var L=p;p=I;try{return M()}finally{p=L}},e.unstable_scheduleCallback=function(I,M,L){var F=e.unstable_now();switch(typeof L=="object"&&L!==null?(L=L.delay,L=typeof L=="number"&&0<L?F+L:F):L=F,I){case 1:var _=-1;break;case 2:_=250;break;case 5:_=1073741823;break;case 4:_=1e4;break;default:_=5e3}return _=L+_,I={id:g++,callback:M,priorityLevel:I,startTime:L,expirationTime:_,sortIndex:-1},L>F?(I.sortIndex=L,t(c,I),n(u)===null&&I===n(c)&&(k?(h(P),P=-1):k=!0,b(y,L-F))):(I.sortIndex=_,t(u,I),S||j||(S=!0,T(C))),I},e.unstable_shouldYield=R,e.unstable_wrapCallback=function(I){var M=p;return function(){var L=p;p=M;try{return I.apply(this,arguments)}finally{p=L}}}})(Ko);Qo.exports=Ko;var Od=Qo.exports;/**
26
- * @license React
27
- * react-dom.production.min.js
28
- *
29
- * Copyright (c) Facebook, Inc. and its affiliates.
30
- *
31
- * This source code is licensed under the MIT license found in the
32
- * LICENSE file in the root directory of this source tree.
33
- */var Dd=v,ze=Od;function z(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 qo=new Set,Kn={};function Qt(e,t){vn(e,t),vn(e+"Capture",t)}function vn(e,t){for(Kn[e]=t,e=0;e<t.length;e++)qo.add(t[e])}var it=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),va=Object.prototype.hasOwnProperty,Rd=/^[: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]*$/,ci={},di={};function $d(e){return va.call(di,e)?!0:va.call(ci,e)?!1:Rd.test(e)?di[e]=!0:(ci[e]=!0,!1)}function Fd(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 Md(e,t,n,r){if(t===null||typeof t>"u"||Fd(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,a,s,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=a,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=i}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 ms=/[\-:]([a-z])/g;function vs(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(ms,vs);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(ms,vs);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(ms,vs);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 gs(e,t,n,r){var a=de.hasOwnProperty(t)?de[t]:null;(a!==null?a.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Md(t,n,a,r)&&(n=null),r||a===null?$d(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):a.mustUseProperty?e[a.propertyName]=n===null?a.type===3?!1:"":n:(t=a.attributeName,r=a.attributeNamespace,n===null?e.removeAttribute(t):(a=a.type,n=a===3||a===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var dt=Dd.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,kr=Symbol.for("react.element"),Xt=Symbol.for("react.portal"),Yt=Symbol.for("react.fragment"),xs=Symbol.for("react.strict_mode"),ga=Symbol.for("react.profiler"),Jo=Symbol.for("react.provider"),Xo=Symbol.for("react.context"),ys=Symbol.for("react.forward_ref"),xa=Symbol.for("react.suspense"),ya=Symbol.for("react.suspense_list"),js=Symbol.for("react.memo"),ft=Symbol.for("react.lazy"),Yo=Symbol.for("react.offscreen"),pi=Symbol.iterator;function Pn(e){return e===null||typeof e!="object"?null:(e=pi&&e[pi]||e["@@iterator"],typeof e=="function"?e:null)}var Z=Object.assign,Ul;function Dn(e){if(Ul===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Ul=t&&t[1]||""}return`
34
- `+Ul+e}var Vl=!1;function Wl(e,t){if(!e||Vl)return"";Vl=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var a=c.stack.split(`
35
- `),s=r.stack.split(`
36
- `),i=a.length-1,o=s.length-1;1<=i&&0<=o&&a[i]!==s[o];)o--;for(;1<=i&&0<=o;i--,o--)if(a[i]!==s[o]){if(i!==1||o!==1)do if(i--,o--,0>o||a[i]!==s[o]){var u=`
37
- `+a[i].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=i&&0<=o);break}}}finally{Vl=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Dn(e):""}function bd(e){switch(e.tag){case 5:return Dn(e.type);case 16:return Dn("Lazy");case 13:return Dn("Suspense");case 19:return Dn("SuspenseList");case 0:case 2:case 15:return e=Wl(e.type,!1),e;case 11:return e=Wl(e.type.render,!1),e;case 1:return e=Wl(e.type,!0),e;default:return""}}function ja(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 Yt:return"Fragment";case Xt:return"Portal";case ga:return"Profiler";case xs:return"StrictMode";case xa:return"Suspense";case ya:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Xo:return(e.displayName||"Context")+".Consumer";case Jo:return(e._context.displayName||"Context")+".Provider";case ys:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case js:return t=e.displayName||null,t!==null?t:ja(e.type)||"Memo";case ft:t=e._payload,e=e._init;try{return ja(e(t))}catch{}}return null}function Bd(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 ja(t);case 8:return t===xs?"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 _t(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Zo(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ud(e){var t=Zo(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 a=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(i){r=""+i,s.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Cr(e){e._valueTracker||(e._valueTracker=Ud(e))}function eu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Zo(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Zr(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 Sa(e,t){var n=t.checked;return Z({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function fi(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=_t(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 tu(e,t){t=t.checked,t!=null&&gs(e,"checked",t,!1)}function wa(e,t){tu(e,t);var n=_t(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")?ka(e,t.type,n):t.hasOwnProperty("defaultValue")&&ka(e,t.type,_t(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function hi(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 ka(e,t,n){(t!=="number"||Zr(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Rn=Array.isArray;function cn(e,t,n,r){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&r&&(e[n].defaultSelected=!0)}else{for(n=""+_t(n),t=null,a=0;a<e.length;a++){if(e[a].value===n){e[a].selected=!0,r&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function Ca(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(z(91));return Z({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function mi(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(z(92));if(Rn(n)){if(1<n.length)throw Error(z(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:_t(n)}}function nu(e,t){var n=_t(t.value),r=_t(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 vi(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function ru(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 Na(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?ru(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Nr,lu=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,a){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,a)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Nr=Nr||document.createElement("div"),Nr.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Nr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function qn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Mn={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},Vd=["Webkit","ms","Moz","O"];Object.keys(Mn).forEach(function(e){Vd.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Mn[t]=Mn[e]})});function au(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Mn.hasOwnProperty(e)&&Mn[e]?(""+t).trim():t+"px"}function su(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,a=au(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,a):e[n]=a}}var Wd=Z({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 Ea(e,t){if(t){if(Wd[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(z(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(z(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(z(61))}if(t.style!=null&&typeof t.style!="object")throw Error(z(62))}}function Pa(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 _a=null;function Ss(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ta=null,dn=null,pn=null;function gi(e){if(e=vr(e)){if(typeof Ta!="function")throw Error(z(280));var t=e.stateNode;t&&(t=_l(t),Ta(e.stateNode,e.type,t))}}function iu(e){dn?pn?pn.push(e):pn=[e]:dn=e}function ou(){if(dn){var e=dn,t=pn;if(pn=dn=null,gi(e),t)for(e=0;e<t.length;e++)gi(t[e])}}function uu(e,t){return e(t)}function cu(){}var Hl=!1;function du(e,t,n){if(Hl)return e(t,n);Hl=!0;try{return uu(e,t,n)}finally{Hl=!1,(dn!==null||pn!==null)&&(cu(),ou())}}function Jn(e,t){var n=e.stateNode;if(n===null)return null;var r=_l(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(z(231,t,typeof n));return n}var La=!1;if(it)try{var _n={};Object.defineProperty(_n,"passive",{get:function(){La=!0}}),window.addEventListener("test",_n,_n),window.removeEventListener("test",_n,_n)}catch{La=!1}function Hd(e,t,n,r,a,s,i,o,u){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(g){this.onError(g)}}var bn=!1,el=null,tl=!1,Aa=null,Gd={onError:function(e){bn=!0,el=e}};function Qd(e,t,n,r,a,s,i,o,u){bn=!1,el=null,Hd.apply(Gd,arguments)}function Kd(e,t,n,r,a,s,i,o,u){if(Qd.apply(this,arguments),bn){if(bn){var c=el;bn=!1,el=null}else throw Error(z(198));tl||(tl=!0,Aa=c)}}function Kt(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 pu(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 xi(e){if(Kt(e)!==e)throw Error(z(188))}function qd(e){var t=e.alternate;if(!t){if(t=Kt(e),t===null)throw Error(z(188));return t!==e?null:e}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return xi(a),e;if(s===r)return xi(a),t;s=s.sibling}throw Error(z(188))}if(n.return!==r.return)n=a,r=s;else{for(var i=!1,o=a.child;o;){if(o===n){i=!0,n=a,r=s;break}if(o===r){i=!0,r=a,n=s;break}o=o.sibling}if(!i){for(o=s.child;o;){if(o===n){i=!0,n=s,r=a;break}if(o===r){i=!0,r=s,n=a;break}o=o.sibling}if(!i)throw Error(z(189))}}if(n.alternate!==r)throw Error(z(190))}if(n.tag!==3)throw Error(z(188));return n.stateNode.current===n?e:t}function fu(e){return e=qd(e),e!==null?hu(e):null}function hu(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=hu(e);if(t!==null)return t;e=e.sibling}return null}var mu=ze.unstable_scheduleCallback,yi=ze.unstable_cancelCallback,Jd=ze.unstable_shouldYield,Xd=ze.unstable_requestPaint,ne=ze.unstable_now,Yd=ze.unstable_getCurrentPriorityLevel,ws=ze.unstable_ImmediatePriority,vu=ze.unstable_UserBlockingPriority,nl=ze.unstable_NormalPriority,Zd=ze.unstable_LowPriority,gu=ze.unstable_IdlePriority,Cl=null,et=null;function ep(e){if(et&&typeof et.onCommitFiberRoot=="function")try{et.onCommitFiberRoot(Cl,e,void 0,(e.current.flags&128)===128)}catch{}}var Ke=Math.clz32?Math.clz32:rp,tp=Math.log,np=Math.LN2;function rp(e){return e>>>=0,e===0?32:31-(tp(e)/np|0)|0}var Er=64,Pr=4194304;function $n(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 rl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,a=e.suspendedLanes,s=e.pingedLanes,i=n&268435455;if(i!==0){var o=i&~a;o!==0?r=$n(o):(s&=i,s!==0&&(r=$n(s)))}else i=n&~a,i!==0?r=$n(i):s!==0&&(r=$n(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&a)&&(a=r&-r,s=t&-t,a>=s||a===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Ke(t),a=1<<n,r|=e[n],t&=~a;return r}function lp(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 ap(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,a=e.expirationTimes,s=e.pendingLanes;0<s;){var i=31-Ke(s),o=1<<i,u=a[i];u===-1?(!(o&n)||o&r)&&(a[i]=lp(o,t)):u<=t&&(e.expiredLanes|=o),s&=~o}}function za(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function xu(){var e=Er;return Er<<=1,!(Er&4194240)&&(Er=64),e}function Gl(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function hr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ke(t),e[t]=n}function sp(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 a=31-Ke(n),s=1<<a;t[a]=0,r[a]=-1,e[a]=-1,n&=~s}}function ks(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ke(n),a=1<<r;a&t|e[r]&t&&(e[r]|=t),n&=~a}}var H=0;function yu(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var ju,Cs,Su,wu,ku,Ia=!1,_r=[],jt=null,St=null,wt=null,Xn=new Map,Yn=new Map,mt=[],ip="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 ji(e,t){switch(e){case"focusin":case"focusout":jt=null;break;case"dragenter":case"dragleave":St=null;break;case"mouseover":case"mouseout":wt=null;break;case"pointerover":case"pointerout":Xn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Yn.delete(t.pointerId)}}function Tn(e,t,n,r,a,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[a]},t!==null&&(t=vr(t),t!==null&&Cs(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function op(e,t,n,r,a){switch(t){case"focusin":return jt=Tn(jt,e,t,n,r,a),!0;case"dragenter":return St=Tn(St,e,t,n,r,a),!0;case"mouseover":return wt=Tn(wt,e,t,n,r,a),!0;case"pointerover":var s=a.pointerId;return Xn.set(s,Tn(Xn.get(s)||null,e,t,n,r,a)),!0;case"gotpointercapture":return s=a.pointerId,Yn.set(s,Tn(Yn.get(s)||null,e,t,n,r,a)),!0}return!1}function Cu(e){var t=Rt(e.target);if(t!==null){var n=Kt(t);if(n!==null){if(t=n.tag,t===13){if(t=pu(n),t!==null){e.blockedOn=t,ku(e.priority,function(){Su(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 Vr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Oa(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);_a=r,n.target.dispatchEvent(r),_a=null}else return t=vr(n),t!==null&&Cs(t),e.blockedOn=n,!1;t.shift()}return!0}function Si(e,t,n){Vr(e)&&n.delete(t)}function up(){Ia=!1,jt!==null&&Vr(jt)&&(jt=null),St!==null&&Vr(St)&&(St=null),wt!==null&&Vr(wt)&&(wt=null),Xn.forEach(Si),Yn.forEach(Si)}function Ln(e,t){e.blockedOn===t&&(e.blockedOn=null,Ia||(Ia=!0,ze.unstable_scheduleCallback(ze.unstable_NormalPriority,up)))}function Zn(e){function t(a){return Ln(a,e)}if(0<_r.length){Ln(_r[0],e);for(var n=1;n<_r.length;n++){var r=_r[n];r.blockedOn===e&&(r.blockedOn=null)}}for(jt!==null&&Ln(jt,e),St!==null&&Ln(St,e),wt!==null&&Ln(wt,e),Xn.forEach(t),Yn.forEach(t),n=0;n<mt.length;n++)r=mt[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<mt.length&&(n=mt[0],n.blockedOn===null);)Cu(n),n.blockedOn===null&&mt.shift()}var fn=dt.ReactCurrentBatchConfig,ll=!0;function cp(e,t,n,r){var a=H,s=fn.transition;fn.transition=null;try{H=1,Ns(e,t,n,r)}finally{H=a,fn.transition=s}}function dp(e,t,n,r){var a=H,s=fn.transition;fn.transition=null;try{H=4,Ns(e,t,n,r)}finally{H=a,fn.transition=s}}function Ns(e,t,n,r){if(ll){var a=Oa(e,t,n,r);if(a===null)na(e,t,r,al,n),ji(e,r);else if(op(a,e,t,n,r))r.stopPropagation();else if(ji(e,r),t&4&&-1<ip.indexOf(e)){for(;a!==null;){var s=vr(a);if(s!==null&&ju(s),s=Oa(e,t,n,r),s===null&&na(e,t,r,al,n),s===a)break;a=s}a!==null&&r.stopPropagation()}else na(e,t,r,null,n)}}var al=null;function Oa(e,t,n,r){if(al=null,e=Ss(r),e=Rt(e),e!==null)if(t=Kt(e),t===null)e=null;else if(n=t.tag,n===13){if(e=pu(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 al=e,null}function Nu(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(Yd()){case ws:return 1;case vu:return 4;case nl:case Zd:return 16;case gu:return 536870912;default:return 16}default:return 16}}var gt=null,Es=null,Wr=null;function Eu(){if(Wr)return Wr;var e,t=Es,n=t.length,r,a="value"in gt?gt.value:gt.textContent,s=a.length;for(e=0;e<n&&t[e]===a[e];e++);var i=n-e;for(r=1;r<=i&&t[n-r]===a[s-r];r++);return Wr=a.slice(e,1<r?1-r:void 0)}function Hr(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 Tr(){return!0}function wi(){return!1}function Oe(e){function t(n,r,a,s,i){this._reactName=n,this._targetInst=a,this.type=r,this.nativeEvent=s,this.target=i,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(n=e[o],this[o]=n?n(s):s[o]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Tr:wi,this.isPropagationStopped=wi,this}return Z(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=Tr)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Tr)},persist:function(){},isPersistent:Tr}),t}var Cn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ps=Oe(Cn),mr=Z({},Cn,{view:0,detail:0}),pp=Oe(mr),Ql,Kl,An,Nl=Z({},mr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_s,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!==An&&(An&&e.type==="mousemove"?(Ql=e.screenX-An.screenX,Kl=e.screenY-An.screenY):Kl=Ql=0,An=e),Ql)},movementY:function(e){return"movementY"in e?e.movementY:Kl}}),ki=Oe(Nl),fp=Z({},Nl,{dataTransfer:0}),hp=Oe(fp),mp=Z({},mr,{relatedTarget:0}),ql=Oe(mp),vp=Z({},Cn,{animationName:0,elapsedTime:0,pseudoElement:0}),gp=Oe(vp),xp=Z({},Cn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),yp=Oe(xp),jp=Z({},Cn,{data:0}),Ci=Oe(jp),Sp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},wp={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"},kp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Cp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=kp[e])?!!t[e]:!1}function _s(){return Cp}var Np=Z({},mr,{key:function(e){if(e.key){var t=Sp[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Hr(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?wp[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_s,charCode:function(e){return e.type==="keypress"?Hr(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Hr(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Ep=Oe(Np),Pp=Z({},Nl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ni=Oe(Pp),_p=Z({},mr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_s}),Tp=Oe(_p),Lp=Z({},Cn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ap=Oe(Lp),zp=Z({},Nl,{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}),Ip=Oe(zp),Op=[9,13,27,32],Ts=it&&"CompositionEvent"in window,Bn=null;it&&"documentMode"in document&&(Bn=document.documentMode);var Dp=it&&"TextEvent"in window&&!Bn,Pu=it&&(!Ts||Bn&&8<Bn&&11>=Bn),Ei=" ",Pi=!1;function _u(e,t){switch(e){case"keyup":return Op.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Tu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Zt=!1;function Rp(e,t){switch(e){case"compositionend":return Tu(t);case"keypress":return t.which!==32?null:(Pi=!0,Ei);case"textInput":return e=t.data,e===Ei&&Pi?null:e;default:return null}}function $p(e,t){if(Zt)return e==="compositionend"||!Ts&&_u(e,t)?(e=Eu(),Wr=Es=gt=null,Zt=!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 Pu&&t.locale!=="ko"?null:t.data;default:return null}}var Fp={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 _i(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Fp[e.type]:t==="textarea"}function Lu(e,t,n,r){iu(r),t=sl(t,"onChange"),0<t.length&&(n=new Ps("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Un=null,er=null;function Mp(e){Bu(e,0)}function El(e){var t=nn(e);if(eu(t))return e}function bp(e,t){if(e==="change")return t}var Au=!1;if(it){var Jl;if(it){var Xl="oninput"in document;if(!Xl){var Ti=document.createElement("div");Ti.setAttribute("oninput","return;"),Xl=typeof Ti.oninput=="function"}Jl=Xl}else Jl=!1;Au=Jl&&(!document.documentMode||9<document.documentMode)}function Li(){Un&&(Un.detachEvent("onpropertychange",zu),er=Un=null)}function zu(e){if(e.propertyName==="value"&&El(er)){var t=[];Lu(t,er,e,Ss(e)),du(Mp,t)}}function Bp(e,t,n){e==="focusin"?(Li(),Un=t,er=n,Un.attachEvent("onpropertychange",zu)):e==="focusout"&&Li()}function Up(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return El(er)}function Vp(e,t){if(e==="click")return El(t)}function Wp(e,t){if(e==="input"||e==="change")return El(t)}function Hp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Je=typeof Object.is=="function"?Object.is:Hp;function tr(e,t){if(Je(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 a=n[r];if(!va.call(t,a)||!Je(e[a],t[a]))return!1}return!0}function Ai(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function zi(e,t){var n=Ai(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=Ai(n)}}function Iu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Iu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ou(){for(var e=window,t=Zr();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Zr(e.document)}return t}function Ls(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 Gp(e){var t=Ou(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Iu(n.ownerDocument.documentElement,n)){if(r!==null&&Ls(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 a=n.textContent.length,s=Math.min(r.start,a);r=r.end===void 0?s:Math.min(r.end,a),!e.extend&&s>r&&(a=r,r=s,s=a),a=zi(n,s);var i=zi(n,r);a&&i&&(e.rangeCount!==1||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(a.node,a.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.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 Qp=it&&"documentMode"in document&&11>=document.documentMode,en=null,Da=null,Vn=null,Ra=!1;function Ii(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ra||en==null||en!==Zr(r)||(r=en,"selectionStart"in r&&Ls(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}),Vn&&tr(Vn,r)||(Vn=r,r=sl(Da,"onSelect"),0<r.length&&(t=new Ps("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=en)))}function Lr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var tn={animationend:Lr("Animation","AnimationEnd"),animationiteration:Lr("Animation","AnimationIteration"),animationstart:Lr("Animation","AnimationStart"),transitionend:Lr("Transition","TransitionEnd")},Yl={},Du={};it&&(Du=document.createElement("div").style,"AnimationEvent"in window||(delete tn.animationend.animation,delete tn.animationiteration.animation,delete tn.animationstart.animation),"TransitionEvent"in window||delete tn.transitionend.transition);function Pl(e){if(Yl[e])return Yl[e];if(!tn[e])return e;var t=tn[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Du)return Yl[e]=t[n];return e}var Ru=Pl("animationend"),$u=Pl("animationiteration"),Fu=Pl("animationstart"),Mu=Pl("transitionend"),bu=new Map,Oi="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 Lt(e,t){bu.set(e,t),Qt(t,[e])}for(var Zl=0;Zl<Oi.length;Zl++){var ea=Oi[Zl],Kp=ea.toLowerCase(),qp=ea[0].toUpperCase()+ea.slice(1);Lt(Kp,"on"+qp)}Lt(Ru,"onAnimationEnd");Lt($u,"onAnimationIteration");Lt(Fu,"onAnimationStart");Lt("dblclick","onDoubleClick");Lt("focusin","onFocus");Lt("focusout","onBlur");Lt(Mu,"onTransitionEnd");vn("onMouseEnter",["mouseout","mouseover"]);vn("onMouseLeave",["mouseout","mouseover"]);vn("onPointerEnter",["pointerout","pointerover"]);vn("onPointerLeave",["pointerout","pointerover"]);Qt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Qt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Qt("onBeforeInput",["compositionend","keypress","textInput","paste"]);Qt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Qt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Qt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Fn="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(" "),Jp=new Set("cancel close invalid load scroll toggle".split(" ").concat(Fn));function Di(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Kd(r,t,void 0,e),e.currentTarget=null}function Bu(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],a=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var i=r.length-1;0<=i;i--){var o=r[i],u=o.instance,c=o.currentTarget;if(o=o.listener,u!==s&&a.isPropagationStopped())break e;Di(a,o,c),s=u}else for(i=0;i<r.length;i++){if(o=r[i],u=o.instance,c=o.currentTarget,o=o.listener,u!==s&&a.isPropagationStopped())break e;Di(a,o,c),s=u}}}if(tl)throw e=Aa,tl=!1,Aa=null,e}function K(e,t){var n=t[Ba];n===void 0&&(n=t[Ba]=new Set);var r=e+"__bubble";n.has(r)||(Uu(t,e,2,!1),n.add(r))}function ta(e,t,n){var r=0;t&&(r|=4),Uu(n,e,r,t)}var Ar="_reactListening"+Math.random().toString(36).slice(2);function nr(e){if(!e[Ar]){e[Ar]=!0,qo.forEach(function(n){n!=="selectionchange"&&(Jp.has(n)||ta(n,!1,e),ta(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ar]||(t[Ar]=!0,ta("selectionchange",!1,t))}}function Uu(e,t,n,r){switch(Nu(t)){case 1:var a=cp;break;case 4:a=dp;break;default:a=Ns}n=a.bind(null,t,n,e),a=void 0,!La||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),r?a!==void 0?e.addEventListener(t,n,{capture:!0,passive:a}):e.addEventListener(t,n,!0):a!==void 0?e.addEventListener(t,n,{passive:a}):e.addEventListener(t,n,!1)}function na(e,t,n,r,a){var s=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var i=r.tag;if(i===3||i===4){var o=r.stateNode.containerInfo;if(o===a||o.nodeType===8&&o.parentNode===a)break;if(i===4)for(i=r.return;i!==null;){var u=i.tag;if((u===3||u===4)&&(u=i.stateNode.containerInfo,u===a||u.nodeType===8&&u.parentNode===a))return;i=i.return}for(;o!==null;){if(i=Rt(o),i===null)return;if(u=i.tag,u===5||u===6){r=s=i;continue e}o=o.parentNode}}r=r.return}du(function(){var c=s,g=Ss(n),m=[];e:{var p=bu.get(e);if(p!==void 0){var j=Ps,S=e;switch(e){case"keypress":if(Hr(n)===0)break e;case"keydown":case"keyup":j=Ep;break;case"focusin":S="focus",j=ql;break;case"focusout":S="blur",j=ql;break;case"beforeblur":case"afterblur":j=ql;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":j=ki;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":j=hp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":j=Tp;break;case Ru:case $u:case Fu:j=gp;break;case Mu:j=Ap;break;case"scroll":j=pp;break;case"wheel":j=Ip;break;case"copy":case"cut":case"paste":j=yp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":j=Ni}var k=(t&4)!==0,N=!k&&e==="scroll",h=k?p!==null?p+"Capture":null:p;k=[];for(var d=c,f;d!==null;){f=d;var y=f.stateNode;if(f.tag===5&&y!==null&&(f=y,h!==null&&(y=Jn(d,h),y!=null&&k.push(rr(d,y,f)))),N)break;d=d.return}0<k.length&&(p=new j(p,S,null,n,g),m.push({event:p,listeners:k}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",j=e==="mouseout"||e==="pointerout",p&&n!==_a&&(S=n.relatedTarget||n.fromElement)&&(Rt(S)||S[ot]))break e;if((j||p)&&(p=g.window===g?g:(p=g.ownerDocument)?p.defaultView||p.parentWindow:window,j?(S=n.relatedTarget||n.toElement,j=c,S=S?Rt(S):null,S!==null&&(N=Kt(S),S!==N||S.tag!==5&&S.tag!==6)&&(S=null)):(j=null,S=c),j!==S)){if(k=ki,y="onMouseLeave",h="onMouseEnter",d="mouse",(e==="pointerout"||e==="pointerover")&&(k=Ni,y="onPointerLeave",h="onPointerEnter",d="pointer"),N=j==null?p:nn(j),f=S==null?p:nn(S),p=new k(y,d+"leave",j,n,g),p.target=N,p.relatedTarget=f,y=null,Rt(g)===c&&(k=new k(h,d+"enter",S,n,g),k.target=f,k.relatedTarget=N,y=k),N=y,j&&S)t:{for(k=j,h=S,d=0,f=k;f;f=Jt(f))d++;for(f=0,y=h;y;y=Jt(y))f++;for(;0<d-f;)k=Jt(k),d--;for(;0<f-d;)h=Jt(h),f--;for(;d--;){if(k===h||h!==null&&k===h.alternate)break t;k=Jt(k),h=Jt(h)}k=null}else k=null;j!==null&&Ri(m,p,j,k,!1),S!==null&&N!==null&&Ri(m,N,S,k,!0)}}e:{if(p=c?nn(c):window,j=p.nodeName&&p.nodeName.toLowerCase(),j==="select"||j==="input"&&p.type==="file")var C=bp;else if(_i(p))if(Au)C=Wp;else{C=Up;var A=Bp}else(j=p.nodeName)&&j.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(C=Vp);if(C&&(C=C(e,c))){Lu(m,C,n,g);break e}A&&A(e,p,c),e==="focusout"&&(A=p._wrapperState)&&A.controlled&&p.type==="number"&&ka(p,"number",p.value)}switch(A=c?nn(c):window,e){case"focusin":(_i(A)||A.contentEditable==="true")&&(en=A,Da=c,Vn=null);break;case"focusout":Vn=Da=en=null;break;case"mousedown":Ra=!0;break;case"contextmenu":case"mouseup":case"dragend":Ra=!1,Ii(m,n,g);break;case"selectionchange":if(Qp)break;case"keydown":case"keyup":Ii(m,n,g)}var E;if(Ts)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 Zt?_u(e,n)&&(P="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(P="onCompositionStart");P&&(Pu&&n.locale!=="ko"&&(Zt||P!=="onCompositionStart"?P==="onCompositionEnd"&&Zt&&(E=Eu()):(gt=g,Es="value"in gt?gt.value:gt.textContent,Zt=!0)),A=sl(c,P),0<A.length&&(P=new Ci(P,e,null,n,g),m.push({event:P,listeners:A}),E?P.data=E:(E=Tu(n),E!==null&&(P.data=E)))),(E=Dp?Rp(e,n):$p(e,n))&&(c=sl(c,"onBeforeInput"),0<c.length&&(g=new Ci("onBeforeInput","beforeinput",null,n,g),m.push({event:g,listeners:c}),g.data=E))}Bu(m,t)})}function rr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function sl(e,t){for(var n=t+"Capture",r=[];e!==null;){var a=e,s=a.stateNode;a.tag===5&&s!==null&&(a=s,s=Jn(e,n),s!=null&&r.unshift(rr(e,s,a)),s=Jn(e,t),s!=null&&r.push(rr(e,s,a))),e=e.return}return r}function Jt(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Ri(e,t,n,r,a){for(var s=t._reactName,i=[];n!==null&&n!==r;){var o=n,u=o.alternate,c=o.stateNode;if(u!==null&&u===r)break;o.tag===5&&c!==null&&(o=c,a?(u=Jn(n,s),u!=null&&i.unshift(rr(n,u,o))):a||(u=Jn(n,s),u!=null&&i.push(rr(n,u,o)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var Xp=/\r\n?/g,Yp=/\u0000|\uFFFD/g;function $i(e){return(typeof e=="string"?e:""+e).replace(Xp,`
38
- `).replace(Yp,"")}function zr(e,t,n){if(t=$i(t),$i(e)!==t&&n)throw Error(z(425))}function il(){}var $a=null,Fa=null;function Ma(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 ba=typeof setTimeout=="function"?setTimeout:void 0,Zp=typeof clearTimeout=="function"?clearTimeout:void 0,Fi=typeof Promise=="function"?Promise:void 0,ef=typeof queueMicrotask=="function"?queueMicrotask:typeof Fi<"u"?function(e){return Fi.resolve(null).then(e).catch(tf)}:ba;function tf(e){setTimeout(function(){throw e})}function ra(e,t){var n=t,r=0;do{var a=n.nextSibling;if(e.removeChild(n),a&&a.nodeType===8)if(n=a.data,n==="/$"){if(r===0){e.removeChild(a),Zn(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=a}while(n);Zn(t)}function kt(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 Mi(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Nn=Math.random().toString(36).slice(2),Ze="__reactFiber$"+Nn,lr="__reactProps$"+Nn,ot="__reactContainer$"+Nn,Ba="__reactEvents$"+Nn,nf="__reactListeners$"+Nn,rf="__reactHandles$"+Nn;function Rt(e){var t=e[Ze];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ot]||n[Ze]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Mi(e);e!==null;){if(n=e[Ze])return n;e=Mi(e)}return t}e=n,n=e.parentNode}return null}function vr(e){return e=e[Ze]||e[ot],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function nn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(z(33))}function _l(e){return e[lr]||null}var Ua=[],rn=-1;function At(e){return{current:e}}function q(e){0>rn||(e.current=Ua[rn],Ua[rn]=null,rn--)}function Q(e,t){rn++,Ua[rn]=e.current,e.current=t}var Tt={},ve=At(Tt),Ne=At(!1),Ut=Tt;function gn(e,t){var n=e.type.contextTypes;if(!n)return Tt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var a={},s;for(s in n)a[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function Ee(e){return e=e.childContextTypes,e!=null}function ol(){q(Ne),q(ve)}function bi(e,t,n){if(ve.current!==Tt)throw Error(z(168));Q(ve,t),Q(Ne,n)}function Vu(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var a in r)if(!(a in t))throw Error(z(108,Bd(e)||"Unknown",a));return Z({},n,r)}function ul(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Tt,Ut=ve.current,Q(ve,e),Q(Ne,Ne.current),!0}function Bi(e,t,n){var r=e.stateNode;if(!r)throw Error(z(169));n?(e=Vu(e,t,Ut),r.__reactInternalMemoizedMergedChildContext=e,q(Ne),q(ve),Q(ve,e)):q(Ne),Q(Ne,n)}var rt=null,Tl=!1,la=!1;function Wu(e){rt===null?rt=[e]:rt.push(e)}function lf(e){Tl=!0,Wu(e)}function zt(){if(!la&&rt!==null){la=!0;var e=0,t=H;try{var n=rt;for(H=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}rt=null,Tl=!1}catch(a){throw rt!==null&&(rt=rt.slice(e+1)),mu(ws,zt),a}finally{H=t,la=!1}}return null}var ln=[],an=0,cl=null,dl=0,$e=[],Fe=0,Vt=null,lt=1,at="";function Ot(e,t){ln[an++]=dl,ln[an++]=cl,cl=e,dl=t}function Hu(e,t,n){$e[Fe++]=lt,$e[Fe++]=at,$e[Fe++]=Vt,Vt=e;var r=lt;e=at;var a=32-Ke(r)-1;r&=~(1<<a),n+=1;var s=32-Ke(t)+a;if(30<s){var i=a-a%5;s=(r&(1<<i)-1).toString(32),r>>=i,a-=i,lt=1<<32-Ke(t)+a|n<<a|r,at=s+e}else lt=1<<s|n<<a|r,at=e}function As(e){e.return!==null&&(Ot(e,1),Hu(e,1,0))}function zs(e){for(;e===cl;)cl=ln[--an],ln[an]=null,dl=ln[--an],ln[an]=null;for(;e===Vt;)Vt=$e[--Fe],$e[Fe]=null,at=$e[--Fe],$e[Fe]=null,lt=$e[--Fe],$e[Fe]=null}var Ae=null,Le=null,J=!1,Qe=null;function Gu(e,t){var n=Me(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 Ui(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,Ae=e,Le=kt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ae=e,Le=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Vt!==null?{id:lt,overflow:at}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Me(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ae=e,Le=null,!0):!1;default:return!1}}function Va(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Wa(e){if(J){var t=Le;if(t){var n=t;if(!Ui(e,t)){if(Va(e))throw Error(z(418));t=kt(n.nextSibling);var r=Ae;t&&Ui(e,t)?Gu(r,n):(e.flags=e.flags&-4097|2,J=!1,Ae=e)}}else{if(Va(e))throw Error(z(418));e.flags=e.flags&-4097|2,J=!1,Ae=e}}}function Vi(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ae=e}function Ir(e){if(e!==Ae)return!1;if(!J)return Vi(e),J=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Ma(e.type,e.memoizedProps)),t&&(t=Le)){if(Va(e))throw Qu(),Error(z(418));for(;t;)Gu(e,t),t=kt(t.nextSibling)}if(Vi(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(z(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Le=kt(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Le=null}}else Le=Ae?kt(e.stateNode.nextSibling):null;return!0}function Qu(){for(var e=Le;e;)e=kt(e.nextSibling)}function xn(){Le=Ae=null,J=!1}function Is(e){Qe===null?Qe=[e]:Qe.push(e)}var af=dt.ReactCurrentBatchConfig;function zn(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(z(309));var r=n.stateNode}if(!r)throw Error(z(147,e));var a=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(i){var o=a.refs;i===null?delete o[s]:o[s]=i},t._stringRef=s,t)}if(typeof e!="string")throw Error(z(284));if(!n._owner)throw Error(z(290,e))}return e}function Or(e,t){throw e=Object.prototype.toString.call(t),Error(z(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Wi(e){var t=e._init;return t(e._payload)}function Ku(e){function t(h,d){if(e){var f=h.deletions;f===null?(h.deletions=[d],h.flags|=16):f.push(d)}}function n(h,d){if(!e)return null;for(;d!==null;)t(h,d),d=d.sibling;return null}function r(h,d){for(h=new Map;d!==null;)d.key!==null?h.set(d.key,d):h.set(d.index,d),d=d.sibling;return h}function a(h,d){return h=Pt(h,d),h.index=0,h.sibling=null,h}function s(h,d,f){return h.index=f,e?(f=h.alternate,f!==null?(f=f.index,f<d?(h.flags|=2,d):f):(h.flags|=2,d)):(h.flags|=1048576,d)}function i(h){return e&&h.alternate===null&&(h.flags|=2),h}function o(h,d,f,y){return d===null||d.tag!==6?(d=da(f,h.mode,y),d.return=h,d):(d=a(d,f),d.return=h,d)}function u(h,d,f,y){var C=f.type;return C===Yt?g(h,d,f.props.children,y,f.key):d!==null&&(d.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===ft&&Wi(C)===d.type)?(y=a(d,f.props),y.ref=zn(h,d,f),y.return=h,y):(y=Yr(f.type,f.key,f.props,null,h.mode,y),y.ref=zn(h,d,f),y.return=h,y)}function c(h,d,f,y){return d===null||d.tag!==4||d.stateNode.containerInfo!==f.containerInfo||d.stateNode.implementation!==f.implementation?(d=pa(f,h.mode,y),d.return=h,d):(d=a(d,f.children||[]),d.return=h,d)}function g(h,d,f,y,C){return d===null||d.tag!==7?(d=bt(f,h.mode,y,C),d.return=h,d):(d=a(d,f),d.return=h,d)}function m(h,d,f){if(typeof d=="string"&&d!==""||typeof d=="number")return d=da(""+d,h.mode,f),d.return=h,d;if(typeof d=="object"&&d!==null){switch(d.$$typeof){case kr:return f=Yr(d.type,d.key,d.props,null,h.mode,f),f.ref=zn(h,null,d),f.return=h,f;case Xt:return d=pa(d,h.mode,f),d.return=h,d;case ft:var y=d._init;return m(h,y(d._payload),f)}if(Rn(d)||Pn(d))return d=bt(d,h.mode,f,null),d.return=h,d;Or(h,d)}return null}function p(h,d,f,y){var C=d!==null?d.key:null;if(typeof f=="string"&&f!==""||typeof f=="number")return C!==null?null:o(h,d,""+f,y);if(typeof f=="object"&&f!==null){switch(f.$$typeof){case kr:return f.key===C?u(h,d,f,y):null;case Xt:return f.key===C?c(h,d,f,y):null;case ft:return C=f._init,p(h,d,C(f._payload),y)}if(Rn(f)||Pn(f))return C!==null?null:g(h,d,f,y,null);Or(h,f)}return null}function j(h,d,f,y,C){if(typeof y=="string"&&y!==""||typeof y=="number")return h=h.get(f)||null,o(d,h,""+y,C);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case kr:return h=h.get(y.key===null?f:y.key)||null,u(d,h,y,C);case Xt:return h=h.get(y.key===null?f:y.key)||null,c(d,h,y,C);case ft:var A=y._init;return j(h,d,f,A(y._payload),C)}if(Rn(y)||Pn(y))return h=h.get(f)||null,g(d,h,y,C,null);Or(d,y)}return null}function S(h,d,f,y){for(var C=null,A=null,E=d,P=d=0,x=null;E!==null&&P<f.length;P++){E.index>P?(x=E,E=null):x=E.sibling;var w=p(h,E,f[P],y);if(w===null){E===null&&(E=x);break}e&&E&&w.alternate===null&&t(h,E),d=s(w,d,P),A===null?C=w:A.sibling=w,A=w,E=x}if(P===f.length)return n(h,E),J&&Ot(h,P),C;if(E===null){for(;P<f.length;P++)E=m(h,f[P],y),E!==null&&(d=s(E,d,P),A===null?C=E:A.sibling=E,A=E);return J&&Ot(h,P),C}for(E=r(h,E);P<f.length;P++)x=j(E,h,P,f[P],y),x!==null&&(e&&x.alternate!==null&&E.delete(x.key===null?P:x.key),d=s(x,d,P),A===null?C=x:A.sibling=x,A=x);return e&&E.forEach(function(R){return t(h,R)}),J&&Ot(h,P),C}function k(h,d,f,y){var C=Pn(f);if(typeof C!="function")throw Error(z(150));if(f=C.call(f),f==null)throw Error(z(151));for(var A=C=null,E=d,P=d=0,x=null,w=f.next();E!==null&&!w.done;P++,w=f.next()){E.index>P?(x=E,E=null):x=E.sibling;var R=p(h,E,w.value,y);if(R===null){E===null&&(E=x);break}e&&E&&R.alternate===null&&t(h,E),d=s(R,d,P),A===null?C=R:A.sibling=R,A=R,E=x}if(w.done)return n(h,E),J&&Ot(h,P),C;if(E===null){for(;!w.done;P++,w=f.next())w=m(h,w.value,y),w!==null&&(d=s(w,d,P),A===null?C=w:A.sibling=w,A=w);return J&&Ot(h,P),C}for(E=r(h,E);!w.done;P++,w=f.next())w=j(E,h,P,w.value,y),w!==null&&(e&&w.alternate!==null&&E.delete(w.key===null?P:w.key),d=s(w,d,P),A===null?C=w:A.sibling=w,A=w);return e&&E.forEach(function(U){return t(h,U)}),J&&Ot(h,P),C}function N(h,d,f,y){if(typeof f=="object"&&f!==null&&f.type===Yt&&f.key===null&&(f=f.props.children),typeof f=="object"&&f!==null){switch(f.$$typeof){case kr:e:{for(var C=f.key,A=d;A!==null;){if(A.key===C){if(C=f.type,C===Yt){if(A.tag===7){n(h,A.sibling),d=a(A,f.props.children),d.return=h,h=d;break e}}else if(A.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===ft&&Wi(C)===A.type){n(h,A.sibling),d=a(A,f.props),d.ref=zn(h,A,f),d.return=h,h=d;break e}n(h,A);break}else t(h,A);A=A.sibling}f.type===Yt?(d=bt(f.props.children,h.mode,y,f.key),d.return=h,h=d):(y=Yr(f.type,f.key,f.props,null,h.mode,y),y.ref=zn(h,d,f),y.return=h,h=y)}return i(h);case Xt:e:{for(A=f.key;d!==null;){if(d.key===A)if(d.tag===4&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){n(h,d.sibling),d=a(d,f.children||[]),d.return=h,h=d;break e}else{n(h,d);break}else t(h,d);d=d.sibling}d=pa(f,h.mode,y),d.return=h,h=d}return i(h);case ft:return A=f._init,N(h,d,A(f._payload),y)}if(Rn(f))return S(h,d,f,y);if(Pn(f))return k(h,d,f,y);Or(h,f)}return typeof f=="string"&&f!==""||typeof f=="number"?(f=""+f,d!==null&&d.tag===6?(n(h,d.sibling),d=a(d,f),d.return=h,h=d):(n(h,d),d=da(f,h.mode,y),d.return=h,h=d),i(h)):n(h,d)}return N}var yn=Ku(!0),qu=Ku(!1),pl=At(null),fl=null,sn=null,Os=null;function Ds(){Os=sn=fl=null}function Rs(e){var t=pl.current;q(pl),e._currentValue=t}function Ha(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 hn(e,t){fl=e,Os=sn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ce=!0),e.firstContext=null)}function Be(e){var t=e._currentValue;if(Os!==e)if(e={context:e,memoizedValue:t,next:null},sn===null){if(fl===null)throw Error(z(308));sn=e,fl.dependencies={lanes:0,firstContext:e}}else sn=sn.next=e;return t}var $t=null;function $s(e){$t===null?$t=[e]:$t.push(e)}function Ju(e,t,n,r){var a=t.interleaved;return a===null?(n.next=n,$s(t)):(n.next=a.next,a.next=n),t.interleaved=n,ut(e,r)}function ut(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 ht=!1;function Fs(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Xu(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 st(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ct(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,V&2){var a=r.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),r.pending=t,ut(e,n)}return a=r.interleaved,a===null?(t.next=t,$s(r)):(t.next=a.next,a.next=t),r.interleaved=t,ut(e,n)}function Gr(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,ks(e,n)}}function Hi(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var a=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?a=s=i:s=s.next=i,n=n.next}while(n!==null);s===null?a=s=t:s=s.next=t}else a=s=t;n={baseState:r.baseState,firstBaseUpdate:a,lastBaseUpdate:s,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function hl(e,t,n,r){var a=e.updateQueue;ht=!1;var s=a.firstBaseUpdate,i=a.lastBaseUpdate,o=a.shared.pending;if(o!==null){a.shared.pending=null;var u=o,c=u.next;u.next=null,i===null?s=c:i.next=c,i=u;var g=e.alternate;g!==null&&(g=g.updateQueue,o=g.lastBaseUpdate,o!==i&&(o===null?g.firstBaseUpdate=c:o.next=c,g.lastBaseUpdate=u))}if(s!==null){var m=a.baseState;i=0,g=c=u=null,o=s;do{var p=o.lane,j=o.eventTime;if((r&p)===p){g!==null&&(g=g.next={eventTime:j,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var S=e,k=o;switch(p=t,j=n,k.tag){case 1:if(S=k.payload,typeof S=="function"){m=S.call(j,m,p);break e}m=S;break e;case 3:S.flags=S.flags&-65537|128;case 0:if(S=k.payload,p=typeof S=="function"?S.call(j,m,p):S,p==null)break e;m=Z({},m,p);break e;case 2:ht=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,p=a.effects,p===null?a.effects=[o]:p.push(o))}else j={eventTime:j,lane:p,tag:o.tag,payload:o.payload,callback:o.callback,next:null},g===null?(c=g=j,u=m):g=g.next=j,i|=p;if(o=o.next,o===null){if(o=a.shared.pending,o===null)break;p=o,o=p.next,p.next=null,a.lastBaseUpdate=p,a.shared.pending=null}}while(!0);if(g===null&&(u=m),a.baseState=u,a.firstBaseUpdate=c,a.lastBaseUpdate=g,t=a.shared.interleaved,t!==null){a=t;do i|=a.lane,a=a.next;while(a!==t)}else s===null&&(a.shared.lanes=0);Ht|=i,e.lanes=i,e.memoizedState=m}}function Gi(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],a=r.callback;if(a!==null){if(r.callback=null,r=n,typeof a!="function")throw Error(z(191,a));a.call(r)}}}var gr={},tt=At(gr),ar=At(gr),sr=At(gr);function Ft(e){if(e===gr)throw Error(z(174));return e}function Ms(e,t){switch(Q(sr,t),Q(ar,e),Q(tt,gr),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Na(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Na(t,e)}q(tt),Q(tt,t)}function jn(){q(tt),q(ar),q(sr)}function Yu(e){Ft(sr.current);var t=Ft(tt.current),n=Na(t,e.type);t!==n&&(Q(ar,e),Q(tt,n))}function bs(e){ar.current===e&&(q(tt),q(ar))}var X=At(0);function ml(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 aa=[];function Bs(){for(var e=0;e<aa.length;e++)aa[e]._workInProgressVersionPrimary=null;aa.length=0}var Qr=dt.ReactCurrentDispatcher,sa=dt.ReactCurrentBatchConfig,Wt=0,Y=null,ae=null,ie=null,vl=!1,Wn=!1,ir=0,sf=0;function pe(){throw Error(z(321))}function Us(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Je(e[n],t[n]))return!1;return!0}function Vs(e,t,n,r,a,s){if(Wt=s,Y=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Qr.current=e===null||e.memoizedState===null?df:pf,e=n(r,a),Wn){s=0;do{if(Wn=!1,ir=0,25<=s)throw Error(z(301));s+=1,ie=ae=null,t.updateQueue=null,Qr.current=ff,e=n(r,a)}while(Wn)}if(Qr.current=gl,t=ae!==null&&ae.next!==null,Wt=0,ie=ae=Y=null,vl=!1,t)throw Error(z(300));return e}function Ws(){var e=ir!==0;return ir=0,e}function Ye(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ie===null?Y.memoizedState=ie=e:ie=ie.next=e,ie}function Ue(){if(ae===null){var e=Y.alternate;e=e!==null?e.memoizedState:null}else e=ae.next;var t=ie===null?Y.memoizedState:ie.next;if(t!==null)ie=t,ae=e;else{if(e===null)throw Error(z(310));ae=e,e={memoizedState:ae.memoizedState,baseState:ae.baseState,baseQueue:ae.baseQueue,queue:ae.queue,next:null},ie===null?Y.memoizedState=ie=e:ie=ie.next=e}return ie}function or(e,t){return typeof t=="function"?t(e):t}function ia(e){var t=Ue(),n=t.queue;if(n===null)throw Error(z(311));n.lastRenderedReducer=e;var r=ae,a=r.baseQueue,s=n.pending;if(s!==null){if(a!==null){var i=a.next;a.next=s.next,s.next=i}r.baseQueue=a=s,n.pending=null}if(a!==null){s=a.next,r=r.baseState;var o=i=null,u=null,c=s;do{var g=c.lane;if((Wt&g)===g)u!==null&&(u=u.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var m={lane:g,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};u===null?(o=u=m,i=r):u=u.next=m,Y.lanes|=g,Ht|=g}c=c.next}while(c!==null&&c!==s);u===null?i=r:u.next=o,Je(r,t.memoizedState)||(Ce=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=u,n.lastRenderedState=r}if(e=n.interleaved,e!==null){a=e;do s=a.lane,Y.lanes|=s,Ht|=s,a=a.next;while(a!==e)}else a===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function oa(e){var t=Ue(),n=t.queue;if(n===null)throw Error(z(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,s=t.memoizedState;if(a!==null){n.pending=null;var i=a=a.next;do s=e(s,i.action),i=i.next;while(i!==a);Je(s,t.memoizedState)||(Ce=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function Zu(){}function ec(e,t){var n=Y,r=Ue(),a=t(),s=!Je(r.memoizedState,a);if(s&&(r.memoizedState=a,Ce=!0),r=r.queue,Hs(rc.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||ie!==null&&ie.memoizedState.tag&1){if(n.flags|=2048,ur(9,nc.bind(null,n,r,a,t),void 0,null),oe===null)throw Error(z(349));Wt&30||tc(n,t,a)}return a}function tc(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Y.updateQueue,t===null?(t={lastEffect:null,stores:null},Y.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function nc(e,t,n,r){t.value=n,t.getSnapshot=r,lc(t)&&ac(e)}function rc(e,t,n){return n(function(){lc(t)&&ac(e)})}function lc(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Je(e,n)}catch{return!0}}function ac(e){var t=ut(e,1);t!==null&&qe(t,e,1,-1)}function Qi(e){var t=Ye();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:or,lastRenderedState:e},t.queue=e,e=e.dispatch=cf.bind(null,Y,e),[t.memoizedState,e]}function ur(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Y.updateQueue,t===null?(t={lastEffect:null,stores:null},Y.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function sc(){return Ue().memoizedState}function Kr(e,t,n,r){var a=Ye();Y.flags|=e,a.memoizedState=ur(1|t,n,void 0,r===void 0?null:r)}function Ll(e,t,n,r){var a=Ue();r=r===void 0?null:r;var s=void 0;if(ae!==null){var i=ae.memoizedState;if(s=i.destroy,r!==null&&Us(r,i.deps)){a.memoizedState=ur(t,n,s,r);return}}Y.flags|=e,a.memoizedState=ur(1|t,n,s,r)}function Ki(e,t){return Kr(8390656,8,e,t)}function Hs(e,t){return Ll(2048,8,e,t)}function ic(e,t){return Ll(4,2,e,t)}function oc(e,t){return Ll(4,4,e,t)}function uc(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 cc(e,t,n){return n=n!=null?n.concat([e]):null,Ll(4,4,uc.bind(null,t,e),n)}function Gs(){}function dc(e,t){var n=Ue();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Us(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function pc(e,t){var n=Ue();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Us(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function fc(e,t,n){return Wt&21?(Je(n,t)||(n=xu(),Y.lanes|=n,Ht|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ce=!0),e.memoizedState=n)}function of(e,t){var n=H;H=n!==0&&4>n?n:4,e(!0);var r=sa.transition;sa.transition={};try{e(!1),t()}finally{H=n,sa.transition=r}}function hc(){return Ue().memoizedState}function uf(e,t,n){var r=Et(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},mc(e))vc(t,n);else if(n=Ju(e,t,n,r),n!==null){var a=ye();qe(n,e,r,a),gc(n,t,r)}}function cf(e,t,n){var r=Et(e),a={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(mc(e))vc(t,a);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var i=t.lastRenderedState,o=s(i,n);if(a.hasEagerState=!0,a.eagerState=o,Je(o,i)){var u=t.interleaved;u===null?(a.next=a,$s(t)):(a.next=u.next,u.next=a),t.interleaved=a;return}}catch{}finally{}n=Ju(e,t,a,r),n!==null&&(a=ye(),qe(n,e,r,a),gc(n,t,r))}}function mc(e){var t=e.alternate;return e===Y||t!==null&&t===Y}function vc(e,t){Wn=vl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function gc(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ks(e,n)}}var gl={readContext:Be,useCallback:pe,useContext:pe,useEffect:pe,useImperativeHandle:pe,useInsertionEffect:pe,useLayoutEffect:pe,useMemo:pe,useReducer:pe,useRef:pe,useState:pe,useDebugValue:pe,useDeferredValue:pe,useTransition:pe,useMutableSource:pe,useSyncExternalStore:pe,useId:pe,unstable_isNewReconciler:!1},df={readContext:Be,useCallback:function(e,t){return Ye().memoizedState=[e,t===void 0?null:t],e},useContext:Be,useEffect:Ki,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Kr(4194308,4,uc.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Kr(4194308,4,e,t)},useInsertionEffect:function(e,t){return Kr(4,2,e,t)},useMemo:function(e,t){var n=Ye();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ye();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=uf.bind(null,Y,e),[r.memoizedState,e]},useRef:function(e){var t=Ye();return e={current:e},t.memoizedState=e},useState:Qi,useDebugValue:Gs,useDeferredValue:function(e){return Ye().memoizedState=e},useTransition:function(){var e=Qi(!1),t=e[0];return e=of.bind(null,e[1]),Ye().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Y,a=Ye();if(J){if(n===void 0)throw Error(z(407));n=n()}else{if(n=t(),oe===null)throw Error(z(349));Wt&30||tc(r,t,n)}a.memoizedState=n;var s={value:n,getSnapshot:t};return a.queue=s,Ki(rc.bind(null,r,s,e),[e]),r.flags|=2048,ur(9,nc.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=Ye(),t=oe.identifierPrefix;if(J){var n=at,r=lt;n=(r&~(1<<32-Ke(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ir++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=sf++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},pf={readContext:Be,useCallback:dc,useContext:Be,useEffect:Hs,useImperativeHandle:cc,useInsertionEffect:ic,useLayoutEffect:oc,useMemo:pc,useReducer:ia,useRef:sc,useState:function(){return ia(or)},useDebugValue:Gs,useDeferredValue:function(e){var t=Ue();return fc(t,ae.memoizedState,e)},useTransition:function(){var e=ia(or)[0],t=Ue().memoizedState;return[e,t]},useMutableSource:Zu,useSyncExternalStore:ec,useId:hc,unstable_isNewReconciler:!1},ff={readContext:Be,useCallback:dc,useContext:Be,useEffect:Hs,useImperativeHandle:cc,useInsertionEffect:ic,useLayoutEffect:oc,useMemo:pc,useReducer:oa,useRef:sc,useState:function(){return oa(or)},useDebugValue:Gs,useDeferredValue:function(e){var t=Ue();return ae===null?t.memoizedState=e:fc(t,ae.memoizedState,e)},useTransition:function(){var e=oa(or)[0],t=Ue().memoizedState;return[e,t]},useMutableSource:Zu,useSyncExternalStore:ec,useId:hc,unstable_isNewReconciler:!1};function He(e,t){if(e&&e.defaultProps){t=Z({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Ga(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Z({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Al={isMounted:function(e){return(e=e._reactInternals)?Kt(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ye(),a=Et(e),s=st(r,a);s.payload=t,n!=null&&(s.callback=n),t=Ct(e,s,a),t!==null&&(qe(t,e,a,r),Gr(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ye(),a=Et(e),s=st(r,a);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=Ct(e,s,a),t!==null&&(qe(t,e,a,r),Gr(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ye(),r=Et(e),a=st(n,r);a.tag=2,t!=null&&(a.callback=t),t=Ct(e,a,r),t!==null&&(qe(t,e,r,n),Gr(t,e,r))}};function qi(e,t,n,r,a,s,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,i):t.prototype&&t.prototype.isPureReactComponent?!tr(n,r)||!tr(a,s):!0}function xc(e,t,n){var r=!1,a=Tt,s=t.contextType;return typeof s=="object"&&s!==null?s=Be(s):(a=Ee(t)?Ut:ve.current,r=t.contextTypes,s=(r=r!=null)?gn(e,a):Tt),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Al,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=a,e.__reactInternalMemoizedMaskedChildContext=s),t}function Ji(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&&Al.enqueueReplaceState(t,t.state,null)}function Qa(e,t,n,r){var a=e.stateNode;a.props=n,a.state=e.memoizedState,a.refs={},Fs(e);var s=t.contextType;typeof s=="object"&&s!==null?a.context=Be(s):(s=Ee(t)?Ut:ve.current,a.context=gn(e,s)),a.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(Ga(e,t,s,n),a.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof a.getSnapshotBeforeUpdate=="function"||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(t=a.state,typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount(),t!==a.state&&Al.enqueueReplaceState(a,a.state,null),hl(e,n,a,r),a.state=e.memoizedState),typeof a.componentDidMount=="function"&&(e.flags|=4194308)}function Sn(e,t){try{var n="",r=t;do n+=bd(r),r=r.return;while(r);var a=n}catch(s){a=`
39
- Error generating stack: `+s.message+`
40
- `+s.stack}return{value:e,source:t,stack:a,digest:null}}function ua(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Ka(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var hf=typeof WeakMap=="function"?WeakMap:Map;function yc(e,t,n){n=st(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){yl||(yl=!0,ls=r),Ka(e,t)},n}function jc(e,t,n){n=st(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var a=t.value;n.payload=function(){return r(a)},n.callback=function(){Ka(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Ka(e,t),typeof r!="function"&&(Nt===null?Nt=new Set([this]):Nt.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function Xi(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new hf;var a=new Set;r.set(t,a)}else a=r.get(t),a===void 0&&(a=new Set,r.set(t,a));a.has(n)||(a.add(n),e=_f.bind(null,e,t,n),t.then(e,e))}function Yi(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 Zi(e,t,n,r,a){return e.mode&1?(e.flags|=65536,e.lanes=a,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=st(-1,1),t.tag=2,Ct(n,t,1))),n.lanes|=1),e)}var mf=dt.ReactCurrentOwner,Ce=!1;function xe(e,t,n,r){t.child=e===null?qu(t,null,n,r):yn(t,e.child,n,r)}function eo(e,t,n,r,a){n=n.render;var s=t.ref;return hn(t,a),r=Vs(e,t,n,r,s,a),n=Ws(),e!==null&&!Ce?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,ct(e,t,a)):(J&&n&&As(t),t.flags|=1,xe(e,t,r,a),t.child)}function to(e,t,n,r,a){if(e===null){var s=n.type;return typeof s=="function"&&!ei(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,Sc(e,t,s,r,a)):(e=Yr(n.type,null,r,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&a)){var i=s.memoizedProps;if(n=n.compare,n=n!==null?n:tr,n(i,r)&&e.ref===t.ref)return ct(e,t,a)}return t.flags|=1,e=Pt(s,r),e.ref=t.ref,e.return=t,t.child=e}function Sc(e,t,n,r,a){if(e!==null){var s=e.memoizedProps;if(tr(s,r)&&e.ref===t.ref)if(Ce=!1,t.pendingProps=r=s,(e.lanes&a)!==0)e.flags&131072&&(Ce=!0);else return t.lanes=e.lanes,ct(e,t,a)}return qa(e,t,n,r,a)}function wc(e,t,n){var r=t.pendingProps,a=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Q(un,Te),Te|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Q(un,Te),Te|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,Q(un,Te),Te|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,Q(un,Te),Te|=r;return xe(e,t,a,n),t.child}function kc(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function qa(e,t,n,r,a){var s=Ee(n)?Ut:ve.current;return s=gn(t,s),hn(t,a),n=Vs(e,t,n,r,s,a),r=Ws(),e!==null&&!Ce?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,ct(e,t,a)):(J&&r&&As(t),t.flags|=1,xe(e,t,n,a),t.child)}function no(e,t,n,r,a){if(Ee(n)){var s=!0;ul(t)}else s=!1;if(hn(t,a),t.stateNode===null)qr(e,t),xc(t,n,r),Qa(t,n,r,a),r=!0;else if(e===null){var i=t.stateNode,o=t.memoizedProps;i.props=o;var u=i.context,c=n.contextType;typeof c=="object"&&c!==null?c=Be(c):(c=Ee(n)?Ut:ve.current,c=gn(t,c));var g=n.getDerivedStateFromProps,m=typeof g=="function"||typeof i.getSnapshotBeforeUpdate=="function";m||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(o!==r||u!==c)&&Ji(t,i,r,c),ht=!1;var p=t.memoizedState;i.state=p,hl(t,r,i,a),u=t.memoizedState,o!==r||p!==u||Ne.current||ht?(typeof g=="function"&&(Ga(t,n,g,r),u=t.memoizedState),(o=ht||qi(t,n,o,r,p,u,c))?(m||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),i.props=r,i.state=u,i.context=c,r=o):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,Xu(e,t),o=t.memoizedProps,c=t.type===t.elementType?o:He(t.type,o),i.props=c,m=t.pendingProps,p=i.context,u=n.contextType,typeof u=="object"&&u!==null?u=Be(u):(u=Ee(n)?Ut:ve.current,u=gn(t,u));var j=n.getDerivedStateFromProps;(g=typeof j=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(o!==m||p!==u)&&Ji(t,i,r,u),ht=!1,p=t.memoizedState,i.state=p,hl(t,r,i,a);var S=t.memoizedState;o!==m||p!==S||Ne.current||ht?(typeof j=="function"&&(Ga(t,n,j,r),S=t.memoizedState),(c=ht||qi(t,n,c,r,p,S,u)||!1)?(g||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,S,u),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,S,u)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||o===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=S),i.props=r,i.state=S,i.context=u,r=c):(typeof i.componentDidUpdate!="function"||o===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return Ja(e,t,n,r,s,a)}function Ja(e,t,n,r,a,s){kc(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return a&&Bi(t,n,!1),ct(e,t,s);r=t.stateNode,mf.current=t;var o=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=yn(t,e.child,null,s),t.child=yn(t,null,o,s)):xe(e,t,o,s),t.memoizedState=r.state,a&&Bi(t,n,!0),t.child}function Cc(e){var t=e.stateNode;t.pendingContext?bi(e,t.pendingContext,t.pendingContext!==t.context):t.context&&bi(e,t.context,!1),Ms(e,t.containerInfo)}function ro(e,t,n,r,a){return xn(),Is(a),t.flags|=256,xe(e,t,n,r),t.child}var Xa={dehydrated:null,treeContext:null,retryLane:0};function Ya(e){return{baseLanes:e,cachePool:null,transitions:null}}function Nc(e,t,n){var r=t.pendingProps,a=X.current,s=!1,i=(t.flags&128)!==0,o;if((o=i)||(o=e!==null&&e.memoizedState===null?!1:(a&2)!==0),o?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(a|=1),Q(X,a&1),e===null)return Wa(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):(i=r.children,e=r.fallback,s?(r=t.mode,s=t.child,i={mode:"hidden",children:i},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=i):s=Ol(i,r,0,null),e=bt(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Ya(n),t.memoizedState=Xa,e):Qs(t,i));if(a=e.memoizedState,a!==null&&(o=a.dehydrated,o!==null))return vf(e,t,i,r,o,a,n);if(s){s=r.fallback,i=t.mode,a=e.child,o=a.sibling;var u={mode:"hidden",children:r.children};return!(i&1)&&t.child!==a?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=Pt(a,u),r.subtreeFlags=a.subtreeFlags&14680064),o!==null?s=Pt(o,s):(s=bt(s,i,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,i=e.child.memoizedState,i=i===null?Ya(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},s.memoizedState=i,s.childLanes=e.childLanes&~n,t.memoizedState=Xa,r}return s=e.child,e=s.sibling,r=Pt(s,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Qs(e,t){return t=Ol({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Dr(e,t,n,r){return r!==null&&Is(r),yn(t,e.child,null,n),e=Qs(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function vf(e,t,n,r,a,s,i){if(n)return t.flags&256?(t.flags&=-257,r=ua(Error(z(422))),Dr(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,a=t.mode,r=Ol({mode:"visible",children:r.children},a,0,null),s=bt(s,a,i,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&yn(t,e.child,null,i),t.child.memoizedState=Ya(i),t.memoizedState=Xa,s);if(!(t.mode&1))return Dr(e,t,i,null);if(a.data==="$!"){if(r=a.nextSibling&&a.nextSibling.dataset,r)var o=r.dgst;return r=o,s=Error(z(419)),r=ua(s,r,void 0),Dr(e,t,i,r)}if(o=(i&e.childLanes)!==0,Ce||o){if(r=oe,r!==null){switch(i&-i){case 4:a=2;break;case 16:a=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:a=32;break;case 536870912:a=268435456;break;default:a=0}a=a&(r.suspendedLanes|i)?0:a,a!==0&&a!==s.retryLane&&(s.retryLane=a,ut(e,a),qe(r,e,a,-1))}return Zs(),r=ua(Error(z(421))),Dr(e,t,i,r)}return a.data==="$?"?(t.flags|=128,t.child=e.child,t=Tf.bind(null,e),a._reactRetry=t,null):(e=s.treeContext,Le=kt(a.nextSibling),Ae=t,J=!0,Qe=null,e!==null&&($e[Fe++]=lt,$e[Fe++]=at,$e[Fe++]=Vt,lt=e.id,at=e.overflow,Vt=t),t=Qs(t,r.children),t.flags|=4096,t)}function lo(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ha(e.return,t,n)}function ca(e,t,n,r,a){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:a}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=a)}function Ec(e,t,n){var r=t.pendingProps,a=r.revealOrder,s=r.tail;if(xe(e,t,r.children,n),r=X.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&&lo(e,n,t);else if(e.tag===19)lo(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(Q(X,r),!(t.mode&1))t.memoizedState=null;else switch(a){case"forwards":for(n=t.child,a=null;n!==null;)e=n.alternate,e!==null&&ml(e)===null&&(a=n),n=n.sibling;n=a,n===null?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),ca(t,!1,a,n,s);break;case"backwards":for(n=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&ml(e)===null){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}ca(t,!0,n,null,s);break;case"together":ca(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function qr(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ct(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ht|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(z(153));if(t.child!==null){for(e=t.child,n=Pt(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Pt(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function gf(e,t,n){switch(t.tag){case 3:Cc(t),xn();break;case 5:Yu(t);break;case 1:Ee(t.type)&&ul(t);break;case 4:Ms(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,a=t.memoizedProps.value;Q(pl,r._currentValue),r._currentValue=a;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Q(X,X.current&1),t.flags|=128,null):n&t.child.childLanes?Nc(e,t,n):(Q(X,X.current&1),e=ct(e,t,n),e!==null?e.sibling:null);Q(X,X.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Ec(e,t,n);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),Q(X,X.current),r)break;return null;case 22:case 23:return t.lanes=0,wc(e,t,n)}return ct(e,t,n)}var Pc,Za,_c,Tc;Pc=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}};Za=function(){};_c=function(e,t,n,r){var a=e.memoizedProps;if(a!==r){e=t.stateNode,Ft(tt.current);var s=null;switch(n){case"input":a=Sa(e,a),r=Sa(e,r),s=[];break;case"select":a=Z({},a,{value:void 0}),r=Z({},r,{value:void 0}),s=[];break;case"textarea":a=Ca(e,a),r=Ca(e,r),s=[];break;default:typeof a.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=il)}Ea(n,r);var i;n=null;for(c in a)if(!r.hasOwnProperty(c)&&a.hasOwnProperty(c)&&a[c]!=null)if(c==="style"){var o=a[c];for(i in o)o.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Kn.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in r){var u=r[c];if(o=a!=null?a[c]:void 0,r.hasOwnProperty(c)&&u!==o&&(u!=null||o!=null))if(c==="style")if(o){for(i in o)!o.hasOwnProperty(i)||u&&u.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in u)u.hasOwnProperty(i)&&o[i]!==u[i]&&(n||(n={}),n[i]=u[i])}else n||(s||(s=[]),s.push(c,n)),n=u;else c==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,o=o?o.__html:void 0,u!=null&&o!==u&&(s=s||[]).push(c,u)):c==="children"?typeof u!="string"&&typeof u!="number"||(s=s||[]).push(c,""+u):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Kn.hasOwnProperty(c)?(u!=null&&c==="onScroll"&&K("scroll",e),s||o===u||(s=[])):(s=s||[]).push(c,u))}n&&(s=s||[]).push("style",n);var c=s;(t.updateQueue=c)&&(t.flags|=4)}};Tc=function(e,t,n,r){n!==r&&(t.flags|=4)};function In(e,t){if(!J)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 fe(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var a=e.child;a!==null;)n|=a.lanes|a.childLanes,r|=a.subtreeFlags&14680064,r|=a.flags&14680064,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)n|=a.lanes|a.childLanes,r|=a.subtreeFlags,r|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function xf(e,t,n){var r=t.pendingProps;switch(zs(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return fe(t),null;case 1:return Ee(t.type)&&ol(),fe(t),null;case 3:return r=t.stateNode,jn(),q(Ne),q(ve),Bs(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ir(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Qe!==null&&(is(Qe),Qe=null))),Za(e,t),fe(t),null;case 5:bs(t);var a=Ft(sr.current);if(n=t.type,e!==null&&t.stateNode!=null)_c(e,t,n,r,a),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(z(166));return fe(t),null}if(e=Ft(tt.current),Ir(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[Ze]=t,r[lr]=s,e=(t.mode&1)!==0,n){case"dialog":K("cancel",r),K("close",r);break;case"iframe":case"object":case"embed":K("load",r);break;case"video":case"audio":for(a=0;a<Fn.length;a++)K(Fn[a],r);break;case"source":K("error",r);break;case"img":case"image":case"link":K("error",r),K("load",r);break;case"details":K("toggle",r);break;case"input":fi(r,s),K("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},K("invalid",r);break;case"textarea":mi(r,s),K("invalid",r)}Ea(n,s),a=null;for(var i in s)if(s.hasOwnProperty(i)){var o=s[i];i==="children"?typeof o=="string"?r.textContent!==o&&(s.suppressHydrationWarning!==!0&&zr(r.textContent,o,e),a=["children",o]):typeof o=="number"&&r.textContent!==""+o&&(s.suppressHydrationWarning!==!0&&zr(r.textContent,o,e),a=["children",""+o]):Kn.hasOwnProperty(i)&&o!=null&&i==="onScroll"&&K("scroll",r)}switch(n){case"input":Cr(r),hi(r,s,!0);break;case"textarea":Cr(r),vi(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=il)}r=a,t.updateQueue=r,r!==null&&(t.flags|=4)}else{i=a.nodeType===9?a:a.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=ru(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[Ze]=t,e[lr]=r,Pc(e,t,!1,!1),t.stateNode=e;e:{switch(i=Pa(n,r),n){case"dialog":K("cancel",e),K("close",e),a=r;break;case"iframe":case"object":case"embed":K("load",e),a=r;break;case"video":case"audio":for(a=0;a<Fn.length;a++)K(Fn[a],e);a=r;break;case"source":K("error",e),a=r;break;case"img":case"image":case"link":K("error",e),K("load",e),a=r;break;case"details":K("toggle",e),a=r;break;case"input":fi(e,r),a=Sa(e,r),K("invalid",e);break;case"option":a=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},a=Z({},r,{value:void 0}),K("invalid",e);break;case"textarea":mi(e,r),a=Ca(e,r),K("invalid",e);break;default:a=r}Ea(n,a),o=a;for(s in o)if(o.hasOwnProperty(s)){var u=o[s];s==="style"?su(e,u):s==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&lu(e,u)):s==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&qn(e,u):typeof u=="number"&&qn(e,""+u):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Kn.hasOwnProperty(s)?u!=null&&s==="onScroll"&&K("scroll",e):u!=null&&gs(e,s,u,i))}switch(n){case"input":Cr(e),hi(e,r,!1);break;case"textarea":Cr(e),vi(e);break;case"option":r.value!=null&&e.setAttribute("value",""+_t(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?cn(e,!!r.multiple,s,!1):r.defaultValue!=null&&cn(e,!!r.multiple,r.defaultValue,!0);break;default:typeof a.onClick=="function"&&(e.onclick=il)}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 fe(t),null;case 6:if(e&&t.stateNode!=null)Tc(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(z(166));if(n=Ft(sr.current),Ft(tt.current),Ir(t)){if(r=t.stateNode,n=t.memoizedProps,r[Ze]=t,(s=r.nodeValue!==n)&&(e=Ae,e!==null))switch(e.tag){case 3:zr(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&zr(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Ze]=t,t.stateNode=r}return fe(t),null;case 13:if(q(X),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(J&&Le!==null&&t.mode&1&&!(t.flags&128))Qu(),xn(),t.flags|=98560,s=!1;else if(s=Ir(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(z(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(z(317));s[Ze]=t}else xn(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;fe(t),s=!1}else Qe!==null&&(is(Qe),Qe=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||X.current&1?se===0&&(se=3):Zs())),t.updateQueue!==null&&(t.flags|=4),fe(t),null);case 4:return jn(),Za(e,t),e===null&&nr(t.stateNode.containerInfo),fe(t),null;case 10:return Rs(t.type._context),fe(t),null;case 17:return Ee(t.type)&&ol(),fe(t),null;case 19:if(q(X),s=t.memoizedState,s===null)return fe(t),null;if(r=(t.flags&128)!==0,i=s.rendering,i===null)if(r)In(s,!1);else{if(se!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=ml(e),i!==null){for(t.flags|=128,In(s,!1),r=i.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,i=s.alternate,i===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=i.childLanes,s.lanes=i.lanes,s.child=i.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=i.memoizedProps,s.memoizedState=i.memoizedState,s.updateQueue=i.updateQueue,s.type=i.type,e=i.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Q(X,X.current&1|2),t.child}e=e.sibling}s.tail!==null&&ne()>wn&&(t.flags|=128,r=!0,In(s,!1),t.lanes=4194304)}else{if(!r)if(e=ml(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),In(s,!0),s.tail===null&&s.tailMode==="hidden"&&!i.alternate&&!J)return fe(t),null}else 2*ne()-s.renderingStartTime>wn&&n!==1073741824&&(t.flags|=128,r=!0,In(s,!1),t.lanes=4194304);s.isBackwards?(i.sibling=t.child,t.child=i):(n=s.last,n!==null?n.sibling=i:t.child=i,s.last=i)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=ne(),t.sibling=null,n=X.current,Q(X,r?n&1|2:n&1),t):(fe(t),null);case 22:case 23:return Ys(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Te&1073741824&&(fe(t),t.subtreeFlags&6&&(t.flags|=8192)):fe(t),null;case 24:return null;case 25:return null}throw Error(z(156,t.tag))}function yf(e,t){switch(zs(t),t.tag){case 1:return Ee(t.type)&&ol(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return jn(),q(Ne),q(ve),Bs(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return bs(t),null;case 13:if(q(X),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(z(340));xn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return q(X),null;case 4:return jn(),null;case 10:return Rs(t.type._context),null;case 22:case 23:return Ys(),null;case 24:return null;default:return null}}var Rr=!1,he=!1,jf=typeof WeakSet=="function"?WeakSet:Set,D=null;function on(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ee(e,t,r)}else n.current=null}function es(e,t,n){try{n()}catch(r){ee(e,t,r)}}var ao=!1;function Sf(e,t){if($a=ll,e=Ou(),Ls(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 a=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var i=0,o=-1,u=-1,c=0,g=0,m=e,p=null;t:for(;;){for(var j;m!==n||a!==0&&m.nodeType!==3||(o=i+a),m!==s||r!==0&&m.nodeType!==3||(u=i+r),m.nodeType===3&&(i+=m.nodeValue.length),(j=m.firstChild)!==null;)p=m,m=j;for(;;){if(m===e)break t;if(p===n&&++c===a&&(o=i),p===s&&++g===r&&(u=i),(j=m.nextSibling)!==null)break;m=p,p=m.parentNode}m=j}n=o===-1||u===-1?null:{start:o,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Fa={focusedElem:e,selectionRange:n},ll=!1,D=t;D!==null;)if(t=D,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,D=e;else for(;D!==null;){t=D;try{var S=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(S!==null){var k=S.memoizedProps,N=S.memoizedState,h=t.stateNode,d=h.getSnapshotBeforeUpdate(t.elementType===t.type?k:He(t.type,k),N);h.__reactInternalSnapshotBeforeUpdate=d}break;case 3:var f=t.stateNode.containerInfo;f.nodeType===1?f.textContent="":f.nodeType===9&&f.documentElement&&f.removeChild(f.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(z(163))}}catch(y){ee(t,t.return,y)}if(e=t.sibling,e!==null){e.return=t.return,D=e;break}D=t.return}return S=ao,ao=!1,S}function Hn(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var a=r=r.next;do{if((a.tag&e)===e){var s=a.destroy;a.destroy=void 0,s!==void 0&&es(t,n,s)}a=a.next}while(a!==r)}}function zl(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 ts(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 Lc(e){var t=e.alternate;t!==null&&(e.alternate=null,Lc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ze],delete t[lr],delete t[Ba],delete t[nf],delete t[rf])),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 Ac(e){return e.tag===5||e.tag===3||e.tag===4}function so(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ac(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 ns(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=il));else if(r!==4&&(e=e.child,e!==null))for(ns(e,t,n),e=e.sibling;e!==null;)ns(e,t,n),e=e.sibling}function rs(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(rs(e,t,n),e=e.sibling;e!==null;)rs(e,t,n),e=e.sibling}var ue=null,Ge=!1;function pt(e,t,n){for(n=n.child;n!==null;)zc(e,t,n),n=n.sibling}function zc(e,t,n){if(et&&typeof et.onCommitFiberUnmount=="function")try{et.onCommitFiberUnmount(Cl,n)}catch{}switch(n.tag){case 5:he||on(n,t);case 6:var r=ue,a=Ge;ue=null,pt(e,t,n),ue=r,Ge=a,ue!==null&&(Ge?(e=ue,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ue.removeChild(n.stateNode));break;case 18:ue!==null&&(Ge?(e=ue,n=n.stateNode,e.nodeType===8?ra(e.parentNode,n):e.nodeType===1&&ra(e,n),Zn(e)):ra(ue,n.stateNode));break;case 4:r=ue,a=Ge,ue=n.stateNode.containerInfo,Ge=!0,pt(e,t,n),ue=r,Ge=a;break;case 0:case 11:case 14:case 15:if(!he&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){a=r=r.next;do{var s=a,i=s.destroy;s=s.tag,i!==void 0&&(s&2||s&4)&&es(n,t,i),a=a.next}while(a!==r)}pt(e,t,n);break;case 1:if(!he&&(on(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(o){ee(n,t,o)}pt(e,t,n);break;case 21:pt(e,t,n);break;case 22:n.mode&1?(he=(r=he)||n.memoizedState!==null,pt(e,t,n),he=r):pt(e,t,n);break;default:pt(e,t,n)}}function io(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new jf),t.forEach(function(r){var a=Lf.bind(null,e,r);n.has(r)||(n.add(r),r.then(a,a))})}}function We(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r];try{var s=e,i=t,o=i;e:for(;o!==null;){switch(o.tag){case 5:ue=o.stateNode,Ge=!1;break e;case 3:ue=o.stateNode.containerInfo,Ge=!0;break e;case 4:ue=o.stateNode.containerInfo,Ge=!0;break e}o=o.return}if(ue===null)throw Error(z(160));zc(s,i,a),ue=null,Ge=!1;var u=a.alternate;u!==null&&(u.return=null),a.return=null}catch(c){ee(a,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Ic(t,e),t=t.sibling}function Ic(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(We(t,e),Xe(e),r&4){try{Hn(3,e,e.return),zl(3,e)}catch(k){ee(e,e.return,k)}try{Hn(5,e,e.return)}catch(k){ee(e,e.return,k)}}break;case 1:We(t,e),Xe(e),r&512&&n!==null&&on(n,n.return);break;case 5:if(We(t,e),Xe(e),r&512&&n!==null&&on(n,n.return),e.flags&32){var a=e.stateNode;try{qn(a,"")}catch(k){ee(e,e.return,k)}}if(r&4&&(a=e.stateNode,a!=null)){var s=e.memoizedProps,i=n!==null?n.memoizedProps:s,o=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{o==="input"&&s.type==="radio"&&s.name!=null&&tu(a,s),Pa(o,i);var c=Pa(o,s);for(i=0;i<u.length;i+=2){var g=u[i],m=u[i+1];g==="style"?su(a,m):g==="dangerouslySetInnerHTML"?lu(a,m):g==="children"?qn(a,m):gs(a,g,m,c)}switch(o){case"input":wa(a,s);break;case"textarea":nu(a,s);break;case"select":var p=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!s.multiple;var j=s.value;j!=null?cn(a,!!s.multiple,j,!1):p!==!!s.multiple&&(s.defaultValue!=null?cn(a,!!s.multiple,s.defaultValue,!0):cn(a,!!s.multiple,s.multiple?[]:"",!1))}a[lr]=s}catch(k){ee(e,e.return,k)}}break;case 6:if(We(t,e),Xe(e),r&4){if(e.stateNode===null)throw Error(z(162));a=e.stateNode,s=e.memoizedProps;try{a.nodeValue=s}catch(k){ee(e,e.return,k)}}break;case 3:if(We(t,e),Xe(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Zn(t.containerInfo)}catch(k){ee(e,e.return,k)}break;case 4:We(t,e),Xe(e);break;case 13:We(t,e),Xe(e),a=e.child,a.flags&8192&&(s=a.memoizedState!==null,a.stateNode.isHidden=s,!s||a.alternate!==null&&a.alternate.memoizedState!==null||(Js=ne())),r&4&&io(e);break;case 22:if(g=n!==null&&n.memoizedState!==null,e.mode&1?(he=(c=he)||g,We(t,e),he=c):We(t,e),Xe(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!g&&e.mode&1)for(D=e,g=e.child;g!==null;){for(m=D=g;D!==null;){switch(p=D,j=p.child,p.tag){case 0:case 11:case 14:case 15:Hn(4,p,p.return);break;case 1:on(p,p.return);var S=p.stateNode;if(typeof S.componentWillUnmount=="function"){r=p,n=p.return;try{t=r,S.props=t.memoizedProps,S.state=t.memoizedState,S.componentWillUnmount()}catch(k){ee(r,n,k)}}break;case 5:on(p,p.return);break;case 22:if(p.memoizedState!==null){uo(m);continue}}j!==null?(j.return=p,D=j):uo(m)}g=g.sibling}e:for(g=null,m=e;;){if(m.tag===5){if(g===null){g=m;try{a=m.stateNode,c?(s=a.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(o=m.stateNode,u=m.memoizedProps.style,i=u!=null&&u.hasOwnProperty("display")?u.display:null,o.style.display=au("display",i))}catch(k){ee(e,e.return,k)}}}else if(m.tag===6){if(g===null)try{m.stateNode.nodeValue=c?"":m.memoizedProps}catch(k){ee(e,e.return,k)}}else if((m.tag!==22&&m.tag!==23||m.memoizedState===null||m===e)&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===e)break e;for(;m.sibling===null;){if(m.return===null||m.return===e)break e;g===m&&(g=null),m=m.return}g===m&&(g=null),m.sibling.return=m.return,m=m.sibling}}break;case 19:We(t,e),Xe(e),r&4&&io(e);break;case 21:break;default:We(t,e),Xe(e)}}function Xe(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Ac(n)){var r=n;break e}n=n.return}throw Error(z(160))}switch(r.tag){case 5:var a=r.stateNode;r.flags&32&&(qn(a,""),r.flags&=-33);var s=so(e);rs(e,s,a);break;case 3:case 4:var i=r.stateNode.containerInfo,o=so(e);ns(e,o,i);break;default:throw Error(z(161))}}catch(u){ee(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function wf(e,t,n){D=e,Oc(e)}function Oc(e,t,n){for(var r=(e.mode&1)!==0;D!==null;){var a=D,s=a.child;if(a.tag===22&&r){var i=a.memoizedState!==null||Rr;if(!i){var o=a.alternate,u=o!==null&&o.memoizedState!==null||he;o=Rr;var c=he;if(Rr=i,(he=u)&&!c)for(D=a;D!==null;)i=D,u=i.child,i.tag===22&&i.memoizedState!==null?co(a):u!==null?(u.return=i,D=u):co(a);for(;s!==null;)D=s,Oc(s),s=s.sibling;D=a,Rr=o,he=c}oo(e)}else a.subtreeFlags&8772&&s!==null?(s.return=a,D=s):oo(e)}}function oo(e){for(;D!==null;){var t=D;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:he||zl(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!he)if(n===null)r.componentDidMount();else{var a=t.elementType===t.type?n.memoizedProps:He(t.type,n.memoizedProps);r.componentDidUpdate(a,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&Gi(t,s,r);break;case 3:var i=t.updateQueue;if(i!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Gi(t,i,n)}break;case 5:var o=t.stateNode;if(n===null&&t.flags&4){n=o;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var g=c.memoizedState;if(g!==null){var m=g.dehydrated;m!==null&&Zn(m)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(z(163))}he||t.flags&512&&ts(t)}catch(p){ee(t,t.return,p)}}if(t===e){D=null;break}if(n=t.sibling,n!==null){n.return=t.return,D=n;break}D=t.return}}function uo(e){for(;D!==null;){var t=D;if(t===e){D=null;break}var n=t.sibling;if(n!==null){n.return=t.return,D=n;break}D=t.return}}function co(e){for(;D!==null;){var t=D;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{zl(4,t)}catch(u){ee(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var a=t.return;try{r.componentDidMount()}catch(u){ee(t,a,u)}}var s=t.return;try{ts(t)}catch(u){ee(t,s,u)}break;case 5:var i=t.return;try{ts(t)}catch(u){ee(t,i,u)}}}catch(u){ee(t,t.return,u)}if(t===e){D=null;break}var o=t.sibling;if(o!==null){o.return=t.return,D=o;break}D=t.return}}var kf=Math.ceil,xl=dt.ReactCurrentDispatcher,Ks=dt.ReactCurrentOwner,be=dt.ReactCurrentBatchConfig,V=0,oe=null,re=null,ce=0,Te=0,un=At(0),se=0,cr=null,Ht=0,Il=0,qs=0,Gn=null,ke=null,Js=0,wn=1/0,nt=null,yl=!1,ls=null,Nt=null,$r=!1,xt=null,jl=0,Qn=0,as=null,Jr=-1,Xr=0;function ye(){return V&6?ne():Jr!==-1?Jr:Jr=ne()}function Et(e){return e.mode&1?V&2&&ce!==0?ce&-ce:af.transition!==null?(Xr===0&&(Xr=xu()),Xr):(e=H,e!==0||(e=window.event,e=e===void 0?16:Nu(e.type)),e):1}function qe(e,t,n,r){if(50<Qn)throw Qn=0,as=null,Error(z(185));hr(e,n,r),(!(V&2)||e!==oe)&&(e===oe&&(!(V&2)&&(Il|=n),se===4&&vt(e,ce)),Pe(e,r),n===1&&V===0&&!(t.mode&1)&&(wn=ne()+500,Tl&&zt()))}function Pe(e,t){var n=e.callbackNode;ap(e,t);var r=rl(e,e===oe?ce:0);if(r===0)n!==null&&yi(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&yi(n),t===1)e.tag===0?lf(po.bind(null,e)):Wu(po.bind(null,e)),ef(function(){!(V&6)&&zt()}),n=null;else{switch(yu(r)){case 1:n=ws;break;case 4:n=vu;break;case 16:n=nl;break;case 536870912:n=gu;break;default:n=nl}n=Uc(n,Dc.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Dc(e,t){if(Jr=-1,Xr=0,V&6)throw Error(z(327));var n=e.callbackNode;if(mn()&&e.callbackNode!==n)return null;var r=rl(e,e===oe?ce:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Sl(e,r);else{t=r;var a=V;V|=2;var s=$c();(oe!==e||ce!==t)&&(nt=null,wn=ne()+500,Mt(e,t));do try{Ef();break}catch(o){Rc(e,o)}while(!0);Ds(),xl.current=s,V=a,re!==null?t=0:(oe=null,ce=0,t=se)}if(t!==0){if(t===2&&(a=za(e),a!==0&&(r=a,t=ss(e,a))),t===1)throw n=cr,Mt(e,0),vt(e,r),Pe(e,ne()),n;if(t===6)vt(e,r);else{if(a=e.current.alternate,!(r&30)&&!Cf(a)&&(t=Sl(e,r),t===2&&(s=za(e),s!==0&&(r=s,t=ss(e,s))),t===1))throw n=cr,Mt(e,0),vt(e,r),Pe(e,ne()),n;switch(e.finishedWork=a,e.finishedLanes=r,t){case 0:case 1:throw Error(z(345));case 2:Dt(e,ke,nt);break;case 3:if(vt(e,r),(r&130023424)===r&&(t=Js+500-ne(),10<t)){if(rl(e,0)!==0)break;if(a=e.suspendedLanes,(a&r)!==r){ye(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=ba(Dt.bind(null,e,ke,nt),t);break}Dt(e,ke,nt);break;case 4:if(vt(e,r),(r&4194240)===r)break;for(t=e.eventTimes,a=-1;0<r;){var i=31-Ke(r);s=1<<i,i=t[i],i>a&&(a=i),r&=~s}if(r=a,r=ne()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*kf(r/1960))-r,10<r){e.timeoutHandle=ba(Dt.bind(null,e,ke,nt),r);break}Dt(e,ke,nt);break;case 5:Dt(e,ke,nt);break;default:throw Error(z(329))}}}return Pe(e,ne()),e.callbackNode===n?Dc.bind(null,e):null}function ss(e,t){var n=Gn;return e.current.memoizedState.isDehydrated&&(Mt(e,t).flags|=256),e=Sl(e,t),e!==2&&(t=ke,ke=n,t!==null&&is(t)),e}function is(e){ke===null?ke=e:ke.push.apply(ke,e)}function Cf(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 a=n[r],s=a.getSnapshot;a=a.value;try{if(!Je(s(),a))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 vt(e,t){for(t&=~qs,t&=~Il,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ke(t),r=1<<n;e[n]=-1,t&=~r}}function po(e){if(V&6)throw Error(z(327));mn();var t=rl(e,0);if(!(t&1))return Pe(e,ne()),null;var n=Sl(e,t);if(e.tag!==0&&n===2){var r=za(e);r!==0&&(t=r,n=ss(e,r))}if(n===1)throw n=cr,Mt(e,0),vt(e,t),Pe(e,ne()),n;if(n===6)throw Error(z(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Dt(e,ke,nt),Pe(e,ne()),null}function Xs(e,t){var n=V;V|=1;try{return e(t)}finally{V=n,V===0&&(wn=ne()+500,Tl&&zt())}}function Gt(e){xt!==null&&xt.tag===0&&!(V&6)&&mn();var t=V;V|=1;var n=be.transition,r=H;try{if(be.transition=null,H=1,e)return e()}finally{H=r,be.transition=n,V=t,!(V&6)&&zt()}}function Ys(){Te=un.current,q(un)}function Mt(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Zp(n)),re!==null)for(n=re.return;n!==null;){var r=n;switch(zs(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&ol();break;case 3:jn(),q(Ne),q(ve),Bs();break;case 5:bs(r);break;case 4:jn();break;case 13:q(X);break;case 19:q(X);break;case 10:Rs(r.type._context);break;case 22:case 23:Ys()}n=n.return}if(oe=e,re=e=Pt(e.current,null),ce=Te=t,se=0,cr=null,qs=Il=Ht=0,ke=Gn=null,$t!==null){for(t=0;t<$t.length;t++)if(n=$t[t],r=n.interleaved,r!==null){n.interleaved=null;var a=r.next,s=n.pending;if(s!==null){var i=s.next;s.next=a,r.next=i}n.pending=r}$t=null}return e}function Rc(e,t){do{var n=re;try{if(Ds(),Qr.current=gl,vl){for(var r=Y.memoizedState;r!==null;){var a=r.queue;a!==null&&(a.pending=null),r=r.next}vl=!1}if(Wt=0,ie=ae=Y=null,Wn=!1,ir=0,Ks.current=null,n===null||n.return===null){se=1,cr=t,re=null;break}e:{var s=e,i=n.return,o=n,u=t;if(t=ce,o.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var c=u,g=o,m=g.tag;if(!(g.mode&1)&&(m===0||m===11||m===15)){var p=g.alternate;p?(g.updateQueue=p.updateQueue,g.memoizedState=p.memoizedState,g.lanes=p.lanes):(g.updateQueue=null,g.memoizedState=null)}var j=Yi(i);if(j!==null){j.flags&=-257,Zi(j,i,o,s,t),j.mode&1&&Xi(s,c,t),t=j,u=c;var S=t.updateQueue;if(S===null){var k=new Set;k.add(u),t.updateQueue=k}else S.add(u);break e}else{if(!(t&1)){Xi(s,c,t),Zs();break e}u=Error(z(426))}}else if(J&&o.mode&1){var N=Yi(i);if(N!==null){!(N.flags&65536)&&(N.flags|=256),Zi(N,i,o,s,t),Is(Sn(u,o));break e}}s=u=Sn(u,o),se!==4&&(se=2),Gn===null?Gn=[s]:Gn.push(s),s=i;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var h=yc(s,u,t);Hi(s,h);break e;case 1:o=u;var d=s.type,f=s.stateNode;if(!(s.flags&128)&&(typeof d.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(Nt===null||!Nt.has(f)))){s.flags|=65536,t&=-t,s.lanes|=t;var y=jc(s,o,t);Hi(s,y);break e}}s=s.return}while(s!==null)}Mc(n)}catch(C){t=C,re===n&&n!==null&&(re=n=n.return);continue}break}while(!0)}function $c(){var e=xl.current;return xl.current=gl,e===null?gl:e}function Zs(){(se===0||se===3||se===2)&&(se=4),oe===null||!(Ht&268435455)&&!(Il&268435455)||vt(oe,ce)}function Sl(e,t){var n=V;V|=2;var r=$c();(oe!==e||ce!==t)&&(nt=null,Mt(e,t));do try{Nf();break}catch(a){Rc(e,a)}while(!0);if(Ds(),V=n,xl.current=r,re!==null)throw Error(z(261));return oe=null,ce=0,se}function Nf(){for(;re!==null;)Fc(re)}function Ef(){for(;re!==null&&!Jd();)Fc(re)}function Fc(e){var t=Bc(e.alternate,e,Te);e.memoizedProps=e.pendingProps,t===null?Mc(e):re=t,Ks.current=null}function Mc(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=yf(n,t),n!==null){n.flags&=32767,re=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{se=6,re=null;return}}else if(n=xf(n,t,Te),n!==null){re=n;return}if(t=t.sibling,t!==null){re=t;return}re=t=e}while(t!==null);se===0&&(se=5)}function Dt(e,t,n){var r=H,a=be.transition;try{be.transition=null,H=1,Pf(e,t,n,r)}finally{be.transition=a,H=r}return null}function Pf(e,t,n,r){do mn();while(xt!==null);if(V&6)throw Error(z(327));n=e.finishedWork;var a=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(z(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(sp(e,s),e===oe&&(re=oe=null,ce=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||$r||($r=!0,Uc(nl,function(){return mn(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=be.transition,be.transition=null;var i=H;H=1;var o=V;V|=4,Ks.current=null,Sf(e,n),Ic(n,e),Gp(Fa),ll=!!$a,Fa=$a=null,e.current=n,wf(n),Xd(),V=o,H=i,be.transition=s}else e.current=n;if($r&&($r=!1,xt=e,jl=a),s=e.pendingLanes,s===0&&(Nt=null),ep(n.stateNode),Pe(e,ne()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)a=t[n],r(a.value,{componentStack:a.stack,digest:a.digest});if(yl)throw yl=!1,e=ls,ls=null,e;return jl&1&&e.tag!==0&&mn(),s=e.pendingLanes,s&1?e===as?Qn++:(Qn=0,as=e):Qn=0,zt(),null}function mn(){if(xt!==null){var e=yu(jl),t=be.transition,n=H;try{if(be.transition=null,H=16>e?16:e,xt===null)var r=!1;else{if(e=xt,xt=null,jl=0,V&6)throw Error(z(331));var a=V;for(V|=4,D=e.current;D!==null;){var s=D,i=s.child;if(D.flags&16){var o=s.deletions;if(o!==null){for(var u=0;u<o.length;u++){var c=o[u];for(D=c;D!==null;){var g=D;switch(g.tag){case 0:case 11:case 15:Hn(8,g,s)}var m=g.child;if(m!==null)m.return=g,D=m;else for(;D!==null;){g=D;var p=g.sibling,j=g.return;if(Lc(g),g===c){D=null;break}if(p!==null){p.return=j,D=p;break}D=j}}}var S=s.alternate;if(S!==null){var k=S.child;if(k!==null){S.child=null;do{var N=k.sibling;k.sibling=null,k=N}while(k!==null)}}D=s}}if(s.subtreeFlags&2064&&i!==null)i.return=s,D=i;else e:for(;D!==null;){if(s=D,s.flags&2048)switch(s.tag){case 0:case 11:case 15:Hn(9,s,s.return)}var h=s.sibling;if(h!==null){h.return=s.return,D=h;break e}D=s.return}}var d=e.current;for(D=d;D!==null;){i=D;var f=i.child;if(i.subtreeFlags&2064&&f!==null)f.return=i,D=f;else e:for(i=d;D!==null;){if(o=D,o.flags&2048)try{switch(o.tag){case 0:case 11:case 15:zl(9,o)}}catch(C){ee(o,o.return,C)}if(o===i){D=null;break e}var y=o.sibling;if(y!==null){y.return=o.return,D=y;break e}D=o.return}}if(V=a,zt(),et&&typeof et.onPostCommitFiberRoot=="function")try{et.onPostCommitFiberRoot(Cl,e)}catch{}r=!0}return r}finally{H=n,be.transition=t}}return!1}function fo(e,t,n){t=Sn(n,t),t=yc(e,t,1),e=Ct(e,t,1),t=ye(),e!==null&&(hr(e,1,t),Pe(e,t))}function ee(e,t,n){if(e.tag===3)fo(e,e,n);else for(;t!==null;){if(t.tag===3){fo(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Nt===null||!Nt.has(r))){e=Sn(n,e),e=jc(t,e,1),t=Ct(t,e,1),e=ye(),t!==null&&(hr(t,1,e),Pe(t,e));break}}t=t.return}}function _f(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=ye(),e.pingedLanes|=e.suspendedLanes&n,oe===e&&(ce&n)===n&&(se===4||se===3&&(ce&130023424)===ce&&500>ne()-Js?Mt(e,0):qs|=n),Pe(e,t)}function bc(e,t){t===0&&(e.mode&1?(t=Pr,Pr<<=1,!(Pr&130023424)&&(Pr=4194304)):t=1);var n=ye();e=ut(e,t),e!==null&&(hr(e,t,n),Pe(e,n))}function Tf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),bc(e,n)}function Lf(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(z(314))}r!==null&&r.delete(t),bc(e,n)}var Bc;Bc=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ne.current)Ce=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ce=!1,gf(e,t,n);Ce=!!(e.flags&131072)}else Ce=!1,J&&t.flags&1048576&&Hu(t,dl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;qr(e,t),e=t.pendingProps;var a=gn(t,ve.current);hn(t,n),a=Vs(null,t,r,e,a,n);var s=Ws();return t.flags|=1,typeof a=="object"&&a!==null&&typeof a.render=="function"&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ee(r)?(s=!0,ul(t)):s=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,Fs(t),a.updater=Al,t.stateNode=a,a._reactInternals=t,Qa(t,r,e,n),t=Ja(null,t,r,!0,s,n)):(t.tag=0,J&&s&&As(t),xe(null,t,a,n),t=t.child),t;case 16:r=t.elementType;e:{switch(qr(e,t),e=t.pendingProps,a=r._init,r=a(r._payload),t.type=r,a=t.tag=zf(r),e=He(r,e),a){case 0:t=qa(null,t,r,e,n);break e;case 1:t=no(null,t,r,e,n);break e;case 11:t=eo(null,t,r,e,n);break e;case 14:t=to(null,t,r,He(r.type,e),n);break e}throw Error(z(306,r,""))}return t;case 0:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:He(r,a),qa(e,t,r,a,n);case 1:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:He(r,a),no(e,t,r,a,n);case 3:e:{if(Cc(t),e===null)throw Error(z(387));r=t.pendingProps,s=t.memoizedState,a=s.element,Xu(e,t),hl(t,r,null,n);var i=t.memoizedState;if(r=i.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){a=Sn(Error(z(423)),t),t=ro(e,t,r,n,a);break e}else if(r!==a){a=Sn(Error(z(424)),t),t=ro(e,t,r,n,a);break e}else for(Le=kt(t.stateNode.containerInfo.firstChild),Ae=t,J=!0,Qe=null,n=qu(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(xn(),r===a){t=ct(e,t,n);break e}xe(e,t,r,n)}t=t.child}return t;case 5:return Yu(t),e===null&&Wa(t),r=t.type,a=t.pendingProps,s=e!==null?e.memoizedProps:null,i=a.children,Ma(r,a)?i=null:s!==null&&Ma(r,s)&&(t.flags|=32),kc(e,t),xe(e,t,i,n),t.child;case 6:return e===null&&Wa(t),null;case 13:return Nc(e,t,n);case 4:return Ms(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=yn(t,null,r,n):xe(e,t,r,n),t.child;case 11:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:He(r,a),eo(e,t,r,a,n);case 7:return xe(e,t,t.pendingProps,n),t.child;case 8:return xe(e,t,t.pendingProps.children,n),t.child;case 12:return xe(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,a=t.pendingProps,s=t.memoizedProps,i=a.value,Q(pl,r._currentValue),r._currentValue=i,s!==null)if(Je(s.value,i)){if(s.children===a.children&&!Ne.current){t=ct(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var o=s.dependencies;if(o!==null){i=s.child;for(var u=o.firstContext;u!==null;){if(u.context===r){if(s.tag===1){u=st(-1,n&-n),u.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var g=c.pending;g===null?u.next=u:(u.next=g.next,g.next=u),c.pending=u}}s.lanes|=n,u=s.alternate,u!==null&&(u.lanes|=n),Ha(s.return,n,t),o.lanes|=n;break}u=u.next}}else if(s.tag===10)i=s.type===t.type?null:s.child;else if(s.tag===18){if(i=s.return,i===null)throw Error(z(341));i.lanes|=n,o=i.alternate,o!==null&&(o.lanes|=n),Ha(i,n,t),i=s.sibling}else i=s.child;if(i!==null)i.return=s;else for(i=s;i!==null;){if(i===t){i=null;break}if(s=i.sibling,s!==null){s.return=i.return,i=s;break}i=i.return}s=i}xe(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,r=t.pendingProps.children,hn(t,n),a=Be(a),r=r(a),t.flags|=1,xe(e,t,r,n),t.child;case 14:return r=t.type,a=He(r,t.pendingProps),a=He(r.type,a),to(e,t,r,a,n);case 15:return Sc(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:He(r,a),qr(e,t),t.tag=1,Ee(r)?(e=!0,ul(t)):e=!1,hn(t,n),xc(t,r,a),Qa(t,r,a,n),Ja(null,t,r,!0,e,n);case 19:return Ec(e,t,n);case 22:return wc(e,t,n)}throw Error(z(156,t.tag))};function Uc(e,t){return mu(e,t)}function Af(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 Me(e,t,n,r){return new Af(e,t,n,r)}function ei(e){return e=e.prototype,!(!e||!e.isReactComponent)}function zf(e){if(typeof e=="function")return ei(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ys)return 11;if(e===js)return 14}return 2}function Pt(e,t){var n=e.alternate;return n===null?(n=Me(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 Yr(e,t,n,r,a,s){var i=2;if(r=e,typeof e=="function")ei(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Yt:return bt(n.children,a,s,t);case xs:i=8,a|=8;break;case ga:return e=Me(12,n,t,a|2),e.elementType=ga,e.lanes=s,e;case xa:return e=Me(13,n,t,a),e.elementType=xa,e.lanes=s,e;case ya:return e=Me(19,n,t,a),e.elementType=ya,e.lanes=s,e;case Yo:return Ol(n,a,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Jo:i=10;break e;case Xo:i=9;break e;case ys:i=11;break e;case js:i=14;break e;case ft:i=16,r=null;break e}throw Error(z(130,e==null?e:typeof e,""))}return t=Me(i,n,t,a),t.elementType=e,t.type=r,t.lanes=s,t}function bt(e,t,n,r){return e=Me(7,e,r,t),e.lanes=n,e}function Ol(e,t,n,r){return e=Me(22,e,r,t),e.elementType=Yo,e.lanes=n,e.stateNode={isHidden:!1},e}function da(e,t,n){return e=Me(6,e,null,t),e.lanes=n,e}function pa(e,t,n){return t=Me(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function If(e,t,n,r,a){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=Gl(0),this.expirationTimes=Gl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Gl(0),this.identifierPrefix=r,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function ti(e,t,n,r,a,s,i,o,u){return e=new If(e,t,n,o,u),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Me(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Fs(s),e}function Of(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Xt,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Vc(e){if(!e)return Tt;e=e._reactInternals;e:{if(Kt(e)!==e||e.tag!==1)throw Error(z(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ee(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(z(171))}if(e.tag===1){var n=e.type;if(Ee(n))return Vu(e,n,t)}return t}function Wc(e,t,n,r,a,s,i,o,u){return e=ti(n,r,!0,e,a,s,i,o,u),e.context=Vc(null),n=e.current,r=ye(),a=Et(n),s=st(r,a),s.callback=t??null,Ct(n,s,a),e.current.lanes=a,hr(e,a,r),Pe(e,r),e}function Dl(e,t,n,r){var a=t.current,s=ye(),i=Et(a);return n=Vc(n),t.context===null?t.context=n:t.pendingContext=n,t=st(s,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Ct(a,t,i),e!==null&&(qe(e,a,i,s),Gr(e,a,i)),i}function wl(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 ho(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ni(e,t){ho(e,t),(e=e.alternate)&&ho(e,t)}function Df(){return null}var Hc=typeof reportError=="function"?reportError:function(e){console.error(e)};function ri(e){this._internalRoot=e}Rl.prototype.render=ri.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(z(409));Dl(e,t,null,null)};Rl.prototype.unmount=ri.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Gt(function(){Dl(null,e,null,null)}),t[ot]=null}};function Rl(e){this._internalRoot=e}Rl.prototype.unstable_scheduleHydration=function(e){if(e){var t=wu();e={blockedOn:null,target:e,priority:t};for(var n=0;n<mt.length&&t!==0&&t<mt[n].priority;n++);mt.splice(n,0,e),n===0&&Cu(e)}};function li(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function $l(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function mo(){}function Rf(e,t,n,r,a){if(a){if(typeof r=="function"){var s=r;r=function(){var c=wl(i);s.call(c)}}var i=Wc(t,r,e,0,null,!1,!1,"",mo);return e._reactRootContainer=i,e[ot]=i.current,nr(e.nodeType===8?e.parentNode:e),Gt(),i}for(;a=e.lastChild;)e.removeChild(a);if(typeof r=="function"){var o=r;r=function(){var c=wl(u);o.call(c)}}var u=ti(e,0,!1,null,null,!1,!1,"",mo);return e._reactRootContainer=u,e[ot]=u.current,nr(e.nodeType===8?e.parentNode:e),Gt(function(){Dl(t,u,n,r)}),u}function Fl(e,t,n,r,a){var s=n._reactRootContainer;if(s){var i=s;if(typeof a=="function"){var o=a;a=function(){var u=wl(i);o.call(u)}}Dl(t,i,e,a)}else i=Rf(n,t,e,a,r);return wl(i)}ju=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=$n(t.pendingLanes);n!==0&&(ks(t,n|1),Pe(t,ne()),!(V&6)&&(wn=ne()+500,zt()))}break;case 13:Gt(function(){var r=ut(e,1);if(r!==null){var a=ye();qe(r,e,1,a)}}),ni(e,1)}};Cs=function(e){if(e.tag===13){var t=ut(e,134217728);if(t!==null){var n=ye();qe(t,e,134217728,n)}ni(e,134217728)}};Su=function(e){if(e.tag===13){var t=Et(e),n=ut(e,t);if(n!==null){var r=ye();qe(n,e,t,r)}ni(e,t)}};wu=function(){return H};ku=function(e,t){var n=H;try{return H=e,t()}finally{H=n}};Ta=function(e,t,n){switch(t){case"input":if(wa(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 a=_l(r);if(!a)throw Error(z(90));eu(r),wa(r,a)}}}break;case"textarea":nu(e,n);break;case"select":t=n.value,t!=null&&cn(e,!!n.multiple,t,!1)}};uu=Xs;cu=Gt;var $f={usingClientEntryPoint:!1,Events:[vr,nn,_l,iu,ou,Xs]},On={findFiberByHostInstance:Rt,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Ff={bundleType:On.bundleType,version:On.version,rendererPackageName:On.rendererPackageName,rendererConfig:On.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:dt.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=fu(e),e===null?null:e.stateNode},findFiberByHostInstance:On.findFiberByHostInstance||Df,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 Fr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Fr.isDisabled&&Fr.supportsFiber)try{Cl=Fr.inject(Ff),et=Fr}catch{}}Ie.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=$f;Ie.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!li(t))throw Error(z(200));return Of(e,t,null,n)};Ie.createRoot=function(e,t){if(!li(e))throw Error(z(299));var n=!1,r="",a=Hc;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=ti(e,1,!1,null,null,n,!1,r,a),e[ot]=t.current,nr(e.nodeType===8?e.parentNode:e),new ri(t)};Ie.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(z(188)):(e=Object.keys(e).join(","),Error(z(268,e)));return e=fu(t),e=e===null?null:e.stateNode,e};Ie.flushSync=function(e){return Gt(e)};Ie.hydrate=function(e,t,n){if(!$l(t))throw Error(z(200));return Fl(null,e,t,!0,n)};Ie.hydrateRoot=function(e,t,n){if(!li(e))throw Error(z(405));var r=n!=null&&n.hydratedSources||null,a=!1,s="",i=Hc;if(n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=Wc(t,null,e,1,n??null,a,!1,s,i),e[ot]=t.current,nr(e),r)for(e=0;e<r.length;e++)n=r[e],a=n._getVersion,a=a(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,a]:t.mutableSourceEagerHydrationData.push(n,a);return new Rl(t)};Ie.render=function(e,t,n){if(!$l(t))throw Error(z(200));return Fl(null,e,t,!1,n)};Ie.unmountComponentAtNode=function(e){if(!$l(e))throw Error(z(40));return e._reactRootContainer?(Gt(function(){Fl(null,null,e,!1,function(){e._reactRootContainer=null,e[ot]=null})}),!0):!1};Ie.unstable_batchedUpdates=Xs;Ie.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!$l(n))throw Error(z(200));if(e==null||e._reactInternals===void 0)throw Error(z(38));return Fl(e,t,n,!1,r)};Ie.version="18.3.1-next-f1338f8080-20240426";function Gc(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Gc)}catch(e){console.error(e)}}Gc(),Go.exports=Ie;var Mf=Go.exports,Qc,vo=Mf;Qc=vo.createRoot,vo.hydrateRoot;/**
41
- * @remix-run/router v1.23.4
42
- *
43
- * Copyright (c) Remix Software Inc.
44
- *
45
- * This source code is licensed under the MIT license found in the
46
- * LICENSE.md file in the root directory of this source tree.
47
- *
48
- * @license MIT
49
- */function dr(){return dr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dr.apply(null,arguments)}var yt;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(yt||(yt={}));const go="popstate";function bf(e){e===void 0&&(e={});function t(r,a){let{pathname:s,search:i,hash:o}=r.location;return os("",{pathname:s,search:i,hash:o},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function n(r,a){return typeof a=="string"?a:qc(a)}return Uf(t,n,null,e)}function le(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Kc(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Bf(){return Math.random().toString(36).substr(2,8)}function xo(e,t){return{usr:e.state,key:e.key,idx:t}}function os(e,t,n,r){return n===void 0&&(n=null),dr({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?En(t):t,{state:n,key:t&&t.key||r||Bf()})}function qc(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 En(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 Uf(e,t,n,r){r===void 0&&(r={});let{window:a=document.defaultView,v5Compat:s=!1}=r,i=a.history,o=yt.Pop,u=null,c=g();c==null&&(c=0,i.replaceState(dr({},i.state,{idx:c}),""));function g(){return(i.state||{idx:null}).idx}function m(){o=yt.Pop;let N=g(),h=N==null?null:N-c;c=N,u&&u({action:o,location:k.location,delta:h})}function p(N,h){o=yt.Push;let d=os(k.location,N,h);c=g()+1;let f=xo(d,c),y=k.createHref(d);try{i.pushState(f,"",y)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;a.location.assign(y)}s&&u&&u({action:o,location:k.location,delta:1})}function j(N,h){o=yt.Replace;let d=os(k.location,N,h);c=g();let f=xo(d,c),y=k.createHref(d);i.replaceState(f,"",y),s&&u&&u({action:o,location:k.location,delta:0})}function S(N){let h=a.location.origin!=="null"?a.location.origin:a.location.href,d=typeof N=="string"?N:qc(N);return d=d.replace(/ $/,"%20"),le(h,"No window.location.(origin|href) available to create URL for href: "+d),new URL(d,h)}let k={get action(){return o},get location(){return e(a,i)},listen(N){if(u)throw new Error("A history only accepts one active listener");return a.addEventListener(go,m),u=N,()=>{a.removeEventListener(go,m),u=null}},createHref(N){return t(a,N)},createURL:S,encodeLocation(N){let h=S(N);return{pathname:h.pathname,search:h.search,hash:h.hash}},push:p,replace:j,go(N){return i.go(N)}};return k}var yo;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(yo||(yo={}));function Vf(e,t,n){return n===void 0&&(n="/"),Wf(e,t,n)}function Wf(e,t,n,r){let a=typeof t=="string"?En(t):t,s=Yc(a.pathname||"/",n);if(s==null)return null;let i=Jc(e);Hf(i);let o=null,u=rh(s);for(let c=0;o==null&&c<i.length;++c)o=eh(i[c],u);return o}function Jc(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let a=(s,i,o)=>{let u={relativePath:o===void 0?s.path||"":o,caseSensitive:s.caseSensitive===!0,childrenIndex:i,route:s};u.relativePath.startsWith("/")&&(le(u.relativePath.startsWith(r),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(r.length));let c=Bt([r,u.relativePath]),g=n.concat(u);s.children&&s.children.length>0&&(le(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),Jc(s.children,t,g,c)),!(s.path==null&&!s.index)&&t.push({path:c,score:Yf(c,s.index),routesMeta:g})};return e.forEach((s,i)=>{var o;if(s.path===""||!((o=s.path)!=null&&o.includes("?")))a(s,i);else for(let u of Xc(s.path))a(s,i,u)}),t}function Xc(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,a=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return a?[s,""]:[s];let i=Xc(r.join("/")),o=[];return o.push(...i.map(u=>u===""?s:[s,u].join("/"))),a&&o.push(...i),o.map(u=>e.startsWith("/")&&u===""?"/":u)}function Hf(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Zf(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Gf=/^:[\w-]+$/,Qf=3,Kf=2,qf=1,Jf=10,Xf=-2,jo=e=>e==="*";function Yf(e,t){let n=e.split("/"),r=n.length;return n.some(jo)&&(r+=Xf),t&&(r+=Kf),n.filter(a=>!jo(a)).reduce((a,s)=>a+(Gf.test(s)?Qf:s===""?qf:Jf),r)}function Zf(e,t){return e.length===t.length&&e.slice(0,-1).every((r,a)=>r===t[a])?e[e.length-1]-t[t.length-1]:0}function eh(e,t,n){let{routesMeta:r}=e,a={},s="/",i=[];for(let o=0;o<r.length;++o){let u=r[o],c=o===r.length-1,g=s==="/"?t:t.slice(s.length)||"/",m=th({path:u.relativePath,caseSensitive:u.caseSensitive,end:c},g),p=u.route;if(!m)return null;Object.assign(a,m.params),i.push({params:a,pathname:Bt([s,m.pathname]),pathnameBase:sh(Bt([s,m.pathnameBase])),route:p}),m.pathnameBase!=="/"&&(s=Bt([s,m.pathnameBase]))}return i}function th(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=nh(e.path,e.caseSensitive,e.end),a=t.match(n);if(!a)return null;let s=a[0],i=s.replace(/(.)\/+$/,"$1"),o=a.slice(1);return{params:r.reduce((c,g,m)=>{let{paramName:p,isOptional:j}=g;if(p==="*"){let k=o[m]||"";i=s.slice(0,s.length-k.length).replace(/(.)\/+$/,"$1")}const S=o[m];return j&&!S?c[p]=void 0:c[p]=(S||"").replace(/%2F/g,"/"),c},{}),pathname:s,pathnameBase:i,pattern:e}}function nh(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Kc(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=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,o,u)=>(r.push({paramName:o,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}function rh(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Kc(!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 Yc(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)||"/"}function lh(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:a=""}=typeof e=="string"?En(e):e,s;return n?(n=td(n),n.startsWith("/")?s=So(n.substring(1),"/"):s=So(n,t)):s=t,{pathname:s,search:ih(r),hash:oh(a)}}function So(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function fa(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 ah(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Zc(e,t){let n=ah(e);return t?n.map((r,a)=>a===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function ed(e,t,n,r){r===void 0&&(r=!1);let a;typeof e=="string"?a=En(e):(a=dr({},e),le(!a.pathname||!a.pathname.includes("?"),fa("?","pathname","search",a)),le(!a.pathname||!a.pathname.includes("#"),fa("#","pathname","hash",a)),le(!a.search||!a.search.includes("#"),fa("#","search","hash",a)));let s=e===""||a.pathname==="",i=s?"/":a.pathname,o;if(i==null)o=n;else{let m=t.length-1;if(!r&&i.startsWith("..")){let p=i.split("/");for(;p[0]==="..";)p.shift(),m-=1;a.pathname=p.join("/")}o=m>=0?t[m]:"/"}let u=lh(a,o),c=i&&i!=="/"&&i.endsWith("/"),g=(s||i===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(c||g)&&(u.pathname+="/"),u}const td=e=>e.replace(/\/\/+/g,"/"),Bt=e=>td(e.join("/")),sh=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),ih=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,oh=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function uh(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const nd=["post","put","patch","delete"];new Set(nd);const ch=["get",...nd];new Set(ch);/**
50
- * React Router v6.30.6
51
- *
52
- * Copyright (c) Remix Software Inc.
53
- *
54
- * This source code is licensed under the MIT license found in the
55
- * LICENSE.md file in the root directory of this source tree.
56
- *
57
- * @license MIT
58
- */function pr(){return pr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pr.apply(null,arguments)}const ai=v.createContext(null),dh=v.createContext(null),xr=v.createContext(null),Ml=v.createContext(null),qt=v.createContext({outlet:null,matches:[],isDataRoute:!1}),rd=v.createContext(null);function yr(){return v.useContext(Ml)!=null}function jr(){return yr()||le(!1),v.useContext(Ml).location}function ld(e){v.useContext(xr).static||v.useLayoutEffect(e)}function De(){let{isDataRoute:e}=v.useContext(qt);return e?Ch():ph()}function ph(){yr()||le(!1);let e=v.useContext(ai),{basename:t,future:n,navigator:r}=v.useContext(xr),{matches:a}=v.useContext(qt),{pathname:s}=jr(),i=JSON.stringify(Zc(a,n.v7_relativeSplatPath)),o=v.useRef(!1);return ld(()=>{o.current=!0}),v.useCallback(function(c,g){if(g===void 0&&(g={}),!o.current)return;if(typeof c=="number"){r.go(c);return}let m=ed(c,JSON.parse(i),s,g.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:Bt([t,m.pathname])),(g.replace?r.replace:r.push)(m,g.state,g)},[t,r,i,s,e])}function fh(e,t){return hh(e,t)}function hh(e,t,n,r){yr()||le(!1);let{navigator:a}=v.useContext(xr),{matches:s}=v.useContext(qt),i=s[s.length-1],o=i?i.params:{};i&&i.pathname;let u=i?i.pathnameBase:"/";i&&i.route;let c=jr(),g;if(t){var m;let N=typeof t=="string"?En(t):t;u==="/"||(m=N.pathname)!=null&&m.startsWith(u)||le(!1),g=N}else g=c;let p=g.pathname||"/",j=p;if(u!=="/"){let N=u.replace(/^\//,"").split("/");j="/"+p.replace(/^\//,"").split("/").slice(N.length).join("/")}let S=Vf(e,{pathname:j}),k=yh(S&&S.map(N=>Object.assign({},N,{params:Object.assign({},o,N.params),pathname:Bt([u,a.encodeLocation?a.encodeLocation(N.pathname).pathname:N.pathname]),pathnameBase:N.pathnameBase==="/"?u:Bt([u,a.encodeLocation?a.encodeLocation(N.pathnameBase).pathname:N.pathnameBase])})),s,n,r);return t&&k?v.createElement(Ml.Provider,{value:{location:pr({pathname:"/",search:"",hash:"",state:null,key:"default"},g),navigationType:yt.Pop}},k):k}function mh(){let e=kh(),t=uh(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},t),n?v.createElement("pre",{style:a},n):null,null)}const vh=v.createElement(mh,null);class gh extends v.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?v.createElement(qt.Provider,{value:this.props.routeContext},v.createElement(rd.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function xh(e){let{routeContext:t,match:n,children:r}=e,a=v.useContext(ai);return a&&a.static&&a.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=n.route.id),v.createElement(qt.Provider,{value:t},r)}function yh(e,t,n,r){var a;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var s;if(!n)return null;if(n.errors)e=n.matches;else if((s=r)!=null&&s.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let i=e,o=(a=n)==null?void 0:a.errors;if(o!=null){let g=i.findIndex(m=>m.route.id&&(o==null?void 0:o[m.route.id])!==void 0);g>=0||le(!1),i=i.slice(0,Math.min(i.length,g+1))}let u=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let g=0;g<i.length;g++){let m=i[g];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(c=g),m.route.id){let{loaderData:p,errors:j}=n,S=m.route.loader&&p[m.route.id]===void 0&&(!j||j[m.route.id]===void 0);if(m.route.lazy||S){u=!0,c>=0?i=i.slice(0,c+1):i=[i[0]];break}}}return i.reduceRight((g,m,p)=>{let j,S=!1,k=null,N=null;n&&(j=o&&m.route.id?o[m.route.id]:void 0,k=m.route.errorElement||vh,u&&(c<0&&p===0?(Nh("route-fallback"),S=!0,N=null):c===p&&(S=!0,N=m.route.hydrateFallbackElement||null)));let h=t.concat(i.slice(0,p+1)),d=()=>{let f;return j?f=k:S?f=N:m.route.Component?f=v.createElement(m.route.Component,null):m.route.element?f=m.route.element:f=g,v.createElement(xh,{match:m,routeContext:{outlet:g,matches:h,isDataRoute:n!=null},children:f})};return n&&(m.route.ErrorBoundary||m.route.errorElement||p===0)?v.createElement(gh,{location:n.location,revalidation:n.revalidation,component:k,error:j,children:d(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):d()},null)}var ad=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(ad||{}),sd=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}(sd||{});function jh(e){let t=v.useContext(ai);return t||le(!1),t}function Sh(e){let t=v.useContext(dh);return t||le(!1),t}function wh(e){let t=v.useContext(qt);return t||le(!1),t}function id(e){let t=wh(),n=t.matches[t.matches.length-1];return n.route.id||le(!1),n.route.id}function kh(){var e;let t=v.useContext(rd),n=Sh(),r=id();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Ch(){let{router:e}=jh(ad.UseNavigateStable),t=id(sd.UseNavigateStable),n=v.useRef(!1);return ld(()=>{n.current=!0}),v.useCallback(function(a,s){s===void 0&&(s={}),n.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,pr({fromRouteId:t},s)))},[e,t])}const wo={};function Nh(e,t,n){wo[e]||(wo[e]=!0)}function Eh(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function ko(e){let{to:t,replace:n,state:r,relative:a}=e;yr()||le(!1);let{future:s,static:i}=v.useContext(xr),{matches:o}=v.useContext(qt),{pathname:u}=jr(),c=De(),g=ed(t,Zc(o,s.v7_relativeSplatPath),u,a==="path"),m=JSON.stringify(g);return v.useEffect(()=>c(JSON.parse(m),{replace:n,state:r,relative:a}),[c,m,a,n,r]),null}function te(e){le(!1)}function Ph(e){let{basename:t="/",children:n=null,location:r,navigationType:a=yt.Pop,navigator:s,static:i=!1,future:o}=e;yr()&&le(!1);let u=t.replace(/^\/*/,"/"),c=v.useMemo(()=>({basename:u,navigator:s,static:i,future:pr({v7_relativeSplatPath:!1},o)}),[u,o,s,i]);typeof r=="string"&&(r=En(r));let{pathname:g="/",search:m="",hash:p="",state:j=null,key:S="default"}=r,k=v.useMemo(()=>{let N=Yc(g,u);return N==null?null:{location:{pathname:N,search:m,hash:p,state:j,key:S},navigationType:a}},[u,g,m,p,j,S,a]);return k==null?null:v.createElement(xr.Provider,{value:c},v.createElement(Ml.Provider,{children:n,value:k}))}function _h(e){let{children:t,location:n}=e;return fh(us(t),n)}new Promise(()=>{});function us(e,t){t===void 0&&(t=[]);let n=[];return v.Children.forEach(e,(r,a)=>{if(!v.isValidElement(r))return;let s=[...t,a];if(r.type===v.Fragment){n.push.apply(n,us(r.props.children,s));return}r.type!==te&&le(!1),!r.props.index||!r.props.children||le(!1);let i={id:r.props.id||s.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&&(i.children=us(r.props.children,s)),n.push(i)}),n}/**
59
- * React Router DOM v6.30.6
60
- *
61
- * Copyright (c) Remix Software Inc.
62
- *
63
- * This source code is licensed under the MIT license found in the
64
- * LICENSE.md file in the root directory of this source tree.
65
- *
66
- * @license MIT
67
- */const Th="6";try{window.__reactRouterVersion=Th}catch{}const Lh="startTransition",Co=Pd[Lh];function Ah(e){let{basename:t,children:n,future:r,window:a}=e,s=v.useRef();s.current==null&&(s.current=bf({window:a,v5Compat:!0}));let i=s.current,[o,u]=v.useState({action:i.action,location:i.location}),{v7_startTransition:c}=r||{},g=v.useCallback(m=>{c&&Co?Co(()=>u(m)):u(m)},[u,c]);return v.useLayoutEffect(()=>i.listen(g),[i,g]),v.useEffect(()=>Eh(r),[r]),v.createElement(Ph,{basename:t,children:n,location:o.location,navigationType:o.action,navigator:i,future:r})}var No;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(No||(No={}));var Eo;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Eo||(Eo={}));async function $(e,t={}){const n=await fetch(e,{credentials:"include",headers:{"Content-Type":"application/json",...t.headers||{}},...t});if(!n.ok){let r=`${n.status} ${n.statusText}`;try{r=(await n.json()).detail||r}catch{}throw new Error(typeof r=="string"?r:JSON.stringify(r))}return n.json()}const O={health:()=>$("/api/health"),version:()=>$("/api/version"),session:()=>$("/api/auth/session"),login:(e,t)=>$("/api/auth/login",{method:"POST",body:JSON.stringify({email:e,activation_code:t})}),logout:()=>$("/api/auth/logout",{method:"POST"}),settings:()=>$("/api/settings"),saveSettings:e=>$("/api/settings",{method:"PUT",body:JSON.stringify(e)}),produtos:()=>$("/api/produtos"),createProduto:e=>$("/api/produtos",{method:"POST",body:JSON.stringify(e)}),updateProduto:(e,t)=>$(`/api/produtos/${e}`,{method:"PUT",body:JSON.stringify(t)}),deleteProduto:e=>$(`/api/produtos/${e}`,{method:"DELETE"}),aprovarProduto:e=>$(`/api/produtos/${e}/aprovar`,{method:"POST"}),analisarProduto:e=>$(`/api/produtos/${e}/analisar`,{method:"POST"}),llmProviders:()=>$("/api/llm/providers"),llmTest:e=>$("/api/llm/test",{method:"POST",body:JSON.stringify({id:e})}),trackingDashboard:()=>$("/api/tracking/dashboard"),visitante:e=>$(`/api/tracking/visitante/${e}`),infoprodutos:()=>$("/api/infoprodutos"),createInfoproduto:e=>$("/api/infoprodutos",{method:"POST",body:JSON.stringify(e)}),deleteInfoproduto:e=>$(`/api/infoprodutos/${e}`,{method:"DELETE"}),infoprodutoMarkdown:e=>$(`/api/infoprodutos/${e}/markdown`),paginas:()=>$("/api/paginas"),createPagina:e=>$("/api/paginas",{method:"POST",body:JSON.stringify(e)}),paginaHtml:e=>$(`/api/paginas/${e}/html`),updatePaginaHtml:(e,t)=>$(`/api/paginas/${e}/html`,{method:"PUT",body:JSON.stringify({html:t})}),publicarPagina:e=>$(`/api/paginas/${e}/publicar`,{method:"POST"}),deletePagina:e=>$(`/api/paginas/${e}`,{method:"DELETE"}),dominios:()=>$("/api/dominios"),createDominio:e=>$("/api/dominios",{method:"POST",body:JSON.stringify(e)}),verificarDominio:e=>$(`/api/dominios/${e}/verificar`,{method:"POST"}),updateDominioTags:(e,t)=>$(`/api/dominios/${e}/tags`,{method:"PUT",body:JSON.stringify({tags:t})}),deleteDominio:e=>$(`/api/dominios/${e}`,{method:"DELETE"}),vendas:()=>$("/api/vendas"),vendasResumo:()=>$("/api/vendas/resumo"),createVenda:e=>$("/api/vendas",{method:"POST",body:JSON.stringify(e)}),deleteVenda:e=>$(`/api/vendas/${e}`,{method:"DELETE"}),importVendasCsv:e=>$("/api/vendas/csv",{method:"POST",body:JSON.stringify({csv:e})}),uploadConversao:e=>$(`/api/vendas/${e}/conversao`,{method:"POST"}),uploadConversoesLote:()=>$("/api/vendas/conversoes/upload",{method:"POST"}),adswords:e=>$(e?`/api/adswords?produto_id=${e}`:"/api/adswords"),adswordsGerar:e=>$("/api/adswords/gerar",{method:"POST",body:JSON.stringify({produto_id:e})}),adswordsAdicionar:e=>$("/api/adswords",{method:"POST",body:JSON.stringify(e)}),adswordsRemover:e=>$(`/api/adswords/${e}`,{method:"DELETE"}),gerarCriativos:e=>$("/api/criativos/gerar",{method:"POST",body:JSON.stringify(e)}),campanhas:()=>$("/api/campanhas"),createCampanha:e=>$("/api/campanhas",{method:"POST",body:JSON.stringify(e)}),getCampanha:e=>$(`/api/campanhas/${e}`),deleteCampanha:e=>$(`/api/campanhas/${e}`,{method:"DELETE"}),publicarCampanha:e=>$(`/api/campanhas/${e}/publicar`,{method:"POST"}),dashboard:()=>$("/api/dashboard"),lancamentoAtual:()=>$("/api/lancamentos/atual"),lancamentoEtapas:()=>$("/api/lancamentos/etapas"),iniciarLancamento:e=>$("/api/lancamentos",{method:"POST",body:JSON.stringify({produto_id:e})}),salvarEtapaLancamento:(e,t,n)=>$(`/api/lancamentos/${e}/etapa`,{method:"POST",body:JSON.stringify({etapa:t,dados:n})}),relatorioLancamento:e=>$(`/api/lancamentos/${e}/relatorio`),concluirLancamento:e=>$(`/api/lancamentos/${e}/concluir`,{method:"POST"}),notificacoesConfig:()=>$("/api/notificacoes"),salvarNotificacoes:(e,t)=>$("/api/notificacoes",{method:"PUT",body:JSON.stringify({eventos:e,targets:t})}),notificacoesHistorico:()=>$("/api/notificacoes/historico"),testarNotificacao:e=>$("/api/notificacoes/teste",{method:"POST",body:JSON.stringify(e)})},Po=[{to:"/",emoji:"📦",label:"Seus Produtos"},{to:"/dashboard",emoji:"📊",label:"AdsDashboard"},{emoji:"🌐",label:"AdsHosting",children:[{to:"/hosting/dominios",label:"Domínios"},{to:"/hosting/paginas",label:"Páginas Criadas"}]},{emoji:"📖",label:"Infoprodutos",children:[{to:"/studio",label:"Criar Infoproduto"},{to:"/studio/biblioteca",label:"Biblioteca"}]},{to:"/adspages",emoji:"🛡️",label:"AdsPages"},{to:"/adswords",emoji:"✈️",label:"AdsWords"},{to:"/adscreator",emoji:"🎯",label:"AdsCreator"},{emoji:"🔄",label:"AdsTracking",children:[{to:"/tracking/visitas",label:"Minhas Visitas"},{to:"/tracking/vendas",label:"Minhas Vendas"},{to:"/tracking/gclid",label:"Conversões GCLID"}]},{to:"/adsbot",emoji:"🤖",label:"AdsBot"},{to:"/pinterest",emoji:"📌",label:"Pinterest"},"divider",{to:"/contas-google",emoji:"🔑",label:"Contas do Google"},{to:"/api-keys",emoji:"🔌",label:"Chaves de API"},{to:"/notificacoes",emoji:"🔔",label:"Notificações"},{to:"/logs",emoji:"📋",label:"Logs"},{to:"/faq",emoji:"❓",label:"FAQ & Documentação"}];function zh(){const e=jr(),t=De(),{version:n,logout:r}=si(),[a,s]=v.useState(()=>{const u=new Set;for(const c of Po)c.children&&c.children.some(g=>g.to===e.pathname)&&u.add(c.label);return u}),i=u=>s(c=>{const g=new Set(c);return g.has(u)?g.delete(u):g.add(u),g}),o=async()=>{await r(),t("/login")};return l.jsxs("aside",{className:"sidebar",children:[l.jsxs("div",{className:"logo-area",children:["🚀 ProdMaker ",n&&l.jsxs("span",{className:"badge",children:["v",n]})]}),l.jsx("nav",{children:l.jsx("ul",{children:Po.map((u,c)=>{if(u==="divider"||u.divider)return l.jsx("div",{className:"divider"},`d${c}`);if(u.children){const g=u.children.some(p=>p.to===e.pathname),m=a.has(u.label)||g;return l.jsxs("li",{className:`has-submenu ${m?"expanded":""}`,children:[l.jsxs("div",{onClick:()=>i(u.label),children:[l.jsx("span",{style:{fontSize:"16px"},children:u.emoji})," ",u.label,l.jsx("span",{className:"submenu-arrow",children:"▼"})]}),l.jsx("ul",{children:u.children.map(p=>l.jsx("li",{className:e.pathname===p.to?"active":"",onClick:()=>t(p.to),children:p.label},p.to))})]},u.label)}return l.jsxs("li",{className:`nav-item ${e.pathname===u.to?"active":""}`,onClick:()=>t(u.to),children:[l.jsx("span",{style:{fontSize:"16px"},children:u.emoji})," ",u.label]},u.to)})})}),l.jsx("div",{className:"sidebar-bottom",children:l.jsx("button",{className:"btn-logout",onClick:o,children:"🚪 Sair"})})]})}function Ih(){const{session:e,theme:t,toggleTheme:n}=si(),r=De(),s=((e==null?void 0:e.email)||"").split("@")[0]||"usuário";return l.jsxs("header",{className:"top-bar",children:[l.jsx("div",{className:"promo-banner",onClick:()=>r("/adsbot"),title:"Abrir o AdsBot",children:"🚀 Novo Lançamento — conduza seu lançamento passo a passo no AdsBot →"}),l.jsxs("div",{className:"user-profile",children:["Olá, ",s,l.jsx("span",{className:"avatar",children:s.charAt(0)}),l.jsx("button",{className:"theme-toggle",onClick:n,title:"Alternar Tema",children:t==="light"?"🌙":"☀️"})]})]})}const od=v.createContext(null),we=()=>v.useContext(od);function Oh({children:e}){const[t,n]=v.useState([]),r=v.useCallback(a=>{const s=Date.now()+Math.random();n(i=>[...i,{id:s,message:a}]),setTimeout(()=>n(i=>i.filter(o=>o.id!==s)),3e3)},[]);return l.jsxs(od.Provider,{value:{toast:r},children:[e,t.map((a,s)=>l.jsxs("div",{className:"toast",style:{top:70+s*70},children:[l.jsx("span",{children:"✓"}),l.jsx("div",{children:a.message})]},a.id))]})}const Dh=[{number:"1",icon:"inventory_2",title:"Adicione o produto",last:!1},{number:"2",icon:"web",title:"Crie a Presell",last:!1},{number:"3",icon:"campaign",title:"Crie a Campanha",last:!1},{number:"4",icon:"trending_up",title:"Receba Vendas",last:!0}],Rh=[{code:"pt",label:"Português"},{code:"en",label:"English"},{code:"es",label:"Español"}];function $h(){const{login:e}=si(),t=De(),[n,r]=v.useState(""),[a,s]=v.useState(""),[i,o]=v.useState(!1),[u,c]=v.useState("pt"),[g,m]=v.useState(""),[p,j]=v.useState(!1),S=async k=>{k.preventDefault(),m(""),j(!0);try{await e(n,a),t("/",{replace:!0})}catch(N){m(N.message||"Não foi possível entrar. Verifique o e-mail e o código de ativação.")}finally{j(!1)}};return l.jsxs("div",{className:"login-page",children:[l.jsxs("div",{className:"login-left",children:[l.jsxs("div",{className:"login-left-content",children:[l.jsxs("h1",{className:"login-left-title",children:[l.jsx("span",{children:"Tudo o que o afiliado precisa"})," ",l.jsx("br",{}),l.jsx("span",{className:"highlight-text",children:"para vender"})," ",l.jsx("br",{}),l.jsx("span",{children:"em um só lugar"})]}),l.jsx("p",{className:"login-left-description",children:"Menos configuração, mais vendas!"}),l.jsx("div",{className:"features-grid",children:Dh.map(k=>l.jsxs("div",{className:"feature-step-item",children:[l.jsxs("div",{className:`feature-card feature-step ${k.last?"feature-step-last":""}`,children:[l.jsx("span",{className:"feature-step-number","aria-hidden":"true",children:k.number}),l.jsx("div",{className:"feature-step-icon",children:l.jsx("i",{className:"material-symbols-outlined",children:k.icon})}),!k.last&&l.jsx("div",{className:"feature-step-arrow"})]}),l.jsx("h3",{className:"feature-title",children:k.title})]},k.number))})]}),l.jsx("div",{className:"login-blur-effect blur-effect-center"}),l.jsx("div",{className:"login-blur-effect blur-effect-1"}),l.jsx("div",{className:"login-blur-effect blur-effect-2"}),l.jsx("div",{className:"login-particle",style:{left:"8%",width:"4px",height:"4px",background:"#8b3fbf",opacity:.5,animationDuration:"10s",animationDelay:"0s"}}),l.jsx("div",{className:"login-particle",style:{left:"22%",width:"3px",height:"3px",background:"#8b3fbf",opacity:.4,animationDuration:"11s",animationDelay:"1s"}}),l.jsx("div",{className:"login-particle",style:{left:"38%",width:"5px",height:"5px",background:"#8b3fbf",opacity:.4,animationDuration:"11s",animationDelay:"1s"}}),l.jsx("div",{className:"login-particle",style:{left:"55%",width:"3px",height:"3px",background:"#8b3fbf",opacity:.4,animationDuration:"11s",animationDelay:"1s"}}),l.jsx("div",{className:"login-particle",style:{left:"70%",width:"4px",height:"4px",background:"#ee476f",opacity:.35,animationDuration:"14s",animationDelay:"0.5s"}}),l.jsx("div",{className:"login-particle",style:{left:"82%",width:"3px",height:"3px",background:"#8b3fbf",opacity:.45,animationDuration:"12s",animationDelay:"1.8s"}}),l.jsx("div",{className:"login-particle",style:{left:"93%",width:"4px",height:"4px",background:"#a653d4",opacity:.3,animationDuration:"10s",animationDelay:"3.8s"}})]}),l.jsxs("div",{className:"login-right",children:[l.jsx("div",{className:"login-language-toggle",children:l.jsxs("div",{className:"language-toggle-wrapper",children:[l.jsx("button",{className:"language-toggle-btn",title:"Alterar idioma",type:"button",children:l.jsx("span",{className:"material-symbols-outlined",children:"translate"})}),l.jsx("div",{className:"language-toggle-dropdown",children:Rh.map(k=>l.jsx("div",{className:`language-toggle-item ${u===k.code?"active":""}`,onClick:()=>c(k.code),children:k.label},k.code))})]})}),l.jsxs("div",{className:"login-form",children:[l.jsx("h2",{children:"Bem-vindo de volta!"}),l.jsx("p",{className:"login-subtitle",children:"Insira seu e-mail e código de ativação"}),l.jsxs("form",{onSubmit:S,children:[g&&l.jsx("div",{className:"login-error",children:g}),l.jsxs("div",{className:"form-group",children:[l.jsx("label",{htmlFor:"email",children:"E-mail:"}),l.jsxs("div",{className:"email-input-wrapper",children:[l.jsx("span",{className:"material-symbols-outlined email-icon",children:"mail"}),l.jsx("input",{id:"email",type:"email",required:!0,placeholder:"seu@email.com",value:n,onChange:k=>r(k.target.value),autoComplete:"email"})]})]}),l.jsxs("div",{className:"form-group",children:[l.jsx("label",{htmlFor:"activationCode",children:"Código de Ativação"}),l.jsxs("div",{className:"password-input-wrapper",children:[l.jsx("span",{className:"material-symbols-outlined lock-icon",children:"lock"}),l.jsx("input",{id:"activationCode",type:i?"text":"password",required:!0,placeholder:"********",value:a,onChange:k=>s(k.target.value),autoComplete:"current-password"}),l.jsx("button",{type:"button",className:"password-toggle-btn","aria-label":i?"Ocultar código":"Mostrar código",onClick:()=>o(k=>!k),children:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"20px",viewBox:"0 -960 960 960",width:"20px",fill:"currentColor",children:l.jsx("path",{d:"M480-320q75 0 127.5-52.5T660-500q0-75-52.5-127.5T480-680q-75 0-127.5 52.5T300-500q0 75 52.5 127.5T480-320Zm0-72q-42 0-71-29t-29-71q0-42 29-71t71-29q42 0 71 29t29 71q0 42-29 71t-71 29Zm0 192q-146 0-266-81.5T40-500q54-137 174-218.5T480-800q146 0 266 81.5T920-500q-54 137-174 218.5T480-200Z"})})})]})]}),l.jsx("button",{type:"submit",className:"login-button",disabled:p,children:l.jsx("span",{children:p?"Entrando…":"Entrar"})})]}),l.jsxs("div",{className:"support-link",children:[l.jsxs("p",{children:[l.jsx("span",{children:"Esqueceu o código de ativação?"}),l.jsx("a",{href:"/faq",children:"Clique aqui"})]}),l.jsx("p",{children:l.jsx("span",{children:"Problemas com a ativação? Use o chat de suporte abaixo"})})]})]}),l.jsxs("div",{className:"login-footer-bottom",children:[l.jsxs("div",{style:{marginBottom:"10px"},children:[l.jsx("a",{href:"/legal/terms.html",target:"_blank",rel:"noreferrer",children:"Termos de Serviço"}),l.jsx("span",{style:{opacity:.5},children:"|"}),l.jsx("a",{href:"/legal/privacy.html",target:"_blank",rel:"noreferrer",children:"Política de Privacidade"})]}),l.jsx("div",{children:"© 2026. Todos os direitos reservados."})]})]})]})}function me({open:e,title:t,onClose:n,children:r}){return e?l.jsx("div",{className:"modal-overlay",onClick:a=>{a.target===a.currentTarget&&n()},children:l.jsxs("div",{className:"modal-content",children:[l.jsx("button",{className:"modal-close",onClick:n,children:"✕"}),t&&l.jsx("h2",{children:t}),r]})}):null}const Fh=["Clickbank","Hotmart","Digistore24","Kiify","Cakto","Outro"],_o={nome:"",plataforma:"Clickbank",link_afiliado:"",comissao:"",preco:"",nicho:""};function Mh(e){if(!e)return"—";const[t]=e.split(" "),[n,r,a]=t.split("-");return n?`${a}/${r}/${n.slice(2)}`:e}function ud(e){if(!(e!=null&&e.analysis))return null;if(typeof e.analysis=="string")try{return JSON.parse(e.analysis)}catch{return null}return e.analysis}function bh({produto:e,onClose:t}){const n=ud(e);if(!n)return null;const r=n.analise||n;return l.jsxs(me,{open:!0,title:`🧠 Análise — ${e.nome}`,onClose:t,children:[r.resumo&&l.jsxs("p",{style:{fontSize:"14px",marginBottom:"14px"},children:[l.jsx("strong",{children:"Resumo:"})," ",r.resumo]}),Array.isArray(r.angulos_copy)&&l.jsxs("div",{style:{marginBottom:"12px"},children:[l.jsx("strong",{style:{fontSize:"13px"},children:"Ângulos de copy"}),l.jsx("ul",{className:"placeholder-list",children:r.angulos_copy.map((a,s)=>l.jsx("li",{children:a},s))})]}),Array.isArray(r.palavras_chave)&&l.jsxs("div",{style:{marginBottom:"12px"},children:[l.jsx("strong",{style:{fontSize:"13px"},children:"Palavras-chave sugeridas"}),l.jsx("ul",{className:"placeholder-list",children:r.palavras_chave.map((a,s)=>l.jsx("li",{children:a},s))})]}),Array.isArray(r.negativas_sugeridas)&&l.jsxs("div",{style:{marginBottom:"12px"},children:[l.jsx("strong",{style:{fontSize:"13px"},children:"Negativas sugeridas"}),l.jsx("ul",{className:"placeholder-list",children:r.negativas_sugeridas.map((a,s)=>l.jsx("li",{children:a},s))})]}),r.brief_presell&&l.jsxs("div",{style:{marginBottom:"12px"},children:[l.jsx("strong",{style:{fontSize:"13px"},children:"Brief da presell"}),l.jsx("p",{style:{fontSize:"14px",color:"var(--text-muted)",marginTop:"6px"},children:r.brief_presell})]}),r.publico&&l.jsxs("div",{children:[l.jsx("strong",{style:{fontSize:"13px"},children:"Público"}),l.jsx("p",{style:{fontSize:"14px",color:"var(--text-muted)",marginTop:"6px"},children:r.publico})]}),l.jsxs("p",{className:"placeholder-note",children:["Análise gerada por: ",n.provider||"IA"]})]})}function Bh(){const e=De(),{toast:t}=we(),[n,r]=v.useState([]),[a,s]=v.useState(!0),[i,o]=v.useState(""),[u,c]=v.useState("em_analise"),[g,m]=v.useState(""),[p,j]=v.useState(!1),[S,k]=v.useState(null),[N,h]=v.useState(_o),[d,f]=v.useState(!1),[y,C]=v.useState(null),[A,E]=v.useState(null),P=v.useCallback(async()=>{s(!0),o("");try{r(await O.produtos())}catch(T){o(T.message||"Falha ao carregar produtos.")}finally{s(!1)}},[]);v.useEffect(()=>{P()},[P]);const x=v.useMemo(()=>{const T=g.trim().toLowerCase();return n.filter(b=>b.status===u&&(!T||b.nome.toLowerCase().includes(T)||(b.nicho||"").toLowerCase().includes(T)))},[n,u,g]),w=()=>{k(null),h(_o),j(!0)},R=T=>{k(T),h({nome:T.nome||"",plataforma:T.plataforma||"Outro",link_afiliado:T.link_afiliado||"",comissao:T.comissao??"",preco:T.preco??"",nicho:T.nicho||""}),j(!0)},U=async T=>{T.preventDefault(),f(!0);try{const b={nome:N.nome,plataforma:N.plataforma,link_afiliado:N.link_afiliado,comissao:Number(N.comissao)||0,preco:Number(N.preco)||0,nicho:N.nicho};S?(await O.updateProduto(S.id,b),t("Produto atualizado!")):(await O.createProduto(b),t("Produto adicionado — em análise!")),j(!1),await P()}catch(b){t(b.message||"Falha ao salvar o produto.")}finally{f(!1)}},G=async T=>{E(T.id);try{const b=await O.aprovarProduto(T.id);t(`"${T.nome}" aprovado!`),await P(),b.analysis?C(b):b.analysis_error&&t(`Análise IA indisponível: ${b.analysis_error}`)}catch(b){t(b.message||"Falha ao aprovar.")}finally{E(null)}},ge=async T=>{E(T.id);try{const b=await O.analisarProduto(T.id);t("Análise gerada!"),await P(),C(b)}catch(b){t(b.message||"Falha na análise.")}finally{E(null)}},_e=async T=>{if(window.confirm(`Excluir o produto "${T.nome}"?`))try{await O.deleteProduto(T.id),t("Produto excluído."),await P()}catch(b){t(b.message||"Falha ao excluir.")}};return l.jsxs("section",{children:[l.jsx("h1",{children:"Seus Produtos"}),l.jsx("p",{className:"subtitle",children:"Analise, aprove e anuncie seus produtos."}),l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"20px"},children:[l.jsx("input",{type:"text",placeholder:"Produto...",value:g,onChange:T=>m(T.target.value),style:{padding:"10px",width:"300px",border:"1px solid var(--border)",borderRadius:"6px",background:"var(--input-bg)",color:"var(--text-main)",outline:"none"}}),l.jsx("button",{className:"btn-primary",onClick:w,children:"+ Adicionar produto"})]}),l.jsxs("div",{className:"tabs",children:[l.jsx("div",{className:`tab ${u==="em_analise"?"active":""}`,onClick:()=>c("em_analise"),children:"🔍 Em Análise"}),l.jsx("div",{className:`tab ${u==="aprovado"?"active":""}`,onClick:()=>c("aprovado"),children:"✓ Aprovados"})]}),i&&l.jsx("div",{className:"login-error",children:i}),l.jsxs("table",{children:[l.jsx("thead",{children:l.jsxs("tr",{children:[l.jsx("th",{children:"Atualizado"}),l.jsx("th",{children:"Produto"}),l.jsx("th",{children:"Plataforma"}),l.jsx("th",{children:"Ações"})]})}),l.jsx("tbody",{children:a?l.jsx("tr",{className:"empty-row",children:l.jsx("td",{colSpan:4,children:"Carregando…"})}):x.length===0?l.jsx("tr",{className:"empty-row",children:l.jsx("td",{colSpan:4,children:u==="em_analise"?"Nenhum produto em análise. Clique em “+ Adicionar produto” para começar.":"Nenhum produto aprovado ainda. Aprove um produto na aba “Em Análise”."})}):x.map(T=>l.jsxs("tr",{children:[l.jsx("td",{children:Mh(T.updated_at)}),l.jsxs("td",{children:[T.nome,T.nicho?l.jsxs("span",{style:{color:"var(--text-muted)"},children:[" · ",T.nicho]}):null]}),l.jsx("td",{children:T.plataforma}),l.jsx("td",{className:"action-icons",children:T.status==="em_analise"?l.jsxs(l.Fragment,{children:[l.jsx("span",{title:"Editar",onClick:()=>R(T),children:"✏️"}),l.jsx("span",{title:"AdsWords (palavras-chave)",onClick:()=>e("/adswords"),children:"✈️ AdsWord"}),l.jsx("span",{title:A===T.id?"Aprovando (análise IA se LLM ativo)…":"Aprovar",onClick:()=>G(T),children:A===T.id?"⏳":"✓ Aprovar"})]}):l.jsxs(l.Fragment,{children:[l.jsx("span",{title:"AdsPages (criar presell)",onClick:()=>e("/adspages"),children:"🛡️ AdsPages"}),l.jsx("span",{title:"AdsCreator (criar campanha)",onClick:()=>e("/adscreator"),children:"🎯 AdsCreator"}),l.jsx("span",{title:"AdsWords (palavras-chave)",onClick:()=>e("/adswords"),children:"✈️ AdsWord"}),ud(T)?l.jsx("span",{title:"Ver análise IA",onClick:()=>C(T),children:"🧠"}):l.jsx("span",{title:A===T.id?"Analisando com IA…":"Gerar análise IA",onClick:()=>ge(T),children:A===T.id?"⏳":"🔬"}),l.jsx("span",{title:"Excluir",onClick:()=>_e(T),children:"🗑️"})]})})]},T.id))})]}),l.jsx(me,{open:p,title:S?"Editar Produto":"Adicionar Produto",onClose:()=>j(!1),children:l.jsxs("form",{onSubmit:U,children:[l.jsxs("div",{className:"form-group",children:[l.jsx("label",{children:"Nome do produto"}),l.jsx("input",{required:!0,value:N.nome,onChange:T=>h({...N,nome:T.target.value}),placeholder:"Ex.: Prodentim"})]}),l.jsxs("div",{className:"form-row",children:[l.jsxs("div",{className:"form-group",children:[l.jsx("label",{children:"Plataforma"}),l.jsx("select",{value:N.plataforma,onChange:T=>h({...N,plataforma:T.target.value}),children:Fh.map(T=>l.jsx("option",{value:T,children:T},T))})]}),l.jsxs("div",{className:"form-group",children:[l.jsx("label",{children:"Nicho"}),l.jsx("input",{value:N.nicho,onChange:T=>h({...N,nicho:T.target.value}),placeholder:"Ex.: saúde"})]})]}),l.jsxs("div",{className:"form-group",children:[l.jsx("label",{children:"Link de afiliado / checkout"}),l.jsx("input",{value:N.link_afiliado,onChange:T=>h({...N,link_afiliado:T.target.value}),placeholder:"https://..."})]}),l.jsxs("div",{className:"form-row",children:[l.jsxs("div",{className:"form-group",children:[l.jsx("label",{children:"Comissão (R$)"}),l.jsx("input",{type:"number",step:"0.01",min:"0",value:N.comissao,onChange:T=>h({...N,comissao:T.target.value})})]}),l.jsxs("div",{className:"form-group",children:[l.jsx("label",{children:"Preço (R$)"}),l.jsx("input",{type:"number",step:"0.01",min:"0",value:N.preco,onChange:T=>h({...N,preco:T.target.value})})]})]}),l.jsx("button",{className:"btn-primary",type:"submit",disabled:d,style:{width:"100%",marginTop:"10px"},children:d?"Salvando…":S?"Salvar alterações":"Salvar"})]})}),l.jsx(bh,{produto:y,onClose:()=>C(null)})]})}function ha(e){return(Number(e)||0).toLocaleString("pt-BR",{style:"currency",currency:"BRL"})}function Uh(){const{toast:e}=we(),t=De(),[n,r]=v.useState(null),[a,s]=v.useState(!0),i=v.useCallback(async()=>{s(!0);try{r(await O.dashboard())}catch(o){e(o.message||"Falha ao carregar o dashboard.")}finally{s(!1)}},[e]);return v.useEffect(()=>{i()},[i]),a&&!n?l.jsx("div",{className:"loading-screen",children:"Carregando…"}):n?l.jsxs("section",{children:[l.jsx("h1",{children:"AdsDashboard"}),l.jsx("p",{className:"subtitle",children:"Tenha uma visão completa da sua operação — dados reais dos seus módulos."}),n.progresso&&n.progresso.status==="em_andamento"&&l.jsxs("div",{className:"form-card",style:{border:"1px solid var(--primary)"},children:[l.jsxs("div",{className:"flex-between",style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"10px"},children:[l.jsxs("strong",{children:["🤖 Lançamento em andamento — etapa ",n.progresso.etapa," de ",n.progresso.total]}),l.jsx("button",{className:"btn-outline",style:{fontSize:"11px",padding:"6px 12px"},onClick:()=>t("/adsbot"),children:"Continuar no AdsBot →"})]}),l.jsx("div",{className:"funnel-step-bar",style:{height:"12px"},children:l.jsx("div",{style:{width:`${n.progresso.percentual}%`,background:"var(--primary)",height:"100%",borderRadius:"4px"}})}),l.jsxs("p",{className:"placeholder-note",style:{marginTop:"8px"},children:["Faltam ",n.progresso.faltam," passo(s) para o Relatório de Lançamento."]})]}),l.jsxs("div",{className:"metrics-grid",children:[l.jsxs("div",{className:"metric-card",children:[l.jsx("h3",{children:"Conversões (vendas)"}),l.jsx("div",{className:"value",children:n.vendas.total})]}),l.jsxs("div",{className:"metric-card",children:[l.jsx("h3",{children:"Receita"}),l.jsx("div",{className:"value green",children:ha(n.vendas.receita)})]}),l.jsxs("div",{className:"metric-card",children:[l.jsx("h3",{children:"Comissão"}),l.jsx("div",{className:"value purple",children:ha(n.vendas.comissao)})]}),l.jsxs("div",{className:"metric-card",children:[l.jsx("h3",{children:"Visitas rastreadas"}),l.jsx("div",{className:"value",children:n.tracking.visitas})]})]}),l.jsx("p",{className:"metrics-note",children:"ROAS aparece quando houver investimento registrado nas campanhas (integração de gastos — parte futura). O ProdMaker nunca inventa métricas."}),l.jsxs("div",{className:"metrics-grid",children:[l.jsxs("div",{className:"metric-card",children:[l.jsx("h3",{children:"Produtos"}),l.jsx("div",{className:"value",children:n.produtos.total}),l.jsxs("p",{style:{fontSize:"11px",color:"var(--text-muted)"},children:[n.produtos.aprovados," aprovados · ",n.produtos.em_analise," em análise"]})]}),l.jsxs("div",{className:"metric-card",children:[l.jsx("h3",{children:"Páginas"}),l.jsx("div",{className:"value",children:n.paginas.total}),l.jsxs("p",{style:{fontSize:"11px",color:"var(--text-muted)"},children:[n.paginas.publicadas," publicadas · ",n.paginas.rascunho," rascunho"]})]}),l.jsxs("div",{className:"metric-card",children:[l.jsx("h3",{children:"Campanhas"}),l.jsx("div",{className:"value",children:n.campanhas.total}),l.jsxs("p",{style:{fontSize:"11px",color:"var(--text-muted)"},children:[n.campanhas.publicadas," publicadas · ",n.campanhas.erro," com erro"]})]}),l.jsxs("div",{className:"metric-card",children:[l.jsx("h3",{children:"Infoprodutos"}),l.jsx("div",{className:"value",children:n.infoprodutos.total}),l.jsxs("p",{style:{fontSize:"11px",color:"var(--text-muted)"},children:[n.tracking.conversoes_pendentes," conversão(ões) GCLID pendente(s)"]})]})]}),l.jsxs("div",{className:"bottom-grid",children:[l.jsxs("div",{className:"traffic-flow-card",children:[l.jsx("h3",{children:"💸 Últimas vendas"}),n.ultimas_vendas.length===0?l.jsx("p",{style:{fontSize:"13px",color:"var(--text-muted)",marginTop:"12px"},children:"Nenhuma venda registrada ainda."}):l.jsxs("table",{style:{marginTop:"12px"},children:[l.jsx("thead",{children:l.jsxs("tr",{children:[l.jsx("th",{children:"Data"}),l.jsx("th",{children:"Produto"}),l.jsx("th",{children:"Fonte"}),l.jsx("th",{children:"Valor"})]})}),l.jsx("tbody",{children:n.ultimas_vendas.map(o=>{var u;return l.jsxs("tr",{children:[l.jsx("td",{children:(u=o.created_at)==null?void 0:u.slice(0,10)}),l.jsx("td",{children:o.produto_nome||`#${o.id}`}),l.jsx("td",{children:o.fonte}),l.jsx("td",{children:ha(o.valor)})]},o.id)})})]})]}),l.jsxs("div",{className:"funnel-card",children:[l.jsx("h3",{children:"📄 Últimas páginas"}),n.ultimas_paginas.length===0?l.jsx("p",{style:{fontSize:"13px",color:"var(--text-muted)",marginTop:"12px"},children:"Nenhuma página criada ainda."}):l.jsx("ul",{className:"placeholder-list",style:{marginTop:"12px"},children:n.ultimas_paginas.map(o=>l.jsxs("li",{children:[o.titulo," — ",o.status==="publicada"?"✅ publicada":"📝 rascunho"]},o.id))}),l.jsx("button",{className:"btn-primary",style:{width:"100%",marginTop:"16px"},onClick:()=>t("/adsbot"),children:"🤖 Novo Lançamento (AdsBot)"})]})]})]}):null}const Vh={nvidia:{kind:"openai",base_url:"https://integrate.api.nvidia.com/v1",model:""},gemini:{kind:"gemini",base_url:"",model:"gemini-2.5-flash"}},Wh=[{id:"tracking",emoji:"🎯",name:"Pixel de Rastreamento",fields:[{key:"pixel_url",label:"URL pública do /track (túnel ou domínio)",placeholder:"https://meu-tunel.exemplo.com/track"}]},{id:"gamma",emoji:"🎨",name:"Gamma AI",fields:[{key:"api_key",label:"API Key",secret:!0},{key:"base_url",label:"Base URL",placeholder:"https://api.app.gamma"}]},{id:"github",emoji:"🐙",name:"GitHub",fields:[{key:"token",label:"Token (PAT)",secret:!0},{key:"repo",label:"Repositório de páginas (opcional)",placeholder:"usuario/prodmaker-pages"}]},{id:"cloudflare",emoji:"☁️",name:"Cloudflare",fields:[{key:"api_token",label:"API Token",secret:!0},{key:"account_id",label:"Account ID"}]},{id:"telegram",emoji:"✈️",name:"Telegram",fields:[{key:"bot_token",label:"Bot Token",secret:!0},{key:"chat_id",label:"Chat ID"}]},{id:"pinterest",emoji:"📌",name:"Pinterest",fields:[{key:"email",label:"E-mail"},{key:"password",label:"Senha",secret:!0},{key:"board",label:"Board padrão"}]},{id:"google-ads",emoji:"🎯",name:"Google Ads",fields:[{key:"developer_token",label:"Developer Token",secret:!0},{key:"client_id",label:"OAuth Client ID"},{key:"client_secret",label:"OAuth Client Secret",secret:!0},{key:"refresh_token",label:"Refresh Token",secret:!0},{key:"customer_id",label:"Customer ID (XXX-XXX-XXXX)"},{key:"conversion_action",label:"Conversion Action (recurso)",placeholder:"customers/123/conversionActions/456"},{key:"api_version",label:"Versão da API",placeholder:"v22"}]},{id:"meta",emoji:"👥",name:"Meta Ads",fields:[{key:"app_id",label:"App ID"},{key:"app_secret",label:"App Secret",secret:!0},{key:"access_token",label:"Access Token (sistema)",secret:!0},{key:"ad_account_id",label:"Ad Account ID (act_...)"}]},{id:"tiktok",emoji:"🎵",name:"TikTok Ads",fields:[{key:"app_id",label:"App ID"},{key:"app_secret",label:"App Secret",secret:!0},{key:"access_token",label:"Access Token",secret:!0},{key:"advertiser_id",label:"Advertiser ID"}]},{id:"canva",emoji:"🖼️",name:"Canva (MCP)",soon:!0}];function Hh(){const{toast:e}=we(),[t,n]=v.useState([]),[r,a]=v.useState({}),[s,i]=v.useState(null),[o,u]=v.useState({}),[c,g]=v.useState(null),[m,p]=v.useState(!1),[j,S]=v.useState(!1),k=v.useCallback(async()=>{try{const[x,w]=await Promise.all([O.llmProviders(),O.settings()]);n(x),a(w.api_keys||{})}catch(x){e(x.message||"Falha ao carregar configurações.")}},[e]);v.useEffect(()=>{k()},[k]);const N=x=>t.find(w=>w.id===x),h=x=>{const w=N(x)||{id:x,...Vh[x],api_key:"",priority:x==="nvidia"?1:2,active:!1};u({...w}),g(null),i(x)},d=x=>{u({...r[x.id]||{}}),g(null),i(x)},f=async()=>{S(!0);try{const x=t.filter(R=>R.id!==o.id);x.push({id:o.id,kind:o.kind,api_key:(o.api_key||"").trim(),base_url:(o.base_url||"").trim(),model:(o.model||"").trim(),priority:Number(o.priority)||99,active:!!o.active}),x.sort((R,U)=>(R.priority||99)-(U.priority||99));const w=(await O.llmProviders,null);await y(x),e(`Cartão ${o.id} salvo!`),i(null),await k()}catch(x){e(x.message||"Falha ao salvar.")}finally{S(!1)}},y=async x=>{await fetch("/api/llm/providers",{method:"PUT",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({providers:x})}).then(async w=>{if(!w.ok){const R=await w.json().catch(()=>({}));throw new Error(R.detail||`Erro ${w.status}`)}})},C=async x=>{S(!0);try{const w=await O.settings();w.api_keys={...w.api_keys||{},[x.id]:o},await O.saveSettings(w),e(`Cartão ${x.name} salvo!`),i(null),await k()}catch(w){e(w.message||"Falha ao salvar.")}finally{S(!1)}},A=async()=>{p(!0),g(null);try{const x=await O.llmTest(o.id);g({ok:!0,text:`OK — ${x.model||"modelo"} respondeu em ${x.latency_ms} ms`})}catch(x){g({ok:!1,text:x.message||"Falha no teste."})}finally{p(!1)}},E=x=>{const w=N(x);return!!(w&&w.active&&w.api_key)},P=(x,w)=>{const R=r[x]||{};return w.some(U=>(R[U.key]||"").trim())};return l.jsxs("section",{children:[l.jsx("h1",{children:"🔌 Chaves de API"}),l.jsx("p",{className:"subtitle",children:"Integrações do ProdMaker. As chaves ficam apenas no seu storage local — nunca no GitHub."}),l.jsx("h3",{style:{fontSize:"15px",margin:"24px 0 8px"},children:"🤖 Provedores LLM (pool com prioridade e failover)"}),l.jsx("div",{className:"api-grid",children:[{id:"nvidia",emoji:"🤖",name:"NVIDIA NIM"},{id:"gemini",emoji:"✨",name:"Gemini"}].map(x=>l.jsxs("div",{className:"api-card",onClick:()=>h(x.id),children:[l.jsxs("div",{className:"api-logo",children:[x.emoji," ",x.name]}),l.jsx("div",{className:"api-status",style:{color:E(x.id)?"var(--success)":"var(--text-muted)"},children:E(x.id)?"Configurado":"Não configurado"})]},x.id))}),l.jsx("h3",{style:{fontSize:"15px",margin:"28px 0 8px"},children:"🔌 Demais integrações"}),l.jsx("div",{className:"api-grid",children:Wh.map(x=>l.jsxs("div",{className:"api-card",style:x.soon?{opacity:.55,cursor:"default"}:{},onClick:()=>!x.soon&&d(x),title:x.soon?"Em breve":"Configurar",children:[l.jsxs("div",{className:"api-logo",children:[x.emoji," ",x.name]}),l.jsx("div",{className:"api-status",style:{color:P(x.id,x.fields||[])?"var(--success)":"var(--text-muted)"},children:x.soon?"Em breve":P(x.id,x.fields)?"Configurado":"Não configurado"})]},x.id))}),l.jsx(me,{open:s==="nvidia"||s==="gemini",title:`Provedor LLM — ${s}`,onClose:()=>i(null),children:["nvidia","gemini"].includes(s)&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"form-group",children:[l.jsx("label",{children:"API Key"}),l.jsx("input",{type:"password",value:o.api_key||"",onChange:x=>u({...o,api_key:x.target.value}),placeholder:s==="nvidia"?"nvapi-...":"AIza..."})]}),l.jsxs("div",{className:"form-row",children:[l.jsxs("div",{className:"form-group",children:[l.jsx("label",{children:"Modelo"}),l.jsx("input",{value:o.model||"",onChange:x=>u({...o,model:x.target.value}),placeholder:s==="nvidia"?"ex.: nvidia/nemotron-...":"gemini-2.5-flash"})]}),l.jsxs("div",{className:"form-group",children:[l.jsx("label",{children:"Prioridade (1 = primeiro)"}),l.jsx("input",{type:"number",min:"1",value:o.priority??2,onChange:x=>u({...o,priority:x.target.value})})]})]}),s==="nvidia"&&l.jsxs("div",{className:"form-group",children:[l.jsx("label",{children:"Base URL (compatível OpenAI)"}),l.jsx("input",{value:o.base_url||"",onChange:x=>u({...o,base_url:x.target.value}),placeholder:"https://integrate.api.nvidia.com/v1"})]}),l.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"8px",fontSize:"14px",fontWeight:600,marginBottom:"16px"},children:[l.jsx("input",{type:"checkbox",checked:!!o.active,onChange:x=>u({...o,active:x.target.checked}),style:{width:"auto"}}),"Ativo (participa do pool)"]}),c&&l.jsxs("div",{className:c.ok?"api-status":"login-error",style:{marginBottom:"12px",fontWeight:600},children:[c.ok?"✅":"❌"," ",c.text]}),l.jsxs("div",{style:{display:"flex",gap:"10px",marginTop:"10px"},children:[l.jsx("button",{className:"btn-outline",onClick:A,disabled:m||!(o.api_key||"").trim(),children:m?"Testando…":"Testar chamada"}),l.jsx("button",{className:"btn-primary",onClick:f,disabled:j,children:j?"Salvando…":"Salvar"})]})]})}),l.jsx(me,{open:!!(s&&s.fields),title:`${(s==null?void 0:s.emoji)||""} ${(s==null?void 0:s.name)||""}`,onClose:()=>i(null),children:(s==null?void 0:s.fields)&&l.jsxs(l.Fragment,{children:[s.fields.map(x=>l.jsxs("div",{className:"form-group",children:[l.jsx("label",{children:x.label}),l.jsx("input",{type:x.secret?"password":"text",value:o[x.key]||"",onChange:w=>u({...o,[x.key]:w.target.value}),placeholder:x.placeholder||""})]},x.key)),l.jsx("div",{style:{display:"flex",gap:"10px",marginTop:"10px"},children:l.jsx("button",{className:"btn-primary",onClick:()=>C(s),disabled:j,children:j?"Salvando…":"Salvar"})})]})})]})}const Gh=["E-book","Planilha","Mini-curso","Desafio","Workshop"],Qh={titulo:"",prompt:"",formato:"E-book",nicho:"",dor:"",avatar:"",resultado:"",modo:"rapido"};function Kh(){const{toast:e}=we(),t=De(),[n,r]=v.useState(Qh),[a,s]=v.useState(!1),[i,o]=v.useState(""),[u,c]=v.useState(null),g=p=>j=>r({...n,[p]:j.target.value}),m=async p=>{p.preventDefault(),o(""),s(!0),c(null);try{const j=await O.createInfoproduto(n);c(j),e(`Infoproduto "${j.titulo}" gerado!`)}catch(j){o(j.message||"Falha ao gerar o infoproduto.")}finally{s(!1)}};return l.jsxs("section",{children:[l.jsx("h1",{children:"📖 Criar Infoproduto"}),l.jsx("p",{className:"subtitle",children:"Gere e-books, planilhas e mini-cursos em PDF com IA — Modo Rápido (LLM + PDF local) ou Premium (Gamma AI)."}),l.jsxs("div",{className:"form-card",children:[l.jsxs("form",{onSubmit:m,children:[l.jsxs("div",{className:"form-row",children:[l.jsxs("div",{className:"form-group",children:[l.jsx("label",{children:"Modo"}),l.jsxs("select",{value:n.modo,onChange:g("modo"),children:[l.jsx("option",{value:"rapido",children:"⚡ Modo Rápido (open source — LLM + PDF local)"}),l.jsx("option",{value:"gamma",children:"🎨 Modo Premium (Gamma AI)"}),l.jsx("option",{value:"canva",disabled:!0,children:"🖼️ Modo Canva (MCP — em breve)"})]})]}),l.jsxs("div",{className:"form-group",children:[l.jsx("label",{children:"Formato"}),l.jsx("select",{value:n.formato,onChange:g("formato"),children:Gh.map(p=>l.jsx("option",{value:p,children:p},p))})]})]}),l.jsxs("div",{className:"form-group",children:[l.jsx("label",{children:"Título desejado (máx. 6 palavras)"}),l.jsx("input",{required:!0,value:n.titulo,onChange:g("titulo"),placeholder:"Ex.: Cardápio 7 Dias: Receitas para Secar"})]}),l.jsxs("div",{className:"form-row",children:[l.jsxs("div",{className:"form-group",children:[l.jsx("label",{children:"Nicho"}),l.jsx("input",{value:n.nicho,onChange:g("nicho"),placeholder:"Ex.: emagrecimento"})]}),l.jsxs("div",{className:"form-group",children:[l.jsx("label",{children:"Dor específica"}),l.jsx("input",{value:n.dor,onChange:g("dor"),placeholder:"Ex.: passar fome para emagrecer"})]})]}),l.jsxs("div",{className:"form-row",children:[l.jsxs("div",{className:"form-group",children:[l.jsx("label",{children:"Avatar (público-alvo)"}),l.jsx("input",{value:n.avatar,onChange:g("avatar"),placeholder:"Ex.: mulheres 30-50 que trabalham fora"})]}),l.jsxs("div",{className:"form-group",children:[l.jsx("label",{children:"Resultado prometido"}),l.jsx("input",{value:n.resultado,onChange:g("resultado"),placeholder:"Ex.: secar em 7 dias sem passar fome"})]})]}),l.jsxs("div",{className:"form-group",children:[l.jsx("label",{children:"Prompt / instruções adicionais"}),l.jsx("textarea",{rows:4,value:n.prompt,onChange:g("prompt"),placeholder:"Descreva o conteúdo desejado, tom, quantidade de páginas, bônus..."})]}),i&&l.jsxs("div",{className:"login-error",children:[i,/Chaves de API|provedor/i.test(i)&&l.jsxs(l.Fragment,{children:[" — configure em ",l.jsx("a",{href:"/api-keys",onClick:p=>{p.preventDefault(),t("/api-keys")},children:"Chaves de API"}),"."]})]}),l.jsx("button",{className:"btn-primary",type:"submit",disabled:a,style:{width:"100%",marginTop:"10px"},children:a?n.modo==="gamma"?"🎨 Gerando na Gamma AI…":"✨ Gerando com IA…":"✨ Gerar Infoproduto"})]}),a&&l.jsx("p",{className:"placeholder-note",style:{marginTop:"12px"},children:"⏳ A geração usa o pool de LLM configurado e pode levar de 30 segundos a alguns minutos. Aguarde…"}),u&&l.jsxs("div",{className:"form-card",style:{marginTop:"20px",border:"1px solid var(--primary)",background:"var(--primary-light)"},children:[l.jsx("h3",{style:{marginBottom:"6px"},children:"✅ Infoproduto pronto!"}),l.jsxs("p",{style:{fontSize:"14px",marginBottom:"12px"},children:[l.jsx("strong",{children:u.titulo})," · ",u.formato," · provedor: ",u.provider]}),l.jsxs("div",{style:{display:"flex",gap:"10px"},children:[l.jsx("a",{className:"btn-primary",style:{textDecoration:"none"},href:`/api/infoprodutos/${u.id}/download`,children:"⬇️ Baixar PDF"}),l.jsx("button",{className:"btn-outline",onClick:()=>t("/studio/biblioteca"),children:"Abrir Biblioteca"})]})]})]})]})}function qh(e){if(!e)return"—";const[t]=e.split(" "),[n,r,a]=t.split("-");return n?`${a}/${r}/${n.slice(2)}`:e}function Jh(){const{toast:e}=we(),[t,n]=v.useState([]),[r,a]=v.useState(!0),[s,i]=v.useState(null),[o,u]=v.useState(!1),c=v.useCallback(async()=>{a(!0);try{n(await O.infoprodutos())}catch(p){e(p.message||"Falha ao carregar a biblioteca.")}finally{a(!1)}},[e]);v.useEffect(()=>{c()},[c]);const g=async p=>{u(!0),i({titulo:p.titulo,markdown:""});try{const j=await O.infoprodutoMarkdown(p.id);i({titulo:p.titulo,markdown:j.markdown})}catch(j){i(null),e(j.message||"Markdown indisponível para este item.")}finally{u(!1)}},m=async p=>{if(window.confirm(`Excluir o infoproduto "${p.titulo}"?`))try{await O.deleteInfoproduto(p.id),e("Infoproduto excluído."),await c()}catch(j){e(j.message||"Falha ao excluir.")}};return l.jsxs("section",{children:[l.jsx("h1",{children:"📚 Biblioteca de Infoprodutos"}),l.jsx("p",{className:"subtitle",children:"Seus infoprodutos gerados — download do PDF e visualização do conteúdo."}),l.jsxs("table",{children:[l.jsx("thead",{children:l.jsxs("tr",{children:[l.jsx("th",{children:"Criado"}),l.jsx("th",{children:"Título"}),l.jsx("th",{children:"Formato"}),l.jsx("th",{children:"Modo"}),l.jsx("th",{children:"Ações"})]})}),l.jsx("tbody",{children:r?l.jsx("tr",{className:"empty-row",children:l.jsx("td",{colSpan:5,children:"Carregando…"})}):t.length===0?l.jsx("tr",{className:"empty-row",children:l.jsx("td",{colSpan:5,children:"Nenhum infoproduto ainda. Gere o primeiro em “Criar Infoproduto”."})}):t.map(p=>l.jsxs("tr",{children:[l.jsx("td",{children:qh(p.created_at)}),l.jsxs("td",{children:[p.titulo,p.nicho?l.jsxs("span",{style:{color:"var(--text-muted)"},children:[" · ",p.nicho]}):null]}),l.jsx("td",{children:p.formato}),l.jsx("td",{children:p.modo==="gamma"?"🎨 Premium":"⚡ Rápido"}),l.jsxs("td",{className:"action-icons",children:[l.jsx("a",{href:`/api/infoprodutos/${p.id}/download`,title:"Baixar PDF",style:{color:"inherit",textDecoration:"none"},children:"⬇️ PDF"}),p.md_path&&l.jsx("span",{title:"Ver conteúdo",onClick:()=>g(p),children:"👁️"}),l.jsx("span",{title:"Excluir",onClick:()=>m(p),children:"🗑️"})]})]},p.id))})]}),l.jsx(me,{open:!!s,title:`Conteúdo — ${(s==null?void 0:s.titulo)||""}`,onClose:()=>i(null),children:o?l.jsx("p",{className:"placeholder-note",children:"Carregando…"}):l.jsx("pre",{style:{whiteSpace:"pre-wrap",fontFamily:"inherit",fontSize:"14px",lineHeight:1.6,color:"var(--text-main)"},children:s==null?void 0:s.markdown})})]})}const Xh=["Português","Inglês","Espanhol"],Yh=[{value:"presell",label:"🛡️ Pre-Sell (afiliado)"},{value:"vendas",label:"💸 Página de Vendas (12 seções — produto próprio)"},{value:"clone",label:"🧬 Clonar página (higienizada)"}],Zh={tipo:"presell",produto_id:"",titulo:"",idioma:"Português",afiliado_link:"",checkout_link:"",avatar:"",resultado:"",tempo:"",dor:"",prompt:"",clone_url:""};function em(){const{toast:e}=we(),t=De(),[n,r]=v.useState([]),[a,s]=v.useState(Zh),[i,o]=v.useState(!1),[u,c]=v.useState(""),[g,m]=v.useState(null),[p,j]=v.useState(null),[S,k]=v.useState(""),[N,h]=v.useState(!1),d=v.useCallback(async()=>{try{r(await O.produtos())}catch{}},[]);v.useEffect(()=>{d()},[d]);const f=x=>w=>s({...a,[x]:w.target.value}),y=x=>{const w=x.target.value,R=n.find(U=>String(U.id)===String(w));s({...a,produto_id:w,titulo:R&&!a.titulo?`Presell — ${R.nome}`:a.titulo,afiliado_link:(R==null?void 0:R.link_afiliado)||a.afiliado_link,dor:(R==null?void 0:R.nicho)||a.dor})},C=async x=>{x.preventDefault(),c(""),o(!0),m(null);try{const w={...a,produto_id:a.produto_id?Number(a.produto_id):null},R=await O.createPagina(w);m(R),e(`Página "${R.titulo}" criada!`)}catch(w){c(w.message||"Falha ao criar a página.")}finally{o(!1)}},A=async x=>{try{const w=await O.paginaHtml(x.id);k(w.html),j({id:x.id,titulo:x.titulo})}catch(w){e(w.message||"HTML não encontrado.")}},E=async()=>{h(!0);try{await O.updatePaginaHtml(p.id,S),e("HTML atualizado!"),j(null)}catch(x){e(x.message||"Falha ao salvar o HTML.")}finally{h(!1)}},P=a.tipo==="clone";return l.jsxs("section",{children:[l.jsx("h1",{children:"🛡️ AdsPages"}),l.jsx("p",{className:"subtitle",children:"Crie e hospede presells nativas e páginas de vendas — HTML único, mobile-first, com pixel embutido."}),l.jsxs("div",{className:"form-card",children:[l.jsxs("form",{onSubmit:C,children:[l.jsxs("div",{className:"form-row",children:[l.jsxs("div",{className:"form-group",children:[l.jsx("label",{children:"Tipo de página"}),l.jsx("select",{value:a.tipo,onChange:f("tipo"),children:Yh.map(x=>l.jsx("option",{value:x.value,children:x.label},x.value))})]}),l.jsxs("div",{className:"form-group",children:[l.jsx("label",{children:"Idioma"}),l.jsx("select",{value:a.idioma,onChange:f("idioma"),children:Xh.map(x=>l.jsx("option",{value:x,children:x},x))})]})]}),!P&&l.jsxs("div",{className:"form-row",children:[l.jsxs("div",{className:"form-group",children:[l.jsx("label",{children:"Produto (preenche automaticamente)"}),l.jsxs("select",{value:a.produto_id,onChange:y,children:[l.jsx("option",{value:"",children:"— sem produto vinculado —"}),n.map(x=>l.jsx("option",{value:x.id,children:x.nome},x.id))]})]}),l.jsxs("div",{className:"form-group",children:[l.jsx("label",{children:"Título da página"}),l.jsx("input",{required:!0,value:a.titulo,onChange:f("titulo"),placeholder:"Ex.: Prodentim — Vale a pena?"})]})]}),P&&l.jsxs("div",{className:"form-group",children:[l.jsx("label",{children:"URL para clonar"}),l.jsx("input",{required:!0,type:"url",value:a.clone_url,onChange:f("clone_url"),placeholder:"https://concorrente.com/oferta"}),l.jsx("p",{className:"placeholder-note",style:{marginTop:"6px"},children:"O clone remove scripts, iframes e pixels do original antes de salvar."})]}),!P&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"form-row",children:[l.jsxs("div",{className:"form-group",children:[l.jsx("label",{children:"Link de afiliado (CTA)"}),l.jsx("input",{value:a.afiliado_link,onChange:f("afiliado_link"),placeholder:"https://hop.clickbank.net/..."})]}),l.jsxs("div",{className:"form-group",children:[l.jsx("label",{children:"Link de checkout (se diferente)"}),l.jsx("input",{value:a.checkout_link,onChange:f("checkout_link"),placeholder:"https://checkout..."})]})]}),l.jsxs("div",{className:"form-row",children:[l.jsxs("div",{className:"form-group",children:[l.jsx("label",{children:"Avatar"}),l.jsx("input",{value:a.avatar,onChange:f("avatar"),placeholder:"Ex.: homens 40+ com dor nas costas"})]}),l.jsxs("div",{className:"form-group",children:[l.jsx("label",{children:"Resultado prometido"}),l.jsx("input",{value:a.resultado,onChange:f("resultado"),placeholder:"Ex.: alívio em 7 dias"})]})]}),l.jsxs("div",{className:"form-row",children:[l.jsxs("div",{className:"form-group",children:[l.jsx("label",{children:"Tempo (para a promessa)"}),l.jsx("input",{value:a.tempo,onChange:f("tempo"),placeholder:"Ex.: 7 dias"})]}),l.jsxs("div",{className:"form-group",children:[l.jsx("label",{children:"Dor principal"}),l.jsx("input",{value:a.dor,onChange:f("dor"),placeholder:"Ex.: passar fome"})]})]}),l.jsxs("div",{className:"form-group",children:[l.jsx("label",{children:"Instruções adicionais (prompt)"}),l.jsx("textarea",{rows:3,value:a.prompt,onChange:f("prompt"),placeholder:"Tom, cores, urgência, bônus..."})]})]}),u&&l.jsxs("div",{className:"login-error",children:[u,/Chaves de API|provedor/i.test(u)&&l.jsxs(l.Fragment,{children:[" — configure em ",l.jsx("a",{href:"/api-keys",onClick:x=>{x.preventDefault(),t("/api-keys")},children:"Chaves de API"}),"."]})]}),l.jsx("button",{className:"btn-primary",type:"submit",disabled:i,style:{width:"100%",marginTop:"10px"},children:i?P?"🧬 Clonando e higienizando…":"✨ Gerando página com IA…":P?"🧬 Clonar página":"✨ Criar página"})]}),g&&l.jsxs("div",{className:"form-card",style:{marginTop:"20px",border:"1px solid var(--primary)",background:"var(--primary-light)"},children:[l.jsx("h3",{style:{marginBottom:"6px"},children:"✅ Página pronta!"}),l.jsxs("p",{style:{fontSize:"14px",marginBottom:"12px"},children:[l.jsx("strong",{children:g.titulo})," · ",g.tipo," ",g.provider?`· gerada por ${g.provider}`:""]}),l.jsxs("div",{style:{display:"flex",gap:"10px",flexWrap:"wrap"},children:[l.jsx("a",{className:"btn-primary",style:{textDecoration:"none"},href:g.preview_url,target:"_blank",rel:"noreferrer",children:"👁️ Pré-visualizar"}),l.jsx("a",{className:"btn-outline",style:{textDecoration:"none"},href:`/api/paginas/${g.id}/download`,children:"⬇️ Download"}),l.jsx("button",{className:"btn-outline",onClick:()=>A(g),children:"✏️ Editar HTML"}),l.jsx("button",{className:"btn-outline",onClick:()=>t("/hosting/paginas"),children:"📚 Ver todas"})]})]})]}),l.jsxs(me,{open:!!p,title:`Editar HTML — ${(p==null?void 0:p.titulo)||""}`,onClose:()=>j(null),children:[l.jsx("textarea",{value:S,onChange:x=>k(x.target.value),rows:18,style:{width:"100%",fontFamily:"monospace",fontSize:"12px",padding:"10px",borderRadius:"6px",border:"1px solid var(--border)",background:"var(--input-bg)",color:"var(--text-main)",outline:"none"}}),l.jsx("button",{className:"btn-primary",onClick:E,disabled:N,style:{marginTop:"12px",width:"100%"},children:N?"Salvando…":"Salvar HTML"})]})]})}function tm(e){if(!e)return"—";const[t]=e.split(" "),[n,r,a]=t.split("-");return n?`${a}/${r}/${n.slice(2)}`:e}const nm={presell:"🛡️ Pre-sell",vendas:"💸 Vendas",clone:"🧬 Clone"};function rm(){var C,A,E,P;const{toast:e}=we(),t=De(),[n,r]=v.useState([]),[a,s]=v.useState(!0),[i,o]=v.useState(null),[u,c]=v.useState(""),[g,m]=v.useState(!1),[p,j]=v.useState(null),[S,k]=v.useState(null),N=v.useCallback(async()=>{s(!0);try{r(await O.paginas())}catch(x){e(x.message||"Falha ao carregar páginas.")}finally{s(!1)}},[e]);v.useEffect(()=>{N()},[N]);const h=async x=>{try{const w=await O.paginaHtml(x.id);c(w.html),o({id:x.id,titulo:x.titulo})}catch(w){e(w.message||"HTML não encontrado.")}},d=async()=>{m(!0);try{await O.updatePaginaHtml(i.id,u),e("HTML atualizado!"),o(null),await N()}catch(x){e(x.message||"Falha ao salvar.")}finally{m(!1)}},f=async x=>{j(x.id);try{const w=await O.publicarPagina(x.id);e(`"${x.titulo}" publicada no GitHub!`),k({titulo:x.titulo,result:w.publish_result}),await N()}catch(w){e(w.message||"Falha ao publicar.")}finally{j(null)}},y=async x=>{if(window.confirm(`Excluir a página "${x.titulo}"?`))try{await O.deletePagina(x.id),e("Página excluída."),await N()}catch(w){e(w.message||"Falha ao excluir.")}};return l.jsxs("section",{children:[l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"10px"},children:[l.jsx("h1",{children:"📄 Páginas Criadas"}),l.jsx("button",{className:"btn-primary",onClick:()=>t("/adspages"),children:"+ Criar página"})]}),l.jsx("p",{className:"subtitle",children:"Todas as presells e páginas de vendas — pré-visualize, edite, publique e acompanhe."}),l.jsxs("table",{children:[l.jsx("thead",{children:l.jsxs("tr",{children:[l.jsx("th",{children:"Atualizada"}),l.jsx("th",{children:"Título"}),l.jsx("th",{children:"Tipo"}),l.jsx("th",{children:"Status"}),l.jsx("th",{children:"Ações"})]})}),l.jsx("tbody",{children:a?l.jsx("tr",{className:"empty-row",children:l.jsx("td",{colSpan:5,children:"Carregando…"})}):n.length===0?l.jsx("tr",{className:"empty-row",children:l.jsx("td",{colSpan:5,children:"Nenhuma página criada ainda. Use o AdsPages para gerar a primeira."})}):n.map(x=>l.jsxs("tr",{children:[l.jsx("td",{children:tm(x.updated_at)}),l.jsx("td",{children:x.titulo}),l.jsx("td",{children:nm[x.tipo]||x.tipo}),l.jsxs("td",{children:[x.status==="publicada"?l.jsx("span",{style:{color:"var(--success)",fontWeight:600},children:"✅ Publicada"}):l.jsx("span",{style:{color:"var(--text-muted)"},children:"📝 Rascunho"}),x.published_url&&l.jsx("div",{style:{fontSize:"11px"},children:l.jsx("a",{href:x.published_url,target:"_blank",rel:"noreferrer",style:{color:"var(--primary)"},children:x.published_url})})]}),l.jsxs("td",{className:"action-icons",children:[l.jsx("a",{href:x.preview_url,target:"_blank",rel:"noreferrer",title:"Pré-visualizar",style:{color:"inherit",textDecoration:"none"},children:"👁️"}),l.jsx("a",{href:`/api/paginas/${x.id}/download`,title:"Download HTML",style:{color:"inherit",textDecoration:"none"},children:"⬇️"}),l.jsx("span",{title:"Editar HTML",onClick:()=>h(x),children:"✏️"}),l.jsx("span",{title:p===x.id?"Publicando via GitHub…":"Publicar (GitHub → Cloudflare Pages)",onClick:()=>f(x),children:p===x.id?"⏳":"🚀"}),l.jsx("span",{title:"Excluir",onClick:()=>y(x),children:"🗑️"})]})]},x.id))})]}),l.jsx("p",{className:"placeholder-note",style:{marginTop:"16px"},children:"💡 Publicação: o HTML é enviado ao repositório GitHub configurado em Chaves de API. Se o repositório estiver conectado a um projeto no Cloudflare Pages, o deploy é automático."}),l.jsxs(me,{open:!!i,title:`Editar HTML — ${(i==null?void 0:i.titulo)||""}`,onClose:()=>o(null),children:[l.jsx("textarea",{value:u,onChange:x=>c(x.target.value),rows:18,style:{width:"100%",fontFamily:"monospace",fontSize:"12px",padding:"10px",borderRadius:"6px",border:"1px solid var(--border)",background:"var(--input-bg)",color:"var(--text-main)",outline:"none"}}),l.jsx("button",{className:"btn-primary",onClick:d,disabled:g,style:{marginTop:"12px",width:"100%"},children:g?"Salvando…":"Salvar HTML"})]}),l.jsxs(me,{open:!!S,title:`🚀 Publicada — ${(S==null?void 0:S.titulo)||""}`,onClose:()=>k(null),children:[l.jsxs("p",{style:{fontSize:"14px",marginBottom:"10px"},children:[l.jsx("strong",{children:"Arquivo:"})," ",(C=S==null?void 0:S.result)==null?void 0:C.path]}),l.jsx("p",{style:{marginBottom:"6px"},children:l.jsx("a",{href:(A=S==null?void 0:S.result)==null?void 0:A.commit_url,target:"_blank",rel:"noreferrer",style:{color:"var(--primary)"},children:"Commit no GitHub ↗"})}),l.jsx("p",{style:{marginBottom:"12px"},children:l.jsx("a",{href:(E=S==null?void 0:S.result)==null?void 0:E.pages_url,target:"_blank",rel:"noreferrer",style:{color:"var(--primary)"},children:"Página pública (GitHub Pages) ↗"})}),l.jsx("p",{className:"placeholder-note",children:(P=S==null?void 0:S.result)==null?void 0:P.aviso})]})]})}function To(e,t){if(!e)return t;try{return JSON.parse(e)}catch{return t}}function lm(){const{toast:e}=we(),[t,n]=v.useState([]),[r,a]=v.useState(!0),[s,i]=v.useState(!1),[o,u]=v.useState(""),[c,g]=v.useState(!1),[m,p]=v.useState(null),[j,S]=v.useState(null),[k,N]=v.useState(""),[h,d]=v.useState(""),f=v.useCallback(async()=>{a(!0);try{n(await O.dominios())}catch(w){e(w.message||"Falha ao carregar domínios.")}finally{a(!1)}},[e]);v.useEffect(()=>{f()},[f]);const y=async w=>{w.preventDefault(),g(!0);try{const R=await O.createDominio({nome:o});e(`Domínio "${R.nome}" adicionado!`),u(""),i(!1),await f()}catch(R){e(R.message||"Falha ao adicionar domínio.")}finally{g(!1)}},C=async(w,R="ns")=>{p(`${w.id}-${R}`);try{const U=await O.verificarDominio(w.id),G=U.verificacao||{};U.status==="online"?e(`✅ ${w.nome}: online na Cloudflare!`):e(R==="ns"?`⏳ ${w.nome}: NS ainda não apontado (${(G.ns||[]).join(", ")||"sem resposta DNS"}).`:`📋 ${w.nome}: registros A = ${(G.a||[]).join(", ")||"nenhum"}.`),await f()}catch(U){e(U.message||"Falha na verificação.")}finally{p(null)}},A=w=>{N(w.tags||""),S(w)},E=async()=>{try{await O.updateDominioTags(j.id,k),e("Tags/Pixels/Scripts salvos neste domínio."),S(null),await f()}catch(w){e(w.message||"Falha ao salvar.")}},P=async w=>{if(window.confirm(`Remover o domínio "${w.nome}"?`))try{await O.deleteDominio(w.id),e("Domínio removido."),await f()}catch(R){e(R.message||"Falha ao remover.")}},x=async w=>{try{await navigator.clipboard.writeText(w),d(w),e("Copiado: "+w)}catch{e("Não foi possível copiar — selecione manualmente.")}};return l.jsxs("section",{children:[l.jsx("h1",{children:"🌐 AdsHosting — Domínios"}),l.jsx("p",{className:"subtitle",children:"Gerencie seus domínios e publique presells com SSL, DNS e antibot. Configure a Cloudflare em Chaves de API para verificação automática."}),l.jsx("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"20px"},children:l.jsxs("div",{children:[l.jsxs("h3",{style:{fontSize:"16px"},children:["🌐 Domínios ",l.jsx("span",{style:{fontSize:"14px",color:"var(--text-muted)",fontWeight:"normal"},children:t.length})]}),l.jsx("p",{style:{fontSize:"13px",color:"var(--primary)",cursor:"pointer",marginTop:"5px"},onClick:()=>window.open("https://dash.cloudflare.com","_blank"),children:"Aponte os name servers no seu registrador ↗"})]})}),l.jsx("button",{className:"btn-primary",style:{width:"100%",padding:"12px",marginBottom:"20px"},onClick:()=>i(!0),children:"+ Adicionar Domínio"}),r?l.jsx("p",{className:"placeholder-note",children:"Carregando…"}):t.length===0?l.jsx("div",{className:"form-card",style:{textAlign:"center"},children:l.jsx("p",{style:{color:"var(--text-muted)"},children:"Nenhum domínio cadastrado. Adicione o primeiro para começar a hospedar presells."})}):l.jsx("div",{className:"domain-grid",children:t.map(w=>{var _e;const R=To(w.ns_data,{}),U=To(w.a_data,{}),G=w.status==="online",ge=(R.cf_name_servers&&R.cf_name_servers.length?R.cf_name_servers:R.ns||[]).slice(0,2);return l.jsxs("div",{className:"domain-card",children:[l.jsxs("div",{children:[l.jsx("div",{className:"domain-title",children:w.nome}),G?l.jsx("div",{className:"status-tag online",children:"✅ Domínio online e disponível na criação de presell."}):l.jsx("div",{className:"status-tag pending",children:"⏳ O domínio ainda não está apto para receber anúncios"}),G?l.jsxs("ul",{className:"domain-list",children:[l.jsxs("li",{children:["🔒 SSL: ",(_e=R.ns)!=null&&_e.length?"Ativo":"—"]}),l.jsxs("li",{children:["🌐 DNS: ",G?"Configurado":"—"]}),l.jsx("li",{children:"🛡️ Antibot: via pixel do ProdMaker"})]}):l.jsxs(l.Fragment,{children:[l.jsx("p",{style:{fontSize:"13px",fontWeight:"bold",color:"var(--primary)",textAlign:"center",margin:"15px 0"},children:"Name Servers detectados"}),ge.length===0?l.jsx("p",{style:{fontSize:"12px",color:"var(--text-muted)",textAlign:"center",marginBottom:"15px"},children:"Nenhum NS detectado ainda — clique em “Verificar NS” após apontar no registrador."}):ge.map(T=>l.jsxs("div",{className:"input-group",onClick:()=>x(T),style:{cursor:"pointer"},title:"Clique para copiar",children:[l.jsx("input",{type:"text",value:T,readOnly:!0}),l.jsx("button",{type:"button",children:"📋"})]},T)),l.jsx("p",{style:{fontSize:"12px",color:"var(--text-muted)",lineHeight:1.5,marginTop:"15px"},children:"No registrador, aponte os name servers da Cloudflare e aguarde (30 min a 48 h). Depois clique em Verificar."})]}),G&&U.a&&U.a.length>0&&l.jsxs("p",{style:{fontSize:"12px",color:"var(--text-muted)",marginTop:"10px"},children:["Registros A: ",U.a.join(", ")]})]}),l.jsxs("div",{className:"domain-card-bottom",children:[l.jsxs("div",{className:"domain-actions",children:[l.jsx("button",{className:"btn-outline",onClick:()=>C(w,"a"),disabled:m===`${w.id}-a`,children:m===`${w.id}-a`?"…":"Verificar A"}),l.jsx("button",{className:"btn-outline",onClick:()=>C(w,"ns"),disabled:m===`${w.id}-ns`,children:m===`${w.id}-ns`?"…":"Verificar NS"}),l.jsx("button",{className:"btn-outline",style:{flex:"0.25"},onClick:()=>P(w),children:"🗑️"})]}),l.jsxs("button",{className:"btn-outline",style:{width:"100%",display:"flex",justifyContent:"space-between"},onClick:()=>A(w),children:["+ Tags, Pixels and Scripts (Opcional) ",l.jsx("span",{children:"📋"})]})]})]},w.id)})}),l.jsx(me,{open:s,title:"Adicionar Domínio",onClose:()=>i(!1),children:l.jsxs("form",{onSubmit:y,children:[l.jsxs("div",{className:"form-group",children:[l.jsx("label",{children:"Domínio (sem https://)"}),l.jsx("input",{required:!0,value:o,onChange:w=>u(w.target.value),placeholder:"ex.: minhapresell.com"})]}),l.jsx("p",{className:"placeholder-note",style:{marginBottom:"12px"},children:"O domínio precisa estar cadastrado na sua conta Cloudflare (o ProdMaker verifica NS e status via API/DNS)."}),l.jsx("button",{className:"btn-primary",type:"submit",disabled:c,style:{width:"100%"},children:c?"Adicionando…":"Adicionar"})]})}),l.jsxs(me,{open:!!j,title:`Tags, Pixels e Scripts — ${(j==null?void 0:j.nome)||""}`,onClose:()=>S(null),children:[l.jsxs("div",{className:"form-group",children:[l.jsx("label",{children:"Scripts adicionais (inseridos nas páginas publicadas neste domínio — futuro deploy)"}),l.jsx("textarea",{rows:8,value:k,onChange:w=>N(w.target.value),placeholder:"<!-- ex.: Google Tag Manager, Meta Pixel --><![CDATA[ ... ]]>",style:{fontFamily:"monospace",fontSize:"12px"}})]}),l.jsx("button",{className:"btn-primary",onClick:E,style:{width:"100%"},children:"Salvar"})]})]})}const Mr=["var(--primary)","#3b82f6","#db2777","#f59e0b","#10b981","#64748b"];function ma({data:e}){const t=e.reduce((a,s)=>a+s[1],0)||1;let n=0;const r=e.map((a,s)=>{const i=n/t*100;n+=a[1];const o=n/t*100;return`${Mr[s%Mr.length]} ${i}% ${o}%`});return l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"donut-chart",style:{background:`conic-gradient(${r.join(", ")})`},children:l.jsx("div",{className:"donut-inner"})}),l.jsx("div",{className:"chart-legend",children:e.map((a,s)=>l.jsxs("div",{className:"legend-item",children:[l.jsx("span",{className:"legend-color",style:{background:Mr[s%Mr.length]}})," ",a[0]," (",a[1],")"]},a[0]))})]})}function am({fluxo:e}){if(!e||e.length===0)return l.jsx("div",{className:"traffic-flow-visual",style:{display:"flex",alignItems:"center",justifyContent:"center",color:"var(--text-muted)",fontSize:"12px"},children:"Aguardando visitas rastreadas…"});const t=Math.max(...e.map(s=>s.visitas),1),n=e.map((s,i)=>{const o=e.length===1?500:i/(e.length-1)*1e3,u=200-s.visitas/t*180;return`${o},${u}`});n.length===1&&n.push(`1000,${n[0].split(",")[1]}`);const r=`M${n.join(" L")}`,a=`${r} L1000,200 L0,200 Z`;return l.jsx("div",{className:"traffic-flow-visual",children:l.jsxs("svg",{viewBox:"0 0 1000 200",preserveAspectRatio:"none",children:[l.jsx("path",{d:a,fill:"var(--primary-light)",opacity:"0.5"}),l.jsx("path",{d:r,fill:"none",stroke:"var(--primary)",strokeWidth:"3"})]})})}const sm=[{key:"visitas",label:"1. Visitas",emoji:"👥"},{key:"cliques",label:"2. Cliques de Oferta",emoji:"🖱️",color:"#3b82f6",badgeColor:"#e0f2fe",badgeText:"#0284c7"},{key:"checkouts",label:"3. Checkouts",emoji:"🛒",color:"#db2777",badgeColor:"#fce7f3",badgeText:"#db2777"},{key:"vendas",label:"4. Conversões (Vendas)",emoji:"💸",color:"var(--success)",badgeColor:"#dcfce7",badgeText:"#16a34a"}];function im(){var P,x,w,R,U,G,ge,_e;const{toast:e}=we(),t=De(),[n,r]=v.useState(null),[a,s]=v.useState(!0),[i,o]=v.useState(null),[u,c]=v.useState(null),[g,m]=v.useState("json"),p=v.useCallback(async()=>{s(!0);try{r(await O.trackingDashboard())}catch(T){e(T.message||"Falha ao carregar o tracking.")}finally{s(!1)}},[e]);v.useEffect(()=>{p()},[p]);const j=async T=>{o(T),m("json"),c(null);try{c(await O.visitante(T))}catch(b){e(b.message||"Falha ao carregar o visitante.")}},S=async()=>{const T=((n==null?void 0:n.drenagem)||[]).map(b=>b.ip).join(`
68
- `);try{await navigator.clipboard.writeText(T),e(`Lista de ${n.drenagem.length} IPs copiada!`)}catch{e("Não foi possível copiar.")}},k=async()=>{try{await navigator.clipboard.writeText(JSON.stringify((u==null?void 0:u.payload)||{},null,2)),e("JSON copiado!")}catch{e("Não foi possível copiar.")}};if(a&&!n)return l.jsx("div",{className:"loading-screen",children:"Carregando AdsPixel…"});if(!n)return null;const{resumo:N,drenagem:h,visitantes:d,origem:f,dispositivos:y,sistemas:C,funil:A,fluxo:E}=n;return l.jsxs("section",{children:[l.jsxs("div",{className:"pixel-header",children:[l.jsx("div",{className:"pixel-icon",children:"🎯"}),l.jsxs("div",{children:[l.jsx("h1",{children:"AdsPixel"}),l.jsx("p",{className:"subtitle",style:{margin:0},children:"Captura dados de cada visitante das suas páginas de presell — sem scripts de terceiros."})]})]}),N.visitas===0&&l.jsxs("div",{className:"form-card",style:{border:"1px solid var(--warning-border)",background:"var(--warning-bg)"},children:[l.jsx("h3",{style:{fontSize:"15px",marginBottom:"8px"},children:"Nenhuma visita rastreada ainda"}),l.jsxs("p",{style:{fontSize:"13px",color:"var(--text-muted)"},children:["Para começar a rastrear: 1) configure a URL pública do ",l.jsx("code",{children:"/track"})," no card"," ",l.jsx("strong",{children:"Pixel de Rastreamento"})," em"," ",l.jsx("a",{href:"/api-keys",onClick:T=>{T.preventDefault(),t("/api-keys")},children:"Chaves de API"})," ","(use um túnel como cloudflared apontando para http://localhost:8188/track); 2) gere e publique páginas no AdsPages — o pixel é embutido automaticamente."]})]}),l.jsxs("div",{className:"pixel-top-bar",children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px",flexWrap:"wrap"},children:[l.jsx("strong",{children:"Visitas em todas as páginas de Presell"}),l.jsxs("span",{className:"pixel-tag",children:[N.dias," dias"]}),l.jsxs("span",{className:"pixel-tag",style:{background:"transparent",border:"1px solid var(--border)"},children:[N.visitas," visitas · ",N.visitantes_unicos," visitantes únicos"]})]}),l.jsx("button",{className:"btn-outline",style:{fontSize:"12px",padding:"5px 10px"},onClick:p,children:"🔄 Atualizar dados"})]}),h.length>0&&l.jsxs("div",{className:"warning-box",children:[l.jsx("div",{className:"icon",children:"!"}),l.jsxs("div",{children:[l.jsxs("h4",{children:["POSSÍVEL DRENAGEM DE ORÇAMENTO • ",h.length," Visitantes com Cliques Repetidos"]}),l.jsx("p",{children:"Detector de Cliques Repetidos: visitantes que clicaram em anúncios/CTAs mais de uma vez sem converter podem estar consumindo seu orçamento sem gerar retorno."})]}),l.jsxs("button",{className:"btn-dark",onClick:S,children:["📋 Copiar Todos (",h.length," IPs)"]})]}),d.length>0&&l.jsx("div",{className:"visitor-grid",children:d.map(T=>{var b;return l.jsxs("div",{className:"visitor-card",onClick:()=>j(T.ip),title:"Ver detalhes",children:[l.jsxs("div",{className:"visitor-card-header",children:[l.jsxs("div",{className:"visitor-ip",children:[l.jsx("span",{children:"🛡️"})," ",T.ip]}),l.jsxs("span",{className:"visitor-badge",children:[T.cliques," cliques"]})]}),l.jsxs("div",{style:{fontSize:"12px",color:"var(--text-muted)"},children:["ID ",T.visitor_id," · ",T.os," • ",T.browser]}),l.jsxs("div",{className:"visitor-card-details",children:[l.jsxs("span",{children:["Último: ",(b=T.ultimo)==null?void 0:b.slice(0,16)]}),l.jsx("span",{className:"visitor-card-link",children:"Ver detalhes >"})]})]},T.ip)})}),l.jsxs("div",{className:"metrics-grid",children:[l.jsxs("div",{className:"metric-card",children:[l.jsx("h3",{children:"Visitas Humanas"}),l.jsx("div",{className:"value",children:N.visitas})]}),l.jsxs("div",{className:"metric-card",children:[l.jsx("h3",{children:"Cliques / CTR"}),l.jsxs("div",{className:"value",children:[N.ctr,"%"]})]}),l.jsxs("div",{className:"metric-card",children:[l.jsx("h3",{children:"Checkouts"}),l.jsx("div",{className:"value",children:N.checkouts})]}),l.jsxs("div",{className:"metric-card",children:[l.jsx("h3",{children:"Vendas"}),l.jsx("div",{className:"value",children:N.vendas})]})]}),l.jsxs("div",{className:"charts-grid",children:[l.jsxs("div",{className:"chart-card",children:[l.jsx("h3",{children:"Origem do Tráfego"}),l.jsx("p",{children:"De onde vêm os cliques rastreados"}),l.jsx(ma,{data:f})]}),l.jsxs("div",{className:"chart-card",children:[l.jsx("h3",{children:"Dispositivos"}),l.jsx("p",{children:"Smartphone, computador ou tablet"}),l.jsx(ma,{data:y})]}),l.jsxs("div",{className:"chart-card",children:[l.jsx("h3",{children:"Sistemas Operacionais"}),l.jsx("p",{children:"Sistema operacional dos visitantes"}),l.jsx(ma,{data:C})]})]}),l.jsxs("div",{className:"bottom-grid",children:[l.jsxs("div",{className:"traffic-flow-card",children:[l.jsx("h3",{children:"📈 Fluxo de Tráfego e Conversão ao Vivo"}),l.jsx("p",{style:{fontSize:"12px",color:"var(--text-muted)"},children:"Visitas rastreadas por hora do dia"}),l.jsx(am,{fluxo:E})]}),l.jsxs("div",{className:"funnel-card",children:[l.jsx("h3",{children:"⚡ Funil de Conversão do AdsPixel"}),l.jsx("p",{style:{fontSize:"12px",color:"var(--text-muted)",marginBottom:"15px"},children:"Passagem de tráfego até a venda final"}),sm.map((T,b)=>{var L;const I=A[T.key]||0,M=b===0?100:((L=A.taxas)==null?void 0:L[T.key])??0;return l.jsxs("div",{className:"funnel-step",children:[l.jsxs("div",{className:"funnel-step-header",children:[l.jsxs("span",{children:[T.emoji," ",T.label]}),l.jsxs("span",{children:[I," ",l.jsxs("span",{style:{background:T.badgeColor||"var(--primary-light)",padding:"2px 6px",borderRadius:"4px",color:T.badgeText||"var(--primary)"},children:[M,"%"]})]})]}),l.jsx("div",{className:"funnel-step-bar",children:l.jsx("div",{style:{width:`${Math.max(M,I>0?2:0)}%`,background:T.color||"var(--primary)"}})})]},T.key)}),l.jsx("p",{className:"placeholder-note",style:{marginTop:"12px"},children:"Checkouts e vendas ativam com os webhooks de venda (próxima parte)."})]})]}),l.jsx(me,{open:!!i,title:`Visitante — ${i||""}`,onClose:()=>o(null),children:u?l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"visitor-modal-header",children:l.jsx("span",{className:"badge-human",children:"Humano"})}),l.jsxs("div",{className:"visitor-details-grid",children:[l.jsxs("div",{className:"detail-box",children:[l.jsx("div",{className:"label",children:"📡 IP & ID"}),l.jsx("div",{className:"main-val",children:u.ip}),l.jsxs("div",{className:"sub-val",children:["ID ",u.visitor_id]})]}),l.jsxs("div",{className:"detail-box",children:[l.jsx("div",{className:"label",children:"🕒 ÚLTIMO ACESSO"}),l.jsx("div",{className:"main-val",children:((P=u.ultimo)==null?void 0:P.split(" ")[1])||"—"}),l.jsx("div",{className:"sub-val",children:((x=u.ultimo)==null?void 0:x.split(" ")[0])||"—"})]}),l.jsxs("div",{className:"detail-box",children:[l.jsx("div",{className:"label",children:"💻 DISPOSITIVO"}),l.jsxs("div",{className:"main-val",children:[(w=u.payload)==null?void 0:w.device," • ",(R=u.payload)==null?void 0:R.os]}),l.jsx("div",{className:"sub-val",children:(U=u.payload)==null?void 0:U.browser})]}),l.jsxs("div",{className:"detail-box",children:[l.jsx("div",{className:"label",children:"📢 ORIGEM"}),l.jsx("span",{className:"badge-origin",children:((G=u.payload)==null?void 0:G.utm_source)||((ge=u.payload)==null?void 0:ge.ref)||"Acesso direto"})]})]}),l.jsxs("div",{className:"modal-tabs",children:[l.jsx("div",{className:`modal-tab ${g==="ids"?"active":""}`,onClick:()=>m("ids"),children:"IDs de Rastreamento"}),l.jsx("div",{className:`modal-tab ${g==="json"?"active":""}`,onClick:()=>m("json"),children:"Payload JSON"})]}),g==="ids"?l.jsxs("div",{children:[l.jsxs("div",{className:"tracking-id-box",children:[l.jsx("div",{className:"label",children:"# VISITOR_ID"}),l.jsx("div",{className:"val",children:u.visitor_id})]}),((_e=u.payload)==null?void 0:_e.gclid)&&l.jsxs("div",{className:"tracking-id-box",children:[l.jsx("div",{className:"label",children:"# GCLID"}),l.jsx("div",{className:"val",children:u.payload.gclid})]})]}):l.jsxs("div",{className:"json-box",children:[l.jsx("button",{className:"json-copy-btn",onClick:k,children:"📋 Copiar"}),l.jsx("pre",{style:{whiteSpace:"pre-wrap",margin:0},children:JSON.stringify(u.payload,null,2)})]}),l.jsxs("h4",{style:{fontSize:"13px",margin:"18px 0 8px"},children:["Últimos eventos (",u.eventos.length,")"]}),l.jsxs("table",{style:{marginTop:0},children:[l.jsx("thead",{children:l.jsxs("tr",{children:[l.jsx("th",{children:"Quando"}),l.jsx("th",{children:"Evento"}),l.jsx("th",{children:"Página"})]})}),l.jsx("tbody",{children:u.eventos.slice(0,10).map((T,b)=>l.jsxs("tr",{children:[l.jsx("td",{children:T.created_at}),l.jsx("td",{children:T.event}),l.jsx("td",{children:T.page||"—"})]},b))})]})]}):l.jsx("p",{className:"placeholder-note",children:"Carregando…"})})]})}const om=[{id:"hotmart",label:"Hotmart"},{id:"clickbank",label:"ClickBank"},{id:"digistore24",label:"Digistore24"},{id:"kiify",label:"Kiify"},{id:"cakto",label:"Cakto"}],Lo={pendente:{text:"⏳ Pendente",color:"var(--text-muted)"},enviada:{text:"✅ Enviada",color:"var(--success)"},erro:{text:"❌ Erro",color:"var(--danger)"}},Ao={produto_nome:"",valor:"",comissao:"",gclid:"",comprador_email:"",transacao_id:""};function um(e){if(!e)return"—";const[t,n=""]=e.split(" "),[r,a,s]=t.split("-");return r?`${s}/${a} ${n.slice(0,5)}`:e}function br(e){return(Number(e)||0).toLocaleString("pt-BR",{style:"currency",currency:"BRL"})}function cm(){var M;const{toast:e}=we(),[t,n]=v.useState([]),[r,a]=v.useState(null),[s,i]=v.useState(!0),[o,u]=v.useState(!1),[c,g]=v.useState(Ao),[m,p]=v.useState(!1),[j,S]=v.useState(!1),[k,N]=v.useState(""),[h,d]=v.useState(!1),[f,y]=v.useState(!1),[C,A]=v.useState(null),[E,P]=v.useState(!1),x=v.useCallback(async()=>{i(!0);try{const[L,F]=await Promise.all([O.vendas(),O.vendasResumo()]);n(L),a(F)}catch(L){e(L.message||"Falha ao carregar vendas.")}finally{i(!1)}},[e]);v.useEffect(()=>{x()},[x]);const w=L=>F=>g({...c,[L]:F.target.value}),R=async L=>{L.preventDefault(),p(!0);try{await O.createVenda({produto_nome:c.produto_nome,valor:Number(c.valor)||0,comissao:Number(c.comissao)||0,gclid:c.gclid,comprador_email:c.comprador_email,transacao_id:c.transacao_id}),e("Venda registrada!"),u(!1),g(Ao),await x()}catch(F){e(F.message||"Falha ao salvar a venda.")}finally{p(!1)}},U=async L=>{if(window.confirm(`Excluir a venda "${L.produto_nome||L.id}"?`))try{await O.deleteVenda(L.id),e("Venda excluída."),await x()}catch(F){e(F.message||"Falha ao excluir.")}},G=async()=>{var L;d(!0);try{const F=await O.importVendasCsv(k);e(`Importadas: ${F.importadas}${(L=F.erros)!=null&&L.length?` · erros: ${F.erros.length}`:""}`),S(!1),N(""),await x()}catch(F){e(F.message||"Falha ao importar CSV.")}finally{d(!1)}},ge=L=>{var W;const F=(W=L.target.files)==null?void 0:W[0];if(!F)return;const _=new FileReader;_.onload=()=>N(String(_.result||"")),_.readAsText(F)},_e=async L=>{A(L.id);try{await O.uploadConversao(L.id),e(`Conversão #${L.id} enviada ao Google Ads!`),await x()}catch(F){e(F.message||"Falha ao enviar conversão."),await x()}finally{A(null)}},T=async()=>{var L,F;P(!0);try{const _=await O.uploadConversoesLote();e(`Enviadas: ${_.enviadas.length}${(L=_.erros)!=null&&L.length?` · erros: ${_.erros.length}`:""}`),(F=_.erros)!=null&&F[0]&&e(_.erros[0]),await x()}catch(_){e(_.message||"Falha no upload em lote.")}finally{P(!1)}},b=async L=>{try{await navigator.clipboard.writeText(L),e("URL copiada!")}catch{e("Não foi possível copiar.")}},I=v.useMemo(()=>t.filter(L=>L.status==="aprovada"&&L.gclid&&L.conversao_status!=="enviada"),[t]);return l.jsxs("section",{children:[l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"10px"},children:[l.jsx("h1",{children:"💸 Minhas Vendas"}),l.jsxs("div",{style:{display:"flex",gap:"10px"},children:[l.jsx("button",{className:"btn-outline",onClick:()=>S(!0),children:"📥 Importar CSV"}),l.jsx("button",{className:"btn-outline",onClick:()=>y(!0),children:"🔗 Webhooks"}),l.jsx("button",{className:"btn-primary",onClick:()=>u(!0),children:"+ Adicionar venda"})]})]}),l.jsx("p",{className:"subtitle",children:"Vendas rastreadas via webhooks (Hotmart, ClickBank, Digistore24, Kiify, Cakto), entrada manual ou CSV."}),l.jsxs("div",{className:"metrics-grid",children:[l.jsxs("div",{className:"metric-card",children:[l.jsx("h3",{children:"Vendas aprovadas"}),l.jsx("div",{className:"value",children:(r==null?void 0:r.vendas)??"—"})]}),l.jsxs("div",{className:"metric-card",children:[l.jsx("h3",{children:"Receita"}),l.jsx("div",{className:"value green",children:r?br(r.receita):"—"})]}),l.jsxs("div",{className:"metric-card",children:[l.jsx("h3",{children:"Comissão"}),l.jsx("div",{className:"value purple",children:r?br(r.comissao):"—"})]}),l.jsxs("div",{className:"metric-card",children:[l.jsx("h3",{children:"Conversões pendentes"}),l.jsx("div",{className:"value",children:((M=r==null?void 0:r.conversoes)==null?void 0:M.pendentes)??"—"})]})]}),I.length>0&&l.jsxs("div",{className:"warning-box",children:[l.jsx("div",{className:"icon",children:"!"}),l.jsxs("div",{children:[l.jsxs("h4",{children:["📤 ",I.length," conversão(ões) GCLID pronta(s) para envio ao Google Ads"]}),l.jsx("p",{children:"Vendas aprovadas com GCLID rastreado. Envie em lote ou individualmente."})]}),l.jsx("button",{className:"btn-dark",onClick:T,disabled:E,children:E?"Enviando…":`📤 Enviar todas (${I.length})`})]}),l.jsxs("table",{children:[l.jsx("thead",{children:l.jsxs("tr",{children:[l.jsx("th",{children:"Data"}),l.jsx("th",{children:"Produto"}),l.jsx("th",{children:"Fonte"}),l.jsx("th",{children:"Valor"}),l.jsx("th",{children:"Comissão"}),l.jsx("th",{children:"GCLID"}),l.jsx("th",{children:"Conversão"}),l.jsx("th",{children:"Ações"})]})}),l.jsx("tbody",{children:s?l.jsx("tr",{className:"empty-row",children:l.jsx("td",{colSpan:8,children:"Carregando…"})}):t.length===0?l.jsx("tr",{className:"empty-row",children:l.jsx("td",{colSpan:8,children:"Nenhuma venda registrada. Use webhooks, adição manual ou importe um CSV."})}):t.map(L=>{var F,_;return l.jsxs("tr",{children:[l.jsx("td",{children:um(L.created_at)}),l.jsxs("td",{children:[L.produto_nome||`#${L.id}`,L.transacao_id&&l.jsx("div",{style:{fontSize:"11px",color:"var(--text-muted)"},children:L.transacao_id})]}),l.jsx("td",{children:L.fonte}),l.jsx("td",{children:br(L.valor)}),l.jsx("td",{children:br(L.comissao)}),l.jsx("td",{style:{fontFamily:"monospace",fontSize:"11px"},children:L.gclid?l.jsxs("span",{title:L.gclid_match?"Rastreado até a visita de origem":"Sem visita correspondente",children:[L.gclid.slice(0,12),"… ",L.gclid_match?"🎯":""]}):"—"}),l.jsxs("td",{children:[l.jsx("span",{style:{color:((F=Lo[L.conversao_status])==null?void 0:F.color)||"var(--text-muted)",fontWeight:600,fontSize:"12px"},children:((_=Lo[L.conversao_status])==null?void 0:_.text)||L.conversao_status}),L.conversao_erro&&l.jsx("div",{style:{fontSize:"10px",color:"var(--danger)",maxWidth:"180px",wordBreak:"break-word"},children:L.conversao_erro.slice(0,80)})]}),l.jsxs("td",{className:"action-icons",children:[L.gclid&&L.conversao_status!=="enviada"&&l.jsx("span",{title:"Enviar conversão ao Google Ads",onClick:()=>_e(L),children:C===L.id?"⏳":"📤"}),l.jsx("span",{title:"Excluir",onClick:()=>U(L),children:"🗑️"})]})]},L.id)})})]}),l.jsx(me,{open:o,title:"Adicionar Venda (manual)",onClose:()=>u(!1),children:l.jsxs("form",{onSubmit:R,children:[l.jsxs("div",{className:"form-group",children:[l.jsx("label",{children:"Produto"}),l.jsx("input",{required:!0,value:c.produto_nome,onChange:w("produto_nome"),placeholder:"Ex.: Prodentim"})]}),l.jsxs("div",{className:"form-row",children:[l.jsxs("div",{className:"form-group",children:[l.jsx("label",{children:"Valor (R$)"}),l.jsx("input",{type:"number",step:"0.01",min:"0",required:!0,value:c.valor,onChange:w("valor")})]}),l.jsxs("div",{className:"form-group",children:[l.jsx("label",{children:"Comissão (R$) — vazio = 50%"}),l.jsx("input",{type:"number",step:"0.01",min:"0",value:c.comissao,onChange:w("comissao")})]})]}),l.jsxs("div",{className:"form-group",children:[l.jsx("label",{children:"GCLID (se conhecido — vindo do Google Ads)"}),l.jsx("input",{value:c.gclid,onChange:w("gclid"),placeholder:"EAIaIQobChMI..."})]}),l.jsxs("div",{className:"form-row",children:[l.jsxs("div",{className:"form-group",children:[l.jsx("label",{children:"E-mail do comprador"}),l.jsx("input",{value:c.comprador_email,onChange:w("comprador_email")})]}),l.jsxs("div",{className:"form-group",children:[l.jsx("label",{children:"Transação"}),l.jsx("input",{value:c.transacao_id,onChange:w("transacao_id")})]})]}),l.jsx("button",{className:"btn-primary",type:"submit",disabled:m,style:{width:"100%",marginTop:"10px"},children:m?"Salvando…":"Salvar venda"})]})}),l.jsxs(me,{open:j,title:"Importar Vendas (CSV)",onClose:()=>S(!1),children:[l.jsx("p",{style:{fontSize:"13px",color:"var(--text-muted)",marginBottom:"12px"},children:"Colunas aceitas (ordem livre): produto, valor, comissao, gclid, email, transacao, utm_source, utm_medium, utm_campaign."}),l.jsxs("div",{className:"form-group",children:[l.jsx("label",{children:"Arquivo CSV"}),l.jsx("input",{type:"file",accept:".csv,text/csv",onChange:ge,style:{padding:"10px"}})]}),l.jsxs("div",{className:"form-group",children:[l.jsx("label",{children:"…ou cole o conteúdo"}),l.jsx("textarea",{rows:8,value:k,onChange:L=>N(L.target.value),placeholder:`produto,valor,comissao,gclid
69
- Prodentim,99,49.5,EAIaIQ...`,style:{fontFamily:"monospace",fontSize:"12px"}})]}),l.jsx("button",{className:"btn-primary",onClick:G,disabled:h||!k.trim(),style:{width:"100%"},children:h?"Importando…":"Importar"})]}),l.jsxs(me,{open:f,title:"🔗 Webhooks de Venda",onClose:()=>y(!1),children:[l.jsxs("p",{style:{fontSize:"13px",color:"var(--text-muted)",marginBottom:"16px"},children:["Configure estas URLs no painel de postback de cada plataforma. Use um túnel (cloudflared/ngrok) apontando para a porta do ProdMaker para que a plataforma alcance o ",l.jsx("code",{children:"/api/webhook/sale/..."}),"."]}),om.map(L=>{const F=`${window.location.origin}/api/webhook/sale/${L.id}`;return l.jsxs("div",{className:"form-group",children:[l.jsx("label",{children:L.label}),l.jsxs("div",{className:"input-group",style:{cursor:"pointer"},onClick:()=>b(F),title:"Clique para copiar",children:[l.jsx("input",{readOnly:!0,value:F}),l.jsx("button",{type:"button",children:"📋"})]})]},L.id)})]})]})}function dm(e){return(Number(e)||0).toLocaleString("pt-BR",{style:"currency",currency:"BRL"})}function pm(){var h,d,f;const{toast:e}=we(),[t,n]=v.useState([]),[r,a]=v.useState(null),[s,i]=v.useState(!0),[o,u]=v.useState(null),[c,g]=v.useState(!1),m=v.useCallback(async()=>{i(!0);try{const[y,C]=await Promise.all([O.vendas(),O.vendasResumo()]);n(y),a(C)}catch(y){e(y.message||"Falha ao carregar conversões.")}finally{i(!1)}},[e]);v.useEffect(()=>{m()},[m]);const p=t.filter(y=>y.gclid),j=p.filter(y=>y.conversao_status!=="enviada"&&y.status==="aprovada"),S=async y=>{u(y.id);try{await O.uploadConversao(y.id),e(`Conversão #${y.id} enviada!`),await m()}catch(C){e(C.message||"Falha ao enviar."),await m()}finally{u(null)}},k=async()=>{var y,C;g(!0);try{const A=await O.uploadConversoesLote();e(`Enviadas: ${A.enviadas.length}${(y=A.erros)!=null&&y.length?` · erros: ${A.erros.length}`:""}`),(C=A.erros)!=null&&C[0]&&e(A.erros[0]),await m()}catch(A){e(A.message||"Falha no upload em lote.")}finally{g(!1)}},N={pendente:"⏳ Pendente",enviada:"✅ Enviada",erro:"❌ Erro"};return l.jsxs("section",{children:[l.jsx("h1",{children:"📤 Conversões Offline (GCLID)"}),l.jsx("p",{className:"subtitle",children:"Envie as vendas do Google Ads de volta como conversões offline usando o GCLID rastreado pelo AdsPixel."}),l.jsxs("div",{className:"form-card",children:[l.jsx("h3",{style:{fontSize:"15px",marginBottom:"10px"},children:"Status da fila"}),l.jsxs("div",{className:"metrics-grid",style:{marginBottom:"10px"},children:[l.jsxs("div",{className:"metric-card",children:[l.jsx("h3",{children:"Com GCLID"}),l.jsx("div",{className:"value",children:p.length})]}),l.jsxs("div",{className:"metric-card",children:[l.jsx("h3",{children:"Pendentes"}),l.jsx("div",{className:"value",children:j.length})]}),l.jsxs("div",{className:"metric-card",children:[l.jsx("h3",{children:"Enviadas"}),l.jsx("div",{className:"value green",children:((h=r==null?void 0:r.conversoes)==null?void 0:h.enviadas)??0})]}),l.jsxs("div",{className:"metric-card",children:[l.jsx("h3",{children:"Erros"}),l.jsx("div",{className:"value",style:{color:(((d=r==null?void 0:r.conversoes)==null?void 0:d.erros)||0)>0?"var(--danger)":void 0},children:((f=r==null?void 0:r.conversoes)==null?void 0:f.erros)??0})]})]}),l.jsx("button",{className:"btn-primary",onClick:k,disabled:c||j.length===0,style:{width:"100%"},children:c?"Enviando…":`📤 Enviar todas as pendentes (${j.length})`})]}),l.jsxs("table",{children:[l.jsx("thead",{children:l.jsxs("tr",{children:[l.jsx("th",{children:"Venda"}),l.jsx("th",{children:"Data"}),l.jsx("th",{children:"Valor"}),l.jsx("th",{children:"GCLID"}),l.jsx("th",{children:"Status"}),l.jsx("th",{children:"Ações"})]})}),l.jsx("tbody",{children:s?l.jsx("tr",{className:"empty-row",children:l.jsx("td",{colSpan:6,children:"Carregando…"})}):p.length===0?l.jsx("tr",{className:"empty-row",children:l.jsx("td",{colSpan:6,children:"Nenhuma venda com GCLID ainda. Vendas vindas de cliques do Google Ads (com gclid capturado pelo AdsPixel ou informado no webhook) aparecem aqui automaticamente."})}):p.map(y=>l.jsxs("tr",{children:[l.jsx("td",{children:y.produto_nome||`#${y.id}`}),l.jsx("td",{children:y.created_at}),l.jsx("td",{children:dm(y.valor)}),l.jsxs("td",{style:{fontFamily:"monospace",fontSize:"11px"},children:[y.gclid.slice(0,14),"…"]}),l.jsxs("td",{style:{fontWeight:600,fontSize:"12px",color:y.conversao_status==="erro"?"var(--danger)":y.conversao_status==="enviada"?"var(--success)":"var(--text-muted)"},children:[N[y.conversao_status]||y.conversao_status,y.conversao_erro&&l.jsx("div",{style:{fontWeight:400,fontSize:"10px",maxWidth:"220px",wordBreak:"break-word"},children:y.conversao_erro.slice(0,100)})]}),l.jsx("td",{className:"action-icons",children:y.conversao_status!=="enviada"&&y.status==="aprovada"&&l.jsx("span",{title:"Enviar conversão",onClick:()=>S(y),children:o===y.id?"⏳":"📤"})})]},y.id))})]}),l.jsx("p",{className:"placeholder-note",style:{marginTop:"16px"},children:"🔧 Requer Google Ads configurado em Chaves de API (developer token, client_id, client_secret, refresh_token, customer_id e conversion_action). Erros da API são exibidos com attribution."})]})}function fm(){const{toast:e}=we(),t=De(),[n,r]=v.useState([]),[a,s]=v.useState(""),[i,o]=v.useState({positivas:[],negativas:[]}),[u,c]=v.useState(!0),[g,m]=v.useState(!1),[p,j]=v.useState({tipo:"positiva",texto:""}),S=v.useCallback(async()=>{c(!0);try{const[C,A]=await Promise.all([O.produtos(),O.adswords(a?Number(a):void 0)]);r(C),o(A)}catch(C){e(C.message||"Falha ao carregar.")}finally{c(!1)}},[e,a]);v.useEffect(()=>{S()},[S]);const k=async()=>{m(!0);try{await O.adswordsGerar(a?Number(a):null),e("Palavras-chave geradas com IA!"),await S()}catch(C){e(C.message||"Falha na geração.")}finally{m(!1)}},N=async C=>{if(C.preventDefault(),!!p.texto.trim())try{await O.adswordsAdicionar({produto_id:a?Number(a):null,tipo:p.tipo,texto:p.texto.trim()}),j({...p,texto:""}),e("Palavra adicionada!"),await S()}catch(A){e(A.message||"Falha ao adicionar.")}},h=async C=>{try{await O.adswordsRemover(C.id),await S()}catch(A){e(A.message||"Falha ao remover.")}},d=async(C,A)=>{const E=C.map(P=>P.texto).join(`
70
- `);try{await navigator.clipboard.writeText(E),e(`${A} copiada (${C.length})!`)}catch{e("Não foi possível copiar.")}},f=i.positivas||[],y=i.negativas||[];return l.jsxs("section",{children:[l.jsx("h1",{children:"✈️ AdsWords"}),l.jsx("p",{className:"subtitle",children:"Palavras-chave e negativas para Google Ads (correspondência de frase) — geradas por IA ou manuais."}),l.jsxs("div",{className:"form-card",children:[l.jsxs("div",{className:"form-row",children:[l.jsxs("div",{className:"form-group",children:[l.jsx("label",{children:"Produto"}),l.jsxs("select",{value:a,onChange:C=>s(C.target.value),children:[l.jsx("option",{value:"",children:"— sem produto vinculado —"}),n.map(C=>l.jsx("option",{value:C.id,children:C.nome},C.id))]})]}),l.jsx("div",{className:"form-group",style:{display:"flex",alignItems:"flex-end"},children:l.jsx("button",{className:"btn-primary",onClick:k,disabled:g,style:{width:"100%"},children:g?"✨ Gerando com IA…":"✨ Gerar palavras-chave com IA"})})]}),l.jsxs("form",{onSubmit:N,style:{display:"flex",gap:"10px",marginTop:"6px"},children:[l.jsxs("select",{value:p.tipo,onChange:C=>j({...p,tipo:C.target.value}),style:{maxWidth:"140px"},children:[l.jsx("option",{value:"positiva",children:"Positiva"}),l.jsx("option",{value:"negativa",children:"Negativa"})]}),l.jsx("input",{style:{flex:1},placeholder:"Adicionar palavra manualmente…",value:p.texto,onChange:C=>j({...p,texto:C.target.value})}),l.jsx("button",{className:"btn-outline",type:"submit",children:"+ Adicionar"})]})]}),l.jsxs("div",{className:"charts-grid",style:{gridTemplateColumns:"1fr 1fr"},children:[l.jsxs("div",{className:"chart-card",children:[l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsxs("h3",{children:["✅ Positivas (",f.length,")"]}),l.jsx("button",{className:"btn-outline",style:{fontSize:"11px",padding:"4px 10px"},onClick:()=>d(f,"Positivas"),disabled:f.length===0,children:"📋 Copiar"})]}),u?l.jsx("p",{className:"placeholder-note",children:"Carregando…"}):f.length===0?l.jsx("p",{className:"placeholder-note",children:"Nenhuma positiva ainda — gere com IA (precisa de LLM configurado em Chaves de API) ou adicione manualmente."}):l.jsxs("table",{style:{marginTop:"6px"},children:[l.jsx("thead",{children:l.jsxs("tr",{children:[l.jsx("th",{children:"Palavra"}),l.jsx("th",{children:"Corresp."}),l.jsx("th",{children:"Origem"}),l.jsx("th",{})]})}),l.jsx("tbody",{children:f.map(C=>l.jsxs("tr",{children:[l.jsx("td",{children:C.texto}),l.jsx("td",{children:C.correspondencia}),l.jsx("td",{children:C.origem==="ia"?"IA":"manual"}),l.jsx("td",{className:"action-icons",children:l.jsx("span",{title:"Remover",onClick:()=>h(C),children:"🗑️"})})]},C.id))})]})]}),l.jsxs("div",{className:"chart-card",children:[l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsxs("h3",{children:["🚫 Negativas (",y.length,")"]}),l.jsx("button",{className:"btn-outline",style:{fontSize:"11px",padding:"4px 10px"},onClick:()=>d(y,"Negativas"),disabled:y.length===0,children:"📋 Copiar"})]}),u?l.jsx("p",{className:"placeholder-note",children:"Carregando…"}):y.length===0?l.jsx("p",{className:"placeholder-note",children:"Nenhuma negativa ainda. As negativas padrão do seed entram automaticamente na geração por IA."}):l.jsxs("table",{style:{marginTop:"6px"},children:[l.jsx("thead",{children:l.jsxs("tr",{children:[l.jsx("th",{children:"Palavra"}),l.jsx("th",{children:"Origem"}),l.jsx("th",{})]})}),l.jsx("tbody",{children:y.map(C=>l.jsxs("tr",{children:[l.jsx("td",{children:C.texto}),l.jsx("td",{children:C.origem==="ia"?"IA":"manual"}),l.jsx("td",{className:"action-icons",children:l.jsx("span",{title:"Remover",onClick:()=>h(C),children:"🗑️"})})]},C.id))})]})]})]}),l.jsxs("p",{className:"placeholder-note",children:["Pronto? Use as palavras no ",l.jsx("a",{href:"/adscreator",onClick:C=>{C.preventDefault(),t("/adscreator")},children:"AdsCreator"})," ao montar a campanha."]})]})}const hm=[{id:"google",emoji:"🎯",label:"Google Ads",desc:"Search com CPA 60–80% da comissão + negativas"},{id:"meta",emoji:"👥",label:"Meta Ads",desc:"1 campanha → 1 conjunto → N criativos (Advantage+)"},{id:"tiktok",emoji:"🎵",label:"TikTok Ads",desc:"Vídeo 9:16 UGC, teste US$10–20/dia"}],zo={rascunho:{text:"📝 Rascunho",color:"var(--text-muted)"},publicada:{text:"✅ Publicada",color:"var(--success)"},erro:{text:"❌ Erro",color:"var(--danger)"}};function Io(e){return(Number(e)||0).toLocaleString("pt-BR",{style:"currency",currency:"BRL"})}function mm(){var L,F;const{toast:e}=we(),[t,n]=v.useState([]),[r,a]=v.useState([]),[s,i]=v.useState(!0),[o,u]=v.useState("google"),[c,g]=v.useState(""),[m,p]=v.useState(""),[j,S]=v.useState(""),[k,N]=v.useState(5),[h,d]=v.useState({positivas:[],negativas:[]}),[f,y]=v.useState([]),[C,A]=v.useState(!1),[E,P]=v.useState(!1),[x,w]=v.useState(null),[R,U]=v.useState(null),G=v.useCallback(async()=>{i(!0);try{const[_,W]=await Promise.all([O.produtos(),O.campanhas()]);n(_),a(W)}catch(_){e(_.message||"Falha ao carregar.")}finally{i(!1)}},[e]);v.useEffect(()=>{G()},[G]);const ge=v.useCallback(async _=>{try{const W=await O.adswords(_?Number(_):void 0);d(W)}catch{}},[]);v.useEffect(()=>{c?ge(c):d({positivas:[],negativas:[]})},[c,ge]);const _e=async()=>{A(!0);try{const _=await O.gerarCriativos({produto_id:c?Number(c):null,quantidade:3});y(_.criativos),e(`${_.criativos.length} criativo(s) gerado(s) por ${_.provider}!`)}catch(_){e(_.message||"Falha na geração de criativos.")}finally{A(!1)}},T=async _=>{_.preventDefault(),P(!0);try{const W={produto_id:c?Number(c):null,plataforma:o,nome:m,keywords:h.positivas.map(Ve=>({texto:Ve.texto,correspondencia:Ve.correspondencia})),negativas:h.negativas.map(Ve=>({texto:Ve.texto})),criativos:f};j&&(W.orcamento_diario=Number(j)),o==="meta"&&(W.quantidade_criativos=k);const Re=await O.createCampanha(W);e(`Campanha "${Re.nome}" salva como rascunho!`),p(""),S(""),y([]),await G()}catch(W){e(W.message||"Falha ao salvar a campanha.")}finally{P(!1)}},b=async _=>{try{const W=await O.getCampanha(_.id);w(W)}catch(W){e(W.message||"Falha ao abrir a campanha.")}},I=async _=>{U(_.id);try{await O.publicarCampanha(_.id),e(`Campanha "${_.nome}" publicada (PAUSADA para revisão)!`),await G()}catch(W){e(W.message||"Falha na publicação."),await G()}finally{U(null)}},M=async _=>{if(window.confirm(`Excluir a campanha "${_.nome}"?`))try{await O.deleteCampanha(_.id),await G()}catch(W){e(W.message||"Falha ao excluir.")}};return l.jsxs("section",{children:[l.jsx("h1",{children:"🎯 AdsCreator"}),l.jsx("p",{className:"subtitle",children:"Crie anúncios de alta conversão — Google, Meta e TikTok com os defaults validados."}),l.jsx("div",{className:"metrics-grid",style:{gridTemplateColumns:"repeat(3, 1fr)"},children:hm.map(_=>l.jsxs("div",{className:"metric-card",style:{cursor:"pointer",border:o===_.id?"2px solid var(--primary)":"1px solid var(--border)"},onClick:()=>u(_.id),children:[l.jsxs("h3",{children:[_.emoji," ",_.label,o===_.id?" ✓":""]}),l.jsx("div",{style:{fontSize:"12px",color:"var(--text-muted)"},children:_.desc})]},_.id))}),l.jsx("div",{className:"form-card",children:l.jsxs("form",{onSubmit:T,children:[l.jsxs("div",{className:"form-row",children:[l.jsxs("div",{className:"form-group",children:[l.jsx("label",{children:"Produto (preenche comissão/preço)"}),l.jsxs("select",{value:c,onChange:_=>g(_.target.value),children:[l.jsx("option",{value:"",children:"— sem produto —"}),t.map(_=>l.jsx("option",{value:_.id,children:_.nome},_.id))]})]}),l.jsxs("div",{className:"form-group",children:[l.jsx("label",{children:"Nome da campanha (opcional)"}),l.jsx("input",{value:m,onChange:_=>p(_.target.value),placeholder:"Ex.: ProdX — Search US"})]})]}),l.jsxs("div",{className:"form-row",children:[o==="meta"?l.jsxs("div",{className:"form-group",children:[l.jsx("label",{children:"Quantidade de criativos (mín. 5)"}),l.jsx("input",{type:"number",min:"5",max:"20",value:k,onChange:_=>N(Number(_.target.value))})]}):null,l.jsxs("div",{className:"form-group",children:[l.jsxs("label",{children:["Orçamento diário (",o==="tiktok"?"US$":"R$",")",o==="meta"?" — vazio = regra criativos × ½ ticket":o==="google"?" — vazio = R$110":" — vazio = US$15"]}),l.jsx("input",{type:"number",step:"0.01",min:"0",value:j,onChange:_=>S(_.target.value)})]}),l.jsx("div",{className:"form-group",style:{display:"flex",alignItems:"flex-end"},children:l.jsx("button",{className:"btn-outline",type:"button",onClick:_e,disabled:C,style:{width:"100%"},children:C?"✨ Gerando…":"✨ Gerar criativos com IA"})})]}),f.length>0&&l.jsx("div",{className:"placeholder-list",children:f.map((_,W)=>l.jsxs("li",{children:[l.jsxs("strong",{children:["[",W+1,"]"]})," ",_.gancho_3s||_.roteiro||"(sem gancho)"]},W))}),l.jsxs("p",{className:"placeholder-note",style:{marginBottom:"12px"},children:["Palavras do AdsWords serão usadas: ",((L=h.positivas)==null?void 0:L.length)||0," positiva(s) · ",((F=h.negativas)==null?void 0:F.length)||0," negativa(s)",c?"":" — selecione um produto para usar as palavras já geradas."]}),l.jsx("button",{className:"btn-primary",type:"submit",disabled:E,style:{width:"100%"},children:E?"Salvando…":"💾 Salvar campanha como rascunho"})]})}),l.jsxs("h3",{style:{fontSize:"16px",margin:"24px 0 8px"},children:["Campanhas (",r.length,")"]}),l.jsxs("table",{children:[l.jsx("thead",{children:l.jsxs("tr",{children:[l.jsx("th",{children:"Criada"}),l.jsx("th",{children:"Campanha"}),l.jsx("th",{children:"Plataforma"}),l.jsx("th",{children:"CPA alvo"}),l.jsx("th",{children:"Orçamento/dia"}),l.jsx("th",{children:"Status"}),l.jsx("th",{children:"Ações"})]})}),l.jsx("tbody",{children:s?l.jsx("tr",{className:"empty-row",children:l.jsx("td",{colSpan:7,children:"Carregando…"})}):r.length===0?l.jsx("tr",{className:"empty-row",children:l.jsx("td",{colSpan:7,children:"Nenhuma campanha ainda. Monte a primeira acima."})}):r.map(_=>{var W,Re,Ve;return l.jsxs("tr",{children:[l.jsx("td",{children:((W=_.created_at)==null?void 0:W.slice(0,10))||"—"}),l.jsx("td",{children:_.nome}),l.jsx("td",{children:_.plataforma}),l.jsx("td",{children:_.plataforma==="google"&&_.cpa_alvo?Io(_.cpa_alvo):"—"}),l.jsx("td",{children:Io(_.orcamento_diario)}),l.jsxs("td",{style:{color:(Re=zo[_.status])==null?void 0:Re.color,fontWeight:600,fontSize:"12px"},children:[((Ve=zo[_.status])==null?void 0:Ve.text)||_.status,_.erro&&l.jsx("div",{style:{fontSize:"10px",color:"var(--danger)",maxWidth:"180px",wordBreak:"break-word"},children:_.erro.slice(0,90)})]}),l.jsxs("td",{className:"action-icons",children:[l.jsx("span",{title:"Ver plano",onClick:()=>b(_),children:"👁️"}),l.jsx("span",{title:_.plataforma==="tiktok"?"Publicar marca como manual (TikTok)":"Publicar via API (PAUSADA)",onClick:()=>I(_),children:R===_.id?"⏳":"🚀"}),l.jsx("span",{title:"Excluir",onClick:()=>M(_),children:"🗑️"})]})]},_.id)})})]}),l.jsx(me,{open:!!x,title:`Campanha — ${(x==null?void 0:x.nome)||""}`,onClose:()=>w(null),children:x&&l.jsxs(l.Fragment,{children:[l.jsx("h4",{style:{fontSize:"14px",marginBottom:"8px"},children:"Plano (defaults validados)"}),l.jsx("div",{className:"json-box",style:{marginBottom:"16px"},children:l.jsx("pre",{style:{whiteSpace:"pre-wrap",margin:0,maxHeight:"220px",overflow:"auto"},children:JSON.stringify(x.plano,null,2)})}),l.jsx("h4",{style:{fontSize:"14px",marginBottom:"8px"},children:"Palavras-chave positivas"}),l.jsx("p",{style:{fontSize:"13px",color:"var(--text-muted)"},children:(x.keywords||[]).map(_=>_.texto).join(" · ")||"—"}),l.jsx("h4",{style:{fontSize:"14px",margin:"12px 0 8px"},children:"Negativas"}),l.jsx("p",{style:{fontSize:"13px",color:"var(--text-muted)"},children:(x.negativas||[]).map(_=>_.texto).join(" · ")||"—"}),x.resultado&&l.jsxs(l.Fragment,{children:[l.jsx("h4",{style:{fontSize:"14px",margin:"12px 0 8px"},children:"Resultado da publicação"}),l.jsx("div",{className:"json-box",children:l.jsx("pre",{style:{whiteSpace:"pre-wrap",margin:0,maxHeight:"200px",overflow:"auto"},children:JSON.stringify(x.resultado,null,2)})})]}),l.jsx("button",{className:"btn-primary",style:{width:"100%",marginTop:"16px"},disabled:R===x.id,onClick:()=>{const _=x.id;w(null),I({id:_,nome:m,plataforma:o})},children:"🚀 Publicar agora (cria PAUSADA para revisão)"})]})})]})}const vm={1:{rota:"/",texto:"Adicione ou aprove um produto. Na aprovação (com LLM ativo) o plano de ataque é gerado automaticamente.",cta:"Ir para Seus Produtos"},2:{rota:"/adspages",texto:"Gere a pre-sell ou a página de vendas (12 seções) no AdsPages. O pixel é embutido automaticamente.",cta:"Ir para AdsPages"},3:{rota:"/hosting/paginas",texto:"Publique a página no GitHub (Cloudflare Pages conectado faz o deploy). Copie a URL pública.",cta:"Ir para Páginas Criadas"},4:{rota:"/adscreator",texto:"Monte as campanhas (Google/Meta/TikTok) com CPA alvo e palavras do AdsWords. Publique PAUSADA e revise.",cta:"Ir para AdsCreator"},5:{rota:"/tracking/visitas",texto:"Configure a URL pública do /track (túnel) e acompanhe visitas, cliques e drenagem em tempo real.",cta:"Ir para Minhas Visitas"},6:{rota:null,texto:"Revise e gere o Relatório de Lançamento com o checklist final.",cta:null}};function gm(){var d,f,y,C,A;const{toast:e}=we(),t=De(),[n,r]=v.useState(null),[a,s]=v.useState([]),[i,o]=v.useState(!0),[u,c]=v.useState(null),[g,m]=v.useState(!1),p=v.useCallback(async()=>{o(!0);try{let E=await O.lancamentoAtual();E||(E=await O.iniciarLancamento(null)),r(E),s(await O.lancamentoEtapas())}catch(E){e(E.message||"Falha ao carregar o lançamento.")}finally{o(!1)}},[e]);v.useEffect(()=>{p()},[p]);const j=async E=>{try{const P=await O.salvarEtapaLancamento(n.id,E,{[`etapa_${E}_ok`]:!0});r(P),e(`Etapa ${E} registrada!`)}catch(P){e(P.message||"Falha ao salvar a etapa.")}},S=async()=>{try{const E=await O.concluirLancamento(n.id);c(E),m(!0),e("Lançamento concluído! Relatório gerado."),await p()}catch(E){e(E.message||"Falha ao concluir.")}},k=async()=>{try{const E=await O.relatorioLancamento(n.id);c(E),m(!0)}catch(E){e(E.message||"Falha ao abrir o relatório.")}},N=n?n.status==="concluido"?100:Math.round((n.etapa_atual-1)/(a.length||6)*100):0,h=(n==null?void 0:n.status)==="concluido"?0:(a.length||6)-((n==null?void 0:n.etapa_atual)||1)+1;return i&&!n?l.jsx("div",{className:"loading-screen",children:"Carregando AdsBot…"}):l.jsxs("section",{children:[l.jsx("h1",{children:"🤖 AdsBot — Lançamento Assistido"}),l.jsx("p",{className:"subtitle",children:"Conduza seu lançamento passo a passo — o progresso fica salvo e você pode parar e voltar quando quiser."}),n&&l.jsxs("div",{className:"form-card",children:[l.jsxs("div",{className:"flex-between",style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"10px"},children:[l.jsx("strong",{children:n.status==="concluido"?"✅ Lançamento concluído":`Etapa ${n.etapa_atual} de ${a.length} — faltam ${h} passo(s)`}),l.jsxs("span",{style:{fontSize:"13px",color:"var(--primary)",fontWeight:700},children:[N,"%"]})]}),l.jsx("div",{className:"funnel-step-bar",style:{height:"12px"},children:l.jsx("div",{style:{width:`${N}%`,background:"var(--primary)",height:"100%",borderRadius:"4px"}})})]}),l.jsx("div",{className:"visitor-grid",style:{gridTemplateColumns:"repeat(3, 1fr)"},children:(a.length?a:Array.from({length:6},(E,P)=>({numero:P+1}))).map(E=>{var U;const P=E.numero,x=vm[P]||{},w=((U=n==null?void 0:n.dados)==null?void 0:U[`etapa_${P}_ok`])||((n==null?void 0:n.etapa_atual)||1)>P||(n==null?void 0:n.status)==="concluido",R=(n==null?void 0:n.etapa_atual)===P&&(n==null?void 0:n.status)!=="concluido";return l.jsxs("div",{className:"visitor-card",style:R?{border:"2px solid var(--primary)"}:{},children:[l.jsxs("div",{className:"visitor-card-header",children:[l.jsxs("div",{className:"visitor-ip",children:[w?"✅":"⬜"," ",E.emoji||"📋"," ",P,". ",E.nome||`Etapa ${P}`]}),R&&l.jsx("span",{className:"visitor-badge",style:{background:"var(--primary-light)",color:"var(--primary)"},children:"atual"})]}),l.jsx("div",{style:{fontSize:"12px",color:"var(--text-muted)",lineHeight:1.5},children:x.texto||""}),l.jsxs("div",{style:{display:"flex",gap:"8px",marginTop:"8px",flexWrap:"wrap"},children:[x.rota&&l.jsx("button",{className:"btn-outline",style:{fontSize:"11px",padding:"6px 10px"},onClick:()=>t(x.rota),children:x.cta}),P===6?l.jsxs(l.Fragment,{children:[l.jsx("button",{className:"btn-primary",style:{fontSize:"11px",padding:"6px 10px"},onClick:k,children:"📄 Ver relatório"}),(n==null?void 0:n.status)!=="concluido"&&l.jsx("button",{className:"btn-outline",style:{fontSize:"11px",padding:"6px 10px"},onClick:S,children:"✅ Concluir lançamento"})]}):!w&&l.jsx("button",{className:"btn-primary",style:{fontSize:"11px",padding:"6px 10px"},onClick:()=>j(P),children:"✓ Marcar como feito"})]})]},P)})}),l.jsx(me,{open:g,title:"📄 Relatório de Lançamento",onClose:()=>m(!1),children:u?l.jsxs(l.Fragment,{children:[l.jsx("h4",{style:{fontSize:"14px",marginBottom:"8px"},children:"🛍️ Produto"}),l.jsxs("p",{style:{fontSize:"14px"},children:[((d=u.produto)==null?void 0:d.nome)||"—"," · ",((f=u.produto)==null?void 0:f.plataforma)||""," · nicho ",((y=u.produto)==null?void 0:y.nicho)||"—"]}),((A=(C=u.analysis)==null?void 0:C.analise)==null?void 0:A.resumo)&&l.jsxs("p",{style:{fontSize:"13px",color:"var(--text-muted)",marginTop:"4px"},children:[l.jsx("strong",{children:"Resumo IA:"})," ",u.analysis.analise.resumo]}),l.jsxs("h4",{style:{fontSize:"14px",margin:"16px 0 8px"},children:["🛡️ Páginas (",u.paginas.length,")"]}),u.paginas.length===0?l.jsx("p",{style:{fontSize:"13px",color:"var(--text-muted)"},children:"Nenhuma página vinculada."}):l.jsx("ul",{className:"placeholder-list",children:u.paginas.map(E=>l.jsxs("li",{children:[E.titulo," (",E.tipo,") — ",E.status,E.published_url?l.jsxs(l.Fragment,{children:[" · ",l.jsx("a",{href:E.published_url,target:"_blank",rel:"noreferrer",style:{color:"var(--primary)"},children:E.published_url})]}):""]},E.id))}),l.jsxs("h4",{style:{fontSize:"14px",margin:"16px 0 8px"},children:["🎯 Campanhas (",u.campanhas.length,")"]}),u.campanhas.length===0?l.jsx("p",{style:{fontSize:"13px",color:"var(--text-muted)"},children:"Nenhuma campanha vinculada."}):l.jsx("ul",{className:"placeholder-list",children:u.campanhas.map(E=>{var P,x,w,R;return l.jsxs("li",{children:[E.nome," — ",E.plataforma," · ",E.status," · CPA R$ ",((x=(P=E.cpa_alvo)==null?void 0:P.toFixed)==null?void 0:x.call(P,2))??E.cpa_alvo," · R$ ",((R=(w=E.orcamento_diario)==null?void 0:w.toFixed)==null?void 0:R.call(w,2))??E.orcamento_diario,"/dia"]},E.id)})}),l.jsx("h4",{style:{fontSize:"14px",margin:"16px 0 8px"},children:"✅ Checklist final"}),l.jsx("pre",{style:{whiteSpace:"pre-wrap",fontSize:"12px",color:"var(--text-muted)",fontFamily:"inherit"},children:u.checklist||"Checklist do seed indisponível."})]}):l.jsx("p",{className:"placeholder-note",children:"Carregando…"})})]})}function xm(){const{toast:e}=we(),t=De(),[n,r]=v.useState(null),[a,s]=v.useState([]),[i,o]=v.useState(""),[u,c]=v.useState(!0),[g,m]=v.useState(!1),[p,j]=v.useState(!1),S=v.useCallback(async()=>{c(!0);try{const[d,f]=await Promise.all([O.notificacoesConfig(),O.notificacoesHistorico()]);r(d),s(f),o((d.targets||[]).join(`
71
- `))}catch(d){e(d.message||"Falha ao carregar notificações.")}finally{c(!1)}},[e]);v.useEffect(()=>{S()},[S]);const k=d=>{n&&r({...n,eventos:{...n.eventos,[d]:!n.eventos[d]}})},N=async()=>{m(!0);try{const d=i.split(`
72
- `).map(y=>y.trim()).filter(Boolean),f=await O.salvarNotificacoes(n.eventos,d);r(f),o((f.targets||[]).join(`
73
- `)),e("Configuração salva!")}catch(d){e(d.message||"Falha ao salvar.")}finally{m(!1)}},h=async()=>{j(!0);try{await O.testarNotificacao({titulo:"Teste ProdMaker",mensagem:"Notificação de teste do ProdMaker."}),e("Notificação de teste enviada!"),await S()}catch(d){e(d.message||"Falha no teste."),await S()}finally{j(!1)}};return u&&!n?l.jsx("div",{className:"loading-screen",children:"Carregando…"}):l.jsxs("section",{children:[l.jsx("h1",{children:"🔔 Notificações (AdsNotify)"}),l.jsx("p",{className:"subtitle",children:"Push de vendas e conclusões via apprise (Telegram, Discord, e-mail e mais)."}),l.jsxs("div",{className:"form-card",children:[l.jsx("h3",{style:{fontSize:"15px",marginBottom:"10px"},children:"Eventos notificados"}),n&&Object.entries(n.eventos_disponiveis||{}).map(([d,f])=>{var y;return l.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"10px",fontSize:"14px",fontWeight:500,marginBottom:"10px",cursor:"pointer"},onClick:C=>C.preventDefault(),children:[l.jsx("input",{type:"checkbox",checked:!!((y=n.eventos)!=null&&y[d]),onChange:()=>k(d),style:{width:"auto"}}),f," ",l.jsxs("span",{style:{color:"var(--text-muted)",fontSize:"12px"},children:["(",d,")"]})]},d)}),l.jsx("h3",{style:{fontSize:"15px",margin:"18px 0 8px"},children:"Canais (URLs apprise — uma por linha)"}),l.jsx("textarea",{rows:4,value:i,onChange:d=>o(d.target.value),placeholder:`discords://WEBHOOK_ID/WEBHOOK_TOKEN
74
- mailtos://usuario:senha@smtp.com`,style:{fontFamily:"monospace",fontSize:"12px"}}),l.jsxs("p",{className:"placeholder-note",style:{marginBottom:"12px"},children:[n!=null&&n.canal_telegram?"✅ Telegram configurado em Chaves de API — será usado automaticamente.":"💡 Dica: configure Bot Token + Chat ID em Chaves de API → Telegram para receber tudo no seu Telegram."," ",l.jsx("a",{href:"/api-keys",onClick:d=>{d.preventDefault(),t("/api-keys")},children:"Abrir Chaves de API"})]}),l.jsxs("div",{style:{display:"flex",gap:"10px"},children:[l.jsx("button",{className:"btn-primary",onClick:N,disabled:g,children:g?"Salvando…":"Salvar"}),l.jsx("button",{className:"btn-outline",onClick:h,disabled:p,children:p?"Enviando…":"📨 Enviar teste"})]})]}),l.jsxs("h3",{style:{fontSize:"16px",margin:"24px 0 8px"},children:["Histórico (",a.length,")"]}),l.jsxs("table",{children:[l.jsx("thead",{children:l.jsxs("tr",{children:[l.jsx("th",{children:"Data"}),l.jsx("th",{children:"Evento"}),l.jsx("th",{children:"Título"}),l.jsx("th",{children:"Canal"}),l.jsx("th",{children:"Status"})]})}),l.jsx("tbody",{children:a.length===0?l.jsx("tr",{className:"empty-row",children:l.jsx("td",{colSpan:5,children:"Nenhuma notificação enviada ainda."})}):a.map(d=>l.jsxs("tr",{children:[l.jsx("td",{children:d.created_at}),l.jsx("td",{children:d.event}),l.jsxs("td",{children:[d.titulo,d.erro&&l.jsx("div",{style:{fontSize:"10px",color:"var(--danger)",maxWidth:"260px",wordBreak:"break-word"},children:d.erro.slice(0,90)})]}),l.jsx("td",{style:{fontSize:"11px"},children:d.canal||"—"}),l.jsx("td",{style:{fontWeight:600,fontSize:"12px",color:d.status==="enviada"?"var(--success)":d.status==="erro"?"var(--danger)":"var(--text-muted)"},children:d.status==="enviada"?"✅ enviada":d.status==="erro"?"❌ erro":"⏳ pendente"})]},d.id))})]})]})}function bl({emoji:e,title:t,subtitle:n,items:r=[]}){return l.jsxs("section",{children:[l.jsxs("h1",{children:[e," ",t]}),l.jsx("p",{className:"subtitle",children:n}),l.jsxs("div",{className:"form-card",children:[r.length>0&&l.jsxs(l.Fragment,{children:[l.jsx("h3",{style:{fontSize:"15px",marginBottom:"6px"},children:"O que vem neste módulo"}),l.jsx("ul",{className:"placeholder-list",children:r.map((a,s)=>l.jsx("li",{children:a},s))})]}),l.jsx("p",{className:"placeholder-note",children:"🚧 Em desenvolvimento — chegue aqui nas próximas partes do roadmap (veja o CHANGELOG)."})]})]})}const ym=()=>l.jsx(bl,{emoji:"📌",title:"Pinterest — Orgânico",subtitle:"Crie e agende pins (1000x1500) com SEO, apontando para suas presells.",items:["Gerador de ideias de pins por IA","Criação e agendamento via py3-pinterest","Boards temáticos e histórico"]}),jm=()=>l.jsx(bl,{emoji:"🔑",title:"Contas do Google",subtitle:"Contas Google Ads conectadas (OAuth + developer token + customer IDs).",items:["Cards por conta com conectar/testar","Vinculação de subcontas MCC"]}),Sm=()=>l.jsx(bl,{emoji:"📋",title:"Logs",subtitle:"Histórico unificado de operações com attribution de provider.",items:["Tabela: Operação, Estado, Data/Hora, Origem, Detalhes","Filtros por operação e estado"]}),wm=()=>l.jsx(bl,{emoji:"❓",title:"FAQ & Documentação",subtitle:"Perguntas frequentes e guias (hospedagem, Google Ads OAuth, webhooks, Gamma).",items:["FAQ em accordion","Guias de referência do seed/references","Termos e Privacidade (/legal)"]}),cs=v.createContext(null),si=()=>v.useContext(cs);function km(){const[e,t]=v.useState(()=>localStorage.getItem("prodmaker_theme")||"light");v.useEffect(()=>{document.documentElement.setAttribute("data-theme",e),localStorage.setItem("prodmaker_theme",e)},[e]);const n=v.useCallback(()=>t(r=>r==="light"?"dark":"light"),[]);return{theme:e,toggleTheme:n}}function Cm(){const[e,t]=v.useState(null),[n,r]=v.useState(!0),[a,s]=v.useState(""),{theme:i,toggleTheme:o}=km(),u=jr(),c=v.useCallback(async()=>{try{t(await O.session())}catch{t({authenticated:!1})}finally{r(!1)}},[]);v.useEffect(()=>{c()},[c]),v.useEffect(()=>{O.version().then(S=>s(S.version)).catch(()=>{})},[]);const g=v.useCallback(async(S,k)=>{const N=await O.login(S,k);return await c(),N},[c]),m=v.useCallback(async()=>{await O.logout().catch(()=>{}),await c()},[c]),p=u.pathname==="/login",j=e==null?void 0:e.authenticated;return p?l.jsx(cs.Provider,{value:{session:e,loading:n,version:a,login:g,logout:m,theme:i,toggleTheme:o},children:l.jsx($h,{})}):n?l.jsx("div",{className:"loading-screen",children:"Carregando…"}):j?l.jsx(cs.Provider,{value:{session:e,loading:n,version:a,login:g,logout:m,theme:i,toggleTheme:o},children:l.jsx(Oh,{children:l.jsxs("div",{className:"app-shell",children:[l.jsx(zh,{}),l.jsxs("main",{className:"main-content",children:[l.jsx(Ih,{}),l.jsx("div",{className:"content-wrapper",children:l.jsxs(_h,{children:[l.jsx(te,{path:"/",element:l.jsx(Bh,{})}),l.jsx(te,{path:"/dashboard",element:l.jsx(Uh,{})}),l.jsx(te,{path:"/hosting/dominios",element:l.jsx(lm,{})}),l.jsx(te,{path:"/hosting/paginas",element:l.jsx(rm,{})}),l.jsx(te,{path:"/studio",element:l.jsx(Kh,{})}),l.jsx(te,{path:"/studio/biblioteca",element:l.jsx(Jh,{})}),l.jsx(te,{path:"/adspages",element:l.jsx(em,{})}),l.jsx(te,{path:"/adswords",element:l.jsx(fm,{})}),l.jsx(te,{path:"/adscreator",element:l.jsx(mm,{})}),l.jsx(te,{path:"/tracking/visitas",element:l.jsx(im,{})}),l.jsx(te,{path:"/tracking/vendas",element:l.jsx(cm,{})}),l.jsx(te,{path:"/tracking/gclid",element:l.jsx(pm,{})}),l.jsx(te,{path:"/adsbot",element:l.jsx(gm,{})}),l.jsx(te,{path:"/pinterest",element:l.jsx(ym,{})}),l.jsx(te,{path:"/contas-google",element:l.jsx(jm,{})}),l.jsx(te,{path:"/api-keys",element:l.jsx(Hh,{})}),l.jsx(te,{path:"/notificacoes",element:l.jsx(xm,{})}),l.jsx(te,{path:"/logs",element:l.jsx(Sm,{})}),l.jsx(te,{path:"/faq",element:l.jsx(wm,{})}),l.jsx(te,{path:"*",element:l.jsx(ko,{to:"/",replace:!0})})]})})]})]})})}):l.jsx(ko,{to:"/login",replace:!0})}Qc(document.getElementById("root")).render(l.jsx(Wo.StrictMode,{children:l.jsx(Ah,{children:l.jsx(Cm,{})})}));