content-grade 1.0.4 → 1.0.6

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.
@@ -0,0 +1,78 @@
1
+ function ap(l,c){for(var a=0;a<c.length;a++){const f=c[a];if(typeof f!="string"&&!Array.isArray(f)){for(const u in f)if(u!=="default"&&!(u in l)){const g=Object.getOwnPropertyDescriptor(f,u);g&&Object.defineProperty(l,u,g.get?g:{enumerable:!0,get:()=>f[u]})}}}return Object.freeze(Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}))}(function(){const c=document.createElement("link").relList;if(c&&c.supports&&c.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))f(u);new MutationObserver(u=>{for(const g of u)if(g.type==="childList")for(const h of g.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&f(h)}).observe(document,{childList:!0,subtree:!0});function a(u){const g={};return u.integrity&&(g.integrity=u.integrity),u.referrerPolicy&&(g.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?g.credentials="include":u.crossOrigin==="anonymous"?g.credentials="omit":g.credentials="same-origin",g}function f(u){if(u.ep)return;u.ep=!0;const g=a(u);fetch(u.href,g)}})();function Hd(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var is={exports:{}},Ur={},ls={exports:{}},ae={};/**
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 Sd;function cp(){if(Sd)return ae;Sd=1;var l=Symbol.for("react.element"),c=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),g=Symbol.for("react.provider"),h=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),j=Symbol.for("react.suspense"),R=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),T=Symbol.iterator;function _(k){return k===null||typeof k!="object"?null:(k=T&&k[T]||k["@@iterator"],typeof k=="function"?k:null)}var A={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,B={};function C(k,L,te){this.props=k,this.context=L,this.refs=B,this.updater=te||A}C.prototype.isReactComponent={},C.prototype.setState=function(k,L){if(typeof k!="object"&&typeof k!="function"&&k!=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,k,L,"setState")},C.prototype.forceUpdate=function(k){this.updater.enqueueForceUpdate(this,k,"forceUpdate")};function W(){}W.prototype=C.prototype;function P(k,L,te){this.props=k,this.context=L,this.refs=B,this.updater=te||A}var Q=P.prototype=new W;Q.constructor=P,x(Q,C.prototype),Q.isPureReactComponent=!0;var F=Array.isArray,ie=Object.prototype.hasOwnProperty,re={current:null},fe={key:!0,ref:!0,__self:!0,__source:!0};function je(k,L,te){var le,H={},ne=null,me=null;if(L!=null)for(le in L.ref!==void 0&&(me=L.ref),L.key!==void 0&&(ne=""+L.key),L)ie.call(L,le)&&!fe.hasOwnProperty(le)&&(H[le]=L[le]);var pe=arguments.length-2;if(pe===1)H.children=te;else if(1<pe){for(var we=Array(pe),it=0;it<pe;it++)we[it]=arguments[it+2];H.children=we}if(k&&k.defaultProps)for(le in pe=k.defaultProps,pe)H[le]===void 0&&(H[le]=pe[le]);return{$$typeof:l,type:k,key:ne,ref:me,props:H,_owner:re.current}}function Le(k,L){return{$$typeof:l,type:k.type,key:L,ref:k.ref,props:k.props,_owner:k._owner}}function xe(k){return typeof k=="object"&&k!==null&&k.$$typeof===l}function Ue(k){var L={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function(te){return L[te]})}var Fe=/\/+/g;function Te(k,L){return typeof k=="object"&&k!==null&&k.key!=null?Ue(""+k.key):L.toString(36)}function X(k,L,te,le,H){var ne=typeof k;(ne==="undefined"||ne==="boolean")&&(k=null);var me=!1;if(k===null)me=!0;else switch(ne){case"string":case"number":me=!0;break;case"object":switch(k.$$typeof){case l:case c:me=!0}}if(me)return me=k,H=H(me),k=le===""?"."+Te(me,0):le,F(H)?(te="",k!=null&&(te=k.replace(Fe,"$&/")+"/"),X(H,L,te,"",function(it){return it})):H!=null&&(xe(H)&&(H=Le(H,te+(!H.key||me&&me.key===H.key?"":(""+H.key).replace(Fe,"$&/")+"/")+k)),L.push(H)),1;if(me=0,le=le===""?".":le+":",F(k))for(var pe=0;pe<k.length;pe++){ne=k[pe];var we=le+Te(ne,pe);me+=X(ne,L,te,we,H)}else if(we=_(k),typeof we=="function")for(k=we.call(k),pe=0;!(ne=k.next()).done;)ne=ne.value,we=le+Te(ne,pe++),me+=X(ne,L,te,we,H);else if(ne==="object")throw L=String(k),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(k).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.");return me}function K(k,L,te){if(k==null)return k;var le=[],H=0;return X(k,le,"","",function(ne){return L.call(te,ne,H++)}),le}function se(k){if(k._status===-1){var L=k._result;L=L(),L.then(function(te){(k._status===0||k._status===-1)&&(k._status=1,k._result=te)},function(te){(k._status===0||k._status===-1)&&(k._status=2,k._result=te)}),k._status===-1&&(k._status=0,k._result=L)}if(k._status===1)return k._result.default;throw k._result}var ce={current:null},D={transition:null},J={ReactCurrentDispatcher:ce,ReactCurrentBatchConfig:D,ReactCurrentOwner:re};function $(){throw Error("act(...) is not supported in production builds of React.")}return ae.Children={map:K,forEach:function(k,L,te){K(k,function(){L.apply(this,arguments)},te)},count:function(k){var L=0;return K(k,function(){L++}),L},toArray:function(k){return K(k,function(L){return L})||[]},only:function(k){if(!xe(k))throw Error("React.Children.only expected to receive a single React element child.");return k}},ae.Component=C,ae.Fragment=a,ae.Profiler=u,ae.PureComponent=P,ae.StrictMode=f,ae.Suspense=j,ae.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=J,ae.act=$,ae.cloneElement=function(k,L,te){if(k==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+k+".");var le=x({},k.props),H=k.key,ne=k.ref,me=k._owner;if(L!=null){if(L.ref!==void 0&&(ne=L.ref,me=re.current),L.key!==void 0&&(H=""+L.key),k.type&&k.type.defaultProps)var pe=k.type.defaultProps;for(we in L)ie.call(L,we)&&!fe.hasOwnProperty(we)&&(le[we]=L[we]===void 0&&pe!==void 0?pe[we]:L[we])}var we=arguments.length-2;if(we===1)le.children=te;else if(1<we){pe=Array(we);for(var it=0;it<we;it++)pe[it]=arguments[it+2];le.children=pe}return{$$typeof:l,type:k.type,key:H,ref:ne,props:le,_owner:me}},ae.createContext=function(k){return k={$$typeof:h,_currentValue:k,_currentValue2:k,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},k.Provider={$$typeof:g,_context:k},k.Consumer=k},ae.createElement=je,ae.createFactory=function(k){var L=je.bind(null,k);return L.type=k,L},ae.createRef=function(){return{current:null}},ae.forwardRef=function(k){return{$$typeof:y,render:k}},ae.isValidElement=xe,ae.lazy=function(k){return{$$typeof:w,_payload:{_status:-1,_result:k},_init:se}},ae.memo=function(k,L){return{$$typeof:R,type:k,compare:L===void 0?null:L}},ae.startTransition=function(k){var L=D.transition;D.transition={};try{k()}finally{D.transition=L}},ae.unstable_act=$,ae.useCallback=function(k,L){return ce.current.useCallback(k,L)},ae.useContext=function(k){return ce.current.useContext(k)},ae.useDebugValue=function(){},ae.useDeferredValue=function(k){return ce.current.useDeferredValue(k)},ae.useEffect=function(k,L){return ce.current.useEffect(k,L)},ae.useId=function(){return ce.current.useId()},ae.useImperativeHandle=function(k,L,te){return ce.current.useImperativeHandle(k,L,te)},ae.useInsertionEffect=function(k,L){return ce.current.useInsertionEffect(k,L)},ae.useLayoutEffect=function(k,L){return ce.current.useLayoutEffect(k,L)},ae.useMemo=function(k,L){return ce.current.useMemo(k,L)},ae.useReducer=function(k,L,te){return ce.current.useReducer(k,L,te)},ae.useRef=function(k){return ce.current.useRef(k)},ae.useState=function(k){return ce.current.useState(k)},ae.useSyncExternalStore=function(k,L,te){return ce.current.useSyncExternalStore(k,L,te)},ae.useTransition=function(){return ce.current.useTransition()},ae.version="18.3.1",ae}var jd;function js(){return jd||(jd=1,ls.exports=cp()),ls.exports}/**
10
+ * @license React
11
+ * react-jsx-runtime.production.min.js
12
+ *
13
+ * Copyright (c) Facebook, Inc. and its affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var wd;function dp(){if(wd)return Ur;wd=1;var l=js(),c=Symbol.for("react.element"),a=Symbol.for("react.fragment"),f=Object.prototype.hasOwnProperty,u=l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,g={key:!0,ref:!0,__self:!0,__source:!0};function h(y,j,R){var w,T={},_=null,A=null;R!==void 0&&(_=""+R),j.key!==void 0&&(_=""+j.key),j.ref!==void 0&&(A=j.ref);for(w in j)f.call(j,w)&&!g.hasOwnProperty(w)&&(T[w]=j[w]);if(y&&y.defaultProps)for(w in j=y.defaultProps,j)T[w]===void 0&&(T[w]=j[w]);return{$$typeof:c,type:y,key:_,ref:A,props:T,_owner:u.current}}return Ur.Fragment=a,Ur.jsx=h,Ur.jsxs=h,Ur}var kd;function up(){return kd||(kd=1,is.exports=dp()),is.exports}var r=up(),v=js();const ws=Hd(v),fp=ap({__proto__:null,default:ws},[v]);var oi={},ss={exports:{}},ot={},as={exports:{}},cs={};/**
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
+ */var Cd;function pp(){return Cd||(Cd=1,(function(l){function c(D,J){var $=D.length;D.push(J);e:for(;0<$;){var k=$-1>>>1,L=D[k];if(0<u(L,J))D[k]=J,D[$]=L,$=k;else break e}}function a(D){return D.length===0?null:D[0]}function f(D){if(D.length===0)return null;var J=D[0],$=D.pop();if($!==J){D[0]=$;e:for(var k=0,L=D.length,te=L>>>1;k<te;){var le=2*(k+1)-1,H=D[le],ne=le+1,me=D[ne];if(0>u(H,$))ne<L&&0>u(me,H)?(D[k]=me,D[ne]=$,k=ne):(D[k]=H,D[le]=$,k=le);else if(ne<L&&0>u(me,$))D[k]=me,D[ne]=$,k=ne;else break e}}return J}function u(D,J){var $=D.sortIndex-J.sortIndex;return $!==0?$:D.id-J.id}if(typeof performance=="object"&&typeof performance.now=="function"){var g=performance;l.unstable_now=function(){return g.now()}}else{var h=Date,y=h.now();l.unstable_now=function(){return h.now()-y}}var j=[],R=[],w=1,T=null,_=3,A=!1,x=!1,B=!1,C=typeof setTimeout=="function"?setTimeout:null,W=typeof clearTimeout=="function"?clearTimeout:null,P=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Q(D){for(var J=a(R);J!==null;){if(J.callback===null)f(R);else if(J.startTime<=D)f(R),J.sortIndex=J.expirationTime,c(j,J);else break;J=a(R)}}function F(D){if(B=!1,Q(D),!x)if(a(j)!==null)x=!0,se(ie);else{var J=a(R);J!==null&&ce(F,J.startTime-D)}}function ie(D,J){x=!1,B&&(B=!1,W(je),je=-1),A=!0;var $=_;try{for(Q(J),T=a(j);T!==null&&(!(T.expirationTime>J)||D&&!Ue());){var k=T.callback;if(typeof k=="function"){T.callback=null,_=T.priorityLevel;var L=k(T.expirationTime<=J);J=l.unstable_now(),typeof L=="function"?T.callback=L:T===a(j)&&f(j),Q(J)}else f(j);T=a(j)}if(T!==null)var te=!0;else{var le=a(R);le!==null&&ce(F,le.startTime-J),te=!1}return te}finally{T=null,_=$,A=!1}}var re=!1,fe=null,je=-1,Le=5,xe=-1;function Ue(){return!(l.unstable_now()-xe<Le)}function Fe(){if(fe!==null){var D=l.unstable_now();xe=D;var J=!0;try{J=fe(!0,D)}finally{J?Te():(re=!1,fe=null)}}else re=!1}var Te;if(typeof P=="function")Te=function(){P(Fe)};else if(typeof MessageChannel<"u"){var X=new MessageChannel,K=X.port2;X.port1.onmessage=Fe,Te=function(){K.postMessage(null)}}else Te=function(){C(Fe,0)};function se(D){fe=D,re||(re=!0,Te())}function ce(D,J){je=C(function(){D(l.unstable_now())},J)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function(D){D.callback=null},l.unstable_continueExecution=function(){x||A||(x=!0,se(ie))},l.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Le=0<D?Math.floor(1e3/D):5},l.unstable_getCurrentPriorityLevel=function(){return _},l.unstable_getFirstCallbackNode=function(){return a(j)},l.unstable_next=function(D){switch(_){case 1:case 2:case 3:var J=3;break;default:J=_}var $=_;_=J;try{return D()}finally{_=$}},l.unstable_pauseExecution=function(){},l.unstable_requestPaint=function(){},l.unstable_runWithPriority=function(D,J){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var $=_;_=D;try{return J()}finally{_=$}},l.unstable_scheduleCallback=function(D,J,$){var k=l.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?k+$:k):$=k,D){case 1:var L=-1;break;case 2:L=250;break;case 5:L=1073741823;break;case 4:L=1e4;break;default:L=5e3}return L=$+L,D={id:w++,callback:J,priorityLevel:D,startTime:$,expirationTime:L,sortIndex:-1},$>k?(D.sortIndex=$,c(R,D),a(j)===null&&D===a(R)&&(B?(W(je),je=-1):B=!0,ce(F,$-k))):(D.sortIndex=L,c(j,D),x||A||(x=!0,se(ie))),D},l.unstable_shouldYield=Ue,l.unstable_wrapCallback=function(D){var J=_;return function(){var $=_;_=J;try{return D.apply(this,arguments)}finally{_=$}}}})(cs)),cs}var bd;function hp(){return bd||(bd=1,as.exports=pp()),as.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 zd;function gp(){if(zd)return ot;zd=1;var l=js(),c=hp();function a(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 f=new Set,u={};function g(e,t){h(e,t),h(e+"Capture",t)}function h(e,t){for(u[e]=t,e=0;e<t.length;e++)f.add(t[e])}var y=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),j=Object.prototype.hasOwnProperty,R=/^[: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]*$/,w={},T={};function _(e){return j.call(T,e)?!0:j.call(w,e)?!1:R.test(e)?T[e]=!0:(w[e]=!0,!1)}function A(e,t,n,o){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return o?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function x(e,t,n,o){if(t===null||typeof t>"u"||A(e,t,n,o))return!0;if(o)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 B(e,t,n,o,i,s,d){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=o,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=d}var C={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){C[e]=new B(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];C[t]=new B(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){C[e]=new B(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){C[e]=new B(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){C[e]=new B(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){C[e]=new B(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){C[e]=new B(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){C[e]=new B(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){C[e]=new B(e,5,!1,e.toLowerCase(),null,!1,!1)});var W=/[\-:]([a-z])/g;function P(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(W,P);C[t]=new B(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(W,P);C[t]=new B(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(W,P);C[t]=new B(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){C[e]=new B(e,1,!1,e.toLowerCase(),null,!1,!1)}),C.xlinkHref=new B("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){C[e]=new B(e,1,!1,e.toLowerCase(),null,!0,!0)});function Q(e,t,n,o){var i=C.hasOwnProperty(t)?C[t]:null;(i!==null?i.type!==0:o||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(x(t,n,i,o)&&(n=null),o||i===null?_(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,o=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,o?e.setAttributeNS(o,t,n):e.setAttribute(t,n))))}var F=l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ie=Symbol.for("react.element"),re=Symbol.for("react.portal"),fe=Symbol.for("react.fragment"),je=Symbol.for("react.strict_mode"),Le=Symbol.for("react.profiler"),xe=Symbol.for("react.provider"),Ue=Symbol.for("react.context"),Fe=Symbol.for("react.forward_ref"),Te=Symbol.for("react.suspense"),X=Symbol.for("react.suspense_list"),K=Symbol.for("react.memo"),se=Symbol.for("react.lazy"),ce=Symbol.for("react.offscreen"),D=Symbol.iterator;function J(e){return e===null||typeof e!="object"?null:(e=D&&e[D]||e["@@iterator"],typeof e=="function"?e:null)}var $=Object.assign,k;function L(e){if(k===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);k=t&&t[1]||""}return`
34
+ `+k+e}var te=!1;function le(e,t){if(!e||te)return"";te=!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(E){var o=E}Reflect.construct(e,[],t)}else{try{t.call()}catch(E){o=E}e.call(t.prototype)}else{try{throw Error()}catch(E){o=E}e()}}catch(E){if(E&&o&&typeof E.stack=="string"){for(var i=E.stack.split(`
35
+ `),s=o.stack.split(`
36
+ `),d=i.length-1,p=s.length-1;1<=d&&0<=p&&i[d]!==s[p];)p--;for(;1<=d&&0<=p;d--,p--)if(i[d]!==s[p]){if(d!==1||p!==1)do if(d--,p--,0>p||i[d]!==s[p]){var m=`
37
+ `+i[d].replace(" at new "," at ");return e.displayName&&m.includes("<anonymous>")&&(m=m.replace("<anonymous>",e.displayName)),m}while(1<=d&&0<=p);break}}}finally{te=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?L(e):""}function H(e){switch(e.tag){case 5:return L(e.type);case 16:return L("Lazy");case 13:return L("Suspense");case 19:return L("SuspenseList");case 0:case 2:case 15:return e=le(e.type,!1),e;case 11:return e=le(e.type.render,!1),e;case 1:return e=le(e.type,!0),e;default:return""}}function ne(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 fe:return"Fragment";case re:return"Portal";case Le:return"Profiler";case je:return"StrictMode";case Te:return"Suspense";case X:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Ue:return(e.displayName||"Context")+".Consumer";case xe:return(e._context.displayName||"Context")+".Provider";case Fe:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case K:return t=e.displayName||null,t!==null?t:ne(e.type)||"Memo";case se:t=e._payload,e=e._init;try{return ne(e(t))}catch{}}return null}function me(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 ne(t);case 8:return t===je?"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 pe(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function we(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function it(e){var t=we(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),o=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(d){o=""+d,s.call(this,d)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return o},setValue:function(d){o=""+d},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Qr(e){e._valueTracker||(e._valueTracker=it(e))}function zs(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),o="";return e&&(o=we(e)?e.checked?"true":"false":e.value),e=o,e!==n?(t.setValue(e),!0):!1}function Kr(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 fi(e,t){var n=t.checked;return $({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function _s(e,t){var n=t.defaultValue==null?"":t.defaultValue,o=t.checked!=null?t.checked:t.defaultChecked;n=pe(t.value!=null?t.value:n),e._wrapperState={initialChecked:o,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Rs(e,t){t=t.checked,t!=null&&Q(e,"checked",t,!1)}function pi(e,t){Rs(e,t);var n=pe(t.value),o=t.type;if(n!=null)o==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(o==="submit"||o==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?hi(e,t.type,n):t.hasOwnProperty("defaultValue")&&hi(e,t.type,pe(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Es(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var o=t.type;if(!(o!=="submit"&&o!=="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 hi(e,t,n){(t!=="number"||Kr(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var or=Array.isArray;function bn(e,t,n,o){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&o&&(e[n].defaultSelected=!0)}else{for(n=""+pe(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,o&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function gi(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(a(91));return $({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ts(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(a(92));if(or(n)){if(1<n.length)throw Error(a(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:pe(n)}}function Bs(e,t){var n=pe(t.value),o=pe(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),o!=null&&(e.defaultValue=""+o)}function Ps(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Ws(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 mi(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Ws(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var qr,As=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,o,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,o,i)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(qr=qr||document.createElement("div"),qr.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=qr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ir(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var lr={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},uu=["Webkit","ms","Moz","O"];Object.keys(lr).forEach(function(e){uu.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),lr[t]=lr[e]})});function Ls(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||lr.hasOwnProperty(e)&&lr[e]?(""+t).trim():t+"px"}function Ns(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var o=n.indexOf("--")===0,i=Ls(n,t[n],o);n==="float"&&(n="cssFloat"),o?e.setProperty(n,i):e[n]=i}}var fu=$({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 yi(e,t){if(t){if(fu[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(a(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(a(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(t.style!=null&&typeof t.style!="object")throw Error(a(62))}}function xi(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 vi=null;function Si(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ji=null,zn=null,_n=null;function Is(e){if(e=Rr(e)){if(typeof ji!="function")throw Error(a(280));var t=e.stateNode;t&&(t=vo(t),ji(e.stateNode,e.type,t))}}function Os(e){zn?_n?_n.push(e):_n=[e]:zn=e}function Fs(){if(zn){var e=zn,t=_n;if(_n=zn=null,Is(e),t)for(e=0;e<t.length;e++)Is(t[e])}}function Ms(e,t){return e(t)}function Ds(){}var wi=!1;function $s(e,t,n){if(wi)return e(t,n);wi=!0;try{return Ms(e,t,n)}finally{wi=!1,(zn!==null||_n!==null)&&(Ds(),Fs())}}function sr(e,t){var n=e.stateNode;if(n===null)return null;var o=vo(n);if(o===null)return null;n=o[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":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(a(231,t,typeof n));return n}var ki=!1;if(y)try{var ar={};Object.defineProperty(ar,"passive",{get:function(){ki=!0}}),window.addEventListener("test",ar,ar),window.removeEventListener("test",ar,ar)}catch{ki=!1}function pu(e,t,n,o,i,s,d,p,m){var E=Array.prototype.slice.call(arguments,3);try{t.apply(n,E)}catch(I){this.onError(I)}}var cr=!1,Yr=null,Jr=!1,Ci=null,hu={onError:function(e){cr=!0,Yr=e}};function gu(e,t,n,o,i,s,d,p,m){cr=!1,Yr=null,pu.apply(hu,arguments)}function mu(e,t,n,o,i,s,d,p,m){if(gu.apply(this,arguments),cr){if(cr){var E=Yr;cr=!1,Yr=null}else throw Error(a(198));Jr||(Jr=!0,Ci=E)}}function dn(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Us(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 Hs(e){if(dn(e)!==e)throw Error(a(188))}function yu(e){var t=e.alternate;if(!t){if(t=dn(e),t===null)throw Error(a(188));return t!==e?null:e}for(var n=e,o=t;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(o=i.return,o!==null){n=o;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return Hs(i),e;if(s===o)return Hs(i),t;s=s.sibling}throw Error(a(188))}if(n.return!==o.return)n=i,o=s;else{for(var d=!1,p=i.child;p;){if(p===n){d=!0,n=i,o=s;break}if(p===o){d=!0,o=i,n=s;break}p=p.sibling}if(!d){for(p=s.child;p;){if(p===n){d=!0,n=s,o=i;break}if(p===o){d=!0,o=s,n=i;break}p=p.sibling}if(!d)throw Error(a(189))}}if(n.alternate!==o)throw Error(a(190))}if(n.tag!==3)throw Error(a(188));return n.stateNode.current===n?e:t}function Vs(e){return e=yu(e),e!==null?Gs(e):null}function Gs(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Gs(e);if(t!==null)return t;e=e.sibling}return null}var Qs=c.unstable_scheduleCallback,Ks=c.unstable_cancelCallback,xu=c.unstable_shouldYield,vu=c.unstable_requestPaint,Be=c.unstable_now,Su=c.unstable_getCurrentPriorityLevel,bi=c.unstable_ImmediatePriority,qs=c.unstable_UserBlockingPriority,Xr=c.unstable_NormalPriority,ju=c.unstable_LowPriority,Ys=c.unstable_IdlePriority,Zr=null,kt=null;function wu(e){if(kt&&typeof kt.onCommitFiberRoot=="function")try{kt.onCommitFiberRoot(Zr,e,void 0,(e.current.flags&128)===128)}catch{}}var mt=Math.clz32?Math.clz32:bu,ku=Math.log,Cu=Math.LN2;function bu(e){return e>>>=0,e===0?32:31-(ku(e)/Cu|0)|0}var eo=64,to=4194304;function dr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function no(e,t){var n=e.pendingLanes;if(n===0)return 0;var o=0,i=e.suspendedLanes,s=e.pingedLanes,d=n&268435455;if(d!==0){var p=d&~i;p!==0?o=dr(p):(s&=d,s!==0&&(o=dr(s)))}else d=n&~i,d!==0?o=dr(d):s!==0&&(o=dr(s));if(o===0)return 0;if(t!==0&&t!==o&&(t&i)===0&&(i=o&-o,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if((o&4)!==0&&(o|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=o;0<t;)n=31-mt(t),i=1<<n,o|=e[n],t&=~i;return o}function zu(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 _u(e,t){for(var n=e.suspendedLanes,o=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var d=31-mt(s),p=1<<d,m=i[d];m===-1?((p&n)===0||(p&o)!==0)&&(i[d]=zu(p,t)):m<=t&&(e.expiredLanes|=p),s&=~p}}function zi(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Js(){var e=eo;return eo<<=1,(eo&4194240)===0&&(eo=64),e}function _i(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ur(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-mt(t),e[t]=n}function Ru(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 o=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-mt(n),s=1<<i;t[i]=0,o[i]=-1,e[i]=-1,n&=~s}}function Ri(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var o=31-mt(n),i=1<<o;i&t|e[o]&t&&(e[o]|=t),n&=~i}}var he=0;function Xs(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var Zs,Ei,ea,ta,na,Ti=!1,ro=[],Ft=null,Mt=null,Dt=null,fr=new Map,pr=new Map,$t=[],Eu="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 ra(e,t){switch(e){case"focusin":case"focusout":Ft=null;break;case"dragenter":case"dragleave":Mt=null;break;case"mouseover":case"mouseout":Dt=null;break;case"pointerover":case"pointerout":fr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":pr.delete(t.pointerId)}}function hr(e,t,n,o,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:o,nativeEvent:s,targetContainers:[i]},t!==null&&(t=Rr(t),t!==null&&Ei(t)),e):(e.eventSystemFlags|=o,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tu(e,t,n,o,i){switch(t){case"focusin":return Ft=hr(Ft,e,t,n,o,i),!0;case"dragenter":return Mt=hr(Mt,e,t,n,o,i),!0;case"mouseover":return Dt=hr(Dt,e,t,n,o,i),!0;case"pointerover":var s=i.pointerId;return fr.set(s,hr(fr.get(s)||null,e,t,n,o,i)),!0;case"gotpointercapture":return s=i.pointerId,pr.set(s,hr(pr.get(s)||null,e,t,n,o,i)),!0}return!1}function oa(e){var t=un(e.target);if(t!==null){var n=dn(t);if(n!==null){if(t=n.tag,t===13){if(t=Us(n),t!==null){e.blockedOn=t,na(e.priority,function(){ea(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 oo(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Pi(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var o=new n.constructor(n.type,n);vi=o,n.target.dispatchEvent(o),vi=null}else return t=Rr(n),t!==null&&Ei(t),e.blockedOn=n,!1;t.shift()}return!0}function ia(e,t,n){oo(e)&&n.delete(t)}function Bu(){Ti=!1,Ft!==null&&oo(Ft)&&(Ft=null),Mt!==null&&oo(Mt)&&(Mt=null),Dt!==null&&oo(Dt)&&(Dt=null),fr.forEach(ia),pr.forEach(ia)}function gr(e,t){e.blockedOn===t&&(e.blockedOn=null,Ti||(Ti=!0,c.unstable_scheduleCallback(c.unstable_NormalPriority,Bu)))}function mr(e){function t(i){return gr(i,e)}if(0<ro.length){gr(ro[0],e);for(var n=1;n<ro.length;n++){var o=ro[n];o.blockedOn===e&&(o.blockedOn=null)}}for(Ft!==null&&gr(Ft,e),Mt!==null&&gr(Mt,e),Dt!==null&&gr(Dt,e),fr.forEach(t),pr.forEach(t),n=0;n<$t.length;n++)o=$t[n],o.blockedOn===e&&(o.blockedOn=null);for(;0<$t.length&&(n=$t[0],n.blockedOn===null);)oa(n),n.blockedOn===null&&$t.shift()}var Rn=F.ReactCurrentBatchConfig,io=!0;function Pu(e,t,n,o){var i=he,s=Rn.transition;Rn.transition=null;try{he=1,Bi(e,t,n,o)}finally{he=i,Rn.transition=s}}function Wu(e,t,n,o){var i=he,s=Rn.transition;Rn.transition=null;try{he=4,Bi(e,t,n,o)}finally{he=i,Rn.transition=s}}function Bi(e,t,n,o){if(io){var i=Pi(e,t,n,o);if(i===null)qi(e,t,o,lo,n),ra(e,o);else if(Tu(i,e,t,n,o))o.stopPropagation();else if(ra(e,o),t&4&&-1<Eu.indexOf(e)){for(;i!==null;){var s=Rr(i);if(s!==null&&Zs(s),s=Pi(e,t,n,o),s===null&&qi(e,t,o,lo,n),s===i)break;i=s}i!==null&&o.stopPropagation()}else qi(e,t,o,null,n)}}var lo=null;function Pi(e,t,n,o){if(lo=null,e=Si(o),e=un(e),e!==null)if(t=dn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Us(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 lo=e,null}function la(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(Su()){case bi:return 1;case qs:return 4;case Xr:case ju:return 16;case Ys:return 536870912;default:return 16}default:return 16}}var Ut=null,Wi=null,so=null;function sa(){if(so)return so;var e,t=Wi,n=t.length,o,i="value"in Ut?Ut.value:Ut.textContent,s=i.length;for(e=0;e<n&&t[e]===i[e];e++);var d=n-e;for(o=1;o<=d&&t[n-o]===i[s-o];o++);return so=i.slice(e,1<o?1-o:void 0)}function ao(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 co(){return!0}function aa(){return!1}function lt(e){function t(n,o,i,s,d){this._reactName=n,this._targetInst=i,this.type=o,this.nativeEvent=s,this.target=d,this.currentTarget=null;for(var p in e)e.hasOwnProperty(p)&&(n=e[p],this[p]=n?n(s):s[p]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?co:aa,this.isPropagationStopped=aa,this}return $(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=co)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=co)},persist:function(){},isPersistent:co}),t}var En={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ai=lt(En),yr=$({},En,{view:0,detail:0}),Au=lt(yr),Li,Ni,xr,uo=$({},yr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Oi,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!==xr&&(xr&&e.type==="mousemove"?(Li=e.screenX-xr.screenX,Ni=e.screenY-xr.screenY):Ni=Li=0,xr=e),Li)},movementY:function(e){return"movementY"in e?e.movementY:Ni}}),ca=lt(uo),Lu=$({},uo,{dataTransfer:0}),Nu=lt(Lu),Iu=$({},yr,{relatedTarget:0}),Ii=lt(Iu),Ou=$({},En,{animationName:0,elapsedTime:0,pseudoElement:0}),Fu=lt(Ou),Mu=$({},En,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Du=lt(Mu),$u=$({},En,{data:0}),da=lt($u),Uu={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Hu={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"},Vu={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Gu(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Vu[e])?!!t[e]:!1}function Oi(){return Gu}var Qu=$({},yr,{key:function(e){if(e.key){var t=Uu[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ao(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Hu[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Oi,charCode:function(e){return e.type==="keypress"?ao(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ao(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Ku=lt(Qu),qu=$({},uo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ua=lt(qu),Yu=$({},yr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Oi}),Ju=lt(Yu),Xu=$({},En,{propertyName:0,elapsedTime:0,pseudoElement:0}),Zu=lt(Xu),ef=$({},uo,{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}),tf=lt(ef),nf=[9,13,27,32],Fi=y&&"CompositionEvent"in window,vr=null;y&&"documentMode"in document&&(vr=document.documentMode);var rf=y&&"TextEvent"in window&&!vr,fa=y&&(!Fi||vr&&8<vr&&11>=vr),pa=" ",ha=!1;function ga(e,t){switch(e){case"keyup":return nf.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ma(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Tn=!1;function of(e,t){switch(e){case"compositionend":return ma(t);case"keypress":return t.which!==32?null:(ha=!0,pa);case"textInput":return e=t.data,e===pa&&ha?null:e;default:return null}}function lf(e,t){if(Tn)return e==="compositionend"||!Fi&&ga(e,t)?(e=sa(),so=Wi=Ut=null,Tn=!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 fa&&t.locale!=="ko"?null:t.data;default:return null}}var sf={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 ya(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!sf[e.type]:t==="textarea"}function xa(e,t,n,o){Os(o),t=mo(t,"onChange"),0<t.length&&(n=new Ai("onChange","change",null,n,o),e.push({event:n,listeners:t}))}var Sr=null,jr=null;function af(e){Na(e,0)}function fo(e){var t=Ln(e);if(zs(t))return e}function cf(e,t){if(e==="change")return t}var va=!1;if(y){var Mi;if(y){var Di="oninput"in document;if(!Di){var Sa=document.createElement("div");Sa.setAttribute("oninput","return;"),Di=typeof Sa.oninput=="function"}Mi=Di}else Mi=!1;va=Mi&&(!document.documentMode||9<document.documentMode)}function ja(){Sr&&(Sr.detachEvent("onpropertychange",wa),jr=Sr=null)}function wa(e){if(e.propertyName==="value"&&fo(jr)){var t=[];xa(t,jr,e,Si(e)),$s(af,t)}}function df(e,t,n){e==="focusin"?(ja(),Sr=t,jr=n,Sr.attachEvent("onpropertychange",wa)):e==="focusout"&&ja()}function uf(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return fo(jr)}function ff(e,t){if(e==="click")return fo(t)}function pf(e,t){if(e==="input"||e==="change")return fo(t)}function hf(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var yt=typeof Object.is=="function"?Object.is:hf;function wr(e,t){if(yt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(o=0;o<n.length;o++){var i=n[o];if(!j.call(t,i)||!yt(e[i],t[i]))return!1}return!0}function ka(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ca(e,t){var n=ka(e);e=0;for(var o;n;){if(n.nodeType===3){if(o=e+n.textContent.length,e<=t&&o>=t)return{node:n,offset:t-e};e=o}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=ka(n)}}function ba(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ba(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function za(){for(var e=window,t=Kr();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Kr(e.document)}return t}function $i(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 gf(e){var t=za(),n=e.focusedElem,o=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ba(n.ownerDocument.documentElement,n)){if(o!==null&&$i(n)){if(t=o.start,e=o.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,s=Math.min(o.start,i);o=o.end===void 0?s:Math.min(o.end,i),!e.extend&&s>o&&(i=o,o=s,s=i),i=Ca(n,s);var d=Ca(n,o);i&&d&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==d.node||e.focusOffset!==d.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>o?(e.addRange(t),e.extend(d.node,d.offset)):(t.setEnd(d.node,d.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 mf=y&&"documentMode"in document&&11>=document.documentMode,Bn=null,Ui=null,kr=null,Hi=!1;function _a(e,t,n){var o=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Hi||Bn==null||Bn!==Kr(o)||(o=Bn,"selectionStart"in o&&$i(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),kr&&wr(kr,o)||(kr=o,o=mo(Ui,"onSelect"),0<o.length&&(t=new Ai("onSelect","select",null,t,n),e.push({event:t,listeners:o}),t.target=Bn)))}function po(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Pn={animationend:po("Animation","AnimationEnd"),animationiteration:po("Animation","AnimationIteration"),animationstart:po("Animation","AnimationStart"),transitionend:po("Transition","TransitionEnd")},Vi={},Ra={};y&&(Ra=document.createElement("div").style,"AnimationEvent"in window||(delete Pn.animationend.animation,delete Pn.animationiteration.animation,delete Pn.animationstart.animation),"TransitionEvent"in window||delete Pn.transitionend.transition);function ho(e){if(Vi[e])return Vi[e];if(!Pn[e])return e;var t=Pn[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Ra)return Vi[e]=t[n];return e}var Ea=ho("animationend"),Ta=ho("animationiteration"),Ba=ho("animationstart"),Pa=ho("transitionend"),Wa=new Map,Aa="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 Ht(e,t){Wa.set(e,t),g(t,[e])}for(var Gi=0;Gi<Aa.length;Gi++){var Qi=Aa[Gi],yf=Qi.toLowerCase(),xf=Qi[0].toUpperCase()+Qi.slice(1);Ht(yf,"on"+xf)}Ht(Ea,"onAnimationEnd"),Ht(Ta,"onAnimationIteration"),Ht(Ba,"onAnimationStart"),Ht("dblclick","onDoubleClick"),Ht("focusin","onFocus"),Ht("focusout","onBlur"),Ht(Pa,"onTransitionEnd"),h("onMouseEnter",["mouseout","mouseover"]),h("onMouseLeave",["mouseout","mouseover"]),h("onPointerEnter",["pointerout","pointerover"]),h("onPointerLeave",["pointerout","pointerover"]),g("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),g("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),g("onBeforeInput",["compositionend","keypress","textInput","paste"]),g("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),g("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),g("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Cr="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(" "),vf=new Set("cancel close invalid load scroll toggle".split(" ").concat(Cr));function La(e,t,n){var o=e.type||"unknown-event";e.currentTarget=n,mu(o,t,void 0,e),e.currentTarget=null}function Na(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var o=e[n],i=o.event;o=o.listeners;e:{var s=void 0;if(t)for(var d=o.length-1;0<=d;d--){var p=o[d],m=p.instance,E=p.currentTarget;if(p=p.listener,m!==s&&i.isPropagationStopped())break e;La(i,p,E),s=m}else for(d=0;d<o.length;d++){if(p=o[d],m=p.instance,E=p.currentTarget,p=p.listener,m!==s&&i.isPropagationStopped())break e;La(i,p,E),s=m}}}if(Jr)throw e=Ci,Jr=!1,Ci=null,e}function ve(e,t){var n=t[tl];n===void 0&&(n=t[tl]=new Set);var o=e+"__bubble";n.has(o)||(Ia(t,e,2,!1),n.add(o))}function Ki(e,t,n){var o=0;t&&(o|=4),Ia(n,e,o,t)}var go="_reactListening"+Math.random().toString(36).slice(2);function br(e){if(!e[go]){e[go]=!0,f.forEach(function(n){n!=="selectionchange"&&(vf.has(n)||Ki(n,!1,e),Ki(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[go]||(t[go]=!0,Ki("selectionchange",!1,t))}}function Ia(e,t,n,o){switch(la(t)){case 1:var i=Pu;break;case 4:i=Wu;break;default:i=Bi}n=i.bind(null,t,n,e),i=void 0,!ki||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),o?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function qi(e,t,n,o,i){var s=o;if((t&1)===0&&(t&2)===0&&o!==null)e:for(;;){if(o===null)return;var d=o.tag;if(d===3||d===4){var p=o.stateNode.containerInfo;if(p===i||p.nodeType===8&&p.parentNode===i)break;if(d===4)for(d=o.return;d!==null;){var m=d.tag;if((m===3||m===4)&&(m=d.stateNode.containerInfo,m===i||m.nodeType===8&&m.parentNode===i))return;d=d.return}for(;p!==null;){if(d=un(p),d===null)return;if(m=d.tag,m===5||m===6){o=s=d;continue e}p=p.parentNode}}o=o.return}$s(function(){var E=s,I=Si(n),O=[];e:{var N=Wa.get(e);if(N!==void 0){var U=Ai,G=e;switch(e){case"keypress":if(ao(n)===0)break e;case"keydown":case"keyup":U=Ku;break;case"focusin":G="focus",U=Ii;break;case"focusout":G="blur",U=Ii;break;case"beforeblur":case"afterblur":U=Ii;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":U=ca;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":U=Nu;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":U=Ju;break;case Ea:case Ta:case Ba:U=Fu;break;case Pa:U=Zu;break;case"scroll":U=Au;break;case"wheel":U=tf;break;case"copy":case"cut":case"paste":U=Du;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":U=ua}var q=(t&4)!==0,Pe=!q&&e==="scroll",b=q?N!==null?N+"Capture":null:N;q=[];for(var S=E,z;S!==null;){z=S;var M=z.stateNode;if(z.tag===5&&M!==null&&(z=M,b!==null&&(M=sr(S,b),M!=null&&q.push(zr(S,M,z)))),Pe)break;S=S.return}0<q.length&&(N=new U(N,G,null,n,I),O.push({event:N,listeners:q}))}}if((t&7)===0){e:{if(N=e==="mouseover"||e==="pointerover",U=e==="mouseout"||e==="pointerout",N&&n!==vi&&(G=n.relatedTarget||n.fromElement)&&(un(G)||G[Et]))break e;if((U||N)&&(N=I.window===I?I:(N=I.ownerDocument)?N.defaultView||N.parentWindow:window,U?(G=n.relatedTarget||n.toElement,U=E,G=G?un(G):null,G!==null&&(Pe=dn(G),G!==Pe||G.tag!==5&&G.tag!==6)&&(G=null)):(U=null,G=E),U!==G)){if(q=ca,M="onMouseLeave",b="onMouseEnter",S="mouse",(e==="pointerout"||e==="pointerover")&&(q=ua,M="onPointerLeave",b="onPointerEnter",S="pointer"),Pe=U==null?N:Ln(U),z=G==null?N:Ln(G),N=new q(M,S+"leave",U,n,I),N.target=Pe,N.relatedTarget=z,M=null,un(I)===E&&(q=new q(b,S+"enter",G,n,I),q.target=z,q.relatedTarget=Pe,M=q),Pe=M,U&&G)t:{for(q=U,b=G,S=0,z=q;z;z=Wn(z))S++;for(z=0,M=b;M;M=Wn(M))z++;for(;0<S-z;)q=Wn(q),S--;for(;0<z-S;)b=Wn(b),z--;for(;S--;){if(q===b||b!==null&&q===b.alternate)break t;q=Wn(q),b=Wn(b)}q=null}else q=null;U!==null&&Oa(O,N,U,q,!1),G!==null&&Pe!==null&&Oa(O,Pe,G,q,!0)}}e:{if(N=E?Ln(E):window,U=N.nodeName&&N.nodeName.toLowerCase(),U==="select"||U==="input"&&N.type==="file")var Y=cf;else if(ya(N))if(va)Y=pf;else{Y=uf;var Z=df}else(U=N.nodeName)&&U.toLowerCase()==="input"&&(N.type==="checkbox"||N.type==="radio")&&(Y=ff);if(Y&&(Y=Y(e,E))){xa(O,Y,n,I);break e}Z&&Z(e,N,E),e==="focusout"&&(Z=N._wrapperState)&&Z.controlled&&N.type==="number"&&hi(N,"number",N.value)}switch(Z=E?Ln(E):window,e){case"focusin":(ya(Z)||Z.contentEditable==="true")&&(Bn=Z,Ui=E,kr=null);break;case"focusout":kr=Ui=Bn=null;break;case"mousedown":Hi=!0;break;case"contextmenu":case"mouseup":case"dragend":Hi=!1,_a(O,n,I);break;case"selectionchange":if(mf)break;case"keydown":case"keyup":_a(O,n,I)}var ee;if(Fi)e:{switch(e){case"compositionstart":var oe="onCompositionStart";break e;case"compositionend":oe="onCompositionEnd";break e;case"compositionupdate":oe="onCompositionUpdate";break e}oe=void 0}else Tn?ga(e,n)&&(oe="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(oe="onCompositionStart");oe&&(fa&&n.locale!=="ko"&&(Tn||oe!=="onCompositionStart"?oe==="onCompositionEnd"&&Tn&&(ee=sa()):(Ut=I,Wi="value"in Ut?Ut.value:Ut.textContent,Tn=!0)),Z=mo(E,oe),0<Z.length&&(oe=new da(oe,e,null,n,I),O.push({event:oe,listeners:Z}),ee?oe.data=ee:(ee=ma(n),ee!==null&&(oe.data=ee)))),(ee=rf?of(e,n):lf(e,n))&&(E=mo(E,"onBeforeInput"),0<E.length&&(I=new da("onBeforeInput","beforeinput",null,n,I),O.push({event:I,listeners:E}),I.data=ee))}Na(O,t)})}function zr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function mo(e,t){for(var n=t+"Capture",o=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=sr(e,n),s!=null&&o.unshift(zr(e,s,i)),s=sr(e,t),s!=null&&o.push(zr(e,s,i))),e=e.return}return o}function Wn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Oa(e,t,n,o,i){for(var s=t._reactName,d=[];n!==null&&n!==o;){var p=n,m=p.alternate,E=p.stateNode;if(m!==null&&m===o)break;p.tag===5&&E!==null&&(p=E,i?(m=sr(n,s),m!=null&&d.unshift(zr(n,m,p))):i||(m=sr(n,s),m!=null&&d.push(zr(n,m,p)))),n=n.return}d.length!==0&&e.push({event:t,listeners:d})}var Sf=/\r\n?/g,jf=/\u0000|\uFFFD/g;function Fa(e){return(typeof e=="string"?e:""+e).replace(Sf,`
38
+ `).replace(jf,"")}function yo(e,t,n){if(t=Fa(t),Fa(e)!==t&&n)throw Error(a(425))}function xo(){}var Yi=null,Ji=null;function Xi(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 Zi=typeof setTimeout=="function"?setTimeout:void 0,wf=typeof clearTimeout=="function"?clearTimeout:void 0,Ma=typeof Promise=="function"?Promise:void 0,kf=typeof queueMicrotask=="function"?queueMicrotask:typeof Ma<"u"?function(e){return Ma.resolve(null).then(e).catch(Cf)}:Zi;function Cf(e){setTimeout(function(){throw e})}function el(e,t){var n=t,o=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(o===0){e.removeChild(i),mr(t);return}o--}else n!=="$"&&n!=="$?"&&n!=="$!"||o++;n=i}while(n);mr(t)}function Vt(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 Da(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 An=Math.random().toString(36).slice(2),Ct="__reactFiber$"+An,_r="__reactProps$"+An,Et="__reactContainer$"+An,tl="__reactEvents$"+An,bf="__reactListeners$"+An,zf="__reactHandles$"+An;function un(e){var t=e[Ct];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Et]||n[Ct]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Da(e);e!==null;){if(n=e[Ct])return n;e=Da(e)}return t}e=n,n=e.parentNode}return null}function Rr(e){return e=e[Ct]||e[Et],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ln(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(a(33))}function vo(e){return e[_r]||null}var nl=[],Nn=-1;function Gt(e){return{current:e}}function Se(e){0>Nn||(e.current=nl[Nn],nl[Nn]=null,Nn--)}function ye(e,t){Nn++,nl[Nn]=e.current,e.current=t}var Qt={},Ge=Gt(Qt),Ze=Gt(!1),fn=Qt;function In(e,t){var n=e.type.contextTypes;if(!n)return Qt;var o=e.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===t)return o.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function et(e){return e=e.childContextTypes,e!=null}function So(){Se(Ze),Se(Ge)}function $a(e,t,n){if(Ge.current!==Qt)throw Error(a(168));ye(Ge,t),ye(Ze,n)}function Ua(e,t,n){var o=e.stateNode;if(t=t.childContextTypes,typeof o.getChildContext!="function")return n;o=o.getChildContext();for(var i in o)if(!(i in t))throw Error(a(108,me(e)||"Unknown",i));return $({},n,o)}function jo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Qt,fn=Ge.current,ye(Ge,e),ye(Ze,Ze.current),!0}function Ha(e,t,n){var o=e.stateNode;if(!o)throw Error(a(169));n?(e=Ua(e,t,fn),o.__reactInternalMemoizedMergedChildContext=e,Se(Ze),Se(Ge),ye(Ge,e)):Se(Ze),ye(Ze,n)}var Tt=null,wo=!1,rl=!1;function Va(e){Tt===null?Tt=[e]:Tt.push(e)}function _f(e){wo=!0,Va(e)}function Kt(){if(!rl&&Tt!==null){rl=!0;var e=0,t=he;try{var n=Tt;for(he=1;e<n.length;e++){var o=n[e];do o=o(!0);while(o!==null)}Tt=null,wo=!1}catch(i){throw Tt!==null&&(Tt=Tt.slice(e+1)),Qs(bi,Kt),i}finally{he=t,rl=!1}}return null}var On=[],Fn=0,ko=null,Co=0,dt=[],ut=0,pn=null,Bt=1,Pt="";function hn(e,t){On[Fn++]=Co,On[Fn++]=ko,ko=e,Co=t}function Ga(e,t,n){dt[ut++]=Bt,dt[ut++]=Pt,dt[ut++]=pn,pn=e;var o=Bt;e=Pt;var i=32-mt(o)-1;o&=~(1<<i),n+=1;var s=32-mt(t)+i;if(30<s){var d=i-i%5;s=(o&(1<<d)-1).toString(32),o>>=d,i-=d,Bt=1<<32-mt(t)+i|n<<i|o,Pt=s+e}else Bt=1<<s|n<<i|o,Pt=e}function ol(e){e.return!==null&&(hn(e,1),Ga(e,1,0))}function il(e){for(;e===ko;)ko=On[--Fn],On[Fn]=null,Co=On[--Fn],On[Fn]=null;for(;e===pn;)pn=dt[--ut],dt[ut]=null,Pt=dt[--ut],dt[ut]=null,Bt=dt[--ut],dt[ut]=null}var st=null,at=null,ke=!1,xt=null;function Qa(e,t){var n=gt(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 Ka(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,st=e,at=Vt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,st=e,at=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=pn!==null?{id:Bt,overflow:Pt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=gt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,st=e,at=null,!0):!1;default:return!1}}function ll(e){return(e.mode&1)!==0&&(e.flags&128)===0}function sl(e){if(ke){var t=at;if(t){var n=t;if(!Ka(e,t)){if(ll(e))throw Error(a(418));t=Vt(n.nextSibling);var o=st;t&&Ka(e,t)?Qa(o,n):(e.flags=e.flags&-4097|2,ke=!1,st=e)}}else{if(ll(e))throw Error(a(418));e.flags=e.flags&-4097|2,ke=!1,st=e}}}function qa(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;st=e}function bo(e){if(e!==st)return!1;if(!ke)return qa(e),ke=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Xi(e.type,e.memoizedProps)),t&&(t=at)){if(ll(e))throw Ya(),Error(a(418));for(;t;)Qa(e,t),t=Vt(t.nextSibling)}if(qa(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){at=Vt(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}at=null}}else at=st?Vt(e.stateNode.nextSibling):null;return!0}function Ya(){for(var e=at;e;)e=Vt(e.nextSibling)}function Mn(){at=st=null,ke=!1}function al(e){xt===null?xt=[e]:xt.push(e)}var Rf=F.ReactCurrentBatchConfig;function Er(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(a(309));var o=n.stateNode}if(!o)throw Error(a(147,e));var i=o,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(d){var p=i.refs;d===null?delete p[s]:p[s]=d},t._stringRef=s,t)}if(typeof e!="string")throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function zo(e,t){throw e=Object.prototype.toString.call(t),Error(a(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ja(e){var t=e._init;return t(e._payload)}function Xa(e){function t(b,S){if(e){var z=b.deletions;z===null?(b.deletions=[S],b.flags|=16):z.push(S)}}function n(b,S){if(!e)return null;for(;S!==null;)t(b,S),S=S.sibling;return null}function o(b,S){for(b=new Map;S!==null;)S.key!==null?b.set(S.key,S):b.set(S.index,S),S=S.sibling;return b}function i(b,S){return b=nn(b,S),b.index=0,b.sibling=null,b}function s(b,S,z){return b.index=z,e?(z=b.alternate,z!==null?(z=z.index,z<S?(b.flags|=2,S):z):(b.flags|=2,S)):(b.flags|=1048576,S)}function d(b){return e&&b.alternate===null&&(b.flags|=2),b}function p(b,S,z,M){return S===null||S.tag!==6?(S=Zl(z,b.mode,M),S.return=b,S):(S=i(S,z),S.return=b,S)}function m(b,S,z,M){var Y=z.type;return Y===fe?I(b,S,z.props.children,M,z.key):S!==null&&(S.elementType===Y||typeof Y=="object"&&Y!==null&&Y.$$typeof===se&&Ja(Y)===S.type)?(M=i(S,z.props),M.ref=Er(b,S,z),M.return=b,M):(M=Yo(z.type,z.key,z.props,null,b.mode,M),M.ref=Er(b,S,z),M.return=b,M)}function E(b,S,z,M){return S===null||S.tag!==4||S.stateNode.containerInfo!==z.containerInfo||S.stateNode.implementation!==z.implementation?(S=es(z,b.mode,M),S.return=b,S):(S=i(S,z.children||[]),S.return=b,S)}function I(b,S,z,M,Y){return S===null||S.tag!==7?(S=wn(z,b.mode,M,Y),S.return=b,S):(S=i(S,z),S.return=b,S)}function O(b,S,z){if(typeof S=="string"&&S!==""||typeof S=="number")return S=Zl(""+S,b.mode,z),S.return=b,S;if(typeof S=="object"&&S!==null){switch(S.$$typeof){case ie:return z=Yo(S.type,S.key,S.props,null,b.mode,z),z.ref=Er(b,null,S),z.return=b,z;case re:return S=es(S,b.mode,z),S.return=b,S;case se:var M=S._init;return O(b,M(S._payload),z)}if(or(S)||J(S))return S=wn(S,b.mode,z,null),S.return=b,S;zo(b,S)}return null}function N(b,S,z,M){var Y=S!==null?S.key:null;if(typeof z=="string"&&z!==""||typeof z=="number")return Y!==null?null:p(b,S,""+z,M);if(typeof z=="object"&&z!==null){switch(z.$$typeof){case ie:return z.key===Y?m(b,S,z,M):null;case re:return z.key===Y?E(b,S,z,M):null;case se:return Y=z._init,N(b,S,Y(z._payload),M)}if(or(z)||J(z))return Y!==null?null:I(b,S,z,M,null);zo(b,z)}return null}function U(b,S,z,M,Y){if(typeof M=="string"&&M!==""||typeof M=="number")return b=b.get(z)||null,p(S,b,""+M,Y);if(typeof M=="object"&&M!==null){switch(M.$$typeof){case ie:return b=b.get(M.key===null?z:M.key)||null,m(S,b,M,Y);case re:return b=b.get(M.key===null?z:M.key)||null,E(S,b,M,Y);case se:var Z=M._init;return U(b,S,z,Z(M._payload),Y)}if(or(M)||J(M))return b=b.get(z)||null,I(S,b,M,Y,null);zo(S,M)}return null}function G(b,S,z,M){for(var Y=null,Z=null,ee=S,oe=S=0,$e=null;ee!==null&&oe<z.length;oe++){ee.index>oe?($e=ee,ee=null):$e=ee.sibling;var ue=N(b,ee,z[oe],M);if(ue===null){ee===null&&(ee=$e);break}e&&ee&&ue.alternate===null&&t(b,ee),S=s(ue,S,oe),Z===null?Y=ue:Z.sibling=ue,Z=ue,ee=$e}if(oe===z.length)return n(b,ee),ke&&hn(b,oe),Y;if(ee===null){for(;oe<z.length;oe++)ee=O(b,z[oe],M),ee!==null&&(S=s(ee,S,oe),Z===null?Y=ee:Z.sibling=ee,Z=ee);return ke&&hn(b,oe),Y}for(ee=o(b,ee);oe<z.length;oe++)$e=U(ee,b,oe,z[oe],M),$e!==null&&(e&&$e.alternate!==null&&ee.delete($e.key===null?oe:$e.key),S=s($e,S,oe),Z===null?Y=$e:Z.sibling=$e,Z=$e);return e&&ee.forEach(function(rn){return t(b,rn)}),ke&&hn(b,oe),Y}function q(b,S,z,M){var Y=J(z);if(typeof Y!="function")throw Error(a(150));if(z=Y.call(z),z==null)throw Error(a(151));for(var Z=Y=null,ee=S,oe=S=0,$e=null,ue=z.next();ee!==null&&!ue.done;oe++,ue=z.next()){ee.index>oe?($e=ee,ee=null):$e=ee.sibling;var rn=N(b,ee,ue.value,M);if(rn===null){ee===null&&(ee=$e);break}e&&ee&&rn.alternate===null&&t(b,ee),S=s(rn,S,oe),Z===null?Y=rn:Z.sibling=rn,Z=rn,ee=$e}if(ue.done)return n(b,ee),ke&&hn(b,oe),Y;if(ee===null){for(;!ue.done;oe++,ue=z.next())ue=O(b,ue.value,M),ue!==null&&(S=s(ue,S,oe),Z===null?Y=ue:Z.sibling=ue,Z=ue);return ke&&hn(b,oe),Y}for(ee=o(b,ee);!ue.done;oe++,ue=z.next())ue=U(ee,b,oe,ue.value,M),ue!==null&&(e&&ue.alternate!==null&&ee.delete(ue.key===null?oe:ue.key),S=s(ue,S,oe),Z===null?Y=ue:Z.sibling=ue,Z=ue);return e&&ee.forEach(function(sp){return t(b,sp)}),ke&&hn(b,oe),Y}function Pe(b,S,z,M){if(typeof z=="object"&&z!==null&&z.type===fe&&z.key===null&&(z=z.props.children),typeof z=="object"&&z!==null){switch(z.$$typeof){case ie:e:{for(var Y=z.key,Z=S;Z!==null;){if(Z.key===Y){if(Y=z.type,Y===fe){if(Z.tag===7){n(b,Z.sibling),S=i(Z,z.props.children),S.return=b,b=S;break e}}else if(Z.elementType===Y||typeof Y=="object"&&Y!==null&&Y.$$typeof===se&&Ja(Y)===Z.type){n(b,Z.sibling),S=i(Z,z.props),S.ref=Er(b,Z,z),S.return=b,b=S;break e}n(b,Z);break}else t(b,Z);Z=Z.sibling}z.type===fe?(S=wn(z.props.children,b.mode,M,z.key),S.return=b,b=S):(M=Yo(z.type,z.key,z.props,null,b.mode,M),M.ref=Er(b,S,z),M.return=b,b=M)}return d(b);case re:e:{for(Z=z.key;S!==null;){if(S.key===Z)if(S.tag===4&&S.stateNode.containerInfo===z.containerInfo&&S.stateNode.implementation===z.implementation){n(b,S.sibling),S=i(S,z.children||[]),S.return=b,b=S;break e}else{n(b,S);break}else t(b,S);S=S.sibling}S=es(z,b.mode,M),S.return=b,b=S}return d(b);case se:return Z=z._init,Pe(b,S,Z(z._payload),M)}if(or(z))return G(b,S,z,M);if(J(z))return q(b,S,z,M);zo(b,z)}return typeof z=="string"&&z!==""||typeof z=="number"?(z=""+z,S!==null&&S.tag===6?(n(b,S.sibling),S=i(S,z),S.return=b,b=S):(n(b,S),S=Zl(z,b.mode,M),S.return=b,b=S),d(b)):n(b,S)}return Pe}var Dn=Xa(!0),Za=Xa(!1),_o=Gt(null),Ro=null,$n=null,cl=null;function dl(){cl=$n=Ro=null}function ul(e){var t=_o.current;Se(_o),e._currentValue=t}function fl(e,t,n){for(;e!==null;){var o=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,o!==null&&(o.childLanes|=t)):o!==null&&(o.childLanes&t)!==t&&(o.childLanes|=t),e===n)break;e=e.return}}function Un(e,t){Ro=e,cl=$n=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(tt=!0),e.firstContext=null)}function ft(e){var t=e._currentValue;if(cl!==e)if(e={context:e,memoizedValue:t,next:null},$n===null){if(Ro===null)throw Error(a(308));$n=e,Ro.dependencies={lanes:0,firstContext:e}}else $n=$n.next=e;return t}var gn=null;function pl(e){gn===null?gn=[e]:gn.push(e)}function ec(e,t,n,o){var i=t.interleaved;return i===null?(n.next=n,pl(t)):(n.next=i.next,i.next=n),t.interleaved=n,Wt(e,o)}function Wt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var qt=!1;function hl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function tc(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 At(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Yt(e,t,n){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(de&2)!==0){var i=o.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),o.pending=t,Wt(e,n)}return i=o.interleaved,i===null?(t.next=t,pl(o)):(t.next=i.next,i.next=t),o.interleaved=t,Wt(e,n)}function Eo(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var o=t.lanes;o&=e.pendingLanes,n|=o,t.lanes=n,Ri(e,n)}}function nc(e,t){var n=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,n===o)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var d={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=d:s=s.next=d,n=n.next}while(n!==null);s===null?i=s=t:s=s.next=t}else i=s=t;n={baseState:o.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:o.shared,effects:o.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function To(e,t,n,o){var i=e.updateQueue;qt=!1;var s=i.firstBaseUpdate,d=i.lastBaseUpdate,p=i.shared.pending;if(p!==null){i.shared.pending=null;var m=p,E=m.next;m.next=null,d===null?s=E:d.next=E,d=m;var I=e.alternate;I!==null&&(I=I.updateQueue,p=I.lastBaseUpdate,p!==d&&(p===null?I.firstBaseUpdate=E:p.next=E,I.lastBaseUpdate=m))}if(s!==null){var O=i.baseState;d=0,I=E=m=null,p=s;do{var N=p.lane,U=p.eventTime;if((o&N)===N){I!==null&&(I=I.next={eventTime:U,lane:0,tag:p.tag,payload:p.payload,callback:p.callback,next:null});e:{var G=e,q=p;switch(N=t,U=n,q.tag){case 1:if(G=q.payload,typeof G=="function"){O=G.call(U,O,N);break e}O=G;break e;case 3:G.flags=G.flags&-65537|128;case 0:if(G=q.payload,N=typeof G=="function"?G.call(U,O,N):G,N==null)break e;O=$({},O,N);break e;case 2:qt=!0}}p.callback!==null&&p.lane!==0&&(e.flags|=64,N=i.effects,N===null?i.effects=[p]:N.push(p))}else U={eventTime:U,lane:N,tag:p.tag,payload:p.payload,callback:p.callback,next:null},I===null?(E=I=U,m=O):I=I.next=U,d|=N;if(p=p.next,p===null){if(p=i.shared.pending,p===null)break;N=p,p=N.next,N.next=null,i.lastBaseUpdate=N,i.shared.pending=null}}while(!0);if(I===null&&(m=O),i.baseState=m,i.firstBaseUpdate=E,i.lastBaseUpdate=I,t=i.shared.interleaved,t!==null){i=t;do d|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);xn|=d,e.lanes=d,e.memoizedState=O}}function rc(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var o=e[t],i=o.callback;if(i!==null){if(o.callback=null,o=n,typeof i!="function")throw Error(a(191,i));i.call(o)}}}var Tr={},bt=Gt(Tr),Br=Gt(Tr),Pr=Gt(Tr);function mn(e){if(e===Tr)throw Error(a(174));return e}function gl(e,t){switch(ye(Pr,t),ye(Br,e),ye(bt,Tr),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:mi(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=mi(t,e)}Se(bt),ye(bt,t)}function Hn(){Se(bt),Se(Br),Se(Pr)}function oc(e){mn(Pr.current);var t=mn(bt.current),n=mi(t,e.type);t!==n&&(ye(Br,e),ye(bt,n))}function ml(e){Br.current===e&&(Se(bt),Se(Br))}var be=Gt(0);function Bo(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)!==0)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 yl=[];function xl(){for(var e=0;e<yl.length;e++)yl[e]._workInProgressVersionPrimary=null;yl.length=0}var Po=F.ReactCurrentDispatcher,vl=F.ReactCurrentBatchConfig,yn=0,ze=null,Ne=null,Me=null,Wo=!1,Wr=!1,Ar=0,Ef=0;function Qe(){throw Error(a(321))}function Sl(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!yt(e[n],t[n]))return!1;return!0}function jl(e,t,n,o,i,s){if(yn=s,ze=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Po.current=e===null||e.memoizedState===null?Wf:Af,e=n(o,i),Wr){s=0;do{if(Wr=!1,Ar=0,25<=s)throw Error(a(301));s+=1,Me=Ne=null,t.updateQueue=null,Po.current=Lf,e=n(o,i)}while(Wr)}if(Po.current=No,t=Ne!==null&&Ne.next!==null,yn=0,Me=Ne=ze=null,Wo=!1,t)throw Error(a(300));return e}function wl(){var e=Ar!==0;return Ar=0,e}function zt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Me===null?ze.memoizedState=Me=e:Me=Me.next=e,Me}function pt(){if(Ne===null){var e=ze.alternate;e=e!==null?e.memoizedState:null}else e=Ne.next;var t=Me===null?ze.memoizedState:Me.next;if(t!==null)Me=t,Ne=e;else{if(e===null)throw Error(a(310));Ne=e,e={memoizedState:Ne.memoizedState,baseState:Ne.baseState,baseQueue:Ne.baseQueue,queue:Ne.queue,next:null},Me===null?ze.memoizedState=Me=e:Me=Me.next=e}return Me}function Lr(e,t){return typeof t=="function"?t(e):t}function kl(e){var t=pt(),n=t.queue;if(n===null)throw Error(a(311));n.lastRenderedReducer=e;var o=Ne,i=o.baseQueue,s=n.pending;if(s!==null){if(i!==null){var d=i.next;i.next=s.next,s.next=d}o.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,o=o.baseState;var p=d=null,m=null,E=s;do{var I=E.lane;if((yn&I)===I)m!==null&&(m=m.next={lane:0,action:E.action,hasEagerState:E.hasEagerState,eagerState:E.eagerState,next:null}),o=E.hasEagerState?E.eagerState:e(o,E.action);else{var O={lane:I,action:E.action,hasEagerState:E.hasEagerState,eagerState:E.eagerState,next:null};m===null?(p=m=O,d=o):m=m.next=O,ze.lanes|=I,xn|=I}E=E.next}while(E!==null&&E!==s);m===null?d=o:m.next=p,yt(o,t.memoizedState)||(tt=!0),t.memoizedState=o,t.baseState=d,t.baseQueue=m,n.lastRenderedState=o}if(e=n.interleaved,e!==null){i=e;do s=i.lane,ze.lanes|=s,xn|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Cl(e){var t=pt(),n=t.queue;if(n===null)throw Error(a(311));n.lastRenderedReducer=e;var o=n.dispatch,i=n.pending,s=t.memoizedState;if(i!==null){n.pending=null;var d=i=i.next;do s=e(s,d.action),d=d.next;while(d!==i);yt(s,t.memoizedState)||(tt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,o]}function ic(){}function lc(e,t){var n=ze,o=pt(),i=t(),s=!yt(o.memoizedState,i);if(s&&(o.memoizedState=i,tt=!0),o=o.queue,bl(cc.bind(null,n,o,e),[e]),o.getSnapshot!==t||s||Me!==null&&Me.memoizedState.tag&1){if(n.flags|=2048,Nr(9,ac.bind(null,n,o,i,t),void 0,null),De===null)throw Error(a(349));(yn&30)!==0||sc(n,t,i)}return i}function sc(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ze.updateQueue,t===null?(t={lastEffect:null,stores:null},ze.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function ac(e,t,n,o){t.value=n,t.getSnapshot=o,dc(t)&&uc(e)}function cc(e,t,n){return n(function(){dc(t)&&uc(e)})}function dc(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!yt(e,n)}catch{return!0}}function uc(e){var t=Wt(e,1);t!==null&&wt(t,e,1,-1)}function fc(e){var t=zt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Lr,lastRenderedState:e},t.queue=e,e=e.dispatch=Pf.bind(null,ze,e),[t.memoizedState,e]}function Nr(e,t,n,o){return e={tag:e,create:t,destroy:n,deps:o,next:null},t=ze.updateQueue,t===null?(t={lastEffect:null,stores:null},ze.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(o=n.next,n.next=e,e.next=o,t.lastEffect=e)),e}function pc(){return pt().memoizedState}function Ao(e,t,n,o){var i=zt();ze.flags|=e,i.memoizedState=Nr(1|t,n,void 0,o===void 0?null:o)}function Lo(e,t,n,o){var i=pt();o=o===void 0?null:o;var s=void 0;if(Ne!==null){var d=Ne.memoizedState;if(s=d.destroy,o!==null&&Sl(o,d.deps)){i.memoizedState=Nr(t,n,s,o);return}}ze.flags|=e,i.memoizedState=Nr(1|t,n,s,o)}function hc(e,t){return Ao(8390656,8,e,t)}function bl(e,t){return Lo(2048,8,e,t)}function gc(e,t){return Lo(4,2,e,t)}function mc(e,t){return Lo(4,4,e,t)}function yc(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 xc(e,t,n){return n=n!=null?n.concat([e]):null,Lo(4,4,yc.bind(null,t,e),n)}function zl(){}function vc(e,t){var n=pt();t=t===void 0?null:t;var o=n.memoizedState;return o!==null&&t!==null&&Sl(t,o[1])?o[0]:(n.memoizedState=[e,t],e)}function Sc(e,t){var n=pt();t=t===void 0?null:t;var o=n.memoizedState;return o!==null&&t!==null&&Sl(t,o[1])?o[0]:(e=e(),n.memoizedState=[e,t],e)}function jc(e,t,n){return(yn&21)===0?(e.baseState&&(e.baseState=!1,tt=!0),e.memoizedState=n):(yt(n,t)||(n=Js(),ze.lanes|=n,xn|=n,e.baseState=!0),t)}function Tf(e,t){var n=he;he=n!==0&&4>n?n:4,e(!0);var o=vl.transition;vl.transition={};try{e(!1),t()}finally{he=n,vl.transition=o}}function wc(){return pt().memoizedState}function Bf(e,t,n){var o=en(e);if(n={lane:o,action:n,hasEagerState:!1,eagerState:null,next:null},kc(e))Cc(t,n);else if(n=ec(e,t,n,o),n!==null){var i=Xe();wt(n,e,o,i),bc(n,t,o)}}function Pf(e,t,n){var o=en(e),i={lane:o,action:n,hasEagerState:!1,eagerState:null,next:null};if(kc(e))Cc(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var d=t.lastRenderedState,p=s(d,n);if(i.hasEagerState=!0,i.eagerState=p,yt(p,d)){var m=t.interleaved;m===null?(i.next=i,pl(t)):(i.next=m.next,m.next=i),t.interleaved=i;return}}catch{}finally{}n=ec(e,t,i,o),n!==null&&(i=Xe(),wt(n,e,o,i),bc(n,t,o))}}function kc(e){var t=e.alternate;return e===ze||t!==null&&t===ze}function Cc(e,t){Wr=Wo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function bc(e,t,n){if((n&4194240)!==0){var o=t.lanes;o&=e.pendingLanes,n|=o,t.lanes=n,Ri(e,n)}}var No={readContext:ft,useCallback:Qe,useContext:Qe,useEffect:Qe,useImperativeHandle:Qe,useInsertionEffect:Qe,useLayoutEffect:Qe,useMemo:Qe,useReducer:Qe,useRef:Qe,useState:Qe,useDebugValue:Qe,useDeferredValue:Qe,useTransition:Qe,useMutableSource:Qe,useSyncExternalStore:Qe,useId:Qe,unstable_isNewReconciler:!1},Wf={readContext:ft,useCallback:function(e,t){return zt().memoizedState=[e,t===void 0?null:t],e},useContext:ft,useEffect:hc,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ao(4194308,4,yc.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ao(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ao(4,2,e,t)},useMemo:function(e,t){var n=zt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var o=zt();return t=n!==void 0?n(t):t,o.memoizedState=o.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},o.queue=e,e=e.dispatch=Bf.bind(null,ze,e),[o.memoizedState,e]},useRef:function(e){var t=zt();return e={current:e},t.memoizedState=e},useState:fc,useDebugValue:zl,useDeferredValue:function(e){return zt().memoizedState=e},useTransition:function(){var e=fc(!1),t=e[0];return e=Tf.bind(null,e[1]),zt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var o=ze,i=zt();if(ke){if(n===void 0)throw Error(a(407));n=n()}else{if(n=t(),De===null)throw Error(a(349));(yn&30)!==0||sc(o,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,hc(cc.bind(null,o,s,e),[e]),o.flags|=2048,Nr(9,ac.bind(null,o,s,n,t),void 0,null),n},useId:function(){var e=zt(),t=De.identifierPrefix;if(ke){var n=Pt,o=Bt;n=(o&~(1<<32-mt(o)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ar++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Ef++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Af={readContext:ft,useCallback:vc,useContext:ft,useEffect:bl,useImperativeHandle:xc,useInsertionEffect:gc,useLayoutEffect:mc,useMemo:Sc,useReducer:kl,useRef:pc,useState:function(){return kl(Lr)},useDebugValue:zl,useDeferredValue:function(e){var t=pt();return jc(t,Ne.memoizedState,e)},useTransition:function(){var e=kl(Lr)[0],t=pt().memoizedState;return[e,t]},useMutableSource:ic,useSyncExternalStore:lc,useId:wc,unstable_isNewReconciler:!1},Lf={readContext:ft,useCallback:vc,useContext:ft,useEffect:bl,useImperativeHandle:xc,useInsertionEffect:gc,useLayoutEffect:mc,useMemo:Sc,useReducer:Cl,useRef:pc,useState:function(){return Cl(Lr)},useDebugValue:zl,useDeferredValue:function(e){var t=pt();return Ne===null?t.memoizedState=e:jc(t,Ne.memoizedState,e)},useTransition:function(){var e=Cl(Lr)[0],t=pt().memoizedState;return[e,t]},useMutableSource:ic,useSyncExternalStore:lc,useId:wc,unstable_isNewReconciler:!1};function vt(e,t){if(e&&e.defaultProps){t=$({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function _l(e,t,n,o){t=e.memoizedState,n=n(o,t),n=n==null?t:$({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Io={isMounted:function(e){return(e=e._reactInternals)?dn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var o=Xe(),i=en(e),s=At(o,i);s.payload=t,n!=null&&(s.callback=n),t=Yt(e,s,i),t!==null&&(wt(t,e,i,o),Eo(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var o=Xe(),i=en(e),s=At(o,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=Yt(e,s,i),t!==null&&(wt(t,e,i,o),Eo(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Xe(),o=en(e),i=At(n,o);i.tag=2,t!=null&&(i.callback=t),t=Yt(e,i,o),t!==null&&(wt(t,e,o,n),Eo(t,e,o))}};function zc(e,t,n,o,i,s,d){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,s,d):t.prototype&&t.prototype.isPureReactComponent?!wr(n,o)||!wr(i,s):!0}function _c(e,t,n){var o=!1,i=Qt,s=t.contextType;return typeof s=="object"&&s!==null?s=ft(s):(i=et(t)?fn:Ge.current,o=t.contextTypes,s=(o=o!=null)?In(e,i):Qt),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Io,e.stateNode=t,t._reactInternals=e,o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function Rc(e,t,n,o){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,o),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,o),t.state!==e&&Io.enqueueReplaceState(t,t.state,null)}function Rl(e,t,n,o){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},hl(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=ft(s):(s=et(t)?fn:Ge.current,i.context=In(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(_l(e,t,s,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&Io.enqueueReplaceState(i,i.state,null),To(e,n,i,o),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Vn(e,t){try{var n="",o=t;do n+=H(o),o=o.return;while(o);var i=n}catch(s){i=`
39
+ Error generating stack: `+s.message+`
40
+ `+s.stack}return{value:e,source:t,stack:i,digest:null}}function El(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Tl(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Nf=typeof WeakMap=="function"?WeakMap:Map;function Ec(e,t,n){n=At(-1,n),n.tag=3,n.payload={element:null};var o=t.value;return n.callback=function(){Ho||(Ho=!0,Vl=o),Tl(e,t)},n}function Tc(e,t,n){n=At(-1,n),n.tag=3;var o=e.type.getDerivedStateFromError;if(typeof o=="function"){var i=t.value;n.payload=function(){return o(i)},n.callback=function(){Tl(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Tl(e,t),typeof o!="function"&&(Xt===null?Xt=new Set([this]):Xt.add(this));var d=t.stack;this.componentDidCatch(t.value,{componentStack:d!==null?d:""})}),n}function Bc(e,t,n){var o=e.pingCache;if(o===null){o=e.pingCache=new Nf;var i=new Set;o.set(t,i)}else i=o.get(t),i===void 0&&(i=new Set,o.set(t,i));i.has(n)||(i.add(n),e=Yf.bind(null,e,t,n),t.then(e,e))}function Pc(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 Wc(e,t,n,o,i){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=At(-1,1),t.tag=2,Yt(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var If=F.ReactCurrentOwner,tt=!1;function Je(e,t,n,o){t.child=e===null?Za(t,null,n,o):Dn(t,e.child,n,o)}function Ac(e,t,n,o,i){n=n.render;var s=t.ref;return Un(t,i),o=jl(e,t,n,o,s,i),n=wl(),e!==null&&!tt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Lt(e,t,i)):(ke&&n&&ol(t),t.flags|=1,Je(e,t,o,i),t.child)}function Lc(e,t,n,o,i){if(e===null){var s=n.type;return typeof s=="function"&&!Xl(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,Nc(e,t,s,o,i)):(e=Yo(n.type,null,o,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,(e.lanes&i)===0){var d=s.memoizedProps;if(n=n.compare,n=n!==null?n:wr,n(d,o)&&e.ref===t.ref)return Lt(e,t,i)}return t.flags|=1,e=nn(s,o),e.ref=t.ref,e.return=t,t.child=e}function Nc(e,t,n,o,i){if(e!==null){var s=e.memoizedProps;if(wr(s,o)&&e.ref===t.ref)if(tt=!1,t.pendingProps=o=s,(e.lanes&i)!==0)(e.flags&131072)!==0&&(tt=!0);else return t.lanes=e.lanes,Lt(e,t,i)}return Bl(e,t,n,o,i)}function Ic(e,t,n){var o=t.pendingProps,i=o.children,s=e!==null?e.memoizedState:null;if(o.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ye(Qn,ct),ct|=n;else{if((n&1073741824)===0)return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ye(Qn,ct),ct|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},o=s!==null?s.baseLanes:n,ye(Qn,ct),ct|=o}else s!==null?(o=s.baseLanes|n,t.memoizedState=null):o=n,ye(Qn,ct),ct|=o;return Je(e,t,i,n),t.child}function Oc(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Bl(e,t,n,o,i){var s=et(n)?fn:Ge.current;return s=In(t,s),Un(t,i),n=jl(e,t,n,o,s,i),o=wl(),e!==null&&!tt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Lt(e,t,i)):(ke&&o&&ol(t),t.flags|=1,Je(e,t,n,i),t.child)}function Fc(e,t,n,o,i){if(et(n)){var s=!0;jo(t)}else s=!1;if(Un(t,i),t.stateNode===null)Fo(e,t),_c(t,n,o),Rl(t,n,o,i),o=!0;else if(e===null){var d=t.stateNode,p=t.memoizedProps;d.props=p;var m=d.context,E=n.contextType;typeof E=="object"&&E!==null?E=ft(E):(E=et(n)?fn:Ge.current,E=In(t,E));var I=n.getDerivedStateFromProps,O=typeof I=="function"||typeof d.getSnapshotBeforeUpdate=="function";O||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(p!==o||m!==E)&&Rc(t,d,o,E),qt=!1;var N=t.memoizedState;d.state=N,To(t,o,d,i),m=t.memoizedState,p!==o||N!==m||Ze.current||qt?(typeof I=="function"&&(_l(t,n,I,o),m=t.memoizedState),(p=qt||zc(t,n,p,o,N,m,E))?(O||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(t.flags|=4194308)):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=o,t.memoizedState=m),d.props=o,d.state=m,d.context=E,o=p):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),o=!1)}else{d=t.stateNode,tc(e,t),p=t.memoizedProps,E=t.type===t.elementType?p:vt(t.type,p),d.props=E,O=t.pendingProps,N=d.context,m=n.contextType,typeof m=="object"&&m!==null?m=ft(m):(m=et(n)?fn:Ge.current,m=In(t,m));var U=n.getDerivedStateFromProps;(I=typeof U=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(p!==O||N!==m)&&Rc(t,d,o,m),qt=!1,N=t.memoizedState,d.state=N,To(t,o,d,i);var G=t.memoizedState;p!==O||N!==G||Ze.current||qt?(typeof U=="function"&&(_l(t,n,U,o),G=t.memoizedState),(E=qt||zc(t,n,E,o,N,G,m)||!1)?(I||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(o,G,m),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(o,G,m)),typeof d.componentDidUpdate=="function"&&(t.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof d.componentDidUpdate!="function"||p===e.memoizedProps&&N===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&N===e.memoizedState||(t.flags|=1024),t.memoizedProps=o,t.memoizedState=G),d.props=o,d.state=G,d.context=m,o=E):(typeof d.componentDidUpdate!="function"||p===e.memoizedProps&&N===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&N===e.memoizedState||(t.flags|=1024),o=!1)}return Pl(e,t,n,o,s,i)}function Pl(e,t,n,o,i,s){Oc(e,t);var d=(t.flags&128)!==0;if(!o&&!d)return i&&Ha(t,n,!1),Lt(e,t,s);o=t.stateNode,If.current=t;var p=d&&typeof n.getDerivedStateFromError!="function"?null:o.render();return t.flags|=1,e!==null&&d?(t.child=Dn(t,e.child,null,s),t.child=Dn(t,null,p,s)):Je(e,t,p,s),t.memoizedState=o.state,i&&Ha(t,n,!0),t.child}function Mc(e){var t=e.stateNode;t.pendingContext?$a(e,t.pendingContext,t.pendingContext!==t.context):t.context&&$a(e,t.context,!1),gl(e,t.containerInfo)}function Dc(e,t,n,o,i){return Mn(),al(i),t.flags|=256,Je(e,t,n,o),t.child}var Wl={dehydrated:null,treeContext:null,retryLane:0};function Al(e){return{baseLanes:e,cachePool:null,transitions:null}}function $c(e,t,n){var o=t.pendingProps,i=be.current,s=!1,d=(t.flags&128)!==0,p;if((p=d)||(p=e!==null&&e.memoizedState===null?!1:(i&2)!==0),p?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),ye(be,i&1),e===null)return sl(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(d=o.children,e=o.fallback,s?(o=t.mode,s=t.child,d={mode:"hidden",children:d},(o&1)===0&&s!==null?(s.childLanes=0,s.pendingProps=d):s=Jo(d,o,0,null),e=wn(e,o,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Al(n),t.memoizedState=Wl,e):Ll(t,d));if(i=e.memoizedState,i!==null&&(p=i.dehydrated,p!==null))return Of(e,t,d,o,p,i,n);if(s){s=o.fallback,d=t.mode,i=e.child,p=i.sibling;var m={mode:"hidden",children:o.children};return(d&1)===0&&t.child!==i?(o=t.child,o.childLanes=0,o.pendingProps=m,t.deletions=null):(o=nn(i,m),o.subtreeFlags=i.subtreeFlags&14680064),p!==null?s=nn(p,s):(s=wn(s,d,n,null),s.flags|=2),s.return=t,o.return=t,o.sibling=s,t.child=o,o=s,s=t.child,d=e.child.memoizedState,d=d===null?Al(n):{baseLanes:d.baseLanes|n,cachePool:null,transitions:d.transitions},s.memoizedState=d,s.childLanes=e.childLanes&~n,t.memoizedState=Wl,o}return s=e.child,e=s.sibling,o=nn(s,{mode:"visible",children:o.children}),(t.mode&1)===0&&(o.lanes=n),o.return=t,o.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=o,t.memoizedState=null,o}function Ll(e,t){return t=Jo({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Oo(e,t,n,o){return o!==null&&al(o),Dn(t,e.child,null,n),e=Ll(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Of(e,t,n,o,i,s,d){if(n)return t.flags&256?(t.flags&=-257,o=El(Error(a(422))),Oo(e,t,d,o)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=o.fallback,i=t.mode,o=Jo({mode:"visible",children:o.children},i,0,null),s=wn(s,i,d,null),s.flags|=2,o.return=t,s.return=t,o.sibling=s,t.child=o,(t.mode&1)!==0&&Dn(t,e.child,null,d),t.child.memoizedState=Al(d),t.memoizedState=Wl,s);if((t.mode&1)===0)return Oo(e,t,d,null);if(i.data==="$!"){if(o=i.nextSibling&&i.nextSibling.dataset,o)var p=o.dgst;return o=p,s=Error(a(419)),o=El(s,o,void 0),Oo(e,t,d,o)}if(p=(d&e.childLanes)!==0,tt||p){if(o=De,o!==null){switch(d&-d){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=(i&(o.suspendedLanes|d))!==0?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,Wt(e,i),wt(o,e,i,-1))}return Jl(),o=El(Error(a(421))),Oo(e,t,d,o)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=Jf.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,at=Vt(i.nextSibling),st=t,ke=!0,xt=null,e!==null&&(dt[ut++]=Bt,dt[ut++]=Pt,dt[ut++]=pn,Bt=e.id,Pt=e.overflow,pn=t),t=Ll(t,o.children),t.flags|=4096,t)}function Uc(e,t,n){e.lanes|=t;var o=e.alternate;o!==null&&(o.lanes|=t),fl(e.return,t,n)}function Nl(e,t,n,o,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:o,tail:n,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=o,s.tail=n,s.tailMode=i)}function Hc(e,t,n){var o=t.pendingProps,i=o.revealOrder,s=o.tail;if(Je(e,t,o.children,n),o=be.current,(o&2)!==0)o=o&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Uc(e,n,t);else if(e.tag===19)Uc(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}o&=1}if(ye(be,o),(t.mode&1)===0)t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Bo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Nl(t,!1,i,n,s);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Bo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Nl(t,!0,n,null,s);break;case"together":Nl(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Fo(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Lt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),xn|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(a(153));if(t.child!==null){for(e=t.child,n=nn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=nn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Ff(e,t,n){switch(t.tag){case 3:Mc(t),Mn();break;case 5:oc(t);break;case 1:et(t.type)&&jo(t);break;case 4:gl(t,t.stateNode.containerInfo);break;case 10:var o=t.type._context,i=t.memoizedProps.value;ye(_o,o._currentValue),o._currentValue=i;break;case 13:if(o=t.memoizedState,o!==null)return o.dehydrated!==null?(ye(be,be.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?$c(e,t,n):(ye(be,be.current&1),e=Lt(e,t,n),e!==null?e.sibling:null);ye(be,be.current&1);break;case 19:if(o=(n&t.childLanes)!==0,(e.flags&128)!==0){if(o)return Hc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ye(be,be.current),o)break;return null;case 22:case 23:return t.lanes=0,Ic(e,t,n)}return Lt(e,t,n)}var Vc,Il,Gc,Qc;Vc=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}},Il=function(){},Gc=function(e,t,n,o){var i=e.memoizedProps;if(i!==o){e=t.stateNode,mn(bt.current);var s=null;switch(n){case"input":i=fi(e,i),o=fi(e,o),s=[];break;case"select":i=$({},i,{value:void 0}),o=$({},o,{value:void 0}),s=[];break;case"textarea":i=gi(e,i),o=gi(e,o),s=[];break;default:typeof i.onClick!="function"&&typeof o.onClick=="function"&&(e.onclick=xo)}yi(n,o);var d;n=null;for(E in i)if(!o.hasOwnProperty(E)&&i.hasOwnProperty(E)&&i[E]!=null)if(E==="style"){var p=i[E];for(d in p)p.hasOwnProperty(d)&&(n||(n={}),n[d]="")}else E!=="dangerouslySetInnerHTML"&&E!=="children"&&E!=="suppressContentEditableWarning"&&E!=="suppressHydrationWarning"&&E!=="autoFocus"&&(u.hasOwnProperty(E)?s||(s=[]):(s=s||[]).push(E,null));for(E in o){var m=o[E];if(p=i!=null?i[E]:void 0,o.hasOwnProperty(E)&&m!==p&&(m!=null||p!=null))if(E==="style")if(p){for(d in p)!p.hasOwnProperty(d)||m&&m.hasOwnProperty(d)||(n||(n={}),n[d]="");for(d in m)m.hasOwnProperty(d)&&p[d]!==m[d]&&(n||(n={}),n[d]=m[d])}else n||(s||(s=[]),s.push(E,n)),n=m;else E==="dangerouslySetInnerHTML"?(m=m?m.__html:void 0,p=p?p.__html:void 0,m!=null&&p!==m&&(s=s||[]).push(E,m)):E==="children"?typeof m!="string"&&typeof m!="number"||(s=s||[]).push(E,""+m):E!=="suppressContentEditableWarning"&&E!=="suppressHydrationWarning"&&(u.hasOwnProperty(E)?(m!=null&&E==="onScroll"&&ve("scroll",e),s||p===m||(s=[])):(s=s||[]).push(E,m))}n&&(s=s||[]).push("style",n);var E=s;(t.updateQueue=E)&&(t.flags|=4)}},Qc=function(e,t,n,o){n!==o&&(t.flags|=4)};function Ir(e,t){if(!ke)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 o=null;n!==null;)n.alternate!==null&&(o=n),n=n.sibling;o===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function Ke(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,o=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,o|=i.subtreeFlags&14680064,o|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,o|=i.subtreeFlags,o|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=o,e.childLanes=n,t}function Mf(e,t,n){var o=t.pendingProps;switch(il(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ke(t),null;case 1:return et(t.type)&&So(),Ke(t),null;case 3:return o=t.stateNode,Hn(),Se(Ze),Se(Ge),xl(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(e===null||e.child===null)&&(bo(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,xt!==null&&(Kl(xt),xt=null))),Il(e,t),Ke(t),null;case 5:ml(t);var i=mn(Pr.current);if(n=t.type,e!==null&&t.stateNode!=null)Gc(e,t,n,o,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!o){if(t.stateNode===null)throw Error(a(166));return Ke(t),null}if(e=mn(bt.current),bo(t)){o=t.stateNode,n=t.type;var s=t.memoizedProps;switch(o[Ct]=t,o[_r]=s,e=(t.mode&1)!==0,n){case"dialog":ve("cancel",o),ve("close",o);break;case"iframe":case"object":case"embed":ve("load",o);break;case"video":case"audio":for(i=0;i<Cr.length;i++)ve(Cr[i],o);break;case"source":ve("error",o);break;case"img":case"image":case"link":ve("error",o),ve("load",o);break;case"details":ve("toggle",o);break;case"input":_s(o,s),ve("invalid",o);break;case"select":o._wrapperState={wasMultiple:!!s.multiple},ve("invalid",o);break;case"textarea":Ts(o,s),ve("invalid",o)}yi(n,s),i=null;for(var d in s)if(s.hasOwnProperty(d)){var p=s[d];d==="children"?typeof p=="string"?o.textContent!==p&&(s.suppressHydrationWarning!==!0&&yo(o.textContent,p,e),i=["children",p]):typeof p=="number"&&o.textContent!==""+p&&(s.suppressHydrationWarning!==!0&&yo(o.textContent,p,e),i=["children",""+p]):u.hasOwnProperty(d)&&p!=null&&d==="onScroll"&&ve("scroll",o)}switch(n){case"input":Qr(o),Es(o,s,!0);break;case"textarea":Qr(o),Ps(o);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(o.onclick=xo)}o=i,t.updateQueue=o,o!==null&&(t.flags|=4)}else{d=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Ws(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=d.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof o.is=="string"?e=d.createElement(n,{is:o.is}):(e=d.createElement(n),n==="select"&&(d=e,o.multiple?d.multiple=!0:o.size&&(d.size=o.size))):e=d.createElementNS(e,n),e[Ct]=t,e[_r]=o,Vc(e,t,!1,!1),t.stateNode=e;e:{switch(d=xi(n,o),n){case"dialog":ve("cancel",e),ve("close",e),i=o;break;case"iframe":case"object":case"embed":ve("load",e),i=o;break;case"video":case"audio":for(i=0;i<Cr.length;i++)ve(Cr[i],e);i=o;break;case"source":ve("error",e),i=o;break;case"img":case"image":case"link":ve("error",e),ve("load",e),i=o;break;case"details":ve("toggle",e),i=o;break;case"input":_s(e,o),i=fi(e,o),ve("invalid",e);break;case"option":i=o;break;case"select":e._wrapperState={wasMultiple:!!o.multiple},i=$({},o,{value:void 0}),ve("invalid",e);break;case"textarea":Ts(e,o),i=gi(e,o),ve("invalid",e);break;default:i=o}yi(n,i),p=i;for(s in p)if(p.hasOwnProperty(s)){var m=p[s];s==="style"?Ns(e,m):s==="dangerouslySetInnerHTML"?(m=m?m.__html:void 0,m!=null&&As(e,m)):s==="children"?typeof m=="string"?(n!=="textarea"||m!=="")&&ir(e,m):typeof m=="number"&&ir(e,""+m):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(u.hasOwnProperty(s)?m!=null&&s==="onScroll"&&ve("scroll",e):m!=null&&Q(e,s,m,d))}switch(n){case"input":Qr(e),Es(e,o,!1);break;case"textarea":Qr(e),Ps(e);break;case"option":o.value!=null&&e.setAttribute("value",""+pe(o.value));break;case"select":e.multiple=!!o.multiple,s=o.value,s!=null?bn(e,!!o.multiple,s,!1):o.defaultValue!=null&&bn(e,!!o.multiple,o.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=xo)}switch(n){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}}o&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Ke(t),null;case 6:if(e&&t.stateNode!=null)Qc(e,t,e.memoizedProps,o);else{if(typeof o!="string"&&t.stateNode===null)throw Error(a(166));if(n=mn(Pr.current),mn(bt.current),bo(t)){if(o=t.stateNode,n=t.memoizedProps,o[Ct]=t,(s=o.nodeValue!==n)&&(e=st,e!==null))switch(e.tag){case 3:yo(o.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&yo(o.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else o=(n.nodeType===9?n:n.ownerDocument).createTextNode(o),o[Ct]=t,t.stateNode=o}return Ke(t),null;case 13:if(Se(be),o=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ke&&at!==null&&(t.mode&1)!==0&&(t.flags&128)===0)Ya(),Mn(),t.flags|=98560,s=!1;else if(s=bo(t),o!==null&&o.dehydrated!==null){if(e===null){if(!s)throw Error(a(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(a(317));s[Ct]=t}else Mn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ke(t),s=!1}else xt!==null&&(Kl(xt),xt=null),s=!0;if(!s)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=n,t):(o=o!==null,o!==(e!==null&&e.memoizedState!==null)&&o&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(be.current&1)!==0?Ie===0&&(Ie=3):Jl())),t.updateQueue!==null&&(t.flags|=4),Ke(t),null);case 4:return Hn(),Il(e,t),e===null&&br(t.stateNode.containerInfo),Ke(t),null;case 10:return ul(t.type._context),Ke(t),null;case 17:return et(t.type)&&So(),Ke(t),null;case 19:if(Se(be),s=t.memoizedState,s===null)return Ke(t),null;if(o=(t.flags&128)!==0,d=s.rendering,d===null)if(o)Ir(s,!1);else{if(Ie!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(d=Bo(e),d!==null){for(t.flags|=128,Ir(s,!1),o=d.updateQueue,o!==null&&(t.updateQueue=o,t.flags|=4),t.subtreeFlags=0,o=n,n=t.child;n!==null;)s=n,e=o,s.flags&=14680066,d=s.alternate,d===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=d.childLanes,s.lanes=d.lanes,s.child=d.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=d.memoizedProps,s.memoizedState=d.memoizedState,s.updateQueue=d.updateQueue,s.type=d.type,e=d.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ye(be,be.current&1|2),t.child}e=e.sibling}s.tail!==null&&Be()>Kn&&(t.flags|=128,o=!0,Ir(s,!1),t.lanes=4194304)}else{if(!o)if(e=Bo(d),e!==null){if(t.flags|=128,o=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Ir(s,!0),s.tail===null&&s.tailMode==="hidden"&&!d.alternate&&!ke)return Ke(t),null}else 2*Be()-s.renderingStartTime>Kn&&n!==1073741824&&(t.flags|=128,o=!0,Ir(s,!1),t.lanes=4194304);s.isBackwards?(d.sibling=t.child,t.child=d):(n=s.last,n!==null?n.sibling=d:t.child=d,s.last=d)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Be(),t.sibling=null,n=be.current,ye(be,o?n&1|2:n&1),t):(Ke(t),null);case 22:case 23:return Yl(),o=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==o&&(t.flags|=8192),o&&(t.mode&1)!==0?(ct&1073741824)!==0&&(Ke(t),t.subtreeFlags&6&&(t.flags|=8192)):Ke(t),null;case 24:return null;case 25:return null}throw Error(a(156,t.tag))}function Df(e,t){switch(il(t),t.tag){case 1:return et(t.type)&&So(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Hn(),Se(Ze),Se(Ge),xl(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return ml(t),null;case 13:if(Se(be),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(a(340));Mn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Se(be),null;case 4:return Hn(),null;case 10:return ul(t.type._context),null;case 22:case 23:return Yl(),null;case 24:return null;default:return null}}var Mo=!1,qe=!1,$f=typeof WeakSet=="function"?WeakSet:Set,V=null;function Gn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(o){Ee(e,t,o)}else n.current=null}function Ol(e,t,n){try{n()}catch(o){Ee(e,t,o)}}var Kc=!1;function Uf(e,t){if(Yi=io,e=za(),$i(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var o=n.getSelection&&n.getSelection();if(o&&o.rangeCount!==0){n=o.anchorNode;var i=o.anchorOffset,s=o.focusNode;o=o.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var d=0,p=-1,m=-1,E=0,I=0,O=e,N=null;t:for(;;){for(var U;O!==n||i!==0&&O.nodeType!==3||(p=d+i),O!==s||o!==0&&O.nodeType!==3||(m=d+o),O.nodeType===3&&(d+=O.nodeValue.length),(U=O.firstChild)!==null;)N=O,O=U;for(;;){if(O===e)break t;if(N===n&&++E===i&&(p=d),N===s&&++I===o&&(m=d),(U=O.nextSibling)!==null)break;O=N,N=O.parentNode}O=U}n=p===-1||m===-1?null:{start:p,end:m}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ji={focusedElem:e,selectionRange:n},io=!1,V=t;V!==null;)if(t=V,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,V=e;else for(;V!==null;){t=V;try{var G=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(G!==null){var q=G.memoizedProps,Pe=G.memoizedState,b=t.stateNode,S=b.getSnapshotBeforeUpdate(t.elementType===t.type?q:vt(t.type,q),Pe);b.__reactInternalSnapshotBeforeUpdate=S}break;case 3:var z=t.stateNode.containerInfo;z.nodeType===1?z.textContent="":z.nodeType===9&&z.documentElement&&z.removeChild(z.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(M){Ee(t,t.return,M)}if(e=t.sibling,e!==null){e.return=t.return,V=e;break}V=t.return}return G=Kc,Kc=!1,G}function Or(e,t,n){var o=t.updateQueue;if(o=o!==null?o.lastEffect:null,o!==null){var i=o=o.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&Ol(t,n,s)}i=i.next}while(i!==o)}}function Do(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 o=n.create;n.destroy=o()}n=n.next}while(n!==t)}}function Fl(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 qc(e){var t=e.alternate;t!==null&&(e.alternate=null,qc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ct],delete t[_r],delete t[tl],delete t[bf],delete t[zf])),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 Yc(e){return e.tag===5||e.tag===3||e.tag===4}function Jc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Yc(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 Ml(e,t,n){var o=e.tag;if(o===5||o===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=xo));else if(o!==4&&(e=e.child,e!==null))for(Ml(e,t,n),e=e.sibling;e!==null;)Ml(e,t,n),e=e.sibling}function Dl(e,t,n){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(o!==4&&(e=e.child,e!==null))for(Dl(e,t,n),e=e.sibling;e!==null;)Dl(e,t,n),e=e.sibling}var He=null,St=!1;function Jt(e,t,n){for(n=n.child;n!==null;)Xc(e,t,n),n=n.sibling}function Xc(e,t,n){if(kt&&typeof kt.onCommitFiberUnmount=="function")try{kt.onCommitFiberUnmount(Zr,n)}catch{}switch(n.tag){case 5:qe||Gn(n,t);case 6:var o=He,i=St;He=null,Jt(e,t,n),He=o,St=i,He!==null&&(St?(e=He,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):He.removeChild(n.stateNode));break;case 18:He!==null&&(St?(e=He,n=n.stateNode,e.nodeType===8?el(e.parentNode,n):e.nodeType===1&&el(e,n),mr(e)):el(He,n.stateNode));break;case 4:o=He,i=St,He=n.stateNode.containerInfo,St=!0,Jt(e,t,n),He=o,St=i;break;case 0:case 11:case 14:case 15:if(!qe&&(o=n.updateQueue,o!==null&&(o=o.lastEffect,o!==null))){i=o=o.next;do{var s=i,d=s.destroy;s=s.tag,d!==void 0&&((s&2)!==0||(s&4)!==0)&&Ol(n,t,d),i=i.next}while(i!==o)}Jt(e,t,n);break;case 1:if(!qe&&(Gn(n,t),o=n.stateNode,typeof o.componentWillUnmount=="function"))try{o.props=n.memoizedProps,o.state=n.memoizedState,o.componentWillUnmount()}catch(p){Ee(n,t,p)}Jt(e,t,n);break;case 21:Jt(e,t,n);break;case 22:n.mode&1?(qe=(o=qe)||n.memoizedState!==null,Jt(e,t,n),qe=o):Jt(e,t,n);break;default:Jt(e,t,n)}}function Zc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new $f),t.forEach(function(o){var i=Xf.bind(null,e,o);n.has(o)||(n.add(o),o.then(i,i))})}}function jt(e,t){var n=t.deletions;if(n!==null)for(var o=0;o<n.length;o++){var i=n[o];try{var s=e,d=t,p=d;e:for(;p!==null;){switch(p.tag){case 5:He=p.stateNode,St=!1;break e;case 3:He=p.stateNode.containerInfo,St=!0;break e;case 4:He=p.stateNode.containerInfo,St=!0;break e}p=p.return}if(He===null)throw Error(a(160));Xc(s,d,i),He=null,St=!1;var m=i.alternate;m!==null&&(m.return=null),i.return=null}catch(E){Ee(i,t,E)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)ed(t,e),t=t.sibling}function ed(e,t){var n=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(jt(t,e),_t(e),o&4){try{Or(3,e,e.return),Do(3,e)}catch(q){Ee(e,e.return,q)}try{Or(5,e,e.return)}catch(q){Ee(e,e.return,q)}}break;case 1:jt(t,e),_t(e),o&512&&n!==null&&Gn(n,n.return);break;case 5:if(jt(t,e),_t(e),o&512&&n!==null&&Gn(n,n.return),e.flags&32){var i=e.stateNode;try{ir(i,"")}catch(q){Ee(e,e.return,q)}}if(o&4&&(i=e.stateNode,i!=null)){var s=e.memoizedProps,d=n!==null?n.memoizedProps:s,p=e.type,m=e.updateQueue;if(e.updateQueue=null,m!==null)try{p==="input"&&s.type==="radio"&&s.name!=null&&Rs(i,s),xi(p,d);var E=xi(p,s);for(d=0;d<m.length;d+=2){var I=m[d],O=m[d+1];I==="style"?Ns(i,O):I==="dangerouslySetInnerHTML"?As(i,O):I==="children"?ir(i,O):Q(i,I,O,E)}switch(p){case"input":pi(i,s);break;case"textarea":Bs(i,s);break;case"select":var N=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var U=s.value;U!=null?bn(i,!!s.multiple,U,!1):N!==!!s.multiple&&(s.defaultValue!=null?bn(i,!!s.multiple,s.defaultValue,!0):bn(i,!!s.multiple,s.multiple?[]:"",!1))}i[_r]=s}catch(q){Ee(e,e.return,q)}}break;case 6:if(jt(t,e),_t(e),o&4){if(e.stateNode===null)throw Error(a(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(q){Ee(e,e.return,q)}}break;case 3:if(jt(t,e),_t(e),o&4&&n!==null&&n.memoizedState.isDehydrated)try{mr(t.containerInfo)}catch(q){Ee(e,e.return,q)}break;case 4:jt(t,e),_t(e);break;case 13:jt(t,e),_t(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(Hl=Be())),o&4&&Zc(e);break;case 22:if(I=n!==null&&n.memoizedState!==null,e.mode&1?(qe=(E=qe)||I,jt(t,e),qe=E):jt(t,e),_t(e),o&8192){if(E=e.memoizedState!==null,(e.stateNode.isHidden=E)&&!I&&(e.mode&1)!==0)for(V=e,I=e.child;I!==null;){for(O=V=I;V!==null;){switch(N=V,U=N.child,N.tag){case 0:case 11:case 14:case 15:Or(4,N,N.return);break;case 1:Gn(N,N.return);var G=N.stateNode;if(typeof G.componentWillUnmount=="function"){o=N,n=N.return;try{t=o,G.props=t.memoizedProps,G.state=t.memoizedState,G.componentWillUnmount()}catch(q){Ee(o,n,q)}}break;case 5:Gn(N,N.return);break;case 22:if(N.memoizedState!==null){rd(O);continue}}U!==null?(U.return=N,V=U):rd(O)}I=I.sibling}e:for(I=null,O=e;;){if(O.tag===5){if(I===null){I=O;try{i=O.stateNode,E?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(p=O.stateNode,m=O.memoizedProps.style,d=m!=null&&m.hasOwnProperty("display")?m.display:null,p.style.display=Ls("display",d))}catch(q){Ee(e,e.return,q)}}}else if(O.tag===6){if(I===null)try{O.stateNode.nodeValue=E?"":O.memoizedProps}catch(q){Ee(e,e.return,q)}}else if((O.tag!==22&&O.tag!==23||O.memoizedState===null||O===e)&&O.child!==null){O.child.return=O,O=O.child;continue}if(O===e)break e;for(;O.sibling===null;){if(O.return===null||O.return===e)break e;I===O&&(I=null),O=O.return}I===O&&(I=null),O.sibling.return=O.return,O=O.sibling}}break;case 19:jt(t,e),_t(e),o&4&&Zc(e);break;case 21:break;default:jt(t,e),_t(e)}}function _t(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Yc(n)){var o=n;break e}n=n.return}throw Error(a(160))}switch(o.tag){case 5:var i=o.stateNode;o.flags&32&&(ir(i,""),o.flags&=-33);var s=Jc(e);Dl(e,s,i);break;case 3:case 4:var d=o.stateNode.containerInfo,p=Jc(e);Ml(e,p,d);break;default:throw Error(a(161))}}catch(m){Ee(e,e.return,m)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Hf(e,t,n){V=e,td(e)}function td(e,t,n){for(var o=(e.mode&1)!==0;V!==null;){var i=V,s=i.child;if(i.tag===22&&o){var d=i.memoizedState!==null||Mo;if(!d){var p=i.alternate,m=p!==null&&p.memoizedState!==null||qe;p=Mo;var E=qe;if(Mo=d,(qe=m)&&!E)for(V=i;V!==null;)d=V,m=d.child,d.tag===22&&d.memoizedState!==null?od(i):m!==null?(m.return=d,V=m):od(i);for(;s!==null;)V=s,td(s),s=s.sibling;V=i,Mo=p,qe=E}nd(e)}else(i.subtreeFlags&8772)!==0&&s!==null?(s.return=i,V=s):nd(e)}}function nd(e){for(;V!==null;){var t=V;if((t.flags&8772)!==0){var n=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:qe||Do(5,t);break;case 1:var o=t.stateNode;if(t.flags&4&&!qe)if(n===null)o.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:vt(t.type,n.memoizedProps);o.componentDidUpdate(i,n.memoizedState,o.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&rc(t,s,o);break;case 3:var d=t.updateQueue;if(d!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}rc(t,d,n)}break;case 5:var p=t.stateNode;if(n===null&&t.flags&4){n=p;var m=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":m.autoFocus&&n.focus();break;case"img":m.src&&(n.src=m.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var E=t.alternate;if(E!==null){var I=E.memoizedState;if(I!==null){var O=I.dehydrated;O!==null&&mr(O)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(a(163))}qe||t.flags&512&&Fl(t)}catch(N){Ee(t,t.return,N)}}if(t===e){V=null;break}if(n=t.sibling,n!==null){n.return=t.return,V=n;break}V=t.return}}function rd(e){for(;V!==null;){var t=V;if(t===e){V=null;break}var n=t.sibling;if(n!==null){n.return=t.return,V=n;break}V=t.return}}function od(e){for(;V!==null;){var t=V;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Do(4,t)}catch(m){Ee(t,n,m)}break;case 1:var o=t.stateNode;if(typeof o.componentDidMount=="function"){var i=t.return;try{o.componentDidMount()}catch(m){Ee(t,i,m)}}var s=t.return;try{Fl(t)}catch(m){Ee(t,s,m)}break;case 5:var d=t.return;try{Fl(t)}catch(m){Ee(t,d,m)}}}catch(m){Ee(t,t.return,m)}if(t===e){V=null;break}var p=t.sibling;if(p!==null){p.return=t.return,V=p;break}V=t.return}}var Vf=Math.ceil,$o=F.ReactCurrentDispatcher,$l=F.ReactCurrentOwner,ht=F.ReactCurrentBatchConfig,de=0,De=null,We=null,Ve=0,ct=0,Qn=Gt(0),Ie=0,Fr=null,xn=0,Uo=0,Ul=0,Mr=null,nt=null,Hl=0,Kn=1/0,Nt=null,Ho=!1,Vl=null,Xt=null,Vo=!1,Zt=null,Go=0,Dr=0,Gl=null,Qo=-1,Ko=0;function Xe(){return(de&6)!==0?Be():Qo!==-1?Qo:Qo=Be()}function en(e){return(e.mode&1)===0?1:(de&2)!==0&&Ve!==0?Ve&-Ve:Rf.transition!==null?(Ko===0&&(Ko=Js()),Ko):(e=he,e!==0||(e=window.event,e=e===void 0?16:la(e.type)),e)}function wt(e,t,n,o){if(50<Dr)throw Dr=0,Gl=null,Error(a(185));ur(e,n,o),((de&2)===0||e!==De)&&(e===De&&((de&2)===0&&(Uo|=n),Ie===4&&tn(e,Ve)),rt(e,o),n===1&&de===0&&(t.mode&1)===0&&(Kn=Be()+500,wo&&Kt()))}function rt(e,t){var n=e.callbackNode;_u(e,t);var o=no(e,e===De?Ve:0);if(o===0)n!==null&&Ks(n),e.callbackNode=null,e.callbackPriority=0;else if(t=o&-o,e.callbackPriority!==t){if(n!=null&&Ks(n),t===1)e.tag===0?_f(ld.bind(null,e)):Va(ld.bind(null,e)),kf(function(){(de&6)===0&&Kt()}),n=null;else{switch(Xs(o)){case 1:n=bi;break;case 4:n=qs;break;case 16:n=Xr;break;case 536870912:n=Ys;break;default:n=Xr}n=hd(n,id.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function id(e,t){if(Qo=-1,Ko=0,(de&6)!==0)throw Error(a(327));var n=e.callbackNode;if(qn()&&e.callbackNode!==n)return null;var o=no(e,e===De?Ve:0);if(o===0)return null;if((o&30)!==0||(o&e.expiredLanes)!==0||t)t=qo(e,o);else{t=o;var i=de;de|=2;var s=ad();(De!==e||Ve!==t)&&(Nt=null,Kn=Be()+500,Sn(e,t));do try{Kf();break}catch(p){sd(e,p)}while(!0);dl(),$o.current=s,de=i,We!==null?t=0:(De=null,Ve=0,t=Ie)}if(t!==0){if(t===2&&(i=zi(e),i!==0&&(o=i,t=Ql(e,i))),t===1)throw n=Fr,Sn(e,0),tn(e,o),rt(e,Be()),n;if(t===6)tn(e,o);else{if(i=e.current.alternate,(o&30)===0&&!Gf(i)&&(t=qo(e,o),t===2&&(s=zi(e),s!==0&&(o=s,t=Ql(e,s))),t===1))throw n=Fr,Sn(e,0),tn(e,o),rt(e,Be()),n;switch(e.finishedWork=i,e.finishedLanes=o,t){case 0:case 1:throw Error(a(345));case 2:jn(e,nt,Nt);break;case 3:if(tn(e,o),(o&130023424)===o&&(t=Hl+500-Be(),10<t)){if(no(e,0)!==0)break;if(i=e.suspendedLanes,(i&o)!==o){Xe(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Zi(jn.bind(null,e,nt,Nt),t);break}jn(e,nt,Nt);break;case 4:if(tn(e,o),(o&4194240)===o)break;for(t=e.eventTimes,i=-1;0<o;){var d=31-mt(o);s=1<<d,d=t[d],d>i&&(i=d),o&=~s}if(o=i,o=Be()-o,o=(120>o?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*Vf(o/1960))-o,10<o){e.timeoutHandle=Zi(jn.bind(null,e,nt,Nt),o);break}jn(e,nt,Nt);break;case 5:jn(e,nt,Nt);break;default:throw Error(a(329))}}}return rt(e,Be()),e.callbackNode===n?id.bind(null,e):null}function Ql(e,t){var n=Mr;return e.current.memoizedState.isDehydrated&&(Sn(e,t).flags|=256),e=qo(e,t),e!==2&&(t=nt,nt=n,t!==null&&Kl(t)),e}function Kl(e){nt===null?nt=e:nt.push.apply(nt,e)}function Gf(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var o=0;o<n.length;o++){var i=n[o],s=i.getSnapshot;i=i.value;try{if(!yt(s(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function tn(e,t){for(t&=~Ul,t&=~Uo,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-mt(t),o=1<<n;e[n]=-1,t&=~o}}function ld(e){if((de&6)!==0)throw Error(a(327));qn();var t=no(e,0);if((t&1)===0)return rt(e,Be()),null;var n=qo(e,t);if(e.tag!==0&&n===2){var o=zi(e);o!==0&&(t=o,n=Ql(e,o))}if(n===1)throw n=Fr,Sn(e,0),tn(e,t),rt(e,Be()),n;if(n===6)throw Error(a(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,jn(e,nt,Nt),rt(e,Be()),null}function ql(e,t){var n=de;de|=1;try{return e(t)}finally{de=n,de===0&&(Kn=Be()+500,wo&&Kt())}}function vn(e){Zt!==null&&Zt.tag===0&&(de&6)===0&&qn();var t=de;de|=1;var n=ht.transition,o=he;try{if(ht.transition=null,he=1,e)return e()}finally{he=o,ht.transition=n,de=t,(de&6)===0&&Kt()}}function Yl(){ct=Qn.current,Se(Qn)}function Sn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,wf(n)),We!==null)for(n=We.return;n!==null;){var o=n;switch(il(o),o.tag){case 1:o=o.type.childContextTypes,o!=null&&So();break;case 3:Hn(),Se(Ze),Se(Ge),xl();break;case 5:ml(o);break;case 4:Hn();break;case 13:Se(be);break;case 19:Se(be);break;case 10:ul(o.type._context);break;case 22:case 23:Yl()}n=n.return}if(De=e,We=e=nn(e.current,null),Ve=ct=t,Ie=0,Fr=null,Ul=Uo=xn=0,nt=Mr=null,gn!==null){for(t=0;t<gn.length;t++)if(n=gn[t],o=n.interleaved,o!==null){n.interleaved=null;var i=o.next,s=n.pending;if(s!==null){var d=s.next;s.next=i,o.next=d}n.pending=o}gn=null}return e}function sd(e,t){do{var n=We;try{if(dl(),Po.current=No,Wo){for(var o=ze.memoizedState;o!==null;){var i=o.queue;i!==null&&(i.pending=null),o=o.next}Wo=!1}if(yn=0,Me=Ne=ze=null,Wr=!1,Ar=0,$l.current=null,n===null||n.return===null){Ie=1,Fr=t,We=null;break}e:{var s=e,d=n.return,p=n,m=t;if(t=Ve,p.flags|=32768,m!==null&&typeof m=="object"&&typeof m.then=="function"){var E=m,I=p,O=I.tag;if((I.mode&1)===0&&(O===0||O===11||O===15)){var N=I.alternate;N?(I.updateQueue=N.updateQueue,I.memoizedState=N.memoizedState,I.lanes=N.lanes):(I.updateQueue=null,I.memoizedState=null)}var U=Pc(d);if(U!==null){U.flags&=-257,Wc(U,d,p,s,t),U.mode&1&&Bc(s,E,t),t=U,m=E;var G=t.updateQueue;if(G===null){var q=new Set;q.add(m),t.updateQueue=q}else G.add(m);break e}else{if((t&1)===0){Bc(s,E,t),Jl();break e}m=Error(a(426))}}else if(ke&&p.mode&1){var Pe=Pc(d);if(Pe!==null){(Pe.flags&65536)===0&&(Pe.flags|=256),Wc(Pe,d,p,s,t),al(Vn(m,p));break e}}s=m=Vn(m,p),Ie!==4&&(Ie=2),Mr===null?Mr=[s]:Mr.push(s),s=d;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var b=Ec(s,m,t);nc(s,b);break e;case 1:p=m;var S=s.type,z=s.stateNode;if((s.flags&128)===0&&(typeof S.getDerivedStateFromError=="function"||z!==null&&typeof z.componentDidCatch=="function"&&(Xt===null||!Xt.has(z)))){s.flags|=65536,t&=-t,s.lanes|=t;var M=Tc(s,p,t);nc(s,M);break e}}s=s.return}while(s!==null)}dd(n)}catch(Y){t=Y,We===n&&n!==null&&(We=n=n.return);continue}break}while(!0)}function ad(){var e=$o.current;return $o.current=No,e===null?No:e}function Jl(){(Ie===0||Ie===3||Ie===2)&&(Ie=4),De===null||(xn&268435455)===0&&(Uo&268435455)===0||tn(De,Ve)}function qo(e,t){var n=de;de|=2;var o=ad();(De!==e||Ve!==t)&&(Nt=null,Sn(e,t));do try{Qf();break}catch(i){sd(e,i)}while(!0);if(dl(),de=n,$o.current=o,We!==null)throw Error(a(261));return De=null,Ve=0,Ie}function Qf(){for(;We!==null;)cd(We)}function Kf(){for(;We!==null&&!xu();)cd(We)}function cd(e){var t=pd(e.alternate,e,ct);e.memoizedProps=e.pendingProps,t===null?dd(e):We=t,$l.current=null}function dd(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=Mf(n,t,ct),n!==null){We=n;return}}else{if(n=Df(n,t),n!==null){n.flags&=32767,We=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ie=6,We=null;return}}if(t=t.sibling,t!==null){We=t;return}We=t=e}while(t!==null);Ie===0&&(Ie=5)}function jn(e,t,n){var o=he,i=ht.transition;try{ht.transition=null,he=1,qf(e,t,n,o)}finally{ht.transition=i,he=o}return null}function qf(e,t,n,o){do qn();while(Zt!==null);if((de&6)!==0)throw Error(a(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(a(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(Ru(e,s),e===De&&(We=De=null,Ve=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||Vo||(Vo=!0,hd(Xr,function(){return qn(),null})),s=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||s){s=ht.transition,ht.transition=null;var d=he;he=1;var p=de;de|=4,$l.current=null,Uf(e,n),ed(n,e),gf(Ji),io=!!Yi,Ji=Yi=null,e.current=n,Hf(n),vu(),de=p,he=d,ht.transition=s}else e.current=n;if(Vo&&(Vo=!1,Zt=e,Go=i),s=e.pendingLanes,s===0&&(Xt=null),wu(n.stateNode),rt(e,Be()),t!==null)for(o=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],o(i.value,{componentStack:i.stack,digest:i.digest});if(Ho)throw Ho=!1,e=Vl,Vl=null,e;return(Go&1)!==0&&e.tag!==0&&qn(),s=e.pendingLanes,(s&1)!==0?e===Gl?Dr++:(Dr=0,Gl=e):Dr=0,Kt(),null}function qn(){if(Zt!==null){var e=Xs(Go),t=ht.transition,n=he;try{if(ht.transition=null,he=16>e?16:e,Zt===null)var o=!1;else{if(e=Zt,Zt=null,Go=0,(de&6)!==0)throw Error(a(331));var i=de;for(de|=4,V=e.current;V!==null;){var s=V,d=s.child;if((V.flags&16)!==0){var p=s.deletions;if(p!==null){for(var m=0;m<p.length;m++){var E=p[m];for(V=E;V!==null;){var I=V;switch(I.tag){case 0:case 11:case 15:Or(8,I,s)}var O=I.child;if(O!==null)O.return=I,V=O;else for(;V!==null;){I=V;var N=I.sibling,U=I.return;if(qc(I),I===E){V=null;break}if(N!==null){N.return=U,V=N;break}V=U}}}var G=s.alternate;if(G!==null){var q=G.child;if(q!==null){G.child=null;do{var Pe=q.sibling;q.sibling=null,q=Pe}while(q!==null)}}V=s}}if((s.subtreeFlags&2064)!==0&&d!==null)d.return=s,V=d;else e:for(;V!==null;){if(s=V,(s.flags&2048)!==0)switch(s.tag){case 0:case 11:case 15:Or(9,s,s.return)}var b=s.sibling;if(b!==null){b.return=s.return,V=b;break e}V=s.return}}var S=e.current;for(V=S;V!==null;){d=V;var z=d.child;if((d.subtreeFlags&2064)!==0&&z!==null)z.return=d,V=z;else e:for(d=S;V!==null;){if(p=V,(p.flags&2048)!==0)try{switch(p.tag){case 0:case 11:case 15:Do(9,p)}}catch(Y){Ee(p,p.return,Y)}if(p===d){V=null;break e}var M=p.sibling;if(M!==null){M.return=p.return,V=M;break e}V=p.return}}if(de=i,Kt(),kt&&typeof kt.onPostCommitFiberRoot=="function")try{kt.onPostCommitFiberRoot(Zr,e)}catch{}o=!0}return o}finally{he=n,ht.transition=t}}return!1}function ud(e,t,n){t=Vn(n,t),t=Ec(e,t,1),e=Yt(e,t,1),t=Xe(),e!==null&&(ur(e,1,t),rt(e,t))}function Ee(e,t,n){if(e.tag===3)ud(e,e,n);else for(;t!==null;){if(t.tag===3){ud(t,e,n);break}else if(t.tag===1){var o=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(Xt===null||!Xt.has(o))){e=Vn(n,e),e=Tc(t,e,1),t=Yt(t,e,1),e=Xe(),t!==null&&(ur(t,1,e),rt(t,e));break}}t=t.return}}function Yf(e,t,n){var o=e.pingCache;o!==null&&o.delete(t),t=Xe(),e.pingedLanes|=e.suspendedLanes&n,De===e&&(Ve&n)===n&&(Ie===4||Ie===3&&(Ve&130023424)===Ve&&500>Be()-Hl?Sn(e,0):Ul|=n),rt(e,t)}function fd(e,t){t===0&&((e.mode&1)===0?t=1:(t=to,to<<=1,(to&130023424)===0&&(to=4194304)));var n=Xe();e=Wt(e,t),e!==null&&(ur(e,t,n),rt(e,n))}function Jf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),fd(e,n)}function Xf(e,t){var n=0;switch(e.tag){case 13:var o=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:o=e.stateNode;break;default:throw Error(a(314))}o!==null&&o.delete(t),fd(e,n)}var pd;pd=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ze.current)tt=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return tt=!1,Ff(e,t,n);tt=(e.flags&131072)!==0}else tt=!1,ke&&(t.flags&1048576)!==0&&Ga(t,Co,t.index);switch(t.lanes=0,t.tag){case 2:var o=t.type;Fo(e,t),e=t.pendingProps;var i=In(t,Ge.current);Un(t,n),i=jl(null,t,o,e,i,n);var s=wl();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,et(o)?(s=!0,jo(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,hl(t),i.updater=Io,t.stateNode=i,i._reactInternals=t,Rl(t,o,e,n),t=Pl(null,t,o,!0,s,n)):(t.tag=0,ke&&s&&ol(t),Je(null,t,i,n),t=t.child),t;case 16:o=t.elementType;e:{switch(Fo(e,t),e=t.pendingProps,i=o._init,o=i(o._payload),t.type=o,i=t.tag=ep(o),e=vt(o,e),i){case 0:t=Bl(null,t,o,e,n);break e;case 1:t=Fc(null,t,o,e,n);break e;case 11:t=Ac(null,t,o,e,n);break e;case 14:t=Lc(null,t,o,vt(o.type,e),n);break e}throw Error(a(306,o,""))}return t;case 0:return o=t.type,i=t.pendingProps,i=t.elementType===o?i:vt(o,i),Bl(e,t,o,i,n);case 1:return o=t.type,i=t.pendingProps,i=t.elementType===o?i:vt(o,i),Fc(e,t,o,i,n);case 3:e:{if(Mc(t),e===null)throw Error(a(387));o=t.pendingProps,s=t.memoizedState,i=s.element,tc(e,t),To(t,o,null,n);var d=t.memoizedState;if(o=d.element,s.isDehydrated)if(s={element:o,isDehydrated:!1,cache:d.cache,pendingSuspenseBoundaries:d.pendingSuspenseBoundaries,transitions:d.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=Vn(Error(a(423)),t),t=Dc(e,t,o,n,i);break e}else if(o!==i){i=Vn(Error(a(424)),t),t=Dc(e,t,o,n,i);break e}else for(at=Vt(t.stateNode.containerInfo.firstChild),st=t,ke=!0,xt=null,n=Za(t,null,o,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Mn(),o===i){t=Lt(e,t,n);break e}Je(e,t,o,n)}t=t.child}return t;case 5:return oc(t),e===null&&sl(t),o=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,d=i.children,Xi(o,i)?d=null:s!==null&&Xi(o,s)&&(t.flags|=32),Oc(e,t),Je(e,t,d,n),t.child;case 6:return e===null&&sl(t),null;case 13:return $c(e,t,n);case 4:return gl(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=Dn(t,null,o,n):Je(e,t,o,n),t.child;case 11:return o=t.type,i=t.pendingProps,i=t.elementType===o?i:vt(o,i),Ac(e,t,o,i,n);case 7:return Je(e,t,t.pendingProps,n),t.child;case 8:return Je(e,t,t.pendingProps.children,n),t.child;case 12:return Je(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(o=t.type._context,i=t.pendingProps,s=t.memoizedProps,d=i.value,ye(_o,o._currentValue),o._currentValue=d,s!==null)if(yt(s.value,d)){if(s.children===i.children&&!Ze.current){t=Lt(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var p=s.dependencies;if(p!==null){d=s.child;for(var m=p.firstContext;m!==null;){if(m.context===o){if(s.tag===1){m=At(-1,n&-n),m.tag=2;var E=s.updateQueue;if(E!==null){E=E.shared;var I=E.pending;I===null?m.next=m:(m.next=I.next,I.next=m),E.pending=m}}s.lanes|=n,m=s.alternate,m!==null&&(m.lanes|=n),fl(s.return,n,t),p.lanes|=n;break}m=m.next}}else if(s.tag===10)d=s.type===t.type?null:s.child;else if(s.tag===18){if(d=s.return,d===null)throw Error(a(341));d.lanes|=n,p=d.alternate,p!==null&&(p.lanes|=n),fl(d,n,t),d=s.sibling}else d=s.child;if(d!==null)d.return=s;else for(d=s;d!==null;){if(d===t){d=null;break}if(s=d.sibling,s!==null){s.return=d.return,d=s;break}d=d.return}s=d}Je(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,o=t.pendingProps.children,Un(t,n),i=ft(i),o=o(i),t.flags|=1,Je(e,t,o,n),t.child;case 14:return o=t.type,i=vt(o,t.pendingProps),i=vt(o.type,i),Lc(e,t,o,i,n);case 15:return Nc(e,t,t.type,t.pendingProps,n);case 17:return o=t.type,i=t.pendingProps,i=t.elementType===o?i:vt(o,i),Fo(e,t),t.tag=1,et(o)?(e=!0,jo(t)):e=!1,Un(t,n),_c(t,o,i),Rl(t,o,i,n),Pl(null,t,o,!0,e,n);case 19:return Hc(e,t,n);case 22:return Ic(e,t,n)}throw Error(a(156,t.tag))};function hd(e,t){return Qs(e,t)}function Zf(e,t,n,o){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=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function gt(e,t,n,o){return new Zf(e,t,n,o)}function Xl(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ep(e){if(typeof e=="function")return Xl(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Fe)return 11;if(e===K)return 14}return 2}function nn(e,t){var n=e.alternate;return n===null?(n=gt(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 Yo(e,t,n,o,i,s){var d=2;if(o=e,typeof e=="function")Xl(e)&&(d=1);else if(typeof e=="string")d=5;else e:switch(e){case fe:return wn(n.children,i,s,t);case je:d=8,i|=8;break;case Le:return e=gt(12,n,t,i|2),e.elementType=Le,e.lanes=s,e;case Te:return e=gt(13,n,t,i),e.elementType=Te,e.lanes=s,e;case X:return e=gt(19,n,t,i),e.elementType=X,e.lanes=s,e;case ce:return Jo(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case xe:d=10;break e;case Ue:d=9;break e;case Fe:d=11;break e;case K:d=14;break e;case se:d=16,o=null;break e}throw Error(a(130,e==null?e:typeof e,""))}return t=gt(d,n,t,i),t.elementType=e,t.type=o,t.lanes=s,t}function wn(e,t,n,o){return e=gt(7,e,o,t),e.lanes=n,e}function Jo(e,t,n,o){return e=gt(22,e,o,t),e.elementType=ce,e.lanes=n,e.stateNode={isHidden:!1},e}function Zl(e,t,n){return e=gt(6,e,null,t),e.lanes=n,e}function es(e,t,n){return t=gt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function tp(e,t,n,o,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=_i(0),this.expirationTimes=_i(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_i(0),this.identifierPrefix=o,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function ts(e,t,n,o,i,s,d,p,m){return e=new tp(e,t,n,p,m),t===1?(t=1,s===!0&&(t|=8)):t=0,s=gt(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:o,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},hl(s),e}function np(e,t,n){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:re,key:o==null?null:""+o,children:e,containerInfo:t,implementation:n}}function gd(e){if(!e)return Qt;e=e._reactInternals;e:{if(dn(e)!==e||e.tag!==1)throw Error(a(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(et(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(a(171))}if(e.tag===1){var n=e.type;if(et(n))return Ua(e,n,t)}return t}function md(e,t,n,o,i,s,d,p,m){return e=ts(n,o,!0,e,i,s,d,p,m),e.context=gd(null),n=e.current,o=Xe(),i=en(n),s=At(o,i),s.callback=t??null,Yt(n,s,i),e.current.lanes=i,ur(e,i,o),rt(e,o),e}function Xo(e,t,n,o){var i=t.current,s=Xe(),d=en(i);return n=gd(n),t.context===null?t.context=n:t.pendingContext=n,t=At(s,d),t.payload={element:e},o=o===void 0?null:o,o!==null&&(t.callback=o),e=Yt(i,t,d),e!==null&&(wt(e,i,d,s),Eo(e,i,d)),d}function Zo(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 yd(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ns(e,t){yd(e,t),(e=e.alternate)&&yd(e,t)}function rp(){return null}var xd=typeof reportError=="function"?reportError:function(e){console.error(e)};function rs(e){this._internalRoot=e}ei.prototype.render=rs.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(a(409));Xo(e,t,null,null)},ei.prototype.unmount=rs.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;vn(function(){Xo(null,e,null,null)}),t[Et]=null}};function ei(e){this._internalRoot=e}ei.prototype.unstable_scheduleHydration=function(e){if(e){var t=ta();e={blockedOn:null,target:e,priority:t};for(var n=0;n<$t.length&&t!==0&&t<$t[n].priority;n++);$t.splice(n,0,e),n===0&&oa(e)}};function os(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ti(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function vd(){}function op(e,t,n,o,i){if(i){if(typeof o=="function"){var s=o;o=function(){var E=Zo(d);s.call(E)}}var d=md(t,o,e,0,null,!1,!1,"",vd);return e._reactRootContainer=d,e[Et]=d.current,br(e.nodeType===8?e.parentNode:e),vn(),d}for(;i=e.lastChild;)e.removeChild(i);if(typeof o=="function"){var p=o;o=function(){var E=Zo(m);p.call(E)}}var m=ts(e,0,!1,null,null,!1,!1,"",vd);return e._reactRootContainer=m,e[Et]=m.current,br(e.nodeType===8?e.parentNode:e),vn(function(){Xo(t,m,n,o)}),m}function ni(e,t,n,o,i){var s=n._reactRootContainer;if(s){var d=s;if(typeof i=="function"){var p=i;i=function(){var m=Zo(d);p.call(m)}}Xo(t,d,e,i)}else d=op(n,t,e,i,o);return Zo(d)}Zs=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=dr(t.pendingLanes);n!==0&&(Ri(t,n|1),rt(t,Be()),(de&6)===0&&(Kn=Be()+500,Kt()))}break;case 13:vn(function(){var o=Wt(e,1);if(o!==null){var i=Xe();wt(o,e,1,i)}}),ns(e,1)}},Ei=function(e){if(e.tag===13){var t=Wt(e,134217728);if(t!==null){var n=Xe();wt(t,e,134217728,n)}ns(e,134217728)}},ea=function(e){if(e.tag===13){var t=en(e),n=Wt(e,t);if(n!==null){var o=Xe();wt(n,e,t,o)}ns(e,t)}},ta=function(){return he},na=function(e,t){var n=he;try{return he=e,t()}finally{he=n}},ji=function(e,t,n){switch(t){case"input":if(pi(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 o=n[t];if(o!==e&&o.form===e.form){var i=vo(o);if(!i)throw Error(a(90));zs(o),pi(o,i)}}}break;case"textarea":Bs(e,n);break;case"select":t=n.value,t!=null&&bn(e,!!n.multiple,t,!1)}},Ms=ql,Ds=vn;var ip={usingClientEntryPoint:!1,Events:[Rr,Ln,vo,Os,Fs,ql]},$r={findFiberByHostInstance:un,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},lp={bundleType:$r.bundleType,version:$r.version,rendererPackageName:$r.rendererPackageName,rendererConfig:$r.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:F.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Vs(e),e===null?null:e.stateNode},findFiberByHostInstance:$r.findFiberByHostInstance||rp,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 ri=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ri.isDisabled&&ri.supportsFiber)try{Zr=ri.inject(lp),kt=ri}catch{}}return ot.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ip,ot.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!os(t))throw Error(a(200));return np(e,t,null,n)},ot.createRoot=function(e,t){if(!os(e))throw Error(a(299));var n=!1,o="",i=xd;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(o=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=ts(e,1,!1,null,null,n,!1,o,i),e[Et]=t.current,br(e.nodeType===8?e.parentNode:e),new rs(t)},ot.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(a(188)):(e=Object.keys(e).join(","),Error(a(268,e)));return e=Vs(t),e=e===null?null:e.stateNode,e},ot.flushSync=function(e){return vn(e)},ot.hydrate=function(e,t,n){if(!ti(t))throw Error(a(200));return ni(null,e,t,!0,n)},ot.hydrateRoot=function(e,t,n){if(!os(e))throw Error(a(405));var o=n!=null&&n.hydratedSources||null,i=!1,s="",d=xd;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(d=n.onRecoverableError)),t=md(t,null,e,1,n??null,i,!1,s,d),e[Et]=t.current,br(e),o)for(e=0;e<o.length;e++)n=o[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new ei(t)},ot.render=function(e,t,n){if(!ti(t))throw Error(a(200));return ni(null,e,t,!1,n)},ot.unmountComponentAtNode=function(e){if(!ti(e))throw Error(a(40));return e._reactRootContainer?(vn(function(){ni(null,null,e,!1,function(){e._reactRootContainer=null,e[Et]=null})}),!0):!1},ot.unstable_batchedUpdates=ql,ot.unstable_renderSubtreeIntoContainer=function(e,t,n,o){if(!ti(n))throw Error(a(200));if(e==null||e._reactInternals===void 0)throw Error(a(38));return ni(e,t,n,!1,o)},ot.version="18.3.1-next-f1338f8080-20240426",ot}var _d;function Vd(){if(_d)return ss.exports;_d=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(c){console.error(c)}}return l(),ss.exports=gp(),ss.exports}var Rd;function mp(){if(Rd)return oi;Rd=1;var l=Vd();return oi.createRoot=l.createRoot,oi.hydrateRoot=l.hydrateRoot,oi}var yp=mp();const xp=Hd(yp);Vd();/**
41
+ * @remix-run/router v1.23.2
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 Hr(){return Hr=Object.assign?Object.assign.bind():function(l){for(var c=1;c<arguments.length;c++){var a=arguments[c];for(var f in a)Object.prototype.hasOwnProperty.call(a,f)&&(l[f]=a[f])}return l},Hr.apply(this,arguments)}var on;(function(l){l.Pop="POP",l.Push="PUSH",l.Replace="REPLACE"})(on||(on={}));const Ed="popstate";function vp(l){l===void 0&&(l={});function c(f,u){let{pathname:g,search:h,hash:y}=f.location;return hs("",{pathname:g,search:h,hash:y},u.state&&u.state.usr||null,u.state&&u.state.key||"default")}function a(f,u){return typeof u=="string"?u:li(u)}return jp(c,a,null,l)}function Re(l,c){if(l===!1||l===null||typeof l>"u")throw new Error(c)}function ks(l,c){if(!l){typeof console<"u"&&console.warn(c);try{throw new Error(c)}catch{}}}function Sp(){return Math.random().toString(36).substr(2,8)}function Td(l,c){return{usr:l.state,key:l.key,idx:c}}function hs(l,c,a,f){return a===void 0&&(a=null),Hr({pathname:typeof l=="string"?l:l.pathname,search:"",hash:""},typeof c=="string"?er(c):c,{state:a,key:c&&c.key||f||Sp()})}function li(l){let{pathname:c="/",search:a="",hash:f=""}=l;return a&&a!=="?"&&(c+=a.charAt(0)==="?"?a:"?"+a),f&&f!=="#"&&(c+=f.charAt(0)==="#"?f:"#"+f),c}function er(l){let c={};if(l){let a=l.indexOf("#");a>=0&&(c.hash=l.substr(a),l=l.substr(0,a));let f=l.indexOf("?");f>=0&&(c.search=l.substr(f),l=l.substr(0,f)),l&&(c.pathname=l)}return c}function jp(l,c,a,f){f===void 0&&(f={});let{window:u=document.defaultView,v5Compat:g=!1}=f,h=u.history,y=on.Pop,j=null,R=w();R==null&&(R=0,h.replaceState(Hr({},h.state,{idx:R}),""));function w(){return(h.state||{idx:null}).idx}function T(){y=on.Pop;let C=w(),W=C==null?null:C-R;R=C,j&&j({action:y,location:B.location,delta:W})}function _(C,W){y=on.Push;let P=hs(B.location,C,W);R=w()+1;let Q=Td(P,R),F=B.createHref(P);try{h.pushState(Q,"",F)}catch(ie){if(ie instanceof DOMException&&ie.name==="DataCloneError")throw ie;u.location.assign(F)}g&&j&&j({action:y,location:B.location,delta:1})}function A(C,W){y=on.Replace;let P=hs(B.location,C,W);R=w();let Q=Td(P,R),F=B.createHref(P);h.replaceState(Q,"",F),g&&j&&j({action:y,location:B.location,delta:0})}function x(C){let W=u.location.origin!=="null"?u.location.origin:u.location.href,P=typeof C=="string"?C:li(C);return P=P.replace(/ $/,"%20"),Re(W,"No window.location.(origin|href) available to create URL for href: "+P),new URL(P,W)}let B={get action(){return y},get location(){return l(u,h)},listen(C){if(j)throw new Error("A history only accepts one active listener");return u.addEventListener(Ed,T),j=C,()=>{u.removeEventListener(Ed,T),j=null}},createHref(C){return c(u,C)},createURL:x,encodeLocation(C){let W=x(C);return{pathname:W.pathname,search:W.search,hash:W.hash}},push:_,replace:A,go(C){return h.go(C)}};return B}var Bd;(function(l){l.data="data",l.deferred="deferred",l.redirect="redirect",l.error="error"})(Bd||(Bd={}));function wp(l,c,a){return a===void 0&&(a="/"),kp(l,c,a)}function kp(l,c,a,f){let u=typeof c=="string"?er(c):c,g=Zn(u.pathname||"/",a);if(g==null)return null;let h=Gd(l);Cp(h);let y=null;for(let j=0;y==null&&j<h.length;++j){let R=Lp(g);y=Wp(h[j],R)}return y}function Gd(l,c,a,f){c===void 0&&(c=[]),a===void 0&&(a=[]),f===void 0&&(f="");let u=(g,h,y)=>{let j={relativePath:y===void 0?g.path||"":y,caseSensitive:g.caseSensitive===!0,childrenIndex:h,route:g};j.relativePath.startsWith("/")&&(Re(j.relativePath.startsWith(f),'Absolute route path "'+j.relativePath+'" nested under path '+('"'+f+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),j.relativePath=j.relativePath.slice(f.length));let R=ln([f,j.relativePath]),w=a.concat(j);g.children&&g.children.length>0&&(Re(g.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+R+'".')),Gd(g.children,c,w,R)),!(g.path==null&&!g.index)&&c.push({path:R,score:Bp(R,g.index),routesMeta:w})};return l.forEach((g,h)=>{var y;if(g.path===""||!((y=g.path)!=null&&y.includes("?")))u(g,h);else for(let j of Qd(g.path))u(g,h,j)}),c}function Qd(l){let c=l.split("/");if(c.length===0)return[];let[a,...f]=c,u=a.endsWith("?"),g=a.replace(/\?$/,"");if(f.length===0)return u?[g,""]:[g];let h=Qd(f.join("/")),y=[];return y.push(...h.map(j=>j===""?g:[g,j].join("/"))),u&&y.push(...h),y.map(j=>l.startsWith("/")&&j===""?"/":j)}function Cp(l){l.sort((c,a)=>c.score!==a.score?a.score-c.score:Pp(c.routesMeta.map(f=>f.childrenIndex),a.routesMeta.map(f=>f.childrenIndex)))}const bp=/^:[\w-]+$/,zp=3,_p=2,Rp=1,Ep=10,Tp=-2,Pd=l=>l==="*";function Bp(l,c){let a=l.split("/"),f=a.length;return a.some(Pd)&&(f+=Tp),c&&(f+=_p),a.filter(u=>!Pd(u)).reduce((u,g)=>u+(bp.test(g)?zp:g===""?Rp:Ep),f)}function Pp(l,c){return l.length===c.length&&l.slice(0,-1).every((f,u)=>f===c[u])?l[l.length-1]-c[c.length-1]:0}function Wp(l,c,a){let{routesMeta:f}=l,u={},g="/",h=[];for(let y=0;y<f.length;++y){let j=f[y],R=y===f.length-1,w=g==="/"?c:c.slice(g.length)||"/",T=gs({path:j.relativePath,caseSensitive:j.caseSensitive,end:R},w),_=j.route;if(!T)return null;Object.assign(u,T.params),h.push({params:u,pathname:ln([g,T.pathname]),pathnameBase:Mp(ln([g,T.pathnameBase])),route:_}),T.pathnameBase!=="/"&&(g=ln([g,T.pathnameBase]))}return h}function gs(l,c){typeof l=="string"&&(l={path:l,caseSensitive:!1,end:!0});let[a,f]=Ap(l.path,l.caseSensitive,l.end),u=c.match(a);if(!u)return null;let g=u[0],h=g.replace(/(.)\/+$/,"$1"),y=u.slice(1);return{params:f.reduce((R,w,T)=>{let{paramName:_,isOptional:A}=w;if(_==="*"){let B=y[T]||"";h=g.slice(0,g.length-B.length).replace(/(.)\/+$/,"$1")}const x=y[T];return A&&!x?R[_]=void 0:R[_]=(x||"").replace(/%2F/g,"/"),R},{}),pathname:g,pathnameBase:h,pattern:l}}function Ap(l,c,a){c===void 0&&(c=!1),a===void 0&&(a=!0),ks(l==="*"||!l.endsWith("*")||l.endsWith("/*"),'Route path "'+l+'" will be treated as if it were '+('"'+l.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+l.replace(/\*$/,"/*")+'".'));let f=[],u="^"+l.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(h,y,j)=>(f.push({paramName:y,isOptional:j!=null}),j?"/?([^\\/]+)?":"/([^\\/]+)"));return l.endsWith("*")?(f.push({paramName:"*"}),u+=l==="*"||l==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?u+="\\/*$":l!==""&&l!=="/"&&(u+="(?:(?=\\/|$))"),[new RegExp(u,c?void 0:"i"),f]}function Lp(l){try{return l.split("/").map(c=>decodeURIComponent(c).replace(/\//g,"%2F")).join("/")}catch(c){return ks(!1,'The URL path "'+l+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+c+").")),l}}function Zn(l,c){if(c==="/")return l;if(!l.toLowerCase().startsWith(c.toLowerCase()))return null;let a=c.endsWith("/")?c.length-1:c.length,f=l.charAt(a);return f&&f!=="/"?null:l.slice(a)||"/"}const Np=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ip=l=>Np.test(l);function Op(l,c){c===void 0&&(c="/");let{pathname:a,search:f="",hash:u=""}=typeof l=="string"?er(l):l,g;if(a)if(Ip(a))g=a;else{if(a.includes("//")){let h=a;a=a.replace(/\/\/+/g,"/"),ks(!1,"Pathnames cannot have embedded double slashes - normalizing "+(h+" -> "+a))}a.startsWith("/")?g=Wd(a.substring(1),"/"):g=Wd(a,c)}else g=c;return{pathname:g,search:Dp(f),hash:$p(u)}}function Wd(l,c){let a=c.replace(/\/+$/,"").split("/");return l.split("/").forEach(u=>{u===".."?a.length>1&&a.pop():u!=="."&&a.push(u)}),a.length>1?a.join("/"):"/"}function ds(l,c,a,f){return"Cannot include a '"+l+"' character in a manually specified "+("`to."+c+"` field ["+JSON.stringify(f)+"]. Please separate it out to the ")+("`to."+a+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Fp(l){return l.filter((c,a)=>a===0||c.route.path&&c.route.path.length>0)}function Cs(l,c){let a=Fp(l);return c?a.map((f,u)=>u===a.length-1?f.pathname:f.pathnameBase):a.map(f=>f.pathnameBase)}function bs(l,c,a,f){f===void 0&&(f=!1);let u;typeof l=="string"?u=er(l):(u=Hr({},l),Re(!u.pathname||!u.pathname.includes("?"),ds("?","pathname","search",u)),Re(!u.pathname||!u.pathname.includes("#"),ds("#","pathname","hash",u)),Re(!u.search||!u.search.includes("#"),ds("#","search","hash",u)));let g=l===""||u.pathname==="",h=g?"/":u.pathname,y;if(h==null)y=a;else{let T=c.length-1;if(!f&&h.startsWith("..")){let _=h.split("/");for(;_[0]==="..";)_.shift(),T-=1;u.pathname=_.join("/")}y=T>=0?c[T]:"/"}let j=Op(u,y),R=h&&h!=="/"&&h.endsWith("/"),w=(g||h===".")&&a.endsWith("/");return!j.pathname.endsWith("/")&&(R||w)&&(j.pathname+="/"),j}const ln=l=>l.join("/").replace(/\/\/+/g,"/"),Mp=l=>l.replace(/\/+$/,"").replace(/^\/*/,"/"),Dp=l=>!l||l==="?"?"":l.startsWith("?")?l:"?"+l,$p=l=>!l||l==="#"?"":l.startsWith("#")?l:"#"+l;function Up(l){return l!=null&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.internal=="boolean"&&"data"in l}const Kd=["post","put","patch","delete"];new Set(Kd);const Hp=["get",...Kd];new Set(Hp);/**
50
+ * React Router v6.30.3
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 Vr(){return Vr=Object.assign?Object.assign.bind():function(l){for(var c=1;c<arguments.length;c++){var a=arguments[c];for(var f in a)Object.prototype.hasOwnProperty.call(a,f)&&(l[f]=a[f])}return l},Vr.apply(this,arguments)}const ci=v.createContext(null),qd=v.createContext(null),It=v.createContext(null),di=v.createContext(null),an=v.createContext({outlet:null,matches:[],isDataRoute:!1}),Yd=v.createContext(null);function Vp(l,c){let{relative:a}=c===void 0?{}:c;tr()||Re(!1);let{basename:f,navigator:u}=v.useContext(It),{hash:g,pathname:h,search:y}=ui(l,{relative:a}),j=h;return f!=="/"&&(j=h==="/"?f:ln([f,h])),u.createHref({pathname:j,search:y,hash:g})}function tr(){return v.useContext(di)!=null}function nr(){return tr()||Re(!1),v.useContext(di).location}function Jd(l){v.useContext(It).static||v.useLayoutEffect(l)}function Xd(){let{isDataRoute:l}=v.useContext(an);return l?oh():Gp()}function Gp(){tr()||Re(!1);let l=v.useContext(ci),{basename:c,future:a,navigator:f}=v.useContext(It),{matches:u}=v.useContext(an),{pathname:g}=nr(),h=JSON.stringify(Cs(u,a.v7_relativeSplatPath)),y=v.useRef(!1);return Jd(()=>{y.current=!0}),v.useCallback(function(R,w){if(w===void 0&&(w={}),!y.current)return;if(typeof R=="number"){f.go(R);return}let T=bs(R,JSON.parse(h),g,w.relative==="path");l==null&&c!=="/"&&(T.pathname=T.pathname==="/"?c:ln([c,T.pathname])),(w.replace?f.replace:f.push)(T,w.state,w)},[c,f,h,g,l])}function ui(l,c){let{relative:a}=c===void 0?{}:c,{future:f}=v.useContext(It),{matches:u}=v.useContext(an),{pathname:g}=nr(),h=JSON.stringify(Cs(u,f.v7_relativeSplatPath));return v.useMemo(()=>bs(l,JSON.parse(h),g,a==="path"),[l,h,g,a])}function Qp(l,c){return Kp(l,c)}function Kp(l,c,a,f){tr()||Re(!1);let{navigator:u}=v.useContext(It),{matches:g}=v.useContext(an),h=g[g.length-1],y=h?h.params:{};h&&h.pathname;let j=h?h.pathnameBase:"/";h&&h.route;let R=nr(),w;if(c){var T;let C=typeof c=="string"?er(c):c;j==="/"||(T=C.pathname)!=null&&T.startsWith(j)||Re(!1),w=C}else w=R;let _=w.pathname||"/",A=_;if(j!=="/"){let C=j.replace(/^\//,"").split("/");A="/"+_.replace(/^\//,"").split("/").slice(C.length).join("/")}let x=wp(l,{pathname:A}),B=Zp(x&&x.map(C=>Object.assign({},C,{params:Object.assign({},y,C.params),pathname:ln([j,u.encodeLocation?u.encodeLocation(C.pathname).pathname:C.pathname]),pathnameBase:C.pathnameBase==="/"?j:ln([j,u.encodeLocation?u.encodeLocation(C.pathnameBase).pathname:C.pathnameBase])})),g,a,f);return c&&B?v.createElement(di.Provider,{value:{location:Vr({pathname:"/",search:"",hash:"",state:null,key:"default"},w),navigationType:on.Pop}},B):B}function qp(){let l=rh(),c=Up(l)?l.status+" "+l.statusText:l instanceof Error?l.message:JSON.stringify(l),a=l instanceof Error?l.stack:null,u={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"}},c),a?v.createElement("pre",{style:u},a):null,null)}const Yp=v.createElement(qp,null);class Jp extends v.Component{constructor(c){super(c),this.state={location:c.location,revalidation:c.revalidation,error:c.error}}static getDerivedStateFromError(c){return{error:c}}static getDerivedStateFromProps(c,a){return a.location!==c.location||a.revalidation!=="idle"&&c.revalidation==="idle"?{error:c.error,location:c.location,revalidation:c.revalidation}:{error:c.error!==void 0?c.error:a.error,location:a.location,revalidation:c.revalidation||a.revalidation}}componentDidCatch(c,a){console.error("React Router caught the following error during render",c,a)}render(){return this.state.error!==void 0?v.createElement(an.Provider,{value:this.props.routeContext},v.createElement(Yd.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Xp(l){let{routeContext:c,match:a,children:f}=l,u=v.useContext(ci);return u&&u.static&&u.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(u.staticContext._deepestRenderedBoundaryId=a.route.id),v.createElement(an.Provider,{value:c},f)}function Zp(l,c,a,f){var u;if(c===void 0&&(c=[]),a===void 0&&(a=null),f===void 0&&(f=null),l==null){var g;if(!a)return null;if(a.errors)l=a.matches;else if((g=f)!=null&&g.v7_partialHydration&&c.length===0&&!a.initialized&&a.matches.length>0)l=a.matches;else return null}let h=l,y=(u=a)==null?void 0:u.errors;if(y!=null){let w=h.findIndex(T=>T.route.id&&(y==null?void 0:y[T.route.id])!==void 0);w>=0||Re(!1),h=h.slice(0,Math.min(h.length,w+1))}let j=!1,R=-1;if(a&&f&&f.v7_partialHydration)for(let w=0;w<h.length;w++){let T=h[w];if((T.route.HydrateFallback||T.route.hydrateFallbackElement)&&(R=w),T.route.id){let{loaderData:_,errors:A}=a,x=T.route.loader&&_[T.route.id]===void 0&&(!A||A[T.route.id]===void 0);if(T.route.lazy||x){j=!0,R>=0?h=h.slice(0,R+1):h=[h[0]];break}}}return h.reduceRight((w,T,_)=>{let A,x=!1,B=null,C=null;a&&(A=y&&T.route.id?y[T.route.id]:void 0,B=T.route.errorElement||Yp,j&&(R<0&&_===0?(ih("route-fallback"),x=!0,C=null):R===_&&(x=!0,C=T.route.hydrateFallbackElement||null)));let W=c.concat(h.slice(0,_+1)),P=()=>{let Q;return A?Q=B:x?Q=C:T.route.Component?Q=v.createElement(T.route.Component,null):T.route.element?Q=T.route.element:Q=w,v.createElement(Xp,{match:T,routeContext:{outlet:w,matches:W,isDataRoute:a!=null},children:Q})};return a&&(T.route.ErrorBoundary||T.route.errorElement||_===0)?v.createElement(Jp,{location:a.location,revalidation:a.revalidation,component:B,error:A,children:P(),routeContext:{outlet:null,matches:W,isDataRoute:!0}}):P()},null)}var Zd=(function(l){return l.UseBlocker="useBlocker",l.UseRevalidator="useRevalidator",l.UseNavigateStable="useNavigate",l})(Zd||{}),eu=(function(l){return l.UseBlocker="useBlocker",l.UseLoaderData="useLoaderData",l.UseActionData="useActionData",l.UseRouteError="useRouteError",l.UseNavigation="useNavigation",l.UseRouteLoaderData="useRouteLoaderData",l.UseMatches="useMatches",l.UseRevalidator="useRevalidator",l.UseNavigateStable="useNavigate",l.UseRouteId="useRouteId",l})(eu||{});function eh(l){let c=v.useContext(ci);return c||Re(!1),c}function th(l){let c=v.useContext(qd);return c||Re(!1),c}function nh(l){let c=v.useContext(an);return c||Re(!1),c}function tu(l){let c=nh(),a=c.matches[c.matches.length-1];return a.route.id||Re(!1),a.route.id}function rh(){var l;let c=v.useContext(Yd),a=th(),f=tu();return c!==void 0?c:(l=a.errors)==null?void 0:l[f]}function oh(){let{router:l}=eh(Zd.UseNavigateStable),c=tu(eu.UseNavigateStable),a=v.useRef(!1);return Jd(()=>{a.current=!0}),v.useCallback(function(u,g){g===void 0&&(g={}),a.current&&(typeof u=="number"?l.navigate(u):l.navigate(u,Vr({fromRouteId:c},g)))},[l,c])}const Ad={};function ih(l,c,a){Ad[l]||(Ad[l]=!0)}function lh(l,c){l==null||l.v7_startTransition,l==null||l.v7_relativeSplatPath}function Ld(l){let{to:c,replace:a,state:f,relative:u}=l;tr()||Re(!1);let{future:g,static:h}=v.useContext(It),{matches:y}=v.useContext(an),{pathname:j}=nr(),R=Xd(),w=bs(c,Cs(y,g.v7_relativeSplatPath),j,u==="path"),T=JSON.stringify(w);return v.useEffect(()=>R(JSON.parse(T),{replace:a,state:f,relative:u}),[R,T,u,a,f]),null}function Rt(l){Re(!1)}function sh(l){let{basename:c="/",children:a=null,location:f,navigationType:u=on.Pop,navigator:g,static:h=!1,future:y}=l;tr()&&Re(!1);let j=c.replace(/^\/*/,"/"),R=v.useMemo(()=>({basename:j,navigator:g,static:h,future:Vr({v7_relativeSplatPath:!1},y)}),[j,y,g,h]);typeof f=="string"&&(f=er(f));let{pathname:w="/",search:T="",hash:_="",state:A=null,key:x="default"}=f,B=v.useMemo(()=>{let C=Zn(w,j);return C==null?null:{location:{pathname:C,search:T,hash:_,state:A,key:x},navigationType:u}},[j,w,T,_,A,x,u]);return B==null?null:v.createElement(It.Provider,{value:R},v.createElement(di.Provider,{children:a,value:B}))}function ah(l){let{children:c,location:a}=l;return Qp(ms(c),a)}new Promise(()=>{});function ms(l,c){c===void 0&&(c=[]);let a=[];return v.Children.forEach(l,(f,u)=>{if(!v.isValidElement(f))return;let g=[...c,u];if(f.type===v.Fragment){a.push.apply(a,ms(f.props.children,g));return}f.type!==Rt&&Re(!1),!f.props.index||!f.props.children||Re(!1);let h={id:f.props.id||g.join("-"),caseSensitive:f.props.caseSensitive,element:f.props.element,Component:f.props.Component,index:f.props.index,path:f.props.path,loader:f.props.loader,action:f.props.action,errorElement:f.props.errorElement,ErrorBoundary:f.props.ErrorBoundary,hasErrorBoundary:f.props.ErrorBoundary!=null||f.props.errorElement!=null,shouldRevalidate:f.props.shouldRevalidate,handle:f.props.handle,lazy:f.props.lazy};f.props.children&&(h.children=ms(f.props.children,g)),a.push(h)}),a}/**
59
+ * React Router DOM v6.30.3
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
+ */function si(){return si=Object.assign?Object.assign.bind():function(l){for(var c=1;c<arguments.length;c++){var a=arguments[c];for(var f in a)Object.prototype.hasOwnProperty.call(a,f)&&(l[f]=a[f])}return l},si.apply(this,arguments)}function nu(l,c){if(l==null)return{};var a={},f=Object.keys(l),u,g;for(g=0;g<f.length;g++)u=f[g],!(c.indexOf(u)>=0)&&(a[u]=l[u]);return a}function ch(l){return!!(l.metaKey||l.altKey||l.ctrlKey||l.shiftKey)}function dh(l,c){return l.button===0&&(!c||c==="_self")&&!ch(l)}const uh=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],fh=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],ph="6";try{window.__reactRouterVersion=ph}catch{}const hh=v.createContext({isTransitioning:!1}),gh="startTransition",Nd=fp[gh];function mh(l){let{basename:c,children:a,future:f,window:u}=l,g=v.useRef();g.current==null&&(g.current=vp({window:u,v5Compat:!0}));let h=g.current,[y,j]=v.useState({action:h.action,location:h.location}),{v7_startTransition:R}=f||{},w=v.useCallback(T=>{R&&Nd?Nd(()=>j(T)):j(T)},[j,R]);return v.useLayoutEffect(()=>h.listen(w),[h,w]),v.useEffect(()=>lh(f),[f]),v.createElement(sh,{basename:c,children:a,location:y.location,navigationType:y.action,navigator:h,future:f})}const yh=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",xh=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,vh=v.forwardRef(function(c,a){let{onClick:f,relative:u,reloadDocument:g,replace:h,state:y,target:j,to:R,preventScrollReset:w,viewTransition:T}=c,_=nu(c,uh),{basename:A}=v.useContext(It),x,B=!1;if(typeof R=="string"&&xh.test(R)&&(x=R,yh))try{let Q=new URL(window.location.href),F=R.startsWith("//")?new URL(Q.protocol+R):new URL(R),ie=Zn(F.pathname,A);F.origin===Q.origin&&ie!=null?R=ie+F.search+F.hash:B=!0}catch{}let C=Vp(R,{relative:u}),W=wh(R,{replace:h,state:y,target:j,preventScrollReset:w,relative:u,viewTransition:T});function P(Q){f&&f(Q),Q.defaultPrevented||W(Q)}return v.createElement("a",si({},_,{href:x||C,onClick:B||g?f:P,ref:a,target:j}))}),Sh=v.forwardRef(function(c,a){let{"aria-current":f="page",caseSensitive:u=!1,className:g="",end:h=!1,style:y,to:j,viewTransition:R,children:w}=c,T=nu(c,fh),_=ui(j,{relative:T.relative}),A=nr(),x=v.useContext(qd),{navigator:B,basename:C}=v.useContext(It),W=x!=null&&kh(_)&&R===!0,P=B.encodeLocation?B.encodeLocation(_).pathname:_.pathname,Q=A.pathname,F=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;u||(Q=Q.toLowerCase(),F=F?F.toLowerCase():null,P=P.toLowerCase()),F&&C&&(F=Zn(F,C)||F);const ie=P!=="/"&&P.endsWith("/")?P.length-1:P.length;let re=Q===P||!h&&Q.startsWith(P)&&Q.charAt(ie)==="/",fe=F!=null&&(F===P||!h&&F.startsWith(P)&&F.charAt(P.length)==="/"),je={isActive:re,isPending:fe,isTransitioning:W},Le=re?f:void 0,xe;typeof g=="function"?xe=g(je):xe=[g,re?"active":null,fe?"pending":null,W?"transitioning":null].filter(Boolean).join(" ");let Ue=typeof y=="function"?y(je):y;return v.createElement(vh,si({},T,{"aria-current":Le,className:xe,ref:a,style:Ue,to:j,viewTransition:R}),typeof w=="function"?w(je):w)});var ys;(function(l){l.UseScrollRestoration="useScrollRestoration",l.UseSubmit="useSubmit",l.UseSubmitFetcher="useSubmitFetcher",l.UseFetcher="useFetcher",l.useViewTransitionState="useViewTransitionState"})(ys||(ys={}));var Id;(function(l){l.UseFetcher="useFetcher",l.UseFetchers="useFetchers",l.UseScrollRestoration="useScrollRestoration"})(Id||(Id={}));function jh(l){let c=v.useContext(ci);return c||Re(!1),c}function wh(l,c){let{target:a,replace:f,state:u,preventScrollReset:g,relative:h,viewTransition:y}=c===void 0?{}:c,j=Xd(),R=nr(),w=ui(l,{relative:h});return v.useCallback(T=>{if(dh(T,a)){T.preventDefault();let _=f!==void 0?f:li(R)===li(w);j(l,{replace:_,state:u,preventScrollReset:g,relative:h,viewTransition:y})}},[R,j,w,f,u,a,l,g,h,y])}function kh(l,c){c===void 0&&(c={});let a=v.useContext(hh);a==null&&Re(!1);let{basename:f}=jh(ys.useViewTransitionState),u=ui(l,{relative:c.relative});if(!a.isTransitioning)return!1;let g=Zn(a.currentLocation.pathname,f)||a.currentLocation.pathname,h=Zn(a.nextLocation.pathname,f)||a.nextLocation.pathname;return gs(u.pathname,h)!=null||gs(u.pathname,g)!=null}const ge="/api",ru=v.createContext({email:"",isPro:!1,loading:!1,setEmail:()=>{},refresh:()=>{}});function Ch({children:l}){const[c,a]=v.useState(()=>localStorage.getItem("bilko_pro_email")??""),[f,u]=v.useState(!1),[g,h]=v.useState(!1),y=v.useCallback(async R=>{const w=R.trim().toLowerCase();if(!w||!w.includes("@")){u(!1);return}h(!0);try{const _=await(await fetch(`${ge}/stripe/subscription-status?email=${encodeURIComponent(w)}`)).json();u(_.active??!1)}catch{u(!1)}finally{h(!1)}},[]);v.useEffect(()=>{y(c)},[c,y]);function j(R){const w=R.trim().toLowerCase();localStorage.setItem("bilko_pro_email",w),a(w)}return r.jsx(ru.Provider,{value:{email:c,isPro:f,loading:g,setEmail:j,refresh:()=>y(c)},children:l})}function ou(){return v.useContext(ru)}function sn(l,c){fetch(`${ge}/analytics/event`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({event:l,...c})}).catch(()=>{})}function rr({tool:l,score:c,accentColor:a="#7c4dff"}){const[f,u]=v.useState(""),[g,h]=v.useState(!1);async function y(){if(!(!f.trim()||!f.includes("@"))){try{await fetch(`${ge}/demos/email-capture`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:f.trim(),tool:l,score:String(c)})})}catch{}sn("email_captured",{tool:l,email:f.trim()}),h(!0)}}return g?r.jsxs("div",{style:{background:"#0d1f0d",border:"1px solid #1e4a1e",borderRadius:14,padding:20,textAlign:"center",marginTop:16},children:[r.jsx("p",{style:{color:"#4caf50",fontSize:14,fontWeight:700,margin:"0 0 4px"},children:"You're on the early access list."}),r.jsx("p",{style:{color:"#2e7d32",fontSize:11,margin:0},children:"We'll notify you when Pro launches — full reports, history & API access."})]}):r.jsxs("div",{style:{background:"#12121f",border:`1px solid ${a}33`,borderRadius:14,padding:"20px 20px 18px",marginTop:16},children:[r.jsxs("div",{style:{marginBottom:14},children:[r.jsx("p",{style:{fontSize:14,color:"#e0e0e0",fontWeight:700,margin:"0 0 4px"},children:"Get your full report — free"}),r.jsx("p",{style:{fontSize:11,color:"#666",margin:0,lineHeight:1.5},children:"Framework breakdown, all rewrites, and competitor edge. No spam. Unsubscribe anytime."})]}),r.jsxs("div",{style:{display:"flex",gap:8},children:[r.jsx("input",{type:"email",placeholder:"you@example.com",value:f,onChange:j=>u(j.target.value),onKeyDown:j=>{j.key==="Enter"&&y()},style:{flex:1,background:"#0d0d1a",border:"1px solid #1a1a2e",borderRadius:8,padding:"10px 12px",fontSize:13,color:"#e0e0e0",outline:"none",fontFamily:"inherit"}}),r.jsx("button",{onClick:y,disabled:!f.includes("@"),style:{padding:"10px 20px",background:f.includes("@")?a:"#333",color:"#fff",fontWeight:700,fontSize:12,border:"none",borderRadius:8,cursor:f.includes("@")?"pointer":"not-allowed",opacity:f.includes("@")?1:.5,whiteSpace:"nowrap",letterSpacing:.2},children:"Send My Report"})]})]})}function Ot({shareText:l,accentColor:c}){const[a,f]=v.useState(!1);function u(){navigator.clipboard.writeText(l).then(()=>{f(!0),setTimeout(()=>f(!1),2500)})}return r.jsx("button",{onClick:u,style:{padding:"6px 14px",fontSize:11,fontWeight:600,background:a?"#1a2e1a":c+"18",color:a?"#4caf50":c,border:`1px solid ${a?"#4caf5044":c+"44"}`,borderRadius:7,cursor:"pointer",transition:"all 0.2s",whiteSpace:"nowrap"},children:a?"Copied!":"Share Score"})}function cn({children:l,accentColor:c,label:a="Full Report",priceLabel:f="Unlock Full Report — $9/mo",email:u,product:g="contentgrade_pro"}){const h=ou(),[y,j]=v.useState(null),[R,w]=v.useState(!1),[T,_]=v.useState(!1),A=u??h.email,[x,B]=v.useState(A),[C,W]=v.useState(!1);v.useEffect(()=>{!u&&h.email&&!x&&B(h.email)},[h.email]),v.useEffect(()=>{g!=="audiencedecoder_report"&&h.isPro&&w(!0)},[h.isPro,g]),v.useEffect(()=>{const F=A.trim().toLowerCase();F&&F.includes("@")?fetch(`${ge}/stripe/subscription-status?email=${encodeURIComponent(F)}`).then(re=>re.json()).then(re=>{j(re.configured??!1),(g==="audiencedecoder_report"?re.audiencedecoder:re.active)&&w(!0)}).catch(()=>j(!1)):fetch(`${ge}/stripe/subscription-status?email=noop@check.com`).then(re=>re.json()).then(re=>j(re.configured??!1)).catch(()=>j(!1)),new URLSearchParams(window.location.search).get("checkout")==="success"&&F&&setTimeout(()=>{fetch(`${ge}/stripe/subscription-status?email=${encodeURIComponent(F)}`).then(re=>re.json()).then(re=>{(g==="audiencedecoder_report"?re.audiencedecoder:re.active)&&(w(!0),h.refresh())}).catch(()=>{})},2e3)},[A]);async function P(){const F=x.trim().toLowerCase();if(!(!F||!F.includes("@"))){_(!0),sn("upgrade_clicked",{email:F});try{h.setEmail(F);const re=await(await fetch(`${ge}/stripe/create-checkout-session`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:F,priceType:g})})).json();re.url?(sn("checkout_started",{email:F}),window.location.href=re.url):j(!1)}catch{j(!1)}finally{_(!1)}}}async function Q(){const F=x.trim().toLowerCase();if(!(!F||!F.includes("@"))){try{await fetch(`${ge}/demos/headline-grader/unlock`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:F})})}catch{}W(!0)}}return R?r.jsx("div",{style:{marginBottom:16},children:l}):r.jsxs("div",{style:{position:"relative",marginBottom:16},children:[r.jsx("div",{style:{filter:"blur(5px)",pointerEvents:"none",userSelect:"none"},children:l}),r.jsxs("div",{style:{position:"absolute",inset:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",background:"rgba(10,10,20,0.72)",borderRadius:14,backdropFilter:"blur(2px)"},children:[r.jsx("div",{style:{fontSize:22,marginBottom:8},children:"🔒"}),r.jsx("div",{style:{fontSize:15,fontWeight:800,color:"#e0e0e0",marginBottom:4},children:a}),r.jsx("div",{style:{fontSize:11,color:"#666",marginBottom:18,textAlign:"center",maxWidth:220,lineHeight:1.5},children:"Framework breakdown, all rewrites & more"}),y?r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:8,width:"100%",maxWidth:260,padding:"0 16px"},children:[r.jsx("input",{type:"email",placeholder:"your@email.com",value:x,onChange:F=>B(F.target.value),onKeyDown:F=>{F.key==="Enter"&&P()},style:{width:"100%",background:"#0d0d1a",border:"1px solid #2a2a3e",borderRadius:7,padding:"8px 12px",fontSize:12,color:"#e0e0e0",outline:"none",fontFamily:"inherit",boxSizing:"border-box"}}),r.jsx("button",{onClick:P,disabled:T||!x.includes("@"),style:{width:"100%",padding:"10px 24px",background:T?"#333":`linear-gradient(135deg, ${c}dd, ${c}99)`,color:"#fff",fontWeight:700,fontSize:13,borderRadius:8,border:`1px solid ${c}`,letterSpacing:.2,cursor:T?"wait":"pointer",opacity:x.includes("@")?1:.5},children:T?"Redirecting...":f})]}):C?r.jsx("div",{style:{fontSize:12,color:"#4caf50",textAlign:"center",maxWidth:220},children:"You're on the early access list. We'll notify you at launch."}):r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:8,width:"100%",maxWidth:260,padding:"0 16px"},children:[r.jsx("div",{style:{fontSize:11,color:"#888",textAlign:"center"},children:"Coming soon — leave your email"}),r.jsxs("div",{style:{display:"flex",gap:6,width:"100%"},children:[r.jsx("input",{type:"email",placeholder:"your@email.com",value:x,onChange:F=>B(F.target.value),onKeyDown:F=>{F.key==="Enter"&&Q()},style:{flex:1,background:"#0d0d1a",border:"1px solid #2a2a3e",borderRadius:7,padding:"8px 10px",fontSize:12,color:"#e0e0e0",outline:"none",fontFamily:"inherit"}}),r.jsx("button",{onClick:Q,disabled:!x.includes("@"),style:{padding:"8px 12px",background:c+"33",color:c,fontWeight:700,fontSize:11,borderRadius:7,border:`1px solid ${c}44`,cursor:"pointer",opacity:x.includes("@")?1:.5,whiteSpace:"nowrap"},children:"Notify me"})]})]})]})]})}const bh=[{name:"Free",price:null,tagline:"Try it, no strings",features:["Score + grade (0–100)","Best rewrite suggestion","Top fix recommendation"],cta:"Current plan",highlight:!1},{name:"Pro",price:"$9/mo",tagline:"Everything, unlimited",features:["Full framework breakdown","All AI rewrites","A/B compare mode","Score history & tracking","HeadlineGrader + AdScorer + ThreadGrader"],cta:"Get Pro",highlight:!0}],zh=[{name:"Free",price:null,tagline:"Audience snapshot",features:["Audience archetypes (3)","Top archetype description","Content score"],cta:"Current plan",highlight:!1},{name:"Deep Report",price:"$49",tagline:"One-time · Full intelligence",features:["Full engagement model","Content pattern analysis","Growth opportunities","Content calendar","Creator comparison"],cta:"Unlock Report",highlight:!0}];function kn({accentColor:l,product:c="contentgrade",email:a}){const f=c==="audiencedecoder"?zh:bh,u=c==="audiencedecoder"?"One-time unlock · No subscription":"Free forever · No credit card for trial",[g,h]=v.useState(null),[y,j]=v.useState(!1);v.useEffect(()=>{fetch(`${ge}/stripe/subscription-status?email=noop@check.com`).then(w=>w.json()).then(w=>{h(c==="audiencedecoder"?w.audienceDecoderConfigured??!1:w.configured??!1)}).catch(()=>h(!1))},[c]);async function R(){const w=(a??"").trim().toLowerCase();if(!w||!w.includes("@"))return;j(!0),localStorage.setItem("bilko_pro_email",w);const T=c==="audiencedecoder"?"audiencedecoder_report":"contentgrade_pro";sn("upgrade_clicked",{email:w});try{const A=await(await fetch(`${ge}/stripe/create-checkout-session`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:w,priceType:T})})).json();A.url&&(sn("checkout_started",{email:w}),window.location.href=A.url)}catch{}finally{j(!1)}}return r.jsxs("div",{style:{marginTop:24},children:[r.jsxs("div",{style:{textAlign:"center",marginBottom:16},children:[r.jsx("div",{style:{fontSize:10,color:"#444",textTransform:"uppercase",letterSpacing:2,fontFamily:"monospace",marginBottom:4},children:c==="audiencedecoder"?"AudienceDecoder":"ContentGrade Suite"}),r.jsx("div",{style:{fontSize:16,fontWeight:800,color:"#e0e0e0"},children:"Upgrade for the full picture"}),r.jsx("div",{style:{fontSize:11,color:"#555",marginTop:4},children:u})]}),r.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:10},children:f.map(w=>r.jsxs("div",{style:{background:w.highlight?"#12121f":"#0d0d1a",border:`1px solid ${w.highlight?l+"55":"#1a1a2e"}`,borderRadius:12,padding:16,position:"relative",boxShadow:w.highlight?`0 0 24px ${l}18`:"none"},children:[w.highlight&&r.jsx("div",{style:{position:"absolute",top:-10,left:"50%",transform:"translateX(-50%)",background:l,color:"#000",fontSize:9,fontWeight:800,padding:"2px 10px",borderRadius:8,letterSpacing:1,whiteSpace:"nowrap"},children:"MOST POPULAR"}),r.jsx("div",{style:{fontWeight:800,fontSize:13,color:"#e0e0e0",marginBottom:2},children:w.name}),r.jsx("div",{style:{fontSize:9,color:"#555",marginBottom:8},children:w.tagline}),r.jsx("div",{style:{fontSize:w.price?20:13,fontWeight:800,color:w.price?l:"#444",marginBottom:12},children:w.price??"Free forever"}),r.jsx("div",{style:{marginBottom:14},children:w.features.map(T=>r.jsxs("div",{style:{fontSize:10,color:w.highlight?"#aaa":"#666",marginBottom:5,display:"flex",alignItems:"flex-start",gap:5},children:[r.jsx("span",{style:{color:w.price?l:"#444",flexShrink:0},children:"✓"}),T]},T))}),r.jsx("button",{disabled:!w.highlight||!g||y||!a||!a.includes("@"),onClick:w.highlight&&g?R:void 0,style:{width:"100%",padding:"8px 0",fontSize:11,fontWeight:700,borderRadius:7,border:w.highlight?`1px solid ${l}66`:"none",background:w.highlight&&g?l+"33":w.highlight?l+"22":"#1a1a2e",color:w.highlight?l:"#444",cursor:w.highlight&&g&&(a!=null&&a.includes("@"))?"pointer":"default"},children:w.highlight&&!w.price?w.cta:w.highlight&&g===!1?"Coming soon":y?"Loading...":w.cta})]},w.name))}),g===!1&&r.jsx("div",{style:{textAlign:"center",marginTop:12,fontSize:10,color:"#333"},children:"Pro launches soon · Capture your email above to be first"})]})}function _h({accentColor:l="#7c4dff",product:c="contentgrade_pro",onEmailChange:a}){const[f,u]=v.useState(()=>localStorage.getItem("bilko_pro_email")??""),[g,h]=v.useState(!1),[y,j]=v.useState(null);v.useEffect(()=>{sn("free_limit_hit")},[]),v.useEffect(()=>{fetch(`${ge}/stripe/subscription-status?email=noop@check.com`).then(_=>_.json()).then(_=>{j(c==="audiencedecoder_report"?_.audienceDecoderConfigured??!1:_.configured??!1)}).catch(()=>j(!1))},[c]);function R(_){u(_.target.value),a==null||a(_.target.value)}async function w(){const _=f.trim().toLowerCase();if(!(!_||!_.includes("@"))){h(!0),localStorage.setItem("bilko_pro_email",_),sn("upgrade_clicked",{email:_});try{const x=await(await fetch(`${ge}/stripe/create-checkout-session`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:_,priceType:c})})).json();x.url&&(sn("checkout_started",{email:_}),window.location.href=x.url)}catch{}finally{h(!1)}}}const T=c==="audiencedecoder_report";return r.jsxs("div",{style:{background:"#12121f",border:`1px solid ${l}44`,borderRadius:14,padding:"24px 20px",marginTop:16,textAlign:"center"},children:[r.jsx("div",{style:{fontSize:28,marginBottom:8},children:"🚧"}),r.jsx("div",{style:{fontSize:15,fontWeight:800,color:"#e0e0e0",marginBottom:6},children:"Free daily limit reached"}),r.jsxs("div",{style:{fontSize:12,color:"#666",marginBottom:20,lineHeight:1.6},children:["You've used your 5 free analyses today."," ",T?"Purchase the full report ($49 one-time) for 100 analyses/day.":"Upgrade to Pro ($9/mo) for 100 analyses/day across all 6 tools."," ","Or come back tomorrow for 5 more free."]}),y?r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:8,maxWidth:280,margin:"0 auto"},children:[r.jsx("input",{type:"email",placeholder:"your@email.com",value:f,onChange:R,onKeyDown:_=>{_.key==="Enter"&&w()},style:{width:"100%",background:"#0d0d1a",border:"1px solid #2a2a3e",borderRadius:7,padding:"10px 12px",fontSize:13,color:"#e0e0e0",outline:"none",fontFamily:"inherit",boxSizing:"border-box"}}),r.jsx("button",{onClick:w,disabled:g||!f.includes("@"),style:{width:"100%",padding:"11px 24px",background:g?"#333":`linear-gradient(135deg, ${l}dd, ${l}99)`,color:"#fff",fontWeight:700,fontSize:13,borderRadius:8,border:`1px solid ${l}`,letterSpacing:.2,cursor:g||!f.includes("@")?"not-allowed":"pointer",opacity:f.includes("@")?1:.5},children:g?"Redirecting...":T?"Unlock Report — $49":"Upgrade to Pro — $9/mo"}),r.jsx("div",{style:{fontSize:10,color:"#444",marginTop:2},children:T?"One-time payment · Full access":"Cancel anytime · Instant access"})]}):y===!1?r.jsx("div",{style:{fontSize:12,color:"#555"},children:"Come back tomorrow for 5 more free analyses."}):null]})}const iu={"A+":"#4caf50",A:"#4caf50","A-":"#4caf50","B+":"#4a90d9",B:"#4a90d9","B-":"#4a90d9","C+":"#ffd54f",C:"#ffd54f","C-":"#ffd54f",D:"#ff9800",F:"#ef5350"},Xn={rule_of_one:"Rule of One",value_equation:"Value Equation",readability:"Readability",proof_promise_plan:"Proof+Promise+Plan"};function Rh({score:l,max:c,label:a,feedback:f}){const u=Math.round(l/c*100),g=u>=80?"#4caf50":u>=60?"#4a90d9":u>=40?"#ffd54f":"#ef5350";return r.jsxs("div",{style:{marginBottom:20},children:[r.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:4},children:[r.jsx("span",{style:{fontSize:12,fontWeight:500,color:"#ccc"},children:a}),r.jsxs("span",{style:{fontSize:12,fontWeight:700,color:"#ddd"},children:[l,"/",c]})]}),r.jsx("div",{style:{height:6,background:"#1a1a2e",borderRadius:3,overflow:"hidden"},children:r.jsx("div",{style:{height:"100%",background:g,borderRadius:3,width:`${u}%`,transition:"width 0.7s ease"}})}),r.jsx("p",{style:{marginTop:6,fontSize:11,color:"#777",lineHeight:1.4},children:f})]})}function Eh({headline:l,setHeadline:c}){const[a,f]=v.useState(!1),[u,g]=v.useState(null),[h,y]=v.useState(null),[j,R]=v.useState(!1),[w,T]=v.useState(""),[_,A]=v.useState(!1),[x,B]=v.useState(null),[C,W]=v.useState(null);v.useEffect(()=>{const K=localStorage.getItem("hg_email");K&&T(K)},[]);async function P(){if(w.includes("@")){A(!0),B(null);try{const K=await fetch(`${ge}/demos/headline-grader/unlock`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:w.trim()})}),se=await K.json();if(!K.ok)throw new Error(se.error||`HTTP ${K.status}`);localStorage.setItem("hg_email",w.trim()),R(!1),W(se.remaining??5)}catch(K){B(K instanceof Error?K.message:"Unlock failed. Try again.")}finally{A(!1)}}}async function Q(){var K;if(l.trim()){f(!0),g(null),y(null),R(!1);try{const se=await fetch(`${ge}/demos/headline-grader`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({headline:l.trim()})}),ce=await se.json();if(ce.gated){R(!0);return}if(!se.ok)throw new Error(ce.error||`HTTP ${se.status}`);((K=ce.usage)==null?void 0:K.remaining)!==void 0&&W(ce.usage.remaining),g(ce)}catch(se){y(se instanceof Error?se.message:"Scoring failed.")}finally{f(!1)}}}const F=u?iu[u.grade]??"#777":"#777",ie=l.trim()?l.trim().split(/\s+/).length:0,re=l.replace(/\s/g,"").length,fe=ie>0?re/ie:0,je=ie>=6&&ie<=12?"#4caf50":ie>=3&&ie<=18?"#ffd54f":"#ef5350",Le=fe>6?{label:"College+",color:"#ef5350"}:fe>5?{label:"High School",color:"#ffd54f"}:{label:"Easy Read",color:"#4caf50"},xe=l.slice(0,60),Ue=l.length>60?l.slice(60):"",Fe=l.toLowerCase().replace(/[^a-z0-9\s]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").slice(0,50).replace(/-$/,"")||"your-headline",Te=l.length<=49?"#1e8e3e":l.length<=58?"#f9ab00":"#d93025",X=l.split(" ").slice(0,3).join(" ")||"this topic";return r.jsxs(r.Fragment,{children:[r.jsxs("div",{style:{marginBottom:20},children:[r.jsx("textarea",{style:{width:"100%",background:"#12121f",border:"1px solid #1a1a2e",borderRadius:10,padding:"12px 14px",fontSize:15,color:"#e0e0e0",resize:"none",outline:"none",fontFamily:"inherit",boxSizing:"border-box"},rows:3,placeholder:"Paste your headline, email subject, ad copy, or landing page title...",value:l,onChange:K=>c(K.target.value),onKeyDown:K=>{K.key==="Enter"&&(K.metaKey||K.ctrlKey)&&Q()}}),r.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:8},children:[r.jsx("div",{style:{display:"flex",gap:6,alignItems:"center",flexWrap:"wrap"},children:l?r.jsxs(r.Fragment,{children:[r.jsxs("span",{style:{fontSize:10,fontFamily:"monospace",padding:"2px 7px",borderRadius:4,background:"#0d0d1a",border:`1px solid ${je}55`,color:je},children:[ie,"w"]}),r.jsxs("span",{style:{fontSize:10,fontFamily:"monospace",padding:"2px 7px",borderRadius:4,background:"#0d0d1a",border:"1px solid #33333388",color:"#555"},children:[l.length,"c"]}),r.jsx("span",{style:{fontSize:10,fontFamily:"monospace",padding:"2px 7px",borderRadius:4,background:"#0d0d1a",border:`1px solid ${Le.color}55`,color:Le.color},children:Le.label})]}):r.jsx("span",{style:{fontSize:10,color:"#444"},children:"Ctrl+Enter to grade"})}),r.jsx("button",{onClick:Q,disabled:a||!l.trim(),style:{padding:"8px 20px",background:a||!l.trim()?"#333":"#7c4dff",color:"#fff",fontWeight:600,fontSize:13,border:"none",borderRadius:8,cursor:a||!l.trim()?"not-allowed":"pointer",opacity:a||!l.trim()?.5:1},children:a?"Grading...":"Grade It"})]})]}),l.length>0&&r.jsxs("div",{style:{marginBottom:20},children:[r.jsx("div",{style:{fontSize:9,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:8,fontFamily:"monospace"},children:"Google Search Preview"}),r.jsxs("div",{style:{background:"#fff",borderRadius:10,padding:"16px 20px",boxShadow:"0 1px 6px rgba(0,0,0,0.15)"},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:6},children:[r.jsx("div",{style:{width:18,height:18,borderRadius:9,background:"#e8e8e8",flexShrink:0}}),r.jsxs("div",{children:[r.jsx("div",{style:{fontSize:12,fontWeight:600,color:"#202124",lineHeight:1.3},children:"Example Site"}),r.jsxs("div",{style:{fontSize:11,color:"#006621",lineHeight:1.2},children:["https://example.com › blog › ",Fe]})]})]}),r.jsxs("div",{style:{fontSize:19,color:"#1a0dab",lineHeight:1.3,marginBottom:4,cursor:"pointer",fontFamily:"arial, sans-serif"},children:[xe,Ue&&r.jsx("span",{style:{color:"#d93025"},children:Ue})]}),r.jsxs("div",{style:{fontSize:13,color:"#545454",lineHeight:1.5,fontFamily:"arial, sans-serif"},children:["Discover how ",X.toLowerCase(),"... Click to read the full article and learn proven strategies that deliver measurable results fast."]}),r.jsxs("div",{style:{marginTop:8,display:"flex",alignItems:"center",gap:8},children:[r.jsxs("span",{style:{fontSize:11,fontFamily:"monospace",color:Te,fontWeight:700},children:[l.length,"/60 chars"]}),l.length>60&&r.jsxs("span",{style:{fontSize:10,color:"#d93025"},children:["— ",l.length-60," over Google's limit"]})]})]})]}),C!==null&&C>0&&!j&&r.jsxs("div",{style:{fontSize:10,color:"#555",textAlign:"right",marginBottom:8},children:[C," free ",C===1?"analysis":"analyses"," remaining today"]}),h&&r.jsx("div",{style:{background:"#2e1a1a",border:"1px solid #5a2a2a",borderRadius:10,padding:12,marginBottom:16,color:"#ef5350",fontSize:12},children:h}),j&&r.jsxs("div",{style:{background:"#12121f",border:"1px solid #7c4dff44",borderRadius:14,padding:28,textAlign:"center",marginBottom:16},children:[r.jsx("div",{style:{fontSize:36,marginBottom:12},children:"🔒"}),r.jsx("h2",{style:{fontSize:18,fontWeight:800,color:"#e0e0e0",margin:"0 0 6px"},children:"You've used all 5 free analyses today"}),r.jsx("p",{style:{fontSize:12,color:"#666",margin:"0 0 20px",lineHeight:1.5},children:"Enter your email to unlock 5 more — plus get early access to Pro when it launches."}),r.jsxs("div",{style:{display:"flex",gap:8,maxWidth:380,margin:"0 auto"},children:[r.jsx("input",{type:"email",placeholder:"you@example.com",value:w,onChange:K=>T(K.target.value),onKeyDown:K=>{K.key==="Enter"&&P()},style:{flex:1,background:"#0d0d1a",border:"1px solid #1a1a2e",borderRadius:8,padding:"10px 12px",fontSize:13,color:"#e0e0e0",outline:"none",fontFamily:"inherit"}}),r.jsx("button",{onClick:P,disabled:_||!w.includes("@"),style:{padding:"10px 20px",background:_||!w.includes("@")?"#333":"#7c4dff",color:"#fff",fontWeight:700,fontSize:12,border:"none",borderRadius:8,cursor:_||!w.includes("@")?"not-allowed":"pointer",opacity:_||!w.includes("@")?.5:1,whiteSpace:"nowrap"},children:_?"Unlocking...":"Unlock 5 More"})]}),x&&r.jsx("p",{style:{color:"#ef5350",fontSize:11,marginTop:10},children:x}),r.jsx(kn,{accentColor:"#7c4dff"})]}),u&&r.jsxs("div",{children:[r.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:24,textAlign:"center",marginBottom:16},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:16,marginBottom:10},children:[r.jsx("span",{style:{fontSize:56,fontWeight:900,color:"#fff"},children:u.total_score}),r.jsxs("div",{style:{textAlign:"left"},children:[r.jsx("div",{style:{fontSize:32,fontWeight:900,color:F},children:u.grade}),r.jsx("div",{style:{fontSize:10,color:"#555",textTransform:"uppercase",letterSpacing:2},children:"/ 100"})]})]}),r.jsx("p",{style:{color:"#aaa",fontSize:13,maxWidth:400,margin:"0 auto 12px"},children:u.diagnosis}),r.jsx(Ot,{shareText:`My headline scored ${u.total_score}/100 on HeadlineGrader by Content Intelligence Stack. Try yours → https://contentintelligence.ai`,accentColor:"#7c4dff"})]}),u.rewrites&&u.rewrites.length>0&&r.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:12},children:[r.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,margin:0},children:"Best Rewrite"}),r.jsx("span",{style:{fontSize:9,padding:"2px 8px",borderRadius:4,background:"#4caf5020",color:"#4caf50",border:"1px solid #4caf5033",fontFamily:"monospace",fontWeight:600,letterSpacing:1},children:"FREE"})]}),r.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:10,padding:10,borderRadius:8,background:"#0d0d1a",border:"1px solid #1a1a2e"},children:[r.jsx("div",{style:{flexShrink:0,width:30,height:30,borderRadius:15,background:"#1a1040",border:"1px solid #3a2a6a",display:"flex",alignItems:"center",justifyContent:"center",fontSize:11,fontWeight:700,color:"#b39ddb"},children:u.rewrites[0].predicted_score}),r.jsxs("div",{children:[r.jsx("p",{style:{color:"#ddd",fontSize:13,fontWeight:500,margin:0},children:u.rewrites[0].text}),r.jsxs("p",{style:{fontSize:10,color:"#555",marginTop:3},children:["Optimized for: ",r.jsx("span",{style:{color:"#777"},children:Xn[u.rewrites[0].optimized_for]??u.rewrites[0].optimized_for})]})]})]})]}),r.jsx(rr,{tool:"headline-grader",score:u.total_score}),r.jsxs(cn,{accentColor:"#7c4dff",label:"Full Framework Report",children:[r.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[r.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:16},children:"Framework Breakdown"}),Object.entries(u.framework_scores).map(([K,se])=>r.jsx(Rh,{label:Xn[K]??K,score:se.score,max:se.max,feedback:se.feedback},K))]}),u.rewrites&&u.rewrites.length>1&&r.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[r.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:14},children:"All AI Rewrites"}),u.rewrites.slice(1).map((K,se)=>r.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:10,padding:10,borderRadius:8,background:"#0d0d1a",border:"1px solid #1a1a2e",marginBottom:8},children:[r.jsx("div",{style:{flexShrink:0,width:30,height:30,borderRadius:15,background:"#1a1040",border:"1px solid #3a2a6a",display:"flex",alignItems:"center",justifyContent:"center",fontSize:11,fontWeight:700,color:"#b39ddb"},children:K.predicted_score}),r.jsxs("div",{children:[r.jsx("p",{style:{color:"#ddd",fontSize:13,fontWeight:500,margin:0},children:K.text}),r.jsxs("p",{style:{fontSize:10,color:"#555",marginTop:3},children:["Optimized for: ",r.jsx("span",{style:{color:"#777"},children:Xn[K.optimized_for]??K.optimized_for})]})]})]},se))]}),u.upgrade_hook&&r.jsx("div",{style:{background:"#1a1040",border:"1px solid #3a2a6a",borderRadius:14,padding:16,textAlign:"center",marginBottom:0},children:r.jsx("p",{style:{color:"#b39ddb",fontSize:12,margin:0},children:u.upgrade_hook})})]}),r.jsx(kn,{accentColor:"#7c4dff"})]})]})}function Od({label:l,result:c,isWinner:a,isDimmed:f}){const u=iu[c.grade]??"#777";return r.jsxs("div",{style:{flex:1,background:"#12121f",border:`1px solid ${a?"#4caf50":"#1a1a2e"}`,borderRadius:14,padding:16,opacity:f?.55:1,transition:"opacity 0.3s",position:"relative"},children:[a&&r.jsx("div",{style:{position:"absolute",top:-12,left:"50%",transform:"translateX(-50%)",background:"#4caf50",color:"#000",fontSize:10,fontWeight:800,padding:"2px 10px",borderRadius:10,letterSpacing:1},children:"WINNER"}),r.jsxs("div",{style:{textAlign:"center",marginBottom:12},children:[r.jsx("div",{style:{fontSize:10,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:4},children:l}),r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:10},children:[r.jsx("span",{style:{fontSize:44,fontWeight:900,color:"#fff"},children:c.total_score}),r.jsx("span",{style:{fontSize:26,fontWeight:900,color:u},children:c.grade})]}),r.jsx("p",{style:{color:"#888",fontSize:11,marginTop:4},children:c.diagnosis})]}),r.jsx("div",{style:{borderTop:"1px solid #1a1a2e",paddingTop:12},children:Object.entries(c.framework_scores).map(([g,h])=>{const y=Math.round(h.score/h.max*100),j=y>=80?"#4caf50":y>=60?"#4a90d9":y>=40?"#ffd54f":"#ef5350";return r.jsxs("div",{style:{marginBottom:8},children:[r.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:3},children:[r.jsx("span",{style:{fontSize:10,color:"#777"},children:Xn[g]??g}),r.jsxs("span",{style:{fontSize:10,color:"#999",fontWeight:700},children:[h.score,"/",h.max]})]}),r.jsx("div",{style:{height:4,background:"#1a1a2e",borderRadius:2,overflow:"hidden"},children:r.jsx("div",{style:{height:"100%",background:j,borderRadius:2,width:`${y}%`}})})]},g)})})]})}function Th({onTryHybrid:l}){const[c,a]=v.useState(""),[f,u]=v.useState(""),[g,h]=v.useState(!1),[y,j]=v.useState(null),[R,w]=v.useState(null);async function T(){if(!(!c.trim()||!f.trim())){h(!0),j(null),w(null);try{const x=await fetch(`${ge}/demos/headline-grader/compare`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({headlineA:c.trim(),headlineB:f.trim()})}),B=await x.json();if(!x.ok)throw new Error(B.error||`HTTP ${x.status}`);j(B)}catch(x){w(x instanceof Error?x.message:"Comparison failed.")}finally{h(!1)}}}const _=c.trim().length>=3&&f.trim().length>=3,A=y==null?void 0:y.comparison.framework_winners;return r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{display:"flex",gap:12,marginBottom:12},children:["A","B"].map(x=>{const B=x==="A"?c:f,C=x==="A"?a:u;return r.jsxs("div",{style:{flex:1},children:[r.jsxs("div",{style:{fontSize:10,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:6},children:["Headline ",x]}),r.jsx("textarea",{style:{width:"100%",background:"#12121f",border:"1px solid #1a1a2e",borderRadius:10,padding:"10px 12px",fontSize:13,color:"#e0e0e0",resize:"none",outline:"none",fontFamily:"inherit",boxSizing:"border-box"},rows:3,placeholder:`Paste headline ${x}...`,value:B,onChange:W=>C(W.target.value)})]},x)})}),r.jsx("div",{style:{display:"flex",justifyContent:"flex-end",marginBottom:20},children:r.jsx("button",{onClick:T,disabled:g||!_,style:{padding:"8px 20px",background:g||!_?"#333":"#7c4dff",color:"#fff",fontWeight:600,fontSize:13,border:"none",borderRadius:8,cursor:g||!_?"not-allowed":"pointer",opacity:g||!_?.5:1},children:g?"Comparing...":"Compare"})}),R&&r.jsx("div",{style:{background:"#2e1a1a",border:"1px solid #5a2a2a",borderRadius:10,padding:12,marginBottom:16,color:"#ef5350",fontSize:12},children:R}),y&&r.jsxs("div",{children:[y.comparison.winner!=="tie"?r.jsxs("div",{style:{background:"#0d1f0d",border:"1px solid #1e4a1e",borderRadius:10,padding:"12px 20px",marginBottom:16,display:"flex",alignItems:"center",justifyContent:"center",gap:16},children:[r.jsxs("div",{style:{textAlign:"center"},children:[r.jsxs("div",{style:{color:"#4caf50",fontWeight:800,fontSize:15},children:["Headline ",y.comparison.winner," wins"]}),r.jsxs("div",{style:{color:"#2e7d32",fontSize:11,marginTop:2},children:["+",y.comparison.margin," pts · ",Math.round(y.comparison.margin/Math.max(y.comparison.winner==="A"?y.headlineB.total_score:y.headlineA.total_score,1)*100),"% stronger"]})]}),r.jsx(Ot,{shareText:`Headline ${y.comparison.winner} won my A/B test on HeadlineGrader by ${y.comparison.margin} points. Try Content Intelligence Stack → https://contentintelligence.ai`,accentColor:"#4caf50"})]}):r.jsx("div",{style:{background:"#1a1a2e",border:"1px solid #2a2a4e",borderRadius:10,padding:"10px 16px",marginBottom:16,textAlign:"center",color:"#ffd54f",fontWeight:700,fontSize:13},children:"It's a tie — both headlines score equally"}),r.jsxs("div",{style:{display:"flex",gap:12,marginBottom:16,paddingTop:16},children:[r.jsx(Od,{label:"Headline A",result:y.headlineA,isWinner:y.comparison.winner==="A",isDimmed:y.comparison.winner==="B"}),r.jsx(Od,{label:"Headline B",result:y.headlineB,isWinner:y.comparison.winner==="B",isDimmed:y.comparison.winner==="A"})]}),A&&r.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[r.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:14},children:"Framework Winners"}),r.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:12},children:[r.jsx("thead",{children:r.jsx("tr",{style:{borderBottom:"1px solid #1a1a2e"},children:["Framework","A Score","B Score","Winner"].map(x=>r.jsx("th",{style:{padding:"6px 8px",textAlign:"left",color:"#555",fontWeight:600,fontSize:10,textTransform:"uppercase",letterSpacing:1},children:x},x))})}),r.jsx("tbody",{children:Object.keys(Xn).map(x=>{const B=A[x],C=y.headlineA.framework_scores[x].score,W=y.headlineB.framework_scores[x].score;return r.jsxs("tr",{style:{borderBottom:"1px solid #0d0d1a"},children:[r.jsx("td",{style:{padding:"8px",color:"#aaa"},children:Xn[x]}),r.jsx("td",{style:{padding:"8px",color:B==="A"?"#4caf50":"#666",fontWeight:B==="A"?700:400},children:C}),r.jsx("td",{style:{padding:"8px",color:B==="B"?"#4caf50":"#666",fontWeight:B==="B"?700:400},children:W}),r.jsx("td",{style:{padding:"8px",color:B==="tie"?"#ffd54f":"#4caf50",fontWeight:700},children:B==="tie"?"Tie":`Headline ${B}`})]},x)})})]})]}),r.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[r.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:10},children:"Analysis"}),r.jsx("p",{style:{color:"#bbb",fontSize:13,lineHeight:1.6,margin:0},children:y.comparison.verdict})]}),r.jsxs("div",{style:{background:"#1a1040",border:"1px solid #3a2a6a",borderRadius:14,padding:20},children:[r.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#7c4dff",textTransform:"uppercase",letterSpacing:2,marginBottom:10},children:"Suggested Hybrid"}),r.jsx("p",{style:{color:"#e0e0e0",fontSize:14,fontWeight:600,lineHeight:1.5,marginBottom:14},children:y.comparison.suggested_hybrid}),r.jsx("button",{onClick:()=>{const x=y.comparison.suggested_hybrid.split(" | ")[0].trim();l(x)},style:{padding:"7px 16px",background:"#7c4dff",color:"#fff",fontWeight:600,fontSize:12,border:"none",borderRadius:8,cursor:"pointer"},children:"Try this headline →"})]})]})]})}function Bh(){const[l,c]=v.useState("score"),[a,f]=v.useState("");return r.jsxs("div",{style:{padding:24,maxWidth:720,margin:"0 auto"},children:[r.jsxs("div",{style:{textAlign:"center",marginBottom:28},children:[r.jsx("div",{style:{fontSize:9,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:6,fontFamily:"monospace"},children:"Content Intelligence Stack"}),r.jsx("h1",{style:{fontSize:28,fontWeight:800,color:"#e0e0e0",letterSpacing:-.5},children:"Grade Your Headline in Seconds"}),r.jsxs("p",{style:{color:"#777",fontSize:14,marginTop:8,lineHeight:1.6,maxWidth:540,margin:"8px auto 0"},children:["Score any headline 1-100 against 4 proven frameworks — Masterson's Rule of One, Hormozi's Value Equation, 5th-grade Readability, and Proof+Promise+Plan — the same system behind ",r.jsx("span",{style:{color:"#ccc",fontWeight:500},children:"$1B+"})," in direct-response revenue at Agora Publishing."]}),r.jsx("div",{style:{display:"flex",flexWrap:"wrap",justifyContent:"center",gap:8,marginTop:16},children:["4 Proven Frameworks","Used by 1000+ Marketers","Free — No Signup Required","Scores 1-100 with AI"].map(u=>r.jsx("span",{style:{fontSize:10,padding:"4px 10px",borderRadius:12,background:"#12121f",color:"#888",border:"1px solid #1a1a2e",fontWeight:500},children:u},u))})]}),r.jsxs("div",{style:{display:"flex",gap:4,background:"#12121f",border:"1px solid #1a1a2e",borderRadius:10,padding:4,marginBottom:24,width:"fit-content"},children:[r.jsx("button",{onClick:()=>c("score"),style:{padding:"7px 18px",borderRadius:8,border:"none",cursor:"pointer",fontSize:12,fontWeight:600,background:l==="score"?"#7c4dff":"transparent",color:l==="score"?"#fff":"#666",transition:"background 0.2s, color 0.2s"},children:"Score"}),r.jsxs("button",{onClick:()=>c("compare"),style:{padding:"7px 18px",borderRadius:8,border:"none",cursor:"pointer",fontSize:12,fontWeight:600,background:l==="compare"?"#2a1a6a":"transparent",color:l==="compare"?"#b39ddb":"#444",transition:"background 0.2s, color 0.2s",display:"flex",alignItems:"center",gap:6},children:["A/B Compare",r.jsx("span",{style:{fontSize:8,padding:"1px 6px",borderRadius:4,background:"#7c4dff33",color:"#b39ddb",border:"1px solid #7c4dff44",fontFamily:"monospace",fontWeight:700,letterSpacing:.5},children:"PRO"})]})]}),l==="score"&&r.jsx(Eh,{headline:a,setHeadline:f}),l==="compare"&&r.jsx("div",{children:r.jsx(cn,{accentColor:"#7c4dff",label:"A/B Compare Mode",children:r.jsx(Th,{onTryHybrid:u=>{f(u),c("score")}})})}),r.jsxs("section",{style:{marginTop:56},children:[r.jsx("h2",{style:{fontSize:14,fontWeight:700,color:"#aaa",marginBottom:16,textAlign:"center",letterSpacing:1,textTransform:"uppercase"},children:"Frequently Asked Questions"}),r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[{q:"What is a headline score?",a:"A headline score is a number from 1 to 100 that measures how persuasive your headline is across four proven direct-response frameworks. A score of 80+ is excellent; 60-79 is good; below 60 needs significant improvement. The score combines Rule of One clarity, Value Equation strength, readability, and the Proof+Promise+Plan hook structure."},{q:"How does HeadlineGrader work?",a:"HeadlineGrader uses AI to analyze your headline against four frameworks proven across $1B+ in direct-response revenue: Masterson's Rule of One (does it focus on a single idea?), Hormozi's Value Equation (does it maximize dream outcome and reduce perceived effort?), 5th-grade readability (is it instantly scannable?), and Proof+Promise+Plan (does it open a curiosity loop with credibility?). Each framework contributes up to 25 points for a maximum score of 100."},{q:"Is HeadlineGrader free?",a:"Yes — HeadlineGrader is completely free with no signup required. You get 5 free headline analyses per day. If you need more, enter your email to unlock 5 additional free analyses. Pro plans with unlimited analyses, A/B comparison, and bulk testing are coming soon."},{q:"How is HeadlineGrader different from CoSchedule's Headline Analyzer?",a:"CoSchedule's Headline Analyzer scores headlines on word balance, length, and sentiment — generic metrics not tied to revenue outcomes. HeadlineGrader scores against frameworks proven in $1B+ of direct-response copywriting. The result is a grade that tells you exactly which persuasion lever is weak and gives you AI-generated rewrites to fix it."},{q:"What types of headlines can I test?",a:"HeadlineGrader works on any short-form persuasive text: blog post titles, email subject lines, Facebook and Google ad headlines, landing page H1s, YouTube video titles, Twitter thread hooks, and sales page headlines. If it needs to grab attention and drive a click, it can be scored."}].map(({q:u,a:g})=>r.jsxs("details",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:10,overflow:"hidden"},children:[r.jsxs("summary",{style:{padding:"14px 18px",cursor:"pointer",fontSize:13,fontWeight:600,color:"#ccc",listStyle:"none",display:"flex",justifyContent:"space-between",alignItems:"center",userSelect:"none"},children:[u,r.jsx("span",{style:{fontSize:16,color:"#555",marginLeft:8,flexShrink:0},children:"+"})]}),r.jsx("p",{style:{padding:"0 18px 14px",fontSize:12,color:"#777",lineHeight:1.7,margin:0,borderTop:"1px solid #1a1a2e"},children:g})]},u))})]}),r.jsxs("footer",{style:{marginTop:40,paddingTop:24,borderTop:"1px solid #111"},children:[r.jsx("p",{style:{fontSize:11,color:"#333",lineHeight:1.7,textAlign:"center"},children:"HeadlineGrader is a free AI-powered headline analyzer that scores your headlines, email subject lines, and ad copy 1-100 using direct-response copywriting frameworks. Use it as your headline grader before publishing blog posts, running paid ads, or sending campaigns. Works as an email subject line tester, ad headline scorer, and landing page headline optimizer — all in one free tool."}),r.jsx("div",{style:{marginTop:16,textAlign:"center",fontSize:10,color:"#2a2a2a"},children:"Built on frameworks from Masterson, Hormozi & Proof+Promise+Plan · Powered by local Claude session"})]})]})}const lu={"A+":"#4caf50",A:"#4caf50","A-":"#4caf50","B+":"#4a90d9",B:"#4a90d9","B-":"#4a90d9","C+":"#ffd54f",C:"#ffd54f","C-":"#ffd54f",D:"#ff9800",F:"#ef5350"},ai={hero:{label:"Hero Section",icon:"🎯"},social_proof:{label:"Social Proof",icon:"⭐"},clarity:{label:"Clarity & Persuasion",icon:"💡"},conversion:{label:"Conversion Architecture",icon:"🔥"}};function Ph({sectionKey:l,section:c}){const a=ai[l]??{label:l,icon:"•"},f=Math.round(c.score/c.max*100),u=f>=80?"#4caf50":f>=60?"#4a90d9":f>=40?"#ffd54f":"#ef5350";return r.jsxs("div",{style:{marginBottom:22},children:[r.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:4},children:[r.jsxs("span",{style:{fontSize:12,fontWeight:500,color:"#ccc"},children:[a.icon," ",a.label]}),r.jsxs("span",{style:{fontSize:12,fontWeight:700,color:"#ddd"},children:[c.score,"/",c.max]})]}),r.jsx("div",{style:{height:6,background:"#1a1a2e",borderRadius:3,overflow:"hidden"},children:r.jsx("div",{style:{height:"100%",background:u,borderRadius:3,width:`${f}%`,transition:"width 0.7s ease"}})}),r.jsx("p",{style:{marginTop:6,fontSize:11,color:"#777",lineHeight:1.4},children:c.feedback}),c.fixes.length>0&&r.jsx("div",{style:{marginTop:6},children:c.fixes.map((g,h)=>r.jsxs("div",{style:{fontSize:11,color:"#999",padding:"4px 8px",marginTop:3,background:"#0d0d1a",borderRadius:4,border:"1px solid #1a1a2e"},children:["→ ",g]},h))})]})}function Wh(){const[l,c]=v.useState(""),[a,f]=v.useState(!1),[u,g]=v.useState(null),[h,y]=v.useState(null),[j,R]=v.useState(!1),[w,T]=v.useState(()=>localStorage.getItem("bilko_pro_email")??"");async function _(){if(l.trim()){f(!0),g(null),y(null),R(!1);try{const x=await fetch(`${ge}/demos/page-roast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:l.trim(),email:w||void 0})}),B=await x.json();if(B.gated){R(!0);return}if(!x.ok)throw new Error(B.error||`HTTP ${x.status}`);g(B)}catch(x){y(x instanceof Error?x.message:"Roast failed.")}finally{f(!1)}}}const A=u?lu[u.grade]??"#777":"#777";return r.jsxs(r.Fragment,{children:[r.jsxs("div",{style:{marginBottom:20},children:[r.jsx("input",{type:"url",style:{width:"100%",background:"#12121f",border:"1px solid #1a1a2e",borderRadius:10,padding:"12px 14px",fontSize:15,color:"#e0e0e0",outline:"none",fontFamily:"inherit",boxSizing:"border-box"},placeholder:"https://your-landing-page.com",value:l,onChange:x=>c(x.target.value),onKeyDown:x=>{x.key==="Enter"&&_()}}),r.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:8},children:[r.jsx("span",{style:{fontSize:10,color:"#444"},children:"Enter to roast"}),r.jsx("button",{onClick:_,disabled:a||!l.trim(),style:{padding:"8px 20px",background:a||!l.trim()?"#333":"#ff6b35",color:"#fff",fontWeight:600,fontSize:13,border:"none",borderRadius:8,cursor:a||!l.trim()?"not-allowed":"pointer",opacity:a||!l.trim()?.5:1},children:a?"Roasting...":"Roast It"})]})]}),h&&r.jsx("div",{style:{background:"#2e1a1a",border:"1px solid #5a2a2a",borderRadius:10,padding:12,marginBottom:16,color:"#ef5350",fontSize:12},children:h}),j&&r.jsx(_h,{accentColor:"#ff6b35",onEmailChange:x=>{T(x),localStorage.setItem("bilko_pro_email",x)}}),u&&r.jsxs("div",{children:[r.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:24,textAlign:"center",marginBottom:16},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:16,marginBottom:10},children:[r.jsx("span",{style:{fontSize:56,fontWeight:900,color:"#fff"},children:u.total_score}),r.jsxs("div",{style:{textAlign:"left"},children:[r.jsx("div",{style:{fontSize:32,fontWeight:900,color:A},children:u.grade}),r.jsx("div",{style:{fontSize:10,color:"#555",textTransform:"uppercase",letterSpacing:2},children:"/ 100"})]})]}),r.jsxs("p",{style:{color:"#ff6b35",fontSize:14,fontWeight:600,fontStyle:"italic",maxWidth:480,margin:"0 auto 12px"},children:['"',u.roast,'"']}),r.jsx(Ot,{shareText:`My landing page scored ${u.total_score}/100 on PageRoast by ContentGrade Suite. Get your free audit → https://contentintelligence.ai`,accentColor:"#ff6b35"})]}),u.top_fixes.length>0&&r.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:12},children:[r.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,margin:0},children:"#1 Highest-Impact Fix"}),r.jsx("span",{style:{fontSize:9,padding:"2px 8px",borderRadius:4,background:"#ff6b3520",color:"#ff6b35",border:"1px solid #ff6b3533",fontFamily:"monospace",fontWeight:600,letterSpacing:1},children:"FREE"})]}),r.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:10,padding:12,borderRadius:8,background:"#0d0d1a",border:"1px solid #1a1a2e"},children:[r.jsx("div",{style:{flexShrink:0,width:28,height:28,borderRadius:14,background:"#2a1a10",border:"1px solid #5a3a1a",display:"flex",alignItems:"center",justifyContent:"center",fontSize:12,fontWeight:700,color:"#ff6b35"},children:"1"}),r.jsx("p",{style:{color:"#ddd",fontSize:13,margin:0,lineHeight:1.5},children:u.top_fixes[0]})]})]}),r.jsx(rr,{tool:"page-roast",score:u.total_score,accentColor:"#ff6b35"}),r.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[r.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:16},children:"Section Breakdown"}),Object.entries(u.section_scores).map(([x,B])=>r.jsx(Ph,{sectionKey:x,section:B},x))]}),u.top_fixes.length>1&&r.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[r.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:14},children:"All High-Impact Fixes"}),u.top_fixes.slice(1).map((x,B)=>r.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:10,padding:10,borderRadius:8,background:"#0d0d1a",border:"1px solid #1a1a2e",marginBottom:8},children:[r.jsx("div",{style:{flexShrink:0,width:28,height:28,borderRadius:14,background:"#2a1a10",border:"1px solid #5a3a1a",display:"flex",alignItems:"center",justifyContent:"center",fontSize:12,fontWeight:700,color:"#ff6b35"},children:B+2}),r.jsx("p",{style:{color:"#ddd",fontSize:13,margin:0,lineHeight:1.5},children:x})]},B))]}),r.jsx("div",{style:{background:"#1a1a10",border:"1px solid #3a3a1a",borderRadius:14,padding:16,textAlign:"center",marginBottom:16},children:r.jsx("p",{style:{color:"#ffd54f",fontSize:12,fontWeight:500,margin:0},children:u.competitor_edge})}),r.jsx(kn,{accentColor:"#ff6b35"})]})]})}function Fd({label:l,url:c,result:a,isWinner:f,isDimmed:u}){const g=lu[a.grade]??"#777";return r.jsxs("div",{style:{flex:1,background:"#12121f",border:`1px solid ${f?"#4caf50":"#1a1a2e"}`,borderRadius:14,padding:16,opacity:u?.55:1,transition:"opacity 0.3s",position:"relative"},children:[f&&r.jsx("div",{style:{position:"absolute",top:-12,left:"50%",transform:"translateX(-50%)",background:"#4caf50",color:"#000",fontSize:10,fontWeight:800,padding:"2px 10px",borderRadius:10,letterSpacing:1},children:"WINNER"}),r.jsxs("div",{style:{textAlign:"center",marginBottom:12},children:[r.jsx("div",{style:{fontSize:10,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:4},children:l}),r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:10},children:[r.jsx("span",{style:{fontSize:44,fontWeight:900,color:"#fff"},children:a.total_score}),r.jsx("span",{style:{fontSize:26,fontWeight:900,color:g},children:a.grade})]}),r.jsxs("p",{style:{color:"#ff6b35",fontSize:11,fontStyle:"italic",marginTop:4},children:['"',a.roast,'"']}),r.jsx("p",{style:{color:"#555",fontSize:9,marginTop:4,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:c})]}),r.jsx("div",{style:{borderTop:"1px solid #1a1a2e",paddingTop:12},children:Object.entries(a.section_scores).map(([h,y])=>{const j=ai[h]??{label:h,icon:"•"},R=Math.round(y.score/y.max*100),w=R>=80?"#4caf50":R>=60?"#4a90d9":R>=40?"#ffd54f":"#ef5350";return r.jsxs("div",{style:{marginBottom:8},children:[r.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:3},children:[r.jsxs("span",{style:{fontSize:10,color:"#777"},children:[j.icon," ",j.label]}),r.jsxs("span",{style:{fontSize:10,color:"#999",fontWeight:700},children:[y.score,"/",y.max]})]}),r.jsx("div",{style:{height:4,background:"#1a1a2e",borderRadius:2,overflow:"hidden"},children:r.jsx("div",{style:{height:"100%",background:w,borderRadius:2,width:`${R}%`}})})]},h)})})]})}function Ah(){const[l,c]=v.useState(""),[a,f]=v.useState(""),[u,g]=v.useState(!1),[h,y]=v.useState(null),[j,R]=v.useState(null);async function w(){if(!(!l.trim()||!a.trim())){g(!0),y(null),R(null);try{const A=await fetch(`${ge}/demos/page-roast/compare`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url_a:l.trim(),url_b:a.trim()})}),x=await A.json();if(!A.ok)throw new Error(x.error||`HTTP ${A.status}`);y(x)}catch(A){R(A instanceof Error?A.message:"Comparison failed.")}finally{g(!1)}}}const T=l.trim().length>0&&a.trim().length>0,_=h==null?void 0:h.comparison.section_winners;return r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{display:"flex",gap:12,marginBottom:12},children:["A","B"].map(A=>{const x=A==="A"?l:a,B=A==="A"?c:f;return r.jsxs("div",{style:{flex:1},children:[r.jsxs("div",{style:{fontSize:10,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:6},children:["Page ",A]}),r.jsx("input",{type:"url",style:{width:"100%",background:"#12121f",border:"1px solid #1a1a2e",borderRadius:10,padding:"10px 12px",fontSize:13,color:"#e0e0e0",outline:"none",fontFamily:"inherit",boxSizing:"border-box"},placeholder:`https://page-${A.toLowerCase()}.com`,value:x,onChange:C=>B(C.target.value)})]},A)})}),r.jsx("div",{style:{display:"flex",justifyContent:"flex-end",marginBottom:20},children:r.jsx("button",{onClick:w,disabled:u||!T,style:{padding:"8px 20px",background:u||!T?"#333":"#ff6b35",color:"#fff",fontWeight:600,fontSize:13,border:"none",borderRadius:8,cursor:u||!T?"not-allowed":"pointer",opacity:u||!T?.5:1},children:u?"Comparing...":"Compare"})}),j&&r.jsx("div",{style:{background:"#2e1a1a",border:"1px solid #5a2a2a",borderRadius:10,padding:12,marginBottom:16,color:"#ef5350",fontSize:12},children:j}),h&&r.jsxs("div",{children:[h.comparison.winner!=="tie"?r.jsxs("div",{style:{background:"#0d1f0d",border:"1px solid #1e4a1e",borderRadius:10,padding:"12px 20px",marginBottom:16,display:"flex",alignItems:"center",justifyContent:"center",gap:16},children:[r.jsxs("div",{style:{textAlign:"center"},children:[r.jsxs("div",{style:{color:"#4caf50",fontWeight:800,fontSize:15},children:["Page ",h.comparison.winner," wins"]}),r.jsxs("div",{style:{color:"#2e7d32",fontSize:11,marginTop:2},children:["+",h.comparison.margin," pts · ",Math.round(h.comparison.margin/Math.max(h.comparison.winner==="A"?h.score_b.total_score:h.score_a.total_score,1)*100),"% stronger"]})]}),r.jsx(Ot,{shareText:`Page ${h.comparison.winner} won my A/B landing page test on PageRoast by ${h.comparison.margin} points. Try ContentGrade Suite → https://contentintelligence.ai`,accentColor:"#4caf50"})]}):r.jsx("div",{style:{background:"#1a1a2e",border:"1px solid #2a2a4e",borderRadius:10,padding:"10px 16px",marginBottom:16,textAlign:"center",color:"#ffd54f",fontWeight:700,fontSize:13},children:"It's a tie — both pages score equally"}),r.jsxs("div",{style:{display:"flex",gap:12,marginBottom:16,paddingTop:16},children:[r.jsx(Fd,{label:"Page A",url:l,result:h.score_a,isWinner:h.comparison.winner==="A",isDimmed:h.comparison.winner==="B"}),r.jsx(Fd,{label:"Page B",url:a,result:h.score_b,isWinner:h.comparison.winner==="B",isDimmed:h.comparison.winner==="A"})]}),_&&r.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[r.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:14},children:"Section Winners"}),r.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:12},children:[r.jsx("thead",{children:r.jsx("tr",{style:{borderBottom:"1px solid #1a1a2e"},children:["Section","A Score","B Score","Winner"].map(A=>r.jsx("th",{style:{padding:"6px 8px",textAlign:"left",color:"#555",fontWeight:600,fontSize:10,textTransform:"uppercase",letterSpacing:1},children:A},A))})}),r.jsx("tbody",{children:Object.keys(ai).map(A=>{const x=_[A],B=h.score_a.section_scores[A].score,C=h.score_b.section_scores[A].score,W=ai[A];return r.jsxs("tr",{style:{borderBottom:"1px solid #0d0d1a"},children:[r.jsxs("td",{style:{padding:"8px",color:"#aaa"},children:[W.icon," ",W.label]}),r.jsxs("td",{style:{padding:"8px",color:x==="A"?"#4caf50":"#666",fontWeight:x==="A"?700:400},children:[B,"/25"]}),r.jsxs("td",{style:{padding:"8px",color:x==="B"?"#4caf50":"#666",fontWeight:x==="B"?700:400},children:[C,"/25"]}),r.jsx("td",{style:{padding:"8px",color:x==="tie"?"#ffd54f":"#4caf50",fontWeight:700},children:x==="tie"?"Tie":`Page ${x}`})]},A)})})]})]}),r.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[r.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:10},children:"Verdict"}),r.jsx("p",{style:{color:"#bbb",fontSize:13,lineHeight:1.6,margin:0},children:h.comparison.verdict})]}),r.jsxs("div",{style:{background:"#2a1a10",border:"1px solid #5a3a1a",borderRadius:14,padding:20},children:[r.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#ff6b35",textTransform:"uppercase",letterSpacing:2,marginBottom:10},children:"Strategic Analysis"}),r.jsx("p",{style:{color:"#e0e0e0",fontSize:13,lineHeight:1.6,margin:0},children:h.comparison.analysis})]})]})]})}function Lh(){const[l,c]=v.useState("roast");return r.jsxs("div",{style:{padding:24,maxWidth:720,margin:"0 auto"},children:[r.jsxs("div",{style:{textAlign:"center",marginBottom:28},children:[r.jsx("div",{style:{fontSize:9,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:6,fontFamily:"monospace"},children:"ContentGrade Suite"}),r.jsxs("h1",{style:{fontSize:28,fontWeight:800,color:"#e0e0e0",letterSpacing:-.5},children:["Page",r.jsx("span",{style:{color:"#ff6b35"},children:"Roast"})]}),r.jsxs("p",{style:{color:"#777",fontSize:14,marginTop:6},children:["Paste a URL. Get a brutally honest landing page audit in ",r.jsx("span",{style:{color:"#ccc",fontWeight:500},children:"60 seconds"}),"."]}),r.jsx("div",{style:{display:"flex",flexWrap:"wrap",justifyContent:"center",gap:6,marginTop:12},children:["Hero Section","Social Proof","Clarity","Conversion"].map(a=>r.jsx("span",{style:{fontSize:10,padding:"3px 10px",borderRadius:12,background:"#12121f",color:"#666",border:"1px solid #1a1a2e"},children:a},a))})]}),r.jsxs("div",{style:{display:"flex",gap:4,background:"#12121f",border:"1px solid #1a1a2e",borderRadius:10,padding:4,marginBottom:24,width:"fit-content"},children:[r.jsx("button",{onClick:()=>c("roast"),style:{padding:"7px 18px",borderRadius:8,border:"none",cursor:"pointer",fontSize:12,fontWeight:600,background:l==="roast"?"#ff6b35":"transparent",color:l==="roast"?"#fff":"#666",transition:"background 0.2s, color 0.2s"},children:"Roast"}),r.jsx("button",{onClick:()=>c("compare"),style:{padding:"7px 18px",borderRadius:8,border:"none",cursor:"pointer",fontSize:12,fontWeight:600,background:l==="compare"?"#4a2a10":"transparent",color:l==="compare"?"#ff9966":"#444",transition:"background 0.2s, color 0.2s"},children:"A/B Compare"})]}),l==="roast"&&r.jsx(Wh,{}),l==="compare"&&r.jsx(Ah,{}),r.jsx("div",{style:{marginTop:40,textAlign:"center",fontSize:10,color:"#333"},children:"Conversion-focused audit using proven CRO frameworks · Powered by local Claude session"})]})}const su={"A+":"#4caf50",A:"#4caf50","A-":"#4caf50","B+":"#4a90d9",B:"#4a90d9","B-":"#4a90d9","C+":"#ffd54f",C:"#ffd54f","C-":"#ffd54f",D:"#ff9800",F:"#ef5350"},Cn={hook:"Hook Strength",value_prop:"Value Proposition",emotional:"Emotional Architecture",cta_conversion:"CTA & Conversion"},au=["facebook","google","linkedin"],_e="#00bfa5";function Nh({pillarKey:l,pillar:c}){const a=Cn[l]??l,f=Math.round(c.score/c.max*100),u=f>=80?"#4caf50":f>=60?"#4a90d9":f>=40?"#ffd54f":"#ef5350";return r.jsxs("div",{style:{marginBottom:20},children:[r.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:4},children:[r.jsx("span",{style:{fontSize:12,fontWeight:500,color:"#ccc"},children:a}),r.jsxs("span",{style:{fontSize:12,fontWeight:700,color:"#ddd"},children:[c.score,"/",c.max]})]}),r.jsx("div",{style:{height:6,background:"#1a1a2e",borderRadius:3,overflow:"hidden"},children:r.jsx("div",{style:{height:"100%",background:u,borderRadius:3,width:`${f}%`,transition:"width 0.7s ease"}})}),r.jsx("p",{style:{marginTop:6,fontSize:11,color:"#777",lineHeight:1.4},children:c.feedback})]})}function Md({label:l,result:c,isWinner:a,isDimmed:f}){const u=su[c.grade]??"#777";return r.jsxs("div",{style:{flex:1,background:a?"#0a2a25":"#12121f",border:`1px solid ${a?"#1a4a3a":"#1a1a2e"}`,borderRadius:12,padding:16,opacity:f?.6:1,transition:"opacity 0.3s"},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:10},children:[r.jsx("span",{style:{fontSize:10,color:"#555",textTransform:"uppercase",letterSpacing:2},children:l}),a&&r.jsx("span",{style:{fontSize:9,padding:"2px 7px",borderRadius:4,background:"#4caf5020",color:"#4caf50",border:"1px solid #4caf5033",fontFamily:"monospace",fontWeight:700},children:"WINNER"})]}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:10},children:[r.jsx("span",{style:{fontSize:40,fontWeight:900,color:"#fff"},children:c.total_score}),r.jsx("span",{style:{fontSize:24,fontWeight:900,color:u},children:c.grade})]}),Object.keys(Cn).map(g=>{const h=c.pillar_scores[g],y=Math.round(h.score/h.max*100),j=y>=80?"#4caf50":y>=60?"#4a90d9":y>=40?"#ffd54f":"#ef5350";return r.jsxs("div",{style:{marginBottom:6},children:[r.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:2},children:[r.jsx("span",{style:{fontSize:9,color:"#666"},children:Cn[g]}),r.jsxs("span",{style:{fontSize:9,color:"#888",fontWeight:700},children:[h.score,"/",h.max]})]}),r.jsx("div",{style:{height:3,background:"#1a1a2e",borderRadius:2,overflow:"hidden"},children:r.jsx("div",{style:{height:"100%",background:j,borderRadius:2,width:`${y}%`}})})]},g)})]})}function Ih({adCopy:l,setAdCopy:c}){const[a,f]=v.useState("facebook"),[u,g]=v.useState(!1),[h,y]=v.useState(null),[j,R]=v.useState(null);async function w(){if(!(!l.trim()||l.trim().length<10)){g(!0),y(null),R(null);try{const _=await fetch(`${ge}/demos/ad-scorer`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adCopy:l.trim(),platform:a})}),A=await _.json();if(!_.ok)throw new Error(A.error||`HTTP ${_.status}`);y(A)}catch(_){R(_ instanceof Error?_.message:"Scoring failed.")}finally{g(!1)}}}const T=h?su[h.grade]??"#777":"#777";return r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{display:"flex",gap:8,marginBottom:12,justifyContent:"center"},children:au.map(_=>r.jsx("button",{onClick:()=>f(_),style:{padding:"5px 14px",fontSize:11,fontWeight:600,borderRadius:6,border:a===_?`1px solid ${_e}`:"1px solid #1a1a2e",background:a===_?"#0a2a25":"#12121f",color:a===_?_e:"#555",cursor:"pointer",textTransform:"capitalize"},children:_},_))}),r.jsxs("div",{style:{marginBottom:20},children:[r.jsx("textarea",{style:{width:"100%",background:"#12121f",border:"1px solid #1a1a2e",borderRadius:10,padding:"12px 14px",fontSize:14,color:"#e0e0e0",resize:"none",outline:"none",fontFamily:"inherit",boxSizing:"border-box"},rows:6,placeholder:`Paste your ${a} ad copy here...`,value:l,onChange:_=>c(_.target.value),onKeyDown:_=>{_.key==="Enter"&&(_.metaKey||_.ctrlKey)&&w()}}),r.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:8},children:[r.jsxs("span",{style:{fontSize:10,color:"#444"},children:[l.length,"/2000 chars · Ctrl+Enter to score"]}),r.jsx("button",{onClick:w,disabled:u||l.trim().length<10,style:{padding:"8px 20px",background:u||l.trim().length<10?"#333":_e,color:"#fff",fontWeight:600,fontSize:13,border:"none",borderRadius:8,cursor:u||l.trim().length<10?"not-allowed":"pointer",opacity:u||l.trim().length<10?.5:1},children:u?"Scoring...":"Score It"})]})]}),j&&r.jsx("div",{style:{background:"#2e1a1a",border:"1px solid #5a2a2a",borderRadius:10,padding:12,marginBottom:16,color:"#ef5350",fontSize:12},children:j}),h&&r.jsxs("div",{children:[r.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:24,textAlign:"center",marginBottom:16},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:16,marginBottom:10},children:[r.jsx("span",{style:{fontSize:56,fontWeight:900,color:"#fff"},children:h.total_score}),r.jsxs("div",{style:{textAlign:"left"},children:[r.jsx("div",{style:{fontSize:32,fontWeight:900,color:T},children:h.grade}),r.jsx("div",{style:{fontSize:10,color:"#555",textTransform:"uppercase",letterSpacing:2},children:"/ 100"})]})]}),r.jsxs("p",{style:{color:_e,fontSize:14,fontWeight:600,fontStyle:"italic",maxWidth:480,margin:"0 auto 12px"},children:['"',h.verdict,'"']}),r.jsx(Ot,{shareText:`My ad copy scored ${h.total_score}/100 on AdScorer by Content Intelligence Stack. Grade yours → https://contentintelligence.ai`,accentColor:_e})]}),h.rewrites&&h.rewrites.length>0&&r.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:12},children:[r.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,margin:0},children:"Best Rewrite"}),r.jsx("span",{style:{fontSize:9,padding:"2px 8px",borderRadius:4,background:"#4caf5020",color:"#4caf50",border:"1px solid #4caf5033",fontFamily:"monospace",fontWeight:600,letterSpacing:1},children:"FREE"})]}),r.jsxs("div",{style:{padding:12,borderRadius:8,background:"#0d0d1a",border:"1px solid #1a1a2e"},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:6},children:[r.jsx("div",{style:{flexShrink:0,width:28,height:28,borderRadius:14,background:"#0a2a25",border:"1px solid #1a4a3a",display:"flex",alignItems:"center",justifyContent:"center",fontSize:11,fontWeight:700,color:_e},children:h.rewrites[0].predicted_score}),r.jsxs("span",{style:{fontSize:10,color:"#555"},children:["Optimized for: ",r.jsx("span",{style:{color:"#777"},children:Cn[h.rewrites[0].optimized_for]??h.rewrites[0].optimized_for})]})]}),r.jsx("p",{style:{color:"#ddd",fontSize:13,margin:0,lineHeight:1.5,whiteSpace:"pre-line"},children:h.rewrites[0].text})]})]}),r.jsx(rr,{tool:"ad-scorer",score:h.total_score}),r.jsxs(cn,{accentColor:_e,label:"Full Ad Analysis",children:[r.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[r.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:16},children:"Pillar Breakdown"}),Object.entries(h.pillar_scores).map(([_,A])=>r.jsx(Nh,{pillarKey:_,pillar:A},_))]}),h.rewrites&&h.rewrites.length>1&&r.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[r.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:14},children:"All AI Rewrites"}),h.rewrites.slice(1).map((_,A)=>r.jsxs("div",{style:{padding:12,borderRadius:8,background:"#0d0d1a",border:"1px solid #1a1a2e",marginBottom:8},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:6},children:[r.jsx("div",{style:{flexShrink:0,width:28,height:28,borderRadius:14,background:"#0a2a25",border:"1px solid #1a4a3a",display:"flex",alignItems:"center",justifyContent:"center",fontSize:11,fontWeight:700,color:_e},children:_.predicted_score}),r.jsxs("span",{style:{fontSize:10,color:"#555"},children:["Optimized for: ",r.jsx("span",{style:{color:"#777"},children:Cn[_.optimized_for]??_.optimized_for})]})]}),r.jsx("p",{style:{color:"#ddd",fontSize:13,margin:0,lineHeight:1.5,whiteSpace:"pre-line"},children:_.text})]},A))]}),h.upgrade_hook&&r.jsx("div",{style:{background:"#0a2a25",border:"1px solid #1a4a3a",borderRadius:14,padding:16,textAlign:"center"},children:r.jsx("p",{style:{color:_e,fontSize:12,fontWeight:500,margin:0},children:h.upgrade_hook})})]}),r.jsx(kn,{accentColor:_e})]})]})}function Oh({onTryHybrid:l}){const[c,a]=v.useState(""),[f,u]=v.useState(""),[g,h]=v.useState("facebook"),[y,j]=v.useState(!1),[R,w]=v.useState(null),[T,_]=v.useState(null);async function A(){if(!(!c.trim()||!f.trim())){j(!0),w(null),_(null);try{const C=await fetch(`${ge}/demos/ad-scorer/compare`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adCopyA:c.trim(),adCopyB:f.trim(),platform:g})}),W=await C.json();if(!C.ok)throw new Error(W.error||`HTTP ${C.status}`);w(W)}catch(C){_(C instanceof Error?C.message:"Comparison failed.")}finally{j(!1)}}}const x=c.trim().length>=10&&f.trim().length>=10,B=R==null?void 0:R.comparison.pillar_winners;return r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{display:"flex",gap:8,marginBottom:14,justifyContent:"center"},children:au.map(C=>r.jsx("button",{onClick:()=>h(C),style:{padding:"5px 14px",fontSize:11,fontWeight:600,borderRadius:6,border:g===C?`1px solid ${_e}`:"1px solid #1a1a2e",background:g===C?"#0a2a25":"#12121f",color:g===C?_e:"#555",cursor:"pointer",textTransform:"capitalize"},children:C},C))}),r.jsx("div",{style:{display:"flex",gap:12,marginBottom:12},children:["A","B"].map(C=>{const W=C==="A"?c:f,P=C==="A"?a:u;return r.jsxs("div",{style:{flex:1},children:[r.jsxs("div",{style:{fontSize:10,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:6},children:["Ad Copy ",C]}),r.jsx("textarea",{style:{width:"100%",background:"#12121f",border:"1px solid #1a1a2e",borderRadius:10,padding:"10px 12px",fontSize:13,color:"#e0e0e0",resize:"none",outline:"none",fontFamily:"inherit",boxSizing:"border-box"},rows:5,placeholder:`Paste ${g} ad copy ${C}...`,value:W,onChange:Q=>P(Q.target.value)})]},C)})}),r.jsx("div",{style:{display:"flex",justifyContent:"flex-end",marginBottom:20},children:r.jsx("button",{onClick:A,disabled:y||!x,style:{padding:"8px 20px",background:y||!x?"#333":_e,color:"#fff",fontWeight:600,fontSize:13,border:"none",borderRadius:8,cursor:y||!x?"not-allowed":"pointer",opacity:y||!x?.5:1},children:y?"Comparing...":"Compare"})}),T&&r.jsx("div",{style:{background:"#2e1a1a",border:"1px solid #5a2a2a",borderRadius:10,padding:12,marginBottom:16,color:"#ef5350",fontSize:12},children:T}),R&&r.jsxs("div",{children:[R.comparison.winner!=="tie"?r.jsxs("div",{style:{background:"#0d1f0d",border:"1px solid #1e4a1e",borderRadius:10,padding:"12px 20px",marginBottom:16,display:"flex",alignItems:"center",justifyContent:"center",gap:16},children:[r.jsxs("div",{style:{textAlign:"center"},children:[r.jsxs("div",{style:{color:"#4caf50",fontWeight:800,fontSize:15},children:["Ad Copy ",R.comparison.winner," wins"]}),r.jsxs("div",{style:{color:"#2e7d32",fontSize:11,marginTop:2},children:["+",R.comparison.margin," pts · ",Math.round(R.comparison.margin/Math.max(R.comparison.winner==="A"?R.adCopyB.total_score:R.adCopyA.total_score,1)*100),"% stronger"]})]}),r.jsx(Ot,{shareText:`Ad Copy ${R.comparison.winner} won my A/B test on AdScorer by ${R.comparison.margin} points. Try Content Intelligence Stack → https://contentintelligence.ai`,accentColor:"#4caf50"})]}):r.jsx("div",{style:{background:"#1a1a2e",border:"1px solid #2a2a4e",borderRadius:10,padding:"10px 16px",marginBottom:16,textAlign:"center",color:"#ffd54f",fontWeight:700,fontSize:13},children:"It's a tie — both copies score equally"}),r.jsxs("div",{style:{display:"flex",gap:12,marginBottom:16,paddingTop:16},children:[r.jsx(Md,{label:"Ad Copy A",result:R.adCopyA,isWinner:R.comparison.winner==="A",isDimmed:R.comparison.winner==="B"}),r.jsx(Md,{label:"Ad Copy B",result:R.adCopyB,isWinner:R.comparison.winner==="B",isDimmed:R.comparison.winner==="A"})]}),B&&r.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[r.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:14},children:"Pillar Winners"}),r.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:12},children:[r.jsx("thead",{children:r.jsx("tr",{style:{borderBottom:"1px solid #1a1a2e"},children:["Pillar","A Score","B Score","Winner"].map(C=>r.jsx("th",{style:{padding:"6px 8px",textAlign:"left",color:"#555",fontWeight:600,fontSize:10,textTransform:"uppercase",letterSpacing:1},children:C},C))})}),r.jsx("tbody",{children:Object.keys(Cn).map(C=>{const W=B[C],P=R.adCopyA.pillar_scores[C].score,Q=R.adCopyB.pillar_scores[C].score;return r.jsxs("tr",{style:{borderBottom:"1px solid #0d0d1a"},children:[r.jsx("td",{style:{padding:"8px",color:"#aaa"},children:Cn[C]}),r.jsx("td",{style:{padding:"8px",color:W==="A"?"#4caf50":"#666",fontWeight:W==="A"?700:400},children:P}),r.jsx("td",{style:{padding:"8px",color:W==="B"?"#4caf50":"#666",fontWeight:W==="B"?700:400},children:Q}),r.jsx("td",{style:{padding:"8px",color:W==="tie"?"#ffd54f":"#4caf50",fontWeight:700},children:W==="tie"?"Tie":`Copy ${W}`})]},C)})})]})]}),r.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[r.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:10},children:"Analysis"}),r.jsx("p",{style:{color:"#bbb",fontSize:13,lineHeight:1.6,margin:"0 0 10px"},children:R.comparison.verdict}),R.comparison.strategic_analysis&&r.jsxs("p",{style:{color:"#777",fontSize:12,lineHeight:1.5,margin:0,borderTop:"1px solid #1a1a2e",paddingTop:10},children:[r.jsx("span",{style:{color:_e,fontWeight:600},children:"Next test: "}),R.comparison.strategic_analysis]})]}),r.jsxs("div",{style:{background:"#0a2520",border:"1px solid #1a4a3a",borderRadius:14,padding:20},children:[r.jsx("h2",{style:{fontSize:11,fontWeight:600,color:_e,textTransform:"uppercase",letterSpacing:2,marginBottom:10},children:"Suggested Hybrid"}),r.jsx("p",{style:{color:"#e0e0e0",fontSize:13,fontWeight:600,lineHeight:1.6,marginBottom:14},children:R.comparison.suggested_hybrid}),r.jsx("button",{onClick:()=>{const C=R.comparison.suggested_hybrid.split(" | ")[0].trim();l(C)},style:{padding:"7px 16px",background:_e,color:"#fff",fontWeight:600,fontSize:12,border:"none",borderRadius:8,cursor:"pointer"},children:"Try this copy →"})]})]})]})}function Fh(){const[l,c]=v.useState("score"),[a,f]=v.useState("");return r.jsxs("div",{style:{padding:24,maxWidth:720,margin:"0 auto"},children:[r.jsxs("div",{style:{textAlign:"center",marginBottom:28},children:[r.jsx("div",{style:{fontSize:9,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:6,fontFamily:"monospace"},children:"ContentGrade Suite"}),r.jsxs("h1",{style:{fontSize:28,fontWeight:800,color:"#e0e0e0",letterSpacing:-.5},children:["Ad",r.jsx("span",{style:{color:_e},children:"Scorer"})]}),r.jsxs("p",{style:{color:"#777",fontSize:14,marginTop:6},children:["Paste your ad copy. Get a ",r.jsx("span",{style:{color:"#ccc",fontWeight:500},children:"direct response audit"})," in seconds."]}),r.jsx("div",{style:{display:"flex",flexWrap:"wrap",justifyContent:"center",gap:6,marginTop:12},children:["Hook Strength","Value Prop","Emotional Arc","CTA & Conversion"].map(u=>r.jsx("span",{style:{fontSize:10,padding:"3px 10px",borderRadius:12,background:"#12121f",color:"#666",border:"1px solid #1a1a2e"},children:u},u))})]}),r.jsxs("div",{style:{display:"flex",gap:4,background:"#12121f",border:"1px solid #1a1a2e",borderRadius:10,padding:4,marginBottom:24,width:"fit-content"},children:[r.jsx("button",{onClick:()=>c("score"),style:{padding:"7px 18px",borderRadius:8,border:"none",cursor:"pointer",fontSize:12,fontWeight:600,background:l==="score"?_e:"transparent",color:l==="score"?"#fff":"#666",transition:"background 0.2s, color 0.2s"},children:"Score"}),r.jsxs("button",{onClick:()=>c("compare"),style:{padding:"7px 18px",borderRadius:8,border:"none",cursor:"pointer",fontSize:12,fontWeight:600,background:l==="compare"?"#0a2a25":"transparent",color:l==="compare"?_e:"#444",transition:"background 0.2s, color 0.2s",display:"flex",alignItems:"center",gap:6},children:["A/B Compare",r.jsx("span",{style:{fontSize:8,padding:"1px 6px",borderRadius:4,background:`${_e}22`,color:_e,border:`1px solid ${_e}33`,fontFamily:"monospace",fontWeight:700,letterSpacing:.5},children:"PRO"})]})]}),l==="score"&&r.jsx(Ih,{adCopy:a,setAdCopy:f}),l==="compare"&&r.jsx("div",{children:r.jsx(cn,{accentColor:_e,label:"A/B Compare Mode",children:r.jsx(Oh,{onTryHybrid:u=>{f(u),c("score")}})})}),r.jsx("div",{style:{marginTop:40,textAlign:"center",fontSize:10,color:"#333"},children:"Direct response ad scoring using proven performance frameworks · Powered by local Claude session"})]})}const cu={"A+":"#4caf50",A:"#4caf50","A-":"#4caf50","B+":"#4a90d9",B:"#4a90d9","B-":"#4a90d9","C+":"#ffd54f",C:"#ffd54f","C-":"#ffd54f",D:"#ff9800",F:"#ef5350"},Gr={hook:"Hook Strength",tension:"Tension Chain",payoff:"Payoff",share_trigger:"Share Trigger"},Ae="#1da1f2";function xs(l){const c=l.split(/---|\n\n/).map(a=>a.trim()).filter(Boolean);return Math.max(1,c.length)}function Dd({pillarKey:l,pillar:c}){const a=Gr[l]??l,f=Math.round(c.score/c.max*100),u=f>=80?"#4caf50":f>=60?"#4a90d9":f>=40?"#ffd54f":"#ef5350";return r.jsxs("div",{style:{marginBottom:20},children:[r.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:4},children:[r.jsx("span",{style:{fontSize:12,fontWeight:500,color:"#ccc"},children:a}),r.jsxs("span",{style:{fontSize:12,fontWeight:700,color:"#ddd"},children:[c.score,"/",c.max]})]}),r.jsx("div",{style:{height:6,background:"#1a1a2e",borderRadius:3,overflow:"hidden"},children:r.jsx("div",{style:{height:"100%",background:u,borderRadius:3,width:`${f}%`,transition:"width 0.7s ease"}})}),r.jsx("p",{style:{marginTop:6,fontSize:11,color:"#777",lineHeight:1.4},children:c.feedback})]})}function $d({label:l,result:c,isWinner:a,isDimmed:f}){const u=cu[c.grade]??"#777";return r.jsxs("div",{style:{flex:1,background:a?"#0a1e2e":"#12121f",border:`1px solid ${a?"#1a3a5a":"#1a1a2e"}`,borderRadius:12,padding:16,opacity:f?.6:1,transition:"opacity 0.3s"},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:10},children:[r.jsx("span",{style:{fontSize:10,color:"#555",textTransform:"uppercase",letterSpacing:2},children:l}),a&&r.jsx("span",{style:{fontSize:9,padding:"2px 7px",borderRadius:4,background:"#4caf5020",color:"#4caf50",border:"1px solid #4caf5033",fontFamily:"monospace",fontWeight:700},children:"WINNER"})]}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:10},children:[r.jsx("span",{style:{fontSize:40,fontWeight:900,color:"#fff"},children:c.total_score}),r.jsx("span",{style:{fontSize:24,fontWeight:900,color:u},children:c.grade})]}),Object.keys(Gr).map(g=>{const h=c.pillar_scores[g],y=Math.round(h.score/h.max*100),j=y>=80?"#4caf50":y>=60?"#4a90d9":y>=40?"#ffd54f":"#ef5350";return r.jsxs("div",{style:{marginBottom:6},children:[r.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:2},children:[r.jsx("span",{style:{fontSize:9,color:"#666"},children:Gr[g]}),r.jsxs("span",{style:{fontSize:9,color:"#888",fontWeight:700},children:[h.score,"/",h.max]})]}),r.jsx("div",{style:{height:3,background:"#1a1a2e",borderRadius:2,overflow:"hidden"},children:r.jsx("div",{style:{height:"100%",background:j,borderRadius:2,width:`${y}%`}})})]},g)})]})}function Mh({threadText:l,setThreadText:c}){const[a,f]=v.useState(!1),[u,g]=v.useState(null),[h,y]=v.useState(null),[j,R]=v.useState(!1),w=xs(l);async function T(){if(!(!l.trim()||l.trim().length<20)){f(!0),g(null),y(null);try{const x=await fetch(`${ge}/demos/thread-grader`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({threadText:l.trim()})}),B=await x.json();if(!x.ok)throw new Error(B.error||`HTTP ${x.status}`);g(B)}catch(x){y(x instanceof Error?x.message:"Scoring failed.")}finally{f(!1)}}}function _(){if(!u)return;const x=encodeURIComponent(`My thread scored ${u.total_score}/100 on ThreadGrader — try yours: https://contentintelligence.ai`);window.open(`https://twitter.com/intent/tweet?text=${x}`,"_blank"),R(!0)}const A=u?cu[u.grade]??"#777":"#777";return r.jsxs(r.Fragment,{children:[r.jsxs("div",{style:{marginBottom:20},children:[r.jsx("textarea",{style:{width:"100%",background:"#12121f",border:"1px solid #1a1a2e",borderRadius:10,padding:"12px 14px",fontSize:13,color:"#e0e0e0",resize:"vertical",outline:"none",fontFamily:"inherit",boxSizing:"border-box",lineHeight:1.6},rows:10,placeholder:`Paste your full thread here. Separate tweets with --- or a blank line.
68
+
69
+ Example:
70
+ Most people write threads wrong.
71
+
72
+ Here's the mistake killing your reach:
73
+ ---
74
+ They start with context.
75
+
76
+ Readers don't care about your context yet.
77
+ ---
78
+ Start with the hook. Earn the context.`,value:l,onChange:x=>c(x.target.value),onKeyDown:x=>{x.key==="Enter"&&(x.metaKey||x.ctrlKey)&&T()}}),r.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:8},children:[r.jsxs("span",{style:{fontSize:10,color:"#444"},children:[w," tweet",w!==1?"s":""," · ",l.length,"/5000 chars · Ctrl+Enter to grade"]}),r.jsx("button",{onClick:T,disabled:a||l.trim().length<20,style:{padding:"8px 20px",background:a||l.trim().length<20?"#333":Ae,color:"#fff",fontWeight:600,fontSize:13,border:"none",borderRadius:8,cursor:a||l.trim().length<20?"not-allowed":"pointer",opacity:a||l.trim().length<20?.5:1},children:a?"Grading...":"Grade Thread"})]})]}),h&&r.jsx("div",{style:{background:"#2e1a1a",border:"1px solid #5a2a2a",borderRadius:10,padding:12,marginBottom:16,color:"#ef5350",fontSize:12},children:h}),u&&r.jsxs("div",{children:[r.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:24,textAlign:"center",marginBottom:16},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:16,marginBottom:10},children:[r.jsx("span",{style:{fontSize:56,fontWeight:900,color:"#fff"},children:u.total_score}),r.jsxs("div",{style:{textAlign:"left"},children:[r.jsx("div",{style:{fontSize:32,fontWeight:900,color:A},children:u.grade}),r.jsx("div",{style:{fontSize:10,color:"#555",textTransform:"uppercase",letterSpacing:2},children:"/ 100"})]})]}),r.jsxs("p",{style:{color:Ae,fontSize:14,fontWeight:600,fontStyle:"italic",maxWidth:480,margin:"0 auto 16px"},children:['"',u.verdict,'"']}),r.jsxs("div",{style:{display:"flex",justifyContent:"center",gap:10,flexWrap:"wrap"},children:[r.jsx(Ot,{shareText:`My thread scored ${u.total_score}/100 on ThreadGrader. Grade yours → https://contentintelligence.ai`,accentColor:Ae}),r.jsx("button",{onClick:_,style:{padding:"7px 14px",background:j?"#0a2a3a":"#1a3a5a",color:j?"#4caf50":Ae,border:`1px solid ${j?"#1a5a2a":"#1a5a7a"}`,borderRadius:8,cursor:"pointer",fontSize:12,fontWeight:600},children:j?"✓ Tweeted!":"Tweet Your Score"})]})]}),r.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:14},children:[r.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,margin:0},children:"Hook Analysis"}),r.jsx("span",{style:{fontSize:9,padding:"2px 8px",borderRadius:4,background:"#4caf5020",color:"#4caf50",border:"1px solid #4caf5033",fontFamily:"monospace",fontWeight:600,letterSpacing:1},children:"FREE"})]}),r.jsx(Dd,{pillarKey:"hook",pillar:u.pillar_scores.hook})]}),u.rewrites&&u.rewrites.length>0&&r.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:12},children:[r.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,margin:0},children:"Best Hook Rewrite"}),r.jsx("span",{style:{fontSize:9,padding:"2px 8px",borderRadius:4,background:"#4caf5020",color:"#4caf50",border:"1px solid #4caf5033",fontFamily:"monospace",fontWeight:600,letterSpacing:1},children:"FREE"})]}),r.jsxs("div",{style:{padding:14,borderRadius:8,background:"#0d0d1a",border:"1px solid #1a1a2e"},children:[r.jsx("div",{style:{fontSize:10,color:Ae,fontWeight:700,marginBottom:8,textTransform:"uppercase",letterSpacing:1},children:u.rewrites[0].label}),r.jsx("p",{style:{color:"#ddd",fontSize:13,margin:"0 0 8px",lineHeight:1.6,whiteSpace:"pre-line"},children:u.rewrites[0].text}),r.jsx("p",{style:{color:"#666",fontSize:11,margin:0,fontStyle:"italic"},children:u.rewrites[0].why_better})]})]}),r.jsx(rr,{tool:"thread-grader",score:u.total_score}),r.jsxs(cn,{accentColor:Ae,label:"Full Thread Analysis",children:[r.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[r.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:16},children:"Full Pillar Breakdown"}),Object.entries(u.pillar_scores).map(([x,B])=>r.jsx(Dd,{pillarKey:x,pillar:B},x))]}),u.tweet_breakdown&&u.tweet_breakdown.length>0&&r.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[r.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:14},children:"Tweet-by-Tweet Breakdown"}),r.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:12},children:[r.jsx("thead",{children:r.jsx("tr",{style:{borderBottom:"1px solid #1a1a2e"},children:["#","Preview","Score","Note"].map(x=>r.jsx("th",{style:{padding:"6px 8px",textAlign:"left",color:"#555",fontWeight:600,fontSize:10,textTransform:"uppercase",letterSpacing:1},children:x},x))})}),r.jsx("tbody",{children:u.tweet_breakdown.map((x,B)=>{const C=x.score>=8?"#4caf50":x.score>=5?"#ffd54f":"#ef5350";return r.jsxs("tr",{style:{borderBottom:"1px solid #0d0d1a"},children:[r.jsx("td",{style:{padding:"8px",color:"#555",fontFamily:"monospace",fontWeight:700},children:x.tweet_index}),r.jsx("td",{style:{padding:"8px",color:"#aaa",maxWidth:200},children:r.jsx("span",{style:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:x.text_preview})}),r.jsxs("td",{style:{padding:"8px",color:C,fontWeight:700},children:[x.score,"/10"]}),r.jsx("td",{style:{padding:"8px",color:"#777",fontSize:11},children:x.note})]},B)})})]})]}),u.rewrites&&u.rewrites.length>1&&r.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[r.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:14},children:"All Hook Rewrites"}),u.rewrites.slice(1).map((x,B)=>r.jsxs("div",{style:{padding:14,borderRadius:8,background:"#0d0d1a",border:"1px solid #1a1a2e",marginBottom:8},children:[r.jsx("div",{style:{fontSize:10,color:Ae,fontWeight:700,marginBottom:8,textTransform:"uppercase",letterSpacing:1},children:x.label}),r.jsx("p",{style:{color:"#ddd",fontSize:13,margin:"0 0 8px",lineHeight:1.6,whiteSpace:"pre-line"},children:x.text}),r.jsx("p",{style:{color:"#666",fontSize:11,margin:0,fontStyle:"italic"},children:x.why_better})]},B))]}),u.upgrade_hook&&r.jsx("div",{style:{background:"#0a1e2e",border:"1px solid #1a3a5a",borderRadius:14,padding:16,textAlign:"center"},children:r.jsx("p",{style:{color:Ae,fontSize:12,fontWeight:500,margin:0},children:u.upgrade_hook})})]}),r.jsx(kn,{accentColor:Ae})]})]})}function Dh({onTryHybrid:l}){const[c,a]=v.useState(""),[f,u]=v.useState(""),[g,h]=v.useState(!1),[y,j]=v.useState(null),[R,w]=v.useState(null);async function T(){if(!(!c.trim()||!f.trim())){h(!0),j(null),w(null);try{const x=await fetch(`${ge}/demos/thread-grader/compare`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({threadA:c.trim(),threadB:f.trim()})}),B=await x.json();if(!x.ok)throw new Error(B.error||`HTTP ${x.status}`);j(B)}catch(x){w(x instanceof Error?x.message:"Comparison failed.")}finally{h(!1)}}}const _=c.trim().length>=20&&f.trim().length>=20,A=y==null?void 0:y.comparison.pillar_winners;return r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{display:"flex",gap:12,marginBottom:12},children:["A","B"].map(x=>{const B=x==="A"?c:f,C=x==="A"?a:u;return r.jsxs("div",{style:{flex:1},children:[r.jsxs("div",{style:{fontSize:10,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:6},children:["Thread ",x," · ",xs(B)," tweet",xs(B)!==1?"s":""]}),r.jsx("textarea",{style:{width:"100%",background:"#12121f",border:"1px solid #1a1a2e",borderRadius:10,padding:"10px 12px",fontSize:13,color:"#e0e0e0",resize:"none",outline:"none",fontFamily:"inherit",boxSizing:"border-box",lineHeight:1.5},rows:8,placeholder:`Thread ${x} — separate tweets with ---`,value:B,onChange:W=>C(W.target.value)})]},x)})}),r.jsx("div",{style:{display:"flex",justifyContent:"flex-end",marginBottom:20},children:r.jsx("button",{onClick:T,disabled:g||!_,style:{padding:"8px 20px",background:g||!_?"#333":Ae,color:"#fff",fontWeight:600,fontSize:13,border:"none",borderRadius:8,cursor:g||!_?"not-allowed":"pointer",opacity:g||!_?.5:1},children:g?"Comparing...":"Compare"})}),R&&r.jsx("div",{style:{background:"#2e1a1a",border:"1px solid #5a2a2a",borderRadius:10,padding:12,marginBottom:16,color:"#ef5350",fontSize:12},children:R}),y&&r.jsxs("div",{children:[y.comparison.winner!=="tie"?r.jsxs("div",{style:{background:"#0d1f0d",border:"1px solid #1e4a1e",borderRadius:10,padding:"12px 20px",marginBottom:16,display:"flex",alignItems:"center",justifyContent:"center",gap:16},children:[r.jsxs("div",{style:{textAlign:"center"},children:[r.jsxs("div",{style:{color:"#4caf50",fontWeight:800,fontSize:15},children:["Thread ",y.comparison.winner," wins"]}),r.jsxs("div",{style:{color:"#2e7d32",fontSize:11,marginTop:2},children:["+",y.comparison.margin," pts"]})]}),r.jsx(Ot,{shareText:`Thread ${y.comparison.winner} won my A/B test on ThreadGrader by ${y.comparison.margin} points. Grade yours → https://contentintelligence.ai`,accentColor:"#4caf50"})]}):r.jsx("div",{style:{background:"#1a1a2e",border:"1px solid #2a2a4e",borderRadius:10,padding:"10px 16px",marginBottom:16,textAlign:"center",color:"#ffd54f",fontWeight:700,fontSize:13},children:"It's a tie — both threads score equally"}),r.jsxs("div",{style:{display:"flex",gap:12,marginBottom:16},children:[r.jsx($d,{label:"Thread A",result:y.threadA,isWinner:y.comparison.winner==="A",isDimmed:y.comparison.winner==="B"}),r.jsx($d,{label:"Thread B",result:y.threadB,isWinner:y.comparison.winner==="B",isDimmed:y.comparison.winner==="A"})]}),A&&r.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[r.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:14},children:"Pillar Winners"}),r.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:12},children:[r.jsx("thead",{children:r.jsx("tr",{style:{borderBottom:"1px solid #1a1a2e"},children:["Pillar","A Score","B Score","Winner"].map(x=>r.jsx("th",{style:{padding:"6px 8px",textAlign:"left",color:"#555",fontWeight:600,fontSize:10,textTransform:"uppercase",letterSpacing:1},children:x},x))})}),r.jsx("tbody",{children:Object.keys(Gr).map(x=>{const B=A[x],C=y.threadA.pillar_scores[x].score,W=y.threadB.pillar_scores[x].score;return r.jsxs("tr",{style:{borderBottom:"1px solid #0d0d1a"},children:[r.jsx("td",{style:{padding:"8px",color:"#aaa"},children:Gr[x]}),r.jsx("td",{style:{padding:"8px",color:B==="A"?"#4caf50":"#666",fontWeight:B==="A"?700:400},children:C}),r.jsx("td",{style:{padding:"8px",color:B==="B"?"#4caf50":"#666",fontWeight:B==="B"?700:400},children:W}),r.jsx("td",{style:{padding:"8px",color:B==="tie"?"#ffd54f":"#4caf50",fontWeight:700},children:B==="tie"?"Tie":`Thread ${B}`})]},x)})})]})]}),r.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[r.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:10},children:"Analysis"}),r.jsx("p",{style:{color:"#bbb",fontSize:13,lineHeight:1.6,margin:"0 0 10px"},children:y.comparison.verdict}),y.comparison.strategic_analysis&&r.jsxs("p",{style:{color:"#777",fontSize:12,lineHeight:1.5,margin:0,borderTop:"1px solid #1a1a2e",paddingTop:10},children:[r.jsx("span",{style:{color:Ae,fontWeight:600},children:"Next thread: "}),y.comparison.strategic_analysis]})]}),r.jsxs("div",{style:{background:"#0a1e2e",border:"1px solid #1a3a5a",borderRadius:14,padding:20},children:[r.jsx("h2",{style:{fontSize:11,fontWeight:600,color:Ae,textTransform:"uppercase",letterSpacing:2,marginBottom:10},children:"Suggested Hybrid Hook"}),r.jsx("p",{style:{color:"#e0e0e0",fontSize:13,fontWeight:600,lineHeight:1.6,marginBottom:14},children:y.comparison.suggested_hybrid}),r.jsx("button",{onClick:()=>{const x=y.comparison.suggested_hybrid.split(" | ")[0].trim();l(x)},style:{padding:"7px 16px",background:Ae,color:"#fff",fontWeight:600,fontSize:12,border:"none",borderRadius:8,cursor:"pointer"},children:"Try this hook →"})]})]})]})}function $h(){const[l,c]=v.useState("grade"),[a,f]=v.useState("");return r.jsxs("div",{style:{padding:24,maxWidth:760,margin:"0 auto"},children:[r.jsxs("div",{style:{textAlign:"center",marginBottom:28},children:[r.jsx("div",{style:{fontSize:9,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:6,fontFamily:"monospace"},children:"ContentGrade Suite"}),r.jsxs("h1",{style:{fontSize:28,fontWeight:800,color:"#e0e0e0",letterSpacing:-.5},children:["Thread",r.jsx("span",{style:{color:Ae},children:"Grader"})]}),r.jsxs("p",{style:{color:"#777",fontSize:14,marginTop:6},children:["Paste your thread. Get a ",r.jsx("span",{style:{color:"#ccc",fontWeight:500},children:"viral potential score"})," before you post."]}),r.jsx("div",{style:{display:"flex",flexWrap:"wrap",justifyContent:"center",gap:6,marginTop:12},children:["Hook Strength (30)","Tension Chain (25)","Payoff (25)","Share Trigger (20)"].map(u=>r.jsx("span",{style:{fontSize:10,padding:"3px 10px",borderRadius:12,background:"#12121f",color:"#666",border:"1px solid #1a1a2e"},children:u},u))})]}),r.jsxs("div",{style:{display:"flex",gap:4,background:"#12121f",border:"1px solid #1a1a2e",borderRadius:10,padding:4,marginBottom:24,width:"fit-content"},children:[r.jsx("button",{onClick:()=>c("grade"),style:{padding:"7px 18px",borderRadius:8,border:"none",cursor:"pointer",fontSize:12,fontWeight:600,background:l==="grade"?Ae:"transparent",color:l==="grade"?"#fff":"#666",transition:"background 0.2s, color 0.2s"},children:"Grade Thread"}),r.jsxs("button",{onClick:()=>c("compare"),style:{padding:"7px 18px",borderRadius:8,border:"none",cursor:"pointer",fontSize:12,fontWeight:600,background:l==="compare"?"#0a1e2e":"transparent",color:l==="compare"?Ae:"#444",transition:"background 0.2s, color 0.2s",display:"flex",alignItems:"center",gap:6},children:["A/B Compare",r.jsx("span",{style:{fontSize:8,padding:"1px 6px",borderRadius:4,background:`${Ae}22`,color:Ae,border:`1px solid ${Ae}33`,fontFamily:"monospace",fontWeight:700,letterSpacing:.5},children:"PRO"})]})]}),l==="grade"&&r.jsx(Mh,{threadText:a,setThreadText:f}),l==="compare"&&r.jsx("div",{children:r.jsx(cn,{accentColor:Ae,label:"A/B Compare Mode",children:r.jsx(Dh,{onTryHybrid:u=>{f(u),c("grade")}})})}),r.jsx("div",{style:{marginTop:40,textAlign:"center",fontSize:10,color:"#333"},children:"Viral thread scoring using Hook · Tension · Payoff · Share frameworks · Powered by local Claude session"})]})}const Ye="#10b981",vs={"A+":"#4caf50",A:"#4caf50","A-":"#4caf50","B+":"#4a90d9",B:"#4a90d9","B-":"#4a90d9","C+":"#ffd54f",C:"#ffd54f","C-":"#ffd54f",D:"#ff9800",F:"#ef5350"},Uh={AIDA:"#7c4dff",PAS:"#ff6b35","Hormozi Value Equation":"#10b981","Cialdini Reciprocity":"#4a90d9","Storytelling Arc":"#ffd54f"};function Ss(l){for(const[c,a]of Object.entries(Uh))if(l.toLowerCase().includes(c.toLowerCase().split(" ")[0].toLowerCase()))return a;return Ye}function Ud({email:l,locked:c}){const[a,f]=v.useState(!c&&l.position===1),u=Ss(l.framework_used);return r.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:12,marginBottom:10,overflow:"hidden"},children:[r.jsxs("div",{onClick:()=>!c&&f(h=>!h),style:{padding:"14px 16px",display:"flex",alignItems:"center",gap:10,cursor:c?"default":"pointer"},children:[r.jsx("div",{style:{width:28,height:28,borderRadius:"50%",background:Ye+"22",border:`1px solid ${Ye}44`,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,fontSize:11,fontWeight:800,color:Ye,fontFamily:"monospace"},children:l.position}),r.jsxs("div",{style:{flex:1,minWidth:0},children:[r.jsx("div",{style:{fontSize:13,fontWeight:700,color:"#e0e0e0",marginBottom:2,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:l.subject_line}),r.jsx("div",{style:{fontSize:10,color:"#555",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:l.preview_text})]}),r.jsx("span",{style:{fontSize:9,padding:"2px 8px",borderRadius:4,background:u+"20",color:u,border:`1px solid ${u}44`,fontFamily:"monospace",fontWeight:700,letterSpacing:.5,flexShrink:0,whiteSpace:"nowrap"},children:l.framework_used.split(" ")[0].toUpperCase()}),!c&&r.jsx("div",{style:{color:"#444",fontSize:14,flexShrink:0},children:a?"▲":"▼"})]}),a&&!c&&r.jsx("div",{style:{padding:"0 16px 16px",borderTop:"1px solid #1a1a2e"},children:r.jsxs("div",{style:{paddingTop:14},children:[r.jsxs("div",{style:{background:u+"0d",border:`1px solid ${u}22`,borderRadius:8,padding:"8px 12px",marginBottom:14,fontSize:11,color:u,lineHeight:1.5},children:[r.jsxs("span",{style:{fontWeight:700},children:[l.framework_used,":"]})," ",l.framework_explanation]}),r.jsx("div",{style:{fontSize:13,color:"#ccc",lineHeight:1.7,marginBottom:14,whiteSpace:"pre-line",padding:"12px 14px",background:"#0d0d1a",borderRadius:8,border:"1px solid #1a1a2e"},children:l.body}),r.jsxs("div",{style:{marginBottom:14},children:[r.jsx("div",{style:{fontSize:10,color:"#555",marginBottom:6,textTransform:"uppercase",letterSpacing:1},children:"CTA Button"}),r.jsx("div",{style:{display:"inline-block",padding:"8px 20px",borderRadius:8,background:Ye,color:"#000",fontWeight:700,fontSize:12},children:l.cta})]}),r.jsxs("div",{style:{display:"flex",gap:12},children:[r.jsxs("div",{style:{flex:1,padding:"10px 14px",borderRadius:8,background:"#0d0d1a",border:"1px solid #1a1a2e",textAlign:"center"},children:[r.jsx("div",{style:{fontSize:16,fontWeight:800,color:"#4caf50"},children:l.estimated_open_rate}),r.jsx("div",{style:{fontSize:9,color:"#555",marginTop:2,textTransform:"uppercase",letterSpacing:1},children:"Est. Open Rate"})]}),r.jsxs("div",{style:{flex:1,padding:"10px 14px",borderRadius:8,background:"#0d0d1a",border:"1px solid #1a1a2e",textAlign:"center"},children:[r.jsx("div",{style:{fontSize:16,fontWeight:800,color:Ye},children:l.estimated_click_rate}),r.jsx("div",{style:{fontSize:9,color:"#555",marginTop:2,textTransform:"uppercase",letterSpacing:1},children:"Est. Click Rate"})]})]})]})})]})}function Hh({result:l}){const c=vs[l.grade]??"#777";return r.jsxs("div",{children:[r.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:24,marginBottom:16},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:16,marginBottom:12},children:[r.jsx("span",{style:{fontSize:52,fontWeight:900,color:"#fff"},children:l.overall_score}),r.jsxs("div",{children:[r.jsx("div",{style:{fontSize:28,fontWeight:900,color:c},children:l.grade}),r.jsx("div",{style:{fontSize:10,color:"#555",textTransform:"uppercase",letterSpacing:2},children:"Sequence Score"})]})]}),r.jsxs("p",{style:{color:Ye,fontSize:13,fontWeight:500,fontStyle:"italic",margin:0},children:['"',l.sequence_strategy,'"']})]}),r.jsxs("div",{style:{marginBottom:8},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:6},children:[r.jsx("span",{style:{fontSize:10,color:"#555",textTransform:"uppercase",letterSpacing:2},children:"Email 1 — Hook"}),r.jsx("span",{style:{fontSize:9,padding:"2px 8px",borderRadius:4,background:"#4caf5020",color:"#4caf50",border:"1px solid #4caf5033",fontFamily:"monospace",fontWeight:600,letterSpacing:1},children:"FREE"})]}),r.jsx(Ud,{email:l.emails[0],locked:!1})]}),r.jsx(rr,{tool:"email-forge",score:l.overall_score,accentColor:Ye}),r.jsxs("div",{style:{marginTop:10},children:[r.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:6},children:r.jsx("span",{style:{fontSize:10,color:"#555",textTransform:"uppercase",letterSpacing:2},children:"Emails 2–5 — Build · Value · Urgency · Close"})}),l.emails.slice(1).map(a=>r.jsx(Ud,{email:a,locked:!1},a.position))]}),r.jsx(kn,{accentColor:Ye})]})}function Vh(){const[l,c]=v.useState(""),[a,f]=v.useState(""),[u,g]=v.useState("cold_outreach"),[h,y]=v.useState("professional"),[j,R]=v.useState(!1),[w,T]=v.useState(null),[_,A]=v.useState(null),x=l.trim().length>=10&&a.trim().length>=5;async function B(){if(x){R(!0),T(null),A(null);try{const W=await fetch(`${ge}/demos/email-forge`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({product:l.trim(),audience:a.trim(),goal:u,tone:h})}),P=await W.json();if(!W.ok)throw new Error(P.error||`HTTP ${W.status}`);T(P)}catch(W){A(W instanceof Error?W.message:"Generation failed.")}finally{R(!1)}}}const C={background:"#12121f",border:"1px solid #1a1a2e",borderRadius:8,padding:"10px 12px",fontSize:13,color:"#e0e0e0",outline:"none",fontFamily:"inherit",width:"100%",appearance:"none",cursor:"pointer"};return r.jsxs(r.Fragment,{children:[r.jsxs("div",{style:{marginBottom:20},children:[r.jsxs("div",{style:{marginBottom:12},children:[r.jsx("label",{style:{fontSize:10,color:"#555",textTransform:"uppercase",letterSpacing:1.5,display:"block",marginBottom:6},children:"Product / Service"}),r.jsx("textarea",{style:{width:"100%",background:"#12121f",border:"1px solid #1a1a2e",borderRadius:8,padding:"10px 12px",fontSize:13,color:"#e0e0e0",resize:"vertical",outline:"none",fontFamily:"inherit",boxSizing:"border-box",lineHeight:1.6},rows:3,placeholder:"e.g. A SaaS tool that automates customer onboarding emails, cutting setup time from 2 hours to 5 minutes",value:l,onChange:W=>c(W.target.value)})]}),r.jsxs("div",{style:{marginBottom:12},children:[r.jsx("label",{style:{fontSize:10,color:"#555",textTransform:"uppercase",letterSpacing:1.5,display:"block",marginBottom:6},children:"Target Audience"}),r.jsx("input",{type:"text",style:{width:"100%",background:"#12121f",border:"1px solid #1a1a2e",borderRadius:8,padding:"10px 12px",fontSize:13,color:"#e0e0e0",outline:"none",fontFamily:"inherit",boxSizing:"border-box"},placeholder:"e.g. B2B SaaS founders with 10-50 person teams",value:a,onChange:W=>f(W.target.value)})]}),r.jsxs("div",{style:{display:"flex",gap:12,marginBottom:12},children:[r.jsxs("div",{style:{flex:1},children:[r.jsx("label",{style:{fontSize:10,color:"#555",textTransform:"uppercase",letterSpacing:1.5,display:"block",marginBottom:6},children:"Goal"}),r.jsxs("select",{style:C,value:u,onChange:W=>g(W.target.value),children:[r.jsx("option",{value:"cold_outreach",children:"Cold Outreach"}),r.jsx("option",{value:"nurture",children:"Nurture Sequence"}),r.jsx("option",{value:"launch",children:"Product Launch"}),r.jsx("option",{value:"re-engagement",children:"Re-engagement"})]})]}),r.jsxs("div",{style:{flex:1},children:[r.jsx("label",{style:{fontSize:10,color:"#555",textTransform:"uppercase",letterSpacing:1.5,display:"block",marginBottom:6},children:"Tone"}),r.jsxs("select",{style:C,value:h,onChange:W=>y(W.target.value),children:[r.jsx("option",{value:"professional",children:"Professional"}),r.jsx("option",{value:"casual",children:"Casual"}),r.jsx("option",{value:"urgent",children:"Urgent"}),r.jsx("option",{value:"storytelling",children:"Storytelling"})]})]})]}),r.jsx("div",{style:{display:"flex",justifyContent:"flex-end"},children:r.jsx("button",{onClick:B,disabled:j||!x,style:{padding:"10px 24px",background:j||!x?"#333":Ye,color:j||!x?"#666":"#000",fontWeight:700,fontSize:13,border:"none",borderRadius:8,cursor:j||!x?"not-allowed":"pointer",opacity:j||!x?.6:1},children:j?"Generating...":"Generate Sequence →"})})]}),_&&r.jsx("div",{style:{background:"#2e1a1a",border:"1px solid #5a2a2a",borderRadius:10,padding:12,marginBottom:16,color:"#ef5350",fontSize:12},children:_}),w&&r.jsx(Hh,{result:w})]})}function Gh(){const[l,c]=v.useState(""),[a,f]=v.useState(""),[u,g]=v.useState("cold_outreach"),[h,y]=v.useState("professional"),[j,R]=v.useState(""),[w,T]=v.useState(""),[_,A]=v.useState("cold_outreach"),[x,B]=v.useState("professional"),[C,W]=v.useState(!1),[P,Q]=v.useState(null),[F,ie]=v.useState(null),[re,fe]=v.useState(null),[je,Le]=v.useState(null),xe=l.trim().length>=10&&a.trim().length>=5&&j.trim().length>=10&&w.trim().length>=5;async function Ue(){if(xe){W(!0),Q(null),ie(null);try{const X=await fetch(`${ge}/demos/email-forge/compare`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({product_a:l.trim(),audience_a:a.trim(),goal_a:u,tone_a:h,product_b:j.trim(),audience_b:w.trim(),goal_b:_,tone_b:x})}),K=await X.json();if(!X.ok)throw new Error(K.error||`HTTP ${X.status}`);Q(K)}catch(X){ie(X instanceof Error?X.message:"Comparison failed.")}finally{W(!1)}}}const Fe={background:"#12121f",border:"1px solid #1a1a2e",borderRadius:6,padding:"6px 8px",fontSize:11,color:"#ccc",outline:"none",fontFamily:"inherit",width:"100%",appearance:"none"};function Te({label:X,product:K,setProduct:se,audience:ce,setAudience:D,goal:J,setGoal:$,tone:k,setTone:L}){return r.jsxs("div",{style:{flex:1},children:[r.jsxs("div",{style:{fontSize:10,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:8},children:["Sequence ",X]}),r.jsx("textarea",{style:{width:"100%",background:"#12121f",border:"1px solid #1a1a2e",borderRadius:8,padding:"8px 10px",fontSize:12,color:"#e0e0e0",resize:"none",outline:"none",fontFamily:"inherit",boxSizing:"border-box",lineHeight:1.5},rows:4,placeholder:"Product/service description",value:K,onChange:te=>se(te.target.value)}),r.jsx("input",{type:"text",style:{width:"100%",background:"#12121f",border:"1px solid #1a1a2e",borderRadius:8,padding:"7px 10px",fontSize:12,color:"#e0e0e0",marginTop:6,outline:"none",fontFamily:"inherit",boxSizing:"border-box"},placeholder:"Target audience",value:ce,onChange:te=>D(te.target.value)}),r.jsxs("div",{style:{display:"flex",gap:6,marginTop:6},children:[r.jsxs("select",{style:Fe,value:J,onChange:te=>$(te.target.value),children:[r.jsx("option",{value:"cold_outreach",children:"Cold Outreach"}),r.jsx("option",{value:"nurture",children:"Nurture"}),r.jsx("option",{value:"launch",children:"Launch"}),r.jsx("option",{value:"re-engagement",children:"Re-engage"})]}),r.jsxs("select",{style:Fe,value:k,onChange:te=>L(te.target.value),children:[r.jsx("option",{value:"professional",children:"Professional"}),r.jsx("option",{value:"casual",children:"Casual"}),r.jsx("option",{value:"urgent",children:"Urgent"}),r.jsx("option",{value:"storytelling",children:"Story"})]})]})]})}return r.jsxs(r.Fragment,{children:[r.jsxs("div",{style:{display:"flex",gap:12,marginBottom:12},children:[r.jsx(Te,{label:"A",product:l,setProduct:c,audience:a,setAudience:f,goal:u,setGoal:g,tone:h,setTone:y}),r.jsx(Te,{label:"B",product:j,setProduct:R,audience:w,setAudience:T,goal:_,setGoal:A,tone:x,setTone:B})]}),r.jsx("div",{style:{display:"flex",justifyContent:"flex-end",marginBottom:20},children:r.jsx("button",{onClick:Ue,disabled:C||!xe,style:{padding:"8px 20px",background:C||!xe?"#333":Ye,color:C||!xe?"#666":"#000",fontWeight:700,fontSize:13,border:"none",borderRadius:8,cursor:C||!xe?"not-allowed":"pointer",opacity:C||!xe?.6:1},children:C?"Comparing...":"Compare Sequences"})}),F&&r.jsx("div",{style:{background:"#2e1a1a",border:"1px solid #5a2a2a",borderRadius:10,padding:12,marginBottom:16,color:"#ef5350",fontSize:12},children:F}),P&&r.jsxs("div",{children:[r.jsxs("div",{style:{background:"#0d1f0d",border:"1px solid #1e4a1e",borderRadius:10,padding:"14px 20px",marginBottom:16,display:"flex",alignItems:"center",justifyContent:"space-between"},children:[r.jsxs("div",{children:[r.jsxs("div",{style:{color:"#4caf50",fontWeight:800,fontSize:15},children:["Sequence ",P.comparison.winner," wins"]}),r.jsxs("div",{style:{color:"#2e7d32",fontSize:11,marginTop:2},children:["+",P.comparison.margin," pts · ",P.comparison.reasoning]})]}),r.jsx("div",{style:{textAlign:"right"},children:r.jsxs("div",{style:{fontSize:22,fontWeight:900,color:"#fff"},children:[P.comparison.winner==="A"?P.sequence_a.overall_score:P.sequence_b.overall_score,r.jsx("span",{style:{fontSize:12,color:"#555",marginLeft:4},children:"vs"}),P.comparison.winner==="A"?P.sequence_b.overall_score:P.sequence_a.overall_score]})})]}),r.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[r.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:14},children:"Email-by-Email Breakdown"}),r.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:12},children:[r.jsx("thead",{children:r.jsx("tr",{style:{borderBottom:"1px solid #1a1a2e"},children:["Email","Subject A","Subject B","Winner","Reason"].map(X=>r.jsx("th",{style:{padding:"6px 8px",textAlign:"left",color:"#555",fontWeight:600,fontSize:10,textTransform:"uppercase",letterSpacing:1},children:X},X))})}),r.jsx("tbody",{children:P.comparison.per_email_comparison.map(X=>{const K=P.sequence_a.emails.find(ce=>ce.position===X.position),se=P.sequence_b.emails.find(ce=>ce.position===X.position);return r.jsxs("tr",{style:{borderBottom:"1px solid #0d0d1a"},children:[r.jsx("td",{style:{padding:"8px",color:"#555",fontFamily:"monospace",fontWeight:700},children:X.position}),r.jsx("td",{style:{padding:"8px",color:X.winner==="A"?"#4caf50":"#555",fontSize:11,maxWidth:150},children:r.jsx("span",{style:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:(K==null?void 0:K.subject_line)??"—"})}),r.jsx("td",{style:{padding:"8px",color:X.winner==="B"?"#4caf50":"#555",fontSize:11,maxWidth:150},children:r.jsx("span",{style:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:(se==null?void 0:se.subject_line)??"—"})}),r.jsxs("td",{style:{padding:"8px",color:"#4caf50",fontWeight:700},children:["Seq ",X.winner]}),r.jsx("td",{style:{padding:"8px",color:"#777",fontSize:11},children:X.reason})]},X.position)})})]})]}),r.jsxs("div",{style:{background:P.comparison.winner==="A"?"#0a1e0a":"#12121f",border:`1px solid ${P.comparison.winner==="A"?"#1e4a1e":"#1a1a2e"}`,borderRadius:14,padding:16,marginBottom:12},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:12},children:[r.jsx("span",{style:{fontSize:11,color:"#555",textTransform:"uppercase",letterSpacing:2},children:"Sequence A"}),P.comparison.winner==="A"&&r.jsx("span",{style:{fontSize:9,padding:"2px 7px",borderRadius:4,background:"#4caf5020",color:"#4caf50",border:"1px solid #4caf5033",fontFamily:"monospace",fontWeight:700},children:"WINNER"}),r.jsx("span",{style:{marginLeft:"auto",fontSize:20,fontWeight:900,color:"#fff"},children:P.sequence_a.overall_score}),r.jsx("span",{style:{fontSize:14,fontWeight:900,color:vs[P.sequence_a.grade]??"#777"},children:P.sequence_a.grade})]}),P.sequence_a.emails.map(X=>{const K=Ss(X.framework_used);return r.jsxs("div",{onClick:()=>fe(re===X.position?null:X.position),style:{padding:"8px 12px",marginBottom:6,background:"#0d0d1a",border:"1px solid #1a1a2e",borderRadius:8,cursor:"pointer",display:"flex",alignItems:"center",gap:8},children:[r.jsx("span",{style:{fontSize:10,color:Ye,fontFamily:"monospace",fontWeight:700,width:16},children:X.position}),r.jsx("span",{style:{flex:1,fontSize:12,color:"#ccc",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:X.subject_line}),r.jsx("span",{style:{fontSize:9,padding:"1px 6px",borderRadius:3,background:K+"20",color:K,border:`1px solid ${K}33`,fontFamily:"monospace",flexShrink:0},children:X.framework_used.split(" ")[0]})]},X.position)})]}),r.jsxs("div",{style:{background:P.comparison.winner==="B"?"#0a1e0a":"#12121f",border:`1px solid ${P.comparison.winner==="B"?"#1e4a1e":"#1a1a2e"}`,borderRadius:14,padding:16},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:12},children:[r.jsx("span",{style:{fontSize:11,color:"#555",textTransform:"uppercase",letterSpacing:2},children:"Sequence B"}),P.comparison.winner==="B"&&r.jsx("span",{style:{fontSize:9,padding:"2px 7px",borderRadius:4,background:"#4caf5020",color:"#4caf50",border:"1px solid #4caf5033",fontFamily:"monospace",fontWeight:700},children:"WINNER"}),r.jsx("span",{style:{marginLeft:"auto",fontSize:20,fontWeight:900,color:"#fff"},children:P.sequence_b.overall_score}),r.jsx("span",{style:{fontSize:14,fontWeight:900,color:vs[P.sequence_b.grade]??"#777"},children:P.sequence_b.grade})]}),P.sequence_b.emails.map(X=>{const K=Ss(X.framework_used);return r.jsxs("div",{onClick:()=>Le(je===X.position?null:X.position),style:{padding:"8px 12px",marginBottom:6,background:"#0d0d1a",border:"1px solid #1a1a2e",borderRadius:8,cursor:"pointer",display:"flex",alignItems:"center",gap:8},children:[r.jsx("span",{style:{fontSize:10,color:Ye,fontFamily:"monospace",fontWeight:700,width:16},children:X.position}),r.jsx("span",{style:{flex:1,fontSize:12,color:"#ccc",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:X.subject_line}),r.jsx("span",{style:{fontSize:9,padding:"1px 6px",borderRadius:3,background:K+"20",color:K,border:`1px solid ${K}33`,fontFamily:"monospace",flexShrink:0},children:X.framework_used.split(" ")[0]})]},X.position)})]})]})]})}function Qh(){const[l,c]=v.useState("generate");return r.jsxs("div",{style:{padding:24,maxWidth:760,margin:"0 auto"},children:[r.jsxs("div",{style:{textAlign:"center",marginBottom:28},children:[r.jsx("div",{style:{fontSize:9,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:6,fontFamily:"monospace"},children:"ContentGrade Suite — Generate"}),r.jsxs("h1",{style:{fontSize:28,fontWeight:800,color:"#e0e0e0",letterSpacing:-.5},children:["Email",r.jsx("span",{style:{color:Ye},children:"Forge"})]}),r.jsxs("p",{style:{color:"#777",fontSize:14,marginTop:6},children:["Input your product and audience. Get a ",r.jsx("span",{style:{color:"#ccc",fontWeight:500},children:"5-email conversion sequence"})," using proven frameworks."]}),r.jsx("div",{style:{display:"flex",flexWrap:"wrap",justifyContent:"center",gap:6,marginTop:12},children:["AIDA","PAS","Hormozi","Cialdini","Storytelling Arc"].map(a=>r.jsx("span",{style:{fontSize:10,padding:"3px 10px",borderRadius:12,background:"#12121f",color:"#666",border:"1px solid #1a1a2e"},children:a},a))})]}),r.jsxs("div",{style:{display:"flex",gap:4,background:"#12121f",border:"1px solid #1a1a2e",borderRadius:10,padding:4,marginBottom:24,width:"fit-content"},children:[r.jsx("button",{onClick:()=>c("generate"),style:{padding:"7px 18px",borderRadius:8,border:"none",cursor:"pointer",fontSize:12,fontWeight:600,background:l==="generate"?Ye:"transparent",color:l==="generate"?"#000":"#666",transition:"background 0.2s, color 0.2s"},children:"Generate"}),r.jsx("button",{onClick:()=>c("compare"),style:{padding:"7px 18px",borderRadius:8,border:"none",cursor:"pointer",fontSize:12,fontWeight:600,background:l==="compare"?"#0a1e2e":"transparent",color:l==="compare"?Ye:"#444",transition:"background 0.2s, color 0.2s"},children:"A/B Compare"})]}),l==="generate"&&r.jsx(Vh,{}),l==="compare"&&r.jsx(Gh,{}),r.jsx("div",{style:{marginTop:40,textAlign:"center",fontSize:10,color:"#333"},children:"Email sequence generation using AIDA · PAS · Hormozi · Cialdini · Storytelling frameworks · Powered by local Claude session"})]})}const Ce="#00c853",du={A:"#4caf50",B:"#4a90d9",C:"#ffd54f",D:"#ff9800",F:"#ef5350"},us={high:"#4caf50",medium:"#ffd54f",low:"#ef5350"},fs={low:"#4caf50",medium:"#ffd54f",high:"#ef5350"};function ii({label:l,score:c}){const a=c>=75?"#4caf50":c>=50?"#ffd54f":"#ef5350";return r.jsxs("div",{style:{textAlign:"center"},children:[r.jsx("div",{style:{fontSize:22,fontWeight:900,color:a},children:c}),r.jsx("div",{style:{fontSize:10,color:"#555",marginTop:2},children:l})]})}function Kh({archetype:l}){var c;return r.jsxs("div",{style:{background:"#0d0d1a",border:"1px solid #1a1a2e",borderRadius:10,padding:16,marginBottom:10},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:8},children:[r.jsx("div",{style:{flex:1},children:r.jsx("span",{style:{fontSize:13,fontWeight:700,color:Ce},children:l.name})}),r.jsxs("span",{style:{fontSize:18,fontWeight:900,color:"#e0e0e0"},children:[l.percentage,"%"]})]}),r.jsx("div",{style:{height:4,background:"#1a1a2e",borderRadius:2,marginBottom:10,overflow:"hidden"},children:r.jsx("div",{style:{height:"100%",background:Ce,borderRadius:2,width:`${l.percentage}%`}})}),r.jsx("p",{style:{fontSize:12,color:"#aaa",lineHeight:1.5,margin:"0 0 8px"},children:l.description}),((c=l.evidence)==null?void 0:c.length)>0&&r.jsxs("div",{style:{fontSize:10,color:"#555",fontStyle:"italic",borderLeft:`2px solid ${Ce}44`,paddingLeft:8},children:['"',l.evidence[0],'"']})]})}function qh(){var T,_,A,x,B,C,W,P,Q,F,ie,re,fe,je,Le,xe,Ue,Fe,Te,X,K,se,ce,D,J,$,k,L,te,le;const[l,c]=v.useState(""),[a,f]=v.useState(!1),[u,g]=v.useState(null),[h,y]=v.useState(null);async function j(){if(!(l.trim().length<50)){f(!0),g(null),y(null);try{const H=await fetch(`${ge}/demos/audience-decoder`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:l.trim()})}),ne=await H.json();if(!H.ok)throw new Error(ne.error||`HTTP ${H.status}`);g(ne)}catch(H){y(H instanceof Error?H.message:"Analysis failed.")}finally{f(!1)}}}const R=u?du[((T=u.grade)==null?void 0:T[0])??""]??"#777":"#777",w=l.trim().length>=50;return r.jsxs(r.Fragment,{children:[r.jsxs("div",{style:{marginBottom:20},children:[r.jsx("textarea",{style:{width:"100%",background:"#12121f",border:"1px solid #1a1a2e",borderRadius:10,padding:"12px 14px",fontSize:14,color:"#e0e0e0",resize:"vertical",outline:"none",fontFamily:"inherit",boxSizing:"border-box",minHeight:180},rows:8,placeholder:"Paste your last 10-20 tweets, threads, or posts — one per line or separated by ---",value:l,onChange:H=>c(H.target.value)}),r.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:8},children:[r.jsxs("span",{style:{fontSize:10,color:"#444"},children:[l.length," chars · minimum 50 chars"]}),r.jsx("button",{onClick:j,disabled:a||!w,style:{padding:"9px 22px",background:a||!w?"#333":Ce,color:"#000",fontWeight:700,fontSize:13,border:"none",borderRadius:8,cursor:a||!w?"not-allowed":"pointer",opacity:a||!w?.5:1},children:a?"Decoding...":"Decode My Audience"})]})]}),h&&r.jsx("div",{style:{background:"#2e1a1a",border:"1px solid #5a2a2a",borderRadius:10,padding:12,marginBottom:16,color:"#ef5350",fontSize:12},children:h}),u&&r.jsxs("div",{children:[r.jsxs("div",{style:{background:"#12121f",border:`1px solid ${Ce}44`,borderRadius:14,padding:24,textAlign:"center",marginBottom:16},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:16,marginBottom:12},children:[r.jsx("span",{style:{fontSize:56,fontWeight:900,color:"#fff"},children:u.overall_score}),r.jsxs("div",{style:{textAlign:"left"},children:[r.jsx("div",{style:{fontSize:32,fontWeight:900,color:R},children:u.grade}),r.jsx("div",{style:{fontSize:10,color:"#555",textTransform:"uppercase",letterSpacing:2},children:"/ 100"})]})]}),r.jsx("p",{style:{color:Ce,fontSize:15,fontWeight:600,maxWidth:480,margin:"0 auto 14px",lineHeight:1.4},children:u.headline}),r.jsx(Ot,{shareText:`My audience decoded: ${u.headline} — Analyzed free on AudienceDecoder`,accentColor:Ce})]}),r.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:14},children:[r.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,margin:0},children:"Audience Archetypes"}),r.jsx("span",{style:{fontSize:9,padding:"2px 8px",borderRadius:4,background:"#4caf5020",color:"#4caf50",border:"1px solid #4caf5033",fontFamily:"monospace",fontWeight:600,letterSpacing:1},children:"FREE"})]}),(_=u.audience_archetypes)==null?void 0:_.map((H,ne)=>r.jsx(Kh,{archetype:H},ne))]}),r.jsx(rr,{tool:"audience-decoder",score:u.overall_score,accentColor:Ce}),r.jsxs(cn,{accentColor:Ce,label:"Full Audience Intelligence Report",priceLabel:"Unlock Deep Report — $49",children:[r.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[r.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:16},children:"Engagement Model"}),r.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:12,marginBottom:16},children:[r.jsx(ii,{label:"Hook Effectiveness",score:((x=(A=u.engagement_model)==null?void 0:A.hook_effectiveness)==null?void 0:x.score)??0}),r.jsx(ii,{label:"CTA Effectiveness",score:((C=(B=u.engagement_model)==null?void 0:B.cta_effectiveness)==null?void 0:C.score)??0}),r.jsx(ii,{label:"Controversy Index",score:((P=(W=u.engagement_model)==null?void 0:W.controversy_index)==null?void 0:P.score)??0}),r.jsx(ii,{label:"Shareability",score:((Q=u.engagement_model)==null?void 0:Q.shareability_score)??0})]}),((ie=(F=u.engagement_model)==null?void 0:F.cta_effectiveness)==null?void 0:ie.recommendation)&&r.jsxs("div",{style:{background:"#0d0d1a",borderRadius:8,padding:12},children:[r.jsx("span",{style:{fontSize:10,color:"#555",textTransform:"uppercase",letterSpacing:1},children:"CTA Recommendation: "}),r.jsx("span",{style:{fontSize:12,color:"#aaa"},children:u.engagement_model.cta_effectiveness.recommendation})]})]}),r.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[r.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:14},children:"Content Patterns"}),r.jsxs("div",{style:{display:"flex",gap:12,marginBottom:14},children:[r.jsxs("div",{style:{flex:1,background:"#0d1f0d",border:"1px solid #1e4a1e",borderRadius:8,padding:12},children:[r.jsx("div",{style:{fontSize:10,color:"#2e7d32",textTransform:"uppercase",letterSpacing:1,marginBottom:6},children:"Working Well"}),(fe=(re=u.content_patterns)==null?void 0:re.top_performing_themes)==null?void 0:fe.map((H,ne)=>r.jsxs("div",{style:{fontSize:12,color:"#aaa",marginBottom:4},children:[r.jsx("span",{style:{color:"#4caf50",fontWeight:600},children:H.theme}),r.jsxs("span",{style:{color:"#555"},children:[" · ",H.frequency,"x · ",H.avg_engagement_signal]})]},ne))]}),r.jsxs("div",{style:{flex:1,background:"#2e1a1a",border:"1px solid #5a2a2a",borderRadius:8,padding:12},children:[r.jsx("div",{style:{fontSize:10,color:"#c62828",textTransform:"uppercase",letterSpacing:1,marginBottom:6},children:"Underperforming"}),(Le=(je=u.content_patterns)==null?void 0:je.underperforming_themes)==null?void 0:Le.map((H,ne)=>r.jsxs("div",{style:{fontSize:12,color:"#aaa",marginBottom:4},children:[r.jsx("span",{style:{color:"#ef5350",fontWeight:600},children:H.theme}),r.jsxs("span",{style:{color:"#555"},children:[" · ",H.frequency,"x · ",H.avg_engagement_signal]})]},ne))]})]}),r.jsxs("div",{style:{display:"flex",gap:8},children:[r.jsxs("div",{style:{background:"#0d0d1a",borderRadius:8,padding:"8px 12px",fontSize:11,color:"#aaa"},children:[r.jsx("span",{style:{color:"#555"},children:"Best format: "}),r.jsx("span",{style:{color:Ce,fontWeight:600},children:(xe=u.content_patterns)==null?void 0:xe.optimal_format})]}),r.jsxs("div",{style:{background:"#0d0d1a",borderRadius:8,padding:"8px 12px",fontSize:11,color:"#aaa"},children:[r.jsx("span",{style:{color:"#555"},children:"Best length: "}),r.jsx("span",{style:{color:Ce,fontWeight:600},children:(Ue=u.content_patterns)==null?void 0:Ue.optimal_length})]}),r.jsxs("div",{style:{background:"#0d0d1a",borderRadius:8,padding:"8px 12px",fontSize:11,color:"#aaa"},children:[r.jsx("span",{style:{color:"#555"},children:"Tone: "}),r.jsx("span",{style:{color:"#ccc"},children:(Te=(Fe=u.content_patterns)==null?void 0:Fe.voice_analysis)==null?void 0:Te.tone})]})]})]}),r.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[r.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:14},children:"Growth Opportunities"}),(X=u.growth_opportunities)==null?void 0:X.map((H,ne)=>r.jsxs("div",{style:{background:"#0d0d1a",border:"1px solid #1a1a2e",borderRadius:8,padding:14,marginBottom:8},children:[r.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:8,marginBottom:6},children:[r.jsxs("span",{style:{fontSize:10,color:"#555",fontFamily:"monospace",flexShrink:0,marginTop:2},children:["#",ne+1]}),r.jsx("div",{style:{flex:1,fontSize:13,color:"#e0e0e0",fontWeight:600},children:H.opportunity}),r.jsxs("div",{style:{display:"flex",gap:4,flexShrink:0},children:[r.jsxs("span",{style:{fontSize:9,padding:"2px 7px",borderRadius:4,background:us[H.impact]+"20",color:us[H.impact],border:`1px solid ${us[H.impact]}44`,fontWeight:700},children:[H.impact," impact"]}),r.jsxs("span",{style:{fontSize:9,padding:"2px 7px",borderRadius:4,background:fs[H.effort]+"20",color:fs[H.effort],border:`1px solid ${fs[H.effort]}44`,fontWeight:700},children:[H.effort," effort"]})]})]}),r.jsx("p",{style:{fontSize:11,color:"#666",margin:0,lineHeight:1.5},children:H.explanation})]},ne))]}),r.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:0},children:[r.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:14},children:"Content Calendar"}),r.jsx("div",{style:{display:"flex",gap:10,marginBottom:14},children:[{label:"Threads/week",val:(se=(K=u.content_calendar)==null?void 0:K.weekly_mix)==null?void 0:se.threads},{label:"Posts/week",val:(D=(ce=u.content_calendar)==null?void 0:ce.weekly_mix)==null?void 0:D.single_posts},{label:"Questions/week",val:($=(J=u.content_calendar)==null?void 0:J.weekly_mix)==null?void 0:$.questions}].map(({label:H,val:ne})=>r.jsxs("div",{style:{flex:1,background:"#0d0d1a",borderRadius:8,padding:12,textAlign:"center"},children:[r.jsx("div",{style:{fontSize:22,fontWeight:900,color:Ce},children:ne??0}),r.jsx("div",{style:{fontSize:10,color:"#555",marginTop:2},children:H})]},H))}),((L=(k=u.content_calendar)==null?void 0:k.theme_rotation)==null?void 0:L.length)>0&&r.jsxs("div",{style:{marginBottom:12},children:[r.jsx("div",{style:{fontSize:10,color:"#444",textTransform:"uppercase",letterSpacing:1,marginBottom:8},children:"Theme Rotation"}),u.content_calendar.theme_rotation.map((H,ne)=>r.jsx("div",{style:{fontSize:12,color:"#aaa",marginBottom:4,paddingLeft:8,borderLeft:`2px solid ${Ce}44`},children:H},ne))]}),((le=(te=u.content_calendar)==null?void 0:te.gaps_to_fill)==null?void 0:le.length)>0&&r.jsxs("div",{children:[r.jsx("div",{style:{fontSize:10,color:"#444",textTransform:"uppercase",letterSpacing:1,marginBottom:8},children:"Content Gaps to Fill"}),u.content_calendar.gaps_to_fill.map((H,ne)=>r.jsxs("div",{style:{fontSize:11,color:"#888",marginBottom:4,display:"flex",alignItems:"flex-start",gap:6},children:[r.jsx("span",{style:{color:"#ffd54f",flexShrink:0},children:"→"})," ",H]},ne))]})]})]}),r.jsx(kn,{accentColor:Ce,product:"audiencedecoder"})]})]})}function Yh(){var _,A,x,B,C;const[l,c]=v.useState(""),[a,f]=v.useState(""),[u,g]=v.useState(!1),[h,y]=v.useState(null),[j,R]=v.useState(null);async function w(){if(!(l.trim().length<50||a.trim().length<50)){g(!0),y(null),R(null);try{const W=await fetch(`${ge}/demos/audience-decoder/compare`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content_a:l.trim(),content_b:a.trim()})}),P=await W.json();if(!W.ok)throw new Error(P.error||`HTTP ${W.status}`);y(P)}catch(W){R(W instanceof Error?W.message:"Comparison failed.")}finally{g(!1)}}}const T=l.trim().length>=50&&a.trim().length>=50;return r.jsx(cn,{accentColor:Ce,label:"Profile Compare Mode",priceLabel:"Unlock Deep Report — $49",children:r.jsxs("div",{children:[r.jsx("div",{style:{display:"flex",gap:12,marginBottom:12},children:["A","B"].map(W=>{const P=W==="A"?l:a,Q=W==="A"?c:f;return r.jsxs("div",{style:{flex:1},children:[r.jsxs("div",{style:{fontSize:10,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:6},children:["Creator ",W]}),r.jsx("textarea",{style:{width:"100%",background:"#12121f",border:"1px solid #1a1a2e",borderRadius:10,padding:"10px 12px",fontSize:12,color:"#e0e0e0",resize:"vertical",outline:"none",fontFamily:"inherit",boxSizing:"border-box"},rows:8,placeholder:`Paste Creator ${W}'s content...`,value:P,onChange:F=>Q(F.target.value)})]},W)})}),r.jsx("div",{style:{display:"flex",justifyContent:"flex-end",marginBottom:20},children:r.jsx("button",{onClick:w,disabled:u||!T,style:{padding:"9px 22px",background:u||!T?"#333":Ce,color:"#000",fontWeight:700,fontSize:13,border:"none",borderRadius:8,cursor:u||!T?"not-allowed":"pointer",opacity:u||!T?.5:1},children:u?"Comparing...":"Compare Profiles"})}),j&&r.jsx("div",{style:{background:"#2e1a1a",border:"1px solid #5a2a2a",borderRadius:10,padding:12,marginBottom:16,color:"#ef5350",fontSize:12},children:j}),h&&r.jsxs("div",{children:[r.jsx("div",{style:{display:"flex",gap:12,marginBottom:16},children:["A","B"].map(W=>{var F;const P=W==="A"?h.analysis_a:h.analysis_b,Q=du[((F=P==null?void 0:P.grade)==null?void 0:F[0])??""]??"#777";return r.jsxs("div",{style:{flex:1,background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:16,textAlign:"center"},children:[r.jsxs("div",{style:{fontSize:10,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:8},children:["Creator ",W]}),r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:8,marginBottom:8},children:[r.jsx("span",{style:{fontSize:40,fontWeight:900,color:"#fff"},children:P==null?void 0:P.overall_score}),r.jsx("span",{style:{fontSize:22,fontWeight:900,color:Q},children:P==null?void 0:P.grade})]}),r.jsx("p",{style:{fontSize:11,color:Ce,margin:0,lineHeight:1.4},children:P==null?void 0:P.headline})]},W)})}),r.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[r.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:14},children:"Comparative Analysis"}),r.jsxs("div",{style:{display:"flex",gap:12,marginBottom:14},children:[r.jsxs("div",{style:{flex:1,background:"#0d0d1a",borderRadius:8,padding:12,textAlign:"center"},children:[r.jsxs("div",{style:{fontSize:22,fontWeight:900,color:"#ffd54f"},children:[(_=h.comparison)==null?void 0:_.audience_overlap,"%"]}),r.jsx("div",{style:{fontSize:10,color:"#555",marginTop:2},children:"Audience Overlap"})]}),r.jsxs("div",{style:{flex:1,background:"#0d0d1a",borderRadius:8,padding:12,textAlign:"center"},children:[r.jsx("div",{style:{fontSize:22,fontWeight:900,color:Ce},children:(A=h.comparison)==null?void 0:A.differentiation_score}),r.jsx("div",{style:{fontSize:10,color:"#555",marginTop:2},children:"Differentiation Score"})]}),r.jsxs("div",{style:{flex:1,background:"#0d0d1a",borderRadius:8,padding:12,textAlign:"center"},children:[r.jsx("div",{style:{fontSize:15,fontWeight:800,color:"#4a90d9",textTransform:"capitalize"},children:(x=h.comparison)==null?void 0:x.collaboration_potential}),r.jsx("div",{style:{fontSize:10,color:"#555",marginTop:2},children:"Collab Potential"})]})]}),((B=h.comparison)==null?void 0:B.winner_by_category)&&r.jsxs("div",{children:[r.jsx("div",{style:{fontSize:10,color:"#444",textTransform:"uppercase",letterSpacing:1,marginBottom:8},children:"Category Winners"}),r.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:Object.entries(h.comparison.winner_by_category).map(([W,P])=>r.jsxs("div",{style:{background:"#0d0d1a",border:"1px solid #1a1a2e",borderRadius:6,padding:"5px 10px",fontSize:11},children:[r.jsxs("span",{style:{color:"#666"},children:[W,": "]}),r.jsx("span",{style:{color:P==="tie"?"#ffd54f":Ce,fontWeight:700},children:P==="tie"?"Tie":`Creator ${P}`})]},W))})]}),((C=h.comparison)==null?void 0:C.strategic_advice)&&r.jsxs("div",{style:{marginTop:14,background:"#0d0d1a",borderRadius:8,padding:12},children:[r.jsx("div",{style:{fontSize:10,color:"#444",textTransform:"uppercase",letterSpacing:1,marginBottom:6},children:"Strategic Advice"}),r.jsx("p",{style:{fontSize:12,color:"#aaa",margin:0,lineHeight:1.6},children:h.comparison.strategic_advice})]})]})]})]})})}function Jh(){const[l,c]=v.useState("score");return r.jsxs("div",{style:{padding:24,maxWidth:720,margin:"0 auto"},children:[r.jsxs("div",{style:{textAlign:"center",marginBottom:28},children:[r.jsx("div",{style:{fontSize:9,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:6,fontFamily:"monospace"},children:"Content Intelligence Stack"}),r.jsxs("h1",{style:{fontSize:28,fontWeight:800,color:"#e0e0e0",letterSpacing:-.5},children:["Audience",r.jsx("span",{style:{color:Ce},children:"Decoder"})]}),r.jsxs("p",{style:{color:"#777",fontSize:14,marginTop:6},children:["Paste your content. Discover who reads you, what resonates, and"," ",r.jsx("span",{style:{color:"#ccc",fontWeight:500},children:"exactly what to post next."})]}),r.jsx("div",{style:{display:"flex",flexWrap:"wrap",justifyContent:"center",gap:6,marginTop:12},children:["Audience Archetypes","Content Patterns","Engagement Model","Growth Opportunities","Content Calendar"].map(a=>r.jsx("span",{style:{fontSize:10,padding:"3px 10px",borderRadius:12,background:"#12121f",color:"#666",border:"1px solid #1a1a2e"},children:a},a))})]}),r.jsxs("div",{style:{display:"flex",gap:4,background:"#12121f",border:"1px solid #1a1a2e",borderRadius:10,padding:4,marginBottom:24,width:"fit-content"},children:[r.jsx("button",{onClick:()=>c("score"),style:{padding:"7px 18px",borderRadius:8,border:"none",cursor:"pointer",fontSize:12,fontWeight:600,background:l==="score"?Ce:"transparent",color:l==="score"?"#000":"#666",transition:"background 0.2s, color 0.2s"},children:"Decode"}),r.jsxs("button",{onClick:()=>c("compare"),style:{padding:"7px 18px",borderRadius:8,border:"none",cursor:"pointer",fontSize:12,fontWeight:600,background:l==="compare"?"#0a2e1a":"transparent",color:l==="compare"?"#00c853":"#444",transition:"background 0.2s, color 0.2s",display:"flex",alignItems:"center",gap:6},children:["Compare Creators",r.jsx("span",{style:{fontSize:8,padding:"1px 6px",borderRadius:4,background:Ce+"33",color:Ce,border:`1px solid ${Ce}44`,fontFamily:"monospace",fontWeight:700,letterSpacing:.5},children:"PRO"})]})]}),l==="score"&&r.jsx(qh,{}),l==="compare"&&r.jsx(Yh,{}),r.jsx("div",{style:{marginTop:40,textAlign:"center",fontSize:10,color:"#333"},children:"Audience intelligence for creators · Powered by local Claude session"})]})}function Yn({children:l,style:c}){return r.jsx("div",{style:{background:"#0d0d1a",border:"1px solid #12121f",borderRadius:12,padding:"16px 20px",...c},children:l})}function Jn({children:l}){return r.jsx("div",{style:{fontSize:10,fontWeight:800,color:"#444",textTransform:"uppercase",letterSpacing:2,fontFamily:"monospace",marginBottom:12},children:l})}function Oe({label:l,value:c,sub:a,color:f="#e0e0e0"}){return r.jsxs("div",{children:[r.jsx("div",{style:{fontSize:11,color:"#444",marginBottom:3},children:l}),r.jsx("div",{style:{fontSize:22,fontWeight:800,color:f,fontFamily:"monospace",lineHeight:1},children:c}),a&&r.jsx("div",{style:{fontSize:10,color:"#333",marginTop:3},children:a})]})}function ps({label:l,value:c,max:a,color:f}){const u=a>0?Math.round(c/a*100):0;return r.jsxs("div",{style:{marginBottom:14},children:[r.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:4},children:[r.jsx("span",{style:{fontSize:11,color:"#888"},children:l}),r.jsxs("span",{style:{fontSize:11,fontWeight:700,color:"#ccc",fontFamily:"monospace"},children:[c.toLocaleString()," ",r.jsxs("span",{style:{color:"#444"},children:["(",u,"%)"]})]})]}),r.jsx("div",{style:{height:5,background:"#1a1a2e",borderRadius:3,overflow:"hidden"},children:r.jsx("div",{style:{height:"100%",width:`${u}%`,background:f,borderRadius:3}})})]})}function Xh(){var x,B;const[l,c]=v.useState(null),[a,f]=v.useState(null),[u,g]=v.useState(!0),[h,y]=v.useState(null),[j,R]=v.useState(null),w=v.useCallback(async()=>{g(!0),y(null);try{const[C,W]=await Promise.all([fetch(`${ge}/analytics/summary`),fetch(`${ge}/analytics/npm-stats`)]);if(!C.ok)throw new Error(`Analytics summary: ${C.status}`);const P=await C.json();if(c(P),W.ok&&W.status!==204){const Q=await W.json();f(Q)}R(new Date)}catch(C){y(String(C))}finally{g(!1)}},[]);if(v.useEffect(()=>{w()},[w]),u)return r.jsx("div",{style:{padding:40,textAlign:"center",color:"#333",fontSize:12},children:"Loading metrics..."});if(h)return r.jsxs("div",{style:{padding:40,textAlign:"center"},children:[r.jsx("div",{style:{color:"#ef5350",fontSize:13,marginBottom:8},children:"Failed to load metrics"}),r.jsx("div",{style:{color:"#444",fontSize:11,fontFamily:"monospace"},children:h}),r.jsx("button",{onClick:w,style:{marginTop:16,padding:"8px 20px",background:"#1a1a2e",color:"#7c4dff",border:"1px solid #7c4dff44",borderRadius:8,cursor:"pointer",fontSize:12,fontWeight:700},children:"Retry"})]});const T=(l==null?void 0:l.funnel.free_limit_hits_30d)??0,_=(x=a==null?void 0:a.latest)==null?void 0:x.npm,A=(B=a==null?void 0:a.latest)==null?void 0:B.github;return r.jsxs("div",{style:{padding:"24px 28px",maxWidth:900,margin:"0 auto"},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:28},children:[r.jsxs("div",{children:[r.jsx("div",{style:{fontSize:18,fontWeight:800,color:"#e0e0e0"},children:"Metrics"}),r.jsx("div",{style:{fontSize:11,color:"#333",marginTop:2},children:l&&`Last 30 days · ${l.period.from} → ${l.period.to}`})]}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10},children:[j&&r.jsx("span",{style:{fontSize:10,color:"#333"},children:j.toLocaleTimeString()}),r.jsx("button",{onClick:w,style:{padding:"6px 14px",background:"#12121f",color:"#7c4dff",border:"1px solid #7c4dff33",borderRadius:7,cursor:"pointer",fontSize:11,fontWeight:700},children:"Refresh"})]})]}),r.jsxs(Yn,{style:{marginBottom:16},children:[r.jsx(Jn,{children:"Conversion Funnel — 30d"}),r.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:20,marginBottom:24},children:[r.jsx(Oe,{label:"Free limit hits",value:((l==null?void 0:l.funnel.free_limit_hits_30d)??0).toLocaleString(),sub:"users reached paywall",color:"#ffd54f"}),r.jsx(Oe,{label:"Upgrade clicks",value:((l==null?void 0:l.funnel.upgrade_clicks_30d)??0).toLocaleString(),sub:"clicked Pro CTA",color:"#7c4dff"}),r.jsx(Oe,{label:"Checkouts completed",value:((l==null?void 0:l.funnel.checkout_completions_30d)??0).toLocaleString(),sub:"paid customers",color:"#4caf50"}),r.jsx(Oe,{label:"Conversion rate",value:`${(l==null?void 0:l.funnel.conversion_rate_pct)??0}%`,sub:"upgrade click → paid",color:((l==null?void 0:l.funnel.conversion_rate_pct)??0)>=5?"#4caf50":((l==null?void 0:l.funnel.conversion_rate_pct)??0)>=2?"#ffd54f":"#ef5350"})]}),r.jsx(ps,{label:"Free limit hit",value:(l==null?void 0:l.funnel.free_limit_hits_30d)??0,max:T||1,color:"#ffd54f"}),r.jsx(ps,{label:"Upgrade clicked",value:(l==null?void 0:l.funnel.upgrade_clicks_30d)??0,max:T||1,color:"#7c4dff"}),r.jsx(ps,{label:"Checkout completed",value:(l==null?void 0:l.funnel.checkout_completions_30d)??0,max:T||1,color:"#4caf50"})]}),r.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:16,marginBottom:16},children:[r.jsxs(Yn,{children:[r.jsx(Jn,{children:"CLI Telemetry — 30d"}),r.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:16,marginBottom:16},children:[r.jsx(Oe,{label:"Unique installs",value:((l==null?void 0:l.cli.unique_installs_30d)??0).toLocaleString()}),r.jsx(Oe,{label:"Total commands",value:((l==null?void 0:l.cli.total_commands_30d)??0).toLocaleString()}),r.jsx(Oe,{label:"Success rate",value:`${(l==null?void 0:l.cli.success_rate_pct)??0}%`,color:((l==null?void 0:l.cli.success_rate_pct)??0)>=90?"#4caf50":"#ffd54f"}),r.jsx(Oe,{label:"Avg duration",value:l!=null&&l.cli.avg_duration_ms?`${(l.cli.avg_duration_ms/1e3).toFixed(1)}s`:"—"})]}),l!=null&&l.cli.command_breakdown&&l.cli.command_breakdown.length>0?r.jsxs("div",{children:[r.jsx("div",{style:{fontSize:10,color:"#333",marginBottom:8},children:"By command"}),l.cli.command_breakdown.map(C=>r.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"4px 0",borderBottom:"1px solid #0d0d1a"},children:[r.jsx("span",{style:{fontSize:11,color:"#888",fontFamily:"monospace"},children:C.command}),r.jsxs("span",{style:{fontSize:11,color:"#ccc",fontFamily:"monospace"},children:[C.count," ",r.jsxs("span",{style:{color:"#333"},children:["(",(C.avg_ms/1e3).toFixed(1),"s avg)"]})]})]},C.command))]}):r.jsxs("div",{style:{fontSize:11,color:"#333",textAlign:"center",padding:"8px 0"},children:["No CLI events yet. Telemetry fires on first ",r.jsx("code",{style:{color:"#555"},children:"content-grade"})," run."]})]}),r.jsxs(Yn,{children:[r.jsx(Jn,{children:"Web Tools — Today"}),r.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:16,marginBottom:16},children:[r.jsx(Oe,{label:"Requests today",value:((l==null?void 0:l.web.today.total_requests)??0).toLocaleString()}),r.jsx(Oe,{label:"Unique IPs today",value:((l==null?void 0:l.web.today.unique_ips)??0).toLocaleString()})]}),l!=null&&l.web.tool_usage_7d&&l.web.tool_usage_7d.length>0?r.jsxs("div",{children:[r.jsx("div",{style:{fontSize:10,color:"#333",marginBottom:8},children:"By tool (7d)"}),l.web.tool_usage_7d.slice(0,6).map(C=>r.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"4px 0",borderBottom:"1px solid #0d0d1a"},children:[r.jsx("span",{style:{fontSize:11,color:"#888",fontFamily:"monospace"},children:C.endpoint.replace("/api/demos/","")}),r.jsx("span",{style:{fontSize:11,color:"#ccc",fontFamily:"monospace"},children:C.total.toLocaleString()})]},C.endpoint))]}):r.jsx("div",{style:{fontSize:11,color:"#333",textAlign:"center",padding:"8px 0"},children:"No web tool usage tracked yet."}),(l==null?void 0:l.web.daily_active_users_7d)&&l.web.daily_active_users_7d.length>1&&r.jsxs("div",{style:{marginTop:16},children:[r.jsx("div",{style:{fontSize:10,color:"#333",marginBottom:8},children:"Daily unique IPs (7d)"}),r.jsx("div",{style:{display:"flex",alignItems:"flex-end",gap:3,height:32},children:[...l.web.daily_active_users_7d].reverse().map(C=>{const W=Math.max(...l.web.daily_active_users_7d.map(Q=>Q.unique_ips),1),P=Math.max(2,Math.round(C.unique_ips/W*32));return r.jsx("div",{title:`${C.date}: ${C.unique_ips} unique IPs`,style:{flex:1,height:P,background:"#7c4dff55",borderRadius:2,minWidth:8}},C.date)})})]})]})]}),r.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:16,marginBottom:16},children:[r.jsxs(Yn,{children:[r.jsx(Jn,{children:"npm Downloads"}),_?r.jsxs(r.Fragment,{children:[r.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr 1fr",gap:12,marginBottom:12},children:[r.jsx(Oe,{label:"This week",value:_.last_week.toLocaleString()}),r.jsx(Oe,{label:"This month",value:_.last_month.toLocaleString()}),r.jsx(Oe,{label:"All time",value:_.last_year.toLocaleString()})]}),r.jsxs("div",{style:{fontSize:10,color:"#333"},children:["Package: ",r.jsx("code",{style:{color:"#555"},children:"content-grade"}),_.status==="awaiting_first_download"&&r.jsx("span",{style:{color:"#ffd54f",marginLeft:8},children:"awaiting first download"})]})]}):r.jsxs("div",{style:{fontSize:11,color:"#333",padding:"8px 0"},children:["No npm snapshot yet. Run:"," ",r.jsx("code",{style:{color:"#555",fontSize:10},children:"npm run metrics"})]}),a&&r.jsxs("div",{style:{marginTop:12,fontSize:10,color:"#222"},children:[a.snapshot_count," snapshot",a.snapshot_count!==1?"s":""," ·"," ","last updated ",a.newest_snapshot?new Date(a.newest_snapshot).toLocaleDateString():"—"]})]}),r.jsxs(Yn,{children:[r.jsx(Jn,{children:"GitHub Traffic"}),A?r.jsxs(r.Fragment,{children:[r.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:12,marginBottom:12},children:[r.jsx(Oe,{label:"Stars",value:A.engagement.stars.toLocaleString(),color:"#ffd54f"}),r.jsx(Oe,{label:"Forks",value:A.engagement.forks.toLocaleString()}),r.jsx(Oe,{label:"Views (14d)",value:A.views.count_14d.toLocaleString()}),r.jsx(Oe,{label:"Clones (14d)",value:A.clones.count_14d.toLocaleString()})]}),A.top_referrers.length>0&&r.jsxs("div",{children:[r.jsx("div",{style:{fontSize:10,color:"#333",marginBottom:6},children:"Top referrers"}),A.top_referrers.slice(0,4).map(C=>r.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:10,color:"#555",padding:"2px 0"},children:[r.jsx("span",{children:C.referrer}),r.jsx("span",{style:{fontFamily:"monospace",color:"#444"},children:C.count})]},C.referrer))]})]}):r.jsxs("div",{style:{fontSize:11,color:"#333",padding:"8px 0"},children:["No GitHub snapshot yet. Run:"," ",r.jsx("code",{style:{color:"#555",fontSize:10},children:"npm run metrics"})]})]})]}),r.jsxs(Yn,{children:[r.jsx(Jn,{children:"Email Leads — 30d"}),r.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:20},children:[r.jsx(Oe,{label:"Email captures",value:((l==null?void 0:l.leads.email_captures_30d)??0).toLocaleString(),sub:"total email submissions"}),r.jsx(Oe,{label:"Unique emails",value:((l==null?void 0:l.leads.unique_emails_30d)??0).toLocaleString(),sub:"distinct leads"})]})]}),r.jsxs("div",{style:{marginTop:16,fontSize:10,color:"#222",textAlign:"right"},children:["Generated: ",l!=null&&l.generated_at?new Date(l.generated_at).toLocaleString():"—"]})]})}const Zh=[{path:"/headline",label:"HeadlineGrader"},{path:"/page-roast",label:"PageRoast"},{path:"/ad-scorer",label:"AdScorer"},{path:"/thread",label:"ThreadGrader"},{path:"/email-forge",label:"EmailForge"},{path:"/audience",label:"AudienceDecoder"},{path:"/metrics",label:"Metrics",operatorOnly:!0}];function eg(){const{email:l,isPro:c,loading:a,setEmail:f}=ou(),[u,g]=v.useState(!1),[h,y]=v.useState(""),[j,R]=v.useState(!1),[w,T]=v.useState(null),[_,A]=v.useState(!1),[x,B]=v.useState(!1);ws.useEffect(()=>{!l||!c||(A(!0),fetch(`${ge}/license/my-keys?email=${encodeURIComponent(l)}`).then(F=>F.json()).then(F=>{const ie=F.keys,re=ie==null?void 0:ie.find(fe=>fe.status==="active");T((re==null?void 0:re.key)??null)}).catch(()=>T(null)).finally(()=>A(!1)))},[l,c]);async function C(F){try{await navigator.clipboard.writeText(F),B(!0),setTimeout(()=>B(!1),2e3)}catch{}}async function W(){if(l){R(!0);try{const ie=await(await fetch(`${ge}/stripe/billing-portal`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:l,returnUrl:window.location.href})})).json();ie.url?window.location.href=ie.url:alert(ie.error??"Could not open billing portal.")}catch{alert("Billing portal unavailable. Try again later.")}finally{R(!1)}}}function P(){const F=h.trim().toLowerCase();F.includes("@")&&(f(F),g(!1),y(""))}function Q(){f(""),g(!1)}return a?r.jsx("span",{style:{fontSize:10,color:"#333",marginLeft:8},children:"..."}):l?r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-end",gap:6,marginLeft:"auto",flexShrink:0},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[c&&r.jsx("span",{style:{fontSize:9,fontWeight:800,color:"#7c4dff",background:"#7c4dff18",border:"1px solid #7c4dff44",borderRadius:5,padding:"2px 7px",letterSpacing:.8,textTransform:"uppercase"},children:"PRO"}),r.jsx("span",{style:{fontSize:10,color:"#555",maxWidth:130,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:l}),c&&r.jsx("button",{onClick:W,disabled:j,style:{fontSize:10,color:"#7c4dff",background:"transparent",border:"1px solid #7c4dff44",borderRadius:5,padding:"3px 8px",cursor:"pointer",whiteSpace:"nowrap",fontWeight:600},children:j?"...":"Manage Billing"}),r.jsx("button",{onClick:Q,style:{fontSize:10,color:"#444",background:"transparent",border:"none",cursor:"pointer",padding:"2px 4px"},title:"Sign out",children:"×"})]}),c&&r.jsx("div",{style:{fontSize:10,color:"#555"},children:_?r.jsx("span",{style:{color:"#333"},children:"Loading key..."}):w?r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[r.jsx("code",{style:{background:"#0d0d1a",border:"1px solid #1a1a2e",borderRadius:4,padding:"2px 8px",fontSize:10,color:"#7c4dff",fontFamily:"monospace",letterSpacing:.5},children:w}),r.jsx("button",{onClick:()=>C(w),style:{fontSize:9,color:x?"#44bb88":"#555",background:"transparent",border:"1px solid #1a1a2e",borderRadius:4,padding:"2px 6px",cursor:"pointer"},children:x?"Copied!":"Copy"})]}):r.jsx("span",{style:{color:"#333",fontSize:9},children:"Key will appear here after purchase"})})]}):u?r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,marginLeft:"auto",flexShrink:0},children:[r.jsx("input",{autoFocus:!0,type:"email",placeholder:"your@email.com",value:h,onChange:F=>y(F.target.value),onKeyDown:F=>{F.key==="Enter"&&P(),F.key==="Escape"&&(g(!1),y(""))},style:{background:"#0d0d1a",border:"1px solid #2a2a3e",borderRadius:6,padding:"5px 10px",fontSize:11,color:"#e0e0e0",outline:"none",fontFamily:"inherit",width:170}}),r.jsx("button",{onClick:P,disabled:!h.includes("@"),style:{fontSize:10,fontWeight:700,color:"#7c4dff",background:"#7c4dff18",border:"1px solid #7c4dff44",borderRadius:5,padding:"4px 10px",cursor:"pointer",opacity:h.includes("@")?1:.5},children:"Sign In"}),r.jsx("button",{onClick:()=>{g(!1),y("")},style:{fontSize:10,color:"#444",background:"transparent",border:"none",cursor:"pointer"},children:"×"})]}):r.jsx("button",{onClick:()=>g(!0),style:{marginLeft:"auto",fontSize:10,fontWeight:600,color:"#555",background:"transparent",border:"1px solid #1a1a2e",borderRadius:5,padding:"4px 10px",cursor:"pointer",whiteSpace:"nowrap",flexShrink:0},children:"Sign In"})}function tg(){return r.jsxs("nav",{style:{background:"#080810",borderBottom:"1px solid #12121f",padding:"0 24px",display:"flex",alignItems:"center",gap:4,overflowX:"auto",flexShrink:0},children:[r.jsx("span",{style:{fontSize:12,fontWeight:800,color:"#555",marginRight:16,whiteSpace:"nowrap",letterSpacing:1},children:"CG"}),Zh.map(({path:l,label:c,...a})=>{const f="operatorOnly"in a&&a.operatorOnly;return r.jsx(Sh,{to:l,style:({isActive:u})=>({padding:"12px 14px",fontSize:12,fontWeight:600,color:u?"#e0e0e0":f?"#2a2a3e":"#444",textDecoration:"none",borderBottom:u?"2px solid #7c4dff":"2px solid transparent",whiteSpace:"nowrap"}),children:c},l)}),r.jsx(eg,{})]})}function ng(){return r.jsx(Ch,{children:r.jsx(mh,{children:r.jsxs("div",{style:{display:"flex",flexDirection:"column",minHeight:"100vh"},children:[r.jsx(tg,{}),r.jsx("main",{style:{flex:1,overflowY:"auto"},children:r.jsxs(ah,{children:[r.jsx(Rt,{path:"/",element:r.jsx(Ld,{to:"/headline",replace:!0})}),r.jsx(Rt,{path:"/headline",element:r.jsx(Bh,{})}),r.jsx(Rt,{path:"/page-roast",element:r.jsx(Lh,{})}),r.jsx(Rt,{path:"/ad-scorer",element:r.jsx(Fh,{})}),r.jsx(Rt,{path:"/thread",element:r.jsx($h,{})}),r.jsx(Rt,{path:"/email-forge",element:r.jsx(Qh,{})}),r.jsx(Rt,{path:"/audience",element:r.jsx(Jh,{})}),r.jsx(Rt,{path:"/metrics",element:r.jsx(Xh,{})}),r.jsx(Rt,{path:"*",element:r.jsx(Ld,{to:"/headline",replace:!0})})]})})]})})})}xp.createRoot(document.getElementById("root")).render(r.jsx(ws.StrictMode,{children:r.jsx(ng,{})}));