content-grade 1.0.5 → 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.
- package/README.md +42 -25
- package/bin/content-grade.js +185 -26
- package/bin/telemetry.js +3 -2
- package/dist/assets/index-Bc3ZrBgH.js +78 -0
- package/dist/index.html +1 -1
- package/package.json +7 -7
- package/dist/assets/index-DWBbWitG.js +0 -78
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
function Pu(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const l=Object.getOwnPropertyDescriptor(r,o);l&&Object.defineProperty(e,o,l.get?l:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const s of l.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}})();function Wu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var tc={exports:{}},Oo={},nc={exports:{}},N={};/**
|
|
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 Er=Symbol.for("react.element"),Au=Symbol.for("react.portal"),Lu=Symbol.for("react.fragment"),Nu=Symbol.for("react.strict_mode"),Iu=Symbol.for("react.profiler"),Ou=Symbol.for("react.provider"),Fu=Symbol.for("react.context"),$u=Symbol.for("react.forward_ref"),Mu=Symbol.for("react.suspense"),Du=Symbol.for("react.memo"),Uu=Symbol.for("react.lazy"),Bs=Symbol.iterator;function Hu(e){return e===null||typeof e!="object"?null:(e=Bs&&e[Bs]||e["@@iterator"],typeof e=="function"?e:null)}var rc={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},oc=Object.assign,ic={};function An(e,t,n){this.props=e,this.context=t,this.refs=ic,this.updater=n||rc}An.prototype.isReactComponent={};An.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};An.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function lc(){}lc.prototype=An.prototype;function Wl(e,t,n){this.props=e,this.context=t,this.refs=ic,this.updater=n||rc}var Al=Wl.prototype=new lc;Al.constructor=Wl;oc(Al,An.prototype);Al.isPureReactComponent=!0;var Ps=Array.isArray,sc=Object.prototype.hasOwnProperty,Ll={current:null},ac={key:!0,ref:!0,__self:!0,__source:!0};function cc(e,t,n){var r,o={},l=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(l=""+t.key),t)sc.call(t,r)&&!ac.hasOwnProperty(r)&&(o[r]=t[r]);var a=arguments.length-2;if(a===1)o.children=n;else if(1<a){for(var c=Array(a),d=0;d<a;d++)c[d]=arguments[d+2];o.children=c}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)o[r]===void 0&&(o[r]=a[r]);return{$$typeof:Er,type:e,key:l,ref:s,props:o,_owner:Ll.current}}function Vu(e,t){return{$$typeof:Er,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Nl(e){return typeof e=="object"&&e!==null&&e.$$typeof===Er}function Gu(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Ws=/\/+/g;function ri(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Gu(""+e.key):t.toString(36)}function Xr(e,t,n,r,o){var l=typeof e;(l==="undefined"||l==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(l){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case Er:case Au:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+ri(s,0):r,Ps(o)?(n="",e!=null&&(n=e.replace(Ws,"$&/")+"/"),Xr(o,t,n,"",function(d){return d})):o!=null&&(Nl(o)&&(o=Vu(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(Ws,"$&/")+"/")+e)),t.push(o)),1;if(s=0,r=r===""?".":r+":",Ps(e))for(var a=0;a<e.length;a++){l=e[a];var c=r+ri(l,a);s+=Xr(l,t,n,c,o)}else if(c=Hu(e),typeof c=="function")for(e=c.call(e),a=0;!(l=e.next()).done;)l=l.value,c=r+ri(l,a++),s+=Xr(l,t,n,c,o);else if(l==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function Ar(e,t,n){if(e==null)return e;var r=[],o=0;return Xr(e,r,"","",function(l){return t.call(n,l,o++)}),r}function Qu(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var ke={current:null},Zr={transition:null},Ku={ReactCurrentDispatcher:ke,ReactCurrentBatchConfig:Zr,ReactCurrentOwner:Ll};function dc(){throw Error("act(...) is not supported in production builds of React.")}N.Children={map:Ar,forEach:function(e,t,n){Ar(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Ar(e,function(){t++}),t},toArray:function(e){return Ar(e,function(t){return t})||[]},only:function(e){if(!Nl(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};N.Component=An;N.Fragment=Lu;N.Profiler=Iu;N.PureComponent=Wl;N.StrictMode=Nu;N.Suspense=Mu;N.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ku;N.act=dc;N.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=oc({},e.props),o=e.key,l=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(l=t.ref,s=Ll.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(c in t)sc.call(t,c)&&!ac.hasOwnProperty(c)&&(r[c]=t[c]===void 0&&a!==void 0?a[c]:t[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){a=Array(c);for(var d=0;d<c;d++)a[d]=arguments[d+2];r.children=a}return{$$typeof:Er,type:e.type,key:o,ref:l,props:r,_owner:s}};N.createContext=function(e){return e={$$typeof:Fu,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Ou,_context:e},e.Consumer=e};N.createElement=cc;N.createFactory=function(e){var t=cc.bind(null,e);return t.type=e,t};N.createRef=function(){return{current:null}};N.forwardRef=function(e){return{$$typeof:$u,render:e}};N.isValidElement=Nl;N.lazy=function(e){return{$$typeof:Uu,_payload:{_status:-1,_result:e},_init:Qu}};N.memo=function(e,t){return{$$typeof:Du,type:e,compare:t===void 0?null:t}};N.startTransition=function(e){var t=Zr.transition;Zr.transition={};try{e()}finally{Zr.transition=t}};N.unstable_act=dc;N.useCallback=function(e,t){return ke.current.useCallback(e,t)};N.useContext=function(e){return ke.current.useContext(e)};N.useDebugValue=function(){};N.useDeferredValue=function(e){return ke.current.useDeferredValue(e)};N.useEffect=function(e,t){return ke.current.useEffect(e,t)};N.useId=function(){return ke.current.useId()};N.useImperativeHandle=function(e,t,n){return ke.current.useImperativeHandle(e,t,n)};N.useInsertionEffect=function(e,t){return ke.current.useInsertionEffect(e,t)};N.useLayoutEffect=function(e,t){return ke.current.useLayoutEffect(e,t)};N.useMemo=function(e,t){return ke.current.useMemo(e,t)};N.useReducer=function(e,t,n){return ke.current.useReducer(e,t,n)};N.useRef=function(e){return ke.current.useRef(e)};N.useState=function(e){return ke.current.useState(e)};N.useSyncExternalStore=function(e,t,n){return ke.current.useSyncExternalStore(e,t,n)};N.useTransition=function(){return ke.current.useTransition()};N.version="18.3.1";nc.exports=N;var x=nc.exports;const Il=Wu(x),Yu=Pu({__proto__:null,default:Il},[x]);/**
|
|
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 qu=x,Ju=Symbol.for("react.element"),Xu=Symbol.for("react.fragment"),Zu=Object.prototype.hasOwnProperty,ef=qu.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,tf={key:!0,ref:!0,__self:!0,__source:!0};function uc(e,t,n){var r,o={},l=null,s=null;n!==void 0&&(l=""+n),t.key!==void 0&&(l=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)Zu.call(t,r)&&!tf.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:Ju,type:e,key:l,ref:s,props:o,_owner:ef.current}}Oo.Fragment=Xu;Oo.jsx=uc;Oo.jsxs=uc;tc.exports=Oo;var i=tc.exports,Wi={},fc={exports:{}},Ne={},pc={exports:{}},hc={};/**
|
|
18
|
-
* @license React
|
|
19
|
-
* scheduler.production.min.js
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
-
*
|
|
23
|
-
* This source code is licensed under the MIT license found in the
|
|
24
|
-
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/(function(e){function t(_,P){var A=_.length;_.push(P);e:for(;0<A;){var D=A-1>>>1,Y=_[D];if(0<o(Y,P))_[D]=P,_[A]=Y,A=D;else break e}}function n(_){return _.length===0?null:_[0]}function r(_){if(_.length===0)return null;var P=_[0],A=_.pop();if(A!==P){_[0]=A;e:for(var D=0,Y=_.length,Se=Y>>>1;D<Se;){var Je=2*(D+1)-1,L=_[Je],H=Je+1,Wr=_[H];if(0>o(L,A))H<Y&&0>o(Wr,L)?(_[D]=Wr,_[H]=A,D=H):(_[D]=L,_[Je]=A,D=Je);else if(H<Y&&0>o(Wr,A))_[D]=Wr,_[H]=A,D=H;else break e}}return P}function o(_,P){var A=_.sortIndex-P.sortIndex;return A!==0?A:_.id-P.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var c=[],d=[],p=1,m=null,g=3,S=!1,h=!1,v=!1,w=typeof setTimeout=="function"?setTimeout:null,f=typeof clearTimeout=="function"?clearTimeout:null,u=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(_){for(var P=n(d);P!==null;){if(P.callback===null)r(d);else if(P.startTime<=_)r(d),P.sortIndex=P.expirationTime,t(c,P);else break;P=n(d)}}function j(_){if(v=!1,y(_),!h)if(n(c)!==null)h=!0,M(k);else{var P=n(d);P!==null&&ce(j,P.startTime-_)}}function k(_,P){h=!1,v&&(v=!1,f(R),R=-1),S=!0;var A=g;try{for(y(P),m=n(c);m!==null&&(!(m.expirationTime>P)||_&&!ne());){var D=m.callback;if(typeof D=="function"){m.callback=null,g=m.priorityLevel;var Y=D(m.expirationTime<=P);P=e.unstable_now(),typeof Y=="function"?m.callback=Y:m===n(c)&&r(c),y(P)}else r(c);m=n(c)}if(m!==null)var Se=!0;else{var Je=n(d);Je!==null&&ce(j,Je.startTime-P),Se=!1}return Se}finally{m=null,g=A,S=!1}}var b=!1,z=null,R=-1,O=5,B=-1;function ne(){return!(e.unstable_now()-B<O)}function Te(){if(z!==null){var _=e.unstable_now();B=_;var P=!0;try{P=z(!0,_)}finally{P?Be():(b=!1,z=null)}}else b=!1}var Be;if(typeof u=="function")Be=function(){u(Te)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,T=W.port2;W.port1.onmessage=Te,Be=function(){T.postMessage(null)}}else Be=function(){w(Te,0)};function M(_){z=_,b||(b=!0,Be())}function ce(_,P){R=w(function(){_(e.unstable_now())},P)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(_){_.callback=null},e.unstable_continueExecution=function(){h||S||(h=!0,M(k))},e.unstable_forceFrameRate=function(_){0>_||125<_?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<_?Math.floor(1e3/_):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(_){switch(g){case 1:case 2:case 3:var P=3;break;default:P=g}var A=g;g=P;try{return _()}finally{g=A}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(_,P){switch(_){case 1:case 2:case 3:case 4:case 5:break;default:_=3}var A=g;g=_;try{return P()}finally{g=A}},e.unstable_scheduleCallback=function(_,P,A){var D=e.unstable_now();switch(typeof A=="object"&&A!==null?(A=A.delay,A=typeof A=="number"&&0<A?D+A:D):A=D,_){case 1:var Y=-1;break;case 2:Y=250;break;case 5:Y=1073741823;break;case 4:Y=1e4;break;default:Y=5e3}return Y=A+Y,_={id:p++,callback:P,priorityLevel:_,startTime:A,expirationTime:Y,sortIndex:-1},A>D?(_.sortIndex=A,t(d,_),n(c)===null&&_===n(d)&&(v?(f(R),R=-1):v=!0,ce(j,A-D))):(_.sortIndex=Y,t(c,_),h||S||(h=!0,M(k))),_},e.unstable_shouldYield=ne,e.unstable_wrapCallback=function(_){var P=g;return function(){var A=g;g=P;try{return _.apply(this,arguments)}finally{g=A}}}})(hc);pc.exports=hc;var nf=pc.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 rf=x,Le=nf;function C(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 gc=new Set,ar={};function tn(e,t){zn(e,t),zn(e+"Capture",t)}function zn(e,t){for(ar[e]=t,e=0;e<t.length;e++)gc.add(t[e])}var ct=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ai=Object.prototype.hasOwnProperty,of=/^[: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]*$/,As={},Ls={};function lf(e){return Ai.call(Ls,e)?!0:Ai.call(As,e)?!1:of.test(e)?Ls[e]=!0:(As[e]=!0,!1)}function sf(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function af(e,t,n,r){if(t===null||typeof t>"u"||sf(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ce(e,t,n,r,o,l,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=l,this.removeEmptyString=s}var he={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){he[e]=new Ce(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];he[t]=new Ce(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){he[e]=new Ce(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){he[e]=new Ce(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){he[e]=new Ce(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){he[e]=new Ce(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){he[e]=new Ce(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){he[e]=new Ce(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){he[e]=new Ce(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ol=/[\-:]([a-z])/g;function Fl(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(Ol,Fl);he[t]=new Ce(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(Ol,Fl);he[t]=new Ce(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(Ol,Fl);he[t]=new Ce(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){he[e]=new Ce(e,1,!1,e.toLowerCase(),null,!1,!1)});he.xlinkHref=new Ce("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){he[e]=new Ce(e,1,!1,e.toLowerCase(),null,!0,!0)});function $l(e,t,n,r){var o=he.hasOwnProperty(t)?he[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(af(t,n,o,r)&&(n=null),r||o===null?lf(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var pt=rf.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Lr=Symbol.for("react.element"),sn=Symbol.for("react.portal"),an=Symbol.for("react.fragment"),Ml=Symbol.for("react.strict_mode"),Li=Symbol.for("react.profiler"),mc=Symbol.for("react.provider"),yc=Symbol.for("react.context"),Dl=Symbol.for("react.forward_ref"),Ni=Symbol.for("react.suspense"),Ii=Symbol.for("react.suspense_list"),Ul=Symbol.for("react.memo"),yt=Symbol.for("react.lazy"),xc=Symbol.for("react.offscreen"),Ns=Symbol.iterator;function Mn(e){return e===null||typeof e!="object"?null:(e=Ns&&e[Ns]||e["@@iterator"],typeof e=="function"?e:null)}var ee=Object.assign,oi;function Yn(e){if(oi===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);oi=t&&t[1]||""}return`
|
|
34
|
-
`+oi+e}var ii=!1;function li(e,t){if(!e||ii)return"";ii=!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(d){var r=d}Reflect.construct(e,[],t)}else{try{t.call()}catch(d){r=d}e.call(t.prototype)}else{try{throw Error()}catch(d){r=d}e()}}catch(d){if(d&&r&&typeof d.stack=="string"){for(var o=d.stack.split(`
|
|
35
|
-
`),l=r.stack.split(`
|
|
36
|
-
`),s=o.length-1,a=l.length-1;1<=s&&0<=a&&o[s]!==l[a];)a--;for(;1<=s&&0<=a;s--,a--)if(o[s]!==l[a]){if(s!==1||a!==1)do if(s--,a--,0>a||o[s]!==l[a]){var c=`
|
|
37
|
-
`+o[s].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=s&&0<=a);break}}}finally{ii=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Yn(e):""}function cf(e){switch(e.tag){case 5:return Yn(e.type);case 16:return Yn("Lazy");case 13:return Yn("Suspense");case 19:return Yn("SuspenseList");case 0:case 2:case 15:return e=li(e.type,!1),e;case 11:return e=li(e.type.render,!1),e;case 1:return e=li(e.type,!0),e;default:return""}}function Oi(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 an:return"Fragment";case sn:return"Portal";case Li:return"Profiler";case Ml:return"StrictMode";case Ni:return"Suspense";case Ii:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case yc:return(e.displayName||"Context")+".Consumer";case mc:return(e._context.displayName||"Context")+".Provider";case Dl:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ul:return t=e.displayName||null,t!==null?t:Oi(e.type)||"Memo";case yt:t=e._payload,e=e._init;try{return Oi(e(t))}catch{}}return null}function df(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 Oi(t);case 8:return t===Ml?"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 At(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function vc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function uf(e){var t=vc(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,l=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,l.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Nr(e){e._valueTracker||(e._valueTracker=uf(e))}function Sc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=vc(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function uo(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 ee({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Is(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=At(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function jc(e,t){t=t.checked,t!=null&&$l(e,"checked",t,!1)}function $i(e,t){jc(e,t);var n=At(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Mi(e,t.type,n):t.hasOwnProperty("defaultValue")&&Mi(e,t.type,At(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Os(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Mi(e,t,n){(t!=="number"||uo(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var qn=Array.isArray;function vn(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+At(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Di(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(C(91));return ee({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Fs(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(C(92));if(qn(n)){if(1<n.length)throw Error(C(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:At(n)}}function wc(e,t){var n=At(t.value),r=At(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function $s(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function kc(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 Ui(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?kc(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ir,Cc=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Ir=Ir||document.createElement("div"),Ir.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ir.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function cr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Zn={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},ff=["Webkit","ms","Moz","O"];Object.keys(Zn).forEach(function(e){ff.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Zn[t]=Zn[e]})});function bc(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Zn.hasOwnProperty(e)&&Zn[e]?(""+t).trim():t+"px"}function zc(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=bc(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var pf=ee({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Hi(e,t){if(t){if(pf[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(C(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(C(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(C(61))}if(t.style!=null&&typeof t.style!="object")throw Error(C(62))}}function Vi(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 Gi=null;function Hl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Qi=null,Sn=null,jn=null;function Ms(e){if(e=Br(e)){if(typeof Qi!="function")throw Error(C(280));var t=e.stateNode;t&&(t=Uo(t),Qi(e.stateNode,e.type,t))}}function _c(e){Sn?jn?jn.push(e):jn=[e]:Sn=e}function Ec(){if(Sn){var e=Sn,t=jn;if(jn=Sn=null,Ms(e),t)for(e=0;e<t.length;e++)Ms(t[e])}}function Rc(e,t){return e(t)}function Tc(){}var si=!1;function Bc(e,t,n){if(si)return e(t,n);si=!0;try{return Rc(e,t,n)}finally{si=!1,(Sn!==null||jn!==null)&&(Tc(),Ec())}}function dr(e,t){var n=e.stateNode;if(n===null)return null;var r=Uo(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(C(231,t,typeof n));return n}var Ki=!1;if(ct)try{var Dn={};Object.defineProperty(Dn,"passive",{get:function(){Ki=!0}}),window.addEventListener("test",Dn,Dn),window.removeEventListener("test",Dn,Dn)}catch{Ki=!1}function hf(e,t,n,r,o,l,s,a,c){var d=Array.prototype.slice.call(arguments,3);try{t.apply(n,d)}catch(p){this.onError(p)}}var er=!1,fo=null,po=!1,Yi=null,gf={onError:function(e){er=!0,fo=e}};function mf(e,t,n,r,o,l,s,a,c){er=!1,fo=null,hf.apply(gf,arguments)}function yf(e,t,n,r,o,l,s,a,c){if(mf.apply(this,arguments),er){if(er){var d=fo;er=!1,fo=null}else throw Error(C(198));po||(po=!0,Yi=d)}}function nn(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Pc(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 Ds(e){if(nn(e)!==e)throw Error(C(188))}function xf(e){var t=e.alternate;if(!t){if(t=nn(e),t===null)throw Error(C(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var l=o.alternate;if(l===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===l.child){for(l=o.child;l;){if(l===n)return Ds(o),e;if(l===r)return Ds(o),t;l=l.sibling}throw Error(C(188))}if(n.return!==r.return)n=o,r=l;else{for(var s=!1,a=o.child;a;){if(a===n){s=!0,n=o,r=l;break}if(a===r){s=!0,r=o,n=l;break}a=a.sibling}if(!s){for(a=l.child;a;){if(a===n){s=!0,n=l,r=o;break}if(a===r){s=!0,r=l,n=o;break}a=a.sibling}if(!s)throw Error(C(189))}}if(n.alternate!==r)throw Error(C(190))}if(n.tag!==3)throw Error(C(188));return n.stateNode.current===n?e:t}function Wc(e){return e=xf(e),e!==null?Ac(e):null}function Ac(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Ac(e);if(t!==null)return t;e=e.sibling}return null}var Lc=Le.unstable_scheduleCallback,Us=Le.unstable_cancelCallback,vf=Le.unstable_shouldYield,Sf=Le.unstable_requestPaint,re=Le.unstable_now,jf=Le.unstable_getCurrentPriorityLevel,Vl=Le.unstable_ImmediatePriority,Nc=Le.unstable_UserBlockingPriority,ho=Le.unstable_NormalPriority,wf=Le.unstable_LowPriority,Ic=Le.unstable_IdlePriority,Fo=null,nt=null;function kf(e){if(nt&&typeof nt.onCommitFiberRoot=="function")try{nt.onCommitFiberRoot(Fo,e,void 0,(e.current.flags&128)===128)}catch{}}var Ke=Math.clz32?Math.clz32:zf,Cf=Math.log,bf=Math.LN2;function zf(e){return e>>>=0,e===0?32:31-(Cf(e)/bf|0)|0}var Or=64,Fr=4194304;function Jn(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 go(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,l=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~o;a!==0?r=Jn(a):(l&=s,l!==0&&(r=Jn(l)))}else s=n&~o,s!==0?r=Jn(s):l!==0&&(r=Jn(l));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,l=t&-t,o>=l||o===16&&(l&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Ke(t),o=1<<n,r|=e[n],t&=~o;return r}function _f(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 Ef(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,l=e.pendingLanes;0<l;){var s=31-Ke(l),a=1<<s,c=o[s];c===-1?(!(a&n)||a&r)&&(o[s]=_f(a,t)):c<=t&&(e.expiredLanes|=a),l&=~a}}function qi(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Oc(){var e=Or;return Or<<=1,!(Or&4194240)&&(Or=64),e}function ai(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Rr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ke(t),e[t]=n}function Rf(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-Ke(n),l=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~l}}function Gl(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ke(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var $=0;function Fc(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var $c,Ql,Mc,Dc,Uc,Ji=!1,$r=[],Ct=null,bt=null,zt=null,ur=new Map,fr=new Map,vt=[],Tf="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 Hs(e,t){switch(e){case"focusin":case"focusout":Ct=null;break;case"dragenter":case"dragleave":bt=null;break;case"mouseover":case"mouseout":zt=null;break;case"pointerover":case"pointerout":ur.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":fr.delete(t.pointerId)}}function Un(e,t,n,r,o,l){return e===null||e.nativeEvent!==l?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:l,targetContainers:[o]},t!==null&&(t=Br(t),t!==null&&Ql(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function Bf(e,t,n,r,o){switch(t){case"focusin":return Ct=Un(Ct,e,t,n,r,o),!0;case"dragenter":return bt=Un(bt,e,t,n,r,o),!0;case"mouseover":return zt=Un(zt,e,t,n,r,o),!0;case"pointerover":var l=o.pointerId;return ur.set(l,Un(ur.get(l)||null,e,t,n,r,o)),!0;case"gotpointercapture":return l=o.pointerId,fr.set(l,Un(fr.get(l)||null,e,t,n,r,o)),!0}return!1}function Hc(e){var t=Ut(e.target);if(t!==null){var n=nn(t);if(n!==null){if(t=n.tag,t===13){if(t=Pc(n),t!==null){e.blockedOn=t,Uc(e.priority,function(){Mc(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 eo(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Xi(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Gi=r,n.target.dispatchEvent(r),Gi=null}else return t=Br(n),t!==null&&Ql(t),e.blockedOn=n,!1;t.shift()}return!0}function Vs(e,t,n){eo(e)&&n.delete(t)}function Pf(){Ji=!1,Ct!==null&&eo(Ct)&&(Ct=null),bt!==null&&eo(bt)&&(bt=null),zt!==null&&eo(zt)&&(zt=null),ur.forEach(Vs),fr.forEach(Vs)}function Hn(e,t){e.blockedOn===t&&(e.blockedOn=null,Ji||(Ji=!0,Le.unstable_scheduleCallback(Le.unstable_NormalPriority,Pf)))}function pr(e){function t(o){return Hn(o,e)}if(0<$r.length){Hn($r[0],e);for(var n=1;n<$r.length;n++){var r=$r[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Ct!==null&&Hn(Ct,e),bt!==null&&Hn(bt,e),zt!==null&&Hn(zt,e),ur.forEach(t),fr.forEach(t),n=0;n<vt.length;n++)r=vt[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<vt.length&&(n=vt[0],n.blockedOn===null);)Hc(n),n.blockedOn===null&&vt.shift()}var wn=pt.ReactCurrentBatchConfig,mo=!0;function Wf(e,t,n,r){var o=$,l=wn.transition;wn.transition=null;try{$=1,Kl(e,t,n,r)}finally{$=o,wn.transition=l}}function Af(e,t,n,r){var o=$,l=wn.transition;wn.transition=null;try{$=4,Kl(e,t,n,r)}finally{$=o,wn.transition=l}}function Kl(e,t,n,r){if(mo){var o=Xi(e,t,n,r);if(o===null)xi(e,t,r,yo,n),Hs(e,r);else if(Bf(o,e,t,n,r))r.stopPropagation();else if(Hs(e,r),t&4&&-1<Tf.indexOf(e)){for(;o!==null;){var l=Br(o);if(l!==null&&$c(l),l=Xi(e,t,n,r),l===null&&xi(e,t,r,yo,n),l===o)break;o=l}o!==null&&r.stopPropagation()}else xi(e,t,r,null,n)}}var yo=null;function Xi(e,t,n,r){if(yo=null,e=Hl(r),e=Ut(e),e!==null)if(t=nn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Pc(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 yo=e,null}function Vc(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(jf()){case Vl:return 1;case Nc:return 4;case ho:case wf:return 16;case Ic:return 536870912;default:return 16}default:return 16}}var jt=null,Yl=null,to=null;function Gc(){if(to)return to;var e,t=Yl,n=t.length,r,o="value"in jt?jt.value:jt.textContent,l=o.length;for(e=0;e<n&&t[e]===o[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===o[l-r];r++);return to=o.slice(e,1<r?1-r:void 0)}function no(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 Mr(){return!0}function Gs(){return!1}function Ie(e){function t(n,r,o,l,s){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=l,this.target=s,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(l):l[a]);return this.isDefaultPrevented=(l.defaultPrevented!=null?l.defaultPrevented:l.returnValue===!1)?Mr:Gs,this.isPropagationStopped=Gs,this}return ee(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Mr)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Mr)},persist:function(){},isPersistent:Mr}),t}var Ln={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ql=Ie(Ln),Tr=ee({},Ln,{view:0,detail:0}),Lf=Ie(Tr),ci,di,Vn,$o=ee({},Tr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Jl,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!==Vn&&(Vn&&e.type==="mousemove"?(ci=e.screenX-Vn.screenX,di=e.screenY-Vn.screenY):di=ci=0,Vn=e),ci)},movementY:function(e){return"movementY"in e?e.movementY:di}}),Qs=Ie($o),Nf=ee({},$o,{dataTransfer:0}),If=Ie(Nf),Of=ee({},Tr,{relatedTarget:0}),ui=Ie(Of),Ff=ee({},Ln,{animationName:0,elapsedTime:0,pseudoElement:0}),$f=Ie(Ff),Mf=ee({},Ln,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Df=Ie(Mf),Uf=ee({},Ln,{data:0}),Ks=Ie(Uf),Hf={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Vf={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"},Gf={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Qf(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Gf[e])?!!t[e]:!1}function Jl(){return Qf}var Kf=ee({},Tr,{key:function(e){if(e.key){var t=Hf[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=no(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Vf[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Jl,charCode:function(e){return e.type==="keypress"?no(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?no(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Yf=Ie(Kf),qf=ee({},$o,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ys=Ie(qf),Jf=ee({},Tr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Jl}),Xf=Ie(Jf),Zf=ee({},Ln,{propertyName:0,elapsedTime:0,pseudoElement:0}),ep=Ie(Zf),tp=ee({},$o,{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}),np=Ie(tp),rp=[9,13,27,32],Xl=ct&&"CompositionEvent"in window,tr=null;ct&&"documentMode"in document&&(tr=document.documentMode);var op=ct&&"TextEvent"in window&&!tr,Qc=ct&&(!Xl||tr&&8<tr&&11>=tr),qs=" ",Js=!1;function Kc(e,t){switch(e){case"keyup":return rp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Yc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var cn=!1;function ip(e,t){switch(e){case"compositionend":return Yc(t);case"keypress":return t.which!==32?null:(Js=!0,qs);case"textInput":return e=t.data,e===qs&&Js?null:e;default:return null}}function lp(e,t){if(cn)return e==="compositionend"||!Xl&&Kc(e,t)?(e=Gc(),to=Yl=jt=null,cn=!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 Qc&&t.locale!=="ko"?null:t.data;default:return null}}var sp={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 Xs(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!sp[e.type]:t==="textarea"}function qc(e,t,n,r){_c(r),t=xo(t,"onChange"),0<t.length&&(n=new ql("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var nr=null,hr=null;function ap(e){sd(e,0)}function Mo(e){var t=fn(e);if(Sc(t))return e}function cp(e,t){if(e==="change")return t}var Jc=!1;if(ct){var fi;if(ct){var pi="oninput"in document;if(!pi){var Zs=document.createElement("div");Zs.setAttribute("oninput","return;"),pi=typeof Zs.oninput=="function"}fi=pi}else fi=!1;Jc=fi&&(!document.documentMode||9<document.documentMode)}function ea(){nr&&(nr.detachEvent("onpropertychange",Xc),hr=nr=null)}function Xc(e){if(e.propertyName==="value"&&Mo(hr)){var t=[];qc(t,hr,e,Hl(e)),Bc(ap,t)}}function dp(e,t,n){e==="focusin"?(ea(),nr=t,hr=n,nr.attachEvent("onpropertychange",Xc)):e==="focusout"&&ea()}function up(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Mo(hr)}function fp(e,t){if(e==="click")return Mo(t)}function pp(e,t){if(e==="input"||e==="change")return Mo(t)}function hp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var qe=typeof Object.is=="function"?Object.is:hp;function gr(e,t){if(qe(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!Ai.call(t,o)||!qe(e[o],t[o]))return!1}return!0}function ta(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function na(e,t){var n=ta(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=ta(n)}}function Zc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Zc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ed(){for(var e=window,t=uo();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=uo(e.document)}return t}function Zl(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function gp(e){var t=ed(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Zc(n.ownerDocument.documentElement,n)){if(r!==null&&Zl(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,l=Math.min(r.start,o);r=r.end===void 0?l:Math.min(r.end,o),!e.extend&&l>r&&(o=r,r=l,l=o),o=na(n,l);var s=na(n,r);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),l>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.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 mp=ct&&"documentMode"in document&&11>=document.documentMode,dn=null,Zi=null,rr=null,el=!1;function ra(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;el||dn==null||dn!==uo(r)||(r=dn,"selectionStart"in r&&Zl(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),rr&&gr(rr,r)||(rr=r,r=xo(Zi,"onSelect"),0<r.length&&(t=new ql("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=dn)))}function Dr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var un={animationend:Dr("Animation","AnimationEnd"),animationiteration:Dr("Animation","AnimationIteration"),animationstart:Dr("Animation","AnimationStart"),transitionend:Dr("Transition","TransitionEnd")},hi={},td={};ct&&(td=document.createElement("div").style,"AnimationEvent"in window||(delete un.animationend.animation,delete un.animationiteration.animation,delete un.animationstart.animation),"TransitionEvent"in window||delete un.transitionend.transition);function Do(e){if(hi[e])return hi[e];if(!un[e])return e;var t=un[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in td)return hi[e]=t[n];return e}var nd=Do("animationend"),rd=Do("animationiteration"),od=Do("animationstart"),id=Do("transitionend"),ld=new Map,oa="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 Nt(e,t){ld.set(e,t),tn(t,[e])}for(var gi=0;gi<oa.length;gi++){var mi=oa[gi],yp=mi.toLowerCase(),xp=mi[0].toUpperCase()+mi.slice(1);Nt(yp,"on"+xp)}Nt(nd,"onAnimationEnd");Nt(rd,"onAnimationIteration");Nt(od,"onAnimationStart");Nt("dblclick","onDoubleClick");Nt("focusin","onFocus");Nt("focusout","onBlur");Nt(id,"onTransitionEnd");zn("onMouseEnter",["mouseout","mouseover"]);zn("onMouseLeave",["mouseout","mouseover"]);zn("onPointerEnter",["pointerout","pointerover"]);zn("onPointerLeave",["pointerout","pointerover"]);tn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));tn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));tn("onBeforeInput",["compositionend","keypress","textInput","paste"]);tn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));tn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));tn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Xn="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(" "),vp=new Set("cancel close invalid load scroll toggle".split(" ").concat(Xn));function ia(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,yf(r,t,void 0,e),e.currentTarget=null}function sd(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var l=void 0;if(t)for(var s=r.length-1;0<=s;s--){var a=r[s],c=a.instance,d=a.currentTarget;if(a=a.listener,c!==l&&o.isPropagationStopped())break e;ia(o,a,d),l=c}else for(s=0;s<r.length;s++){if(a=r[s],c=a.instance,d=a.currentTarget,a=a.listener,c!==l&&o.isPropagationStopped())break e;ia(o,a,d),l=c}}}if(po)throw e=Yi,po=!1,Yi=null,e}function V(e,t){var n=t[il];n===void 0&&(n=t[il]=new Set);var r=e+"__bubble";n.has(r)||(ad(t,e,2,!1),n.add(r))}function yi(e,t,n){var r=0;t&&(r|=4),ad(n,e,r,t)}var Ur="_reactListening"+Math.random().toString(36).slice(2);function mr(e){if(!e[Ur]){e[Ur]=!0,gc.forEach(function(n){n!=="selectionchange"&&(vp.has(n)||yi(n,!1,e),yi(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ur]||(t[Ur]=!0,yi("selectionchange",!1,t))}}function ad(e,t,n,r){switch(Vc(t)){case 1:var o=Wf;break;case 4:o=Af;break;default:o=Kl}n=o.bind(null,t,n,e),o=void 0,!Ki||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function xi(e,t,n,r,o){var l=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var a=r.stateNode.containerInfo;if(a===o||a.nodeType===8&&a.parentNode===o)break;if(s===4)for(s=r.return;s!==null;){var c=s.tag;if((c===3||c===4)&&(c=s.stateNode.containerInfo,c===o||c.nodeType===8&&c.parentNode===o))return;s=s.return}for(;a!==null;){if(s=Ut(a),s===null)return;if(c=s.tag,c===5||c===6){r=l=s;continue e}a=a.parentNode}}r=r.return}Bc(function(){var d=l,p=Hl(n),m=[];e:{var g=ld.get(e);if(g!==void 0){var S=ql,h=e;switch(e){case"keypress":if(no(n)===0)break e;case"keydown":case"keyup":S=Yf;break;case"focusin":h="focus",S=ui;break;case"focusout":h="blur",S=ui;break;case"beforeblur":case"afterblur":S=ui;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":S=Qs;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":S=If;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":S=Xf;break;case nd:case rd:case od:S=$f;break;case id:S=ep;break;case"scroll":S=Lf;break;case"wheel":S=np;break;case"copy":case"cut":case"paste":S=Df;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":S=Ys}var v=(t&4)!==0,w=!v&&e==="scroll",f=v?g!==null?g+"Capture":null:g;v=[];for(var u=d,y;u!==null;){y=u;var j=y.stateNode;if(y.tag===5&&j!==null&&(y=j,f!==null&&(j=dr(u,f),j!=null&&v.push(yr(u,j,y)))),w)break;u=u.return}0<v.length&&(g=new S(g,h,null,n,p),m.push({event:g,listeners:v}))}}if(!(t&7)){e:{if(g=e==="mouseover"||e==="pointerover",S=e==="mouseout"||e==="pointerout",g&&n!==Gi&&(h=n.relatedTarget||n.fromElement)&&(Ut(h)||h[dt]))break e;if((S||g)&&(g=p.window===p?p:(g=p.ownerDocument)?g.defaultView||g.parentWindow:window,S?(h=n.relatedTarget||n.toElement,S=d,h=h?Ut(h):null,h!==null&&(w=nn(h),h!==w||h.tag!==5&&h.tag!==6)&&(h=null)):(S=null,h=d),S!==h)){if(v=Qs,j="onMouseLeave",f="onMouseEnter",u="mouse",(e==="pointerout"||e==="pointerover")&&(v=Ys,j="onPointerLeave",f="onPointerEnter",u="pointer"),w=S==null?g:fn(S),y=h==null?g:fn(h),g=new v(j,u+"leave",S,n,p),g.target=w,g.relatedTarget=y,j=null,Ut(p)===d&&(v=new v(f,u+"enter",h,n,p),v.target=y,v.relatedTarget=w,j=v),w=j,S&&h)t:{for(v=S,f=h,u=0,y=v;y;y=rn(y))u++;for(y=0,j=f;j;j=rn(j))y++;for(;0<u-y;)v=rn(v),u--;for(;0<y-u;)f=rn(f),y--;for(;u--;){if(v===f||f!==null&&v===f.alternate)break t;v=rn(v),f=rn(f)}v=null}else v=null;S!==null&&la(m,g,S,v,!1),h!==null&&w!==null&&la(m,w,h,v,!0)}}e:{if(g=d?fn(d):window,S=g.nodeName&&g.nodeName.toLowerCase(),S==="select"||S==="input"&&g.type==="file")var k=cp;else if(Xs(g))if(Jc)k=pp;else{k=up;var b=dp}else(S=g.nodeName)&&S.toLowerCase()==="input"&&(g.type==="checkbox"||g.type==="radio")&&(k=fp);if(k&&(k=k(e,d))){qc(m,k,n,p);break e}b&&b(e,g,d),e==="focusout"&&(b=g._wrapperState)&&b.controlled&&g.type==="number"&&Mi(g,"number",g.value)}switch(b=d?fn(d):window,e){case"focusin":(Xs(b)||b.contentEditable==="true")&&(dn=b,Zi=d,rr=null);break;case"focusout":rr=Zi=dn=null;break;case"mousedown":el=!0;break;case"contextmenu":case"mouseup":case"dragend":el=!1,ra(m,n,p);break;case"selectionchange":if(mp)break;case"keydown":case"keyup":ra(m,n,p)}var z;if(Xl)e:{switch(e){case"compositionstart":var R="onCompositionStart";break e;case"compositionend":R="onCompositionEnd";break e;case"compositionupdate":R="onCompositionUpdate";break e}R=void 0}else cn?Kc(e,n)&&(R="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(R="onCompositionStart");R&&(Qc&&n.locale!=="ko"&&(cn||R!=="onCompositionStart"?R==="onCompositionEnd"&&cn&&(z=Gc()):(jt=p,Yl="value"in jt?jt.value:jt.textContent,cn=!0)),b=xo(d,R),0<b.length&&(R=new Ks(R,e,null,n,p),m.push({event:R,listeners:b}),z?R.data=z:(z=Yc(n),z!==null&&(R.data=z)))),(z=op?ip(e,n):lp(e,n))&&(d=xo(d,"onBeforeInput"),0<d.length&&(p=new Ks("onBeforeInput","beforeinput",null,n,p),m.push({event:p,listeners:d}),p.data=z))}sd(m,t)})}function yr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function xo(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,l=o.stateNode;o.tag===5&&l!==null&&(o=l,l=dr(e,n),l!=null&&r.unshift(yr(e,l,o)),l=dr(e,t),l!=null&&r.push(yr(e,l,o))),e=e.return}return r}function rn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function la(e,t,n,r,o){for(var l=t._reactName,s=[];n!==null&&n!==r;){var a=n,c=a.alternate,d=a.stateNode;if(c!==null&&c===r)break;a.tag===5&&d!==null&&(a=d,o?(c=dr(n,l),c!=null&&s.unshift(yr(n,c,a))):o||(c=dr(n,l),c!=null&&s.push(yr(n,c,a)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var Sp=/\r\n?/g,jp=/\u0000|\uFFFD/g;function sa(e){return(typeof e=="string"?e:""+e).replace(Sp,`
|
|
38
|
-
`).replace(jp,"")}function Hr(e,t,n){if(t=sa(t),sa(e)!==t&&n)throw Error(C(425))}function vo(){}var tl=null,nl=null;function rl(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 ol=typeof setTimeout=="function"?setTimeout:void 0,wp=typeof clearTimeout=="function"?clearTimeout:void 0,aa=typeof Promise=="function"?Promise:void 0,kp=typeof queueMicrotask=="function"?queueMicrotask:typeof aa<"u"?function(e){return aa.resolve(null).then(e).catch(Cp)}:ol;function Cp(e){setTimeout(function(){throw e})}function vi(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),pr(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);pr(t)}function _t(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 ca(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Nn=Math.random().toString(36).slice(2),tt="__reactFiber$"+Nn,xr="__reactProps$"+Nn,dt="__reactContainer$"+Nn,il="__reactEvents$"+Nn,bp="__reactListeners$"+Nn,zp="__reactHandles$"+Nn;function Ut(e){var t=e[tt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[dt]||n[tt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=ca(e);e!==null;){if(n=e[tt])return n;e=ca(e)}return t}e=n,n=e.parentNode}return null}function Br(e){return e=e[tt]||e[dt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function fn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(C(33))}function Uo(e){return e[xr]||null}var ll=[],pn=-1;function It(e){return{current:e}}function G(e){0>pn||(e.current=ll[pn],ll[pn]=null,pn--)}function U(e,t){pn++,ll[pn]=e.current,e.current=t}var Lt={},ve=It(Lt),_e=It(!1),Kt=Lt;function _n(e,t){var n=e.type.contextTypes;if(!n)return Lt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},l;for(l in n)o[l]=t[l];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Ee(e){return e=e.childContextTypes,e!=null}function So(){G(_e),G(ve)}function da(e,t,n){if(ve.current!==Lt)throw Error(C(168));U(ve,t),U(_e,n)}function cd(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(C(108,df(e)||"Unknown",o));return ee({},n,r)}function jo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Lt,Kt=ve.current,U(ve,e),U(_e,_e.current),!0}function ua(e,t,n){var r=e.stateNode;if(!r)throw Error(C(169));n?(e=cd(e,t,Kt),r.__reactInternalMemoizedMergedChildContext=e,G(_e),G(ve),U(ve,e)):G(_e),U(_e,n)}var it=null,Ho=!1,Si=!1;function dd(e){it===null?it=[e]:it.push(e)}function _p(e){Ho=!0,dd(e)}function Ot(){if(!Si&&it!==null){Si=!0;var e=0,t=$;try{var n=it;for($=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}it=null,Ho=!1}catch(o){throw it!==null&&(it=it.slice(e+1)),Lc(Vl,Ot),o}finally{$=t,Si=!1}}return null}var hn=[],gn=0,wo=null,ko=0,Oe=[],Fe=0,Yt=null,lt=1,st="";function Mt(e,t){hn[gn++]=ko,hn[gn++]=wo,wo=e,ko=t}function ud(e,t,n){Oe[Fe++]=lt,Oe[Fe++]=st,Oe[Fe++]=Yt,Yt=e;var r=lt;e=st;var o=32-Ke(r)-1;r&=~(1<<o),n+=1;var l=32-Ke(t)+o;if(30<l){var s=o-o%5;l=(r&(1<<s)-1).toString(32),r>>=s,o-=s,lt=1<<32-Ke(t)+o|n<<o|r,st=l+e}else lt=1<<l|n<<o|r,st=e}function es(e){e.return!==null&&(Mt(e,1),ud(e,1,0))}function ts(e){for(;e===wo;)wo=hn[--gn],hn[gn]=null,ko=hn[--gn],hn[gn]=null;for(;e===Yt;)Yt=Oe[--Fe],Oe[Fe]=null,st=Oe[--Fe],Oe[Fe]=null,lt=Oe[--Fe],Oe[Fe]=null}var Ae=null,We=null,K=!1,Qe=null;function fd(e,t){var n=$e(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 fa(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ae=e,We=_t(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ae=e,We=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Yt!==null?{id:lt,overflow:st}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=$e(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ae=e,We=null,!0):!1;default:return!1}}function sl(e){return(e.mode&1)!==0&&(e.flags&128)===0}function al(e){if(K){var t=We;if(t){var n=t;if(!fa(e,t)){if(sl(e))throw Error(C(418));t=_t(n.nextSibling);var r=Ae;t&&fa(e,t)?fd(r,n):(e.flags=e.flags&-4097|2,K=!1,Ae=e)}}else{if(sl(e))throw Error(C(418));e.flags=e.flags&-4097|2,K=!1,Ae=e}}}function pa(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ae=e}function Vr(e){if(e!==Ae)return!1;if(!K)return pa(e),K=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!rl(e.type,e.memoizedProps)),t&&(t=We)){if(sl(e))throw pd(),Error(C(418));for(;t;)fd(e,t),t=_t(t.nextSibling)}if(pa(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(C(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){We=_t(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}We=null}}else We=Ae?_t(e.stateNode.nextSibling):null;return!0}function pd(){for(var e=We;e;)e=_t(e.nextSibling)}function En(){We=Ae=null,K=!1}function ns(e){Qe===null?Qe=[e]:Qe.push(e)}var Ep=pt.ReactCurrentBatchConfig;function Gn(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(C(309));var r=n.stateNode}if(!r)throw Error(C(147,e));var o=r,l=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===l?t.ref:(t=function(s){var a=o.refs;s===null?delete a[l]:a[l]=s},t._stringRef=l,t)}if(typeof e!="string")throw Error(C(284));if(!n._owner)throw Error(C(290,e))}return e}function Gr(e,t){throw e=Object.prototype.toString.call(t),Error(C(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ha(e){var t=e._init;return t(e._payload)}function hd(e){function t(f,u){if(e){var y=f.deletions;y===null?(f.deletions=[u],f.flags|=16):y.push(u)}}function n(f,u){if(!e)return null;for(;u!==null;)t(f,u),u=u.sibling;return null}function r(f,u){for(f=new Map;u!==null;)u.key!==null?f.set(u.key,u):f.set(u.index,u),u=u.sibling;return f}function o(f,u){return f=Bt(f,u),f.index=0,f.sibling=null,f}function l(f,u,y){return f.index=y,e?(y=f.alternate,y!==null?(y=y.index,y<u?(f.flags|=2,u):y):(f.flags|=2,u)):(f.flags|=1048576,u)}function s(f){return e&&f.alternate===null&&(f.flags|=2),f}function a(f,u,y,j){return u===null||u.tag!==6?(u=_i(y,f.mode,j),u.return=f,u):(u=o(u,y),u.return=f,u)}function c(f,u,y,j){var k=y.type;return k===an?p(f,u,y.props.children,j,y.key):u!==null&&(u.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===yt&&ha(k)===u.type)?(j=o(u,y.props),j.ref=Gn(f,u,y),j.return=f,j):(j=co(y.type,y.key,y.props,null,f.mode,j),j.ref=Gn(f,u,y),j.return=f,j)}function d(f,u,y,j){return u===null||u.tag!==4||u.stateNode.containerInfo!==y.containerInfo||u.stateNode.implementation!==y.implementation?(u=Ei(y,f.mode,j),u.return=f,u):(u=o(u,y.children||[]),u.return=f,u)}function p(f,u,y,j,k){return u===null||u.tag!==7?(u=Qt(y,f.mode,j,k),u.return=f,u):(u=o(u,y),u.return=f,u)}function m(f,u,y){if(typeof u=="string"&&u!==""||typeof u=="number")return u=_i(""+u,f.mode,y),u.return=f,u;if(typeof u=="object"&&u!==null){switch(u.$$typeof){case Lr:return y=co(u.type,u.key,u.props,null,f.mode,y),y.ref=Gn(f,null,u),y.return=f,y;case sn:return u=Ei(u,f.mode,y),u.return=f,u;case yt:var j=u._init;return m(f,j(u._payload),y)}if(qn(u)||Mn(u))return u=Qt(u,f.mode,y,null),u.return=f,u;Gr(f,u)}return null}function g(f,u,y,j){var k=u!==null?u.key:null;if(typeof y=="string"&&y!==""||typeof y=="number")return k!==null?null:a(f,u,""+y,j);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Lr:return y.key===k?c(f,u,y,j):null;case sn:return y.key===k?d(f,u,y,j):null;case yt:return k=y._init,g(f,u,k(y._payload),j)}if(qn(y)||Mn(y))return k!==null?null:p(f,u,y,j,null);Gr(f,y)}return null}function S(f,u,y,j,k){if(typeof j=="string"&&j!==""||typeof j=="number")return f=f.get(y)||null,a(u,f,""+j,k);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case Lr:return f=f.get(j.key===null?y:j.key)||null,c(u,f,j,k);case sn:return f=f.get(j.key===null?y:j.key)||null,d(u,f,j,k);case yt:var b=j._init;return S(f,u,y,b(j._payload),k)}if(qn(j)||Mn(j))return f=f.get(y)||null,p(u,f,j,k,null);Gr(u,j)}return null}function h(f,u,y,j){for(var k=null,b=null,z=u,R=u=0,O=null;z!==null&&R<y.length;R++){z.index>R?(O=z,z=null):O=z.sibling;var B=g(f,z,y[R],j);if(B===null){z===null&&(z=O);break}e&&z&&B.alternate===null&&t(f,z),u=l(B,u,R),b===null?k=B:b.sibling=B,b=B,z=O}if(R===y.length)return n(f,z),K&&Mt(f,R),k;if(z===null){for(;R<y.length;R++)z=m(f,y[R],j),z!==null&&(u=l(z,u,R),b===null?k=z:b.sibling=z,b=z);return K&&Mt(f,R),k}for(z=r(f,z);R<y.length;R++)O=S(z,f,R,y[R],j),O!==null&&(e&&O.alternate!==null&&z.delete(O.key===null?R:O.key),u=l(O,u,R),b===null?k=O:b.sibling=O,b=O);return e&&z.forEach(function(ne){return t(f,ne)}),K&&Mt(f,R),k}function v(f,u,y,j){var k=Mn(y);if(typeof k!="function")throw Error(C(150));if(y=k.call(y),y==null)throw Error(C(151));for(var b=k=null,z=u,R=u=0,O=null,B=y.next();z!==null&&!B.done;R++,B=y.next()){z.index>R?(O=z,z=null):O=z.sibling;var ne=g(f,z,B.value,j);if(ne===null){z===null&&(z=O);break}e&&z&&ne.alternate===null&&t(f,z),u=l(ne,u,R),b===null?k=ne:b.sibling=ne,b=ne,z=O}if(B.done)return n(f,z),K&&Mt(f,R),k;if(z===null){for(;!B.done;R++,B=y.next())B=m(f,B.value,j),B!==null&&(u=l(B,u,R),b===null?k=B:b.sibling=B,b=B);return K&&Mt(f,R),k}for(z=r(f,z);!B.done;R++,B=y.next())B=S(z,f,R,B.value,j),B!==null&&(e&&B.alternate!==null&&z.delete(B.key===null?R:B.key),u=l(B,u,R),b===null?k=B:b.sibling=B,b=B);return e&&z.forEach(function(Te){return t(f,Te)}),K&&Mt(f,R),k}function w(f,u,y,j){if(typeof y=="object"&&y!==null&&y.type===an&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Lr:e:{for(var k=y.key,b=u;b!==null;){if(b.key===k){if(k=y.type,k===an){if(b.tag===7){n(f,b.sibling),u=o(b,y.props.children),u.return=f,f=u;break e}}else if(b.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===yt&&ha(k)===b.type){n(f,b.sibling),u=o(b,y.props),u.ref=Gn(f,b,y),u.return=f,f=u;break e}n(f,b);break}else t(f,b);b=b.sibling}y.type===an?(u=Qt(y.props.children,f.mode,j,y.key),u.return=f,f=u):(j=co(y.type,y.key,y.props,null,f.mode,j),j.ref=Gn(f,u,y),j.return=f,f=j)}return s(f);case sn:e:{for(b=y.key;u!==null;){if(u.key===b)if(u.tag===4&&u.stateNode.containerInfo===y.containerInfo&&u.stateNode.implementation===y.implementation){n(f,u.sibling),u=o(u,y.children||[]),u.return=f,f=u;break e}else{n(f,u);break}else t(f,u);u=u.sibling}u=Ei(y,f.mode,j),u.return=f,f=u}return s(f);case yt:return b=y._init,w(f,u,b(y._payload),j)}if(qn(y))return h(f,u,y,j);if(Mn(y))return v(f,u,y,j);Gr(f,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,u!==null&&u.tag===6?(n(f,u.sibling),u=o(u,y),u.return=f,f=u):(n(f,u),u=_i(y,f.mode,j),u.return=f,f=u),s(f)):n(f,u)}return w}var Rn=hd(!0),gd=hd(!1),Co=It(null),bo=null,mn=null,rs=null;function os(){rs=mn=bo=null}function is(e){var t=Co.current;G(Co),e._currentValue=t}function cl(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function kn(e,t){bo=e,rs=mn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ze=!0),e.firstContext=null)}function De(e){var t=e._currentValue;if(rs!==e)if(e={context:e,memoizedValue:t,next:null},mn===null){if(bo===null)throw Error(C(308));mn=e,bo.dependencies={lanes:0,firstContext:e}}else mn=mn.next=e;return t}var Ht=null;function ls(e){Ht===null?Ht=[e]:Ht.push(e)}function md(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,ls(t)):(n.next=o.next,o.next=n),t.interleaved=n,ut(e,r)}function ut(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var xt=!1;function ss(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function yd(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 Et(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,I&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,ut(e,n)}return o=r.interleaved,o===null?(t.next=t,ls(r)):(t.next=o.next,o.next=t),r.interleaved=t,ut(e,n)}function ro(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Gl(e,n)}}function ga(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,l=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};l===null?o=l=s:l=l.next=s,n=n.next}while(n!==null);l===null?o=l=t:l=l.next=t}else o=l=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:l,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function zo(e,t,n,r){var o=e.updateQueue;xt=!1;var l=o.firstBaseUpdate,s=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var c=a,d=c.next;c.next=null,s===null?l=d:s.next=d,s=c;var p=e.alternate;p!==null&&(p=p.updateQueue,a=p.lastBaseUpdate,a!==s&&(a===null?p.firstBaseUpdate=d:a.next=d,p.lastBaseUpdate=c))}if(l!==null){var m=o.baseState;s=0,p=d=c=null,a=l;do{var g=a.lane,S=a.eventTime;if((r&g)===g){p!==null&&(p=p.next={eventTime:S,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var h=e,v=a;switch(g=t,S=n,v.tag){case 1:if(h=v.payload,typeof h=="function"){m=h.call(S,m,g);break e}m=h;break e;case 3:h.flags=h.flags&-65537|128;case 0:if(h=v.payload,g=typeof h=="function"?h.call(S,m,g):h,g==null)break e;m=ee({},m,g);break e;case 2:xt=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,g=o.effects,g===null?o.effects=[a]:g.push(a))}else S={eventTime:S,lane:g,tag:a.tag,payload:a.payload,callback:a.callback,next:null},p===null?(d=p=S,c=m):p=p.next=S,s|=g;if(a=a.next,a===null){if(a=o.shared.pending,a===null)break;g=a,a=g.next,g.next=null,o.lastBaseUpdate=g,o.shared.pending=null}}while(!0);if(p===null&&(c=m),o.baseState=c,o.firstBaseUpdate=d,o.lastBaseUpdate=p,t=o.shared.interleaved,t!==null){o=t;do s|=o.lane,o=o.next;while(o!==t)}else l===null&&(o.shared.lanes=0);Jt|=s,e.lanes=s,e.memoizedState=m}}function ma(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(C(191,o));o.call(r)}}}var Pr={},rt=It(Pr),vr=It(Pr),Sr=It(Pr);function Vt(e){if(e===Pr)throw Error(C(174));return e}function as(e,t){switch(U(Sr,t),U(vr,e),U(rt,Pr),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ui(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ui(t,e)}G(rt),U(rt,t)}function Tn(){G(rt),G(vr),G(Sr)}function xd(e){Vt(Sr.current);var t=Vt(rt.current),n=Ui(t,e.type);t!==n&&(U(vr,e),U(rt,n))}function cs(e){vr.current===e&&(G(rt),G(vr))}var J=It(0);function _o(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ji=[];function ds(){for(var e=0;e<ji.length;e++)ji[e]._workInProgressVersionPrimary=null;ji.length=0}var oo=pt.ReactCurrentDispatcher,wi=pt.ReactCurrentBatchConfig,qt=0,X=null,se=null,de=null,Eo=!1,or=!1,jr=0,Rp=0;function ge(){throw Error(C(321))}function us(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!qe(e[n],t[n]))return!1;return!0}function fs(e,t,n,r,o,l){if(qt=l,X=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,oo.current=e===null||e.memoizedState===null?Wp:Ap,e=n(r,o),or){l=0;do{if(or=!1,jr=0,25<=l)throw Error(C(301));l+=1,de=se=null,t.updateQueue=null,oo.current=Lp,e=n(r,o)}while(or)}if(oo.current=Ro,t=se!==null&&se.next!==null,qt=0,de=se=X=null,Eo=!1,t)throw Error(C(300));return e}function ps(){var e=jr!==0;return jr=0,e}function et(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return de===null?X.memoizedState=de=e:de=de.next=e,de}function Ue(){if(se===null){var e=X.alternate;e=e!==null?e.memoizedState:null}else e=se.next;var t=de===null?X.memoizedState:de.next;if(t!==null)de=t,se=e;else{if(e===null)throw Error(C(310));se=e,e={memoizedState:se.memoizedState,baseState:se.baseState,baseQueue:se.baseQueue,queue:se.queue,next:null},de===null?X.memoizedState=de=e:de=de.next=e}return de}function wr(e,t){return typeof t=="function"?t(e):t}function ki(e){var t=Ue(),n=t.queue;if(n===null)throw Error(C(311));n.lastRenderedReducer=e;var r=se,o=r.baseQueue,l=n.pending;if(l!==null){if(o!==null){var s=o.next;o.next=l.next,l.next=s}r.baseQueue=o=l,n.pending=null}if(o!==null){l=o.next,r=r.baseState;var a=s=null,c=null,d=l;do{var p=d.lane;if((qt&p)===p)c!==null&&(c=c.next={lane:0,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null}),r=d.hasEagerState?d.eagerState:e(r,d.action);else{var m={lane:p,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null};c===null?(a=c=m,s=r):c=c.next=m,X.lanes|=p,Jt|=p}d=d.next}while(d!==null&&d!==l);c===null?s=r:c.next=a,qe(r,t.memoizedState)||(ze=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=c,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do l=o.lane,X.lanes|=l,Jt|=l,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ci(e){var t=Ue(),n=t.queue;if(n===null)throw Error(C(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,l=t.memoizedState;if(o!==null){n.pending=null;var s=o=o.next;do l=e(l,s.action),s=s.next;while(s!==o);qe(l,t.memoizedState)||(ze=!0),t.memoizedState=l,t.baseQueue===null&&(t.baseState=l),n.lastRenderedState=l}return[l,r]}function vd(){}function Sd(e,t){var n=X,r=Ue(),o=t(),l=!qe(r.memoizedState,o);if(l&&(r.memoizedState=o,ze=!0),r=r.queue,hs(kd.bind(null,n,r,e),[e]),r.getSnapshot!==t||l||de!==null&&de.memoizedState.tag&1){if(n.flags|=2048,kr(9,wd.bind(null,n,r,o,t),void 0,null),ue===null)throw Error(C(349));qt&30||jd(n,t,o)}return o}function jd(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=X.updateQueue,t===null?(t={lastEffect:null,stores:null},X.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function wd(e,t,n,r){t.value=n,t.getSnapshot=r,Cd(t)&&bd(e)}function kd(e,t,n){return n(function(){Cd(t)&&bd(e)})}function Cd(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!qe(e,n)}catch{return!0}}function bd(e){var t=ut(e,1);t!==null&&Ye(t,e,1,-1)}function ya(e){var t=et();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:wr,lastRenderedState:e},t.queue=e,e=e.dispatch=Pp.bind(null,X,e),[t.memoizedState,e]}function kr(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=X.updateQueue,t===null?(t={lastEffect:null,stores:null},X.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function zd(){return Ue().memoizedState}function io(e,t,n,r){var o=et();X.flags|=e,o.memoizedState=kr(1|t,n,void 0,r===void 0?null:r)}function Vo(e,t,n,r){var o=Ue();r=r===void 0?null:r;var l=void 0;if(se!==null){var s=se.memoizedState;if(l=s.destroy,r!==null&&us(r,s.deps)){o.memoizedState=kr(t,n,l,r);return}}X.flags|=e,o.memoizedState=kr(1|t,n,l,r)}function xa(e,t){return io(8390656,8,e,t)}function hs(e,t){return Vo(2048,8,e,t)}function _d(e,t){return Vo(4,2,e,t)}function Ed(e,t){return Vo(4,4,e,t)}function Rd(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 Td(e,t,n){return n=n!=null?n.concat([e]):null,Vo(4,4,Rd.bind(null,t,e),n)}function gs(){}function Bd(e,t){var n=Ue();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&us(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Pd(e,t){var n=Ue();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&us(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Wd(e,t,n){return qt&21?(qe(n,t)||(n=Oc(),X.lanes|=n,Jt|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,ze=!0),e.memoizedState=n)}function Tp(e,t){var n=$;$=n!==0&&4>n?n:4,e(!0);var r=wi.transition;wi.transition={};try{e(!1),t()}finally{$=n,wi.transition=r}}function Ad(){return Ue().memoizedState}function Bp(e,t,n){var r=Tt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ld(e))Nd(t,n);else if(n=md(e,t,n,r),n!==null){var o=we();Ye(n,e,r,o),Id(n,t,r)}}function Pp(e,t,n){var r=Tt(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ld(e))Nd(t,o);else{var l=e.alternate;if(e.lanes===0&&(l===null||l.lanes===0)&&(l=t.lastRenderedReducer,l!==null))try{var s=t.lastRenderedState,a=l(s,n);if(o.hasEagerState=!0,o.eagerState=a,qe(a,s)){var c=t.interleaved;c===null?(o.next=o,ls(t)):(o.next=c.next,c.next=o),t.interleaved=o;return}}catch{}finally{}n=md(e,t,o,r),n!==null&&(o=we(),Ye(n,e,r,o),Id(n,t,r))}}function Ld(e){var t=e.alternate;return e===X||t!==null&&t===X}function Nd(e,t){or=Eo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Id(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Gl(e,n)}}var Ro={readContext:De,useCallback:ge,useContext:ge,useEffect:ge,useImperativeHandle:ge,useInsertionEffect:ge,useLayoutEffect:ge,useMemo:ge,useReducer:ge,useRef:ge,useState:ge,useDebugValue:ge,useDeferredValue:ge,useTransition:ge,useMutableSource:ge,useSyncExternalStore:ge,useId:ge,unstable_isNewReconciler:!1},Wp={readContext:De,useCallback:function(e,t){return et().memoizedState=[e,t===void 0?null:t],e},useContext:De,useEffect:xa,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,io(4194308,4,Rd.bind(null,t,e),n)},useLayoutEffect:function(e,t){return io(4194308,4,e,t)},useInsertionEffect:function(e,t){return io(4,2,e,t)},useMemo:function(e,t){var n=et();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=et();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Bp.bind(null,X,e),[r.memoizedState,e]},useRef:function(e){var t=et();return e={current:e},t.memoizedState=e},useState:ya,useDebugValue:gs,useDeferredValue:function(e){return et().memoizedState=e},useTransition:function(){var e=ya(!1),t=e[0];return e=Tp.bind(null,e[1]),et().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=X,o=et();if(K){if(n===void 0)throw Error(C(407));n=n()}else{if(n=t(),ue===null)throw Error(C(349));qt&30||jd(r,t,n)}o.memoizedState=n;var l={value:n,getSnapshot:t};return o.queue=l,xa(kd.bind(null,r,l,e),[e]),r.flags|=2048,kr(9,wd.bind(null,r,l,n,t),void 0,null),n},useId:function(){var e=et(),t=ue.identifierPrefix;if(K){var n=st,r=lt;n=(r&~(1<<32-Ke(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=jr++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Rp++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Ap={readContext:De,useCallback:Bd,useContext:De,useEffect:hs,useImperativeHandle:Td,useInsertionEffect:_d,useLayoutEffect:Ed,useMemo:Pd,useReducer:ki,useRef:zd,useState:function(){return ki(wr)},useDebugValue:gs,useDeferredValue:function(e){var t=Ue();return Wd(t,se.memoizedState,e)},useTransition:function(){var e=ki(wr)[0],t=Ue().memoizedState;return[e,t]},useMutableSource:vd,useSyncExternalStore:Sd,useId:Ad,unstable_isNewReconciler:!1},Lp={readContext:De,useCallback:Bd,useContext:De,useEffect:hs,useImperativeHandle:Td,useInsertionEffect:_d,useLayoutEffect:Ed,useMemo:Pd,useReducer:Ci,useRef:zd,useState:function(){return Ci(wr)},useDebugValue:gs,useDeferredValue:function(e){var t=Ue();return se===null?t.memoizedState=e:Wd(t,se.memoizedState,e)},useTransition:function(){var e=Ci(wr)[0],t=Ue().memoizedState;return[e,t]},useMutableSource:vd,useSyncExternalStore:Sd,useId:Ad,unstable_isNewReconciler:!1};function Ve(e,t){if(e&&e.defaultProps){t=ee({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function dl(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ee({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Go={isMounted:function(e){return(e=e._reactInternals)?nn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=we(),o=Tt(e),l=at(r,o);l.payload=t,n!=null&&(l.callback=n),t=Et(e,l,o),t!==null&&(Ye(t,e,o,r),ro(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=we(),o=Tt(e),l=at(r,o);l.tag=1,l.payload=t,n!=null&&(l.callback=n),t=Et(e,l,o),t!==null&&(Ye(t,e,o,r),ro(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=we(),r=Tt(e),o=at(n,r);o.tag=2,t!=null&&(o.callback=t),t=Et(e,o,r),t!==null&&(Ye(t,e,r,n),ro(t,e,r))}};function va(e,t,n,r,o,l,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,l,s):t.prototype&&t.prototype.isPureReactComponent?!gr(n,r)||!gr(o,l):!0}function Od(e,t,n){var r=!1,o=Lt,l=t.contextType;return typeof l=="object"&&l!==null?l=De(l):(o=Ee(t)?Kt:ve.current,r=t.contextTypes,l=(r=r!=null)?_n(e,o):Lt),t=new t(n,l),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Go,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=l),t}function Sa(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Go.enqueueReplaceState(t,t.state,null)}function ul(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},ss(e);var l=t.contextType;typeof l=="object"&&l!==null?o.context=De(l):(l=Ee(t)?Kt:ve.current,o.context=_n(e,l)),o.state=e.memoizedState,l=t.getDerivedStateFromProps,typeof l=="function"&&(dl(e,t,l,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&Go.enqueueReplaceState(o,o.state,null),zo(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Bn(e,t){try{var n="",r=t;do n+=cf(r),r=r.return;while(r);var o=n}catch(l){o=`
|
|
39
|
-
Error generating stack: `+l.message+`
|
|
40
|
-
`+l.stack}return{value:e,source:t,stack:o,digest:null}}function bi(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function fl(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Np=typeof WeakMap=="function"?WeakMap:Map;function Fd(e,t,n){n=at(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Bo||(Bo=!0,wl=r),fl(e,t)},n}function $d(e,t,n){n=at(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){fl(e,t)}}var l=e.stateNode;return l!==null&&typeof l.componentDidCatch=="function"&&(n.callback=function(){fl(e,t),typeof r!="function"&&(Rt===null?Rt=new Set([this]):Rt.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function ja(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Np;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=qp.bind(null,e,t,n),t.then(e,e))}function wa(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 ka(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=at(-1,1),t.tag=2,Et(n,t,1))),n.lanes|=1),e)}var Ip=pt.ReactCurrentOwner,ze=!1;function je(e,t,n,r){t.child=e===null?gd(t,null,n,r):Rn(t,e.child,n,r)}function Ca(e,t,n,r,o){n=n.render;var l=t.ref;return kn(t,o),r=fs(e,t,n,r,l,o),n=ps(),e!==null&&!ze?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,ft(e,t,o)):(K&&n&&es(t),t.flags|=1,je(e,t,r,o),t.child)}function ba(e,t,n,r,o){if(e===null){var l=n.type;return typeof l=="function"&&!ks(l)&&l.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=l,Md(e,t,l,r,o)):(e=co(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(l=e.child,!(e.lanes&o)){var s=l.memoizedProps;if(n=n.compare,n=n!==null?n:gr,n(s,r)&&e.ref===t.ref)return ft(e,t,o)}return t.flags|=1,e=Bt(l,r),e.ref=t.ref,e.return=t,t.child=e}function Md(e,t,n,r,o){if(e!==null){var l=e.memoizedProps;if(gr(l,r)&&e.ref===t.ref)if(ze=!1,t.pendingProps=r=l,(e.lanes&o)!==0)e.flags&131072&&(ze=!0);else return t.lanes=e.lanes,ft(e,t,o)}return pl(e,t,n,r,o)}function Dd(e,t,n){var r=t.pendingProps,o=r.children,l=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},U(xn,Pe),Pe|=n;else{if(!(n&1073741824))return e=l!==null?l.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,U(xn,Pe),Pe|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=l!==null?l.baseLanes:n,U(xn,Pe),Pe|=r}else l!==null?(r=l.baseLanes|n,t.memoizedState=null):r=n,U(xn,Pe),Pe|=r;return je(e,t,o,n),t.child}function Ud(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function pl(e,t,n,r,o){var l=Ee(n)?Kt:ve.current;return l=_n(t,l),kn(t,o),n=fs(e,t,n,r,l,o),r=ps(),e!==null&&!ze?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,ft(e,t,o)):(K&&r&&es(t),t.flags|=1,je(e,t,n,o),t.child)}function za(e,t,n,r,o){if(Ee(n)){var l=!0;jo(t)}else l=!1;if(kn(t,o),t.stateNode===null)lo(e,t),Od(t,n,r),ul(t,n,r,o),r=!0;else if(e===null){var s=t.stateNode,a=t.memoizedProps;s.props=a;var c=s.context,d=n.contextType;typeof d=="object"&&d!==null?d=De(d):(d=Ee(n)?Kt:ve.current,d=_n(t,d));var p=n.getDerivedStateFromProps,m=typeof p=="function"||typeof s.getSnapshotBeforeUpdate=="function";m||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||c!==d)&&Sa(t,s,r,d),xt=!1;var g=t.memoizedState;s.state=g,zo(t,r,s,o),c=t.memoizedState,a!==r||g!==c||_e.current||xt?(typeof p=="function"&&(dl(t,n,p,r),c=t.memoizedState),(a=xt||va(t,n,a,r,g,c,d))?(m||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),s.props=r,s.state=c,s.context=d,r=a):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,yd(e,t),a=t.memoizedProps,d=t.type===t.elementType?a:Ve(t.type,a),s.props=d,m=t.pendingProps,g=s.context,c=n.contextType,typeof c=="object"&&c!==null?c=De(c):(c=Ee(n)?Kt:ve.current,c=_n(t,c));var S=n.getDerivedStateFromProps;(p=typeof S=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==m||g!==c)&&Sa(t,s,r,c),xt=!1,g=t.memoizedState,s.state=g,zo(t,r,s,o);var h=t.memoizedState;a!==m||g!==h||_e.current||xt?(typeof S=="function"&&(dl(t,n,S,r),h=t.memoizedState),(d=xt||va(t,n,d,r,g,h,c)||!1)?(p||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,h,c),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,h,c)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),s.props=r,s.state=h,s.context=c,r=d):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),r=!1)}return hl(e,t,n,r,l,o)}function hl(e,t,n,r,o,l){Ud(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return o&&ua(t,n,!1),ft(e,t,l);r=t.stateNode,Ip.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Rn(t,e.child,null,l),t.child=Rn(t,null,a,l)):je(e,t,a,l),t.memoizedState=r.state,o&&ua(t,n,!0),t.child}function Hd(e){var t=e.stateNode;t.pendingContext?da(e,t.pendingContext,t.pendingContext!==t.context):t.context&&da(e,t.context,!1),as(e,t.containerInfo)}function _a(e,t,n,r,o){return En(),ns(o),t.flags|=256,je(e,t,n,r),t.child}var gl={dehydrated:null,treeContext:null,retryLane:0};function ml(e){return{baseLanes:e,cachePool:null,transitions:null}}function Vd(e,t,n){var r=t.pendingProps,o=J.current,l=!1,s=(t.flags&128)!==0,a;if((a=s)||(a=e!==null&&e.memoizedState===null?!1:(o&2)!==0),a?(l=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),U(J,o&1),e===null)return al(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,l?(r=t.mode,l=t.child,s={mode:"hidden",children:s},!(r&1)&&l!==null?(l.childLanes=0,l.pendingProps=s):l=Yo(s,r,0,null),e=Qt(e,r,n,null),l.return=t,e.return=t,l.sibling=e,t.child=l,t.child.memoizedState=ml(n),t.memoizedState=gl,e):ms(t,s));if(o=e.memoizedState,o!==null&&(a=o.dehydrated,a!==null))return Op(e,t,s,r,a,o,n);if(l){l=r.fallback,s=t.mode,o=e.child,a=o.sibling;var c={mode:"hidden",children:r.children};return!(s&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=Bt(o,c),r.subtreeFlags=o.subtreeFlags&14680064),a!==null?l=Bt(a,l):(l=Qt(l,s,n,null),l.flags|=2),l.return=t,r.return=t,r.sibling=l,t.child=r,r=l,l=t.child,s=e.child.memoizedState,s=s===null?ml(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},l.memoizedState=s,l.childLanes=e.childLanes&~n,t.memoizedState=gl,r}return l=e.child,e=l.sibling,r=Bt(l,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function ms(e,t){return t=Yo({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Qr(e,t,n,r){return r!==null&&ns(r),Rn(t,e.child,null,n),e=ms(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Op(e,t,n,r,o,l,s){if(n)return t.flags&256?(t.flags&=-257,r=bi(Error(C(422))),Qr(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(l=r.fallback,o=t.mode,r=Yo({mode:"visible",children:r.children},o,0,null),l=Qt(l,o,s,null),l.flags|=2,r.return=t,l.return=t,r.sibling=l,t.child=r,t.mode&1&&Rn(t,e.child,null,s),t.child.memoizedState=ml(s),t.memoizedState=gl,l);if(!(t.mode&1))return Qr(e,t,s,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var a=r.dgst;return r=a,l=Error(C(419)),r=bi(l,r,void 0),Qr(e,t,s,r)}if(a=(s&e.childLanes)!==0,ze||a){if(r=ue,r!==null){switch(s&-s){case 4:o=2;break;case 16:o=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:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(r.suspendedLanes|s)?0:o,o!==0&&o!==l.retryLane&&(l.retryLane=o,ut(e,o),Ye(r,e,o,-1))}return ws(),r=bi(Error(C(421))),Qr(e,t,s,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=Jp.bind(null,e),o._reactRetry=t,null):(e=l.treeContext,We=_t(o.nextSibling),Ae=t,K=!0,Qe=null,e!==null&&(Oe[Fe++]=lt,Oe[Fe++]=st,Oe[Fe++]=Yt,lt=e.id,st=e.overflow,Yt=t),t=ms(t,r.children),t.flags|=4096,t)}function Ea(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),cl(e.return,t,n)}function zi(e,t,n,r,o){var l=e.memoizedState;l===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(l.isBackwards=t,l.rendering=null,l.renderingStartTime=0,l.last=r,l.tail=n,l.tailMode=o)}function Gd(e,t,n){var r=t.pendingProps,o=r.revealOrder,l=r.tail;if(je(e,t,r.children,n),r=J.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ea(e,n,t);else if(e.tag===19)Ea(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(U(J,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&_o(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),zi(t,!1,o,n,l);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&_o(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}zi(t,!0,n,null,l);break;case"together":zi(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function lo(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ft(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Jt|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(C(153));if(t.child!==null){for(e=t.child,n=Bt(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Bt(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Fp(e,t,n){switch(t.tag){case 3:Hd(t),En();break;case 5:xd(t);break;case 1:Ee(t.type)&&jo(t);break;case 4:as(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;U(Co,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(U(J,J.current&1),t.flags|=128,null):n&t.child.childLanes?Vd(e,t,n):(U(J,J.current&1),e=ft(e,t,n),e!==null?e.sibling:null);U(J,J.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Gd(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),U(J,J.current),r)break;return null;case 22:case 23:return t.lanes=0,Dd(e,t,n)}return ft(e,t,n)}var Qd,yl,Kd,Yd;Qd=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}};yl=function(){};Kd=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Vt(rt.current);var l=null;switch(n){case"input":o=Fi(e,o),r=Fi(e,r),l=[];break;case"select":o=ee({},o,{value:void 0}),r=ee({},r,{value:void 0}),l=[];break;case"textarea":o=Di(e,o),r=Di(e,r),l=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=vo)}Hi(n,r);var s;n=null;for(d in o)if(!r.hasOwnProperty(d)&&o.hasOwnProperty(d)&&o[d]!=null)if(d==="style"){var a=o[d];for(s in a)a.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else d!=="dangerouslySetInnerHTML"&&d!=="children"&&d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&d!=="autoFocus"&&(ar.hasOwnProperty(d)?l||(l=[]):(l=l||[]).push(d,null));for(d in r){var c=r[d];if(a=o!=null?o[d]:void 0,r.hasOwnProperty(d)&&c!==a&&(c!=null||a!=null))if(d==="style")if(a){for(s in a)!a.hasOwnProperty(s)||c&&c.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in c)c.hasOwnProperty(s)&&a[s]!==c[s]&&(n||(n={}),n[s]=c[s])}else n||(l||(l=[]),l.push(d,n)),n=c;else d==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,a=a?a.__html:void 0,c!=null&&a!==c&&(l=l||[]).push(d,c)):d==="children"?typeof c!="string"&&typeof c!="number"||(l=l||[]).push(d,""+c):d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&(ar.hasOwnProperty(d)?(c!=null&&d==="onScroll"&&V("scroll",e),l||a===c||(l=[])):(l=l||[]).push(d,c))}n&&(l=l||[]).push("style",n);var d=l;(t.updateQueue=d)&&(t.flags|=4)}};Yd=function(e,t,n,r){n!==r&&(t.flags|=4)};function Qn(e,t){if(!K)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function me(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function $p(e,t,n){var r=t.pendingProps;switch(ts(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return me(t),null;case 1:return Ee(t.type)&&So(),me(t),null;case 3:return r=t.stateNode,Tn(),G(_e),G(ve),ds(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Vr(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Qe!==null&&(bl(Qe),Qe=null))),yl(e,t),me(t),null;case 5:cs(t);var o=Vt(Sr.current);if(n=t.type,e!==null&&t.stateNode!=null)Kd(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(C(166));return me(t),null}if(e=Vt(rt.current),Vr(t)){r=t.stateNode,n=t.type;var l=t.memoizedProps;switch(r[tt]=t,r[xr]=l,e=(t.mode&1)!==0,n){case"dialog":V("cancel",r),V("close",r);break;case"iframe":case"object":case"embed":V("load",r);break;case"video":case"audio":for(o=0;o<Xn.length;o++)V(Xn[o],r);break;case"source":V("error",r);break;case"img":case"image":case"link":V("error",r),V("load",r);break;case"details":V("toggle",r);break;case"input":Is(r,l),V("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!l.multiple},V("invalid",r);break;case"textarea":Fs(r,l),V("invalid",r)}Hi(n,l),o=null;for(var s in l)if(l.hasOwnProperty(s)){var a=l[s];s==="children"?typeof a=="string"?r.textContent!==a&&(l.suppressHydrationWarning!==!0&&Hr(r.textContent,a,e),o=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(l.suppressHydrationWarning!==!0&&Hr(r.textContent,a,e),o=["children",""+a]):ar.hasOwnProperty(s)&&a!=null&&s==="onScroll"&&V("scroll",r)}switch(n){case"input":Nr(r),Os(r,l,!0);break;case"textarea":Nr(r),$s(r);break;case"select":case"option":break;default:typeof l.onClick=="function"&&(r.onclick=vo)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=kc(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[tt]=t,e[xr]=r,Qd(e,t,!1,!1),t.stateNode=e;e:{switch(s=Vi(n,r),n){case"dialog":V("cancel",e),V("close",e),o=r;break;case"iframe":case"object":case"embed":V("load",e),o=r;break;case"video":case"audio":for(o=0;o<Xn.length;o++)V(Xn[o],e);o=r;break;case"source":V("error",e),o=r;break;case"img":case"image":case"link":V("error",e),V("load",e),o=r;break;case"details":V("toggle",e),o=r;break;case"input":Is(e,r),o=Fi(e,r),V("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=ee({},r,{value:void 0}),V("invalid",e);break;case"textarea":Fs(e,r),o=Di(e,r),V("invalid",e);break;default:o=r}Hi(n,o),a=o;for(l in a)if(a.hasOwnProperty(l)){var c=a[l];l==="style"?zc(e,c):l==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&Cc(e,c)):l==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&cr(e,c):typeof c=="number"&&cr(e,""+c):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(ar.hasOwnProperty(l)?c!=null&&l==="onScroll"&&V("scroll",e):c!=null&&$l(e,l,c,s))}switch(n){case"input":Nr(e),Os(e,r,!1);break;case"textarea":Nr(e),$s(e);break;case"option":r.value!=null&&e.setAttribute("value",""+At(r.value));break;case"select":e.multiple=!!r.multiple,l=r.value,l!=null?vn(e,!!r.multiple,l,!1):r.defaultValue!=null&&vn(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=vo)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return me(t),null;case 6:if(e&&t.stateNode!=null)Yd(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(C(166));if(n=Vt(Sr.current),Vt(rt.current),Vr(t)){if(r=t.stateNode,n=t.memoizedProps,r[tt]=t,(l=r.nodeValue!==n)&&(e=Ae,e!==null))switch(e.tag){case 3:Hr(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Hr(r.nodeValue,n,(e.mode&1)!==0)}l&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[tt]=t,t.stateNode=r}return me(t),null;case 13:if(G(J),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(K&&We!==null&&t.mode&1&&!(t.flags&128))pd(),En(),t.flags|=98560,l=!1;else if(l=Vr(t),r!==null&&r.dehydrated!==null){if(e===null){if(!l)throw Error(C(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(C(317));l[tt]=t}else En(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;me(t),l=!1}else Qe!==null&&(bl(Qe),Qe=null),l=!0;if(!l)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||J.current&1?ae===0&&(ae=3):ws())),t.updateQueue!==null&&(t.flags|=4),me(t),null);case 4:return Tn(),yl(e,t),e===null&&mr(t.stateNode.containerInfo),me(t),null;case 10:return is(t.type._context),me(t),null;case 17:return Ee(t.type)&&So(),me(t),null;case 19:if(G(J),l=t.memoizedState,l===null)return me(t),null;if(r=(t.flags&128)!==0,s=l.rendering,s===null)if(r)Qn(l,!1);else{if(ae!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=_o(e),s!==null){for(t.flags|=128,Qn(l,!1),r=s.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)l=n,e=r,l.flags&=14680066,s=l.alternate,s===null?(l.childLanes=0,l.lanes=e,l.child=null,l.subtreeFlags=0,l.memoizedProps=null,l.memoizedState=null,l.updateQueue=null,l.dependencies=null,l.stateNode=null):(l.childLanes=s.childLanes,l.lanes=s.lanes,l.child=s.child,l.subtreeFlags=0,l.deletions=null,l.memoizedProps=s.memoizedProps,l.memoizedState=s.memoizedState,l.updateQueue=s.updateQueue,l.type=s.type,e=s.dependencies,l.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return U(J,J.current&1|2),t.child}e=e.sibling}l.tail!==null&&re()>Pn&&(t.flags|=128,r=!0,Qn(l,!1),t.lanes=4194304)}else{if(!r)if(e=_o(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Qn(l,!0),l.tail===null&&l.tailMode==="hidden"&&!s.alternate&&!K)return me(t),null}else 2*re()-l.renderingStartTime>Pn&&n!==1073741824&&(t.flags|=128,r=!0,Qn(l,!1),t.lanes=4194304);l.isBackwards?(s.sibling=t.child,t.child=s):(n=l.last,n!==null?n.sibling=s:t.child=s,l.last=s)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=re(),t.sibling=null,n=J.current,U(J,r?n&1|2:n&1),t):(me(t),null);case 22:case 23:return js(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Pe&1073741824&&(me(t),t.subtreeFlags&6&&(t.flags|=8192)):me(t),null;case 24:return null;case 25:return null}throw Error(C(156,t.tag))}function Mp(e,t){switch(ts(t),t.tag){case 1:return Ee(t.type)&&So(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Tn(),G(_e),G(ve),ds(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return cs(t),null;case 13:if(G(J),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(C(340));En()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return G(J),null;case 4:return Tn(),null;case 10:return is(t.type._context),null;case 22:case 23:return js(),null;case 24:return null;default:return null}}var Kr=!1,ye=!1,Dp=typeof WeakSet=="function"?WeakSet:Set,E=null;function yn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){te(e,t,r)}else n.current=null}function xl(e,t,n){try{n()}catch(r){te(e,t,r)}}var Ra=!1;function Up(e,t){if(tl=mo,e=ed(),Zl(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,l=r.focusNode;r=r.focusOffset;try{n.nodeType,l.nodeType}catch{n=null;break e}var s=0,a=-1,c=-1,d=0,p=0,m=e,g=null;t:for(;;){for(var S;m!==n||o!==0&&m.nodeType!==3||(a=s+o),m!==l||r!==0&&m.nodeType!==3||(c=s+r),m.nodeType===3&&(s+=m.nodeValue.length),(S=m.firstChild)!==null;)g=m,m=S;for(;;){if(m===e)break t;if(g===n&&++d===o&&(a=s),g===l&&++p===r&&(c=s),(S=m.nextSibling)!==null)break;m=g,g=m.parentNode}m=S}n=a===-1||c===-1?null:{start:a,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(nl={focusedElem:e,selectionRange:n},mo=!1,E=t;E!==null;)if(t=E,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,E=e;else for(;E!==null;){t=E;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var v=h.memoizedProps,w=h.memoizedState,f=t.stateNode,u=f.getSnapshotBeforeUpdate(t.elementType===t.type?v:Ve(t.type,v),w);f.__reactInternalSnapshotBeforeUpdate=u}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(C(163))}}catch(j){te(t,t.return,j)}if(e=t.sibling,e!==null){e.return=t.return,E=e;break}E=t.return}return h=Ra,Ra=!1,h}function ir(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var l=o.destroy;o.destroy=void 0,l!==void 0&&xl(t,n,l)}o=o.next}while(o!==r)}}function Qo(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function vl(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 qd(e){var t=e.alternate;t!==null&&(e.alternate=null,qd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[tt],delete t[xr],delete t[il],delete t[bp],delete t[zp])),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 Jd(e){return e.tag===5||e.tag===3||e.tag===4}function Ta(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Jd(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 Sl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=vo));else if(r!==4&&(e=e.child,e!==null))for(Sl(e,t,n),e=e.sibling;e!==null;)Sl(e,t,n),e=e.sibling}function jl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(jl(e,t,n),e=e.sibling;e!==null;)jl(e,t,n),e=e.sibling}var fe=null,Ge=!1;function mt(e,t,n){for(n=n.child;n!==null;)Xd(e,t,n),n=n.sibling}function Xd(e,t,n){if(nt&&typeof nt.onCommitFiberUnmount=="function")try{nt.onCommitFiberUnmount(Fo,n)}catch{}switch(n.tag){case 5:ye||yn(n,t);case 6:var r=fe,o=Ge;fe=null,mt(e,t,n),fe=r,Ge=o,fe!==null&&(Ge?(e=fe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):fe.removeChild(n.stateNode));break;case 18:fe!==null&&(Ge?(e=fe,n=n.stateNode,e.nodeType===8?vi(e.parentNode,n):e.nodeType===1&&vi(e,n),pr(e)):vi(fe,n.stateNode));break;case 4:r=fe,o=Ge,fe=n.stateNode.containerInfo,Ge=!0,mt(e,t,n),fe=r,Ge=o;break;case 0:case 11:case 14:case 15:if(!ye&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var l=o,s=l.destroy;l=l.tag,s!==void 0&&(l&2||l&4)&&xl(n,t,s),o=o.next}while(o!==r)}mt(e,t,n);break;case 1:if(!ye&&(yn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){te(n,t,a)}mt(e,t,n);break;case 21:mt(e,t,n);break;case 22:n.mode&1?(ye=(r=ye)||n.memoizedState!==null,mt(e,t,n),ye=r):mt(e,t,n);break;default:mt(e,t,n)}}function Ba(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Dp),t.forEach(function(r){var o=Xp.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function He(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var l=e,s=t,a=s;e:for(;a!==null;){switch(a.tag){case 5:fe=a.stateNode,Ge=!1;break e;case 3:fe=a.stateNode.containerInfo,Ge=!0;break e;case 4:fe=a.stateNode.containerInfo,Ge=!0;break e}a=a.return}if(fe===null)throw Error(C(160));Xd(l,s,o),fe=null,Ge=!1;var c=o.alternate;c!==null&&(c.return=null),o.return=null}catch(d){te(o,t,d)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Zd(t,e),t=t.sibling}function Zd(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(He(t,e),Xe(e),r&4){try{ir(3,e,e.return),Qo(3,e)}catch(v){te(e,e.return,v)}try{ir(5,e,e.return)}catch(v){te(e,e.return,v)}}break;case 1:He(t,e),Xe(e),r&512&&n!==null&&yn(n,n.return);break;case 5:if(He(t,e),Xe(e),r&512&&n!==null&&yn(n,n.return),e.flags&32){var o=e.stateNode;try{cr(o,"")}catch(v){te(e,e.return,v)}}if(r&4&&(o=e.stateNode,o!=null)){var l=e.memoizedProps,s=n!==null?n.memoizedProps:l,a=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{a==="input"&&l.type==="radio"&&l.name!=null&&jc(o,l),Vi(a,s);var d=Vi(a,l);for(s=0;s<c.length;s+=2){var p=c[s],m=c[s+1];p==="style"?zc(o,m):p==="dangerouslySetInnerHTML"?Cc(o,m):p==="children"?cr(o,m):$l(o,p,m,d)}switch(a){case"input":$i(o,l);break;case"textarea":wc(o,l);break;case"select":var g=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!l.multiple;var S=l.value;S!=null?vn(o,!!l.multiple,S,!1):g!==!!l.multiple&&(l.defaultValue!=null?vn(o,!!l.multiple,l.defaultValue,!0):vn(o,!!l.multiple,l.multiple?[]:"",!1))}o[xr]=l}catch(v){te(e,e.return,v)}}break;case 6:if(He(t,e),Xe(e),r&4){if(e.stateNode===null)throw Error(C(162));o=e.stateNode,l=e.memoizedProps;try{o.nodeValue=l}catch(v){te(e,e.return,v)}}break;case 3:if(He(t,e),Xe(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{pr(t.containerInfo)}catch(v){te(e,e.return,v)}break;case 4:He(t,e),Xe(e);break;case 13:He(t,e),Xe(e),o=e.child,o.flags&8192&&(l=o.memoizedState!==null,o.stateNode.isHidden=l,!l||o.alternate!==null&&o.alternate.memoizedState!==null||(vs=re())),r&4&&Ba(e);break;case 22:if(p=n!==null&&n.memoizedState!==null,e.mode&1?(ye=(d=ye)||p,He(t,e),ye=d):He(t,e),Xe(e),r&8192){if(d=e.memoizedState!==null,(e.stateNode.isHidden=d)&&!p&&e.mode&1)for(E=e,p=e.child;p!==null;){for(m=E=p;E!==null;){switch(g=E,S=g.child,g.tag){case 0:case 11:case 14:case 15:ir(4,g,g.return);break;case 1:yn(g,g.return);var h=g.stateNode;if(typeof h.componentWillUnmount=="function"){r=g,n=g.return;try{t=r,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(v){te(r,n,v)}}break;case 5:yn(g,g.return);break;case 22:if(g.memoizedState!==null){Wa(m);continue}}S!==null?(S.return=g,E=S):Wa(m)}p=p.sibling}e:for(p=null,m=e;;){if(m.tag===5){if(p===null){p=m;try{o=m.stateNode,d?(l=o.style,typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none"):(a=m.stateNode,c=m.memoizedProps.style,s=c!=null&&c.hasOwnProperty("display")?c.display:null,a.style.display=bc("display",s))}catch(v){te(e,e.return,v)}}}else if(m.tag===6){if(p===null)try{m.stateNode.nodeValue=d?"":m.memoizedProps}catch(v){te(e,e.return,v)}}else if((m.tag!==22&&m.tag!==23||m.memoizedState===null||m===e)&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===e)break e;for(;m.sibling===null;){if(m.return===null||m.return===e)break e;p===m&&(p=null),m=m.return}p===m&&(p=null),m.sibling.return=m.return,m=m.sibling}}break;case 19:He(t,e),Xe(e),r&4&&Ba(e);break;case 21:break;default:He(t,e),Xe(e)}}function Xe(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Jd(n)){var r=n;break e}n=n.return}throw Error(C(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(cr(o,""),r.flags&=-33);var l=Ta(e);jl(e,l,o);break;case 3:case 4:var s=r.stateNode.containerInfo,a=Ta(e);Sl(e,a,s);break;default:throw Error(C(161))}}catch(c){te(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Hp(e,t,n){E=e,eu(e)}function eu(e,t,n){for(var r=(e.mode&1)!==0;E!==null;){var o=E,l=o.child;if(o.tag===22&&r){var s=o.memoizedState!==null||Kr;if(!s){var a=o.alternate,c=a!==null&&a.memoizedState!==null||ye;a=Kr;var d=ye;if(Kr=s,(ye=c)&&!d)for(E=o;E!==null;)s=E,c=s.child,s.tag===22&&s.memoizedState!==null?Aa(o):c!==null?(c.return=s,E=c):Aa(o);for(;l!==null;)E=l,eu(l),l=l.sibling;E=o,Kr=a,ye=d}Pa(e)}else o.subtreeFlags&8772&&l!==null?(l.return=o,E=l):Pa(e)}}function Pa(e){for(;E!==null;){var t=E;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:ye||Qo(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!ye)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:Ve(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var l=t.updateQueue;l!==null&&ma(t,l,r);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}ma(t,s,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var d=t.alternate;if(d!==null){var p=d.memoizedState;if(p!==null){var m=p.dehydrated;m!==null&&pr(m)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(C(163))}ye||t.flags&512&&vl(t)}catch(g){te(t,t.return,g)}}if(t===e){E=null;break}if(n=t.sibling,n!==null){n.return=t.return,E=n;break}E=t.return}}function Wa(e){for(;E!==null;){var t=E;if(t===e){E=null;break}var n=t.sibling;if(n!==null){n.return=t.return,E=n;break}E=t.return}}function Aa(e){for(;E!==null;){var t=E;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Qo(4,t)}catch(c){te(t,n,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(c){te(t,o,c)}}var l=t.return;try{vl(t)}catch(c){te(t,l,c)}break;case 5:var s=t.return;try{vl(t)}catch(c){te(t,s,c)}}}catch(c){te(t,t.return,c)}if(t===e){E=null;break}var a=t.sibling;if(a!==null){a.return=t.return,E=a;break}E=t.return}}var Vp=Math.ceil,To=pt.ReactCurrentDispatcher,ys=pt.ReactCurrentOwner,Me=pt.ReactCurrentBatchConfig,I=0,ue=null,ie=null,pe=0,Pe=0,xn=It(0),ae=0,Cr=null,Jt=0,Ko=0,xs=0,lr=null,be=null,vs=0,Pn=1/0,ot=null,Bo=!1,wl=null,Rt=null,Yr=!1,wt=null,Po=0,sr=0,kl=null,so=-1,ao=0;function we(){return I&6?re():so!==-1?so:so=re()}function Tt(e){return e.mode&1?I&2&&pe!==0?pe&-pe:Ep.transition!==null?(ao===0&&(ao=Oc()),ao):(e=$,e!==0||(e=window.event,e=e===void 0?16:Vc(e.type)),e):1}function Ye(e,t,n,r){if(50<sr)throw sr=0,kl=null,Error(C(185));Rr(e,n,r),(!(I&2)||e!==ue)&&(e===ue&&(!(I&2)&&(Ko|=n),ae===4&&St(e,pe)),Re(e,r),n===1&&I===0&&!(t.mode&1)&&(Pn=re()+500,Ho&&Ot()))}function Re(e,t){var n=e.callbackNode;Ef(e,t);var r=go(e,e===ue?pe:0);if(r===0)n!==null&&Us(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Us(n),t===1)e.tag===0?_p(La.bind(null,e)):dd(La.bind(null,e)),kp(function(){!(I&6)&&Ot()}),n=null;else{switch(Fc(r)){case 1:n=Vl;break;case 4:n=Nc;break;case 16:n=ho;break;case 536870912:n=Ic;break;default:n=ho}n=au(n,tu.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function tu(e,t){if(so=-1,ao=0,I&6)throw Error(C(327));var n=e.callbackNode;if(Cn()&&e.callbackNode!==n)return null;var r=go(e,e===ue?pe:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Wo(e,r);else{t=r;var o=I;I|=2;var l=ru();(ue!==e||pe!==t)&&(ot=null,Pn=re()+500,Gt(e,t));do try{Kp();break}catch(a){nu(e,a)}while(!0);os(),To.current=l,I=o,ie!==null?t=0:(ue=null,pe=0,t=ae)}if(t!==0){if(t===2&&(o=qi(e),o!==0&&(r=o,t=Cl(e,o))),t===1)throw n=Cr,Gt(e,0),St(e,r),Re(e,re()),n;if(t===6)St(e,r);else{if(o=e.current.alternate,!(r&30)&&!Gp(o)&&(t=Wo(e,r),t===2&&(l=qi(e),l!==0&&(r=l,t=Cl(e,l))),t===1))throw n=Cr,Gt(e,0),St(e,r),Re(e,re()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(C(345));case 2:Dt(e,be,ot);break;case 3:if(St(e,r),(r&130023424)===r&&(t=vs+500-re(),10<t)){if(go(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){we(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=ol(Dt.bind(null,e,be,ot),t);break}Dt(e,be,ot);break;case 4:if(St(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var s=31-Ke(r);l=1<<s,s=t[s],s>o&&(o=s),r&=~l}if(r=o,r=re()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Vp(r/1960))-r,10<r){e.timeoutHandle=ol(Dt.bind(null,e,be,ot),r);break}Dt(e,be,ot);break;case 5:Dt(e,be,ot);break;default:throw Error(C(329))}}}return Re(e,re()),e.callbackNode===n?tu.bind(null,e):null}function Cl(e,t){var n=lr;return e.current.memoizedState.isDehydrated&&(Gt(e,t).flags|=256),e=Wo(e,t),e!==2&&(t=be,be=n,t!==null&&bl(t)),e}function bl(e){be===null?be=e:be.push.apply(be,e)}function Gp(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],l=o.getSnapshot;o=o.value;try{if(!qe(l(),o))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 St(e,t){for(t&=~xs,t&=~Ko,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ke(t),r=1<<n;e[n]=-1,t&=~r}}function La(e){if(I&6)throw Error(C(327));Cn();var t=go(e,0);if(!(t&1))return Re(e,re()),null;var n=Wo(e,t);if(e.tag!==0&&n===2){var r=qi(e);r!==0&&(t=r,n=Cl(e,r))}if(n===1)throw n=Cr,Gt(e,0),St(e,t),Re(e,re()),n;if(n===6)throw Error(C(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Dt(e,be,ot),Re(e,re()),null}function Ss(e,t){var n=I;I|=1;try{return e(t)}finally{I=n,I===0&&(Pn=re()+500,Ho&&Ot())}}function Xt(e){wt!==null&&wt.tag===0&&!(I&6)&&Cn();var t=I;I|=1;var n=Me.transition,r=$;try{if(Me.transition=null,$=1,e)return e()}finally{$=r,Me.transition=n,I=t,!(I&6)&&Ot()}}function js(){Pe=xn.current,G(xn)}function Gt(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,wp(n)),ie!==null)for(n=ie.return;n!==null;){var r=n;switch(ts(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&So();break;case 3:Tn(),G(_e),G(ve),ds();break;case 5:cs(r);break;case 4:Tn();break;case 13:G(J);break;case 19:G(J);break;case 10:is(r.type._context);break;case 22:case 23:js()}n=n.return}if(ue=e,ie=e=Bt(e.current,null),pe=Pe=t,ae=0,Cr=null,xs=Ko=Jt=0,be=lr=null,Ht!==null){for(t=0;t<Ht.length;t++)if(n=Ht[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,l=n.pending;if(l!==null){var s=l.next;l.next=o,r.next=s}n.pending=r}Ht=null}return e}function nu(e,t){do{var n=ie;try{if(os(),oo.current=Ro,Eo){for(var r=X.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Eo=!1}if(qt=0,de=se=X=null,or=!1,jr=0,ys.current=null,n===null||n.return===null){ae=1,Cr=t,ie=null;break}e:{var l=e,s=n.return,a=n,c=t;if(t=pe,a.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var d=c,p=a,m=p.tag;if(!(p.mode&1)&&(m===0||m===11||m===15)){var g=p.alternate;g?(p.updateQueue=g.updateQueue,p.memoizedState=g.memoizedState,p.lanes=g.lanes):(p.updateQueue=null,p.memoizedState=null)}var S=wa(s);if(S!==null){S.flags&=-257,ka(S,s,a,l,t),S.mode&1&&ja(l,d,t),t=S,c=d;var h=t.updateQueue;if(h===null){var v=new Set;v.add(c),t.updateQueue=v}else h.add(c);break e}else{if(!(t&1)){ja(l,d,t),ws();break e}c=Error(C(426))}}else if(K&&a.mode&1){var w=wa(s);if(w!==null){!(w.flags&65536)&&(w.flags|=256),ka(w,s,a,l,t),ns(Bn(c,a));break e}}l=c=Bn(c,a),ae!==4&&(ae=2),lr===null?lr=[l]:lr.push(l),l=s;do{switch(l.tag){case 3:l.flags|=65536,t&=-t,l.lanes|=t;var f=Fd(l,c,t);ga(l,f);break e;case 1:a=c;var u=l.type,y=l.stateNode;if(!(l.flags&128)&&(typeof u.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(Rt===null||!Rt.has(y)))){l.flags|=65536,t&=-t,l.lanes|=t;var j=$d(l,a,t);ga(l,j);break e}}l=l.return}while(l!==null)}iu(n)}catch(k){t=k,ie===n&&n!==null&&(ie=n=n.return);continue}break}while(!0)}function ru(){var e=To.current;return To.current=Ro,e===null?Ro:e}function ws(){(ae===0||ae===3||ae===2)&&(ae=4),ue===null||!(Jt&268435455)&&!(Ko&268435455)||St(ue,pe)}function Wo(e,t){var n=I;I|=2;var r=ru();(ue!==e||pe!==t)&&(ot=null,Gt(e,t));do try{Qp();break}catch(o){nu(e,o)}while(!0);if(os(),I=n,To.current=r,ie!==null)throw Error(C(261));return ue=null,pe=0,ae}function Qp(){for(;ie!==null;)ou(ie)}function Kp(){for(;ie!==null&&!vf();)ou(ie)}function ou(e){var t=su(e.alternate,e,Pe);e.memoizedProps=e.pendingProps,t===null?iu(e):ie=t,ys.current=null}function iu(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Mp(n,t),n!==null){n.flags&=32767,ie=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ae=6,ie=null;return}}else if(n=$p(n,t,Pe),n!==null){ie=n;return}if(t=t.sibling,t!==null){ie=t;return}ie=t=e}while(t!==null);ae===0&&(ae=5)}function Dt(e,t,n){var r=$,o=Me.transition;try{Me.transition=null,$=1,Yp(e,t,n,r)}finally{Me.transition=o,$=r}return null}function Yp(e,t,n,r){do Cn();while(wt!==null);if(I&6)throw Error(C(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(C(177));e.callbackNode=null,e.callbackPriority=0;var l=n.lanes|n.childLanes;if(Rf(e,l),e===ue&&(ie=ue=null,pe=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Yr||(Yr=!0,au(ho,function(){return Cn(),null})),l=(n.flags&15990)!==0,n.subtreeFlags&15990||l){l=Me.transition,Me.transition=null;var s=$;$=1;var a=I;I|=4,ys.current=null,Up(e,n),Zd(n,e),gp(nl),mo=!!tl,nl=tl=null,e.current=n,Hp(n),Sf(),I=a,$=s,Me.transition=l}else e.current=n;if(Yr&&(Yr=!1,wt=e,Po=o),l=e.pendingLanes,l===0&&(Rt=null),kf(n.stateNode),Re(e,re()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(Bo)throw Bo=!1,e=wl,wl=null,e;return Po&1&&e.tag!==0&&Cn(),l=e.pendingLanes,l&1?e===kl?sr++:(sr=0,kl=e):sr=0,Ot(),null}function Cn(){if(wt!==null){var e=Fc(Po),t=Me.transition,n=$;try{if(Me.transition=null,$=16>e?16:e,wt===null)var r=!1;else{if(e=wt,wt=null,Po=0,I&6)throw Error(C(331));var o=I;for(I|=4,E=e.current;E!==null;){var l=E,s=l.child;if(E.flags&16){var a=l.deletions;if(a!==null){for(var c=0;c<a.length;c++){var d=a[c];for(E=d;E!==null;){var p=E;switch(p.tag){case 0:case 11:case 15:ir(8,p,l)}var m=p.child;if(m!==null)m.return=p,E=m;else for(;E!==null;){p=E;var g=p.sibling,S=p.return;if(qd(p),p===d){E=null;break}if(g!==null){g.return=S,E=g;break}E=S}}}var h=l.alternate;if(h!==null){var v=h.child;if(v!==null){h.child=null;do{var w=v.sibling;v.sibling=null,v=w}while(v!==null)}}E=l}}if(l.subtreeFlags&2064&&s!==null)s.return=l,E=s;else e:for(;E!==null;){if(l=E,l.flags&2048)switch(l.tag){case 0:case 11:case 15:ir(9,l,l.return)}var f=l.sibling;if(f!==null){f.return=l.return,E=f;break e}E=l.return}}var u=e.current;for(E=u;E!==null;){s=E;var y=s.child;if(s.subtreeFlags&2064&&y!==null)y.return=s,E=y;else e:for(s=u;E!==null;){if(a=E,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Qo(9,a)}}catch(k){te(a,a.return,k)}if(a===s){E=null;break e}var j=a.sibling;if(j!==null){j.return=a.return,E=j;break e}E=a.return}}if(I=o,Ot(),nt&&typeof nt.onPostCommitFiberRoot=="function")try{nt.onPostCommitFiberRoot(Fo,e)}catch{}r=!0}return r}finally{$=n,Me.transition=t}}return!1}function Na(e,t,n){t=Bn(n,t),t=Fd(e,t,1),e=Et(e,t,1),t=we(),e!==null&&(Rr(e,1,t),Re(e,t))}function te(e,t,n){if(e.tag===3)Na(e,e,n);else for(;t!==null;){if(t.tag===3){Na(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Rt===null||!Rt.has(r))){e=Bn(n,e),e=$d(t,e,1),t=Et(t,e,1),e=we(),t!==null&&(Rr(t,1,e),Re(t,e));break}}t=t.return}}function qp(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=we(),e.pingedLanes|=e.suspendedLanes&n,ue===e&&(pe&n)===n&&(ae===4||ae===3&&(pe&130023424)===pe&&500>re()-vs?Gt(e,0):xs|=n),Re(e,t)}function lu(e,t){t===0&&(e.mode&1?(t=Fr,Fr<<=1,!(Fr&130023424)&&(Fr=4194304)):t=1);var n=we();e=ut(e,t),e!==null&&(Rr(e,t,n),Re(e,n))}function Jp(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),lu(e,n)}function Xp(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(C(314))}r!==null&&r.delete(t),lu(e,n)}var su;su=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||_e.current)ze=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ze=!1,Fp(e,t,n);ze=!!(e.flags&131072)}else ze=!1,K&&t.flags&1048576&&ud(t,ko,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;lo(e,t),e=t.pendingProps;var o=_n(t,ve.current);kn(t,n),o=fs(null,t,r,e,o,n);var l=ps();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ee(r)?(l=!0,jo(t)):l=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,ss(t),o.updater=Go,t.stateNode=o,o._reactInternals=t,ul(t,r,e,n),t=hl(null,t,r,!0,l,n)):(t.tag=0,K&&l&&es(t),je(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(lo(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=eh(r),e=Ve(r,e),o){case 0:t=pl(null,t,r,e,n);break e;case 1:t=za(null,t,r,e,n);break e;case 11:t=Ca(null,t,r,e,n);break e;case 14:t=ba(null,t,r,Ve(r.type,e),n);break e}throw Error(C(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ve(r,o),pl(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ve(r,o),za(e,t,r,o,n);case 3:e:{if(Hd(t),e===null)throw Error(C(387));r=t.pendingProps,l=t.memoizedState,o=l.element,yd(e,t),zo(t,r,null,n);var s=t.memoizedState;if(r=s.element,l.isDehydrated)if(l={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=l,t.memoizedState=l,t.flags&256){o=Bn(Error(C(423)),t),t=_a(e,t,r,n,o);break e}else if(r!==o){o=Bn(Error(C(424)),t),t=_a(e,t,r,n,o);break e}else for(We=_t(t.stateNode.containerInfo.firstChild),Ae=t,K=!0,Qe=null,n=gd(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(En(),r===o){t=ft(e,t,n);break e}je(e,t,r,n)}t=t.child}return t;case 5:return xd(t),e===null&&al(t),r=t.type,o=t.pendingProps,l=e!==null?e.memoizedProps:null,s=o.children,rl(r,o)?s=null:l!==null&&rl(r,l)&&(t.flags|=32),Ud(e,t),je(e,t,s,n),t.child;case 6:return e===null&&al(t),null;case 13:return Vd(e,t,n);case 4:return as(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Rn(t,null,r,n):je(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ve(r,o),Ca(e,t,r,o,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(r=t.type._context,o=t.pendingProps,l=t.memoizedProps,s=o.value,U(Co,r._currentValue),r._currentValue=s,l!==null)if(qe(l.value,s)){if(l.children===o.children&&!_e.current){t=ft(e,t,n);break e}}else for(l=t.child,l!==null&&(l.return=t);l!==null;){var a=l.dependencies;if(a!==null){s=l.child;for(var c=a.firstContext;c!==null;){if(c.context===r){if(l.tag===1){c=at(-1,n&-n),c.tag=2;var d=l.updateQueue;if(d!==null){d=d.shared;var p=d.pending;p===null?c.next=c:(c.next=p.next,p.next=c),d.pending=c}}l.lanes|=n,c=l.alternate,c!==null&&(c.lanes|=n),cl(l.return,n,t),a.lanes|=n;break}c=c.next}}else if(l.tag===10)s=l.type===t.type?null:l.child;else if(l.tag===18){if(s=l.return,s===null)throw Error(C(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),cl(s,n,t),s=l.sibling}else s=l.child;if(s!==null)s.return=l;else for(s=l;s!==null;){if(s===t){s=null;break}if(l=s.sibling,l!==null){l.return=s.return,s=l;break}s=s.return}l=s}je(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,kn(t,n),o=De(o),r=r(o),t.flags|=1,je(e,t,r,n),t.child;case 14:return r=t.type,o=Ve(r,t.pendingProps),o=Ve(r.type,o),ba(e,t,r,o,n);case 15:return Md(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ve(r,o),lo(e,t),t.tag=1,Ee(r)?(e=!0,jo(t)):e=!1,kn(t,n),Od(t,r,o),ul(t,r,o,n),hl(null,t,r,!0,e,n);case 19:return Gd(e,t,n);case 22:return Dd(e,t,n)}throw Error(C(156,t.tag))};function au(e,t){return Lc(e,t)}function Zp(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $e(e,t,n,r){return new Zp(e,t,n,r)}function ks(e){return e=e.prototype,!(!e||!e.isReactComponent)}function eh(e){if(typeof e=="function")return ks(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Dl)return 11;if(e===Ul)return 14}return 2}function Bt(e,t){var n=e.alternate;return n===null?(n=$e(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 co(e,t,n,r,o,l){var s=2;if(r=e,typeof e=="function")ks(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case an:return Qt(n.children,o,l,t);case Ml:s=8,o|=8;break;case Li:return e=$e(12,n,t,o|2),e.elementType=Li,e.lanes=l,e;case Ni:return e=$e(13,n,t,o),e.elementType=Ni,e.lanes=l,e;case Ii:return e=$e(19,n,t,o),e.elementType=Ii,e.lanes=l,e;case xc:return Yo(n,o,l,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case mc:s=10;break e;case yc:s=9;break e;case Dl:s=11;break e;case Ul:s=14;break e;case yt:s=16,r=null;break e}throw Error(C(130,e==null?e:typeof e,""))}return t=$e(s,n,t,o),t.elementType=e,t.type=r,t.lanes=l,t}function Qt(e,t,n,r){return e=$e(7,e,r,t),e.lanes=n,e}function Yo(e,t,n,r){return e=$e(22,e,r,t),e.elementType=xc,e.lanes=n,e.stateNode={isHidden:!1},e}function _i(e,t,n){return e=$e(6,e,null,t),e.lanes=n,e}function Ei(e,t,n){return t=$e(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function th(e,t,n,r,o){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=ai(0),this.expirationTimes=ai(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ai(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Cs(e,t,n,r,o,l,s,a,c){return e=new th(e,t,n,a,c),t===1?(t=1,l===!0&&(t|=8)):t=0,l=$e(3,null,null,t),e.current=l,l.stateNode=e,l.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ss(l),e}function nh(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:sn,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function cu(e){if(!e)return Lt;e=e._reactInternals;e:{if(nn(e)!==e||e.tag!==1)throw Error(C(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ee(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(C(171))}if(e.tag===1){var n=e.type;if(Ee(n))return cd(e,n,t)}return t}function du(e,t,n,r,o,l,s,a,c){return e=Cs(n,r,!0,e,o,l,s,a,c),e.context=cu(null),n=e.current,r=we(),o=Tt(n),l=at(r,o),l.callback=t??null,Et(n,l,o),e.current.lanes=o,Rr(e,o,r),Re(e,r),e}function qo(e,t,n,r){var o=t.current,l=we(),s=Tt(o);return n=cu(n),t.context===null?t.context=n:t.pendingContext=n,t=at(l,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Et(o,t,s),e!==null&&(Ye(e,o,s,l),ro(e,o,s)),s}function Ao(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 Ia(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function bs(e,t){Ia(e,t),(e=e.alternate)&&Ia(e,t)}function rh(){return null}var uu=typeof reportError=="function"?reportError:function(e){console.error(e)};function zs(e){this._internalRoot=e}Jo.prototype.render=zs.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(C(409));qo(e,t,null,null)};Jo.prototype.unmount=zs.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Xt(function(){qo(null,e,null,null)}),t[dt]=null}};function Jo(e){this._internalRoot=e}Jo.prototype.unstable_scheduleHydration=function(e){if(e){var t=Dc();e={blockedOn:null,target:e,priority:t};for(var n=0;n<vt.length&&t!==0&&t<vt[n].priority;n++);vt.splice(n,0,e),n===0&&Hc(e)}};function _s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Xo(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Oa(){}function oh(e,t,n,r,o){if(o){if(typeof r=="function"){var l=r;r=function(){var d=Ao(s);l.call(d)}}var s=du(t,r,e,0,null,!1,!1,"",Oa);return e._reactRootContainer=s,e[dt]=s.current,mr(e.nodeType===8?e.parentNode:e),Xt(),s}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var a=r;r=function(){var d=Ao(c);a.call(d)}}var c=Cs(e,0,!1,null,null,!1,!1,"",Oa);return e._reactRootContainer=c,e[dt]=c.current,mr(e.nodeType===8?e.parentNode:e),Xt(function(){qo(t,c,n,r)}),c}function Zo(e,t,n,r,o){var l=n._reactRootContainer;if(l){var s=l;if(typeof o=="function"){var a=o;o=function(){var c=Ao(s);a.call(c)}}qo(t,s,e,o)}else s=oh(n,t,e,o,r);return Ao(s)}$c=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Jn(t.pendingLanes);n!==0&&(Gl(t,n|1),Re(t,re()),!(I&6)&&(Pn=re()+500,Ot()))}break;case 13:Xt(function(){var r=ut(e,1);if(r!==null){var o=we();Ye(r,e,1,o)}}),bs(e,1)}};Ql=function(e){if(e.tag===13){var t=ut(e,134217728);if(t!==null){var n=we();Ye(t,e,134217728,n)}bs(e,134217728)}};Mc=function(e){if(e.tag===13){var t=Tt(e),n=ut(e,t);if(n!==null){var r=we();Ye(n,e,t,r)}bs(e,t)}};Dc=function(){return $};Uc=function(e,t){var n=$;try{return $=e,t()}finally{$=n}};Qi=function(e,t,n){switch(t){case"input":if($i(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=Uo(r);if(!o)throw Error(C(90));Sc(r),$i(r,o)}}}break;case"textarea":wc(e,n);break;case"select":t=n.value,t!=null&&vn(e,!!n.multiple,t,!1)}};Rc=Ss;Tc=Xt;var ih={usingClientEntryPoint:!1,Events:[Br,fn,Uo,_c,Ec,Ss]},Kn={findFiberByHostInstance:Ut,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},lh={bundleType:Kn.bundleType,version:Kn.version,rendererPackageName:Kn.rendererPackageName,rendererConfig:Kn.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:pt.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Wc(e),e===null?null:e.stateNode},findFiberByHostInstance:Kn.findFiberByHostInstance||rh,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 qr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!qr.isDisabled&&qr.supportsFiber)try{Fo=qr.inject(lh),nt=qr}catch{}}Ne.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ih;Ne.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!_s(t))throw Error(C(200));return nh(e,t,null,n)};Ne.createRoot=function(e,t){if(!_s(e))throw Error(C(299));var n=!1,r="",o=uu;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Cs(e,1,!1,null,null,n,!1,r,o),e[dt]=t.current,mr(e.nodeType===8?e.parentNode:e),new zs(t)};Ne.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(C(188)):(e=Object.keys(e).join(","),Error(C(268,e)));return e=Wc(t),e=e===null?null:e.stateNode,e};Ne.flushSync=function(e){return Xt(e)};Ne.hydrate=function(e,t,n){if(!Xo(t))throw Error(C(200));return Zo(null,e,t,!0,n)};Ne.hydrateRoot=function(e,t,n){if(!_s(e))throw Error(C(405));var r=n!=null&&n.hydratedSources||null,o=!1,l="",s=uu;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=du(t,null,e,1,n??null,o,!1,l,s),e[dt]=t.current,mr(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new Jo(t)};Ne.render=function(e,t,n){if(!Xo(t))throw Error(C(200));return Zo(null,e,t,!1,n)};Ne.unmountComponentAtNode=function(e){if(!Xo(e))throw Error(C(40));return e._reactRootContainer?(Xt(function(){Zo(null,null,e,!1,function(){e._reactRootContainer=null,e[dt]=null})}),!0):!1};Ne.unstable_batchedUpdates=Ss;Ne.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Xo(n))throw Error(C(200));if(e==null||e._reactInternals===void 0)throw Error(C(38));return Zo(e,t,n,!1,r)};Ne.version="18.3.1-next-f1338f8080-20240426";function fu(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(fu)}catch(e){console.error(e)}}fu(),fc.exports=Ne;var sh=fc.exports,Fa=sh;Wi.createRoot=Fa.createRoot,Wi.hydrateRoot=Fa.hydrateRoot;/**
|
|
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 br(){return br=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},br.apply(this,arguments)}var kt;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(kt||(kt={}));const $a="popstate";function ah(e){e===void 0&&(e={});function t(r,o){let{pathname:l,search:s,hash:a}=r.location;return zl("",{pathname:l,search:s,hash:a},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(r,o){return typeof o=="string"?o:Lo(o)}return dh(t,n,null,e)}function Z(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Es(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function ch(){return Math.random().toString(36).substr(2,8)}function Ma(e,t){return{usr:e.state,key:e.key,idx:t}}function zl(e,t,n,r){return n===void 0&&(n=null),br({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?In(t):t,{state:n,key:t&&t.key||r||ch()})}function Lo(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function In(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function dh(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:l=!1}=r,s=o.history,a=kt.Pop,c=null,d=p();d==null&&(d=0,s.replaceState(br({},s.state,{idx:d}),""));function p(){return(s.state||{idx:null}).idx}function m(){a=kt.Pop;let w=p(),f=w==null?null:w-d;d=w,c&&c({action:a,location:v.location,delta:f})}function g(w,f){a=kt.Push;let u=zl(v.location,w,f);d=p()+1;let y=Ma(u,d),j=v.createHref(u);try{s.pushState(y,"",j)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;o.location.assign(j)}l&&c&&c({action:a,location:v.location,delta:1})}function S(w,f){a=kt.Replace;let u=zl(v.location,w,f);d=p();let y=Ma(u,d),j=v.createHref(u);s.replaceState(y,"",j),l&&c&&c({action:a,location:v.location,delta:0})}function h(w){let f=o.location.origin!=="null"?o.location.origin:o.location.href,u=typeof w=="string"?w:Lo(w);return u=u.replace(/ $/,"%20"),Z(f,"No window.location.(origin|href) available to create URL for href: "+u),new URL(u,f)}let v={get action(){return a},get location(){return e(o,s)},listen(w){if(c)throw new Error("A history only accepts one active listener");return o.addEventListener($a,m),c=w,()=>{o.removeEventListener($a,m),c=null}},createHref(w){return t(o,w)},createURL:h,encodeLocation(w){let f=h(w);return{pathname:f.pathname,search:f.search,hash:f.hash}},push:g,replace:S,go(w){return s.go(w)}};return v}var Da;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Da||(Da={}));function uh(e,t,n){return n===void 0&&(n="/"),fh(e,t,n)}function fh(e,t,n,r){let o=typeof t=="string"?In(t):t,l=Wn(o.pathname||"/",n);if(l==null)return null;let s=pu(e);ph(s);let a=null;for(let c=0;a==null&&c<s.length;++c){let d=Ch(l);a=wh(s[c],d)}return a}function pu(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let o=(l,s,a)=>{let c={relativePath:a===void 0?l.path||"":a,caseSensitive:l.caseSensitive===!0,childrenIndex:s,route:l};c.relativePath.startsWith("/")&&(Z(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let d=Pt([r,c.relativePath]),p=n.concat(c);l.children&&l.children.length>0&&(Z(l.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+d+'".')),pu(l.children,t,p,d)),!(l.path==null&&!l.index)&&t.push({path:d,score:Sh(d,l.index),routesMeta:p})};return e.forEach((l,s)=>{var a;if(l.path===""||!((a=l.path)!=null&&a.includes("?")))o(l,s);else for(let c of hu(l.path))o(l,s,c)}),t}function hu(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),l=n.replace(/\?$/,"");if(r.length===0)return o?[l,""]:[l];let s=hu(r.join("/")),a=[];return a.push(...s.map(c=>c===""?l:[l,c].join("/"))),o&&a.push(...s),a.map(c=>e.startsWith("/")&&c===""?"/":c)}function ph(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:jh(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const hh=/^:[\w-]+$/,gh=3,mh=2,yh=1,xh=10,vh=-2,Ua=e=>e==="*";function Sh(e,t){let n=e.split("/"),r=n.length;return n.some(Ua)&&(r+=vh),t&&(r+=mh),n.filter(o=>!Ua(o)).reduce((o,l)=>o+(hh.test(l)?gh:l===""?yh:xh),r)}function jh(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function wh(e,t,n){let{routesMeta:r}=e,o={},l="/",s=[];for(let a=0;a<r.length;++a){let c=r[a],d=a===r.length-1,p=l==="/"?t:t.slice(l.length)||"/",m=_l({path:c.relativePath,caseSensitive:c.caseSensitive,end:d},p),g=c.route;if(!m)return null;Object.assign(o,m.params),s.push({params:o,pathname:Pt([l,m.pathname]),pathnameBase:Rh(Pt([l,m.pathnameBase])),route:g}),m.pathnameBase!=="/"&&(l=Pt([l,m.pathnameBase]))}return s}function _l(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=kh(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let l=o[0],s=l.replace(/(.)\/+$/,"$1"),a=o.slice(1);return{params:r.reduce((d,p,m)=>{let{paramName:g,isOptional:S}=p;if(g==="*"){let v=a[m]||"";s=l.slice(0,l.length-v.length).replace(/(.)\/+$/,"$1")}const h=a[m];return S&&!h?d[g]=void 0:d[g]=(h||"").replace(/%2F/g,"/"),d},{}),pathname:l,pathnameBase:s,pattern:e}}function kh(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Es(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,a,c)=>(r.push({paramName:a,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function Ch(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Es(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Wn(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const bh=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,zh=e=>bh.test(e);function _h(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?In(e):e,l;if(n)if(zh(n))l=n;else{if(n.includes("//")){let s=n;n=n.replace(/\/\/+/g,"/"),Es(!1,"Pathnames cannot have embedded double slashes - normalizing "+(s+" -> "+n))}n.startsWith("/")?l=Ha(n.substring(1),"/"):l=Ha(n,t)}else l=t;return{pathname:l,search:Th(r),hash:Bh(o)}}function Ha(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function Ri(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Eh(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Rs(e,t){let n=Eh(e);return t?n.map((r,o)=>o===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Ts(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=In(e):(o=br({},e),Z(!o.pathname||!o.pathname.includes("?"),Ri("?","pathname","search",o)),Z(!o.pathname||!o.pathname.includes("#"),Ri("#","pathname","hash",o)),Z(!o.search||!o.search.includes("#"),Ri("#","search","hash",o)));let l=e===""||o.pathname==="",s=l?"/":o.pathname,a;if(s==null)a=n;else{let m=t.length-1;if(!r&&s.startsWith("..")){let g=s.split("/");for(;g[0]==="..";)g.shift(),m-=1;o.pathname=g.join("/")}a=m>=0?t[m]:"/"}let c=_h(o,a),d=s&&s!=="/"&&s.endsWith("/"),p=(l||s===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(d||p)&&(c.pathname+="/"),c}const Pt=e=>e.join("/").replace(/\/\/+/g,"/"),Rh=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Th=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Bh=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Ph(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const gu=["post","put","patch","delete"];new Set(gu);const Wh=["get",...gu];new Set(Wh);/**
|
|
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 zr(){return zr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zr.apply(this,arguments)}const ei=x.createContext(null),mu=x.createContext(null),ht=x.createContext(null),ti=x.createContext(null),Ft=x.createContext({outlet:null,matches:[],isDataRoute:!1}),yu=x.createContext(null);function Ah(e,t){let{relative:n}=t===void 0?{}:t;On()||Z(!1);let{basename:r,navigator:o}=x.useContext(ht),{hash:l,pathname:s,search:a}=ni(e,{relative:n}),c=s;return r!=="/"&&(c=s==="/"?r:Pt([r,s])),o.createHref({pathname:c,search:a,hash:l})}function On(){return x.useContext(ti)!=null}function Fn(){return On()||Z(!1),x.useContext(ti).location}function xu(e){x.useContext(ht).static||x.useLayoutEffect(e)}function vu(){let{isDataRoute:e}=x.useContext(Ft);return e?Qh():Lh()}function Lh(){On()||Z(!1);let e=x.useContext(ei),{basename:t,future:n,navigator:r}=x.useContext(ht),{matches:o}=x.useContext(Ft),{pathname:l}=Fn(),s=JSON.stringify(Rs(o,n.v7_relativeSplatPath)),a=x.useRef(!1);return xu(()=>{a.current=!0}),x.useCallback(function(d,p){if(p===void 0&&(p={}),!a.current)return;if(typeof d=="number"){r.go(d);return}let m=Ts(d,JSON.parse(s),l,p.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:Pt([t,m.pathname])),(p.replace?r.replace:r.push)(m,p.state,p)},[t,r,s,l,e])}function ni(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=x.useContext(ht),{matches:o}=x.useContext(Ft),{pathname:l}=Fn(),s=JSON.stringify(Rs(o,r.v7_relativeSplatPath));return x.useMemo(()=>Ts(e,JSON.parse(s),l,n==="path"),[e,s,l,n])}function Nh(e,t){return Ih(e,t)}function Ih(e,t,n,r){On()||Z(!1);let{navigator:o}=x.useContext(ht),{matches:l}=x.useContext(Ft),s=l[l.length-1],a=s?s.params:{};s&&s.pathname;let c=s?s.pathnameBase:"/";s&&s.route;let d=Fn(),p;if(t){var m;let w=typeof t=="string"?In(t):t;c==="/"||(m=w.pathname)!=null&&m.startsWith(c)||Z(!1),p=w}else p=d;let g=p.pathname||"/",S=g;if(c!=="/"){let w=c.replace(/^\//,"").split("/");S="/"+g.replace(/^\//,"").split("/").slice(w.length).join("/")}let h=uh(e,{pathname:S}),v=Dh(h&&h.map(w=>Object.assign({},w,{params:Object.assign({},a,w.params),pathname:Pt([c,o.encodeLocation?o.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?c:Pt([c,o.encodeLocation?o.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),l,n,r);return t&&v?x.createElement(ti.Provider,{value:{location:zr({pathname:"/",search:"",hash:"",state:null,key:"default"},p),navigationType:kt.Pop}},v):v}function Oh(){let e=Gh(),t=Ph(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},t),n?x.createElement("pre",{style:o},n):null,null)}const Fh=x.createElement(Oh,null);class $h extends x.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?x.createElement(Ft.Provider,{value:this.props.routeContext},x.createElement(yu.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Mh(e){let{routeContext:t,match:n,children:r}=e,o=x.useContext(ei);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),x.createElement(Ft.Provider,{value:t},r)}function Dh(e,t,n,r){var o;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var l;if(!n)return null;if(n.errors)e=n.matches;else if((l=r)!=null&&l.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let s=e,a=(o=n)==null?void 0:o.errors;if(a!=null){let p=s.findIndex(m=>m.route.id&&(a==null?void 0:a[m.route.id])!==void 0);p>=0||Z(!1),s=s.slice(0,Math.min(s.length,p+1))}let c=!1,d=-1;if(n&&r&&r.v7_partialHydration)for(let p=0;p<s.length;p++){let m=s[p];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(d=p),m.route.id){let{loaderData:g,errors:S}=n,h=m.route.loader&&g[m.route.id]===void 0&&(!S||S[m.route.id]===void 0);if(m.route.lazy||h){c=!0,d>=0?s=s.slice(0,d+1):s=[s[0]];break}}}return s.reduceRight((p,m,g)=>{let S,h=!1,v=null,w=null;n&&(S=a&&m.route.id?a[m.route.id]:void 0,v=m.route.errorElement||Fh,c&&(d<0&&g===0?(Kh("route-fallback"),h=!0,w=null):d===g&&(h=!0,w=m.route.hydrateFallbackElement||null)));let f=t.concat(s.slice(0,g+1)),u=()=>{let y;return S?y=v:h?y=w:m.route.Component?y=x.createElement(m.route.Component,null):m.route.element?y=m.route.element:y=p,x.createElement(Mh,{match:m,routeContext:{outlet:p,matches:f,isDataRoute:n!=null},children:y})};return n&&(m.route.ErrorBoundary||m.route.errorElement||g===0)?x.createElement($h,{location:n.location,revalidation:n.revalidation,component:v,error:S,children:u(),routeContext:{outlet:null,matches:f,isDataRoute:!0}}):u()},null)}var Su=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Su||{}),ju=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(ju||{});function Uh(e){let t=x.useContext(ei);return t||Z(!1),t}function Hh(e){let t=x.useContext(mu);return t||Z(!1),t}function Vh(e){let t=x.useContext(Ft);return t||Z(!1),t}function wu(e){let t=Vh(),n=t.matches[t.matches.length-1];return n.route.id||Z(!1),n.route.id}function Gh(){var e;let t=x.useContext(yu),n=Hh(),r=wu();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Qh(){let{router:e}=Uh(Su.UseNavigateStable),t=wu(ju.UseNavigateStable),n=x.useRef(!1);return xu(()=>{n.current=!0}),x.useCallback(function(o,l){l===void 0&&(l={}),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,zr({fromRouteId:t},l)))},[e,t])}const Va={};function Kh(e,t,n){Va[e]||(Va[e]=!0)}function Yh(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Ga(e){let{to:t,replace:n,state:r,relative:o}=e;On()||Z(!1);let{future:l,static:s}=x.useContext(ht),{matches:a}=x.useContext(Ft),{pathname:c}=Fn(),d=vu(),p=Ts(t,Rs(a,l.v7_relativeSplatPath),c,o==="path"),m=JSON.stringify(p);return x.useEffect(()=>d(JSON.parse(m),{replace:n,state:r,relative:o}),[d,m,o,n,r]),null}function Ze(e){Z(!1)}function qh(e){let{basename:t="/",children:n=null,location:r,navigationType:o=kt.Pop,navigator:l,static:s=!1,future:a}=e;On()&&Z(!1);let c=t.replace(/^\/*/,"/"),d=x.useMemo(()=>({basename:c,navigator:l,static:s,future:zr({v7_relativeSplatPath:!1},a)}),[c,a,l,s]);typeof r=="string"&&(r=In(r));let{pathname:p="/",search:m="",hash:g="",state:S=null,key:h="default"}=r,v=x.useMemo(()=>{let w=Wn(p,c);return w==null?null:{location:{pathname:w,search:m,hash:g,state:S,key:h},navigationType:o}},[c,p,m,g,S,h,o]);return v==null?null:x.createElement(ht.Provider,{value:d},x.createElement(ti.Provider,{children:n,value:v}))}function Jh(e){let{children:t,location:n}=e;return Nh(El(t),n)}new Promise(()=>{});function El(e,t){t===void 0&&(t=[]);let n=[];return x.Children.forEach(e,(r,o)=>{if(!x.isValidElement(r))return;let l=[...t,o];if(r.type===x.Fragment){n.push.apply(n,El(r.props.children,l));return}r.type!==Ze&&Z(!1),!r.props.index||!r.props.children||Z(!1);let s={id:r.props.id||l.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=El(r.props.children,l)),n.push(s)}),n}/**
|
|
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 No(){return No=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},No.apply(this,arguments)}function ku(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,l;for(l=0;l<r.length;l++)o=r[l],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Xh(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Zh(e,t){return e.button===0&&(!t||t==="_self")&&!Xh(e)}const eg=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],tg=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],ng="6";try{window.__reactRouterVersion=ng}catch{}const rg=x.createContext({isTransitioning:!1}),og="startTransition",Qa=Yu[og];function ig(e){let{basename:t,children:n,future:r,window:o}=e,l=x.useRef();l.current==null&&(l.current=ah({window:o,v5Compat:!0}));let s=l.current,[a,c]=x.useState({action:s.action,location:s.location}),{v7_startTransition:d}=r||{},p=x.useCallback(m=>{d&&Qa?Qa(()=>c(m)):c(m)},[c,d]);return x.useLayoutEffect(()=>s.listen(p),[s,p]),x.useEffect(()=>Yh(r),[r]),x.createElement(qh,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:s,future:r})}const lg=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",sg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ag=x.forwardRef(function(t,n){let{onClick:r,relative:o,reloadDocument:l,replace:s,state:a,target:c,to:d,preventScrollReset:p,viewTransition:m}=t,g=ku(t,eg),{basename:S}=x.useContext(ht),h,v=!1;if(typeof d=="string"&&sg.test(d)&&(h=d,lg))try{let y=new URL(window.location.href),j=d.startsWith("//")?new URL(y.protocol+d):new URL(d),k=Wn(j.pathname,S);j.origin===y.origin&&k!=null?d=k+j.search+j.hash:v=!0}catch{}let w=Ah(d,{relative:o}),f=ug(d,{replace:s,state:a,target:c,preventScrollReset:p,relative:o,viewTransition:m});function u(y){r&&r(y),y.defaultPrevented||f(y)}return x.createElement("a",No({},g,{href:h||w,onClick:v||l?r:u,ref:n,target:c}))}),cg=x.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:o=!1,className:l="",end:s=!1,style:a,to:c,viewTransition:d,children:p}=t,m=ku(t,tg),g=ni(c,{relative:m.relative}),S=Fn(),h=x.useContext(mu),{navigator:v,basename:w}=x.useContext(ht),f=h!=null&&fg(g)&&d===!0,u=v.encodeLocation?v.encodeLocation(g).pathname:g.pathname,y=S.pathname,j=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;o||(y=y.toLowerCase(),j=j?j.toLowerCase():null,u=u.toLowerCase()),j&&w&&(j=Wn(j,w)||j);const k=u!=="/"&&u.endsWith("/")?u.length-1:u.length;let b=y===u||!s&&y.startsWith(u)&&y.charAt(k)==="/",z=j!=null&&(j===u||!s&&j.startsWith(u)&&j.charAt(u.length)==="/"),R={isActive:b,isPending:z,isTransitioning:f},O=b?r:void 0,B;typeof l=="function"?B=l(R):B=[l,b?"active":null,z?"pending":null,f?"transitioning":null].filter(Boolean).join(" ");let ne=typeof a=="function"?a(R):a;return x.createElement(ag,No({},m,{"aria-current":O,className:B,ref:n,style:ne,to:c,viewTransition:d}),typeof p=="function"?p(R):p)});var Rl;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Rl||(Rl={}));var Ka;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Ka||(Ka={}));function dg(e){let t=x.useContext(ei);return t||Z(!1),t}function ug(e,t){let{target:n,replace:r,state:o,preventScrollReset:l,relative:s,viewTransition:a}=t===void 0?{}:t,c=vu(),d=Fn(),p=ni(e,{relative:s});return x.useCallback(m=>{if(Zh(m,n)){m.preventDefault();let g=r!==void 0?r:Lo(d)===Lo(p);c(e,{replace:g,state:o,preventScrollReset:l,relative:s,viewTransition:a})}},[d,c,p,r,o,n,e,l,s,a])}function fg(e,t){t===void 0&&(t={});let n=x.useContext(rg);n==null&&Z(!1);let{basename:r}=dg(Rl.useViewTransitionState),o=ni(e,{relative:t.relative});if(!n.isTransitioning)return!1;let l=Wn(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=Wn(n.nextLocation.pathname,r)||n.nextLocation.pathname;return _l(o.pathname,s)!=null||_l(o.pathname,l)!=null}const F="/api",Cu=x.createContext({email:"",isPro:!1,loading:!1,setEmail:()=>{},refresh:()=>{}});function pg({children:e}){const[t,n]=x.useState(()=>localStorage.getItem("bilko_pro_email")??""),[r,o]=x.useState(!1),[l,s]=x.useState(!1),a=x.useCallback(async d=>{const p=d.trim().toLowerCase();if(!p||!p.includes("@")){o(!1);return}s(!0);try{const g=await(await fetch(`${F}/stripe/subscription-status?email=${encodeURIComponent(p)}`)).json();o(g.active??!1)}catch{o(!1)}finally{s(!1)}},[]);x.useEffect(()=>{a(t)},[t,a]);function c(d){const p=d.trim().toLowerCase();localStorage.setItem("bilko_pro_email",p),n(p)}return i.jsx(Cu.Provider,{value:{email:t,isPro:r,loading:l,setEmail:c,refresh:()=>a(t)},children:e})}function bu(){return x.useContext(Cu)}function Wt(e,t){fetch(`${F}/analytics/event`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({event:e,...t})}).catch(()=>{})}function $n({tool:e,score:t,accentColor:n="#7c4dff"}){const[r,o]=x.useState(""),[l,s]=x.useState(!1);async function a(){if(!(!r.trim()||!r.includes("@"))){try{await fetch(`${F}/demos/email-capture`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:r.trim(),tool:e,score:String(t)})})}catch{}Wt("email_captured",{tool:e,email:r.trim()}),s(!0)}}return l?i.jsxs("div",{style:{background:"#0d1f0d",border:"1px solid #1e4a1e",borderRadius:14,padding:20,textAlign:"center",marginTop:16},children:[i.jsx("p",{style:{color:"#4caf50",fontSize:14,fontWeight:700,margin:"0 0 4px"},children:"You're on the early access list."}),i.jsx("p",{style:{color:"#2e7d32",fontSize:11,margin:0},children:"We'll notify you when Pro launches — full reports, history & API access."})]}):i.jsxs("div",{style:{background:"#12121f",border:`1px solid ${n}33`,borderRadius:14,padding:"20px 20px 18px",marginTop:16},children:[i.jsxs("div",{style:{marginBottom:14},children:[i.jsx("p",{style:{fontSize:14,color:"#e0e0e0",fontWeight:700,margin:"0 0 4px"},children:"Get your full report — free"}),i.jsx("p",{style:{fontSize:11,color:"#666",margin:0,lineHeight:1.5},children:"Framework breakdown, all rewrites, and competitor edge. No spam. Unsubscribe anytime."})]}),i.jsxs("div",{style:{display:"flex",gap:8},children:[i.jsx("input",{type:"email",placeholder:"you@example.com",value:r,onChange:c=>o(c.target.value),onKeyDown:c=>{c.key==="Enter"&&a()},style:{flex:1,background:"#0d0d1a",border:"1px solid #1a1a2e",borderRadius:8,padding:"10px 12px",fontSize:13,color:"#e0e0e0",outline:"none",fontFamily:"inherit"}}),i.jsx("button",{onClick:a,disabled:!r.includes("@"),style:{padding:"10px 20px",background:r.includes("@")?n:"#333",color:"#fff",fontWeight:700,fontSize:12,border:"none",borderRadius:8,cursor:r.includes("@")?"pointer":"not-allowed",opacity:r.includes("@")?1:.5,whiteSpace:"nowrap",letterSpacing:.2},children:"Send My Report"})]})]})}function gt({shareText:e,accentColor:t}){const[n,r]=x.useState(!1);function o(){navigator.clipboard.writeText(e).then(()=>{r(!0),setTimeout(()=>r(!1),2500)})}return i.jsx("button",{onClick:o,style:{padding:"6px 14px",fontSize:11,fontWeight:600,background:n?"#1a2e1a":t+"18",color:n?"#4caf50":t,border:`1px solid ${n?"#4caf5044":t+"44"}`,borderRadius:7,cursor:"pointer",transition:"all 0.2s",whiteSpace:"nowrap"},children:n?"Copied!":"Share Score"})}function $t({children:e,accentColor:t,label:n="Full Report",priceLabel:r="Unlock Full Report — $9/mo",email:o,product:l="contentgrade_pro"}){const s=bu(),[a,c]=x.useState(null),[d,p]=x.useState(!1),[m,g]=x.useState(!1),S=o??s.email,[h,v]=x.useState(S),[w,f]=x.useState(!1);x.useEffect(()=>{!o&&s.email&&!h&&v(s.email)},[s.email]),x.useEffect(()=>{l!=="audiencedecoder_report"&&s.isPro&&p(!0)},[s.isPro,l]),x.useEffect(()=>{const j=S.trim().toLowerCase();j&&j.includes("@")?fetch(`${F}/stripe/subscription-status?email=${encodeURIComponent(j)}`).then(b=>b.json()).then(b=>{c(b.configured??!1),(l==="audiencedecoder_report"?b.audiencedecoder:b.active)&&p(!0)}).catch(()=>c(!1)):fetch(`${F}/stripe/subscription-status?email=noop@check.com`).then(b=>b.json()).then(b=>c(b.configured??!1)).catch(()=>c(!1)),new URLSearchParams(window.location.search).get("checkout")==="success"&&j&&setTimeout(()=>{fetch(`${F}/stripe/subscription-status?email=${encodeURIComponent(j)}`).then(b=>b.json()).then(b=>{(l==="audiencedecoder_report"?b.audiencedecoder:b.active)&&(p(!0),s.refresh())}).catch(()=>{})},2e3)},[S]);async function u(){const j=h.trim().toLowerCase();if(!(!j||!j.includes("@"))){g(!0),Wt("upgrade_clicked",{email:j});try{s.setEmail(j);const b=await(await fetch(`${F}/stripe/create-checkout-session`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:j,priceType:l})})).json();b.url?(Wt("checkout_started",{email:j}),window.location.href=b.url):c(!1)}catch{c(!1)}finally{g(!1)}}}async function y(){const j=h.trim().toLowerCase();if(!(!j||!j.includes("@"))){try{await fetch(`${F}/demos/headline-grader/unlock`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:j})})}catch{}f(!0)}}return d?i.jsx("div",{style:{marginBottom:16},children:e}):i.jsxs("div",{style:{position:"relative",marginBottom:16},children:[i.jsx("div",{style:{filter:"blur(5px)",pointerEvents:"none",userSelect:"none"},children:e}),i.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:[i.jsx("div",{style:{fontSize:22,marginBottom:8},children:"🔒"}),i.jsx("div",{style:{fontSize:15,fontWeight:800,color:"#e0e0e0",marginBottom:4},children:n}),i.jsx("div",{style:{fontSize:11,color:"#666",marginBottom:18,textAlign:"center",maxWidth:220,lineHeight:1.5},children:"Framework breakdown, all rewrites & more"}),a?i.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:8,width:"100%",maxWidth:260,padding:"0 16px"},children:[i.jsx("input",{type:"email",placeholder:"your@email.com",value:h,onChange:j=>v(j.target.value),onKeyDown:j=>{j.key==="Enter"&&u()},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"}}),i.jsx("button",{onClick:u,disabled:m||!h.includes("@"),style:{width:"100%",padding:"10px 24px",background:m?"#333":`linear-gradient(135deg, ${t}dd, ${t}99)`,color:"#fff",fontWeight:700,fontSize:13,borderRadius:8,border:`1px solid ${t}`,letterSpacing:.2,cursor:m?"wait":"pointer",opacity:h.includes("@")?1:.5},children:m?"Redirecting...":r})]}):w?i.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."}):i.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:8,width:"100%",maxWidth:260,padding:"0 16px"},children:[i.jsx("div",{style:{fontSize:11,color:"#888",textAlign:"center"},children:"Coming soon — leave your email"}),i.jsxs("div",{style:{display:"flex",gap:6,width:"100%"},children:[i.jsx("input",{type:"email",placeholder:"your@email.com",value:h,onChange:j=>v(j.target.value),onKeyDown:j=>{j.key==="Enter"&&y()},style:{flex:1,background:"#0d0d1a",border:"1px solid #2a2a3e",borderRadius:7,padding:"8px 10px",fontSize:12,color:"#e0e0e0",outline:"none",fontFamily:"inherit"}}),i.jsx("button",{onClick:y,disabled:!h.includes("@"),style:{padding:"8px 12px",background:t+"33",color:t,fontWeight:700,fontSize:11,borderRadius:7,border:`1px solid ${t}44`,cursor:"pointer",opacity:h.includes("@")?1:.5,whiteSpace:"nowrap"},children:"Notify me"})]})]})]})]})}const hg=[{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}],gg=[{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 Zt({accentColor:e,product:t="contentgrade",email:n}){const r=t==="audiencedecoder"?gg:hg,o=t==="audiencedecoder"?"One-time unlock · No subscription":"Free forever · No credit card for trial",[l,s]=x.useState(null),[a,c]=x.useState(!1);x.useEffect(()=>{fetch(`${F}/stripe/subscription-status?email=noop@check.com`).then(p=>p.json()).then(p=>{s(t==="audiencedecoder"?p.audienceDecoderConfigured??!1:p.configured??!1)}).catch(()=>s(!1))},[t]);async function d(){const p=(n??"").trim().toLowerCase();if(!p||!p.includes("@"))return;c(!0),localStorage.setItem("bilko_pro_email",p);const m=t==="audiencedecoder"?"audiencedecoder_report":"contentgrade_pro";Wt("upgrade_clicked",{email:p});try{const S=await(await fetch(`${F}/stripe/create-checkout-session`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:p,priceType:m})})).json();S.url&&(Wt("checkout_started",{email:p}),window.location.href=S.url)}catch{}finally{c(!1)}}return i.jsxs("div",{style:{marginTop:24},children:[i.jsxs("div",{style:{textAlign:"center",marginBottom:16},children:[i.jsx("div",{style:{fontSize:10,color:"#444",textTransform:"uppercase",letterSpacing:2,fontFamily:"monospace",marginBottom:4},children:t==="audiencedecoder"?"AudienceDecoder":"ContentGrade Suite"}),i.jsx("div",{style:{fontSize:16,fontWeight:800,color:"#e0e0e0"},children:"Upgrade for the full picture"}),i.jsx("div",{style:{fontSize:11,color:"#555",marginTop:4},children:o})]}),i.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:10},children:r.map(p=>i.jsxs("div",{style:{background:p.highlight?"#12121f":"#0d0d1a",border:`1px solid ${p.highlight?e+"55":"#1a1a2e"}`,borderRadius:12,padding:16,position:"relative",boxShadow:p.highlight?`0 0 24px ${e}18`:"none"},children:[p.highlight&&i.jsx("div",{style:{position:"absolute",top:-10,left:"50%",transform:"translateX(-50%)",background:e,color:"#000",fontSize:9,fontWeight:800,padding:"2px 10px",borderRadius:8,letterSpacing:1,whiteSpace:"nowrap"},children:"MOST POPULAR"}),i.jsx("div",{style:{fontWeight:800,fontSize:13,color:"#e0e0e0",marginBottom:2},children:p.name}),i.jsx("div",{style:{fontSize:9,color:"#555",marginBottom:8},children:p.tagline}),i.jsx("div",{style:{fontSize:p.price?20:13,fontWeight:800,color:p.price?e:"#444",marginBottom:12},children:p.price??"Free forever"}),i.jsx("div",{style:{marginBottom:14},children:p.features.map(m=>i.jsxs("div",{style:{fontSize:10,color:p.highlight?"#aaa":"#666",marginBottom:5,display:"flex",alignItems:"flex-start",gap:5},children:[i.jsx("span",{style:{color:p.price?e:"#444",flexShrink:0},children:"✓"}),m]},m))}),i.jsx("button",{disabled:!p.highlight||!l||a||!n||!n.includes("@"),onClick:p.highlight&&l?d:void 0,style:{width:"100%",padding:"8px 0",fontSize:11,fontWeight:700,borderRadius:7,border:p.highlight?`1px solid ${e}66`:"none",background:p.highlight&&l?e+"33":p.highlight?e+"22":"#1a1a2e",color:p.highlight?e:"#444",cursor:p.highlight&&l&&(n!=null&&n.includes("@"))?"pointer":"default"},children:p.highlight&&!p.price?p.cta:p.highlight&&l===!1?"Coming soon":a?"Loading...":p.cta})]},p.name))}),l===!1&&i.jsx("div",{style:{textAlign:"center",marginTop:12,fontSize:10,color:"#333"},children:"Pro launches soon · Capture your email above to be first"})]})}function mg({accentColor:e="#7c4dff",product:t="contentgrade_pro",onEmailChange:n}){const[r,o]=x.useState(()=>localStorage.getItem("bilko_pro_email")??""),[l,s]=x.useState(!1),[a,c]=x.useState(null);x.useEffect(()=>{Wt("free_limit_hit")},[]),x.useEffect(()=>{fetch(`${F}/stripe/subscription-status?email=noop@check.com`).then(g=>g.json()).then(g=>{c(t==="audiencedecoder_report"?g.audienceDecoderConfigured??!1:g.configured??!1)}).catch(()=>c(!1))},[t]);function d(g){o(g.target.value),n==null||n(g.target.value)}async function p(){const g=r.trim().toLowerCase();if(!(!g||!g.includes("@"))){s(!0),localStorage.setItem("bilko_pro_email",g),Wt("upgrade_clicked",{email:g});try{const h=await(await fetch(`${F}/stripe/create-checkout-session`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:g,priceType:t})})).json();h.url&&(Wt("checkout_started",{email:g}),window.location.href=h.url)}catch{}finally{s(!1)}}}const m=t==="audiencedecoder_report";return i.jsxs("div",{style:{background:"#12121f",border:`1px solid ${e}44`,borderRadius:14,padding:"24px 20px",marginTop:16,textAlign:"center"},children:[i.jsx("div",{style:{fontSize:28,marginBottom:8},children:"🚧"}),i.jsx("div",{style:{fontSize:15,fontWeight:800,color:"#e0e0e0",marginBottom:6},children:"Free daily limit reached"}),i.jsxs("div",{style:{fontSize:12,color:"#666",marginBottom:20,lineHeight:1.6},children:["You've used your 5 free analyses today."," ",m?"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."]}),a?i.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:8,maxWidth:280,margin:"0 auto"},children:[i.jsx("input",{type:"email",placeholder:"your@email.com",value:r,onChange:d,onKeyDown:g=>{g.key==="Enter"&&p()},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"}}),i.jsx("button",{onClick:p,disabled:l||!r.includes("@"),style:{width:"100%",padding:"11px 24px",background:l?"#333":`linear-gradient(135deg, ${e}dd, ${e}99)`,color:"#fff",fontWeight:700,fontSize:13,borderRadius:8,border:`1px solid ${e}`,letterSpacing:.2,cursor:l||!r.includes("@")?"not-allowed":"pointer",opacity:r.includes("@")?1:.5},children:l?"Redirecting...":m?"Unlock Report — $49":"Upgrade to Pro — $9/mo"}),i.jsx("div",{style:{fontSize:10,color:"#444",marginTop:2},children:m?"One-time payment · Full access":"Cancel anytime · Instant access"})]}):a===!1?i.jsx("div",{style:{fontSize:12,color:"#555"},children:"Come back tomorrow for 5 more free analyses."}):null]})}const zu={"A+":"#4caf50",A:"#4caf50","A-":"#4caf50","B+":"#4a90d9",B:"#4a90d9","B-":"#4a90d9","C+":"#ffd54f",C:"#ffd54f","C-":"#ffd54f",D:"#ff9800",F:"#ef5350"},bn={rule_of_one:"Rule of One",value_equation:"Value Equation",readability:"Readability",proof_promise_plan:"Proof+Promise+Plan"};function yg({score:e,max:t,label:n,feedback:r}){const o=Math.round(e/t*100),l=o>=80?"#4caf50":o>=60?"#4a90d9":o>=40?"#ffd54f":"#ef5350";return i.jsxs("div",{style:{marginBottom:20},children:[i.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:4},children:[i.jsx("span",{style:{fontSize:12,fontWeight:500,color:"#ccc"},children:n}),i.jsxs("span",{style:{fontSize:12,fontWeight:700,color:"#ddd"},children:[e,"/",t]})]}),i.jsx("div",{style:{height:6,background:"#1a1a2e",borderRadius:3,overflow:"hidden"},children:i.jsx("div",{style:{height:"100%",background:l,borderRadius:3,width:`${o}%`,transition:"width 0.7s ease"}})}),i.jsx("p",{style:{marginTop:6,fontSize:11,color:"#777",lineHeight:1.4},children:r})]})}function xg({headline:e,setHeadline:t}){const[n,r]=x.useState(!1),[o,l]=x.useState(null),[s,a]=x.useState(null),[c,d]=x.useState(!1),[p,m]=x.useState(""),[g,S]=x.useState(!1),[h,v]=x.useState(null),[w,f]=x.useState(null);x.useEffect(()=>{const T=localStorage.getItem("hg_email");T&&m(T)},[]);async function u(){if(p.includes("@")){S(!0),v(null);try{const T=await fetch(`${F}/demos/headline-grader/unlock`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:p.trim()})}),M=await T.json();if(!T.ok)throw new Error(M.error||`HTTP ${T.status}`);localStorage.setItem("hg_email",p.trim()),d(!1),f(M.remaining??5)}catch(T){v(T instanceof Error?T.message:"Unlock failed. Try again.")}finally{S(!1)}}}async function y(){var T;if(e.trim()){r(!0),l(null),a(null),d(!1);try{const M=await fetch(`${F}/demos/headline-grader`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({headline:e.trim()})}),ce=await M.json();if(ce.gated){d(!0);return}if(!M.ok)throw new Error(ce.error||`HTTP ${M.status}`);((T=ce.usage)==null?void 0:T.remaining)!==void 0&&f(ce.usage.remaining),l(ce)}catch(M){a(M instanceof Error?M.message:"Scoring failed.")}finally{r(!1)}}}const j=o?zu[o.grade]??"#777":"#777",k=e.trim()?e.trim().split(/\s+/).length:0,b=e.replace(/\s/g,"").length,z=k>0?b/k:0,R=k>=6&&k<=12?"#4caf50":k>=3&&k<=18?"#ffd54f":"#ef5350",O=z>6?{label:"College+",color:"#ef5350"}:z>5?{label:"High School",color:"#ffd54f"}:{label:"Easy Read",color:"#4caf50"},B=e.slice(0,60),ne=e.length>60?e.slice(60):"",Te=e.toLowerCase().replace(/[^a-z0-9\s]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").slice(0,50).replace(/-$/,"")||"your-headline",Be=e.length<=49?"#1e8e3e":e.length<=58?"#f9ab00":"#d93025",W=e.split(" ").slice(0,3).join(" ")||"this topic";return i.jsxs(i.Fragment,{children:[i.jsxs("div",{style:{marginBottom:20},children:[i.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:e,onChange:T=>t(T.target.value),onKeyDown:T=>{T.key==="Enter"&&(T.metaKey||T.ctrlKey)&&y()}}),i.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:8},children:[i.jsx("div",{style:{display:"flex",gap:6,alignItems:"center",flexWrap:"wrap"},children:e?i.jsxs(i.Fragment,{children:[i.jsxs("span",{style:{fontSize:10,fontFamily:"monospace",padding:"2px 7px",borderRadius:4,background:"#0d0d1a",border:`1px solid ${R}55`,color:R},children:[k,"w"]}),i.jsxs("span",{style:{fontSize:10,fontFamily:"monospace",padding:"2px 7px",borderRadius:4,background:"#0d0d1a",border:"1px solid #33333388",color:"#555"},children:[e.length,"c"]}),i.jsx("span",{style:{fontSize:10,fontFamily:"monospace",padding:"2px 7px",borderRadius:4,background:"#0d0d1a",border:`1px solid ${O.color}55`,color:O.color},children:O.label})]}):i.jsx("span",{style:{fontSize:10,color:"#444"},children:"Ctrl+Enter to grade"})}),i.jsx("button",{onClick:y,disabled:n||!e.trim(),style:{padding:"8px 20px",background:n||!e.trim()?"#333":"#7c4dff",color:"#fff",fontWeight:600,fontSize:13,border:"none",borderRadius:8,cursor:n||!e.trim()?"not-allowed":"pointer",opacity:n||!e.trim()?.5:1},children:n?"Grading...":"Grade It"})]})]}),e.length>0&&i.jsxs("div",{style:{marginBottom:20},children:[i.jsx("div",{style:{fontSize:9,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:8,fontFamily:"monospace"},children:"Google Search Preview"}),i.jsxs("div",{style:{background:"#fff",borderRadius:10,padding:"16px 20px",boxShadow:"0 1px 6px rgba(0,0,0,0.15)"},children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:6},children:[i.jsx("div",{style:{width:18,height:18,borderRadius:9,background:"#e8e8e8",flexShrink:0}}),i.jsxs("div",{children:[i.jsx("div",{style:{fontSize:12,fontWeight:600,color:"#202124",lineHeight:1.3},children:"Example Site"}),i.jsxs("div",{style:{fontSize:11,color:"#006621",lineHeight:1.2},children:["https://example.com › blog › ",Te]})]})]}),i.jsxs("div",{style:{fontSize:19,color:"#1a0dab",lineHeight:1.3,marginBottom:4,cursor:"pointer",fontFamily:"arial, sans-serif"},children:[B,ne&&i.jsx("span",{style:{color:"#d93025"},children:ne})]}),i.jsxs("div",{style:{fontSize:13,color:"#545454",lineHeight:1.5,fontFamily:"arial, sans-serif"},children:["Discover how ",W.toLowerCase(),"... Click to read the full article and learn proven strategies that deliver measurable results fast."]}),i.jsxs("div",{style:{marginTop:8,display:"flex",alignItems:"center",gap:8},children:[i.jsxs("span",{style:{fontSize:11,fontFamily:"monospace",color:Be,fontWeight:700},children:[e.length,"/60 chars"]}),e.length>60&&i.jsxs("span",{style:{fontSize:10,color:"#d93025"},children:["— ",e.length-60," over Google's limit"]})]})]})]}),w!==null&&w>0&&!c&&i.jsxs("div",{style:{fontSize:10,color:"#555",textAlign:"right",marginBottom:8},children:[w," free ",w===1?"analysis":"analyses"," remaining today"]}),s&&i.jsx("div",{style:{background:"#2e1a1a",border:"1px solid #5a2a2a",borderRadius:10,padding:12,marginBottom:16,color:"#ef5350",fontSize:12},children:s}),c&&i.jsxs("div",{style:{background:"#12121f",border:"1px solid #7c4dff44",borderRadius:14,padding:28,textAlign:"center",marginBottom:16},children:[i.jsx("div",{style:{fontSize:36,marginBottom:12},children:"🔒"}),i.jsx("h2",{style:{fontSize:18,fontWeight:800,color:"#e0e0e0",margin:"0 0 6px"},children:"You've used all 5 free analyses today"}),i.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."}),i.jsxs("div",{style:{display:"flex",gap:8,maxWidth:380,margin:"0 auto"},children:[i.jsx("input",{type:"email",placeholder:"you@example.com",value:p,onChange:T=>m(T.target.value),onKeyDown:T=>{T.key==="Enter"&&u()},style:{flex:1,background:"#0d0d1a",border:"1px solid #1a1a2e",borderRadius:8,padding:"10px 12px",fontSize:13,color:"#e0e0e0",outline:"none",fontFamily:"inherit"}}),i.jsx("button",{onClick:u,disabled:g||!p.includes("@"),style:{padding:"10px 20px",background:g||!p.includes("@")?"#333":"#7c4dff",color:"#fff",fontWeight:700,fontSize:12,border:"none",borderRadius:8,cursor:g||!p.includes("@")?"not-allowed":"pointer",opacity:g||!p.includes("@")?.5:1,whiteSpace:"nowrap"},children:g?"Unlocking...":"Unlock 5 More"})]}),h&&i.jsx("p",{style:{color:"#ef5350",fontSize:11,marginTop:10},children:h}),i.jsx(Zt,{accentColor:"#7c4dff"})]}),o&&i.jsxs("div",{children:[i.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:24,textAlign:"center",marginBottom:16},children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:16,marginBottom:10},children:[i.jsx("span",{style:{fontSize:56,fontWeight:900,color:"#fff"},children:o.total_score}),i.jsxs("div",{style:{textAlign:"left"},children:[i.jsx("div",{style:{fontSize:32,fontWeight:900,color:j},children:o.grade}),i.jsx("div",{style:{fontSize:10,color:"#555",textTransform:"uppercase",letterSpacing:2},children:"/ 100"})]})]}),i.jsx("p",{style:{color:"#aaa",fontSize:13,maxWidth:400,margin:"0 auto 12px"},children:o.diagnosis}),i.jsx(gt,{shareText:`My headline scored ${o.total_score}/100 on HeadlineGrader by Content Intelligence Stack. Try yours → https://contentintelligence.ai`,accentColor:"#7c4dff"})]}),o.rewrites&&o.rewrites.length>0&&i.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:12},children:[i.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,margin:0},children:"Best Rewrite"}),i.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"})]}),i.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:10,padding:10,borderRadius:8,background:"#0d0d1a",border:"1px solid #1a1a2e"},children:[i.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:o.rewrites[0].predicted_score}),i.jsxs("div",{children:[i.jsx("p",{style:{color:"#ddd",fontSize:13,fontWeight:500,margin:0},children:o.rewrites[0].text}),i.jsxs("p",{style:{fontSize:10,color:"#555",marginTop:3},children:["Optimized for: ",i.jsx("span",{style:{color:"#777"},children:bn[o.rewrites[0].optimized_for]??o.rewrites[0].optimized_for})]})]})]})]}),i.jsx($n,{tool:"headline-grader",score:o.total_score}),i.jsxs($t,{accentColor:"#7c4dff",label:"Full Framework Report",children:[i.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[i.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:16},children:"Framework Breakdown"}),Object.entries(o.framework_scores).map(([T,M])=>i.jsx(yg,{label:bn[T]??T,score:M.score,max:M.max,feedback:M.feedback},T))]}),o.rewrites&&o.rewrites.length>1&&i.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[i.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:14},children:"All AI Rewrites"}),o.rewrites.slice(1).map((T,M)=>i.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:10,padding:10,borderRadius:8,background:"#0d0d1a",border:"1px solid #1a1a2e",marginBottom:8},children:[i.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:T.predicted_score}),i.jsxs("div",{children:[i.jsx("p",{style:{color:"#ddd",fontSize:13,fontWeight:500,margin:0},children:T.text}),i.jsxs("p",{style:{fontSize:10,color:"#555",marginTop:3},children:["Optimized for: ",i.jsx("span",{style:{color:"#777"},children:bn[T.optimized_for]??T.optimized_for})]})]})]},M))]}),o.upgrade_hook&&i.jsx("div",{style:{background:"#1a1040",border:"1px solid #3a2a6a",borderRadius:14,padding:16,textAlign:"center",marginBottom:0},children:i.jsx("p",{style:{color:"#b39ddb",fontSize:12,margin:0},children:o.upgrade_hook})})]}),i.jsx(Zt,{accentColor:"#7c4dff"})]})]})}function Ya({label:e,result:t,isWinner:n,isDimmed:r}){const o=zu[t.grade]??"#777";return i.jsxs("div",{style:{flex:1,background:"#12121f",border:`1px solid ${n?"#4caf50":"#1a1a2e"}`,borderRadius:14,padding:16,opacity:r?.55:1,transition:"opacity 0.3s",position:"relative"},children:[n&&i.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"}),i.jsxs("div",{style:{textAlign:"center",marginBottom:12},children:[i.jsx("div",{style:{fontSize:10,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:4},children:e}),i.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:10},children:[i.jsx("span",{style:{fontSize:44,fontWeight:900,color:"#fff"},children:t.total_score}),i.jsx("span",{style:{fontSize:26,fontWeight:900,color:o},children:t.grade})]}),i.jsx("p",{style:{color:"#888",fontSize:11,marginTop:4},children:t.diagnosis})]}),i.jsx("div",{style:{borderTop:"1px solid #1a1a2e",paddingTop:12},children:Object.entries(t.framework_scores).map(([l,s])=>{const a=Math.round(s.score/s.max*100),c=a>=80?"#4caf50":a>=60?"#4a90d9":a>=40?"#ffd54f":"#ef5350";return i.jsxs("div",{style:{marginBottom:8},children:[i.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:3},children:[i.jsx("span",{style:{fontSize:10,color:"#777"},children:bn[l]??l}),i.jsxs("span",{style:{fontSize:10,color:"#999",fontWeight:700},children:[s.score,"/",s.max]})]}),i.jsx("div",{style:{height:4,background:"#1a1a2e",borderRadius:2,overflow:"hidden"},children:i.jsx("div",{style:{height:"100%",background:c,borderRadius:2,width:`${a}%`}})})]},l)})})]})}function vg({onTryHybrid:e}){const[t,n]=x.useState(""),[r,o]=x.useState(""),[l,s]=x.useState(!1),[a,c]=x.useState(null),[d,p]=x.useState(null);async function m(){if(!(!t.trim()||!r.trim())){s(!0),c(null),p(null);try{const h=await fetch(`${F}/demos/headline-grader/compare`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({headlineA:t.trim(),headlineB:r.trim()})}),v=await h.json();if(!h.ok)throw new Error(v.error||`HTTP ${h.status}`);c(v)}catch(h){p(h instanceof Error?h.message:"Comparison failed.")}finally{s(!1)}}}const g=t.trim().length>=3&&r.trim().length>=3,S=a==null?void 0:a.comparison.framework_winners;return i.jsxs(i.Fragment,{children:[i.jsx("div",{style:{display:"flex",gap:12,marginBottom:12},children:["A","B"].map(h=>{const v=h==="A"?t:r,w=h==="A"?n:o;return i.jsxs("div",{style:{flex:1},children:[i.jsxs("div",{style:{fontSize:10,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:6},children:["Headline ",h]}),i.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 ${h}...`,value:v,onChange:f=>w(f.target.value)})]},h)})}),i.jsx("div",{style:{display:"flex",justifyContent:"flex-end",marginBottom:20},children:i.jsx("button",{onClick:m,disabled:l||!g,style:{padding:"8px 20px",background:l||!g?"#333":"#7c4dff",color:"#fff",fontWeight:600,fontSize:13,border:"none",borderRadius:8,cursor:l||!g?"not-allowed":"pointer",opacity:l||!g?.5:1},children:l?"Comparing...":"Compare"})}),d&&i.jsx("div",{style:{background:"#2e1a1a",border:"1px solid #5a2a2a",borderRadius:10,padding:12,marginBottom:16,color:"#ef5350",fontSize:12},children:d}),a&&i.jsxs("div",{children:[a.comparison.winner!=="tie"?i.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:[i.jsxs("div",{style:{textAlign:"center"},children:[i.jsxs("div",{style:{color:"#4caf50",fontWeight:800,fontSize:15},children:["Headline ",a.comparison.winner," wins"]}),i.jsxs("div",{style:{color:"#2e7d32",fontSize:11,marginTop:2},children:["+",a.comparison.margin," pts · ",Math.round(a.comparison.margin/Math.max(a.comparison.winner==="A"?a.headlineB.total_score:a.headlineA.total_score,1)*100),"% stronger"]})]}),i.jsx(gt,{shareText:`Headline ${a.comparison.winner} won my A/B test on HeadlineGrader by ${a.comparison.margin} points. Try Content Intelligence Stack → https://contentintelligence.ai`,accentColor:"#4caf50"})]}):i.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"}),i.jsxs("div",{style:{display:"flex",gap:12,marginBottom:16,paddingTop:16},children:[i.jsx(Ya,{label:"Headline A",result:a.headlineA,isWinner:a.comparison.winner==="A",isDimmed:a.comparison.winner==="B"}),i.jsx(Ya,{label:"Headline B",result:a.headlineB,isWinner:a.comparison.winner==="B",isDimmed:a.comparison.winner==="A"})]}),S&&i.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[i.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:14},children:"Framework Winners"}),i.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:12},children:[i.jsx("thead",{children:i.jsx("tr",{style:{borderBottom:"1px solid #1a1a2e"},children:["Framework","A Score","B Score","Winner"].map(h=>i.jsx("th",{style:{padding:"6px 8px",textAlign:"left",color:"#555",fontWeight:600,fontSize:10,textTransform:"uppercase",letterSpacing:1},children:h},h))})}),i.jsx("tbody",{children:Object.keys(bn).map(h=>{const v=S[h],w=a.headlineA.framework_scores[h].score,f=a.headlineB.framework_scores[h].score;return i.jsxs("tr",{style:{borderBottom:"1px solid #0d0d1a"},children:[i.jsx("td",{style:{padding:"8px",color:"#aaa"},children:bn[h]}),i.jsx("td",{style:{padding:"8px",color:v==="A"?"#4caf50":"#666",fontWeight:v==="A"?700:400},children:w}),i.jsx("td",{style:{padding:"8px",color:v==="B"?"#4caf50":"#666",fontWeight:v==="B"?700:400},children:f}),i.jsx("td",{style:{padding:"8px",color:v==="tie"?"#ffd54f":"#4caf50",fontWeight:700},children:v==="tie"?"Tie":`Headline ${v}`})]},h)})})]})]}),i.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[i.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:10},children:"Analysis"}),i.jsx("p",{style:{color:"#bbb",fontSize:13,lineHeight:1.6,margin:0},children:a.comparison.verdict})]}),i.jsxs("div",{style:{background:"#1a1040",border:"1px solid #3a2a6a",borderRadius:14,padding:20},children:[i.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#7c4dff",textTransform:"uppercase",letterSpacing:2,marginBottom:10},children:"Suggested Hybrid"}),i.jsx("p",{style:{color:"#e0e0e0",fontSize:14,fontWeight:600,lineHeight:1.5,marginBottom:14},children:a.comparison.suggested_hybrid}),i.jsx("button",{onClick:()=>{const h=a.comparison.suggested_hybrid.split(" | ")[0].trim();e(h)},style:{padding:"7px 16px",background:"#7c4dff",color:"#fff",fontWeight:600,fontSize:12,border:"none",borderRadius:8,cursor:"pointer"},children:"Try this headline →"})]})]})]})}function Sg(){const[e,t]=x.useState("score"),[n,r]=x.useState("");return i.jsxs("div",{style:{padding:24,maxWidth:720,margin:"0 auto"},children:[i.jsxs("div",{style:{textAlign:"center",marginBottom:28},children:[i.jsx("div",{style:{fontSize:9,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:6,fontFamily:"monospace"},children:"Content Intelligence Stack"}),i.jsx("h1",{style:{fontSize:28,fontWeight:800,color:"#e0e0e0",letterSpacing:-.5},children:"Grade Your Headline in Seconds"}),i.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 ",i.jsx("span",{style:{color:"#ccc",fontWeight:500},children:"$1B+"})," in direct-response revenue at Agora Publishing."]}),i.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(o=>i.jsx("span",{style:{fontSize:10,padding:"4px 10px",borderRadius:12,background:"#12121f",color:"#888",border:"1px solid #1a1a2e",fontWeight:500},children:o},o))})]}),i.jsxs("div",{style:{display:"flex",gap:4,background:"#12121f",border:"1px solid #1a1a2e",borderRadius:10,padding:4,marginBottom:24,width:"fit-content"},children:[i.jsx("button",{onClick:()=>t("score"),style:{padding:"7px 18px",borderRadius:8,border:"none",cursor:"pointer",fontSize:12,fontWeight:600,background:e==="score"?"#7c4dff":"transparent",color:e==="score"?"#fff":"#666",transition:"background 0.2s, color 0.2s"},children:"Score"}),i.jsxs("button",{onClick:()=>t("compare"),style:{padding:"7px 18px",borderRadius:8,border:"none",cursor:"pointer",fontSize:12,fontWeight:600,background:e==="compare"?"#2a1a6a":"transparent",color:e==="compare"?"#b39ddb":"#444",transition:"background 0.2s, color 0.2s",display:"flex",alignItems:"center",gap:6},children:["A/B Compare",i.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"})]})]}),e==="score"&&i.jsx(xg,{headline:n,setHeadline:r}),e==="compare"&&i.jsx("div",{children:i.jsx($t,{accentColor:"#7c4dff",label:"A/B Compare Mode",children:i.jsx(vg,{onTryHybrid:o=>{r(o),t("score")}})})}),i.jsxs("section",{style:{marginTop:56},children:[i.jsx("h2",{style:{fontSize:14,fontWeight:700,color:"#aaa",marginBottom:16,textAlign:"center",letterSpacing:1,textTransform:"uppercase"},children:"Frequently Asked Questions"}),i.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:o,a:l})=>i.jsxs("details",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:10,overflow:"hidden"},children:[i.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:[o,i.jsx("span",{style:{fontSize:16,color:"#555",marginLeft:8,flexShrink:0},children:"+"})]}),i.jsx("p",{style:{padding:"0 18px 14px",fontSize:12,color:"#777",lineHeight:1.7,margin:0,borderTop:"1px solid #1a1a2e"},children:l})]},o))})]}),i.jsxs("footer",{style:{marginTop:40,paddingTop:24,borderTop:"1px solid #111"},children:[i.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."}),i.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 _u={"A+":"#4caf50",A:"#4caf50","A-":"#4caf50","B+":"#4a90d9",B:"#4a90d9","B-":"#4a90d9","C+":"#ffd54f",C:"#ffd54f","C-":"#ffd54f",D:"#ff9800",F:"#ef5350"},Io={hero:{label:"Hero Section",icon:"🎯"},social_proof:{label:"Social Proof",icon:"⭐"},clarity:{label:"Clarity & Persuasion",icon:"💡"},conversion:{label:"Conversion Architecture",icon:"🔥"}};function jg({sectionKey:e,section:t}){const n=Io[e]??{label:e,icon:"•"},r=Math.round(t.score/t.max*100),o=r>=80?"#4caf50":r>=60?"#4a90d9":r>=40?"#ffd54f":"#ef5350";return i.jsxs("div",{style:{marginBottom:22},children:[i.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:4},children:[i.jsxs("span",{style:{fontSize:12,fontWeight:500,color:"#ccc"},children:[n.icon," ",n.label]}),i.jsxs("span",{style:{fontSize:12,fontWeight:700,color:"#ddd"},children:[t.score,"/",t.max]})]}),i.jsx("div",{style:{height:6,background:"#1a1a2e",borderRadius:3,overflow:"hidden"},children:i.jsx("div",{style:{height:"100%",background:o,borderRadius:3,width:`${r}%`,transition:"width 0.7s ease"}})}),i.jsx("p",{style:{marginTop:6,fontSize:11,color:"#777",lineHeight:1.4},children:t.feedback}),t.fixes.length>0&&i.jsx("div",{style:{marginTop:6},children:t.fixes.map((l,s)=>i.jsxs("div",{style:{fontSize:11,color:"#999",padding:"4px 8px",marginTop:3,background:"#0d0d1a",borderRadius:4,border:"1px solid #1a1a2e"},children:["→ ",l]},s))})]})}function wg(){const[e,t]=x.useState(""),[n,r]=x.useState(!1),[o,l]=x.useState(null),[s,a]=x.useState(null),[c,d]=x.useState(!1),[p,m]=x.useState(()=>localStorage.getItem("bilko_pro_email")??"");async function g(){if(e.trim()){r(!0),l(null),a(null),d(!1);try{const h=await fetch(`${F}/demos/page-roast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:e.trim(),email:p||void 0})}),v=await h.json();if(v.gated){d(!0);return}if(!h.ok)throw new Error(v.error||`HTTP ${h.status}`);l(v)}catch(h){a(h instanceof Error?h.message:"Roast failed.")}finally{r(!1)}}}const S=o?_u[o.grade]??"#777":"#777";return i.jsxs(i.Fragment,{children:[i.jsxs("div",{style:{marginBottom:20},children:[i.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:e,onChange:h=>t(h.target.value),onKeyDown:h=>{h.key==="Enter"&&g()}}),i.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:8},children:[i.jsx("span",{style:{fontSize:10,color:"#444"},children:"Enter to roast"}),i.jsx("button",{onClick:g,disabled:n||!e.trim(),style:{padding:"8px 20px",background:n||!e.trim()?"#333":"#ff6b35",color:"#fff",fontWeight:600,fontSize:13,border:"none",borderRadius:8,cursor:n||!e.trim()?"not-allowed":"pointer",opacity:n||!e.trim()?.5:1},children:n?"Roasting...":"Roast It"})]})]}),s&&i.jsx("div",{style:{background:"#2e1a1a",border:"1px solid #5a2a2a",borderRadius:10,padding:12,marginBottom:16,color:"#ef5350",fontSize:12},children:s}),c&&i.jsx(mg,{accentColor:"#ff6b35",onEmailChange:h=>{m(h),localStorage.setItem("bilko_pro_email",h)}}),o&&i.jsxs("div",{children:[i.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:24,textAlign:"center",marginBottom:16},children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:16,marginBottom:10},children:[i.jsx("span",{style:{fontSize:56,fontWeight:900,color:"#fff"},children:o.total_score}),i.jsxs("div",{style:{textAlign:"left"},children:[i.jsx("div",{style:{fontSize:32,fontWeight:900,color:S},children:o.grade}),i.jsx("div",{style:{fontSize:10,color:"#555",textTransform:"uppercase",letterSpacing:2},children:"/ 100"})]})]}),i.jsxs("p",{style:{color:"#ff6b35",fontSize:14,fontWeight:600,fontStyle:"italic",maxWidth:480,margin:"0 auto 12px"},children:['"',o.roast,'"']}),i.jsx(gt,{shareText:`My landing page scored ${o.total_score}/100 on PageRoast by ContentGrade Suite. Get your free audit → https://contentintelligence.ai`,accentColor:"#ff6b35"})]}),o.top_fixes.length>0&&i.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:12},children:[i.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,margin:0},children:"#1 Highest-Impact Fix"}),i.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"})]}),i.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:10,padding:12,borderRadius:8,background:"#0d0d1a",border:"1px solid #1a1a2e"},children:[i.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"}),i.jsx("p",{style:{color:"#ddd",fontSize:13,margin:0,lineHeight:1.5},children:o.top_fixes[0]})]})]}),i.jsx($n,{tool:"page-roast",score:o.total_score,accentColor:"#ff6b35"}),i.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[i.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:16},children:"Section Breakdown"}),Object.entries(o.section_scores).map(([h,v])=>i.jsx(jg,{sectionKey:h,section:v},h))]}),o.top_fixes.length>1&&i.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[i.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:14},children:"All High-Impact Fixes"}),o.top_fixes.slice(1).map((h,v)=>i.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:10,padding:10,borderRadius:8,background:"#0d0d1a",border:"1px solid #1a1a2e",marginBottom:8},children:[i.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:v+2}),i.jsx("p",{style:{color:"#ddd",fontSize:13,margin:0,lineHeight:1.5},children:h})]},v))]}),i.jsx("div",{style:{background:"#1a1a10",border:"1px solid #3a3a1a",borderRadius:14,padding:16,textAlign:"center",marginBottom:16},children:i.jsx("p",{style:{color:"#ffd54f",fontSize:12,fontWeight:500,margin:0},children:o.competitor_edge})}),i.jsx(Zt,{accentColor:"#ff6b35"})]})]})}function qa({label:e,url:t,result:n,isWinner:r,isDimmed:o}){const l=_u[n.grade]??"#777";return i.jsxs("div",{style:{flex:1,background:"#12121f",border:`1px solid ${r?"#4caf50":"#1a1a2e"}`,borderRadius:14,padding:16,opacity:o?.55:1,transition:"opacity 0.3s",position:"relative"},children:[r&&i.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"}),i.jsxs("div",{style:{textAlign:"center",marginBottom:12},children:[i.jsx("div",{style:{fontSize:10,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:4},children:e}),i.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:10},children:[i.jsx("span",{style:{fontSize:44,fontWeight:900,color:"#fff"},children:n.total_score}),i.jsx("span",{style:{fontSize:26,fontWeight:900,color:l},children:n.grade})]}),i.jsxs("p",{style:{color:"#ff6b35",fontSize:11,fontStyle:"italic",marginTop:4},children:['"',n.roast,'"']}),i.jsx("p",{style:{color:"#555",fontSize:9,marginTop:4,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t})]}),i.jsx("div",{style:{borderTop:"1px solid #1a1a2e",paddingTop:12},children:Object.entries(n.section_scores).map(([s,a])=>{const c=Io[s]??{label:s,icon:"•"},d=Math.round(a.score/a.max*100),p=d>=80?"#4caf50":d>=60?"#4a90d9":d>=40?"#ffd54f":"#ef5350";return i.jsxs("div",{style:{marginBottom:8},children:[i.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:3},children:[i.jsxs("span",{style:{fontSize:10,color:"#777"},children:[c.icon," ",c.label]}),i.jsxs("span",{style:{fontSize:10,color:"#999",fontWeight:700},children:[a.score,"/",a.max]})]}),i.jsx("div",{style:{height:4,background:"#1a1a2e",borderRadius:2,overflow:"hidden"},children:i.jsx("div",{style:{height:"100%",background:p,borderRadius:2,width:`${d}%`}})})]},s)})})]})}function kg(){const[e,t]=x.useState(""),[n,r]=x.useState(""),[o,l]=x.useState(!1),[s,a]=x.useState(null),[c,d]=x.useState(null);async function p(){if(!(!e.trim()||!n.trim())){l(!0),a(null),d(null);try{const S=await fetch(`${F}/demos/page-roast/compare`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url_a:e.trim(),url_b:n.trim()})}),h=await S.json();if(!S.ok)throw new Error(h.error||`HTTP ${S.status}`);a(h)}catch(S){d(S instanceof Error?S.message:"Comparison failed.")}finally{l(!1)}}}const m=e.trim().length>0&&n.trim().length>0,g=s==null?void 0:s.comparison.section_winners;return i.jsxs(i.Fragment,{children:[i.jsx("div",{style:{display:"flex",gap:12,marginBottom:12},children:["A","B"].map(S=>{const h=S==="A"?e:n,v=S==="A"?t:r;return i.jsxs("div",{style:{flex:1},children:[i.jsxs("div",{style:{fontSize:10,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:6},children:["Page ",S]}),i.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-${S.toLowerCase()}.com`,value:h,onChange:w=>v(w.target.value)})]},S)})}),i.jsx("div",{style:{display:"flex",justifyContent:"flex-end",marginBottom:20},children:i.jsx("button",{onClick:p,disabled:o||!m,style:{padding:"8px 20px",background:o||!m?"#333":"#ff6b35",color:"#fff",fontWeight:600,fontSize:13,border:"none",borderRadius:8,cursor:o||!m?"not-allowed":"pointer",opacity:o||!m?.5:1},children:o?"Comparing...":"Compare"})}),c&&i.jsx("div",{style:{background:"#2e1a1a",border:"1px solid #5a2a2a",borderRadius:10,padding:12,marginBottom:16,color:"#ef5350",fontSize:12},children:c}),s&&i.jsxs("div",{children:[s.comparison.winner!=="tie"?i.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:[i.jsxs("div",{style:{textAlign:"center"},children:[i.jsxs("div",{style:{color:"#4caf50",fontWeight:800,fontSize:15},children:["Page ",s.comparison.winner," wins"]}),i.jsxs("div",{style:{color:"#2e7d32",fontSize:11,marginTop:2},children:["+",s.comparison.margin," pts · ",Math.round(s.comparison.margin/Math.max(s.comparison.winner==="A"?s.score_b.total_score:s.score_a.total_score,1)*100),"% stronger"]})]}),i.jsx(gt,{shareText:`Page ${s.comparison.winner} won my A/B landing page test on PageRoast by ${s.comparison.margin} points. Try ContentGrade Suite → https://contentintelligence.ai`,accentColor:"#4caf50"})]}):i.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"}),i.jsxs("div",{style:{display:"flex",gap:12,marginBottom:16,paddingTop:16},children:[i.jsx(qa,{label:"Page A",url:e,result:s.score_a,isWinner:s.comparison.winner==="A",isDimmed:s.comparison.winner==="B"}),i.jsx(qa,{label:"Page B",url:n,result:s.score_b,isWinner:s.comparison.winner==="B",isDimmed:s.comparison.winner==="A"})]}),g&&i.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[i.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:14},children:"Section Winners"}),i.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:12},children:[i.jsx("thead",{children:i.jsx("tr",{style:{borderBottom:"1px solid #1a1a2e"},children:["Section","A Score","B Score","Winner"].map(S=>i.jsx("th",{style:{padding:"6px 8px",textAlign:"left",color:"#555",fontWeight:600,fontSize:10,textTransform:"uppercase",letterSpacing:1},children:S},S))})}),i.jsx("tbody",{children:Object.keys(Io).map(S=>{const h=g[S],v=s.score_a.section_scores[S].score,w=s.score_b.section_scores[S].score,f=Io[S];return i.jsxs("tr",{style:{borderBottom:"1px solid #0d0d1a"},children:[i.jsxs("td",{style:{padding:"8px",color:"#aaa"},children:[f.icon," ",f.label]}),i.jsxs("td",{style:{padding:"8px",color:h==="A"?"#4caf50":"#666",fontWeight:h==="A"?700:400},children:[v,"/25"]}),i.jsxs("td",{style:{padding:"8px",color:h==="B"?"#4caf50":"#666",fontWeight:h==="B"?700:400},children:[w,"/25"]}),i.jsx("td",{style:{padding:"8px",color:h==="tie"?"#ffd54f":"#4caf50",fontWeight:700},children:h==="tie"?"Tie":`Page ${h}`})]},S)})})]})]}),i.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[i.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:10},children:"Verdict"}),i.jsx("p",{style:{color:"#bbb",fontSize:13,lineHeight:1.6,margin:0},children:s.comparison.verdict})]}),i.jsxs("div",{style:{background:"#2a1a10",border:"1px solid #5a3a1a",borderRadius:14,padding:20},children:[i.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#ff6b35",textTransform:"uppercase",letterSpacing:2,marginBottom:10},children:"Strategic Analysis"}),i.jsx("p",{style:{color:"#e0e0e0",fontSize:13,lineHeight:1.6,margin:0},children:s.comparison.analysis})]})]})]})}function Cg(){const[e,t]=x.useState("roast");return i.jsxs("div",{style:{padding:24,maxWidth:720,margin:"0 auto"},children:[i.jsxs("div",{style:{textAlign:"center",marginBottom:28},children:[i.jsx("div",{style:{fontSize:9,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:6,fontFamily:"monospace"},children:"ContentGrade Suite"}),i.jsxs("h1",{style:{fontSize:28,fontWeight:800,color:"#e0e0e0",letterSpacing:-.5},children:["Page",i.jsx("span",{style:{color:"#ff6b35"},children:"Roast"})]}),i.jsxs("p",{style:{color:"#777",fontSize:14,marginTop:6},children:["Paste a URL. Get a brutally honest landing page audit in ",i.jsx("span",{style:{color:"#ccc",fontWeight:500},children:"60 seconds"}),"."]}),i.jsx("div",{style:{display:"flex",flexWrap:"wrap",justifyContent:"center",gap:6,marginTop:12},children:["Hero Section","Social Proof","Clarity","Conversion"].map(n=>i.jsx("span",{style:{fontSize:10,padding:"3px 10px",borderRadius:12,background:"#12121f",color:"#666",border:"1px solid #1a1a2e"},children:n},n))})]}),i.jsxs("div",{style:{display:"flex",gap:4,background:"#12121f",border:"1px solid #1a1a2e",borderRadius:10,padding:4,marginBottom:24,width:"fit-content"},children:[i.jsx("button",{onClick:()=>t("roast"),style:{padding:"7px 18px",borderRadius:8,border:"none",cursor:"pointer",fontSize:12,fontWeight:600,background:e==="roast"?"#ff6b35":"transparent",color:e==="roast"?"#fff":"#666",transition:"background 0.2s, color 0.2s"},children:"Roast"}),i.jsx("button",{onClick:()=>t("compare"),style:{padding:"7px 18px",borderRadius:8,border:"none",cursor:"pointer",fontSize:12,fontWeight:600,background:e==="compare"?"#4a2a10":"transparent",color:e==="compare"?"#ff9966":"#444",transition:"background 0.2s, color 0.2s"},children:"A/B Compare"})]}),e==="roast"&&i.jsx(wg,{}),e==="compare"&&i.jsx(kg,{}),i.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 Eu={"A+":"#4caf50",A:"#4caf50","A-":"#4caf50","B+":"#4a90d9",B:"#4a90d9","B-":"#4a90d9","C+":"#ffd54f",C:"#ffd54f","C-":"#ffd54f",D:"#ff9800",F:"#ef5350"},en={hook:"Hook Strength",value_prop:"Value Proposition",emotional:"Emotional Architecture",cta_conversion:"CTA & Conversion"},Ru=["facebook","google","linkedin"],q="#00bfa5";function bg({pillarKey:e,pillar:t}){const n=en[e]??e,r=Math.round(t.score/t.max*100),o=r>=80?"#4caf50":r>=60?"#4a90d9":r>=40?"#ffd54f":"#ef5350";return i.jsxs("div",{style:{marginBottom:20},children:[i.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:4},children:[i.jsx("span",{style:{fontSize:12,fontWeight:500,color:"#ccc"},children:n}),i.jsxs("span",{style:{fontSize:12,fontWeight:700,color:"#ddd"},children:[t.score,"/",t.max]})]}),i.jsx("div",{style:{height:6,background:"#1a1a2e",borderRadius:3,overflow:"hidden"},children:i.jsx("div",{style:{height:"100%",background:o,borderRadius:3,width:`${r}%`,transition:"width 0.7s ease"}})}),i.jsx("p",{style:{marginTop:6,fontSize:11,color:"#777",lineHeight:1.4},children:t.feedback})]})}function Ja({label:e,result:t,isWinner:n,isDimmed:r}){const o=Eu[t.grade]??"#777";return i.jsxs("div",{style:{flex:1,background:n?"#0a2a25":"#12121f",border:`1px solid ${n?"#1a4a3a":"#1a1a2e"}`,borderRadius:12,padding:16,opacity:r?.6:1,transition:"opacity 0.3s"},children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:10},children:[i.jsx("span",{style:{fontSize:10,color:"#555",textTransform:"uppercase",letterSpacing:2},children:e}),n&&i.jsx("span",{style:{fontSize:9,padding:"2px 7px",borderRadius:4,background:"#4caf5020",color:"#4caf50",border:"1px solid #4caf5033",fontFamily:"monospace",fontWeight:700},children:"WINNER"})]}),i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:10},children:[i.jsx("span",{style:{fontSize:40,fontWeight:900,color:"#fff"},children:t.total_score}),i.jsx("span",{style:{fontSize:24,fontWeight:900,color:o},children:t.grade})]}),Object.keys(en).map(l=>{const s=t.pillar_scores[l],a=Math.round(s.score/s.max*100),c=a>=80?"#4caf50":a>=60?"#4a90d9":a>=40?"#ffd54f":"#ef5350";return i.jsxs("div",{style:{marginBottom:6},children:[i.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:2},children:[i.jsx("span",{style:{fontSize:9,color:"#666"},children:en[l]}),i.jsxs("span",{style:{fontSize:9,color:"#888",fontWeight:700},children:[s.score,"/",s.max]})]}),i.jsx("div",{style:{height:3,background:"#1a1a2e",borderRadius:2,overflow:"hidden"},children:i.jsx("div",{style:{height:"100%",background:c,borderRadius:2,width:`${a}%`}})})]},l)})]})}function zg({adCopy:e,setAdCopy:t}){const[n,r]=x.useState("facebook"),[o,l]=x.useState(!1),[s,a]=x.useState(null),[c,d]=x.useState(null);async function p(){if(!(!e.trim()||e.trim().length<10)){l(!0),a(null),d(null);try{const g=await fetch(`${F}/demos/ad-scorer`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adCopy:e.trim(),platform:n})}),S=await g.json();if(!g.ok)throw new Error(S.error||`HTTP ${g.status}`);a(S)}catch(g){d(g instanceof Error?g.message:"Scoring failed.")}finally{l(!1)}}}const m=s?Eu[s.grade]??"#777":"#777";return i.jsxs(i.Fragment,{children:[i.jsx("div",{style:{display:"flex",gap:8,marginBottom:12,justifyContent:"center"},children:Ru.map(g=>i.jsx("button",{onClick:()=>r(g),style:{padding:"5px 14px",fontSize:11,fontWeight:600,borderRadius:6,border:n===g?`1px solid ${q}`:"1px solid #1a1a2e",background:n===g?"#0a2a25":"#12121f",color:n===g?q:"#555",cursor:"pointer",textTransform:"capitalize"},children:g},g))}),i.jsxs("div",{style:{marginBottom:20},children:[i.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 ${n} ad copy here...`,value:e,onChange:g=>t(g.target.value),onKeyDown:g=>{g.key==="Enter"&&(g.metaKey||g.ctrlKey)&&p()}}),i.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:8},children:[i.jsxs("span",{style:{fontSize:10,color:"#444"},children:[e.length,"/2000 chars · Ctrl+Enter to score"]}),i.jsx("button",{onClick:p,disabled:o||e.trim().length<10,style:{padding:"8px 20px",background:o||e.trim().length<10?"#333":q,color:"#fff",fontWeight:600,fontSize:13,border:"none",borderRadius:8,cursor:o||e.trim().length<10?"not-allowed":"pointer",opacity:o||e.trim().length<10?.5:1},children:o?"Scoring...":"Score It"})]})]}),c&&i.jsx("div",{style:{background:"#2e1a1a",border:"1px solid #5a2a2a",borderRadius:10,padding:12,marginBottom:16,color:"#ef5350",fontSize:12},children:c}),s&&i.jsxs("div",{children:[i.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:24,textAlign:"center",marginBottom:16},children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:16,marginBottom:10},children:[i.jsx("span",{style:{fontSize:56,fontWeight:900,color:"#fff"},children:s.total_score}),i.jsxs("div",{style:{textAlign:"left"},children:[i.jsx("div",{style:{fontSize:32,fontWeight:900,color:m},children:s.grade}),i.jsx("div",{style:{fontSize:10,color:"#555",textTransform:"uppercase",letterSpacing:2},children:"/ 100"})]})]}),i.jsxs("p",{style:{color:q,fontSize:14,fontWeight:600,fontStyle:"italic",maxWidth:480,margin:"0 auto 12px"},children:['"',s.verdict,'"']}),i.jsx(gt,{shareText:`My ad copy scored ${s.total_score}/100 on AdScorer by Content Intelligence Stack. Grade yours → https://contentintelligence.ai`,accentColor:q})]}),s.rewrites&&s.rewrites.length>0&&i.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:12},children:[i.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,margin:0},children:"Best Rewrite"}),i.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"})]}),i.jsxs("div",{style:{padding:12,borderRadius:8,background:"#0d0d1a",border:"1px solid #1a1a2e"},children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:6},children:[i.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:q},children:s.rewrites[0].predicted_score}),i.jsxs("span",{style:{fontSize:10,color:"#555"},children:["Optimized for: ",i.jsx("span",{style:{color:"#777"},children:en[s.rewrites[0].optimized_for]??s.rewrites[0].optimized_for})]})]}),i.jsx("p",{style:{color:"#ddd",fontSize:13,margin:0,lineHeight:1.5,whiteSpace:"pre-line"},children:s.rewrites[0].text})]})]}),i.jsx($n,{tool:"ad-scorer",score:s.total_score}),i.jsxs($t,{accentColor:q,label:"Full Ad Analysis",children:[i.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[i.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:16},children:"Pillar Breakdown"}),Object.entries(s.pillar_scores).map(([g,S])=>i.jsx(bg,{pillarKey:g,pillar:S},g))]}),s.rewrites&&s.rewrites.length>1&&i.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[i.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:14},children:"All AI Rewrites"}),s.rewrites.slice(1).map((g,S)=>i.jsxs("div",{style:{padding:12,borderRadius:8,background:"#0d0d1a",border:"1px solid #1a1a2e",marginBottom:8},children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:6},children:[i.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:q},children:g.predicted_score}),i.jsxs("span",{style:{fontSize:10,color:"#555"},children:["Optimized for: ",i.jsx("span",{style:{color:"#777"},children:en[g.optimized_for]??g.optimized_for})]})]}),i.jsx("p",{style:{color:"#ddd",fontSize:13,margin:0,lineHeight:1.5,whiteSpace:"pre-line"},children:g.text})]},S))]}),s.upgrade_hook&&i.jsx("div",{style:{background:"#0a2a25",border:"1px solid #1a4a3a",borderRadius:14,padding:16,textAlign:"center"},children:i.jsx("p",{style:{color:q,fontSize:12,fontWeight:500,margin:0},children:s.upgrade_hook})})]}),i.jsx(Zt,{accentColor:q})]})]})}function _g({onTryHybrid:e}){const[t,n]=x.useState(""),[r,o]=x.useState(""),[l,s]=x.useState("facebook"),[a,c]=x.useState(!1),[d,p]=x.useState(null),[m,g]=x.useState(null);async function S(){if(!(!t.trim()||!r.trim())){c(!0),p(null),g(null);try{const w=await fetch(`${F}/demos/ad-scorer/compare`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adCopyA:t.trim(),adCopyB:r.trim(),platform:l})}),f=await w.json();if(!w.ok)throw new Error(f.error||`HTTP ${w.status}`);p(f)}catch(w){g(w instanceof Error?w.message:"Comparison failed.")}finally{c(!1)}}}const h=t.trim().length>=10&&r.trim().length>=10,v=d==null?void 0:d.comparison.pillar_winners;return i.jsxs(i.Fragment,{children:[i.jsx("div",{style:{display:"flex",gap:8,marginBottom:14,justifyContent:"center"},children:Ru.map(w=>i.jsx("button",{onClick:()=>s(w),style:{padding:"5px 14px",fontSize:11,fontWeight:600,borderRadius:6,border:l===w?`1px solid ${q}`:"1px solid #1a1a2e",background:l===w?"#0a2a25":"#12121f",color:l===w?q:"#555",cursor:"pointer",textTransform:"capitalize"},children:w},w))}),i.jsx("div",{style:{display:"flex",gap:12,marginBottom:12},children:["A","B"].map(w=>{const f=w==="A"?t:r,u=w==="A"?n:o;return i.jsxs("div",{style:{flex:1},children:[i.jsxs("div",{style:{fontSize:10,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:6},children:["Ad Copy ",w]}),i.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 ${l} ad copy ${w}...`,value:f,onChange:y=>u(y.target.value)})]},w)})}),i.jsx("div",{style:{display:"flex",justifyContent:"flex-end",marginBottom:20},children:i.jsx("button",{onClick:S,disabled:a||!h,style:{padding:"8px 20px",background:a||!h?"#333":q,color:"#fff",fontWeight:600,fontSize:13,border:"none",borderRadius:8,cursor:a||!h?"not-allowed":"pointer",opacity:a||!h?.5:1},children:a?"Comparing...":"Compare"})}),m&&i.jsx("div",{style:{background:"#2e1a1a",border:"1px solid #5a2a2a",borderRadius:10,padding:12,marginBottom:16,color:"#ef5350",fontSize:12},children:m}),d&&i.jsxs("div",{children:[d.comparison.winner!=="tie"?i.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:[i.jsxs("div",{style:{textAlign:"center"},children:[i.jsxs("div",{style:{color:"#4caf50",fontWeight:800,fontSize:15},children:["Ad Copy ",d.comparison.winner," wins"]}),i.jsxs("div",{style:{color:"#2e7d32",fontSize:11,marginTop:2},children:["+",d.comparison.margin," pts · ",Math.round(d.comparison.margin/Math.max(d.comparison.winner==="A"?d.adCopyB.total_score:d.adCopyA.total_score,1)*100),"% stronger"]})]}),i.jsx(gt,{shareText:`Ad Copy ${d.comparison.winner} won my A/B test on AdScorer by ${d.comparison.margin} points. Try Content Intelligence Stack → https://contentintelligence.ai`,accentColor:"#4caf50"})]}):i.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"}),i.jsxs("div",{style:{display:"flex",gap:12,marginBottom:16,paddingTop:16},children:[i.jsx(Ja,{label:"Ad Copy A",result:d.adCopyA,isWinner:d.comparison.winner==="A",isDimmed:d.comparison.winner==="B"}),i.jsx(Ja,{label:"Ad Copy B",result:d.adCopyB,isWinner:d.comparison.winner==="B",isDimmed:d.comparison.winner==="A"})]}),v&&i.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[i.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:14},children:"Pillar Winners"}),i.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:12},children:[i.jsx("thead",{children:i.jsx("tr",{style:{borderBottom:"1px solid #1a1a2e"},children:["Pillar","A Score","B Score","Winner"].map(w=>i.jsx("th",{style:{padding:"6px 8px",textAlign:"left",color:"#555",fontWeight:600,fontSize:10,textTransform:"uppercase",letterSpacing:1},children:w},w))})}),i.jsx("tbody",{children:Object.keys(en).map(w=>{const f=v[w],u=d.adCopyA.pillar_scores[w].score,y=d.adCopyB.pillar_scores[w].score;return i.jsxs("tr",{style:{borderBottom:"1px solid #0d0d1a"},children:[i.jsx("td",{style:{padding:"8px",color:"#aaa"},children:en[w]}),i.jsx("td",{style:{padding:"8px",color:f==="A"?"#4caf50":"#666",fontWeight:f==="A"?700:400},children:u}),i.jsx("td",{style:{padding:"8px",color:f==="B"?"#4caf50":"#666",fontWeight:f==="B"?700:400},children:y}),i.jsx("td",{style:{padding:"8px",color:f==="tie"?"#ffd54f":"#4caf50",fontWeight:700},children:f==="tie"?"Tie":`Copy ${f}`})]},w)})})]})]}),i.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[i.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:10},children:"Analysis"}),i.jsx("p",{style:{color:"#bbb",fontSize:13,lineHeight:1.6,margin:"0 0 10px"},children:d.comparison.verdict}),d.comparison.strategic_analysis&&i.jsxs("p",{style:{color:"#777",fontSize:12,lineHeight:1.5,margin:0,borderTop:"1px solid #1a1a2e",paddingTop:10},children:[i.jsx("span",{style:{color:q,fontWeight:600},children:"Next test: "}),d.comparison.strategic_analysis]})]}),i.jsxs("div",{style:{background:"#0a2520",border:"1px solid #1a4a3a",borderRadius:14,padding:20},children:[i.jsx("h2",{style:{fontSize:11,fontWeight:600,color:q,textTransform:"uppercase",letterSpacing:2,marginBottom:10},children:"Suggested Hybrid"}),i.jsx("p",{style:{color:"#e0e0e0",fontSize:13,fontWeight:600,lineHeight:1.6,marginBottom:14},children:d.comparison.suggested_hybrid}),i.jsx("button",{onClick:()=>{const w=d.comparison.suggested_hybrid.split(" | ")[0].trim();e(w)},style:{padding:"7px 16px",background:q,color:"#fff",fontWeight:600,fontSize:12,border:"none",borderRadius:8,cursor:"pointer"},children:"Try this copy →"})]})]})]})}function Eg(){const[e,t]=x.useState("score"),[n,r]=x.useState("");return i.jsxs("div",{style:{padding:24,maxWidth:720,margin:"0 auto"},children:[i.jsxs("div",{style:{textAlign:"center",marginBottom:28},children:[i.jsx("div",{style:{fontSize:9,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:6,fontFamily:"monospace"},children:"ContentGrade Suite"}),i.jsxs("h1",{style:{fontSize:28,fontWeight:800,color:"#e0e0e0",letterSpacing:-.5},children:["Ad",i.jsx("span",{style:{color:q},children:"Scorer"})]}),i.jsxs("p",{style:{color:"#777",fontSize:14,marginTop:6},children:["Paste your ad copy. Get a ",i.jsx("span",{style:{color:"#ccc",fontWeight:500},children:"direct response audit"})," in seconds."]}),i.jsx("div",{style:{display:"flex",flexWrap:"wrap",justifyContent:"center",gap:6,marginTop:12},children:["Hook Strength","Value Prop","Emotional Arc","CTA & Conversion"].map(o=>i.jsx("span",{style:{fontSize:10,padding:"3px 10px",borderRadius:12,background:"#12121f",color:"#666",border:"1px solid #1a1a2e"},children:o},o))})]}),i.jsxs("div",{style:{display:"flex",gap:4,background:"#12121f",border:"1px solid #1a1a2e",borderRadius:10,padding:4,marginBottom:24,width:"fit-content"},children:[i.jsx("button",{onClick:()=>t("score"),style:{padding:"7px 18px",borderRadius:8,border:"none",cursor:"pointer",fontSize:12,fontWeight:600,background:e==="score"?q:"transparent",color:e==="score"?"#fff":"#666",transition:"background 0.2s, color 0.2s"},children:"Score"}),i.jsxs("button",{onClick:()=>t("compare"),style:{padding:"7px 18px",borderRadius:8,border:"none",cursor:"pointer",fontSize:12,fontWeight:600,background:e==="compare"?"#0a2a25":"transparent",color:e==="compare"?q:"#444",transition:"background 0.2s, color 0.2s",display:"flex",alignItems:"center",gap:6},children:["A/B Compare",i.jsx("span",{style:{fontSize:8,padding:"1px 6px",borderRadius:4,background:`${q}22`,color:q,border:`1px solid ${q}33`,fontFamily:"monospace",fontWeight:700,letterSpacing:.5},children:"PRO"})]})]}),e==="score"&&i.jsx(zg,{adCopy:n,setAdCopy:r}),e==="compare"&&i.jsx("div",{children:i.jsx($t,{accentColor:q,label:"A/B Compare Mode",children:i.jsx(_g,{onTryHybrid:o=>{r(o),t("score")}})})}),i.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 Tu={"A+":"#4caf50",A:"#4caf50","A-":"#4caf50","B+":"#4a90d9",B:"#4a90d9","B-":"#4a90d9","C+":"#ffd54f",C:"#ffd54f","C-":"#ffd54f",D:"#ff9800",F:"#ef5350"},_r={hook:"Hook Strength",tension:"Tension Chain",payoff:"Payoff",share_trigger:"Share Trigger"},oe="#1da1f2";function Tl(e){const t=e.split(/---|\n\n/).map(n=>n.trim()).filter(Boolean);return Math.max(1,t.length)}function Xa({pillarKey:e,pillar:t}){const n=_r[e]??e,r=Math.round(t.score/t.max*100),o=r>=80?"#4caf50":r>=60?"#4a90d9":r>=40?"#ffd54f":"#ef5350";return i.jsxs("div",{style:{marginBottom:20},children:[i.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:4},children:[i.jsx("span",{style:{fontSize:12,fontWeight:500,color:"#ccc"},children:n}),i.jsxs("span",{style:{fontSize:12,fontWeight:700,color:"#ddd"},children:[t.score,"/",t.max]})]}),i.jsx("div",{style:{height:6,background:"#1a1a2e",borderRadius:3,overflow:"hidden"},children:i.jsx("div",{style:{height:"100%",background:o,borderRadius:3,width:`${r}%`,transition:"width 0.7s ease"}})}),i.jsx("p",{style:{marginTop:6,fontSize:11,color:"#777",lineHeight:1.4},children:t.feedback})]})}function Za({label:e,result:t,isWinner:n,isDimmed:r}){const o=Tu[t.grade]??"#777";return i.jsxs("div",{style:{flex:1,background:n?"#0a1e2e":"#12121f",border:`1px solid ${n?"#1a3a5a":"#1a1a2e"}`,borderRadius:12,padding:16,opacity:r?.6:1,transition:"opacity 0.3s"},children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:10},children:[i.jsx("span",{style:{fontSize:10,color:"#555",textTransform:"uppercase",letterSpacing:2},children:e}),n&&i.jsx("span",{style:{fontSize:9,padding:"2px 7px",borderRadius:4,background:"#4caf5020",color:"#4caf50",border:"1px solid #4caf5033",fontFamily:"monospace",fontWeight:700},children:"WINNER"})]}),i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:10},children:[i.jsx("span",{style:{fontSize:40,fontWeight:900,color:"#fff"},children:t.total_score}),i.jsx("span",{style:{fontSize:24,fontWeight:900,color:o},children:t.grade})]}),Object.keys(_r).map(l=>{const s=t.pillar_scores[l],a=Math.round(s.score/s.max*100),c=a>=80?"#4caf50":a>=60?"#4a90d9":a>=40?"#ffd54f":"#ef5350";return i.jsxs("div",{style:{marginBottom:6},children:[i.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:2},children:[i.jsx("span",{style:{fontSize:9,color:"#666"},children:_r[l]}),i.jsxs("span",{style:{fontSize:9,color:"#888",fontWeight:700},children:[s.score,"/",s.max]})]}),i.jsx("div",{style:{height:3,background:"#1a1a2e",borderRadius:2,overflow:"hidden"},children:i.jsx("div",{style:{height:"100%",background:c,borderRadius:2,width:`${a}%`}})})]},l)})]})}function Rg({threadText:e,setThreadText:t}){const[n,r]=x.useState(!1),[o,l]=x.useState(null),[s,a]=x.useState(null),[c,d]=x.useState(!1),p=Tl(e);async function m(){if(!(!e.trim()||e.trim().length<20)){r(!0),l(null),a(null);try{const h=await fetch(`${F}/demos/thread-grader`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({threadText:e.trim()})}),v=await h.json();if(!h.ok)throw new Error(v.error||`HTTP ${h.status}`);l(v)}catch(h){a(h instanceof Error?h.message:"Scoring failed.")}finally{r(!1)}}}function g(){if(!o)return;const h=encodeURIComponent(`My thread scored ${o.total_score}/100 on ThreadGrader — try yours: https://contentintelligence.ai`);window.open(`https://twitter.com/intent/tweet?text=${h}`,"_blank"),d(!0)}const S=o?Tu[o.grade]??"#777":"#777";return i.jsxs(i.Fragment,{children:[i.jsxs("div",{style:{marginBottom:20},children:[i.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:e,onChange:h=>t(h.target.value),onKeyDown:h=>{h.key==="Enter"&&(h.metaKey||h.ctrlKey)&&m()}}),i.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:8},children:[i.jsxs("span",{style:{fontSize:10,color:"#444"},children:[p," tweet",p!==1?"s":""," · ",e.length,"/5000 chars · Ctrl+Enter to grade"]}),i.jsx("button",{onClick:m,disabled:n||e.trim().length<20,style:{padding:"8px 20px",background:n||e.trim().length<20?"#333":oe,color:"#fff",fontWeight:600,fontSize:13,border:"none",borderRadius:8,cursor:n||e.trim().length<20?"not-allowed":"pointer",opacity:n||e.trim().length<20?.5:1},children:n?"Grading...":"Grade Thread"})]})]}),s&&i.jsx("div",{style:{background:"#2e1a1a",border:"1px solid #5a2a2a",borderRadius:10,padding:12,marginBottom:16,color:"#ef5350",fontSize:12},children:s}),o&&i.jsxs("div",{children:[i.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:24,textAlign:"center",marginBottom:16},children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:16,marginBottom:10},children:[i.jsx("span",{style:{fontSize:56,fontWeight:900,color:"#fff"},children:o.total_score}),i.jsxs("div",{style:{textAlign:"left"},children:[i.jsx("div",{style:{fontSize:32,fontWeight:900,color:S},children:o.grade}),i.jsx("div",{style:{fontSize:10,color:"#555",textTransform:"uppercase",letterSpacing:2},children:"/ 100"})]})]}),i.jsxs("p",{style:{color:oe,fontSize:14,fontWeight:600,fontStyle:"italic",maxWidth:480,margin:"0 auto 16px"},children:['"',o.verdict,'"']}),i.jsxs("div",{style:{display:"flex",justifyContent:"center",gap:10,flexWrap:"wrap"},children:[i.jsx(gt,{shareText:`My thread scored ${o.total_score}/100 on ThreadGrader. Grade yours → https://contentintelligence.ai`,accentColor:oe}),i.jsx("button",{onClick:g,style:{padding:"7px 14px",background:c?"#0a2a3a":"#1a3a5a",color:c?"#4caf50":oe,border:`1px solid ${c?"#1a5a2a":"#1a5a7a"}`,borderRadius:8,cursor:"pointer",fontSize:12,fontWeight:600},children:c?"✓ Tweeted!":"Tweet Your Score"})]})]}),i.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:14},children:[i.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,margin:0},children:"Hook Analysis"}),i.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"})]}),i.jsx(Xa,{pillarKey:"hook",pillar:o.pillar_scores.hook})]}),o.rewrites&&o.rewrites.length>0&&i.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:12},children:[i.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,margin:0},children:"Best Hook Rewrite"}),i.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"})]}),i.jsxs("div",{style:{padding:14,borderRadius:8,background:"#0d0d1a",border:"1px solid #1a1a2e"},children:[i.jsx("div",{style:{fontSize:10,color:oe,fontWeight:700,marginBottom:8,textTransform:"uppercase",letterSpacing:1},children:o.rewrites[0].label}),i.jsx("p",{style:{color:"#ddd",fontSize:13,margin:"0 0 8px",lineHeight:1.6,whiteSpace:"pre-line"},children:o.rewrites[0].text}),i.jsx("p",{style:{color:"#666",fontSize:11,margin:0,fontStyle:"italic"},children:o.rewrites[0].why_better})]})]}),i.jsx($n,{tool:"thread-grader",score:o.total_score}),i.jsxs($t,{accentColor:oe,label:"Full Thread Analysis",children:[i.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[i.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:16},children:"Full Pillar Breakdown"}),Object.entries(o.pillar_scores).map(([h,v])=>i.jsx(Xa,{pillarKey:h,pillar:v},h))]}),o.tweet_breakdown&&o.tweet_breakdown.length>0&&i.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[i.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:14},children:"Tweet-by-Tweet Breakdown"}),i.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:12},children:[i.jsx("thead",{children:i.jsx("tr",{style:{borderBottom:"1px solid #1a1a2e"},children:["#","Preview","Score","Note"].map(h=>i.jsx("th",{style:{padding:"6px 8px",textAlign:"left",color:"#555",fontWeight:600,fontSize:10,textTransform:"uppercase",letterSpacing:1},children:h},h))})}),i.jsx("tbody",{children:o.tweet_breakdown.map((h,v)=>{const w=h.score>=8?"#4caf50":h.score>=5?"#ffd54f":"#ef5350";return i.jsxs("tr",{style:{borderBottom:"1px solid #0d0d1a"},children:[i.jsx("td",{style:{padding:"8px",color:"#555",fontFamily:"monospace",fontWeight:700},children:h.tweet_index}),i.jsx("td",{style:{padding:"8px",color:"#aaa",maxWidth:200},children:i.jsx("span",{style:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h.text_preview})}),i.jsxs("td",{style:{padding:"8px",color:w,fontWeight:700},children:[h.score,"/10"]}),i.jsx("td",{style:{padding:"8px",color:"#777",fontSize:11},children:h.note})]},v)})})]})]}),o.rewrites&&o.rewrites.length>1&&i.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[i.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:14},children:"All Hook Rewrites"}),o.rewrites.slice(1).map((h,v)=>i.jsxs("div",{style:{padding:14,borderRadius:8,background:"#0d0d1a",border:"1px solid #1a1a2e",marginBottom:8},children:[i.jsx("div",{style:{fontSize:10,color:oe,fontWeight:700,marginBottom:8,textTransform:"uppercase",letterSpacing:1},children:h.label}),i.jsx("p",{style:{color:"#ddd",fontSize:13,margin:"0 0 8px",lineHeight:1.6,whiteSpace:"pre-line"},children:h.text}),i.jsx("p",{style:{color:"#666",fontSize:11,margin:0,fontStyle:"italic"},children:h.why_better})]},v))]}),o.upgrade_hook&&i.jsx("div",{style:{background:"#0a1e2e",border:"1px solid #1a3a5a",borderRadius:14,padding:16,textAlign:"center"},children:i.jsx("p",{style:{color:oe,fontSize:12,fontWeight:500,margin:0},children:o.upgrade_hook})})]}),i.jsx(Zt,{accentColor:oe})]})]})}function Tg({onTryHybrid:e}){const[t,n]=x.useState(""),[r,o]=x.useState(""),[l,s]=x.useState(!1),[a,c]=x.useState(null),[d,p]=x.useState(null);async function m(){if(!(!t.trim()||!r.trim())){s(!0),c(null),p(null);try{const h=await fetch(`${F}/demos/thread-grader/compare`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({threadA:t.trim(),threadB:r.trim()})}),v=await h.json();if(!h.ok)throw new Error(v.error||`HTTP ${h.status}`);c(v)}catch(h){p(h instanceof Error?h.message:"Comparison failed.")}finally{s(!1)}}}const g=t.trim().length>=20&&r.trim().length>=20,S=a==null?void 0:a.comparison.pillar_winners;return i.jsxs(i.Fragment,{children:[i.jsx("div",{style:{display:"flex",gap:12,marginBottom:12},children:["A","B"].map(h=>{const v=h==="A"?t:r,w=h==="A"?n:o;return i.jsxs("div",{style:{flex:1},children:[i.jsxs("div",{style:{fontSize:10,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:6},children:["Thread ",h," · ",Tl(v)," tweet",Tl(v)!==1?"s":""]}),i.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 ${h} — separate tweets with ---`,value:v,onChange:f=>w(f.target.value)})]},h)})}),i.jsx("div",{style:{display:"flex",justifyContent:"flex-end",marginBottom:20},children:i.jsx("button",{onClick:m,disabled:l||!g,style:{padding:"8px 20px",background:l||!g?"#333":oe,color:"#fff",fontWeight:600,fontSize:13,border:"none",borderRadius:8,cursor:l||!g?"not-allowed":"pointer",opacity:l||!g?.5:1},children:l?"Comparing...":"Compare"})}),d&&i.jsx("div",{style:{background:"#2e1a1a",border:"1px solid #5a2a2a",borderRadius:10,padding:12,marginBottom:16,color:"#ef5350",fontSize:12},children:d}),a&&i.jsxs("div",{children:[a.comparison.winner!=="tie"?i.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:[i.jsxs("div",{style:{textAlign:"center"},children:[i.jsxs("div",{style:{color:"#4caf50",fontWeight:800,fontSize:15},children:["Thread ",a.comparison.winner," wins"]}),i.jsxs("div",{style:{color:"#2e7d32",fontSize:11,marginTop:2},children:["+",a.comparison.margin," pts"]})]}),i.jsx(gt,{shareText:`Thread ${a.comparison.winner} won my A/B test on ThreadGrader by ${a.comparison.margin} points. Grade yours → https://contentintelligence.ai`,accentColor:"#4caf50"})]}):i.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"}),i.jsxs("div",{style:{display:"flex",gap:12,marginBottom:16},children:[i.jsx(Za,{label:"Thread A",result:a.threadA,isWinner:a.comparison.winner==="A",isDimmed:a.comparison.winner==="B"}),i.jsx(Za,{label:"Thread B",result:a.threadB,isWinner:a.comparison.winner==="B",isDimmed:a.comparison.winner==="A"})]}),S&&i.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[i.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:14},children:"Pillar Winners"}),i.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:12},children:[i.jsx("thead",{children:i.jsx("tr",{style:{borderBottom:"1px solid #1a1a2e"},children:["Pillar","A Score","B Score","Winner"].map(h=>i.jsx("th",{style:{padding:"6px 8px",textAlign:"left",color:"#555",fontWeight:600,fontSize:10,textTransform:"uppercase",letterSpacing:1},children:h},h))})}),i.jsx("tbody",{children:Object.keys(_r).map(h=>{const v=S[h],w=a.threadA.pillar_scores[h].score,f=a.threadB.pillar_scores[h].score;return i.jsxs("tr",{style:{borderBottom:"1px solid #0d0d1a"},children:[i.jsx("td",{style:{padding:"8px",color:"#aaa"},children:_r[h]}),i.jsx("td",{style:{padding:"8px",color:v==="A"?"#4caf50":"#666",fontWeight:v==="A"?700:400},children:w}),i.jsx("td",{style:{padding:"8px",color:v==="B"?"#4caf50":"#666",fontWeight:v==="B"?700:400},children:f}),i.jsx("td",{style:{padding:"8px",color:v==="tie"?"#ffd54f":"#4caf50",fontWeight:700},children:v==="tie"?"Tie":`Thread ${v}`})]},h)})})]})]}),i.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[i.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:10},children:"Analysis"}),i.jsx("p",{style:{color:"#bbb",fontSize:13,lineHeight:1.6,margin:"0 0 10px"},children:a.comparison.verdict}),a.comparison.strategic_analysis&&i.jsxs("p",{style:{color:"#777",fontSize:12,lineHeight:1.5,margin:0,borderTop:"1px solid #1a1a2e",paddingTop:10},children:[i.jsx("span",{style:{color:oe,fontWeight:600},children:"Next thread: "}),a.comparison.strategic_analysis]})]}),i.jsxs("div",{style:{background:"#0a1e2e",border:"1px solid #1a3a5a",borderRadius:14,padding:20},children:[i.jsx("h2",{style:{fontSize:11,fontWeight:600,color:oe,textTransform:"uppercase",letterSpacing:2,marginBottom:10},children:"Suggested Hybrid Hook"}),i.jsx("p",{style:{color:"#e0e0e0",fontSize:13,fontWeight:600,lineHeight:1.6,marginBottom:14},children:a.comparison.suggested_hybrid}),i.jsx("button",{onClick:()=>{const h=a.comparison.suggested_hybrid.split(" | ")[0].trim();e(h)},style:{padding:"7px 16px",background:oe,color:"#fff",fontWeight:600,fontSize:12,border:"none",borderRadius:8,cursor:"pointer"},children:"Try this hook →"})]})]})]})}function Bg(){const[e,t]=x.useState("grade"),[n,r]=x.useState("");return i.jsxs("div",{style:{padding:24,maxWidth:760,margin:"0 auto"},children:[i.jsxs("div",{style:{textAlign:"center",marginBottom:28},children:[i.jsx("div",{style:{fontSize:9,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:6,fontFamily:"monospace"},children:"ContentGrade Suite"}),i.jsxs("h1",{style:{fontSize:28,fontWeight:800,color:"#e0e0e0",letterSpacing:-.5},children:["Thread",i.jsx("span",{style:{color:oe},children:"Grader"})]}),i.jsxs("p",{style:{color:"#777",fontSize:14,marginTop:6},children:["Paste your thread. Get a ",i.jsx("span",{style:{color:"#ccc",fontWeight:500},children:"viral potential score"})," before you post."]}),i.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(o=>i.jsx("span",{style:{fontSize:10,padding:"3px 10px",borderRadius:12,background:"#12121f",color:"#666",border:"1px solid #1a1a2e"},children:o},o))})]}),i.jsxs("div",{style:{display:"flex",gap:4,background:"#12121f",border:"1px solid #1a1a2e",borderRadius:10,padding:4,marginBottom:24,width:"fit-content"},children:[i.jsx("button",{onClick:()=>t("grade"),style:{padding:"7px 18px",borderRadius:8,border:"none",cursor:"pointer",fontSize:12,fontWeight:600,background:e==="grade"?oe:"transparent",color:e==="grade"?"#fff":"#666",transition:"background 0.2s, color 0.2s"},children:"Grade Thread"}),i.jsxs("button",{onClick:()=>t("compare"),style:{padding:"7px 18px",borderRadius:8,border:"none",cursor:"pointer",fontSize:12,fontWeight:600,background:e==="compare"?"#0a1e2e":"transparent",color:e==="compare"?oe:"#444",transition:"background 0.2s, color 0.2s",display:"flex",alignItems:"center",gap:6},children:["A/B Compare",i.jsx("span",{style:{fontSize:8,padding:"1px 6px",borderRadius:4,background:`${oe}22`,color:oe,border:`1px solid ${oe}33`,fontFamily:"monospace",fontWeight:700,letterSpacing:.5},children:"PRO"})]})]}),e==="grade"&&i.jsx(Rg,{threadText:n,setThreadText:r}),e==="compare"&&i.jsx("div",{children:i.jsx($t,{accentColor:oe,label:"A/B Compare Mode",children:i.jsx(Tg,{onTryHybrid:o=>{r(o),t("grade")}})})}),i.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 xe="#10b981",Bl={"A+":"#4caf50",A:"#4caf50","A-":"#4caf50","B+":"#4a90d9",B:"#4a90d9","B-":"#4a90d9","C+":"#ffd54f",C:"#ffd54f","C-":"#ffd54f",D:"#ff9800",F:"#ef5350"},Pg={AIDA:"#7c4dff",PAS:"#ff6b35","Hormozi Value Equation":"#10b981","Cialdini Reciprocity":"#4a90d9","Storytelling Arc":"#ffd54f"};function Pl(e){for(const[t,n]of Object.entries(Pg))if(e.toLowerCase().includes(t.toLowerCase().split(" ")[0].toLowerCase()))return n;return xe}function ec({email:e,locked:t}){const[n,r]=x.useState(!t&&e.position===1),o=Pl(e.framework_used);return i.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:12,marginBottom:10,overflow:"hidden"},children:[i.jsxs("div",{onClick:()=>!t&&r(s=>!s),style:{padding:"14px 16px",display:"flex",alignItems:"center",gap:10,cursor:t?"default":"pointer"},children:[i.jsx("div",{style:{width:28,height:28,borderRadius:"50%",background:xe+"22",border:`1px solid ${xe}44`,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,fontSize:11,fontWeight:800,color:xe,fontFamily:"monospace"},children:e.position}),i.jsxs("div",{style:{flex:1,minWidth:0},children:[i.jsx("div",{style:{fontSize:13,fontWeight:700,color:"#e0e0e0",marginBottom:2,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.subject_line}),i.jsx("div",{style:{fontSize:10,color:"#555",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.preview_text})]}),i.jsx("span",{style:{fontSize:9,padding:"2px 8px",borderRadius:4,background:o+"20",color:o,border:`1px solid ${o}44`,fontFamily:"monospace",fontWeight:700,letterSpacing:.5,flexShrink:0,whiteSpace:"nowrap"},children:e.framework_used.split(" ")[0].toUpperCase()}),!t&&i.jsx("div",{style:{color:"#444",fontSize:14,flexShrink:0},children:n?"▲":"▼"})]}),n&&!t&&i.jsx("div",{style:{padding:"0 16px 16px",borderTop:"1px solid #1a1a2e"},children:i.jsxs("div",{style:{paddingTop:14},children:[i.jsxs("div",{style:{background:o+"0d",border:`1px solid ${o}22`,borderRadius:8,padding:"8px 12px",marginBottom:14,fontSize:11,color:o,lineHeight:1.5},children:[i.jsxs("span",{style:{fontWeight:700},children:[e.framework_used,":"]})," ",e.framework_explanation]}),i.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:e.body}),i.jsxs("div",{style:{marginBottom:14},children:[i.jsx("div",{style:{fontSize:10,color:"#555",marginBottom:6,textTransform:"uppercase",letterSpacing:1},children:"CTA Button"}),i.jsx("div",{style:{display:"inline-block",padding:"8px 20px",borderRadius:8,background:xe,color:"#000",fontWeight:700,fontSize:12},children:e.cta})]}),i.jsxs("div",{style:{display:"flex",gap:12},children:[i.jsxs("div",{style:{flex:1,padding:"10px 14px",borderRadius:8,background:"#0d0d1a",border:"1px solid #1a1a2e",textAlign:"center"},children:[i.jsx("div",{style:{fontSize:16,fontWeight:800,color:"#4caf50"},children:e.estimated_open_rate}),i.jsx("div",{style:{fontSize:9,color:"#555",marginTop:2,textTransform:"uppercase",letterSpacing:1},children:"Est. Open Rate"})]}),i.jsxs("div",{style:{flex:1,padding:"10px 14px",borderRadius:8,background:"#0d0d1a",border:"1px solid #1a1a2e",textAlign:"center"},children:[i.jsx("div",{style:{fontSize:16,fontWeight:800,color:xe},children:e.estimated_click_rate}),i.jsx("div",{style:{fontSize:9,color:"#555",marginTop:2,textTransform:"uppercase",letterSpacing:1},children:"Est. Click Rate"})]})]})]})})]})}function Wg({result:e}){const t=Bl[e.grade]??"#777";return i.jsxs("div",{children:[i.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:24,marginBottom:16},children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:16,marginBottom:12},children:[i.jsx("span",{style:{fontSize:52,fontWeight:900,color:"#fff"},children:e.overall_score}),i.jsxs("div",{children:[i.jsx("div",{style:{fontSize:28,fontWeight:900,color:t},children:e.grade}),i.jsx("div",{style:{fontSize:10,color:"#555",textTransform:"uppercase",letterSpacing:2},children:"Sequence Score"})]})]}),i.jsxs("p",{style:{color:xe,fontSize:13,fontWeight:500,fontStyle:"italic",margin:0},children:['"',e.sequence_strategy,'"']})]}),i.jsxs("div",{style:{marginBottom:8},children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:6},children:[i.jsx("span",{style:{fontSize:10,color:"#555",textTransform:"uppercase",letterSpacing:2},children:"Email 1 — Hook"}),i.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"})]}),i.jsx(ec,{email:e.emails[0],locked:!1})]}),i.jsx($n,{tool:"email-forge",score:e.overall_score,accentColor:xe}),i.jsxs("div",{style:{marginTop:10},children:[i.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:6},children:i.jsx("span",{style:{fontSize:10,color:"#555",textTransform:"uppercase",letterSpacing:2},children:"Emails 2–5 — Build · Value · Urgency · Close"})}),e.emails.slice(1).map(n=>i.jsx(ec,{email:n,locked:!1},n.position))]}),i.jsx(Zt,{accentColor:xe})]})}function Ag(){const[e,t]=x.useState(""),[n,r]=x.useState(""),[o,l]=x.useState("cold_outreach"),[s,a]=x.useState("professional"),[c,d]=x.useState(!1),[p,m]=x.useState(null),[g,S]=x.useState(null),h=e.trim().length>=10&&n.trim().length>=5;async function v(){if(h){d(!0),m(null),S(null);try{const f=await fetch(`${F}/demos/email-forge`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({product:e.trim(),audience:n.trim(),goal:o,tone:s})}),u=await f.json();if(!f.ok)throw new Error(u.error||`HTTP ${f.status}`);m(u)}catch(f){S(f instanceof Error?f.message:"Generation failed.")}finally{d(!1)}}}const w={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 i.jsxs(i.Fragment,{children:[i.jsxs("div",{style:{marginBottom:20},children:[i.jsxs("div",{style:{marginBottom:12},children:[i.jsx("label",{style:{fontSize:10,color:"#555",textTransform:"uppercase",letterSpacing:1.5,display:"block",marginBottom:6},children:"Product / Service"}),i.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:e,onChange:f=>t(f.target.value)})]}),i.jsxs("div",{style:{marginBottom:12},children:[i.jsx("label",{style:{fontSize:10,color:"#555",textTransform:"uppercase",letterSpacing:1.5,display:"block",marginBottom:6},children:"Target Audience"}),i.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:n,onChange:f=>r(f.target.value)})]}),i.jsxs("div",{style:{display:"flex",gap:12,marginBottom:12},children:[i.jsxs("div",{style:{flex:1},children:[i.jsx("label",{style:{fontSize:10,color:"#555",textTransform:"uppercase",letterSpacing:1.5,display:"block",marginBottom:6},children:"Goal"}),i.jsxs("select",{style:w,value:o,onChange:f=>l(f.target.value),children:[i.jsx("option",{value:"cold_outreach",children:"Cold Outreach"}),i.jsx("option",{value:"nurture",children:"Nurture Sequence"}),i.jsx("option",{value:"launch",children:"Product Launch"}),i.jsx("option",{value:"re-engagement",children:"Re-engagement"})]})]}),i.jsxs("div",{style:{flex:1},children:[i.jsx("label",{style:{fontSize:10,color:"#555",textTransform:"uppercase",letterSpacing:1.5,display:"block",marginBottom:6},children:"Tone"}),i.jsxs("select",{style:w,value:s,onChange:f=>a(f.target.value),children:[i.jsx("option",{value:"professional",children:"Professional"}),i.jsx("option",{value:"casual",children:"Casual"}),i.jsx("option",{value:"urgent",children:"Urgent"}),i.jsx("option",{value:"storytelling",children:"Storytelling"})]})]})]}),i.jsx("div",{style:{display:"flex",justifyContent:"flex-end"},children:i.jsx("button",{onClick:v,disabled:c||!h,style:{padding:"10px 24px",background:c||!h?"#333":xe,color:c||!h?"#666":"#000",fontWeight:700,fontSize:13,border:"none",borderRadius:8,cursor:c||!h?"not-allowed":"pointer",opacity:c||!h?.6:1},children:c?"Generating...":"Generate Sequence →"})})]}),g&&i.jsx("div",{style:{background:"#2e1a1a",border:"1px solid #5a2a2a",borderRadius:10,padding:12,marginBottom:16,color:"#ef5350",fontSize:12},children:g}),p&&i.jsx(Wg,{result:p})]})}function Lg(){const[e,t]=x.useState(""),[n,r]=x.useState(""),[o,l]=x.useState("cold_outreach"),[s,a]=x.useState("professional"),[c,d]=x.useState(""),[p,m]=x.useState(""),[g,S]=x.useState("cold_outreach"),[h,v]=x.useState("professional"),[w,f]=x.useState(!1),[u,y]=x.useState(null),[j,k]=x.useState(null),[b,z]=x.useState(null),[R,O]=x.useState(null),B=e.trim().length>=10&&n.trim().length>=5&&c.trim().length>=10&&p.trim().length>=5;async function ne(){if(B){f(!0),y(null),k(null);try{const W=await fetch(`${F}/demos/email-forge/compare`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({product_a:e.trim(),audience_a:n.trim(),goal_a:o,tone_a:s,product_b:c.trim(),audience_b:p.trim(),goal_b:g,tone_b:h})}),T=await W.json();if(!W.ok)throw new Error(T.error||`HTTP ${W.status}`);y(T)}catch(W){k(W instanceof Error?W.message:"Comparison failed.")}finally{f(!1)}}}const Te={background:"#12121f",border:"1px solid #1a1a2e",borderRadius:6,padding:"6px 8px",fontSize:11,color:"#ccc",outline:"none",fontFamily:"inherit",width:"100%",appearance:"none"};function Be({label:W,product:T,setProduct:M,audience:ce,setAudience:_,goal:P,setGoal:A,tone:D,setTone:Y}){return i.jsxs("div",{style:{flex:1},children:[i.jsxs("div",{style:{fontSize:10,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:8},children:["Sequence ",W]}),i.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:T,onChange:Se=>M(Se.target.value)}),i.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:Se=>_(Se.target.value)}),i.jsxs("div",{style:{display:"flex",gap:6,marginTop:6},children:[i.jsxs("select",{style:Te,value:P,onChange:Se=>A(Se.target.value),children:[i.jsx("option",{value:"cold_outreach",children:"Cold Outreach"}),i.jsx("option",{value:"nurture",children:"Nurture"}),i.jsx("option",{value:"launch",children:"Launch"}),i.jsx("option",{value:"re-engagement",children:"Re-engage"})]}),i.jsxs("select",{style:Te,value:D,onChange:Se=>Y(Se.target.value),children:[i.jsx("option",{value:"professional",children:"Professional"}),i.jsx("option",{value:"casual",children:"Casual"}),i.jsx("option",{value:"urgent",children:"Urgent"}),i.jsx("option",{value:"storytelling",children:"Story"})]})]})]})}return i.jsxs(i.Fragment,{children:[i.jsxs("div",{style:{display:"flex",gap:12,marginBottom:12},children:[i.jsx(Be,{label:"A",product:e,setProduct:t,audience:n,setAudience:r,goal:o,setGoal:l,tone:s,setTone:a}),i.jsx(Be,{label:"B",product:c,setProduct:d,audience:p,setAudience:m,goal:g,setGoal:S,tone:h,setTone:v})]}),i.jsx("div",{style:{display:"flex",justifyContent:"flex-end",marginBottom:20},children:i.jsx("button",{onClick:ne,disabled:w||!B,style:{padding:"8px 20px",background:w||!B?"#333":xe,color:w||!B?"#666":"#000",fontWeight:700,fontSize:13,border:"none",borderRadius:8,cursor:w||!B?"not-allowed":"pointer",opacity:w||!B?.6:1},children:w?"Comparing...":"Compare Sequences"})}),j&&i.jsx("div",{style:{background:"#2e1a1a",border:"1px solid #5a2a2a",borderRadius:10,padding:12,marginBottom:16,color:"#ef5350",fontSize:12},children:j}),u&&i.jsxs("div",{children:[i.jsxs("div",{style:{background:"#0d1f0d",border:"1px solid #1e4a1e",borderRadius:10,padding:"14px 20px",marginBottom:16,display:"flex",alignItems:"center",justifyContent:"space-between"},children:[i.jsxs("div",{children:[i.jsxs("div",{style:{color:"#4caf50",fontWeight:800,fontSize:15},children:["Sequence ",u.comparison.winner," wins"]}),i.jsxs("div",{style:{color:"#2e7d32",fontSize:11,marginTop:2},children:["+",u.comparison.margin," pts · ",u.comparison.reasoning]})]}),i.jsx("div",{style:{textAlign:"right"},children:i.jsxs("div",{style:{fontSize:22,fontWeight:900,color:"#fff"},children:[u.comparison.winner==="A"?u.sequence_a.overall_score:u.sequence_b.overall_score,i.jsx("span",{style:{fontSize:12,color:"#555",marginLeft:4},children:"vs"}),u.comparison.winner==="A"?u.sequence_b.overall_score:u.sequence_a.overall_score]})})]}),i.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[i.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:14},children:"Email-by-Email Breakdown"}),i.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:12},children:[i.jsx("thead",{children:i.jsx("tr",{style:{borderBottom:"1px solid #1a1a2e"},children:["Email","Subject A","Subject B","Winner","Reason"].map(W=>i.jsx("th",{style:{padding:"6px 8px",textAlign:"left",color:"#555",fontWeight:600,fontSize:10,textTransform:"uppercase",letterSpacing:1},children:W},W))})}),i.jsx("tbody",{children:u.comparison.per_email_comparison.map(W=>{const T=u.sequence_a.emails.find(ce=>ce.position===W.position),M=u.sequence_b.emails.find(ce=>ce.position===W.position);return i.jsxs("tr",{style:{borderBottom:"1px solid #0d0d1a"},children:[i.jsx("td",{style:{padding:"8px",color:"#555",fontFamily:"monospace",fontWeight:700},children:W.position}),i.jsx("td",{style:{padding:"8px",color:W.winner==="A"?"#4caf50":"#555",fontSize:11,maxWidth:150},children:i.jsx("span",{style:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:(T==null?void 0:T.subject_line)??"—"})}),i.jsx("td",{style:{padding:"8px",color:W.winner==="B"?"#4caf50":"#555",fontSize:11,maxWidth:150},children:i.jsx("span",{style:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:(M==null?void 0:M.subject_line)??"—"})}),i.jsxs("td",{style:{padding:"8px",color:"#4caf50",fontWeight:700},children:["Seq ",W.winner]}),i.jsx("td",{style:{padding:"8px",color:"#777",fontSize:11},children:W.reason})]},W.position)})})]})]}),i.jsxs("div",{style:{background:u.comparison.winner==="A"?"#0a1e0a":"#12121f",border:`1px solid ${u.comparison.winner==="A"?"#1e4a1e":"#1a1a2e"}`,borderRadius:14,padding:16,marginBottom:12},children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:12},children:[i.jsx("span",{style:{fontSize:11,color:"#555",textTransform:"uppercase",letterSpacing:2},children:"Sequence A"}),u.comparison.winner==="A"&&i.jsx("span",{style:{fontSize:9,padding:"2px 7px",borderRadius:4,background:"#4caf5020",color:"#4caf50",border:"1px solid #4caf5033",fontFamily:"monospace",fontWeight:700},children:"WINNER"}),i.jsx("span",{style:{marginLeft:"auto",fontSize:20,fontWeight:900,color:"#fff"},children:u.sequence_a.overall_score}),i.jsx("span",{style:{fontSize:14,fontWeight:900,color:Bl[u.sequence_a.grade]??"#777"},children:u.sequence_a.grade})]}),u.sequence_a.emails.map(W=>{const T=Pl(W.framework_used);return i.jsxs("div",{onClick:()=>z(b===W.position?null:W.position),style:{padding:"8px 12px",marginBottom:6,background:"#0d0d1a",border:"1px solid #1a1a2e",borderRadius:8,cursor:"pointer",display:"flex",alignItems:"center",gap:8},children:[i.jsx("span",{style:{fontSize:10,color:xe,fontFamily:"monospace",fontWeight:700,width:16},children:W.position}),i.jsx("span",{style:{flex:1,fontSize:12,color:"#ccc",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:W.subject_line}),i.jsx("span",{style:{fontSize:9,padding:"1px 6px",borderRadius:3,background:T+"20",color:T,border:`1px solid ${T}33`,fontFamily:"monospace",flexShrink:0},children:W.framework_used.split(" ")[0]})]},W.position)})]}),i.jsxs("div",{style:{background:u.comparison.winner==="B"?"#0a1e0a":"#12121f",border:`1px solid ${u.comparison.winner==="B"?"#1e4a1e":"#1a1a2e"}`,borderRadius:14,padding:16},children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:12},children:[i.jsx("span",{style:{fontSize:11,color:"#555",textTransform:"uppercase",letterSpacing:2},children:"Sequence B"}),u.comparison.winner==="B"&&i.jsx("span",{style:{fontSize:9,padding:"2px 7px",borderRadius:4,background:"#4caf5020",color:"#4caf50",border:"1px solid #4caf5033",fontFamily:"monospace",fontWeight:700},children:"WINNER"}),i.jsx("span",{style:{marginLeft:"auto",fontSize:20,fontWeight:900,color:"#fff"},children:u.sequence_b.overall_score}),i.jsx("span",{style:{fontSize:14,fontWeight:900,color:Bl[u.sequence_b.grade]??"#777"},children:u.sequence_b.grade})]}),u.sequence_b.emails.map(W=>{const T=Pl(W.framework_used);return i.jsxs("div",{onClick:()=>O(R===W.position?null:W.position),style:{padding:"8px 12px",marginBottom:6,background:"#0d0d1a",border:"1px solid #1a1a2e",borderRadius:8,cursor:"pointer",display:"flex",alignItems:"center",gap:8},children:[i.jsx("span",{style:{fontSize:10,color:xe,fontFamily:"monospace",fontWeight:700,width:16},children:W.position}),i.jsx("span",{style:{flex:1,fontSize:12,color:"#ccc",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:W.subject_line}),i.jsx("span",{style:{fontSize:9,padding:"1px 6px",borderRadius:3,background:T+"20",color:T,border:`1px solid ${T}33`,fontFamily:"monospace",flexShrink:0},children:W.framework_used.split(" ")[0]})]},W.position)})]})]})]})}function Ng(){const[e,t]=x.useState("generate");return i.jsxs("div",{style:{padding:24,maxWidth:760,margin:"0 auto"},children:[i.jsxs("div",{style:{textAlign:"center",marginBottom:28},children:[i.jsx("div",{style:{fontSize:9,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:6,fontFamily:"monospace"},children:"ContentGrade Suite — Generate"}),i.jsxs("h1",{style:{fontSize:28,fontWeight:800,color:"#e0e0e0",letterSpacing:-.5},children:["Email",i.jsx("span",{style:{color:xe},children:"Forge"})]}),i.jsxs("p",{style:{color:"#777",fontSize:14,marginTop:6},children:["Input your product and audience. Get a ",i.jsx("span",{style:{color:"#ccc",fontWeight:500},children:"5-email conversion sequence"})," using proven frameworks."]}),i.jsx("div",{style:{display:"flex",flexWrap:"wrap",justifyContent:"center",gap:6,marginTop:12},children:["AIDA","PAS","Hormozi","Cialdini","Storytelling Arc"].map(n=>i.jsx("span",{style:{fontSize:10,padding:"3px 10px",borderRadius:12,background:"#12121f",color:"#666",border:"1px solid #1a1a2e"},children:n},n))})]}),i.jsxs("div",{style:{display:"flex",gap:4,background:"#12121f",border:"1px solid #1a1a2e",borderRadius:10,padding:4,marginBottom:24,width:"fit-content"},children:[i.jsx("button",{onClick:()=>t("generate"),style:{padding:"7px 18px",borderRadius:8,border:"none",cursor:"pointer",fontSize:12,fontWeight:600,background:e==="generate"?xe:"transparent",color:e==="generate"?"#000":"#666",transition:"background 0.2s, color 0.2s"},children:"Generate"}),i.jsx("button",{onClick:()=>t("compare"),style:{padding:"7px 18px",borderRadius:8,border:"none",cursor:"pointer",fontSize:12,fontWeight:600,background:e==="compare"?"#0a1e2e":"transparent",color:e==="compare"?xe:"#444",transition:"background 0.2s, color 0.2s"},children:"A/B Compare"})]}),e==="generate"&&i.jsx(Ag,{}),e==="compare"&&i.jsx(Lg,{}),i.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 Q="#00c853",Bu={A:"#4caf50",B:"#4a90d9",C:"#ffd54f",D:"#ff9800",F:"#ef5350"},Ti={high:"#4caf50",medium:"#ffd54f",low:"#ef5350"},Bi={low:"#4caf50",medium:"#ffd54f",high:"#ef5350"};function Jr({label:e,score:t}){const n=t>=75?"#4caf50":t>=50?"#ffd54f":"#ef5350";return i.jsxs("div",{style:{textAlign:"center"},children:[i.jsx("div",{style:{fontSize:22,fontWeight:900,color:n},children:t}),i.jsx("div",{style:{fontSize:10,color:"#555",marginTop:2},children:e})]})}function Ig({archetype:e}){var t;return i.jsxs("div",{style:{background:"#0d0d1a",border:"1px solid #1a1a2e",borderRadius:10,padding:16,marginBottom:10},children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:8},children:[i.jsx("div",{style:{flex:1},children:i.jsx("span",{style:{fontSize:13,fontWeight:700,color:Q},children:e.name})}),i.jsxs("span",{style:{fontSize:18,fontWeight:900,color:"#e0e0e0"},children:[e.percentage,"%"]})]}),i.jsx("div",{style:{height:4,background:"#1a1a2e",borderRadius:2,marginBottom:10,overflow:"hidden"},children:i.jsx("div",{style:{height:"100%",background:Q,borderRadius:2,width:`${e.percentage}%`}})}),i.jsx("p",{style:{fontSize:12,color:"#aaa",lineHeight:1.5,margin:"0 0 8px"},children:e.description}),((t=e.evidence)==null?void 0:t.length)>0&&i.jsxs("div",{style:{fontSize:10,color:"#555",fontStyle:"italic",borderLeft:`2px solid ${Q}44`,paddingLeft:8},children:['"',e.evidence[0],'"']})]})}function Og(){var m,g,S,h,v,w,f,u,y,j,k,b,z,R,O,B,ne,Te,Be,W,T,M,ce,_,P,A,D,Y,Se,Je;const[e,t]=x.useState(""),[n,r]=x.useState(!1),[o,l]=x.useState(null),[s,a]=x.useState(null);async function c(){if(!(e.trim().length<50)){r(!0),l(null),a(null);try{const L=await fetch(`${F}/demos/audience-decoder`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:e.trim()})}),H=await L.json();if(!L.ok)throw new Error(H.error||`HTTP ${L.status}`);l(H)}catch(L){a(L instanceof Error?L.message:"Analysis failed.")}finally{r(!1)}}}const d=o?Bu[((m=o.grade)==null?void 0:m[0])??""]??"#777":"#777",p=e.trim().length>=50;return i.jsxs(i.Fragment,{children:[i.jsxs("div",{style:{marginBottom:20},children:[i.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:e,onChange:L=>t(L.target.value)}),i.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:8},children:[i.jsxs("span",{style:{fontSize:10,color:"#444"},children:[e.length," chars · minimum 50 chars"]}),i.jsx("button",{onClick:c,disabled:n||!p,style:{padding:"9px 22px",background:n||!p?"#333":Q,color:"#000",fontWeight:700,fontSize:13,border:"none",borderRadius:8,cursor:n||!p?"not-allowed":"pointer",opacity:n||!p?.5:1},children:n?"Decoding...":"Decode My Audience"})]})]}),s&&i.jsx("div",{style:{background:"#2e1a1a",border:"1px solid #5a2a2a",borderRadius:10,padding:12,marginBottom:16,color:"#ef5350",fontSize:12},children:s}),o&&i.jsxs("div",{children:[i.jsxs("div",{style:{background:"#12121f",border:`1px solid ${Q}44`,borderRadius:14,padding:24,textAlign:"center",marginBottom:16},children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:16,marginBottom:12},children:[i.jsx("span",{style:{fontSize:56,fontWeight:900,color:"#fff"},children:o.overall_score}),i.jsxs("div",{style:{textAlign:"left"},children:[i.jsx("div",{style:{fontSize:32,fontWeight:900,color:d},children:o.grade}),i.jsx("div",{style:{fontSize:10,color:"#555",textTransform:"uppercase",letterSpacing:2},children:"/ 100"})]})]}),i.jsx("p",{style:{color:Q,fontSize:15,fontWeight:600,maxWidth:480,margin:"0 auto 14px",lineHeight:1.4},children:o.headline}),i.jsx(gt,{shareText:`My audience decoded: ${o.headline} — Analyzed free on AudienceDecoder`,accentColor:Q})]}),i.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:14},children:[i.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,margin:0},children:"Audience Archetypes"}),i.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"})]}),(g=o.audience_archetypes)==null?void 0:g.map((L,H)=>i.jsx(Ig,{archetype:L},H))]}),i.jsx($n,{tool:"audience-decoder",score:o.overall_score,accentColor:Q}),i.jsxs($t,{accentColor:Q,label:"Full Audience Intelligence Report",priceLabel:"Unlock Deep Report — $49",children:[i.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[i.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:16},children:"Engagement Model"}),i.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:12,marginBottom:16},children:[i.jsx(Jr,{label:"Hook Effectiveness",score:((h=(S=o.engagement_model)==null?void 0:S.hook_effectiveness)==null?void 0:h.score)??0}),i.jsx(Jr,{label:"CTA Effectiveness",score:((w=(v=o.engagement_model)==null?void 0:v.cta_effectiveness)==null?void 0:w.score)??0}),i.jsx(Jr,{label:"Controversy Index",score:((u=(f=o.engagement_model)==null?void 0:f.controversy_index)==null?void 0:u.score)??0}),i.jsx(Jr,{label:"Shareability",score:((y=o.engagement_model)==null?void 0:y.shareability_score)??0})]}),((k=(j=o.engagement_model)==null?void 0:j.cta_effectiveness)==null?void 0:k.recommendation)&&i.jsxs("div",{style:{background:"#0d0d1a",borderRadius:8,padding:12},children:[i.jsx("span",{style:{fontSize:10,color:"#555",textTransform:"uppercase",letterSpacing:1},children:"CTA Recommendation: "}),i.jsx("span",{style:{fontSize:12,color:"#aaa"},children:o.engagement_model.cta_effectiveness.recommendation})]})]}),i.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[i.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:14},children:"Content Patterns"}),i.jsxs("div",{style:{display:"flex",gap:12,marginBottom:14},children:[i.jsxs("div",{style:{flex:1,background:"#0d1f0d",border:"1px solid #1e4a1e",borderRadius:8,padding:12},children:[i.jsx("div",{style:{fontSize:10,color:"#2e7d32",textTransform:"uppercase",letterSpacing:1,marginBottom:6},children:"Working Well"}),(z=(b=o.content_patterns)==null?void 0:b.top_performing_themes)==null?void 0:z.map((L,H)=>i.jsxs("div",{style:{fontSize:12,color:"#aaa",marginBottom:4},children:[i.jsx("span",{style:{color:"#4caf50",fontWeight:600},children:L.theme}),i.jsxs("span",{style:{color:"#555"},children:[" · ",L.frequency,"x · ",L.avg_engagement_signal]})]},H))]}),i.jsxs("div",{style:{flex:1,background:"#2e1a1a",border:"1px solid #5a2a2a",borderRadius:8,padding:12},children:[i.jsx("div",{style:{fontSize:10,color:"#c62828",textTransform:"uppercase",letterSpacing:1,marginBottom:6},children:"Underperforming"}),(O=(R=o.content_patterns)==null?void 0:R.underperforming_themes)==null?void 0:O.map((L,H)=>i.jsxs("div",{style:{fontSize:12,color:"#aaa",marginBottom:4},children:[i.jsx("span",{style:{color:"#ef5350",fontWeight:600},children:L.theme}),i.jsxs("span",{style:{color:"#555"},children:[" · ",L.frequency,"x · ",L.avg_engagement_signal]})]},H))]})]}),i.jsxs("div",{style:{display:"flex",gap:8},children:[i.jsxs("div",{style:{background:"#0d0d1a",borderRadius:8,padding:"8px 12px",fontSize:11,color:"#aaa"},children:[i.jsx("span",{style:{color:"#555"},children:"Best format: "}),i.jsx("span",{style:{color:Q,fontWeight:600},children:(B=o.content_patterns)==null?void 0:B.optimal_format})]}),i.jsxs("div",{style:{background:"#0d0d1a",borderRadius:8,padding:"8px 12px",fontSize:11,color:"#aaa"},children:[i.jsx("span",{style:{color:"#555"},children:"Best length: "}),i.jsx("span",{style:{color:Q,fontWeight:600},children:(ne=o.content_patterns)==null?void 0:ne.optimal_length})]}),i.jsxs("div",{style:{background:"#0d0d1a",borderRadius:8,padding:"8px 12px",fontSize:11,color:"#aaa"},children:[i.jsx("span",{style:{color:"#555"},children:"Tone: "}),i.jsx("span",{style:{color:"#ccc"},children:(Be=(Te=o.content_patterns)==null?void 0:Te.voice_analysis)==null?void 0:Be.tone})]})]})]}),i.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[i.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:14},children:"Growth Opportunities"}),(W=o.growth_opportunities)==null?void 0:W.map((L,H)=>i.jsxs("div",{style:{background:"#0d0d1a",border:"1px solid #1a1a2e",borderRadius:8,padding:14,marginBottom:8},children:[i.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:8,marginBottom:6},children:[i.jsxs("span",{style:{fontSize:10,color:"#555",fontFamily:"monospace",flexShrink:0,marginTop:2},children:["#",H+1]}),i.jsx("div",{style:{flex:1,fontSize:13,color:"#e0e0e0",fontWeight:600},children:L.opportunity}),i.jsxs("div",{style:{display:"flex",gap:4,flexShrink:0},children:[i.jsxs("span",{style:{fontSize:9,padding:"2px 7px",borderRadius:4,background:Ti[L.impact]+"20",color:Ti[L.impact],border:`1px solid ${Ti[L.impact]}44`,fontWeight:700},children:[L.impact," impact"]}),i.jsxs("span",{style:{fontSize:9,padding:"2px 7px",borderRadius:4,background:Bi[L.effort]+"20",color:Bi[L.effort],border:`1px solid ${Bi[L.effort]}44`,fontWeight:700},children:[L.effort," effort"]})]})]}),i.jsx("p",{style:{fontSize:11,color:"#666",margin:0,lineHeight:1.5},children:L.explanation})]},H))]}),i.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:0},children:[i.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:14},children:"Content Calendar"}),i.jsx("div",{style:{display:"flex",gap:10,marginBottom:14},children:[{label:"Threads/week",val:(M=(T=o.content_calendar)==null?void 0:T.weekly_mix)==null?void 0:M.threads},{label:"Posts/week",val:(_=(ce=o.content_calendar)==null?void 0:ce.weekly_mix)==null?void 0:_.single_posts},{label:"Questions/week",val:(A=(P=o.content_calendar)==null?void 0:P.weekly_mix)==null?void 0:A.questions}].map(({label:L,val:H})=>i.jsxs("div",{style:{flex:1,background:"#0d0d1a",borderRadius:8,padding:12,textAlign:"center"},children:[i.jsx("div",{style:{fontSize:22,fontWeight:900,color:Q},children:H??0}),i.jsx("div",{style:{fontSize:10,color:"#555",marginTop:2},children:L})]},L))}),((Y=(D=o.content_calendar)==null?void 0:D.theme_rotation)==null?void 0:Y.length)>0&&i.jsxs("div",{style:{marginBottom:12},children:[i.jsx("div",{style:{fontSize:10,color:"#444",textTransform:"uppercase",letterSpacing:1,marginBottom:8},children:"Theme Rotation"}),o.content_calendar.theme_rotation.map((L,H)=>i.jsx("div",{style:{fontSize:12,color:"#aaa",marginBottom:4,paddingLeft:8,borderLeft:`2px solid ${Q}44`},children:L},H))]}),((Je=(Se=o.content_calendar)==null?void 0:Se.gaps_to_fill)==null?void 0:Je.length)>0&&i.jsxs("div",{children:[i.jsx("div",{style:{fontSize:10,color:"#444",textTransform:"uppercase",letterSpacing:1,marginBottom:8},children:"Content Gaps to Fill"}),o.content_calendar.gaps_to_fill.map((L,H)=>i.jsxs("div",{style:{fontSize:11,color:"#888",marginBottom:4,display:"flex",alignItems:"flex-start",gap:6},children:[i.jsx("span",{style:{color:"#ffd54f",flexShrink:0},children:"→"})," ",L]},H))]})]})]}),i.jsx(Zt,{accentColor:Q,product:"audiencedecoder"})]})]})}function Fg(){var g,S,h,v,w;const[e,t]=x.useState(""),[n,r]=x.useState(""),[o,l]=x.useState(!1),[s,a]=x.useState(null),[c,d]=x.useState(null);async function p(){if(!(e.trim().length<50||n.trim().length<50)){l(!0),a(null),d(null);try{const f=await fetch(`${F}/demos/audience-decoder/compare`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content_a:e.trim(),content_b:n.trim()})}),u=await f.json();if(!f.ok)throw new Error(u.error||`HTTP ${f.status}`);a(u)}catch(f){d(f instanceof Error?f.message:"Comparison failed.")}finally{l(!1)}}}const m=e.trim().length>=50&&n.trim().length>=50;return i.jsx($t,{accentColor:Q,label:"Profile Compare Mode",priceLabel:"Unlock Deep Report — $49",children:i.jsxs("div",{children:[i.jsx("div",{style:{display:"flex",gap:12,marginBottom:12},children:["A","B"].map(f=>{const u=f==="A"?e:n,y=f==="A"?t:r;return i.jsxs("div",{style:{flex:1},children:[i.jsxs("div",{style:{fontSize:10,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:6},children:["Creator ",f]}),i.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 ${f}'s content...`,value:u,onChange:j=>y(j.target.value)})]},f)})}),i.jsx("div",{style:{display:"flex",justifyContent:"flex-end",marginBottom:20},children:i.jsx("button",{onClick:p,disabled:o||!m,style:{padding:"9px 22px",background:o||!m?"#333":Q,color:"#000",fontWeight:700,fontSize:13,border:"none",borderRadius:8,cursor:o||!m?"not-allowed":"pointer",opacity:o||!m?.5:1},children:o?"Comparing...":"Compare Profiles"})}),c&&i.jsx("div",{style:{background:"#2e1a1a",border:"1px solid #5a2a2a",borderRadius:10,padding:12,marginBottom:16,color:"#ef5350",fontSize:12},children:c}),s&&i.jsxs("div",{children:[i.jsx("div",{style:{display:"flex",gap:12,marginBottom:16},children:["A","B"].map(f=>{var j;const u=f==="A"?s.analysis_a:s.analysis_b,y=Bu[((j=u==null?void 0:u.grade)==null?void 0:j[0])??""]??"#777";return i.jsxs("div",{style:{flex:1,background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:16,textAlign:"center"},children:[i.jsxs("div",{style:{fontSize:10,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:8},children:["Creator ",f]}),i.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:8,marginBottom:8},children:[i.jsx("span",{style:{fontSize:40,fontWeight:900,color:"#fff"},children:u==null?void 0:u.overall_score}),i.jsx("span",{style:{fontSize:22,fontWeight:900,color:y},children:u==null?void 0:u.grade})]}),i.jsx("p",{style:{fontSize:11,color:Q,margin:0,lineHeight:1.4},children:u==null?void 0:u.headline})]},f)})}),i.jsxs("div",{style:{background:"#12121f",border:"1px solid #1a1a2e",borderRadius:14,padding:20,marginBottom:16},children:[i.jsx("h2",{style:{fontSize:11,fontWeight:600,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:14},children:"Comparative Analysis"}),i.jsxs("div",{style:{display:"flex",gap:12,marginBottom:14},children:[i.jsxs("div",{style:{flex:1,background:"#0d0d1a",borderRadius:8,padding:12,textAlign:"center"},children:[i.jsxs("div",{style:{fontSize:22,fontWeight:900,color:"#ffd54f"},children:[(g=s.comparison)==null?void 0:g.audience_overlap,"%"]}),i.jsx("div",{style:{fontSize:10,color:"#555",marginTop:2},children:"Audience Overlap"})]}),i.jsxs("div",{style:{flex:1,background:"#0d0d1a",borderRadius:8,padding:12,textAlign:"center"},children:[i.jsx("div",{style:{fontSize:22,fontWeight:900,color:Q},children:(S=s.comparison)==null?void 0:S.differentiation_score}),i.jsx("div",{style:{fontSize:10,color:"#555",marginTop:2},children:"Differentiation Score"})]}),i.jsxs("div",{style:{flex:1,background:"#0d0d1a",borderRadius:8,padding:12,textAlign:"center"},children:[i.jsx("div",{style:{fontSize:15,fontWeight:800,color:"#4a90d9",textTransform:"capitalize"},children:(h=s.comparison)==null?void 0:h.collaboration_potential}),i.jsx("div",{style:{fontSize:10,color:"#555",marginTop:2},children:"Collab Potential"})]})]}),((v=s.comparison)==null?void 0:v.winner_by_category)&&i.jsxs("div",{children:[i.jsx("div",{style:{fontSize:10,color:"#444",textTransform:"uppercase",letterSpacing:1,marginBottom:8},children:"Category Winners"}),i.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:Object.entries(s.comparison.winner_by_category).map(([f,u])=>i.jsxs("div",{style:{background:"#0d0d1a",border:"1px solid #1a1a2e",borderRadius:6,padding:"5px 10px",fontSize:11},children:[i.jsxs("span",{style:{color:"#666"},children:[f,": "]}),i.jsx("span",{style:{color:u==="tie"?"#ffd54f":Q,fontWeight:700},children:u==="tie"?"Tie":`Creator ${u}`})]},f))})]}),((w=s.comparison)==null?void 0:w.strategic_advice)&&i.jsxs("div",{style:{marginTop:14,background:"#0d0d1a",borderRadius:8,padding:12},children:[i.jsx("div",{style:{fontSize:10,color:"#444",textTransform:"uppercase",letterSpacing:1,marginBottom:6},children:"Strategic Advice"}),i.jsx("p",{style:{fontSize:12,color:"#aaa",margin:0,lineHeight:1.6},children:s.comparison.strategic_advice})]})]})]})]})})}function $g(){const[e,t]=x.useState("score");return i.jsxs("div",{style:{padding:24,maxWidth:720,margin:"0 auto"},children:[i.jsxs("div",{style:{textAlign:"center",marginBottom:28},children:[i.jsx("div",{style:{fontSize:9,color:"#555",textTransform:"uppercase",letterSpacing:2,marginBottom:6,fontFamily:"monospace"},children:"Content Intelligence Stack"}),i.jsxs("h1",{style:{fontSize:28,fontWeight:800,color:"#e0e0e0",letterSpacing:-.5},children:["Audience",i.jsx("span",{style:{color:Q},children:"Decoder"})]}),i.jsxs("p",{style:{color:"#777",fontSize:14,marginTop:6},children:["Paste your content. Discover who reads you, what resonates, and"," ",i.jsx("span",{style:{color:"#ccc",fontWeight:500},children:"exactly what to post next."})]}),i.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(n=>i.jsx("span",{style:{fontSize:10,padding:"3px 10px",borderRadius:12,background:"#12121f",color:"#666",border:"1px solid #1a1a2e"},children:n},n))})]}),i.jsxs("div",{style:{display:"flex",gap:4,background:"#12121f",border:"1px solid #1a1a2e",borderRadius:10,padding:4,marginBottom:24,width:"fit-content"},children:[i.jsx("button",{onClick:()=>t("score"),style:{padding:"7px 18px",borderRadius:8,border:"none",cursor:"pointer",fontSize:12,fontWeight:600,background:e==="score"?Q:"transparent",color:e==="score"?"#000":"#666",transition:"background 0.2s, color 0.2s"},children:"Decode"}),i.jsxs("button",{onClick:()=>t("compare"),style:{padding:"7px 18px",borderRadius:8,border:"none",cursor:"pointer",fontSize:12,fontWeight:600,background:e==="compare"?"#0a2e1a":"transparent",color:e==="compare"?"#00c853":"#444",transition:"background 0.2s, color 0.2s",display:"flex",alignItems:"center",gap:6},children:["Compare Creators",i.jsx("span",{style:{fontSize:8,padding:"1px 6px",borderRadius:4,background:Q+"33",color:Q,border:`1px solid ${Q}44`,fontFamily:"monospace",fontWeight:700,letterSpacing:.5},children:"PRO"})]})]}),e==="score"&&i.jsx(Og,{}),e==="compare"&&i.jsx(Fg,{}),i.jsx("div",{style:{marginTop:40,textAlign:"center",fontSize:10,color:"#333"},children:"Audience intelligence for creators · Powered by local Claude session"})]})}function on({children:e,style:t}){return i.jsx("div",{style:{background:"#0d0d1a",border:"1px solid #12121f",borderRadius:12,padding:"16px 20px",...t},children:e})}function ln({children:e}){return i.jsx("div",{style:{fontSize:10,fontWeight:800,color:"#444",textTransform:"uppercase",letterSpacing:2,fontFamily:"monospace",marginBottom:12},children:e})}function le({label:e,value:t,sub:n,color:r="#e0e0e0"}){return i.jsxs("div",{children:[i.jsx("div",{style:{fontSize:11,color:"#444",marginBottom:3},children:e}),i.jsx("div",{style:{fontSize:22,fontWeight:800,color:r,fontFamily:"monospace",lineHeight:1},children:t}),n&&i.jsx("div",{style:{fontSize:10,color:"#333",marginTop:3},children:n})]})}function Pi({label:e,value:t,max:n,color:r}){const o=n>0?Math.round(t/n*100):0;return i.jsxs("div",{style:{marginBottom:14},children:[i.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:4},children:[i.jsx("span",{style:{fontSize:11,color:"#888"},children:e}),i.jsxs("span",{style:{fontSize:11,fontWeight:700,color:"#ccc",fontFamily:"monospace"},children:[t.toLocaleString()," ",i.jsxs("span",{style:{color:"#444"},children:["(",o,"%)"]})]})]}),i.jsx("div",{style:{height:5,background:"#1a1a2e",borderRadius:3,overflow:"hidden"},children:i.jsx("div",{style:{height:"100%",width:`${o}%`,background:r,borderRadius:3}})})]})}function Mg(){var h,v;const[e,t]=x.useState(null),[n,r]=x.useState(null),[o,l]=x.useState(!0),[s,a]=x.useState(null),[c,d]=x.useState(null),p=x.useCallback(async()=>{l(!0),a(null);try{const[w,f]=await Promise.all([fetch(`${F}/analytics/summary`),fetch(`${F}/analytics/npm-stats`)]);if(!w.ok)throw new Error(`Analytics summary: ${w.status}`);const u=await w.json();if(t(u),f.ok&&f.status!==204){const y=await f.json();r(y)}d(new Date)}catch(w){a(String(w))}finally{l(!1)}},[]);if(x.useEffect(()=>{p()},[p]),o)return i.jsx("div",{style:{padding:40,textAlign:"center",color:"#333",fontSize:12},children:"Loading metrics..."});if(s)return i.jsxs("div",{style:{padding:40,textAlign:"center"},children:[i.jsx("div",{style:{color:"#ef5350",fontSize:13,marginBottom:8},children:"Failed to load metrics"}),i.jsx("div",{style:{color:"#444",fontSize:11,fontFamily:"monospace"},children:s}),i.jsx("button",{onClick:p,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 m=(e==null?void 0:e.funnel.free_limit_hits_30d)??0,g=(h=n==null?void 0:n.latest)==null?void 0:h.npm,S=(v=n==null?void 0:n.latest)==null?void 0:v.github;return i.jsxs("div",{style:{padding:"24px 28px",maxWidth:900,margin:"0 auto"},children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:28},children:[i.jsxs("div",{children:[i.jsx("div",{style:{fontSize:18,fontWeight:800,color:"#e0e0e0"},children:"Metrics"}),i.jsx("div",{style:{fontSize:11,color:"#333",marginTop:2},children:e&&`Last 30 days · ${e.period.from} → ${e.period.to}`})]}),i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10},children:[c&&i.jsx("span",{style:{fontSize:10,color:"#333"},children:c.toLocaleTimeString()}),i.jsx("button",{onClick:p,style:{padding:"6px 14px",background:"#12121f",color:"#7c4dff",border:"1px solid #7c4dff33",borderRadius:7,cursor:"pointer",fontSize:11,fontWeight:700},children:"Refresh"})]})]}),i.jsxs(on,{style:{marginBottom:16},children:[i.jsx(ln,{children:"Conversion Funnel — 30d"}),i.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:20,marginBottom:24},children:[i.jsx(le,{label:"Free limit hits",value:((e==null?void 0:e.funnel.free_limit_hits_30d)??0).toLocaleString(),sub:"users reached paywall",color:"#ffd54f"}),i.jsx(le,{label:"Upgrade clicks",value:((e==null?void 0:e.funnel.upgrade_clicks_30d)??0).toLocaleString(),sub:"clicked Pro CTA",color:"#7c4dff"}),i.jsx(le,{label:"Checkouts completed",value:((e==null?void 0:e.funnel.checkout_completions_30d)??0).toLocaleString(),sub:"paid customers",color:"#4caf50"}),i.jsx(le,{label:"Conversion rate",value:`${(e==null?void 0:e.funnel.conversion_rate_pct)??0}%`,sub:"upgrade click → paid",color:((e==null?void 0:e.funnel.conversion_rate_pct)??0)>=5?"#4caf50":((e==null?void 0:e.funnel.conversion_rate_pct)??0)>=2?"#ffd54f":"#ef5350"})]}),i.jsx(Pi,{label:"Free limit hit",value:(e==null?void 0:e.funnel.free_limit_hits_30d)??0,max:m||1,color:"#ffd54f"}),i.jsx(Pi,{label:"Upgrade clicked",value:(e==null?void 0:e.funnel.upgrade_clicks_30d)??0,max:m||1,color:"#7c4dff"}),i.jsx(Pi,{label:"Checkout completed",value:(e==null?void 0:e.funnel.checkout_completions_30d)??0,max:m||1,color:"#4caf50"})]}),i.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:16,marginBottom:16},children:[i.jsxs(on,{children:[i.jsx(ln,{children:"CLI Telemetry — 30d"}),i.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:16,marginBottom:16},children:[i.jsx(le,{label:"Unique installs",value:((e==null?void 0:e.cli.unique_installs_30d)??0).toLocaleString()}),i.jsx(le,{label:"Total commands",value:((e==null?void 0:e.cli.total_commands_30d)??0).toLocaleString()}),i.jsx(le,{label:"Success rate",value:`${(e==null?void 0:e.cli.success_rate_pct)??0}%`,color:((e==null?void 0:e.cli.success_rate_pct)??0)>=90?"#4caf50":"#ffd54f"}),i.jsx(le,{label:"Avg duration",value:e!=null&&e.cli.avg_duration_ms?`${(e.cli.avg_duration_ms/1e3).toFixed(1)}s`:"—"})]}),e!=null&&e.cli.command_breakdown&&e.cli.command_breakdown.length>0?i.jsxs("div",{children:[i.jsx("div",{style:{fontSize:10,color:"#333",marginBottom:8},children:"By command"}),e.cli.command_breakdown.map(w=>i.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"4px 0",borderBottom:"1px solid #0d0d1a"},children:[i.jsx("span",{style:{fontSize:11,color:"#888",fontFamily:"monospace"},children:w.command}),i.jsxs("span",{style:{fontSize:11,color:"#ccc",fontFamily:"monospace"},children:[w.count," ",i.jsxs("span",{style:{color:"#333"},children:["(",(w.avg_ms/1e3).toFixed(1),"s avg)"]})]})]},w.command))]}):i.jsxs("div",{style:{fontSize:11,color:"#333",textAlign:"center",padding:"8px 0"},children:["No CLI events yet. Telemetry fires on first ",i.jsx("code",{style:{color:"#555"},children:"content-grade"})," run."]})]}),i.jsxs(on,{children:[i.jsx(ln,{children:"Web Tools — Today"}),i.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:16,marginBottom:16},children:[i.jsx(le,{label:"Requests today",value:((e==null?void 0:e.web.today.total_requests)??0).toLocaleString()}),i.jsx(le,{label:"Unique IPs today",value:((e==null?void 0:e.web.today.unique_ips)??0).toLocaleString()})]}),e!=null&&e.web.tool_usage_7d&&e.web.tool_usage_7d.length>0?i.jsxs("div",{children:[i.jsx("div",{style:{fontSize:10,color:"#333",marginBottom:8},children:"By tool (7d)"}),e.web.tool_usage_7d.slice(0,6).map(w=>i.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"4px 0",borderBottom:"1px solid #0d0d1a"},children:[i.jsx("span",{style:{fontSize:11,color:"#888",fontFamily:"monospace"},children:w.endpoint.replace("/api/demos/","")}),i.jsx("span",{style:{fontSize:11,color:"#ccc",fontFamily:"monospace"},children:w.total.toLocaleString()})]},w.endpoint))]}):i.jsx("div",{style:{fontSize:11,color:"#333",textAlign:"center",padding:"8px 0"},children:"No web tool usage tracked yet."}),(e==null?void 0:e.web.daily_active_users_7d)&&e.web.daily_active_users_7d.length>1&&i.jsxs("div",{style:{marginTop:16},children:[i.jsx("div",{style:{fontSize:10,color:"#333",marginBottom:8},children:"Daily unique IPs (7d)"}),i.jsx("div",{style:{display:"flex",alignItems:"flex-end",gap:3,height:32},children:[...e.web.daily_active_users_7d].reverse().map(w=>{const f=Math.max(...e.web.daily_active_users_7d.map(y=>y.unique_ips),1),u=Math.max(2,Math.round(w.unique_ips/f*32));return i.jsx("div",{title:`${w.date}: ${w.unique_ips} unique IPs`,style:{flex:1,height:u,background:"#7c4dff55",borderRadius:2,minWidth:8}},w.date)})})]})]})]}),i.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:16,marginBottom:16},children:[i.jsxs(on,{children:[i.jsx(ln,{children:"npm Downloads"}),g?i.jsxs(i.Fragment,{children:[i.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr 1fr",gap:12,marginBottom:12},children:[i.jsx(le,{label:"This week",value:g.last_week.toLocaleString()}),i.jsx(le,{label:"This month",value:g.last_month.toLocaleString()}),i.jsx(le,{label:"All time",value:g.last_year.toLocaleString()})]}),i.jsxs("div",{style:{fontSize:10,color:"#333"},children:["Package: ",i.jsx("code",{style:{color:"#555"},children:"content-grade"}),g.status==="awaiting_first_download"&&i.jsx("span",{style:{color:"#ffd54f",marginLeft:8},children:"awaiting first download"})]})]}):i.jsxs("div",{style:{fontSize:11,color:"#333",padding:"8px 0"},children:["No npm snapshot yet. Run:"," ",i.jsx("code",{style:{color:"#555",fontSize:10},children:"npm run metrics"})]}),n&&i.jsxs("div",{style:{marginTop:12,fontSize:10,color:"#222"},children:[n.snapshot_count," snapshot",n.snapshot_count!==1?"s":""," ·"," ","last updated ",n.newest_snapshot?new Date(n.newest_snapshot).toLocaleDateString():"—"]})]}),i.jsxs(on,{children:[i.jsx(ln,{children:"GitHub Traffic"}),S?i.jsxs(i.Fragment,{children:[i.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:12,marginBottom:12},children:[i.jsx(le,{label:"Stars",value:S.engagement.stars.toLocaleString(),color:"#ffd54f"}),i.jsx(le,{label:"Forks",value:S.engagement.forks.toLocaleString()}),i.jsx(le,{label:"Views (14d)",value:S.views.count_14d.toLocaleString()}),i.jsx(le,{label:"Clones (14d)",value:S.clones.count_14d.toLocaleString()})]}),S.top_referrers.length>0&&i.jsxs("div",{children:[i.jsx("div",{style:{fontSize:10,color:"#333",marginBottom:6},children:"Top referrers"}),S.top_referrers.slice(0,4).map(w=>i.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:10,color:"#555",padding:"2px 0"},children:[i.jsx("span",{children:w.referrer}),i.jsx("span",{style:{fontFamily:"monospace",color:"#444"},children:w.count})]},w.referrer))]})]}):i.jsxs("div",{style:{fontSize:11,color:"#333",padding:"8px 0"},children:["No GitHub snapshot yet. Run:"," ",i.jsx("code",{style:{color:"#555",fontSize:10},children:"npm run metrics"})]})]})]}),i.jsxs(on,{children:[i.jsx(ln,{children:"Email Leads — 30d"}),i.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:20},children:[i.jsx(le,{label:"Email captures",value:((e==null?void 0:e.leads.email_captures_30d)??0).toLocaleString(),sub:"total email submissions"}),i.jsx(le,{label:"Unique emails",value:((e==null?void 0:e.leads.unique_emails_30d)??0).toLocaleString(),sub:"distinct leads"})]})]}),i.jsxs("div",{style:{marginTop:16,fontSize:10,color:"#222",textAlign:"right"},children:["Generated: ",e!=null&&e.generated_at?new Date(e.generated_at).toLocaleString():"—"]})]})}const Dg=[{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 Ug(){const{email:e,isPro:t,loading:n,setEmail:r}=bu(),[o,l]=x.useState(!1),[s,a]=x.useState(""),[c,d]=x.useState(!1),[p,m]=x.useState(null),[g,S]=x.useState(!1),[h,v]=x.useState(!1);Il.useEffect(()=>{!e||!t||(S(!0),fetch(`${F}/license/my-keys?email=${encodeURIComponent(e)}`).then(j=>j.json()).then(j=>{const k=j.keys,b=k==null?void 0:k.find(z=>z.status==="active");m((b==null?void 0:b.key)??null)}).catch(()=>m(null)).finally(()=>S(!1)))},[e,t]);async function w(j){try{await navigator.clipboard.writeText(j),v(!0),setTimeout(()=>v(!1),2e3)}catch{}}async function f(){if(e){d(!0);try{const k=await(await fetch(`${F}/stripe/billing-portal`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:e,returnUrl:window.location.href})})).json();k.url?window.location.href=k.url:alert(k.error??"Could not open billing portal.")}catch{alert("Billing portal unavailable. Try again later.")}finally{d(!1)}}}function u(){const j=s.trim().toLowerCase();j.includes("@")&&(r(j),l(!1),a(""))}function y(){r(""),l(!1)}return n?i.jsx("span",{style:{fontSize:10,color:"#333",marginLeft:8},children:"..."}):e?i.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-end",gap:6,marginLeft:"auto",flexShrink:0},children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[t&&i.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"}),i.jsx("span",{style:{fontSize:10,color:"#555",maxWidth:130,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e}),t&&i.jsx("button",{onClick:f,disabled:c,style:{fontSize:10,color:"#7c4dff",background:"transparent",border:"1px solid #7c4dff44",borderRadius:5,padding:"3px 8px",cursor:"pointer",whiteSpace:"nowrap",fontWeight:600},children:c?"...":"Manage Billing"}),i.jsx("button",{onClick:y,style:{fontSize:10,color:"#444",background:"transparent",border:"none",cursor:"pointer",padding:"2px 4px"},title:"Sign out",children:"×"})]}),t&&i.jsx("div",{style:{fontSize:10,color:"#555"},children:g?i.jsx("span",{style:{color:"#333"},children:"Loading key..."}):p?i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[i.jsx("code",{style:{background:"#0d0d1a",border:"1px solid #1a1a2e",borderRadius:4,padding:"2px 8px",fontSize:10,color:"#7c4dff",fontFamily:"monospace",letterSpacing:.5},children:p}),i.jsx("button",{onClick:()=>w(p),style:{fontSize:9,color:h?"#44bb88":"#555",background:"transparent",border:"1px solid #1a1a2e",borderRadius:4,padding:"2px 6px",cursor:"pointer"},children:h?"Copied!":"Copy"})]}):i.jsx("span",{style:{color:"#333",fontSize:9},children:"Key will appear here after purchase"})})]}):o?i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,marginLeft:"auto",flexShrink:0},children:[i.jsx("input",{autoFocus:!0,type:"email",placeholder:"your@email.com",value:s,onChange:j=>a(j.target.value),onKeyDown:j=>{j.key==="Enter"&&u(),j.key==="Escape"&&(l(!1),a(""))},style:{background:"#0d0d1a",border:"1px solid #2a2a3e",borderRadius:6,padding:"5px 10px",fontSize:11,color:"#e0e0e0",outline:"none",fontFamily:"inherit",width:170}}),i.jsx("button",{onClick:u,disabled:!s.includes("@"),style:{fontSize:10,fontWeight:700,color:"#7c4dff",background:"#7c4dff18",border:"1px solid #7c4dff44",borderRadius:5,padding:"4px 10px",cursor:"pointer",opacity:s.includes("@")?1:.5},children:"Sign In"}),i.jsx("button",{onClick:()=>{l(!1),a("")},style:{fontSize:10,color:"#444",background:"transparent",border:"none",cursor:"pointer"},children:"×"})]}):i.jsx("button",{onClick:()=>l(!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 Hg(){return i.jsxs("nav",{style:{background:"#080810",borderBottom:"1px solid #12121f",padding:"0 24px",display:"flex",alignItems:"center",gap:4,overflowX:"auto",flexShrink:0},children:[i.jsx("span",{style:{fontSize:12,fontWeight:800,color:"#555",marginRight:16,whiteSpace:"nowrap",letterSpacing:1},children:"CG"}),Dg.map(({path:e,label:t,...n})=>{const r="operatorOnly"in n&&n.operatorOnly;return i.jsx(cg,{to:e,style:({isActive:o})=>({padding:"12px 14px",fontSize:12,fontWeight:600,color:o?"#e0e0e0":r?"#2a2a3e":"#444",textDecoration:"none",borderBottom:o?"2px solid #7c4dff":"2px solid transparent",whiteSpace:"nowrap"}),children:t},e)}),i.jsx(Ug,{})]})}function Vg(){return i.jsx(pg,{children:i.jsx(ig,{children:i.jsxs("div",{style:{display:"flex",flexDirection:"column",minHeight:"100vh"},children:[i.jsx(Hg,{}),i.jsx("main",{style:{flex:1,overflowY:"auto"},children:i.jsxs(Jh,{children:[i.jsx(Ze,{path:"/",element:i.jsx(Ga,{to:"/headline",replace:!0})}),i.jsx(Ze,{path:"/headline",element:i.jsx(Sg,{})}),i.jsx(Ze,{path:"/page-roast",element:i.jsx(Cg,{})}),i.jsx(Ze,{path:"/ad-scorer",element:i.jsx(Eg,{})}),i.jsx(Ze,{path:"/thread",element:i.jsx(Bg,{})}),i.jsx(Ze,{path:"/email-forge",element:i.jsx(Ng,{})}),i.jsx(Ze,{path:"/audience",element:i.jsx($g,{})}),i.jsx(Ze,{path:"/metrics",element:i.jsx(Mg,{})}),i.jsx(Ze,{path:"*",element:i.jsx(Ga,{to:"/headline",replace:!0})})]})})]})})})}Wi.createRoot(document.getElementById("root")).render(i.jsx(Il.StrictMode,{children:i.jsx(Vg,{})}));
|