PageSourceSearch

https://sociepro.ai/assets/index-C-HJexSY.js

js sociepro.ai collected 2026-10-05 15:07:59 UTC 2,446,821 bytes, 4,451 lines download raw bytes

vendor: 5,808 bytes, lines 1-9
1var PA=e=>{throw TypeError(e)};var u_=(e,t,n)=>t.has(e)||PA("Cannot "+n);var V=(e,t,n)=>(u_(e,t,"read from private field"),n?n.call(e):t.get(e)),Be=(e,t,n)=>t.has(e)?PA("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),_e=(e,t,n,r)=>(u_(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),at=(e,t,n)=>(u_(e,t,"access private method"),n);var Zg=(e,t,n,r)=>({set _(a){_e(e,t,a,n)},get _(){return V(e,t,r)}});function xY(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const a in r)if(a!=="default"&&!(a in e)){const i=Object.getOwnPropertyDescriptor(r,a);i&&Object.defineProperty(e,a,i.get?i:{enumerable:!0,get:()=>r[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(a){if(a.ep)return;a.ep=!0;const i=n(a);fetch(a.href,i)}})();var ey=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Vt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var X3={exports:{}},Kx={},Q3={exports:{}},ut={};/**
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 sg=Symbol.for("react.element"),wY=Symbol.for("react.portal"),_Y=Symbol.for("react.fragment"),kY=Symbol.for("react.strict_mode"),jY=Symbol.for("react.profiler"),SY=Symbol.for("react.provider"),NY=Symbol.for("react.context"),CY=Symbol.for("react.forward_ref"),PY=Symbol.for("react.suspense"),TY=Symbol.for("react.memo"),AY=Symbol.for("react.lazy"),TA=Symbol.iterator;function EY(e){return e===null||typeof e!="object"?null:(e=TA&&e[TA]||e["@@iterator"],typeof e=="function"?e:null)}var J3={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Z3=Object.assign,e$={};function Ph(e,t,n){this.props=e,this.context=t,this.refs=e$,this.updater=n||J3}Ph.prototype.isReactComponent={};Ph.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")};Ph.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function t$(){}t$.prototype=Ph.prototype;function hC(e,t,n){this.props=e,this.context=t,this.refs=e$,this.updater=n||J3}var fC=hC.prototype=new t$;fC.constructor=hC;Z3(fC,Ph.prototype);fC.isPureReactComponent=!0;var AA=Array.isArray,n$=Object.prototype.hasOwnProperty,pC={current:null},r$={key:!0,ref:!0,__self:!0,__source:!0};function a$(e,t,n){var r,a={},i=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)n$.call(t,r)&&!r$.hasOwnProperty(r)&&(a[r]=t[r]);var l=arguments.length-2;if(l===1)a.children=n;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];a.children=c}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)a[r]===void 0&&(a[r]=l[r]);return{$$typeof:sg,type:e,key:i,ref:o,props:a,_owner:pC.current}}function OY(e,t){return{$$typeof:sg,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function mC(e){return typeof e=="object"&&e!==null&&e.$$typeof===sg}function RY(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var EA=/\/+/g;function d_(e,t){return typeof e=="object"&&e!==null&&e.key!=null?RY(""+e.key):t.toString(36)}function dv(e,t,n,r,a){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case sg:case wY:o=!0}}if(o)return o=e,a=a(o),e=r===""?"."+d_(o,0):r,AA(a)?(n="",e!=null&&(n=e.replace(EA,"$&/")+"/"),dv(a,t,n,"",function(u){return u})):a!=null&&(mC(a)&&(a=OY(a,n+(!a.key||o&&o.key===a.key?"":(""+a.key).replace(EA,"$&/")+"/")+e)),t.push(a)),1;if(o=0,r=r===""?".":r+":",AA(e))for(var l=0;l<e.length;l++){i=e[l];var c=r+d_(i,l);o+=dv(i,t,n,c,a)}else if(c=EY(e),typeof c=="function")for(e=c.call(e),l=0;!(i=e.next()).done;)i=i.value,c=r+d_(i,l++),o+=dv(i,t,n,c,a);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function ty(e,t,n){if(e==null)return e;var r=[],a=0;return dv(e,r,"","",function(i){return t.call(n,i,a++)}),r}function IY(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 ta={current:null},hv={transition:null},MY={ReactCurrentDispatcher:ta,ReactCurrentBatchConfig:hv,ReactCurrentOwner:pC};function s$(){throw Error("act(...) is not supported in production builds of React.")}
vendor: 5,485 bytes, lines 9-25
9ut.Children={map:ty,forEach:function(e,t,n){ty(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ty(e,function(){t++}),t},toArray:function(e){return ty(e,function(t){return t})||[]},only:function(e){if(!mC(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ut.Component=Ph;ut.Fragment=_Y;ut.Profiler=jY;ut.PureComponent=hC;ut.StrictMode=kY;ut.Suspense=PY;ut.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=MY;ut.act=s$;ut.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=Z3({},e.props),a=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=pC.current),t.key!==void 0&&(a=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)n$.call(t,c)&&!r$.hasOwnProperty(c)&&(r[c]=t[c]===void 0&&l!==void 0?l[c]:t[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];r.children=l}return{$$typeof:sg,type:e.type,key:a,ref:i,props:r,_owner:o}};ut.createContext=function(e){return e={$$typeof:NY,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:SY,_context:e},e.Consumer=e};ut.createElement=a$;ut.createFactory=function(e){var t=a$.bind(null,e);return t.type=e,t};ut.createRef=function(){return{current:null}};ut.forwardRef=function(e){return{$$typeof:CY,render:e}};ut.isValidElement=mC;ut.lazy=function(e){return{$$typeof:AY,_payload:{_status:-1,_result:e},_init:IY}};ut.memo=function(e,t){return{$$typeof:TY,type:e,compare:t===void 0?null:t}};ut.startTransition=function(e){var t=hv.transition;hv.transition={};try{e()}finally{hv.transition=t}};ut.unstable_act=s$;ut.useCallback=function(e,t){return ta.current.useCallback(e,t)};ut.useContext=function(e){return ta.current.useContext(e)};ut.useDebugValue=function(){};ut.useDeferredValue=function(e){return ta.current.useDeferredValue(e)};ut.useEffect=function(e,t){return ta.current.useEffect(e,t)};ut.useId=function(){return ta.current.useId()};ut.useImperativeHandle=function(e,t,n){return ta.current.useImperativeHandle(e,t,n)};ut.useInsertionEffect=function(e,t){return ta.current.useInsertionEffect(e,t)};ut.useLayoutEffect=function(e,t){return ta.current.useLayoutEffect(e,t)};ut.useMemo=function(e,t){return ta.current.useMemo(e,t)};ut.useReducer=function(e,t,n){return ta.current.useReducer(e,t,n)};ut.useRef=function(e){return ta.current.useRef(e)};ut.useState=function(e){return ta.current.useState(e)};ut.useSyncExternalStore=function(e,t,n){return ta.current.useSyncExternalStore(e,t,n)};ut.useTransition=function(){return ta.current.useTransition()};ut.version="18.3.1";Q3.exports=ut;var g=Q3.exports;const F=Vt(g),gC=xY({__proto__:null,default:F},[g]);/**
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 DY=g,$Y=Symbol.for("react.element"),LY=Symbol.for("react.fragment"),FY=Object.prototype.hasOwnProperty,BY=DY.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,WY={key:!0,ref:!0,__self:!0,__source:!0};function i$(e,t,n){var r,a={},i=null,o=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)FY.call(t,r)&&!WY.hasOwnProperty(r)&&(a[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)a[r]===void 0&&(a[r]=t[r]);return{$$typeof:$Y,type:e,key:i,ref:o,props:a,_owner:BY.current}}Kx.Fragment=LY;Kx.jsx=i$;Kx.jsxs=i$;X3.exports=Kx;var s=X3.exports,o$={exports:{}},$a={},l$={exports:{}},c$={};/**
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(E,T){var L=E.length;E.push(T);e:for(;0<L;){var B=L-1>>>1,H=E[B];if(0<a(H,T))E[B]=T,E[L]=H,L=B;else break e}}function n(E){return E.length===0?null:E[0]}function r(E){if(E.length===0)return null;var T=E[0],L=E.pop();if(L!==T){E[0]=L;e:for(var B=0,H=E.length,G=H>>>1;B<G;){var Z=2*(B+1)-1,le=E[Z],ue=Z+1,re=E[ue];if(0>a(le,L))ue<H&&0>a(re,le)?(E[B]=re,E[ue]=L,B=ue):(E[B]=le,E[Z]=L,B=Z);else if(ue<H&&0>a(re,L))E[B]=re,E[ue]=L,B=ue;else break e}}return T}function a(E,T){var L=E.sortIndex-T.sortIndex;return L!==0?L:E.id-T.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var c=[],u=[],h=1,d=null,f=3,p=!1,y=!1,m=!1,v=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(E){for(var T=n(u);T!==null;){if(T.callback===null)r(u);else if(T.startTime<=E)r(u),T.sortIndex=T.expirationTime,t(c,T);else break;T=n(u)}}function _(E){if(m=!1,w(E),!y)if(n(c)!==null)y=!0,P(k);else{var T=n(u);T!==null&&A(_,T.startTime-E)}}function k(E,T){y=!1,m&&(m=!1,b(N),N=-1),p=!0;var L=f;try{for(w(T),d=n(c);d!==null&&(!(d.expirationTime>T)||E&&!O());){var B=d.callback;
vendor: 9,153 bytes, lines 25-34
25if(typeof B=="function"){d.callback=null,f=d.priorityLevel;var H=B(d.expirationTime<=T);T=e.unstable_now(),typeof H=="function"?d.callback=H:d===n(c)&&r(c),w(T)}else r(c);d=n(c)}if(d!==null)var G=!0;else{var Z=n(u);Z!==null&&A(_,Z.startTime-T),G=!1}return G}finally{d=null,f=L,p=!1}}var j=!1,S=null,N=-1,C=5,M=-1;function O(){return!(e.unstable_now()-M<C)}function D(){if(S!==null){var E=e.unstable_now();M=E;var T=!0;try{T=S(!0,E)}finally{T?$():(j=!1,S=null)}}else j=!1}var $;if(typeof x=="function")$=function(){x(D)};else if(typeof MessageChannel<"u"){var R=new MessageChannel,I=R.port2;R.port1.onmessage=D,$=function(){I.postMessage(null)}}else $=function(){v(D,0)};function P(E){S=E,j||(j=!0,$())}function A(E,T){N=v(function(){E(e.unstable_now())},T)}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(E){E.callback=null},e.unstable_continueExecution=function(){y||p||(y=!0,P(k))},e.unstable_forceFrameRate=function(E){0>E||125<E?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):C=0<E?Math.floor(1e3/E):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(E){switch(f){case 1:case 2:case 3:var T=3;break;default:T=f}var L=f;f=T;try{return E()}finally{f=L}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(E,T){switch(E){case 1:case 2:case 3:case 4:case 5:break;default:E=3}var L=f;f=E;try{return T()}finally{f=L}},e.unstable_scheduleCallback=function(E,T,L){var B=e.unstable_now();switch(typeof L=="object"&&L!==null?(L=L.delay,L=typeof L=="number"&&0<L?B+L:B):L=B,E){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=L+H,E={id:h++,callback:T,priorityLevel:E,startTime:L,expirationTime:H,sortIndex:-1},L>B?(E.sortIndex=L,t(u,E),n(c)===null&&E===n(u)&&(m?(b(N),N=-1):m=!0,A(_,L-B))):(E.sortIndex=H,t(c,E),y||p||(y=!0,P(k))),E},e.unstable_shouldYield=O,e.unstable_wrapCallback=function(E){var T=f;return function(){var L=f;f=T;try{return E.apply(this,arguments)}finally{f=L}}}})(c$);l$.exports=c$;var qY=l$.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 UY=g,Ia=qY;function me(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 u$=new Set,Sp={};function hu(e,t){Ud(e,t),Ud(e+"Capture",t)}function Ud(e,t){for(Sp[e]=t,e=0;e<t.length;e++)u$.add(t[e])}var go=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),pk=Object.prototype.hasOwnProperty,zY=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,OA={},RA={};function HY(e){return pk.call(RA,e)?!0:pk.call(OA,e)?!1:zY.test(e)?RA[e]=!0:(OA[e]=!0,!1)}function VY(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 GY(e,t,n,r){if(t===null||typeof t>"u"||VY(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 na(e,t,n,r,a,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=a,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var Cr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Cr[e]=new na(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Cr[t]=new na(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Cr[e]=new na(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Cr[e]=new na(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){Cr[e]=new na(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Cr[e]=new na(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Cr[e]=new na(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Cr[e]=new na(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Cr[e]=new na(e,5,!1,e.toLowerCase(),null,!1,!1)});var yC=/[\-:]([a-z])/g;function vC(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(yC,vC);Cr[t]=new na(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(yC,vC);Cr[t]=new na(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(yC,vC);Cr[t]=new na(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Cr[e]=new na(e,1,!1,e.toLowerCase(),null,!1,!1)});Cr.xlinkHref=new na("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Cr[e]=new na(e,1,!1,e.toLowerCase(),null,!0,!0)});function bC(e,t,n,r){var a=Cr.hasOwnProperty(t)?Cr[t]:null;(a!==null?a.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(GY(t,n,a,r)&&(n=null),r||a===null?HY(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):a.mustUseProperty?e[a.propertyName]=n===null?a.type===3?!1:"":n:(t=a.attributeName,r=a.attributeNamespace,n===null?e.removeAttribute(t):(a=a.type,n=a===3||a===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Ao=UY.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ny=Symbol.for("react.element"),qu=Symbol.for("react.portal"),Uu=Symbol.for("react.fragment"),xC=Symbol.for("react.strict_mode"),mk=Symbol.for("react.profiler"),d$=Symbol.for("react.provider"),h$=Symbol.for("react.context"),wC=Symbol.for("react.forward_ref"),gk=Symbol.for("react.suspense"),yk=Symbol.for("react.suspense_list"),_C=Symbol.for("react.memo"),Vo=Symbol.for("react.lazy"),f$=Symbol.for("react.offscreen"),IA=Symbol.iterator;function ff(e){return e===null||typeof e!="object"?null:(e=IA&&e[IA]||e["@@iterator"],typeof e=="function"?e:null)}var xn=Object.assign,h_;function Uf(e){if(h_===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);h_=t&&t[1]||""}return`
34`+h_+e}var f_=!1;function p_(e,t){if(!e||f_)return"";f_=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}
vendor: 16,637 bytes, lines 34-37
34catch(u){if(u&&r&&typeof u.stack=="string"){for(var a=u.stack.split(`
35`),i=r.stack.split(`
36`),o=a.length-1,l=i.length-1;1<=o&&0<=l&&a[o]!==i[l];)l--;for(;1<=o&&0<=l;o--,l--)if(a[o]!==i[l]){if(o!==1||l!==1)do if(o--,l--,0>l||a[o]!==i[l]){var c=`
37`+a[o].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=o&&0<=l);break}}}finally{f_=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Uf(e):""}function YY(e){switch(e.tag){case 5:return Uf(e.type);case 16:return Uf("Lazy");case 13:return Uf("Suspense");case 19:return Uf("SuspenseList");case 0:case 2:case 15:return e=p_(e.type,!1),e;case 11:return e=p_(e.type.render,!1),e;case 1:return e=p_(e.type,!0),e;default:return""}}function vk(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 Uu:return"Fragment";case qu:return"Portal";case mk:return"Profiler";case xC:return"StrictMode";case gk:return"Suspense";case yk:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case h$:return(e.displayName||"Context")+".Consumer";case d$:return(e._context.displayName||"Context")+".Provider";case wC:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case _C:return t=e.displayName||null,t!==null?t:vk(e.type)||"Memo";case Vo:t=e._payload,e=e._init;try{return vk(e(t))}catch{}}return null}function KY(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 vk(t);case 8:return t===xC?"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 Al(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function p$(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function XY(e){var t=p$(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var a=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ry(e){e._valueTracker||(e._valueTracker=XY(e))}function m$(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=p$(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Wv(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 bk(e,t){var n=t.checked;return xn({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function MA(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Al(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 g$(e,t){t=t.checked,t!=null&&bC(e,"checked",t,!1)}function xk(e,t){g$(e,t);var n=Al(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")?wk(e,t.type,n):t.hasOwnProperty("defaultValue")&&wk(e,t.type,Al(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function DA(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 wk(e,t,n){(t!=="number"||Wv(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var zf=Array.isArray;function ud(e,t,n,r){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Al(n),t=null,a=0;a<e.length;a++){if(e[a].value===n){e[a].selected=!0,r&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function _k(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(me(91));return xn({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function $A(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(me(92));if(zf(n)){if(1<n.length)throw Error(me(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Al(n)}}function y$(e,t){var n=Al(t.value),r=Al(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 LA(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function v$(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 kk(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?v$(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var ay,b$=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,a){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,a)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(ay=ay||document.createElement("div"),ay.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ay.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Np(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var tp={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},QY=["Webkit","ms","Moz","O"];Object.keys(tp).forEach(function(e){QY.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),tp[t]=tp[e]})});function x$(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||tp.hasOwnProperty(e)&&tp[e]?(""+t).trim():t+"px"}function w$(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,a=x$(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,a):e[n]=a}}var JY=xn({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 jk(e,t){if(t){if(JY[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(me(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(me(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(me(61))}if(t.style!=null&&typeof t.style!="object")throw Error(me(62))}}function Sk(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 Nk=null;function kC(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ck=null,dd=null,hd=null;function FA(e){if(e=lg(e)){if(typeof Ck!="function")throw Error(me(280));var t=e.stateNode;t&&(t=ew(t),Ck(e.stateNode,e.type,t))}}function _$(e){dd?hd?hd.push(e):hd=[e]:dd=e}function k$(){if(dd){var e=dd,t=hd;if(hd=dd=null,FA(e),t)for(e=0;e<t.length;e++)FA(t[e])}}function j$(e,t){return e(t)}function S$(){}var m_=!1;function N$(e,t,n){if(m_)return e(t,n);m_=!0;try{return j$(e,t,n)}finally{m_=!1,(dd!==null||hd!==null)&&(S$(),k$())}}function Cp(e,t){var n=e.stateNode;if(n===null)return null;var r=ew(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(me(231,t,typeof n));return n}var Pk=!1;if(go)try{var pf={};Object.defineProperty(pf,"passive",{get:function(){Pk=!0}}),window.addEventListener("test",pf,pf),window.removeEventListener("test",pf,pf)}catch{Pk=!1}function ZY(e,t,n,r,a,i,o,l,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(h){this.onError(h)}}var np=!1,qv=null,Uv=!1,Tk=null,eK={onError:function(e){np=!0,qv=e}};function tK(e,t,n,r,a,i,o,l,c){np=!1,qv=null,ZY.apply(eK,arguments)}function nK(e,t,n,r,a,i,o,l,c){if(tK.apply(this,arguments),np){if(np){var u=qv;np=!1,qv=null}else throw Error(me(198));Uv||(Uv=!0,Tk=u)}}function fu(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 C$(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 BA(e){if(fu(e)!==e)throw Error(me(188))}function rK(e){var t=e.alternate;if(!t){if(t=fu(e),t===null)throw Error(me(188));return t!==e?null:e}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var i=a.alternate;if(i===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===i.child){for(i=a.child;i;){if(i===n)return BA(a),e;if(i===r)return BA(a),t;i=i.sibling}throw Error(me(188))}if(n.return!==r.return)n=a,r=i;else{for(var o=!1,l=a.child;l;){if(l===n){o=!0,n=a,r=i;break}if(l===r){o=!0,r=a,n=i;break}l=l.sibling}if(!o){for(l=i.child;l;){if(l===n){o=!0,n=i,r=a;break}if(l===r){o=!0,r=i,n=a;break}l=l.sibling}if(!o)throw Error(me(189))}}if(n.alternate!==r)throw Error(me(190))}if(n.tag!==3)throw Error(me(188));return n.stateNode.current===n?e:t}function P$(e){return e=rK(e),e!==null?T$(e):null}function T$(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=T$(e);if(t!==null)return t;e=e.sibling}return null}var A$=Ia.unstable_scheduleCallback,WA=Ia.unstable_cancelCallback,aK=Ia.unstable_shouldYield,sK=Ia.unstable_requestPaint,Rn=Ia.unstable_now,iK=Ia.unstable_getCurrentPriorityLevel,jC=Ia.unstable_ImmediatePriority,E$=Ia.unstable_UserBlockingPriority,zv=Ia.unstable_NormalPriority,oK=Ia.unstable_LowPriority,O$=Ia.unstable_IdlePriority,Xx=null,pi=null;function lK(e){if(pi&&typeof pi.onCommitFiberRoot=="function")try{pi.onCommitFiberRoot(Xx,e,void 0,(e.current.flags&128)===128)}catch{}}var Rs=Math.clz32?Math.clz32:dK,cK=Math.log,uK=Math.LN2;function dK(e){return e>>>=0,e===0?32:31-(cK(e)/uK|0)|0}var sy=64,iy=4194304;function Hf(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 Hv(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,a=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var l=o&~a;l!==0?r=Hf(l):(i&=o,i!==0&&(r=Hf(i)))}else o=n&~a,o!==0?r=Hf(o):i!==0&&(r=Hf(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&a)&&(a=r&-r,i=t&-t,a>=i||a===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Rs(t),a=1<<n,r|=e[n],t&=~a;return r}function hK(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 fK(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,a=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-Rs(i),l=1<<o,c=a[o];c===-1?(!(l&n)||l&r)&&(a[o]=hK(l,t)):c<=t&&(e.expiredLanes|=l),i&=~l}}function Ak(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function R$(){var e=sy;return sy<<=1,!(sy&4194240)&&(sy=64),e}function g_(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ig(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Rs(t),e[t]=n}function pK(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var a=31-Rs(n),i=1<<a;t[a]=0,r[a]=-1,e[a]=-1,n&=~i}}function SC(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Rs(n),a=1<<r;a&t|e[r]&t&&(e[r]|=t),n&=~a}}var Wt=0;function I$(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var M$,NC,D$,$$,L$,Ek=!1,oy=[],ml=null,gl=null,yl=null,Pp=new Map,Tp=new Map,Xo=[],mK="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 qA(e,t){switch(e){case"focusin":case"focusout":ml=null;break;case"dragenter":case"dragleave":gl=null;break;case"mouseover":case"mouseout":yl=null;break;case"pointerover":case"pointerout":Pp.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Tp.delete(t.pointerId)}}function mf(e,t,n,r,a,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[a]},t!==null&&(t=lg(t),t!==null&&NC(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function gK(e,t,n,r,a){switch(t){case"focusin":return ml=mf(ml,e,t,n,r,a),!0;case"dragenter":return gl=mf(gl,e,t,n,r,a),!0;case"mouseover":return yl=mf(yl,e,t,n,r,a),!0;case"pointerover":var i=a.pointerId;return Pp.set(i,mf(Pp.get(i)||null,e,t,n,r,a)),!0;case"gotpointercapture":return i=a.pointerId,Tp.set(i,mf(Tp.get(i)||null,e,t,n,r,a)),!0}return!1}function F$(e){var t=pc(e.target);if(t!==null){var n=fu(t);if(n!==null){if(t=n.tag,t===13){if(t=C$(n),t!==null){e.blockedOn=t,L$(e.priority,function(){D$(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 fv(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ok(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Nk=r,n.target.dispatchEvent(r),Nk=null}else return t=lg(n),t!==null&&NC(t),e.blockedOn=n,!1;t.shift()}return!0}function UA(e,t,n){fv(e)&&n.delete(t)}
vendor: 11,584 bytes, line 37
37function yK(){Ek=!1,ml!==null&&fv(ml)&&(ml=null),gl!==null&&fv(gl)&&(gl=null),yl!==null&&fv(yl)&&(yl=null),Pp.forEach(UA),Tp.forEach(UA)}function gf(e,t){e.blockedOn===t&&(e.blockedOn=null,Ek||(Ek=!0,Ia.unstable_scheduleCallback(Ia.unstable_NormalPriority,yK)))}function Ap(e){function t(a){return gf(a,e)}if(0<oy.length){gf(oy[0],e);for(var n=1;n<oy.length;n++){var r=oy[n];r.blockedOn===e&&(r.blockedOn=null)}}for(ml!==null&&gf(ml,e),gl!==null&&gf(gl,e),yl!==null&&gf(yl,e),Pp.forEach(t),Tp.forEach(t),n=0;n<Xo.length;n++)r=Xo[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Xo.length&&(n=Xo[0],n.blockedOn===null);)F$(n),n.blockedOn===null&&Xo.shift()}var fd=Ao.ReactCurrentBatchConfig,Vv=!0;function vK(e,t,n,r){var a=Wt,i=fd.transition;fd.transition=null;try{Wt=1,CC(e,t,n,r)}finally{Wt=a,fd.transition=i}}function bK(e,t,n,r){var a=Wt,i=fd.transition;fd.transition=null;try{Wt=4,CC(e,t,n,r)}finally{Wt=a,fd.transition=i}}function CC(e,t,n,r){if(Vv){var a=Ok(e,t,n,r);if(a===null)N_(e,t,r,Gv,n),qA(e,r);else if(gK(a,e,t,n,r))r.stopPropagation();else if(qA(e,r),t&4&&-1<mK.indexOf(e)){for(;a!==null;){var i=lg(a);if(i!==null&&M$(i),i=Ok(e,t,n,r),i===null&&N_(e,t,r,Gv,n),i===a)break;a=i}a!==null&&r.stopPropagation()}else N_(e,t,r,null,n)}}var Gv=null;function Ok(e,t,n,r){if(Gv=null,e=kC(r),e=pc(e),e!==null)if(t=fu(e),t===null)e=null;else if(n=t.tag,n===13){if(e=C$(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 Gv=e,null}function B$(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(iK()){case jC:return 1;case E$:return 4;case zv:case oK:return 16;case O$:return 536870912;default:return 16}default:return 16}}var ul=null,PC=null,pv=null;function W$(){if(pv)return pv;var e,t=PC,n=t.length,r,a="value"in ul?ul.value:ul.textContent,i=a.length;for(e=0;e<n&&t[e]===a[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===a[i-r];r++);return pv=a.slice(e,1<r?1-r:void 0)}function mv(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 ly(){return!0}function zA(){return!1}function La(e){function t(n,r,a,i,o){this._reactName=n,this._targetInst=a,this.type=r,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(i):i[l]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?ly:zA,this.isPropagationStopped=zA,this}return xn(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=ly)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ly)},persist:function(){},isPersistent:ly}),t}var Th={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},TC=La(Th),og=xn({},Th,{view:0,detail:0}),xK=La(og),y_,v_,yf,Qx=xn({},og,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:AC,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!==yf&&(yf&&e.type==="mousemove"?(y_=e.screenX-yf.screenX,v_=e.screenY-yf.screenY):v_=y_=0,yf=e),y_)},movementY:function(e){return"movementY"in e?e.movementY:v_}}),HA=La(Qx),wK=xn({},Qx,{dataTransfer:0}),_K=La(wK),kK=xn({},og,{relatedTarget:0}),b_=La(kK),jK=xn({},Th,{animationName:0,elapsedTime:0,pseudoElement:0}),SK=La(jK),NK=xn({},Th,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),CK=La(NK),PK=xn({},Th,{data:0}),VA=La(PK),TK={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},AK={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"},EK={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function OK(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=EK[e])?!!t[e]:!1}function AC(){return OK}var RK=xn({},og,{key:function(e){if(e.key){var t=TK[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=mv(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?AK[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:AC,charCode:function(e){return e.type==="keypress"?mv(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?mv(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),IK=La(RK),MK=xn({},Qx,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),GA=La(MK),DK=xn({},og,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:AC}),$K=La(DK),LK=xn({},Th,{propertyName:0,elapsedTime:0,pseudoElement:0}),FK=La(LK),BK=xn({},Qx,{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}),WK=La(BK),qK=[9,13,27,32],EC=go&&"CompositionEvent"in window,rp=null;go&&"documentMode"in document&&(rp=document.documentMode);var UK=go&&"TextEvent"in window&&!rp,q$=go&&(!EC||rp&&8<rp&&11>=rp),YA=" ",KA=!1;function U$(e,t){switch(e){case"keyup":return qK.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function z$(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var zu=!1;function zK(e,t){switch(e){case"compositionend":return z$(t);case"keypress":return t.which!==32?null:(KA=!0,YA);case"textInput":return e=t.data,e===YA&&KA?null:e;default:return null}}function HK(e,t){if(zu)return e==="compositionend"||!EC&&U$(e,t)?(e=W$(),pv=PC=ul=null,zu=!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 q$&&t.locale!=="ko"?null:t.data;default:return null}}var VK={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 XA(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!VK[e.type]:t==="textarea"}function H$(e,t,n,r){_$(r),t=Yv(t,"onChange"),0<t.length&&(n=new TC("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ap=null,Ep=null;function GK(e){nL(e,0)}function Jx(e){var t=Gu(e);if(m$(t))return e}function YK(e,t){if(e==="change")return t}var V$=!1;if(go){var x_;if(go){var w_="oninput"in document;if(!w_){var QA=document.createElement("div");QA.setAttribute("oninput","return;"),w_=typeof QA.oninput=="function"}x_=w_}else x_=!1;V$=x_&&(!document.documentMode||9<document.documentMode)}function JA(){ap&&(ap.detachEvent("onpropertychange",G$),Ep=ap=null)}function G$(e){if(e.propertyName==="value"&&Jx(Ep)){var t=[];H$(t,Ep,e,kC(e)),N$(GK,t)}}function KK(e,t,n){e==="focusin"?(JA(),ap=t,Ep=n,ap.attachEvent("onpropertychange",G$)):e==="focusout"&&JA()}function XK(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Jx(Ep)}function QK(e,t){if(e==="click")return Jx(t)}function JK(e,t){if(e==="input"||e==="change")return Jx(t)}function ZK(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Fs=typeof Object.is=="function"?Object.is:ZK;function Op(e,t){if(Fs(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var a=n[r];if(!pk.call(t,a)||!Fs(e[a],t[a]))return!1}return!0}function ZA(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function eE(e,t){var n=ZA(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=ZA(n)}}function Y$(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Y$(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function K$(){for(var e=window,t=Wv();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Wv(e.document)}return t}function OC(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 eX(e){var t=K$(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Y$(n.ownerDocument.documentElement,n)){if(r!==null&&OC(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var a=n.textContent.length,i=Math.min(r.start,a);r=r.end===void 0?i:Math.min(r.end,a),!e.extend&&i>r&&(a=r,r=i,i=a),a=eE(n,i);var o=eE(n,r);a&&o&&(e.rangeCount!==1||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(a.node,a.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var tX=go&&"documentMode"in document&&11>
vendor: 4,874 bytes, line 37
37=document.documentMode,Hu=null,Rk=null,sp=null,Ik=!1;function tE(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ik||Hu==null||Hu!==Wv(r)||(r=Hu,"selectionStart"in r&&OC(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}),sp&&Op(sp,r)||(sp=r,r=Yv(Rk,"onSelect"),0<r.length&&(t=new TC("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Hu)))}function cy(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Vu={animationend:cy("Animation","AnimationEnd"),animationiteration:cy("Animation","AnimationIteration"),animationstart:cy("Animation","AnimationStart"),transitionend:cy("Transition","TransitionEnd")},__={},X$={};go&&(X$=document.createElement("div").style,"AnimationEvent"in window||(delete Vu.animationend.animation,delete Vu.animationiteration.animation,delete Vu.animationstart.animation),"TransitionEvent"in window||delete Vu.transitionend.transition);function Zx(e){if(__[e])return __[e];if(!Vu[e])return e;var t=Vu[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in X$)return __[e]=t[n];return e}var Q$=Zx("animationend"),J$=Zx("animationiteration"),Z$=Zx("animationstart"),eL=Zx("transitionend"),tL=new Map,nE="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 Ll(e,t){tL.set(e,t),hu(t,[e])}for(var k_=0;k_<nE.length;k_++){var j_=nE[k_],nX=j_.toLowerCase(),rX=j_[0].toUpperCase()+j_.slice(1);Ll(nX,"on"+rX)}Ll(Q$,"onAnimationEnd");Ll(J$,"onAnimationIteration");Ll(Z$,"onAnimationStart");Ll("dblclick","onDoubleClick");Ll("focusin","onFocus");Ll("focusout","onBlur");Ll(eL,"onTransitionEnd");Ud("onMouseEnter",["mouseout","mouseover"]);Ud("onMouseLeave",["mouseout","mouseover"]);Ud("onPointerEnter",["pointerout","pointerover"]);Ud("onPointerLeave",["pointerout","pointerover"]);hu("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));hu("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));hu("onBeforeInput",["compositionend","keypress","textInput","paste"]);hu("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));hu("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));hu("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Vf="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(" "),aX=new Set("cancel close invalid load scroll toggle".split(" ").concat(Vf));function rE(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,nK(r,t,void 0,e),e.currentTarget=null}function nL(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],a=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var o=r.length-1;0<=o;o--){var l=r[o],c=l.instance,u=l.currentTarget;if(l=l.listener,c!==i&&a.isPropagationStopped())break e;rE(a,l,u),i=c}else for(o=0;o<r.length;o++){if(l=r[o],c=l.instance,u=l.currentTarget,l=l.listener,c!==i&&a.isPropagationStopped())break e;rE(a,l,u),i=c}}}if(Uv)throw e=Tk,Uv=!1,Tk=null,e}function tn(e,t){var n=t[Fk];n===void 0&&(n=t[Fk]=new Set);var r=e+"__bubble";n.has(r)||(rL(t,e,2,!1),n.add(r))}function S_(e,t,n){var r=0;t&&(r|=4),rL(n,e,r,t)}var uy="_reactListening"+Math.random().toString(36).slice(2);function Rp(e){if(!e[uy]){e[uy]=!0,u$.forEach(function(n){n!=="selectionchange"&&(aX.has(n)||S_(n,!1,e),S_(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[uy]||(t[uy]=!0,S_("selectionchange",!1,t))}}function rL(e,t,n,r){switch(B$(t)){case 1:var a=vK;break;case 4:a=bK;break;default:a=CC}n=a.bind(null,t,n,e),a=void 0,!Pk||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),r?a!==void 0?e.addEventListener(t,n,{capture:!0,passive:a}):e.addEventListener(t,n,!0):a!==void 0?e.addEventListener(t,n,{passive:a}):e.addEventListener(t,n,!1)}function N_(e,t,n,r,a){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var l=r.stateNode.containerInfo;
vendor: 21,578 bytes, lines 37-38
37if(l===a||l.nodeType===8&&l.parentNode===a)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&(c=o.stateNode.containerInfo,c===a||c.nodeType===8&&c.parentNode===a))return;o=o.return}for(;l!==null;){if(o=pc(l),o===null)return;if(c=o.tag,c===5||c===6){r=i=o;continue e}l=l.parentNode}}r=r.return}N$(function(){var u=i,h=kC(n),d=[];e:{var f=tL.get(e);if(f!==void 0){var p=TC,y=e;switch(e){case"keypress":if(mv(n)===0)break e;case"keydown":case"keyup":p=IK;break;case"focusin":y="focus",p=b_;break;case"focusout":y="blur",p=b_;break;case"beforeblur":case"afterblur":p=b_;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":p=HA;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=_K;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=$K;break;case Q$:case J$:case Z$:p=SK;break;case eL:p=FK;break;case"scroll":p=xK;break;case"wheel":p=WK;break;case"copy":case"cut":case"paste":p=CK;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=GA}var m=(t&4)!==0,v=!m&&e==="scroll",b=m?f!==null?f+"Capture":null:f;m=[];for(var x=u,w;x!==null;){w=x;var _=w.stateNode;if(w.tag===5&&_!==null&&(w=_,b!==null&&(_=Cp(x,b),_!=null&&m.push(Ip(x,_,w)))),v)break;x=x.return}0<m.length&&(f=new p(f,y,null,n,h),d.push({event:f,listeners:m}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&n!==Nk&&(y=n.relatedTarget||n.fromElement)&&(pc(y)||y[yo]))break e;if((p||f)&&(f=h.window===h?h:(f=h.ownerDocument)?f.defaultView||f.parentWindow:window,p?(y=n.relatedTarget||n.toElement,p=u,y=y?pc(y):null,y!==null&&(v=fu(y),y!==v||y.tag!==5&&y.tag!==6)&&(y=null)):(p=null,y=u),p!==y)){if(m=HA,_="onMouseLeave",b="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&(m=GA,_="onPointerLeave",b="onPointerEnter",x="pointer"),v=p==null?f:Gu(p),w=y==null?f:Gu(y),f=new m(_,x+"leave",p,n,h),f.target=v,f.relatedTarget=w,_=null,pc(h)===u&&(m=new m(b,x+"enter",y,n,h),m.target=w,m.relatedTarget=v,_=m),v=_,p&&y)t:{for(m=p,b=y,x=0,w=m;w;w=Su(w))x++;for(w=0,_=b;_;_=Su(_))w++;for(;0<x-w;)m=Su(m),x--;for(;0<w-x;)b=Su(b),w--;for(;x--;){if(m===b||b!==null&&m===b.alternate)break t;m=Su(m),b=Su(b)}m=null}else m=null;p!==null&&aE(d,f,p,m,!1),y!==null&&v!==null&&aE(d,v,y,m,!0)}}e:{if(f=u?Gu(u):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var k=YK;else if(XA(f))if(V$)k=JK;else{k=XK;var j=KK}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(k=QK);if(k&&(k=k(e,u))){H$(d,k,n,h);break e}j&&j(e,f,u),e==="focusout"&&(j=f._wrapperState)&&j.controlled&&f.type==="number"&&wk(f,"number",f.value)}switch(j=u?Gu(u):window,e){case"focusin":(XA(j)||j.contentEditable==="true")&&(Hu=j,Rk=u,sp=null);break;case"focusout":sp=Rk=Hu=null;break;case"mousedown":Ik=!0;break;case"contextmenu":case"mouseup":case"dragend":Ik=!1,tE(d,n,h);break;case"selectionchange":if(tX)break;case"keydown":case"keyup":tE(d,n,h)}var S;if(EC)e:{switch(e){case"compositionstart":var N="onCompositionStart";break e;case"compositionend":N="onCompositionEnd";break e;case"compositionupdate":N="onCompositionUpdate";break e}N=void 0}else zu?U$(e,n)&&(N="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(N="onCompositionStart");N&&(q$&&n.locale!=="ko"&&(zu||N!=="onCompositionStart"?N==="onCompositionEnd"&&zu&&(S=W$()):(ul=h,PC="value"in ul?ul.value:ul.textContent,zu=!0)),j=Yv(u,N),0<j.length&&(N=new VA(N,e,null,n,h),d.push({event:N,listeners:j}),S?N.data=S:(S=z$(n),S!==null&&(N.data=S)))),(S=UK?zK(e,n):HK(e,n))&&(u=Yv(u,"onBeforeInput"),0<u.length&&(h=new VA("onBeforeInput","beforeinput",null,n,h),d.push({event:h,listeners:u}),h.data=S))}nL(d,t)})}function Ip(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Yv(e,t){for(var n=t+"Capture",r=[];e!==null;){var a=e,i=a.stateNode;a.tag===5&&i!==null&&(a=i,i=Cp(e,n),i!=null&&r.unshift(Ip(e,i,a)),i=Cp(e,t),i!=null&&r.push(Ip(e,i,a))),e=e.return}return r}function Su(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function aE(e,t,n,r,a){for(var i=t._reactName,o=[];n!==null&&n!==r;){var l=n,c=l.alternate,u=l.stateNode;if(c!==null&&c===r)break;l.tag===5&&u!==null&&(l=u,a?(c=Cp(n,i),c!=null&&o.unshift(Ip(n,c,l))):a||(c=Cp(n,i),c!=null&&o.push(Ip(n,c,l)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var sX=/\r\n?/g,iX=/\u0000|\uFFFD/g;function sE(e){return(typeof e=="string"?e:""+e).replace(sX,`
38`).replace(iX,"")}function dy(e,t,n){if(t=sE(t),sE(e)!==t&&n)throw Error(me(425))}function Kv(){}var Mk=null,Dk=null;function $k(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 Lk=typeof setTimeout=="function"?setTimeout:void 0,oX=typeof clearTimeout=="function"?clearTimeout:void 0,iE=typeof Promise=="function"?Promise:void 0,lX=typeof queueMicrotask=="function"?queueMicrotask:typeof iE<"u"?function(e){return iE.resolve(null).then(e).catch(cX)}:Lk;function cX(e){setTimeout(function(){throw e})}function C_(e,t){var n=t,r=0;do{var a=n.nextSibling;if(e.removeChild(n),a&&a.nodeType===8)if(n=a.data,n==="/$"){if(r===0){e.removeChild(a),Ap(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=a}while(n);Ap(t)}function vl(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 oE(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 Ah=Math.random().toString(36).slice(2),ii="__reactFiber$"+Ah,Mp="__reactProps$"+Ah,yo="__reactContainer$"+Ah,Fk="__reactEvents$"+Ah,uX="__reactListeners$"+Ah,dX="__reactHandles$"+Ah;function pc(e){var t=e[ii];if(t)return t;for(var n=e.parentNode;n;){if(t=n[yo]||n[ii]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=oE(e);e!==null;){if(n=e[ii])return n;e=oE(e)}return t}e=n,n=e.parentNode}return null}function lg(e){return e=e[ii]||e[yo],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Gu(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(me(33))}function ew(e){return e[Mp]||null}var Bk=[],Yu=-1;function Fl(e){return{current:e}}function sn(e){0>Yu||(e.current=Bk[Yu],Bk[Yu]=null,Yu--)}function Qt(e,t){Yu++,Bk[Yu]=e.current,e.current=t}var El={},Fr=Fl(El),pa=Fl(!1),zc=El;function zd(e,t){var n=e.type.contextTypes;if(!n)return El;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var a={},i;for(i in n)a[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function ma(e){return e=e.childContextTypes,e!=null}function Xv(){sn(pa),sn(Fr)}function lE(e,t,n){if(Fr.current!==El)throw Error(me(168));Qt(Fr,t),Qt(pa,n)}function aL(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var a in r)if(!(a in t))throw Error(me(108,KY(e)||"Unknown",a));return xn({},n,r)}function Qv(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||El,zc=Fr.current,Qt(Fr,e),Qt(pa,pa.current),!0}function cE(e,t,n){var r=e.stateNode;if(!r)throw Error(me(169));n?(e=aL(e,t,zc),r.__reactInternalMemoizedMergedChildContext=e,sn(pa),sn(Fr),Qt(Fr,e)):sn(pa),Qt(pa,n)}var Qi=null,tw=!1,P_=!1;function sL(e){Qi===null?Qi=[e]:Qi.push(e)}function hX(e){tw=!0,sL(e)}function Bl(){if(!P_&&Qi!==null){P_=!0;var e=0,t=Wt;try{var n=Qi;for(Wt=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Qi=null,tw=!1}catch(a){throw Qi!==null&&(Qi=Qi.slice(e+1)),A$(jC,Bl),a}finally{Wt=t,P_=!1}}return null}var Ku=[],Xu=0,Jv=null,Zv=0,Ga=[],Ya=0,Hc=null,ro=1,ao="";function ac(e,t){Ku[Xu++]=Zv,Ku[Xu++]=Jv,Jv=e,Zv=t}function iL(e,t,n){Ga[Ya++]=ro,Ga[Ya++]=ao,Ga[Ya++]=Hc,Hc=e;var r=ro;e=ao;var a=32-Rs(r)-1;r&=~(1<<a),n+=1;var i=32-Rs(t)+a;if(30<i){var o=a-a%5;i=(r&(1<<o)-1).toString(32),r>>=o,a-=o,ro=1<<32-Rs(t)+a|n<<a|r,ao=i+e}else ro=1<<i|n<<a|r,ao=e}function RC(e){e.return!==null&&(ac(e,1),iL(e,1,0))}function IC(e){for(;e===Jv;)Jv=Ku[--Xu],Ku[Xu]=null,Zv=Ku[--Xu],Ku[Xu]=null;for(;e===Hc;)Hc=Ga[--Ya],Ga[Ya]=null,ao=Ga[--Ya],Ga[Ya]=null,ro=Ga[--Ya],Ga[Ya]=null}var Aa=null,Ta=null,dn=!1,Ts=null;function oL(e,t){var n=Qa(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 uE(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,Aa=e,Ta=vl(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Aa=e,Ta=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Hc!==null?{id:ro,overflow:ao}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Qa(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Aa=e,Ta=null,!0):!1;default:return!1}}function Wk(e){return(e.mode&1)!==0&&(e.flags&128)===0}function qk(e){if(dn){var t=Ta;if(t){var n=t;if(!uE(e,t)){if(Wk(e))throw Error(me(418));t=vl(n.nextSibling);var r=Aa;t&&uE(e,t)?oL(r,n):(e.flags=e.flags&-4097|2,dn=!1,Aa=e)}}else{if(Wk(e))throw Error(me(418));e.flags=e.flags&-4097|2,dn=!1,Aa=e}}}function dE(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Aa=e}function hy(e){if(e!==Aa)return!1;if(!dn)return dE(e),dn=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!$k(e.type,e.memoizedProps)),t&&(t=Ta)){if(Wk(e))throw lL(),Error(me(418));for(;t;)oL(e,t),t=vl(t.nextSibling)}if(dE(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(me(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Ta=vl(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Ta=null}}else Ta=Aa?vl(e.stateNode.nextSibling):null;return!0}function lL(){for(var e=Ta;e;)e=vl(e.nextSibling)}function Hd(){Ta=Aa=null,dn=!1}function MC(e){Ts===null?Ts=[e]:Ts.push(e)}var fX=Ao.ReactCurrentBatchConfig;function vf(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(me(309));var r=n.stateNode}if(!r)throw Error(me(147,e));var a=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(o){var l=a.refs;o===null?delete l[i]:l[i]=o},t._stringRef=i,t)}if(typeof e!="string")throw Error(me(284));if(!n._owner)throw Error(me(290,e))}return e}function fy(e,t){throw e=Object.prototype.toString.call(t),Error(me(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function hE(e){var t=e._init;return t(e._payload)}function cL(e){function t(b,x){if(e){var w=b.deletions;w===null?(b.deletions=[x],b.flags|=16):w.push(x)}}function n(b,x){if(!e)return null;for(;x!==null;)t(b,x),x=x.sibling;return null}function r(b,x){for(b=new Map;x!==null;)x.key!==null?b.set(x.key,x):b.set(x.index,x),x=x.sibling;return b}function a(b,x){return b=_l(b,x),b.index=0,b.sibling=null,b}function i(b,x,w){return b.index=w,e?(w=b.alternate,w!==null?(w=w.index,w<x?(b.flags|=2,x):w):(b.flags|=2,x)):(b.flags|=1048576,x)}function o(b){return e&&b.alternate===null&&(b.flags|=2),b}function l(b,x,w,_){return x===null||x.tag!==6?(x=M_(w,b.mode,_),x.return=b,x):(x=a(x,w),x.return=b,x)}function c(b,x,w,_){var k=w.type;return k===Uu?h(b,x,w.props.children,_,w.key):x!==null&&(x.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Vo&&hE(k)===x.type)?(_=a(x,w.props),_.ref=vf(b,x,w),_.return=b,_):(_=_v(w.type,w.key,w.props,null,b.mode,_),_.ref=vf(b,x,w),_.return=b,_)}function u(b,x,w,_){return x===null||x.tag!==4||x.stateNode.containerInfo!==w.containerInfo||x.stateNode.implementation!==w.implementation?(x=D_(w,b.mode,_),x.return=b,x):(x=a(x,w.children||[]),x.return=b,x)}function h(b,x,w,_,k){return x===null||x.tag!==7?(x=$c(w,b.mode,_,k),x.return=b,x):(x=a(x,w),x.return=b,x)}function d(b,x,w){if(typeof x=="string"&&x!==""||typeof x=="number")return x=M_(""+x,b.mode,w),x.return=b,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case ny:return w=_v(x.type,x.key,x.props,null,b.mode,w),w.ref=vf(b,null,x),w.return=b,w;case qu:return x=D_(x,b.mode,w),x.return=b,x;case Vo:var _=x._init;return d(b,_(x._payload),w)}if(zf(x)||ff(x))return x=$c(x,b.mode,w,null),x.return=b,x;fy(b,x)}return null}function f(b,x,w,_){var k=x!==null?x.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return k!==null?null:l(b,x,""+w,_);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case ny:return w.key===k?c(b,x,w,_):null;case qu:return w.key===k?u(b,x,w,_):null;case Vo:return k=w._init,f(b,x,k(w._payload),_)}if(zf(w)||ff(w))return k!==null?null:h(b,x,w,_,null);fy(b,w)}return null}function p(b,x,w,_,k){if(typeof _=="string"&&_!==""||typeof _=="number")return b=b.get(w)||null,l(x,b,""+_,k);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case ny:return b=b.get(_.key===null?w:_.key)||null,c(x,b,_,k);case qu:return b=b.get(_.key===null?w:_.key)||null,u(x,b,_,k);case Vo:var j=_._init;return p(b,x,w,j(_._payload),k)}if(zf(_)||ff(_))return b=b.get(w)||null,h(x,b,_,k,null);fy(x,_)}return null}function y(b,x,w,_){for(var k=null,j=null,S=x,N=x=0,C=null;S!==null&&N<w.length;N++){S.index>N?(C=S,S=null):C=S.sibling;var M=f(b,S,w[N],_);if(M===null){S===null&&(S=C);break}e&&S&&M.alternate===null&&t(b,S),x=i(M,x,N),j===null?k=M:j.sibling=M,j=M,S=C}if(N===w.length)return n(b,S),dn&&ac(b,N),k;if(S===null){for(;N<w.length;N++)S=d(b,w[N],_),S!==null&&(x=i(S,x,N),j===null?k=S:j.sibling=S,j=S);return dn&&ac(b,N),k}for(S=r(b,S);N<w.length;N++)C=p(S,b,N,w[N],_),C!==null&&(e&&C.alternate!==null&&S.delete(C.key===null?N:C.key),x=i(C,x,N),j===null?k=C:j.sibling=C,j=C);return e&&S.forEach(function(O){return t(b,O)}),dn&&ac(b,N),k}function m(b,x,w,_){var k=ff(w);if(typeof k!="function")throw Error(me(150));if(w=k.call(w),w==null)throw Error(me(151));for(var j=k=null,S=x,N=x=0,C=null,M=w.next();S!==null&&!M.done;N++,M=w.next()){S.index>N?(C=S,S=null):C=S.sibling;var O=f(b,S,M.value,_);if(O===null){S===null&&(S=C);break}e&&S&&O.alternate===null&&t(b,S),x=i(O,x,N),j===null?k=O:j.sibling=O,j=O,S=C}if(M.done)return n(b,S),dn&&ac(b,N),k;if(S===null){for(;!M.done;N++,M=w.next())M=d(b,M.value,_),M!==null&&(x=i(M,x,N),j===null?k=M:j.sibling=M,j=M);return dn&&ac(b,N),k}for(S=r(b,S);!M.done;N++,M=w.next())M=p(S,b,N,M.value,_),M!==null&&(e&&M.alternate!==null&&S.delete(M.key===null?N:M.key),x=i(M,x,N),j===null?k=M:j.sibling=M,j=M);return e&&S.forEach(function(D){return t(b,D)}),dn&&ac(b,N),k}function v(b,x,w,_){if(typeof w=="object"&&w!==null&&w.type===Uu&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case ny:e:{for(var k=w.key,j=x;j!==null;){if(j.key===k){if(k=w.type,k===Uu){if(j.tag===7){n(b,j.sibling),x=a(j,w.props.children),x.return=b,b=x;break e}}else if(j.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Vo&&hE(k)===j.type){n(b,j.sibling),x=a(j,w.props),x.ref=vf(b,j,w),x.return=b,b=x;break e}n(b,j);break}else t(b,j);j=j.sibling}w.type===Uu?(x=$c(w.props.children,b.mode,_,w.key),x.return=b,b=x):(_=_v(w.type,w.key,w.props,null,b.mode,_),_.ref=vf(b,x,w),_.return=b,b=_)}return o(b);case qu:e:{for(j=w.key;x!==null;){if(x.key===j)if(x.tag===4&&x.stateNode.containerInfo===w.containerInfo&&x.stateNode.implementation===w.implementation){n(b,x.sibling),x=a(x,w.children||[]),x.return=b,b=x;break e}else{n(b,x);break}else t(b,x);x=x.sibling}x=D_(w,b.mode,_),x.return=b,b=x}return o(b);case Vo:return j=w._init,v(b,x,j(w._payload),_)}if(zf(w))return y(b,x,w,_);if(ff(w))return m(b,x,w,_);fy(b,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,x!==null&&x.tag===6?(n(b,x.sibling),x=a(x,w),x.return=b,b=x):(n(b,x),x=M_(w,b.mode,_),x.return=b,b=x),o(b)):n(b,x)}return v}var Vd=cL(!0),uL=cL(!1),eb=Fl(null),tb=null,Qu=null,DC=null;function $C(){DC=Qu=tb=null}function LC(e){var t=eb.current;sn(eb),e._currentValue=t}function Uk(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 pd(e,t){tb=e,DC=Qu=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(da=!0),e.firstContext=null)}function as(e){var t=e._currentValue;if(DC!==e)if(e={context:e,memoizedValue:t,next:null},Qu===null){if(tb===null)throw Error(me(308));Qu=e,tb.dependencies={lanes:0,firstContext:e}}else Qu=Qu.next=e;return t}var mc=null;function FC(e){mc===null?mc=[e]:mc.push(e)}function dL(e,t,n,r){var a=t.interleaved;return a===null?(n.next=n,FC(t)):(n.next=a.next,a.next=n),t.interleaved=n,vo(e,r)}function vo(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 Go=!1;function BC(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function hL(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 uo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function bl(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Et&2){var a=r.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),r.pending=t,vo(e,n)}return a=r.interleaved,a===null?(t.next=t,FC(r)):(t.next=a.next,a.next=t),r.interleaved=t,vo(e,n)}function gv(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,SC(e,n)}}function fE(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var a=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?a=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?a=i=t:i=i.next=t}else a=i=t;n={baseState:r.baseState,firstBaseUpdate:a,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function nb(e,t,n,r){var a=e.updateQueue;Go=!1;var i=a.firstBaseUpdate,o=a.lastBaseUpdate,l=a.shared.pending;if(l!==null){a.shared.pending=null;var c=l,u=c.next;c.next=null,o===null?i=u:o.next=u,o=c;var h=e.alternate;h!==null&&(h=h.updateQueue,l=h.lastBaseUpdate,l!==o&&(l===null?h.firstBaseUpdate=u:l.next=u,h.lastBaseUpdate=c))}if(i!==null){var d=a.baseState;o=0,h=u=c=null,l=i;do{var f=l.lane,p=l.eventTime;if((r&f)===f){h!==null&&(h=h.next={eventTime:p,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var y=e,m=l;switch(f=t,p=n,m.tag){case 1:if(y=m.payload,typeof y=="function"){d=y.call(p,d,f);break e}d=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=m.payload,f=typeof y=="function"?y.call(p,d,f):y,f==null)break e;d=xn({},d,f);break e;case 2:Go=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,f=a.effects,f===null?a.effects=[l]:f.push(l))}else p={eventTime:p,lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},h===null?(u=h=p,c=d):h=h.next=p,o|=f;if(l=l.next,l===null){if(l=a.shared.pending,l===null)break;f=l,l=f.next,f.next=null,a.lastBaseUpdate=f,a.shared.pending=null}}while(!0);if(h===null&&(c=d),a.baseState=c,a.firstBaseUpdate=u,a.lastBaseUpdate=h,t=a.shared.interleaved,t!==null){a=t;do o|=a.lane,a=a.next;while(a!==t)}else i===null&&(a.shared.lanes=0);Gc|=o,e.lanes=o,e.memoizedState=d}}function pE(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],a=r.callback;if(a!==null){if(r.callback=null,r=n,typeof a!="function")throw Error(me(191,a));a.call(r)}}}var cg={},mi=Fl(cg),Dp=Fl(cg),$p=Fl(cg);function gc(e){if(e===cg)throw Error(me(174));return e}function WC(e,t){switch(Qt($p,t),Qt(Dp,e),Qt(mi,cg),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:kk(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=kk(t,e)}sn(mi),Qt(mi,t)}function Gd(){sn(mi),sn(Dp),sn($p)}function fL(e){gc($p.current);var t=gc(mi.current),n=kk(t,e.type);t!==n&&(Qt(Dp,e),Qt(mi,n))}function qC(e){Dp.current===e&&(sn(mi),sn(Dp))}var gn=Fl(0);function rb(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 T_=[];function UC(){for(var e=0;e<T_.length;e++)T_[e]._workInProgressVersionPrimary=null;T_.length=0}var yv=Ao.ReactCurrentDispatcher,A_=Ao.ReactCurrentBatchConfig,Vc=0,bn=null,Zn=null,cr=null,ab=!1,ip=!1,Lp=0,pX=0;function Ar(){throw Error(me(321))}function zC(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Fs(e[n],t[n]))return!1;return!0}
vendor: 4,866 bytes, line 38
38function HC(e,t,n,r,a,i){if(Vc=i,bn=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,yv.current=e===null||e.memoizedState===null?vX:bX,e=n(r,a),ip){i=0;do{if(ip=!1,Lp=0,25<=i)throw Error(me(301));i+=1,cr=Zn=null,t.updateQueue=null,yv.current=xX,e=n(r,a)}while(ip)}if(yv.current=sb,t=Zn!==null&&Zn.next!==null,Vc=0,cr=Zn=bn=null,ab=!1,t)throw Error(me(300));return e}function VC(){var e=Lp!==0;return Lp=0,e}function Qs(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return cr===null?bn.memoizedState=cr=e:cr=cr.next=e,cr}function ss(){if(Zn===null){var e=bn.alternate;e=e!==null?e.memoizedState:null}else e=Zn.next;var t=cr===null?bn.memoizedState:cr.next;if(t!==null)cr=t,Zn=e;else{if(e===null)throw Error(me(310));Zn=e,e={memoizedState:Zn.memoizedState,baseState:Zn.baseState,baseQueue:Zn.baseQueue,queue:Zn.queue,next:null},cr===null?bn.memoizedState=cr=e:cr=cr.next=e}return cr}function Fp(e,t){return typeof t=="function"?t(e):t}function E_(e){var t=ss(),n=t.queue;if(n===null)throw Error(me(311));n.lastRenderedReducer=e;var r=Zn,a=r.baseQueue,i=n.pending;if(i!==null){if(a!==null){var o=a.next;a.next=i.next,i.next=o}r.baseQueue=a=i,n.pending=null}if(a!==null){i=a.next,r=r.baseState;var l=o=null,c=null,u=i;do{var h=u.lane;if((Vc&h)===h)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var d={lane:h,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(l=c=d,o=r):c=c.next=d,bn.lanes|=h,Gc|=h}u=u.next}while(u!==null&&u!==i);c===null?o=r:c.next=l,Fs(r,t.memoizedState)||(da=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=c,n.lastRenderedState=r}if(e=n.interleaved,e!==null){a=e;do i=a.lane,bn.lanes|=i,Gc|=i,a=a.next;while(a!==e)}else a===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function O_(e){var t=ss(),n=t.queue;if(n===null)throw Error(me(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,i=t.memoizedState;if(a!==null){n.pending=null;var o=a=a.next;do i=e(i,o.action),o=o.next;while(o!==a);Fs(i,t.memoizedState)||(da=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function pL(){}function mL(e,t){var n=bn,r=ss(),a=t(),i=!Fs(r.memoizedState,a);if(i&&(r.memoizedState=a,da=!0),r=r.queue,GC(vL.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||cr!==null&&cr.memoizedState.tag&1){if(n.flags|=2048,Bp(9,yL.bind(null,n,r,a,t),void 0,null),ur===null)throw Error(me(349));Vc&30||gL(n,t,a)}return a}function gL(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=bn.updateQueue,t===null?(t={lastEffect:null,stores:null},bn.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function yL(e,t,n,r){t.value=n,t.getSnapshot=r,bL(t)&&xL(e)}function vL(e,t,n){return n(function(){bL(t)&&xL(e)})}function bL(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Fs(e,n)}catch{return!0}}function xL(e){var t=vo(e,1);t!==null&&Is(t,e,1,-1)}function mE(e){var t=Qs();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Fp,lastRenderedState:e},t.queue=e,e=e.dispatch=yX.bind(null,bn,e),[t.memoizedState,e]}function Bp(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=bn.updateQueue,t===null?(t={lastEffect:null,stores:null},bn.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 wL(){return ss().memoizedState}function vv(e,t,n,r){var a=Qs();bn.flags|=e,a.memoizedState=Bp(1|t,n,void 0,r===void 0?null:r)}function nw(e,t,n,r){var a=ss();r=r===void 0?null:r;var i=void 0;if(Zn!==null){var o=Zn.memoizedState;if(i=o.destroy,r!==null&&zC(r,o.deps)){a.memoizedState=Bp(t,n,i,r);return}}bn.flags|=e,a.memoizedState=Bp(1|t,n,i,r)}function gE(e,t){return vv(8390656,8,e,t)}function GC(e,t){return nw(2048,8,e,t)}function _L(e,t){return nw(4,2,e,t)}function kL(e,t){return nw(4,4,e,t)}function jL(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 SL(e,t,n){return n=n!=null?n.concat([e]):null,nw(4,4,jL.bind(null,t,e),n)}function YC(){}function NL(e,t){var n=ss();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&zC(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function CL(e,t){var n=ss();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&zC(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function PL(e,t,n){return Vc&21?(Fs(n,t)||(n=R$(),bn.lanes|=n,Gc|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,da=!0),e.memoizedState=n)}function mX(e,t){var n=Wt;Wt=n!==0&&4>n?n:4,e(!0);var r=A_.transition;A_.transition={};try{e(!1),t()}finally{Wt=n,A_.transition=r}}function TL(){return ss().memoizedState}
vendor: 9,320 bytes, lines 38-40
38function gX(e,t,n){var r=wl(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},AL(e))EL(t,n);else if(n=dL(e,t,n,r),n!==null){var a=Jr();Is(n,e,r,a),OL(n,t,r)}}function yX(e,t,n){var r=wl(e),a={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(AL(e))EL(t,a);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,l=i(o,n);if(a.hasEagerState=!0,a.eagerState=l,Fs(l,o)){var c=t.interleaved;c===null?(a.next=a,FC(t)):(a.next=c.next,c.next=a),t.interleaved=a;return}}catch{}finally{}n=dL(e,t,a,r),n!==null&&(a=Jr(),Is(n,e,r,a),OL(n,t,r))}}function AL(e){var t=e.alternate;return e===bn||t!==null&&t===bn}function EL(e,t){ip=ab=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function OL(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,SC(e,n)}}var sb={readContext:as,useCallback:Ar,useContext:Ar,useEffect:Ar,useImperativeHandle:Ar,useInsertionEffect:Ar,useLayoutEffect:Ar,useMemo:Ar,useReducer:Ar,useRef:Ar,useState:Ar,useDebugValue:Ar,useDeferredValue:Ar,useTransition:Ar,useMutableSource:Ar,useSyncExternalStore:Ar,useId:Ar,unstable_isNewReconciler:!1},vX={readContext:as,useCallback:function(e,t){return Qs().memoizedState=[e,t===void 0?null:t],e},useContext:as,useEffect:gE,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,vv(4194308,4,jL.bind(null,t,e),n)},useLayoutEffect:function(e,t){return vv(4194308,4,e,t)},useInsertionEffect:function(e,t){return vv(4,2,e,t)},useMemo:function(e,t){var n=Qs();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Qs();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=gX.bind(null,bn,e),[r.memoizedState,e]},useRef:function(e){var t=Qs();return e={current:e},t.memoizedState=e},useState:mE,useDebugValue:YC,useDeferredValue:function(e){return Qs().memoizedState=e},useTransition:function(){var e=mE(!1),t=e[0];return e=mX.bind(null,e[1]),Qs().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=bn,a=Qs();if(dn){if(n===void 0)throw Error(me(407));n=n()}else{if(n=t(),ur===null)throw Error(me(349));Vc&30||gL(r,t,n)}a.memoizedState=n;var i={value:n,getSnapshot:t};return a.queue=i,gE(vL.bind(null,r,i,e),[e]),r.flags|=2048,Bp(9,yL.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Qs(),t=ur.identifierPrefix;if(dn){var n=ao,r=ro;n=(r&~(1<<32-Rs(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Lp++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=pX++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},bX={readContext:as,useCallback:NL,useContext:as,useEffect:GC,useImperativeHandle:SL,useInsertionEffect:_L,useLayoutEffect:kL,useMemo:CL,useReducer:E_,useRef:wL,useState:function(){return E_(Fp)},useDebugValue:YC,useDeferredValue:function(e){var t=ss();return PL(t,Zn.memoizedState,e)},useTransition:function(){var e=E_(Fp)[0],t=ss().memoizedState;return[e,t]},useMutableSource:pL,useSyncExternalStore:mL,useId:TL,unstable_isNewReconciler:!1},xX={readContext:as,useCallback:NL,useContext:as,useEffect:GC,useImperativeHandle:SL,useInsertionEffect:_L,useLayoutEffect:kL,useMemo:CL,useReducer:O_,useRef:wL,useState:function(){return O_(Fp)},useDebugValue:YC,useDeferredValue:function(e){var t=ss();return Zn===null?t.memoizedState=e:PL(t,Zn.memoizedState,e)},useTransition:function(){var e=O_(Fp)[0],t=ss().memoizedState;return[e,t]},useMutableSource:pL,useSyncExternalStore:mL,useId:TL,unstable_isNewReconciler:!1};function ks(e,t){if(e&&e.defaultProps){t=xn({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function zk(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:xn({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var rw={isMounted:function(e){return(e=e._reactInternals)?fu(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Jr(),a=wl(e),i=uo(r,a);i.payload=t,n!=null&&(i.callback=n),t=bl(e,i,a),t!==null&&(Is(t,e,a,r),gv(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Jr(),a=wl(e),i=uo(r,a);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=bl(e,i,a),t!==null&&(Is(t,e,a,r),gv(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Jr(),r=wl(e),a=uo(n,r);a.tag=2,t!=null&&(a.callback=t),t=bl(e,a,r),t!==null&&(Is(t,e,r,n),gv(t,e,r))}};function yE(e,t,n,r,a,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,o):t.prototype&&t.prototype.isPureReactComponent?!Op(n,r)||!Op(a,i):!0}function RL(e,t,n){var r=!1,a=El,i=t.contextType;return typeof i=="object"&&i!==null?i=as(i):(a=ma(t)?zc:Fr.current,r=t.contextTypes,i=(r=r!=null)?zd(e,a):El),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=rw,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=a,e.__reactInternalMemoizedMaskedChildContext=i),t}function vE(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&&rw.enqueueReplaceState(t,t.state,null)}function Hk(e,t,n,r){var a=e.stateNode;a.props=n,a.state=e.memoizedState,a.refs={},BC(e);var i=t.contextType;typeof i=="object"&&i!==null?a.context=as(i):(i=ma(t)?zc:Fr.current,a.context=zd(e,i)),a.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(zk(e,t,i,n),a.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof a.getSnapshotBeforeUpdate=="function"||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(t=a.state,typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount(),t!==a.state&&rw.enqueueReplaceState(a,a.state,null),nb(e,n,a,r),a.state=e.memoizedState),typeof a.componentDidMount=="function"&&(e.flags|=4194308)}function Yd(e,t){try{var n="",r=t;do n+=YY(r),r=r.return;while(r);var a=n}catch(i){a=`
39Error generating stack: `+i.message+`
40`+i.stack}return{value:e,source:t,stack:a,digest:null}}function R_(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Vk(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var wX=typeof WeakMap=="function"?WeakMap:Map;function IL(e,t,n){n=uo(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){ob||(ob=!0,nj=r),Vk(e,t)},n}function ML(e,t,n){n=uo(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var a=t.value;n.payload=function(){return r(a)},n.callback=function(){Vk(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){Vk(e,t),typeof r!="function"&&(xl===null?xl=new Set([this]):xl.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function bE(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new wX;var a=new Set;r.set(t,a)}else a=r.get(t),a===void 0&&(a=new Set,r.set(t,a));a.has(n)||(a.add(n),e=MX.bind(null,e,t,n),t.then(e,e))}function xE(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 wE(e,t,n,r,a){return e.mode&1?(e.flags|=65536,e.lanes=a,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=uo(-1,1),t.tag=2,bl(n,t,1))),n.lanes|=1),e)}var _X=Ao.ReactCurrentOwner,da=!1;function Yr(e,t,n,r){t.child=e===null?uL(t,null,n,r):Vd(t,e.child,n,r)}function _E(e,t,n,r,a){n=n.render;var i=t.ref;return pd(t,a),r=HC(e,t,n,r,i,a),n=VC(),e!==null&&!da?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,bo(e,t,a)):(dn&&n&&RC(t),t.flags|=1,Yr(e,t,r,a),t.child)}function kE(e,t,n,r,a){if(e===null){var i=n.type;return typeof i=="function"&&!nP(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,DL(e,t,i,r,a)):(e=_v(n.type,null,r,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&a)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:Op,n(o,r)&&e.ref===t.ref)return bo(e,t,a)}return t.flags|=1,e=_l(i,r),e.ref=t.ref,e.return=t,t.child=e}function DL(e,t,n,r,a){if(e!==null){var i=e.memoizedProps;if(Op(i,r)&&e.ref===t.ref)if(da=!1,t.pendingProps=r=i,(e.lanes&a)!==0)e.flags&131072&&(da=!0);else return t.lanes=e.lanes,bo(e,t,a)}return Gk(e,t,n,r,a)}function $L(e,t,n){var r=t.pendingProps,a=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Qt(Zu,ja),ja|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Qt(Zu,ja),ja|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,Qt(Zu,ja),ja|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,Qt(Zu,ja),ja|=r;return Yr(e,t,a,n),t.child}function LL(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}
vendor: 8,182 bytes, line 40
40function Gk(e,t,n,r,a){var i=ma(n)?zc:Fr.current;return i=zd(t,i),pd(t,a),n=HC(e,t,n,r,i,a),r=VC(),e!==null&&!da?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,bo(e,t,a)):(dn&&r&&RC(t),t.flags|=1,Yr(e,t,n,a),t.child)}function jE(e,t,n,r,a){if(ma(n)){var i=!0;Qv(t)}else i=!1;if(pd(t,a),t.stateNode===null)bv(e,t),RL(t,n,r),Hk(t,n,r,a),r=!0;else if(e===null){var o=t.stateNode,l=t.memoizedProps;o.props=l;var c=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=as(u):(u=ma(n)?zc:Fr.current,u=zd(t,u));var h=n.getDerivedStateFromProps,d=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==r||c!==u)&&vE(t,o,r,u),Go=!1;var f=t.memoizedState;o.state=f,nb(t,r,o,a),c=t.memoizedState,l!==r||f!==c||pa.current||Go?(typeof h=="function"&&(zk(t,n,h,r),c=t.memoizedState),(l=Go||yE(t,n,l,r,f,c,u))?(d||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),o.props=r,o.state=c,o.context=u,r=l):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,hL(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:ks(t.type,l),o.props=u,d=t.pendingProps,f=o.context,c=n.contextType,typeof c=="object"&&c!==null?c=as(c):(c=ma(n)?zc:Fr.current,c=zd(t,c));var p=n.getDerivedStateFromProps;(h=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==d||f!==c)&&vE(t,o,r,c),Go=!1,f=t.memoizedState,o.state=f,nb(t,r,o,a);var y=t.memoizedState;l!==d||f!==y||pa.current||Go?(typeof p=="function"&&(zk(t,n,p,r),y=t.memoizedState),(u=Go||yE(t,n,u,r,f,y,c)||!1)?(h||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,y,c),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,y,c)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=y),o.props=r,o.state=y,o.context=c,r=u):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Yk(e,t,n,r,i,a)}function Yk(e,t,n,r,a,i){LL(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return a&&cE(t,n,!1),bo(e,t,i);r=t.stateNode,_X.current=t;var l=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Vd(t,e.child,null,i),t.child=Vd(t,null,l,i)):Yr(e,t,l,i),t.memoizedState=r.state,a&&cE(t,n,!0),t.child}function FL(e){var t=e.stateNode;t.pendingContext?lE(e,t.pendingContext,t.pendingContext!==t.context):t.context&&lE(e,t.context,!1),WC(e,t.containerInfo)}function SE(e,t,n,r,a){return Hd(),MC(a),t.flags|=256,Yr(e,t,n,r),t.child}var Kk={dehydrated:null,treeContext:null,retryLane:0};function Xk(e){return{baseLanes:e,cachePool:null,transitions:null}}function BL(e,t,n){var r=t.pendingProps,a=gn.current,i=!1,o=(t.flags&128)!==0,l;if((l=o)||(l=e!==null&&e.memoizedState===null?!1:(a&2)!==0),l?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(a|=1),Qt(gn,a&1),e===null)return qk(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,i?(r=t.mode,i=t.child,o={mode:"hidden",children:o},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=iw(o,r,0,null),e=$c(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Xk(n),t.memoizedState=Kk,e):KC(t,o));if(a=e.memoizedState,a!==null&&(l=a.dehydrated,l!==null))return kX(e,t,o,r,l,a,n);if(i){i=r.fallback,o=t.mode,a=e.child,l=a.sibling;var c={mode:"hidden",children:r.children};return!(o&1)&&t.child!==a?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=_l(a,c),r.subtreeFlags=a.subtreeFlags&14680064),l!==null?i=_l(l,i):(i=$c(i,o,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,o=e.child.memoizedState,o=o===null?Xk(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~n,t.memoizedState=Kk,r}return i=e.child,e=i.sibling,r=_l(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function KC(e,t){return t=iw({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function py(e,t,n,r){return r!==null&&MC(r),Vd(t,e.child,null,n),e=KC(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function kX(e,t,n,r,a,i,o){if(n)return t.flags&256?(t.flags&=-257,r=R_(Error(me(422))),py(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,a=t.mode,r=iw({mode:"visible",children:r.children},a,0,null),i=$c(i,a,o,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&Vd(t,e.child,null,o),t.child.memoizedState=Xk(o),t.memoizedState=Kk,i);if(!(t.mode&1))return py(e,t,o,null);if(a.data==="$!"){if(r=a.nextSibling&&a.nextSibling.dataset,r)var l=r.dgst;return r=l,i=Error(me(419)),r=R_(i,r,void 0),py(e,t,o,r)}if(l=(o&e.childLanes)!==0,da||l){if(r=ur,r!==null){switch(o&-o){case 4:a=2;break;case 16:a=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:a=32;break;case 536870912:a=268435456;break;default:a=0}a=a&(r.suspendedLanes|o)?0:a,a!==0&&a!==i.retryLane&&(i.retryLane=a,vo(e,a),Is(r,e,a,-1))}return tP(),r=R_(Error(me(421))),py(e,t,o,r)}return a.data==="$?"?(t.flags|=128,t.child=e.child,t=DX.bind(null,e),a._reactRetry=t,null):(e=i.treeContext,Ta=vl(a.nextSibling),Aa=t,dn=!0,Ts=null,e!==null&&(Ga[Ya++]=ro,Ga[Ya++]=ao,Ga[Ya++]=Hc,ro=e.id,ao=e.overflow,Hc=t),t=KC(t,r.children),t.flags|=4096,t)}function NE(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Uk(e.return,t,n)}function I_(e,t,n,r,a){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:a}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=a)}function WL(e,t,n){var r=t.pendingProps,a=r.revealOrder,i=r.tail;if(Yr(e,t,r.children,n),r=gn.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&&NE(e,n,t);else if(e.tag===19)NE(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(Qt(gn,r),!(t.mode&1))t.memoizedState=null;else switch(a){case"forwards":for(n=t.child,a=null;n!==null;)e=n.alternate,e!==null&&rb(e)===null&&(a=n),n=n.sibling;n=a,n===null?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),I_(t,!1,a,n,i);break;case"backwards":for(n=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&rb(e)===null){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}I_(t,!0,n,null,i);break;case"together":I_(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function bv(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function bo(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Gc|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(me(153));
vendor: 5,452 bytes, line 40
40if(t.child!==null){for(e=t.child,n=_l(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=_l(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function jX(e,t,n){switch(t.tag){case 3:FL(t),Hd();break;case 5:fL(t);break;case 1:ma(t.type)&&Qv(t);break;case 4:WC(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,a=t.memoizedProps.value;Qt(eb,r._currentValue),r._currentValue=a;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Qt(gn,gn.current&1),t.flags|=128,null):n&t.child.childLanes?BL(e,t,n):(Qt(gn,gn.current&1),e=bo(e,t,n),e!==null?e.sibling:null);Qt(gn,gn.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return WL(e,t,n);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),Qt(gn,gn.current),r)break;return null;case 22:case 23:return t.lanes=0,$L(e,t,n)}return bo(e,t,n)}var qL,Qk,UL,zL;qL=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}};Qk=function(){};UL=function(e,t,n,r){var a=e.memoizedProps;if(a!==r){e=t.stateNode,gc(mi.current);var i=null;switch(n){case"input":a=bk(e,a),r=bk(e,r),i=[];break;case"select":a=xn({},a,{value:void 0}),r=xn({},r,{value:void 0}),i=[];break;case"textarea":a=_k(e,a),r=_k(e,r),i=[];break;default:typeof a.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Kv)}jk(n,r);var o;n=null;for(u in a)if(!r.hasOwnProperty(u)&&a.hasOwnProperty(u)&&a[u]!=null)if(u==="style"){var l=a[u];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Sp.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var c=r[u];if(l=a!=null?a[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(c!=null||l!=null))if(u==="style")if(l){for(o in l)!l.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in c)c.hasOwnProperty(o)&&l[o]!==c[o]&&(n||(n={}),n[o]=c[o])}else n||(i||(i=[]),i.push(u,n)),n=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(i=i||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(i=i||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Sp.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&tn("scroll",e),i||l===c||(i=[])):(i=i||[]).push(u,c))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};zL=function(e,t,n,r){n!==r&&(t.flags|=4)};function bf(e,t){if(!dn)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 Er(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var a=e.child;a!==null;)n|=a.lanes|a.childLanes,r|=a.subtreeFlags&14680064,r|=a.flags&14680064,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)n|=a.lanes|a.childLanes,r|=a.subtreeFlags,r|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function SX(e,t,n){var r=t.pendingProps;switch(IC(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Er(t),null;case 1:return ma(t.type)&&Xv(),Er(t),null;case 3:return r=t.stateNode,Gd(),sn(pa),sn(Fr),UC(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(hy(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ts!==null&&(sj(Ts),Ts=null))),Qk(e,t),Er(t),null;case 5:qC(t);var a=gc($p.current);if(n=t.type,e!==null&&t.stateNode!=null)UL(e,t,n,r,a),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(me(166));return Er(t),null}if(e=gc(mi.current),hy(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[ii]=t,r[Mp]=i,e=(t.mode&1)!==0,n){case"dialog":tn("cancel",r),tn("close",r);break;case"iframe":case"object":case"embed":tn("load",r);break;case"video":case"audio":for(a=0;a<Vf.length;a++)tn(Vf[a],r);break;case"source":tn("error",r);break;case"img":case"image":case"link":tn("error",r),tn("load",r);break;case"details":tn("toggle",r);break;case"input":MA(r,i),tn("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},tn("invalid",r);break;case"textarea":$A(r,i),tn("invalid",r)}jk(n,i),a=null;for(var o in i)if(i.hasOwnProperty(o)){var l=i[o];o==="children"?typeof l=="string"?r.textContent!==l&&(i.suppressHydrationWarning!==!0&&dy(r.textContent,l,e),a=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(i.suppressHydrationWarning!==!0&&dy(r.textContent,l,e),a=["children",""+l]):Sp.hasOwnProperty(o)&&l!=null&&o==="onScroll"&&tn("scroll",r)}switch(n){case"input":ry(r),DA(r,i,!0);break;case"textarea":ry(r),LA(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Kv)}r=a,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=a.nodeType===9?a:a.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=v$(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>
40",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[ii]=t,e[Mp]=r,qL(e,t,!1,!1),t.stateNode=e;e:{switch(o=Sk(n,r),n){case"dialog":tn("cancel",e),tn("close",e),a=r;break;case"iframe":case"object":case"embed":tn("load",e),a=r;break;case"video":case"audio":for(a=0;a<Vf.length;a++)tn(Vf[a],e);a=r;break;case"source":tn("error",e),a=r;break;case"img":case"image":case"link":tn("error",e),tn("load",e),a=r;break;case"details":tn("toggle",e),a=r;break;case"input":MA(e,r),a=bk(e,r),tn("invalid",e);break;case"option":a=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},a=xn({},r,{value:void 0}),tn("invalid",e);break;case"textarea":$A(e,r),a=_k(e,r),tn("invalid",e);break;default:a=r}jk(n,a),l=a;for(i in l)if(l.hasOwnProperty(i)){var c=l[i];i==="style"?w$(e,c):i==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&b$(e,c)):i==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&Np(e,c):typeof c=="number"&&Np(e,""+c):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Sp.hasOwnProperty(i)?c!=null&&i==="onScroll"&&tn("scroll",e):c!=null&&bC(e,i,c,o))}switch(n){case"input":ry(e),DA(e,r,!1);break;case"textarea":ry(e),LA(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Al(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?ud(e,!!r.multiple,i,!1):r.defaultValue!=null&&ud(e,!!r.multiple,r.defaultValue,!0);break;default:typeof a.onClick=="function"&&(e.onclick=Kv)}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 Er(t),null;case 6:if(e&&t.stateNode!=null)zL(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(me(166));if(n=gc($p.current),gc(mi.current),hy(t)){if(r=t.stateNode,n=t.memoizedProps,r[ii]=t,(i=r.nodeValue!==n)&&(e=Aa,e!==null))switch(e.tag){case 3:dy(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&dy(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[ii]=t,t.stateNode=r}return Er(t),null;case 13:if(sn(gn),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(dn&&Ta!==null&&t.mode&1&&!(t.flags&128))lL(),Hd(),t.flags|=98560,i=!1;else if(i=hy(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(me(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(me(317));i[ii]=t}else Hd(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Er(t),i=!1}else Ts!==null&&(sj(Ts),Ts=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||gn.current&1?tr===0&&(tr=3):tP())),t.updateQueue!==null&&(t.flags|=4),Er(t),null);case 4:return Gd(),Qk(e,t),e===null&&Rp(t.stateNode.containerInfo),Er(t),null;case 10:return LC(t.type._context),Er(t),null;case 17:return ma(t.type)&&Xv(),Er(t),null;case 19:if(sn(gn),i=t.memoizedState,i===null)return Er(t),null;if(r=(t.flags&128)!==0,o=i.rendering,o===null)if(r)bf(i,!1);else{if(tr!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=rb(e),o!==null){for(t.flags|=128,bf(i,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,e=o.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Qt(gn,gn.current&1|2),t.child}e=e.sibling}i.tail!==null&&Rn()>Kd&&(t.flags|=128,r=!0,bf(i,!1),t.lanes=4194304)}else{if(!r)if(e=rb(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),bf(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!dn)return Er(t),null}else 2*Rn()-i.renderingStartTime>Kd&&n!==1073741824&&(t.flags|=128,r=!0,bf(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Rn(),t.sibling=null,n=gn.current,Qt(gn,r?n&1|2:n&1),t):(Er(t),null);
vendor: 23,602 bytes, line 40
40case 22:case 23:return eP(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ja&1073741824&&(Er(t),t.subtreeFlags&6&&(t.flags|=8192)):Er(t),null;case 24:return null;case 25:return null}throw Error(me(156,t.tag))}function NX(e,t){switch(IC(t),t.tag){case 1:return ma(t.type)&&Xv(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Gd(),sn(pa),sn(Fr),UC(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return qC(t),null;case 13:if(sn(gn),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(me(340));Hd()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return sn(gn),null;case 4:return Gd(),null;case 10:return LC(t.type._context),null;case 22:case 23:return eP(),null;case 24:return null;default:return null}}var my=!1,Mr=!1,CX=typeof WeakSet=="function"?WeakSet:Set,Ne=null;function Ju(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Cn(e,t,r)}else n.current=null}function Jk(e,t,n){try{n()}catch(r){Cn(e,t,r)}}var CE=!1;function PX(e,t){if(Mk=Vv,e=K$(),OC(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,l=-1,c=-1,u=0,h=0,d=e,f=null;t:for(;;){for(var p;d!==n||a!==0&&d.nodeType!==3||(l=o+a),d!==i||r!==0&&d.nodeType!==3||(c=o+r),d.nodeType===3&&(o+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++u===a&&(l=o),f===i&&++h===r&&(c=o),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=l===-1||c===-1?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Dk={focusedElem:e,selectionRange:n},Vv=!1,Ne=t;Ne!==null;)if(t=Ne,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ne=e;else for(;Ne!==null;){t=Ne;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var m=y.memoizedProps,v=y.memoizedState,b=t.stateNode,x=b.getSnapshotBeforeUpdate(t.elementType===t.type?m:ks(t.type,m),v);b.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(me(163))}}catch(_){Cn(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,Ne=e;break}Ne=t.return}return y=CE,CE=!1,y}function op(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var a=r=r.next;do{if((a.tag&e)===e){var i=a.destroy;a.destroy=void 0,i!==void 0&&Jk(t,n,i)}a=a.next}while(a!==r)}}function aw(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 Zk(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 HL(e){var t=e.alternate;t!==null&&(e.alternate=null,HL(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ii],delete t[Mp],delete t[Fk],delete t[uX],delete t[dX])),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 VL(e){return e.tag===5||e.tag===3||e.tag===4}function PE(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||VL(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 ej(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=Kv));else if(r!==4&&(e=e.child,e!==null))for(ej(e,t,n),e=e.sibling;e!==null;)ej(e,t,n),e=e.sibling}function tj(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(tj(e,t,n),e=e.sibling;e!==null;)tj(e,t,n),e=e.sibling}var br=null,Cs=!1;function $o(e,t,n){for(n=n.child;n!==null;)GL(e,t,n),n=n.sibling}function GL(e,t,n){if(pi&&typeof pi.onCommitFiberUnmount=="function")try{pi.onCommitFiberUnmount(Xx,n)}catch{}switch(n.tag){case 5:Mr||Ju(n,t);case 6:var r=br,a=Cs;br=null,$o(e,t,n),br=r,Cs=a,br!==null&&(Cs?(e=br,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):br.removeChild(n.stateNode));break;case 18:br!==null&&(Cs?(e=br,n=n.stateNode,e.nodeType===8?C_(e.parentNode,n):e.nodeType===1&&C_(e,n),Ap(e)):C_(br,n.stateNode));break;case 4:r=br,a=Cs,br=n.stateNode.containerInfo,Cs=!0,$o(e,t,n),br=r,Cs=a;break;case 0:case 11:case 14:case 15:if(!Mr&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){a=r=r.next;do{var i=a,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&Jk(n,t,o),a=a.next}while(a!==r)}$o(e,t,n);break;case 1:if(!Mr&&(Ju(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Cn(n,t,l)}$o(e,t,n);break;case 21:$o(e,t,n);break;case 22:n.mode&1?(Mr=(r=Mr)||n.memoizedState!==null,$o(e,t,n),Mr=r):$o(e,t,n);break;default:$o(e,t,n)}}function TE(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new CX),t.forEach(function(r){var a=$X.bind(null,e,r);n.has(r)||(n.add(r),r.then(a,a))})}}function ps(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r];try{var i=e,o=t,l=o;e:for(;l!==null;){switch(l.tag){case 5:br=l.stateNode,Cs=!1;break e;case 3:br=l.stateNode.containerInfo,Cs=!0;break e;case 4:br=l.stateNode.containerInfo,Cs=!0;break e}l=l.return}if(br===null)throw Error(me(160));GL(i,o,a),br=null,Cs=!1;var c=a.alternate;c!==null&&(c.return=null),a.return=null}catch(u){Cn(a,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)YL(t,e),t=t.sibling}function YL(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ps(t,e),Ys(e),r&4){try{op(3,e,e.return),aw(3,e)}catch(m){Cn(e,e.return,m)}try{op(5,e,e.return)}catch(m){Cn(e,e.return,m)}}break;case 1:ps(t,e),Ys(e),r&512&&n!==null&&Ju(n,n.return);break;case 5:if(ps(t,e),Ys(e),r&512&&n!==null&&Ju(n,n.return),e.flags&32){var a=e.stateNode;try{Np(a,"")}catch(m){Cn(e,e.return,m)}}if(r&4&&(a=e.stateNode,a!=null)){var i=e.memoizedProps,o=n!==null?n.memoizedProps:i,l=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{l==="input"&&i.type==="radio"&&i.name!=null&&g$(a,i),Sk(l,o);var u=Sk(l,i);for(o=0;o<c.length;o+=2){var h=c[o],d=c[o+1];h==="style"?w$(a,d):h==="dangerouslySetInnerHTML"?b$(a,d):h==="children"?Np(a,d):bC(a,h,d,u)}switch(l){case"input":xk(a,i);break;case"textarea":y$(a,i);break;case"select":var f=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!i.multiple;var p=i.value;p!=null?ud(a,!!i.multiple,p,!1):f!==!!i.multiple&&(i.defaultValue!=null?ud(a,!!i.multiple,i.defaultValue,!0):ud(a,!!i.multiple,i.multiple?[]:"",!1))}a[Mp]=i}catch(m){Cn(e,e.return,m)}}break;case 6:if(ps(t,e),Ys(e),r&4){if(e.stateNode===null)throw Error(me(162));a=e.stateNode,i=e.memoizedProps;try{a.nodeValue=i}catch(m){Cn(e,e.return,m)}}break;case 3:if(ps(t,e),Ys(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Ap(t.containerInfo)}catch(m){Cn(e,e.return,m)}break;case 4:ps(t,e),Ys(e);break;case 13:ps(t,e),Ys(e),a=e.child,a.flags&8192&&(i=a.memoizedState!==null,a.stateNode.isHidden=i,!i||a.alternate!==null&&a.alternate.memoizedState!==null||(JC=Rn())),r&4&&TE(e);break;case 22:if(h=n!==null&&n.memoizedState!==null,e.mode&1?(Mr=(u=Mr)||h,ps(t,e),Mr=u):ps(t,e),Ys(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!h&&e.mode&1)for(Ne=e,h=e.child;h!==null;){for(d=Ne=h;Ne!==null;){switch(f=Ne,p=f.child,f.tag){case 0:case 11:case 14:case 15:op(4,f,f.return);break;case 1:Ju(f,f.return);var y=f.stateNode;if(typeof y.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,y.props=t.memoizedProps,y.state=t.memoizedState,y.componentWillUnmount()}catch(m){Cn(r,n,m)}}break;case 5:Ju(f,f.return);break;case 22:if(f.memoizedState!==null){EE(d);continue}}p!==null?(p.return=f,Ne=p):EE(d)}h=h.sibling}e:for(h=null,d=e;;){if(d.tag===5){if(h===null){h=d;try{a=d.stateNode,u?(i=a.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(l=d.stateNode,c=d.memoizedProps.style,o=c!=null&&c.hasOwnProperty("display")?c.display:null,l.style.display=x$("display",o))}catch(m){Cn(e,e.return,m)}}}else if(d.tag===6){if(h===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(m){Cn(e,e.return,m)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;h===d&&(h=null),d=d.return}h===d&&(h=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:ps(t,e),Ys(e),r&4&&TE(e);break;case 21:break;default:ps(t,e),Ys(e)}}function Ys(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(VL(n)){var r=n;break e}n=n.return}throw Error(me(160))}switch(r.tag){case 5:var a=r.stateNode;r.flags&32&&(Np(a,""),r.flags&=-33);var i=PE(e);tj(e,i,a);break;case 3:case 4:var o=r.stateNode.containerInfo,l=PE(e);ej(e,l,o);break;default:throw Error(me(161))}}catch(c){Cn(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function TX(e,t,n){Ne=e,KL(e)}function KL(e,t,n){for(var r=(e.mode&1)!==0;Ne!==null;){var a=Ne,i=a.child;if(a.tag===22&&r){var o=a.memoizedState!==null||my;if(!o){var l=a.alternate,c=l!==null&&l.memoizedState!==null||Mr;l=my;var u=Mr;if(my=o,(Mr=c)&&!u)for(Ne=a;Ne!==null;)o=Ne,c=o.child,o.tag===22&&o.memoizedState!==null?OE(a):c!==null?(c.return=o,Ne=c):OE(a);for(;i!==null;)Ne=i,KL(i),i=i.sibling;Ne=a,my=l,Mr=u}AE(e)}else a.subtreeFlags&8772&&i!==null?(i.return=a,Ne=i):AE(e)}}function AE(e){for(;Ne!==null;){var t=Ne;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Mr||aw(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Mr)if(n===null)r.componentDidMount();else{var a=t.elementType===t.type?n.memoizedProps:ks(t.type,n.memoizedProps);r.componentDidUpdate(a,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&pE(t,i,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}pE(t,o,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;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 u=t.alternate;if(u!==null){var h=u.memoizedState;if(h!==null){var d=h.dehydrated;d!==null&&Ap(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(me(163))}Mr||t.flags&512&&Zk(t)}catch(f){Cn(t,t.return,f)}}if(t===e){Ne=null;break}if(n=t.sibling,n!==null){n.return=t.return,Ne=n;break}Ne=t.return}}function EE(e){for(;Ne!==null;){var t=Ne;if(t===e){Ne=null;break}var n=t.sibling;if(n!==null){n.return=t.return,Ne=n;break}Ne=t.return}}function OE(e){for(;Ne!==null;){var t=Ne;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{aw(4,t)}catch(c){Cn(t,n,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var a=t.return;try{r.componentDidMount()}catch(c){Cn(t,a,c)}}var i=t.return;try{Zk(t)}catch(c){Cn(t,i,c)}break;case 5:var o=t.return;try{Zk(t)}catch(c){Cn(t,o,c)}}}catch(c){Cn(t,t.return,c)}if(t===e){Ne=null;break}var l=t.sibling;if(l!==null){l.return=t.return,Ne=l;break}Ne=t.return}}var AX=Math.ceil,ib=Ao.ReactCurrentDispatcher,XC=Ao.ReactCurrentOwner,es=Ao.ReactCurrentBatchConfig,Et=0,ur=null,qn=null,jr=0,ja=0,Zu=Fl(0),tr=0,Wp=null,Gc=0,sw=0,QC=0,lp=null,ca=null,JC=0,Kd=1/0,Gi=null,ob=!1,nj=null,xl=null,gy=!1,dl=null,lb=0,cp=0,rj=null,xv=-1,wv=0;function Jr(){return Et&6?Rn():xv!==-1?xv:xv=Rn()}function wl(e){return e.mode&1?Et&2&&jr!==0?jr&-jr:fX.transition!==null?(wv===0&&(wv=R$()),wv):(e=Wt,e!==0||(e=window.event,e=e===void 0?16:B$(e.type)),e):1}function Is(e,t,n,r){if(50<cp)throw cp=0,rj=null,Error(me(185));ig(e,n,r),(!(Et&2)||e!==ur)&&(e===ur&&(!(Et&2)&&(sw|=n),tr===4&&Qo(e,jr)),ga(e,r),n===1&&Et===0&&!(t.mode&1)&&(Kd=Rn()+500,tw&&Bl()))}function ga(e,t){var n=e.callbackNode;fK(e,t);var r=Hv(e,e===ur?jr:0);if(r===0)n!==null&&WA(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&WA(n),t===1)e.tag===0?hX(RE.bind(null,e)):sL(RE.bind(null,e)),lX(function(){!(Et&6)&&Bl()}),n=null;else{switch(I$(r)){case 1:n=jC;break;case 4:n=E$;break;case 16:n=zv;break;case 536870912:n=O$;break;default:n=zv}n=rF(n,XL.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function XL(e,t){if(xv=-1,wv=0,Et&6)throw Error(me(327));var n=e.callbackNode;if(md()&&e.callbackNode!==n)return null;var r=Hv(e,e===ur?jr:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=cb(e,r);else{t=r;var a=Et;Et|=2;var i=JL();(ur!==e||jr!==t)&&(Gi=null,Kd=Rn()+500,Dc(e,t));do try{RX();break}catch(l){QL(e,l)}while(!0);$C(),ib.current=i,Et=a,qn!==null?t=0:(ur=null,jr=0,t=tr)}if(t!==0){if(t===2&&(a=Ak(e),a!==0&&(r=a,t=aj(e,a))),t===1)throw n=Wp,Dc(e,0),Qo(e,r),ga(e,Rn()),n;if(t===6)Qo(e,r);else{if(a=e.current.alternate,!(r&30)&&!EX(a)&&(t=cb(e,r),t===2&&(i=Ak(e),i!==0&&(r=i,t=aj(e,i))),t===1))throw n=Wp,Dc(e,0),Qo(e,r),ga(e,Rn()),n;switch(e.finishedWork=a,e.finishedLanes=r,t){case 0:case 1:throw Error(me(345));case 2:sc(e,ca,Gi);break;case 3:if(Qo(e,r),(r&130023424)===r&&(t=JC+500-Rn(),10<t)){if(Hv(e,0)!==0)break;if(a=e.suspendedLanes,(a&r)!==r){Jr(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=Lk(sc.bind(null,e,ca,Gi),t);break}sc(e,ca,Gi);break;case 4:if(Qo(e,r),(r&4194240)===r)break;for(t=e.eventTimes,a=-1;0<r;){var o=31-Rs(r);i=1<<o,o=t[o],o>a&&(a=o),r&=~i}if(r=a,r=Rn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*AX(r/1960))-r,10<r){e.timeoutHandle=Lk(sc.bind(null,e,ca,Gi),r);break}sc(e,ca,Gi);break;case 5:sc(e,ca,Gi);break;default:throw Error(me(329))}}}return ga(e,Rn()),e.callbackNode===n?XL.bind(null,e):null}function aj(e,t){var n=lp;return e.current.memoizedState.isDehydrated&&(Dc(e,t).flags|=256),e=cb(e,t),e!==2&&(t=ca,ca=n,t!==null&&sj(t)),e}function sj(e){ca===null?ca=e:ca.push.apply(ca,e)}function EX(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var a=n[r],i=a.getSnapshot;a=a.value;try{if(!Fs(i(),a))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Qo(e,t){for(t&=~QC,t&=~sw,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Rs(t),r=1<<n;e[n]=-1,t&=~r}}function RE(e){if(Et&6)throw Error(me(327));md();var t=Hv(e,0);if(!(t&1))return ga(e,Rn()),null;var n=cb(e,t);if(e.tag!==0&&n===2){var r=Ak(e);r!==0&&(t=r,n=aj(e,r))}if(n===1)throw n=Wp,Dc(e,0),Qo(e,t),ga(e,Rn()),n;if(n===6)throw Error(me(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,sc(e,ca,Gi),ga(e,Rn()),null}function ZC(e,t){var n=Et;Et|=1;try{return e(t)}finally{Et=n,Et===0&&(Kd=Rn()+500,tw&&Bl())}}function Yc(e){dl!==null&&dl.tag===0&&!(Et&6)&&md();var t=Et;Et|=1;var n=es.transition,r=Wt;try{if(es.transition=null,Wt=1,e)return e()}finally{Wt=r,es.transition=n,Et=t,!(Et&6)&&Bl()}}function eP(){ja=Zu.current,sn(Zu)}function Dc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,oX(n)),qn!==null)for(n=qn.return;n!==null;){var r=n;switch(IC(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Xv();break;case 3:Gd(),sn(pa),sn(Fr),UC();break;case 5:qC(r);break;case 4:Gd();break;case 13:sn(gn);break;case 19:sn(gn);break;case 10:LC(r.type._context);break;case 22:case 23:eP()}n=n.return}if(ur=e,qn=e=_l(e.current,null),jr=ja=t,tr=0,Wp=null,QC=sw=Gc=0,ca=lp=null,mc!==null){for(t=0;t<mc.length;t++)if(n=mc[t],r=n.interleaved,r!==null){n.interleaved=null;var a=r.next,i=n.pending;if(i!==null){var o=i.next;i.next=a,r.next=o}n.pending=r}mc=null}return e}function QL(e,t){do{var n=qn;try{if($C(),yv.current=sb,ab){for(var r=bn.memoizedState;r!==null;){var a=r.queue;a!==null&&(a.pending=null),r=r.next}ab=!1}if(Vc=0,cr=Zn=bn=null,ip=!1,Lp=0,XC.current=null,n===null||n.return===null){tr=1,Wp=t,qn=null;break}e:{var i=e,o=n.return,l=n,c=t;if(t=jr,l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,h=l,d=h.tag;if(!(h.mode&1)&&(d===0||d===11||d===15)){var f=h.alternate;f?(h.updateQueue=f.updateQueue,h.memoizedState=f.memoizedState,h.lanes=f.lanes):(h.updateQueue=null,h.memoizedState=null)}var p=xE(o);if(p!==null){p.flags&=-257,wE(p,o,l,i,t),p.mode&1&&bE(i,u,t),t=p,c=u;var y=t.updateQueue;if(y===null){var m=new Set;m.add(c),t.updateQueue=m}else y.add(c);break e}else{if(!(t&1)){bE(i,u,t),tP();break e}c=Error(me(426))}}else if(dn&&l.mode&1){var v=xE(o);if(v!==null){!(v.flags&65536)&&(v.flags|=256),wE(v,o,l,i,t),MC(Yd(c,l));break e}}i=c=Yd(c,l),tr!==4&&(tr=2),lp===null?lp=[i]:lp.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var b=IL(i,c,t);fE(i,b);break e;case 1:l=c;var x=i.type,w=i.stateNode;if(!(i.flags&128)&&(typeof x.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(xl===null||!xl.has(w)))){i.flags|=65536,t&=-t,i.lanes|=t;var _=ML(i,l,t);fE(i,_);break e}}i=i.return}while(i!==null)}eF(n)}catch(k){t=k,qn===n&&n!==null&&(qn=n=n.return);continue}break}while(!0)}function JL(){var e=ib.current;return ib.current=sb,e===null?sb:e}function tP(){(tr===0||tr===3||tr===2)&&(tr=4),ur===null||!(Gc&268435455)&&!(sw&268435455)||Qo(ur,jr)}function cb(e,t){var n=Et;Et|=2;var r=JL();(ur!==e||jr!==t)&&(Gi=null,Dc(e,t));do try{OX();break}catch(a){QL(e,a)}while(!0);if($C(),Et=n,ib.current=r,qn!==null)throw Error(me(261));return ur=null,jr=0,tr}function OX(){for(;qn!==null;)ZL(qn)}function RX(){for(;qn!==null&&!aK();)ZL(qn)}function ZL(e){var t=nF(e.alternate,e,ja);e.memoizedProps=e.pendingProps,t===null?eF(e):qn=t,XC.current=null}function eF(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=NX(n,t),n!==null){n.flags&=32767,qn=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{tr=6,qn=null;return}}else if(n=SX(n,t,ja),n!==null){qn=n;return}if(t=t.sibling,t!==null){qn=t;return}qn=t=e}while(t!==null);tr===0&&(tr=5)}function sc(e,t,n){var r=Wt,a=es.transition;try{es.transition=null,Wt=1,IX(e,t,n,r)}finally{es.transition=a,Wt=r}return null}function IX(e,t,n,r){do md();while(dl!==null);if(Et&6)throw Error(me(327));n=e.finishedWork;var a=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(me(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(pK(e,i),e===ur&&(qn=ur=null,jr=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||gy||(gy=!0,rF(zv,function(){return md(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=es.transition,es.transition=null;var o=Wt;Wt=1;var l=Et;Et|=4,XC.current=null,PX(e,n),YL(n,e),eX(Dk),Vv=!!Mk,Dk=Mk=null,e.current=n,TX(n),sK(),Et=l,Wt=o,es.transition=i}else e.current=n;if(gy&&(gy=!1,dl=e,lb=a),i=e.pendingLanes,i===0&&(xl=null),lK(n.stateNode),ga(e,Rn()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)a=t[n],r(a.value,{componentStack:a.stack,digest:a.digest});if(ob)throw ob=!1,e=nj,nj=null,e;return lb&1&&e.tag!==0&&md(),i=e.pendingLanes,i&1?e===rj?cp++:(cp=0,rj=e):cp=0,Bl(),null}function md(){if(dl!==null){var e=I$(lb),t=es.transition,n=Wt;try{if(es.transition=null,Wt=16>e?16:e,dl===null)var r=!1;else{if(e=dl,dl=null,lb=0,Et&6)throw Error(me(331));var a=Et;for(Et|=4,Ne=e.current;Ne!==null;){var i=Ne,o=i.child;if(Ne.flags&16){var l=i.deletions;if(l!==null){for(var c=0;c<l.length;c++){var u=l[c];for(Ne=u;Ne!==null;){var h=Ne;switch(h.tag){case 0:case 11:case 15:op(8,h,i)}var d=h.child;if(d!==null)d.return=h,Ne=d;else for(;Ne!==null;){h=Ne;var f=h.sibling,p=h.return;if(HL(h),h===u){Ne=null;break}if(f!==null){f.return=p,Ne=f;break}Ne=p}}}var y=i.alternate;if(y!==null){var m=y.child;if(m!==null){y.child=null;do{var v=m.sibling;m.sibling=null,m=v}while(m!==null)}}Ne=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,Ne=o;else e:for(;Ne!==null;){if(i=Ne,i.flags&2048)switch(i.tag){case 0:case 11:case 15:op(9,i,i.return)}var b=i.sibling;if(b!==null){b.return=i.return,Ne=b;break e}Ne=i.return}}var x=e.current;for(Ne=x;Ne!==null;){o=Ne;var w=o.child;if(o.subtreeFlags&2064&&w!==null)w.return=o,Ne=w;else e:for(o=x;Ne!==null;){if(l=Ne,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:aw(9,l)}}catch(k){Cn(l,l.return,k)}if(l===o){Ne=null;break e}var _=l.sibling;if(_!==null){_.return=l.return,Ne=_;break e}Ne=l.return}}if(Et=a,Bl(),pi&&typeof pi.onPostCommitFiberRoot=="function")try{pi.onPostCommitFiberRoot(Xx,e)}catch{}r=!0}return r}finally{Wt=n,es.transition=t}}return!1}function IE(e,t,n){t=Yd(n,t),t=IL(e,t,1),e=bl(e,t,1),t=Jr(),e!==null&&(ig(e,1,t),ga(e,t))}function Cn(e,t,n){if(e.tag===3)IE(e,e,n);else for(;t!==null;){if(t.tag===3){IE(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(xl===null||!xl.has(r))){e=Yd(n,e),e=ML(t,e,1),t=bl(t,e,1),e=Jr(),t!==null&&(ig(t,1,e),ga(t,e));break}}t=t.return}}function MX(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Jr(),e.pingedLanes|=e.suspendedLanes&n,ur===e&&(jr&n)===n&&(tr===4||tr===3&&(jr&130023424)===jr&&500>Rn()-JC?Dc(e,0):QC|=n),ga(e,t)}function tF(e,t){t===0&&(e.mode&1?(t=iy,iy<<=1,!(iy&130023424)&&(iy=4194304)):t=1);var n=Jr();e=vo(e,t),e!==null&&(ig(e,t,n),ga(e,n))}function DX(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),tF(e,n)}function $X(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(me(314))}r!==null&&r.delete(t),tF(e,n)}var nF;nF=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||pa.current)da=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return da=!1,jX(e,t,n);da=!!(e.flags&131072)}else da=!1,dn&&t.flags&1048576&&iL(t,Zv,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;bv(e,t),e=t.pendingProps;var a=zd(t,Fr.current);pd(t,n),a=HC(null,t,r,e,a,n);var i=VC();return t.flags|=1,typeof a=="object"&&a!==null&&typeof a.render=="function"&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ma(r)?(i=!0,Qv(t)):i=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,BC(t),a.updater=rw,t.stateNode=a,a._reactInternals=t,Hk(t,r,e,n),t=Yk(null,t,r,!0,i,n)):(t.tag=0,dn&&i&&RC(t),Yr(null,t,a,n),t=t.child),t;case 16:r=t.elementType;e:{switch(bv(e,t),e=t.pendingProps,a=r._init,r=a(r._payload),t.type=r,a=t.tag=FX(r),e=ks(r,e),a){case 0:t=Gk(null,t,r,e,n);break e;case 1:t=jE(null,t,r,e,n);break e;case 11:t=_E(null,t,r,e,n);break e;case 14:t=kE(null,t,r,ks(r.type,e),n);break e}throw Error(me(306,r,""))}return t;case 0:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:ks(r,a),Gk(e,t,r,a,n);case 1:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:ks(r,a),jE(e,t,r,a,n);case 3:e:{if(FL(t),e===null)throw Error(me(387));
vendor: 5,694 bytes, line 40
40r=t.pendingProps,i=t.memoizedState,a=i.element,hL(e,t),nb(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){a=Yd(Error(me(423)),t),t=SE(e,t,r,n,a);break e}else if(r!==a){a=Yd(Error(me(424)),t),t=SE(e,t,r,n,a);break e}else for(Ta=vl(t.stateNode.containerInfo.firstChild),Aa=t,dn=!0,Ts=null,n=uL(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Hd(),r===a){t=bo(e,t,n);break e}Yr(e,t,r,n)}t=t.child}return t;case 5:return fL(t),e===null&&qk(t),r=t.type,a=t.pendingProps,i=e!==null?e.memoizedProps:null,o=a.children,$k(r,a)?o=null:i!==null&&$k(r,i)&&(t.flags|=32),LL(e,t),Yr(e,t,o,n),t.child;case 6:return e===null&&qk(t),null;case 13:return BL(e,t,n);case 4:return WC(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Vd(t,null,r,n):Yr(e,t,r,n),t.child;case 11:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:ks(r,a),_E(e,t,r,a,n);case 7:return Yr(e,t,t.pendingProps,n),t.child;case 8:return Yr(e,t,t.pendingProps.children,n),t.child;case 12:return Yr(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,a=t.pendingProps,i=t.memoizedProps,o=a.value,Qt(eb,r._currentValue),r._currentValue=o,i!==null)if(Fs(i.value,o)){if(i.children===a.children&&!pa.current){t=bo(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var l=i.dependencies;if(l!==null){o=i.child;for(var c=l.firstContext;c!==null;){if(c.context===r){if(i.tag===1){c=uo(-1,n&-n),c.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var h=u.pending;h===null?c.next=c:(c.next=h.next,h.next=c),u.pending=c}}i.lanes|=n,c=i.alternate,c!==null&&(c.lanes|=n),Uk(i.return,n,t),l.lanes|=n;break}c=c.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(me(341));o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),Uk(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}Yr(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,r=t.pendingProps.children,pd(t,n),a=as(a),r=r(a),t.flags|=1,Yr(e,t,r,n),t.child;case 14:return r=t.type,a=ks(r,t.pendingProps),a=ks(r.type,a),kE(e,t,r,a,n);case 15:return DL(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:ks(r,a),bv(e,t),t.tag=1,ma(r)?(e=!0,Qv(t)):e=!1,pd(t,n),RL(t,r,a),Hk(t,r,a,n),Yk(null,t,r,!0,e,n);case 19:return WL(e,t,n);case 22:return $L(e,t,n)}throw Error(me(156,t.tag))};function rF(e,t){return A$(e,t)}function LX(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 Qa(e,t,n,r){return new LX(e,t,n,r)}function nP(e){return e=e.prototype,!(!e||!e.isReactComponent)}function FX(e){if(typeof e=="function")return nP(e)?1:0;if(e!=null){if(e=e.$$typeof,e===wC)return 11;if(e===_C)return 14}return 2}function _l(e,t){var n=e.alternate;return n===null?(n=Qa(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 _v(e,t,n,r,a,i){var o=2;if(r=e,typeof e=="function")nP(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Uu:return $c(n.children,a,i,t);case xC:o=8,a|=8;break;case mk:return e=Qa(12,n,t,a|2),e.elementType=mk,e.lanes=i,e;case gk:return e=Qa(13,n,t,a),e.elementType=gk,e.lanes=i,e;case yk:return e=Qa(19,n,t,a),e.elementType=yk,e.lanes=i,e;case f$:return iw(n,a,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case d$:o=10;break e;case h$:o=9;break e;case wC:o=11;break e;case _C:o=14;break e;case Vo:o=16,r=null;break e}throw Error(me(130,e==null?e:typeof e,""))}return t=Qa(o,n,t,a),t.elementType=e,t.type=r,t.lanes=i,t}function $c(e,t,n,r){return e=Qa(7,e,r,t),e.lanes=n,e}function iw(e,t,n,r){return e=Qa(22,e,r,t),e.elementType=f$,e.lanes=n,e.stateNode={isHidden:!1},e}function M_(e,t,n){return e=Qa(6,e,null,t),e.lanes=n,e}function D_(e,t,n){return t=Qa(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function BX(e,t,n,r,a){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=g_(0),this.expirationTimes=g_(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=g_(0),this.identifierPrefix=r,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function rP(e,t,n,r,a,i,o,l,c){return e=new BX(e,t,n,l,c),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Qa(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},BC(i),e}
vendor: 4,680 bytes, line 40
40function WX(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:qu,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function aF(e){if(!e)return El;e=e._reactInternals;e:{if(fu(e)!==e||e.tag!==1)throw Error(me(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(ma(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(me(171))}if(e.tag===1){var n=e.type;if(ma(n))return aL(e,n,t)}return t}function sF(e,t,n,r,a,i,o,l,c){return e=rP(n,r,!0,e,a,i,o,l,c),e.context=aF(null),n=e.current,r=Jr(),a=wl(n),i=uo(r,a),i.callback=t??null,bl(n,i,a),e.current.lanes=a,ig(e,a,r),ga(e,r),e}function ow(e,t,n,r){var a=t.current,i=Jr(),o=wl(a);return n=aF(n),t.context===null?t.context=n:t.pendingContext=n,t=uo(i,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=bl(a,t,o),e!==null&&(Is(e,a,o,i),gv(e,a,o)),o}function ub(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 ME(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function aP(e,t){ME(e,t),(e=e.alternate)&&ME(e,t)}function qX(){return null}var iF=typeof reportError=="function"?reportError:function(e){console.error(e)};function sP(e){this._internalRoot=e}lw.prototype.render=sP.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(me(409));ow(e,t,null,null)};lw.prototype.unmount=sP.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Yc(function(){ow(null,e,null,null)}),t[yo]=null}};function lw(e){this._internalRoot=e}lw.prototype.unstable_scheduleHydration=function(e){if(e){var t=$$();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Xo.length&&t!==0&&t<Xo[n].priority;n++);Xo.splice(n,0,e),n===0&&F$(e)}};function iP(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function cw(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function DE(){}function UX(e,t,n,r,a){if(a){if(typeof r=="function"){var i=r;r=function(){var u=ub(o);i.call(u)}}var o=sF(t,r,e,0,null,!1,!1,"",DE);return e._reactRootContainer=o,e[yo]=o.current,Rp(e.nodeType===8?e.parentNode:e),Yc(),o}for(;a=e.lastChild;)e.removeChild(a);if(typeof r=="function"){var l=r;r=function(){var u=ub(c);l.call(u)}}var c=rP(e,0,!1,null,null,!1,!1,"",DE);return e._reactRootContainer=c,e[yo]=c.current,Rp(e.nodeType===8?e.parentNode:e),Yc(function(){ow(t,c,n,r)}),c}function uw(e,t,n,r,a){var i=n._reactRootContainer;if(i){var o=i;if(typeof a=="function"){var l=a;a=function(){var c=ub(o);l.call(c)}}ow(t,o,e,a)}else o=UX(n,t,e,a,r);return ub(o)}M$=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Hf(t.pendingLanes);n!==0&&(SC(t,n|1),ga(t,Rn()),!(Et&6)&&(Kd=Rn()+500,Bl()))}break;case 13:Yc(function(){var r=vo(e,1);if(r!==null){var a=Jr();Is(r,e,1,a)}}),aP(e,1)}};NC=function(e){if(e.tag===13){var t=vo(e,134217728);if(t!==null){var n=Jr();Is(t,e,134217728,n)}aP(e,134217728)}};D$=function(e){if(e.tag===13){var t=wl(e),n=vo(e,t);if(n!==null){var r=Jr();Is(n,e,t,r)}aP(e,t)}};$$=function(){return Wt};L$=function(e,t){var n=Wt;try{return Wt=e,t()}finally{Wt=n}};Ck=function(e,t,n){switch(t){case"input":if(xk(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=ew(r);if(!a)throw Error(me(90));m$(r),xk(r,a)}}}break;case"textarea":y$(e,n);break;case"select":t=n.value,t!=null&&ud(e,!!n.multiple,t,!1)}};j$=ZC;S$=Yc;var zX={usingClientEntryPoint:!1,Events:[lg,Gu,ew,_$,k$,ZC]},xf={findFiberByHostInstance:pc,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},HX={bundleType:xf.bundleType,version:xf.version,rendererPackageName:xf.rendererPackageName,rendererConfig:xf.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ao.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=P$(e),e===null?null:e.stateNode},findFiberByHostInstance:xf.findFiberByHostInstance||qX,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};
40if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var yy=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!yy.isDisabled&&yy.supportsFiber)try{Xx=yy.inject(HX),pi=yy}catch{}}$a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=zX;$a.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!iP(t))throw Error(me(200));return WX(e,t,null,n)};$a.createRoot=function(e,t){if(!iP(e))throw Error(me(299));var n=!1,r="",a=iF;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=rP(e,1,!1,null,null,n,!1,r,a),e[yo]=t.current,Rp(e.nodeType===8?e.parentNode:e),new sP(t)};$a.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(me(188)):(e=Object.keys(e).join(","),Error(me(268,e)));return e=P$(t),e=e===null?null:e.stateNode,e};$a.flushSync=function(e){return Yc(e)};$a.hydrate=function(e,t,n){if(!cw(t))throw Error(me(200));return uw(null,e,t,!0,n)};$a.hydrateRoot=function(e,t,n){if(!iP(e))throw Error(me(405));var r=n!=null&&n.hydratedSources||null,a=!1,i="",o=iF;if(n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=sF(t,null,e,1,n??null,a,!1,i,o),e[yo]=t.current,Rp(e),r)for(e=0;e<r.length;e++)n=r[e],a=n._getVersion,a=a(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,a]:t.mutableSourceEagerHydrationData.push(n,a);return new lw(t)};$a.render=function(e,t,n){if(!cw(t))throw Error(me(200));return uw(null,e,t,!1,n)};$a.unmountComponentAtNode=function(e){if(!cw(e))throw Error(me(40));return e._reactRootContainer?(Yc(function(){uw(null,null,e,!1,function(){e._reactRootContainer=null,e[yo]=null})}),!0):!1};$a.unstable_batchedUpdates=ZC;$a.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!cw(n))throw Error(me(200));if(e==null||e._reactInternals===void 0)throw Error(me(38));return uw(e,t,n,!1,r)};$a.version="18.3.1-next-f1338f8080-20240426";function oF(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(oF)}catch(e){console.error(e)}}oF(),o$.exports=$a;var pu=o$.exports;const lF=Vt(pu);var cF,$E=pu;cF=$E.createRoot,$E.hydrateRoot;const VX=1,GX=1e6;let $_=0;function YX(){return $_=($_+1)%Number.MAX_SAFE_INTEGER,$_.toString()}const L_=new Map,LE=e=>{if(L_.has(e))return;const t=setTimeout(()=>{L_.delete(e),up({type:"REMOVE_TOAST",toastId:e})},GX);L_.set(e,t)},KX=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,VX)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?LE(n):e.toasts.forEach(r=>{LE(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},kv=[];let jv={toasts:[]};function up(e){jv=KX(jv,e),kv.forEach(t=>{t(jv)})}function ij({...e}){const t=YX(),n=a=>up({type:"UPDATE_TOAST",toast:{...a,id:t}}),r=()=>up({type:"DISMISS_TOAST",toastId:t});return up({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:a=>{a||r()}}}),{id:t,dismiss:r,update:n}}function Je(){const[e,t]=g.useState(jv);return g.useEffect(()=>(kv.push(t),()=>{const n=kv.indexOf(t);n>-1&&kv.splice(n,1)}),[e]),{...e,toast:ij,dismiss:n=>up({type:"DISMISS_TOAST",toastId:n})}}function de(e,t,{checkForDefaultPrevented:n=!0}={}){return function(a){if(e==null||e(a),n===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function FE(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function dw(...e){return t=>{let n=!1;const r=e.map(a=>{const i=FE(a,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let a=0;a<r.length;a++){const i=r[a];typeof i=="function"?i():FE(e[a],null)}}}}function Fe(...e){return g.useCallback(dw(...e),e)}function XX(e,t){const n=g.createContext(t),r=i=>{const{children:o,...l}=i,c=g.useMemo(()=>l,Object.values(l));return s.jsx(n.Provider,{value:c,children:o})};r.displayName=e+"Provider";function a(i){const o=g.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,a]}function Hn(e,t=[]){let n=[];function r(i,o){const l=g.createContext(o),c=n.length;n=[...n,o];const u=d=>{var b;const{scope:f,children:p,...y}=d,m=((b=f==null?void 0:f[e])==null?void 0:b[c])||l,v=g.useMemo(()=>y,Object.values(y));return s.jsx(m.Provider,{value:v,children:p})};u.displayName=i+"Provider";function h(d,f){var m;const p=((m=f==null?void 0:f[e])==null?void 0:m[c])||l,y=g.useContext(p);if(y)return y;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[u,h]}const a=()=>{const i=n.map(o=>g.createContext(o));return function(l){const c=(l==null?void 0:l[e])||i;return g.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return a.scopeName=e,[r,QX(a,...t)]}function QX(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));
vendor: 10,698 bytes, line 40
40return function(i){const o=r.reduce((l,{useScope:c,scopeName:u})=>{const d=c(i)[`__scope${u}`];return{...l,...d}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function Ol(e){const t=ZX(e),n=g.forwardRef((r,a)=>{const{children:i,...o}=r,l=g.Children.toArray(i),c=l.find(eQ);if(c){const u=c.props.children,h=l.map(d=>d===c?g.Children.count(u)>1?g.Children.only(null):g.isValidElement(u)?u.props.children:null:d);return s.jsx(t,{...o,ref:a,children:g.isValidElement(u)?g.cloneElement(u,void 0,h):null})}return s.jsx(t,{...o,ref:a,children:i})});return n.displayName=`${e}.Slot`,n}var JX=Ol("Slot");function ZX(e){const t=g.forwardRef((n,r)=>{const{children:a,...i}=n;if(g.isValidElement(a)){const o=nQ(a),l=tQ(i,a.props);return a.type!==g.Fragment&&(l.ref=r?dw(r,o):o),g.cloneElement(a,l)}return g.Children.count(a)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var uF=Symbol("radix.slottable");function dF(e){const t=({children:n})=>s.jsx(s.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=uF,t}function eQ(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===uF}function tQ(e,t){const n={...t};for(const r in t){const a=e[r],i=t[r];/^on[A-Z]/.test(r)?a&&i?n[r]=(...l)=>{const c=i(...l);return a(...l),c}:a&&(n[r]=a):r==="style"?n[r]={...a,...i}:r==="className"&&(n[r]=[a,i].filter(Boolean).join(" "))}return{...e,...n}}function nQ(e){var r,a;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function ug(e){const t=e+"CollectionProvider",[n,r]=Hn(t),[a,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=m=>{const{scope:v,children:b}=m,x=F.useRef(null),w=F.useRef(new Map).current;return s.jsx(a,{scope:v,itemMap:w,collectionRef:x,children:b})};o.displayName=t;const l=e+"CollectionSlot",c=Ol(l),u=F.forwardRef((m,v)=>{const{scope:b,children:x}=m,w=i(l,b),_=Fe(v,w.collectionRef);return s.jsx(c,{ref:_,children:x})});u.displayName=l;const h=e+"CollectionItemSlot",d="data-radix-collection-item",f=Ol(h),p=F.forwardRef((m,v)=>{const{scope:b,children:x,...w}=m,_=F.useRef(null),k=Fe(v,_),j=i(h,b);return F.useEffect(()=>(j.itemMap.set(_,{ref:_,...w}),()=>void j.itemMap.delete(_))),s.jsx(f,{[d]:"",ref:k,children:x})});p.displayName=h;function y(m){const v=i(e+"CollectionConsumer",m);return F.useCallback(()=>{const x=v.collectionRef.current;if(!x)return[];const w=Array.from(x.querySelectorAll(`[${d}]`));return Array.from(v.itemMap.values()).sort((j,S)=>w.indexOf(j.ref.current)-w.indexOf(S.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:o,Slot:u,ItemSlot:p},y,r]}var rQ=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],we=rQ.reduce((e,t)=>{const n=Ol(`Primitive.${t}`),r=g.forwardRef((a,i)=>{const{asChild:o,...l}=a,c=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(c,{...l,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function oP(e,t){e&&pu.flushSync(()=>e.dispatchEvent(t))}function In(e){const t=g.useRef(e);return g.useEffect(()=>{t.current=e}),g.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function aQ(e,t=globalThis==null?void 0:globalThis.document){const n=In(e);g.useEffect(()=>{const r=a=>{a.key==="Escape"&&n(a)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var sQ="DismissableLayer",oj="dismissableLayer.update",iQ="dismissableLayer.pointerDownOutside",oQ="dismissableLayer.focusOutside",BE,hF=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),mu=g.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:o,onDismiss:l,...c}=e,u=g.useContext(hF),[h,d]=g.useState(null),f=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=g.useState({}),y=Fe(t,S=>d(S)),m=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=m.indexOf(v),x=h?m.indexOf(h):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,_=x>=b,k=cQ(S=>{const N=S.target,C=[...u.branches].some(M=>M.contains(N));!_||C||(a==null||a(S),o==null||o(S),S.defaultPrevented||l==null||l())},f),j=uQ(S=>{const N=S.target;[...u.branches].some(M=>M.contains(N))||(i==null||i(S),o==null||o(S),S.defaultPrevented||l==null||l())},f);return aQ(S=>{x===u.layers.size-1&&(r==null||r(S),!S.defaultPrevented&&l&&(S.preventDefault(),l()))},f),g.useEffect(()=>{if(h)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(BE=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(h)),u.layers.add(h),WE(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=BE)}},[h,f,n,u]),g.useEffect(()=>()=>{h&&(u.layers.delete(h),u.layersWithOutsidePointerEventsDisabled.delete(h),WE())},[h,u]),g.useEffect(()=>{const S=()=>p({});return document.addEventListener(oj,S),()=>document.removeEventListener(oj,S)},[]),s.jsx(we.div,{...c,ref:y,style:{pointerEvents:w?_?"auto":"none":void 0,...e.style},onFocusCapture:de(e.onFocusCapture,j.onFocusCapture),onBlurCapture:de(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:de(e.onPointerDownCapture,k.onPointerDownCapture)})});mu.displayName=sQ;var lQ="DismissableLayerBranch",fF=g.forwardRef((e,t)=>{const n=g.useContext(hF),r=g.useRef(null),a=Fe(t,r);return g.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),s.jsx(we.div,{...e,ref:a})});fF.displayName=lQ;function cQ(e,t=globalThis==null?void 0:globalThis.document){const n=In(e),r=g.useRef(!1),a=g.useRef(()=>{});return g.useEffect(()=>{const i=l=>{if(l.target&&!r.current){let c=function(){pF(iQ,n,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=c,t.addEventListener("click",a.current,{once:!0})):c()}else t.removeEventListener("click",a.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",i),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function uQ(e,t=globalThis==null?void 0:globalThis.document){const n=In(e),r=g.useRef(!1);return g.useEffect(()=>{const a=i=>{i.target&&!r.current&&pF(oQ,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function WE(){const e=new CustomEvent(oj);document.dispatchEvent(e)}function pF(e,t,n,{discrete:r}){const a=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?oP(a,i):a.dispatchEvent(i)}var dQ=mu,hQ=fF,rr=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},fQ="Portal",Eh=g.forwardRef((e,t)=>{var l;const{container:n,...r}=e,[a,i]=g.useState(!1);rr(()=>i(!0),[]);const o=n||a&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return o?lF.createPortal(s.jsx(we.div,{...r,ref:t}),o):null});Eh.displayName=fQ;function pQ(e,t){return g.useReducer((n,r)=>t[n][r]??n,e)}var Vn=e=>{const{present:t,children:n}=e,r=mQ(t),a=typeof n=="function"?n({present:r.isPresent}):g.Children.only(n),i=Fe(r.ref,gQ(a));return typeof n=="function"||r.isPresent?g.cloneElement(a,{ref:i}):null};Vn.displayName="Presence";function mQ(e){const[t,n]=g.useState(),r=g.useRef(null),a=g.useRef(e),i=g.useRef("none"),o=e?"mounted":"unmounted",[l,c]=pQ(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const u=vy(r.current);i.current=l==="mounted"?u:"none"},[l]),rr(()=>{const u=r.current,h=a.current;if(h!==e){const f=i.current,p=vy(u);e?c("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(h&&f!==p?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,c]),rr(()=>{if(t){let u;const h=t.ownerDocument.defaultView??window,d=p=>{const m=vy(r.current).includes(p.animationName);if(p.target===t&&m&&(c("ANIMATION_END"),!a.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=h.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},f=p=>{p.target===t&&(i.current=vy(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{h.clearTimeout(u),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:g.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function vy(e){return(e==null?void 0:e.animationName)||"none"}function gQ(e){var r,a;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var yQ=gC[" useInsertionEffect ".trim().toString()]||rr;function ba({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[a,i,o]=vQ({defaultProp:t,onChange:n}),l=e!==void 0,c=l?e:a;{const h=g.useRef(e!==void 0);g.useEffect(()=>{const d=h.current;d!==l&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),h.current=l},[l,r])}const u=g.useCallback(h=>{var d;if(l){const f=bQ(h)?h(e):h;f!==e&&((d=o.current)==null||d.call(o,f))}else i(h)},[l,e,i,o]);return[c,u]}function vQ({defaultProp:e,onChange:t}){const[n,r]=g.useState(e),a=g.useRef(n),i=g.useRef(t);return yQ(()=>{i.current=t},[t]),g.useEffect(()=>{var o;a.current!==n&&((o=i.current)==null||o.call(i,n),a.current=n)},[n,a]),[n,r,i]}function bQ(e){return typeof e=="function"}var mF=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),xQ="VisuallyHidden",hw=g.forwardRef((e,t)=>
40s.jsx(we.span,{...e,ref:t,style:{...mF,...e.style}}));hw.displayName=xQ;var wQ=hw,lP="ToastProvider",[cP,_Q,kQ]=ug("Toast"),[gF,oHe]=Hn("Toast",[kQ]),[jQ,fw]=gF(lP),yF=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:a="right",swipeThreshold:i=50,children:o}=e,[l,c]=g.useState(null),[u,h]=g.useState(0),d=g.useRef(!1),f=g.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${lP}\`. Expected non-empty \`string\`.`),s.jsx(cP.Provider,{scope:t,children:s.jsx(jQ,{scope:t,label:n,duration:r,swipeDirection:a,swipeThreshold:i,toastCount:u,viewport:l,onViewportChange:c,onToastAdd:g.useCallback(()=>h(p=>p+1),[]),onToastRemove:g.useCallback(()=>h(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:o})})};yF.displayName=lP;var vF="ToastViewport",SQ=["F8"],lj="toast.viewportPause",cj="toast.viewportResume",bF=g.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=SQ,label:a="Notifications ({hotkey})",...i}=e,o=fw(vF,n),l=_Q(n),c=g.useRef(null),u=g.useRef(null),h=g.useRef(null),d=g.useRef(null),f=Fe(t,d,o.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),y=o.toastCount>0;g.useEffect(()=>{const v=b=>{var w;r.length!==0&&r.every(_=>b[_]||b.code===_)&&((w=d.current)==null||w.focus())};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[r]),g.useEffect(()=>{const v=c.current,b=d.current;if(y&&v&&b){const x=()=>{if(!o.isClosePausedRef.current){const j=new CustomEvent(lj);b.dispatchEvent(j),o.isClosePausedRef.current=!0}},w=()=>{if(o.isClosePausedRef.current){const j=new CustomEvent(cj);b.dispatchEvent(j),o.isClosePausedRef.current=!1}},_=j=>{!v.contains(j.relatedTarget)&&w()},k=()=>{v.contains(document.activeElement)||w()};return v.addEventListener("focusin",x),v.addEventListener("focusout",_),v.addEventListener("pointermove",x),v.addEventListener("pointerleave",k),window.addEventListener("blur",x),window.addEventListener("focus",w),()=>{v.removeEventListener("focusin",x),v.removeEventListener("focusout",_),v.removeEventListener("pointermove",x),v.removeEventListener("pointerleave",k),window.removeEventListener("blur",x),window.removeEventListener("focus",w)}}},[y,o.isClosePausedRef]);const m=g.useCallback(({tabbingDirection:v})=>{const x=l().map(w=>{const _=w.ref.current,k=[_,...LQ(_)];return v==="forwards"?k:k.reverse()});return(v==="forwards"?x.reverse():x).flat()},[l]);return g.useEffect(()=>{const v=d.current;if(v){const b=x=>{var k,j,S;const w=x.altKey||x.ctrlKey||x.metaKey;if(x.key==="Tab"&&!w){const N=document.activeElement,C=x.shiftKey;if(x.target===v&&C){(k=u.current)==null||k.focus();return}const D=m({tabbingDirection:C?"backwards":"forwards"}),$=D.findIndex(R=>R===N);F_(D.slice($+1))?x.preventDefault():C?(j=u.current)==null||j.focus():(S=h.current)==null||S.focus()}};return v.addEventListener("keydown",b),()=>v.removeEventListener("keydown",b)}},[l,m]),s.jsxs(hQ,{ref:c,role:"region","aria-label":a.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:y?void 0:"none"},children:[y&&s.jsx(uj,{ref:u,onFocusFromOutsideViewport:()=>{const v=m({tabbingDirection:"forwards"});F_(v)}}),s.jsx(cP.Slot,{scope:n,children:s.jsx(we.ol,{tabIndex:-1,...i,ref:f})}),y&&s.jsx(uj,{ref:h,onFocusFromOutsideViewport:()=>{const v=m({tabbingDirection:"backwards"});F_(v)}})]})});bF.displayName=vF;var xF="ToastFocusProxy",uj=g.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...a}=e,i=fw(xF,n);return s.jsx(hw,{"aria-hidden":!0,tabIndex:0,...a,ref:t,style:{position:"fixed"},onFocus:o=>{var u;const l=o.relatedTarget;!((u=i.viewport)!=null&&u.contains(l))&&r()}})});uj.displayName=xF;var dg="Toast",NQ="toast.swipeStart",CQ="toast.swipeMove",PQ="toast.swipeCancel",TQ="toast.swipeEnd",wF=g.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:a,onOpenChange:i,...o}=e,[l,c]=ba({prop:r,defaultProp:a??!0,onChange:i,caller:dg});return s.jsx(Vn,{present:n||l,children:s.jsx(OQ,{open:l,...o,ref:t,onClose:()=>c(!1),onPause:In(e.onPause),onResume:In(e.onResume),onSwipeStart:de(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:de(e.onSwipeMove,u=>{const{x:h,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${h}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:de(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:de(e.onSwipeEnd,u=>{const{x:h,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${h}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),c(!1)})})})});wF.displayName=dg;var[AQ,EQ]=gF(dg,{onClose(){}}),OQ=g.forwardRef((e,t)=>
40{const{__scopeToast:n,type:r="foreground",duration:a,open:i,onClose:o,onEscapeKeyDown:l,onPause:c,onResume:u,onSwipeStart:h,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:p,...y}=e,m=fw(dg,n),[v,b]=g.useState(null),x=Fe(t,R=>b(R)),w=g.useRef(null),_=g.useRef(null),k=a||m.duration,j=g.useRef(0),S=g.useRef(k),N=g.useRef(0),{onToastAdd:C,onToastRemove:M}=m,O=In(()=>{var I;(v==null?void 0:v.contains(document.activeElement))&&((I=m.viewport)==null||I.focus()),o()}),D=g.useCallback(R=>{!R||R===1/0||(window.clearTimeout(N.current),j.current=new Date().getTime(),N.current=window.setTimeout(O,R))},[O]);g.useEffect(()=>{const R=m.viewport;if(R){const I=()=>{D(S.current),u==null||u()},P=()=>{const A=new Date().getTime()-j.current;S.current=S.current-A,window.clearTimeout(N.current),c==null||c()};return R.addEventListener(lj,P),R.addEventListener(cj,I),()=>{R.removeEventListener(lj,P),R.removeEventListener(cj,I)}}},[m.viewport,k,c,u,D]),g.useEffect(()=>{i&&!m.isClosePausedRef.current&&D(k)},[i,k,m.isClosePausedRef,D]),g.useEffect(()=>(C(),()=>M()),[C,M]);const $=g.useMemo(()=>v?PF(v):null,[v]);return m.viewport?s.jsxs(s.Fragment,{children:[$&&s.jsx(RQ,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:$}),s.jsx(AQ,{scope:n,onClose:O,children:pu.createPortal(s.jsx(cP.ItemSlot,{scope:n,children:s.jsx(dQ,{asChild:!0,onEscapeKeyDown:de(l,()=>{m.isFocusedToastEscapeKeyDownRef.current||O(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:s.jsx(we.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":m.swipeDirection,...y,ref:x,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:de(e.onKeyDown,R=>{R.key==="Escape"&&(l==null||l(R.nativeEvent),R.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,O()))}),onPointerDown:de(e.onPointerDown,R=>{R.button===0&&(w.current={x:R.clientX,y:R.clientY})}),onPointerMove:de(e.onPointerMove,R=>{if(!w.current)return;const I=R.clientX-w.current.x,P=R.clientY-w.current.y,A=!!_.current,E=["left","right"].includes(m.swipeDirection),T=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,L=E?T(0,I):0,B=E?0:T(0,P),H=R.pointerType==="touch"?10:2,G={x:L,y:B},Z={originalEvent:R,delta:G};A?(_.current=G,by(CQ,d,Z,{discrete:!1})):qE(G,m.swipeDirection,H)?(_.current=G,by(NQ,h,Z,{discrete:!1}),R.target.setPointerCapture(R.pointerId)):(Math.abs(I)>H||Math.abs(P)>H)&&(w.current=null)}),onPointerUp:de(e.onPointerUp,R=>{const I=_.current,P=R.target;if(P.hasPointerCapture(R.pointerId)&&P.releasePointerCapture(R.pointerId),_.current=null,w.current=null,I){const A=R.currentTarget,E={originalEvent:R,delta:I};qE(I,m.swipeDirection,m.swipeThreshold)?by(TQ,p,E,{discrete:!0}):by(PQ,f,E,{discrete:!0}),A.addEventListener("click",T=>T.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),RQ=e=>{const{__scopeToast:t,children:n,...r}=e,a=fw(dg,t),[i,o]=g.useState(!1),[l,c]=g.useState(!1);return DQ(()=>o(!0)),g.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),l?null:s.jsx(Eh,{asChild:!0,children:s.jsx(hw,{...r,children:i&&s.jsxs(s.Fragment,{children:[a.label," ",n]})})})},IQ="ToastTitle",_F=g.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return s.jsx(we.div,{...r,ref:t})});_F.displayName=IQ;var MQ="ToastDescription",kF=g.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return s.jsx(we.div,{...r,ref:t})});kF.displayName=MQ;var jF="ToastAction",SF=g.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?s.jsx(CF,{altText:n,asChild:!0,children:s.jsx(uP,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${jF}\`. Expected non-empty \`string\`.`),null)});SF.displayName=jF;var NF="ToastClose",uP=g.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,a=EQ(NF,n);return s.jsx(CF,{asChild:!0,children:s.jsx(we.button,{type:"button",...r,ref:t,onClick:de(e.onClick,a.onClose)})})});uP.displayName=NF;var CF=g.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...a}=e;return s.jsx(we.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...a,ref:t})});function PF(e){const t=[];
vendor: 6,688 bytes, lines 40-95
40return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),$Q(r)){const a=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!a)if(i){const o=r.dataset.radixToastAnnounceAlt;o&&t.push(o)}else t.push(...PF(r))}}),t}function by(e,t,n,{discrete:r}){const a=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?oP(a,i):a.dispatchEvent(i)}var qE=(e,t,n=0)=>{const r=Math.abs(e.x),a=Math.abs(e.y),i=r>a;return t==="left"||t==="right"?i&&r>n:!i&&a>n};function DQ(e=()=>{}){const t=In(e);rr(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function $Q(e){return e.nodeType===e.ELEMENT_NODE}function LQ(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function F_(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var FQ=yF,TF=bF,AF=wF,EF=_F,OF=kF,RF=SF,IF=uP;function MF(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=MF(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function kt(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=MF(e))&&(r&&(r+=" "),r+=t);return r}const UE=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,zE=kt,pw=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return zE(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:a,defaultVariants:i}=t,o=Object.keys(a).map(u=>{const h=n==null?void 0:n[u],d=i==null?void 0:i[u];if(h===null)return null;const f=UE(h)||UE(d);return a[u][f]}),l=n&&Object.entries(n).reduce((u,h)=>{let[d,f]=h;return f===void 0||(u[d]=f),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,h)=>{let{class:d,className:f,...p}=h;return Object.entries(p).every(y=>{let[m,v]=y;return Array.isArray(v)?v.includes({...i,...l}[m]):{...i,...l}[m]===v})?[...u,d,f]:u},[]);return zE(e,o,c,n==null?void 0:n.class,n==null?void 0:n.className)};/**
41 * @license lucide-react v0.462.0 - ISC
42 *
43 * This source code is licensed under the ISC license.
44 * See the LICENSE file in the root directory of this source tree.
45 */const BQ=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),DF=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
46 * @license lucide-react v0.462.0 - ISC
47 *
48 * This source code is licensed under the ISC license.
49 * See the LICENSE file in the root directory of this source tree.
50 */var WQ={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
51 * @license lucide-react v0.462.0 - ISC
52 *
53 * This source code is licensed under the ISC license.
54 * See the LICENSE file in the root directory of this source tree.
55 */const qQ=g.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:i,iconNode:o,...l},c)=>g.createElement("svg",{ref:c,...WQ,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:DF("lucide",a),...l},[...o.map(([u,h])=>g.createElement(u,h)),...Array.isArray(i)?i:[i]]));/**
56 * @license lucide-react v0.462.0 - ISC
57 *
58 * This source code is licensed under the ISC license.
59 * See the LICENSE file in the root directory of this source tree.
60 */const ie=(e,t)=>{const n=g.forwardRef(({className:r,...a},i)=>g.createElement(qQ,{ref:i,iconNode:t,className:DF(`lucide-${BQ(e)}`,r),...a}));return n.displayName=`${e}`,n};/**
61 * @license lucide-react v0.462.0 - ISC
62 *
63 * This source code is licensed under the ISC license.
64 * See the LICENSE file in the root directory of this source tree.
65 */const Lc=ie("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
66 * @license lucide-react v0.462.0 - ISC
67 *
68 * This source code is licensed under the ISC license.
69 * See the LICENSE file in the root directory of this source tree.
70 */const Sr=ie("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
71 * @license lucide-react v0.462.0 - ISC
72 *
73 * This source code is licensed under the ISC license.
74 * See the LICENSE file in the root directory of this source tree.
75 */const UQ=ie("ArrowUpDown",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);/**
76 * @license lucide-react v0.462.0 - ISC
77 *
78 * This source code is licensed under the ISC license.
79 * See the LICENSE file in the root directory of this source tree.
80 */const dP=ie("BedDouble",[["path",{d:"M2 20v-8a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v8",key:"1k78r4"}],["path",{d:"M4 10V6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v4",key:"fb3tl2"}],["path",{d:"M12 4v6",key:"1dcgq2"}],["path",{d:"M2 18h20",key:"ajqnye"}]]);/**
81 * @license lucide-react v0.462.0 - ISC
82 *
83 * This source code is licensed under the ISC license.
84 * See the LICENSE file in the root directory of this source tree.
85 */const zQ=ie("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/**
86 * @license lucide-react v0.462.0 - ISC
87 *
88 * This source code is licensed under the ISC license.
89 * See the LICENSE file in the root directory of this source tree.
90 */const fc=ie("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
91 * @license lucide-react v0.462.0 - ISC
92 *
93 * This source code is licensed under the ISC license.
94 * See the LICENSE file in the root directory of this source tree.
95 */const HE=ie("BrainCircuit",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M9 13a4.5 4.5 0 0 0 3-4",key:"10igwf"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M12 13h4",key:"1ku699"}],["path",{d:"M12 18h6a2 2 0 0 1 2 2v1",key:"105ag5"}],["path",{d:"M12 8h8",key:"1lhi5i"}
95],["path",{d:"M16 8V5a2 2 0 0 1 2-2",key:"u6izg6"}],["circle",{cx:"16",cy:"13",r:".5",key:"ry7gng"}],["circle",{cx:"18",cy:"3",r:".5",key:"1aiba7"}],["circle",{cx:"20",cy:"21",r:".5",key:"yhc1fs"}],["circle",{cx:"20",cy:"8",r:".5",key:"1e43v0"}]]);/**
96 * @license lucide-react v0.462.0 - ISC
97 *
98 * This source code is licensed under the ISC license.
99 * See the LICENSE file in the root directory of this source tree.
100 */const Ms=ie("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/**
101 * @license lucide-react v0.462.0 - ISC
102 *
103 * This source code is licensed under the ISC license.
104 * See the LICENSE file in the root directory of this source tree.
105 */const mw=ie("Briefcase",[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]]);/**
106 * @license lucide-react v0.462.0 - ISC
107 *
108 * This source code is licensed under the ISC license.
109 * See the LICENSE file in the root directory of this source tree.
110 */const gi=ie("Building2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
111 * @license lucide-react v0.462.0 - ISC
112 *
113 * This source code is licensed under the ISC license.
114 * See the LICENSE file in the root directory of this source tree.
115 */const HQ=ie("Calculator",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",key:"1nb95v"}],["line",{x1:"8",x2:"16",y1:"6",y2:"6",key:"x4nwl0"}],["line",{x1:"16",x2:"16",y1:"14",y2:"18",key:"wjye3r"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M8 18h.01",key:"lrp35t"}]]);/**
116 * @license lucide-react v0.462.0 - ISC
117 *
118 * This source code is licensed under the ISC license.
119 * See the LICENSE file in the root directory of this source tree.
120 */const ki=ie("CalendarDays",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]]);/**
121 * @license lucide-react v0.462.0 - ISC
122 *
123 * This source code is licensed under the ISC license.
124 * See the LICENSE file in the root directory of this source tree.
125 */const $F=ie("CalendarPlus",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 13V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h8",key:"3spt84"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M16 19h6",key:"xwg31i"}],["path",{d:"M19 16v6",key:"tddt3s"}]]);/**
126 * @license lucide-react v0.462.0 - ISC
127 *
128 * This source code is licensed under the ISC license.
129 * See the LICENSE file in the root directory of this source tree.
130 */const Mn=ie("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
131 * @license lucide-react v0.462.0 - ISC
132 *
133 * This source code is licensed under the ISC license.
134 * See the LICENSE file in the root directory of this source tree.
135 */const Oh=ie("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
136 * @license lucide-react v0.462.0 - ISC
137 *
138 * This source code is licensed under the ISC license.
139 * See the LICENSE file in the root directory of this source tree.
140 */const gd=ie("ChartLine",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]]);/**
141 * @license lucide-react v0.462.0 - ISC
142 *
143 * This source code is licensed under the ISC license.
144 * See the LICENSE file in the root directory of this source tree.
145 */const $t=ie("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
146 * @license lucide-react v0.462.0 - ISC
147 *
148 * This source code is licensed under the ISC license.
149 * See the LICENSE file in the root directory of this source tree.
150 */const gu=ie("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
151 * @license lucide-react v0.462.0 - ISC
152 *
153 * This source code is licensed under the ISC license.
154 * See the LICENSE file in the root directory of this source tree.
155 */const Kc=ie("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
156 * @license lucide-react v0.462.0 - ISC
157 *
158 * This source code is licensed under the ISC license.
159 * See the LICENSE file in the root directory of this source tree.
160 */const Ma=ie("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
161 * @license lucide-react v0.462.0 - ISC
162 *
163 * This source code is licensed under the ISC license.
164 * See the LICENSE file in the root directory of this source tree.
165 */const gw=ie("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
166 * @license lucide-react v0.462.0 - ISC
167 *
168 * This source code is licensed under the ISC license.
169 * See the LICENSE file in the root directory of this source tree.
170 */const Ai=ie("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
171 * @license lucide-react v0.462.0 - ISC
172 *
173 * This source code is licensed under the ISC license.
174 * See the LICENSE file in the root directory of this source tree.
175 */const Xd=ie("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
176 * @license lucide-react v0.462.0 - ISC
177 *
178 * This source code is licensed under the ISC license.
179 * See the LICENSE file in the root directory of this source tree.
180 */const ls=ie("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
181 * @license lucide-react v0.462.0 - ISC
182 *
183 * This source code is licensed under the ISC license.
184 * See the LICENSE file in the root directory of this source tree.
185 */const LF=ie("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
186 * @license lucide-react v0.462.0 - ISC
187 *
188 * This source code is licensed under the ISC license.
189 * See the LICENSE file in the root directory of this source tree.
190 */const Rh=ie("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
191 * @license lucide-react v0.462.0 - ISC
192 *
193 * This source code is licensed under the ISC license.
194 * See the LICENSE file in the root directory of this source tree.
195 */const FF=ie("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
196 * @license lucide-react v0.462.0 - ISC
197 *
198 * This source code is licensed under the ISC license.
199 * See the LICENSE file in the root directory of this source tree.
200 */const VE=ie("ClipboardCheck",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"m9 14 2 2 4-4",key:"df797q"}]]);/**
201 * @license lucide-react v0.462.0 - ISC
202 *
203 * This source code is licensed under the ISC license.
204 * See the LICENSE file in the root directory of this source tree.
205 */const VQ=ie("ClipboardList",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]]);/**
206 * @license lucide-react v0.462.0 - ISC
207 *
208 * This source code is licensed under the ISC license.
209 * See the LICENSE file in the root directory of this source tree.
210 */const pr=ie("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
211 * @license lucide-react v0.462.0 - ISC
212 *
213 * This source code is licensed under the ISC license.
214 * See the LICENSE file in the root directory of this source tree.
215 */const GQ=ie("Compass",[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
216 * @license lucide-react v0.462.0 - ISC
217 *
218 * This source code is licensed under the ISC license.
219 * See the LICENSE file in the root directory of this source tree.
220 */const Rl=ie("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
221 * @license lucide-react v0.462.0 - ISC
222 *
223 * This source code is licensed under the ISC license.
224 * See the LICENSE file in the root directory of this source tree.
225 */const dj=ie("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);/**
226 * @license lucide-react v0.462.0 - ISC
227 *
228 * This source code is licensed under the ISC license.
229 * See the LICENSE file in the root directory of this source tree.
230 */const YQ=ie("Crop",[["path",{d:"M6 2v14a2 2 0 0 0 2 2h14",key:"ron5a4"}],["path",{d:"M18 22V8a2 2 0 0 0-2-2H2",key:"7s9ehn"}]]);/**
231 * @license lucide-react v0.462.0 - ISC
232 *
233 * This source code is licensed under the ISC license.
234 * See the LICENSE file in the root directory of this source tree.
235 */const hP=ie("Crown",[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]]);/**
236 * @license lucide-react v0.462.0 - ISC
237 *
238 * This source code is licensed under the ISC license.
239 * See the LICENSE file in the root directory of this source tree.
240 */const GE=ie("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
241 * @license lucide-react v0.462.0 - ISC
242 *
243 * This source code is licensed under the ISC license.
244 * See the LICENSE file in the root directory of this source tree.
245 */const to=ie("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);/**
246 * @license lucide-react v0.462.0 - ISC
247 *
248 * This source code is licensed under the ISC license.
249 * See the LICENSE file in the root directory of this source tree.
250 */const KQ=ie("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
251 * @license lucide-react v0.462.0 - ISC
252 *
253 * This source code is licensed under the ISC license.
254 * See the LICENSE file in the root directory of this source tree.
255 */const BF=ie("Dumbbell",[["path",{d:"M14.4 14.4 9.6 9.6",key:"ic80wn"}],["path",{d:"M18.657 21.485a2 2 0 1 1-2.829-2.828l-1.767 1.768a2 2 0 1 1-2.829-2.829l6.364-6.364a2 2 0 1 1 2.829 2.829l-1.768 1.767a2 2 0 1 1 2.828 2.829z",key:"nnl7wr"}],["path",{d:"m21.5 21.5-1.4-1.4",key:"1f1ice"}],["path",{d:"M3.9 3.9 2.5 2.5",key:"1evmna"}],["path",{d:"M6.404 12.768a2 2 0 1 1-2.829-2.829l1.768-1.767a2 2 0 1 1-2.828-2.829l2.828-2.828a2 2 0 1 1 2.829 2.828l1.767-1.768a2 2 0 1 1 2.829 2.829z",key:"yhosts"}]]);/**
256 * @license lucide-react v0.462.0 - ISC
257 *
258 * This source code is licensed under the ISC license.
259 * See the LICENSE file in the root directory of this source tree.
260 */const WF=ie("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
261 * @license lucide-react v0.462.0 - ISC
262 *
263 * This source code is licensed under the ISC license.
264 * See the LICENSE file in the root directory of this source tree.
265 */const XQ=ie("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
266 * @license lucide-react v0.462.0 - ISC
267 *
268 * This source code is licensed under the ISC license.
269 * See the LICENSE file in the root directory of this source tree.
270 */const Ei=ie("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
271 * @license lucide-react v0.462.0 - ISC
272 *
273 * This source code is licensed under the ISC license.
274 * See the LICENSE file in the root directory of this source tree.
275 */const fP=ie("Facebook",[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]]);/**
276 * @license lucide-react v0.462.0 - ISC
277 *
278 * This source code is licensed under the ISC license.
279 * See the LICENSE file in the root directory of this source tree.
280 */const QQ=ie("FilePen",[["path",{d:"M12.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v9.5",key:"1couwa"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M13.378 15.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"1y4qbx"}]]);/**
281 * @license lucide-react v0.462.0 - ISC
282 *
283 * This source code is licensed under the ISC license.
284 * See the LICENSE file in the root directory of this source tree.
285 */const dr=ie("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
286 * @license lucide-react v0.462.0 - ISC
287 *
288 * This source code is licensed under the ISC license.
289 * See the LICENSE file in the root directory of this source tree.
290 */const JQ=ie("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/**
291 * @license lucide-react v0.462.0 - ISC
292 *
293 * This source code is licensed under the ISC license.
294 * See the LICENSE file in the root directory of this source tree.
295 */const ZQ=ie("Flame",[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]]);/**
296 * @license lucide-react v0.462.0 - ISC
297 *
298 * This source code is licensed under the ISC license.
299 * See the LICENSE file in the root directory of this source tree.
300 */const qF=ie("FlaskConical",[["path",{d:"M10 2v7.527a2 2 0 0 1-.211.896L4.72 20.55a1 1 0 0 0 .9 1.45h12.76a1 1 0 0 0 .9-1.45l-5.069-10.127A2 2 0 0 1 14 9.527V2",key:"pzvekw"}],["path",{d:"M8.5 2h7",key:"csnxdl"}],["path",{d:"M7 16h10",key:"wp8him"}]]);/**
301 * @license lucide-react v0.462.0 - ISC
302 *
303 * This source code is licensed under the ISC license.
304 * See the LICENSE file in the root directory of this source tree.
305 */const eJ=ie("Gift",[["rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",key:"bkv52"}],["path",{d:"M12 8v13",key:"1c76mn"}],["path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",key:"6wjy6b"}],["path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",key:"1ihvrl"}]]);/**
306 * @license lucide-react v0.462.0 - ISC
307 *
308 * This source code is licensed under the ISC license.
309 * See the LICENSE file in the root directory of this source tree.
310 */const Xc=ie("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
311 * @license lucide-react v0.462.0 - ISC
312 *
313 * This source code is licensed under the ISC license.
314 * See the LICENSE file in the root directory of this source tree.
315 */const oi=ie("GraduationCap",[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]]);/**
316 * @license lucide-react v0.462.0 - ISC
317 *
318 * This source code is licensed under the ISC license.
319 * See the LICENSE file in the root directory of this source tree.
320 */const tJ=ie("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
321 * @license lucide-react v0.462.0 - ISC
322 *
323 * This source code is licensed under the ISC license.
324 * See the LICENSE file in the root directory of this source tree.
325 */const pP=ie("Hammer",[["path",{d:"m15 12-8.373 8.373a1 1 0 1 1-3-3L12 9",key:"eefl8a"}],["path",{d:"m18 15 4-4",key:"16gjal"}],["path",{d:"m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172V7l-2.26-2.26a6 6 0 0 0-4.202-1.756L9 2.96l.92.82A6.18 6.18 0 0 1 12 8.4V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5",key:"b7pghm"}]]);/**
326 * @license lucide-react v0.462.0 - ISC
327 *
328 * This source code is licensed under the ISC license.
329 * See the LICENSE file in the root directory of this source tree.
330 */const yi=ie("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/**
331 * @license lucide-react v0.462.0 - ISC
332 *
333 * This source code is licensed under the ISC license.
334 * See the LICENSE file in the root directory of this source tree.
335 */const hj=ie("ImagePlus",[["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M19 2v6",key:"4bpg5p"}],["path",{d:"M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5",key:"1ue2ih"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}]]);/**
336 * @license lucide-react v0.462.0 - ISC
337 *
338 * This source code is licensed under the ISC license.
339 * See the LICENSE file in the root directory of this source tree.
340 */const yw=ie("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/**
341 * @license lucide-react v0.462.0 - ISC
342 *
343 * This source code is licensed under the ISC license.
344 * See the LICENSE file in the root directory of this source tree.
345 */const UF=ie("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
346 * @license lucide-react v0.462.0 - ISC
347 *
348 * This source code is licensed under the ISC license.
349 * See the LICENSE file in the root directory of this source tree.
350 */const mP=ie("Instagram",[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"2e1cvw"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"9exkf1"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"r4j83e"}]]);/**
351 * @license lucide-react v0.462.0 - ISC
352 *
353 * This source code is licensed under the ISC license.
354 * See the LICENSE file in the root directory of this source tree.
355 */const vw=ie("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/**
356 * @license lucide-react v0.462.0 - ISC
357 *
358 * This source code is licensed under the ISC license.
359 * See the LICENSE file in the root directory of this source tree.
360 */const nJ=ie("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/**
361 * @license lucide-react v0.462.0 - ISC
362 *
363 * This source code is licensed under the ISC license.
364 * See the LICENSE file in the root directory of this source tree.
365 */const gP=ie("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/**
366 * @license lucide-react v0.462.0 - ISC
367 *
368 * This source code is licensed under the ISC license.
369 * See the LICENSE file in the root directory of this source tree.
370 */const yP=ie("LayoutGrid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);/**
371 * @license lucide-react v0.462.0 - ISC
372 *
373 * This source code is licensed under the ISC license.
374 * See the LICENSE file in the root directory of this source tree.
375 */const rJ=ie("LayoutTemplate",[["rect",{width:"18",height:"7",x:"3",y:"3",rx:"1",key:"f1a2em"}],["rect",{width:"9",height:"7",x:"3",y:"14",rx:"1",key:"jqznyg"}],["rect",{width:"5",height:"7",x:"16",y:"14",rx:"1",key:"q5h2i8"}]]);/**
376 * @license lucide-react v0.462.0 - ISC
377 *
378 * This source code is licensed under the ISC license.
379 * See the LICENSE file in the root directory of this source tree.
380 */const zF=ie("Library",[["path",{d:"m16 6 4 14",key:"ji33uf"}],["path",{d:"M12 6v14",key:"1n7gus"}
380],["path",{d:"M8 8v12",key:"1gg7y9"}],["path",{d:"M4 4v16",key:"6qkkli"}]]);/**
381 * @license lucide-react v0.462.0 - ISC
382 *
383 * This source code is licensed under the ISC license.
384 * See the LICENSE file in the root directory of this source tree.
385 */const qp=ie("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/**
386 * @license lucide-react v0.462.0 - ISC
387 *
388 * This source code is licensed under the ISC license.
389 * See the LICENSE file in the root directory of this source tree.
390 */const yd=ie("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/**
391 * @license lucide-react v0.462.0 - ISC
392 *
393 * This source code is licensed under the ISC license.
394 * See the LICENSE file in the root directory of this source tree.
395 */const aJ=ie("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);/**
396 * @license lucide-react v0.462.0 - ISC
397 *
398 * This source code is licensed under the ISC license.
399 * See the LICENSE file in the root directory of this source tree.
400 */const vP=ie("Linkedin",[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]]);/**
401 * @license lucide-react v0.462.0 - ISC
402 *
403 * This source code is licensed under the ISC license.
404 * See the LICENSE file in the root directory of this source tree.
405 */const sJ=ie("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/**
406 * @license lucide-react v0.462.0 - ISC
407 *
408 * This source code is licensed under the ISC license.
409 * See the LICENSE file in the root directory of this source tree.
410 */const ce=ie("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
411 * @license lucide-react v0.462.0 - ISC
412 *
413 * This source code is licensed under the ISC license.
414 * See the LICENSE file in the root directory of this source tree.
415 */const iJ=ie("LockOpen",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 9.9-1",key:"1mm8w8"}]]);/**
416 * @license lucide-react v0.462.0 - ISC
417 *
418 * This source code is licensed under the ISC license.
419 * See the LICENSE file in the root directory of this source tree.
420 */const kl=ie("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
421 * @license lucide-react v0.462.0 - ISC
422 *
423 * This source code is licensed under the ISC license.
424 * See the LICENSE file in the root directory of this source tree.
425 */const fj=ie("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
426 * @license lucide-react v0.462.0 - ISC
427 *
428 * This source code is licensed under the ISC license.
429 * See the LICENSE file in the root directory of this source tree.
430 */const bw=ie("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
431 * @license lucide-react v0.462.0 - ISC
432 *
433 * This source code is licensed under the ISC license.
434 * See the LICENSE file in the root directory of this source tree.
435 */const bP=ie("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
436 * @license lucide-react v0.462.0 - ISC
437 *
438 * This source code is licensed under the ISC license.
439 * See the LICENSE file in the root directory of this source tree.
440 */const pj=ie("Megaphone",[["path",{d:"m3 11 18-5v12L3 14v-3z",key:"n962bs"}],["path",{d:"M11.6 16.8a3 3 0 1 1-5.8-1.6",key:"1yl0tm"}]]);/**
441 * @license lucide-react v0.462.0 - ISC
442 *
443 * This source code is licensed under the ISC license.
444 * See the LICENSE file in the root directory of this source tree.
445 */const HF=ie("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
446 * @license lucide-react v0.462.0 - ISC
447 *
448 * This source code is licensed under the ISC license.
449 * See the LICENSE file in the root directory of this source tree.
450 */const oJ=ie("MessageCircleQuestion",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
451 * @license lucide-react v0.462.0 - ISC
452 *
453 * This source code is licensed under the ISC license.
454 * See the LICENSE file in the root directory of this source tree.
455 */const Qd=ie("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/**
456 * @license lucide-react v0.462.0 - ISC
457 *
458 * This source code is licensed under the ISC license.
459 * See the LICENSE file in the root directory of this source tree.
460 */const lJ=ie("MessageSquareText",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}],["path",{d:"M13 8H7",key:"14i4kc"}],["path",{d:"M17 12H7",key:"16if0g"}]]);/**
461 * @license lucide-react v0.462.0 - ISC
462 *
463 * This source code is licensed under the ISC license.
464 * See the LICENSE file in the root directory of this source tree.
465 */const cJ=ie("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
466 * @license lucide-react v0.462.0 - ISC
467 *
468 * This source code is licensed under the ISC license.
469 * See the LICENSE file in the root directory of this source tree.
470 */const uJ=ie("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
471 * @license lucide-react v0.462.0 - ISC
472 *
473 * This source code is licensed under the ISC license.
474 * See the LICENSE file in the root directory of this source tree.
475 */const dJ=ie("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
476 * @license lucide-react v0.462.0 - ISC
477 *
478 * This source code is licensed under the ISC license.
479 * See the LICENSE file in the root directory of this source tree.
480 */const li=ie("MousePointerClick",[["path",{d:"M14 4.1 12 6",key:"ita8i4"}],["path",{d:"m5.1 8-2.9-.8",key:"1go3kf"}],["path",{d:"m6 12-1.9 2",key:"mnht97"}],["path",{d:"M7.2 2.2 8 5.1",key:"1cfko1"}],["path",{d:"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.
480074z",key:"s0h3yz"}]]);/**
481 * @license lucide-react v0.462.0 - ISC
482 *
483 * This source code is licensed under the ISC license.
484 * See the LICENSE file in the root directory of this source tree.
485 */const hJ=ie("Newspaper",[["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2Zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2",key:"7pis2x"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M10 6h8v4h-8V6Z",key:"smlsk5"}]]);/**
486 * @license lucide-react v0.462.0 - ISC
487 *
488 * This source code is licensed under the ISC license.
489 * See the LICENSE file in the root directory of this source tree.
490 */const YE=ie("Palette",[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]]);/**
491 * @license lucide-react v0.462.0 - ISC
492 *
493 * This source code is licensed under the ISC license.
494 * See the LICENSE file in the root directory of this source tree.
495 */const hg=ie("PartyPopper",[["path",{d:"M5.8 11.3 2 22l10.7-3.79",key:"gwxi1d"}],["path",{d:"M4 3h.01",key:"1vcuye"}],["path",{d:"M22 8h.01",key:"1mrtc2"}],["path",{d:"M15 2h.01",key:"1cjtqr"}],["path",{d:"M22 20h.01",key:"1mrys2"}],["path",{d:"m22 2-2.24.75a2.9 2.9 0 0 0-1.96 3.12c.1.86-.57 1.63-1.45 1.63h-.38c-.86 0-1.6.6-1.76 1.44L14 10",key:"hbicv8"}],["path",{d:"m22 13-.82-.33c-.86-.34-1.82.2-1.98 1.11c-.11.7-.72 1.22-1.43 1.22H17",key:"1i94pl"}],["path",{d:"m11 2 .33.82c.34.86-.2 1.82-1.11 1.98C9.52 4.9 9 5.52 9 6.23V7",key:"1cofks"}],["path",{d:"M11 13c1.93 1.93 2.83 4.17 2 5-.83.83-3.07-.07-5-2-1.93-1.93-2.83-4.17-2-5 .83-.83 3.07.07 5 2Z",key:"4kbmks"}]]);/**
496 * @license lucide-react v0.462.0 - ISC
497 *
498 * This source code is licensed under the ISC license.
499 * See the LICENSE file in the root directory of this source tree.
500 */const fJ=ie("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);/**
501 * @license lucide-react v0.462.0 - ISC
502 *
503 * This source code is licensed under the ISC license.
504 * See the LICENSE file in the root directory of this source tree.
505 */const fg=ie("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);/**
506 * @license lucide-react v0.462.0 - ISC
507 *
508 * This source code is licensed under the ISC license.
509 * See the LICENSE file in the root directory of this source tree.
510 */const xw=ie("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
511 * @license lucide-react v0.462.0 - ISC
512 *
513 * This source code is licensed under the ISC license.
514 * See the LICENSE file in the root directory of this source tree.
515 */const pJ=ie("Percent",[["line",{x1:"19",x2:"5",y1:"5",y2:"19",key:"1x9vlm"}],["circle",{cx:"6.5",cy:"6.5",r:"2.5",key:"4mh3h7"}],["circle",{cx:"17.5",cy:"17.5",r:"2.5",key:"1mdrzq"}]]);/**
516 * @license lucide-react v0.462.0 - ISC
517 *
518 * This source code is licensed under the ISC license.
519 * See the LICENSE file in the root directory of this source tree.
520 */const mJ=ie("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
521 * @license lucide-react v0.462.0 - ISC
522 *
523 * This source code is licensed under the ISC license.
524 * See the LICENSE file in the root directory of this source tree.
525 */const pg=ie("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
526 * @license lucide-react v0.462.0 - ISC
527 *
528 * This source code is licensed under the ISC license.
529 * See the LICENSE file in the root directory of this source tree.
530 */const Bt=ie("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
531 * @license lucide-react v0.462.0 - ISC
532 *
533 * This source code is licensed under the ISC license.
534 * See the LICENSE file in the root directory of this source tree.
535 */const Qc=ie("Repeat",[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}]]);/**
536 * @license lucide-react v0.462.0 - ISC
537 *
538 * This source code is licensed under the ISC license.
539 * See the LICENSE file in the root directory of this source tree.
540 */const db=ie("Rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3
540kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]);/**
541 * @license lucide-react v0.462.0 - ISC
542 *
543 * This source code is licensed under the ISC license.
544 * See the LICENSE file in the root directory of this source tree.
545 */const ri=ie("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
546 * @license lucide-react v0.462.0 - ISC
547 *
548 * This source code is licensed under the ISC license.
549 * See the LICENSE file in the root directory of this source tree.
550 */const gJ=ie("Scissors",[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M8.12 8.12 12 12",key:"1alkpv"}],["path",{d:"M20 4 8.12 15.88",key:"xgtan2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M14.8 14.8 20 20",key:"ptml3r"}]]);/**
551 * @license lucide-react v0.462.0 - ISC
552 *
553 * This source code is licensed under the ISC license.
554 * See the LICENSE file in the root directory of this source tree.
555 */const Jd=ie("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
556 * @license lucide-react v0.462.0 - ISC
557 *
558 * This source code is licensed under the ISC license.
559 * See the LICENSE file in the root directory of this source tree.
560 */const ji=ie("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
561 * @license lucide-react v0.462.0 - ISC
562 *
563 * This source code is licensed under the ISC license.
564 * See the LICENSE file in the root directory of this source tree.
565 */const VF=ie("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);/**
566 * @license lucide-react v0.462.0 - ISC
567 *
568 * This source code is licensed under the ISC license.
569 * See the LICENSE file in the root directory of this source tree.
570 */const xP=ie("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
571 * @license lucide-react v0.462.0 - ISC
572 *
573 * This source code is licensed under the ISC license.
574 * See the LICENSE file in the root directory of this source tree.
575 */const GF=ie("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/**
576 * @license lucide-react v0.462.0 - ISC
577 *
578 * This source code is licensed under the ISC license.
579 * See the LICENSE file in the root directory of this source tree.
580 */const ww=ie("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
581 * @license lucide-react v0.462.0 - ISC
582 *
583 * This source code is licensed under the ISC license.
584 * See the LICENSE file in the root directory of this source tree.
585 */const Ea=ie("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",ke
585y:"oel41y"}]]);/**
586 * @license lucide-react v0.462.0 - ISC
587 *
588 * This source code is licensed under the ISC license.
589 * See the LICENSE file in the root directory of this source tree.
590 */const yJ=ie("ShoppingCart",[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]]);/**
591 * @license lucide-react v0.462.0 - ISC
592 *
593 * This source code is licensed under the ISC license.
594 * See the LICENSE file in the root directory of this source tree.
595 */const Se=ie("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
596 * @license lucide-react v0.462.0 - ISC
597 *
598 * This source code is licensed under the ISC license.
599 * See the LICENSE file in the root directory of this source tree.
600 */const vd=ie("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/**
601 * @license lucide-react v0.462.0 - ISC
602 *
603 * This source code is licensed under the ISC license.
604 * See the LICENSE file in the root directory of this source tree.
605 */const YF=ie("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
606 * @license lucide-react v0.462.0 - ISC
607 *
608 * This source code is licensed under the ISC license.
609 * See the LICENSE file in the root directory of this source tree.
610 */const yc=ie("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);/**
611 * @license lucide-react v0.462.0 - ISC
612 *
613 * This source code is licensed under the ISC license.
614 * See the LICENSE file in the root directory of this source tree.
615 */const Jc=ie("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
616 * @license lucide-react v0.462.0 - ISC
617 *
618 * This source code is licensed under the ISC license.
619 * See the LICENSE file in the root directory of this source tree.
620 */const vn=ie("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/**
621 * @license lucide-react v0.462.0 - ISC
622 *
623 * This source code is licensed under the ISC license.
624 * See the LICENSE file in the root directory of this source tree.
625 */const Bs=ie("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
626 * @license lucide-react v0.462.0 - ISC
627 *
628 * This source code is licensed under the ISC license.
629 * See the LICENSE file in the root directory of this source tree.
630 */const vJ=ie("Unlink",[["path",{d:"m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71",key:"yqzxt4"}],["path",{d:"m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71",key:"4qinb0"}],["line",{x1:"8",x2:"8",y1:"2",y2:"5",key:"1041cp"}],["line",{x1:"2",x2:"5",y1:"8",y2:"8",key:"14m1p5"}],["line",{x1:"16",x2:"16",y1:"19",y2:"22",key:"rzdirn"}],["line",{x1:"19",x2:"22",y1:"16",y2:"16",key:"ox905f"}]]);/**
631 * @license lucide-react v0.462.0 - ISC
632 *
633 * This source code is licensed under the ISC license.
634 * See the LICENSE file in the root directory of this source tree.
635 */const bJ=ie("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
636 * @license lucide-react v0.462.0 - ISC
637 *
638 * This source code is licensed under the ISC license.
639 * See the LICENSE file in the root directory of this source tree.
640 */const xJ=ie("UserCheck",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}
vendor: 4,114 bytes, lines 640-685
640],["polyline",{points:"16 11 18 13 22 9",key:"1pwet4"}]]);/**
641 * @license lucide-react v0.462.0 - ISC
642 *
643 * This source code is licensed under the ISC license.
644 * See the LICENSE file in the root directory of this source tree.
645 */const mj=ie("UserPlus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);/**
646 * @license lucide-react v0.462.0 - ISC
647 *
648 * This source code is licensed under the ISC license.
649 * See the LICENSE file in the root directory of this source tree.
650 */const Si=ie("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
651 * @license lucide-react v0.462.0 - ISC
652 *
653 * This source code is licensed under the ISC license.
654 * See the LICENSE file in the root directory of this source tree.
655 */const Wn=ie("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
656 * @license lucide-react v0.462.0 - ISC
657 *
658 * This source code is licensed under the ISC license.
659 * See the LICENSE file in the root directory of this source tree.
660 */const _w=ie("UtensilsCrossed",[["path",{d:"m16 2-2.3 2.3a3 3 0 0 0 0 4.2l1.8 1.8a3 3 0 0 0 4.2 0L22 8",key:"n7qcjb"}],["path",{d:"M15 15 3.3 3.3a4.2 4.2 0 0 0 0 6l7.3 7.3c.7.7 2 .7 2.8 0L15 15Zm0 0 7 7",key:"d0u48b"}],["path",{d:"m2.1 21.8 6.4-6.3",key:"yn04lh"}],["path",{d:"m19 5-7 7",key:"194lzd"}]]);/**
661 * @license lucide-react v0.462.0 - ISC
662 *
663 * This source code is licensed under the ISC license.
664 * See the LICENSE file in the root directory of this source tree.
665 */const KF=ie("Video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);/**
666 * @license lucide-react v0.462.0 - ISC
667 *
668 * This source code is licensed under the ISC license.
669 * See the LICENSE file in the root directory of this source tree.
670 */const Up=ie("WandSparkles",[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]]);/**
671 * @license lucide-react v0.462.0 - ISC
672 *
673 * This source code is licensed under the ISC license.
674 * See the LICENSE file in the root directory of this source tree.
675 */const wJ=ie("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/**
676 * @license lucide-react v0.462.0 - ISC
677 *
678 * This source code is licensed under the ISC license.
679 * See the LICENSE file in the root directory of this source tree.
680 */const Br=ie("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
681 * @license lucide-react v0.462.0 - ISC
682 *
683 * This source code is licensed under the ISC license.
684 * See the LICENSE file in the root directory of this source tree.
685 */const Tn=ie("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),wP="-",_J=e=>{const t=jJ(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const l=o.split(wP);return l[0]===""&&l.length!==1&&l.shift(),XF(l,t)||kJ(o)},getConflictingClassGroupIds:(o,l)=>{const c=n[o]||[];return l&&r[o]?[...c,...r[o]]:c}}},XF=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),a=r?XF(e.slice(1),r):void 0;if(a)return a;
vendor: 4,447 bytes, line 685
685if(t.validators.length===0)return;const i=e.join(wP);return(o=t.validators.find(({validator:l})=>l(i)))==null?void 0:o.classGroupId},KE=/^\[(.+)\]$/,kJ=e=>{if(KE.test(e)){const t=KE.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},jJ=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return NJ(Object.entries(e.classGroups),n).forEach(([i,o])=>{gj(o,r,i,t)}),r},gj=(e,t,n,r)=>{e.forEach(a=>{if(typeof a=="string"){const i=a===""?t:XE(t,a);i.classGroupId=n;return}if(typeof a=="function"){if(SJ(a)){gj(a(r),t,n,r);return}t.validators.push({validator:a,classGroupId:n});return}Object.entries(a).forEach(([i,o])=>{gj(o,XE(t,i),n,r)})})},XE=(e,t)=>{let n=e;return t.split(wP).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},SJ=e=>e.isThemeGetter,NJ=(e,t)=>t?e.map(([n,r])=>{const a=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,l])=>[t+o,l])):i);return[n,a]}):e,CJ=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const a=(i,o)=>{n.set(i,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let o=n.get(i);if(o!==void 0)return o;if((o=r.get(i))!==void 0)return a(i,o),o},set(i,o){n.has(i)?n.set(i,o):a(i,o)}}},QF="!",PJ=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,a=t[0],i=t.length,o=l=>{const c=[];let u=0,h=0,d;for(let v=0;v<l.length;v++){let b=l[v];if(u===0){if(b===a&&(r||l.slice(v,v+i)===t)){c.push(l.slice(h,v)),h=v+i;continue}if(b==="/"){d=v;continue}}b==="["?u++:b==="]"&&u--}const f=c.length===0?l:l.substring(h),p=f.startsWith(QF),y=p?f.substring(1):f,m=d&&d>h?d-h:void 0;return{modifiers:c,hasImportantModifier:p,baseClassName:y,maybePostfixModifierPosition:m}};return n?l=>n({className:l,parseClassName:o}):o},TJ=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},AJ=e=>({cache:CJ(e.cacheSize),parseClassName:PJ(e),..._J(e)}),EJ=/\s+/,OJ=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a}=t,i=[],o=e.trim().split(EJ);let l="";for(let c=o.length-1;c>=0;c-=1){const u=o[c],{modifiers:h,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(u);let y=!!p,m=r(y?f.substring(0,p):f);if(!m){if(!y){l=u+(l.length>0?" "+l:l);continue}if(m=r(f),!m){l=u+(l.length>0?" "+l:l);continue}y=!1}const v=TJ(h).join(":"),b=d?v+QF:v,x=b+m;if(i.includes(x))continue;i.push(x);const w=a(m,y);for(let _=0;_<w.length;++_){const k=w[_];i.push(b+k)}l=u+(l.length>0?" "+l:l)}return l};function RJ(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=JF(t))&&(r&&(r+=" "),r+=n);return r}const JF=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=JF(e[r]))&&(n&&(n+=" "),n+=t);return n};function IJ(e,...t){let n,r,a,i=o;function o(c){const u=t.reduce((h,d)=>d(h),e());return n=AJ(u),r=n.cache.get,a=n.cache.set,i=l,l(c)}function l(c){const u=r(c);if(u)return u;const h=OJ(c,n);return a(c,h),h}return function(){return i(RJ.apply(null,arguments))}}const en=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},ZF=/^\[(?:([a-z-]+):)?(.+)\]$/i,MJ=/^\d+\/\d+$/,DJ=new Set(["px","full","screen"]),$J=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,LJ=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,FJ=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,BJ=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,WJ=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Wi=e=>bd(e)||DJ.has(e)||MJ.test(e),Lo=e=>Ih(e,"length",KJ),bd=e=>!!e&&!Number.isNaN(Number(e)),B_=e=>Ih(e,"number",bd),wf=e=>!!e&&Number.isInteger(Number(e)),qJ=e=>e.endsWith("%")&&bd(e.slice(0,-1)),rt=e=>ZF.test(e),Fo=e=>$J.test(e),UJ=new Set(["length","size","percentage"]),zJ=e=>Ih(e,UJ,e6),HJ=e=>Ih(e,"position",e6),VJ=new Set(["image","url"]),GJ=e=>Ih(e,VJ,QJ),YJ=e=>Ih(e,"",XJ),_f=()=>!0,Ih=(e,t,n)=>{const r=ZF.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},KJ=e=>LJ.test(e)&&!FJ.test(e),e6=()=>!1,XJ=e=>BJ.test(e),QJ=e=>WJ.test(e),JJ=()=>{const e=en("colors"),t=en("spacing"),n=en("blur"),r=en("brightness"),a=en("borderColor"),i=en("borderRadius"),o=en("borderSpacing"),l=en("borderWidth"),c=en("contrast"),u=en("grayscale"),h=en("hueRotate"),d=en("invert"),f=en("gap"),p=e
vendor: 12,533 bytes, line 685
685n("gradientColorStops"),y=en("gradientColorStopPositions"),m=en("inset"),v=en("margin"),b=en("opacity"),x=en("padding"),w=en("saturate"),_=en("scale"),k=en("sepia"),j=en("skew"),S=en("space"),N=en("translate"),C=()=>["auto","contain","none"],M=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto",rt,t],D=()=>[rt,t],$=()=>["",Wi,Lo],R=()=>["auto",bd,rt],I=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],P=()=>["solid","dashed","dotted","double","none"],A=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],E=()=>["start","end","center","between","around","evenly","stretch"],T=()=>["","0",rt],L=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>[bd,rt];return{cacheSize:500,separator:":",theme:{colors:[_f],spacing:[Wi,Lo],blur:["none","",Fo,rt],brightness:B(),borderColor:[e],borderRadius:["none","","full",Fo,rt],borderSpacing:D(),borderWidth:$(),contrast:B(),grayscale:T(),hueRotate:B(),invert:T(),gap:D(),gradientColorStops:[e],gradientColorStopPositions:[qJ,Lo],inset:O(),margin:O(),opacity:B(),padding:D(),saturate:B(),scale:B(),sepia:T(),skew:B(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",rt]}],container:["container"],columns:[{columns:[Fo]}],"break-after":[{"break-after":L()}],"break-before":[{"break-before":L()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...I(),rt]}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",wf,rt]}],basis:[{basis:O()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",rt]}],grow:[{grow:T()}],shrink:[{shrink:T()}],order:[{order:["first","last","none",wf,rt]}],"grid-cols":[{"grid-cols":[_f]}],"col-start-end":[{col:["auto",{span:["full",wf,rt]},rt]}],"col-start":[{"col-start":R()}],"col-end":[{"col-end":R()}],"grid-rows":[{"grid-rows":[_f]}],"row-start-end":[{row:["auto",{span:[wf,rt]},rt]}],"row-start":[{"row-start":R()}],"row-end":[{"row-end":R()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",rt]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",rt]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...E()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...E(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...E(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[S]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[S]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",rt,t]}],"min-w":[{"min-w":[rt,t,"min","max","fit"]}],"max-w":[{"max-w":[rt,t,"none","full","min","max","fit","prose",{screen:[Fo]},Fo]}],h:[{h:[rt,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[rt,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[rt,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[rt,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Fo,Lo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",B_]}],"font-family":[{font:[_f]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",rt]}],"line-clamp":[{"line-clamp":["none",bd,B_]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Wi,rt]}],"list-image":[{"list-image":["none",rt]}],"list-style-type":[{list:["none","disc","decimal",rt]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...P(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Wi,Lo]}],"underline-offset":[{"underline-offset":["auto",Wi,rt]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",rt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",rt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...I(),HJ]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",zJ]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},GJ]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:[...P(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:P()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...P()]}],"outline-offset":[{"outline-offset":[Wi,rt]}],"outline-w":[{outline:[Wi,Lo]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:$()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[Wi,Lo]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Fo,YJ]}],"shadow-color":[{shadow:[_f]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...A(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":A()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Fo,rt]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[d]}],saturate:[{saturate:[w]}],sepia:[{sepia:[k]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[k]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",rt]}],duration:[{duration:B()}],ease:[{ease:["linear","in","out","in-out",rt]}],delay:[{delay:B()}],animate:[{animate:["none","spin","ping","pulse","bounce",rt]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[wf,rt]}],"translate-x":[{"translate-x":[N]}],"translate-y":[{"translate-y":[N]}],"skew-x":[{"skew-x":[j]}],"skew-y":[{"skew-y":[j]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",rt]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",rt]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}
vendor: 4,642 bytes, line 685
685],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",rt]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Wi,Lo,B_]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},ZJ=IJ(JJ);function K(...e){return ZJ(kt(e))}const eZ=FQ,t6=g.forwardRef(({className:e,...t},n)=>s.jsx(TF,{ref:n,className:K("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));t6.displayName=TF.displayName;const tZ=pw("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),n6=g.forwardRef(({className:e,variant:t,...n},r)=>s.jsx(AF,{ref:r,className:K(tZ({variant:t}),e),...n}));n6.displayName=AF.displayName;const nZ=g.forwardRef(({className:e,...t},n)=>s.jsx(RF,{ref:n,className:K("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));nZ.displayName=RF.displayName;const r6=g.forwardRef(({className:e,...t},n)=>s.jsx(IF,{ref:n,className:K("absolute right-2 top-2 rounded-md p-1 text-foreground
685/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:s.jsx(Br,{className:"h-4 w-4"})}));r6.displayName=IF.displayName;const a6=g.forwardRef(({className:e,...t},n)=>s.jsx(EF,{ref:n,className:K("text-sm font-semibold",e),...t}));a6.displayName=EF.displayName;const s6=g.forwardRef(({className:e,...t},n)=>s.jsx(OF,{ref:n,className:K("text-sm opacity-90",e),...t}));s6.displayName=OF.displayName;function rZ(){const{toasts:e}=Je();return s.jsxs(eZ,{children:[e.map(function({id:t,title:n,description:r,action:a,...i}){return s.jsxs(n6,{...i,children:[s.jsxs("div",{className:"grid gap-1",children:[n&&s.jsx(a6,{children:n}),r&&s.jsx(s6,{children:r})]}),a,s.jsx(r6,{})]},t)}),s.jsx(t6,{})]})}var QE=["light","dark"],aZ="(prefers-color-scheme: dark)",sZ=g.createContext(void 0),iZ={setTheme:e=>{},themes:[]},oZ=()=>{var e;return(e=g.useContext(sZ))!=null?e:iZ};g.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:a,defaultTheme:i,value:o,attrs:l,nonce:c})=>{let u=i==="system",h=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${l.map(y=>`'${y}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,d=a?QE.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",f=(y,m=!1,v=!0)=>{let b=o?o[y]:y,x=m?y+"|| ''":`'${b}'`,w="";return a&&v&&!m&&QE.includes(y)&&(w+=`d.style.colorScheme = '${y}';`),n==="class"?m||b?w+=`c.add(${x})`:w+="null":b&&(w+=`d[s](n,${x})`),w},p=e?`!function(){${h}${f(e)}}()`:r?`!function(){try{${h}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${aZ}',m=window.matchMedia(t);if(m.media!==t||m.matches){${f("dark")}}else{${f("light")}}}else if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}${u?"":"else{"+f(i,!1,!1)+"}"}${d}}catch(e){}}()`:`!function(){try{${h}var e=localStorage.getItem('${t}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}else{${f(i,!1,!1)};}${d}}catch(t){}}();`;return g.createElement("script",{nonce:c,dangerouslySetInnerHTML:{__html:p}})});var lZ=e=>{switch(e){case"success":return dZ;case"info":return fZ;case"warning":return hZ;case"error":return pZ;default:return null}},cZ=Array(12).fill(0),uZ=({visible:e,className:t})=>F.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},F.createElement("div",{className:"sonner-spinner"},cZ.map((n,r)=>F.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),dZ=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),hZ=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},F.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),fZ=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),pZ=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),mZ=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},F.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),F.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),gZ=()=>{let[e,t]=F.useState(document.hidden);return F.useEffect(()=>{let n=()=>{t(document.hidden)};
685return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},yj=1,yZ=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,a=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:yj++,i=this.toasts.find(l=>l.id===a),o=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),i?this.toasts=this.toasts.map(l=>l.id===a?(this.publish({...l,...e,id:a,title:n}),{...l,...e,id:a,dismissible:o,title:n}):l):this.addToast({title:n,...r,dismissible:o,id:a}),a},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>
685this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),a=n!==void 0,i,o=r.then(async c=>{if(i=["resolve",c],F.isValidElement(c))a=!1,this.create({id:n,type:"default",message:c});else if(bZ(c)&&!c.ok){a=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${c.status}`):t.error,h=typeof t.description=="function"?await t.description(`HTTP error! status: ${c.status}`):t.description;this.create({id:n,type:"error",message:u,description:h})}else if(t.success!==void 0){a=!1;let u=typeof t.success=="function"?await t.success(c):t.success,h=typeof t.description=="function"?await t.description(c):t.description;this.create({id:n,type:"success",message:u,description:h})}}).catch(async c=>{if(i=["reject",c],t.error!==void 0){a=!1;let u=typeof t.error=="function"?await t.error(c):t.error,h=typeof t.description=="function"?await t.description(c):t.description;this.create({id:n,type:"error",message:u,description:h})}}).finally(()=>{var c;a&&(this.dismiss(n),n=void 0),(c=t.finally)==null||c.call(t)}),l=()=>new Promise((c,u)=>o.then(()=>i[0]==="reject"?u(i[1]):c(i[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:l}:Object.assign(n,{unwrap:l})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||yj++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},la=new yZ,vZ=(e,t)=>{let n=(t==null?void 0:t.id)||yj++;return la.addToast({title:e,...t,id:n}),n},bZ=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",xZ=vZ,wZ=()=>la.toasts,_Z=()=>la.getActiveToasts(),_t=Object.assign(xZ,{success:la.success,info:la.info,warning:la.warning,error:la.error,custom:la.custom,message:la.message,promise:la.promise,dismiss:la.dismiss,loading:la.loading},{getHistory:wZ,getToasts:_Z});function kZ(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}kZ(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
685left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
685:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);
685--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
686`);function xy(e){return e.label!==void 0}var jZ=3,SZ="32px",NZ="16px",JE=4e3,CZ=356,PZ=14,TZ=20,AZ=200;function ms(...e){return e.filter(Boolean).join(" ")}function EZ(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var OZ=e=>{var t,n,r,a,i,o,l,c,u,h,d;let{invert:f,toast:p,unstyled:y,interacting:m,setHeights:v,visibleToasts:b,heights:x,index:w,toasts:_,expanded:k,removeToast:j,defaultRichColors:S,closeButton:N,style:C,cancelButtonStyle:M,actionButtonStyle:O,className:D="",descriptionClassName:$="",duration:R,position:I,gap:P,loadingIcon:A,expandByDefault:E,classNames:T,icons:L,closeButtonAriaLabel:B="Close toast",pauseWhenPageIsHidden:H}=e,[G,Z]=F.useState(null),[le,ue]=F.useState(null),[re,q]=F.useState(!1),[U,Q]=F.useState(!1),[J,Y]=F.useState(!1),[oe,ve]=F.useState(!1),[De,Le]=F.useState(!1),[He,vt]=F.useState(0),[lt,Pt]=F.useState(0),te=F.useRef(p.duration||R||JE),ne=F.useRef(null),ye=F.useRef(null),Ge=w===0,st=w+1<=b,Ie=p.type,St=p.dismissible!==!1,qr=p.className||"",qe=p.descriptionClassName||"",ln=F.useMemo(()=>x.findIndex(Re=>Re.toastId===p.id)||0,[x,p.id]),Tt=F.useMemo(()=>{var Re;return(Re=p.closeButton)!=null?Re:N},[p.closeButton,N]),Pr=F.useMemo(()=>p.duration||R||JE,[p.duration,R]),gr=F.useRef(0),Tr=F.useRef(0),kn=F.useRef(0),_a=F.useRef(null),[Yt,$e]=I.split("-"),et=F.useMemo(()=>x.reduce((Re,Ye,nt)=>nt>=ln?Re:Re+Ye.height,0),[x,ln]),bt=gZ(),Ot=p.invert||f,ae=Ie==="loading";Tr.current=F.useMemo(()=>ln*P+et,[ln,et]),F.useEffect(()=>{te.current=Pr},[Pr]),F.useEffect(()=>{q(!0)},[]),F.useEffect(()=>{let Re=ye.current;if(Re){let Ye=Re.getBoundingClientRect().height;return Pt(Ye),v(nt=>[{toastId:p.id,height:Ye,position:p.position},...nt]),()=>v(nt=>nt.filter(Zt=>Zt.toastId!==p.id))}},[v,p.id]),F.useLayoutEffect(()=>{if(!re)return;let Re=ye.current,Ye=Re.style.height;Re.style.height="auto";let nt=Re.getBoundingClientRect().height;Re.style.height=Ye,Pt(nt),v(Zt=>Zt.find(ct=>ct.toastId===p.id)?Zt.map(ct=>ct.toastId===p.id?{...ct,height:nt}:ct):[{toastId:p.id,height:nt,position:p.position},...Zt])},[re,p.title,p.description,v,p.id]);let At=F.useCallback(()=>{Q(!0),vt(Tr.current),v(Re=>Re.filter(Ye=>Ye.toastId!==p.id)),setTimeout(()=>{j(p)},AZ)},[p,j,v,Tr]);F.useEffect(()=>{if(p.promise&&Ie==="loading"||p.duration===1/0||p.type==="loading")return;let Re;return k||m||H&&bt?(()=>{if(kn.current<gr.current){let Ye=new Date().getTime()-gr.current;te.current=te.current-Ye}
686kn.current=new Date().getTime()})():te.current!==1/0&&(gr.current=new Date().getTime(),Re=setTimeout(()=>{var Ye;(Ye=p.onAutoClose)==null||Ye.call(p,p),At()},te.current)),()=>clearTimeout(Re)},[k,m,p,Ie,H,bt,At]),F.useEffect(()=>{p.delete&&At()},[At,p.delete]);function cn(){var Re,Ye,nt;return L!=null&&L.loading?F.createElement("div",{className:ms(T==null?void 0:T.loader,(Re=p==null?void 0:p.classNames)==null?void 0:Re.loader,"sonner-loader"),"data-visible":Ie==="loading"},L.loading):A?F.createElement("div",{className:ms(T==null?void 0:T.loader,(Ye=p==null?void 0:p.classNames)==null?void 0:Ye.loader,"sonner-loader"),"data-visible":Ie==="loading"},A):F.createElement(uZ,{className:ms(T==null?void 0:T.loader,(nt=p==null?void 0:p.classNames)==null?void 0:nt.loader),visible:Ie==="loading"})}return F.createElement("li",{tabIndex:0,ref:ye,className:ms(D,qr,T==null?void 0:T.toast,(t=p==null?void 0:p.classNames)==null?void 0:t.toast,T==null?void 0:T.default,T==null?void 0:T[Ie],(n=p==null?void 0:p.classNames)==null?void 0:n[Ie]),"data-sonner-toast":"","data-rich-colors":(r=p.richColors)!=null?r:S,"data-styled":!(p.jsx||p.unstyled||y),"data-mounted":re,"data-
686promise":!!p.promise,"data-swiped":De,"data-removed":U,"data-visible":st,"data-y-position":Yt,"data-x-position":$e,"data-index":w,"data-front":Ge,"data-swiping":J,"data-dismissible":St,"data-type":Ie,"data-invert":Ot,"data-swipe-out":oe,"data-swipe-direction":le,"data-expanded":!!(k||E&&re),style:{"--index":w,"--toasts-before":w,"--z-index":_.length-w,"--offset":`${U?He:Tr.current}px`,"--initial-height":E?"auto":`${lt}px`,...C,...p.style},onDragEnd:()=>{Y(!1),Z(null),_a.current=null},onPointerDown:Re=>{ae||!St||(ne.current=new Date,vt(Tr.current),Re.target.setPointerCapture(Re.pointerId),Re.target.tagName!=="BUTTON"&&(Y(!0),_a.current={x:Re.clientX,y:Re.clientY}))},onPointerUp:()=>{var Re,Ye,nt,Zt;if(oe||!St)return;_a.current=null;let ct=Number(((Re=ye.current)==null?void 0:Re.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),zt=Number(((Ye=ye.current)==null?void 0:Ye.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Gn=new Date().getTime()-((nt=ne.current)==null?void 0:nt.getTime()),On=G==="x"?ct:zt,jn=Math.abs(On)/Gn;if(Math.abs(On)>=TZ||jn>.11){vt(Tr.current),(Zt=p.onDismiss)==null||Zt.call(p,p),ue(G==="x"?ct>0?"right":"left":zt>0?"down":"up"),At(),ve(!0),Le(!1);return}Y(!1),Z(null)},onPointerMove:Re=>{var Ye,nt,Zt,ct;if(!_a.current||!St||((Ye=window.getSelection())==null?void 0:Ye.toString().length)>0)return;let zt=Re.clientY-_a.current.y,Gn=Re.clientX-_a.current.x,On=(nt=e.swipeDirections)!=null?nt:EZ(I);!G&&(Math.abs(Gn)>1||Math.abs(zt)>1)&&Z(Math.abs(Gn)>Math.abs(zt)?"x":"y");let jn={x:0,y:0};G==="y"?(On.includes("top")||On.includes("bottom"))&&(On.includes("top")&&zt<0||On.includes("bottom")&&zt>0)&&(jn.y=zt):G==="x"&&(On.includes("left")||On.includes("right"))&&(On.includes("left")&&Gn<0||On.includes("right")&&Gn>0)&&(jn.x=Gn),(Math.abs(jn.x)>0||Math.abs(jn.y)>0)&&Le(!0),(Zt=ye.current)==null||Zt.style.setProperty("--swipe-amount-x",`${jn.x}px`),(ct=ye.current)==null||ct.style.setProperty("--swipe-amount-y",`${jn.y}px`)}},Tt&&!p.jsx?F.createElement("button",{"aria-label":B,"data-disabled":ae,"data-close-button":!0,onClick:ae||!St?()=>{}:()=>{var Re;At(),(Re=p.onDismiss)==null||Re.call(p,p)},className:ms(T==null?void 0:T.closeButton,(a=p==null?void 0:p.classNames)==null?void 0:a.closeButton)},(i=L==null?void 0:L.close)!=null?i:mZ):null,p.jsx||g.isValidElement(p.title)?p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title:F.createElement(F.Fragment,null,Ie||p.icon||p.promise?F.createElement("div",{"data-icon":"",className:ms(T==null?void 0:T.icon,(o=p==null?void 0:p.classNames)==null?void 0:o.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||cn():null,p.type!=="loading"?p.icon||(L==null?void 0:L[Ie])||lZ(Ie):null):null,F.createElement("div",{"data-content":"",className:ms(T==null?void 0:T.content,(l=p==null?void 0:p.classNames)==null?void 0:l.content)},F.createElement("div",{"data-title":"",className:ms(T==null?void 0:T.title,(c=p==null?void 0:p.classNames)==null?void 0:c.title)},typeof p.title=="function"?p.title():p.title),p.description?F.createElement("div",{"data-description":"",className:ms($,qe,T==null?void 0:T.description,(u=p==null?void 0:p.classNames)==null?void 0:u.description)},typeof p.description=="function"?p.description():p.description):null),g.isValidElement(p.cancel)?p.cancel:p.cancel&&xy(p.cancel)?F.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||M,onClick:Re=>{var Ye,nt;xy(p.cancel)&&St&&((nt=(Ye=p.cancel).onClick)==null||nt.call(Ye,Re),At())},className:ms(T==null?void 0:T.cancelButton,(h=p==null?void 0:p.classNames)==null?void 0:h.cancelButton)},p.cancel.label):null,g.isValidElement(p.action)?p.action:p.action&&xy(p.action)?F.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||O,onClick:Re=>{var Ye,nt;xy(p.action)&&((nt=(Ye=p.action).onClick)==null||nt.call(Ye,Re),!Re.defaultPrevented&&At())},className:ms(T==null?void 0:T.actionButton,(d=p==null?void 0:p.classNames)==null?void 0:d.actionButton)},p.action.label):null))};function ZE(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function RZ(e,t){let n={};return[e,t].forEach((r,a)=>{let i=a===1,o=i?"--mobile-offset":"--offset",l=i?NZ:SZ;function c(u){["top","right","bottom","left"].forEach(h=>{n[`${o}-${h}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${o}-${u}`]=l:n[`${o}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):c(l)}),n}var IZ=g.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:a=["altKey","KeyT"],expand:i,closeButton:o,className:l,offset:c,mobileOffset:u,theme:h="light",richColors:d,duration:f,style:p,visibleToasts:y=jZ,toastOptions:m,dir:v=ZE(),gap:b=PZ,loadingIcon:x,icons:w,containerAriaLabel:_="Notifications",pauseWhenPageIsHidden:k}=e,[j,S]=F.useState([]),N=F.useMemo(()=>Array.from(new Set([r].concat(j.filter(H=>H.position).map(H=>H.position)))),[j,r]),[C,M]=F.useState([]),[O,D]=F.useState(!1),[$,R]=F.useState(!1),[I,P]=F.useState(h!=="system"?h:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
686k":"light"),A=F.useRef(null),E=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),T=F.useRef(null),L=F.useRef(!1),B=F.useCallback(H=>{S(G=>{var Z;return(Z=G.find(le=>le.id===H.id))!=null&&Z.delete||la.dismiss(H.id),G.filter(({id:le})=>le!==H.id)})},[]);return F.useEffect(()=>la.subscribe(H=>{if(H.dismiss){S(G=>G.map(Z=>Z.id===H.id?{...Z,delete:!0}:Z));return}setTimeout(()=>{lF.flushSync(()=>{S(G=>{let Z=G.findIndex(le=>le.id===H.id);return Z!==-1?[...G.slice(0,Z),{...G[Z],...H},...G.slice(Z+1)]:[H,...G]})})})}),[]),F.useEffect(()=>{if(h!=="system"){P(h);return}if(h==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?P("dark"):P("light")),typeof window>"u")return;let H=window.matchMedia("(prefers-color-scheme: dark)");try{H.addEventListener("change",({matches:G})=>{P(G?"dark":"light")})}catch{H.addListener(({matches:Z})=>{try{P(Z?"dark":"light")}catch(le){console.error(le)}})}},[h]),F.useEffect(()=>{j.length<=1&&D(!1)},[j]),F.useEffect(()=>{let H=G=>{var Z,le;a.every(ue=>G[ue]||G.code===ue)&&(D(!0),(Z=A.current)==null||Z.focus()),G.code==="Escape"&&(document.activeElement===A.current||(le=A.current)!=null&&le.contains(document.activeElement))&&D(!1)};return document.addEventListener("keydown",H),()=>document.removeEventListener("keydown",H)},[a]),F.useEffect(()=>{if(A.current)return()=>{T.current&&(T.current.focus({preventScroll:!0}),T.current=null,L.current=!1)}},[A.current]),F.createElement("section",{ref:t,"aria-label":`${_} ${E}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},N.map((H,G)=>{var Z;let[le,ue]=H.split("-");return j.length?F.createElement("ol",{key:H,dir:v==="auto"?ZE():v,tabIndex:-1,ref:A,className:l,"data-sonner-toaster":!0,"data-theme":I,"data-y-position":le,"data-lifted":O&&j.length>1&&!i,"data-x-position":ue,style:{"--front-toast-height":`${((Z=C[0])==null?void 0:Z.height)||0}px`,"--width":`${CZ}px`,"--gap":`${b}px`,...p,...RZ(c,u)},onBlur:re=>{L.current&&!re.currentTarget.contains(re.relatedTarget)&&(L.current=!1,T.current&&(T.current.focus({preventScroll:!0}),T.current=null))},onFocus:re=>{re.target instanceof HTMLElement&&re.target.dataset.dismissible==="false"||L.current||(L.current=!0,T.current=re.relatedTarget)},onMouseEnter:()=>D(!0),onMouseMove:()=>D(!0),onMouseLeave:()=>{$||D(!1)},onDragEnd:()=>D(!1),onPointerDown:re=>{re.target instanceof HTMLElement&&re.target.dataset.dismissible==="false"||R(!0)},onPointerUp:()=>R(!1)},j.filter(re=>!re.position&&G===0||re.position===H).map((re,q)=>{var U,Q;return F.createElement(OZ,{key:re.id,icons:w,index:q,toast:re,defaultRichColors:d,duration:(U=m==null?void 0:m.duration)!=null?U:f,className:m==null?void 0:m.className,descriptionClassName:m==null?void 0:m.descriptionClassName,invert:n,visibleToasts:y,closeButton:(Q=m==null?void 0:m.closeButton)!=null?Q:o,interacting:$,position:H,style:m==null?void 0:m.style,unstyled:m==null?void 0:m.unstyled,classNames:m==null?void 0:m.classNames,cancelButtonStyle:m==null?void 0:m.cancelButtonStyle,actionButtonStyle:m==null?void 0:m.actionButtonStyle,removeToast:B,toasts:j.filter(J=>J.position==re.position),heights:C.filter(J=>J.position==re.position),setHeights:M,expandByDefault:i,gap:b,loadingIcon:x,expanded:O,pauseWhenPageIsHidden:k,swipeDirections:e.swipeDirections})})):null}))});const MZ=({...e})=>{const{theme:t="system"}=oZ();return s.jsx(IZ,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})};var DZ=gC[" useId ".trim().toString()]||(()=>{}),$Z=0;function Oa(e){const[t,n]=g.useState(DZ());return rr(()=>{e||n(r=>r??String($Z++))},[e]),e||(t?`radix-${t}`:"")}const LZ=["top","right","bottom","left"],Il=Math.min,Na=Math.max,hb=Math.round,wy=Math.floor,vi=e=>({x:e,y:e}
vendor: 10,235 bytes, line 686
686),FZ={left:"right",right:"left",bottom:"top",top:"bottom"},BZ={start:"end",end:"start"};function vj(e,t,n){return Na(e,Il(t,n))}function xo(e,t){return typeof e=="function"?e(t):e}function wo(e){return e.split("-")[0]}function Mh(e){return e.split("-")[1]}function _P(e){return e==="x"?"y":"x"}function kP(e){return e==="y"?"height":"width"}const WZ=new Set(["top","bottom"]);function ui(e){return WZ.has(wo(e))?"y":"x"}function jP(e){return _P(ui(e))}function qZ(e,t,n){n===void 0&&(n=!1);const r=Mh(e),a=jP(e),i=kP(a);let o=a==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=fb(o)),[o,fb(o)]}function UZ(e){const t=fb(e);return[bj(e),t,bj(t)]}function bj(e){return e.replace(/start|end/g,t=>BZ[t])}const eO=["left","right"],tO=["right","left"],zZ=["top","bottom"],HZ=["bottom","top"];function VZ(e,t,n){switch(e){case"top":case"bottom":return n?t?tO:eO:t?eO:tO;case"left":case"right":return t?zZ:HZ;default:return[]}}function GZ(e,t,n,r){const a=Mh(e);let i=VZ(wo(e),n==="start",r);return a&&(i=i.map(o=>o+"-"+a),t&&(i=i.concat(i.map(bj)))),i}function fb(e){return e.replace(/left|right|bottom|top/g,t=>FZ[t])}function YZ(e){return{top:0,right:0,bottom:0,left:0,...e}}function i6(e){return typeof e!="number"?YZ(e):{top:e,right:e,bottom:e,left:e}}function pb(e){const{x:t,y:n,width:r,height:a}=e;return{width:r,height:a,top:n,left:t,right:t+r,bottom:n+a,x:t,y:n}}function nO(e,t,n){let{reference:r,floating:a}=e;const i=ui(t),o=jP(t),l=kP(o),c=wo(t),u=i==="y",h=r.x+r.width/2-a.width/2,d=r.y+r.height/2-a.height/2,f=r[l]/2-a[l]/2;let p;switch(c){case"top":p={x:h,y:r.y-a.height};break;case"bottom":p={x:h,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-a.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Mh(t)){case"start":p[o]-=f*(n&&u?-1:1);break;case"end":p[o]+=f*(n&&u?-1:1);break}return p}const KZ=async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:i=[],platform:o}=n,l=i.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:a}),{x:h,y:d}=nO(u,r,c),f=r,p={},y=0;for(let m=0;m<l.length;m++){const{name:v,fn:b}=l[m],{x,y:w,data:_,reset:k}=await b({x:h,y:d,initialPlacement:r,placement:f,strategy:a,middlewareData:p,rects:u,platform:o,elements:{reference:e,floating:t}});h=x??h,d=w??d,p={...p,[v]:{...p[v],..._}},k&&y<=50&&(y++,typeof k=="object"&&(k.placement&&(f=k.placement),k.rects&&(u=k.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:a}):k.rects),{x:h,y:d}=nO(u,f,c)),m=-1)}return{x:h,y:d,placement:f,strategy:a,middlewareData:p}};async function zp(e,t){var n;t===void 0&&(t={});const{x:r,y:a,platform:i,rects:o,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:h="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=xo(t,e),y=i6(p),v=l[f?d==="floating"?"reference":"floating":d],b=pb(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(v)))==null||n?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:u,rootBoundary:h,strategy:c})),x=d==="floating"?{x:r,y:a,width:o.floating.width,height:o.floating.height}:o.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),_=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},k=pb(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:x,offsetParent:w,strategy:c}):x);return{top:(b.top-k.top+y.top)/_.y,bottom:(k.bottom-b.bottom+y.bottom)/_.y,left:(b.left-k.left+y.left)/_.x,right:(k.right-b.right+y.right)/_.x}}const XZ=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:a,rects:i,platform:o,elements:l,middlewareData:c}=t,{element:u,padding:h=0}=xo(e,t)||{};if(u==null)return{};const d=i6(h),f={x:n,y:r},p=jP(a),y=kP(p),m=await o.getDimensions(u),v=p==="y",b=v?"top":"left",x=v?"bottom":"right",w=v?"clientHeight":"clientWidth",_=i.reference[y]+i.reference[p]-f[p]-i.floating[y],k=f[p]-i.reference[p],j=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let S=j?j[w]:0;(!S||!await(o.isElement==null?void 0:o.isElement(j)))&&(S=l.floating[w]||i.floating[y]);const N=_/2-k/2,C=S/2-m[y]/2-1,M=Il(d[b],C),O=Il(d[x],C),D=M,$=S-m[y]-O,R=S/2-m[y]/2+N,I=vj(D,R,$),P=!c.arrow&&Mh(a)!=null&&R!==I&&i.reference[y]/2-(R<D?M:O)-m[y]/2<0,A=P?R<D?R-D:R-$:0;return{[p]:f[p]+A,data:{[p]:I,centerOffset:R-I-A,...P&&{alignmentOffset:A}},reset:P}}}),QZ=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:a,middlewareData:i,rects:o,initialPlacement:l,platform:c,elements:u}=t,{mainAxis:h=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:m=!0,...v}=xo(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const b=wo(a),x=ui(l),w=wo(l)===l,_=await(c.isRTL==null?void 0:c.isRTL(u.floating)),k=f||(w||!m?[fb(l)]:UZ(l)),j=y!=="none";!f&&j&&k.push(...GZ(l,m,y,_));const S=[l,...k],N=await zp(t,v),C=[];let M=((r=i.flip)==null?void 0:r.overflows)||[];if(h&&C.push(N[b]),d){const R=qZ(a,o,_);C.push(N[R[0]],N[R[1]])}if(M=[...M,{placement:a,overflows:C}],!C.every(R=>R<=0)){var O,D;const R=(((O=i.flip)==null?void 0:O.index)||0)+1,I=S[R];if(I&&(!(d==="alignment"?x!==ui(I):!1)||M.every(E=>E.overflows[0]>0&&ui(E.placement)===x)))return{data:{index:R,overflows:M},reset:{placement:I}};let P=(D=M.filter(A=>A.overflows[0]<=0).sort((A,E)=>A.overflows[1]-E.overflows[1])[0])==null?void 0:D.placement;if(!P)switch(p){case"bestFit":{var $;const A=($=M.filter(E=>{if(j){const T=ui(E.placement);return T===x||T==="y"}return!0}).map(E=>[E.placement,E.overflows.filter(T=>T>0).reduce((T,L)=>T+L,0)]).sort((E,T)=>E[1]-T[1])[0])==null?void 0:$[0];A&&(P=A);break}case"initialPlacement":P=l;break}if(a!==P)return{reset:{placement:P}}}return{}}}};function rO(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function aO(e){return LZ.some(t=>e[t]>=0)}const JZ=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...a}=xo(e,t);switch(r){case"referenceHidden":{const i=await zp(t,{...a,elementContext:"reference"}),o=rO(i,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:aO(o)}}}case"escaped":{const i=await zp(t,{...a,altBoundary:!0}),o=rO(i,n.floating);return{data:{escapedOffsets:o,escaped:aO(o)}}}default:return{}}}}},o6=new Set(["left","top"]);async function ZZ(e,t){const{placement:n,platform:r,elements:a}=e,i=await(r.isRTL==null?void 0:r.isRTL(a.floating)),o=wo(n),l=Mh(n),c=ui(n)==="y",u=o6.has(o)?-1:1,h=i&&c?-1:1,d=xo(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:y}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&typeof y=="number"&&(p=l==="end"?y*-1:y),c?{x:p*h,y:f*u}:{x:f*u,y:p*h}}const eee=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:a,y:i,placement:o,middlewareData:l}=t,c=await ZZ(t,e);return o===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:a+c.x,y:i+c.y,data:{...c,placement:o}}}}},tee=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:a}=t,{mainAxis:i=!0,crossAxis:o=!1,limiter:l={fn:v=>{let{x:b,y:x}=v;return{x:b,y:x}}},...c}=xo(e,t),u={x:n,y:r},h=await zp(t,c),d=ui(wo(a)),f=_P(d);let p=u[f],y=u[d];if(i){const v=f==="y"?"top":"left",b=f==="y"?"bottom":"right",x=p+h[v],w=p-h[b];p=vj(x,p,w)}if(o){const v=d==="y"?"top":"left",b=d==="y"?"bottom":"right",x=y+h[v],w=y-h[b];y=vj(x,y,w)}const m=l.fn({...t,[f]:p,[d]:y});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[f]:i,[d]:o}}}}}},nee=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:a,rects:i,middlewareData:o}=t,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=xo(e,t),h={x:n,y:r},d=ui(a),f=_P(d);let p=h[f],y=h[d];const m=xo(l,t),v=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(c){const w=f==="y"?"height":"width",_=i.reference[f]-i.floating[w]+v.mainAxis,k=i.reference[f]+i.reference[w]-v.mainAxis;p<_?p=_:p>k&&(p=k)}if(u){var b,x;const w=f==="y"?"width":"height",_=o6.has(wo(a)),k=i.reference[d]-i.floating[w]+(_&&((b=o.offset)==null?void 0:b[d])||0)+(_?0:v.crossAxis),j=i.reference[d]+i.reference[w]+(_?0:((x=o.offset)==null?void 0:x[d])||0)-(_?v.crossAxis:0);y<k?y=k:y>j&&(y=j)}return{[f]:p,[d]:y}}}},ree=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:a,rects:i,platform:o,elements:l}=t,{apply:c=()=>{},...u}=xo(e,t),h=await zp(t,u),d=wo(a),f=Mh(a),p=ui(a)==="y",{width:y,height:m}=i.floating;let v,b;d==="top"||d==="bottom"?(v=d,b=f===(await(o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(b=d,v=f==="end"?"top":"bottom");const x=m-h.top-h.bottom,w=y-h.left-h.right,_=Il(m-h[v],x),k=Il(y-h[b],w),j=!t.middlewareData.shift;let S=_,N=k;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(N=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(S=x),j&&!f){const M=Na(h.left,0),O=Na(h.right,0),D=Na(h.top,0),$=Na(h.bottom,0);p?N=y-2*(M!==0||O!==0?M+O:Na(h.left,h.right)):S=m-2*(D!==0||$!==0?D+$:Na(h.top,h.bottom))}await c({...t,availableWidth:N,availableHeight:S});const C=await o.getDimensions(l.floating);return y!==C.width||m!==C.height?{reset:{rects:!0}}:{}}}};function kw(){return typeof window<"u"}function Dh(e){return l6(e)?(e.nodeName||"").toLowerCase():"#document"}function Ra(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Oi(e){var t;return(t=(l6(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function l6(e){return kw()?e instanceof Node||e instanceof Ra(e).Node:!1}function Ws(e){return kw()?e instanceof Element||e instanceof Ra(e).Element:!1}function Ni(e){return kw()?e instanceof HTMLElement||e instanceof Ra(e).HTMLElement:!1}function sO(e){return!kw()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ra(e).ShadowRoot}
vendor: 4,257 bytes, line 686
686const aee=new Set(["inline","contents"]);function mg(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=qs(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!aee.has(a)}const see=new Set(["table","td","th"]);function iee(e){return see.has(Dh(e))}const oee=[":popover-open",":modal"];function jw(e){return oee.some(t=>{try{return e.matches(t)}catch{return!1}})}const lee=["transform","translate","scale","rotate","perspective"],cee=["transform","translate","scale","rotate","perspective","filter"],uee=["paint","layout","strict","content"];function SP(e){const t=NP(),n=Ws(e)?qs(e):e;return lee.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||cee.some(r=>(n.willChange||"").includes(r))||uee.some(r=>(n.contain||"").includes(r))}function dee(e){let t=Ml(e);for(;Ni(t)&&!Zd(t);){if(SP(t))return t;if(jw(t))return null;t=Ml(t)}return null}function NP(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const hee=new Set(["html","body","#document"]);function Zd(e){return hee.has(Dh(e))}function qs(e){return Ra(e).getComputedStyle(e)}function Sw(e){return Ws(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ml(e){if(Dh(e)==="html")return e;const t=e.assignedSlot||e.parentNode||sO(e)&&e.host||Oi(e);return sO(t)?t.host:t}function c6(e){const t=Ml(e);return Zd(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ni(t)&&mg(t)?t:c6(t)}function Hp(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const a=c6(e),i=a===((r=e.ownerDocument)==null?void 0:r.body),o=Ra(a);if(i){const l=xj(o);return t.concat(o,o.visualViewport||[],mg(a)?a:[],l&&n?Hp(l):[])}return t.concat(a,Hp(a,[],n))}function xj(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function u6(e){const t=qs(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=Ni(e),i=a?e.offsetWidth:n,o=a?e.offsetHeight:r,l=hb(n)!==i||hb(r)!==o;return l&&(n=i,r=o),{width:n,height:r,$:l}}function CP(e){return Ws(e)?e:e.contextElement}function xd(e){const t=CP(e);if(!Ni(t))return vi(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:i}=u6(t);let o=(i?hb(n.width):n.width)/r,l=(i?hb(n.height):n.height)/a;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const fee=vi(0);function d6(e){const t=Ra(e);return!NP()||!t.visualViewport?fee:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function pee(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ra(e)?!1:t}function Zc(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),i=CP(e);let o=vi(1);t&&(r?Ws(r)&&(o=xd(r)):o=xd(e));const l=pee(i,n,r)?d6(i):vi(0);let c=(a.left+l.x)/o.x,u=(a.top+l.y)/o.y,h=a.width/o.x,d=a.height/o.y;if(i){const f=Ra(i),p=r&&Ws(r)?Ra(r):r;let y=f,m=xj(y);for(;m&&r&&p!==y;){const v=xd(m),b=m.getBoundingClientRect(),x=qs(m),w=b.left+(m.clientLeft+parseFloat(x.paddingLeft))*v.x,_=b.top+(m.clientTop+parseFloat(x.paddingTop))*v.y;c*=v.x,u*=v.y,h*=v.x,d*=v.y,c+=w,u+=_,y=Ra(m),m=xj(y)}}return pb({width:h,height:d,x:c,y:u})}function PP(e,t){const n=Sw(e).scrollLeft;return t?t.left+n:Zc(Oi(e)).left+n}function h6(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),a=r.left+t.scrollLeft-(n?0:PP(e,r)),i=r.top+t.scrollTop;return{x:a,y:i}}function mee(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const i=a==="fixed",o=Oi(r),l=t?jw(t.floating):!1;if(r===o||l&&i)return n;let c={scrollLeft:0,scrollTop:0},u=vi(1);const h=vi(0),d=Ni(r);if((d||!d&&!i)&&((Dh(r)!=="body"||mg(o))&&(c=Sw(r)),Ni(r))){const p=Zc(r);u=xd(r),h.x=p.x+r.clientLeft,h.y=p.y+r.clientTop}const f=o&&!d&&!i?h6(o,c,!0):vi(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+h.x+f.x,y:n.y*u.y-c.scrollTop*u.y+h.y+f.y}}function gee(e){return Array.from(e.getClientRects())}function yee(e){const t=Oi(e),n=Sw(e),r=e.ownerDocument.body,a=Na(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Na(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+PP(e);const l=-n.scrollTop;return qs(r).direction==="rtl"&&(o+=Na(t.clientWidth,r.clientWidth)-a),{width:a,height:i,x:o,y:l}}
vendor: 4,685 bytes, line 686
686function vee(e,t){const n=Ra(e),r=Oi(e),a=n.visualViewport;let i=r.clientWidth,o=r.clientHeight,l=0,c=0;if(a){i=a.width,o=a.height;const u=NP();(!u||u&&t==="fixed")&&(l=a.offsetLeft,c=a.offsetTop)}return{width:i,height:o,x:l,y:c}}const bee=new Set(["absolute","fixed"]);function xee(e,t){const n=Zc(e,!0,t==="fixed"),r=n.top+e.clientTop,a=n.left+e.clientLeft,i=Ni(e)?xd(e):vi(1),o=e.clientWidth*i.x,l=e.clientHeight*i.y,c=a*i.x,u=r*i.y;return{width:o,height:l,x:c,y:u}}function iO(e,t,n){let r;if(t==="viewport")r=vee(e,n);else if(t==="document")r=yee(Oi(e));else if(Ws(t))r=xee(t,n);else{const a=d6(e);r={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return pb(r)}function f6(e,t){const n=Ml(e);return n===t||!Ws(n)||Zd(n)?!1:qs(n).position==="fixed"||f6(n,t)}function wee(e,t){const n=t.get(e);if(n)return n;let r=Hp(e,[],!1).filter(l=>Ws(l)&&Dh(l)!=="body"),a=null;const i=qs(e).position==="fixed";let o=i?Ml(e):e;for(;Ws(o)&&!Zd(o);){const l=qs(o),c=SP(o);!c&&l.position==="fixed"&&(a=null),(i?!c&&!a:!c&&l.position==="static"&&!!a&&bee.has(a.position)||mg(o)&&!c&&f6(e,o))?r=r.filter(h=>h!==o):a=l,o=Ml(o)}return t.set(e,r),r}function _ee(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const o=[...n==="clippingAncestors"?jw(t)?[]:wee(t,this._c):[].concat(n),r],l=o[0],c=o.reduce((u,h)=>{const d=iO(t,h,a);return u.top=Na(d.top,u.top),u.right=Il(d.right,u.right),u.bottom=Il(d.bottom,u.bottom),u.left=Na(d.left,u.left),u},iO(t,l,a));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function kee(e){const{width:t,height:n}=u6(e);return{width:t,height:n}}function jee(e,t,n){const r=Ni(t),a=Oi(t),i=n==="fixed",o=Zc(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const c=vi(0);function u(){c.x=PP(a)}if(r||!r&&!i)if((Dh(t)!=="body"||mg(a))&&(l=Sw(t)),r){const p=Zc(t,!0,i,t);c.x=p.x+t.clientLeft,c.y=p.y+t.clientTop}else a&&u();i&&!r&&a&&u();const h=a&&!r&&!i?h6(a,l):vi(0),d=o.left+l.scrollLeft-c.x-h.x,f=o.top+l.scrollTop-c.y-h.y;return{x:d,y:f,width:o.width,height:o.height}}function W_(e){return qs(e).position==="static"}function oO(e,t){if(!Ni(e)||qs(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Oi(e)===n&&(n=n.ownerDocument.body),n}function p6(e,t){const n=Ra(e);if(jw(e))return n;if(!Ni(e)){let a=Ml(e);for(;a&&!Zd(a);){if(Ws(a)&&!W_(a))return a;a=Ml(a)}return n}let r=oO(e,t);for(;r&&iee(r)&&W_(r);)r=oO(r,t);return r&&Zd(r)&&W_(r)&&!SP(r)?n:r||dee(e)||n}const See=async function(e){const t=this.getOffsetParent||p6,n=this.getDimensions,r=await n(e.floating);return{reference:jee(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Nee(e){return qs(e).direction==="rtl"}const Cee={convertOffsetParentRelativeRectToViewportRelativeRect:mee,getDocumentElement:Oi,getClippingRect:_ee,getOffsetParent:p6,getElementRects:See,getClientRects:gee,getDimensions:kee,getScale:xd,isElement:Ws,isRTL:Nee};function m6(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Pee(e,t){let n=null,r;const a=Oi(e);function i(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function o(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),i();const u=e.getBoundingClientRect(),{left:h,top:d,width:f,height:p}=u;if(l||t(),!f||!p)return;const y=wy(d),m=wy(a.clientWidth-(h+f)),v=wy(a.clientHeight-(d+p)),b=wy(h),w={rootMargin:-y+"px "+-m+"px "+-v+"px "+-b+"px",threshold:Na(0,Il(1,c))||1};let _=!0;function k(j){const S=j[0].intersectionRatio;if(S!==c){if(!_)return o();S?o(!1,S):r=setTimeout(()=>{o(!1,1e-7)},1e3)}S===1&&!m6(u,e.getBoundingClientRect())&&o(),_=!1}try{n=new IntersectionObserver(k,{...w,root:a.ownerDocument})}catch{n=new IntersectionObserver(k,w)}n.observe(e)}return o(!0),i}function Tee(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:a=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=CP(e),h=a||i?[...u?Hp(u):[],...Hp(t)]:[];h.forEach(b=>{a&&b.addEventListener("scroll",n,{passive:!0}),i&&b.addEventListener("resize",n)});const d=u&&l?Pee(u,n):null;let f=-1,p=null;o&&(p=new ResizeObserver(b=>{let[x]=b;x&&x.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var w;(w=p)==null||w.observe(t)})),n()}),u&&!c&&p.observe(u),p.observe(t));let y,m=c?Zc(e):null;c&&v();function v(){const b=Zc(e);m&&!m6(m,b)&&n(),m=b,y=requestAnimationFrame(v)}return n(),()=>{var b;h.forEach(x=>{a&&x.removeEventListener("scroll",n),i&&x.removeEventListener("resize",n)}),d==null||d(),(b=p)==null||b.disconnect(),p=null,c&&cancelAnimationFrame(y)}}const Aee=eee,Eee=tee,Oee=QZ,Ree=ree,Iee=JZ,lO=XZ,Mee=nee,Dee=(e,t,n
vendor: 4,375 bytes, line 686
686)=>{const r=new Map,a={platform:Cee,...n},i={...a.platform,_c:r};return KZ(e,t,{...a,platform:i})};var $ee=typeof document<"u",Lee=function(){},Sv=$ee?g.useLayoutEffect:Lee;function mb(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!mb(e[r],t[r]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,a[r]))return!1;for(r=n;r--!==0;){const i=a[r];if(!(i==="_owner"&&e.$$typeof)&&!mb(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function g6(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function cO(e,t){const n=g6(e);return Math.round(t*n)/n}function q_(e){const t=g.useRef(e);return Sv(()=>{t.current=e}),t}function Fee(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:i,floating:o}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[h,d]=g.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=g.useState(r);mb(f,r)||p(r);const[y,m]=g.useState(null),[v,b]=g.useState(null),x=g.useCallback(E=>{E!==j.current&&(j.current=E,m(E))},[]),w=g.useCallback(E=>{E!==S.current&&(S.current=E,b(E))},[]),_=i||y,k=o||v,j=g.useRef(null),S=g.useRef(null),N=g.useRef(h),C=c!=null,M=q_(c),O=q_(a),D=q_(u),$=g.useCallback(()=>{if(!j.current||!S.current)return;const E={placement:t,strategy:n,middleware:f};O.current&&(E.platform=O.current),Dee(j.current,S.current,E).then(T=>{const L={...T,isPositioned:D.current!==!1};R.current&&!mb(N.current,L)&&(N.current=L,pu.flushSync(()=>{d(L)}))})},[f,t,n,O,D]);Sv(()=>{u===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,d(E=>({...E,isPositioned:!1})))},[u]);const R=g.useRef(!1);Sv(()=>(R.current=!0,()=>{R.current=!1}),[]),Sv(()=>{if(_&&(j.current=_),k&&(S.current=k),_&&k){if(M.current)return M.current(_,k,$);$()}},[_,k,$,M,C]);const I=g.useMemo(()=>({reference:j,floating:S,setReference:x,setFloating:w}),[x,w]),P=g.useMemo(()=>({reference:_,floating:k}),[_,k]),A=g.useMemo(()=>{const E={position:n,left:0,top:0};if(!P.floating)return E;const T=cO(P.floating,h.x),L=cO(P.floating,h.y);return l?{...E,transform:"translate("+T+"px, "+L+"px)",...g6(P.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:T,top:L}},[n,l,P.floating,h.x,h.y]);return g.useMemo(()=>({...h,update:$,refs:I,elements:P,floatingStyles:A}),[h,$,I,P,A])}const Bee=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:a}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?lO({element:r.current,padding:a}).fn(n):{}:r?lO({element:r,padding:a}).fn(n):{}}}},Wee=(e,t)=>({...Aee(e),options:[e,t]}),qee=(e,t)=>({...Eee(e),options:[e,t]}),Uee=(e,t)=>({...Mee(e),options:[e,t]}),zee=(e,t)=>({...Oee(e),options:[e,t]}),Hee=(e,t)=>({...Ree(e),options:[e,t]}),Vee=(e,t)=>({...Iee(e),options:[e,t]}),Gee=(e,t)=>({...Bee(e),options:[e,t]});var Yee="Arrow",y6=g.forwardRef((e,t)=>{const{children:n,width:r=10,height:a=5,...i}=e;return s.jsx(we.svg,{...i,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:s.jsx("polygon",{points:"0,0 30,0 15,10"})})});y6.displayName=Yee;var Kee=y6;function gg(e){const[t,n]=g.useState(void 0);return rr(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const i=a[0];let o,l;if("borderBoxSize"in i){const c=i.borderBoxSize,u=Array.isArray(c)?c[0]:c;o=u.inlineSize,l=u.blockSize}else o=e.offsetWidth,l=e.offsetHeight;n({width:o,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var TP="Popper",[v6,Wl]=Hn(TP),[Xee,b6]=v6(TP),x6=e=>{const{__scopePopper:t,children:n}=e,[r,a]=g.useState(null);return s.jsx(Xee,{scope:t,anchor:r,onAnchorChange:a,children:n})};x6.displayName=TP;var w6="PopperAnchor",_6=g.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,i=b6(w6,n),o=g.useRef(null),l=Fe(t,o);return g.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:s.jsx(we.div,{...a,ref:l})});_6.displayName=w6;var AP="PopperContent",[Qee,Jee]=v6(AP),k6=g.forwardRef((e,t)=>
vendor: 1,384 bytes, line 686
686{var re,q,U,Q,J,Y;const{__scopePopper:n,side:r="bottom",sideOffset:a=0,align:i="center",alignOffset:o=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:h=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:p="optimized",onPlaced:y,...m}=e,v=b6(AP,n),[b,x]=g.useState(null),w=Fe(t,oe=>x(oe)),[_,k]=g.useState(null),j=gg(_),S=(j==null?void 0:j.width)??0,N=(j==null?void 0:j.height)??0,C=r+(i!=="center"?"-"+i:""),M=typeof h=="number"?h:{top:0,right:0,bottom:0,left:0,...h},O=Array.isArray(u)?u:[u],D=O.length>0,$={padding:M,boundary:O.filter(ete),altBoundary:D},{refs:R,floatingStyles:I,placement:P,isPositioned:A,middlewareData:E}=Fee({strategy:"fixed",placement:C,whileElementsMounted:(...oe)=>Tee(...oe,{animationFrame:p==="always"}),elements:{reference:v.anchor},middleware:[Wee({mainAxis:a+N,alignmentAxis:o}),c&&qee({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?Uee():void 0,...$}),c&&zee({...$}),Hee({...$,apply:({elements:oe,rects:ve,availableWidth:De,availableHeight:Le})=>{const{width:He,height:vt}=ve.reference,lt=oe.floating.style;lt.setProperty("--radix-popper-available-width",`${De}px`),lt.setProperty("--radix-popper-available-height",`${Le}px`),lt.setProperty("--radix-popper-anchor-width",`${He}px`),lt.setProperty("--radix-popper-anchor-height",`${vt}px`)}}),_&&Gee({element:_,padding:l}),tte({arrowWidth:S,arrowHeight:N}
vendor: 4,324 bytes, line 686
686),f&&Vee({strategy:"referenceHidden",...$})]}),[T,L]=N6(P),B=In(y);rr(()=>{A&&(B==null||B())},[A,B]);const H=(re=E.arrow)==null?void 0:re.x,G=(q=E.arrow)==null?void 0:q.y,Z=((U=E.arrow)==null?void 0:U.centerOffset)!==0,[le,ue]=g.useState();return rr(()=>{b&&ue(window.getComputedStyle(b).zIndex)},[b]),s.jsx("div",{ref:R.setFloating,"data-radix-popper-content-wrapper":"",style:{...I,transform:A?I.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:le,"--radix-popper-transform-origin":[(Q=E.transformOrigin)==null?void 0:Q.x,(J=E.transformOrigin)==null?void 0:J.y].join(" "),...((Y=E.hide)==null?void 0:Y.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:s.jsx(Qee,{scope:n,placedSide:T,onArrowChange:k,arrowX:H,arrowY:G,shouldHideArrow:Z,children:s.jsx(we.div,{"data-side":T,"data-align":L,...m,ref:w,style:{...m.style,animation:A?void 0:"none"}})})})});k6.displayName=AP;var j6="PopperArrow",Zee={top:"bottom",right:"left",bottom:"top",left:"right"},S6=g.forwardRef(function(t,n){const{__scopePopper:r,...a}=t,i=Jee(j6,r),o=Zee[i.placedSide];return s.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:s.jsx(Kee,{...a,ref:n,style:{...a.style,display:"block"}})})});S6.displayName=j6;function ete(e){return e!==null}var tte=e=>({name:"transformOrigin",options:e,fn(t){var v,b,x;const{placement:n,rects:r,middlewareData:a}=t,o=((v=a.arrow)==null?void 0:v.centerOffset)!==0,l=o?0:e.arrowWidth,c=o?0:e.arrowHeight,[u,h]=N6(n),d={start:"0%",center:"50%",end:"100%"}[h],f=(((b=a.arrow)==null?void 0:b.x)??0)+l/2,p=(((x=a.arrow)==null?void 0:x.y)??0)+c/2;let y="",m="";return u==="bottom"?(y=o?d:`${f}px`,m=`${-c}px`):u==="top"?(y=o?d:`${f}px`,m=`${r.floating.height+c}px`):u==="right"?(y=`${-c}px`,m=o?d:`${p}px`):u==="left"&&(y=`${r.floating.width+c}px`,m=o?d:`${p}px`),{data:{x:y,y:m}}}});function N6(e){const[t,n="center"]=e.split("-");return[t,n]}var Nw=x6,yg=_6,Cw=k6,Pw=S6,[Tw,lHe]=Hn("Tooltip",[Wl]),Aw=Wl(),C6="TooltipProvider",nte=700,wj="tooltip.open",[rte,EP]=Tw(C6),P6=e=>{const{__scopeTooltip:t,delayDuration:n=nte,skipDelayDuration:r=300,disableHoverableContent:a=!1,children:i}=e,o=g.useRef(!0),l=g.useRef(!1),c=g.useRef(0);return g.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),s.jsx(rte,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:g.useCallback(()=>{window.clearTimeout(c.current),o.current=!1},[]),onClose:g.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:g.useCallback(u=>{l.current=u},[]),disableHoverableContent:a,children:i})};P6.displayName=C6;var Vp="Tooltip",[ate,Ew]=Tw(Vp),T6=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:a,onOpenChange:i,disableHoverableContent:o,delayDuration:l}=e,c=EP(Vp,e.__scopeTooltip),u=Aw(t),[h,d]=g.useState(null),f=Oa(),p=g.useRef(0),y=o??c.disableHoverableContent,m=l??c.delayDuration,v=g.useRef(!1),[b,x]=ba({prop:r,defaultProp:a??!1,onChange:S=>{S?(c.onOpen(),document.dispatchEvent(new CustomEvent(wj))):c.onClose(),i==null||i(S)},caller:Vp}),w=g.useMemo(()=>b?v.current?"delayed-open":"instant-open":"closed",[b]),_=g.useCallback(()=>{window.clearTimeout(p.current),p.current=0,v.current=!1,x(!0)},[x]),k=g.useCallback(()=>{window.clearTimeout(p.current),p.current=0,x(!1)},[x]),j=g.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{v.current=!0,x(!0),p.current=0},m)},[m,x]);return g.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),s.jsx(Nw,{...u,children:s.jsx(ate,{scope:t,contentId:f,open:b,stateAttribute:w,trigger:h,onTriggerChange:d,onTriggerEnter:g.useCallback(()=>{c.isOpenDelayedRef.current?j():_()},[c.isOpenDelayedRef,j,_]),onTriggerLeave:g.useCallback(()=>{y?k():(window.clearTimeout(p.current),p.current=0)},[k,y]),onOpen:_,onClose:k,disableHoverableContent:y,children:n})})};T6.displayName=Vp;var _j="TooltipTrigger",A6=g.forwardRef((e,t)=>
vendor: 4,450 bytes, line 686
686{const{__scopeTooltip:n,...r}=e,a=Ew(_j,n),i=EP(_j,n),o=Aw(n),l=g.useRef(null),c=Fe(t,l,a.onTriggerChange),u=g.useRef(!1),h=g.useRef(!1),d=g.useCallback(()=>u.current=!1,[]);return g.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),s.jsx(yg,{asChild:!0,...o,children:s.jsx(we.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...r,ref:c,onPointerMove:de(e.onPointerMove,f=>{f.pointerType!=="touch"&&!h.current&&!i.isPointerInTransitRef.current&&(a.onTriggerEnter(),h.current=!0)}),onPointerLeave:de(e.onPointerLeave,()=>{a.onTriggerLeave(),h.current=!1}),onPointerDown:de(e.onPointerDown,()=>{a.open&&a.onClose(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:de(e.onFocus,()=>{u.current||a.onOpen()}),onBlur:de(e.onBlur,a.onClose),onClick:de(e.onClick,a.onClose)})})});A6.displayName=_j;var ste="TooltipPortal",[cHe,ite]=Tw(ste,{forceMount:void 0}),eh="TooltipContent",E6=g.forwardRef((e,t)=>{const n=ite(eh,e.__scopeTooltip),{forceMount:r=n.forceMount,side:a="top",...i}=e,o=Ew(eh,e.__scopeTooltip);return s.jsx(Vn,{present:r||o.open,children:o.disableHoverableContent?s.jsx(O6,{side:a,...i,ref:t}):s.jsx(ote,{side:a,...i,ref:t})})}),ote=g.forwardRef((e,t)=>{const n=Ew(eh,e.__scopeTooltip),r=EP(eh,e.__scopeTooltip),a=g.useRef(null),i=Fe(t,a),[o,l]=g.useState(null),{trigger:c,onClose:u}=n,h=a.current,{onPointerInTransitChange:d}=r,f=g.useCallback(()=>{l(null),d(!1)},[d]),p=g.useCallback((y,m)=>{const v=y.currentTarget,b={x:y.clientX,y:y.clientY},x=hte(b,v.getBoundingClientRect()),w=fte(b,x),_=pte(m.getBoundingClientRect()),k=gte([...w,..._]);l(k),d(!0)},[d]);return g.useEffect(()=>()=>f(),[f]),g.useEffect(()=>{if(c&&h){const y=v=>p(v,h),m=v=>p(v,c);return c.addEventListener("pointerleave",y),h.addEventListener("pointerleave",m),()=>{c.removeEventListener("pointerleave",y),h.removeEventListener("pointerleave",m)}}},[c,h,p,f]),g.useEffect(()=>{if(o){const y=m=>{const v=m.target,b={x:m.clientX,y:m.clientY},x=(c==null?void 0:c.contains(v))||(h==null?void 0:h.contains(v)),w=!mte(b,o);x?f():w&&(f(),u())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[c,h,o,u,f]),s.jsx(O6,{...e,ref:i})}),[lte,cte]=Tw(Vp,{isInside:!1}),ute=dF("TooltipContent"),O6=g.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":a,onEscapeKeyDown:i,onPointerDownOutside:o,...l}=e,c=Ew(eh,n),u=Aw(n),{onClose:h}=c;return g.useEffect(()=>(document.addEventListener(wj,h),()=>document.removeEventListener(wj,h)),[h]),g.useEffect(()=>{if(c.trigger){const d=f=>{const p=f.target;p!=null&&p.contains(c.trigger)&&h()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[c.trigger,h]),s.jsx(mu,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:d=>d.preventDefault(),onDismiss:h,children:s.jsxs(Cw,{"data-state":c.stateAttribute,...u,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[s.jsx(ute,{children:r}),s.jsx(lte,{scope:n,isInside:!0,children:s.jsx(wQ,{id:c.contentId,role:"tooltip",children:a||r})})]})})});E6.displayName=eh;var R6="TooltipArrow",dte=g.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,a=Aw(n);return cte(R6,n).isInside?null:s.jsx(Pw,{...a,...r,ref:t})});dte.displayName=R6;function hte(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),a=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,a,i)){case i:return"left";case a:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function fte(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function pte(e){const{top:t,right:n,bottom:r,left:a}=e;return[{x:a,y:t},{x:n,y:t},{x:n,y:r},{x:a,y:r}]}function mte(e,t){const{x:n,y:r}=e;let a=!1;for(let i=0,o=t.length-1;i<t.length;
686o=i++){const l=t[i],c=t[o],u=l.x,h=l.y,d=c.x,f=c.y;h>r!=f>r&&n<(d-u)*(r-h)/(f-h)+u&&(a=!a)}return a}function gte(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),yte(t)}function yte(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const a=e[r];for(;t.length>=2;){const i=t[t.length-1],o=t[t.length-2];if((i.x-o.x)*(a.y-o.y)>=(i.y-o.y)*(a.x-o.x))t.pop();else break}t.push(a)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const a=e[r];for(;n.length>=2;){const i=n[n.length-1],o=n[n.length-2];if((i.x-o.x)*(a.y-o.y)>=(i.y-o.y)*(a.x-o.x))n.pop();else break}n.push(a)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var vte=P6,bte=T6,xte=A6,I6=E6;const OP=vte,Nv=bte,Cv=xte,dp=g.forwardRef(({className:e,sideOffset:t=4,...n},r)=>s.jsx(I6,{ref:r,sideOffset:t,className:K("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));dp.displayName=I6.displayName;var $h=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},eu=typeof window>"u"||"Deno"in globalThis;function Kr(){}function wte(e,t){return typeof e=="function"?e(t):e}function kj(e){return typeof e=="number"&&e>=0&&e!==1/0}function M6(e,t){return Math.max(e+(t||0)-Date.now(),0)}function jl(e,t){return typeof e=="function"?e(t):e}function Va(e,t){return typeof e=="function"?e(t):e}function uO(e,t){const{type:n="all",exact:r,fetchStatus:a,predicate:i,queryKey:o,stale:l}=e;if(o){if(r){if(t.queryHash!==RP(o,t.options))return!1}else if(!Gp(t.queryKey,o))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||a&&a!==t.state.fetchStatus||i&&!i(t))}function dO(e,t){const{exact:n,status:r,predicate:a,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(tu(t.options.mutationKey)!==tu(i))return!1}else if(!Gp(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||a&&!a(t))}function RP(e,t){return((t==null?void 0:t.queryKeyHashFn)||tu)(e)}function tu(e){return JSON.stringify(e,(t,n)=>jj(n)?Object.keys(n).sort().reduce((r,a)=>(r[a]=n[a],r),{}):n)}function Gp(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Gp(e[n],t[n])):!1}function D6(e,t){if(e===t)return e;const n=hO(e)&&hO(t);if(n||jj(e)&&jj(t)){const r=n?e:Object.keys(e),a=r.length,i=n?t:Object.keys(t),o=i.length,l=n?[]:{},c=new Set(r);let u=0;for(let h=0;h<o;h++){const d=n?h:i[h];(!n&&c.has(d)||n)&&e[d]===void 0&&t[d]===void 0?(l[d]=void 0,u++):(l[d]=D6(e[d],t[d]),l[d]===e[d]&&e[d]!==void 0&&u++)}return a===o&&u===a?e:l}return t}function gb(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function hO(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function jj(e){if(!fO(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!fO(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function fO(e){return Object.prototype.toString.call(e)==="[object Object]"}function _te(e){return new Promise(t=>{setTimeout(t,e)})}function Sj(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?D6(e,t):t}function kte(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function jte(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var IP=Symbol();function $6(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===IP?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function L6(e,t){return typeof e=="function"?e(...t):!!e}var Cc,el,Ed,B3,Ste=(B3=class extends $h{constructor(){super();Be(this,Cc);Be(this,el);Be(this,Ed);_e(this,Ed,t=>{if(!eu&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){V(this,el)||this.setEventListener(V(this,Ed))}onUnsubscribe(){var t;this.hasListeners()||((t=V(this,el))==null||t.call(this),_e(this,el,void 0))}setEventListener(t){var n;_e(this,Ed,t),(n=V(this,el))==null||n.call(this),_e(this,el,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){V(this,Cc)!==t&&(_e(this,Cc,t),this.onFocus())}onFocus(){const t=this.isFocused();
vendor: 4,608 bytes, line 686
686this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof V(this,Cc)=="boolean"?V(this,Cc):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Cc=new WeakMap,el=new WeakMap,Ed=new WeakMap,B3),MP=new Ste,Od,tl,Rd,W3,Nte=(W3=class extends $h{constructor(){super();Be(this,Od,!0);Be(this,tl);Be(this,Rd);_e(this,Rd,t=>{if(!eu&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){V(this,tl)||this.setEventListener(V(this,Rd))}onUnsubscribe(){var t;this.hasListeners()||((t=V(this,tl))==null||t.call(this),_e(this,tl,void 0))}setEventListener(t){var n;_e(this,Rd,t),(n=V(this,tl))==null||n.call(this),_e(this,tl,t(this.setOnline.bind(this)))}setOnline(t){V(this,Od)!==t&&(_e(this,Od,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return V(this,Od)}},Od=new WeakMap,tl=new WeakMap,Rd=new WeakMap,W3),yb=new Nte;function Nj(){let e,t;const n=new Promise((a,i)=>{e=a,t=i});n.status="pending",n.catch(()=>{});function r(a){Object.assign(n,a),delete n.resolve,delete n.reject}return n.resolve=a=>{r({status:"fulfilled",value:a}),e(a)},n.reject=a=>{r({status:"rejected",reason:a}),t(a)},n}function Cte(e){return Math.min(1e3*2**e,3e4)}function F6(e){return(e??"online")==="online"?yb.isOnline():!0}var B6=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function U_(e){return e instanceof B6}function W6(e){let t=!1,n=0,r=!1,a;const i=Nj(),o=m=>{var v;r||(f(new B6(m)),(v=e.abort)==null||v.call(e))},l=()=>{t=!0},c=()=>{t=!1},u=()=>MP.isFocused()&&(e.networkMode==="always"||yb.isOnline())&&e.canRun(),h=()=>F6(e.networkMode)&&e.canRun(),d=m=>{var v;r||(r=!0,(v=e.onSuccess)==null||v.call(e,m),a==null||a(),i.resolve(m))},f=m=>{var v;r||(r=!0,(v=e.onError)==null||v.call(e,m),a==null||a(),i.reject(m))},p=()=>new Promise(m=>{var v;a=b=>{(r||u())&&m(b)},(v=e.onPause)==null||v.call(e)}).then(()=>{var m;a=void 0,r||(m=e.onContinue)==null||m.call(e)}),y=()=>{if(r)return;let m;const v=n===0?e.initialPromise:void 0;try{m=v??e.fn()}catch(b){m=Promise.reject(b)}Promise.resolve(m).then(d).catch(b=>{var j;if(r)return;const x=e.retry??(eu?0:3),w=e.retryDelay??Cte,_=typeof w=="function"?w(n,b):w,k=x===!0||typeof x=="number"&&n<x||typeof x=="function"&&x(n,b);if(t||!k){f(b);return}n++,(j=e.onFail)==null||j.call(e,n,b),_te(_).then(()=>u()?void 0:p()).then(()=>{t?f(b):y()})})};return{promise:i,cancel:o,continue:()=>(a==null||a(),i),cancelRetry:l,continueRetry:c,canStart:h,start:()=>(h()?y():p().then(y),i)}}var Pte=e=>setTimeout(e,0);function Tte(){let e=[],t=0,n=l=>{l()},r=l=>{l()},a=Pte;const i=l=>{t?e.push(l):a(()=>{n(l)})},o=()=>{const l=e;e=[],l.length&&a(()=>{r(()=>{l.forEach(c=>{n(c)})})})};return{batch:l=>{let c;t++;try{c=l()}finally{t--,t||o()}return c},batchCalls:l=>(...c)=>{i(()=>{l(...c)})},schedule:i,setNotifyFunction:l=>{n=l},setBatchNotifyFunction:l=>{r=l},setScheduler:l=>{a=l}}}var er=Tte(),Pc,q3,q6=(q3=class{constructor(){Be(this,Pc)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),kj(this.gcTime)&&_e(this,Pc,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(eu?1/0:5*60*1e3))}clearGcTimeout(){V(this,Pc)&&(clearTimeout(V(this,Pc)),_e(this,Pc,void 0))}},Pc=new WeakMap,q3),Id,Tc,Ha,Ac,Or,tg,Ec,Ss,Hi,U3,Ate=(U3=class extends q6{constructor(t){super();Be(this,Ss);Be(this,Id);Be(this,Tc);Be(this,Ha);Be(this,Ac);Be(this,Or);Be(this,tg);Be(this,Ec);_e(this,Ec,!1),_e(this,tg,t.defaultOptions),this.setOptions(t.options),this.observers=[],_e(this,Ac,t.client),_e(this,Ha,V(this,Ac).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,_e(this,Id,Ete(this.options)),this.state=t.state??V(this,Id),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=V(this,Or))==null?void 0:t.promise}setOptions(t){this.options={...V(this,tg),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&V(this,Ha).remove(this)}setData(t,n){const r=Sj(this.state.data,t,this.options);return at(this,Ss,Hi).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){at(this,Ss,Hi).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,a;const n=(r=V(this,Or))==null?void 0:r.promise;return(a=V(this,Or))==null||a.cancel(t),n?n.then(Kr).catch(Kr):Prom
vendor: 1,602 bytes, line 686
686ise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(V(this,Id))}isActive(){return this.observers.some(t=>Va(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===IP||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>jl(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!M6(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=V(this,Or))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=V(this,Or))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),V(this,Ha).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(V(this,Or)&&(V(this,Ec)?V(this,Or).cancel({revert:!0}):V(this,Or).cancelRetry()),this.scheduleGc()),V(this,Ha).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||at(this,Ss,Hi).call(this,{type:"invalidate"})}
vendor: 26,569 bytes, line 686
686fetch(t,n){var u,h,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(V(this,Or))return V(this,Or).continueRetry(),V(this,Or).promise}if(t&&this.setOptions(t),!this.options.queryFn){const f=this.observers.find(p=>p.options.queryFn);f&&this.setOptions(f.options)}const r=new AbortController,a=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(_e(this,Ec,!0),r.signal)})},i=()=>{const f=$6(this.options,n),y=(()=>{const m={client:V(this,Ac),queryKey:this.queryKey,meta:this.meta};return a(m),m})();return _e(this,Ec,!1),this.options.persister?this.options.persister(f,y,this):f(y)},l=(()=>{const f={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:V(this,Ac),state:this.state,fetchFn:i};return a(f),f})();(u=this.options.behavior)==null||u.onFetch(l,this),_e(this,Tc,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((h=l.fetchOptions)==null?void 0:h.meta))&&at(this,Ss,Hi).call(this,{type:"fetch",meta:(d=l.fetchOptions)==null?void 0:d.meta});const c=f=>{var p,y,m,v;U_(f)&&f.silent||at(this,Ss,Hi).call(this,{type:"error",error:f}),U_(f)||((y=(p=V(this,Ha).config).onError)==null||y.call(p,f,this),(v=(m=V(this,Ha).config).onSettled)==null||v.call(m,this.state.data,f,this)),this.scheduleGc()};return _e(this,Or,W6({initialPromise:n==null?void 0:n.initialPromise,fn:l.fetchFn,abort:r.abort.bind(r),onSuccess:f=>{var p,y,m,v;if(f===void 0){c(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(b){c(b);return}(y=(p=V(this,Ha).config).onSuccess)==null||y.call(p,f,this),(v=(m=V(this,Ha).config).onSettled)==null||v.call(m,f,this.state.error,this),this.scheduleGc()},onError:c,onFail:(f,p)=>{at(this,Ss,Hi).call(this,{type:"failed",failureCount:f,error:p})},onPause:()=>{at(this,Ss,Hi).call(this,{type:"pause"})},onContinue:()=>{at(this,Ss,Hi).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0})),V(this,Or).start()}},Id=new WeakMap,Tc=new WeakMap,Ha=new WeakMap,Ac=new WeakMap,Or=new WeakMap,tg=new WeakMap,Ec=new WeakMap,Ss=new WeakSet,Hi=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...U6(r.data,this.options),fetchMeta:t.meta??null};case"success":return _e(this,Tc,void 0),{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const a=t.error;return U_(a)&&a.revert&&V(this,Tc)?{...V(this,Tc),fetchStatus:"idle"}:{...r,error:a,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),er.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),V(this,Ha).notify({query:this,type:"updated",action:t})})},U3);function U6(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:F6(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Ete(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var ei,z3,Ote=(z3=class extends $h{constructor(t={}){super();Be(this,ei);this.config=t,_e(this,ei,new Map)}build(t,n,r){const a=n.queryKey,i=n.queryHash??RP(a,n);let o=this.get(i);return o||(o=new Ate({client:t,queryKey:a,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(a)}),this.add(o)),o}add(t){V(this,ei).has(t.queryHash)||(V(this,ei).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=V(this,ei).get(t.queryHash);n&&(t.destroy(),n===t&&V(this,ei).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){er.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return V(this,ei).get(t)}getAll(){return[...V(this,ei).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>uO(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>uO(t,r)):n}notify(t){er.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){er.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){er.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},ei=new WeakMap,z3),ti,Vr,Oc,ni,qo,H3,Rte=(H3=class extends q6{constructor(t){super();Be(this,ni);Be(this,ti);Be(this,Vr);Be(this,Oc);this.mutationId=t.mutationId,_e(this,Vr,t.mutationCache),_e(this,ti,[]),this.state=t.state||z6(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){V(this,ti).includes(t)||(V(this,ti).push(t),this.clearGcTimeout(),V(this,Vr).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){_e(this,ti,V(this,ti).filter(n=>n!==t)),this.scheduleGc(),V(this,Vr).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){V(this,ti).length||(this.state.status==="pending"?this.scheduleGc():V(this,Vr).remove(this))}continue(){var t;return((t=V(this,Oc))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,o,l,c,u,h,d,f,p,y,m,v,b,x,w,_,k,j,S,N;const n=()=>{at(this,ni,qo).call(this,{type:"continue"})};_e(this,Oc,W6({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(C,M)=>{at(this,ni,qo).call(this,{type:"failed",failureCount:C,error:M})},onPause:()=>{at(this,ni,qo).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>V(this,Vr).canRun(this)}));const r=this.state.status==="pending",a=!V(this,Oc).canStart();try{if(r)n();else{at(this,ni,qo).call(this,{type:"pending",variables:t,isPaused:a}),await((o=(i=V(this,Vr).config).onMutate)==null?void 0:o.call(i,t,this));const M=await((c=(l=this.options).onMutate)==null?void 0:c.call(l,t));M!==this.state.context&&at(this,ni,qo).call(this,{type:"pending",context:M,variables:t,isPaused:a})}const C=await V(this,Oc).start();return await((h=(u=V(this,Vr).config).onSuccess)==null?void 0:h.call(u,C,t,this.state.context,this)),await((f=(d=this.options).onSuccess)==null?void 0:f.call(d,C,t,this.state.context)),await((y=(p=V(this,Vr).config).onSettled)==null?void 0:y.call(p,C,null,this.state.variables,this.state.context,this)),await((v=(m=this.options).onSettled)==null?void 0:v.call(m,C,null,t,this.state.context)),at(this,ni,qo).call(this,{type:"success",data:C}),C}catch(C){try{throw await((x=(b=V(this,Vr).config).onError)==null?void 0:x.call(b,C,t,this.state.context,this)),await((_=(w=this.options).onError)==null?void 0:_.call(w,C,t,this.state.context)),await((j=(k=V(this,Vr).config).onSettled)==null?void 0:j.call(k,void 0,C,this.state.variables,this.state.context,this)),await((N=(S=this.options).onSettled)==null?void 0:N.call(S,void 0,C,t,this.state.context)),C}finally{at(this,ni,qo).call(this,{type:"error",error:C})}}finally{V(this,Vr).runNext(this)}}},ti=new WeakMap,Vr=new WeakMap,Oc=new WeakMap,ni=new WeakSet,qo=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),er.batch(()=>{V(this,ti).forEach(r=>{r.onMutationUpdate(t)}),V(this,Vr).notify({mutation:this,type:"updated",action:t})})},H3);function z6(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Zi,Ns,ng,V3,Ite=(V3=class extends $h{constructor(t={}){super();Be(this,Zi);Be(this,Ns);Be(this,ng);this.config=t,_e(this,Zi,new Set),_e(this,Ns,new Map),_e(this,ng,0)}build(t,n,r){const a=new Rte({mutationCache:this,mutationId:++Zg(this,ng)._,options:t.defaultMutationOptions(n),state:r});return this.add(a),a}add(t){V(this,Zi).add(t);const n=_y(t);if(typeof n=="string"){const r=V(this,Ns).get(n);r?r.push(t):V(this,Ns).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(V(this,Zi).delete(t)){const n=_y(t);if(typeof n=="string"){const r=V(this,Ns).get(n);if(r)if(r.length>1){const a=r.indexOf(t);a!==-1&&r.splice(a,1)}else r[0]===t&&V(this,Ns).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=_y(t);if(typeof n=="string"){const r=V(this,Ns).get(n),a=r==null?void 0:r.find(i=>i.state.status==="pending");return!a||a===t}else return!0}runNext(t){var r;const n=_y(t);if(typeof n=="string"){const a=(r=V(this,Ns).get(n))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){er.batch(()=>{V(this,Zi).forEach(t=>{this.notify({type:"removed",mutation:t})}),V(this,Zi).clear(),V(this,Ns).clear()})}getAll(){return Array.from(V(this,Zi))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>dO(n,r))}findAll(t={}){return this.getAll().filter(n=>dO(t,n))}notify(t){er.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return er.batch(()=>Promise.all(t.map(n=>n.continue().catch(Kr))))}},Zi=new WeakMap,Ns=new WeakMap,ng=new WeakMap,V3);function _y(e){var t;return(t=e.options.scope)==null?void 0:t.id}function pO(e){return{onFetch:(t,n)=>{var h,d,f,p,y;const r=t.options,a=(f=(d=(h=t.fetchOptions)==null?void 0:h.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,i=((p=t.state.data)==null?void 0:p.pages)||[],o=((y=t.state.data)==null?void 0:y.pageParams)||[];let l={pages:[],pageParams:[]},c=0;const u=async()=>{let m=!1;const v=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},b=$6(t.options,t.fetchOptions),x=async(w,_,k)=>{if(m)return Promise.reject();if(_==null&&w.pages.length)return Promise.resolve(w);const S=(()=>{const O={client:t.client,queryKey:t.queryKey,pageParam:_,direction:k?"backward":"forward",meta:t.options.meta};return v(O),O})(),N=await b(S),{maxPages:C}=t.options,M=k?jte:kte;return{pages:M(w.pages,N,C),pageParams:M(w.pageParams,_,C)}};if(a&&i.length){const w=a==="backward",_=w?Mte:mO,k={pages:i,pageParams:o},j=_(r,k);l=await x(k,j,w)}else{const w=e??i.length;do{const _=c===0?o[0]??r.initialPageParam:mO(r,l);if(c>0&&_==null)break;l=await x(l,_),c++}while(c<w)}return l};t.options.persister?t.fetchFn=()=>{var m,v;return(v=(m=t.options).persister)==null?void 0:v.call(m,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function mO(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Mte(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Sn,nl,rl,Md,Dd,al,$d,Ld,G3,Dte=(G3=class{constructor(e={}){Be(this,Sn);Be(this,nl);Be(this,rl);Be(this,Md);Be(this,Dd);Be(this,al);Be(this,$d);Be(this,Ld);_e(this,Sn,e.queryCache||new Ote),_e(this,nl,e.mutationCache||new Ite),_e(this,rl,e.defaultOptions||{}),_e(this,Md,new Map),_e(this,Dd,new Map),_e(this,al,0)}mount(){Zg(this,al)._++,V(this,al)===1&&(_e(this,$d,MP.subscribe(async e=>{e&&(await this.resumePausedMutations(),V(this,Sn).onFocus())})),_e(this,Ld,yb.subscribe(async e=>{e&&(await this.resumePausedMutations(),V(this,Sn).onOnline())})))}unmount(){var e,t;Zg(this,al)._--,V(this,al)===0&&((e=V(this,$d))==null||e.call(this),_e(this,$d,void 0),(t=V(this,Ld))==null||t.call(this),_e(this,Ld,void 0))}isFetching(e){return V(this,Sn).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return V(this,nl).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=V(this,Sn).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=V(this,Sn).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(jl(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return V(this,Sn).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),a=V(this,Sn).get(r.queryHash),i=a==null?void 0:a.state.data,o=wte(t,i);if(o!==void 0)return V(this,Sn).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return er.batch(()=>V(this,Sn).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=V(this,Sn).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=V(this,Sn);er.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=V(this,Sn);return er.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=er.batch(()=>V(this,Sn).findAll(e).map(a=>a.cancel(n)));return Promise.all(r).then(Kr).catch(Kr)}invalidateQueries(e,t={}){return er.batch(()=>(V(this,Sn).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=er.batch(()=>V(this,Sn).findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let i=a.fetch(void 0,n);return n.throwOnError||(i=i.catch(Kr)),a.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Kr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=V(this,Sn).build(this,t);return n.isStaleByTime(jl(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Kr).catch(Kr)}fetchInfiniteQuery(e){return e.behavior=pO(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Kr).catch(Kr)}ensureInfiniteQueryData(e){return e.behavior=pO(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return yb.isOnline()?V(this,nl).resumePausedMutations():Promise.resolve()}getQueryCache(){return V(this,Sn)}getMutationCache(){return V(this,nl)}getDefaultOptions(){return V(this,rl)}setDefaultOptions(e){_e(this,rl,e)}setQueryDefaults(e,t){V(this,Md).set(tu(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...V(this,Md).values()],n={};return t.forEach(r=>{Gp(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){V(this,Dd).set(tu(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...V(this,Dd).values()],n={};return t.forEach(r=>{Gp(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...V(this,rl).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=RP(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===IP&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...V(this,rl).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){V(this,Sn).clear(),V(this,nl).clear()}},Sn=new WeakMap,nl=new WeakMap,rl=new WeakMap,Md=new WeakMap,Dd=new WeakMap,al=new WeakMap,$d=new WeakMap,Ld=new WeakMap,G3),ia,wt,rg,Gr,Rc,Fd,sl,il,ag,Bd,Wd,Ic,Mc,ol,qd,Lt,Gf,Cj,Pj,Tj,Aj,Ej,Oj,Rj,H6,Y3,$te=(Y3=class extends $h{constructor(t,n){super();Be(this,Lt);Be(this,ia);Be(this,wt);Be(this,rg);Be(this,Gr);Be(this,Rc);Be(this,Fd);Be(this,sl);Be(this,il);Be(this,ag);Be(this,Bd);Be(this,Wd);Be(this,Ic);Be(this,Mc);Be(this,ol);Be(this,qd,new Set);this.options=n,_e(this,ia,t),_e(this,il,null),_e(this,sl,Nj()),this.options.experimental_prefetchInRender||V(this,sl).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(V(this,wt).addObserver(this),gO(V(this,wt),this.options)?at(this,Lt,Gf).call(this):this.updateResult(),at(this,Lt,Aj).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ij(V(this,wt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ij(V(this,wt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,at(this,Lt,Ej).call(this),at(this,Lt,Oj).call(this),V(this,wt).removeObserver(this)}setOptions(t){const n=this.options,r=V(this,wt);if(this.options=V(this,ia).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Va(this.options.enabled,V(this,wt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");at(this,Lt,Rj).call(this),V(this,wt).setOptions(this.options),n._defaulted&&!gb(this.options,n)&&V(this,ia).getQueryCache().notify({type:"observerOptionsUpdated",query:V(this,wt),observer:this});const a=this.hasListeners();a&&yO(V(this,wt),r,this.options,n)&&at(this,Lt,Gf).call(this),this.updateResult(),a&&(V(this,wt)!==r||Va(this.options.enabled,V(this,wt))!==Va(n.enabled,V(this,wt))||jl(this.options.staleTime,V(this,wt))!==jl(n.staleTime,V(this,wt)))&&at(this,Lt,Cj).call(this);const i=at(this,Lt,Pj).call(this);a&&(V(this,wt)!==r||Va(this.options.enabled,V(this,wt))!==Va(n.enabled,V(this,wt))||i!==V(this,ol))&&at(this,Lt,Tj).call(this,i)}getOptimisticResult(t){const n=V(this,ia).getQueryCache().build(V(this,ia),t),r=this.createResult(n,t);return Fte(this,r)&&(_e(this,Gr,r),_e(this,Fd,this.options),_e(this,Rc,V(this,wt).state)),r}getCurrentResult(){return V(this,Gr)}trackResult(t,n){return new Proxy(t,{get:(r,a)=>(this.trackProp(a),n==null||n(a),Reflect.get(r,a))})}trackProp(t){V(this,qd).add(t)}getCurrentQuery(){return V(this,wt)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=V(this,ia).defaultQueryOptions(t),r=V(this,ia).getQueryCache().build(V(this,ia),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return at(this,Lt,Gf).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),V(this,Gr)))}createResult(t,n){var C;const r=V(this,wt),a=this.options,i=V(this,Gr),o=V(this,Rc),l=V(this,Fd),u=t!==r?t.state:V(this,rg),{state:h}=t;let d={...h},f=!1,p;if(n._optimisticResults){const M=this.hasListeners(),O=!M&&gO(t,n),D=M&&yO(t,r,n,a);(O||D)&&(d={...d,...U6(h.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:y,errorUpdatedAt:m,status:v}=d;p=d.data;let b=!1;if(n.placeholderData!==void 0&&p===void 0&&v==="pending"){let M;i!=null&&i.isPlaceholderData&&n.placeholderData===(l==null?void 0:l.placeholderData)?(M=i.data,b=!0):M=typeof n.placeholderData=="function"?n.placeholderData((C=V(this,Wd))==null?void 0:C.state.data,V(this,Wd)):n.placeholderData,M!==void 0&&(v="success",p=Sj(i==null?void 0:i.data,M,n),f=!0)}if(n.select&&p!==void 0&&!b)if(i&&p===(o==null?void 0:o.data)&&n.select===V(this,ag))p=V(this,Bd);else try{_e(this,ag,n.select),p=n.select(p),p=Sj(i==null?void 0:i.data,p,n),_e(this,Bd,p),_e(this,il,null)}catch(M){_e(this,il,M)}V(this,il)&&(y=V(this,il),p=V(this,Bd),m=Date.now(),v="error");const x=d.fetchStatus==="fetching",w=v==="pending",_=v==="error",k=w&&x,j=p!==void 0,N={status:v,fetchStatus:d.fetchStatus,isPending:w,isSuccess:v==="success",isError:_,isInitialLoading:k,isLoading:k,data:p,dataUpdatedAt:d.dataUpdatedAt,error:y,errorUpdatedAt:m,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>u.dataUpdateCount||d.errorUpdateCount>u.errorUpdateCount,isFetching:x,isRefetching:x&&!w,isLoadingError:_&&!j,isPaused:d.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:_&&j,isStale:DP(t,n),refetch:this.refetch,promise:V(this,sl),isEnabled:Va(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const M=$=>{N.status==="error"?$.reject(N.error):N.data!==void 0&&$.resolve(N.data)},O=()=>{const $=_e(this,sl,N.promise=Nj());M($)},D=V(this,sl);switch(D.status){case"pending":t.queryHash===r.queryHash&&M(D);break;case"fulfilled":(N.status==="error"||N.data!==D.value)&&O();break;case"rejected":(N.status!=="error"||N.error!==D.reason)&&O();break}}return N}updateResult(){const t=V(this,Gr),n=this.createResult(V(this,wt),this.options);if(_e(this,Rc,V(this,wt).state),_e(this,Fd,this.options),V(this,Rc).data!==void 0&&_e(this,Wd,V(this,wt)),gb(n,t))return;_e(this,Gr,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,i=typeof a=="function"?a():a;if(i==="all"||!i&&!V(this,qd).size)return!0;const o=new Set(i??V(this,qd));return this.options.throwOnError&&o.add("error"),Object.keys(V(this,Gr)).some(l=>{const c=l;return V(this,Gr)[c]!==t[c]&&o.has(c)})};at(this,Lt,H6).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&at(this,Lt,Aj).call(this)}},ia=new WeakMap,wt=new WeakMap,rg=new WeakMap,Gr=new WeakMap,Rc=new WeakMap,Fd=new WeakMap,sl=new WeakMap,il=new WeakMap,ag=new WeakMap,Bd=new WeakMap,Wd=new WeakMap,Ic=new WeakMap,Mc=new WeakMap,ol=new WeakMap,qd=new WeakMap,Lt=new WeakSet,Gf=function(t){at(this,Lt,Rj).call(this);let n=V(this,wt).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Kr)),n},Cj=function(){at(this,Lt,Ej).call(this);const t=jl(this.options.staleTime,V(this,wt));if(eu||V(this,Gr).isStale||!kj(t))return;const r=M6(V(this,Gr).dataUpdatedAt,t)+1;_e(this,Ic,setTimeout(()=>{V(this,Gr).isStale||this.updateResult()},r))},Pj=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(V(this,wt)):this.options.refetchInterval)??!1},Tj=function(t){at(this,Lt,Oj).call(this),_e(this,ol,t),!(eu||Va(this.options.enabled,V(this,wt))===!1||!kj(V(this,ol))||V(this,ol)===0)&&_e(this,Mc,setInterval(()=>{(this.options.refetchIntervalInBackground||MP.isFocused())&&at(this,Lt,Gf).call(this)},V(this,ol)))},Aj=function(){at(this,Lt,Cj).call(this),at(this,Lt,Tj).call(this,at(this,Lt,Pj).call(this))},Ej=function(){V(this,Ic)&&(clearTimeout(V(this,Ic)),_e(this,Ic,void 0))},Oj=function(){V(this,Mc)&&(clearInterval(V(this,Mc)),_e(this,Mc,void 0))},Rj=function(){const t=V(this,ia).getQueryCache().build(V(this,ia),this.options);if(t===V(this,wt))return;const n=V(this,wt);_e(this,wt,t),_e(this,rg,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},H6=function(t){er.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(V(this,Gr))}),V(this,ia).getQueryCache().notify({query:V(this,wt),type:"observerResultsUpdated"})})},Y3);function Lte(e,t){return Va(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function gO(e,t){return Lte(e,t)||e.state.data!==void 0&&Ij(e,t,t.refetchOnMount)}function Ij(e,t,n){if(Va(t.enabled,e)!==!1&&jl(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&DP(e,t)}return!1}function yO(e,t,n,r){return(e!==t||Va(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&DP(e,n)}function DP(e,t){return Va(t.enabled,e)!==!1&&e.isStaleByTime(jl(t.staleTime,e))}function Fte(e,t){return!gb(e.getCurrentResult(),t)}var ll,cl,oa,eo,mo,Pv,Mj,K3,Bte=(K3=class extends $h{constructor(n,r){super();Be(this,mo);Be(this,ll);Be(this,cl);Be(this,oa);Be(this,eo);_e(this,ll,n),this.setOptions(r),this.bindMethods(),at(this,mo,Pv).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var a;const r=this.options;this.options=V(this,ll).defaultMutationOptions(n),gb(this.options,r)||V(this,ll).getMutationCache().notify({type:"observerOptionsUpdated",mutation:V(this,oa),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&tu(r.mutationKey)!==tu(this.options.mutationKey)?this.reset():((a=V(this,oa))==null?void 0:a.state.status)==="pending"&&V(this,oa).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=V(this,oa))==null||n.removeObserver(this)}onMutationUpdate(n){at(this,mo,Pv).call(this),at(this,mo,Mj).call(this,n)}getCurrentResult(){return V(this,cl)}reset(){var n;(n=V(this,oa))==null||n.removeObserver(this),_e(this,oa,void 0),at(this,mo,Pv).call(this),at(this,mo,Mj).call(this)}mutate(n,r){var a;return _e(this,eo,r),(a=V(this,oa))==null||a.removeObserver(this),_e(this,oa,V(this,ll).getMutationCache().build(V(this,ll),this.options)),V(this,oa).addObserver(this),V(this,oa).execute(n)}},ll=new WeakMap,cl=new WeakMap,oa=new WeakMap,eo=new WeakMap,mo=new WeakSet,Pv=function(){var r;const n=((r=V(this,oa))==null?void 0:r.state)??z6();_e(this,cl,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Mj=function(n){er.batch(()=>{var r,a,i,o,l,c,u,h;if(V(this,eo)&&this.hasListeners()){const d=V(this,cl).variables,f=V(this,cl).context;(n==null?void 0:n.type)==="success"?((a=(r=V(this,eo)).onSuccess)==null||a.call(r,n.data,d,f),(o=(i=V(this,eo)).onSettled)==null||o.call(i,n.data,null,d,f)):(n==null?void 0:n.type)==="error"&&((c=(l=V(this,eo)).onError)==null||c.call(l,n.error,d,f),(h=(u=V(this,eo)).onSettled)==null||h.call(u,void 0,n.error,d,f))}
686this.listeners.forEach(d=>{d(V(this,cl))})})},K3),V6=g.createContext(void 0),cs=e=>{const t=g.useContext(V6);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Wte=({client:e,children:t})=>(g.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),s.jsx(V6.Provider,{value:e,children:t})),G6=g.createContext(!1),qte=()=>g.useContext(G6);G6.Provider;function Ute(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var zte=g.createContext(Ute()),Hte=()=>g.useContext(zte),Vte=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Gte=e=>{g.useEffect(()=>{e.clearReset()},[e])},Yte=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(a&&e.data===void 0||L6(n,[e.error,r])),Kte=e=>{if(e.suspense){const t=r=>r==="static"?r:Math.max(r??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...r)=>t(n(...r)):t(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Xte=(e,t)=>e.isLoading&&e.isFetching&&!t,Qte=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,vO=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Jte(e,t,n){var d,f,p,y,m;const r=qte(),a=Hte(),i=cs(),o=i.defaultQueryOptions(e);(f=(d=i.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||f.call(d,o),o._optimisticResults=r?"isRestoring":"optimistic",Kte(o),Vte(o,a),Gte(a);const l=!i.getQueryCache().get(o.queryHash),[c]=g.useState(()=>new t(i,o)),u=c.getOptimisticResult(o),h=!r&&e.subscribed!==!1;if(g.useSyncExternalStore(g.useCallback(v=>{const b=h?c.subscribe(er.batchCalls(v)):Kr;return c.updateResult(),b},[c,h]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),g.useEffect(()=>{c.setOptions(o)},[o,c]),Qte(o,u))throw vO(o,c,a);if(Yte({result:u,errorResetBoundary:a,throwOnError:o.throwOnError,query:i.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw u.error;if((y=(p=i.getDefaultOptions().queries)==null?void 0:p._experimental_afterQuery)==null||y.call(p,o,u),o.experimental_prefetchInRender&&!eu&&Xte(u,r)){const v=l?vO(o,c,a):(m=i.getQueryCache().get(o.queryHash))==null?void 0:m.promise;v==null||v.catch(Kr).finally(()=>{c.updateResult()})}return o.notifyOnChangeProps?u:c.trackResult(u)}function wr(e,t){return Jte(e,$te)}function an(e,t){const n=cs(),[r]=g.useState(()=>new Bte(n,e));g.useEffect(()=>{r.setOptions(e)},[r,e]);const a=g.useSyncExternalStore(g.useCallback(o=>r.subscribe(er.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=g.useCallback((o,l)=>{r.mutate(o,l).catch(Kr)},[r]);if(a.error&&L6(r.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:i,mutateAsync:a.mutate}}/**
687 * @remix-run/router v1.23.0
688 *
689 * Copyright (c) Remix Software Inc.
690 *
691 * This source code is licensed under the MIT license found in the
692 * LICENSE.md file in the root directory of this source tree.
693 *
694 * @license MIT
695 */function Yp(){return Yp=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},Yp.apply(this,arguments)}var hl;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(hl||(hl={}));const bO="popstate";function Zte(e){e===void 0&&(e={});function t(r,a){let{pathname:i,search:o,hash:l}=r.location;return Dj("",{pathname:i,search:o,hash:l},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function n(r,a){return typeof a=="string"?a:vb(a)}return tne(t,n,null,e)}function Dn(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Y6(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function ene(){return Math.random().toString(36).substr(2,8)}function xO(e,t){return{usr:e.state,key:e.key,idx:t}}function Dj(e,t,n,r){return n===void 0&&(n=null),Yp({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Lh(t):t,{state:n,key:t&&t.key||r||ene()})}function vb(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 Lh(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 tne(e,t,n,r){r===void 0&&(r={});let{window:a=document.defaultView,v5Compat:i=!1}=r,o=a.history,l=hl.Pop,c=null,u=h();u==null&&(u=0,o.replaceState(Yp({},o.state,{idx:u}),""));function h(){return(o.state||{idx:null}).idx}function d(){l=hl.Pop;let v=h(),b=v==null?null:v-u;u=v,c&&c({action:l,location:m.location,delta:b})}function f(v,b){l=hl.Push;let x=Dj(m.location,v,b);u=h()+1;let w=xO(x,u),_=m.createHref(x);try{o.pushState(w,"",_)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;a.location.assign(_)}i&&c&&c({action:l,location:m.location,delta:1})}function p(v,b){l=hl.Replace;let x=Dj(m.location,v,b);u=h();let w=xO(x,u),_=m.createHref(x);o.replaceState(w,"",_),i&&c&&c({action:l,location:m.location,delta:0})}function y(v){let b=a.location.origin!=="null"?a.location.origin:a.location.href,x=typeof v=="string"?v:vb(v);return x=x.replace(/ $/,"%20"),Dn(b,"No window.location.(origin|href) available to create URL for href: "+x),new URL(x,b)}let m={get action(){return l},get location(){return e(a,o)},listen(v){if(c)throw new Error("A history only accepts one active listener");return a.addEventListener(bO,d),c=v,()=>{a.removeEventListener(bO,d),c=null}},createHref(v){return t(a,v)},createURL:y,encodeLocation(v){let b=y(v);return{pathname:b.pathname,search:b.search,hash:b.hash}},push:f,replace:p,go(v){return o.go(v)}};return m}var wO;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(wO||(wO={}));function nne(e,t,n){return n===void 0&&(n="/"),rne(e,t,n,!1)}function rne(e,t,n,r){let a=typeof t=="string"?Lh(t):t,i=$P(a.pathname||"/",n);if(i==null)return null;let o=K6(e);ane(o);let l=null;for(let c=0;l==null&&c<o.length;++c){let u=mne(i);l=fne(o[c],u,r)}return l}function K6(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let a=(i,o,l)=>{let c={relativePath:l===void 0?i.path||"":l,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};c.relativePath.startsWith("/")&&(Dn(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not val
695id. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let u=Sl([r,c.relativePath]),h=n.concat(c);i.children&&i.children.length>0&&(Dn(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),K6(i.children,t,h,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:dne(u,i.index),routesMeta:h})};return e.forEach((i,o)=>{var l;if(i.path===""||!((l=i.path)!=null&&l.includes("?")))a(i,o);else for(let c of X6(i.path))a(i,o,c)}),t}function X6(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,a=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return a?[i,""]:[i];let o=X6(r.join("/")),l=[];return l.push(...o.map(c=>c===""?i:[i,c].join("/"))),a&&l.push(...o),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function ane(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:hne(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const sne=/^:[\w-]+$/,ine=3,one=2,lne=1,cne=10,une=-2,_O=e=>e==="*";function dne(e,t){let n=e.split("/"),r=n.length;return n.some(_O)&&(r+=une),t&&(r+=one),n.filter(a=>!_O(a)).reduce((a,i)=>a+(sne.test(i)?ine:i===""?lne:cne),r)}function hne(e,t){return e.length===t.length&&e.slice(0,-1).every((r,a)=>r===t[a])?e[e.length-1]-t[t.length-1]:0}function fne(e,t,n){let{routesMeta:r}=e,a={},i="/",o=[];for(let l=0;l<r.length;++l){let c=r[l],u=l===r.length-1,h=i==="/"?t:t.slice(i.length)||"/",d=kO({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},h),f=c.route;if(!d&&u&&n&&!r[r.length-1].route.index&&(d=kO({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},h)),!d)return null;
vendor: 9,149 bytes, lines 695-704
695Object.assign(a,d.params),o.push({params:a,pathname:Sl([i,d.pathname]),pathnameBase:bne(Sl([i,d.pathnameBase])),route:f}),d.pathnameBase!=="/"&&(i=Sl([i,d.pathnameBase]))}return o}function kO(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=pne(e.path,e.caseSensitive,e.end),a=t.match(n);if(!a)return null;let i=a[0],o=i.replace(/(.)\/+$/,"$1"),l=a.slice(1);return{params:r.reduce((u,h,d)=>{let{paramName:f,isOptional:p}=h;if(f==="*"){let m=l[d]||"";o=i.slice(0,i.length-m.length).replace(/(.)\/+$/,"$1")}const y=l[d];return p&&!y?u[f]=void 0:u[f]=(y||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:o,pattern:e}}function pne(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Y6(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,l,c)=>(r.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}function mne(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Y6(!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 $P(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function gne(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:a=""}=typeof e=="string"?Lh(e):e;return{pathname:n?n.startsWith("/")?n:yne(n,t):t,search:xne(r),hash:wne(a)}}function yne(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function z_(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 vne(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function LP(e,t){let n=vne(e);return t?n.map((r,a)=>a===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function FP(e,t,n,r){r===void 0&&(r=!1);let a;typeof e=="string"?a=Lh(e):(a=Yp({},e),Dn(!a.pathname||!a.pathname.includes("?"),z_("?","pathname","search",a)),Dn(!a.pathname||!a.pathname.includes("#"),z_("#","pathname","hash",a)),Dn(!a.search||!a.search.includes("#"),z_("#","search","hash",a)));let i=e===""||a.pathname==="",o=i?"/":a.pathname,l;if(o==null)l=n;else{let d=t.length-1;if(!r&&o.startsWith("..")){let f=o.split("/");for(;f[0]==="..";)f.shift(),d-=1;a.pathname=f.join("/")}l=d>=0?t[d]:"/"}let c=gne(a,l),u=o&&o!=="/"&&o.endsWith("/"),h=(i||o===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||h)&&(c.pathname+="/"),c}const Sl=e=>e.join("/").replace(/\/\/+/g,"/"),bne=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),xne=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,wne=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function _ne(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Q6=["post","put","patch","delete"];new Set(Q6);const kne=["get",...Q6];new Set(kne);/**
696 * React Router v6.30.1
697 *
698 * Copyright (c) Remix Software Inc.
699 *
700 * This source code is licensed under the MIT license found in the
701 * LICENSE.md file in the root directory of this source tree.
702 *
703 * @license MIT
704 */function Kp(){return Kp=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},Kp.apply(this,arguments)}const BP=g.createContext(null),jne=g.createContext(null),ql=g.createContext(null),Ow=g.createContext(null),Eo=g.createContext({outlet:null,matches:[],isDataRoute:!1}),J6=g.createContext(null);function Sne(e,t){let{relative:n}=t===void 0?{}:t;Fh()||Dn(!1);let{basename:r,navigator:a}=g.useContext(ql),{hash:i,pathname:o,search:l}=e8(e,{relative:n}),c=o;return r!=="/"&&(c=o==="/"?r:Sl([r,o])),a.createHref({pathname:c,search:l,hash:i})}function Fh(){return g.useContext(Ow)!=null}function us(){return Fh()||Dn(!1),g.useContext(Ow).location}function Z6(e){g.useContext(ql).static||g.useLayoutEffect(e)}function Gt(){let{isDataRoute:e}=g.useContext(Eo);return e?Lne():Nne()}function Nne(){Fh()||Dn(!1);let e=g.useContext(BP),{basename:t,future:n,navigator:r}=g.useContext(ql),{matches:a}=g.useContext(Eo),{pathname:i}=us(),o=JSON.stringify(LP(a,n.v7_relativeSplatPath)),l=g.useRef(!1);return Z6(()=>{l.current=!0}),g.useCallback(function(u,h){if(h===void 0&&(h={}),!l.current)return;if(typeof u=="number"){r.go(u);return}let d=FP(u,JSON.parse(o),i,h.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:Sl([t,d.pathname])),(h.replace?r.replace:r.push)(d,h.state,h)},[t,r,o,i,e])}function WP(){let{matches:e}=g.useContext(Eo),t=e[e.length-1];return t?t.params:{}}function e8(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=g.useContext(ql),{matches:a}=g.useContext(Eo),{pathname:i}=us(),o=JSON.stringify(LP(a,r.v7_relativeSplatPath));return g.useMemo(()=>FP(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function Cne(e,t){return Pne(e,t)}function Pne(e,t,n,r){Fh()||Dn(!1);let{navigator:a}=g.useContext(ql),{matches:i}=g.useContext(Eo),o=i[i.length-1],l=o?o.params:{};o&&o.pathname;let c=o?o.pathnameBase:"/";o&&o.route;let u=us(),h;if(t){var d;let v=typeof t=="string"?Lh(t):t;c==="/"||(d=v.pathname)!=null&&d.startsWith(c)||Dn(!1),h=v}else h=u;let f=h.pathname||"/",p=f;if(c!=="/"){let v=c.replace(/^\//,"").split("/");p="/"+f.replace(/^\//,"").split("/").slice(v.length).join("/")}let y=nne(e,{pathname:p}),m=Rne(y&&y.map(v=>Object.assign({},v,{params:Object.assign({},l,v.params),pathname:Sl([c,a.encodeLocation?a.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?c:Sl([c,a.encodeLocation?a.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),i,n,r);return t&&m?g.createElement(Ow.Provider,{value:{location:Kp({pathname:"/",search:"",hash:"",state:null,key:"default"},h),navigationType:hl.Pop}},m):m}function Tne(){let e=$ne(),t=_ne(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},t),n?g.createElement("pre",{style:a},n):null,null)}const Ane=g.createElement(Tne,null);class Ene extends g.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?g.createElement(Eo.Provider,{value:this.props.routeContext},g.createElement(J6.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function One(e){let{routeContext:t,match:n,children:r}=e,a=g.useContext(BP);return a&&a.static&&a.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=n.route.id),g.createElement(Eo.Provider,{value:t},r)}function Rne(e,t,n,r){var a;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,l=(a=n)==null?void 0:a.errors;if(l!=null){let h=o.findIndex(d=>d.route.id&&(l==null?void 0:l[d.route.id])!==void 0);h>=0||Dn(!1),o=o.slice(0,Math.min(o.length,h+1))}let c=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let h=0;h<o.length;h++){let d=o[h];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(u=h),d.route.id){let{loaderData:f,errors:p}=n,y=d.route.loader&&f[d.route.id]===void 0&&(!p||p[d.route.id]===void 0);if(d.route.lazy||y){c=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((h,d,f)=>{let p,y=!1,m=null,v=null;n&&(p=l&&d.route.id?l[d.route.id]:void 0,m=d.route.errorElement||Ane,c&&(u<0&&f===0?(y=!0,v=null):u===f&&(y=!0,v=d.route.hydrateFallbackElement||null)));let b=t.concat(o.slice(0,f+1)),x=()=>{let w;
704return p?w=m:y?w=v:d.route.Component?w=g.createElement(d.route.Component,null):d.route.element?w=d.route.element:w=h,g.createElement(One,{match:d,routeContext:{outlet:h,matches:b,isDataRoute:n!=null},children:w})};return n&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?g.createElement(Ene,{location:n.location,revalidation:n.revalidation,component:m,error:p,children:x(),routeContext:{outlet:null,matches:b,isDataRoute:!0}}):x()},null)}var t8=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(t8||{}),bb=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}(bb||{});function Ine(e){let t=g.useContext(BP);return t||Dn(!1),t}function Mne(e){let t=g.useContext(jne);return t||Dn(!1),t}function Dne(e){let t=g.useContext(Eo);return t||Dn(!1),t}function n8(e){let t=Dne(),n=t.matches[t.matches.length-1];return n.route.id||Dn(!1),n.route.id}function $ne(){var e;let t=g.useContext(J6),n=Mne(bb.UseRouteError),r=n8(bb.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Lne(){let{router:e}=Ine(t8.UseNavigateStable),t=n8(bb.UseNavigateStable),n=g.useRef(!1);return Z6(()=>{n.current=!0}),g.useCallback(function(a,i){i===void 0&&(i={}),n.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,Kp({fromRouteId:t},i)))},[e,t])}function Fne(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function ic(e){let{to:t,replace:n,state:r,relative:a}=e;Fh()||Dn(!1);let{future:i,static:o}=g.useContext(ql),{matches:l}=g.useContext(Eo),{pathname:c}=us(),u=Gt(),h=FP(t,LP(l,i.v7_relativeSplatPath),c,a==="path"),d=JSON.stringify(h);return g.useEffect(()=>u(JSON.parse(d),{replace:n,state:r,relative:a}),[u,d,a,n,r]),null}function Ze(e){Dn(!1)}function Bne(e){let{basename:t="/",children:n=null,location:r,navigationType:a=hl.Pop,navigator:i,static:o=!1,future:l}=e;Fh()&&Dn(!1);let c=t.replace(/^\/*/,"/"),u=g.useMemo(()=>({basename:c,navigator:i,static:o,future:Kp({v7_relativeSplatPath:!1},l)}),[c,l,i,o]);typeof r=="string"&&(r=Lh(r));let{pathname:h="/",search:d="",hash:f="",state:p=null,key:y="default"}=r,m=g.useMemo(()=>{let v=$P(h,c);return v==null?null:{location:{pathname:v,search:d,hash:f,state:p,key:y},navigationType:a}},[c,h,d,f,p,y,a]);return m==null?null:g.createElement(ql.Provider,{value:u},g.createElement(Ow.Provider,{children:n,value:m}))}function Wne(e){let{children:t,location:n}=e;return Cne($j(t),n)}new Promise(()=>{});function $j(e,t){t===void 0&&(t=[]);let n=[];return g.Children.forEach(e,(r,a)=>{if(!g.isValidElement(r))return;let i=[...t,a];if(r.type===g.Fragment){n.push.apply(n,$j(r.props.children,i));return}r.type!==Ze&&Dn(!1),!r.props.index||!r.props.children||Dn(!1);let o={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=$j(r.props.children,i)),n.push(o)}),n}/**
705 * React Router DOM v6.30.1
706 *
707 * Copyright (c) Remix Software Inc.
708 *
709 * This source code is licensed under the MIT license found in the
710 * LICENSE.md file in the root directory of this source tree.
711 *
712 * @license MIT
713 */function Lj(){return Lj=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},Lj.apply(this,arguments)}function qne(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function Une(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function zne(e,t){return e.button===0&&(!t||t==="_self")&&!Une(e)}function Fj(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(a=>[n,a]):[[n,r]])},[]))}function Hne(e,t){let n=Fj(e);return t&&t.forEach((r,a)=>
713{n.has(a)||t.getAll(a).forEach(i=>{n.append(a,i)})}),n}const Vne=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Gne="6";try{window.__reactRouterVersion=Gne}catch{}const Yne="startTransition",jO=gC[Yne];function Kne(e){let{basename:t,children:n,future:r,window:a}=e,i=g.useRef();i.current==null&&(i.current=Zte({window:a,v5Compat:!0}));let o=i.current,[l,c]=g.useState({action:o.action,location:o.location}),{v7_startTransition:u}=r||{},h=g.useCallback(d=>{u&&jO?jO(()=>c(d)):c(d)},[c,u]);return g.useLayoutEffect(()=>o.listen(h),[o,h]),g.useEffect(()=>Fne(r),[r]),g.createElement(Bne,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:o,future:r})}const Xne=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Qne=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Oe=g.forwardRef(function(t,n){let{onClick:r,relative:a,reloadDocument:i,replace:o,state:l,target:c,to:u,preventScrollReset:h,viewTransition:d}=t,f=qne(t,Vne),{basename:p}=g.useContext(ql),y,m=!1;if(typeof u=="string"&&Qne.test(u)&&(y=u,Xne))try{let w=new URL(window.location.href),_=u.startsWith("//")?new URL(w.protocol+u):new URL(u),k=$P(_.pathname,p);_.origin===w.origin&&k!=null?u=k+_.search+_.hash:m=!0}catch{}let v=Sne(u,{relative:a}),b=Jne(u,{replace:o,state:l,target:c,preventScrollReset:h,relative:a,viewTransition:d});function x(w){r&&r(w),w.defaultPrevented||b(w)}return g.createElement("a",Lj({},f,{href:y||v,onClick:m||i?r:x,ref:n,target:c}))});var SO;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(SO||(SO={}));var NO;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(NO||(NO={}));function Jne(e,t){let{target:n,replace:r,state:a,preventScrollReset:i,relative:o,viewTransition:l}=t===void 0?{}:t,c=Gt(),u=us(),h=e8(e,{relative:o});return g.useCallback(d=>{if(zne(d,n)){d.preventDefault();let f=r!==void 0?r:vb(u)===vb(h);c(e,{replace:f,state:a,preventScrollReset:i,relative:o,viewTransition:l})}},[u,c,h,r,a,n,e,i,o,l])}function Ul(e){let t=g.useRef(Fj(e)),n=g.useRef(!1),r=us(),a=g.useMemo(()=>Hne(r.search,n.current?null:t.current),[r.search]),i=Gt(),o=g.useCallback((l,c)=>{const u=Fj(typeof l=="function"?l(a):l);n.current=!0,i("?"+u,c)},[i,a]);return[a,o]}const r8=g.createContext(void 0);function Zne({children:e,defaultTheme:t="system",storageKey:n="sociepro-theme"}){const[r,a]=g.useState(()=>typeof window<"u"&&localStorage.getItem(n)||t),[i,o]=g.useState("light");g.useEffect(()=>{const c=window.document.documentElement,u=h=>{c.classList.remove("light","dark");let d;h==="system"?d=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":d=h,c.classList.add(d),o(d)};if(u(r),r==="system"){const h=window.matchMedia("(prefers-color-scheme: dark)"),d=()=>u("system");return h.addEventListener("change",d),()=>h.removeEventListener("change",d)}},[r]);const l=c=>{localStorage.setItem(n,c),a(c)};return s.jsx(r8.Provider,{value:{theme:r,setTheme:l,resolvedTheme:i},children:e})}function a8(){const e=g.useContext(r8);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e}var ci=function(){return ci=Object.assign||function(t){for(var n,r=1,a=arguments.length;r<a;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},ci.apply(this,arguments)};function Bh(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n}function ere(e,t,n,r){function a(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function l(h){try{u(r.next(h))}catch(d){o(d)}}function c(h){try{u(r.throw(h))}catch(d){o(d)}}function u(h){h.done?i(h.value):a(h.value).then(l,c)}u((r=r.apply(e,t||[])).next())})}function tre(e,t,n){if(n||arguments.length===2)for(var r=0,a=t.length,i;r<a;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}const nre=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);
713class qP extends Error{constructor(t,n="FunctionsError",r){super(t),this.name=n,this.context=r}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class rre extends qP{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class CO extends qP{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class PO extends qP{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var Bj;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(Bj||(Bj={}));class are{constructor(t,{headers:n={},customFetch:r,region:a=Bj.Any}={}){this.url=t,this.headers=n,this.region=a,this.fetch=nre(r)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return ere(this,arguments,void 0,function*(n,r={}){var a,i;let o,l,c;try{const{headers:u,method:h,body:d,signal:f,timeout:p}=r;let y={},{region:m}=r;m||(m=this.region);const v=new URL(`${this.url}/${n}`);m&&m!=="any"&&(y["x-region"]=m,v.searchParams.set("forceFunctionRegion",m));let b;const x=!!u&&Object.keys(u).some(N=>N.toLowerCase()==="content-type");d&&!x?typeof Blob<"u"&&d instanceof Blob||d instanceof ArrayBuffer?(y["Content-Type"]="application/octet-stream",b=d):typeof d=="string"?(y["Content-Type"]="text/plain",b=d):typeof FormData<"u"&&d instanceof FormData?b=d:(y["Content-Type"]="application/json",b=JSON.stringify(d)):d&&typeof d!="string"&&!(typeof Blob<"u"&&d instanceof Blob)&&!(d instanceof ArrayBuffer)&&!(typeof FormData<"u"&&d instanceof FormData)?b=JSON.stringify(d):b=d;let w=f;p&&(l=new AbortController,o=setTimeout(()=>l.abort(),p),f?(w=l.signal,c=()=>l.abort(),f.addEventListener("abort",c)):w=l.signal);const _=yield this.fetch(v.toString(),{method:h||"POST",headers:Object.assign(Object.assign(Object.assign({},y),this.headers),u),body:b,signal:w}).catch(N=>{throw new rre(N)}),k=_.headers.get("x-relay-error");if(k&&k==="true")throw new CO(_);if(!_.ok)throw new PO(_);let j=((a=_.headers.get("Content-Type"))!==null&&a!==void 0?a:"text/plain").split(";")[0].trim().toLowerCase(),S;return j==="application/json"?S=yield _.json():j==="application/octet-stream"||j==="application/pdf"?S=yield _.blob():j==="text/event-stream"?S=_:j==="multipart/form-data"?S=yield _.formData():S=yield _.text(),{data:S,error:null,response:_}}catch(u){return{data:null,error:u,response:u instanceof PO||u instanceof CO?u.context:void 0}}finally{o&&clearTimeout(o),c&&((i=r.signal)===null||i===void 0||i.removeEventListener("abort",c))}})}}const s8=3,TO=e=>Math.min(1e3*2**e,3e4),sre=[520,503],i8=["GET","HEAD","OPTIONS"];var AO=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.co
713de=e.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function EO(e,t){return new Promise(n=>{if(t!=null&&t.aborted){n();return}const r=setTimeout(()=>{t==null||t.removeEventListener("abort",a),n()},e);function a(){clearTimeout(r),n()}t==null||t.addEventListener("abort",a)})}function ire(e,t,n,r){return!(!r||n>=s8||!i8.includes(e)||!sre.includes(t))}var ore=class{constructor(e){var t,n,r,a,i;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(t=e.shouldThrowOnError)!==null&&t!==void 0?t:!1,this.signal=e.signal,this.isMaybeSingle=(n=e.isMaybeSingle)!==null&&n!==void 0?n:!1,this.shouldStripNulls=(r=e.shouldStripNulls)!==null&&r!==void 0?r:!1,this.urlLengthLimit=(a=e.urlLengthLimit)!==null&&a!==void 0?a:8e3,this.retryEnabled=(i=e.retry)!==null&&i!==void 0?i:!0,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw new Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}retry(e){return this.retryEnabled=e,this}then(e,t){var n=this;if(this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){const o=this.headers.get("Accept");o==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!o||o==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const r=this.fetch;let i=(async()=>{let o=0;for(;;){const u={};n.headers.forEach((d,f)=>{u[f]=d}),o>0&&(u["X-Retry-Count"]=String(o));let h;try{h=await r(n.url.toString(),{method:n.method,headers:u,body:JSON.stringify(n.body,(d,f)=>typeof f=="bigint"?f.toString():f),signal:n.signal})}catch(d){if((d==null?void 0:d.name)==="AbortError"||(d==null?void 0:d.code)==="ABORT_ERR"||!i8.includes(n.method))throw d;if(n.retryEnabled&&o<s8){const f=TO(o);o++,await EO(f,n.signal);continue}throw d}if(ire(n.method,h.status,o,n.retryEnabled)){var l,c;const d=(l=(c=h.headers)===null||c===void 0?void 0:c.get("Retry-After"))!==null&&l!==void 0?l:null,f=d!==null?Math.max(0,parseInt(d,10)||0)*1e3:TO(o);await h.text(),o++,await EO(f,n.signal);continue}return await n.processResponse(h)}})();return this.shouldThrowOnError||(i=i.catch(o=>{var l;let c="",u="",h="";const d=o==null?void 0:o.cause;if(d){var f,p,y,m;const x=(f=d==null?void 0:d.message)!==null&&f!==void 0?f:"",w=(p=d==null?void 0:d.code)!==null&&p!==void 0?p:"";c=`${(y=o==null?void 0:o.name)!==null&&y!==void 0?y:"FetchError"}: ${o==null?void 0:o.message}`,c+=`
714
715Caused by: ${(m=d==null?void 0:d.name)!==null&&m!==void 0?m:"Error"}: ${x}`,w&&(c+=` (${w})`),d!=null&&d.stack&&(c+=`
716${d.stack}`)}else{var v;c=(v=o==null?void 0:o.stack)!==null&&v!==void 0?v:""}const b=this.url.toString().length;return(o==null?void 0:o.name)==="AbortError"||(o==null?void 0:o.code)==="ABORT_ERR"?(h="",u="Request was aborted (timeout or manual cancellation)",b>this.urlLengthLimit&&(u+=`. Note: Your request URL is ${b} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):((d==null?void 0:d.name)==="HeadersOverflowError"||(d==null?void 0:d.code)==="UND_ERR_HEADERS_OVERFLOW")&&(h="",u="HTTP headers exceeded server limits (typically 16KB)",b>this.urlLengthLimit&&(u+=`. Your request URL is ${b} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${(l=o==null?void 0:o.name)!==null&&l!==void 0?l:"FetchError"}: ${o==null?void 0:o.message}`,details:c,hint:u,code:h},data:null,count:null,status:0,statusText:""}}
716)),i.then(e,t)}async processResponse(e){var t=this;let n=null,r=null,a=null,i=e.status,o=e.statusText;if(e.ok){var l,c;if(t.method!=="HEAD"){var u;const f=await e.text();if(f!=="")if(t.headers.get("Accept")==="text/csv")r=f;else if(t.headers.get("Accept")&&(!((u=t.headers.get("Accept"))===null||u===void 0)&&u.includes("application/vnd.pgrst.plan+text")))r=f;else try{r=JSON.parse(f)}catch{if(n={message:f},r=null,t.shouldThrowOnError)throw new AO({message:f,details:"",hint:"",code:""})}}const h=(l=t.headers.get("Prefer"))===null||l===void 0?void 0:l.match(/count=(exact|planned|estimated)/),d=(c=e.headers.get("content-range"))===null||c===void 0?void 0:c.split("/");h&&d&&d.length>1&&(a=parseInt(d[1])),t.isMaybeSingle&&Array.isArray(r)&&(r.length>1?(n={code:"PGRST116",details:`Results contain ${r.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},r=null,a=null,i=406,o="Not Acceptable"):r.length===1?r=r[0]:r=null)}else{const h=await e.text();try{n=JSON.parse(h),Array.isArray(n)&&e.status===404&&(r=[],n=null,i=200,o="OK")}catch{e.status===404&&h===""?(i=204,o="No Content"):n={message:h}}if(n&&t.shouldThrowOnError)throw new AO(n)}return{success:n===null,error:n,data:r,count:a,status:i,statusText:o}}returns(){return this}overrideTypes(){return this}},lre=class extends ore{throwOnError(){return super.throwOnError()}select(e){let t=!1;const n=(e??"*").split("").map(r=>/\s/.test(r)&&!t?"":(r==='"'&&(t=!t),r)).join("");return this.url.searchParams.set("select",n),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:n,foreignTable:r,referencedTable:a=r}={}){const i=a?`${a}.order`:"order",o=this.url.searchParams.get(i);return this.url.searchParams.set(i,`${o?`${o},`:""}${e}.${t?"asc":"desc"}${n===void 0?"":n?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:n=t}={}){const r=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(r,`${e}`),this}range(e,t,{foreignTable:n,referencedTable:r=n}={}){const a=typeof r>"u"?"offset":`${r}.offset`,i=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(a,`${e}`),this.url.searchParams.set(i,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:e=!1,verbose:t=!1,settings:n=!1,buffers:r=!1,wal:a=!1,format:i="text"}={}){var o;const l=[e?"analyze":null,t?"verbose":null,n?"settings":null,r?"buffers":null,a?"wal":null].filter(Boolean).join("|"),c=(o=this.headers.get("Accept"))!==null&&o!==void 0?o:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${i}; for="${c}"; options=${l};`),i==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}};const OO=new RegExp("[,()]");var Fu=class extends lre{throwOnError(){return super.throwOnError()}eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){const n=Array.from(new Set(t)).map(r=>typeof r=="string"&&OO.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(e,`in.(${n})`),this}notIn(e,t){const n=Array.from(new Set(t)).map(r=>typeof r=="string"&&OO.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(e,`not.in.(${n})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:n,type:r}={}){let a="";r==="plain"?a="pl":r==="phrase"?a="ph":r==="websearch"&&(a="w");const i=n===void 0?"":`(${n})`;return this.url.searchParams.append(e,`${a}fts${i}.${t}`),this}match(e){return Object.entries(e).filter(([t,n])=>
716n!==void 0).forEach(([t,n])=>{this.url.searchParams.append(t,`eq.${n}`)}),this}not(e,t,n){return this.url.searchParams.append(e,`not.${t}.${n}`),this}or(e,{foreignTable:t,referencedTable:n=t}={}){const r=n?`${n}.or`:"or";return this.url.searchParams.append(r,`(${e})`),this}filter(e,t,n){return this.url.searchParams.append(e,`${t}.${n}`),this}},cre=class{constructor(e,{headers:t={},schema:n,fetch:r,urlLengthLimit:a=8e3,retry:i}){this.url=e,this.headers=new Headers(t),this.schema=n,this.fetch=r,this.urlLengthLimit=a,this.retry=i}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:n=!1,count:r}=t??{},a=n?"HEAD":"GET";let i=!1;const o=(e??"*").split("").map(u=>/\s/.test(u)&&!i?"":(u==='"'&&(i=!i),u)).join(""),{url:l,headers:c}=this.cloneRequestState();return l.searchParams.set("select",o),r&&c.append("Prefer",`count=${r}`),new Fu({method:a,url:l,headers:c,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(e,{count:t,defaultToNull:n=!0}={}){var r;const a="POST",{url:i,headers:o}=this.cloneRequestState();if(t&&o.append("Prefer",`count=${t}`),n||o.append("Prefer","missing=default"),Array.isArray(e)){const l=e.reduce((c,u)=>c.concat(Object.keys(u)),[]);if(l.length>0){const c=[...new Set(l)].map(u=>`"${u}"`);i.searchParams.set("columns",c.join(","))}}return new Fu({method:a,url:i,headers:o,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(e,{onConflict:t,ignoreDuplicates:n=!1,count:r,defaultToNull:a=!0}={}){var i;const o="POST",{url:l,headers:c}=this.cloneRequestState();if(c.append("Prefer",`resolution=${n?"ignore":"merge"}-duplicates`),t!==void 0&&l.searchParams.set("on_conflict",t),r&&c.append("Prefer",`count=${r}`),a||c.append("Prefer","missing=default"),Array.isArray(e)){const u=e.reduce((h,d)=>h.concat(Object.keys(d)),[]);if(u.length>0){const h=[...new Set(u)].map(d=>`"${d}"`);l.searchParams.set("columns",h.join(","))}}return new Fu({method:o,url:l,headers:c,schema:this.schema,body:e,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(e,{count:t}={}){var n;const r="PATCH",{url:a,headers:i}=this.cloneRequestState();return t&&i.append("Prefer",`count=${t}`),new Fu({method:r,url:a,headers:i,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:e}={}){var t;const n="DELETE",{url:r,headers:a}=this.cloneRequestState();return e&&a.append("Prefer",`count=${e}`),new Fu({method:n,url:r,headers:a,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function Xp(e){"@babel/helpers - typeof";return Xp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xp(e)}function ure(e,t){if(Xp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Xp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function dre(e){var t=ure(e,"string");return Xp(t)=="symbol"?t:t+""}function hre(e,t,n){return(t=dre(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function RO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ky(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?RO(Object(n),!0).forEach(function(r){hre(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var fre=class o8{constructor(t,{headers:n={},schema:r,fetch:a,timeout:i,urlLengthLimit:o=8e3,retry:l}={}){this.url=t,this.headers=new Headers(n),this.schemaName=r,this.urlLengthLimit=o;const c=a??globalThis.fetch;i!==void 0&&i>0?this.fetch=(u,h)=>{const d=new AbortController,f=setTimeout(()=>d.abort(),i),p=h==null?void 0:h.signal;if(p){if(p.aborted)return clearTimeout(f),c(u,h);const y=()=>{clearTimeout(f),d.abort()};return p.addEventListener("abort",y,{once:!0}),c(u,ky(ky({},h),{},{signal:d.signal})).finally(()=>{clearTimeout(f),p.removeEventListener("abort",y)})}return c(u,ky(ky({},h),{},{signal:d.signal})).finally(()=>clearTimeout(f))}:this.fetch=c,this.retry=l}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new cre(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(t){return new o8(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(t,n={},{head:r=!1,get:a=!1,count:i}={}){var o;let l;const c=new URL(`${this.url}/rpc/${t}`);let u;const h=p=>p!==null&&typeof p=="object"&&(!Array.isArray(p)||p.some(h)),d=r&&Object.values(n).some(h);d?(l="POST",u=n):r||a?(l=r?"HEAD":"GET",Object.entries(n).filter(([p,y])=>y!==void 0).map(([p,y])=>[p,Array.isArray(y)?`{${y.join(",")}}`:`${y}
716`]).forEach(([p,y])=>{c.searchParams.append(p,y)})):(l="POST",u=n);const f=new Headers(this.headers);return d?f.set("Prefer",i?`count=${i},return=minimal`:"return=minimal"):i&&f.set("Prefer",`count=${i}`),new Fu({method:l,url:c,headers:f,schema:this.schemaName,body:u,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class pre{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};const n=globalThis;if(typeof globalThis<"u"&&typeof n.WebSocket<"u")return{type:"native",wsConstructor:n.WebSocket};const r=typeof global<"u"?global:void 0;if(r&&typeof r.WebSocket<"u")return{type:"native",wsConstructor:r.WebSocket};if(typeof globalThis<"u"&&typeof n.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&n.EdgeRuntime||typeof navigator<"u"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const a=globalThis.process;if(a){const i=a.versions;if(i&&i.node)return{type:"unsupported",error:"Node.js detected but native WebSocket not found.",workaround:"Ensure you are running Node.js 22+ or provide a WebSocket implementation via the transport option."}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const t=this.detectEnvironment();if(t.wsConstructor)return t.wsConstructor;let n=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(n+=`
717
718Suggested solution: ${t.workaround}`),new Error(n)}static isWebSocketSupported(){try{return this.detectEnvironment().type==="native"}catch{return!1}}}const mre="2.111.0",gre=`realtime-js/${mre}`,yre="1.0.0",l8="2.0.0",vre=l8,bre=1e4,xre=100,Jo={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},c8={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave",access_token:"access_token"},Wj={connecting:"connecting",open:"open",closing:"closing",closed:"closed"};class wre{constructor(t){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=t??[]}encode(t,n){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return n(this._binaryEncodeUserBroadcastPush(t));let r=[t.join_ref,t.ref,t.topic,t.event,t.payload];return n(JSON.stringify(r))}_binaryEncodeUserBroadcastPush(t){var n;return this._isArrayBuffer((n=t.payload)===null||n===void 0?void 0:n.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var n,r;const a=(r=(n=t.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,a)}_encodeJsonUserBroadcastPush(t){var n,r;const a=(r=(n=t.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:{},o=new TextEncoder().encode(JSON.stringify(a)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,o)}_encodeUserBroadcastPush(t,n,r){var a,i;const o=new TextEncoder,l=o.encode(t.topic),c=o.encode((a=t.ref)!==null&&a!==void 0?a:""),u=o.encode((i=t.join_ref)!==null&&i!==void 0?i:""),h=o.encode(t.payload.event),d=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},f=o.encode(Object.keys(d).length===0?"":JSON.stringify(d));if(u.length>255)throw new Error(`joinRef length ${u.length} exceeds maximum of 255`);if(c.length>255)throw new Error(`ref length ${c.length} exceeds maximum of 255`);if(l.length>255)throw new Error(`topic length ${l.length} exceeds maximum of 255`);if(h.length>255)throw new Error(`userEvent length ${h.length} exceeds maximum of 255`);if(f.length>255)throw new Error(`metadata length ${f.length} exceeds maximum of 255`);const p=this.USER_BROADCAST_PUSH_META_LENGTH+u.length+c.length+l.length+h.length+f.length,y=new ArrayBuffer(this.HEADER_LENGTH+p),m=new DataView(y),v=new Uint8Array(y);let b=0;m.setUint8(b++,this.KINDS.userBroadcastPush),m.setUint8(b++,u.length),m.setUint8(b++,c.length),m.setUint8(b++,l.length),m.setUint8(b++,h.length),m.setUint8(b++,f.length),m.setUint8(b++,n),v.set(u,b),b+=u.length,v.set(c,b),b+=c.length,v.set(l,b),b+=l.length,v.set(h,b),b+=h.length,v.set(f,b),b+=f.length;var x=new Uint8Array(y.byteLength+r.byteLength);return x.set(new Uint8Array(y),0),x.set(new Uint8Array(r),y.byteLength),x.buffer}decode(t,n){if(this._isArrayBuffer(t)){let r=this._binaryDecode(t);return n(r)}if(typeof t=="string"){const r=JSON.parse(t),[a,i,o,l,c]=r;
718return n({join_ref:a,ref:i,topic:o,event:l,payload:c})}return n({})}_binaryDecode(t){const n=new DataView(t),r=n.getUint8(0),a=new TextDecoder;switch(r){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(t,n,a)}}_decodeUserBroadcast(t,n,r){const a=n.getUint8(1),i=n.getUint8(2),o=n.getUint8(3),l=n.getUint8(4);let c=this.HEADER_LENGTH+4;const u=r.decode(t.slice(c,c+a));c=c+a;const h=r.decode(t.slice(c,c+i));c=c+i;const d=r.decode(t.slice(c,c+o));c=c+o;const f=t.slice(c,t.byteLength),p=l===this.JSON_ENCODING?JSON.parse(r.decode(f)):f,y={type:this.BROADCAST_EVENT,event:h,payload:p};return o>0&&(y.meta=JSON.parse(d)),{join_ref:null,ref:null,topic:u,event:this.BROADCAST_EVENT,payload:y}}_isArrayBuffer(t){var n;return t instanceof ArrayBuffer||((n=t==null?void 0:t.constructor)===null||n===void 0?void 0:n.name)==="ArrayBuffer"}_pick(t,n){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([r])=>n.includes(r)))}}var Kt;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(Kt||(Kt={}));const IO=(e,t,n={})=>{var r;const a=(r=n.skipTypes)!==null&&r!==void 0?r:[];return t?Object.keys(t).reduce((i,o)=>(i[o]=_re(o,e,t,a),i),{}):{}},_re=(e,t,n,r)=>{const a=t.find(l=>
vendor: 5,548 bytes, line 718
718l.name===e),i=a==null?void 0:a.type,o=n[e];return i&&!r.includes(i)?u8(i,o):qj(o)},u8=(e,t)=>{if(e.charAt(0)==="_"){const n=e.slice(1,e.length);return Nre(t,n)}switch(e){case Kt.bool:return kre(t);case Kt.float4:case Kt.float8:case Kt.int2:case Kt.int4:case Kt.int8:case Kt.numeric:case Kt.oid:return jre(t);case Kt.json:case Kt.jsonb:return Sre(t);case Kt.timestamp:return Cre(t);case Kt.abstime:case Kt.date:case Kt.daterange:case Kt.int4range:case Kt.int8range:case Kt.money:case Kt.reltime:case Kt.text:case Kt.time:case Kt.timestamptz:case Kt.timetz:case Kt.tsrange:case Kt.tstzrange:return qj(t);default:return qj(t)}},qj=e=>e,kre=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},jre=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},Sre=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},Nre=(e,t)=>{if(typeof e!="string")return e;const n=e.length-1,r=e[n];if(e[0]==="{"&&r==="}"){let i;const o=e.slice(1,n);try{i=JSON.parse("["+o+"]")}catch{i=o?o.split(","):[]}return i.map(l=>u8(t,l))}return e},Cre=e=>typeof e=="string"?e.replace(" ","T"):e,d8=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};var wd=e=>typeof e=="function"?e:function(){return e},Pre=typeof self<"u"?self:null,Bu=typeof window<"u"?window:null,Js=Pre||Bu||globalThis,Tre="2.0.0",Are=1e4,Ere=1e3,Ore=100,ai={connecting:0,open:1,closing:2,closed:3},sa={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Yi={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},Uj={longpoll:"longpoll",websocket:"websocket"},Rre={complete:4},zj="base64url.bearer.phx.",jy=class{constructor(e,t,n,r){this.channel=e,this.event=t,this.payload=n||function(){return{}},this.receivedResp=null,this.timeout=r,this.timeoutTimer=null,this.recHooks=[],this.sent=!1,this.ref=void 0}resend(e){this.timeout=e,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}matchReceive({status:e,response:t,_ref:n}){this.recHooks.filter(r=>r.status===e).forEach(r=>r.callback(t))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,e=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=e,this.matchReceive(e)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}trigger(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}},h8=class{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},Ire=class{constructor(e,t,n){this.state=sa.closed,this.topic=e,this.params=wd(t||{}),this.socket=n,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new jy(this,Yi.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new h8(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=sa.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(r=>r.send()),this.pushBuffer=[]}),this.joinPush.receive("error",r=>{this.state=sa.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,r),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=sa.closed,this.socket.remove(this)}),this.onError(r=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,r),this.isJoining()&&this.joinPush.reset(),this.state=sa.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),new jy(this,Yi.leave,wd({}),this.timeout).send(),this.state=sa.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(Yi.reply,(r,a)=>{this.trigger(this.replyEventName(a),r)})}join(e=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}
vendor: 19,028 bytes, lines 718-719
718teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=sa.closed,this.bindings=[]}onClose(e){this.on(Yi.close,e)}onError(e){return this.on(Yi.error,t=>e(t))}on(e,t){let n=this.bindingRef++;return this.bindings.push({event:e,ref:n,callback:t}),n}off(e,t){this.bindings=this.bindings.filter(n=>!(n.event===e&&(typeof t>"u"||t===n.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,n=this.timeout){if(t=t||{},!this.joinedOnce)throw new Error(`tried to push '${e}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let r=new jy(this,e,function(){return t},n);return this.canPush()?r.send():(r.startTimeout(),this.pushBuffer.push(r)),r}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=sa.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(Yi.close,"leave")},n=new jy(this,Yi.leave,wd({}),e);return n.receive("ok",()=>t()).receive("timeout",()=>t()),n.send(),this.canPush()||n.trigger("ok",{}),n}onMessage(e,t,n){return t}filterBindings(e,t,n){return!0}isMember(e,t,n,r){return this.topic!==e?!1:r&&r!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:n,joinRef:r}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=sa.joining,this.joinPush.resend(e))}trigger(e,t,n,r){let a=this.onMessage(e,t,n,r);if(t&&!a)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let i=this.bindings.filter(o=>o.event===e&&this.filterBindings(o,t,n));for(let o=0;o<i.length;o++)i[o].callback(a,n,r||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===sa.closed}isErrored(){return this.state===sa.errored}isJoined(){return this.state===sa.joined}isJoining(){return this.state===sa.joining}isLeaving(){return this.state===sa.leaving}},xb=class{static request(e,t,n,r,a,i,o){if(Js.XDomainRequest){let l=new Js.XDomainRequest;return this.xdomainRequest(l,e,t,r,a,i,o)}else if(Js.XMLHttpRequest){let l=new Js.XMLHttpRequest;return this.xhrRequest(l,e,t,n,r,a,i,o)}else{if(Js.fetch&&Js.AbortController)return this.fetchRequest(e,t,n,r,a,i,o);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(e,t,n,r,a,i,o){let l={method:e,headers:n,body:r},c=null;return a&&(c=new AbortController,setTimeout(()=>c.abort(),a),l.signal=c.signal),Js.fetch(t,l).then(u=>u.text()).then(u=>this.parseJSON(u)).then(u=>o&&o(u)).catch(u=>{u.name==="AbortError"&&i?i():o&&o(null)}),c}static xdomainRequest(e,t,n,r,a,i,o){return e.timeout=a,e.open(t,n),e.onload=()=>{let l=this.parseJSON(e.responseText);o&&o(l)},i&&(e.ontimeout=i),e.onprogress=()=>{},e.send(r),e}static xhrRequest(e,t,n,r,a,i,o,l){e.open(t,n,!0),e.timeout=i;for(let[c,u]of Object.entries(r))e.setRequestHeader(c,u);return e.onerror=()=>l&&l(null),e.onreadystatechange=()=>{if(e.readyState===Rre.complete&&l){let c=this.parseJSON(e.responseText);l(c)}},o&&(e.ontimeout=o),e.send(a),e}static parseJSON(e){if(!e||e==="")return null;try{return JSON.parse(e)}catch{return console&&console.log("failed to parse JSON response",e),null}}static serialize(e,t){let n=[];for(var r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;let a=t?`${t}[${r}]`:r,i=e[r];typeof i=="object"?n.push(this.serialize(i,a)):n.push(encodeURIComponent(a)+"="+encodeURIComponent(i))}return n.join("&")}static appendParams(e,t){if(Object.keys(t).length===0)return e;let n=e.match(/\?/)?"&":"?";return`${e}${n}${this.serialize(t)}`}},Mre=e=>{let t="",n=new Uint8Array(e),r=n.byteLength;for(let a=0;a<r;a++)t+=String.fromCharCode(n[a]);return btoa(t)},Nu=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(zj)&&(this.authToken=atob(t[1].slice(zj.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(e),this.readyState=ai.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+Uj.websocket),"$1/"+Uj.longpoll)}endpointURL(){return xb.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,n){this.close(e,t,n),this.readyState=ai.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===ai.open||this.readyState===ai.connecting}poll(){const e={Accept:"application/json"};this.authToken&&(e["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",e,null,()=>this.ontimeout(),t=>{if(t){var{status:n,token:r,messages:a}=t;if(n===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=r}else n=0;switch(n){case 200:a.forEach(i=>{setTimeout(()=>this.onmessage({data:i}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=ai.open,this.onopen({}),this.poll();break;case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${n}`)}})}send(e){typeof e!="string"&&(e=Mre(e)),this.currentBatch?this.currentBatch.push(e):this.awaitingBatchAck?this.batchBuffer.push(e):(this.currentBatch=[e],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(e,t=0){this.awaitingBatchAck=!0;const n=t+Ore,r=e.slice(t,n);this.ajax("POST",{"Content-Type":"application/x-ndjson"},r.join(`
719`),()=>this.onerror("timeout"),a=>{!a||a.status!==200?(this.awaitingBatchAck=!1,this.onerror(a&&a.status),this.closeAndRetry(1011,"internal server error",!1)):n<e.length?this.batchSend(e,n):this.batchBuffer.length>0?(this.batchSend(this.batchBuffer),this.batchBuffer=[]):this.awaitingBatchAck=!1})}close(e,t,n){for(let a of this.reqs)a.abort();this.readyState=ai.closed;let r=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:n});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",r)):this.onclose(r)}ajax(e,t,n,r,a){let i,o=()=>{this.reqs.delete(i),r()};i=xb.request(e,this.endpointURL(),t,n,this.timeout,o,l=>{this.reqs.delete(i),this.isActive()&&a(l)}),this.reqs.add(i)}},Dre=class Yf{constructor(t,n={}){let r=n.events||{state:"presence_state",diff:"presence_diff"};this.state=Object.create(null),this.pendingDiffs=[],this.channel=t,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(r.state,a=>{let{onJoin:i,onLeave:o,onSync:l}=this.caller;this.joinRef=this.channel.joinRef(),this.state=Yf.syncState(this.state,a,i,o),this.pendingDiffs.forEach(c=>{this.state=Yf.syncDiff(this.state,c,i,o)}),this.pendingDiffs=[],l()}),this.channel.on(r.diff,a=>{let{onJoin:i,onLeave:o,onSync:l}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(a):(this.state=Yf.syncDiff(this.state,a,i,o),l())})}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}list(t){return Yf.list(this.state,t)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(t,n,r,a){let i=this.toNullProtoObj(this.clone(t));n=this.toNullProtoObj(n);let o=Object.create(null),l=Object.create(null);return this.map(i,(c,u)=>{n[c]||(l[c]=u)}),this.map(n,(c,u)=>{let h=i[c];if(h){let d=u.metas.map(m=>m.phx_ref),f=h.metas.map(m=>m.phx_ref),p=u.metas.filter(m=>f.indexOf(m.phx_ref)<0),y=h.metas.filter(m=>d.indexOf(m.phx_ref)<0);p.length>0&&(o[c]=u,o[c].metas=p),y.length>0&&(l[c]=this.clone(h),l[c].metas=y)}else o[c]=u}),this.syncDiff(i,{joins:o,leaves:l},r,a)}static syncDiff(t,n,r,a){t=this.toNullProtoObj(t);let{joins:i,leaves:o}=this.clone(n);return r||(r=function(){}),a||(a=function(){}),this.map(i,(l,c)=>{let u=t[l];if(t[l]=this.clone(c),u){let h=t[l].metas.map(f=>f.phx_ref),d=u.metas.filter(f=>h.indexOf(f.phx_ref)<0);t[l].metas.unshift(...d)}r(l,u,c)}),this.map(o,(l,c)=>{let u=t[l];if(!u)return;let h=c.metas.map(d=>d.phx_ref);u.metas=u.metas.filter(d=>h.indexOf(d.phx_ref)<0),a(l,u,c),u.metas.length===0&&delete t[l]}),t}static list(t,n){return n||(n=function(r,a){return a}),this.map(t,(r,a)=>n(r,a))}static map(t,n){return Object.getOwnPropertyNames(t).map(r=>n(r,t[r]))}static toNullProtoObj(t){if(Object.getPrototypeOf(t)===null)return t;let n=Object.create(null);return Object.getOwnPropertyNames(t).forEach(r=>{n[r]=t[r]}),n}static clone(t){return JSON.parse(JSON.stringify(t))}},Sy={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(e,t){if(e.payload.constructor===ArrayBuffer)return t(this.binaryEncode(e));{let n=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(n))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[n,r,a,i,o]=JSON.parse(e);return t({join_ref:n,ref:r,topic:a,event:i,payload:o})}},binaryEncode(e){let{join_ref:t,ref:n,event:r,topic:a,payload:i}=e,o=new TextEncoder,l=o.encode(t),c=o.encode(n),u=o.encode(a),h=o.encode(r);this.assertFieldSize(l.byteLength,"join_ref"),this.assertFieldSize(c.byteLength,"ref"),this.assertFieldSize(u.byteLength,"topic"),this.assertFieldSize(h.byteLength,"event");let d=this.META_LENGTH+l.byteLength+c.byteLength+u.byteLength+h.byteLength,f=new ArrayBuffer(this.HEADER_LENGTH+d),p=new Uint8Array(f),y=new DataView(f),m=0;y.setUint8(m++,this.KINDS.push),y.setUint8(m++,l.byteLength),y.setUint8(m++,c.byteLength),y.setUint8(m++,u.byteLength),y.setUint8(m++,h.byteLength),p.set(l,m),m+=l.byteLength,p.set(c,m),m+=c.byteLength,p.set(u,m),m+=u.byteLength,p.set(h,m),m+=h.byteLength;var v=new Uint8Array(f.byteLength+i.byteLength);return v.set(p,0),v.set(new Uint8Array(i),f.byteLength),v.buffer},assertFieldSize(e,t){if(e>255)throw new Error(`unable to convert ${t} to binary: must be less than or equal to 255 bytes, but is ${e} bytes`)},binaryDecode(e){let t=new DataView(e),n=t.getUint8(0),r=new TextDecoder;switch(n){case this.KINDS.push:return this.decodePush(e,t,r);case this.KINDS.reply:return this.decodeReply(e,t,r);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,r)}},decodePush(e,t,n){let r=t.getUint8(1),a=t.getUint8(2),i=t.getUint8(3),o=this.HEADER_LENGTH+this.META_LENGTH-1,l=n.decode(e.slice(o,o+r));o=o+r;let c=n.decode(e.slice(o,o+a));o=o+a;let u=n.decode(e.slice(o,o+i));o=o+i;let h=e.slice(o,e.byteLength);return{join_ref:l,ref:null,topic:c,event:u,payload:h}},decodeReply(e,t,n){let r=t.getUint8(1),a=t.getUint8(2),i=t.getUint8(3),o=t.getUint8(4),l=this.HEADER_LENGTH+this.META_LENGTH,c=n.decode(e.slice(l,l+r));l=l+r;let u=n.decode(e.slice(l,l+a));l=l+a;let h=n.decode(e.slice(l,l+i));l=l+i;let d=n.decode(e.slice(l,l+o));l=l+o;let f=e.slice(l,e.byteLength),p={status:d,response:f};return{join_ref:c,ref:u,topic:h,event:Yi.reply,payload:p}},decodeBroadcast(e,t,n){let r=t.getUint8(1),a=t.getUint8(2),i=this.HEADER_LENGTH+2,o=n.decode(e.slice(i,i+r));i=i+r;let l=n.decode(e.slice(i,i+a));i=i+a;let c=e.slice(i,e.byteLength);return{join_ref:null,ref:null,topic:o,event:l,payload:c}}},$re=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||Are,this.transport=t.transport||Js.WebSocket||Nu,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null;let n=null;try{n=Js&&Js.sessionStorage}catch{}this.sessionStore=t.sessionStorage||n,this.establishedConnections=0,this.defaultEncoder=Sy.encode.bind(Sy),this.defaultDecoder=Sy.decode.bind(Sy),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=t.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==Nu?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let r=null;Bu&&Bu.addEventListener&&(Bu.addEventListener("pagehide",a=>{this.conn&&(this.disconnect(),r=this.connectClock)}),Bu.addEventListener("pageshow",a=>{r===this.connectClock&&(r=null,this.connect())}),Bu.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=t.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=t.autoSendHeartbeat??!0,this.heartbeatCallback=t.heartbeatCallback??(()=>{}),this.rejoinAfterMs=a=>t.rejoinAfterMs?t.rejoinAfterMs(a):[1e3,2e3,5e3][a-1]||1e4,this.reconnectAfterMs=a=>t.reconnectAfterMs?t.reconnectAfterMs(a):[10,50,100,150,200,250,500,1e3,2e3][a-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(a,i,o)=>{console.log(`${a}: ${i}`,o)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=wd(t.params||{}),this.endPoint=`${e}/${Uj.websocket}`,this.vsn=t.vsn||Tre,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new h8(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{t.beforeReconnect&&await t.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=t.authToken&&wd(t.authToken)}getLongPollTransport(){return Nu}replaceTransport(e){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=e}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let e=xb.appendParams(xb.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return e.charAt(0)!=="/"?e:e.charAt(1)==="/"?`${this.protocol()}:${e}`:`${this.protocol()}://${location.host}${e}`}disconnect(e,t,n){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,e&&e()},t,n)}connect(e){e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=wd(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==Nu?this.connectWithFallback(Nu,this.longPollFallbackMs):this.transportConnect())}log(e,t,n){this.logger&&this.logger(e,t,n)}hasLogger(){return this.logger!==null}onOpen(e){let t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}onClose(e){let t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}onError(e){let t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}onMessage(e){let t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}onHeartbeat(e){this.heartbeatCallback=e}ping(e){if(!this.isConnected())return!1;let t=this.makeRef(),n=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:t});let r=this.onMessage(a=>{a.ref===t&&(this.off([r]),e(Date.now()-n))});return!0}transportName(e){switch(e){case Nu:return"LongPoll";default:return e.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=["phoenix",`${zj}${btoa(this.authToken()).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),e),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=t=>this.onConnError(t),this.conn.onmessage=t=>this.onConnMessage(t),this.conn.onclose=t=>this.onConnClose(t)}getSession(e){return this.sessionStore&&this.sessionStore.getItem(e)}storeSession(e,t){this.sessionStore&&this.sessionStore.setItem(e,t)}connectWithFallback(e,t=2500){clearTimeout(this.fallbackTimer);let n=!1,r=!0,a,i,o=this.transportName(e),l=c=>{this.log("transport",`falling back to ${o}...`,c),this.off([a,i]),r=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${o}`))return l("memorized");this.fallbackTimer=setTimeout(l,t),i=this.onError(c=>{this.log("transport","error",c),r&&!n&&(clearTimeout(this.fallbackTimer),l(c))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(n=!0,!r){let c=this.transportName(e);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${c}`,"true"),this.log("transport",`established ${c} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(l,t),this.ping(c=>{this.log("transport","connected to primary after",c),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks("open")}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(e){this.log("error","error in heartbeat callback",e)}this.triggerChanError(new Error("heartbeat timeout")),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),Ere,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(e,t,n){if(!this.conn)return e&&e();const r=this.conn;this.waitForBufferDone(r,()=>{t?r.close(t,n||""):r.close(),this.waitForSocketClosed(r,()=>{this.conn===r&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),e&&e()})})}waitForBufferDone(e,t,n=1){if(n===5||!e.bufferedAmount){t();return}setTimeout(()=>{this.waitForBufferDone(e,t,n+1)},150*n)}waitForSocketClosed(e,t,n=1){if(n===5||e.readyState===ai.closed){t();return}setTimeout(()=>{this.waitForSocketClosed(e,t,n+1)},150*n)}onConnClose(e){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",e),this.triggerChanError(e),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",e)}onConnError(e){this.hasLogger()&&this.log("transport","error",e);let t=this.transport,n=this.establishedConnections;this.triggerStateCallbacks("error",e,t,n),(t===this.transport||n>0)&&this.triggerChanError(e)}
vendor: 4,217 bytes, line 719
719triggerChanError(e){this.channels.forEach(t=>{t.isErrored()||t.isLeaving()||t.isClosed()||t.trigger(Yi.error,e)})}connectionState(){switch(this.conn&&this.conn.readyState){case ai.connecting:return"connecting";case ai.open:return"open";case ai.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter(t=>t!==e)}off(e){for(let t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter(([n])=>e.indexOf(n)===-1)}channel(e,t={}){let n=new Ire(e,t,this);return this.channels.push(n),n}push(e){if(this.hasLogger()){let{topic:t,event:n,payload:r,ref:a,join_ref:i}=e;this.log("push",`${t} ${n} (${i}, ${a})`,r)}this.isConnected()?this.encode(e,t=>this.conn.send(t)):this.sendBuffer.push(()=>this.encode(e,t=>this.conn.send(t)))}makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(e){this.log("error","error in heartbeat callback",e)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(e){this.log("error","error in heartbeat callback",e)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}onConnMessage(e){this.decode(e.data,t=>{let{topic:n,event:r,payload:a,ref:i,join_ref:o}=t;if(i&&i===this.pendingHeartbeatRef){const l=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(a.status==="ok"?"ok":"error",l)}catch(c){this.log("error","error in heartbeat callback",c)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${a.status||""} ${n} ${r} ${i&&"("+i+")"||""}`.trim(),a);for(let l=0;l<this.channels.length;l++){const c=this.channels[l];c.isMember(n,r,a,o)&&c.trigger(r,a,i,o)}this.triggerStateCallbacks("message",t)})}triggerStateCallbacks(e,...t){try{this.stateChangeCallbacks[e].forEach(([n,r])=>{try{r(...t)}catch(a){this.log("error",`error in ${e} callback`,a)}})}catch(n){this.log("error",`error triggering ${e} callbacks`,n)}}leaveOpenTopic(e){let t=this.channels.find(n=>n.topic===e&&(n.isJoined()||n.isJoining()));t&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${e}"`),t.leave())}};class hp{constructor(t,n){const r=Fre(n);this.presence=new Dre(t.getChannel(),r),this.presence.onJoin((a,i,o)=>{const l=hp.onJoinPayload(a,i,o);t.getChannel().trigger("presence",l)}),this.presence.onLeave((a,i,o)=>{const l=hp.onLeavePayload(a,i,o);t.getChannel().trigger("presence",l)}),this.presence.onSync(()=>{t.getChannel().trigger("presence",{event:"sync"})})}get state(){return hp.transformState(this.presence.state)}static transformState(t){return t=Lre(t),Object.getOwnPropertyNames(t).reduce((n,r)=>{const a=t[r];return n[r]=Tv(a),n},{})}static onJoinPayload(t,n,r){const a=MO(n),i=Tv(r);return{event:"join",key:t,currentPresences:a,newPresences:i}}static onLeavePayload(t,n,r){const a=MO(n),i=Tv(r);return{event:"leave",key:t,currentPresences:a,leftPresences:i}}}function Tv(e){return e.metas.map(t=>{const n=Object.getOwnPropertyDescriptors(t),r=Object.defineProperties({},n);return r.presence_ref=r.phx_ref,delete r.phx_ref,delete r.phx_ref_prev,r})}function Lre(e){return JSON.parse(JSON.stringify(e))}function Fre(e){return(e==null?void 0:e.events)&&{events:e.events}}function MO(e){return e!=null&&e.metas?Tv(e):[]}var DO;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(DO||(DO={}));class Bre{get state(){return this.presenceAdapter.state}constructor(t,n){this.channel=t,this.presenceAdapter=new hp(this.channel.channelAdapter,n)}}function Wre(e){if(e instanceof Error)return e;if(typeof e=="string")return new Error(e);
719if(e&&typeof e=="object"){const t=e;if(typeof t.code=="number"){const n=typeof t.reason=="string"&&t.reason?` (${t.reason})`:"";return new Error(`socket closed: ${t.code}${n}`,{cause:e})}return new Error("channel error: transport failure",{cause:e})}return new Error("channel error: connection lost")}class qre{constructor(t,n,r){const a=Ure(r);this.channel=t.getSocket().channel(n,a),this.socket=t}get state(){return this.channel.state}set state(t){this.channel.state=t}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(t,n){return this.channel.on(t,n)}off(t,n){this.channel.off(t,n)}subscribe(t){return this.channel.join(t)}unsubscribe(t){return this.channel.leave(t)}teardown(){this.channel.teardown()}onClose(t){this.channel.onClose(t)}onError(t){return this.channel.onError(t)}push(t,n,r){let a;try{a=this.channel.push(t,n,r)}catch{throw new Error(`tried to push '${t}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>xre){const i=this.channel.pushBuffer.shift();i.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${i.event}`,i.payload())}return a}updateJoinPayload(t){const n=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},n),t)}canPush(){return this.socket.isConnected()&&this.state===Jo.joined}isJoined(){return this.state===Jo.joined}isJoining(){return this.state===Jo.joining}isClosed(){return this.state===Jo.closed}isLeaving(){return this.state===Jo.leaving}updateFilterBindings(t){this.channel.filterBindings=t}updatePayloadTransform(t){this.channel.onMessage=t}getChannel(){return this.channel}}function Ure(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},e.config)}}const zre=/[,()"\\]/,Hre=e=>zre.test(e)||e!==e.trim(),Vre=e=>`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`,$O=e=>{const t=e===null?"null":String(e);return Hre(t)?Vre(t):t},Gre=e=>e===null?"null":String(e),Yre=(e,t)=>{if(e==="in"){const n=Array.isArray(t)?t:[t];if(n.length===0)throw new Error("Realtime `in` filter requires at least one value.");return`in.(${Array.from(new Set(n)).map(a=>$O(a)).join(",")})`}return e==="is"?`is.${Gre(t)}`:`${e}.${$O(t)}`};class Kre{constructor(){this.filters=[]}add(t,n,r,a=!1){const i=a?"not.":"";return this.filters.push(`${t}=${i}${Yre(n,r)}`),this}eq(t,n){return this.add(t,"eq",n)}neq(t,n){return this.add(t,"neq",n)}gt(t,n){return this.add(t,"gt",n)}gte(t,n){return this.add(t,"gte",n)}lt(t,n){return this.add(t,"lt",n)}lte(t,n){return this.add(t,"lte",n)}in(t,n){return this.add(t,"in",n)}like(t,n){return this.add(t,"like",n)}ilike(t,n){return this.add(t,"ilike",n)}match(t,n){return this.add(t,"match",n)}imatch(t,n){return this.add(t,"imatch",n)}is(t,n){return this.add(t,"is",n)}isDistinct(t,n){return this.add(t,"isdistinct",n)}not(t,n,r){return this.add(t,n,r,!0)}build(){return this.filters.join(",")}toString(){return this.build()}}var LO;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(LO||(LO={}));var ed;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(ed||(ed={}));var Ki;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(Ki||(Ki={}));class fp{get state(){return this.channelAdapter.state}set state(t){this.channelAdapter.state=t}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(t,n={config:{}},r){var a,i;if(this.topic=t,this.params=n,this.socket=r,this.bindings={},this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},n.config),this.channelAdapter=new qre(this.socket.socketAdapter,t,this.params),this.presence=new Bre(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=d8(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((i=(a=this.params.config)===null||a===void 0?void 0:a.broadcast)===null||i===void 0)&&i.replay))throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(t,n=this.timeout){var r,a,i;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:o,presence:l,private:c}}=this.params,u=(a=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(p=>p.filter))!==null&&a!==void 0?a:[],h=!!this.bindings[ed.PRESENCE]&&this.bindings[ed.PRESENCE].length>0||((i=this.params.config.presence)===null||i===void 0?void 0:i.enabled)===!0,d={},f={broadcast:o,presence:Object.assign(Object.assign({},l),{enabled:h}),postgres_changes:u,private:c};this.socket.accessTokenValue&&(d.access_token=this.socket.accessTokenValue),this._onError(p=>{t==null||t(Ki.CHANNEL_ERROR,Wre(p))}),this._onClose(()=>t==null?void 0:t(Ki.CLOSED)),this.updateJoinPayload(Object.assign({config:f},d)),this._updateFilterMessage(),this.channelAdapter.subscribe(n).receive("ok",async({postgres_changes:p})=>{if(this.socket._isManualToken()||this.socket.setAuth(),p===void 0){t==null||t(Ki.SUBSCRIBED);return}this._updatePostgresBindings(p,t)}
719).receive("error",p=>{this.state=Jo.errored;const y=Object.values(p).join(", ")||"error";t==null||t(Ki.CHANNEL_ERROR,new Error(y,{cause:p}))}).receive("timeout",()=>{t==null||t(Ki.TIMED_OUT)})}return this}_updatePostgresBindings(t,n){var r;const a=this.bindings.postgres_changes,i=(r=a==null?void 0:a.length)!==null&&r!==void 0?r:0,o=[];for(let l=0;l<i;l++){const c=a[l],{filter:{event:u,schema:h,table:d,filter:f}}=c,p=t&&t[l];if(p&&p.event===u&&fp.isFilterValueEqual(p.schema,h)&&fp.isFilterValueEqual(p.table,d)&&fp.isFilterValueEqual(p.filter,f))o.push(Object.assign(Object.assign({},c),{id:p.id}));else{this.unsubscribe(),this.state=Jo.errored,n==null||n(Ki.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=o,this.state!=Jo.errored&&n&&n(Ki.SUBSCRIBED)}presenceState(){return this.presence.state}async track(t,n={}){return await this.send({type:"presence",event:"track",payload:t},n)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,n,r){const a=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),i=t===ed.PRESENCE||t===ed.POSTGRES_CHANGES;if(a&&i)throw this.socket.log("channel",`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(t,n,r)}async httpSend(t,n,r={}){var a;if(n==null)return Promise.reject(new Error("Payload is required for httpSend()"));const i=n instanceof ArrayBuffer||ArrayBuffer.isView(n),o={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":i?"application/octet-stream":"application/json"};this.socket.accessTokenValue&&(o.Authorization=`Bearer ${this.socket.accessTokenValue}`);const l=new URL(this.broadcastEndpointURL);l.pathname+=`/${encodeURIComponent(this.subTopic)}/events/${encodeURIComponent(t)}`,this.private&&l.searchParams.set("private","true");const c={method:"POST",headers:o,body:i?n:JSON.stringify(n)},u=await this._fetchWithTimeout(l.toString(),c,(a=r.timeout)!==null&&a!==void 0?a:this.timeout);if(u.status===202)return{success:!0};if(u.status===404)return Promise.reject(new Error("httpSend() requires Realtime server v2.97.0 or newer; the endpoint returned 404. Update your Supabase CLI to a recent version, or upgrade the Realtime server in your self-hosted setup. See https://github.com/supabase/supabase-js/blob/master/packages/core/realtime-js/migrations/httpsend-server-version.md"));let h=u.statusText;try{const d=await u.json();h=d.error||d.message||h}catch{}return Promise.reject(new Error(h))}async send(t,n={}){var r,a;if(!this.channelAdapter.canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated 
719in the future. Please use httpSend() explicitly for REST delivery.");const{event:i,payload:o}=t,l={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(l.Authorization=`Bearer ${this.socket.accessTokenValue}`);const c={method:"POST",headers:l,body:JSON.stringify({messages:[{topic:this.subTopic,event:i,payload:o,private:this.private}]})};try{const u=await this._fetchWithTimeout(this.broadcastEndpointURL,c,(r=n.timeout)!==null&&r!==void 0?r:this.timeout);return await((a=u.body)===null||a===void 0?void 0:a.cancel()),u.ok?"ok":"error"}catch(u){return u instanceof Error&&u.name==="AbortError"?"timed out":"error"}}else return new Promise(i=>{var o,l,c;const u=this.channelAdapter.push(t.type,t,n.timeout||this.timeout);t.type==="broadcast"&&!(!((c=(l=(o=this.params)===null||o===void 0?void 0:o.config)===null||l===void 0?void 0:l.broadcast)===null||c===void 0)&&c.ack)&&i("ok"),u.receive("ok",()=>i("ok")),u.receive("error",()=>i("error")),u.receive("timeout",()=>i("timed out"))})}updateJoinPayload(t){this.channelAdapter.updateJoinPayload(t)}async unsubscribe(t=this.timeout){return new Promise(n=>{this.channelAdapter.unsubscribe(t).receive("ok",()=>n("ok")).receive("timeout",()=>n("timed out")).receive("error",()=>n("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(t,n,r){const a=new AbortController,i=setTimeout(()=>a.abort(),r),o=await this.socket.fetch(t,Object.assign(Object.assign({},n),{signal:a.signal}));return clearTimeout(i),o}_on(t,n,r){const a=t.toLocaleLowerCase(),i=n==null?void 0:n.filter;(i instanceof Kre||typeof i=="object"&&i!==null&&typeof i.build=="function")&&(n=Object.assign(Object.assign({},n),{filter:i.build()}));const o=this.channelAdapter.on(t,r),l={type:a,filter:n,callback:r,ref:o};return this.bindings[a]?this.bindings[a].push(l):this.bindings[a]=[l],this._updateFilterMessage(),this}_onClose(t){this.channelAdapter.onClose(t)}_onError(t){this.channelAdapter.onError(t)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((t,n,r)=>{var a,i,o,l,c,u,h;const d=t.event.toLocaleLowerCase();if(this._notThisChannelEvent(d,r))return!1;const f=(a=this.bindings[d])===null||a===void 0?void 0:a.find(p=>p.ref===t.ref);if(!f)return!0;if(["broadcast","presence","postgres_changes"].includes(d))if("id"in f){const p=f.id,y=(i=f.filter)===null||i===void 0?void 0:i.event;return p&&((o=n.ids)===null||o===void 0?void 0:o.includes(p))&&(y==="*"||(y==null?void 0:y.toLocaleLowerCase())===((l=n.data)===null||l===void 0?void 0:l.type.toLocaleLowerCase()))}else{const p=(u=(c=f==null?void 0:f.filter)===null||c===void 0?void 0:c.event)===null||u===void 0?void 0:u.toLocaleLowerCase();return p==="*"||p===((h=n==null?void 0:n.event)===null||h===void 0?void 0:h.toLocaleLowerCase())}else return f.type.toLocaleLowerCase()===d})}_notThisChannelEvent(t,n){const{close:r,error:a,leave:i,join:o}=c8;return n&&[r,a,i,o].includes(t)&&n!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((t,n,r)=>{if(typeof n=="object"&&"ids"in n){const a=n.data,{schema:i,table:o,commit_timestamp:l,type:c,errors:u}=a;return Object.assign(Object.assign({},{schema:i,table:o,commit_timestamp:l,eventType:c,new:{},old:{},errors:u}),this._getPayloadRecords(a))}return n})}copyBindings(t){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const n in t.bindings)for(const r of t.bindings[n])this._on(r.type,r.filter,r.callback)}static isFilterValueEqual(t,n){return(t??void 0)===(n??void 0)}_getPayloadRecords(t){const n={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(n.new=IO(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(n.old=IO(t.columns,t.old_record)),n}}class Xre{constructor(t,n){this.socket=new $re(t,n)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(t){this.socket.heartbeatCallback=t}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(t,n,r,a=1e4){return new Promise(i=>{setTimeout(()=>i("timeout"),a),this.socket.disconnect(()=>{t(),i("ok")},n,r)})}push(t){this.socket.push(t)}log(t,n,r){this.socket.log(t,n,r)}makeRef(){return this.socket.makeRef()}onOpen(t){this.socket.onOpen(t)}onClose(t){this.socket.onClose(t)}onError(t){this.socket.onError(t)}onMessage(t){this.socket.onMessage(t)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==Wj.connecting}isDisconnecting(){return this.socket.connectionState()==Wj.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const FO={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},Qre=[1e3,2e3,5e3,1e4],Jre=1e4;function Zre(){const e=new Map;return{get length(){return e.size},clear(){e.clear()},getItem(t){return e.has(t)?e.get(t):null},key(t){var n;return(n=Array.from(e.keys())[t])!==null&&n!==void 0?n:null},removeItem(t){e.delete(t)},setItem(t,n){e.set(t,String(n))}}}function eae(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return Zre()}const tae=`
720  addEventListener("message", (e) => {
721    if (e.data.event === "start") {
722      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
723    }
724  });`;class nae{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(t,n){var r;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={}
724,this.ref=0,this.serializer=new wre,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=i=>i?(...o)=>i(...o):(...o)=>fetch(...o),!(!((r=n==null?void 0:n.params)===null||r===void 0)&&r.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=n.params.apikey;const a=this._initializeOptions(n);this.socketAdapter=new Xre(t,a),this.httpEndpoint=d8(t),this.fetch=this._resolveFetch(n==null?void 0:n.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(t){const n=t.message;throw new Error(`WebSocket not available: ${n}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(t,n){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},t,n)}getChannels(){return this.channels}async removeChannel(t){const n=await t.unsubscribe();return n==="ok"&&t.teardown(),n}async removeAllChannels(){const t=this.channels.map(async r=>{const a=await r.unsubscribe();return r.teardown(),a}),n=await Promise.all(t);return await this.disconnect(),n}log(t,n,r){this.socketAdapter.log(t,n,r)}connectionState(){return this.socketAdapter.connectionState()||Wj.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(t,n={config:{}}){const r=`realtime:${t}`,a=this.getChannels().find(i=>i.topic===r);if(a)return a;{const i=new fp(`realtime:${t}`,n,this);return this._cancelPendingDisconnect(),this.channels.push(i),i}}push(t){this.socketAdapter.push(t)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(t){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(t)}_makeRef(){return this.socketAdapter.makeRef()}_remove(t){this.channels=this.channels.filter(n=>n.topic!==t.topic),this.channels.length===0&&(this.log("transport","no channels remaining, scheduling disconnect"),this._schedulePendingDisconnect())}_schedulePendingDisconnect(){if(this._cancelPendingDisconnect(),this._disconnectOnEmptyChannelsAfterMs===0){this.log("transport","disconnecting immediately - no channels"),this.disconnect();return}
724this._pendingDisconnectTimer=setTimeout(()=>{this._pendingDisconnectTimer=null,this.channels.length===0&&(this.log("transport","deferred disconnect fired - no channels, disconnecting"),this.disconnect())},this._disconnectOnEmptyChannelsAfterMs),this.log("transport",`deferred disconnect scheduled in ${this._disconnectOnEmptyChannelsAfterMs}ms`)}_cancelPendingDisconnect(){this._pendingDisconnectTimer!==null&&(this.log("transport","pending disconnect cancelled - channel activity detected"),clearTimeout(this._pendingDisconnectTimer),this._pendingDisconnectTimer=null)}async _performAuth(t=null){let n,r=!1;if(t)n=t,r=!0;else if(this.accessToken)try{n=await this.accessToken()}catch(a){this.log("error","Error fetching access token from callback",a),n=this.accessTokenValue}else n=this.accessTokenValue;r?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=n&&(this.accessTokenValue=n,this.channels.forEach(a=>{const i={access_token:n,version:gre};n&&a.updateJoinPayload(i),a.joinedOnce&&a.channelAdapter.isJoined()&&a.channelAdapter.push(c8.access_token,{access_token:n})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(n=>{this.log("error",`Error setting auth in ${t}`,n)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(n=>{this.log("error","error waiting for auth on connect",n)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(t=>{t.ref&&t.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(t){return(n,r)=>{n!=="disconnected"&&(n=="sent"&&this._setAuthSafely(),t&&t(n,r))}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=n=>{this.log("worker","worker error",n.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=n=>{n.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_workerObjectUrl(t){let n;if(t)n=t;else{const r=new Blob([tae],{type:"application/javascript"});n=URL.createObjectURL(r)}return n}_initializeOptions(t){var n,r,a,i,o,l,c,u,h,d,f,p;this.worker=(n=t==null?void 0:t.worker)!==null&&n!==void 0?n:!1,this.accessToken=(r=t==null?void 0:t.accessToken)!==null&&r!==void 0?r:null;const y={};y.timeout=(a=t==null?void 0:t.timeout)!==null&&a!==void 0?a:bre,y.heartbeatIntervalMs=(i=t==null?void 0:t.heartbeatIntervalMs)!==null&&i!==void 0?i:FO.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(o=t==null?void 0:t.disconnectOnEmptyChannelsAfterMs)!==null&&o!==void 0?o:2*((l=t==null?void 0:t.heartbeatIntervalMs)!==null&&l!==void 0?l:FO.HEARTBEAT_INTERVAL),y.transport=(c=t==null?void 0:t.transport)!==null&&c!==void 0?c:pre.getWebSocketConstructor(),y.params=t==null?void 0:t.params,y.logger=t==null?void 0:t.logger,y.heartbeatCallback=this._wrapHeartbeatCallback(t==null?void 0:t.heartbeatCallback),y.sessionStorage=(u=t==null?void 0:t.sessionStorage)!==null&&u!==void 0?u:eae(),y.reconnectAfterMs=(h=t==null?void 0:t.reconnectAfterMs)!==null&&h!==void 0?h:x=>Qre[x-1]||Jre;let m,v;const b=(d=t==null?void 0:t.vsn)!==null&&d!==void 0?d:vre;switch(b){case yre:m=(x,w)=>w(JSON.stringify(x)),v=(x,w)=>w(JSON.parse(x));break;case l8:m=this.serializer.encode.bind(this.serializer),v=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${y.vsn}`)}if(y.vsn=b,y.encode=(f=t==null?void 0:t.encode)!==null&&f!==void 0?f:m,y.decode=(p=t==null?void 0:t.decode)!==null&&p!==void 0?p:v,y.beforeReconnect=this._reconnectAuth.bind(this),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,y.params=Object.assign(Object.assign({},y.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t==null?void 0:t.workerUrl,y.autoSendHeartbeat=!this.worker}return y}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
724var Qp=class extends Error{constructor(e,t){var n;super(e),this.name="IcebergError",this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType==="CommitStateUnknownException"||[500,502,504].includes(t.status)&&((n=t.icebergType)==null?void 0:n.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function rae(e,t,n){const r=new URL(t,e);if(n)for(const[a,i]of Object.entries(n))i!==void 0&&r.searchParams.set(a,i);return r.toString()}async function aae(e){return!e||e.type==="none"?{}:e.type==="bearer"?{Authorization:`Bearer ${e.token}`}:e.type==="header"?{[e.name]:e.value}:e.type==="custom"?await e.getHeaders():{}}function sae(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:n,path:r,query:a,body:i,headers:o}){const l=rae(e.baseUrl,r,a),c=await aae(e.auth),u=await t(l,{method:n,headers:{...i?{"Content-Type":"application/json"}:{},...c,...o},body:i?JSON.stringify(i):void 0}),h=await u.text(),d=(u.headers.get("content-type")||"").includes("application/json"),f=d&&h?JSON.parse(h):h;if(!u.ok){const p=d?f:void 0,y=p==null?void 0:p.error;throw new Qp((y==null?void 0:y.message)??`Request failed with status ${u.status}`,{status:u.status,icebergType:y==null?void 0:y.type,icebergCode:y==null?void 0:y.code,details:p})}return{status:u.status,headers:u.headers,data:f}}}}function Ny(e){return e.join("�")}var iae=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:Ny(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(r=>({namespace:r}))}async createNamespace(e,t){const n={namespace:e.namespace,properties:t==null?void 0:t.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:n})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Ny(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Ny(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Ny(e.namespace)}`}),!0}catch(t){if(t instanceof Qp&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(n){if(n instanceof Qp&&n.status===409)return;throw n}}};function Cu(e){return e.join("�")}var oae=class{constructor(e,t="",n){this.client=e,this.prefix=t,this.accessDelegation=n}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Cu(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const n={};return this.accessDelegation&&(n["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Cu(e.namespace)}/tables`,body:t,headers:n})).data.metadata}async updateTable(e,t){const n=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Cu(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":n.data["metadata-location"],metadata:n.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Cu(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String((t==null?void 0:t.purge)??!1)}})}async loadTable(e){const t={};return this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Cu(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){const t={};this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Cu(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(n){if(n instanceof Qp&&n.status===404)return!1;throw n}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(n){if(n instanceof Qp&&n.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw n}}},lae=class{constructor(e){var r;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const n=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=sae({baseUrl:n,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(r=e.accessDelegation)==null?void 0:r.join(","),this.namespaceOps=new iae(this.client,t),this.tableOps=new oae(this.client,t,this.accessDelegation)}async listNamespaces(e){return this.namespaceOps.listNamespaces(e)}async createNamespace(e,t){return this.namespaceOps.createNamespace(e,t)}async dropNamespace(e){await this.namespaceOps.dropNamespace(e)}async loadNamespaceMetadata(e){return this.namespaceOps.loadNamespaceMetadata(e)}async listTables(e){return this.tableOps.listTables(e)}
724async createTable(e,t){return this.tableOps.createTable(e,t)}async updateTable(e,t){return this.tableOps.updateTable(e,t)}async dropTable(e,t){await this.tableOps.dropTable(e,t)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,t){return this.namespaceOps.createNamespaceIfNotExists(e,t)}async createTableIfNotExists(e,t){return this.tableOps.createTableIfNotExists(e,t)}};function Jp(e){"@babel/helpers - typeof";return Jp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jp(e)}function cae(e,t){if(Jp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Jp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function uae(e){var t=cae(e,"string");return Jp(t)=="symbol"?t:t+""}function dae(e,t,n){return(t=uae(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function BO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function We(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?BO(Object(n),!0).forEach(function(r){dae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Rw=class extends Error{constructor(e,t="storage",n,r){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t==="vectors"?"StorageVectorsError":"StorageError",this.status=n,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function Iw(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var Hj=class extends Rw{constructor(e,t,n,r="storage"){super(e,r,t,n),this.name=r==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=t,this.statusCode=n}toJSON(){return We({},super.toJSON())}},f8=class extends Rw{constructor(e,t,n="storage"){super(e,n),this.name=n==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};function wb(e,t,n){const r=We({},e),a=t.toLowerCase();for(const i of Object.keys(r))i.toLowerCase()===a&&delete r[i];return r[a]=n,r}function hae(e){const t={};for(const[n,r]of Object.entries(e))t[n.toLowerCase()]=r;return t}const fae=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),pae=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Vj=e=>{if(Array.isArray(e))return e.map(n=>Vj(n));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([n,r])=>{const a=n.replace(/([-_][a-z])/gi,i=>i.toUpperCase().replace(/[-_]/g,""));t[a]=Vj(r)}),t},mae=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e),p8=e=>e.split("/").map(encodeURIComponent).join("/"),WO=e=>{if(typeof e=="object"&&e!==null){const t=e;if(typeof t.msg=="string")return t.msg;if(typeof t.message=="string")return t.message;if(typeof t.error_description=="string")return t.error_description;if(typeof t.error=="string")return t.error;if(typeof t.error=="object"&&t.error!==null){const n=t.error;if(typeof n.message=="string")return n.message}}return JSON.stringify(e)},gae=async(e,t,n,r)=>{if(e!==null&&typeof e=="object"&&"json"in e&&typeof e.json=="function"){const a=e;let i=parseInt(String(a.status),10);Number.isFinite(i)||(i=500),a.json().then(o=>{const l=(o==null?void 0:o.statusCode)||(o==null?void 0:o.code)||i+"";t(new Hj(WO(o),i,l,r))}).catch(()=>{const o=i+"";t(new Hj(a.statusText||`HTTP ${i} error`,i,o,r))})}else t(new f8(WO(e),e,r))},yae=(e,t,n,r)=>{const a={method:e,headers:(t==null?void 0:t.headers)||{}};if(e==="GET"||e==="HEAD"||!r)return We(We({},a),n);if(pae(r)){var i;const o=(t==null?void 0:t.headers)||{};let l;for(const[c,u]of Object.entries(o))c.toLowerCase()==="content-type"&&(l=u);a.headers=wb(o,"Content-Type",(i=l)!==null&&i!==void 0?i:"application/json"),a.body=JSON.stringify(r)}else a.body=r;return t!=null&&t.duplex&&(a.duplex=t.duplex),We(We({},a),n)};async function kf(e,t,n,r,a,i,o){return new Promise((l,c)=>{e(n,yae(t,r,a,i)).then(u=>{if(!u.ok)throw u;if(r!=null&&r.noResolveJson)return u;if(o==="vectors"){const h=u.headers.get("content-type");if(u.headers.get("content-length")==="0"||u.status===204)return{};
724if(!h||!h.includes("application/json"))return{}}return u.json()}).then(u=>l(u)).catch(u=>gae(u,c,r,o))})}function m8(e="storage"){return{get:async(t,n,r,a)=>kf(t,"GET",n,r,a,void 0,e),post:async(t,n,r,a,i)=>kf(t,"POST",n,a,i,r,e),put:async(t,n,r,a,i)=>kf(t,"PUT",n,a,i,r,e),head:async(t,n,r,a)=>kf(t,"HEAD",n,We(We({},r),{},{noResolveJson:!0}),a,void 0,e),remove:async(t,n,r,a,i)=>kf(t,"DELETE",n,a,i,r,e)}}const vae=m8("storage"),{get:Zp,post:js,put:Gj,head:bae,remove:em}=vae,Ca=m8("vectors");var Wh=class{constructor(e,t={},n,r="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=hae(t),this.fetch=fae(n),this.namespace=r}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=wb(this.headers,e,t),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(Iw(n))return{data:null,error:n};throw n}}};let g8;g8=Symbol.toStringTag;var xae=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[g8]="StreamDownloadBuilder",this.promise=null}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(Iw(t))return{data:null,error:t};throw t}}};let y8;y8=Symbol.toStringTag;var wae=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[y8]="BlobDownloadBuilder",this.promise=null}asStream(){return new xae(this.downloadFn,this.shouldThrowOnError)}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:await(await e.downloadFn()).blob(),error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(Iw(t))return{data:null,error:t};throw t}}};const H_={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},qO={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var _ae=class extends Wh{constructor(e,t={},n,r){super(e,t,r,"storage"),this.bucketId=n}async uploadOrUpdate(e,t,n,r){var a=this;return a.handleOperation(async()=>{let i;const o=We(We({},qO),r);let l=We(We({},a.headers),e==="POST"&&{"x-upsert":String(o.upsert)});const c=o.metadata;if(typeof Blob<"u"&&n instanceof Blob?(i=new FormData,i.append("cacheControl",o.cacheControl),c&&i.append("metadata",a.encodeMetadata(c)),i.append("",n)):typeof FormData<"u"&&n instanceof FormData?(i=n,i.has("cacheControl")||i.append("cacheControl",o.cacheControl),c&&!i.has("metadata")&&i.append("metadata",a.encodeMetadata(c))):(i=n,l["cache-control"]=`max-age=${o.cacheControl}`,l["content-type"]=o.contentType,c&&(l["x-metadata"]=a.toBase64(a.encodeMetadata(c))),(typeof ReadableStream<"u"&&i instanceof ReadableStream||i&&typeof i=="object"&&"pipe"in i&&typeof i.pipe=="function")&&!o.duplex&&(o.duplex="half")),r!=null&&r.headers)for(const[f,p]of Object.entries(r.headers))l=wb(l,f,p);const u=a._removeEmptyFolders(t),h=a._getFinalPath(u),d=await(e=="PUT"?Gj:js)(a.fetch,`${a.url}/object/${h}`,i,We({headers:l},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{path:u,id:d.Id,fullPath:d.Key}})}async upload(e,t,n){return this.uploadOrUpdate("POST",e,t,n)}async uploadToSignedUrl(e,t,n,r){var a=this;const i=a._removeEmptyFolders(e),o=a._getFinalPath(i),l=new URL(a.url+`/object/upload/sign/${o}`);return l.searchParams.set("token",t),a.handleOperation(async()=>{let c;const u=We(We({},qO),r);let h=We(We({},a.headers),{"x-upsert":String(u.upsert)});const d=u.metadata;if(typeof Blob<"u"&&n instanceof Blob?(c=new FormData,c.append("cacheControl",u.cacheControl),d&&c.append("metadata",a.encodeMetadata(d)),c.append("",n)):typeof FormData<"u"&&n instanceof FormData?(c=n,c.has("cacheControl")||c.append("cacheControl",u.cacheControl),d&&!c.has("metadata")&&c.append("metadata",a.encodeMetadata(d))):(c=n,h["cache-control"]=`max-age=${u.cacheControl}`,h["content-type"]=u.contentType,d&&(h["x-metadata"]=a.toBase64(a.encodeMetadata(d))),(typeof ReadableStream<"u"&&c instanceof ReadableStream||c&&typeof c=="object"&&"pipe"in c&&typeof c.pipe=="function")&&!u.duplex&&(u.duplex="half")),r!=null&&r.headers)for(const[f,p]of Object.entries(r.headers))h=wb(h,f,p);return{path:i,fullPath:(await Gj(a.fetch,l.toString(),c,We({headers:h},u!=null&&u.duplex?{duplex:u.duplex}:{}))).Key}})}async createSignedUploadUrl(e,t){var n=this;return n.handleOperation(async()=>{let r=n._getFinalPath(e);const a=We({},n.headers);t!=null&&t.upsert&&(a["x-upsert"]="true");const i=await js(n.fetch,`${n.url}/object/upload/sign/${r}`,{},{headers:a}),o=new URL(n.url+i.url),l=o.searchParams.get("token");if(!l)throw new Rw("No token returned by API");return{signedUrl:o.toString(),path:e,token:l}})}async update(e,t,n){return this.uploadOrUpdate("PUT",e,t,n)}async move(e,t,n){var r=this;return r.handleOperation(async()=>await js(r.fetch,`${r.url}/object/move`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,de
724stinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers}))}async copy(e,t,n){var r=this;return r.handleOperation(async()=>({path:(await js(r.fetch,`${r.url}/object/copy`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,destinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers})).Key}))}async createSignedUrl(e,t,n){var r=this;return r.handleOperation(async()=>{let a=r._getFinalPath(e);const i=typeof(n==null?void 0:n.transform)=="object"&&n.transform!==null&&Object.keys(n.transform).length>0;let o=await js(r.fetch,`${r.url}/object/sign/${a}`,We({expiresIn:t},i?{transform:n.transform}:{}),{headers:r.headers});const l=new URLSearchParams;n!=null&&n.download&&l.set("download",n.download===!0?"":n.download),(n==null?void 0:n.cacheNonce)!=null&&l.set("cacheNonce",String(n.cacheNonce));const c=l.toString();return{signedUrl:encodeURI(`${r.url}${o.signedURL}${c?`&${c}`:""}`)}})}async createSignedUrls(e,t,n){var r=this;return r.handleOperation(async()=>{const a=await js(r.fetch,`${r.url}/object/sign/${r.bucketId}`,{expiresIn:t,paths:e},{headers:r.headers}),i=new URLSearchParams;n!=null&&n.download&&i.set("download",n.download===!0?"":n.download),(n==null?void 0:n.cacheNonce)!=null&&i.set("cacheNonce",String(n.cacheNonce));const o=i.toString();return a.map(l=>We(We({},l),{},{signedUrl:l.signedURL?encodeURI(`${r.url}${l.signedURL}${o?`&${o}`:""}`):null}))})}download(e,t,n){const r=typeof(t==null?void 0:t.transform)=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image/authenticated":"object",a=new URLSearchParams;t!=null&&t.transform&&this.applyTransformOptsToQuery(a,t.transform),(t==null?void 0:t.cacheNonce)!=null&&a.set("cacheNonce",String(t.cacheNonce));const i=a.toString(),o=this._getFinalPath(e),l=()=>Zp(this.fetch,`${this.url}/${r}/${o}${i?`?${i}`:""}`,{headers:this.headers,noResolveJson:!0},n);return new wae(l,this.shouldThrowOnError)}async info(e){var t=this;const n=t._getFinalPath(e);return t.handleOperation(async()=>Vj(await Zp(t.fetch,`${t.url}/object/info/${n}`,{headers:t.headers})))}async exists(e){var t=this;const n=t._getFinalPath(e);try{return await bae(t.fetch,`${t.url}/object/${n}`,{headers:t.headers}),{data:!0,error:null}}catch(a){if(t.shouldThrowOnError)throw a;if(Iw(a)){var r;const i=a instanceof Hj?a.status:a instanceof f8?(r=a.originalError)===null||r===void 0?void 0:r.status:void 0;if(i!==void 0&&[400,404].includes(i))return{data:!1,error:a}}throw a}}getPublicUrl(e,t){const n=this._getFinalPath(e),r=new URLSearchParams;t!=null&&t.download&&r.set("download",t.download===!0?"":t.download),t!=null&&t.transform&&this.applyTransformOptsToQuery(r,t.transform),(t==null?void 0:t.cacheNonce)!=null&&r.set("cacheNonce",String(t.cacheNonce));const a=r.toString(),i=typeof(t==null?void 0:t.transform)=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${i}/public/${n}`)+(a?`?${a}`:"")}}}async remove(e){var t=this;return t.handleOperation(async()=>await em(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async purgeCache(e,t,n){var r=this;return r.handleOperation(async()=>{const a=p8(r._getFinalPath(e)),i=new URLSearchParams;t!=null&&t.transformations&&i.set("transformations","true");const o=i.toString();return await em(r.fetch,`${r.url}/cdn/${a}${o?`?${o}`:""}`,{},{headers:r.headers},n)})}async list(e,t,n){var r=this;return r.handleOperation(async()=>{const a=t!=null&&t.sortBy?We(We({},H_.sortBy),t.sortBy):H_.sortBy,i=We(We(We({},H_),t),{},{sortBy:a,prefix:e||""});return await js(r.fetch,`${r.url}/object/list/${r.bucketId}`,i,{headers:r.headers},n)})}async listV2(e,t){var n=this;return n.handleOperation(async()=>{const r=We({},e);return await js(n.fetch,`${n.url}/object/list-v2/${n.bucketId}`,r,{headers:n.headers},t)})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(e,t){return t.width&&e.set("width",t.width.toString()),t.height&&e.set("height",t.height.toString()),t.resize&&e.set("resize",t.resize),t.format&&e.set("format",t.format),t.quality&&e.set("qual
724ity",t.quality.toString()),e}};const kae="2.111.0",vg={"X-Client-Info":`storage-js/${kae}`};var jae=class extends Wh{constructor(e,t={},n,r){const a=new URL(e);r!=null&&r.useNewHostname&&/supabase\.(co|in|red)$/.test(a.hostname)&&!a.hostname.includes("storage.supabase.")&&(a.hostname=a.hostname.replace("supabase.","storage.supabase."));const i=a.href.replace(/\/$/,""),o=We(We({},vg),t);super(i,o,n,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const n=t.listBucketOptionsToQueryString(e);return await Zp(t.fetch,`${t.url}/bucket${n}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Zp(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var n=this;return n.handleOperation(async()=>await js(n.fetch,`${n.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:n.headers}))}async updateBucket(e,t){var n=this;return n.handleOperation(async()=>await Gj(n.fetch,`${n.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:n.headers}))}async emptyBucket(e){var t=this;return t.handleOperation(async()=>await js(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await em(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}async purgeBucketCache(e,t,n){var r=this;return r.handleOperation(async()=>{const a=new URLSearchParams;t!=null&&t.transformations&&a.set("transformations","true");const i=a.toString();return await em(r.fetch,`${r.url}/cdn/${p8(e)}${i?`?${i}`:""}`,{},{headers:r.headers},n)})}listBucketOptionsToQueryString(e){const t={};return e&&("limit"in e&&(t.limit=String(e.limit)),"offset"in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?"?"+new URLSearchParams(t).toString():""}},Sae=class extends Wh{constructor(e,t={},n){const r=e.replace(/\/$/,""),a=We(We({},vg),t);super(r,a,n,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await js(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const n=new URLSearchParams;(e==null?void 0:e.limit)!==void 0&&n.set("limit",e.limit.toString()),(e==null?void 0:e.offset)!==void 0&&n.set("offset",e.offset.toString()),e!=null&&e.sortColumn&&n.set("sortColumn",e.sortColumn),e!=null&&e.sortOrder&&n.set("sortOrder",e.sortOrder),e!=null&&e.search&&n.set("search",e.search);const r=n.toString(),a=r?`${t.url}/bucket?${r}`:`${t.url}/bucket`;return await Zp(t.fetch,a,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await em(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!mae(e))throw new Rw("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const n=new lae({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}),r=this.shouldThrowOnError;return new Proxy(n,{get(a,i){const o=a[i];return typeof o!="function"?o:async(...l)=>{try{return{data:await o.apply(a,l),error:null}}catch(c){if(r)throw c;return{data:null,error:c}}}}})}},Nae=class extends Wh{constructor(e,t={},n){const r=e.replace(/\/$/,""),a=We(We({},vg),{},{"Content-Type":"application/json"},t);super(r,a,n,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await Ca.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var n=this;return n.handleOperation(async()=>await Ca.post(n.fetch,`${n.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await Ca.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var n=this;return n.handleOperation(async()=>await Ca.post(n.fetch,`${n.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers})||{})}},Cae=class extends Wh{constructor(e,t={},n){const r=e.replace(/\/$/,""),a=We(We({},vg),{},{"Content-Type":"application/json"},t);super(r,a,n,"vectors")}async putVectors(e){var t=this;if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return t.handleOperation(async()=>await Ca.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await Ca.post(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}))}async listVectors(e){var t=this;if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");
724if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return t.handleOperation(async()=>await Ca.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await Ca.post(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}))}async deleteVectors(e){var t=this;if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return t.handleOperation(async()=>await Ca.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},Pae=class extends Wh{constructor(e,t={},n){const r=e.replace(/\/$/,""),a=We(We({},vg),{},{"Content-Type":"application/json"},t);super(r,a,n,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await Ca.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Ca.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await Ca.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Ca.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},Tae=class extends Pae{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new Aae(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,n=this;return t().call(n,e)}async getBucket(e){var t=()=>super.getBucket,n=this;return t().call(n,e)}async listBuckets(e={}){var t=()=>super.listBuckets,n=this;return t().call(n,e)}async deleteBucket(e){var t=()=>super.deleteBucket,n=this;return t().call(n,e)}},Aae=class extends Nae{constructor(e,t,n,r){super(e,t,r),this.vectorBucketName=n}async createIndex(e){var t=()=>super.createIndex,n=this;return t().call(n,We(We({},e),{},{vectorBucketName:n.vectorBucketName}))}async listIndexes(e={}){var t=()=>super.listIndexes,n=this;return t().call(n,We(We({},e),{},{vectorBucketName:n.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,n=this;return t().call(n,n.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,n=this;return t().call(n,n.vectorBucketName,e)}index(e){return new Eae(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},Eae=class extends Cae{constructor(e,t,n,r,a){super(e,t,a),this.vectorBucketName=n,this.indexName=r}async putVectors(e){var t=()=>super.putVectors,n=this;return t().call(n,We(We({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async getVectors(e){var t=()=>super.getVectors,n=this;return t().call(n,We(We({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,n=this;return t().call(n,We(We({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,n=this;return t().call(n,We(We({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,n=this;return t().call(n,We(We({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}},Oae=class extends jae{constructor(e,t={},n,r){super(e,t,n,r)}from(e){return new _ae(this.url,this.headers,e,this.fetch)}get vectors(){return new Tae(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new Sae(this.url+"/iceberg",this.headers,this.fetch)}};const v8="2.111.0",Xi=30*1e3,Kf=3,V_=Kf*Xi,Rae=2*Xi,Iae="http://localhost:9999",Mae="supabase.auth.token",Dae={"X-Client-Info":`gotrue-js/${v8}`},Yj="X-Supabase-Api-Version",b8={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},$ae=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,vc="sb_flow_id",Lae=5,Fae=10*60*1e3;class tm extends Error{constructor(t,n,r){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=r}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function xe(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class Bae extends tm{constructor(t,n,r){super(t,n,r),this.name="AuthApiError",this.status=n,this.code=r}}function UO(e){return xe(e)&&e.name==="AuthApiError"}class As extends tm{constructor(t,n){super(t),this.name="AuthUnknownError",this.originalError=n}}class Ri extends tm{constructor(t,n,r,a){super(t,r,a),this.name=n,this.status=r}}class or extends Ri{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function Cy(e){return xe(e)&&e.name==="AuthSessionMissingError"}class Pu extends Ri{constructor(){super("Auth session or user missing","AuthInvalidToken
724ResponseError",500,void 0)}}class Py extends Ri{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class Ty extends Ri{constructor(t,n=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function Wae(e){return xe(e)&&e.name==="AuthImplicitGrantRedirectError"}class zO extends Ri{constructor(t,n=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class qae extends Ri{constructor(){super("PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.","AuthPKCECodeVerifierMissingError",400,"pkce_code_verifier_not_found")}}class Kj extends Ri{constructor(t,n){super(t,"AuthRetryableFetchError",n,void 0)}}function Ay(e){return xe(e)&&e.name==="AuthRetryableFetchError"}class HO extends Ri{constructor(t="Refresh result discarded: session state changed mid-flight (e.g., concurrent signOut)"){super(t,"AuthRefreshDiscardedError",409,void 0)}}function Uae(e){return xe(e)&&e.name==="AuthRefreshDiscardedError"}class VO extends Ri{constructor(t,n,r){super(t,"AuthWeakPasswordError",n,"weak_password"),this.reasons=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class _b extends Ri{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const kb="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),GO=` 	
725\r=`.split(""),zae=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<GO.length;t+=1)e[GO[t].charCodeAt(0)]=-2;for(let t=0;t<kb.length;t+=1)e[kb[t].charCodeAt(0)]=t;return e})();function YO(e,t,n){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const r=t.queue>>t.queuedBits-6&63;n(kb[r]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const r=t.queue>>t.queuedBits-6&63;n(kb[r]),t.queuedBits-=6}}function x8(e,t,n){const r=zae[e];if(r>-1)for(t.queue=t.queue<<6|r,t.queuedBits+=6;t.queuedBits>=8;)n(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(r===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function KO(e){const t=[],n=o=>{t.push(String.fromCodePoint(o))},r={utf8seq:0,codepoint:0},a={queue:0,queuedBits:0},i=o=>{Gae(o,r,n)};for(let o=0;o<e.length;o+=1)x8(e.charCodeAt(o),a,i);return t.join("")}function Hae(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function Vae(e,t){for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);if(r>55295&&r<=56319){const a=(r-55296)*1024&65535;r=(e.charCodeAt(n+1)-56320&65535|a)+65536,n+=1}Hae(r,t)}}function Gae(e,t,n){if(t.utf8seq===0){if(e<=127){n(e);return}for(let r=1;r<6;r+=1)if(!(e>>7-r&1)){t.utf8seq=r;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&n(t.codepoint)}}function _d(e){const t=[],n={queue:0,queuedBits:0},r=a=>{t.push(a)};for(let a=0;a<e.length;a+=1)x8(e.charCodeAt(a),n,r);return new Uint8Array(t)}function Yae(e){const t=[];return Vae(e,n=>t.push(n)),new Uint8Array(t)}function bc(e){const t=[],n={queue:0,queuedBits:0},r=a=>{t.push(a)};return e.forEach(a=>YO(a,n,r)),YO(null,n,r),t.join("")}function Kae(e){return Math.round(Date.now()/1e3)+e}function Xae(){return Symbol("auth-callback")}const yr=()=>typeof window<"u"&&typeof document<"u",ec={tested:!1,writable:!1},w8=()=>
725{if(!yr())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(ec.tested)return ec.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),ec.tested=!0,ec.writable=!0}catch{ec.tested=!0,ec.writable=!1}return ec.writable};function XO(e){const t={},n=new URL(e);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEach((a,i)=>{t[i]=a})}catch{}return n.searchParams.forEach((r,a)=>{t[a]=r}),t}const _8=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),Qae=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",no=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},Rr=async(e,t)=>{const n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return null}},ua=async(e,t)=>{await e.removeItem(t)};class Mw{constructor(){this.promise=new Mw.promiseConstructor((t,n)=>{this.resolve=t,this.reject=n})}}Mw.promiseConstructor=Promise;function Ey(e){const t=e.split(".");if(t.length!==3)throw new _b("Invalid JWT structure");for(let r=0;r<t.length;r++)if(!$ae.test(t[r]))throw new _b("JWT not in base64url format");return{header:JSON.parse(KO(t[0])),payload:JSON.parse(KO(t[1])),signature:_d(t[2]),raw:{header:t[0],payload:t[1]}}}async function Jae(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function Zae(e,t){return new Promise((r,a)=>{(async()=>{for(let i=0;i<1/0;i++)try{const o=await e(i);if(!t(i,null,o)){r(o);return}}catch(o){if(!t(i,o)){a(o);return}}})()})}function k8(e){return("0"+e.toString(16)).substr(-2)}function ese(){const t=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",r=n.length;let a="";for(let i=0;i<56;i++)a+=n.charAt(Math.floor(Math.random()*r));return a}return crypto.getRandomValues(t),Array.from(t,k8).join("")}async function tse(e){const n=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",n),a=new Uint8Array(r);return Array.from(a).map(i=>String.fromCharCode(i)).join("")}async function nse(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const n=await tse(e);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}const rse=/^[a-zA-Z0-9_-]{8,64}$/;function Av(e){return typeof e=="string"&&rse.test(e)?e:null}function ase(){if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"){const t=new Uint8Array(16);return crypto.getRandomValues(t),Array.from(t,k8).join("")}let e="";for(let t=0;t<32;t++)e+=Math.floor(Math.random()*16).toString(16);return e}const th=(e,t)=>`${e}-flow-${t}-code-verifier`,nm=e=>`${e}-flows-code-verifier`;async function UP(e,t){const n=await Rr(e,nm(t));return Array.isArray(n)?n.filter(r=>Av(r)!==null):[]}async function sse(e,t,n,r,a){await no(e,th(t,n),r);const i=(await UP(e,t)).filter(o=>o!==n);for(i.push(n);i.length>Lae;){const o=i.shift();await ua(e,th(t,o)),a==null||a(o)}await no(e,nm(t),i),await no(e,`${t}-code-verifier`,r)}async function ise(e,t,n){if(n){const a=await Rr(e,th(t,n));return{verifier:typeof a=="string"?a:null,flowId:n}}const r=await Rr(e,`${t}-code-verifier`);return{verifier:typeof r=="string"?r:null,flowId:null}}async function gs(e,t,n){const r=`${t}-code-verifier`;if(!n){await ua(e,r);return}const a=th(t,n),i=await Rr(e,a);await ua(e,a);const o=await UP(e,t),l=o.filter(c=>c!==n);l.length!==o.length&&(l.length>0?await no(e,nm(t),l):await ua(e,nm(t))),i!=null&&i===await Rr(e,r)&&await ua(e,r)}async function ose(e,t){const n=await UP(e,t);for(const r of n)await ua(e,th(t,r));await ua(e,nm(t)),await ua(e,`${t}-code-verifier`)}function lse(e,t){const n=e.indexOf("#");let r=n===-1?e:e.slice(0,n);const a=n===-1?"":e.slice(n),i=r.indexOf("?");if(i!==-1){const l=r.slice(0,i),c=r.slice(i+1).split("&").filter(u=>u!==""&&u!==vc&&!u.startsWith(`${vc}=`));r=c.length>0?`${l}?${c.join("&")}`:l}const o=r.includes("?")?"&":"?";return`${r}${o}${vc}=${encodeURIComponent(t)}${a}`}async function cse(e,t,n=!1,r){const a=ese();let i=a;n&&(i+="/recovery");const o=ase();await sse(e,t,o,i,r);const l=await nse(a);return[l,a===l?"plain":"s256",o]}const use=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function dse(e){const t=e.headers.get(Yj);if(!t||!t.match(use))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function hse(e){if(!e)throw new Error("Missing exp claim");const t=Math.floor(Date.now()/1e3);if(e<=t)throw new Error("JWT has expired")}function fse(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const pse=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function qi(e){if(!pse.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function xs(e){if(!e.passkey)throw new Error("@supabase/auth-js: the passkey API is experimental and disabled by default. Enable it by passing `auth: { experimental: { passkey: true } }` to createClient (or to the GoTrueClient constructor).")}function G_(){const e={};return new Proxy(e,{get:(t,n)=>{if(n==="__isUserNotAvailableProxy")return!0;
725if(typeof n=="symbol"){const r=n.toString();if(r==="Symbol(Symbol.toPrimitive)"||r==="Symbol(Symbol.toStringTag)"||r==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${n}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function mse(e,t){return new Proxy(e,{get:(n,r,a)=>{if(r==="__isInsecureUserWarningProxy")return!0;if(typeof r=="symbol"){const i=r.toString();if(i==="Symbol(Symbol.toPrimitive)"||i==="Symbol(Symbol.toStringTag)"||i==="Symbol(util.inspect.custom)"||i==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(n,r,a)}return!t.value&&typeof r=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(n,r,a)}})}function QO(e){return JSON.parse(JSON.stringify(e))}const oc=e=>{if(typeof e=="object"&&e!==null){const t=e;if(typeof t.msg=="string")return t.msg;if(typeof t.message=="string")return t.message;if(typeof t.error_description=="string")return t.error_description;if(typeof t.error=="string")return t.error}return JSON.stringify(e)},gse=[500,501,502,503,504,520,521,522,523,524,525,526,527,528,529,530];async function JO(e){var t;if(!Qae(e))throw new Kj(oc(e),0);if(gse.includes(e.status))throw new Kj(oc(e),e.status);let n;try{n=await e.json()}catch(i){throw new As(oc(i),i)}let r;const a=dse(e);if(a&&a.getTime()>=b8["2024-01-01"].timestamp&&typeof n=="object"&&n&&typeof n.code=="string"?r=n.code:typeof n=="object"&&n&&typeof n.error_code=="string"&&(r=n.error_code),r){if(r==="weak_password")throw new VO(oc(n),e.status,((t=n.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(r==="session_not_found")throw new or}else if(typeof n=="object"&&n&&typeof n.weak_password=="object"&&n.weak_password&&Array.isArray(n.weak_password.reasons)&&n.weak_password.reasons.length&&n.weak_password.reasons.reduce((i,o)=>i&&typeof o=="string",!0))throw new VO(oc(n),e.status,n.weak_password.reasons);throw new Bae(oc(n),e.status||500,r)}const yse=(e,t,n,r)=>{const a={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?a:(a.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),a.body=JSON.stringify(r),Object.assign(Object.assign({},a),n))};async function Ae(e,t,n,r){var a;const i=Object.assign({},r==null?void 0:r.headers);i[Yj]||(i[Yj]=b8["2024-01-01"].name),r!=null&&r.jwt&&(i.Authorization=`Bearer ${r.jwt}`);const o=(a=r==null?void 0:r.query)!==null&&a!==void 0?a:{};r!=null&&r.redirectTo&&(o.redirect_to=r.redirectTo);const l=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",c=await vse(e,t,n+l,{headers:i,noResolveJson:r==null?void 0:r.noResolveJson},{},r==null?void 0:r.body);return r!=null&&r.xform?r==null?void 0:r.xform(c):{data:Object.assign({},c),error:null}}async function vse(e,t,n,r,a,i){const o=yse(t,r,a,i);let l;try{l=await e(n,Object.assign({},o))}catch(c){throw new Kj(oc(c),0)}if(l.ok||await JO(l),r!=null&&r.noResolveJson)return l;try{return await l.json()}catch(c){await JO(c)}}function Ua(e){var t;let n=null;wse(e)&&(n=Object.assign({},e),e.expires_at||(n.expires_at=Kae(e.expires_in)));const r=(t=e.user)!==null&&t!==void 0?t:typeof(e==null?void 0:e.id)=="string"?e:null;return{data:{session:n,user:r},error:null}}function ZO(e){const t=Ua(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((n,r)=>n&&typeof r=="string",!0)&&(t.data.weak_password=e.weak_password),t}function Zo(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function bse(e){return{data:e,error:null}}function xse(e){const{action_link:t,email_otp:n,hashed_token:r,redirect_to:a,verification_type:i}=e,o=Bh(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),l={action_link:t,email_otp:n,hashed_token:r,redirect_to:a,verification_type:i},c=Object.assign({},o);return{data:{properties:l,user:c},error:null}}function eR(e){return e}function wse(e){return!!e.access_token&&!!e.refresh_token&&!!e.expires_in}const Y_=["global","local","others"];class _se{constructor({url:t="",headers:n={},fetch:r,experimental:a}){this.url=t,this.headers=n,this.fetch=_8(r),this.experimental=a??{},this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)},this.passkey={listPasskeys:this._adminListPasskeys.bind(this),deletePasskey:this._adminDeletePasskey.bind(this)}}async signOut(t,n=Y_[0]){if(Y_.indexOf(n)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${Y_.join(", ")}`);try{return await Ae(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(r){if(xe(r))return{data:null,error:r};throw r}}async inviteUserByEmail(t,n={}){try{return await Ae(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:Zo})}catch(r){if(xe(r))return{data:{user:null},error:r};throw r}}async generateLink(t){try{const{options:n}=t,r=Bh(t,["options"]),a=Object.assign(Object.assign({},r),n);return"newEmail"in r&&(a.new_email=r==null?void 0:r.newEmail,delete a.newEmail),await Ae(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:a,headers:this.headers,xform:xse,redirectTo:n==null?void 0:n.redirectTo})}catch(n){if(xe(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(t){try{return await Ae(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:Zo})}catch(n){if(xe(n))return{data:{user:null},error:n};throw n}}async listUsers(t){var n,r,a,i,o,l,c;try{const u={nextPage:null,lastPage:0,total:0},h=await Ae(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=t==null?void 0:t.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(i=(a=t==null?void 0:t.perPage)===null||a===void 0?void 0:a.toString())!==null&&i!==void 0?i:""},xform:eR});if(h.error)throw h.error;const d=await h.json(),f=(o=h.headers.get("x-total-count"))!==null&&o!==void 0?o:0,p=(c=(l=h.headers.get("link"))===null||l===void 0?void 0:l.split(","))!==null&&c!==void 0?c:[];return p.length>
7250&&(p.forEach(y=>{const m=parseInt(y.split(";")[0].split("=")[1].substring(0,1)),v=JSON.parse(y.split(";")[1].split("=")[1]);u[`${v}Page`]=m}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},d),u),error:null}}catch(u){if(xe(u))return{data:{users:[]},error:u};throw u}}async getUserById(t){qi(t);try{return await Ae(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:Zo})}catch(n){if(xe(n))return{data:{user:null},error:n};throw n}}async updateUserById(t,n){qi(t);try{return await Ae(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:n,headers:this.headers,xform:Zo})}catch(r){if(xe(r))return{data:{user:null},error:r};throw r}}async deleteUser(t,n=!1){qi(t);try{return await Ae(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:n},xform:Zo})}catch(r){if(xe(r))return{data:{user:null},error:r};throw r}}async _listFactors(t){qi(t.userId);try{const{data:n,error:r}=await Ae(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:a=>({data:{factors:a},error:null})});return{data:n,error:r}}catch(n){if(xe(n))return{data:null,error:n};throw n}}async _deleteFactor(t){qi(t.userId),qi(t.id);try{return{data:await Ae(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(n){if(xe(n))return{data:null,error:n};throw n}}async _listOAuthClients(t){var n,r,a,i,o,l,c;try{const u={nextPage:null,lastPage:0,total:0},h=await Ae(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=t==null?void 0:t.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(i=(a=t==null?void 0:t.perPage)===null||a===void 0?void 0:a.toString())!==null&&i!==void 0?i:""},xform:eR});if(h.error)throw h.error;const d=await h.json(),f=(o=h.headers.get("x-total-count"))!==null&&o!==void 0?o:0,p=(c=(l=h.headers.get("link"))===null||l===void 0?void 0:l.split(","))!==null&&c!==void 0?c:[];return p.length>0&&(p.forEach(y=>{const m=parseInt(y.split(";")[0].split("=")[1].substring(0,1)),v=JSON.parse(y.split(";")[1].split("=")[1]);u[`${v}Page`]=m}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},d),u),error:null}}catch(u){if(xe(u))return{data:{clients:[]},error:u};throw u}}async _createOAuthClient(t){try{return await Ae(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(xe(n))return{data:null,error:n};throw n}}async _getOAuthClient(t){try{return await Ae(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(xe(n))return{data:null,error:n};throw n}}async _updateOAuthClient(t,n){try{return await Ae(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(xe(r))return{data:null,error:r};throw r}}async _deleteOAuthClient(t){try{return await Ae(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(xe(n))return{data:null,error:n};throw n}}async _regenerateOAuthClientSecret(t){try{return await Ae(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(xe(n))return{data:null,error:n};throw n}}async _listCustomProviders(t){try{const n={};return t!=null&&t.type&&(n.type=t.type),await Ae(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:n,xform:r=>{var a;return{data:{providers:(a=r==null?void 0:r.providers)!==null&&a!==void 0?a:[]},error:null}}})}catch(n){if(xe(n))return{data:{providers:[]},error:n};throw n}}async _createCustomProvider(t){try{return await Ae(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:t,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(xe(n))return{data:null,error:n};throw n}}async _getCustomProvider(t){try{return await Ae(this.fetch,"GET",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(xe(n))return{data:null,error:n};throw n}}async _updateCustomProvider(t,n){try{return await Ae(this.fetch,"PUT",`${this.url}/admin/custom-providers/${t}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(xe(r))return{data:null,error:r};throw r}}async _deleteCustomProvider(t){try{return await Ae(this.fetch,"DELET
725E",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(xe(n))return{data:null,error:n};throw n}}async _adminListPasskeys(t){xs(this.experimental),qi(t.userId);try{return await Ae(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/passkeys`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(xe(n))return{data:null,error:n};throw n}}async _adminDeletePasskey(t){xs(this.experimental),qi(t.userId),qi(t.passkeyId);try{return await Ae(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/passkeys/${t.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(xe(n))return{data:null,error:n};throw n}}}function tR(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}globalThis&&w8()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug");class kse extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}function jse(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function j8(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function Sse(e){return parseInt(e,16)}function Nse(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,r=>r.toString(16).padStart(2,"0")).join("")}function Cse(e){var t;const{chainId:n,domain:r,expirationTime:a,issuedAt:i=new Date,nonce:o,notBefore:l,requestId:c,resources:u,scheme:h,uri:d,version:f}=e;{if(!Number.isInteger(n))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${n}`);if(!r)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(o&&o.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${o}`);if(!d)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(f!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${f}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(`
726`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const p=j8(e.address),y=h?`${h}://${r}`:r,m=e.statement?`${e.statement}
727`:"",v=`${y} wants you to sign in with your Ethereum account:
728${p}
729
730${m}`;let b=`URI: ${d}
731Version: ${f}
732Chain ID: ${n}${o?`
733Nonce: ${o}`:""}
734Issued At: ${i.toISOString()}`;if(a&&(b+=`
735Expiration Time: ${a.toISOString()}`),l&&(b+=`
736Not Before: ${l.toISOString()}`),c&&(b+=`
737Request ID: ${c}`),u){let x=`
738Resources:`;for(const w of u){if(!w||typeof w!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${w}`);x+=`
739- ${w}`}b+=x}return`${v}
740${b}`}
740class Ln extends Error{constructor({message:t,code:n,cause:r,name:a}){var i;super(t,{cause:r}),this.__isWebAuthnError=!0,this.name=(i=a??(r instanceof Error?r.name:void 0))!==null&&i!==void 0?i:"Unknown Error",this.code=n}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class jb extends Ln{constructor(t,n){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:n,message:t}),this.name="WebAuthnUnknownError",this.originalError=n}}function Pse({error:e,options:t}){var n,r,a;const{publicKey:i}=t;if(!i)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Ln({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((n=i.authenticatorSelection)===null||n===void 0?void 0:n.requireResidentKey)===!0)return new Ln({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((r=i.authenticatorSelection)===null||r===void 0?void 0:r.userVerification)==="required")return new Ln({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((a=i.authenticatorSelection)===null||a===void 0?void 0:a.userVerification)==="required")return new Ln({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new Ln({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new Ln({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return i.pubKeyCredParams.filter(l=>l.type==="public-key").length===0?new Ln({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new Ln({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const o=window.location.hostname;if(S8(o)){if(i.rp.id!==o)return new Ln({message:`The RP ID "${i.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Ln({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(i.user.id.byteLength<1||i.user.id.byteLength>64)return new Ln({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new Ln({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new Ln({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function Tse({error:e,options:t}){const{publicKey:n}=t;if(!n)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Ln({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new Ln({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const r=window.location.hostname;if(S8(r)){if(n.rpId!==r)return new Ln({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Ln({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new Ln({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new Ln({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class Ase{createNewAbortSignal(){if(this.controller){const n=new Error("Cancelling existing WebAuthn API call for new one");n.name="AbortError",this.controller.abort(n)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const Xj=new Ase;function nR(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:n,excludeCredentials:r}=e,a=Bh(e,["challenge","user","excludeCredentials"]),i=_d(t).buffer,o=Object.assign(Object.assign({},n),{id:_d(n.id).buffer}),l=Object.assign(Object.assign({},a),{challenge:i,user:o});if(r&&r.length>0){l.excludeCredentials=new Array(r.length);for(let c=0;c<r.length;c++){const u=r[c];l.excludeCredentials[c]=Object.assign(Object.assign({},u),{id:_d(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return l}function rR(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:n}=e,r=Bh(e,["challenge","allowCredentials"]),a=_d(t).buffer,i=Object.assign(Object.assign({},r),{challenge:a});if(n&&n.length>0){i.allowCredentials=new Array(n.length);for(let o=0;o<n.length;o++){const l=n[o];i.allowCredentials[o]=Object.assign(Object.assign({},l),{id:_d(l.id).buffer,type:l.type||"public-key",transports:l.transports})}}return i}function aR(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e;return{id:e.id,rawId:e.id,response:{attestationObject:bc(new Uint8Array(e.response.attestationObject)),clientDataJSON:bc(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function sR(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e,r=e.getClientExtensionResults(),a=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:bc(new Uint8Array(a.authenticatorData)),clientDataJSON:bc(new Uint8Array(a.clientDataJSON)),signature:b
740c(new Uint8Array(a.signature)),userHandle:a.userHandle?bc(new Uint8Array(a.userHandle)):void 0},type:"public-key",clientExtensionResults:r,authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function S8(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function Sb(){var e,t;return!!(yr()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.get)=="function")}async function N8(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new jb("Browser returned unexpected credential type",t)}:{data:null,error:new jb("Empty credential response",t)}}catch(t){return{data:null,error:Pse({error:t,options:e})}}}async function C8(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new jb("Browser returned unexpected credential type",t)}:{data:null,error:new jb("Empty credential response",t)}}catch(t){return{data:null,error:Tse({error:t,options:e})}}}const Ese={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},Ose={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function Nb(...e){const t=a=>a!==null&&typeof a=="object"&&!Array.isArray(a),n=a=>a instanceof ArrayBuffer||ArrayBuffer.isView(a),r={};for(const a of e)if(a)for(const i in a){const o=a[i];if(o!==void 0)if(Array.isArray(o))r[i]=o;else if(n(o))r[i]=o;else if(t(o)){const l=r[i];t(l)?r[i]=Nb(l,o):r[i]=Nb(o)}else r[i]=o}return r}function Rse(e,t){return Nb(Ese,e,t||{})}function Ise(e,t){return Nb(Ose,e,t||{})}class Mse{constructor(t){this.client=t,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:n,friendlyName:r,signal:a},i){var o;try{const{data:l,error:c}=await this.client.mfa.challenge({factorId:t,webauthn:n});if(!l)return{data:null,error:c};const u=a??Xj.createNewAbortSignal();if(l.webauthn.type==="create"){const{user:h}=l.webauthn.credential_options.publicKey;if(!h.name){const d=r;if(d)h.name=`${h.id}:${d}`;else{const p=(await this.client.getUser()).data.user,y=((o=p==null?void 0:p.user_metadata)===null||o===void 0?void 0:o.name)||(p==null?void 0:p.email)||(p==null?void 0:p.id)||"User";h.name=`${h.id}:${y}`}}h.displayName||(h.displayName=h.name)}switch(l.webauthn.type){case"create":{const h=Rse(l.webauthn.credential_options.publicKey,i==null?void 0:i.create),{data:d,error:f}=await N8({publicKey:h,signal:u});return d?{data:{factorId:t,challengeId:l.id,webauthn:{type:l.webauthn.type,credential_response:d}},error:null}:{data:null,error:f}}case"request":{const h=Ise(l.webauthn.credential_options.publicKey,i==null?void 0:i.request),{data:d,error:f}=await C8(Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:h,signal:u}));return d?{data:{factorId:t,challengeId:l.id,webauthn:{type:l.webauthn.type,credential_response:d}},error:null}:{data:null,error:f}}}}catch(l){return xe(l)?{data:null,error:l}:{data:null,error:new As("Unexpected error in challenge",l)}}}async _verify({challengeId:t,factorId:n,webauthn:r}){return this.client.mfa.verify({factorId:n,challengeId:t,webauthn:r})}async _authenticate({factorId:t,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:a}={}},i){if(!n)return{data:null,error:new tm("rpId is required for WebAuthn authentication")};try{if(!Sb())return{data:null,error:new As("Browser does not support WebAuthn",null)};const{data:o,error:l}=await this.challenge({factorId:t,webauthn:{rpId:n,rpOrigins:r},signal:a},{request:i});if(!o)return{data:null,error:l};const{webauthn:c}=o;return this._verify({factorId:t,challengeId:o.challengeId,webauthn:{type:c.type,rpId:n,rpOrigins:r,credential_response:c.credential_response}})}catch(o){return xe(o)?{data:null,error:o}:{data:null,error:new As("Unexpected error in authenticate",o)}}}async _register({friendlyName:t,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:a}={}},i){if(!n)return{data:null,error:new tm("rpId is required for WebAuthn registration")};try{if(!Sb())return{data:null,error:new As("Browser does not support WebAuthn",null)};const{data:o,error:l}=await this._enroll({friendlyName:t});if(!o)return await this.client.mfa.listFactors().then(h=>{var d;return(d=h.data)===null||d===void 0?void 0:d.all.find(f=>f.factor_type==="webauthn"&&f.friendly_name===t&&f.status!=="unverified")}).then(h=>h?this.client.mfa.unenroll({factorId:h==null?void 0:h.id}):void 0),{data:null,error:l};const{data:c,error:u}=await this._challenge({factorId:o.id,friendlyName:o.friendly_name,webauthn:{rpId:n,rpOrigins:r},signal:a},{create:i});return c?this._verify({factorId:o.id,challengeId:c.challengeId,webauthn:{rpId:n,rpOrigins:r,type:c.webauthn.type,credential_response:c.webauthn.credential_response}}):{data:null,error:u}}catch(o){return xe(o)?{data:null,error:o}:{data:null,error:new As("Unexpected error in register",o)}}}}jse();const Dse={url:Iae,storageKey:Mae,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:Dae,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}},Tu={};class rm{get jwks(){var t,n;return(n=(t=Tu[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&n!==void 0?n:{keys:[]}}set jwks(t){Tu[this.storageKey]=Object.assign(Object.assign({},Tu[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,n;return(n=(t=Tu[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&n!==void 0?n:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){Tu[this.storageKey]=Object.assign(Object.assign({},Tu[this.storageKey]),{cachedAt:t})}constructor(t){var n,r,a;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.lastRefreshFailure=null,this._sessionRemovalEpoch=0,this.initializePromise=null,this._pendingInitNotifications=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lock=null,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const i=Object.assign(Object.assign({},Dse),t);if(this.storageKey=i.storageKey,this.instanceID=(n=rm.nextInstanceID[this.storageKey])!==null&&n!==void 0?n:0,rm.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!i.debug,typeof i.debug=="function"&&(this.logger=i.debug),this.instanceID>0&&yr()){const o=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(o),this.logDebugMessages&&console.trace(o)}if(this.persistSession=i.persistSession,this.autoRefreshToken=i.autoRefreshToken,this.experimental=(r=i.experimental)!==null&&r!==void 0?r:{},this.admin=new _se({url:i.url,headers:i.headers,fetch:i.fetch,experimental:this.experimental}),this.url=i.url,this.headers=i.headers,this.fetch=_8(i.fetch),this.detectSessionInUrl=i.detectSessionInUrl,this.flowType=i.flowType,this.hasCustomAuthorizationHeader=i.hasCustomAuthorizationHeader,this.throwOnError=i.throwOnError,this.lockAcquireTimeout=i.lockAcquireTimeout,i.lock!=null&&(this.lock=i.lock),this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new Mse(this)}
740,this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.passkey={startRegistration:this._startPasskeyRegistration.bind(this),verifyRegistration:this._verifyPasskeyRegistration.bind(this),startAuthentication:this._startPasskeyAuthentication.bind(this),verifyAuthentication:this._verifyPasskeyAuthentication.bind(this),list:this._listPasskeys.bind(this),update:this._updatePasskey.bind(this),delete:this._deletePasskey.bind(this)},this.persistSession?(i.storage?this.storage=i.storage:w8()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=tR(this.memoryStorage)),i.userStorage&&(this.userStorage=i.userStorage)):(this.memoryStorage={},this.storage=tR(this.memoryStorage)),yr()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(o){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",o)}(a=this.broadcastChannel)===null||a===void 0||a.addEventListener("message",async o=>{this._debug("received broadcast notification from other tab or client",o),(o.data.event==="TOKEN_REFRESHED"||o.data.event==="SIGNED_IN")&&(this.lastRefreshFailure=null);try{await this._notifyAllSubscribers(o.data.event,o.data.session,!1)}catch(l){this._debug("#broadcastChannel","error",l)}})}i.skipAutoInitialize||this.initialize().catch(o=>{this._debug("#initialize()","error",o)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${v8}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){var t;if(this.initializePromise)return await this.initializePromise;this._pendingInitNotifications=[],this.initializePromise=(async()=>this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()):await this._initialize())();const n=await this.initializePromise,r=(t=this._pendingInitNotifications)!==null&&t!==void 0?t:[];this._pendingInitNotifications=null;for(const a of r)await this._notifyAllSubscribers(a.event,a.session,a.broadcast);return n}async _initialize(){var t;try{let n={},r="none";if(yr()&&(n=XO(window.location.href),this._isImplicitGrantCallback(n)?r="implicit":await this._isPKCECallback(n)&&(r="pkce")),yr()&&this.detectSessionInUrl&&r!=="none"){const{data:a,error:i}=await this._getSessionFromURL(n,r);if(i){if(this._debug("#_initialize()","error detecting session from URL",i),Wae(i)){const c=(t=i.details)===null||t===void 0?void 0:t.code;if(c==="identity_already_exists"||c==="identity_not_found"||c==="single_identity_not_deletable")return{error:i}}return{error:i}}const{session:o,redirectType:l}=a;return this._debug("#_initialize()","detected session in URL",o,"redirect type",l),await this._saveSession(o),setTimeout(async()=>{l==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",o):await this._notifyAllSubscribers("SIGNED_IN",o)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(n){return xe(n)?this._returnResult({error:n}):this._returnResult({error:new As("Unexpected error during initialization",n)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var n,r,a;try{const i=await Ae(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(r=(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:(a=t==null?void 0:t.options)===null||a===void 0?void 0:a.captchaToken}},xform:Ua}),{data:o,error:l}=i;if(l||!o)return this._returnResult({data:{user:null,session:null},error:l});const c=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",c)),this._returnResult({data:{user:u,session:c},error:null})}catch(i){if(xe(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signUp(t){var n,r,a;let i=null;try{let o;if("email"in t){const{email:d,password:f,options:p}=t;let y=null,m=null;this.flowType==="pkce"&&([y,m,i]=await this._getCodeChallengeAndMethod()),o=await Ae(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:this._maybeAppendFlowIdToRedirect(p==null?void 0:p.emailRedirectTo,i),body:{email:d,password:f,data:(n=p==null?void 0:p.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:p==null?void 0:p.captchaToken},code_challenge:y,code_challenge_method:m},xform:Ua})}else if("phone"in t){const{phone:d,password:f,options:p}=t;o=await Ae(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:d,password:f,data:(r=p==null?void 0:p.data)!==null&&r!==void 0?r:{},channel:(a=p==null?void 0:p.channel)!==null&&a!==void 0?a:"sms",gotrue_meta_security:{captcha_token:p==null?void 0:p.captchaToken}},xform:Ua})}else throw new Py("You must provide either an email or phone number and a password");const{data:l,error:c}=o;if(c||!l)return await gs(this.storage,this.storageKey,i),this._returnResult({data:{user:null,session:null},error:c});const u=l.session,h=l.user;return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",u)),this._returnResult({data:{user:h,session:u},error:null})}catch(o){if(await gs(this.storage,this.storageKey,i),xe(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signInWithPassword(t){try{let n;if("email"in t){const{email:i,password:o,options:l}=t;n=await Ae(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:i,password:o,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken}},xform:ZO})}else if("phone"in t){const{phone:i,password:o,options:l}=t;n=await Ae(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:i,password:o,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken}},xform:ZO})}else throw new Py("You must provide either an email or phone number and a password");const{data:r,error:a}=n;
740if(a)return this._returnResult({data:{user:null,session:null},error:a});if(!r||!r.session||!r.user){const i=new Pu;return this._returnResult({data:{user:null,session:null},error:i})}return r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),this._returnResult({data:Object.assign({user:r.user,session:r.session},r.weak_password?{weakPassword:r.weak_password}:null),error:a})}catch(n){if(xe(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOAuth(t){var n,r,a,i;return await this._handleProviderSignIn(t.provider,{redirectTo:(n=t.options)===null||n===void 0?void 0:n.redirectTo,scopes:(r=t.options)===null||r===void 0?void 0:r.scopes,queryParams:(a=t.options)===null||a===void 0?void 0:a.queryParams,skipBrowserRedirect:(i=t.options)===null||i===void 0?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(t,n){return await this.initializePromise,this.lock!=null?this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t,n)):this._exchangeCodeForSession(t,n)}async signInWithWeb3(t){const{chain:n}=t;switch(n){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${n}"`)}}async signInWithEthereum(t){var n,r,a,i,o,l,c,u,h,d,f;let p,y;if("message"in t)p=t.message,y=t.signature;else{const{chain:m,wallet:v,statement:b,options:x}=t;let w;if(yr())if(typeof v=="object")w=v;else{const C=window;if("ethereum"in C&&typeof C.ethereum=="object"&&"request"in C.ethereum&&typeof C.ethereum.request=="function")w=C.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof v!="object"||!(x!=null&&x.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");w=v}const _=new URL((n=x==null?void 0:x.url)!==null&&n!==void 0?n:window.location.href),k=await w.request({method:"eth_requestAccounts"}).then(C=>C).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!k||k.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const j=j8(k[0]);let S=(r=x==null?void 0:x.signInWithEthereum)===null||r===void 0?void 0:r.chainId;if(!S){const C=await w.request({method:"eth_chainId"});S=Sse(C)}const N={domain:_.host,address:j,statement:b,uri:_.href,version:"1",chainId:S,nonce:(a=x==null?void 0:x.signInWithEthereum)===null||a===void 0?void 0:a.nonce,issuedAt:(o=(i=x==null?void 0:x.signInWithEthereum)===null||i===void 0?void 0:i.issuedAt)!==null&&o!==void 0?o:new Date,expirationTime:(l=x==null?void 0:x.signInWithEthereum)===null||l===void 0?void 0:l.expirationTime,notBefore:(c=x==null?void 0:x.signInWithEthereum)===null||c===void 0?void 0:c.notBefore,requestId:(u=x==null?void 0:x.signInWithEthereum)===null||u===void 0?void 0:u.requestId,resources:(h=x==null?void 0:x.signInWithEthereum)===null||h===void 0?void 0:h.resources};p=Cse(N),y=await w.request({method:"personal_sign",params:[Nse(p),j]})}try{const{data:m,error:v}=await Ae(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:p,signature:y},!((d=t.options)===null||d===void 0)&&d.captchaToken?{gotrue_meta_security:{captcha_token:(f=t.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:Ua});if(v)throw v;if(!m||!m.session||!m.user){const b=new Pu;return this._returnResult({data:{user:null,session:null},error:b})}return m.session&&(await this._saveSession(m.session),await this._notifyAllSubscribers("SIGNED_IN",m.session)),this._returnResult({data:Object.assign({},m),error:v})}catch(m){if(xe(m))return this._returnResult({data:{user:null,session:null},error:m});throw m}}async signInWithSolana(t){var n,r,a,i,o,l,c,u,h,d,f,p;let y,m;if("message"in t)y=t.message,m=t.signature;else{const{chain:v,wallet:b,statement:x,options:w}=t;let _;if(yr())if(typeof b=="object")_=b;else{const j=window;if("solana"in j&&typeof j.solana=="object"&&("signIn"in j.solana&&typeof j.solana.signIn=="function"||"signMessage"in j.solana&&typeof j.solana.signMessage=="function"))_=j.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof b!="object"||!(w!=null&&w.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");_=b}const k=new URL((n=w==null?void 0:w.url)!==null&&n!==void 0?n:window.location.href);if("signIn"in _&&_.signIn){const j=await _.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},w==null?void 0:w.signInWithSolana),{version:"1",domain:k.host,uri:k.href}),x?{statement:x}:null));let S;if(Array.isArray(j)&&j[0]&&typeof j[0]=="object")S=j[0];else if(j&&typeof j=="object"&&"signedMessage"in j&&"signature"in j)S=j;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in S&&"signature"in S&&(typeof S.signedMessage=="string"||S.signedMessage instanceof Uint8Array)&&S.signature instanceof Uint8Array)y=typeof S.signedMessage=="string"?S.signedMessage:new TextDecoder().decode(S.signedMessage),m=S.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in _)||typeof _.signMessage!="function"||!("publicKey"in _)||typeof _!="object"||!_.publicKey||!("toBase58"in _.publicKey)||typeof _.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");y=[`${k.host} wants you to sign in with your Solana account:`,_.publicKey.toBase58(),...x?["",x,""]:[""],"Version: 1",`URI: ${k.href}`,`Issued At: ${(a=(r=w==null?void 0:w.signInWithSolana)===null||r===void 0?void 0:r.issuedAt)!==null&&a!==void 0?a:new Date().toISOString()}`,...!((i=w==null?void 0:w.signInWithSolana)===null||i===void 0)&&i.notBefore?[`Not Before: ${w.signInWithSolana.notBefore}`]:[],...!((o=w==null?void 0:w.signInWithSolana)===null||o===void 0)&&o.expirationTime?[`Expiration Time: ${w.signInWithSolana.expirationTime}`]:[],...!((l=w==null?void 0:w.signInWithSolana)===null||l===void 0)&&l.chainId?[`Chain ID: ${w.signInWithSolana.chainId}`]:[],...!((c=w==null?void 0:w.signInWithSolana)===null||c===void 0)&&c.nonce?[`Nonce: ${w.signInWithSolana.nonce}`]:[],...!((u=w==null?void 0:w.signInWithSolana)===null||u===void 0)&&u.requestId?[`Request ID: ${w.signInWithSolana.requestId}`]:[],...!((d=(h=w==null?void 0:w.signInWithSolana)===null||h===void 0?void 0:h.resources)===null||d===void 0)&&d.length?["Resources",...w.sign
740InWithSolana.resources.map(S=>`- ${S}`)]:[]].join(`
741`);const j=await _.signMessage(new TextEncoder().encode(y),"utf8");if(!j||!(j instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");m=j}}try{const{data:v,error:b}=await Ae(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:y,signature:bc(m)},!((f=t.options)===null||f===void 0)&&f.captchaToken?{gotrue_meta_security:{captcha_token:(p=t.options)===null||p===void 0?void 0:p.captchaToken}}:null),xform:Ua});if(b)throw b;if(!v||!v.session||!v.user){const x=new Pu;return this._returnResult({data:{user:null,session:null},error:x})}return v.session&&(await this._saveSession(v.session),await this._notifyAllSubscribers("SIGNED_IN",v.session)),this._returnResult({data:Object.assign({},v),error:b})}catch(v){if(xe(v))return this._returnResult({data:{user:null,session:null},error:v});throw v}}async _exchangeCodeForSession(t,n){const r=(n==null?void 0:n.flowId)!=null,a=r?Av(n==null?void 0:n.flowId):yr()?Av(XO(window.location.href)[vc]):null;r&&!a&&this._debug("#_exchangeCodeForSession()","provided flowId is not a valid flow id",n==null?void 0:n.flowId);const{verifier:i,flowId:o}=r&&!a?{verifier:null,flowId:null}:await ise(this.storage,this.storageKey,a),[l,c]=(i??"").split("/");try{if(!l&&this.flowType==="pkce")throw new qae;const{data:u,error:h}=await Ae(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:l},xform:Ua});if(await gs(this.storage,this.storageKey,o),h)throw h;if(!u||!u.session||!u.user){const d=new Pu;return this._returnResult({data:{user:null,session:null,redirectType:null},error:d})}return u.session&&(await this._saveSession(u.session),await this._notifyAllSubscribers(c==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",u.session)),this._returnResult({data:Object.assign(Object.assign({},u),{redirectType:c??null}),error:h})}catch(u){if(await gs(this.storage,this.storageKey,o),xe(u))return this._returnResult({data:{user:null,session:null,redirectType:null},error:u});throw u}}async signInWithIdToken(t){try{const{options:n,provider:r,token:a,access_token:i,nonce:o}=t,l=await Ae(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:a,access_token:i,nonce:o,gotrue_meta_security:{captcha_token:n==null?void 0:n.captchaToken}},xform:Ua}),{data:c,error:u}=l;if(u)return this._returnResult({data:{user:null,session:null},error:u});if(!c||!c.session||!c.user){const h=new Pu;return this._returnResult({data:{user:null,session:null},error:h})}return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",c.session)),this._returnResult({data:c,error:u})}catch(n){if(xe(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOtp(t){var n,r,a,i,o;let l=null;try{if("email"in t){const{email:c,options:u}=t;let h=null,d=null;this.flowType==="pkce"&&([h,d,l]=await this._getCodeChallengeAndMethod());const{error:f}=await Ae(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:c,data:(n=u==null?void 0:u.data)!==null&&n!==void 0?n:{},create_user:(r=u==null?void 0:u.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:u==null?void 0:u.captchaToken},code_challenge:h,code_challenge_method:d},redirectTo:this._maybeAppendFlowIdToRedirect(u==null?void 0:u.emailRedirectTo,l)});return this._returnResult({data:{user:null,session:null},error:f})}if("phone"in t){const{phone:c,options:u}=t,{data:h,error:d}=await Ae(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:c,data:(a=u==null?void 0:u.data)!==null&&a!==void 0?a:{},create_user:(i=u==null?void 0:u.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:u==null?void 0:u.captchaToken},channel:(o=u==null?void 0:u.channel)!==null&&o!==void 0?o:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:h==null?void 0:h.message_id},error:d})}throw new Py("You must provide either an email or phone number.")}catch(c){if(await gs(this.storage,this.storageKey,l),xe(c))return this._returnResult({data:{user:null,session:null},error:c});throw c}}async verifyOtp(t){var n,r;try{let a,i;"options"in t&&(a=(n=t.options)===null||n===void 0?void 0:n.redirectTo,i=(r=t.options)===null||r===void 0?void 0:r.captchaToken);const{data:o,error:l}=await Ae(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:i}}),redirectTo:a,xform:Ua});if(l)throw l;if(!o)throw new Error("An error occurred on token verification.");const c=o.session,u=o.user;return c!=null&&c.access_token&&(await this._saveSession(c),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",c)),this._returnResult({data:{user:u,session:c},error:null})}catch(a){if(xe(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async signInWithSSO(t){var n,r,a,i;let o=null;try{let l=null,c=null;this.flowType==="pkce"&&([l,c,o]=await this._getCodeChallengeAndMethod());const u=await Ae(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:this._maybeAppendFlowIdToRedirect((n=t.options)===null||n===void 0?void 0:n.redirectTo,o)}),!((r=t==null?void 0:t.options)===null||r===void 0)&&r.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:l,code_challenge_method:c}),headers:this.headers,xform:bse});return!((a=u.data)===null||a===void 0)&&a.url&&yr()&&!(!((i=t.options)===null||i===void 0)&&i.skipBrowserRedirect)&&window.location.assign(u.data.url),this._returnResult(u)}catch(l){if(await gs(this.storage,this.storageKey,o),xe(l))return this._returnResult({data:null,error:l});throw l}}async reauthenticate(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate()):await this._reauthenticate()}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;if(r)throw r;if(!n)throw new or;const{error:a}=await Ae(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return this._returnResult({data:{user:null,session:null},error:a})})}catch(t){if(xe(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){let n=null;try{const r=`${this.url}/resend`;if("email"in t){const{email:a,type:i,options:o}=t;let l=null,c=null;this.flowType==="pkce"&&([l,c,n]=await this._getCodeChallengeAndMethod());const{error:u}=await Ae(this.fetch,"POST",r,{headers:this.headers,body:{email:a,type:i,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken},code_challenge:l,code_challenge_method:c},redirectTo:this._maybeAppendFlowIdToRedirect(o==null?void 0:o.emailRedirectTo,n)});return u&&await gs(this.storage,this.storageKey,n),this._returnResult({data:{user:null,session:null},error:u})}else if("phone"in t){const{phone:a,type:i,options:o}=t,{data:l,error:c}=await Ae(this.fetch,"POST",r,{headers:this.headers,body:{phone:a,type:i,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:l==null?void 0:l.message_id},error:c})}throw new Py("You must provide either an email or phone number and a type")}catch(r){if(await gs(this.storage,this.storageKey,n),xe(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async getSession(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async t=>t)):await this._useSession(async t=>t)}async _acquireLock(t,n){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const r=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),a=(async()=>(await r,await n()))();return this.pendingInLock.push((async()=>{try{await a}catch{}})()),a}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const r=n();for(this.pendingInLock.push((async()=>{try{await r}catch{}})()),await r;this.pendingInLock.length;){const a=[...this.pendingInLock];await Promise.all(a),this.pendingInLock.splice(0,a.length)}return await r}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const n=await this.__loadSession();return await t(n)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lock!=null&&!this.lockAcquired&&this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const n=await Rr(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",n),n!==null&&(this._isValidSession(n)?t=n:(this._debug("#getSession()","session from storage is not val
741id"),await this._removeSession())),!t)return{data:{session:null},error:null};const r=t.expires_at?t.expires_at*1e3-Date.now()<V_:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",t.expires_at),!r){if(this.userStorage){const o=await Rr(this.userStorage,this.storageKey+"-user");o!=null&&o.user?t.user=o.user:t.user=G_()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const o={value:this.suppressGetSessionWarning};t.user=mse(t.user,o),o.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:a,error:i}=await this._callRefreshToken(t.refresh_token);if(i){if(!!(t.expires_at&&t.expires_at*1e3>Date.now())){const l=await Rr(this.storage,this.storageKey);if(l&&l.refresh_token===t.refresh_token)return this._returnResult({data:{session:t},error:null})}return this._returnResult({data:{session:null},error:i})}return this._returnResult({data:{session:a},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){if(t)return await this._getUser(t);await this.initializePromise;let n;return this.lock!=null?n=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser()):n=await this._getUser(),n.data.user&&(this.suppressGetSessionWarning=!0),n}async _getUser(t){try{return t?await Ae(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:Zo}):await this._useSession(async n=>{var r,a,i;const{data:o,error:l}=n;if(l)throw l;return!(!((r=o.session)===null||r===void 0)&&r.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new or}:await Ae(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(i=(a=o.session)===null||a===void 0?void 0:a.access_token)!==null&&i!==void 0?i:void 0,xform:Zo})})}catch(n){if(xe(n))return Cy(n)&&await this._removeSession(),this._returnResult({data:{user:null},error:n});throw n}}async updateUser(t,n={}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,n)):await this._updateUser(t,n)}async _updateUser(t,n={}){let r=null;try{return await this._useSession(async a=>{const{data:i,error:o}=a;if(o)throw o;if(!i.session)throw new or;const l=i.session;let c=null,u=null;this.flowType==="pkce"&&t.email!=null&&([c,u,r]=await this._getCodeChallengeAndMethod());const{data:h,error:d}=await Ae(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:this._maybeAppendFlowIdToRedirect(n==null?void 0:n.emailRedirectTo,r),body:Object.assign(Object.assign({},t),{code_challenge:c,code_challenge_method:u}),jwt:l.access_token,xform:Zo});if(d)throw d;return l.user=h.user,await this._saveSession(l),await this._notifyAllSubscribers("USER_UPDATED",l),this._returnResult({data:{user:l.user},error:null})})}catch(a){if(await gs(this.storage,this.storageKey,r),xe(a))return this._returnResult({data:{user:null},error:a});throw a}}async setSession(t){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(t)):await this._setSession(t)}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new or;const n=Date.now()/1e3;let r=n,a=!0,i=null;const{payload:o}=Ey(t.access_token);if(o.exp&&(r=o.exp,a=r<=n),a){const{data:l,error:c}=await this._callRefreshToken(t.refresh_token);if(c)return this._returnResult({data:{user:null,session:null},error:c});if(!l)return{data:{user:null,session:null},error:null};i=l}else{const{data:l,error:c}=await this._getUser(t.access_token);if(c)return this._returnResult({data:{user:null,session:null},error:c});i={access_token:t.access_token,refresh_token:t.refresh_token,user:l.user,token_type:"bearer",expires_in:r-n,expires_at:r},await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)}return this._returnResult({data:{user:i.user,session:i},error:null})}catch(n){if(xe(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}}async refreshSession(t){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(t)):await this._refreshSession(t)}async _refreshSession(t){try{return await this._useSession(async n=>{var r;if(!t){const{data:o,error:l}=n;if(l)throw l;t=(r=o.session)!==null&&r!==void 0?r:void 0}if(!(t!=null&&t.refresh_token))throw new or;const{data:a,error:i}=await this._callRefreshToken(t.refresh_token);return i?this._returnResult({data:{user:null,session:null},error:i}):a?this._returnResult({data:{user:a.user,session:a},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(n){if(xe(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async _getSessionFromURL(t,n){var r;
741try{if(!yr())throw new Ty("No browser detected.");if(t.error||t.error_description||t.error_code)throw new Ty(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(n){case"implicit":if(this.flowType==="pkce")throw new zO("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Ty("Not a valid implicit grant flow url.");break;default:}if(n==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new zO("No code detected.");const{data:w,error:_}=await this._exchangeCodeForSession(t.code,{flowId:t[vc]});if(_)throw _;const k=new URL(window.location.href);return k.searchParams.delete("code"),k.searchParams.delete(vc),window.history.replaceState(window.history.state,"",k.toString()),{data:{session:w.session,redirectType:(r=w.redirectType)!==null&&r!==void 0?r:null},error:null}}const{provider_token:a,provider_refresh_token:i,access_token:o,refresh_token:l,expires_in:c,expires_at:u,token_type:h}=t;if(!o||!c||!l||!h)throw new Ty("No session defined in URL");const d=Math.round(Date.now()/1e3),f=parseInt(c);let p=d+f;u&&(p=parseInt(u));const y=p-d;y*1e3<=Xi&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${y}s, should have been closer to ${f}s`);const m=p-f;d-m>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",m,p,d):d-m<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",m,p,d);const{data:v,error:b}=await this._getUser(o);if(b)throw b;const x={provider_token:a,provider_refresh_token:i,access_token:o,expires_in:f,expires_at:p,refresh_token:l,token_type:h,user:v.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:x,redirectType:t.type},error:null})}catch(a){if(xe(a))return this._returnResult({data:{session:null,redirectType:null},error:a});throw a}}_isImplicitGrantCallback(t){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),t):!!(t.access_token||t.error||t.error_description||t.error_code)}async _isPKCECallback(t){if(!t.code)return!1;const n=Av(t[vc]);return n&&await Rr(this.storage,th(this.storageKey,n))?!0:!!await Rr(this.storage,`${this.storageKey}-code-verifier`)}async signOut(t={scope:"global"}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(t)):await this._signOut(t)}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async n=>{var r;const a=async()=>{await this._removeSession()},{data:i,error:o}=n;if(o&&!Cy(o))return this._returnResult({error:o});const l=(r=i.session)===null||r===void 0?void 0:r.access_token;if(l){const{error:c}=await this.admin.signOut(l,t);if(c&&!(UO(c)&&(c.status===404||c.status===401||c.status===403)||Cy(c)))return t!=="others"&&await a(),this._returnResult({error:c})}return t!=="others"&&await a(),this._returnResult({error:null})})}onAuthStateChange(t){const n=Xae(),r={id:n,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",n),this.stateChangeEmitters.delete(n)}};return this._debug("#onAuthStateChange()","registered callback with id",n),this.stateChangeEmitters.set(n,r),(async()=>(await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(n)}):await this._emitInitialSession(n)))(),{data:{subscription:r}}}async _emitInitialSession(t){return await this._useSession(async n=>{var r,a;try{const{data:{session:i},error:o}=n;if(o)throw o;await((r=this.stateChangeEmitters.get(t))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",i)),this._debug("INITIAL_SESSION","callback id",t,"session",i)}catch(i){await((a=this.stateChangeEmitters.get(t))===null||a===void 0?void 0:a.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",i),Cy(i)||Ay(i)||UO(i)&&(i.code==="refresh_token_not_found"||i.code==="refresh_token_already_used"||i.code==="session_expired")?console.warn(i):console.error(i)}})}async resetPasswordForEmail(t,n={}){let r=null,a=null,i=null;this.flowType==="pkce"&&([r,a,i]=await this._getCodeChallengeAndMethod(!0));try{return await Ae(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:r,code_challenge_method:a,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:this._maybeAppendFlowIdToRedirect(n.redirectTo,i)})}catch(o){if(await gs(this.storage,this.storageKey,i),xe(o))return this._returnResult({data:null,error:o});throw o}}async getUserIdentities(){var t;try{const{data:n,error:r}=await this.getUser();if(r)throw r;return this._returnResult({data:{identities:(t=n.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(n){if(xe(n))return this._returnResult({data:null,error:n});throw n}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var n;let r=null;try{const{data:a,error:i}=await this._useSession(async o=>{var l,c,u,h,d;const{data:f,error:p}=o;if(p)throw p;const{url:y,flowId:m}=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(l=t.options)===null||l===void 0?void 0:l.redirectTo,scopes:(c=t.options)===null||c===void 0?void 0:c.scopes,queryParams:(u=t.options)===null||u===void 0?void 0:u.queryParams,skipBrowserRedirect:!0});return r=m,await Ae(this.fetch,"GET",y,{headers:this.headers,jwt:(d=(h=f.session)===null||h===void 0?void 0:h.access_token)!==null&&d!==void 0?d:void 0})});if(i)throw i;return yr()&&!(!((n=t.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(a==null?void 0:a.url),this._returnResult({data:{provider:t.provider,url:a==null?void 0:a.url,flowId:r},error:null})}catch(a){if(xe(a))return this._returnResult({data:{provider:t.provider,url:null,flowId:r},error:a});throw a}}async linkIdentityIdToken(t){return await this._useSession(async n=>{var r;try{const{error:a,data:{session:i}}=n;
741if(a)throw a;const{options:o,provider:l,token:c,access_token:u,nonce:h}=t,d=await Ae(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(r=i==null?void 0:i.access_token)!==null&&r!==void 0?r:void 0,body:{provider:l,id_token:c,access_token:u,nonce:h,link_identity:!0,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:Ua}),{data:f,error:p}=d;return p?this._returnResult({data:{user:null,session:null},error:p}):!f||!f.session||!f.user?this._returnResult({data:{user:null,session:null},error:new Pu}):(f.session&&(await this._saveSession(f.session),await this._notifyAllSubscribers("USER_UPDATED",f.session)),this._returnResult({data:f,error:p}))}catch(a){if(await gs(this.storage,this.storageKey,null),xe(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}})}async unlinkIdentity(t){try{return await this._useSession(async n=>{var r,a;const{data:i,error:o}=n;if(o)throw o;return await Ae(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(a=(r=i.session)===null||r===void 0?void 0:r.access_token)!==null&&a!==void 0?a:void 0})})}catch(n){if(xe(n))return this._returnResult({data:null,error:n});throw n}}async _refreshAccessToken(t){const n="#_refreshAccessToken()";this._debug(n,"begin");try{const r=Date.now();return await Zae(async a=>(a>0&&await Jae(200*Math.pow(2,a-1)),this._debug(n,"refreshing attempt",a),await Ae(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:Ua})),(a,i)=>{const o=200*Math.pow(2,a);return i&&Ay(i)&&Date.now()+o-r<Xi})}catch(r){if(this._debug(n,"error",r),xe(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}finally{this._debug(n,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,n){const{url:r,flowId:a}=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:n.redirectTo,scopes:n.scopes,queryParams:n.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",n,"url",r),yr()&&!n.skipBrowserRedirect&&window.location.assign(r),{data:{provider:t,url:r,flowId:a},error:null}}async _recoverAndRefresh(){var t,n;const r="#_recoverAndRefresh()";this._debug(r,"begin");try{const a=await Rr(this.storage,this.storageKey);if(a&&this.userStorage){let o=await Rr(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:a.user},await no(this.userStorage,this.storageKey+"-user",o)),a.user=(t=o==null?void 0:o.user)!==null&&t!==void 0?t:G_()}else if(a&&!a.user&&!a.user){const o=await Rr(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(a.user=o.user,await ua(this.storage,this.storageKey+"-user"),await no(this.storage,this.storageKey,a)):a.user=G_()}if(this._debug(r,"session from storage",a),!this._isValidSession(a)){this._debug(r,"session is not valid"),a!==null&&await this._removeSession();return}const i=((n=a.expires_at)!==null&&n!==void 0?n:1/0)*1e3-Date.now()<V_;if(this._debug(r,`session has${i?"":" not"} expired with margin of ${V_}s`),i){if(this.autoRefreshToken&&a.refresh_token){const{error:o}=await this._callRefreshToken(a.refresh_token);o&&(Uae(o)?this._debug(r,"refresh discarded by commit guard",o):this._debug(r,"refresh failed",o))}}else if(a.user&&a.user.__isUserNotAvailableProxy===!0)try{const{data:o,error:l}=await this._getUser(a.access_token);!l&&(o!=null&&o.user)?(a.user=o.user,await this._saveSession(a),await this._notifyAllSubscribers("SIGNED_IN",a)):this._debug(r,"could not get user data, skipping SIGNED_IN notification")}catch(o){console.error("Error getting user data:",o),this._debug(r,"error getting user data, skipping SIGNED_IN notification",o)}else await this._notifyAllSubscribers("SIGNED_IN",a)}catch(a){this._debug(r,"error",a),Ay(a)?console.warn(a):console.error(a);return}finally{this._debug(r,"end")}}async _callRefreshToken(t){var n,r;if(!t)throw new or;if(this.refreshingDeferred)return this.refreshingDeferred.promise;if(this.lastRefreshFailure&&this.lastRefreshFailure.refreshToken===t&&Date.now()<this.lastRefreshFailure.expiresAt)return this._debug("#_callRefreshToken()","returning c
741ached failure (cooldown active)"),this.lastRefreshFailure.result;const a="#_callRefreshToken()";this._debug(a,"begin");try{this.refreshingDeferred=new Mw;const i=await Rr(this.storage,this.storageKey),{data:o,error:l}=await this._refreshAccessToken(t);if(l)throw l;if(!o.session)throw new or;const c=await Rr(this.storage,this.storageKey);if(i!==null&&(c===null||c.refresh_token!==i.refresh_token)){this._debug(a,"commit guard: storage changed since refresh started, discarding rotated tokens",{startedWith:"present",nowHolds:c?"replaced":"cleared"});const f={data:null,error:new HO};return this.refreshingDeferred.resolve(f),f}const h=this._sessionRemovalEpoch;if(await this._saveSession(o.session),this._sessionRemovalEpoch!==h){this._debug(a,"commit guard (post-save): _removeSession ran during _saveSession, undoing write"),await ua(this.storage,this.storageKey),this.userStorage&&await ua(this.userStorage,this.storageKey+"-user");const f={data:null,error:new HO};return this.refreshingDeferred.resolve(f),f}await this._notifyAllSubscribers("TOKEN_REFRESHED",o.session);const d={data:o.session,error:null};return this.lastRefreshFailure=null,this.refreshingDeferred.resolve(d),d}catch(i){if(this._debug(a,"error",i),xe(i)){const o={data:null,error:i};if(!Ay(i)){const l=await Rr(this.storage,this.storageKey);!!(l!=null&&l.expires_at&&l.expires_at*1e3>Date.now())?this._debug(a,"proactive refresh failed, access token still valid — preserving session"):await this._removeSession()}return this.lastRefreshFailure={refreshToken:t,result:o,expiresAt:Date.now()+Rae},(n=this.refreshingDeferred)===null||n===void 0||n.resolve(o),o}throw(r=this.refreshingDeferred)===null||r===void 0||r.reject(i),i}finally{this.refreshingDeferred=null,this._debug(a,"end")}}async _notifyAllSubscribers(t,n,r=!0){if(this._pendingInitNotifications!==null&&r){this._pendingInitNotifications.push({event:t,session:n,broadcast:r});return}const a=`#_notifyAllSubscribers(${t})`;this._debug(a,"begin",n,`broadcast = ${r}`);try{this.broadcastChannel&&r&&this.broadcastChannel.postMessage({event:t,session:n});const i=[],o=Array.from(this.stateChangeEmitters.values()).map(async l=>{try{await l.callback(t,n)}catch(c){i.push(c)}});if(await Promise.all(o),i.length>0){for(let l=0;l<i.length;l+=1)console.error(i[l]);throw i[0]}}finally{this._debug(a,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0;const n=Object.assign({},t),r=n.user&&n.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!r&&n.user&&await no(this.userStorage,this.storageKey+"-user",{user:n.user});const a=Object.assign({},n);delete a.user;const i=QO(a);await no(this.storage,this.storageKey,i)}else{const a=QO(n);await no(this.storage,this.storageKey,a)}}async _removeSession(){this._sessionRemovalEpoch+=1,this._debug("#_removeSession()"),this.lastRefreshFailure=null,this.suppressGetSessionWarning=!1,await ua(this.storage,this.storageKey),await ose(this.storage,this.storageKey),await ua(this.storage,this.storageKey+"-user"),this.userStorage&&await ua(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&yr()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),Xi);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);const n=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=n,n&&typeof n=="object"&&typeof n.unref=="function"?n.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(n)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);const n=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,n&&clearTimeout(n)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async dispose(){var t;this._removeVisibilityChangedCallback(),await this._stopAutoRefresh(),(t=this.broadcastChannel)===null||t===void 0||t.close(),this.broadcastChannel=null,this.stateChangeEmitters.clear()}async _autoRefreshTokenTick(){if(this._debug("#_autoRefreshTokenTick()","begin"),this.lock!=null){try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async n=>{const{data:{session:r}}=n;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const a=Math.floor((r.expires_at*1e3-t)/Xi);this._debug("#_autoRefreshTokenTick()",`access token expires in ${a} ticks, a tick lasts ${Xi}ms, refresh threshold is ${Kf} ticks`),a<=Kf&&await this._callRefreshToken(r.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t instanceof kse)this._debug("auto refresh token tick lock not available");else throw t}return}if(this.refreshingDeferred!==null){this._debug("#_autoRefreshTokenTick()","refresh already in flight, skipping");return}try{const t=Date.now();try{await this._useSession(async n=>{const{data:{session:r}}=n;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const a=Math.floor((r.expires_at*1e3-t)/Xi);this._debug("#_autoRefreshTokenTick()",`access token expires in ${a} ticks, a tick lasts ${Xi}ms, refresh threshold is ${Kf} ticks`),a<=Kf&&await this._callRefreshToken(r.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!yr()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(t){this._debug("#visibilityChangedCallback","error",t)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const n=`#_onVisibilityChanged(${t})`;if(this._debug(n,"visibilityState",document.visibilityState),document.visibilityState==="visible"){if(this.autoRefreshToken&&this._startAutoRefresh(),!t)if(await this.initializePromise,this.lock!=null)await this._acquireLock(this.lockAcquireTimeout,async()=>
741{if(document.visibilityState!=="visible"){this._debug(n,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()});else{if(document.visibilityState!=="visible"){this._debug(n,"visibilityState is no longer visible, skipping recovery");return}await this._recoverAndRefresh()}}else document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,n,r){let a=r==null?void 0:r.redirectTo,i=null,o=null,l=null;this.flowType==="pkce"&&([i,o,l]=await this._getCodeChallengeAndMethod(),a=this._maybeAppendFlowIdToRedirect(a,l));const c=[`provider=${encodeURIComponent(n)}`];if(a&&c.push(`redirect_to=${encodeURIComponent(a)}`),r!=null&&r.scopes&&c.push(`scopes=${encodeURIComponent(r.scopes)}`),i!=null&&o!=null){const u=new URLSearchParams({code_challenge:`${encodeURIComponent(i)}`,code_challenge_method:`${encodeURIComponent(o)}`});c.push(u.toString())}if(r!=null&&r.queryParams){const u=new URLSearchParams(r.queryParams);c.push(u.toString())}return r!=null&&r.skipBrowserRedirect&&c.push(`skip_http_redirect=${r.skipBrowserRedirect}`),{url:`${t}?${c.join("&")}`,flowId:l}}_maybeAppendFlowIdToRedirect(t,n){return!t||!n||!this.experimental.appendPkceFlowIdToRedirects?t??void 0:lse(t,n)}async _getCodeChallengeAndMethod(t=!1){return cse(this.storage,this.storageKey,t,n=>this._debug("#_getCodeChallengeAndMethod()","evicted oldest pending PKCE verifier slot",n))}async _unenroll(t){try{return await this._useSession(async n=>{var r;const{data:a,error:i}=n;return i?this._returnResult({data:null,error:i}):await Ae(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(r=a==null?void 0:a.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(xe(n))return this._returnResult({data:null,error:n});throw n}}async _enroll(t){try{return await this._useSession(async n=>{var r,a;const{data:i,error:o}=n;if(o)return this._returnResult({data:null,error:o});const l=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:c,error:u}=await Ae(this.fetch,"POST",`${this.url}/factors`,{body:l,headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token});return u?this._returnResult({data:null,error:u}):(t.factorType==="totp"&&c.type==="totp"&&(!((a=c==null?void 0:c.totp)===null||a===void 0)&&a.qr_code)&&(c.totp.qr_code=`data:image/svg+xml;utf-8,${c.totp.qr_code}`),this._returnResult({data:c,error:null}))})}catch(n){if(xe(n))return this._returnResult({data:null,error:n});throw n}}async _verify(t){const n=async()=>{try{return await this._useSession(async r=>{var a;const{data:i,error:o}=r;if(o)return this._returnResult({data:null,error:o});const l=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?aR(t.webauthn.credential_response):sR(t.webauthn.credential_response)})}:{code:t.code}),{data:c,error:u}=await Ae(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:l,headers:this.headers,jwt:(a=i==null?void 0:i.session)===null||a===void 0?void 0:a.access_token});return u?this._returnResult({data:null,error:u}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+c.expires_in},c)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",c),this._returnResult({data:c,error:u}))})}catch(r){if(xe(r))return this._returnResult({data:null,error:r});throw r}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,n):n()}async _challenge(t){const n=async()=>{try{return await this._useSession(async r=>{var a;const{data:i,error:o}=r;if(o)return this._returnResult({data:null,error:o});const l=await Ae(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(a=i==null?void 0:i.session)===null||a===void 0?void 0:a.access_token});if(l.error)return l;const{data:c}=l;if(c.type!=="webauthn")return{data:c,error:null};switch(c.webauthn.type){case"create":return{data:Object.assign(Object.assign({},c),{webauthn:Object.assign(Object.assign({},c.webauthn),{credential_options:Object.assign(Object.assign({},c.webauthn.credential_options),{publicKey:nR(c.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},c),{webauthn:Object.assign(Object.assign({},c.webauthn),{credential_options:Object.assign(Object.assign({},c.webauthn.credential_options),{publicKey:rR(c.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(r){if(xe(r))return this._returnResult({data:null,error:r});throw r}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,n):n()}async _challengeAndVerify(t){const{data:n,error:r}=await this._challenge({factorId:t.factorId});return r?this._returnResult({data:null,error:r}):await this._verify({factorId:t.factorId,challengeId:n.id,code:t.code})}async _listFactors(){var t;const{data:{user:n},error:r}=await this.getUser();if(r)return{data:null,error:r};const a={all:[],phone:[],totp:[],webauthn:[]};for(const i of(t=n==null?void 0:n.factors)!==null&&t!==void 0?t:[])a.all.push(i),i.status==="verified"&&a[i.factor_type].push(i);return{data:a,error:null}}async _getAuthenticatorAssuranceLevel(t){var n,r,a,i;if(t)try{const{payload:p}=Ey(t);let y=null;p.aal&&(y=p.aal);let m=y;const{data:{user:v},error:b}=await this.getUser(t);if(b)return this._returnResult({data:null,error:b});((r=(n=v==null?void 0:v.factors)===null||n===void 0?void 0:n.filter(_=>_.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(m="aal2");const w=p.amr||[];return{data:{currentLevel:y,nextLevel:m,currentAuthenticationMethods:w},error:null}}catch(p){if(xe(p))return this._returnResult({data:null,error:p});throw p}const{data:{session:o},error:l}
741=await this.getSession();if(l)return this._returnResult({data:null,error:l});if(!o)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:c}=Ey(o.access_token);let u=null;c.aal&&(u=c.aal);let h=u;((i=(a=o.user.factors)===null||a===void 0?void 0:a.filter(p=>p.status==="verified"))!==null&&i!==void 0?i:[]).length>0&&(h="aal2");const f=c.amr||[];return{data:{currentLevel:u,nextLevel:h,currentAuthenticationMethods:f},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async n=>{const{data:{session:r},error:a}=n;return a?this._returnResult({data:null,error:a}):r?await Ae(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:r.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new or})})}catch(n){if(xe(n))return this._returnResult({data:null,error:n});throw n}}async _approveAuthorization(t,n){try{return await this._useSession(async r=>{const{data:{session:a},error:i}=r;if(i)return this._returnResult({data:null,error:i});if(!a)return this._returnResult({data:null,error:new or});const o=await Ae(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:a.access_token,body:{action:"approve"},xform:l=>({data:l,error:null})});return o.data&&o.data.redirect_url&&yr()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(r){if(xe(r))return this._returnResult({data:null,error:r});throw r}}async _denyAuthorization(t,n){try{return await this._useSession(async r=>{const{data:{session:a},error:i}=r;if(i)return this._returnResult({data:null,error:i});if(!a)return this._returnResult({data:null,error:new or});const o=await Ae(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:a.access_token,body:{action:"deny"},xform:l=>({data:l,error:null})});return o.data&&o.data.redirect_url&&yr()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(r){if(xe(r))return this._returnResult({data:null,error:r});throw r}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;return r?this._returnResult({data:null,error:r}):n?await Ae(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,xform:a=>({data:a,error:null})}):this._returnResult({data:null,error:new or})})}catch(t){if(xe(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async n=>{const{data:{session:r},error:a}=n;return a?this._returnResult({data:null,error:a}):r?(await Ae(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new or})})}catch(n){if(xe(n))return this._returnResult({data:null,error:n});throw n}}async fetchJwk(t,n={keys:[]}){let r=n.keys.find(l=>l.kid===t);if(r)return r;const a=Date.now();if(r=this.jwks.keys.find(l=>l.kid===t),r&&this.jwks_cached_at+Fae>a)return r;const{data:i,error:o}=await Ae(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(o)throw o;return!i.keys||i.keys.length===0||(this.jwks=i,this.jwks_cached_at=a,r=i.keys.find(l=>l.kid===t),!r)?null:r}async getClaims(t,n={}){try{let r=t;if(!r){const{data:p,error:y}
741=await this.getSession();if(y||!p.session)return this._returnResult({data:null,error:y});r=p.session.access_token}const{header:a,payload:i,signature:o,raw:{header:l,payload:c}}=Ey(r);if(!(n!=null&&n.allowExpired))try{hse(i.exp)}catch(p){throw new _b(p instanceof Error?p.message:"JWT validation failed")}const u=!a.alg||a.alg.startsWith("HS")||!a.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(a.kid,n!=null&&n.keys?{keys:n.keys}:n==null?void 0:n.jwks);if(!u){const{error:p}=await this.getUser(r);if(p)throw p;return{data:{claims:i,header:a,signature:o},error:null}}const h=fse(a.alg),d=await crypto.subtle.importKey("jwk",u,h,!0,["verify"]);if(!await crypto.subtle.verify(h,d,o,Yae(`${l}.${c}`)))throw new _b("Invalid JWT signature");return{data:{claims:i,header:a,signature:o},error:null}}catch(r){if(xe(r))return this._returnResult({data:null,error:r});throw r}}async signInWithPasskey(t){var n,r,a;xs(this.experimental);try{if(!Sb())return this._returnResult({data:null,error:new As("Browser does not support WebAuthn",null)});const{data:i,error:o}=await this._startPasskeyAuthentication({options:{captchaToken:(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.captchaToken}});if(o||!i)return this._returnResult({data:null,error:o});const l=rR(i.options),c=(a=(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.signal)!==null&&a!==void 0?a:Xj.createNewAbortSignal(),{data:u,error:h}=await C8({publicKey:l,signal:c});if(h||!u)return this._returnResult({data:null,error:h??new As("WebAuthn ceremony failed",null)});const d=sR(u);return this._verifyPasskeyAuthentication({challengeId:i.challenge_id,credential:d})}catch(i){if(xe(i))return this._returnResult({data:null,error:i});throw i}}async registerPasskey(t){var n,r;xs(this.experimental);try{if(!Sb())return this._returnResult({data:null,error:new As("Browser does not support WebAuthn",null)});const{data:a,error:i}=await this._startPasskeyRegistration();if(i||!a)return this._returnResult({data:null,error:i});const o=nR(a.options),l=(r=(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.signal)!==null&&r!==void 0?r:Xj.createNewAbortSignal(),{data:c,error:u}=await N8({publicKey:o,signal:l});if(u||!c)return this._returnResult({data:null,error:u??new As("WebAuthn ceremony failed",null)});const h=aR(c);return this._verifyPasskeyRegistration({challengeId:a.challenge_id,credential:h})}catch(a){if(xe(a))return this._returnResult({data:null,error:a});throw a}}async _startPasskeyRegistration(){xs(this.experimental);try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;if(r)return this._returnResult({data:null,error:r});if(!n)return this._returnResult({data:null,error:new or});const{data:a,error:i}=await Ae(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:n.access_token,body:{}});return i?this._returnResult({data:null,error:i}):this._returnResult({data:a,error:null})})}catch(t){if(xe(t))return this._returnResult({data:null,error:t});throw t}}async _verifyPasskeyRegistration(t){xs(this.experimental);try{return await this._useSession(async n=>{const{data:{session:r},error:a}=n;if(a)return this._returnResult({data:null,error:a});if(!r)return this._returnResult({data:null,error:new or});const{data:i,error:o}=await Ae(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:r.access_token,body:{challenge_id:t.challengeId,credential:t.credential}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:i,error:null})})}catch(n){if(xe(n))return this._returnResult({data:null,error:n});throw n}}async _startPasskeyAuthentication(t){var n;xs(this.experimental);try{const{data:r,error:a}=await Ae(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.captchaToken}}});return a?this._returnResult({data:null,error:a}):this._returnResult({data:r,error:null})}catch(r){if(xe(r))return this._returnResult({data:null,error:r});throw r}}async _verifyPasskeyAuthentication(t){xs(this.experimental);try{const{data:n,error:r}=await Ae(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:t.challengeId,credential:t.credential},xform:Ua});return r?this._returnResult({data:null,error:r}):(n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),this._returnResult({data:n,error:null}))}catch(n){if(xe(n))return this._returnResult({data:null,error:n});throw n}}async _listPasskeys(){xs(this.experimental);try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;if(r)return this._returnResult({data:null,error:r});if(!n)return this._returnResult({data:null,error:new or});const{data:a,error:i}=await Ae(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:n.access_token,xform:o=>({data:o,error:null})});return i?this._returnResult({data:null,error:i}):this._returnResult({data:a,error:null})})}catch(t){if(xe(t))return this._returnResult({data:null,error:t});throw t}}async _updatePasskey(t){xs(this.experimental);try{return await this._useSession(async n=>{const{data:{session:r},error:a}=n;
741if(a)return this._returnResult({data:null,error:a});if(!r)return this._returnResult({data:null,error:new or});const{data:i,error:o}=await Ae(this.fetch,"PATCH",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:r.access_token,body:{friendly_name:t.friendlyName}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:i,error:null})})}catch(n){if(xe(n))return this._returnResult({data:null,error:n});throw n}}async _deletePasskey(t){xs(this.experimental);try{return await this._useSession(async n=>{const{data:{session:r},error:a}=n;if(a)return this._returnResult({data:null,error:a});if(!r)return this._returnResult({data:null,error:new or});const{error:i}=await Ae(this.fetch,"DELETE",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:r.access_token,noResolveJson:!0});return i?this._returnResult({data:null,error:i}):this._returnResult({data:null,error:null})})}catch(n){if(xe(n))return this._returnResult({data:null,error:n});throw n}}}rm.nextInstanceID={};const $se=rm,Lse="2.111.0";let Xf="",Cb;if(typeof Deno<"u"){var K_;Xf="deno",Cb=(K_=Deno.version)===null||K_===void 0?void 0:K_.deno}else if(typeof document<"u")Xf="web";else if(typeof navigator<"u"&&navigator.product==="ReactNative")Xf="react-native";else{var X_;Xf="node";const e=globalThis.process;Cb=e==null||(X_=e.version)===null||X_===void 0?void 0:X_.replace(/^v/,"")}const P8=[`runtime=${Xf}`];Cb&&P8.push(`runtime-version=${Cb}`);const Fse={"X-Client-Info":`supabase-js/${Lse}; ${P8.join("; ")}`},Bse={headers:Fse},Wse={schema:"public"},qse={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},Use={},zse={enabled:!1,respectSamplingDecision:!0};function Hse(e,t,n,r){function a(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function l(h){try{u(r.next(h))}catch(d){o(d)}}function c(h){try{u(r.throw(h))}catch(d){o(d)}}function u(h){h.done?i(h.value):a(h.value).then(l,c)}u((r=r.apply(e,[])).next())})}let Q_=null;const Vse="@opentelemetry/api";function Gse(){return Q_===null&&(Q_=import(Vse).catch(()=>null)),Q_}function Yse(){return Hse(this,void 0,void 0,function*(){try{const e=yield Gse();if(!e||!e.propagation||!e.context)return null;const t={};e.propagation.inject(e.context.active(),t);const n=t.traceparent;return n?{traceparent:n,tracestate:t.tracestate,baggage:t.baggage}:null}catch{return null}})}function Kse(e){if(!e||typeof e!="string")return null;const t=e.split("-");if(t.length!==4)return null;const[n,r,a,i]=t;if(n.length!==2||r.length!==32||a.length!==16||i.length!==2)return null;const o=/^[0-9a-f]+$/i;return!o.test(n)||!o.test(r)||!o.test(a)||!o.test(i)||r==="00000000000000000000000000000000"||a==="0000000000000000"?null:{version:n,traceId:r,parentId:a,traceFlags:i,isSampled:(parseInt(i,16)&1)===1}}function Xse(e,t){if(!e||!t||t.length===0)return!1;let n;if(e instanceof URL)n=e;else try{n=new URL(e)}catch{return!1}for(const r of t)try{if(typeof r=="string"){if(Qse(n.hostname,r))return!0}else if(r instanceof RegExp){if(r.test(n.hostname))return!0}else if(typeof r=="function"&&r(n))return!0}catch{continue}return!1}function Qse(e,t){if(t===e)return!0;if(t.startsWith("*.")){const n=t.slice(2);if(e.endsWith(n)&&(e===n||e.endsWith("."+n)))return!0}return!1}function Jse(e){const t=[];try{const n=new URL(e);t.push(n.hostname)}catch{}return t.push("*.supabase.co","*.supabase.in"),t.push("localhost","127.0.0.1","[::1]"),t}function am(e){"@babel/helpers - typeof";return am=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},am(e)}function Zse(e,t){if(am(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(am(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function eie(e){var t=Zse(e,"string");return am(t)=="symbol"?t:t+""}function tie(e,t,n){return(t=eie(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Nn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};
741t%2?iR(Object(n),!0).forEach(function(r){tie(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}const nie=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),rie=()=>Headers,T8=e=>e.startsWith("sb_publishable_")||e.startsWith("sb_secret_"),aie="sb_temp_",oR=new Set,sie=e=>{var t,n;if(!e.startsWith("sb_")||T8(e)||e.startsWith(aie))return;const r=(t=(n=e.match(/^sb_[a-zA-Z0-9]+_/))===null||n===void 0?void 0:n[0])!==null&&t!==void 0?t:"unknown";oR.has(r)||(oR.add(r),console.warn("@supabase/supabase-js: Unrecognized Supabase API key format. The client will proceed and send this key as-is; if you see authentication errors you may need to upgrade @supabase/supabase-js to a version that recognizes this key type."))},lR=(e,t,n,r,a,i)=>{const o=nie(r),l=rie(),c=(a==null?void 0:a.enabled)===!0,u=(a==null?void 0:a.respectSamplingDecision)!==!1,h=c?Jse(t):null,d=!(i!=null&&i.omitApiKeyAsBearer&&T8(e));return async(f,p)=>{const y=await n();let m=new l(p==null?void 0:p.headers);if(m.has("apikey")||m.set("apikey",e),!m.has("Authorization")){const v=y??(d?e:null);v&&m.set("Authorization",`Bearer ${v}`)}if(h){const v=await iie(f,h,u);v&&(v.traceparent&&!m.has("traceparent")&&m.set("traceparent",v.traceparent),v.tracestate&&!m.has("tracestate")&&m.set("tracestate",v.tracestate),v.baggage&&!m.has("baggage")&&m.set("baggage",v.baggage))}return o(f,Nn(Nn({},p),{},{headers:m}))}};async function iie(e,t,n){if(!Xse(typeof e=="string"||e instanceof URL?e:e.url,t))return null;const r=await Yse();if(!r||!r.traceparent)return null;if(n){const a=Kse(r.traceparent);if(a&&!a.isSampled)return null}return r}function cR(e){return typeof e=="boolean"?{enabled:e}:e}function oie(e){return e.endsWith("/")?e:e+"/"}function lie(e,t){var n,r,a,i,o,l;const{db:c,auth:u,realtime:h,global:d}=e,{db:f,auth:p,realtime:y,global:m}=t,v=cR(e.tracePropagation),b=cR(t.tracePropagation),x={db:Nn(Nn({},f),c),auth:Nn(Nn({},p),u),realtime:Nn(Nn({},y),h),storage:{},global:Nn(Nn(Nn({},m),d),{},{headers:Nn(Nn({},(n=m==null?void 0:m.headers)!==null&&n!==void 0?n:{}),(r=d==null?void 0:d.headers)!==null&&r!==void 0?r:{})}),tracePropagation:{enabled:(a=(i=v==null?void 0:v.enabled)!==null&&i!==void 0?i:b==null?void 0:b.enabled)!==null&&a!==void 0?a:!1,respectSamplingDecision:(o=(l=v==null?void 0:v.respectSamplingDecision)!==null&&l!==void 0?l:b==null?void 0:b.respectSamplingDecision)!==null&&o!==void 0?o:!0},accessToken:async()=>""};return e.accessToken?x.accessToken=e.accessToken:delete x.accessToken,x}function cie(e){const t=e==null?void 0:e.trim();if(!t)throw new Error("supabaseUrl is required.");if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(oie(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var uie=class extends $se{constructor(e){super(e)}},die=class{constructor(e,t,n){var r,a;this.supabaseUrl=e,this.supabaseKey=t;const i=cie(e);if(!t)throw new Error("supabaseKey is required.");sie(t),this.realtimeUrl=new URL("realtime/v1",i),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",i),this.storageUrl=new URL("storage/v1",i),this.functionsUrl=new URL("functions/v1",i);const o=`sb-${i.hostname.split(".")[0]}-auth-token`,l={db:Wse,realtime:Use,auth:Nn(Nn({},qse),{},{storageKey:o}),global:Bse,tracePropagation:zse},c=lie(n??{},l);if(this.settings=c,this.storageKey=(r=c.auth.storageKey)!==null&&r!==void 0?r:"",this.headers=(a=c.global.headers)!==null&&a!==void 0?a:{},c.accessToken)this.accessToken=c.accessToken,this.auth=new Proxy({},{get:(h,d)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(d)} is not possible`)}});else{var u;this.auth=this._initSupabaseAuthClient((u=c.auth)!==null&&u!==void 0?u:{},this.headers,c.global.fetch)}this.fetch=lR(t,e,this._getSessionToken.bind(this),c.global.fetch,c.tracePropagation),this.functionsFetch=lR(t,e,this._getSessionToken.bind(this),c.global.fetch,c.tracePropagation,{omitApiKeyAsBearer
741:!0}),this.realtime=this._initRealtimeClient(Nn({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},c.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(h=>this.realtime.setAuth(h)).catch(h=>console.warn("Failed to set initial Realtime auth token:",h)),this.rest=new fre(new URL("rest/v1",i).href,{headers:this.headers,schema:c.db.schema,fetch:this.fetch,timeout:c.db.timeout,urlLengthLimit:c.db.urlLengthLimit}),this.storage=new Oae(this.storageUrl.href,this.headers,this.fetch,n==null?void 0:n.storage),c.accessToken||this._listenForAuthEvents()}get functions(){return new are(this.functionsUrl.href,{headers:this.headers,customFetch:this.functionsFetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},n={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,n)}channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getSessionToken(){var e=this,t,n;if(e.accessToken)return await e.accessToken();const{data:r}=await e.auth.getSession();return(t=(n=r.session)===null||n===void 0?void 0:n.access_token)!==null&&t!==void 0?t:null}async _getAccessToken(){var e=this,t;return(t=await e._getSessionToken())!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:a,storageKey:i,flowType:o,lock:l,debug:c,throwOnError:u,experimental:h,lockAcquireTimeout:d,skipAutoInitialize:f},p,y){const m={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new uie({url:this.authUrl.href,headers:Nn(Nn({},m),p),storageKey:i,autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:a,flowType:o,lock:l,debug:c,throwOnError:u,experimental:h,fetch:y,lockAcquireTimeout:d,skipAutoInitialize:f,hasCustomAuthorizationHeader:Object.keys(this.headers).some(v=>v.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new nae(this.realtimeUrl.href,Nn(Nn({},e),{},{params:Nn(Nn({},{apikey:this.supabaseKey}),e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",t==null?void 0:t.access_token)})}_handleTokenChanged(e,t,n){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN"||e==="INITIAL_SESSION")&&this.changedAccessToken!==n?(this.changedAccessToken=n,this.realtime.setAuth(n)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const hie=(e,t,n)=>new die(e,t,n);function fie(){if(typeof window<"u"||globalThis.Deno!==void 0)return!1;const e=globalThis.process;if(!e)return!1;const t=e.version;if(t==null)return!1;const n=t.match(/^v(\d+)\./);return n?parseInt(n[1],10)<=20:!1}fie()&&console.warn("⚠️  Node.js 20 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 22 or later. For more information, visit: https://github.com/orgs/supabase/discussions/45715");var Oo={};Object.defineProperty(Oo,"__esModule",{value:!0});Oo.parseCookie=R8;var pie=Oo.parse=R8;Oo.stringifyCookie=xie;Oo.stringifySetCookie=Dw;var A8=Oo.serialize=Dw;Oo.parseSetCookie=wie;Oo.stringifySetCookie=Dw;A8=Oo.serialize=Dw;const E8=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,O8=/^[\u0021-\u003A\u003C-\u007E]*$/,mie=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,gie=/^[\u0020-\u003A\u003D-\u007E]*$/,yie=/^-?\d+$/,vie=Object.prototype.toString,bie=(()=>{const e=function(){};return e.prototype=Object.create(null),e})();function R8(e,t){const n=new bie,r=e.length;if(r<2)return n;const a=(t==null?void 0:t.decode)||I8;let i=0;do{const o=Jj(e,i,r);if(o===-1)break;const l=Qj(e,i,r);if(o>l){i=e.lastIndexOf(";",o-1)+1;continue}const c=Yo(e,i,o);n[c]===void 0&&(n[c]=a(Yo(e,o+1,l))),i=l+1}while(i<r);return n}function xie(e,t){const n=(t==null?void 0:t.encode)||encodeURIComponent,r=[];for(const a of Object.keys(e)){const i=e[a];if(i===void 0)continue;
741if(!E8.test(a))throw new TypeError(`cookie name is invalid: ${a}`);const o=n(i);if(!O8.test(o))throw new TypeError(`cookie val is invalid: ${i}`);r.push(`${a}=${o}`)}return r.join("; ")}function Dw(e,t,n){const r=typeof e=="object"?e:{...n,name:e,value:String(t)},a=typeof t=="object"?t:n,i=(a==null?void 0:a.encode)||encodeURIComponent;if(!E8.test(r.name))throw new TypeError(`argument name is invalid: ${r.name}`);const o=r.value?i(r.value):"";if(!O8.test(o))throw new TypeError(`argument val is invalid: ${r.value}`);let l=r.name+"="+o;if(r.maxAge!==void 0){if(!Number.isInteger(r.maxAge))throw new TypeError(`option maxAge is invalid: ${r.maxAge}`);l+="; Max-Age="+r.maxAge}if(r.domain){if(!mie.test(r.domain))throw new TypeError(`option domain is invalid: ${r.domain}`);l+="; Domain="+r.domain}if(r.path){if(!gie.test(r.path))throw new TypeError(`option path is invalid: ${r.path}`);l+="; Path="+r.path}if(r.expires){if(!_ie(r.expires)||!Number.isFinite(r.expires.valueOf()))throw new TypeError(`option expires is invalid: ${r.expires}`);l+="; Expires="+r.expires.toUTCString()}if(r.httpOnly&&(l+="; HttpOnly"),r.secure&&(l+="; Secure"),r.partitioned&&(l+="; Partitioned"),r.priority)switch(typeof r.priority=="string"?r.priority.toLowerCase():void 0){case"low":l+="; Priority=Low";break;case"medium":l+="; Priority=Medium";break;case"high":l+="; Priority=High";break;
741default:throw new TypeError(`option priority is invalid: ${r.priority}`)}if(r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:case"strict":l+="; SameSite=Strict";break;case"lax":l+="; SameSite=Lax";break;case"none":l+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${r.sameSite}`)}return l}function wie(e,t){const n=(t==null?void 0:t.decode)||I8,r=e.length,a=Qj(e,0,r),i=Jj(e,0,a),o=i===-1?{name:"",value:n(Yo(e,0,a))}:{name:Yo(e,0,i),value:n(Yo(e,i+1,a))};let l=a+1;for(;l<r;){const c=Qj(e,l,r),u=Jj(e,l,c),h=u===-1?Yo(e,l,c):Yo(e,l,u),d=u===-1?void 0:Yo(e,u+1,c);switch(h.toLowerCase()){case"httponly":o.httpOnly=!0;break;case"secure":o.secure=!0;break;case"partitioned":o.partitioned=!0;break;case"domain":o.domain=d;break;case"path":o.path=d;break;case"max-age":d&&yie.test(d)&&(o.maxAge=Number(d));break;case"expires":if(!d)break;const f=new Date(d);Number.isFinite(f.valueOf())&&(o.expires=f);break;case"priority":if(!d)break;const p=d.toLowerCase();(p==="low"||p==="medium"||p==="high")&&(o.priority=p);break;case"samesite":if(!d)break;const y=d.toLowerCase();(y==="lax"||y==="strict"||y==="none")&&(o.sameSite=y);break}l=c+1}return o}function Qj(e,t,n){const r=e.indexOf(";",t);return r===-1?n:r}function Jj(e,t,n){const r=e.indexOf("=",t);return r<n?r:-1}function Yo(e,t,n){let r=t,a=n;do{const i=e.charCodeAt(r);if(i!==32&&i!==9)break}while(++r<a);for(;a>r;){const i=e.charCodeAt(a-1);if(i!==32&&i!==9)break;a--}return e.slice(r,a)}function I8(e){if(e.indexOf("%")===-1)return e;try{return decodeURIComponent(e)}catch{return e}}function _ie(e){return vie.call(e)==="[object Date]"}function kd(){return typeof window<"u"&&typeof window.document<"u"}const Oy={path:"/",sameSite:"lax",httpOnly:!1,maxAge:400*24*60*60},kie=3180,jie=/^(.*)[.](0|[1-9][0-9]*)$/;function uR(e,t){if(e===t)return!0;const n=e.match(jie);return!!(n&&n[1]===t)}function Sie(e,t,n){const r=kie;let a=encodeURIComponent(t);if(a.length<=r)return[{name:e,value:t}];const i=[];for(;a.length>0;){let o=a.slice(0,r);const l=o.lastIndexOf("%");l>r-3&&(o=o.slice(0,l));let c="";for(;o.length>0;)try{c=decodeURIComponent(o);break}catch(u){if(u instanceof URIError&&o.at(-3)==="%"&&o.length>3)o=o.slice(0,o.length-3);else throw u}i.push(c),a=a.slice(o.length)}return i.map((o,l)=>({name:`${e}.${l}`,value:o}))}async function Nie(e,t){const n=await t(e);if(n)return n;let r=[];for(let a=0;;a++){const i=`${e}.${a}`,o=await t(i);if(!o)break;r.push(o)}return r.length>0?r.join(""):null}const Pb="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),dR=` 	
742\r=`.split(""),Cie=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<dR.length;t+=1)e[dR[t].charCodeAt(0)]=-2;for(let t=0;t<Pb.length;t+=1)e[Pb[t].charCodeAt(0)]=t;return e})();function Pie(e){const t=[];let n=0,r=0;if(Eie(e,i=>{for(n=n<<8|i,r+=8;r>=6;){const o=n>>r-6&63;t.push(Pb[o]),r-=6}}),r>0)for(n=n<<6-r,r=6;r>=6;){const i=n>>r-6&63;t.push(Pb[i]),r-=6}return t.join("")}function Tie(e){const t=[],n=o=>{t.push(String.fromCodePoint(o))},r={utf8seq:0,codepoint:0};let a=0,i=0;for(let o=0;o<e.length;o+=1){const l=e.charCodeAt(o),c=Cie[l];if(c>-1)for(a=a<<6|c,i+=6;i>=8;)Oie(a>>i-8&255,r,n),i-=8;else{if(c===-2)continue;throw new Error(`Invalid Base64-URL character "${e.at(o)}" at position ${o}`)}}return t.join("")}function Aie(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function Eie(e,t){for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);if(r>55295&&r<=56319){const a=(r-55296)*1024&65535;r=(e.charCodeAt(n+1)-56320&65535|a)+65536,n+=1}Aie(r,t)}}function Oie(e,t,n){if(t.utf8seq===0){if(e<=127){n(e);return}for(let r=1;r<6;r+=1)if(!(e>>7-r&1)){t.utf8seq=r;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&n(t.codepoint)}}const Zj="base64-";function Rie(e){if(!e.startsWith(Zj))return e;let t;try{t=Tie(e.substring(Zj.length))}catch(n){return console.warn("@supabase/ssr: could not base64url-decode chunked cookie value, treating as absent. Cookie chunks may have been written partially across responses.",n),null}try{JSON.parse(t)}catch{return console.warn("@supabase/ssr: chunked cookie decoded to invalid JSON, treating as absent. This usually indicates that cookie chunks from different writes were combined (e.g. response committed before all Set-Cookie headers were sent)."),null}return t}function Iie(e,t){const n=e.cookies??null,r=e.cookieEncoding,a={},i={};let o,l;const c=()=>{const h=pie(document.cookie);return Object.keys(h).map(d=>({name:d,value:h[d]??""}))},u=h=>{h.forEach(({name:d,value:f,options:p})=>{document.cookie=A8(d,f,p)})};if(n)if("get"in n){const h=async d=>{const f=d.flatMap(y=>[y,...Array.from({length:5}).map((m,v)=>`${y}.${v}`)]),p=[];for(let y=0;y<f.length;y+=1){const m=await n.get(f[y]);!m&&typeof m!="string"||p.push({name:f[y],value:m})}return p};if(o=async d=>await h(d),"set"in n&&"remove"in n)l=async d=>{for(let f=0;f<d.length;f+=1){const{name:p,value:y,options:m}=d[f];y?await n.set(p,y,m):await n.remove(p,m)}};else throw new Error("@supabase/ssr: createBrowserClient requires configuring a getAll and setAll cookie method (deprecated: alternatively both get, set and remove can be used)")}else if("getAll"in n)if(o=async()=>await n.getAll(),"setAll"in n)l=n.setAll;else throw new Error("@supabase/ssr: createBrowserClient requires configuring both getAll and setAll cookie methods (deprecated: alternatively both get, set and remove can be used)");else if(kd())o=()=>c(),l=u;else throw new Error(`@supabase/ssr: createBrowserClient requires configuring getAll and setAll cookie methods (deprecated: alternatively use get, set and remove).${kd()?" As this is called in a browser runtime, consider removing the cookies option object to use the document.cookie API automatically.":""}`);else kd()?(o=()=>c(),l=u):(o=()=>[],l=()=>{throw new Error("@supabase/ssr: createBrowserClient in non-browser runtimes (including Next.js pre-rendering mode) was not initialized cookie options that specify getAll and setAll functions (deprecated: alternatively use get, set and remove), but they were needed")});return{getAll:o,setAll:l,setItems:a,removedItems:i,storage:{isServer:!1,getItem:async h=>{const d=await o([h]),f=await Nie(h,async p=>{const y=(d==null?void 0:d.find(({name:m})=>m===p))||null;return y?y.value:null});return f?Rie(f):null},setItem:async(h,d)=>{const f=await o([h]),p=(f==null?void 0:f.map(({name:k})=>k))||[],y=new Set(p.filter(k=>uR(k,h)));let m=d;r==="base64url"&&(m=Zj+Pie(d));const v=Sie(h,m);v.forEach(({name:k})=>{y.delete(k)});const b={...Oy,...e==null?void 0:e.cookieOptions,maxAge:0},x={...Oy,...e==null?void 0:e.cookieOptions,maxAge:Oy.maxAge};delete b.name,delete x.name;const w=b.domain?(()=>{const{domain:k,...j}=b;return j})():null,_=[...w?[...y].map(k=>({name:k,value:"",options:w})):[],...[...y].map(k=>({name:k,value:"",options:b})),...v.map(({name:k,value:j})=>({name:k,value:j,options:x}))];_.length>0&&await l(_,{})},removeItem:async h=>{const d=await o([h]),p=((d==null?void 0:d.map(({name:b})=>b))||[]).filter(b=>uR(b,h));if(p.length===0)return;const y={...Oy,...e==null?void 0:e.cookieOptions,maxAge:0};delete y.name;const m=y.domain?(()=>{const{domain:b,...x}=y;return x})():null,v=[...m?p.map(b=>({name:b,value:"",options:m})):[],...p.map(b=>({name:b,value:"",options:y}))];await l(v,{})}}}}const Mie="0.12.4";var Ry={};let hR=!1;const Die=["@supabase/auth-helpers-nextjs","@supabase/auth-helpers-react","@supabase/auth-helpers-remix","@supabase/auth-helpers-sveltekit"];function $ie(){if(hR||typeof process>"u"||!(Ry!=null&&Ry.npm_package_name))return;const e=Ry.npm_package_name;Die.includes(e)&&(hR=!0,console.warn(`
743╔════════════════════════════════════════════════════════════════════════════╗
744║ ⚠️  IMPORTANT: Package Consolidation Notice                                ║
745║                                                                            ║
746║ The ${e.padEnd(35)} package name is deprecated.  ║
747║                                                                            ║
748║ You are now using @supabase/ssr - a unified solution for all frameworks.  ║
749║                                                                            ║
750║ The auth-helpers packages have been consolidated into @supabase/ssr       ║
751║ to provide better maintenance and consistent APIs across frameworks.      ║
752║                                                                            ║
753║ Please update your package.json to use @supabase/ssr directly:            ║
754║   npm uninstall ${e.padEnd(42)} ║
755║   npm install @supabase/ssr                                               ║
756║                                                                            ║
757║ For more information, visit:                                              ║
758║ https://supabase.com/docs/guides/auth/server-side                         ║
759╚════════════════════════════════════════════════════════════════════════════╝
760    `))}let J_;function Lie(e,t,n){var o;
760$ie();const r=kd();if(r&&J_)return J_;const{storage:a}=Iie({...n,cookieEncoding:"base64url"}),i=hie(e,t,{...n,global:{...n==null?void 0:n.global,headers:{...(o=n==null?void 0:n.global)==null?void 0:o.headers,"X-Client-Info":`supabase-ssr/${Mie} createBrowserClient`}},auth:{...n==null?void 0:n.auth,flowType:"pkce",autoRefreshToken:kd(),detectSessionInUrl:kd(),persistSession:!0,storage:a}});return r&&(J_=i),i}const Fie="https://hgnuynazdzzocuwtwiez.supabase.co",Bie="sb_publishable__0Zesn96s_l2w2G1z_9fxw_mY_wD58k",W=Lie(Fie,Bie);function Wie(){const{setTheme:e}=a8();g.useEffect(()=>{const t=async()=>{const{data:{user:r}}=await W.auth.getUser();if(!r)return;const{data:a}=await W.from("user_settings").select("theme").eq("user_id",r.id).maybeSingle();a!=null&&a.theme&&e(a.theme)};t();const{data:{subscription:n}}=W.auth.onAuthStateChange(r=>{r==="SIGNED_IN"&&t()});return()=>n.unsubscribe()},[e])}function qie({children:e}){return Wie(),s.jsx(s.Fragment,{children:e})}const fR="com.aisocialapp",pR="sociepro_android_app";let Z_=null;function Ds(){if(typeof window>"u")return!1;if(Z_!==null)return Z_;let e=!1;try{const t=(document.referrer||"").startsWith(`android-app://${fR}`),n=new URLSearchParams(window.location.search).get("source")==="twa";t||n?(e=!0,sessionStorage.setItem(pR,"1")):e=sessionStorage.getItem(pR)==="1"}catch{e=(document.referrer||"").startsWith(`android-app://${fR}`)}return Z_=e,e}const M8="Plans and course purchases aren't available in the SociePRO Android app.",mR="2805356453183823",Uie="v21.0";function zie({children:e}){return g.useEffect(()=>{if(typeof window>"u"||!mR||Ds()||document.getElementById("facebook-jssdk"))return;window.fbAsyncInit=function(){window.FB.init({appId:mR,cookie:!0,xfbml:!0,version:Uie}),window.FB.AppEvents.logPageView()};const t=()=>{const n=document.createElement("script");n.id="facebook-jssdk",n.src="https://connect.facebook.net/en_US/sdk.js",n.async=!0,n.defer=!0;const r=document.getElementsByTagName("script")[0];r!=null&&r.parentNode?r.parentNode.insertBefore(n,r):document.head.appendChild(n)};if(document.readyState==="complete")t();else return window.addEventListener("load",t),()=>window.removeEventListener("load",t)},[]),s.jsx(s.Fragment,{children:e})}const ys={realtor:{slug:"realtor",name:"RealtorPRO",displayName:"Real Estate",isEnabled:!0,isMassMarket:!1,avgCommission:12e3,defaultConversionRate:10,complianceMode:"standard",attributionModel:"short_cycle",defaultFrequency:"weekly",trendCategories:["quick_quiz","behavioral_insight","still_relevant_today"],leadScores:{inquiry:10,contact_form:25,phone_call:40,appointment:60}},financial_advisor:{slug:"financial_advisor",name:"AdvisorPRO",displayName:"Financial Advisor",isEnabled:!0,isMassMarket:!1,avgCommission:3500,defaultConversionRate:6,complianceMode:"strict",attributionModel:"long_cycle",defaultFrequency:"weekly",trendCategories:["quick_quiz","behavioral_insight","life_hack"],leadScores:{inquiry:15,contact_form:30,phone_call:50,appointment:80}},builder_remodeler:{slug:"builder_remodeler",name:"BuilderPRO",displayName:"Builder & Remodeler",isEnabled:!0,isMassMarket:!1,avgCommission:15e3,defaultConversionRate:8,complianceMode:"standard",attributionModel:"mid_cycle",defaultFrequency:"twice_weekly",trendCategories:["quick_quiz","behavioral_insight"],leadScores:{inquiry:20,contact_form:35,phone_call:55,appointment:75}},insurance:{slug:"insurance",name:"InsurancePRO",displayName:"Insurance",isEnabled:!0,isMassMarket:!1,avgCommission:800,defaultConversionRate:15,complianceMode:"standard",defaultFrequency:"weekly",trendCategories:["quick_quiz","behavioral_insight"],leadScores:{inquiry:15,contact_form:30,phone_call:45,appointment:70}},mortgage:{slug:"mortgage",name:"MortgagePRO",displayName:"Mortgage",isEnabled:!0,isMassMarket:!1,avgCommission:5e3,defaultConversionRate:8,complianceMode:"strict",defaultFrequency:"weekly",trendCategories:["quick_quiz","behavioral_insight"],leadScores:{inquiry:10,contact_form:25,phone_call:50,appointment:75}},property_manager:{slug:"property_manager",name:"PropertyManagerPRO",displayName:"Property Manager",isEnabled:!0,isMassMarket:!1,avgCommission:2e3,defaultConversionRate:12,complianceMode:"standard",attributionModel:"mid_cycle",defaultFrequency:"weekly",trendCategories:["quick_quiz","behavioral_insight"],leadScores:{inquiry:15,contact_form:30,phone_call:45,appointment:70}},host:{slug:"host",name:"HostPRO",displayName:"Short-Term Rental Host",isEnabled:!0,isMassMarket:!1,avgCommission:1500,defaultConversionRate:15,complianceMode:"standard",attributionModel:"short_cycle",defaultFrequency:"weekly",trendCategories:["quick_quiz","behavioral_insight","life_hack"],leadScores:{inquiry:10,contact_form:20,phone_call:35,appointment:55}},restaurantpro:{slug:"restaurantpro",name:"RestaurantPRO",displayName:"Restaurant",isEnabled:!0,isMassMarket:!1,avgCommission:500,defaultConversionRate:20,complianceMode:"standard",attributionModel:"short_cycle",defaultFrequency:"weekly",trendCategories:["quick_quiz","behavioral_insight","life_hack"],leadScores:{inquiry:10,contact_form:20,phone_call:35,appointment:55}},personal:{slug:"personal",name:"PersonalPRO",displayName:"Personal Brand",isEnabled:!0,isMassMarket:!0,avgCommission:0,defaultConversionRate:0,complianceMode:"standard",defaultFrequency:"thrice_weekly",trendCategories:["life_hack","still_relevant_today","quick_quiz","behavioral_insight","quick_poll"],leadScores:{inquiry:5,contact_form:10,phone_call:20,appointment:30}},creator:{slug:"creator",name:"CreatorPRO",displayName:"Content Creator",isEnabled:!0,isMassMarket:!0,avgCommission:0,defaultConversionRate:0,complianceMode:"standard",defaultFrequency:"daily",trendCategories:["behavioral_insight","life_hack","quick_quiz","quick_poll"],leadScores:{inquiry:5,contact_form:10,phone_call:15,appointment:25}},side_hustle:{slug:"side_hustle",name:"SideHustlePRO",displayName:"Side Hustle",isEnabled:!0,isMassMarket:!0,avgCommission:500,defaultConversionRate:5,complianceMode:"standard",defaultFrequency:"thrice_weekly",trendCategories:["life_hack","behavioral_insight","quick_quiz","quick_poll"],leadScores:{inquiry:10,contact_form:20,phone_call:30,appointment:50}},freelance_consultant:{slug:"freelance_consultant",name:"FreelanceConsultantPRO",displayName:"Freelance Consultant",isEnabled:!0,isMassMarket:!1,avgCommission:3e3,defaultConversionRate:12,complianceMode:"standard",defaultFrequency:"weekly",trendCategories:["behavioral_insight","life_hack","quick_quiz"],leadScores:{inquiry:15,contact_form:30,phone_call:45,appointment:70}},personal_trainer:{slug:"personal_trainer",name:"PersonalTrainerPRO",displayName:"Personal Trainer",isEnabled:!0,isMassMarket:!1,avgCommission:500,defaultConversionRate:20,complianceMode:"standard",defaultFrequency:"weekly",trendCategories:["life_hack","behavioral_insight","quick_quiz"],leadScores:{inquiry:10,contact_form:25,phone_call:40,appointment:60}},course_coach:{slug:"course_coach",name:"CourseCoachPRO",displayName:"Course Creator & Coach",isEnabled:!0,isMassMarket:!1,avgCommission:1e3,defaultConversionRate:10,complianceMode:"standard",defaultFrequency:"weekly",trendCategories:["behavioral_insight","life_hack","quick_quiz"],leadScores:{inquiry:10,contact_form:25,phone_call:40,appointment:60}},authoritypro:{slug:"authoritypro",name:"AuthorityPRO",displayName:"Authority (Internal)",isEnabled:!0,isMassMarket:!1,avgCommission:0,defaultConversionRate:0,complianceMode:"standard",defaultFrequency:"weekly",trendCategories:["behavioral_insight","life_hack"],leadScores:{inquiry:5,contact_form:10,phone_call:20,appointment:30}},medspa:{slug:"medspa",name:"MedspaPRO",displayName:"Med Spa",isEnabled:!1,isMassMarket:!1,avgCommission:1500,defaultConversionRate:20,complianceMode:"hipaa",defaultFrequency:"weekly",leadScores:{inquiry:20,contact_form:35,phone_call:50,appointment:80}},gym:{slug:"gym",name:"GymPRO",displayName:"Fitness",isEnabled:!1,isMassMarket:!1,avgCommission:600,defaultConversionRate:25,complianceMode:"standard",defaultFrequency:"weekly",leadScores:{inquiry:15,contact_form:30,phone_call:40,appointment:65}},dentist:{slug:"dentist",name:"DentistPRO",displayName:"Dental",isEnabled:!1,isMassMarket:!1,avgCommission:2e3,defaultConversionRate:18,complianceMode:"hipaa",defaultFrequency:"weekly",leadScores:{inquiry:15,contact_form:35,phone_call:50,appointment:80}}},D8=g.createContext(void 0);function Hie({children:e}){const[t,n]=g.useState(()=>{var m;const y=typeof window<"u"?localStorage.getItem("sociepro-vertical")||localStorage.getItem("active_vertical"):null;return y&&((m=ys[y])!=null&&m.isEnabled)?y:null}),[r,a]=g.useState(!1);g.useEffect(()=>{var v;const y=localStorage.getItem("sociepro-vertical")||localStorage.getItem("active_vertical");y&&((v=ys[y])!=null&&v.isEnabled)&&n(y),(async()=>{var b,x,w,_;
760try{const{data:{user:k}}=await W.auth.getUser();if(!k){a(!0);return}const j=localStorage.getItem("sociepro-vertical")||localStorage.getItem("active_vertical"),S=((b=k.user_metadata)==null?void 0:b.active_module)||((x=k.user_metadata)==null?void 0:x.module)||((w=k.user_metadata)==null?void 0:w.industry_module);S&&((_=ys[S])!=null&&_.isEnabled)&&!j&&(n(S),localStorage.setItem("sociepro-vertical",S),localStorage.setItem("active_vertical",S));const{data:N}=await W.from("user_module_access").select("module_slug").eq("user_id",k.id).eq("is_enabled",!0);if(!N||N.length===0){a(!0);return}const C=N.map(M=>M.module_slug).filter(M=>{var O;return(O=ys[M])==null?void 0:O.isEnabled});if(j&&C.includes(j))n(j);else if(C.length===1){const M=C[0];n(M),localStorage.setItem("sociepro-vertical",M),localStorage.setItem("active_vertical",M)}else if(C.length>1&&j&&!C.includes(j)){const M=C[0];n(M),localStorage.setItem("sociepro-vertical",M),localStorage.setItem("active_vertical",M)}}catch(k){console.error("Error auto-selecting module:",k)}finally{a(!0)}})()},[]);const i=g.useCallback(y=>{var m;(m=ys[y])!=null&&m.isEnabled&&(n(y),localStorage.setItem("sociepro-vertical",y),localStorage.setItem("active_vertical",y))},[]),o=g.useCallback(y=>{var m;return((m=ys[y])==null?void 0:m.isEnabled)??!1},[]),l=g.useCallback(y=>{var m;return((m=ys[y])==null?void 0:m.isMassMarket)??!1},[]),c=g.useCallback(y=>ys[y],[]),u=Object.values(ys).filter(y=>y.isEnabled),h=u.filter(y=>!y.isMassMarket),d=u.filter(y=>y.isMassMarket),f=Object.values(ys),p={currentVertical:t,verticalConfig:t?ys[t]:null,isVerticalReady:r,enabledVerticals:u,professionalVerticals:h,massMarketVerticals:d,allVerticals:f,setCurrentVertical:i,isVerticalEnabled:o,isMassMarket:l,getVerticalConfig:c};return s.jsx(D8.Provider,{value:p,children:e})}function Fa(){const e=g.useContext(D8);if(e===void 0)throw new Error("useVertical must be used within a VerticalProvider");return e}const jf={US:{code:"US",name:"United States",locale:"en-US",currency:"USD",dateFormat:"MM/DD/YYYY",timezone:"America/New_York"},IN:{code:"IN",name:"India",locale:"en-IN",currency:"INR",dateFormat:"DD/MM/YYYY",timezone:"Asia/Kolkata"},UK:{code:"UK",name:"United Kingdom",locale:"en-GB",currency:"GBP",dateFormat:"DD/MM/YYYY",timezone:"Europe/London"},CA:{code:"CA",name:"Canada",locale:"en-CA",currency:"CAD",dateFormat:"YYYY-MM-DD",timezone:"America/Toronto"},AU:{code:"AU",name:"Australia",locale:"en-AU",currency:"AUD",dateFormat:"DD/MM/YYYY",timezone:"Australia/Sydney"},OTHER:{code:"OTHER",name:"Other",locale:"en-US",currency:"USD",dateFormat:"YYYY-MM-DD",timezone:"UTC"}},$8=g.createContext(void 0);function Vie({children:e}){const[t,n]=g.useState(null),[r,a]=g.useState(!0),[i,o]=g.useState(!1);Je();const l=g.useCallback(()=>{const y=navigator.language||"en-US",m=y.toUpperCase();return m.includes("IN")||m.includes("HI")?"IN":m.includes("GB")||m.includes("UK")?"UK":m.includes("CA")?"CA":m.includes("AU")?"AU":m.includes("US")||m.includes("EN-US")||y.startsWith("en")?"US":"OTHER"},[]),c=g.useCallback(async()=>{try{const{data:{user:y}}=await W.auth.getUser();if(!y){a(!1),o(!1);return}const{data:m,error:v}=await W.from("user_organizations").select("organization_id, is_primary").eq("user_id",y.id).eq("is_primary",!0).maybeSingle();if(v){console.error("Error fetching membership:",v),a(!1);return}if(!m){o(!0),a(!1);return}const{data:b,error:x}=await W.from("organizations").select("id, name, slug, owner_id, market, locale, timezone").eq("id",m.organization_id).single();if(x){console.error("Error fetching organization:",x),a(!1);return}n({id:b.id,name:b.name,slug:b.slug,owner_id:b.owner_id||void 0,market:b.market,locale:b.locale,timezone:b.timezone||void 0}),o(!1)}catch(y){console.error("Error in fetchOrganization:",y)}finally{a(!1)}},[]);g.useEffect(()=>{c();const{data:{subscription:y}}=W.auth.onAuthStateChange(m=>{m==="SIGNED_IN"?c():m==="SIGNED_OUT"&&(n(null),o(!1))});return()=>y.unsubscribe()},[c]);const u=g.useCallback(y=>{n(y),o(!1)},[]),h=g.useCallback(async()=>{await c()},[c]),d=g.useCallback(y=>jf[y]||jf.US,[]),f=t?jf[t.market]:jf[l()],p={organization:t,marketConfig:f,isLoading:r,needsOnboarding:i,setOrganization:u,refreshOrganization:h,getMarketConfig:d,allMarkets:Object.values(jf),suggestMarketFromLocale:l};return s.jsx($8.Provider,{value:p,children:e})}function L8(){const e=g.useContext($8);if(e===void 0)throw new Error("useMarket must be used within a MarketProvider");return e}const zP=g.createContext({});function yu(e){const t=g.useRef(null);return t.current===null&&(t.current=e()),t.current}const HP=typeof window<"u",VP=HP?g.useLayoutEffect:g.useEffect,$w=g.createContext(null);function GP(e,t){e.indexOf(t)===-1&&e.push(t)}function YP(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function Gie([...e],t,n){const r=t<0?e.length+t:t;if(r>=0&&r<e.length){const a=n<0?e.length+n:n,[i]=e.splice(t,1);e.splice(a,0,i)}return e}const _o=(e,t,n)=>n>t?t:n<e?e:n;let Lw=()=>{},Dl=()=>{};const ko={},F8=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function B8(e){return typeof e=="object"&&e!==null}const W8=e=>/^0[^.\s]+$/u.test(e);function KP(e){let t;return()=>(t===void 0&&(t=e()),t)}const ts=e=>e,Yie=(e,t)=>n=>t(e(n)),bg=(...e)=>e.reduce(Yie),sm=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class XP{constructor(){this.subscriptions=[]}add(t){return GP(this.subscriptions,t),()=>YP(this.subscriptions,t)}notify(t,n,r){const a=this.subscriptions.length;if(a)if(a===1)this.subscriptions[0](t,n,r);else for(let i=0;i<a;i++){const o=this.subscriptions[i];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const $s=e=>e*1e3,Ja=e=>e/1e3;function q8(e,t){return t?e*(1e3/t):0}const U8=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Kie=1e-7,Xie=12;function Qie(e,t,n,r,a){let i,o,l=0;do o=t+(n-t)/2,i=U8(o,r,a)-e,i>0?n=o:t=o;while(Math.abs(i)>Kie&&++l<Xie);return o}function xg(e,t,n,r){if(e===t&&n===r)return ts;const a=i=>Qie(i,0,1,e,n);return i=>i===0||i===1?i:U8(a(i),t,r)}const z8=e=>t=>
vendor: 4,677 bytes, line 760
760t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,H8=e=>t=>1-e(1-t),V8=xg(.33,1.53,.69,.99),QP=H8(V8),G8=z8(QP),Y8=e=>(e*=2)<1?.5*QP(e):.5*(2-Math.pow(2,-10*(e-1))),JP=e=>1-Math.sin(Math.acos(e)),K8=H8(JP),X8=z8(JP),Jie=xg(.42,0,1,1),Zie=xg(0,0,.58,1),Q8=xg(.42,0,.58,1),eoe=e=>Array.isArray(e)&&typeof e[0]!="number",J8=e=>Array.isArray(e)&&typeof e[0]=="number",gR={linear:ts,easeIn:Jie,easeInOut:Q8,easeOut:Zie,circIn:JP,circInOut:X8,circOut:K8,backIn:QP,backInOut:G8,backOut:V8,anticipate:Y8},toe=e=>typeof e=="string",yR=e=>{if(J8(e)){Dl(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,a]=e;return xg(t,n,r,a)}else if(toe(e))return Dl(gR[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),gR[e];return e},Iy=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],vR={value:null,addProjectionMetrics:null};function noe(e,t){let n=new Set,r=new Set,a=!1,i=!1;const o=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1},c=0;function u(d){o.has(d)&&(h.schedule(d),e()),c++,d(l)}const h={schedule:(d,f=!1,p=!1)=>{const m=p&&a?n:r;return f&&o.add(d),m.has(d)||m.add(d),d},cancel:d=>{r.delete(d),o.delete(d)},process:d=>{if(l=d,a){i=!0;return}a=!0,[n,r]=[r,n],n.forEach(u),t&&vR.value&&vR.value.frameloop[t].push(c),c=0,n.clear(),a=!1,i&&(i=!1,h.process(d))}};return h}const roe=40;function Z8(e,t){let n=!1,r=!0;const a={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=Iy.reduce((w,_)=>(w[_]=noe(i,t?_:void 0),w),{}),{setup:l,read:c,resolveKeyframes:u,preUpdate:h,update:d,preRender:f,render:p,postRender:y}=o,m=()=>{const w=ko.useManualTiming?a.timestamp:performance.now();n=!1,ko.useManualTiming||(a.delta=r?1e3/60:Math.max(Math.min(w-a.timestamp,roe),1)),a.timestamp=w,a.isProcessing=!0,l.process(a),c.process(a),u.process(a),h.process(a),d.process(a),f.process(a),p.process(a),y.process(a),a.isProcessing=!1,n&&t&&(r=!1,e(m))},v=()=>{n=!0,r=!0,a.isProcessing||e(m)};return{schedule:Iy.reduce((w,_)=>{const k=o[_];return w[_]=(j,S=!1,N=!1)=>(n||v(),k.schedule(j,S,N)),w},{}),cancel:w=>{for(let _=0;_<Iy.length;_++)o[Iy[_]].cancel(w)},state:a,steps:o}}const{schedule:on,cancel:jo,state:xr,steps:e1}=Z8(typeof requestAnimationFrame<"u"?requestAnimationFrame:ts,!0);let Ev;function aoe(){Ev=void 0}const ha={now:()=>(Ev===void 0&&ha.set(xr.isProcessing||ko.useManualTiming?xr.timestamp:performance.now()),Ev),set:e=>{Ev=e,queueMicrotask(aoe)}},eB=e=>t=>typeof t=="string"&&t.startsWith(e),tB=eB("--"),soe=eB("var(--"),ZP=e=>soe(e)?ioe.test(e.split("/*")[0].trim()):!1,ioe=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,qh={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},im={...qh,transform:e=>_o(0,1,e)},My={...qh,default:1},pp=e=>Math.round(e*1e5)/1e5,e2=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function ooe(e){return e==null}const loe=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,t2=(e,t)=>n=>!!(typeof n=="string"&&loe.test(n)&&n.startsWith(e)||t&&!ooe(n)&&Object.prototype.hasOwnProperty.call(n,t)),nB=(e,t,n)=>r=>{if(typeof r!="string")return r;const[a,i,o,l]=r.match(e2);return{[e]:parseFloat(a),[t]:parseFloat(i),[n]:parseFloat(o),alpha:l!==void 0?parseFloat(l):1}},coe=e=>_o(0,255,e),t1={...qh,transform:e=>Math.round(coe(e))},xc={test:t2("rgb","red"),parse:nB("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+t1.transform(e)+", "+t1.transform(t)+", "+t1.transform(n)+", "+pp(im.transform(r))+")"};function uoe(e){let t="",n="",r="",a="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),a=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),a=e.substring(4,5),t+=t,n+=n,r+=r,a+=a),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:a?parseInt(a,16)/255:1}}const eS={test:t2("#"),parse:uoe,transform:xc.transform},wg=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Uo=wg("deg"),bi=wg("%"),ke=wg("px"),doe=wg("vh"),hoe=wg("vw"),bR={...bi,parse:e=>bi.parse(e)/100,transform:e=>bi.transform(e*100)},td={test:t2("hsl","hue"),parse:nB("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+bi.transform(pp(t))+", "+bi.transform(pp(n))+", "+pp(im.transform(r))+")"},Fn={test:e=>xc.test(e)||eS.test(e)||td.test(e),parse:e=>xc.test(e)?xc.parse(e):td.test(e)?td.parse(e):eS.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?xc.transform(e):td.transform(e),getAnimatableNone:e=>{const t=Fn.parse(e);return t.alpha=0,Fn.transform(t)}}
vendor: 1,153 bytes, line 760
760,foe=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function poe(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(e2))==null?void 0:t.length)||0)+(((n=e.match(foe))==null?void 0:n.length)||0)>0}const rB="number",aB="color",moe="var",goe="var(",xR="${}",yoe=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function om(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},a=[];let i=0;const l=t.replace(yoe,c=>(Fn.test(c)?(r.color.push(i),a.push(aB),n.push(Fn.parse(c))):c.startsWith(goe)?(r.var.push(i),a.push(moe),n.push(c)):(r.number.push(i),a.push(rB),n.push(parseFloat(c))),++i,xR)).split(xR);return{values:n,split:l,indexes:r,types:a}}function sB(e){return om(e).values}function iB(e){const{split:t,types:n}=om(e),r=t.length;return a=>{let i="";for(let o=0;o<r;o++)if(i+=t[o],a[o]!==void 0){const l=n[o];l===rB?i+=pp(a[o]):l===aB?i+=Fn.transform(a[o]):i+=a[o]}return i}}const voe=e=>
vendor: 10,957 bytes, line 760
760typeof e=="number"?0:Fn.test(e)?Fn.getAnimatableNone(e):e;function boe(e){const t=sB(e);return iB(e)(t.map(voe))}const $l={test:poe,parse:sB,createTransformer:iB,getAnimatableNone:boe};function n1(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function xoe({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let a=0,i=0,o=0;if(!t)a=i=o=n;else{const l=n<.5?n*(1+t):n+t-n*t,c=2*n-l;a=n1(c,l,e+1/3),i=n1(c,l,e),o=n1(c,l,e-1/3)}return{red:Math.round(a*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:r}}function Tb(e,t){return n=>n>0?t:e}const hn=(e,t,n)=>e+(t-e)*n,r1=(e,t,n)=>{const r=e*e,a=n*(t*t-r)+r;return a<0?0:Math.sqrt(a)},woe=[eS,xc,td],_oe=e=>woe.find(t=>t.test(e));function wR(e){const t=_oe(e);if(Lw(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===td&&(n=xoe(n)),n}const _R=(e,t)=>{const n=wR(e),r=wR(t);if(!n||!r)return Tb(e,t);const a={...n};return i=>(a.red=r1(n.red,r.red,i),a.green=r1(n.green,r.green,i),a.blue=r1(n.blue,r.blue,i),a.alpha=hn(n.alpha,r.alpha,i),xc.transform(a))},tS=new Set(["none","hidden"]);function koe(e,t){return tS.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function joe(e,t){return n=>hn(e,t,n)}function n2(e){return typeof e=="number"?joe:typeof e=="string"?ZP(e)?Tb:Fn.test(e)?_R:Coe:Array.isArray(e)?oB:typeof e=="object"?Fn.test(e)?_R:Soe:Tb}function oB(e,t){const n=[...e],r=n.length,a=e.map((i,o)=>n2(i)(i,t[o]));return i=>{for(let o=0;o<r;o++)n[o]=a[o](i);return n}}function Soe(e,t){const n={...e,...t},r={};for(const a in n)e[a]!==void 0&&t[a]!==void 0&&(r[a]=n2(e[a])(e[a],t[a]));return a=>{for(const i in r)n[i]=r[i](a);return n}}function Noe(e,t){const n=[],r={color:0,var:0,number:0};for(let a=0;a<t.values.length;a++){const i=t.types[a],o=e.indexes[i][r[i]],l=e.values[o]??0;n[a]=l,r[i]++}return n}const Coe=(e,t)=>{const n=$l.createTransformer(t),r=om(e),a=om(t);return r.indexes.var.length===a.indexes.var.length&&r.indexes.color.length===a.indexes.color.length&&r.indexes.number.length>=a.indexes.number.length?tS.has(e)&&!a.values.length||tS.has(t)&&!r.values.length?koe(e,t):bg(oB(Noe(r,a),a.values),n):(Lw(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Tb(e,t))};function lB(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?hn(e,t,n):n2(e)(e,t)}const Poe=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>on.update(t,n),stop:()=>jo(t),now:()=>xr.isProcessing?xr.timestamp:ha.now()}},cB=(e,t,n=10)=>{let r="";const a=Math.max(Math.round(t/n),2);for(let i=0;i<a;i++)r+=Math.round(e(i/(a-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Ab=2e4;function r2(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Ab;)t+=n,r=e.next(t);return t>=Ab?1/0:t}function Toe(e,t=100,n){const r=n({...e,keyframes:[0,t]}),a=Math.min(r2(r),Ab);return{type:"keyframes",ease:i=>r.next(a*i).value/t,duration:Ja(a)}}const Aoe=5;function uB(e,t,n){const r=Math.max(t-Aoe,0);return q8(n-e(r),t-r)}const mn={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},a1=.001;function Eoe({duration:e=mn.duration,bounce:t=mn.bounce,velocity:n=mn.velocity,mass:r=mn.mass}){let a,i;Lw(e<=$s(mn.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=_o(mn.minDamping,mn.maxDamping,o),e=_o(mn.minDuration,mn.maxDuration,Ja(e)),o<1?(a=u=>{const h=u*o,d=h*e,f=h-n,p=nS(u,o),y=Math.exp(-d);return a1-f/p*y},i=u=>{const d=u*o*e,f=d*n+n,p=Math.pow(o,2)*Math.pow(u,2)*e,y=Math.exp(-d),m=nS(Math.pow(u,2),o);return(-a(u)+a1>0?-1:1)*((f-p)*y)/m}):(a=u=>{const h=Math.exp(-u*e),d=(u-n)*e+1;return-a1+h*d},i=u=>{const h=Math.exp(-u*e),d=(n-u)*(e*e);return h*d});const l=5/e,c=Roe(a,i,l);if(e=$s(e),isNaN(c))return{stiffness:mn.stiffness,damping:mn.damping,duration:e};{const u=Math.pow(c,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const Ooe=12;function Roe(e,t,n){let r=n;for(let a=1;a<Ooe;a++)r=r-e(r)/t(r);return r}function nS(e,t){return e*Math.sqrt(1-t*t)}const Ioe=["duration","bounce"],Moe=["stiffness","damping","mass"];function kR(e,t){return t.some(n=>e[n]!==void 0)}function Doe(e){let t={velocity:mn.velocity,stiffness:mn.stiffness,damping:mn.damping,mass:mn.mass,isResolvedFromDuration:!1,...e};if(!kR(e,Moe)&&kR(e,Ioe))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),a=r*r,i=2*_o(.05,1,1-(e.bounce||0))*Math.sqrt(a);t={...t,mass:mn.mass,stiffness:a,damping:i}}else{const n=Eoe(e);t={...t,...n,mass:mn.mass},t.isResolvedFromDuration=!0}return t}function Eb(e=mn.visualDuration,t=mn.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:a}=n;const i=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],l={done:!1,value:i},{stiffness:c,damping:u,mass:h,duration:d,velocity:f,isResolvedFromDuration:p}=Doe({...n,velocity:-Ja(n.velocity||0)}),y=f||0,m=u/(2*Math.sqrt(c*h)),v=o-i,b=Ja(Math.sqrt(c/h)),x=Math.abs(v)<5;r||(r=x?mn.restSpeed.granular:mn.restSpeed.default),a||(a=x?mn.restDelta.granular:mn.restDelta.default);let w;if(m<1){const k=nS(b,m);w=j=>{const S=Math.exp(-m*b*j);return o-S*((y+m*b*v)/k*Math.sin(k*j)+v*Math.cos(k*j))}}else if(m===1)w=k=>o-Math.exp(-b*k)*(v+(y+b*v)*k);else{const k=b*Math.sqrt(m*m-1);w=j=>{const S=Math.exp(-m*b*j),N=Math.min(k*j,300);return o-S*((y+m*b*v)*Math.sinh(N)+k*v*Math.cosh(N))/k}}const _={calculatedDuration:p&&d||null,next:k=>{const j=w(k);if(p)l.done=k>=d;else{let S=k===0?y:0;m<1&&(S=k===0?$s(y):uB(w,k,j));const N=Math.abs(S)<=r,C=Math.abs(o-j)<=a;l.done=N&&C}return l.value=l.done?o:j,l},toString:()=>{const k=Math.min(r2(_),Ab),j=cB(S=>_.next(k*S).value,k,30);return k+"ms "+j},toTransition:()=>{}};return _}Eb.applyToOptions=e=>{const t=Toe(e,100,Eb);return e.ease=t.ease,e.duration=$s(t.duration),e.type="keyframes",e};function rS({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:a=10,bounceStiffness:i=500,modifyTarget:o,min:l,max:c,restDelta:u=.5,restSpeed:h}){const d=e[0],f={done:!1,value:d},p=N=>l!==void 0&&N<l||c!==void 0&&N>c,y=N=>l===void 0?c:c===void 0||Math.abs(l-N)<Math.abs(c-N)?l:c;let m=n*t;const v=d+m,b=o===void 0?v:o(v);b!==v&&(m=b-d);const x=N=>-m*Math.exp(-N/r),w=N=>b+x(N),_=N=>{const C=x(N),M=w(N);f.done=Math.abs(C)<=u,f.value=f.done?b:M};let k,j;const S=N=>{p(f.value)&&(k=N,j=Eb({keyframes:[f.value,y(f.value)],velocity:uB(w,N,f.value),damping:a,stiffness:i,restDelta:u,restSpeed:h}))};return S(0),{calculatedDuration:null,next:N=>{let C=!1;return!j&&k===void 0&&(C=!0,_(N),S(N)),k!==void 0&&N>=k?j.next(N-k):(!C&&_(N),f)}}}function $oe(e,t,n){const r=[],a=n||ko.mix||lB,i=e.length-1;for(let o=0;o<i;o++){let l=a(e[o],e[o+1]);if(t){const c=Array.isArray(t)?t[o]||ts:t;l=bg(c,l)}r.push(l)}return r}function dB(e,t,{clamp:n=!0,ease:r,mixer:a}={}){const i=e.length;if(Dl(i===t.length,"Both input and output ranges must be the same length","range-length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=$oe(t,r,a),c=l.length,u=h=>{if(o&&h<e[0])return t[0];let d=0;if(c>1)for(;d<e.length-2&&!(h<e[d+1]);d++);const f=sm(e[d],e[d+1],h);return l[d](f)};return n?h=>u(_o(e[0],e[i-1],h)):u}function Loe(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const a=sm(0,t,r);e.push(hn(n,1,a))}}function Foe(e){const t=[0];return Loe(t,e.length-1),t}function Boe(e,t){return e.map(n=>n*t)}function Woe(e,t){return e.map(()=>t||Q8).splice(0,e.length-1)}function mp({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const a=eoe(r)?r.map(yR):yR(r),i={done:!1,value:t[0]},o=Boe(n&&n.length===t.length?n:Foe(t),e),l=dB(o,t,{ease:Array.isArray(a)?a:Woe(t,a)});return{calculatedDuration:e,next:c=>(i.value=l(c),i.done=c>=e,i)}}const qoe=e=>e!==null;function a2(e,{repeat:t,repeatType:n="loop"},r,a=1){const i=e.filter(qoe),l=a<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!l||r===void 0?i[l]:r}const Uoe={decay:rS,inertia:rS,tween:mp,keyframes:mp,spring:Eb};function hB(e){typeof e.type=="string"&&(e.type=Uoe[e.type])}class s2{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const zoe=e=>e/100;class i2 extends s2{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,a;const{motionValue:n}=this.options;n&&n.updatedAt!==ha.now()&&this.tick(ha.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(a=(r=this.options).onStop)==null||a.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;hB(t);const{type:n=mp,repeat:r=0,repeatDelay:a=0,repeatType:i,velocity:o=0}=t;let{keyframes:l}=t;const c=n||mp;c!==mp&&typeof l[0]!="number"&&(this.mixKeyframes=bg(zoe,lB(l[0],l[1])),l=[0,100]);const u=c({...t,keyframes:l});i==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...l].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=r2(u));const{calculatedDuration:h}=u;this.calculatedDuration=h,this.resolvedDuration=h+a,this.totalDuration=this.resolvedDuration*(r+1)-a,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:a,mixKeyframes:i,mirroredGenerator:o,resolvedDuration:l,calculatedDuration:c}=this;if(this.startTime===null)return r.next(0);const{delay:u=0,keyframes:h,repeat:d,repeatType:f,repeatDelay:p,type:y,onUpdate:m,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-a/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const b=this.currentTime-u*(this.playbackSpeed>=0?1:-1),x=this.playbackSpeed>=0?b<0:b>a;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=a);let w=this.currentTime,_=r;if(d){const N=Math.min(this.currentTime,a)/l;let C=Math.floor(N),M=N%1;!M&&N>=1&&(M=1),M===1&&C--,C=Math.min(C,d+1),!!(C%2)&&(f==="reverse"?(M=1-M,p&&(M-=p/l)):f==="mirror"&&(_=o)),w=_o(0,1,M)*l}const k=x?{done:!1,value:h[0]}:_.next(w);i&&(k.value=i(k.value));let{done:j}=k;!x&&c!==null&&(j=this.playbackSpeed>=0?this.currentTime>=a:this.currentTime<=0);const S=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&j);return S&&y!==rS&&(k.value=a2(h,this.options,v,this.speed)),m&&m(k.value),S&&this.finish(),
760k}then(t,n){return this.finished.then(t,n)}get duration(){return Ja(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ja(t)}get time(){return Ja(this.currentTime)}set time(t){var n;t=$s(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(ha.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Ja(this.currentTime))}play(){var a,i;if(this.isStopped)return;const{driver:t=Poe,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),(i=(a=this.options).onPlay)==null||i.call(a);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(ha.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function Hoe(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const wc=e=>e*180/Math.PI,aS=e=>{const t=wc(Math.atan2(e[1],e[0]));return sS(t)},Voe={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:aS,rotateZ:aS,skewX:e=>wc(Math.atan(e[1])),skewY:e=>wc(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},sS=e=>(e=e%360,e<0&&(e+=360),e),jR=aS,SR=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),NR=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Goe={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:SR,scaleY:NR,scale:e=>(SR(e)+NR(e))/2,rotateX:e=>sS(wc(Math.atan2(e[6],e[5]))),rotateY:e=>sS(wc(Math.atan2(-e[2],e[0]))),rotateZ:jR,rotate:jR,skewX:e=>wc(Math.atan(e[4])),skewY:e=>wc(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function iS(e){return e.includes("scale")?1:0}function oS(e,t){if(!e||e==="none")return iS(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,a;if(n)r=Goe,a=n;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Voe,a=l}if(!a)return iS(t);const i=r[t],o=a[1].split(",").map(Koe);return typeof i=="function"?i(o):o[i]}const Yoe=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return oS(n,t)};function Koe(e){return parseFloat(e.trim())}const Uh=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],zh=new Set(Uh),CR=e=>e===qh||e===ke,Xoe=new Set(["x","y","z"]),Qoe=Uh.filter(e=>!Xoe.has(e));function Joe(e){const t=[];return Qoe.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Fc={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>oS(t,"x"),y:(e,{transform:t})=>oS(t,"y")};Fc.translateX=Fc.x;Fc.translateY=Fc.y;const Bc=new Set;let lS=!1,cS=!1,uS=!1;function fB(){if(cS){const e=Array.from(Bc).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const a=Joe(r);a.length&&(n.set(r,a),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const a=n.get(r);a&&a.forEach(([i,o])=>{var l;(l=r.getValue(i))==null||l.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}
vendor: 1,419 bytes, line 760
760cS=!1,lS=!1,Bc.forEach(e=>e.complete(uS)),Bc.clear()}function pB(){Bc.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(cS=!0)})}function Zoe(){uS=!0,pB(),fB(),uS=!1}class o2{constructor(t,n,r,a,i,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=a,this.element=i,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Bc.add(this),lS||(lS=!0,on.read(pB),on.resolveKeyframes(fB))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:a}=this;if(t[0]===null){const i=a==null?void 0:a.get(),o=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const l=r.readValue(n,o);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=o),a&&i===void 0&&a.set(t[0])}Hoe(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Bc.delete(this)}cancel(){this.state==="scheduled"&&(Bc.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const ele=e=>e.startsWith("--");function tle(e,t,n){ele(t)?e.style.setProperty(t,n):e.style[t]=n}const nle=KP(()=>window.ScrollTimeline!==void 0),rle={};function ale(e,t){const n=KP(e);return()=>rle[t]??n()}const mB=ale(()=>{try{document.createElement("div").animate({opacity:0}
760,{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Qf=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,PR={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Qf([0,.65,.55,1]),circOut:Qf([.55,0,1,.45]),backIn:Qf([.31,.01,.66,-.59]),backOut:Qf([.33,1.53,.69,.99])};function gB(e,t){if(e)return typeof e=="function"?mB()?cB(e,t):"ease-out":J8(e)?Qf(e):Array.isArray(e)?e.map(n=>gB(n,t)||PR.easeOut):PR[e]}function sle(e,t,n,{delay:r=0,duration:a=300,repeat:i=0,repeatType:o="loop",ease:l="easeOut",times:c}={},u=void 0){const h={[t]:n};c&&(h.offset=c);const d=gB(l,a);Array.isArray(d)&&(h.easing=d);const f={delay:r,duration:a,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),e.animate(h,f)}function yB(e){return typeof e=="function"&&"applyToOptions"in e}function ile({type:e,...t}){return yB(e)&&mB()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class ole extends s2{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:a,pseudoElement:i,allowFlatten:o=!1,finalKeyframe:l,onComplete:c}=t;this.isPseudoElement=!!i,this.allowFlatten=o,this.options=t,Dl(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=ile(t);this.animation=sle(n,r,a,u,i),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const h=a2(a,this.options,l,this.speed);this.updateMotionValue?this.updateMotionValue(h):tle(n,r,h),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,n;this.isPseudoElement||(n=(t=this.animation).commitStyles)==null||n.call(t)}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return Ja(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ja(t)}get time(){return Ja(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=$s(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&nle()?(this.animation.timeline=t,ts):n(this)}}const vB={anticipate:Y8,backInOut:G8,circInOut:X8};function lle(e){return e in vB}function cle(e){typeof e.ease=="string"&&lle(e.ease)&&(e.ease=vB[e.ease])}const TR=10;class ule extends ole{constructor(t){cle(t),hB(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:a,element:i,...o}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const l=new i2({...o,autoplay:!1}),c=$s(this.finishedTime??this.time);n.setWithVelocity(l.sample(c-TR).value,l.sample(c).value,TR),l.stop()}}const AR=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&($l.test(e)||e==="0")&&!e.startsWith("url("));function dle(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function hle(e,t,n,r){const a=e[0];if(a===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],o=AR(a,t),l=AR(i,t);return Lw(o===l,`You are trying to animate ${t} from "${a}" to "${i}". "${o?i:a}" is not an animatable value.`,"value-not-animatable"),!o||!l?!1:dle(e)||(n==="spring"||yB(n))&&r}function dS(e){e.duration=0,e.type="keyframes"}const fle=new Set(["opacity","clipPath","filter","transform"]),ple=KP(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function mle(e){var h;const{motionValue:t,name:n,repeatDelay:r,repeatType:a,damping:i,type:o}=e;if(!(((h=t==null?void 0:t.owner)==null?void 0:h.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=t.owner.getProps();return ple()&&n&&fle.has(n)&&(n!=="transform"||!u)&&!c&&!r&&a!=="mirror"&&i!==0&&o!=="inertia"}const gle=40;class yle extends s2{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:a=0,repeatDelay:i=0,repeatType:
760o="loop",keyframes:l,name:c,motionValue:u,element:h,...d}){var y;super(),this.stop=()=>{var m,v;this._animation&&(this._animation.stop(),(m=this.stopTimeline)==null||m.call(this)),(v=this.keyframeResolver)==null||v.cancel()},this.createdAt=ha.now();const f={autoplay:t,delay:n,type:r,repeat:a,repeatDelay:i,repeatType:o,name:c,motionValue:u,element:h,...d},p=(h==null?void 0:h.KeyframeResolver)||o2;this.keyframeResolver=new p(l,(m,v,b)=>this.onKeyframesResolved(m,v,f,!b),c,u,h),(y=this.keyframeResolver)==null||y.scheduleResolve()}onKeyframesResolved(t,n,r,a){this.keyframeResolver=void 0;const{name:i,type:o,velocity:l,delay:c,isHandoff:u,onUpdate:h}=r;this.resolvedAt=ha.now(),hle(t,i,o,l)||((ko.instantAnimations||!c)&&(h==null||h(a2(t,r,n))),t[0]=t[t.length-1],dS(r),r.repeat=0);const f={startTime:a?this.resolvedAt?this.resolvedAt-this.createdAt>gle?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},p=!u&&mle(f)?new ule({...f,element:f.motionValue.owner.current}):new i2(f);p.finished.then(()=>this.notifyFinished()).catch(ts),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),Zoe()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}const vle=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ble(e){const t=vle.exec(e);if(!t)return[,];const[,n,r,a]=t;return[`--${n??r}`,a]}const xle=4;function bB(e,t,n=1){Dl(n<=xle,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,a]=ble(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const o=i.trim();return F8(o)?parseFloat(o):o}return ZP(a)?bB(a,t,n+1):a}function l2(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const xB=new Set(["width","height","top","left","right","bottom",...Uh]),wle={test:e=>e==="auto",parse:e=>e},wB=e=>t=>t.test(e),_B=[qh,ke,bi,Uo,hoe,doe,wle],ER=e=>_B.find(wB(e));function _le(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||W8(e):!0}const kle=new Set(["brightness","contrast","saturate","opacity"]);function jle(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(e2)||[];if(!r)return e;const a=n.replace(r,"");let i=kle.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+a+")"}const Sle=/\b([a-z-]*)\(.*?\)/gu,hS={...$l,getAnimatableNone:e=>{const t=e.match(Sle);return t?t.map(jle).join(" "):e}},OR={...qh,transform:Math.round},Nle={rotate:Uo,rotateX:Uo,rotateY:Uo,rotateZ:Uo,scale:My,scaleX:My,scaleY:My,scaleZ:My,skew:Uo,skewX:Uo,skewY:Uo,distance:ke,translateX:ke,translateY:ke,translateZ:ke,x:ke,y:ke,z:ke,perspective:ke,transformPerspective:ke,opacity:im,originX:bR,originY:bR,originZ:ke},c2={borderWidth:ke,borderTopWidth:ke,borderRightWidth:ke,borderBottomWidth:ke,borderLeftWidth:ke,borderRadius:ke,radius:ke,borderTopLeftRadius:ke,borderTopRightRadius:ke,borderBottomRightRadius:ke,borderBottomLeftRadius:ke,width:ke,maxWidth:ke,height:ke,maxHeight:ke,top:ke,right:ke,bottom:ke,left:ke,inset:ke,insetBlock:ke,insetBlockStart:ke,insetBlockEnd:ke,insetInline:ke,insetInlineStart:ke,insetInlineEnd:ke,padding:ke,paddingTop:ke,paddingRight:ke,paddingBottom:ke,paddingLeft:ke,paddingBlock:ke,paddingBlockStart:ke,paddingBlockEnd:ke,paddingInline:ke,paddingInlineStart:ke,paddingInlineEnd:ke,margin:ke,marginTop:ke,marginRight:ke,marginBottom:ke,marginLeft:ke,marginBlock:ke,marginBlockStart:ke,marginBlockEnd:ke,marginInline:ke,marginInlineStart:ke,marginInlineEnd:ke,backgroundPositionX:ke,backgroundPositionY:ke,...Nle,zIndex:OR,fillOpacity:im,strokeOpacity:im,numOctaves:OR},Cle={...c2,color:Fn,backgroundColor:Fn,outlineColor:Fn,fill:Fn,stroke:Fn,borderColor:Fn,borderTopColor:Fn,borderRightColor:Fn,borderBottomColor:Fn,borderLeftColor:Fn,filter:hS,WebkitFilter:hS},kB=e=>Cle[e];function jB(e,t){let n=kB(e);return n!==hS&&(n=$l),n.getAnimatableNone?n.getAnimatableNone(t):void 0}
vendor: 1,658 bytes, line 760
760const Ple=new Set(["auto","none","0"]);function Tle(e,t,n){let r=0,a;for(;r<e.length&&!a;){const i=e[r];typeof i=="string"&&!Ple.has(i)&&om(i).values.length&&(a=e[r]),r++}if(a&&n)for(const i of t)e[i]=jB(n,a)}class Ale extends o2{constructor(t,n,r,a,i){super(t,n,r,a,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let u=t[c];if(typeof u=="string"&&(u=u.trim(),ZP(u))){const h=bB(u,n.current);h!==void 0&&(t[c]=h),c===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!xB.has(r)||t.length!==2)return;const[a,i]=t,o=ER(a),l=ER(i);if(o!==l)if(CR(o)&&CR(l))for(let c=0;c<t.length;c++){const u=t[c];typeof u=="string"&&(t[c]=parseFloat(u))}else Fc[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let a=0;a<t.length;a++)(t[a]===null||_le(t[a]))&&r.push(a);r.length&&Tle(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Fc[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const a=n[n.length-1];a!==void 0&&t.getValue(r,a).jump(a,!1)}measureEndState(){var l;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const a=t.getValue(n);a&&a.jump(this.measuredOrigin,!1);const i=r.length-1,o=r[i];r[i]=Fc[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(l=this.removedTransforms)!=null&&l.length&&this.removedTransforms.forEac
vendor: 4,126 bytes, line 760
760h(([c,u])=>{t.getValue(c).set(u)}),this.resolveNoneKeyframes()}}function Ele(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){const a=document.querySelectorAll(e);return a?Array.from(a):[]}return Array.from(e)}const SB=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function NB(e){return B8(e)&&"offsetHeight"in e}const RR=30,Ole=e=>!isNaN(parseFloat(e)),gp={current:void 0};class Rle{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var i;const a=ha.now();if(this.updatedAt!==a&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((i=this.events.change)==null||i.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=ha.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Ole(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new XP);const r=this.events[t].add(n);return t==="change"?()=>{r(),on.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return gp.current&&gp.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=ha.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>RR)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,RR);return q8(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function nu(e,t){return new Rle(e,t)}const{schedule:u2,cancel:dHe}=Z8(queueMicrotask,!1),ws={x:!1,y:!1};function CB(){return ws.x||ws.y}function Ile(e){return e==="x"||e==="y"?ws[e]?null:(ws[e]=!0,()=>{ws[e]=!1}):ws.x||ws.y?null:(ws.x=ws.y=!0,()=>{ws.x=ws.y=!1})}function PB(e,t){const n=Ele(e),r=new AbortController,a={passive:!0,...t,signal:r.signal};return[n,a,()=>r.abort()]}function IR(e){return!(e.pointerType==="touch"||CB())}function Mle(e,t,n={}){const[r,a,i]=PB(e,n),o=l=>{if(!IR(l))return;const{target:c}=l,u=t(c,l);if(typeof u!="function"||!c)return;const h=d=>{IR(d)&&(u(d),c.removeEventListener("pointerleave",h))};c.addEventListener("pointerleave",h,a)};return r.forEach(l=>{l.addEventListener("pointerenter",o,a)}),i}const TB=(e,t)=>t?e===t?!0:TB(e,t.parentElement):!1,d2=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Dle=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function $le(e){return Dle.has(e.tagName)||e.tabIndex!==-1}const Ov=new WeakSet;function MR(e){return t=>{t.key==="Enter"&&e(t)}}function s1(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Lle=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=MR(()=>
vendor: 4,399 bytes, lines 760-768
760{if(Ov.has(n))return;s1(n,"down");const a=MR(()=>{s1(n,"up")}),i=()=>s1(n,"cancel");n.addEventListener("keyup",a,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function DR(e){return d2(e)&&!CB()}function Fle(e,t,n={}){const[r,a,i]=PB(e,n),o=l=>{const c=l.currentTarget;if(!DR(l))return;Ov.add(c);const u=t(c,l),h=(p,y)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),Ov.has(c)&&Ov.delete(c),DR(p)&&typeof u=="function"&&u(p,{success:y})},d=p=>{h(p,c===window||c===document||n.useGlobalTarget||TB(c,p.target))},f=p=>{h(p,!1)};window.addEventListener("pointerup",d,a),window.addEventListener("pointercancel",f,a)};return r.forEach(l=>{(n.useGlobalTarget?window:l).addEventListener("pointerdown",o,a),NB(l)&&(l.addEventListener("focus",u=>Lle(u,a)),!$le(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),i}function AB(e){return B8(e)&&"ownerSVGElement"in e}function Ble(e){return AB(e)&&e.tagName==="svg"}function Wle(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],a=e[1+n],i=e[2+n],o=e[3+n],l=dB(a,i,o);return t?l(r):l}const _r=e=>!!(e&&e.getVelocity),qle=[..._B,Fn,$l],Ule=e=>qle.find(wB(e)),Fw=g.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function $R(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function zle(...e){return t=>{let n=!1;const r=e.map(a=>{const i=$R(a,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let a=0;a<r.length;a++){const i=r[a];typeof i=="function"?i():$R(e[a],null)}}}}function Hle(...e){return g.useCallback(zle(...e),e)}class Vle extends g.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,a=NB(r)&&r.offsetWidth||0,i=this.props.sizeRef.current;i.height=n.offsetHeight||0,i.width=n.offsetWidth||0,i.top=n.offsetTop,i.left=n.offsetLeft,i.right=a-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function Gle({children:e,isPresent:t,anchorX:n,root:r}){const a=g.useId(),i=g.useRef(null),o=g.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:l}=g.useContext(Fw),c=Hle(i,e==null?void 0:e.ref);return g.useInsertionEffect(()=>{const{width:u,height:h,top:d,left:f,right:p}=o.current;if(t||!i.current||!u||!h)return;const y=n==="left"?`left: ${f}`:`right: ${p}`;i.current.dataset.motionPopId=a;const m=document.createElement("style");l&&(m.nonce=l);const v=r??document.head;return v.appendChild(m),m.sheet&&m.sheet.insertRule(`
761          [data-motion-pop-id="${a}"] {
762            position: absolute !important;
763            width: ${u}px !important;
764            height: ${h}px !important;
765            ${y}px !important;
766            top: ${d}px !important;
767          }
768        `),()=>{v.contains(m)&&v.removeChild(m)}},[t]),s.jsx(Vle,{isPresent:t,childRef:i,sizeRef:o,children:g.cloneElement(e,{ref:c})})}const Yle=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:a,presenceAffectsLayout:i,mode:o,anchorX:l,root:c})=>{const u=yu(Kle),h=g.useId();let d=!0,f=g.useMemo(()=>(d=!1,{id:h,initial:t,isPresent:n,custom:a,onExitComplete:p=>{u.set(p,!0);for(const y of u.values())if(!y)return;r&&r()},register:p=>(u.set(p,!1),()=>u.delete(p))}),[n,u,r]);return i&&d&&(f={...f}),g.useMemo(()=>{u.forEach((p,y)=>u.set(y,!1))},[n]),g.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),o==="popLayout"&&(e=s.jsx(Gle,{isPresent:n,anchorX:l,root:c,children:e})),s.jsx($w.Provider,{value:f,children:e})};function Kle(){return new Map}function EB(e=!0){const t=g.useContext($w);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:a}=t,i=g.useId();g.useEffect(()=>{if(e)return a(i)},[e]);const o=g.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,o]:[!0]}const Dy=e=>e.key||"";function LR(e){const t=[];return g.Children.forEach(e,n=>{g.isValidElement(n)&&t.push(n)}),t}const Wr=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:a=!0,mode:i="sync",propagate:o=!1,anchorX:l="left",root:c})=>{const[u,h]=EB(o),d=g.useMemo(()=>LR(e),[e]),f=o&&!u?[]:d.map(Dy),p=g.useRef(!0),y=g.useRef(d),m=yu(()=>new Map),[v,b]=g.useState(d),[x,w]=g.useState(d);VP(()=>{p.current=!1,y.current=d;for(let j=0;j<x.length;j++){const S=Dy(x[j]);f.includes(S)?m.delete(S):m.get(S)!==!0&&m.set(S,!1)}},[x,f.length,f.join("-")]);const _=[];
vendor: 4,684 bytes, line 768
768if(d!==v){let j=[...d];for(let S=0;S<x.length;S++){const N=x[S],C=Dy(N);f.includes(C)||(j.splice(S,0,N),_.push(N))}return i==="wait"&&_.length&&(j=_),w(LR(j)),b(d),null}const{forceRender:k}=g.useContext(zP);return s.jsx(s.Fragment,{children:x.map(j=>{const S=Dy(j),N=o&&!u?!1:d===x||f.includes(S),C=()=>{if(m.has(S))m.set(S,!0);else return;let M=!0;m.forEach(O=>{O||(M=!1)}),M&&(k==null||k(),w(y.current),o&&(h==null||h()),r&&r())};return s.jsx(Yle,{isPresent:N,initial:!p.current||n?void 0:!1,custom:t,presenceAffectsLayout:a,mode:i,root:c,onExitComplete:N?void 0:C,anchorX:l,children:j},S)})})},OB=g.createContext({strict:!1}),FR={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},nh={};for(const e in FR)nh[e]={isEnabled:t=>FR[e].some(n=>!!t[n])};function Xle(e){for(const t in e)nh[t]={...nh[t],...e[t]}}const Qle=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Ob(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Qle.has(e)}let RB=e=>!Ob(e);function Jle(e){typeof e=="function"&&(RB=t=>t.startsWith("on")?!Ob(t):e(t))}try{Jle(require("@emotion/is-prop-valid").default)}catch{}function Zle(e,t,n){const r={};for(const a in e)a==="values"&&typeof e.values=="object"||(RB(a)||n===!0&&Ob(a)||!t&&!Ob(a)||e.draggable&&a.startsWith("onDrag"))&&(r[a]=e[a]);return r}const Bw=g.createContext({});function Ww(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function lm(e){return typeof e=="string"||Array.isArray(e)}const h2=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],f2=["initial",...h2];function qw(e){return Ww(e.animate)||f2.some(t=>lm(e[t]))}function IB(e){return!!(qw(e)||e.variants)}function ece(e,t){if(qw(e)){const{initial:n,animate:r}=e;return{initial:n===!1||lm(n)?n:void 0,animate:lm(r)?r:void 0}}return e.inherit!==!1?t:{}}function tce(e){const{initial:t,animate:n}=ece(e,g.useContext(Bw));return g.useMemo(()=>({initial:t,animate:n}),[BR(t),BR(n)])}function BR(e){return Array.isArray(e)?e.join(" "):e}function WR(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Sf={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ke.test(e))e=parseFloat(e);else return e;const n=WR(e,t.target.x),r=WR(e,t.target.y);return`${n}% ${r}%`}},nce={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,a=$l.parse(e);if(a.length>5)return r;const i=$l.createTransformer(e),o=typeof a[0]!="number"?1:0,l=n.x.scale*t.x,c=n.y.scale*t.y;a[0+o]/=l,a[1+o]/=c;const u=hn(l,c,.5);return typeof a[2+o]=="number"&&(a[2+o]/=u),typeof a[3+o]=="number"&&(a[3+o]/=u),i(a)}},fS={borderRadius:{...Sf,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Sf,borderTopRightRadius:Sf,borderBottomLeftRadius:Sf,borderBottomRightRadius:Sf,boxShadow:nce};function MB(e,{layout:t,layoutId:n}){return zh.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!fS[e]||e==="opacity")}const rce={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ace=Uh.length;function sce(e,t,n){let r="",a=!0;for(let i=0;i<ace;i++){const o=Uh[i],l=e[o];if(l===void 0)continue;let c=!0;if(typeof l=="number"?c=l===(o.startsWith("scale")?1:0):c=parseFloat(l)===0,!c||n){const u=SB(l,c2[o]);if(!c){a=!1;const h=rce[o]||o;r+=`${h}(${u}) `}n&&(t[o]=u)}}return r=r.trim(),n?r=n(t,a?"":r):a&&(r="none"),r}function p2(e,t,n){const{style:r,vars:a,transformOrigin:i}=e;let o=!1,l=!1;for(const c in t){const u=t[c];if(zh.has(c)){o=!0;continue}else if(tB(c)){a[c]=u;continue}else{const h=SB(u,c2[c]);c.startsWith("origin")?(l=!0,i[c]=h):r[c]=h}}if(t.transform||(o||n?r.transform=sce(t,e.transform,n):r.transform&&(r.transform="none")),l){const{originX:c="50%",originY:u="50%",originZ:h=0}=i;r.transformOrigin=`${c} ${u} ${h}`}}const m2=()=>({style:{},transform:{},transformOrigin:{},vars:{}});
vendor: 6,915 bytes, line 768
768function DB(e,t,n){for(const r in t)!_r(t[r])&&!MB(r,n)&&(e[r]=t[r])}function ice({transformTemplate:e},t){return g.useMemo(()=>{const n=m2();return p2(n,t,e),Object.assign({},n.vars,n.style)},[t])}function oce(e,t){const n=e.style||{},r={};return DB(r,n,e),Object.assign(r,ice(e,t)),r}function lce(e,t){const n={},r=oce(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const cce={offset:"stroke-dashoffset",array:"stroke-dasharray"},uce={offset:"strokeDashoffset",array:"strokeDasharray"};function dce(e,t,n=1,r=0,a=!0){e.pathLength=1;const i=a?cce:uce;e[i.offset]=ke.transform(-r);const o=ke.transform(t),l=ke.transform(n);e[i.array]=`${o} ${l}`}function $B(e,{attrX:t,attrY:n,attrScale:r,pathLength:a,pathSpacing:i=1,pathOffset:o=0,...l},c,u,h){if(p2(e,l,u),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=(h==null?void 0:h.transformBox)??"fill-box",delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),a!==void 0&&dce(d,a,i,o,!1)}const LB=()=>({...m2(),attrs:{}}),FB=e=>typeof e=="string"&&e.toLowerCase()==="svg";function hce(e,t,n,r){const a=g.useMemo(()=>{const i=LB();return $B(i,t,FB(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};DB(i,e.style,e),a.style={...i,...a.style}}return a}const fce=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function g2(e){return typeof e!="string"||e.includes("-")?!1:!!(fce.indexOf(e)>-1||/[A-Z]/u.test(e))}function pce(e,t,n,{latestValues:r},a,i=!1,o){const c=(o??g2(e)?hce:lce)(t,r,a,e),u=Zle(t,typeof e=="string",i),h=e!==g.Fragment?{...u,...c,ref:n}:{},{children:d}=t,f=g.useMemo(()=>_r(d)?d.get():d,[d]);return g.createElement(e,{...h,children:f})}function qR(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function y2(e,t,n,r){if(typeof t=="function"){const[a,i]=qR(r);t=t(n!==void 0?n:e.custom,a,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[a,i]=qR(r);t=t(n!==void 0?n:e.custom,a,i)}return t}function Rv(e){return _r(e)?e.get():e}function mce({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,a){return{latestValues:gce(n,r,a,e),renderState:t()}}function gce(e,t,n,r){const a={},i=r(e,{});for(const f in i)a[f]=Rv(i[f]);let{initial:o,animate:l}=e;const c=qw(e),u=IB(e);t&&u&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),l===void 0&&(l=t.animate));let h=n?n.initial===!1:!1;h=h||o===!1;const d=h?l:o;if(d&&typeof d!="boolean"&&!Ww(d)){const f=Array.isArray(d)?d:[d];for(let p=0;p<f.length;p++){const y=y2(e,f[p]);if(y){const{transitionEnd:m,transition:v,...b}=y;for(const x in b){let w=b[x];if(Array.isArray(w)){const _=h?w.length-1:0;w=w[_]}w!==null&&(a[x]=w)}for(const x in m)a[x]=m[x]}}}return a}const BB=e=>(t,n)=>{const r=g.useContext(Bw),a=g.useContext($w),i=()=>mce(e,t,r,a);return n?i():yu(i)};function v2(e,t,n){var i;const{style:r}=e,a={};for(const o in r)(_r(r[o])||t.style&&_r(t.style[o])||MB(o,e)||((i=n==null?void 0:n.getValue(o))==null?void 0:i.liveStyle)!==void 0)&&(a[o]=r[o]);return a}const yce=BB({scrapeMotionValuesFromProps:v2,createRenderState:m2});function WB(e,t,n){const r=v2(e,t,n);for(const a in e)if(_r(e[a])||_r(t[a])){const i=Uh.indexOf(a)!==-1?"attr"+a.charAt(0).toUpperCase()+a.substring(1):a;r[i]=e[a]}return r}const vce=BB({scrapeMotionValuesFromProps:WB,createRenderState:LB}),bce=Symbol.for("motionComponentSymbol");function nd(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function xce(e,t,n){return g.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):nd(n)&&(n.current=r))},[t])}const b2=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),wce="framerAppearId",qB="data-"+b2(wce),UB=g.createContext({});function _ce(e,t,n,r,a,i){var v,b;const{visualElement:o}=g.useContext(Bw),l=g.useContext(OB),c=g.useContext($w),u=g.useContext(Fw).reducedMotion,h=g.useRef(null);r=r||l.renderer,!h.current&&r&&(h.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,isSVG:i}));const d=h.current,f=g.useContext(UB);d&&!d.projection&&a&&(d.type==="html"||d.type==="svg")&&kce(h.current,n,a,f);const p=g.useRef(!1);g.useInsertionEffect(()=>{d&&p.current&&d.update(n,c)});const y=n[qB],m=g.useRef(!!y&&!((v=window.MotionHandoffIsComplete)!=null&&v.call(window,y))&&((b=window.MotionHasOptimisedAnimation)==null?void 0:b.call(window,y)));return VP(()=>{d&&(p.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),m.current&&d.animationState&&d.animationState.animateChanges())}),g.useEffect(()=>{d&&(!m.current&&d.animationState&&d.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{var x;(x=window.MotionHandoffMarkAsComplete)==null||x.call(window,y)}),m.current=!1),d.enteringChildren=void 0)}),d}function kce(e,t,n,r){const{layoutId:a,layout:i,drag:o,dragConstraints:l,layoutScroll:c,layoutRoot:u,layoutCrossfade:h}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:zB(e.parent)),e.projection.setOptions({layoutId:a,layout:i,alwaysMeasureLayout:!!o||l&&nd(l),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:h,layoutScroll:c,layoutRoot:u})}function zB(e){if(e)return e.options.allowProjection!==!1?e.projection:zB(e.parent)}function i1(e,{forwardMotionProps:t=!1,type:n}={},r,a){r&&Xle(r);const i=n?n==="svg":g2(e),o=i?vce:yce;function l(u,h){let d;const f={...g.useContext(Fw),...u,layoutId:jce(u)},{isStatic:p}=f,y=tce(u),m=o(u,p);if(!p&&HP){Sce();const v=Nce(f);d=v.MeasureLayout,y.visualElement=_ce(e,m,f,a,v.ProjectionNode,i)}return s.jsxs(Bw.Provider,{value:y,children:[d&&y.visualElement?s.jsx(d,{visualElement:y.visualElement,...f}):null,pce(e,u,xce(m,y.visualElement,h),m,p,t,i)]})}l.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const c=g.forwardRef(l);return c[bce]=e,c}function jce({layoutId:e}){const t=g.useContext(zP).id;return t&&e!==void 0?t+"-"+e:e}function Sce(e,t){g.useContext(OB).strict}function Nce(e){const{drag:t,layout:n}=nh;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}
vendor: 9,658 bytes, line 768
768function Cce(e,t){if(typeof Proxy>"u")return i1;const n=new Map,r=(i,o)=>i1(i,o,e,t),a=(i,o)=>r(i,o);return new Proxy(a,{get:(i,o)=>o==="create"?r:(n.has(o)||n.set(o,i1(o,void 0,e,t)),n.get(o))})}function HB({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Pce({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Tce(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function o1(e){return e===void 0||e===1}function pS({scale:e,scaleX:t,scaleY:n}){return!o1(e)||!o1(t)||!o1(n)}function lc(e){return pS(e)||VB(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function VB(e){return UR(e.x)||UR(e.y)}function UR(e){return e&&e!=="0%"}function Rb(e,t,n){const r=e-n,a=t*r;return n+a}function zR(e,t,n,r,a){return a!==void 0&&(e=Rb(e,a,r)),Rb(e,n,r)+t}function mS(e,t=0,n=1,r,a){e.min=zR(e.min,t,n,r,a),e.max=zR(e.max,t,n,r,a)}function GB(e,{x:t,y:n}){mS(e.x,t.translate,t.scale,t.originPoint),mS(e.y,n.translate,n.scale,n.originPoint)}const HR=.999999999999,VR=1.0000000000001;function Ace(e,t,n,r=!1){const a=n.length;if(!a)return;t.x=t.y=1;let i,o;for(let l=0;l<a;l++){i=n[l],o=i.projectionDelta;const{visualElement:c}=i.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&ad(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,GB(e,o)),r&&lc(i.latestValues)&&ad(e,i.latestValues))}t.x<VR&&t.x>HR&&(t.x=1),t.y<VR&&t.y>HR&&(t.y=1)}function rd(e,t){e.min=e.min+t,e.max=e.max+t}function GR(e,t,n,r,a=.5){const i=hn(e.min,e.max,a);mS(e,t,n,i,r)}function ad(e,t){GR(e.x,t.x,t.scaleX,t.scale,t.originX),GR(e.y,t.y,t.scaleY,t.scale,t.originY)}function YB(e,t){return HB(Tce(e.getBoundingClientRect(),t))}function Ece(e,t,n){const r=YB(e,n),{scroll:a}=t;return a&&(rd(r.x,a.offset.x),rd(r.y,a.offset.y)),r}const YR=()=>({translate:0,scale:1,origin:0,originPoint:0}),sd=()=>({x:YR(),y:YR()}),KR=()=>({min:0,max:0}),Xn=()=>({x:KR(),y:KR()}),gS={current:null},KB={current:!1};function Oce(){if(KB.current=!0,!!HP)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>gS.current=e.matches;e.addEventListener("change",t),t()}else gS.current=!1}const Rce=new WeakMap;function Ice(e,t,n){for(const r in t){const a=t[r],i=n[r];if(_r(a))e.addValue(r,a);else if(_r(i))e.addValue(r,nu(a,{owner:e}));else if(i!==a)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(a):o.hasAnimated||o.set(a)}else{const o=e.getStaticValue(r);e.addValue(r,nu(o!==void 0?o:a,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const XR=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Mce{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:a,blockInitialAnimation:i,visualState:o},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=o2,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=ha.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,on.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=a,this.options=l,this.blockInitialAnimation=!!i,this.isControllingVariants=qw(n),this.isVariantNode=IB(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:h,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const p=d[f];c[f]!==void 0&&_r(p)&&p.set(c[f])}}mount(t){var n;this.current=t,Rce.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,a)=>this.bindToMotionValue(a,r)),KB.current||Oce(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:gS.current,(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var t;this.projection&&this.projection.unmount(),jo(this.notifyUpdate),jo(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=zh.has(t);r&&this.onBindTransform&&this.onBindTransform();const a=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&on.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{a(),i&&i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in nh){const n=nh[t];if(!n)continue;const{isEnabled:r,Feature:a}=n;if(!this.features[t]&&a&&r(this.props)&&(this.features[t]=new a(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Xn()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<XR.length;r++){const a=XR[r];this.propEventSubscriptions[a]&&(this.propEventSubscriptions[a](),delete this.propEventSubscriptions[a]);const i="on"+a,o=t[i];o&&(this.propEventSubscriptions[a]=this.on(a,o))}this.prevMotionValues=Ice(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=nu(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(F8(r)||W8(r))?r=parseFloat(r):!Ule(r)&&$l.test(n)&&(r=jB(t,n)),this.setBaseTarget(t,_r(r)?r.get():r)),_r(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var i;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=y2(this.props,n,(i=this.presenceContext)==null?void 0:i.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!_r(a)?a:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new XP),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){u2.render(this.render)}}class XB extends Mce{constructor(){super(...arguments),this.KeyframeResolver=Ale}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;_r(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function QB(e,{style:t,vars:n},r,a){const i=e.style;let o;
768for(o in t)i[o]=t[o];a==null||a.applyProjectionStyles(i,r);for(o in n)i.setProperty(o,n[o])}function Dce(e){return window.getComputedStyle(e)}class $ce extends XB{constructor(){super(...arguments),this.type="html",this.renderInstance=QB}readValueFromInstance(t,n){var r;if(zh.has(n))return(r=this.projection)!=null&&r.isProjecting?iS(n):Yoe(t,n);{const a=Dce(t),i=(tB(n)?a.getPropertyValue(n):a[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return YB(t,n)}build(t,n,r){p2(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return v2(t,n,r)}}const JB=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Lce(e,t,n,r){QB(e,t,void 0,r);for(const a in t.attrs)e.setAttribute(JB.has(a)?a:b2(a),t.attrs[a])}class Fce extends XB{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Xn}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(zh.has(n)){const r=kB(n);return r&&r.default||0}return n=JB.has(n)?n:b2(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return WB(t,n,r)}build(t,n,r){$B(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,a){Lce(t,n,r,a)}mount(t){this.isSVGTag=FB(t.tagName),super.mount(t)}}const Bce=(e,t)=>t.isSVG??g2(e)?new Fce(t):new $ce(t,{allowProjection:e!==g.Fragment});
vendor: 4,095 bytes, line 768
768function jd(e,t,n){const r=e.getProps();return y2(r,t,n!==void 0?n:r.custom,e)}const yS=e=>Array.isArray(e);function Wce(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,nu(n))}function qce(e){return yS(e)?e[e.length-1]||0:e}function Uce(e,t){const n=jd(e,t);let{transitionEnd:r={},transition:a={},...i}=n||{};i={...i,...r};for(const o in i){const l=qce(i[o]);Wce(e,o,l)}}function zce(e){return!!(_r(e)&&e.add)}function vS(e,t){const n=e.getValue("willChange");if(zce(n))return n.add(t);if(!n&&ko.WillChange){const r=new ko.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function ZB(e){return e.props[qB]}const Hce=e=>e!==null;function Vce(e,{repeat:t,repeatType:n="loop"},r){const a=e.filter(Hce),i=t&&n!=="loop"&&t%2===1?0:a.length-1;return!i||r===void 0?a[i]:r}const Gce={type:"spring",stiffness:500,damping:25,restSpeed:10},Yce=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Kce={type:"keyframes",duration:.8},Xce={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Qce=(e,{keyframes:t})=>t.length>2?Kce:zh.has(e)?e.startsWith("scale")?Yce(t[1]):Gce:Xce;function Jce({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:a,repeat:i,repeatType:o,repeatDelay:l,from:c,elapsed:u,...h}){return!!Object.keys(h).length}const x2=(e,t,n,r={},a,i)=>o=>{const l=l2(r,e)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-$s(c);const h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:f=>{t.set(f),l.onUpdate&&l.onUpdate(f)},onComplete:()=>{o(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:i?void 0:a};Jce(l)||Object.assign(h,Qce(e,h)),h.duration&&(h.duration=$s(h.duration)),h.repeatDelay&&(h.repeatDelay=$s(h.repeatDelay)),h.from!==void 0&&(h.keyframes[0]=h.from);let d=!1;if((h.type===!1||h.duration===0&&!h.repeatDelay)&&(dS(h),h.delay===0&&(d=!0)),(ko.instantAnimations||ko.skipAnimations)&&(d=!0,dS(h),h.delay=0),h.allowFlatten=!l.type&&!l.ease,d&&!i&&t.get()!==void 0){const f=Vce(h.keyframes,l);if(f!==void 0){on.update(()=>{h.onUpdate(f),h.onComplete()});return}}return l.isSync?new i2(h):new yle(h)};function Zce({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function eW(e,t,{delay:n=0,transitionOverride:r,type:a}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:o,...l}=t;r&&(i=r);const c=[],u=a&&e.animationState&&e.animationState.getState()[a];for(const h in l){const d=e.getValue(h,e.latestValues[h]??null),f=l[h];if(f===void 0||u&&Zce(u,h))continue;const p={delay:n,...l2(i||{},h)},y=d.get();if(y!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===y&&!p.velocity)continue;let m=!1;if(window.MotionHandoffAnimation){const b=ZB(e);if(b){const x=window.MotionHandoffAnimation(b,h,on);x!==null&&(p.startTime=x,m=!0)}}vS(e,h),d.start(x2(h,d,f,e.shouldReduceMotion&&xB.has(h)?{type:!1}:p,e,m));const v=d.animation;v&&c.push(v)}return o&&Promise.all(c).then(()=>{on.update(()=>{o&&Uce(e,o)})}),c}function tW(e,t,n,r=0,a=1){const i=Array.from(e).sort((u,h)=>u.sortNodePosition(h)).indexOf(t),o=e.size,l=(o-1)*r;return typeof n=="function"?n(i,o):a===1?i*r:l-i*r}function bS(e,t,n={}){var c;const r=jd(e,t,n.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:a=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(a=n.transitionOverride);const i=r?()=>Promise.all(eW(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:h=0,staggerChildren:d,staggerDirection:f}=a;return eue(e,t,u,h,d,f,n)}:()=>Promise.resolve(),{when:l}=a;if(l){const[u,h]=l==="beforeChildren"?[i,o]:[o,i];return u().then(()=>h())}else return Promise.all([i(),o(n.delay)])}function eue(e,t,n=0,r=0,a=0,i=1,o){const l=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),l.push(bS(c,t,{...o,delay:n+(typeof r=="function"?0:r)+tW(e.variantChildren,c,r,a,i)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(l)}function tue(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const a=t.map(i=>bS(e,i,n));r=Promise.all(a)}
vendor: 17,039 bytes, line 768
768else if(typeof t=="string")r=bS(e,t,n);else{const a=typeof t=="function"?jd(e,t,n.custom):t;r=Promise.all(eW(e,a,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function nW(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const nue=f2.length;function rW(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?rW(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<nue;n++){const r=f2[n],a=e.props[r];(lm(a)||a===!1)&&(t[r]=a)}return t}const rue=[...h2].reverse(),aue=h2.length;function sue(e){return t=>Promise.all(t.map(({animation:n,options:r})=>tue(e,n,r)))}function iue(e){let t=sue(e),n=QR(),r=!0;const a=c=>(u,h)=>{var f;const d=jd(e,h,c==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(d){const{transition:p,transitionEnd:y,...m}=d;u={...u,...m,...y}}return u};function i(c){t=c(e)}function o(c){const{props:u}=e,h=rW(e.parent)||{},d=[],f=new Set;let p={},y=1/0;for(let v=0;v<aue;v++){const b=rue[v],x=n[b],w=u[b]!==void 0?u[b]:h[b],_=lm(w),k=b===c?x.isActive:null;k===!1&&(y=v);let j=w===h[b]&&w!==u[b]&&_;if(j&&r&&e.manuallyAnimateOnMount&&(j=!1),x.protectedKeys={...p},!x.isActive&&k===null||!w&&!x.prevProp||Ww(w)||typeof w=="boolean")continue;const S=oue(x.prevProp,w);let N=S||b===c&&x.isActive&&!j&&_||v>y&&_,C=!1;const M=Array.isArray(w)?w:[w];let O=M.reduce(a(b),{});k===!1&&(O={});const{prevResolvedValues:D={}}=x,$={...D,...O},R=A=>{N=!0,f.has(A)&&(C=!0,f.delete(A)),x.needsAnimating[A]=!0;const E=e.getValue(A);E&&(E.liveStyle=!1)};for(const A in $){const E=O[A],T=D[A];if(p.hasOwnProperty(A))continue;let L=!1;yS(E)&&yS(T)?L=!nW(E,T):L=E!==T,L?E!=null?R(A):f.add(A):E!==void 0&&f.has(A)?R(A):x.protectedKeys[A]=!0}x.prevProp=w,x.prevResolvedValues=O,x.isActive&&(p={...p,...O}),r&&e.blockInitialAnimation&&(N=!1);const I=j&&S;N&&(!I||C)&&d.push(...M.map(A=>{const E={type:b};if(typeof A=="string"&&r&&!I&&e.manuallyAnimateOnMount&&e.parent){const{parent:T}=e,L=jd(T,A);if(T.enteringChildren&&L){const{delayChildren:B}=L.transition||{};E.delay=tW(T.enteringChildren,e,B)}}return{animation:A,options:E}}))}if(f.size){const v={};if(typeof u.initial!="boolean"){const b=jd(e,Array.isArray(u.initial)?u.initial[0]:u.initial);b&&b.transition&&(v.transition=b.transition)}f.forEach(b=>{const x=e.getBaseTarget(b),w=e.getValue(b);w&&(w.liveStyle=!0),v[b]=x??null}),d.push({animation:v})}let m=!!d.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(d):Promise.resolve()}function l(c,u){var d;if(n[c].isActive===u)return Promise.resolve();(d=e.variantChildren)==null||d.forEach(f=>{var p;return(p=f.animationState)==null?void 0:p.setActive(c,u)}),n[c].isActive=u;const h=o(c);for(const f in n)n[f].protectedKeys={};return h}return{animateChanges:o,setActive:l,setAnimateFunction:i,getState:()=>n,reset:()=>{n=QR()}}}function oue(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!nW(t,e):!1}function tc(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function QR(){return{animate:tc(!0),whileInView:tc(),whileHover:tc(),whileTap:tc(),whileDrag:tc(),whileFocus:tc(),exit:tc()}}class zl{constructor(t){this.isMounted=!1,this.node=t}update(){}}class lue extends zl{constructor(t){super(t),t.animationState||(t.animationState=iue(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ww(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let cue=0;class uue extends zl{constructor(){super(...arguments),this.id=cue++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const a=this.node.animationState.setActive("exit",!t);n&&!t&&a.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const due={animation:{Feature:lue},exit:{Feature:uue}};function cm(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function _g(e){return{point:{x:e.pageX,y:e.pageY}}}const hue=e=>t=>d2(t)&&e(t,_g(t));function yp(e,t,n,r){return cm(e,t,hue(n),r)}const aW=1e-4,fue=1-aW,pue=1+aW,sW=.01,mue=0-sW,gue=0+sW;function Xr(e){return e.max-e.min}function yue(e,t,n){return Math.abs(e-t)<=n}function JR(e,t,n,r=.5){e.origin=r,e.originPoint=hn(t.min,t.max,e.origin),e.scale=Xr(n)/Xr(t),e.translate=hn(n.min,n.max,e.origin)-e.originPoint,(e.scale>=fue&&e.scale<=pue||isNaN(e.scale))&&(e.scale=1),(e.translate>=mue&&e.translate<=gue||isNaN(e.translate))&&(e.translate=0)}function vp(e,t,n,r){JR(e.x,t.x,n.x,r?r.originX:void 0),JR(e.y,t.y,n.y,r?r.originY:void 0)}function ZR(e,t,n){e.min=n.min+t.min,e.max=e.min+Xr(t)}function vue(e,t,n){ZR(e.x,t.x,n.x),ZR(e.y,t.y,n.y)}function eI(e,t,n){e.min=t.min-n.min,e.max=e.min+Xr(t)}function Ib(e,t,n){eI(e.x,t.x,n.x),eI(e.y,t.y,n.y)}function za(e){return[e("x"),e("y")]}const iW=({current:e})=>e?e.ownerDocument.defaultView:null,tI=(e,t)=>Math.abs(e-t);function bue(e,t){const n=tI(e.x,t.x),r=tI(e.y,t.y);return Math.sqrt(n**2+r**2)}class oW{constructor(t,n,{transformPagePoint:r,contextWindow:a=window,dragSnapToOrigin:i=!1,distanceThreshold:o=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=c1(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,y=bue(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!p&&!y)return;const{point:m}=f,{timestamp:v}=xr;this.history.push({...m,timestamp:v});const{onStart:b,onMove:x}=this.handlers;p||(b&&b(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,f)},this.handlePointerMove=(f,p)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=l1(p,this.transformPagePoint),on.update(this.updatePoint,!0)},this.handlePointerUp=(f,p)=>{this.end();const{onEnd:y,onSessionEnd:m,resumeAnimation:v}=this.handlers;if(this.dragSnapToOrigin&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=c1(f.type==="pointercancel"?this.lastMoveEventInfo:l1(p,this.transformPagePoint),this.history);this.startEvent&&y&&y(f,b),m&&m(f,b)},!d2(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=a||window;const l=_g(t),c=l1(l,this.transformPagePoint),{point:u}=c,{timestamp:h}=xr;this.history=[{...u,timestamp:h}];const{onSessionStart:d}=n;d&&d(t,c1(c,this.history)),this.removeListeners=bg(yp(this.contextWindow,"pointermove",this.handlePointerMove),yp(this.contextWindow,"pointerup",this.handlePointerUp),yp(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),jo(this.updatePoint)}}function l1(e,t){return t?{point:t(e.point)}:e}function nI(e,t){return{x:e.x-t.x,y:e.y-t.y}}function c1({point:e},t){return{point:e,delta:nI(e,lW(t)),offset:nI(e,xue(t)),velocity:wue(t,.1)}}function xue(e){return e[0]}function lW(e){return e[e.length-1]}function wue(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const a=lW(e);for(;n>=0&&(r=e[n],!(a.timestamp-r.timestamp>$s(t)));)n--;if(!r)return{x:0,y:0};const i=Ja(a.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const o={x:(a.x-r.x)/i,y:(a.y-r.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function _ue(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?hn(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?hn(n,e,r.max):Math.min(e,n)),e}function rI(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function kue(e,{top:t,left:n,bottom:r,right:a}){return{x:rI(e.x,n,a),y:rI(e.y,t,r)}}function aI(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function jue(e,t){return{x:aI(e.x,t.x),y:aI(e.y,t.y)}}function Sue(e,t){let n=.5;const r=Xr(e),a=Xr(t);return a>r?n=sm(t.min,t.max-r,e.min):r>a&&(n=sm(e.min,e.max-a,t.min)),_o(0,1,n)}function Nue(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const xS=.35;function Cue(e=xS){return e===!1?e=0:e===!0&&(e=xS),{x:sI(e,"left","right"),y:sI(e,"top","bottom")}}function sI(e,t,n){return{min:iI(e,t),max:iI(e,n)}}function iI(e,t){return typeof e=="number"?e:e[t]||0}const Pue=new WeakMap;class Tue{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Xn(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:a}=this.visualElement;if(a&&a.isPresent===!1)return;const i=d=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(_g(d).point)},o=(d,f)=>{const{drag:p,dragPropagation:y,onDragStart:m}=this.getProps();if(p&&!y&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Ile(p),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),za(b=>{let x=this.getAxisMotionValue(b).get()||0;if(bi.test(x)){const{projection:w}=this.visualElement;if(w&&w.layout){const _=w.layout.layoutBox[b];_&&(x=Xr(_)*(parseFloat(x)/100))}}this.originPoint[b]=x}),m&&on.postRender(()=>m(d,f)),vS(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:p,dragDirectionLock:y,onDirectionLock:m,onDrag:v}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:b}=f;if(y&&this.currentDirection===null){this.currentDirection=Aue(b),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",f.point,b),this.updateAxis("y",f.point,b),this.visualElement.render(),v&&v(d,f)},c=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>za(d=>{var f;return this.getAnimationState(d)==="paused"&&((f=this.getAxisMotionValue(d).animation)==null?void 0:f.play())}),{dragSnapToOrigin:h}=this.getProps();this.panSession=new oW(t,{onSessionStart:i,onStart:o,onMove:l,onSessionEnd:c,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:h,distanceThreshold:r,contextWindow:iW(this.visualElement)})}stop(t,n){const r=t||this.latestPointerEvent,a=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!a||!r)return;const{velocity:o}=a;this.startAnimation(o);const{onDragEnd:l}=this.getProps();l&&on.postRender(()=>l(r,a))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:a}=this.getProps();if(!r||!$y(t,a,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=_ue(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){var i;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(i=this.visualElement.projection)==null?void 0:i.layout,a=this.constraints;t&&nd(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=kue(r.layoutBox,t):this.constraints=!1,this.elastic=Cue(n),a!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&za(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Nue(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!nd(t))return!1;const r=t.current;Dl(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:a}=this.visualElement;if(!a||!a.layout)return!1;const i=Ece(r,a.root,this.visualElement.getTransformPagePoint());let o=jue(a.layout.layoutBox,i);if(n){const l=n(Pce(o));this.hasMutatedConstraints=!!l,l&&(o=HB(l))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:a,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},u=za(h=>{if(!$y(h,n,this.currentDirection))return;let d=c&&c[h]||{};o&&(d={min:0,max:0});const f=a?200:1e6,p=a?40:1e7,y={type:"inertia",velocity:r?t[h]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(h,y)});return Promise.all(u).then(l)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return vS(this.visualElement,t),r.start(x2(t,r,0,n,this.visualElement,!1))}stopAnimation(){za(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){za(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),a=r[n];return a||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){za(n=>{const{drag:r}=this.getProps();if(!$y(n,r,this.currentDirection))return;const{projection:a}=this.visualElement,i=this.getAxisMotionValue(n);if(a&&a.layout){const{min:o,max:l}=a.layout.layoutBox[n];i.set(t[n]-hn(o,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!nd(n)||!r||!this.constraints)return;this.stopAnimation();const a={x:0,y:0};za(o=>{const l=this.getAxisMotionValue(o);if(l&&this.constraints!==!1){const c=l.get();a[o]=Sue({min:c,max:c},this.constraints[o])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),za(o=>{if(!$y(o,t,null))return;const l=this.getAxisMotionValue(o),{min:c,max:u}=this.constraints[o];l.set(hn(c,u,a[o]))})}addListeners(){if(!this.visualElement.current)return;Pue.set(this.visualElement,this);const t=this.visualElement.current,n=yp(t,"pointerdown",c=>{const{drag:u,dragListener:h=!0}=this.getProps();u&&h&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();nd(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:a}=this.visualElement,i=a.addEventListener("measure",r);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),on.read(r);const o=cm(window,"resize",()=>this.scalePositionWithinConstraints()),l=a.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(za(h=>{const d=this.getAxisMotionValue(h);d&&(this.originPoint[h]+=c[h].translate,d.set(d.get()+c[h].translate))}),this.visualElement.render())});return()=>{o(),n(),i(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:a=!1,dragConstraints:i=!1,dragElastic:o=xS,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:a,dragConstraints:i,dragElastic:o,dragMomentum:l}}}function $y(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Aue(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Eue extends zl{constructor(t){super(t),this.removeGroupControls=ts,this.removeListeners=ts,this.controls=new Tue(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ts}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners()}}const oI=e=>(t,n)=>{e&&on.postRender(()=>e(t,n))};class Oue extends zl{constructor(){super(...arguments),this.removePointerDownListener=ts}onPointerDown(t){this.session=new oW(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:iW(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:a}=this.node.getProps();
vendor: 22,035 bytes, line 768
768return{onSessionStart:oI(t),onStart:oI(n),onMove:r,onEnd:(i,o)=>{delete this.session,a&&on.postRender(()=>a(i,o))}}}mount(){this.removePointerDownListener=yp(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Iv={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let u1=!1;class Rue extends g.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:a}=this.props,{projection:i}=t;i&&(n.group&&n.group.add(i),r&&r.register&&a&&r.register(i),u1&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Iv.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:a,isPresent:i}=this.props,{projection:o}=r;return o&&(o.isPresent=i,u1=!0,a||t.layoutDependency!==n||n===void 0||t.isPresent!==i?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||on.postRender(()=>{const l=o.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),u2.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:a}=t;u1=!0,a&&(a.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(a),r&&r.deregister&&r.deregister(a))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function cW(e){const[t,n]=EB(),r=g.useContext(zP);return s.jsx(Rue,{...e,layoutGroup:r,switchLayoutGroup:g.useContext(UB),isPresent:t,safeToRemove:n})}function Iue(e,t,n){const r=_r(e)?e:nu(e);return r.start(x2("",r,t,n)),r.animation}const Mue=(e,t)=>e.depth-t.depth;class Due{constructor(){this.children=[],this.isDirty=!1}add(t){GP(this.children,t),this.isDirty=!0}remove(t){YP(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Mue),this.isDirty=!1,this.children.forEach(t)}}function $ue(e,t){const n=ha.now(),r=({timestamp:a})=>{const i=a-n;i>=t&&(jo(r),e(i-t))};return on.setup(r,!0),()=>jo(r)}const uW=["TopLeft","TopRight","BottomLeft","BottomRight"],Lue=uW.length,lI=e=>typeof e=="string"?parseFloat(e):e,cI=e=>typeof e=="number"||ke.test(e);function Fue(e,t,n,r,a,i){a?(e.opacity=hn(0,n.opacity??1,Bue(r)),e.opacityExit=hn(t.opacity??1,0,Wue(r))):i&&(e.opacity=hn(t.opacity??1,n.opacity??1,r));for(let o=0;o<Lue;o++){const l=`border${uW[o]}Radius`;let c=uI(t,l),u=uI(n,l);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||cI(c)===cI(u)?(e[l]=Math.max(hn(lI(c),lI(u),r),0),(bi.test(u)||bi.test(c))&&(e[l]+="%")):e[l]=u}(t.rotate||n.rotate)&&(e.rotate=hn(t.rotate||0,n.rotate||0,r))}function uI(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Bue=dW(0,.5,K8),Wue=dW(.5,.95,ts);function dW(e,t,n){return r=>r<e?0:r>t?1:n(sm(e,t,r))}function dI(e,t){e.min=t.min,e.max=t.max}function vs(e,t){dI(e.x,t.x),dI(e.y,t.y)}function hI(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function fI(e,t,n,r,a){return e-=t,e=Rb(e,1/n,r),a!==void 0&&(e=Rb(e,1/a,r)),e}function que(e,t=0,n=1,r=.5,a,i=e,o=e){if(bi.test(t)&&(t=parseFloat(t),t=hn(o.min,o.max,t/100)-o.min),typeof t!="number")return;let l=hn(i.min,i.max,r);e===i&&(l-=t),e.min=fI(e.min,t,n,l,a),e.max=fI(e.max,t,n,l,a)}function pI(e,t,[n,r,a],i,o){que(e,t[n],t[r],t[a],t.scale,i,o)}const Uue=["x","scaleX","originX"],zue=["y","scaleY","originY"];function mI(e,t,n,r){pI(e.x,t,Uue,n?n.x:void 0,r?r.x:void 0),pI(e.y,t,zue,n?n.y:void 0,r?r.y:void 0)}function gI(e){return e.translate===0&&e.scale===1}function hW(e){return gI(e.x)&&gI(e.y)}function yI(e,t){return e.min===t.min&&e.max===t.max}function Hue(e,t){return yI(e.x,t.x)&&yI(e.y,t.y)}function vI(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function fW(e,t){return vI(e.x,t.x)&&vI(e.y,t.y)}function bI(e){return Xr(e.x)/Xr(e.y)}function xI(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Vue{constructor(){this.members=[]}add(t){GP(this.members,t),t.scheduleRender()}remove(t){if(YP(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(a=>t===a);if(n===0)return!1;let r;for(let a=n;a>=0;a--){const i=this.members[a];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:a}=t.options;a===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Gue(e,t,n){let r="";const a=e.x.translate/t.x,i=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((a||i||o)&&(r=`translate3d(${a}px, ${i}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:h,rotateX:d,rotateY:f,skewX:p,skewY:y}=n;u&&(r=`perspective(${u}px) ${r}`),h&&(r+=`rotate(${h}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),y&&(r+=`skewY(${y}deg) `)}const l=e.x.scale*t.x,c=e.y.scale*t.y;return(l!==1||c!==1)&&(r+=`scale(${l}, ${c})`),r||"none"}const d1=["","X","Y","Z"],Yue=1e3;let Kue=0;function h1(e,t,n,r){const{latestValues:a}=t;a[e]&&(n[e]=a[e],t.setStaticValue(e,0),r&&(r[e]=0))}function pW(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=ZB(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:a,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",on,!(a||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&pW(r)}function mW({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:a}){return class{constructor(o={},l=t==null?void 0:t()){this.id=Kue++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Jue),this.nodes.forEach(nde),this.nodes.forEach(rde),this.nodes.forEach(Zue)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new Due)}addEventListener(o,l){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new XP),this.eventHandlers.get(o).add(l)}notifyListeners(o,...l){const c=this.eventHandlers.get(o);c&&c.notify(...l)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=AB(o)&&!Ble(o),this.instance=o;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||l)&&(this.isLayoutDirty=!0),e){let h,d=0;const f=()=>this.root.updateBlockedByResize=!1;on.read(()=>{d=window.innerWidth}),e(o,()=>{const p=window.innerWidth;p!==d&&(d=p,this.root.updateBlockedByResize=!0,h&&h(),h=$ue(f,250),Iv.hasAnimatedSinceResize&&(Iv.hasAnimatedSinceResize=!1,this.nodes.forEach(kI)))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||u.getDefaultTransition()||lde,{onLayoutAnimationStart:m,onLayoutAnimationComplete:v}=u.getProps(),b=!this.targetLayout||!fW(this.targetLayout,p),x=!d&&f;if(this.options.layoutRoot||this.resumeFrom||x||d&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const w={...l2(y,"layout"),onPlay:m,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w),this.setAnimationOrigin(h,x)}else d||kI(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),jo(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(ade),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&pW(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let h=0;h<this.path.length;h++){const d=this.path[h];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:l,layout:c}=this.options;if(l===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(wI);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(_I);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(tde),this.nodes.forEach(Xue),this.nodes.forEach(Que)):this.nodes.forEach(_I),this.clearAllSnapshots();const l=ha.now();xr.delta=_o(0,1e3/60,l-xr.timestamp),xr.timestamp=l,xr.isProcessing=!0,e1.update.process(xr),e1.preRender.process(xr),e1.render.process(xr),xr.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,u2.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ede),this.sharedNodes.forEach(sde)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,on.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){on.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Xr(this.snapshot.measuredBox.x)&&!Xr(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Xn(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(l=!1),l&&this.instance){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!a)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!hW(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,h=u!==this.prevTransformTemplateValue;o&&this.instance&&(l||lc(this.latestValues)||h)&&(a(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return o&&(c=this.removeTransform(c)),cde(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return Xn();const l=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(ude))){const{scroll:h}=this.root;h&&(rd(l.x,h.offset.x),rd(l.y,h.offset.y))}return l}removeElementScroll(o){var c;const l=Xn();if(vs(l,o),(c=this.scroll)!=null&&c.wasRoot)return l;for(let u=0;u<this.path.length;u++){const h=this.path[u],{scroll:d,options:f}=h;h!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&vs(l,o),rd(l.x,d.offset.x),rd(l.y,d.offset.y))}return l}applyTransform(o,l=!1){const c=Xn();vs(c,o);for(let u=0;u<this.path.length;u++){const h=this.path[u];!l&&h.options.layoutScroll&&h.scroll&&h!==h.root&&ad(c,{x:-h.scroll.offset.x,y:-h.scroll.offset.y}),lc(h.latestValues)&&ad(c,h.latestValues)}return lc(this.latestValues)&&ad(c,this.latestValues),c}removeTransform(o){const l=Xn();vs(l,o);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!lc(u.latestValues))continue;pS(u.latestValues)&&u.updateSnapshot();const h=Xn(),d=u.measurePageBox();vs(h,d),mI(l,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,h)}return lc(this.latestValues)&&mI(l,this.latestValues),l}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==xr.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var p;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:h,layoutId:d}=this.options;if(!this.layout||!(h||d))return;this.resolvedRelativeTargetAt=xr.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Xn(),this.targetWithTransforms=Xn()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),vue(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):vs(this.target,this.layout.layoutBox),GB(this.target,this.targetDelta)):vs(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||pS(this.parent.latestValues)||VB(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,l,c){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Xn(),this.relativeTargetOrigin=Xn(),Ib(this.relativeTargetOrigin,l,c),vs(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var y;const o=this.getLead(),l=!!this.resumingFrom||this!==o;let c=!0;if((this.isProjectionDirty||(y=this.parent)!=null&&y.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===xr.timestamp&&(c=!1),c)return;const{layout:u,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||h))return;vs(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;Ace(this.layoutCorrected,this.treeScale,this.path,l),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=Xn());const{target:p}=o;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(hI(this.prevProjectionDelta.x,this.projectionDelta.x),hI(this.prevProjectionDelta.y,this.projectionDelta.y)),vp(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!xI(this.projectionDelta.x,this.prevProjectionDelta.x)||!xI(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var l;if((l=this.options.visualElement)==null||l.scheduleRender(),o){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=sd(),this.projectionDelta=sd(),this.projectionDeltaWithTransform=sd()}setAnimationOrigin(o,l=!1){const c=this.snapshot,u=c?c.latestValues:{},h={...this.latestValues},d=sd();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const f=Xn(),p=c?c.source:void 0,y=this.layout?this.layout.source:void 0,m=p!==y,v=this.getStack(),b=!v||v.members.length<=1,x=!!(m&&!b&&this.options.crossfade===!0&&!this.path.some(ode));this.animationProgress=0;let w;this.mixTargetDelta=_=>{const k=_/1e3;jI(d.x,o.x,k),jI(d.y,o.y,k),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ib(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),ide(this.relativeTarget,this.relativeTargetOrigin,f,k),w&&Hue(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=Xn()),vs(w,this.relativeTarget)),m&&(this.animationValues=h,Fue(h,u,this.latestValues,k,x,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=k},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var l,c,u;this.notifyListeners("animationStart"),(l=this.currentAnimation)==null||l.stop(),(u=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||u.stop(),this.pendingAnimation&&(jo(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=on.update(()=>{Iv.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=nu(0)),this.currentAnimation=Iue(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:h=>{this.mixTargetDelta(h),o.onUpdate&&o.onUpdate(h)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Yue),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:l,target:c,layout:u,latestValues:h}=o;if(!(!l||!c||!u)){if(this!==o&&this.layout&&u&&gW(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||Xn();const d=Xr(this.layout.layoutBox.x);
vendor: 5,260 bytes, line 768
768c.x.min=o.target.x.min,c.x.max=c.x.min+d;const f=Xr(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+f}vs(l,c),ad(l,h),vp(this.projectionDeltaWithTransform,this.layoutCorrected,l,h)}}registerSharedNode(o,l){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Vue),this.sharedNodes.get(o).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var l;const{layoutId:o}=this.options;return o?((l=this.getStack())==null?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:o}=this.options;return o?(l=this.getStack())==null?void 0:l.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:l,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let l=!1;const{latestValues:c}=o;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(l=!0),!l)return;const u={};c.z&&h1("z",o,u,this.animationValues);for(let h=0;h<d1.length;h++)h1(`rotate${d1[h]}`,o,u,this.animationValues),h1(`skew${d1[h]}`,o,u,this.animationValues);o.render();for(const h in u)o.setStaticValue(h,u[h]),this.animationValues&&(this.animationValues[h]=u[h]);o.scheduleRender()}applyProjectionStyles(o,l){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=Rv(l==null?void 0:l.pointerEvents)||"",o.transform=c?c(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=Rv(l==null?void 0:l.pointerEvents)||""),this.hasProjected&&!lc(this.latestValues)&&(o.transform=c?c({},""):"none",this.hasProjected=!1);return}o.visibility="";const h=u.animationValues||u.latestValues;this.applyTransformsToTarget();let d=Gue(this.projectionDeltaWithTransform,this.treeScale,h);c&&(d=c(h,d)),o.transform=d;const{x:f,y:p}=this.projectionDelta;o.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,u.animationValues?o.opacity=u===this?h.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:o.opacity=u===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const y in fS){if(h[y]===void 0)continue;const{correct:m,applyTo:v,isCSSVariable:b}=fS[y],x=d==="none"?h[y]:m(h[y],u);if(v){const w=v.length;for(let _=0;_<w;_++)o[v[_]]=x}else b?this.options.visualElement.renderState.vars[y]=x:o[y]=x}this.options.layoutId&&(o.pointerEvents=u===this?Rv(l==null?void 0:l.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var l;return(l=o.currentAnimation)==null?void 0:l.stop()}),this.root.nodes.forEach(wI),this.root.sharedNodes.clear()}}}function Xue(e){e.updateLayout()}function Que(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:a}=e.layout,{animationType:i}=e.options,o=t.source!==e.layout.source;i==="size"?za(d=>{const f=o?t.measuredBox[d]:t.layoutBox[d],p=Xr(f);f.min=r[d].min,f.max=f.min+p}):gW(i,t.layoutBox,r)&&za(d=>{const f=o?t.measuredBox[d]:t.layoutBox[d],p=Xr(r[d]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+p)});const l=sd();vp(l,r,t.layoutBox);const c=sd();o?vp(c,e.applyTransform(a,!0),t.measuredBox):vp(c,r,t.layoutBox);const u=!hW(l);let h=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:p}=d;if(f&&p){const y=Xn();Ib(y,t.layoutBox,f.layoutBox);const m=Xn();Ib(m,r,p.layoutBox),fW(y,m)||(h=!0),d.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=y,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeLayoutChanged:h})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function Jue(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Zue(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function ede(e){e.clearSnapshot()}function wI(e){e.clearMeasurements()}function _I(e){e.isLayoutDirty=!1}function tde(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function kI(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}
vendor: 4,662 bytes, line 768
768function nde(e){e.resolveTargetDelta()}function rde(e){e.calcProjection()}function ade(e){e.resetSkewAndRotation()}function sde(e){e.removeLeadSnapshot()}function jI(e,t,n){e.translate=hn(t.translate,0,n),e.scale=hn(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function SI(e,t,n,r){e.min=hn(t.min,n.min,r),e.max=hn(t.max,n.max,r)}function ide(e,t,n,r){SI(e.x,t.x,n.x,r),SI(e.y,t.y,n.y,r)}function ode(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const lde={duration:.45,ease:[.4,0,.1,1]},NI=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),CI=NI("applewebkit/")&&!NI("chrome/")?Math.round:ts;function PI(e){e.min=CI(e.min),e.max=CI(e.max)}function cde(e){PI(e.x),PI(e.y)}function gW(e,t,n){return e==="position"||e==="preserve-aspect"&&!yue(bI(t),bI(n),.2)}function ude(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const dde=mW({attachResizeListener:(e,t)=>cm(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),f1={current:void 0},yW=mW({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!f1.current){const e=new dde({});e.mount(window),e.setOptions({layoutScroll:!0}),f1.current=e}return f1.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),hde={pan:{Feature:Oue},drag:{Feature:Eue,ProjectionNode:yW,MeasureLayout:cW}};function TI(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const a="onHover"+n,i=r[a];i&&on.postRender(()=>i(t,_g(t)))}class fde extends zl{mount(){const{current:t}=this.node;t&&(this.unmount=Mle(t,(n,r)=>(TI(this.node,r,"Start"),a=>TI(this.node,a,"End"))))}unmount(){}}class pde extends zl{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=bg(cm(this.node.current,"focus",()=>this.onFocus()),cm(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function AI(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const a="onTap"+(n==="End"?"":n),i=r[a];i&&on.postRender(()=>i(t,_g(t)))}class mde extends zl{mount(){const{current:t}=this.node;t&&(this.unmount=Fle(t,(n,r)=>(AI(this.node,r,"Start"),(a,{success:i})=>AI(this.node,a,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const wS=new WeakMap,p1=new WeakMap,gde=e=>{const t=wS.get(e.target);t&&t(e)},yde=e=>{e.forEach(gde)};function vde({root:e,...t}){const n=e||document;p1.has(n)||p1.set(n,{});const r=p1.get(n),a=JSON.stringify(t);return r[a]||(r[a]=new IntersectionObserver(yde,{root:e,...t})),r[a]}function bde(e,t,n){const r=vde(t);return wS.set(e,n),r.observe(e),()=>{wS.delete(e),r.unobserve(e)}}const xde={some:0,all:1};class wde extends zl{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:a="some",once:i}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof a=="number"?a:xde[a]},l=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,i&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:h,onViewportLeave:d}=this.node.getProps(),f=u?h:d;f&&f(c)};return bde(this.node.current,o,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(_de(t,n))&&this.startObserver()}unmount(){}}function _de({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const kde={inView:{Feature:wde},tap:{Feature:mde},focus:{Feature:pde},hover:{Feature:fde}},jde={layout:{ProjectionNode:yW,MeasureLayout:cW}},Sde={...due,...kde,...hde,...jde},fe=Cce(Sde,Bce);function vW(e){const t=yu(()=>nu(e)),{isStatic:n}=g.useContext(Fw);if(n){const[,r]=g.useState(e);g.useEffect(()=>t.on("change",r),[])}return t}function bW(e,t){const n=vW(t()),r=()=>n.set(t());return r(),VP(()=>{const a=()=>on.preRender(r,!1,!0),i=e.map(o=>o.on("change",a));return()=>
768{i.forEach(o=>o()),jo(r)}}),n}function Nde(e){gp.current=[],e();const t=bW(gp.current,e);return gp.current=void 0,t}function Cde(e,t,n,r){if(typeof e=="function")return Nde(e);const a=typeof t=="function"?t:Wle(t,n,r);return Array.isArray(e)?EI(e,a):EI([e],([i])=>a(i))}function EI(e,t){const n=yu(()=>[]);return bW(e,()=>{n.length=0;const r=e.length;for(let a=0;a<r;a++)n[a]=e[a].get();return t(n)})}const xW=g.createContext(null);function Pde(e,t,n,r){if(!r)return e;const a=e.findIndex(h=>h.value===t);if(a===-1)return e;const i=r>0?1:-1,o=e[a+i];if(!o)return e;const l=e[a],c=o.layout,u=hn(c.min,c.max,.5);return i===1&&l.layout.max+n>u||i===-1&&l.layout.min+n<u?Gie(e,a,a+i):e}function Tde({children:e,as:t="ul",axis:n="y",onReorder:r,values:a,...i},o){const l=yu(()=>fe[t]),c=[],u=g.useRef(!1);Dl(!!a,"Reorder.Group must be provided a values prop","reorder-values");const h={axis:n,registerItem:(d,f)=>{const p=c.findIndex(y=>d===y.value);p!==-1?c[p].layout=f[n]:c.push({value:d,layout:f[n]}),c.sort(Ode)},updateOrder:(d,f,p)=>{if(u.current)return;const y=Pde(c,d,f,p);c!==y&&(u.current=!0,r(y.map(Ede).filter(m=>a.indexOf(m)!==-1)))}};return g.useEffect(()=>{u.current=!1}),s.jsx(l,{...i,ref:o,ignoreStrict:!0,children:s.jsx(xW.Provider,{value:h,children:e})})}const Ade=g.forwardRef(Tde);function Ede(e){return e.value}function Ode(e,t){return e.layout.min-t.layout.min}function OI(e,t=0){return _r(e)?e:vW(t)}function Rde({children:e,style:t={},value:n,as:r="li",onDrag:a,layout:i=!0,...o},l){const c=yu(()=>fe[r]),u=g.useContext(xW),h={x:OI(t.x),y:OI(t.y)},d=Cde([h.x,h.y],([m,v])=>m||v?1:"unset");Dl(!!u,"Reorder.Item must be a child of Reorder.Group","reorder-item-child");const{axis:f,registerItem:p,updateOrder:y}=u;return s.jsx(c,{drag:f,...o,dragSnapToOrigin:!0,style:{...t,x:h.x,y:h.y,zIndex:d},layout:i,onDrag:(m,v)=>{const{velocity:b}=v;b[f]&&y(n,h[f].get(),b[f]),a&&a(m,v)},onLayoutMeasure:m=>p(n,m),ref:l,ignoreStrict:!0,children:e})}const Ide=g.forwardRef(Rde),um=pw("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm font-medium ring-offset-background transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90 shadow-md hover:shadow-lg",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",hero:"gradient-primary text-primary-foreground font-semibold shadow-lg hover:shadow-glow hover:scale-[1.02] active:scale-[0.98]",accent:"gradient-accent text-accent-foreground font-semibold shadow-lg hover:shadow-accent-glow hover:scale-[1.02] active:scale-[0.98]",glass:"glass hover:bg-card/90"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-12 rounded-xl px-8 text-base",xl:"h-14 roun
768ded-xl px-10 text-lg",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),z=g.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...a},i)=>{const o=r?JX:"button";return s.jsx(o,{className:K(um({variant:t,size:n,className:e})),ref:i,...a})});z.displayName="Button";const Mde="/assets/sociepro-logo-C00j_UYd.jpg",Ci=g.forwardRef(({className:e="",showText:t=!0,size:n="md",variant:r="dark"},a)=>{const i={sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"},o=r==="light"?"text-muted-foreground":"text-foreground";return s.jsxs("div",{ref:a,className:`flex items-center gap-2 ${e}`,children:[s.jsx("img",{src:Mde,alt:"SociePRO AI",className:`${i[n]} rounded-full object-cover`}),t&&s.jsxs("span",{className:`font-display text-xl font-bold transition-colors duration-300 ${o}`,children:["SociePRO",s.jsx("span",{className:"text-amber-500",children:"AI"})]})]})}),w2=()=>{const[e,t]=g.useState(!1),[n,r]=g.useState(!1),[a,i]=g.useState(!1),o=Gt();g.useEffect(()=>{const c=()=>{t(window.scrollY>20)};return window.addEventListener("scroll",c),()=>window.removeEventListener("scroll",c)},[]),g.useEffect(()=>{W.auth.getSession().then(({data:{session:u}})=>{i(!!u)});const{data:{subscription:c}}=W.auth.onAuthStateChange((u,h)=>{i(!!h)});return()=>c.unsubscribe()},[]);const l=async()=>{await W.auth.signOut(),i(!1),o("/")};return s.jsxs(fe.header,{initial:{y:-100},animate:{y:0},transition:{duration:.5},className:`fixed top-0 left-0 right-0 z-50 transition-all duration-300 ${e?"glass py-3":"bg-transparent py-4"}`,role:"banner",children:[s.jsxs("nav",{className:"container flex items-center justify-between px-4","aria-label":"Main navigation",children:[s.jsx(Oe,{to:"/","aria-label":"SociePRO AI - AI Social Media Content Generator Home",children:s.jsx(Ci,{variant:e?"dark":"light"})}),s.jsxs("div",{className:"hidden items-center gap-6 md:flex",children:[s.jsx("a",{href:"#how-it-works",className:"text-sm font-medium text-muted-foreground transition-colors hover:text-foreground",children:"How It Works"}),s.jsx("a",{href:"#modules-title",className:"text-sm font-medium text-muted-foreground transition-colors hover:text-foreground",children:"Modules & Pricing"}),s.jsx(Oe,{to:"/reviews",className:"text-sm font-medium text-muted-foreground transition-colors hover:text-foreground",children:"Reviews"}),a?s.jsxs(s.Fragment,{children:[s.jsx(Oe,{to:"/dashboard",className:"text-sm font-medium text-muted-foreground transition-colors hover:text-foreground",children:"Dashboard"}),s.jsx(z,{variant:"outline",size:"sm",onClick:l,children:"Log Out"})]}):s.jsxs(s.Fragment,{children:[s.jsx(Oe,{to:"/auth",className:"text-sm font-medium text-muted-foreground transition-colors hover:text-foreground",children:"Login"}),s.jsx(z,{variant:"hero",size:"sm",asChild:!0,children:s.jsx("a",{href:"#modules-title","aria-label":"Choose module and plan",children:"Select Your Module"})})]})]}),s.jsx("button",{onClick:()=>r(!n),className:"flex h-10 w-10 items-center justify-center rounded-lg text-foreground md:hidden","aria-label":n?"Close menu":"Open menu","aria-expanded":n,"aria-controls":"mobile-menu",children:n?s.jsx(Br,{className:"h-5 w-5","aria-hidden":"true"}):s.jsx(HF,{className:"h-5 w-5","aria-hidden":"true"})})]}),n&&s.jsx(fe.nav,{id:"mobile-menu",initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"absolute left-0 right-0 top-full border-b border-border bg-background p-4 md:hidden","aria-label":"Mobile navigation",children:s.jsxs("ul",{className:"flex flex-col gap-4",children:[s.jsx("li",{children:s.jsx("a",{href:"#how-it-works",className:"text-sm font-medium text-muted-foreground",onClick:()=>r(!1),children:"How It Works"})}),s.jsx("li",{children:s.jsx("a",{href:"#modules-title",className:"text-sm font-medium text-muted-foreground",onClick:()=>r(!1),children:"Modules & Pricing"})}),s.jsx("li",{children:s.jsx(Oe,{to:"/reviews",className:"text-sm font-medium text-muted-foreground",onClick:()=>r(!1),children:"Reviews"})}),a?s.jsxs(s.Fragment,{children:[s.jsx("li",{children:s.jsx(Oe,{to:"/dashboard",className:"text-sm font-medium text-muted-foreground",onClick:()=>r(!1),children:"Dashboard"})}),s.jsx("li",{children:s.jsx(z,{variant:"outline",size:"sm",className:"w-full",onClick:()=>{r(!1),l()},children:"Log Out"})})]}):s.jsxs(s.Fragment,{children:[s.jsx("li",{children:s.jsx(Oe,{to:"/auth",className:"text-sm font-medium text-muted-foreground",onClick:()=>r(!1),children:"Login"})}),s.jsx("li",{children:s.jsx(z,{variant:"hero",size:"sm",className:"w-full",asChild:!0,children:s.jsx("a",{href:"#modules-title",onClick:()=>r(!1),children:"Select Your Module"})})})]})]})})]})},Dde=pw("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function je({className:e,variant:t,...n}){return s.jsx("div",{className:K(Dde({variant:t}),e),...n})}const $de=["RealtorPRO","AdvisorPRO","BuilderPRO","PropertyManagerPRO","HostPRO","RestaurantPRO","InsurancePRO","MortgagePRO","FreelanceConsultantPRO","PersonalTrainerPRO","CourseCoachPRO","CreatorPRO","SideHustlePRO","PersonalPRO"],Lde=()=>s.jsxs("section",{className:"relative min-h-[90vh] overflow-hidden landing-gradient-hero","aria-label":"SociePRO AI – Automated social media content for professionals",children:[s.jsxs("div",{className:"absolute inset-0 overflow-hidden","aria-hidden":"true",children:[s.jsx("div",{className:"absolute -top-1/2 -right-1/4 h-[800px] w-[800px] rounded-full bg-[hsl(106_54%_87%/0.06)] blur-3xl"}),s.jsx("div",{className:"absolute -bottom-1/2 -left-1/4 h-[600px] w-[600px] rounded-full bg-[hsl(28_100%_86%/0.06)] blur-3xl"})]}),s.jsxs("div",{className:"container relative z-10 flex flex-col items-center justify-center px-4 py-24 lg:py-36",children:[s.jsxs(fe.h1,{initial:{opacity:0,y:24}
768,animate:{opacity:1,y:0},transition:{duration:.6},className:"max-w-4xl text-center font-display text-4xl font-bold tracking-tight text-white md:text-5xl lg:text-6xl",children:["Become the Most Trusted Voice"," ",s.jsx("span",{className:"text-gradient",children:"in Your Market."})]}),s.jsx(fe.p,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.15},className:"mt-6 max-w-2xl text-center text-lg text-white/70 md:text-xl",children:"SociePRO transforms professionals into authorities, creators into leaders, and side hustlers into brands — automatically."}),s.jsx(fe.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{duration:.5,delay:.22},className:"mt-6 flex flex-wrap items-center justify-center gap-2",children:$de.map(e=>s.jsx(je,{variant:"outline",className:"border-white/15 bg-white/5 text-white/60 text-xs font-medium px-3 py-1",children:e},e))}),s.jsx(fe.p,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{duration:.5,delay:.3},className:"mt-8 max-w-2xl text-center text-sm text-white/50 leading-relaxed",children:"Whether you're building listings, building wealth, building homes, building bookings, building audiences, or building yourself — SociePRO positions you as the expert people follow, trust, and choose."}),s.jsxs(fe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.4},className:"mt-10 flex flex-col items-center gap-4 sm:flex-row",children:[s.jsx(z,{size:"xl",className:"bg-[hsl(106_54%_87%)] text-[hsl(0_0%_6%)] hover:bg-[hsl(106_54%_80%)] font-semibold shadow-lg",asChild:!0,children:s.jsxs("a",{href:"#modules-title","aria-label":"Choose your professional module",children:["Choose Your Professional Module",s.jsx(Sr,{className:"ml-1 h-5 w-5","aria-hidden":"true"})]})}),s.jsx(z,{size:"xl",variant:"outline",className:"border-white/20 text-white bg-transparent hover:bg-white/10 hover:text-[hsl(106_54%_87%)]",asChild:!0,children:s.jsx("a",{href:"#how-it-works","aria-label":"See how SociePRO works",children:"See How It Works"})})]})]})]}),Fde=()=>s.jsx("section",{className:"py-20 lg:py-28 bg-background","aria-labelledby":"transformation-title",children:s.jsx("div",{className:"container px-4",children:s.jsxs(fe.div,{initial:{opacity:0,y:24},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},className:"mx-auto max-w-3xl text-center",children:[s.jsx("h2",{id:"transformation-title",className:"font-display text-3xl font-bold tracking-tight text-foreground md:text-4xl lg:text-5xl",children:"Stop Posting. Start Leading."}),s.jsxs("div",{className:"mt-8 space-y-6 text-lg leading-relaxed text-muted-foreground",children:[s.jsxs("p",{children:["Your audience isn't looking for noise.",s.jsx("br",{}),"They're looking for certainty."]}),s.jsx("p",{children:"SociePRO equips you with strategic, industry-specific social media content automation that positions you as the obvious expert in your market — without hiring a marketing team."}),s.jsxs("p",{className:"font-medium text-foreground",children:["Because the professionals who win today don't just show up.",s.jsx("br",{}),"They show up with authority."]})]})]})})}),_2=[{id:"realtor",name:"RealtorPRO",hook:"Dominate your local housing market and become the agent sellers call first.",tagline:"Become the agent sellers trust and buyers remember.",icon:yi,color:"text-[hsl(106_54%_87%)]",bgColor:"bg-[hsl(106_54%_87%/0.12)]",borderColor:"border-[hsl(106_54%_87%/0.25)]",samplePrompts:["3 Pricing Mistakes Sellers Make in a Shifting Market (and How to Avoid Them)","Why Waiting for Interest Rates to Drop Could Cost You $40k in Equity","Behind the Scenes: How We Staged & Sold This Property in 48 Hours"],pillarHighlights:[{title:"Market Reality Checks",type:"Authority Pillar"},{title:"Seller Negotiation Guides",type:"Lead Engine"},{title:"Local Neighborhood Spotlights",type:"Community Pillar"}]},{id:"financial_advisor",name:"AdvisorPRO",hook:"Become the steady, trusted financial voice high-net-worth clients rely on.",tagline:"Become the steady financial voice clients rely on.",icon:gd,color:"text-[hsl(60_100%_90%)]",bgColor:"bg-[hsl(60_100%_90%/0.12)]",borderColor:"border-[hsl(60_100%_90%/0.25)]",samplePrompts:["The Retirement Tax Trap Most 50+ Professionals Never See Coming","Why Volatility Isn't Your Enemy: A Disciplined Rebalancing Playbook","3 Estate Planning Gaps That Leave Wealth Unprotected Across Generations"],pillarHighlights:[{title:"Wealth Preservation Breakdown",type:"Authority Pillar"},{title:"Market Volatility Reassurance",type:"Trust Engine"},{title:"Tax Efficiency Insights",type:"Strategic Pillar"}]}
768,{id:"builder_remodeler",name:"BuilderPRO",hook:"Build unmatched local authority for every custom home and remodeling project.",tagline:"Become the builder known for craftsmanship and confidence.",icon:pP,color:"text-[hsl(28_100%_86%)]",bgColor:"bg-[hsl(28_100%_86%/0.12)]",borderColor:"border-[hsl(28_100%_86%/0.25)]",samplePrompts:["The True Cost Breakdown of Custom Build vs. Whole-Home Remodel","5 Materials That Instantly Boost Your Home's Appraisal Value","Before You Sign: 3 Questions to Ask Every General Contractor"],pillarHighlights:[{title:"Craftsmanship & Material Choice",type:"Authority Pillar"},{title:"Project Cost Transparency",type:"Trust Engine"},{title:"Build Site Walkthroughs",type:"Proof Pillar"}]},{id:"property_manager",name:"PropertyManagerPRO",hook:"Become the property manager owners recommend and tenants respect.",tagline:"Become the manager owners recommend and tenants respect.",icon:vw,color:"text-[hsl(200_80%_85%)]",bgColor:"bg-[hsl(200_80%_85%/0.12)]",borderColor:"border-[hsl(200_80%_85%/0.25)]",samplePrompts:["How We Reduced Rental Vacancy Rates to Under 4 Days Year-Round","Tenant Screening 101: Preventing Evictions Before Signing the Lease","Preventative Maintenance Checklist That Saves Owners Thousands"],pillarHighlights:[{title:"Occupancy Rate Optimization",type:"Authority Pillar"},{title:"Owner Asset Protection",type:"Lead Engine"},{title:"Tenant Relation Blueprints",type:"Operational Pillar"}]},{id:"host",name:"HostPRO",hook:"Fill your short-term rental calendar with high-trust direct bookings.",tagline:"Become the host whose calendar fills itself.",icon:dP,color:"text-[hsl(0_84%_88%)]",bgColor:"bg-[hsl(0_84%_88%/0.12)]",borderColor:"border-[hsl(0_84%_88%/0.25)]",samplePrompts:["5 Amenity Upgrades That Increased Our Airbnb Daily Rate by 35%","The Ultimate Guest Welcome Guide That Guarantees 5-Star Reviews","How to Stand Out in a Saturated Short-Term Rental Market"],pillarHighlights:[{title:"Revenue & ADR Boosting Tips",type:"Growth Pillar"},{title:"Guest Experience Playbooks",type:"Authority Pillar"},{title:"Direct Booking Conversion",type:"Lead Engine"}]},{id:"restaurantpro",name:"RestaurantPRO",hook:"Become the neighborhood restaurant your community can't stop recommending.",tagline:"Become the restaurant your neighborhood can't stop recommending.",icon:_w,color:"text-[hsl(25_95%_80%)]",bgColor:"bg-[hsl(25_95%_80%/0.12)]",borderColor:"border-[hsl(25_95%_80%/0.25)]",samplePrompts:["Behind the Chef's Counter: Sourcing Our Signature Ingredients Locally","Why Community Dining Is Back: Hosting Unforgettable Private Events","Chef's Secret: 3 Flavor Pairings That Will Elevate Your At-Home Cooking"],pillarHighlights:[{title:"Culinary & Kitchen Craft",type:"Authority Pillar"},{title:"Community & Event Spotlights",type:"Engagement Pillar"},{title:"Seasonal Menu Teasers",type:"Lead Engine"}]},{id:"insurance",name:"InsurancePRO",hook:"Become the agent your community trusts to protect what matters most.",tagline:"Become the agent your community trusts to protect what matters.",icon:Ea,color:"text-[hsl(220_70%_85%)]",bgColor:"bg-[hsl(220_70%_85%/0.12)]",borderColor:"border-[hsl(220_70%_85%/0.25)]",samplePrompts:["The Hidden Coverage Gaps Most Homeowner Policies Ignore Until It's Too Late","3 Underinsurance Traps Small Business Owners Face in 2026","How to Bundle Policies and Lower Premiums Without Sacrificing Coverage"],pillarHighlights:[{title:"Policy Risk Audit",type:"Authority Pillar"},{title:"Claims & Protection Breakdown",type:"Trust Engine"},{title:"Local Risk Prevention",type:"Community Pillar"}]},{id:"mortgage",name:"MortgagePRO",hook:"Become the go-to mortgage lender buyers and realtors call first.",tagline:"Become the lender buyers call first.",icon:gi,color:"text-[hsl(180_50%_80%)]",bgColor:"bg-[hsl(180_50%_80%/0.12)]",borderColor:"border-[hsl(180_50%_80%/0.25)]",samplePrompts:["How to Qualify for a Home Loan When You're Self-Employed","Pre-Approval vs. Pre-Qualification: What Homebuyers Must Know","3 Down Payment Assistance Programs You Didn't Know Existed"],pillarHighlights:[{title:"Loan Qualification Clarity",type:"Authority Pillar"},{title:"Buyer Rate Strategies",type:"Lead Engine"},{title:"Realtor Partner Growth",type:"Relationship Pillar"}]},{id:"freelance_consultant",name:"FreelanceConsultantPRO",hook:"Attract premium corporate clients without endless outbound prospecting.",tagline:"Become the expert clients seek out and refer.",icon:mw,color:"text-[hsl(310_60%_82%)]",bgColor:"bg-[hsl(310_60%_82%/0.12)]",borderColor:"border-[hsl(310_60%_82%/0.25)]",samplePrompts:["How I Shifted From Hourly Billing to $15k Outcome-Based Packages","3 Red-Flag Clients to Avoid (and How to Spot Them in Discovery Calls)","The Single Positioning Shift That Quadrupled My Retainer Inquiries"],pillarHighlights:[{title:"High-Ticket Client Acquisition",type:"Authority Pillar"},{title:"Value-Based Pricing Playbooks",type:"Lead Engine"},{title:"Consulting Framework Demos",type:"Proof Pillar"}]},{id:"personal_trainer",name:"PersonalTrainerPRO",hook:"Become the coach whose transformation results speak louder than any ad.",tagline:"Become the coach whose results speak louder than any ad.",icon:BF,color:"text-[hsl(350_70%_80%)]",bgColor:"bg-[hsl(350_70%_80%/0.12)]",borderColor:"border-[hsl(350_70%_80%/0.25)]",samplePrompts:["Why Cardio Alone Won't Change Your Body Composition After 30","The 3-Step Nutrition Routine That Sustains Peak Energy All Day","Client Spotlight: How Sarah Lost 25lbs While Working 60-Hour Weeks"],pillarHighlights:[{title:"Body Composition Science",type:"Authority Pillar"},{title:"Client Transformation Case Studies",type:"Proof Pillar"},{title:"Sustainable Fitness Habits",type:"Engagement Pillar"}]},{id:"course_coach",name:"CourseCoachPRO",hook:"Scale student enrollment with high-value, educational authority content.",tagline:"Become the educator whose students can't stop recommending.",icon:oi,color:"text-[hsl(2
76860_60%_82%)]",bgColor:"bg-[hsl(260_60%_82%/0.12)]",borderColor:"border-[hsl(260_60%_82%/0.25)]",samplePrompts:["Why 90% of Online Courses Fail (and How to Design for High Completion)","The Organic Content Funnel That Sold 500 Copies of My Signature Program","How to Price Your Coaching Program for Maximum Commitment"],pillarHighlights:[{title:"Curriculum & Student Results",type:"Authority Pillar"},{title:"Organic Launch Blueprint",type:"Lead Engine"},{title:"Coaching Mastery Insights",type:"Proof Pillar"}]},{id:"creator",name:"CreatorPRO",hook:"Turn raw ideas into a high-authority, monetization-ready personal audience.",tagline:"Become the Voice They Quote.",icon:Se,color:"text-[hsl(280_70%_85%)]",bgColor:"bg-[hsl(280_70%_85%/0.12)]",borderColor:"border-[hsl(280_70%_85%/0.25)]",samplePrompts:["How to Build a 6-Figure Creator Engine on 1 Hour of Output a Day","The Hook Architecture That Increased My Content Retention by 4x","Monetizing Beyond Sponsors: Building Your Owned Digital Products"],pillarHighlights:[{title:"Audience Retention Architecture",type:"Authority Pillar"},{title:"Creator Economy Monetization",type:"Growth Engine"},{title:"Content Batching Systems",type:"Production Pillar"}]},{id:"side_hustle",name:"SideHustlePRO",hook:"Turn your passion and skills into a scalable secondary revenue engine.",tagline:"Think Bigger. Execute Smarter.",icon:vn,color:"text-[hsl(45_100%_80%)]",bgColor:"bg-[hsl(45_100%_80%/0.12)]",borderColor:"border-[hsl(45_100%_80%/0.25)]",samplePrompts:["How to Validate a Business Idea in 48 Hours for Under $50","Balancing a 9-to-5 While Building a $5k/mo Side Revenue Engine","The Top 3 Automation Tools That Save Me 15 Hours Every Week"],pillarHighlights:[{title:"Idea Validation Playbooks",type:"Authority Pillar"},{title:"Time Leverage Strategies",type:"Growth Engine"},{title:"Early Customer Acquisition",type:"Lead Engine"}]},{id:"personal",name:"PersonalPRO",hook:"Build a clean, respected digital presence that opens professional doors.",tagline:"Become the Version People Respect.",icon:Si,color:"text-[hsl(160_60%_80%)]",bgColor:"bg-[hsl(160_60%_80%/0.12)]",borderColor:"border-[hsl(160_60%_80%/0.25)]",samplePrompts:["3 Mindset Shifts That Doubled My Professional Confidence","How I Built a Personal Brand Without Being Cringey or Over-Sharing","The Unspoken Networking Habit That Attracts High-Value Mentors"],pillarHighlights:[{title:"Authentic Leadership Growth",type:"Authority Pillar"},{title:"Personal Reputation Systems",type:"Brand Engine"},{title:"Professional Network Expansion",type:"Community Pillar"}]}],ze=g.forwardRef(({className:e,type:t,...n},r)=>s.jsx("input",{type:t,className:K("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));ze.displayName="Input";var Bde="Label",wW=g.forwardRef((e,t)=>s.jsx(we.label,{...e,ref:t,onMouseDown:n=>{var a;n.target.closest("button, input, select, textarea")||((a=e.onMouseDown)==null||a.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));wW.displayName=Bde;var _W=wW;const Wde=pw("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),X=g.forwardRef(({className:e,...t},n)=>s.jsx(_W,{ref:n,className:K(Wde(),e),...t}));X.displayName=_W.displayName;var m1="focusScope.autoFocusOnMount",g1="focusScope.autoFocusOnUnmount",RI={bubbles:!1,cancelable:!0},qde="FocusScope",kg=g.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:i,...o}=e,[l,c]=g.useState(null),u=In(a),h=In(i),d=g.useRef(null),f=Fe(t,m=>c(m)),p=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(r){let m=function(w){if(p.paused||!l)return;const _=w.target;l.contains(_)?d.current=_:zo(d.current,{select:!0})},v=function(w){if(p.paused||!l)return;const _=w.relatedTarget;_!==null&&(l.contains(_)||zo(d.current,{select:!0}))},b=function(w){if(document.activeElement===document.body)for(const k of w)k.removedNodes.length>0&&zo(l)};document.addEventListener("focusin",m),document.addEventListener("focusout",v);const x=new MutationObserver(b);return l&&x.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",v),x.disconnect()}}},[r,l,p.paused]),g.useEffect(()=>{if(l){MI.add(p);
vendor: 4,582 bytes, line 768
768const m=document.activeElement;if(!l.contains(m)){const b=new CustomEvent(m1,RI);l.addEventListener(m1,u),l.dispatchEvent(b),b.defaultPrevented||(Ude(Yde(kW(l)),{select:!0}),document.activeElement===m&&zo(l))}return()=>{l.removeEventListener(m1,u),setTimeout(()=>{const b=new CustomEvent(g1,RI);l.addEventListener(g1,h),l.dispatchEvent(b),b.defaultPrevented||zo(m??document.body,{select:!0}),l.removeEventListener(g1,h),MI.remove(p)},0)}}},[l,u,h,p]);const y=g.useCallback(m=>{if(!n&&!r||p.paused)return;const v=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,b=document.activeElement;if(v&&b){const x=m.currentTarget,[w,_]=zde(x);w&&_?!m.shiftKey&&b===_?(m.preventDefault(),n&&zo(w,{select:!0})):m.shiftKey&&b===w&&(m.preventDefault(),n&&zo(_,{select:!0})):b===x&&m.preventDefault()}},[n,r,p.paused]);return s.jsx(we.div,{tabIndex:-1,...o,ref:f,onKeyDown:y})});kg.displayName=qde;function Ude(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(zo(r,{select:t}),document.activeElement!==n)return}function zde(e){const t=kW(e),n=II(t,e),r=II(t.reverse(),e);return[n,r]}function kW(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function II(e,t){for(const n of e)if(!Hde(n,{upTo:t}))return n}function Hde(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Vde(e){return e instanceof HTMLInputElement&&"select"in e}function zo(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Vde(e)&&t&&e.select()}}var MI=Gde();function Gde(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=DI(e,t),e.unshift(t)},remove(t){var n;e=DI(e,t),(n=e[0])==null||n.resume()}}}function DI(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Yde(e){return e.filter(t=>t.tagName!=="A")}var y1=0;function Uw(){g.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??$I()),document.body.insertAdjacentElement("beforeend",e[1]??$I()),y1++,()=>{y1===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),y1--}},[])}function $I(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Mv="right-scroll-bar-position",Dv="width-before-scroll-bar",Kde="with-scroll-bars-hidden",Xde="--removed-body-scroll-bar-size";function v1(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Qde(e,t){var n=g.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var a=n.value;a!==r&&(n.value=r,n.callback(r,a))}}}})[0];return n.callback=t,n.facade}var Jde=typeof window<"u"?g.useLayoutEffect:g.useEffect,LI=new WeakMap;function Zde(e,t){var n=Qde(null,function(r){return e.forEach(function(a){return v1(a,r)})});return Jde(function(){var r=LI.get(n);if(r){var a=new Set(r),i=new Set(e),o=n.current;a.forEach(function(l){i.has(l)||v1(l,null)}),i.forEach(function(l){a.has(l)||v1(l,o)})}LI.set(n,e)},[e]),n}function ehe(e){return e}function the(e,t){t===void 0&&(t=ehe);var n=[],r=!1,a={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var o=t(i,r);return n.push(o),function(){n=n.filter(function(l){return l!==o})}},assignSyncMedium:function(i){for(r=!0;n.length;){var o=n;n=[],o.forEach(i)}n={push:function(l){return i(l)},filter:function(){return n}}},assignMedium:function(i){r=!0;var o=[];if(n.length){var l=n;n=[],l.forEach(i),o=n}var c=function(){var h=o;o=[],h.forEach(i)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(h){o.push(h),u()},filter:function(h){return o=o.filter(h),n}}}};return a}function nhe(e){e===void 0&&(e={});var t=the(null);return t.options=ci({async:!0,ssr:!1},e),t}var jW=function(e){var t=e.sideCar,n=Bh(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return g.createElement(r,ci({},n))};
vendor: 5,323 bytes, lines 768-805
768jW.isSideCarExport=!0;function rhe(e,t){return e.useMedium(t),jW}var SW=nhe(),b1=function(){},zw=g.forwardRef(function(e,t){var n=g.useRef(null),r=g.useState({onScrollCapture:b1,onWheelCapture:b1,onTouchMoveCapture:b1}),a=r[0],i=r[1],o=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,h=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,y=e.noIsolation,m=e.inert,v=e.allowPinchZoom,b=e.as,x=b===void 0?"div":b,w=e.gapMode,_=Bh(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=f,j=Zde([n,t]),S=ci(ci({},_),a);return g.createElement(g.Fragment,null,h&&g.createElement(k,{sideCar:SW,removeScrollBar:u,shards:d,noRelative:p,noIsolation:y,inert:m,setCallbacks:i,allowPinchZoom:!!v,lockRef:n,gapMode:w}),o?g.cloneElement(g.Children.only(l),ci(ci({},S),{ref:j})):g.createElement(x,ci({},S,{className:c,ref:j}),l))});zw.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};zw.classNames={fullWidth:Dv,zeroRight:Mv};var ahe=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function she(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=ahe();return t&&e.setAttribute("nonce",t),e}function ihe(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ohe(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var lhe=function(){var e=0,t=null;return{add:function(n){e==0&&(t=she())&&(ihe(t,n),ohe(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},che=function(){var e=lhe();return function(t,n){g.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},NW=function(){var e=che(),t=function(n){var r=n.styles,a=n.dynamic;return e(r,a),null};return t},uhe={left:0,top:0,right:0,gap:0},x1=function(e){return parseInt(e||"",10)||0},dhe=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[x1(n),x1(r),x1(a)]},hhe=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return uhe;var t=dhe(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},fhe=NW(),Sd="data-scroll-locked",phe=function(e,t,n,r){var a=e.left,i=e.top,o=e.right,l=e.gap;return n===void 0&&(n="margin"),`
769  .`.concat(Kde,` {
770   overflow: hidden `).concat(r,`;
771   padding-right: `).concat(l,"px ").concat(r,`;
772  }
773  body[`).concat(Sd,`] {
774    overflow: hidden `).concat(r,`;
775    overscroll-behavior: contain;
776    `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
777    padding-left: `.concat(a,`px;
778    padding-top: `).concat(i,`px;
779    padding-right: `).concat(o,`px;
780    margin-left:0;
781    margin-top:0;
782    margin-right: `).concat(l,"px ").concat(r,`;
783    `),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),`
784  }
785  
786  .`).concat(Mv,` {
787    right: `).concat(l,"px ").concat(r,`;
788  }
789  
790  .`).concat(Dv,` {
791    margin-right: `).concat(l,"px ").concat(r,`;
792  }
793  
794  .`).concat(Mv," .").concat(Mv,` {
795    right: 0 `).concat(r,`;
796  }
797  
798  .`).concat(Dv," .").concat(Dv,` {
799    margin-right: 0 `).concat(r,`;
800  }
801  
802  body[`).concat(Sd,`] {
803    `).concat(Xde,": ").concat(l,`px;
804  }
805`)},FI=function(){var e=parseInt(document.body.getAttribute(Sd)||"0",10);return isFinite(e)?e:0},mhe=function(){g.useEffect(function(){return document.body.setAttribute(Sd,(FI()+1).toString()),function(){var e=FI()-1;e<=0?document.body.removeAttribute(Sd):document.body.setAttribute(Sd,e.toString())}},[])},ghe=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=r===void 0?"margin":r;mhe();var i=g.useMemo(function(){return hhe(a)},[a]);return g.createElement(fhe,{styles:phe(i,!t,a,n?"":"!important")})},_S=!1;if(typeof window<"u")try{var Ly=Object.defineProperty({},"passive",{get:function(){return _S=!0,!0}});window.addEventListener("test",Ly,Ly),window.removeEventListener("test",Ly,Ly)}catch{_S=!1}var Au=_S?{passive:!1}:!1,yhe=function(e){return e.tagName==="TEXTAREA"},CW=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!yhe(e)&&n[t]==="visible")},vhe=function(e){return CW(e,"overflowY")},bhe=function(e){return CW(e,"overflowX")},BI=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var a=PW(e,r);if(a){var i=TW(e,r),o=i[1],l=i[2];if(o>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},xhe=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},whe=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},PW=function(e,t){return e==="v"?vhe(t):bhe(t)},TW=function(e,t){return e==="v"?xhe(t):whe(t)},_he=function(e,t){return e==="h"&&t==="rtl"?-1:1},khe=function(e,t,n,r,a){var i=_he(e,window.getComputedStyle(t).direction),o=i*r,l=n.target,c=t.contains(l),u=!1,h=o>0,d=0,f=0;do{if(!l)break;var p=TW(e,l),y=p[0],m=p[1],v=p[2],b=m-v-i*y;(y||b)&&PW(e,l)&&(d+=b,f+=y);var x=l.parentNode;l=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));
vendor: 4,590 bytes, lines 805-808
805return(h&&(Math.abs(d)<1||!a)||!h&&(Math.abs(f)<1||!a))&&(u=!0),u},Fy=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},WI=function(e){return[e.deltaX,e.deltaY]},qI=function(e){return e&&"current"in e?e.current:e},jhe=function(e,t){return e[0]===t[0]&&e[1]===t[1]},She=function(e){return`
806  .block-interactivity-`.concat(e,` {pointer-events: none;}
807  .allow-interactivity-`).concat(e,` {pointer-events: all;}
808`)},Nhe=0,Eu=[];function Che(e){var t=g.useRef([]),n=g.useRef([0,0]),r=g.useRef(),a=g.useState(Nhe++)[0],i=g.useState(NW)[0],o=g.useRef(e);g.useEffect(function(){o.current=e},[e]),g.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var m=tre([e.lockRef.current],(e.shards||[]).map(qI),!0).filter(Boolean);return m.forEach(function(v){return v.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),m.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var l=g.useCallback(function(m,v){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!o.current.allowPinchZoom;var b=Fy(m),x=n.current,w="deltaX"in m?m.deltaX:x[0]-b[0],_="deltaY"in m?m.deltaY:x[1]-b[1],k,j=m.target,S=Math.abs(w)>Math.abs(_)?"h":"v";if("touches"in m&&S==="h"&&j.type==="range")return!1;var N=BI(S,j);if(!N)return!0;if(N?k=S:(k=S==="v"?"h":"v",N=BI(S,j)),!N)return!1;if(!r.current&&"changedTouches"in m&&(w||_)&&(r.current=k),!k)return!0;var C=r.current||k;return khe(C,v,m,C==="h"?w:_,!0)},[]),c=g.useCallback(function(m){var v=m;if(!(!Eu.length||Eu[Eu.length-1]!==i)){var b="deltaY"in v?WI(v):Fy(v),x=t.current.filter(function(k){return k.name===v.type&&(k.target===v.target||v.target===k.shadowParent)&&jhe(k.delta,b)})[0];if(x&&x.should){v.cancelable&&v.preventDefault();return}if(!x){var w=(o.current.shards||[]).map(qI).filter(Boolean).filter(function(k){return k.contains(v.target)}),_=w.length>0?l(v,w[0]):!o.current.noIsolation;_&&v.cancelable&&v.preventDefault()}}},[]),u=g.useCallback(function(m,v,b,x){var w={name:m,delta:v,target:b,should:x,shadowParent:Phe(b)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(_){return _!==w})},1)},[]),h=g.useCallback(function(m){n.current=Fy(m),r.current=void 0},[]),d=g.useCallback(function(m){u(m.type,WI(m),m.target,l(m,e.lockRef.current))},[]),f=g.useCallback(function(m){u(m.type,Fy(m),m.target,l(m,e.lockRef.current))},[]);g.useEffect(function(){return Eu.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",c,Au),document.addEventListener("touchmove",c,Au),document.addEventListener("touchstart",h,Au),function(){Eu=Eu.filter(function(m){return m!==i}),document.removeEventListener("wheel",c,Au),document.removeEventListener("touchmove",c,Au),document.removeEventListener("touchstart",h,Au)}},[]);var p=e.removeScrollBar,y=e.inert;return g.createElement(g.Fragment,null,y?g.createElement(i,{styles:She(a)}):null,p?g.createElement(ghe,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Phe(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const The=rhe(SW,Che);var jg=g.forwardRef(function(e,t){return g.createElement(zw,ci({},e,{ref:t,sideCar:The}))});jg.classNames=zw.classNames;var Ahe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ou=new WeakMap,By=new WeakMap,Wy={},w1=0,AW=function(e){return e&&(e.host||AW(e.parentNode))},Ehe=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=AW(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Ohe=function(e,t,n,r){var a=Ehe(t,Array.isArray(e)?e:[e]);Wy[n]||(Wy[n]=new WeakMap);var i=Wy[n],o=[],l=new Set,c=new Set(a),u=function(d){!d||l.has(d)||(l.add(d),u(d.parentNode))};a.forEach(u);var h=function(d){!d||c.has(d)||Array.prototype.forEach.call(d.children,function(f){if(l.has(f))h(f);else try{var p=f.getAttribute(r),y=p!==null&&p!=="false",m=(Ou.get(f)||0)+1,v=(i.get(f)||0)+1;Ou.set(f,m),i.set(f,v),o.push(f),m===1&&y&&By.set(f,!0),v===1&&f.setAttribute(n,"true"),y||f.setAttribute(r,"true")}catch(b){console.error("aria-hidden: cannot operate on ",f,b)}})};return h(t),l.clear(),w1++,function(){o.forEach(function(d){var f=Ou.get(d)-1,p=i.get(d)-1;Ou.set(d,f),i.set(d,p),f||(By.has(d)||d.removeAttribute(r),By.delete(
vendor: 6,417 bytes, lines 808-812
808d)),p||d.removeAttribute(n)}),w1--,w1||(Ou=new WeakMap,Ou=new WeakMap,By=new WeakMap,Wy={})}},Hw=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=Ahe(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live]"))),Ohe(r,a,n,"aria-hidden")):function(){return null}},Vw="Dialog",[EW,OW]=Hn(Vw),[Rhe,zs]=EW(Vw),RW=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:i,modal:o=!0}=e,l=g.useRef(null),c=g.useRef(null),[u,h]=ba({prop:r,defaultProp:a??!1,onChange:i,caller:Vw});return s.jsx(Rhe,{scope:t,triggerRef:l,contentRef:c,contentId:Oa(),titleId:Oa(),descriptionId:Oa(),open:u,onOpenChange:h,onOpenToggle:g.useCallback(()=>h(d=>!d),[h]),modal:o,children:n})};RW.displayName=Vw;var IW="DialogTrigger",MW=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=zs(IW,n),i=Fe(t,a.triggerRef);return s.jsx(we.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":S2(a.open),...r,ref:i,onClick:de(e.onClick,a.onOpenToggle)})});MW.displayName=IW;var k2="DialogPortal",[Ihe,DW]=EW(k2,{forceMount:void 0}),$W=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:a}=e,i=zs(k2,t);return s.jsx(Ihe,{scope:t,forceMount:n,children:g.Children.map(r,o=>s.jsx(Vn,{present:n||i.open,children:s.jsx(Eh,{asChild:!0,container:a,children:o})}))})};$W.displayName=k2;var Mb="DialogOverlay",LW=g.forwardRef((e,t)=>{const n=DW(Mb,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,i=zs(Mb,e.__scopeDialog);return i.modal?s.jsx(Vn,{present:r||i.open,children:s.jsx(Dhe,{...a,ref:t})}):null});LW.displayName=Mb;var Mhe=Ol("DialogOverlay.RemoveScroll"),Dhe=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=zs(Mb,n);return s.jsx(jg,{as:Mhe,allowPinchZoom:!0,shards:[a.contentRef],children:s.jsx(we.div,{"data-state":S2(a.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),ru="DialogContent",FW=g.forwardRef((e,t)=>{const n=DW(ru,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,i=zs(ru,e.__scopeDialog);return s.jsx(Vn,{present:r||i.open,children:i.modal?s.jsx($he,{...a,ref:t}):s.jsx(Lhe,{...a,ref:t})})});FW.displayName=ru;var $he=g.forwardRef((e,t)=>{const n=zs(ru,e.__scopeDialog),r=g.useRef(null),a=Fe(t,n.contentRef,r);return g.useEffect(()=>{const i=r.current;if(i)return Hw(i)},[]),s.jsx(BW,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:de(e.onCloseAutoFocus,i=>{var o;i.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:de(e.onPointerDownOutside,i=>{const o=i.detail.originalEvent,l=o.button===0&&o.ctrlKey===!0;(o.button===2||l)&&i.preventDefault()}),onFocusOutside:de(e.onFocusOutside,i=>i.preventDefault())})}),Lhe=g.forwardRef((e,t)=>{const n=zs(ru,e.__scopeDialog),r=g.useRef(!1),a=g.useRef(!1);return s.jsx(BW,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,l;(o=e.onCloseAutoFocus)==null||o.call(e,i),i.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),i.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:i=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const o=i.target;((u=n.triggerRef.current)==null?void 0:u.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&a.current&&i.preventDefault()}})}),BW=g.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:i,...o}=e,l=zs(ru,n),c=g.useRef(null),u=Fe(t,c);return Uw(),s.jsxs(s.Fragment,{children:[s.jsx(kg,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:i,children:s.jsx(mu,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":S2(l.open),...o,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),s.jsxs(s.Fragment,{children:[s.jsx(Bhe,{titleId:l.titleId}),s.jsx(qhe,{contentRef:c,descriptionId:l.descriptionId})]})]})}),j2="DialogTitle",WW=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=zs(j2,n);return s.jsx(we.h2,{id:a.titleId,...r,ref:t})});WW.displayName=j2;var qW="DialogDescription",UW=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=zs(qW,n);return s.jsx(we.p,{id:a.descriptionId,...r,ref:t})});UW.displayName=qW;var zW="DialogClose",HW=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=zs(zW,n);return s.jsx(we.button,{type:"button",...r,ref:t,onClick:de(e.onClick,()=>a.onOpenChange(!1))})});HW.displayName=zW;function S2(e){return e?"open":"closed"}var VW="DialogTitleWarning",[Fhe,GW]=XX(VW,{contentName:ru,titleName:j2,docsSlug:"dialog"}),Bhe=({titleId:e})=>{const t=GW(VW),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
809
810If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
811
812For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return g.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Whe="DialogDescriptionWarning",qhe=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${GW(Whe).contentName}}.`;return g.useEffect(()=>{var i;const a=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},N2=RW,C2=MW,P2=$W,Gw=LW,Yw=FW,Kw=WW,Xw=UW,Qw=HW;const An=N2,dm=C2,Uhe=P2,YW=g.forwardRef(({className:e,...t},n)=>s.jsx(Gw,{ref:n,className:K("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));YW.displayName=Gw.displayName;const En=g.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(Uhe,{children:[s.jsx(YW,{}),s.jsxs(Yw,{ref:r,className:K("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,s.jsxs(Qw,{className:"absolute right-4 top-4 roun
812ded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[s.jsx(Br,{className:"h-4 w-4"}),s.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));En.displayName=Yw.displayName;const wn=({className:e,...t})=>s.jsx("div",{className:K("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});wn.displayName="DialogHeader";const So=({className:e,...t})=>s.jsx("div",{className:K("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});So.displayName="DialogFooter";const _n=g.forwardRef(({className:e,...t},n)=>s.jsx(Kw,{ref:n,className:K("text-lg font-semibold leading-none tracking-tight",e),...t}));_n.displayName=Kw.displayName;const Zr=g.forwardRef(({className:e,...t},n)=>s.jsx(Xw,{ref:n,className:K("text-sm text-muted-foreground",e),...t}));Zr.displayName=Xw.displayName;const zhe=({open:e,onClose:t})=>s.jsx(An,{open:e,onOpenChange:n=>!n&&t(),children:s.jsxs(En,{children:[s.jsxs(wn,{children:[s.jsx(_n,{children:"Not available in the app"}),s.jsxs(Zr,{children:[M8," If you already have a plan, just log in — everything you've paid for works here."]})]}),s.jsx(z,{onClick:t,children:"Got it"})]})}),UI=[{key:"starter",name:"Starter",monthlyPrice:"$29",annualPrice:"$199",cadence:"2× / week posting",features:["104 Frameworks / year","LinkedIn & Facebook","Standard Automation"]},{key:"pro",name:"Pro",monthlyPrice:"$59",annualPrice:"$399",cadence:"3× / week posting",badge:"Most Popular",popular:!0,features:["156 Frameworks / year","LinkedIn & Facebook","TrendsPRO News Engine"]},{key:"dominance",name:"Market Dominance",monthlyPrice:"$99",annualPrice:"$699",cadence:"7× / week (Daily)",badge:"Maximum Growth",features:["365 Frameworks / year","AutoBlogPRO Automated CMS"]}],Hhe=({module:e,isOpen:t,onClose:n})=>{const[r,a]=g.useState("tier_selection"),[i,o]=g.useState("pro"),[l,c]=g.useState("monthly"),[u,h]=g.useState(""),[d,f]=g.useState(""),[p,y]=g.useState("signup"),[m,v]=g.useState(!1),[b,x]=g.useState(null),[w,_]=g.useState(!1),{toast:k}=Je();if(g.useEffect(()=>{t||(a("tier_selection"),h(""),f(""),v(!1),x(null),_(!1))},[t,e]),g.useEffect(()=>{const I=P=>{P.key==="Escape"&&t&&n()};return window.addEventListener("keydown",I),()=>window.removeEventListener("keydown",I)},[t,n]),g.useEffect(()=>(t?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[t]),!e)return null;const j=e.icon,S=UI.find(I=>I.key===i),N=l==="annual"?S.annualPrice:S.monthlyPrice,C=l==="annual"?"/yr":"/mo",M=()=>{const I={moduleSlug:e.id,selectedTier:i,billingCycle:l,timestamp:Date.now()};localStorage.setItem("sociepro_pending_checkout",JSON.stringify(I))},O=async()=>{try{const{data:{session:I}}=await W.auth.getSession();I!=null&&I.user?await R(I.access_token):a("auth")}catch{a("auth")}},D=async I=>{x(I==="google"?"google":"linkedin");try{M();const{error:A}=await W.auth.signInWithOAuth({provider:I,options:{redirectTo:`${window.location.origin}/auth/callback`}});if(A)throw A}catch(A){console.error(`OAuth error (${I}):`,A),k({title:"Authentication Error",description:A.message||`Failed to sign in with ${I==="google"?"Google":"LinkedIn"}.`,variant:"destructive"}),x(null)}},$=async I=>{var P,A,E;if(I.preventDefault(),!u.trim()||!d.trim()){k({title:"Missing Information",description:"Please enter your email and password.",variant:"destructive"});return}if(d.length<6){k({title:"Password Too Short",description:"Password must be at least 6 characters.",variant:"destructive"});return}v(!0);try{let T=null;if(p==="signup"){const{data:L,error:B}=await W.auth.signUp({email:u.trim(),password:d.trim(),options:{data:{selected_module:e.id,selected_tier:i}}});if(B)if(B.message.toLowerCase().includes("already registered")||B.message.toLowerCase().includes("already exists")){const{data:H,error:G}=await W.auth.signInWithPassword({email:u.trim(),password:d.trim()});if(G)throw y("login"),new Error("Account already exists. Please enter your password to sign in.");T=((P=H.session)==null?void 0:P.access_token)||null}else throw B;else T=((A=L.session)==null?void 0:A.access_token)||null,k({title:"Account Created! 🎉",description:"Redirecting you to secure payment..."})}else{const{data:L,error:B}=await W.auth.signInWithPassword({email:u.trim(),password:d.trim()});if(B)throw B;T=((E=L.session)==null?void 0:E.access_token)||null,k({title:"Welcome Back!",description:"Proceeding to checkout..."})}if(!T){const{data:{session:L}}=await W.auth.getSession();T=(L==null?void 0:L.access_token)||null}await R(T)}catch(T){console.error("Auth & Checkout error:",T),k({title:p==="signup"?"Account Setup Note":"Authentication 
812Error",description:T.message||"Failed to authenticate. Please check your credentials.",variant:"destructive"})}finally{v(!1)}},R=async I=>{if(!Ds()){_(!0);try{const P=`${window.location.origin}/dashboard?activated=true&tier=${i}&module=${e.id}`,A=`${window.location.origin}/?cancelled=true`,{data:E,error:T}=await W.functions.invoke("create-stripe-checkout",{headers:I?{Authorization:`Bearer ${I}`}:void 0,body:{tier:i,billingCycle:l,moduleSlug:e.id,successUrl:P,cancelUrl:A}});if(T)throw T;E!=null&&E.url?window.location.href=E.url:(k({title:"Module Activated! 🚀",description:`Your ${e.name} (${S.name}) plan is active. Redirecting to your dashboard...`}),window.location.href=P)}catch(P){console.error("Stripe session creation error:",P),k({title:"Checkout Error",description:P.message||"Could not initiate payment session.",variant:"destructive"})}finally{_(!1)}}};return Ds()?s.jsx(zhe,{open:t,onClose:n}):s.jsx(Wr,{children:t&&s.jsxs("div",{className:"fixed inset-0 z-50 flex justify-end overflow-hidden",children:[s.jsx(fe.div,{initial:{opacity:0}
812,animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},onClick:n,className:"fixed inset-0 bg-black/75 backdrop-blur-sm cursor-pointer","aria-hidden":"true"}),s.jsxs(fe.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:28,stiffness:280},className:"relative z-10 flex h-full w-full max-w-xl flex-col bg-[hsl(0_0%_6%)] border-l border-white/10 text-white shadow-2xl overflow-y-auto",children:[s.jsxs("div",{className:"flex items-start justify-between border-b border-white/10 p-6",children:[s.jsxs("div",{className:"flex items-center gap-3.5",children:[s.jsx("div",{className:`rounded-2xl ${e.bgColor} ${e.borderColor} border p-3.5`,children:s.jsx(j,{className:`h-7 w-7 ${e.color}`})}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("h3",{className:"font-display text-2xl font-bold text-white",children:e.name}),s.jsx(je,{variant:"outline",className:"border-[hsl(106_54%_87%/0.3)] text-[hsl(106_54%_87%)] bg-[hsl(106_54%_87%/0.1)] text-xs font-semibold",children:"1-Click Activation"})]}),s.jsx("p",{className:"text-xs text-white/50 mt-0.5",children:"Commercial Authority Engine"})]})]}),s.jsx(z,{variant:"ghost",size:"icon",onClick:n,className:"rounded-full text-white/60 hover:bg-white/10 hover:text-white","aria-label":"Close drawer",children:s.jsx(Br,{className:"h-5 w-5"})})]}),s.jsxs("div",{className:"bg-white/5 px-6 py-3 border-b border-white/10 flex items-center justify-between",children:[s.jsxs("p",{className:"text-xs md:text-sm font-medium text-[hsl(106_54%_87%)] flex items-center gap-2",children:[s.jsx(Se,{className:"h-4 w-4 shrink-0"}),e.hook]}),r==="auth"&&s.jsxs("button",{type:"button",onClick:()=>a("tier_selection"),className:"text-xs text-white/60 hover:text-white flex items-center gap-1 shrink-0",children:[s.jsx(Kc,{className:"h-3.5 w-3.5"})," Back"]})]}),r==="tier_selection"?s.jsxs("div",{className:"flex-1 space-y-6 p-6 overflow-y-auto",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsxs("h4",{className:"font-display text-xs font-bold tracking-wider text-white uppercase flex items-center gap-2",children:[s.jsx(Tn,{className:"h-4 w-4 text-[hsl(106_54%_87%)]"}),"Inside Your 1-Click Year:"]}),s.jsx("span",{className:"text-[11px] text-white/40",children:"Sample Authority Frameworks"})]}),s.jsx("div",{className:"space-y-2.5",children:e.samplePrompts.map((I,P)=>{const A=e.pillarHighlights[P]||{title:"Authority Pillar",type:"Evergreen"};return s.jsxs("div",{className:"rounded-xl border border-white/10 bg-white/5 p-3.5",children:[s.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[s.jsx("span",{className:"text-[10px] font-semibold tracking-wider uppercase text-[hsl(106_54%_87%)] bg-[hsl(106_54%_87%/0.12)] px-2 py-0.5 rounded-full border border-[hsl(106_54%_87%/0.2)]",children:A.type}),s.jsxs("span",{className:"text-[10px] text-white/40 font-mono",children:["Framework ",P+1]})]}),s.jsxs("p",{className:"text-xs font-medium text-white/90 leading-snug",children:['"',I,'"']})]},P)})})]}),s.jsxs("div",{className:"space-y-3 pt-2",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("h4",{className:"font-display text-xs font-bold tracking-wider text-white uppercase flex items-center gap-2",children:[s.jsx(gP,{className:"h-4 w-4 text-[hsl(106_54%_87%)]"}),"Select Your Plan Tier:"]}),s.jsxs("div",{className:"flex items-center rounded-lg border border-white/10 bg-white/5 p-0.5 text-[11px]",children:[s.jsx("button",{type:"button",onClick:()=>c("monthly"),className:K("rounded-md px-2.5 py-1 font-medium transition-colors",l==="monthly"?"bg-[hsl(106_54%_87%)] text-black font-semibold":"text-white/60 hover:text-white"),children:"Monthly"}),s.jsxs("button",{type:"button",onClick:()=>c("annual"),className:K("rounded-md px-2.5 py-1 font-medium transition-colors flex items-center gap-1",l==="annual"?"bg-[hsl(106_54%_87%)] text-black font-semibold":"text-white/60 hover:text-white"),children:["Annual",s.jsx("span",{className:"text-[9px] text-emerald-400 font-bold",children:"Save 35%"})]})]})]}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:UI.map(I=>{const P=i===I.key,A=l==="annual"?I.annualPrice:I.monthlyPrice,E=l==="annual"?"/yr":"/mo";return s.jsxs("div",{onClick:()=>o(I.key),className:K("relative flex flex-col justify-between rounded-xl border p-3.5 cursor-pointer transition-all duration-200",P?"border-[hsl(106_54%_87%)] bg-[hsl(106_54%_87%/0.12)] ring-1 ring-[hsl(106_54%_87%)]":"border-white/10 bg-white/5 hover:border-white/30 hover:bg-white/[0.08]"),children:[I.badge&&s.jsx("div",{className:"absolute -top-2.5 right-2 roun
812ded-full bg-[hsl(106_54%_87%)] px-2 py-0.5 text-[9px] font-bold text-black uppercase",children:I.badge}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-1",children:[s.jsx("span",{className:"text-xs font-bold text-white",children:I.name}),s.jsx("div",{className:K("h-4 w-4 rounded-full border flex items-center justify-center text-[10px]",P?"border-[hsl(106_54%_87%)] bg-[hsl(106_54%_87%)] text-black font-bold":"border-white/30"),children:P&&s.jsx($t,{className:"h-3 w-3 stroke-[3]"})})]}),s.jsxs("div",{className:"flex items-baseline gap-1 my-1",children:[s.jsx("span",{className:"text-xl font-bold text-white",children:A}),s.jsx("span",{className:"text-[10px] text-white/50",children:E})]}),s.jsx("p",{className:"text-[11px] font-medium text-[hsl(106_54%_87%)] mb-2",children:I.cadence}),s.jsx("ul",{className:"space-y-1 text-[10px] text-white/60 border-t border-white/5 pt-2",children:I.features.map((T,L)=>s.jsxs("li",{className:"flex items-center gap-1",children:[s.jsx("span",{className:"h-1 w-1 rounded-full bg-[hsl(106_54%_87%)]"}),T]},L))})]})]},I.key)})})]})]}):s.jsxs("div",{className:"flex-1 space-y-5 p-6 overflow-y-auto flex flex-col justify-between",children:[s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"rounded-2xl border border-[hsl(106_54%_87%/0.3)] bg-[hsl(106_54%_87%/0.08)] p-3.5 flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-[10px] uppercase font-bold tracking-wider text-[hsl(106_54%_87%)]",children:"Selected Plan"}),s.jsxs("div",{className:"text-sm font-bold text-white mt-0.5",children:[e.name," — ",S.name]}),s.jsx("div",{className:"text-[11px] text-white/60",children:S.cadence})]}),s.jsxs("div",{className:"text-right",children:[s.jsx("div",{className:"text-lg font-extrabold text-[hsl(106_54%_87%)]",children:N}),s.jsx("div",{className:"text-[10px] text-white/50",children:C})]})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsxs("h4",{className:"font-display text-base font-bold text-white flex items-center gap-2",children:[s.jsx(xJ,{className:"h-4 w-4 text-[hsl(106_54%_87%)]"}),p==="signup"?"Create Your Account":"Sign In to Your Account"]}),s.jsx("p",{className:"text-xs text-white/60",children:"Choose an authentication method to link your account and proceed to payment."})]}),s.jsxs("div",{className:"space-y-2 pt-1",children:[s.jsx(z,{type:"button",variant:"outline",className:"w-full h-10 text-xs font-semibold bg-[#0A66C2] hover:bg-[#004182] text-white border-[#0A66C2] hover:border-[#004182] gap-2",onClick:()=>D("linkedin_oidc"),disabled:!!b||m,children:b==="linkedin"?s.jsx(ce,{className:"h-4 w-4 animate-spin"}):s.jsxs(s.Fragment,{children:[s.jsx("svg",{className:"h-4 w-4 fill-current",viewBox:"0 0 24 24",children:s.jsx("path",{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"})}),"Continue with LinkedIn"]})}),s.jsx(z,{type:"button",variant:"outline",className:"w-full h-10 text-xs font-semibold bg-white/5 hover:bg-white/10 text-white border-white/15 gap-2",onClick:()=>D("google"),disabled:!!b||m,children:b==="google"?s.jsx(ce,{className:"h-4 w-4 animate-spin"}):s.jsxs(s.Fragment,{children:[s.jsxs("svg",{className:"h-4 w-4",viewBox:"0 0 24 24",children:[s.jsx("path",{fill:"#4285F4",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"}),s.jsx("path",{fill:"#34A853",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"}),s.jsx("path",{fill:"#FBBC05",d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"}),s.jsx("path",{fill:"#EA4335",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"})]}),"Continue with Google"]})})]}),s.jsxs("div",{className:"relative my-2",children:[s.jsx("div",{className:"absolute inset-0 flex items-center",children:s.jsx("div",{className:"w-full border-t border-white/10"})}),s.jsx("div",{className:"relative flex justify-center text-[10px] uppercase",children:s.jsx("span",{className:"bg-[hsl(0_0%_6%)] px-2 text-white/40",children:"Or continue with email"})})]}),s.jsxs("form",{onSubmit:$,className:"space-y-3",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsxs(X,{htmlFor:"drawer-email",className:"text-xs font-semibold text-white/80 flex items-center gap-1.5",children:[s.jsx(bw,{className:"h-3.5 w-3.5 text-[hsl(106_54%_87%)]"}),"Email Address"]}
812),s.jsx(ze,{id:"drawer-email",type:"email",placeholder:"[email protected]",required:!0,value:u,onChange:I=>h(I.target.value),className:"bg-white/5 border-white/15 text-white placeholder:text-white/30 h-9 text-xs focus:border-[hsl(106_54%_87%)]"})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsxs(X,{htmlFor:"drawer-password",className:"text-xs font-semibold text-white/80 flex items-center gap-1.5",children:[s.jsx(kl,{className:"h-3.5 w-3.5 text-[hsl(106_54%_87%)]"}),"Password"]}),s.jsx(ze,{id:"drawer-password",type:"password",placeholder:"••••••••",required:!0,minLength:6,value:d,onChange:I=>f(I.target.value),className:"bg-white/5 border-white/15 text-white placeholder:text-white/30 h-9 text-xs focus:border-[hsl(106_54%_87%)]"})]}),s.jsx("div",{className:"text-center pt-0.5",children:s.jsx("button",{type:"button",onClick:()=>y(p==="signup"?"login":"signup"),className:"text-[11px] text-white/60 hover:text-[hsl(106_54%_87%)] underline transition-colors",children:p==="signup"?"Already have an account? Sign in here →":"Need an account? Create one here →"})}),s.jsx("button",{type:"submit",className:"hidden"})]})]}),s.jsx("div",{className:"pt-2 text-center",children:s.jsx("button",{type:"button",onClick:()=>a("tier_selection"),className:"text-[11px] text-white/40 hover:text-white/80 transition-colors",children:"← Change Tier or Billing Period"})})]}),s.jsxs("div",{className:"border-t border-white/10 bg-[hsl(0_0%_4%)] p-6 space-y-3",children:[r==="tier_selection"?s.jsx(z,{size:"lg",onClick:O,disabled:w,className:"w-full bg-[hsl(106_54%_87%)] text-[hsl(0_0%_6%)] hover:bg-[hsl(106_54%_80%)] font-bold text-base shadow-lg shadow-[hsl(106_54%_87%/0.2)] h-12",children:w?s.jsxs(s.Fragment,{children:[s.jsx(ce,{className:"h-5 w-5 animate-spin mr-2"}),"Preparing Payment..."]}):s.jsxs(s.Fragment,{children:["Start ",e.name," — ",S.name," (",N,C,")",s.jsx(Sr,{className:"ml-2 h-5 w-5"})]})}):s.jsx(z,{size:"lg",onClick:$,disabled:m||w||!!b,className:"w-full bg-[hsl(106_54%_87%)] text-[hsl(0_0%_6%)] hover:bg-[hsl(106_54%_80%)] font-bold text-base shadow-lg shadow-[hsl(106_54%_87%/0.2)] h-12",children:m||w?s.jsxs(s.Fragment,{children:[s.jsx(ce,{className:"h-5 w-5 animate-spin mr-2"}),"Creating Account & Launching Payment..."]}):s.jsxs(s.Fragment,{children:[p==="signup"?"Create Account & Continue to Payment":"Sign In & Continue to Payment",s.jsx(Sr,{className:"ml-2 h-5 w-5"})]})}),s.jsxs("div",{className:"flex items-center justify-between text-[11px] text-white/40 px-1",children:[s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(ww,{className:"h-3.5 w-3.5 text-emerald-400"}),"14-Day Money-Back Guarantee"]}),s.jsx("span",{children:"Encrypted & Secure"})]})]})]})]})})},Vhe={hidden:{opacity:0},visible:{opacity:1,transition:{staggerChildren:.06}}},Ghe={hidden:{opacity:0,y:20},visible:{opacity:1,y:0,transition:{duration:.4}}},Yhe=()=>{const[e,t]=g.useState(null),[n,r]=g.useState(!1),a=i=>{t(i),r(!0)};return s.jsxs(s.Fragment,{children:[s.jsx(fe.div,{variants:Vhe,initial:"hidden",whileInView:"visible",viewport:{once:!0},className:"grid gap-6 sm:grid-cols-2 lg:grid-cols-3 max-w-6xl mx-auto",children:_2.map(i=>{const o=i.icon;return s.jsxs(fe.div,{variants:Ghe,onClick:()=>a(i),className:`group relative rounded-2xl border ${i.borderColor} ${i.bgColor} p-6 transition-all duration-300 hover:shadow-xl hover:scale-[1.02] hover:border-white/40 cursor-pointer flex flex-col justify-between text-left`,children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsx("div",{className:`rounded-xl ${i.bgColor} ${i.borderColor} border p-3.5`,children:s.jsx(o,{className:`h-6 w-6 ${i.color}`,"aria-hidden":"true"})}),s.jsx("span",{className:"text-[10px] font-medium tracking-wider uppercase text-white/40 group-hover:text-[hsl(106_54%_87%)] transition-colors",children:"Daily Frameworks"})]}),s.jsx("h3",{className:"font-display text-lg font-bold text-white group-hover:text-[hsl(106_54%_87%)] transition-colors",children:i.name}),s.jsx("p",{className:"mt-2 text-xs leading-relaxed text-white/60 line-clamp-2",children:i.tagline})]}),s.jsxs("div",{className:"mt-5 pt-3 border-t border-white/5 flex items-center justify-between text-xs text-white/50 group-hover:text-white",children:[s.jsxs("span",{className:"flex items-center gap-1 font-medium text-[hsl(106_54%_87%)] opacity-80 group-hover:opacity-100",children:[s.jsx(Se,{className:"h-3.5 w-3.5"}),"Preview 1-Click Year"]}),s.jsx(Sr,{className:"h-4 w-4 text-[hsl(106_54%_87%)] transform translate-x-0 group-hover:translate-x-1 transition-transform"})]})]},i.id)})}),s.jsx(Hhe,{module:e,isOpen:n,onClose:()=>r(!1)})]})},Khe=["Daily ClickPRO authority posts","Industry-specific high-conversion templates","Automated publishing & CMS distribution","Performance tracking inside InsightsPRO"],Xhe=()=>s.jsx("section",{className:"py-20 lg:py-28 landing-gradient-hero","aria-labelledby":"modules-title",children:s.jsxs("div",{className:"container px-4",children:[s.jsxs(fe.header,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5},className:"text-center mb-6",children:[s.jsx("h2",{id:"modules-title",className:"font-display text-3xl font-bold tracking-tight text-white md:text-4xl lg:text-5xl",children:"Built For Your Industry"}),s.jsx("p",{className:"mt-3 text-sm md:text-base text-white/60 max-w-2xl mx-auto",children:"Click any commercial module below to preview real 1-Cl
812ick Year content examples generated specifically for your vertical."})]}),s.jsx(fe.ul,{initial:{opacity:0},whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.5,delay:.1},className:"mx-auto mb-14 flex max-w-3xl flex-wrap items-center justify-center gap-x-6 gap-y-2 text-sm text-white/50",children:Khe.map(e=>s.jsxs("li",{className:"flex items-center gap-1.5",children:[s.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-[hsl(106_54%_87%)]","aria-hidden":"true"}),e]},e))}),s.jsx(Yhe,{}),s.jsxs(fe.div,{initial:{opacity:0},whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.5,delay:.4},className:"mt-12 mx-auto max-w-md rounded-xl border border-white/10 bg-white/5 px-6 py-4 text-center",children:[s.jsxs("div",{className:"flex items-center justify-center gap-2 text-sm text-white/50",children:[s.jsx(eJ,{className:"h-4 w-4 text-[hsl(106_54%_87%)]","aria-hidden":"true"}),s.jsx("span",{className:"font-medium text-white/70",children:"Included With Every Plan"})]}),s.jsx("p",{className:"mt-1 text-xs text-white/40",children:"Property Manager Lite — A small set of ready-to-use property management social media templates, included free."})]}),s.jsx(fe.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:.5},className:"mt-12 text-center",children:s.jsx(z,{size:"lg",className:"bg-[hsl(106_54%_87%)] text-[hsl(0_0%_6%)] hover:bg-[hsl(106_54%_80%)] font-semibold",asChild:!0,children:s.jsxs("a",{href:"#modules-title",children:["Click Any Module Above to Start",s.jsx(Sr,{className:"ml-1 h-4 w-4","aria-hidden":"true"})]})})})]})}
812),Qhe=[{icon:gP,label:"Choose your professional module"},{icon:Tn,label:"Activate ClickPRO, TrendsPRO, or create custom posts"},{icon:ki,label:"Publish social content and long-form blogs"},{icon:Oh,label:"Track performance inside InsightsPRO"}],Jhe=()=>s.jsx("section",{id:"how-it-works",className:"py-20 lg:py-28 bg-background","aria-labelledby":"how-title",children:s.jsxs("div",{className:"container px-4",children:[s.jsx(fe.header,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5},className:"text-center mb-14",children:s.jsx("h2",{id:"how-title",className:"font-display text-3xl font-bold tracking-tight text-foreground md:text-4xl lg:text-5xl",children:"Authority, Automated."})}),s.jsx("div",{className:"mx-auto grid max-w-3xl gap-6 sm:grid-cols-2",children:Qhe.map((e,t)=>s.jsxs(fe.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.4,delay:t*.1},className:"flex items-start gap-4 rounded-2xl border border-border bg-card p-6",children:[s.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-[hsl(106_54%_87%/0.12)]",children:s.jsx(e.icon,{className:"h-5 w-5 text-[hsl(106_54%_87%)]","aria-hidden":"true"})}),s.jsxs("div",{children:[s.jsxs("span",{className:"text-xs font-semibold text-muted-foreground",children:["Step ",t+1]}),s.jsx("p",{className:"mt-1 font-medium text-foreground",children:e.label})]})]},e.label))}),s.jsx(fe.p,{initial:{opacity:0}
812,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.5,delay:.5},className:"mt-10 text-center text-lg text-muted-foreground",children:"Consistency becomes effortless. Credibility becomes automatic."})]})}),Zhe=[{icon:Se,label:"Articles built from your PositioningEnginePRO profile"},{icon:dr,label:"Industry-specific authority topics"},{icon:Jd,label:"Search-optimized structure"},{icon:pr,label:"Publish-ready in minutes"}],efe=()=>s.jsx("section",{className:"py-20 lg:py-28 landing-gradient-hero","aria-labelledby":"longform-title",children:s.jsxs("div",{className:"container px-4",children:[s.jsxs(fe.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5},className:"mx-auto max-w-3xl text-center",children:[s.jsxs("h2",{id:"longform-title",className:"font-display text-3xl font-bold tracking-tight text-white md:text-4xl lg:text-5xl",children:["Own More Than The Feed."," ",s.jsx("span",{className:"text-[hsl(106_54%_87%)]",children:"Own The Search Results."})]}),s.jsxs("div",{className:"mt-10 space-y-6 text-lg leading-relaxed text-white/70",children:[s.jsxs("p",{children:["Short posts build presence.",s.jsx("br",{}),"Long-form content builds authority."]}),s.jsx("p",{children:"AutoBlogPRO supports every module — from Realtors to Creators — generating SEO-driven authority content aligned with your PositioningEnginePRO profile. Increase visibility, improve search rankings, and deepen trust with your audience — automatically."}),s.jsxs("p",{className:"text-white/50",children:["While others compete for attention in the scroll —",s.jsx("br",{}),"you build credibility that compounds."]})]})]}),s.jsx(fe.div,{initial:{opacity:0,y:16},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:.2},className:"mx-auto mt-14 grid max-w-2xl gap-4 sm:grid-cols-2",children:Zhe.map((e,t)=>s.jsxs("div",{className:"flex items-center gap-3 rounded-xl border border-white/10 bg-white/5 px-5 py-4",children:[s.jsx(e.icon,{className:"h-5 w-5 shrink-0 text-[hsl(106_54%_87%)]","aria-hidden":"true"}),s.jsx("span",{className:"text-sm font-medium text-white/80",children:e.label})]},t))}),s.jsx(fe.p,{initial:{opacity:0}
812,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.5,delay:.4},className:"mt-10 text-center text-lg font-medium text-[hsl(106_54%_87%)]",children:"Because professionals who write — lead."})]})}),tfe=()=>s.jsx("section",{className:"py-20 lg:py-28 landing-gradient-hero","aria-labelledby":"why-title",children:s.jsx("div",{className:"container px-4",children:s.jsxs(fe.div,{initial:{opacity:0,y:24},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},className:"mx-auto max-w-3xl text-center",children:[s.jsxs("h2",{id:"why-title",className:"font-display text-3xl font-bold tracking-tight text-white md:text-4xl lg:text-5xl",children:["This Isn't Social Media Management.",s.jsx("br",{}),s.jsx("span",{className:"text-gradient",children:"It's Market Positioning."})]}),s.jsxs("div",{className:"mt-8 space-y-5 text-lg leading-relaxed text-white/60",children:[s.jsx("p",{children:"Most platforms help you post."}),s.jsx("p",{children:"SociePRO helps you become the professional your audience already trusts — with automated content for professionals powered by evergreen social media posts and real estate social media marketing strategies."}),s.jsx("p",{className:"font-medium text-white/80",children:"Because visibility without positioning is just noise."})]})]})})}),nfe=[{icon:xw,label:"PostPRO"},{icon:vn,label:"TrendsPRO"},{icon:li,label:"ClickPRO"},{icon:dr,label:"AutoBlogPRO"},{icon:Oh,label:"InsightsPRO"}],rfe=()=>s.jsx("section",{className:"py-12 bg-[hsl(0_0%_8%)] border-y border-white/5","aria-label":"Platform features",children:s.jsx("div",{className:"container px-4",children:s.jsx(fe.div,{initial:{opacity:0}
812,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.5},className:"flex flex-wrap items-center justify-center gap-8 md:gap-14",children:nfe.map(e=>s.jsxs("div",{className:"flex items-center gap-2 text-white/50",children:[s.jsx(e.icon,{className:"h-4 w-4 text-[hsl(106_54%_87%/0.7)]","aria-hidden":"true"}),s.jsx("span",{className:"text-sm font-medium tracking-wide",children:e.label})]},e.label))})})}),afe=()=>s.jsxs("section",{className:"relative overflow-hidden py-24 lg:py-32 bg-[hsl(0_0%_6%)]","aria-labelledby":"cta-heading",children:[s.jsxs("div",{className:"absolute inset-0","aria-hidden":"true",children:[s.jsx("div",{className:"absolute -top-1/2 -left-1/4 h-[600px] w-[600px] rounded-full bg-[hsl(106_54%_87%/0.06)] blur-3xl"}),s.jsx("div",{className:"absolute -bottom-1/2 -right-1/4 h-[600px] w-[600px] rounded-full bg-[hsl(28_100%_86%/0.06)] blur-3xl"})]}),s.jsx("div",{className:"container relative z-10 px-4",children:s.jsxs(fe.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5},className:"mx-auto max-w-3xl text-center",children:[s.jsx("h2",{id:"cta-heading",className:"font-display text-3xl font-bold tracking-tight text-white md:text-4xl lg:text-5xl",children:"Step Into Your Authority."}),s.jsxs("div",{className:"mt-10 flex flex-col items-center justify-center gap-4",children:[s.jsx(z,{size:"xl",className:"bg-[hsl(106_54%_87%)] text-[hsl(0_0%_6%)] hover:bg-[hsl(106_54%_80%)] font-semibold shadow-lg",asChild:!0,children:s.jsxs("a",{href:"#modules-title","aria-label":"Select your professional module",children:["Select Your Module",s.jsx(Sr,{className:"ml-1 h-5 w-5","aria-hidden":"true"})]})}),!Ds()&&s.jsx("p",{className:"text-sm text-white/50",children:"Annual professional modules starting at $199 per year."})]})]})})]}),rh=[{slug:"real-estate-agents",moduleId:"realtor",professional:"real estate agent",audience:"Real Estate Agents",metaTitle:"AI Social Media Content for Real Estate Agents | RealtorPRO by SociePRO",metaDescription:"RealtorPRO writes and schedules LinkedIn and Facebook posts for real estate agents, built from your market, your niche and your story — with Fair Housing language checks built in.",h1:"Social media content for real estate agents that sounds like you, not every other agent",intro:"RealtorPRO is SociePRO's module for agents and brokers. It turns a short positioning questionnaire about your market, your clients and how you work into a steady schedule of posts that build local authority — so sellers think of you first instead of the agent with the biggest ad budget.",problems:["Competing with thousands of agents in your market","Feeling invisible online while other agents dominate social media","Relying on expensive leads from Zillow, Realtor.com or paid ads","Prospecting fatigue from cold calling and door knocking","Clients who see you as interchangeable with any other agent"],guardrails:["Fair Housing checks: flags language that codes for demographics, like “perfect for families,” “safe neighborhood” or school-quality claims","No market predictions or “act now before prices rise” pressure","Posts describe client situations and transactions, never protected characteristics","Flagged content waits for your review before it publishes"],reviewRequired:!0,faqs:[{q:"What is a good AI tool for real estate agent social media posts?",a:"Look for a tool that writes from your market and your niche rather than generic real estate templates, posts on a schedule so you stay consistent, and checks for Fair Housing problems before anything goes live. SociePRO's RealtorPRO module does all three: you answer a positioning questionnaire, it generates posts in your voice for LinkedIn and Facebook, schedules them automatically, and flags language like school-quality or “family-friendly neighborhood” claims for your review."},{q:"How can a real estate agent post consistently without spending hours on social media?",a:"Batch it and automate the schedule. With SociePRO you set up your positioning once, then the platform fills your calendar — two posts a week on Starter up to a post every day on Market Dominance — and publishes them for you. Most of your time goes into reviewing drafts, not writing them."},{q:"Can AI-written real estate posts break Fair Housing rules?",a:"They can, because generic AI tools happily write p
812hrases like “great schools” or “perfect for young families.” RealtorPRO generates content under Fair Housing-aware rules and scans every draft for demographic, school-quality and coded-neighborhood language, holding anything flagged for your review. It's a safeguard, not legal advice — your broker's policies still apply."}]},{slug:"financial-advisors",moduleId:"financial_advisor",professional:"financial advisor",audience:"Financial Advisors",metaTitle:"Compliance-Aware Social Media Content for Financial Advisors | AdvisorPRO by SociePRO",metaDescription:"AdvisorPRO writes LinkedIn and Facebook content for financial advisors that flags guarantee, performance and risk-free language and holds it for review — built around your planning process and clients.",h1:"Social media content for financial advisors, written with compliance in mind",intro:"AdvisorPRO is SociePRO's module for financial advisors and planners. It builds content from how you actually work — your planning process, the clients you serve and what you believe — and screens every draft for the language compliance teams reject, so you can post consistently without second-guessing every word.",problems:["Compliance rules make posting anything feel risky","Prospects can't tell you apart from a robo-advisor","Referrals have slowed and cold outreach feels desperate","Sounding like every other advisor: “holistic planning,” “fiduciary duty,” “retirement readiness”","High-net-worth clients want to find you through trust, not a pitch"],guardrails:["Flags guarantee language, “risk-free” claims, return percentages, “beat the market” and past-performance proof","Educational framing only for vulnerable audiences, such as the recently widowed","Competitor contrasts framed as your philosophy, never as accusations","Flagged posts and blog articles wait for your review before publishing"],reviewRequired:!0,faqs:[{q:"What is a good social media tool for financial advisors that handles compliance?",a:"Advisors need content that is specific enough to stand out but never makes performance claims or promises. SociePRO's AdvisorPRO module generates posts from your planning process and client focus, flags red-flag language such as guarantees, “risk-free,” return percentages and past-performance proof, and holds flagged items for your review before anything publishes. It supports your firm's compliance process; it doesn't replace it."},{q:"Can financial advisors use AI to write LinkedIn posts?",a:"Yes, as long as a human reviews them and they go through your firm's normal approval process. The risk with general AI tools is that they write confident, promotional copy. AdvisorPRO writes educational content under advisor-specific rules and routes flagged drafts to you first, which makes review faster rather than skipping it."},{q:"How can a financial advisor get clients from LinkedIn without cold outreach?",a:"Publish consistently about the situations your ideal clients are in and how you think about them, so prospects and referral partners already trust you before the first meeting. SociePRO automates that schedule — two to seven posts a week depending on plan — using your positioning answers so the content reads as yours, not as generic advisor marketing."}]},{slug:"insurance-agents",moduleId:"insurance",professional:"insurance agent",audience:"Insurance Agents",metaTitle:"AI Social Media Content for Insurance Agents | InsurancePRO by SociePRO",metaDescription:"InsurancePRO writes social media content for independent and captive insurance agents that explains coverage without promises, flags risky claims and holds them for review.",h1:"Social media content for insurance agents that makes coverage worth paying attention to",intro:"InsurancePRO is SociePRO's module for insurance agents. It helps you show prospects what cheap policies leave out and why an agent matters — in your voice, on a steady schedule — while screening every draft for the claims that get agents in trouble.",problems:["Insurance feels boring until someone needs it","Direct writers and online quotes commoditize the product","Prospects shop on price and don't understand coverage differences","Compliance limits what you can say and how","Referrals are your lifeblood, and they've slowed down"],guardrails:["Flags guarantee language, “cheapest/lowest rates” and coverage promises like “fully covered”","N
812o fear-based framing such as “before it's too late”","Claim stories stay anonymized and never become promises of outcome","Medicare-related content always routes to your approval queue","Flagged content waits for your review before publishing"],reviewRequired:!0,faqs:[{q:"What is a good AI tool for insurance agent social media marketing?",a:"Choose one that explains coverage in plain language without making promises, and that knows insurance-specific red flags. SociePRO's InsurancePRO module generates educational posts from your lines of business and client situations, flags phrases like “guaranteed,” “lowest rates” and “fully covered,” and sends Medicare-related content to your approval queue every time."},{q:"How do insurance agents compete with Geico and Progressive on social media?",a:"Not on price. Agents win by teaching what a policy actually covers and by being the person people already know when something goes wrong. Consistent posts about coverage gaps, policy reviews and anonymized claim lessons build that recognition. SociePRO schedules that content automatically so it keeps going during busy renewal seasons."},{q:"Is AI-generated insurance marketing content compliant?",a:"Only if it's written carefully and reviewed. InsurancePRO uses general framing (“coverage varies by policy and state”), avoids fear tactics and outcome promises, and holds anything flagged for your review. It's a guardrail, not legal approval — follow your carrier's and state's advertising rules."}]},{slug:"mortgage-loan-officers",moduleId:"mortgage",professional:"mortgage loan officer",audience:"Mortgage Loan Officers",metaTitle:"AI Social Media Content for Mortgage Loan Officers | MortgagePRO by SociePRO",metaDescription:"MortgagePRO writes social media content for loan officers and mortgage brokers that builds agent and borrower trust — with fair lending, rate-prediction and approval-promise checks built in.",h1:"Social media content for mortgage loan officers that builds trust beyond the rate",intro:"MortgagePRO is SociePRO's module for loan officers and mortgage brokers. It positions you as the guide borrowers and real estate agents trust in any rate environment, and screens every draft for fair lending and Reg Z problems before it goes out.",problems:["Rate shoppers who only care about the lowest number","Agents with established lender relationships you can't break into","Market volatility makes confident advice hard","Online lenders and apps commoditize the mortgage process","Long sales cycles demand a consistent pipeline"],guardrails:["Fair lending checks: no demographic targeting, coded neighborhood language or school-quality claims","Flags rate predictions, “lowest rates,” and approval promises like “guaranteed approval” or “no credit check”","Rate and program content stays informational — never a personalized quote","Flagged content waits for your review before publishing"],reviewRequired:!0,faqs:[{q:"What is a good AI social media tool for mortgage loan officers?",a:"One that writes educational content borrowers and agents value, and that knows mortgage compliance red flags. SociePRO's MortgagePRO module generates posts from your loan specialties and referral relationships, flags rate predictions, approval promises and fair-lending problems, and holds flagged drafts for your review before they publish."},{q:"How can loan officers get more real estate agent referrals from social media?",a:"Agents refer lenders they see being reliable and knowledgeable. Posting consistently about how you solve closing problems, explain programs and communicate during a deal gives agents proof before you ever ask. SociePRO keeps that content on schedule on LinkedIn and Facebook so it doesn't stop when your pipeline gets busy."},{q:"Can mortgage professionals post about rates on social media?",a:"Generally yes, as informational content, but you have to avoid predictions, superlatives and anything that reads like a personalized quote or commitment. MortgagePRO frames rate content that way by default and flags language like “rates will drop” or “lowest rates” for review. Follow your company's compliance policies and applicable advertising rules."}]},{slug:"home-builders-remodelers",moduleId:"builder_remodeler",professional:"home builder or remodeler",audience:"Home Builders & Remodelers",metaTitle:"AI Social Media Content for Home Builders & Remodelers | BuilderPRO by SociePRO",metaDescription:"BuilderPRO writes and schedules social media content for custom home builders and remodelers that shows craftsmanship and process — so homeowners stop comparing you to the cheapest bid.",h1:"Social media content for builders and remodelers that sells craftsmanship, not the lowest bid",intro:"BuilderPRO is SociePRO's module for custom home builders, remodelers and contractors. It turns your process, standards and project knowledge into steady content that shows homeowners why quality costs what it does — and keeps your pipeline warm between projects.",problems:["Competing on price with unlicensed contractors and handyman services","Homeowners don't understand the difference between a quality build and a cheap one","Feast-or-famine cycles with no consistent pipeline","Projects take months, so there's little to show along the way","Negative stereotypes about contractors being late, over budget and messy"],guardrails:["Flags guarantee language so posts never promise outcomes you can't control","Content built from your real process and standards, not generic contractor tips"],reviewRequired:!1,faqs:[{q:"What is a good social media tool for home builders and remodelers?",a:"One that understands construction well enough to explain process, materials and standards — not just post project photos. SociePRO's BuilderPRO module writes content from your positioning answers about the work you do and the clients you want, and schedules it automatically on LinkedIn and Facebook so you stay visible while you're on job sites."},{q:"How can contractors get leads from social media without paying for ads?",a:"Show homeowners how y
812ou think: what you check before quoting, where cheap jobs cut corners, how you keep a remodel on schedule. That kind of content pre-sells quality and filters out pure price shoppers. SociePRO keeps it publishing on a set cadence so leads don't depend on when you have time to post."},{q:"What should a remodeler post on Facebook when projects take months?",a:"Post the process, not just the reveal: planning decisions, problems found behind walls and how you solved them, material choices and why. BuilderPRO's content pillars are built around that kind of mid-project authority content, so there's always something worth posting."}]},{slug:"property-managers",moduleId:"property_manager",professional:"property manager",audience:"Property Managers",metaTitle:"AI Social Media Content for Property Managers | PropertyManagerPRO by SociePRO",metaDescription:"PropertyManagerPRO writes social media content for property managers that wins owners and good tenants — with Fair Housing screening for every draft.",h1:"Social media content for property managers that shows owners the value you add",intro:"PropertyManagerPRO is SociePRO's module for property managers and landlords. It positions you as the expert owners trust with their asset, explains the hidden costs of self-managing, and checks every draft against Fair Housing pitfalls.",problems:["Owners see you as a cost center, not a value driver","Tenant communication is a constant drain","Competing with DIY landlords who think they can do it themselves","Industry stereotypes about bad landlords","Attracting quality owners and quality tenants at the same time"],guardrails:["Fair Housing checks: flags demographic targeting, coded neighborhood language, “no Section 8” style exclusions and school-quality claims","Tenant qualification content references objective, uniformly applied criteria only"],reviewRequired:!1,faqs:[{q:"What is a good social media tool for property management companies?",a:"Look for one that writes owner-focused content (returns, risk, time saved) as well as tenant content, and that screens for Fair Housing problems. SociePRO's PropertyManagerPRO module does both, generating posts from your portfolio and service area and flagging exclusionary or demographic language before it publishes."},{q:"How can property managers attract more rental property owners?",a:"Teach owners what self-management really costs — vacancy, turnover, legal risk, late-night calls — and show how you handle it. Consistent educational content makes you the obvious call when an owner gets tired of doing it alone. SociePRO schedules that content automatically on LinkedIn and Facebook."},{q:"Can property managers use AI to write rental listings and posts safely?",a:"Yes, with screening. Generic AI often writes phrases like “perfect for families” or “quiet, safe neighborhood,” which can create Fair Housing risk. PropertyManagerPRO generates content under Fair Housing-aware rules and flags those patterns. It's a safeguard, not legal advice."}]},{slug:"short-term-rental-hosts",moduleId:"host",professional:"short-term rental host",audience:"Short-Term Rental Hosts",metaTitle:"AI Social Media Content for Airbnb & Vacation Rental Hosts | HostPRO by SociePRO",metaDescription:"HostPRO writes and schedules social media content for Airbnb and vacation rental hosts to build direct bookings and a brand guests remember — beyond the platform algorithm.",h1:"Social media content for short-term rental hosts who want guests to book them, not just a listing",intro:"HostPRO is SociePRO's module for Airbnb, Vrbo and vacation rental hosts. It builds a brand around your property and hospitality so returning guests and referrals don't depend entirely on a platform's algorithm.",problems:["A race to the bottom on pricing as new hosts undercut rates","Platform algorithm changes that tank listing visibility overnight","One bad review undoing months of work","Seasonal feast-or-famine cash flow","Difficult guests and the emotional toll of hospitality"],guardrails:["Content references stay types and trip purposes, never protected guest characteristics, in line with booking-platform nondiscrimination policies","Flags exclusionary phrasing like “couples only” or “no kids”"],reviewRequired:!1,faqs:[{q:"What is a good social media tool for Airbnb hosts?",a:"One that builds your property's brand and keeps posting during busy turnover weeks. SociePRO's HostPRO module writes content from your property, location and guest experience — local guides, behind-the-scenes hosting, seasonal stays — and schedules it automatically, while avoiding exclusionary guest language that conflicts with platform policies."},{q:"How can vacation rental hosts get more direct bookings?",a:"Give past and future guests a reason to follow you outside the booking platform: local recommendations, property updates and seasonal offers they can only get from you. Consistent social content keeps you top of mind for return trips and referrals. SociePRO automates that schedule so it doesn't depend on your free time."},{q:"What should a short-term rental host post on social media?",a:"Local insider guides, what makes your stay different, how you prepare between guests, seasonal reasons to visit, and answers to the questions guests ask most. HostPRO's content pillars are built around those themes."}]},{slug:"restaurants",moduleId:"restaurantpro",professional:"restaurant owner",audience:"Restaurants",metaTitle:"AI Social Media Content for Restaurants | RestaurantPRO by SociePRO",metaDescription:"RestaurantPRO writes and schedules social media content for independent restaurants — your kitchen, sourcing and story — so you can stay visible without a marketing team.",h1:"Social media content for restaurants, without adding another job to the owner's day",intro:"RestaurantPRO is SociePRO's module for independent restaurants and hospital
812ity businesses. It turns your kitchen, sourcing and team into a steady stream of posts that drive direct visits and reservations, so social media stops being a full-time job on top of running the place.",problems:["Delivery apps taking a large share of every order","Online reviews that feel out of your control","New competitors opening every month","Social media feeling like a full-time job on top of running a restaurant","Staffing gaps that keep you in the kitchen instead of building the brand"],guardrails:["Never states unverified health, allergen-free or nutrition claims — describes sourcing and kitchen process only","Describes occasions and dining styles, never who is or isn't welcome"],reviewRequired:!1,faqs:[{q:"What is a good social media tool for a small restaurant?",a:"One that writes from your actual food, sourcing and team, and posts on its own so you don't have to remember. SociePRO's RestaurantPRO module generates content from your positioning answers — your cuisine, what makes your kitchen different, your regulars — and schedules it automatically on Facebook and LinkedIn."},{q:"How can a restaurant get more direct customers instead of relying on delivery apps?",a:"Build a relationship with diners directly: behind-the-scenes kitchen content, sourcing stories, specials and events that give people a reason to come in or order from you. Consistency matters more than polish. SociePRO keeps that content going even during your busiest weeks."},{q:"What should restaurants avoid saying in social media posts?",a:"Unverified health or allergen claims (“allergen-free,” “safe for celiacs”) are the big one, along with anything implying certain guests aren't welcome. RestaurantPRO avoids and flags those automatically and keeps posts focused on facts about sourcing, process and experience."}]},{slug:"freelancers-consultants",moduleId:"freelance_consultant",professional:"freelancer or consultant",audience:"Freelancers & Consultants",metaTitle:"AI LinkedIn Content for Freelancers & Consultants | FreelanceConsultantPRO by SociePRO",metaDescription:"FreelanceConsultantPRO writes and schedules LinkedIn content for freelancers and consultants that shows expertise and process — so clients come to you instead of the other way around.",h1:"LinkedIn content for freelancers and consultants who are tired of pitching",intro:"FreelanceConsultantPRO is SociePRO's module for independent consultants and freelancers. It turns your methods, opinions and client work into consistent LinkedIn content that makes your value obvious before the first call — so you compete on expertise, not hourly rate.",problems:["Feast-or-famine revenue cycles","Competing on price with offshore talent and AI tools","Scope creep and clients who don't respect boundaries","Struggling to explain value beyond an hourly rate","Constant pitching and proposals with low conversion"],guardrails:["Never promises revenue figures, multipliers or guaranteed client outcomes","Describes process, deliverables and what changed — not projected financial results"],reviewRequired:!1,faqs:[{q:"What is a good AI tool for consultants to write LinkedIn posts?",a:"One that starts from your actual expertise — your process, your opinions, the problems you solve — instead of generic thought-leadership templates. SociePRO's FreelanceConsultantPRO module builds posts from your positioning answers and schedules them automatically, while avoiding the income and results claims that make consultant content read as hype."},{q:"How can freelancers get clients from LinkedIn without cold pitching?",a:"Post consistently about the problems your ideal clients have and how you approach them, so prospects arrive already convinced. Two or three useful posts a week beats sporadic bursts. SociePRO automates that cadence so it continues while you're delivering client work."},{q:"How often should a consultant post on LinkedIn?",a:"Two to three times a week is a sustainable baseline for most consultants; consistency matters more than volume. SociePRO's plans run from two posts a week (Starter) to daily (Market Dominance), all scheduled automatically."}]},{slug:"personal-trainers",moduleId:"personal_trainer",professional:"personal trainer",audience:"Personal Trainers",metaTitle:"AI Social Media Content for Personal Trainers | PersonalTrainerPRO by SociePRO",metaDescription:"PersonalTrainerPRO writes and schedules social media content for personal trainers and fitness coaches that builds trust without medical claims or weight-loss promises.",h1:"Social media content for personal trainers that builds trust, not hype",intro:"PersonalTrainerPRO is SociePRO's module for personal trainers and fitness coaches. It positions you as the expert worth paying for instead of a free YouTube workout — with content rules that keep you away from medical claims and promised results.",problems:["Competing with free YouTube workouts and fitness influencers","Clients comparing your rates to a cheap gym membership","Feast-or-famine client cycles","Re
812sults are hard to show when clients are private about their bodies","Burnout from trading hours for dollars"],guardrails:["Never diagnoses, treats or gives medical advice, or overrides a client's medical restrictions","Flags weight-loss and timeline promises like “lose 20 lbs in 30 days”","Transformations framed as one person's experience, with results varying"],reviewRequired:!1,faqs:[{q:"What is a good social media content tool for personal trainers?",a:"One that writes expert, trust-building content in your voice rather than generic motivation, and that avoids the claims that hurt trainers' credibility. SociePRO's PersonalTrainerPRO module generates posts from your training approach and client focus, schedules them automatically, and flags medical claims and weight-loss or timeline promises."},{q:"How can personal trainers get clients from social media?",a:"Show your thinking, not just workouts: how you assess a new client, why you program the way you do, common mistakes you fix. That separates you from free content and justifies your rate. SociePRO keeps that content publishing consistently so you're not posting only when your schedule is empty."},{q:"What claims should fitness trainers avoid in social media marketing?",a:"Guaranteed weight loss or timelines, medical advice or anything that sounds like diagnosis or cure, and transformations presented as typical. PersonalTrainerPRO avoids and flags those patterns automatically."}]},{slug:"course-creators-coaches",moduleId:"course_coach",professional:"course creator or coach",audience:"Course Creators & Coaches",metaTitle:"AI Social Media Content for Course Creators & Coaches | CourseCoachPRO by SociePRO",metaDescription:"CourseCoachPRO writes and schedules content for course creators and coaches that builds authority between launches — without the income claims the FTC warns about.",h1:"Content for course creators and coaches that builds trust between launches",intro:"CourseCoachPRO is SociePRO's module for online course creators, educators and coaches. It keeps authority-building content going all year so launches aren't the only time people hear from you — and it avoids the income and results claims that erode trust.",problems:["A saturated course market","Low completion rates that make good courses look bad","Exhausting feast-or-famine launch cycles","Audiences burned by overpriced, underdelivered courses","Balancing free content that attracts with paid content that sustains"],guardrails:["Never states typical, expected or guaranteed income from a course or program, consistent with FTC guidance on earnings claims","No guaranteed timelines for mastering a skill","Flags “six figures,” “passive income” and multiplier promises"],reviewRequired:!1,faqs:[{q:"What is a good social media tool for course creators and coaches?",a:"One that keeps you visible between launches with real expertise, not hype. SociePRO's CourseCoachPRO module builds content from your teaching method, student outcomes you describe honestly and your point of view, schedules it automatically, and flags income and results claims that the FTC scrutinizes."},{q:"How can coaches market a course without income claims?",a:"Sell the process and the transformation in skill or confidence, not money. Teach a piece of your method publicly, explain who the course is and isn't for, and share individual experiences clearly labeled as non-typical. CourseCoachPRO is built around that kind of content."},{q:"How do course creators stay visible between launches?",a:"With a steady publishing schedule that teaches and builds trust year-round, so launches convert people who already know you. SociePRO automates that cadence, from two posts a week up to daily."}]},{slug:"content-creators",moduleId:"creator",professional:"content creator",audience:"Content Creators",metaTitle:"AI Content Planning for Creators & Personal Brands | CreatorPRO by SociePRO",metaDescription:"CreatorPRO helps content creators build an authority-based brand that survives algorithm changes — with consistent scheduled content and sponsorship disclosure built in.",h1:"Content for creators who want a brand that outlasts the algorithm",intro:"CreatorPRO is SociePRO's module for content creators and influencers. It helps you build authority in a niche — the thing that makes brand deals and audience loyalty durable — and keeps a 
812steady stream of content scheduled so one algorithm change doesn't erase your momentum.",problems:["Algorithm changes that tank reach overnight","Creating content feels like a hamster wheel","Inconsistent, underpaid brand deals","Audience growth that has plateaued","Monetizing without feeling salesy"],guardrails:["Sponsored or gifted content always carries clear disclosure, consistent with FTC endorsement guidelines","Never fabricates or inflates follower, view or engagement numbers"],reviewRequired:!1,faqs:[{q:"What is a good AI content tool for creators building a personal brand?",a:"One that helps you own a clear niche and post consistently, rather than chasing trends. SociePRO's CreatorPRO module builds content from your positioning — your niche, audience and point of view — schedules it automatically, and keeps sponsored content properly disclosed."},{q:"How can creators protect themselves from algorithm changes?",a:"Build authority in a specific niche and diversify where your audience follows you, so you're known for something rather than for one viral format. Consistent, positioned content does more for that than posting volume alone. SociePRO keeps that consistency automatic."},{q:"Do creators have to disclose sponsored posts?",a:"In the US, the FTC expects clear disclosure of paid partnerships, gifted products and sponsorships. CreatorPRO writes sponsored content with disclosure built in and never frames paid content as an organic recommendation. This isn't legal advice; check the rules where you operate."}]},{slug:"side-hustlers",moduleId:"side_hustle",professional:"side hustler or entrepreneur",audience:"Side Hustlers & Entrepreneurs",metaTitle:"AI Social Media Content for Side Hustlers & Entrepreneurs | SideHustlePRO by SociePRO",metaDescription:"SideHustlePRO writes and schedules social media content for side hustlers and early-stage entrepreneurs building on nights and weekends — authority without a marketing team.",h1:"Social media content for side hustlers building a business on nights and weekends",intro:"SideHustlePRO is SociePRO's module for entrepreneurs building something on limited time. It turns what you're building and learning into consistent content that builds credibility — so marketing doesn't eat the few hours you have.",problems:["Limited time — building on nights and weekends","Imposter syndrome: “Who am I to call myself an expert?”","Doing everything yourself on a tight budget","No established brand or reputation to lean on","Marketing advice that assumes you have a full-time team"],guardrails:["Never states typical or guaranteed income or growth outcomes","Never invents or inflates follower counts, sales or engagement numbers — only figures you provide"],reviewRequired:!1,faqs:[{q:"What is a good social media tool for side hustlers with limited time?",a:"One that does the writing and scheduling so your few hours go into the business. SociePRO's SideHustlePRO module builds posts from what you're building and who it's for, and schedules them automatically on LinkedIn and Facebook — starting at two posts a week."},{q:"How can a new entrepreneur build credibility on social media?",a:"Share what you're learning and building honestly, and teach the specific thing you know well. Credibility comes from consistency and specificity, not from inflated numbers. SideHustlePRO avoids made-up metrics and income claims by design."},{q:"How much time does social media take for a small business owner?",a:"Writing and posting manually can take hours a week. With SociePRO, setup is a one-time positioning questionnaire; after that the platform generates and schedules content, and your time goes to reviewing it."}]},{slug:"personal-brands",moduleId:"personal",professional:"professional building a personal brand",audience:"Personal Brands",metaTitle:"AI Content for Building a Personal Brand | PersonalPRO by SociePRO",metaDescription:"PersonalPRO helps professionals build a personal brand on LinkedIn and Facebook with consistent, authentic content — no invented stories, no bragging.",h1:"Build a personal brand without feeling like you're bragging",intro:"PersonalPRO is SociePRO's module for anyone building a personal brand — especially people who know they should post but don't know 
812where to start. It's also the module included with SociePRO's free trial.",problems:["Knowing you need a personal brand but not where to start","Posting feels narcissistic or attention-seeking","Not knowing what your “thing” is when you have several interests","Fear of being judged by colleagues, friends or family","Running out of ideas and posting inconsistently"],guardrails:["Never invents personal anecdotes or life details — content stays grounded in what you share","Protects other people's identities, especially minors, in your stories"],reviewRequired:!1,faqs:[{q:"What is a good AI tool for building a personal brand on LinkedIn?",a:"One that helps you find a clear focus and keeps you posting, without inventing a persona. SociePRO's PersonalPRO module writes from what you actually share about yourself, never fabricates stories, and schedules posts automatically. It's included in SociePRO's free trial."},{q:"How do I build a personal brand if posting feels like bragging?",a:"Shift from talking about yourself to helping a specific audience: lessons learned, how you solve problems, what you'd tell your younger self. That reads as generous, not boastful. PersonalPRO's content is built around that approach."},{q:"Is AI-written content authentic enough for a personal brand?",a:"It is when it's built from your real experiences and you review it before it posts. PersonalPRO generates from what you tell it and is designed never to invent anecdotes, so the voice stays yours."}]}];function sfe(e){return rh.find(t=>t.slug===e)}const T2=()=>s.jsx("footer",{className:"border-t border-border bg-muted/30 py-12",role:"contentinfo",children:s.jsxs("div",{className:"container px-4",children:[s.jsxs("div",{className:"flex flex-col items-center justify-between gap-8 md:flex-row",children:[s.jsxs("div",{className:"flex flex-col items-center gap-4 md:items-start",children:[s.jsx(Ci,{}),s.jsx("p",{className:"text-sm text-muted-foreground max-w-xs text-center md:text-left",children:"Social media content platform for LinkedIn & Facebook — with more platforms coming soon."})]}),s.jsxs("nav",{"aria-label":"Footer navigation",className:"flex flex-col items-center gap-6 md:items-end",children:[s.jsxs("ul",{className:"flex flex-wrap items-center justify-center gap-4 md:gap-6",children:[!Ds()&&s.jsx("li",{children:s.jsx("a",{href:"/receipt-ready",className:"text-sm text-muted-foreground hover:text-foreground transition-colors",children:"Receipt-Ready Invoice Templates"})}),!Ds()&&s.jsx("li",{children:s.jsx("a",{href:"/win-back-pack",className:"text-sm text-muted-foreground hover:text-foreground transition-colors",children:"The Win-Back Pack"})}),!Ds()&&s.jsx("li",{children:s.jsx("a",{href:"/lost-revenue",className:"text-sm text-muted-foreground hover:text-foreground transition-colors",children:"Free: Lost Revenue Calculator"})}),s.jsx("li",{children:s.jsx(Oe,{to:"/reviews",className:"text-sm text-muted-foreground hover:text-foreground transition-colors",children:"Reviews"})}),s.jsx("li",{children:s.jsx(Oe,{to:"/reviews/new",className:"text-sm text-muted-foreground hover:text-foreground transition-colors",children:"Leave a Review"})}),s.jsx("li",{children:s.jsx(Oe,{to:"/privacy",className:"text-sm text-muted-foreground hover:text-foreground transition-colors",children:"Privacy Policy"})}),s.jsx("li",{children:s.jsx(Oe,{to:"/terms",className:"text-sm text-muted-foreground hover:text-foreground transition-colors",children:"Terms of Service"})}),s.jsx("li",{children:s.jsx(Oe,{to:"/data-deletion",className:"text-sm text-muted-foreground hover:text-foreground transition-colors",children:"Data Deletion"})})]}),s.jsxs("p",{className:"text-sm text-muted-foreground",children:["© ",new Date().getFullYear()," SociePRO LLC. All rights reserved."]})]})]}),s.jsxs("div",{className:"mt-8 pt-8 border-t border-border",children:[s.jsxs("p",{className:"text-xs text-muted-foreground/60 text-center",children:["SociePRO AI features: ",s.jsx("span",{className:"font-medium",children:"PostPRO"})," (AI post generator) · ",s.jsx("span",{className:"font-medium",children:"TrendsPRO"})," (trending topics) · ",s.jsx("span",{className:"font-medium",children:"SchedulePRO"})," (post scheduling) · ",s.jsx("span",{className:"font-medium",children:"InsightPRO"})," (performance insights) · ",s.jsx("span",{className:"font-medium",children:"ClickPRO"})," (one-click year)"]}
812),s.jsxs("p",{className:"text-xs text-muted-foreground/60 text-center mt-2",children:["Who it's for:"," ",rh.map((e,t)=>s.jsxs("span",{children:[t>0&&" · ",s.jsx(Oe,{to:`/for/${e.slug}`,className:"font-medium hover:text-foreground transition-colors",children:e.audience})]},e.slug))," · ",s.jsx(Oe,{to:"/for",className:"font-medium hover:text-foreground transition-colors",children:"All professions"})]})]})]})}),Nr="https://sociepro.ai",ife="sociepro.ai",ofe=["socieproai.com","www.socieproai.com"];function lfe(){if(typeof window>"u")return;const e=window.location.hostname;if(ofe.includes(e)){const t=new URL(window.location.href);t.hostname=ife,t.protocol="https:",window.location.replace(t.toString())}}const Nf={title:"SociePRO AI – AI Social Media Growth Platform",description:"Generate, schedule, and optimize high-engagement social media posts using AI, psychology, and daily trends. Create scroll-stopping content for LinkedIn and Facebook, with more platforms coming.",keywords:"AI social media content generator, social media post generator, AI content scheduling tool, LinkedIn post generator, Facebook content generator, social media growth software, AI marketing SaaS, PostPRO, TrendsPRO",ogImage:`${Nr}/og-image.png`,ogType:"website",siteUrl:Nr},ar=({title:e=Nf.title,description:t=Nf.description,keywords:n=Nf.keywords,ogTitle:r,ogDescription:a,ogImage:i=Nf.ogImage,ogType:o=Nf.ogType,canonicalUrl:l,jsonLd:c})=>(g.useEffect(()=>{document.title=e;const u=(f,p,y=!1)=>{const m=y?"property":"name";let v=document.querySelector(`meta[${m}="${f}"]`);v||(v=document.createElement("meta"),v.setAttribute(m,f),document.head.appendChild(v)),v.content=p};u("description",t),u("keywords",n),u("author","SociePRO AI"),u("robots","index, follow"),u("og:title",r||e,!0),u("og:description",a||t,!0),u("og:image",i,!0),u("og:type",o,!0),u("og:site_name","SociePRO AI",!0),l&&u("og:url",l,!0),u("twitter:card","summary_large_image"),u("twitter:title",r||e),u("twitter:description",a||t),u("twitter:image",i),u("twitter:site","@SociePROAI");let h=document.querySelector('link[rel="canonical"]');l?(h||(h=document.createElement("link"),h.rel="canonical",document.head.appendChild(h)),h.href=l):h&&h.remove();const d=document.querySelector("script[data-seo-jsonld]");if(d&&d.remove(),c){const f=document.createElement("script");f.type="application/ld+json",f.setAttribute("data-seo-jsonld","true"),f.textContent=JSON.stringify(c),document.head.appendChild(f)}return()=>{const f=document.querySelector("script[data-seo-jsonld]");f&&f.remove()}},[e,t,n,r,a,i,o,l,c]),null),cfe=()=>({"@context":"https://schema.org","@type":"Organization",name:"SociePRO AI",description:"AI-powered social media content generation and scheduling platform",url:Nr,logo:{"@type":"ImageObject",url:`${Nr}/og-image.png`,width:1200,height:630},sameAs:[],contactPoint:{"@type":"ContactPoint",email:"[email protected]",contactType:"customer service"}}),ufe=()=>({"@context":"https://schema.org","@type":"SoftwareApplication",name:"SociePRO AI",applicationCategory:"BusinessApplication",applicationSubCategory:"Social Media Management",operatingSystem:"Web",offers:{"@type":"Offer",price:"0",priceCurrency:"USD",description:"Free to get started"},description:"AI-powered social media content generator and scheduling tool for LinkedIn and Facebook, with more platforms coming. Features include PostPRO for AI content generation, TrendsPRO for trending topics, ContentSyncPRO for content library management, SchedulePRO for post scheduling, InsightPRO for performance insights, and ClickPRO for one-click year-long marketing.",featureList:["PostPRO - AI-powered post generation","TrendsPRO - Trending topics and Quick Quizzes","ContentSyncPRO - Content library management","SchedulePRO - Social media post scheduling","InsightPRO - AI-powered performance insights","ClickPRO - One-click year-long marketing campaigns"],screenshot:`${Nr}/og-image.png`,softwareVersion:"1.0",publisher:{"@type":"Organization",name:"SociePRO AI"}}),dfe=()=>({"@context":"https://schema.org","@type":"WebSite",name:"SociePRO AI",url:Nr,description:"AI-powered social media growth platform",potentialAction:{"@type":"SearchAction",target:`${Nr}/?q={search_term_string}`,"query-input":"required name=search_term_string"}}),Jw=(e,t)=>({"@context":"https://schema.org","@type":"WebPage",name:`${e} | SociePRO AI`,description:t,isPartOf:{"@type":"WebSite",name:"SociePRO AI",url:Nr}}),hfe=()=>{const e=Gt(),[t]=Ul();g.useEffect(()=>{const r=window.location.search,a=window.location.hash,i=t.get("code")||(r.includes("code=")?new URLSearchParams(r).get("code"):null),o=t.get("error")||(r.includes("error=")?new URLSearchParams(r).get("error"):null),l=a.includes("access_token")||a.includes("error");(i||o||l)&&e(`/auth/callback${r}${a}`,{replace:!0})},[t,e]);const n={"@context":"https://schema.org","@graph":[ufe(),cfe(),dfe()]};return s.jsxs("div",{className:"min-h-screen",children:[s.jsx(ar,{title:"SociePRO AI | Automated Marketing for Industry Professionals",description:"AI content automation for Realtors, Advisors, Builders, Property Managers, Hosts, Creators, Entrepreneurs, and Personal Brands. SociePRO transforms busy professionals into visible market authorities with automated, industry-specific social media content and SEO blog automation.",keywords:"social media content automation, real estate social media marketing, financial advisor marketing automation, builder marketing content, property management social media, evergreen social media posts, automated content for professionals, AI blog generator for professionals, automated blog content, SEO blog automation, creator content automation, side hustle marketing automation, personal brand content engine, automated authority building, AI content for creators, AI content for entrepreneurs",canonicalUrl:"https://sociepro.ai/",ogTitle:"SociePRO AI | Become the Brand They Trust",ogDescription:"Automated social media marketing and blog content that positions professionals, creators, and entrepreneurs as trusted authorities — without hiring a marketing team.",jsonLd:n}),s.jsx(w2,{}),s.jsxs("main",{children:[s.jsx(Lde,{}),s.jsx(Fde,{}),s.jsx(Xhe,{}),s.jsx(Jhe,{}),s.jsx(efe,{}),s.jsx(tfe,{}),s.jsx(rfe,{}),s.jsx(afe,{})]}),s.jsx(T2,{})]})},xi={realtor:{slug:"realtor",name:"RealtorPRO",description:"Real estate marketing for agents and brokers",defaultPlatforms:["facebook"],defaultFrequency:"weekly",isMassMarket:!1,isActive:!0,icon:yi},personal:{slug:"personal",name:"PersonalPRO",description:"Personal thoughts, life, and relatable content",defaultPlatforms:["facebook","instagram"],defaultFrequency:"weekly",isMassMarket:!0,isActive:!0,icon:Si},creator:{slug:"creator",name:"CreatorPRO",description:"Content creators, engagement, and personal brands",defaultPlatforms:["instagram","x"],defaultFrequency:"daily",isMassMarket:!0,isActive:!0,icon:Se},side_hustle:{slug:"side_hustle",name:"SideHustlePRO",description:"Entrepreneurs building in public",defaultPlatforms:["facebook","linkedin"],defaultFrequency:"weekly",isMassMarket:!0,isActive:!0,icon:vn},financial_advisor:{slug:"financial_advisor",name:"AdvisorPRO",description:"Compliance-ready content for financial advisors",defaultPlatforms:["linkedin","facebook"],defaultFrequency:"weekly",isMassMarket:!1,isActive:!0,icon:gd},insurance:{slug:"insurance",name:"InsurancePRO",description:"Insurance agent marketing",defaultPlatforms:["facebook"],defaultFrequency:"weekly",isMassMarket:!1,isActive:!0,icon:Ea},mortgage:{slug:"mortgage",name:"MortgagePRO",description:"Mortgage broker and loan officer marketing",defaultPlatforms:["facebook","linkedin"],defaultFrequency:"weekly",isMassMarket:!1,isActive:!0,icon:gi}
812,builder_remodeler:{slug:"builder_remodeler",name:"BuilderPRO",description:"Home builders & remodelers",defaultPlatforms:["facebook"],defaultFrequency:"weekly",isMassMarket:!1,isActive:!0,icon:gi},property_manager:{slug:"property_manager",name:"PropertyManagerPRO",description:"Property management marketing for landlords and PMs",defaultPlatforms:["facebook","linkedin"],defaultFrequency:"weekly",isMassMarket:!1,isActive:!0,icon:vw},host:{slug:"host",name:"HostPRO",description:"Short-term rental and vacation property marketing",defaultPlatforms:["instagram","facebook"],defaultFrequency:"weekly",isMassMarket:!1,isActive:!0,icon:dP},restaurantpro:{slug:"restaurantpro",name:"RestaurantPRO",description:"Restaurant and hospitality marketing",defaultPlatforms:["facebook","instagram"],defaultFrequency:"weekly",isMassMarket:!1,isActive:!0,icon:_w},authoritypro:{slug:"authoritypro",name:"AuthorityPRO",description:"Internal corporate authority and category leadership content",defaultPlatforms:["linkedin","facebook"],defaultFrequency:"weekly",isMassMarket:!1,isActive:!0,icon:hP},freelance_consultant:{slug:"freelance_consultant",name:"FreelanceConsultantPRO",description:"Freelancers and consultants building authority",defaultPlatforms:["linkedin"],defaultFrequency:"weekly",isMassMarket:!1,isActive:!0,icon:mw},personal_trainer:{slug:"personal_trainer",name:"PersonalTrainerPRO",description:"Authority for fitness professionals and coaches",defaultPlatforms:["instagram","facebook"],defaultFrequency:"weekly",isMassMarket:!1,isActive:!0,icon:BF},course_coach:{slug:"course_coach",name:"CourseCoachPRO",description:"Authority for course creators and education entrepreneurs",defaultPlatforms:["linkedin","instagram"],defaultFrequency:"weekly",isMassMarket:!1,isActive:!0,icon:oi}},Zw=["realtor","financial_advisor","builder_remodeler","property_manager","host","restaurantpro","creator","side_hustle","authoritypro","insurance","mortgage","freelance_consultant","personal_trainer","course_coach"];function id(e){var t;return((t=xi[e])==null?void 0:t.name)??e}const ffe=e=>{g.useEffect(()=>{(async()=>{try{await W.functions.invoke("track-visit",{body:{pagePath:e,userAgent:navigator.userAgent,referrer:document.referrer||null}})}catch(n){console.error("Analytics tracking failed:",n)}})()},[e])},_1=[{pre:"Authority.",highlight:"Automatically Optimized."},{pre:"Your Authority,",highlight:"Continuously Optimized"},{pre:"Automated Authority.",highlight:"Engineered Growth."},{pre:"Authority —",highlight:"Without the Guesswork"},{pre:"Authority,",highlight:"Fine Tuned Daily"}],pfe=4500,zI=400;function mfe(){const[e,t]=g.useState(0),[n,r]=g.useState(!0),a=g.useCallback(o=>{r(!1),setTimeout(()=>{t(o),r(!0)},zI)},[]);g.useEffect(()=>{let o=0;const l=setInterval(()=>{o=(o+1)%_1.length,a(o)},pfe),c=()=>{document.hidden&&clearInterval(l)};return document.addEventListener("visibilitychange",c),()=>{clearInterval(l),document.removeEventListener("visibilitychange",c)}},[a]);const i=_1[e];return s.jsxs("div",{children:[s.jsxs("h1",{className:"font-display text-4xl xl:text-5xl font-bold text-white leading-tight mb-6","aria-live":"polite","aria-atomic":"true",style:{opacity:n?1:0,transition:`opacity ${zI}ms ease-in-out`,minHeight:"7rem"},children:[i.pre," ",s.jsx("span",{className:"text-[hsl(var(--auth-pistachio))]",children:i.highlight})]}),s.jsx("div",{className:"flex items-center gap-2 mb-6",role:"tablist","aria-label":"Headline navigation",children:_1.map((o,l)=>s.jsx("button",{role:"tab","aria-selected":l===e,"aria-label":`Headline ${l+1}`,onClick:()=>a(l),className:"rounded-full transition-all duration-300 focus:outline-none focus-visible:ring-1 focus-visible:ring-white/50",style:{width:l===e?"20px":"6px",height:"6px",background:l===e?"hsl(var(--auth-pistachio))":"rgba(255,255,255,0.25)"}},l))})]})}const gfe=()=>{const[e,t]=g.useState(!0),[n,r]=g.useState(""),[a,i]=g.useState(""),[o,l]=g.useState(""),[c,u]=g.useState(!1),[h,d]=g.useState(!1),[f,p]=g.useState(!1),[y,m]=g.useState(!1),v=Gt(),{toast:b}=Je();ffe("/auth"),g.useEffect(()=>{W.auth.getSession().then(({data:{session:j}})=>{j&&v("/dashboard",{replace:!0})})},[v]);const x=async j=>{j.preventDefault(),u(!0);try{if(e){const{error:S}=await W.auth.signInWithPassword({email:n,password:a});if(S)throw S;v("/dashboard")}else{const{error:S}=await W.auth.signUp({email:n,password:a,options:{emailRedirectTo:`${window.location.origin}/dashboard`,data:{name:o}}});if(S)throw S;b({title:"Account created!",description:"You can now log in with your credentials."}),t(!0)}}catch(S){b({title:"Error",description:S.message||"An error occurred",variant:"destructive"})}finally{u(!1)}},w=async()=>{d(!0);try{const{error:j}=await W.auth.signInWithOAuth({provider:"google",options:{redirectTo:`${window.location.origin}/auth/callback`}});if(j)throw j}catch(j){b({title:"Error",description:j.message||"Failed to sign in with Google",variant:"destructive"}),d(!1)}},_=async()=>{p(!0);try{const{error:j}=await W.auth.signInWithOAuth({provider:"linkedin_oidc",options:{redirectTo:`${window.location.origin}/auth/callback`}});if(j)throw j}catch(j){b({title:"Error",description:j.message||"Failed to sign in with LinkedIn",variant:"destructive"}),p(!1)}},k=Object.values(xi).filter(j=>j.isActive&&j.slug!=="authoritypro").map((j,S)=>({icon:j.icon,label:j.name,color:S%3===0?"text-[hsl(var(--auth-pistachio))]":S%3===1?"text-[hsl(var(--auth-pale-yellow))]":"text-[hsl(var(--auth-peach))]"}));return s.jsxs("div",{className:"min-h-screen flex",children:[s.jsx(ar,{title:"Sign In or Create Account | SociePRO AI",description:"Sign in to SociePRO AI or create a new account to start generating AI-powered social media content for LinkedIn and Facebook, with more platforms coming.",keywords:"SociePRO login, sign up, create account, social media AI",canonicalUrl:"https://sociepro.ai/auth"}),s.jsxs("div",{className:"hidden lg:flex lg:w-1/2 xl:w-[55%] bg-[hsl(var(--auth-bg))] relative overflow-hidden",children:[s.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-[hsl(var(--auth-pistachio)/0.05)] via-trans
812parent to-[hsl(var(--auth-peach)/0.05)]"}),s.jsx("div",{className:"relative z-10 flex flex-col justify-center px-12 xl:px-20 max-w-2xl",children:s.jsxs(fe.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.6},children:[s.jsx(Oe,{to:"/",className:"inline-block mb-12",children:s.jsx(Ci,{})}),s.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[s.jsx(Se,{className:"h-5 w-5 text-[hsl(var(--auth-pistachio))]"}),s.jsx("span",{className:"text-sm font-medium tracking-wide text-[hsl(var(--auth-pistachio))] uppercase",children:"Automated Marketing"})]}),s.jsx(mfe,{}),s.jsx("p",{className:"text-lg xl:text-xl text-white/70 leading-relaxed mb-6",children:"SociePRO runs automatically, keeps you visible, and positions you as a trusted authority — without daily effort."}),s.jsx("p",{className:"text-base text-white/50 leading-relaxed mb-10",children:"Powered by adaptive AI, behavioral psychology, and relevance modeling — SociePRO ensures every post meets a standard of quality before it ever goes live."}),s.jsx("div",{className:"flex flex-wrap gap-3 mb-12",children:k.map((j,S)=>s.jsxs(fe.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.3+S*.1},className:"flex items-center gap-2 px-4 py-2 rounded-full bg-white/5 border border-white/10 hover:border-[hsl(var(--auth-pistachio)/0.3)] transition-colors",children:[s.jsx(j.icon,{className:`h-4 w-4 ${j.color}`}),s.jsx("span",{className:"text-sm text-white/80",children:j.label})]},j.label))}),s.jsxs("div",{className:"flex items-center gap-3 text-white/50 text-sm",children:[s.jsx("div",{className:"flex -space-x-2",children:[1,2,3,4].map(j=>s.jsx("div",{className:"w-8 h-8 rounded-full bg-white/10 border-2 border-[hsl(var(--auth-bg))] flex items-center justify-center text-xs text-white/60",children:String.fromCharCode(64+j)},j))}),s.jsx("span",{children:"Trusted by professionals across industries"})]})]})}),s.jsx("div",{className:"absolute bottom-0 right-0 w-96 h-96 bg-[hsl(var(--auth-pistachio)/0.03)] rounded-full blur-3xl"}),s.jsx("div",{className:"absolute top-1/4 right-1/4 w-64 h-64 bg-[hsl(var(--auth-peach)/0.03)] rounded-full blur-3xl"})]}),s.jsx("div",{className:"flex-1 flex items-center justify-center p-6 sm:p-8 lg:p-12 bg-background",children:s.jsxs(fe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.2},className:"w-full max-w-md",children:[s.jsx("div",{className:"lg:hidden mb-8 text-center",children:s.jsx(Oe,{to:"/",children:s.jsx(Ci,{})})}),s.jsxs("div",{className:"mb-8",children:[s.jsx("h2",{className:"font-display text-2xl sm:text-3xl font-bold text-foreground",children:e?"Welcome back":"Create your account"}),s.jsx("p",{className:"mt-2 text-muted-foreground",children:e?"Sign in to SociePRO":"Activate SociePRO for your business"})]}),s.jsx(z,{type:"button",variant:"outline",size:"lg",className:"w-full mb-3 h-12 text-base font-medium bg-[#0A66C2] hover:bg-[#004182] text-white border-[#0A66C2] hover:border-[#004182]",onClick:_,disabled:f||h,children:f?s.jsx(ce,{className:"h-5 w-5 animate-spin"}):s.jsxs(s.Fragment,{children:[s.jsx("svg",{className:"h-5 w-5 mr-2",viewBox:"0 0 24 24",fill:"currentColor",children:s.jsx("path",{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"})}),"Sign in with LinkedIn"]})}),s.jsx("p",{className:"text-xs text-center text-muted-foreground mb-4",children:s.jsxs("span",{className:"inline-flex items-center gap-1",children:[s.jsx(Se,{className:"h-3 w-3 text-[#0A66C2]"}),"Recommended for professionals"]})}),s.jsx(z,{type:"button",variant:"outline",size:"lg",className:"w-full mb-6 h-12 text-base font-medium",onClick:w,disabled:h||f,children:h?s.jsx(ce,{className:"h-5 w-5 animate-spin"}):s.jsxs(s.Fragment,{children:[s.jsxs("svg",{className:"h-5 w-5 mr-2",viewBox:"0 0 24 24",children:[s.jsx("path",{fill:"currentColor",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"}),s.jsx("path",{fill:"currentColor",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"}),s.jsx("path",{fill:"currentColor",d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"}),s.jsx("path",{fill:"currentColor",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"})]}),"Continue with Google"]})}),s.jsxs("div",{className:"relative mb-6",children:[s.jsx("div",{className:"absolute inset-0 flex items-center",children:s.jsx("div",{className:"w-full border-t border-border"})}),s.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:s.jsx("span",{className:"bg-background px-3 text-muted-foreground",children:"Or continue with email"})})]}),s.jsxs("form",{onSubmit:x,className:"space-y-4",children:[!e&&s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{htmlFor:"name",children:"Name"}),s.jsxs("div",{className:"relative",children:[s.jsx(Si,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),s.jsx(ze,{id:"name",type:"text",placeholder:"Your name",value:o,onChange:j=>l(j.target.value),className:"pl-10 h-11",required:!e})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{htmlFor:"email",children:"Email"}),s.jsxs("div",{className:"relative",children:[s.jsx(bw,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),s.jsx(ze,{id:"email",type:"email",placeholder:"[email protected]",value:n,onChange:j=>r(j.target.value),className:"pl-10 h-11",required:!0})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{htmlFor:"password",children:"Password"}),s.jsxs("div",{className:"relative",children:[s.jsx(kl,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),s.jsx(ze,{id:"password",type:y?"text":"password",placeholder:"••••••••",value:a,onChange:j=>i(j.target.value),className:"pl-10 pr-10 h-11",required:!0,minLength:6,autoComplete:e?"current-password":"new-password"}),s.jsx("button",{type:"button",onClick:()=>m(j=>!j),className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground transition-colors","aria-label":y?"Hide password":"Show password",tabIndex:-1,
812children:y?s.jsx(XQ,{className:"h-4 w-4"}):s.jsx(Ei,{className:"h-4 w-4"})})]})]}),s.jsx(z,{type:"submit",size:"lg",className:"w-full h-12 text-base font-semibold bg-[hsl(var(--auth-pistachio))] text-[hsl(var(--auth-bg))] hover:bg-[hsl(var(--auth-pistachio)/0.9)] shadow-lg",disabled:c,children:c?s.jsx(ce,{className:"h-5 w-5 animate-spin"}):s.jsxs(s.Fragment,{children:[e?"Sign In":"Create Account",s.jsx(Sr,{className:"ml-2 h-4 w-4"})]})})]}),s.jsx("div",{className:"mt-6 text-center",children:s.jsxs("button",{type:"button",onClick:()=>t(!e),className:"text-sm text-muted-foreground hover:text-foreground transition-colors",children:[e?"Don't have an account? ":"Already have an account? ",s.jsx("span",{className:"font-semibold text-primary",children:e?"Sign up":"Sign in"})]})}),s.jsxs("div",{className:"mt-8 flex items-center justify-center gap-4 text-xs",children:[s.jsx(Oe,{to:"/privacy",className:"text-muted-foreground hover:text-foreground transition-colors",children:"Privacy Policy"}),s.jsx("span",{className:"text-muted-foreground",children:"·"}),s.jsx(Oe,{to:"/terms",className:"text-muted-foreground hover:text-foreground transition-colors",children:"Terms of Service"})]})]})})]})},yfe=()=>{const e={"@context":"https://schema.org","@type":"WebPage",name:"Privacy Policy - SociePRO AI",description:"SociePRO AI Privacy Policy. Learn how we collect, use, and protect your personal information.",url:"https://sociepro.ai/privacy",isPartOf:{"@type":"WebSite",name:"SociePRO AI",url:"https://sociepro.ai"},mainEntity:{"@type":"Article",name:"SociePRO AI Privacy Policy",datePublished:"2025-01-09",dateModified:"2026-01-16"}};return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(ar,{title:"Privacy Policy - SociePRO AI | AI Social Media Content Generator",description:"SociePRO AI Privacy Policy. Learn how we collect, use, and protect your personal information when using our AI social media content generator and scheduling tool.",keywords:"SociePRO AI privacy policy, social media tool privacy, AI content generator data protection",canonicalUrl:"https://sociepro.ai/privacy",jsonLd:e}),s.jsx("header",{className:"border-b border-border bg-card/50 backdrop-blur-sm sticky top-0 z-50",children:s.jsxs("div",{className:"container mx-auto px-4 py-4 flex items-center justify-between",children:[s.jsx(Oe,{to:"/","aria-label":"SociePRO AI Home",children:s.jsx(Ci,{})}),s.jsx(z,{variant:"ghost",size:"sm",asChild:!0,children:s.jsxs(Oe,{to:"/",children:[s.jsx(Lc,{className:"mr-2 h-4 w-4","aria-hidden":"true"}),"Back to Home"]})})]})}),s.jsx("main",{className:"container mx-auto px-4 py-12 max-w-3xl",children:s.jsxs("article",{className:"prose prose-neutral dark:prose-invert max-w-none",children:[s.jsx("h1",{className:"font-display text-4xl font-bold text-foreground mb-2",children:"Privacy Policy"}),s.jsx("p",{className:"text-muted-foreground text-lg mb-8",children:"Last updated: October 3, 2026"}),s.jsxs("section",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"font-display text-2xl font-semibold text-foreground mt-8 mb-4",children:"1. Introduction"}),s.jsx("p",{className:"text-foreground/90 leading-relaxed",children:'Welcome to SociePRO AI ("we," "our," or "us"). We are committed to protecting your personal information and your right to privacy. This Privacy Policy explains how we collect, use, disclose, and safeguard your information when you use our AI social media content generator and scheduling services.'})]}),s.jsxs("div",{children:[s.jsx("h2",{className:"font-display text-2xl font-semibold text-foreground mt-8 mb-4",children:"2. Information We Collect"}),s.jsx("p",{className:"text-foreground/90 leading-relaxed mb-4",children:"We collect information that you provide directly to us, including:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2 text-foreground/90",children:[s.jsx("li",{children:"Account information (name, email address, password)"}),s.jsx("li",{children:"Profile information and preferences"}),s.jsx("li",{children:"Content you create, including posts and media"}),s.jsx("li",{children:"Social media account connections and associated tokens"}),s.jsx("li",{children:"Usage data and interaction with our services"})]})]}),s.jsxs("div",{children:[s.jsx("h2",{className:"font-display text-2xl font-semibold text-foreground mt-8 mb-4",children:"3. How We Use Your Information"}
812),s.jsx("p",{className:"text-foreground/90 leading-relaxed mb-4",children:"We use the information we collect to:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2 text-foreground/90",children:[s.jsx("li",{children:"Provide, maintain, and improve our AI content generation services"}),s.jsx("li",{children:"Generate and schedule social media content on your behalf"}),s.jsx("li",{children:"Connect to and post on your linked social media accounts"}),s.jsx("li",{children:"Personalize your experience and content recommendations"}),s.jsx("li",{children:"Communicate with you about updates, features, and support"}),s.jsx("li",{children:"Ensure security and prevent fraud"})]})]}),s.jsxs("div",{children:[s.jsx("h2",{className:"font-display text-2xl font-semibold text-foreground mt-8 mb-4",children:"4. Third-Party Services"}),s.jsx("p",{className:"text-foreground/90 leading-relaxed",children:"Our service integrates with third-party platforms including LinkedIn, Instagram, Facebook, and other social media networks. When you connect your accounts, we access only the permissions you explicitly grant. We do not sell your personal information to third parties. Third-party services have their own privacy policies, and we encourage you to review them."})]}),s.jsxs("div",{children:[s.jsx("h2",{className:"font-display text-2xl font-semibold text-foreground mt-8 mb-4",children:"5. Data Storage and Security"}),s.jsx("p",{className:"text-foreground/90 leading-relaxed",children:"We implement appropriate technical and organizational security measures to protect your personal information. Your data is stored securely using industry-standard encryption. Access tokens for connected social media accounts are stored securely and used only for authorized posting activities."})]}),s.jsxs("div",{children:[s.jsx("h2",{className:"font-display text-2xl font-semibold text-foreground mt-8 mb-4",children:"6. Your Rights"}),s.jsx("p",{className:"text-foreground/90 leading-relaxed mb-4",children:"You have the right to:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2 text-foreground/90",children:[s.jsx("li",{children:"Access and receive a copy of your personal data"}),s.jsx("li",{children:"Correct inaccurate or incomplete information"}),s.jsx("li",{children:"Request deletion of your personal data"}),s.jsx("li",{children:"Disconnect linked social media accounts at any time"}),s.jsx("li",{children:"Opt out of marketing communications"})]})]}),s.jsxs("div",{children:[s.jsx("h2",{className:"font-display text-2xl font-semibold text-foreground mt-8 mb-4",children:"7. Cookies and Tracking"}),s.jsx("p",{className:"text-foreground/90 leading-relaxed",children:"We use cookies and similar tracking technologies to enhance your experience, analyze usage patterns, and improve our services. You can control cookie preferences through your browser settings."})]}),s.jsxs("div",{children:[s.jsx("h2",{className:"font-display text-2xl font-semibold text-foreground mt-8 mb-4",children:"8. Children's Privacy"}),s.jsx("p",{className:"text-foreground/90 leading-relaxed",children:"Our services are built for business owners and professionals and are not directed to children under the age of 13. We do not knowingly collect personal information from children under 13. If you believe a child has given us personal information, contact us at [email protected] and we will delete it."})]}),s.jsxs("div",{children:[s.jsx("h2",{className:"font-display text-2xl font-semibold text-foreground mt-8 mb-4",children:"9. Changes to This Policy"}),s.jsx("p",{className:"text-foreground/90 leading-relaxed",children:'We may update this Privacy Policy from time to time. We will notify you of any changes by posting the new policy on this page and updating the "Last updated" date.'})]}),s.jsxs("div",{children:[s.jsx("h2",{className:"font-display text-2xl font-semibold text-foreground mt-8 mb-4",children:"10. Contact Us"}),s.jsxs("p",{className:"text-foreground/90 leading-relaxed",children:["If you have questions or concerns about this Privacy Policy or our data practices, please contact us at"," ",s.jsx("a",{href:"mailto:[email protected]",className:"text-primary hover:underline",children:"[email protected]"}),"."]})]})]})]})}),s.jsx("footer",{className:"border-t border-border bg-muted/30 py-8 mt-12",children:s.jsxs("div",{className:"container mx-auto px-4 text-center",children:[s.jsx("nav",{"aria-label":"Footer navigation",className:"mb-4",children:s.jsxs("ul",{className:"flex flex-wrap justify-center gap-4 text-sm",children:[s.jsx("li",{children:s.jsx(Oe,{to:"/terms",className:"text-muted-foreground hover:text-foreground transition-colors",children:"Terms of Service"})}),s.jsx("li",{children:s.jsx(Oe,{to:"/data-deletion",className:"text-muted-foreground hover:text-foreground transition-colors",children:"Data Deletion"})})]})}),s.jsxs("p",{className:"text-sm text-muted-foreground",children:["© ",new Date().getFullYear()," SociePRO LLC. All rights reserved."]})]})})]})},vfe=()=>{const e={"@context":"https://schema.org","@type":"WebPage",name:"Terms of Service - SociePRO AI",description:"SociePRO AI Terms of Service. Read our terms and conditions for using our platform.",url:"https://sociepro.ai/terms",isPartOf:{"@type":"WebSite",name:"SociePRO AI",url:"https://sociepro.ai"},mainEntity:{"@type":"Article",name:"SociePRO AI Terms of Service",datePublished:"2025-01-09",dateModified:"2026-01-16"}};return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(ar,{title:"Terms of Service - SociePRO AI | AI Social Media Content Generator",description:"SociePRO AI Terms of Service. Read our terms and conditions for using our AI social media content generator, post scheduling, and social media growth platform.",keywords:"SociePRO AI terms of service, social media tool terms, AI content generator terms",canonicalUrl:"https://sociepro.ai/terms",jsonLd:e}),s.jsx("header",{className:"border-b border-border bg-card/50 backdrop-blur-sm sticky top-0 z-50",children:s.jsxs("div",{className:"container mx-auto px-4 py-4 flex items-center justify-between",children:[s.jsx(Oe,{to:"/","aria-label":"SociePRO AI Home",children:s.jsx(Ci,{})}),s.jsx(z,{variant:"ghost",size:"sm",asChild:!0,children:s.jsxs(Oe,{to:"/",children:[s.jsx(Lc,{className:"mr-2 h-4 w-4","aria-hidden":"true"}),"Back to Home"]})})]})}),s.jsx("main",{className:"container mx-auto px-4 py-12 max-w-3xl",children:s.jsxs("article",{className:"prose prose-neutral dark:prose-invert max-w-none",children:[s.jsx("h1",{className:"font-display text-4xl font-bold text-foreground mb-2",children:"Terms of Service"}),s.jsx("p",{className:"text-muted-foreground text-lg mb-8",children:"Last updated: January 9, 2025"}),s.jsxs("section",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"font-display text-2xl font-semibold text-foreground mt-8 mb-4",children:"1. Acceptance of Terms"}
812),s.jsx("p",{className:"text-foreground/90 leading-relaxed",children:'By accessing or using SociePRO AI ("Service"), you agree to be bound by these Terms of Service ("Terms"). If you do not agree to these Terms, you may not access or use the Service. These Terms apply to all visitors, users, and others who access or use the Service.'})]}),s.jsxs("div",{children:[s.jsx("h2",{className:"font-display text-2xl font-semibold text-foreground mt-8 mb-4",children:"2. Description of Service"}),s.jsx("p",{className:"text-foreground/90 leading-relaxed",children:"SociePRO AI is an AI-powered social media content creation and scheduling platform that helps users generate, manage, and publish content across various social media platforms including LinkedIn, Instagram, Facebook, and Threads. The Service includes features such as PostPRO (AI content generation), TrendsPRO (trending topics), ContentSyncPRO (content library), SchedulePRO (post scheduling), InsightPRO (performance analytics), and ClickPRO (one-click year-long marketing)."})]}),s.jsxs("div",{children:[s.jsx("h2",{className:"font-display text-2xl font-semibold text-foreground mt-8 mb-4",children:"3. User Accounts"}),s.jsx("p",{className:"text-foreground/90 leading-relaxed mb-4",children:"To use certain features of the Service, you must register for an account. When you register:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2 text-foreground/90",children:[s.jsx("li",{children:"You must provide accurate, complete, and current information"}),s.jsx("li",{children:"You are responsible for maintaining the security of your account credentials"}),s.jsx("li",{children:"You are responsible for all activities that occur under your account"}),s.jsx("li",{children:"You must notify us immediately of any unauthorized access or security breach"}),s.jsx("li",{children:"You must be at least 18 years old to create an account"})]})]}),s.jsxs("div",{children:[s.jsx("h2",{className:"font-display text-2xl font-semibold text-foreground mt-8 mb-4",children:"4. User Content"}),s.jsx("p",{className:"text-foreground/90 leading-relaxed mb-4",children:"You retain ownership of content you create using the Service. By using the Service, you grant us a license to use, store, and process your content solely to provide the Service. You are solely responsible for:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2 text-foreground/90",children:[s.jsx("li",{children:"The content you create, upload, and publish through the Service"}),s.jsx("li",{children:"Ensuring your content complies with applicable laws and platform policies"}),s.jsx("li",{children:"Any consequences of publishing content to connected social media accounts"})]})]}),s.jsxs("div",{children:[s.jsx("h2",{className:"font-display text-2xl font-semibold text-foreground mt-8 mb-4",children:"5. Prohibited Uses"}),s.jsx("p",{className:"text-foreground/90 leading-relaxed mb-4",children:"You agree not to use the Service to:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2 text-foreground/90",children:[s.jsx("li",{children:"Violate any applicable laws or regulations"}),s.jsx("li",{children:"Infringe upon intellectual property rights of others"}),s.jsx("li",{children:"Distribute spam, malware, or harmful content"}),s.jsx("li",{children:"Harass, abuse, or harm others"}),s.jsx("li",{children:"Impersonate any person or entity"}),s.jsx("li",{children:"Attempt to gain unauthorized access to any systems or data"}),s.jsx("li",{children:"Interfere with or disrupt the Service or servers"}),s.jsx("li",{children:"Create content that is defamatory, obscene, or illegal"})]})]}),s.jsxs("div",{children:[s.jsx("h2",{className:"font-display text-2xl font-semibold text-foreground mt-8 mb-4",children:"6. Third-Party Integrations"}),s.jsx("p",{className:"text-foreground/90 leading-relaxed",children:"The Service integrates with third-party platforms such as LinkedIn, Instagram, Facebook, and other social media networks. Your use of these integrations is subject to the respective terms and policies of those platforms. We are not responsible for the availability, policies, or actions of third-party platforms. You are responsible for complying with all applicable terms when using connected accounts."})]}),s.jsxs("div",{children:[s.jsx("h2",{className:"font-display text-2xl font-semibold text-foreground mt-8 mb-4",children:"7. AI-Generated Content"}
812),s.jsx("p",{className:"text-foreground/90 leading-relaxed",children:"The Service uses artificial intelligence to assist with content creation through features like PostPRO and TrendsPRO. While we strive for quality, AI-generated content may require review and editing. You are solely responsible for reviewing, editing, and approving all content before publishing. We do not guarantee that AI-generated content will be accurate, appropriate, or suitable for your specific needs."})]}),s.jsxs("div",{children:[s.jsx("h2",{className:"font-display text-2xl font-semibold text-foreground mt-8 mb-4",children:"8. Intellectual Property"}),s.jsx("p",{className:"text-foreground/90 leading-relaxed",children:"The Service, including its original content, features, and functionality, is owned by SociePRO AI and is protected by copyright, trademark, and other intellectual property laws. You may not copy, modify, distribute, or create derivative works of our Service without explicit permission."})]}),s.jsxs("div",{children:[s.jsx("h2",{className:"font-display text-2xl font-semibold text-foreground mt-8 mb-4",children:"9. Disclaimer of Warranties"}),s.jsx("p",{className:"text-foreground/90 leading-relaxed",children:'THE SERVICE IS PROVIDED "AS IS" AND "AS AVAILABLE" WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED. WE DO NOT WARRANT THAT THE SERVICE WILL BE UNINTERRUPTED, SECURE, OR ERROR-FREE. WE DISCLAIM ALL WARRANTIES, INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.'})]}),s.jsxs("div",{children:[s.jsx("h2",{className:"font-display text-2xl font-semibold text-foreground mt-8 mb-4",children:"10. Limitation of Liability"}),s.jsx("p",{className:"text-foreground/90 leading-relaxed",children:"TO THE MAXIMUM EXTENT PERMITTED BY LAW, SOCIEPRO AI SHALL NOT BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES, INCLUDING BUT NOT LIMITED TO LOSS OF PROFITS, DATA, OR BUSINESS OPPORTUNITIES, ARISING FROM YOUR USE OF THE SERVICE."})]}),s.jsxs("div",{children:[s.jsx("h2",{className:"font-display text-2xl font-semibold text-foreground mt-8 mb-4",children:"11. Termination"}),s.jsx("p",{className:"text-foreground/90 leading-relaxed",children:"We may terminate or suspend your account and access to the Service immediately, without prior notice, for any reason, including breach of these Terms. Upon termination, your right to use the Service will immediately cease. You may terminate your account at any time by contacting us or through account settings."})]}),s.jsxs("div",{children:[s.jsx("h2",{className:"font-display text-2xl font-semibold text-foreground mt-8 mb-4",children:"12. Changes to Terms"}),s.jsx("p",{className:"text-foreground/90 leading-relaxed",children:'We reserve the right to modify these Terms at any time. We will notify users of material changes by posting the updated Terms on this page and updating the "Last updated" date. Your continued use of the Service after changes constitutes acceptance of the modified Terms.'})]}),s.jsxs("div",{children:[s.jsx("h2",{className:"font-display text-2xl font-semibold text-foreground mt-8 mb-4",children:"13. Governing Law"}),s.jsx("p",{className:"text-foreground/90 leading-relaxed",children:"These Terms shall be governed by and construed in accordance with applicable laws, without regard to conflict of law principles. Any disputes arising from these Terms or your use of the Service shall be resolved through binding arbitration or in courts of competent jurisdiction."})]}),s.jsxs("div",{children:[s.jsx("h2",{className:"font-display text-2xl font-semibold text-foreground mt-8 mb-4",children:"14. Contact Us"}),s.jsxs("p",{className:"text-foreground/90 leading-relaxed",children:["If you have questions about these Terms of Service, please contact us at"," ",s.jsx("a",{href:"mailto:[email protected]",className:"text-primary hover:underline",children:"[email protected]"}),"."]})]})]})]})}),s.jsx("footer",{className:"border-t border-border bg-muted/30 py-8 mt-12",children:s.jsxs("div",{className:"container mx-auto px-4 text-center",children:[s.jsx("nav",{"aria-label":"Footer navigation",className:"mb-4",children:s.jsxs("ul",{className:"flex flex-wrap justify-center gap-4 text-sm",children:[s.jsx("li",{children:s.jsx(Oe,{to:"/privacy",className:"text-muted-foreground hover:text-foreground transition-colors",children:"Privacy Policy"})}),s.jsx("li",{children:s.jsx(Oe,{to:"/data-deletion",className:"text-muted-foreground hover:text-foreground transition-colors",children:"Data Deletion"})})]})}),s.jsxs("p",{className:"text-sm text-muted-foreground",children:["© ",new Date().getFullYear()," SociePRO LLC. All rights reserved."]})]})})]})},bfe=()=>{const e={"@context":"https://schema.org","@type":"WebPage",name:"Data Deletion Instru
812ctions - SociePRO AI",description:"Request deletion of your personal data from SociePRO AI.",url:"https://sociepro.ai/data-deletion",isPartOf:{"@type":"WebSite",name:"SociePRO AI",url:"https://sociepro.ai"},mainEntity:{"@type":"Article",name:"SociePRO AI Data Deletion Instructions",datePublished:"2025-01-10",dateModified:"2026-01-16"}};return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(ar,{title:"Data Deletion Instructions - SociePRO AI | Delete Your Account",description:"Request deletion of your personal data from SociePRO AI. Follow our step-by-step instructions to delete your account and all associated data from our AI social media platform.",keywords:"SociePRO AI data deletion, delete account, remove data, GDPR data deletion, Meta data deletion",canonicalUrl:"https://sociepro.ai/data-deletion",jsonLd:e}),s.jsx("header",{className:"border-b border-border bg-card/50 backdrop-blur-sm sticky top-0 z-50",children:s.jsxs("div",{className:"container mx-auto px-4 py-4 flex items-center justify-between",children:[s.jsx(Oe,{to:"/","aria-label":"SociePRO AI Home",children:s.jsx(Ci,{})}),s.jsx(z,{variant:"ghost",size:"sm",asChild:!0,children:s.jsxs(Oe,{to:"/",children:[s.jsx(Lc,{className:"mr-2 h-4 w-4","aria-hidden":"true"}),"Back to Home"]})})]})}),s.jsx("main",{className:"container mx-auto px-4 py-12 max-w-3xl",children:s.jsxs("article",{className:"prose prose-neutral dark:prose-invert max-w-none",children:[s.jsx("h1",{className:"font-display text-4xl font-bold text-foreground mb-2",children:"Data Deletion Instructions"}),s.jsx("p",{className:"text-muted-foreground text-lg mb-8",children:"Last updated: January 10, 2025"}),s.jsxs("section",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"font-display text-2xl font-semibold text-foreground mt-8 mb-4",children:"How to Request Data Deletion"}),s.jsx("p",{className:"text-foreground/90 leading-relaxed mb-4",children:"If you would like to request the deletion of your personal data from SociePRO AI, you can do so by following the steps below. We are committed to protecting your privacy and will process your request in accordance with applicable data protection laws."})]}),s.jsxs("div",{children:[s.jsx("h2",{className:"font-display text-2xl font-semibold text-foreground mt-8 mb-4",children:"Option 1: Delete Your Account via Settings"}),s.jsx("p",{className:"text-foreground/90 leading-relaxed mb-4",children:"You can delete your account and all associated data directly from within the app:"}),s.jsxs("ol",{className:"list-decimal pl-6 space-y-2 text-foreground/90",children:[s.jsx("li",{children:"Log in to your SociePRO AI account"}),s.jsxs("li",{children:["Navigate to ",s.jsx("strong",{children:"Settings"})]}),s.jsxs("li",{children:["Scroll to the ",s.jsx("strong",{children:"Account"})," section"]}),s.jsxs("li",{children:["Click ",s.jsx("strong",{children:"Delete Account"})]}),s.jsx("li",{children:"Confirm the deletion when prompted"})]}),s.jsx("p",{className:"text-foreground/90 leading-relaxed mt-4",children:"This will permanently delete your account and all associated data, including:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2 text-foreground/90",children:[s.jsx("li",{children:"Your profile information"}),s.jsx("li",{children:"Saved posts and content created with PostPRO"}),s.jsx("li",{children:"Scheduled posts from SchedulePRO and ClickPRO"}),s.jsx("li",{children:"Connected social media account tokens"}),s.jsx("li",{children:"User preferences and settings"}),s.jsx("li",{children:"ContentSyncPRO library data"})]})]}),s.jsxs("div",{children:[s.jsx("h2",{className:"font-display text-2xl font-semibold text-foreground mt-8 mb-4",children:"Option 2: Email Request"}),s.jsx("p",{className:"text-foreground/90 leading-relaxed mb-4",children:"If you are unable to access your account or prefer to submit a request via email, please send your data deletion request to:"}),s.jsxs("p",{className:"text-foreground font-medium text-lg mb-4",children:["📧 ",s.jsx("a",{href:"mailto:[email protected]",className:"text-primary hover:underline",children:"[email protected]"})]}
812),s.jsx("p",{className:"text-foreground/90 leading-relaxed mb-4",children:"Please include the following information in your request:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2 text-foreground/90",children:[s.jsx("li",{children:'Subject line: "Data Deletion Request"'}),s.jsx("li",{children:"The email address associated with your SociePRO AI account"}),s.jsx("li",{children:"Any additional information to help us locate your account"})]})]}),s.jsxs("div",{children:[s.jsx("h2",{className:"font-display text-2xl font-semibold text-foreground mt-8 mb-4",children:"Processing Time"}),s.jsxs("p",{className:"text-foreground/90 leading-relaxed",children:["We will process your data deletion request within ",s.jsx("strong",{children:"30 days"})," of receipt. You will receive a confirmation email once your data has been deleted. Please note that some data may be retained for legal or regulatory compliance purposes, as outlined in our ",s.jsx(Oe,{to:"/privacy",className:"text-primary hover:underline",children:"Privacy Policy"}),"."]})]}),s.jsxs("div",{children:[s.jsx("h2",{className:"font-display text-2xl font-semibold text-foreground mt-8 mb-4",children:"Facebook / Meta Login Users"}),s.jsx("p",{className:"text-foreground/90 leading-relaxed mb-4",children:"If you signed up or logged in using Facebook (Meta), you can also manage your data through Facebook:"}),s.jsxs("ol",{className:"list-decimal pl-6 space-y-2 text-foreground/90",children:[s.jsxs("li",{children:["Go to your ",s.jsx("strong",{children:"Facebook Settings"})]}),s.jsxs("li",{children:["Navigate to ",s.jsx("strong",{children:"Settings & Privacy → Settings"})]}),s.jsxs("li",{children:["Select ",s.jsx("strong",{children:"Apps and Websites"})]}),s.jsxs("li",{children:["Find ",s.jsx("strong",{children:"SociePRO AI"})," and click ",s.jsx("strong",{children:"Remove"})]}),s.jsx("li",{children:"Check the box to delete all data SociePRO AI received about you"})]}),s.jsx("p",{className:"text-foreground/90 leading-relaxed mt-4",children:"Removing the app from Facebook will revoke our access to your Facebook data. To fully delete your SociePRO AI account and all associated data, please also follow Option 1 or Option 2 above."})]}),s.jsxs("div",{children:[s.jsx("h2",{className:"font-display text-2xl font-semibold text-foreground mt-8 mb-4",children:"Questions?"}),s.jsxs("p",{className:"text-foreground/90 leading-relaxed",children:["If you have any questions about data deletion or our privacy practices, please contact us at"," ",s.jsx("a",{href:"mailto:[email protected]",className:"text-primary hover:underline",children:"[email protected]"}),"."]})]})]})]})}),s.jsx("footer",{className:"border-t border-border bg-muted/30 py-8 mt-12",children:s.jsxs("div",{className:"container mx-auto px-4 text-center",children:[s.jsx("nav",{"aria-label":"Footer navigation",className:"mb-4",children:s.jsxs("ul",{className:"flex flex-wrap justify-center gap-4 text-sm",children:[s.jsx("li",{children:s.jsx(Oe,{to:"/privacy",className:"text-muted-foreground hover:text-foreground transition-colors",children:"Privacy Policy"})}),s.jsx("li",{children:s.jsx(Oe,{to:"/terms",className:"text-muted-foreground hover:text-foreground transition-colors",children:"Terms of Service"})})]})}),s.jsxs("p",{className:"text-sm text-muted-foreground",children:["© ",new Date().getFullYear()," SociePRO LLC. All rights reserved."]})]})})]})},qy=768;function xfe(){const[e,t]=g.useState(()=>typeof window>"u"?void 0:window.innerWidth<qy);return g.useEffect(()=>{const n=window.matchMedia(`(max-width: ${qy-1}px)`),r=()=>{t(window.innerWidth<qy)};return n.addEventListener("change",r),t(window.innerWidth<qy),()=>n.removeEventListener("change",r)},[]),!!e}function Sg(){const[e,t]=g.useState({isAdmin:!1,isLoading:!0,userId:null});return g.useEffect(()=>{const n=async()=>{try{const{data:{session:a}}=await W.auth.getSession();if(!a){t({isAdmin:!1,isLoading:!1,userId:null});return}const i=a.user.id,{data:o,error:l}=await W.from("user_roles").select("role").eq("user_id",i).eq("role","admin").maybeSingle();if(l){console.error("Error checking admin role:",l),t({isAdmin:!1,isLoading:!1,userId:i});return}t({isAdmin:!!o,isLoading:!1,userId:i})}catch(a){console.error("Admin access check failed:",a),t({isAdmin:!1,isLoading:!1,userId:null})}};n();const{data:{subscription:r}}=W.auth.onAuthStateChange(()=>{n()});return()=>r.unsubscribe()},[]),e}const wfe=[{name:"PostPRO",href:"/dashboard",icon:Up},{name:"Templates",href:"/dashboard/templates",icon:rJ},{name:"SchedulePRO",href:"/dashboard/schedule",icon:ki},{name:"InsightPRO",href:"/dashboard/content-analytics",icon:Oh,badge:"ClickPRO"},{name:"AutoBlogPRO",href:"/dashboard/autoblog",icon:dr},{name:"Courses",href:"/dashboard/courses",icon:oi}],_fe=[{name:"Admin Analytics",href:"/dashboard/analytics",icon:Ei},{name:"Corporate Blog",href:"/dashboard/admin-blog",icon:hJ},{name:"Prompt Library",href:"/dashboard/prompt-library",icon:zF}],kfe=[{name:"Settings",href:"/dashboard/settings",icon:xP}],HI=({isCollapsed:e,onToggle:t,mobile:n=!1})=>{const r=us(),a=Gt(),{isAdmin:i}=Sg(),o=[...kfe,...i?_fe:[]],l=async()=>{await W.auth.signOut(),a("/")};
812return s.jsx(OP,{delayDuration:0,children:s.jsxs("aside",{className:K("fixed left-0 top-0 flex h-screen flex-col border-r border-sidebar-border bg-sidebar transition-all duration-200 ease-linear",n?"z-50 w-72 max-w-[85vw] shadow-xl":"z-40",!n&&(e?"w-16":"w-64")),children:[s.jsxs("div",{className:K("flex h-16 items-center border-b border-sidebar-border",e?"justify-center px-2":"justify-between px-4"),children:[!e&&s.jsx(Ci,{}),s.jsx(z,{variant:"ghost",size:"icon",onClick:t,"aria-label":n?"Close menu":e?"Expand sidebar":"Collapse sidebar",className:"h-8 w-8 text-muted-foreground hover:text-foreground",children:n?s.jsx(Br,{className:"h-5 w-5"}):e?s.jsx(Ma,{className:"h-4 w-4"}):s.jsx(Kc,{className:"h-4 w-4"})})]}),s.jsxs("nav",{className:"flex-1 space-y-1 px-2 py-4",children:[!e&&s.jsx("div",{className:"mb-2 px-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Create"}),wfe.map(c=>{const u=r.pathname===c.href,h=c,d=s.jsxs(Oe,{to:c.href,className:K("group flex items-center gap-3 rounded-lg px-3 py-2.5 text-sm font-medium transition-all duration-200",e&&"justify-center px-2",u?"bg-sidebar-accent text-sidebar-accent-foreground":"text-sidebar-foreground hover:bg-sidebar-accent/50"),children:[s.jsx(c.icon,{className:K("h-5 w-5 shrink-0 transition-colors",u?"text-primary":"text-muted-foreground group-hover:text-foreground")}),!e&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"truncate",children:c.name}),c.name==="PostPRO"&&s.jsx(Se,{className:"ml-auto h-3.5 w-3.5 text-accent"}),h.badge&&s.jsx(je,{variant:"outline",className:"ml-auto text-[10px] px-1.5 py-0 h-4 bg-emerald-500/10 text-emerald-600 border-emerald-500/20",children:h.badge})]})]},c.name);return e?s.jsxs(Nv,{children:[s.jsx(Cv,{asChild:!0,children:d}),s.jsxs(dp,{side:"right",className:"flex items-center gap-2",children:[c.name,c.name==="PostPRO"&&s.jsx(Se,{className:"h-3 w-3 text-accent"}),h.badge&&s.jsx(je,{variant:"outline",className:"text-[10px] px-1.5 py-0 h-4 bg-emerald-500/10 text-emerald-600 border-emerald-500/20",children:h.badge})]})]},c.name):d}),!e&&s.jsx("div",{className:"mb-2 mt-6 px-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Account"}),e&&s.jsx("div",{className:"my-4 border-t border-sidebar-border"}),o.map(c=>{const u=r.pathname===c.href,h=s.jsxs(Oe,{to:c.href,className:K("group flex items-center gap-3 rounded-lg px-3 py-2.5 text-sm font-medium transition-all duration-200",e&&"justify-center px-2",u?"bg-sidebar-accent text-sidebar-accent-foreground":"text-sidebar-foreground hover:bg-sidebar-accent/50"),children:[s.jsx(c.icon,{className:"h-5 w-5 shrink-0 text-muted-foreground group-hover:text-foreground"}),!e&&s.jsx("span",{className:"truncate",children:c.name})]},c.name);return e?s.jsxs(Nv,{children:[s.jsx(Cv,{asChild:!0,children:h}),s.jsx(dp,{side:"right",children:c.name})]},c.name):h})]}),s.jsx("div",{className:"border-t border-sidebar-border p-2",children:e?s.jsxs(Nv,{children:[s.jsx(Cv,{asChild:!0,children:s.jsx("button",{onClick:l,className:"flex w-full items-center justify-center rounded-lg px-2 py-2.5 text-sm font-medium text-muted-foreground transition-colors hover:bg-destructive/10 hover:text-destructive",children:s.jsx(fj,{className:"h-5 w-5 shrink-0"})})}),s.jsx(dp,{side:"right",children:"Sign out"})]}):s.jsxs("button",{onClick:l,className:"flex w-full items-center gap-3 rounded-lg px-3 py-2.5 text-sm font-medium text-muted-foreground transition-colors hover:bg-destructive/10 hover:text-destructive",children:[s.jsx(fj,{className:"h-5 w-5 shrink-0"}),s.jsx("span",{className:"truncate",children:"Sign out"})]})})]})})},jfe=({trialStatus:e,daysRemaining:t,previewPostsRemaining:n,isPaid:r})=>r?null:e==="none"?s.jsxs("div",{className:"flex items-center gap-2 rounded-full border border-primary/30 bg-primary/10 px-4 py-2",children:[s.jsx(Ei,{className:"h-4 w-4 text-primary"}),s.jsxs("span",{className:"text-sm font-medium text-primary",children:["Preview Mode — ",n," complimentary post",n!==1?"s":""," available"]})]}):e==="active"?s.jsxs("div",{className:"flex items-center gap-2 rounded-full border border-green-500/30 bg-green-500/10 px-4 py-2",children:[s.jsx(pr,{className:"h-4 w-4 text-green-600"}),s.jsxs("span",{className:"text-sm font-medium text-green-600",children:["Trial Active — ",t," Day",t!==1?"s":""," Remaining"]})]}):e==="expired"?s.jsxs("div",{className:"flex items-center gap-2 rounded-full border border-destructive/30 bg-destructive/10 px-4 py-2",children:[s.jsx(Bs,{className:"h-4 w-4 text-destructive"}),s.jsx("span",{className:"text-sm font-medium text-destructive",children:"Trial Expired — Upgrade to Continue"})]}):null,k1=[{tier:1,name:"Fast Start",subtitle:"Core identity in under 60 seconds",baseAPS:40},{tier:2,name:"Differentiation",subtitle:"What separates you from every competitor",baseAPS:60},{tier:3,name:"Premium Alignment",subtitle:"Attract higher-value clients",baseAPS:80},{tier:4,name:"Category Authority",subtitle:"Own your category",baseAPS:100}];function KW(e){return e>=90?{label:"Category Leader",color:"text-[hsl(45_100%_60%)]"}:e>=75?{label:"Premium Authority",color:"text-[hsl(106_54%_60%)]"}:e>=55?{label:"Differentiated",color:"text-[hsl(200_80%_60%)]"}:e>=35?{label:"Positioned",color:"text-primary"}:{label:"Getting Started",color:"text-muted-foreground"}}function Sfe(e){return e>=90?"bg-[hsl(45_100%_60%/0.15)] text-[hsl(45_100%_60%)] border-[hsl(45_100%_60%/0.3)]":e>=75?"bg-[hsl(106_54%_60%/0.15)] text-[hsl(106_54%_60%)] border-[hsl(106_54%_60%/0.3)]":e>=55?"bg-[hsl(200_80%_60%/0.15)] text-[hsl(200_80%_60%)] border-[hsl(200_80%_60%/0.3)]":e>=35?"bg-primary/15 text-primary border-primary/30":"bg-muted text-muted-foreground border-border"}function Nfe(e,t,n){let a=[0,40,60,80,100][e]||0,i=0;const o=Object.values(t).filter(f=>f.trim()),l=o.filter(f=>f.includes(",")||f.length>40||/\d/.test(f)||f.includes("$"));l.length>=5?i=5:l.length>=3&&(i=3);let c=0;const u=["unlike","contrary","instead of","not like","refuse to","never","against","challenge","disrupt","unconventional"];return o.some(f=>u.some(p=>f.toLowerCase().includes(p)))&&(c=5),{score:Math.min(100,a+i+c),nicheBonus:i,contrarianBonus:c}}const zr=[{id:"premium_signal",label:"What signals premium quality in your work?",placeholder:"e.g. White-glove onboarding, proprietary methodology",type:"textarea",required:!0},{id:"ideal_revenue_client",label:"Describe your highest-value client profile",placeholder:"e.g. $500K+ net worth, values long-term relationships",type:"textarea",required:!0},{id:"objection_handling",label:"Top objection you overcome — and how",placeholder:"e.g. 'You're too expensive' → I show 3-year ROI comparison",type:"textarea",required:!0},{id:"social_proof",label:"Strongest proof point or testimonial theme",placeholder:"e.g. '97% client retention rate' or 'Sold 40% above asking'",type:"text",required:!0},{id:"content_belief",label:"Core belief your content should reinforce",placeholder:"e.g. 'Good advice should be accessible, not gatekept'",type:"text",required:!0}],Hr=[{id:"category_name",label:"What category do you want to own?",placeholder:"e.g. 'Data-driven luxury real estate in the Pacific NW'",type:"text",required:!0},{id:"contrarian_stance",label:"What does your industry get wrong?",placeholder:"e.g. 'Most agents focus on volume, not relationships'",type:"textarea",required:!0},{id:"five_year_authority",label:"What do you want to be known for in 5 years?",placeholder:"e.g. 'The definitive voice in sustainable home building'",type:"textarea",required:!0},{id:"thought_leadership_topic",label:"Your signature thought leadership topic",placeholder:"e.g. 'Why the 30-year mortgage is a wealth destroyer'",type:"text",required:!0},{id:"legacy_impact",label:"What legacy or impact do you create for clients?",placeholder:"e.g. 'Generational wealth through smart property investments'",type:"text",required:!0}],Cfe={realtor:[{tier:1,name:"Fast Start",subtitle:"Core identity",baseAPS:40,questions:[{id:"primary_market",label:"Primary market (city + neighborhood focus)",placeholder:"e.g. Bend, OR – NorthWest Crossing",type:"text",required:!0},{id:"price_range",label:"Price range specialty",placeholder:"e.g. $400K–$800K",type:"text",required:!0},{id:"client_type",label:"Client type focus",placeholder:"",type:"select",options:["Buyers","Sellers","Investors","Luxury","First-time buyers","Relocation"],required:!0},{id:"years_in_business",label:"Years in business",placeholder:"e.g. 12",type:"text"},{id:"signature_process",label:"Signature process or guarantee",placeholder:"e.g. 30-Day Sell Guarantee",type:"text"},{id:"communication_style",label:"Communication style",placeholder:"",type:"select",options:["Data-driven","Relational","Aggressive negotiator","Consultative","Educational"],required:!0},{id:"personal_differentiator",label:"Personal differentiator",placeholder:"e.g. Former contractor, relocation expert",type:"text",required:!0},{id:"target_demographic",label:"Target demographic",placeholder:"e.g. Young families, retirees, tech professionals",type:"text"}]},{tier:2,name:"Differentiation",subtitle:"Stand out from every other agent",baseAPS:60,questions:[{id:"neighborhood_expertise",label:"What specific neighborhood knowledge do competitors lack?",placeholder:"e.g. I know every HOA rule in NorthWest Crossing",type:"textarea",required:!0},{id:"deal_breaker",label:"What's a deal-breaker for clients you won't work with?",placeholder:"e.g. Clients who aren't pre-approved",type:"text",required:!0},{id:"client_transformation",label:"Describe a client transformation story",placeholder:"e.g. Family of 4 went from renting to dream home in 60 days",type:"textarea",required:!0},{id:"marketing_advantage",label:"Marketing advantage over other agents",placeholder:"e.g. Professional staging included, drone photography",type:"text",required:!0},{id:"local_involvement",label:"Local community involvement",placeholder:"e.g. Youth soccer sponsor, neighborhood board member",type:"text",required:!0}]},{tier:3,name:"Premium Alignment",subtitle:"Attract higher-value clients",baseAPS:80,questions:zr},{tier:4,name:"Category Authority",subtitle:"Own your category",baseAPS:100,questions:Hr}],financial_advisor:[{tier:1,name:"Fast Start",subtitle:"Core identity",baseAPS:40,questions:[{id:"financial_specialty",label:"Financial specialty",placeholder:"",type:"select",options:["Retirement planning","Wealth building","Tax strategy","Estate planning","College funding","Insurance planning"],required:!0},{id:"client_range",label:"Client income / net worth range",placeholder:"e.g. $250K–$1M investable assets",type:"text",required:!0},{id:"client_stage",label:"Ideal client stage",placeholder:"",type:"select",options:["Accumulation","Transition","Pre-retirement","Retirement","Legacy"],required:!0},{id:"philosophy",label:"Investment philosophy",placeholder:"",type:"select",options:["Conservative growth","Aggressive growth","Legacy focus","Tax-optimized","ESG / Values-based"],required:!0},{id:"credentials",label:"Credentials",placeholder:"e.g. CFP®, CFA, ChFC",type:"text"},{id:"risk_communication",label:"Risk communication style",placeholder:"e.g. Trans
812parent, scenario-based, calm educator",type:"text"},{id:"misconception",label:"Biggest misconception clients have",placeholder:"e.g. They think they need $1M to start",type:"textarea"},{id:"retention_reason",label:"Why clients stay",placeholder:"e.g. Proactive communication, quarterly reviews",type:"textarea"}]},{tier:2,name:"Differentiation",subtitle:"What separates you",baseAPS:60,questions:[{id:"planning_process",label:"Describe your unique planning process",placeholder:"e.g. 3-meeting discovery, stress-test every scenario",type:"textarea",required:!0},{id:"market_volatility_approach",label:"How do you handle client anxiety during market drops?",placeholder:"e.g. Pre-recorded video updates within 24 hours",type:"textarea",required:!0},{id:"fee_transparency",label:"Fee structure and how you communicate it",placeholder:"e.g. Flat fee, no AUM percentage, fully transparent",type:"text",required:!0},{id:"tech_advantage",label:"Technology or tools that give you an edge",placeholder:"e.g. Real-time portal, Monte Carlo simulations",type:"text",required:!0},{id:"niche_depth",label:"What niche do you serve better than anyone?",placeholder:"e.g. Tech executives with RSU/ISO complexity",type:"text",required:!0}]},{tier:3,name:"Premium Alignment",subtitle:"Attract higher-value clients",baseAPS:80,questions:zr},{tier:4,name:"Category Authority",subtitle:"Own your category",baseAPS:100,questions:Hr}],builder_remodeler:[{tier:1,name:"Fast Start",subtitle:"Core identity",baseAPS:40,questions:[{id:"build_type",label:"Build type",placeholder:"",type:"select",options:["Custom homes","Remodel","Commercial","Spec builds","Additions","ADUs"],required:!0},{id:"avg_project_size",label:"Average project size",placeholder:"e.g. $150K–$500K",type:"text",required:!0},{id:"design_style",label:"Design style specialty",placeholder:"e.g. Modern farmhouse, mid-century, craftsman",type:"text"},{id:"timeline_philosophy",label:"Timeline philosophy",placeholder:"e.g. Under-promise, over-deliver",type:"text"},{id:"transparency_level",label:"Transparency level",placeholder:"",type:"select",options:["Open book pricing","Milestone billing","Fixed price","Cost-plus"],required:!0},{id:"ideal_client",label:"Ideal client",placeholder:"e.g. Homeowners who value craftsmanship over speed",type:"text"},{id:"warranty_advantage",label:"Warranty / process advantage",placeholder:"e.g. 5-year structural warranty, daily photo updates",type:"text"},{id:"what_makes_different",label:"What makes your builds different",placeholder:"",type:"textarea",required:!0}]},{tier:2,name:"Differentiation",subtitle:"What separates your builds",baseAPS:60,questions:[{id:"material_philosophy",label:"Material sourcing philosophy",placeholder:"e.g. Local lumber, sustainable materials only",type:"text",required:!0},{id:"client_communication",label:"How do you keep clients informed during builds?",placeholder:"e.g. Weekly video walkthroughs, real-time project portal",type:"textarea",required:!0},{id:"subcontractor_management",label:"How do you manage subcontractor quality?",placeholder:"e.g. Same crew for 10+ years, vetted partner network",type:"text",required:!0}
812,{id:"problem_solving",label:"Describe how you handle unexpected issues",placeholder:"e.g. Transparent same-day notification with 3 solution options",type:"textarea",required:!0},{id:"post_build_support",label:"Post-completion support",placeholder:"e.g. 1-year walkthrough, lifetime structural consult",type:"text",required:!0}]},{tier:3,name:"Premium Alignment",subtitle:"Attract premium projects",baseAPS:80,questions:zr},{tier:4,name:"Category Authority",subtitle:"Own your category",baseAPS:100,questions:Hr}],property_manager:[{tier:1,name:"Fast Start",subtitle:"Core identity",baseAPS:40,questions:[{id:"portfolio_size",label:"Portfolio size",placeholder:"e.g. 85 units",type:"text",required:!0},{id:"property_type_focus",label:"Residential vs commercial",placeholder:"",type:"select",options:["Residential","Commercial","Mixed-use","HOA / Association"],required:!0},{id:"tenant_screening",label:"Tenant screening philosophy",placeholder:"e.g. 5-point screening, background + income verification",type:"text"},{id:"owner_communication",label:"Owner communication cadence",placeholder:"",type:"select",options:["Weekly updates","Monthly reports","Quarterly reviews","Real-time portal access"],required:!0},{id:"maintenance_model",label:"Maintenance model",placeholder:"e.g. In-house team, 24/7 emergency line",type:"text"},{id:"eviction_prevention",label:"Eviction prevention strategy",placeholder:"e.g. Early intervention, payment plans",type:"textarea"},{id:"fee_positioning",label:"Fee structure positioning",placeholder:"e.g. Flat monthly fee, no hidden charges",type:"text"},{id:"ideal_property",label:"Ideal property type",placeholder:"e.g. Single-family rentals, small multi-family",type:"text"}]},{tier:2,name:"Differentiation",subtitle:"What separates your management",baseAPS:60,questions:[{id:"vacancy_strategy",label:"How do you minimize vacancy rates?",placeholder:"e.g. Pre-listing 60 days before lease end",type:"textarea",required:!0},{id:"owner_reporting",label:"What makes your owner reporting unique?",placeholder:"e.g. Real-time dashboards, video property inspections",type:"text",required:!0},{id:"tenant_retention",label:"Tenant retention strategy",placeholder:"e.g. Anniversary gifts, maintenance responsiveness < 2 hours",type:"text",required:!0},{id:"legal_expertise",label:"Legal / compliance expertise",placeholder:"e.g. Fair housing certified, Section 8 specialist",type:"text",required:!0},{id:"technology_stack",label:"Technology that gives you an edge",placeholder:"e.g. Smart locks, automated rent collection, AI maintenance scheduling",type:"text",required:!0}]},{tier:3,name:"Premium Alignment",subtitle:"Attract premium property owners",baseAPS:80,questions:zr},{tier:4,name:"Category Authority",subtitle:"Own your category",baseAPS:100,questions:Hr}],host:[{tier:1,name:"Fast Start",subtitle:"Core identity",baseAPS:40,questions:[{id:"property_type",label:"Property type",placeholder:"e.g. Beach house, cabin, urban loft",type:"text",required:!0},{id:"location_vibe",label:"Location vibe",placeholder:"e.g. Lakefront retreat, mountain escape",type:"text",required:!0},{id:"sleeps_count",label:"Sleeps how many",placeholder:"e.g. 6 guests",type:"text"},{id:"top_amenities",label:"Top 3 amenities",placeholder:"e.g. Hot tub, lake view, game room",type:"text",required:!0},{id:"photogenic_feature",label:"Unique photogenic feature",placeholder:"e.g. Floor-to-ceiling windows overlooking the valley",type:"text"},{id:"target_guest",label:"Target guest type",placeholder:"",type:"select",options:["Couples","Families","Remote workers","Adventure travelers","Corporate retreats","Bachelorette groups"],required:!0}
812,{id:"hosting_philosophy",label:"Hosting philosophy",placeholder:"e.g. 5-star hotel experience with local charm",type:"text",required:!0},{id:"review_goal",label:"Review goal",placeholder:"e.g. Superhost status, 4.9+ rating",type:"text"}]},{tier:2,name:"Differentiation",subtitle:"What makes your stay unforgettable",baseAPS:60,questions:[{id:"guest_experience",label:"Describe the guest experience you create",placeholder:"e.g. Curated welcome basket with local goods",type:"textarea",required:!0},{id:"local_partnerships",label:"Local partnerships or exclusive perks",placeholder:"e.g. Discounted kayak rentals, restaurant reservations",type:"text",required:!0},{id:"turnover_process",label:"What makes your turnover/cleaning process exceptional?",placeholder:"e.g. Hotel-grade inspection checklist, same-day availability",type:"text",required:!0},{id:"repeat_guest_strategy",label:"How do you drive repeat bookings?",placeholder:"e.g. Loyalty discount, seasonal email campaigns",type:"text",required:!0},{id:"crisis_handling",label:"How do you handle guest issues?",placeholder:"e.g. 30-minute response guarantee, backup property available",type:"textarea",required:!0}]},{tier:3,name:"Premium Alignment",subtitle:"Attract premium guests",baseAPS:80,questions:zr},{tier:4,name:"Category Authority",subtitle:"Own your category",baseAPS:100,questions:Hr}],restaurantpro:[{tier:1,name:"Fast Start",subtitle:"Core identity",baseAPS:40,questions:[{id:"restaurant_type",label:"Which best describes your restaurant?",placeholder:"",type:"select",options:["Fine Dining","Casual Dining","Fast Casual","Cafe / Coffee Shop","Family Style","Bar & Grill","Ethnic Cuisine","Farm-to-Table","Other"],required:!0},{id:"primary_vibe",label:"What atmosphere best fits your brand?",placeholder:"",type:"select",options:["Upscale & Elegant","Warm & Cozy","Trendy & Modern","Lively & Social","Relaxed & Comfortable"],required:!0},{id:"signature_strength",label:"What makes you unforgettable?",placeholder:"",type:"select",options:["Flavor intensity","Ingredient quality","Presentation","Hospital
812ity","Ambiance","Consistency"],required:!0},{id:"audience_focus",label:"Your primary audience?",placeholder:"",type:"select",options:["Couples","Families","Professionals","Foodies","Local Regulars","Tourists"],required:!0},{id:"cuisine_specialty",label:"Cuisine type or signature dish",placeholder:"e.g. Wood-fired Neapolitan pizza, farm-to-table American",type:"text",required:!0},{id:"location_character",label:"Location and neighborhood character",placeholder:"e.g. Downtown arts district, suburban family corridor",type:"text"},{id:"price_point",label:"Average ticket per person",placeholder:"e.g. $25–$45",type:"text"},{id:"years_established",label:"Years in operation",placeholder:"e.g. 8 years",type:"text"}]},{tier:2,name:"Differentiation",subtitle:"Why diners choose you",baseAPS:60,questions:[{id:"sourcing_story",label:"Where do your ingredients come from?",placeholder:"e.g. Local farms within 50 miles, own herb garden",type:"textarea",required:!0},{id:"service_philosophy",label:"Service philosophy that sets you apart",placeholder:"e.g. Every server knows the full menu story",type:"text",required:!0},{id:"community_role",label:"Role in the local community",placeholder:"e.g. Weekly farmers market, charity dinner host",type:"text",required:!0},{id:"repeat_driver",label:"What brings regulars back?",placeholder:"e.g. Seasonal menu changes, loyalty rewards, events",type:"text",required:!0},{id:"online_reputation",label:"Online reputation highlight",placeholder:"e.g. 4.8 Google rating, featured in local magazine",type:"text",required:!0}]},{tier:3,name:"Premium Alignment",subtitle:"Attract premium diners",baseAPS:80,questions:zr},{tier:4,name:"Category Authority",subtitle:"Own your category",baseAPS:100,questions:Hr}],insurance:[{tier:1,name:"Fast Start",subtitle:"Core identity",baseAPS:40,questions:[{id:"insurance_specialty",label:"Insurance specialty",placeholder:"",type:"select",options:["Life","Property & Casualty","Health","Commercial","Medicare","Multi-line"],required:!0},{id:"target_demographic",label:"Target client demographic",placeholder:"e.g. Young families, small business owners, retirees",type:"text",required:!0},{id:"client_pain_point",label:"Primary client pain point",placeholder:"e.g. Confused by coverage options, afraid of being underinsured",type:"text",required:!0},{id:"designations",label:"Licensing / designations",placeholder:"e.g. LUTCF, CLU, CPCU, ChFC",type:"text"},{id:"referral_strategy",label:"Referral strategy",placeholder:"e.g. Annual review invitations, community events",type:"text"},{id:"differentiator",label:"What makes you different?",placeholder:"e.g. Claims advocacy, bilingual service, local roots",type:"text",required:!0},{id:"carrier_relationships",label:"Number of carriers / independence",placeholder:"e.g. Independent with 30+ carriers",type:"text"},{id:"service_territory",label:"Service territory",placeholder:"e.g. Greater Dallas metro, statewide Texas",type:"text"}]},{tier:2,name:"Differentiation",subtitle:"What separates your practice",baseAPS:60,questions:[{id:"claims_process",label:"How do you support clients during claims?",placeholder:"e.g. I personally handle every claim call",type:"textarea",required:!0},{id:"review_cadence",label:"Policy review process",placeholder:"e.g. Annual coverage audit with gap analysis",type:"text",required:!0},{id:"education_approach",label:"How do you educate clients on coverage?",placeholder:"e.g. Video explainers, plain-language summaries",type:"text",required:!0},{id:"risk_assessment",label:"Unique risk assessment methodology",placeholder:"e.g. Lifestyle-based coverage matching",type:"text",required:!0},{id:"retention_strategy",label:"Client retention strategy",placeholder:"e.g. Birthday cards, renewal prep calls 45 days early",type:"text",required:!0}]},{tier:3,name:"Premium Alignment",subtitle:"Attract premium clients",baseAPS:80,questions:zr},{tier:4,name:"Category Authority",subtitle:"Own your category",baseAPS:100,questions:Hr}],mortgage:[{tier:1,name:"Fast Start",subtitle:"Core identity",baseAPS:40,questions:[{id:"loan_specialty",label:"Loan specialty",placeholder:"",type:"select",options:["Conventional","FHA","VA","Jumbo","Commercial","Refinance","Multi-product"],required:!0},{id:"target_borrower",label:"Target borrower profile",placeholder:"e.g. First-time buyers, veterans, self-employed",type:"text",required:!0},{id:"avg_loan_size",label:"Average loan size range",placeholder:"e.g. $250K–$500K",type:"text",required:!0},{id:"designations",label:"Licensing / designations",placeholder:"e.g. NMLS, CMB, CML",type:"text"},{id:"rate_communication",label:"Rate communication approach",placeholder:"e.g. Weekly rate updates, scenario-based",type:"text"},{id:"differentiator",label:"What makes you different?",placeholder:"e.g. Close in 21 days, no origination fee",type:"text",required:!0},{id:"service_area",label:"Service area",placeholder:"e.g. Oregon 
812statewide, Pacific Northwest",type:"text"},{id:"partner_network",label:"Key referral partners",placeholder:"e.g. 15 Realtor partners, 3 builder relationships",type:"text"}]},{tier:2,name:"Differentiation",subtitle:"What separates your lending",baseAPS:60,questions:[{id:"closing_speed",label:"Average time from application to close",placeholder:"e.g. 18 days average, never missed a close date",type:"text",required:!0},{id:"borrower_education",label:"How do you educate borrowers?",placeholder:"e.g. First-time buyer workshops, video rate explainers",type:"textarea",required:!0},{id:"difficult_deals",label:"What 'impossible' deals have you closed?",placeholder:"e.g. Self-employed with 1 year tax returns",type:"textarea",required:!0},{id:"tech_advantage",label:"Technology that streamlines your process",placeholder:"e.g. Digital document portal, instant pre-approval",type:"text",required:!0},{id:"post_close_relationship",label:"Relationship after closing",placeholder:"e.g. Annual rate review, refinance alerts",type:"text",required:!0}]},{tier:3,name:"Premium Alignment",subtitle:"Attract premium borrowers",baseAPS:80,questions:zr},{tier:4,name:"Category Authority",subtitle:"Own your category",baseAPS:100,questions:Hr}],freelance_consultant:[{tier:1,name:"Fast Start",subtitle:"Core identity",baseAPS:40,questions:[{id:"consulting_specialty",label:"Consulting specialty",placeholder:"",type:"select",options:["Strategy","Marketing","Technology","Operations","Finance","HR/People","Design","Multi-disciplinary"],required:!0},{id:"target_client_profile",label:"Target client profile",placeholder:"e.g. Series A startups, mid-market SaaS companies",type:"text",required:!0},{id:"engagement_model",label:"Engagement model",placeholder:"",type:"select",options:["Retainer","Project-based","Fractional/Part-time","Advisory","Workshops/Training"],required:!0},{id:"client_pain_point",label:"Primary client pain point",placeholder:"e.g. Can't scale without adding headcount",type:"text",required:!0},{id:"credentials",label:"Credentials / track record",placeholder:"e.g. Ex-McKinsey, 15 years in B2B SaaS",type:"text"},{id:"differentiator",label:"What makes you different?",placeholder:"e.g. I embed with teams, not just deliver decks",type:"text",required:!0},{id:"avg_engagement_value",label:"Average engagement value",placeholder:"e.g. $15K–$50K per project",type:"text"},{id:"industry_focus",label:"Industry verticals you serve",placeholder:"e.g. SaaS, FinTech, Healthcare",type:"text"}]},{tier:2,name:"Differentiation",subtitle:"What separates your consulting",baseAPS:60,questions:[{id:"methodology",label:"Describe your unique methodology or framework",placeholder:"e.g. 90-day sprint model with weekly deliverables",type:"textarea",required:!0},{id:"client_outcome",label:"Most impressive client outcome",placeholder:"e.g. Helped a startup 3x ARR in 6 months",type:"textarea",required:!0},{id:"scope_management",label:"How do you prevent scope creep?",placeholder:"e.g. Fixed deliverable milestones, change order process",type:"text",required:!0},{id:"thought_leadership",label:"Where do you share expertise publicly?",placeholder:"e.g. LinkedIn articles, podcast guest, conference speaker",type:"text",required:!0},{id:"referral_source",label:"Primary source of new clients",placeholder:"e.g. 80% referral, 20% LinkedIn inbound",type:"text",required:!0}]},{tier:3,name:"Premium Alignment",subtitle:"Attract premium clients",baseAPS:80,questions:zr},{tier:4,name:"Category Authority",subtitle:"Own your category",baseAPS:100,questions:Hr}],personal:[{tier:1,name:"Fast Start",subtitle:"Core identity",baseAPS:40,questions:[{id:"brand_identity",label:"How would you describe your personal brand?",placeholder:"e.g. Thought leader in productivity",type:"text",required:!0},{id:"target_audience",label:"Who do you want to reach?",placeholder:"e.g. Young professionals, parents",type:"text",required:!0},{id:"content_themes",label:"Top 3 content themes",placeholder:"e.g. Personal growth, career tips, daily motivation",type:"text",required:!0},{id:"communication_style",label:"Communication style",placeholder:"",type:"select",options:["Inspirational","Educational","Conversational","Humorous","Raw & Authentic"],required:!0},{id:"unique_perspective",label:"What makes your perspective unique?",placeholder:"e.g. Overcame adversity, 10+ years in tech",type:"text",required:!0},{id:"platforms_focus",label:"Primary social platforms",placeholder:"e.g. LinkedIn, Instagram, Twitter",type:"text"},{id:"posting_motivation",label:"Why do you post?",placeholder:"e.g. Build community, share lessons, attract opportunities",type:"text"},{id:"audience_size",label:"Current audience size",placeholder:"e.g. 2K LinkedIn followers, 500 Instagram",type:"text"}]},{tier:2,name:"Differentiation",subtitle:"What makes your voice unique",baseAPS:60,questions:[{id:"origin_story",label:"Your origin story in 2–3 sentences",placeholder:"e.g. Left corporate to pursue passion, learned X the hard 
812way",type:"textarea",required:!0},{id:"controversial_opinion",label:"An opinion you hold that most people disagree with",placeholder:"e.g. Hustle culture is the enemy of real growth",type:"text",required:!0},{id:"content_format_strength",label:"Content format you're best at",placeholder:"e.g. Storytelling posts, data-backed insights, visual threads",type:"text",required:!0},{id:"audience_feedback",label:"What do people say about your content?",placeholder:"e.g. 'Your posts make me think differently about X'",type:"textarea",required:!0},{id:"aspiration",label:"Who do you aspire to be like (and how are you different)?",placeholder:"e.g. Like Brené Brown but with a tech lens",type:"text",required:!0}]},{tier:3,name:"Premium Alignment",subtitle:"Attract opportunities",baseAPS:80,questions:zr},{tier:4,name:"Category Authority",subtitle:"Own your category",baseAPS:100,questions:Hr}],creator:[{tier:1,name:"Fast Start",subtitle:"Core identity",baseAPS:40,questions:[{id:"creator_niche",label:"What's your creator niche?",placeholder:"e.g. Tech reviews, cooking tutorials",type:"text",required:!0},{id:"target_audience",label:"Who is your ideal follower?",placeholder:"e.g. Gen Z students, DIY hobbyists",type:"text",required:!0},{id:"content_format",label:"Primary content format",placeholder:"",type:"select",options:["Short-form video","Long-form video","Written posts","Podcasting","Photography","Mixed media"],required:!0},{id:"brand_voice",label:"Brand voice",placeholder:"",type:"select",options:["Entertaining","Educational","Provocative","Aesthetic-driven","Community-focused","Expert authority"],required:!0},{id:"differentiator",label:"What sets you apart from other creators?",placeholder:"e.g. Behind-the-scenes transparency",type:"text",required:!0},{id:"monetization_model",label:"How do you (or plan to) monetize?",placeholder:"e.g. Sponsorships, courses, affiliate, merchandise",type:"text"},{id:"posting_cadence",label:"How often do you post?",placeholder:"e.g. Daily stories, 3x/week reels",type:"text"},{id:"follower_count",label:"Current follower count",placeholder:"e.g. 10K Instagram, 5K YouTube",type:"text"}]},{tier:2,name:"Differentiation",subtitle:"What makes your content binge-worthy",baseAPS:60,questions:[{id:"content_hook",label:"What hooks keep viewers watching?",placeholder:"e.g. Shocking reveals, relatable struggles, visual transformations",type:"textarea",required:!0},{id:"community_engagement",label:"How do you build community beyond content?",placeholder:"e.g. Discord server, live Q&As, DM responses",type:"text",required:!0},{id:"collab_strategy",label:"Collaboration strategy",placeholder:"e.g. Monthly creator collabs, brand partnerships",type:"text",required:!0},{id:"viral_moment",label:"Describe your most viral or impactful piece",placeholder:"e.g. 2M view reel about X that led to Y",type:"textarea",required:!0},{id:"content_system",label:"Your content creation system",placeholder:"e.g. Batch filming Sundays, 2-week content calendar",type:"text",required:!0}]},{tier:3,name:"Premium Alignment",subtitle:"Attract premium brand deals",baseAPS:80,questions:zr},{tier:4,name:"Category Authority",subtitle:"Own your category",baseAPS:100,questions:Hr}],side_hustle:[{tier:1,name:"Fast Start",subtitle:"Core identity",baseAPS:40,questions:[{id:"business_type",label:"What's your side hustle?",placeholder:"e.g. Freelance design, Etsy shop, coaching",type:"text",required:!0},{id:"target_customer",label:"Who is your ideal customer?",placeholder:"e.g. Small business owners, busy moms",type:"text",required:!0},{id:"value_proposition",label:"What problem do you solve?",placeholder:"e.g. Save time on design, affordable custom gifts",type:"text",required:!0},{id:"growth_stage",label:"Current growth stage",placeholder:"",type:"select",options:["Just starting","First customers","Consistent sales","Scaling up","Full-time transition"],required:!0},{id:"unique_angle",label:"What makes your offer different?",placeholder:"e.g. 24-hour turnaround, handmade quality",type:"text",required:!0},{id:"revenue_range",label:"Monthly revenue range",placeholder:"e.g. $500–$2K/month",type:"text"},{id:"time_investment",label:"Hours per week dedicated",placeholder:"e.g. 10–15 hours/week",type:"text"},{id:"primary_channel",label:"Primary sales channel",placeholder:"e.g. Instagram DMs, Etsy, website, word of mouth",type:"text"}]},{tier:2,name:"Differentiation",subtitle:"What makes customers choose you",baseAPS:60,questions:[{id:"customer_story",label:"Best customer success story",placeholder:"e.g. Helped a startup launch brand identity in 48 hours",type:"textarea",required:!0},{id:"pricing_strategy",label:"How do you price and communicate value?",placeholder:"e.g. Value-based pricing with clear ROI explanation",type:"text",required:!0},{id:"scaling_plan",label:"How are you planning to scale?",placeholder:"e.g. Productized service, digital products, hiring VA",type:"text",required:!0},{id:"brand_story",label:"Why did you start this?",placeholder:"e.g. Passion project that grew, solving my own problem",type:"textarea",required:!0},{id:"competitive_edge",label:"Competitive edge over alternatives",placeholder:"e.g. Faster, more personal, better quality at same price",type:"text",required:!0}]},{tier:3,name:"Premium Alignment",subtitle:"Attract premium customers",baseAPS:80,questions:zr},{tier:4,name:"Category Authority",subtitle:"Own your category",baseAPS:100,questions:Hr}],authoritypro:[{tier:1,name:"Fast Start",subtitle:"Core identity",baseAPS:40,questions:[{id:"category_defining",label:"What category are we defining?",placeholder:"e.g. AI-powered professional positioning",type:"text",required:!0},{id:"belief_challenging",label:"What belief are we challenging?",placeholder:"e.g. That more content equals more authority",type:"text",required:!0},{id:"built_for",label:"Who is this platform built for?",placeholder:"e.g. Professionals who want to own their category",type:"text",required:!0},{id:"transformation",label:"What transformation do we create?",placeholder:"e.g. From invisible professional to recognized authority",type:"text",required:!0},{id:"five_year_vision",label:"What do we want to be known for in 5 years?",placeholder:"e.g. The standard for AI-powered category leadership",type:"text",required:!0}
812,{id:"competitive_moat",label:"What is our competitive moat?",placeholder:"e.g. Positioning-first architecture, no other platform does this",type:"text",required:!0},{id:"brand_voice",label:"Brand voice and tone",placeholder:"e.g. Confident without being arrogant, data-backed",type:"text",required:!0},{id:"key_metric",label:"Key success metric",placeholder:"e.g. User authority score improvement over 90 days",type:"text",required:!0}]},{tier:2,name:"Differentiation",subtitle:"Category separation",baseAPS:60,questions:[{id:"market_gap",label:"What gap does the market not see yet?",placeholder:"e.g. Content without positioning is noise",type:"textarea",required:!0},{id:"enemy",label:"What is the 'enemy' we fight against?",placeholder:"e.g. Generic, cookie-cutter content marketing",type:"text",required:!0},{id:"proof_narrative",label:"Our strongest proof narrative",placeholder:"e.g. Users see 3x engagement in 30 days",type:"textarea",required:!0},{id:"partnership_strategy",label:"Strategic partnership approach",placeholder:"e.g. Industry association integrations",type:"text",required:!0},{id:"content_pillars",label:"Core content pillars",placeholder:"e.g. Authority, positioning, category design, AI-augmented branding",type:"text",required:!0}]},{tier:3,name:"Premium Alignment",subtitle:"Premium market positioning",baseAPS:80,questions:zr},{tier:4,name:"Category Authority",subtitle:"Own our category",baseAPS:100,questions:Hr}],personal_trainer:[{tier:1,name:"Fast Start",subtitle:"Core identity",baseAPS:40,questions:[{id:"transformation_specialty",label:"What specific transformation do you specialize in?",placeholder:"e.g. Body recomposition, fat loss, athletic performance",type:"text",required:!0},{id:"ideal_client",label:"Who is your ideal client (age, lifestyle, fitness level)?",placeholder:"e.g. Busy professionals 30-50, beginners, athletes",type:"text",required:!0},{id:"primary_outcome",label:"What is the #1 outcome clients hire you for?",placeholder:"e.g. Sustainable fat loss, strength gains, injury recovery",type:"text",required:!0},{id:"client_problem",label:"What problem do they struggle with most?",placeholder:"e.g. Consistency, nutrition confusion, plateau",type:"text",required:!0},{id:"training_focus",label:"What type of training do you focus on?",placeholder:"",type:"select",options:["Strength training","HIIT","Bodybuilding","Functional fitness","Sport-specific","Rehabilitation","Hybrid"],required:!0},{id:"differentiator",label:"What differentiates your approach?",placeholder:"e.g. Evidence-based programming, behavior change focus",type:"text",required:!0},{id:"focus_area",label:"Fat loss, muscle gain, performance, rehab, or lifestyle?",placeholder:"",type:"select",options:["Fat loss","Muscle gain","Performance","Rehab","Lifestyle","Multiple"],required:!0},{id:"result_timeline",label:"Typical result timeline",placeholder:"e.g. Visible changes in 8-12 weeks",type:"text"}]},{tier:2,name:"Differentiation",subtitle:"What separates your coaching",baseAPS:60,questions:[{id:"programming_principles",label:"What principles guide your programming?",placeholder:"e.g. Progressive overload, periodization, RPE-based",type:"textarea",required:!0},{id:"nutrition_role",label:"What role does nutrition play in your model?",placeholder:"e.g. Macro coaching, intuitive eating, meal planning",type:"text",required:!0},{id:"myths_disagree",label:"What fitness myths do you strongly disagree with?",placeholder:"e.g. Spot reduction, fasted cardio is better, no pain no gain",type:"textarea",required:!0},{id:"behavior_change",label:"What behavior changes are hardest for clients?",placeholder:"e.g. Consistency, sleep prioritization, tracking food",type:"text",required:!0},{id:"sustainable_results",label:"What makes your results sustainable?",placeholder:"e.g. Habit-based approach, lifestyle integration, gradual progression",type:"textarea",required:!0}]},{tier:3,name:"Premium Alignment",subtitle:"Attract premium clients",baseAPS:80,questions:zr},{tier:4,name:"Category Authority",subtitle:"Own your category",baseAPS:100,questions:Hr}],course_coach:[{tier:1,name:"Fast Start",subtitle:"Core identity",baseAPS:40,questions:[{id:"course_result",label:"What result does your course deliver?",placeholder:"e.g. Students land their first freelance client in 30 days",type:"text",required:!0},{id:"ideal_student",label:"Who is your ideal student?",placeholder:"e.g. Career changers, aspiring entrepreneurs, creative professionals",type:"text",required:!0},{id:"skill_gap",label:"What skill gap are you closing?",placeholder:"e.g. No-code app building, copywriting fundamentals",type:"text",required:!0},{id:"transformation",label:"What transformation occurs?",placeholder:"e.g. From confused beginner to confident practitioner",type:"text",required:!0},{id:"course_format",label:"What is your course format?",placeholder:"",type:"select",options:["Self-paced","Cohort-based","Hybrid","Live workshops","Membership","Bootcamp"],required:!0},{id:"curriculum_unique",label:"What makes your curriculum unique?",placeholder:"e.g. Real-world projects, 1:1 feedback, industry partnerships",type:"text",required:!0},{id:"broken_courses",label:"What's broken in most online courses?",placeholder:"e.g. Too much theory, no accountability, no implementation",type:"textarea",required:!0},{id:"measurable_result",label:"What measurable result do you aim for?",placeholder:"e.g. 80% completion rate, students earn $X within 90 days",type:"text"}]},{tier:2,name:"Differentiation",subtitle:"Why students choose you",baseAPS:60,questions:[{id:"teaching_frameworks",label:"What frameworks do you teach?",placeholder:"e.g. The 4-Step Launch Method, Revenue Sprint System",type:"textarea",required:!0},{id:"implementation_strategy",label:"How do you ensure implementation?",placeholder:"e.g. Weekly action items, peer accountability, live reviews",type:"text",required:!0},{id:"student_mistakes",label:"What mistakes do beginners make?",placeholder:"e.g. Over-planning, perfectionism, skipping fundamentals",type:"textarea",required:!0},{id:"accountability_layer",label:"What accountability layer do you provide?",placeholder:"e.g. Weekly check-ins, community challenges, office hours",type:"text",required:!0},{id:"completion_rate",label:"What completion rate do you aim for, and how?",placeholder:"e.g. 85% via milestone celebrations + peer support",type:"text",required:!0}]},{tier:3,name:"Premium Alignment",subtitle:"Attract premium students",baseAPS:80,questions:zr},{tier:4,name:"Category Authority",subtitle:"Own your category",baseAPS:100,questions:Hr}]};function kS({score:e,compact:t=!1,onClick:n}){const{label:r}=KW(e),a=Sfe(e);return t?s.jsxs("button",{onClick:n,className:`inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-xs font-semibold transition-colors hover:opacity-80 ${a}`,children:[s.jsx(Ea,{className:"h-3 w-3"}),"APS ",e]}):s.jsxs("button",{onClick:n,className:`inline-flex items-center gap-2 rounded-full border px-3 py-1.5 text-xs font-semibold transition-colors hover:opacity-80 ${a}`,children:[s.jsx(Ea,{className:"h-3.5 w-3.5"}
812),s.jsxs("span",{children:["APS ",e]}),s.jsx("span",{className:"opacity-75",children:"·"}),s.jsx("span",{children:r})]})}const Ng=()=>{const{currentVertical:e,setCurrentVertical:t}=Fa(),[n,r]=g.useState({trialStatus:"none",trialEndsAt:null,previewPostsUsed:0,isPaid:!1,isLoading:!0,daysRemaining:0,previewPostsRemaining:3}),[a,i]=g.useState(!1),[o,l]=g.useState(null),c=g.useCallback(async()=>{try{const{data:{user:p}}=await W.auth.getUser();if(!p)return;const{data:y,error:m}=await W.rpc("check_trial_status",{p_user_id:p.id}),{data:v}=await W.from("user_subscriptions").select("status, tier").eq("user_id",p.id).maybeSingle(),{data:b}=await W.from("user_roles").select("role").eq("user_id",p.id).eq("role","admin").maybeSingle(),x=!!b,w=(v==null?void 0:v.status)==="active"||["lite","pro","team","starter","enterprise"].includes((v==null?void 0:v.tier)||""),_=y==null?void 0:y[0],k=(_==null?void 0:_.trial_ends_at)||null,j=k?Math.max(0,Math.ceil((new Date(k).getTime()-Date.now())/(1e3*60*60*24))):0;r({trialStatus:(_==null?void 0:_.trial_status)||"none",trialEndsAt:k,previewPostsUsed:(_==null?void 0:_.preview_posts_used)||0,isPaid:x||w||(_==null?void 0:_.is_paid)||!1,isLoading:!1,daysRemaining:j,previewPostsRemaining:Math.max(0,3-((_==null?void 0:_.preview_posts_used)||0))})}catch(p){console.error("Failed to fetch trial status:",p),r(y=>({...y,isLoading:!1}))}},[]);g.useEffect(()=>{c()},[c]);const u=g.useCallback(p=>!!(n.isPaid||n.trialStatus==="active"||p==="generate_preview"&&n.previewPostsRemaining>0),[n]),h=g.useCallback(p=>u(p)?!0:(l(p),i(!0),!1),[u]),d=g.useCallback(async()=>{try{const{data:{user:p}}=await W.auth.getUser();if(!p)return!1;const{data:y,error:m}=await W.rpc("start_free_trial",{p_user_id:p.id});if(m)throw m;const v=y==null?void 0:y[0];return v!=null&&v.success?(await c(),i(!1),l(null),e||t("personal"),!0):!1}catch(p){return console.error("Failed to start trial:",p),!1}},[c,e,t]),f=g.useCallback(async()=>{try{const{data:{user:p}}=await W.auth.getUser();if(!p)return{success:!1,remaining:0,trialRequired:!1};if(n.isPaid||n.trialStatus==="active")return{success:!0,remaining:999,trialRequired:!1};const{data:y,error:m}=await W.rpc("use_preview_post",{p_user_id:p.id});if(m)throw m;const v=y==null?void 0:y[0];return v!=null&&v.success?(await c(),{success:!0,remaining:v.posts_remaining,trialRequired:!1}):(v==null?void 0:v.message)==="TRIAL_REQUIRED"?{success:!1,remaining:0,trialRequired:!0}:{success:!1,remaining:0,trialRequired:!1}}catch(p){return console.error("Failed to use preview post:",p),{success:!1,remaining:0,trialRequired:!1}}},[n.isPaid,n.trialStatus,c]);return{...n,showTrialModal:a,setShowTrialModal:i,pendingAction:o,canPerformAction:u,gateAction:h,startFreeTrial:d,usePreviewPost:f,refreshTrialStatus:c}};function A2(e){const[t,n]=g.useState(null),[r,a]=g.useState({}),[i,o]=g.useState(!0),[l,c]=g.useState(!1),u=e?Cfe[e]||[]:[],h=g.useCallback(async()=>{if(!e){o(!1);return}try{const{data:{user:y}}=await W.auth.getUser();if(!y){o(!1);return}const{data:m,error:v}=await W.from("positioning_sessions").select("*").eq("user_id",y.id).eq("module_name",e).maybeSingle();if(v&&console.error("Session fetch error:",v),m){n(m);const{data:b}=await W.from("positioning_answers").select("*").eq("session_id",m.id);if(b){const x={};b.forEach(w=>{x[w.question_id]=w.answer_value}),a(x)}c(!1)}else{const{data:b}=await W.from("positioning_profiles").select("*").eq("user_id",y.id).eq("module_name",e).maybeSingle();b?await d(y.id,e,b):c(Zw.includes(e))}}catch(y){console.error("Progressive positioning fetch error:",y)}finally{o(!1)}},[e]),d=async(y,m,v)=>{try{const{data:b,error:x}=await W.from("positioning_sessions").insert({user_id:y,module_name:m,current_tier:2,max_completed_tier:1,aps_score:40,positioning_statement:v.positioning_statement,authority_bio:v.authority_bio,profile_version:1}).select().single();if(x||!b){console.error("Migration error:",x);return}const w=v.profile_data,_=Object.entries(w).filter(([,j])=>j).map(([j,S])=>({session_id:b.id,user_id:y,tier:1,question_id:j,answer_value:String(S)}));_.length>0&&await W.from("positioning_answers").insert(_),n(b);const k={};_.forEach(j=>{k[j.question_id]=j.answer_value}),a(k),c(!1)}catch(b){console.error("Legacy migration error:",b)}};return g.useEffect(()=>{h()}
812,[h]),{session:t,answers:r,tiers:u,isLoading:i,needsPositioning:l,saveAnswersForTier:async(y,m)=>{const{data:{user:v}}=await W.auth.getUser();if(!v||!e)throw new Error("Not authenticated");let b=t;if(!b){const{data:O,error:D}=await W.from("positioning_sessions").insert({user_id:v.id,module_name:e,current_tier:y,max_completed_tier:0,aps_score:0}).select().single();if(D)throw D;b=O}const x=Object.entries(m).filter(([,O])=>O==null?void 0:O.trim()).map(([O,D])=>({session_id:b.id,user_id:v.id,tier:y,question_id:O,answer_value:D}));if(x.length>0){const{error:O}=await W.from("positioning_answers").upsert(x,{onConflict:"session_id,question_id"});if(O)throw O}const w={...r,...m},_=Math.max(b.max_completed_tier,y),{score:k,nicheBonus:j,contrarianBonus:S}=Nfe(_,w),{data:N,error:C}=await W.from("positioning_sessions").update({current_tier:Math.min(y+1,4),max_completed_tier:_,aps_score:k,niche_specificity_bonus:j,contrarian_bonus:S,profile_version:b.profile_version+1}).eq("id",b.id).select().single();if(C)throw C;const M=N;return n(M),a(w),c(!1),M},saveGeneratedOutput:async(y,m)=>{if(!t)throw new Error("No active session");const{data:v,error:b}=await W.from("positioning_sessions").update({positioning_statement:y,authority_bio:m}).eq("id",t.id).select().single();if(b)throw b;n(v);const{data:{user:x}}=await W.auth.getUser();x&&t.module_name&&await W.from("positioning_profiles").upsert({user_id:x.id,module_name:t.module_name,profile_data:r,positioning_statement:y,authority_bio:m},{onConflict:"user_id,module_name"})},refetch:h}}const Pfe=({title:e,description:t,showTrend:n=!1,trendText:r="Today's Trend"})=>{const a=Gt(),{trialStatus:i,daysRemaining:o,previewPostsRemaining:l,isPaid:c,isLoading:u}=Ng(),{currentVertical:h,isVerticalReady:d}=Fa(),{session:f}=A2(d?h??void 0:void 0);return s.jsx("header",{className:"mb-8",children:s.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"font-display text-2xl font-bold text-foreground md:text-3xl",children:e}),t&&s.jsx("p",{className:"mt-1 text-muted-foreground",children:t})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[f&&s.jsx(kS,{score:f.aps_score,compact:!0,onClick:()=>a("/dashboard/positioning")}),!u&&s.jsx(jfe,{trialStatus:i,daysRemaining:o,previewPostsRemaining:l,isPaid:c}),n&&s.jsxs("div",{className:"flex items-center gap-2 rounded-full border border-accent/30 bg-accent/10 px-4 py-2",children:[s.jsx(vn,{className:"h-4 w-4 text-accent"}),s.jsx("span",{className:"text-sm font-medium text-accent",children:r}),s.jsx(Se,{className:"h-3.5 w-3.5 text-accent"})]})]})]})})},Tfe=()=>s.jsx("footer",{className:"border-t border-border bg-muted/20 py-4 mt-auto",children:s.jsxs("div",{className:"flex items-center justify-center gap-4",children:[s.jsx(Oe,{to:"/privacy",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:"Privacy Policy"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"·"}),s.jsx(Oe,{to:"/terms",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:"Terms of Service"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"·"}),s.jsxs("span",{className:"text-xs text-muted-foreground",children:["© ",new Date().getFullYear()," SociePRO LLC"]})]})}),E2=["financial_advisor","insurance","realtor","builder_remodeler","mortgage","property_manager","host","restaurantpro","authoritypro","freelance_consultant","personal_trainer","course_coach","side_hustle","creator","personal"];function XW(e){return e?E2.includes(e):!1}const Ru={maxCompletedTier:0,hasStatement:!1};function QW(){const{currentVertical:e,isVerticalReady:t}=Fa(),[n,r]=g.useState({status:"loading",moduleName:null,targetRoute:"/dashboard/positioning",...Ru}),a=g.useCallback(async()=>{if(!t){r(o=>({...o,status:"loading"}));return}if(!e){r({status:"no_vertical",moduleName:null,targetRoute:"/dashboard/positioning",...Ru});return}const i=XW(e)?"/dashboard/positioning/v2":"/dashboard/positioning";if(!Zw.includes(e)){r({status:"not_required",moduleName:e,targetRoute:i,...Ru});return}try{const{data:{user:o}}=await W.auth.getUser();if(!o){r({status:"loading",moduleName:e,targetRoute:i,...Ru});return}const{data:l,error:c}=await W.from("positioning_sessions").select("max_completed_tier, positioning_statement").eq("user_id",o.id
812).eq("module_name",e).maybeSingle();if(c){console.error("usePositioningStatus: session fetch error",c),r({status:"loading",moduleName:e,targetRoute:i,...Ru});return}if(!l){r({status:"not_started",moduleName:e,targetRoute:i,...Ru});return}const u=l.max_completed_tier??0,h=!!l.positioning_statement,d=u>=4&&h;r({status:d?"complete":"incomplete",moduleName:e,targetRoute:i,maxCompletedTier:u,hasStatement:h})}catch(o){console.error("usePositioningStatus: unexpected error",o)}},[e,t]);return g.useEffect(()=>{a()},[a]),{...n,refetch:a}}const VI="sociepro_positioning_prompt_dismissed_";function Afe(){const e=Gt(),t=us(),{status:n,moduleName:r,targetRoute:a}=QW(),[i,o]=g.useState(!1),c=!t.pathname.startsWith("/dashboard/positioning")&&!i&&r!==null&&(n==="not_started"||n==="incomplete");g.useEffect(()=>{if(!r)return;const p=`${VI}${r}`;o(sessionStorage.getItem(p)==="1")},[r]);const u=()=>{if(r)try{sessionStorage.setItem(`${VI}${r}`,"1")}catch{}o(!0)},h=()=>{e(a)};if(!c)return null;const d=r?id(r):"your",f=n==="incomplete";return s.jsx(An,{open:c,onOpenChange:p=>{p||u()},children:s.jsxs(En,{className:"sm:max-w-[440px]",children:[s.jsxs(wn,{children:[s.jsx("div",{className:"mx-auto mb-2 flex h-12 w-12 items-center justify-center rounded-full bg-primary/10",children:s.jsx(Se,{className:"h-6 w-6 text-primary"})}),s.jsx(_n,{className:"text-center",children:f?"Finish your authority profile":"Complete your authority profile"}),s.jsx(Zr,{className:"text-center",children:f?`Your ${d} positioning profile is partway done. Finish the remaining questions so your content generation is fully tuned to your voice.`:`Answer a few quick questions to define your ${d} positioning. This powers everything your content generation produces.`})]}),s.jsxs(So,{className:"flex-col gap-2 sm:flex-col",children:[s.jsxs(z,{onClick:h,className:"w-full gap-2",children:[f?"Continue":"Complete Now",s.jsx(Sr,{className:"h-4 w-4"})]}),s.jsxs(z,{variant:"ghost",onClick:u,className:"w-full gap-2",children:[s.jsx(pr,{className:"h-4 w-4"}),"Remind me later"]})]})]})})}const GI="sociepro-sidebar-collapsed",Efe=()=>{const[e,t]=g.useState(()=>typeof window<"u"?localStorage.getItem(GI)==="true":!1);g.useEffect(()=>{localStorage.setItem(GI,String(e))},[e]);const n=g.useCallback(()=>{t(r=>!r)},[]);return{isCollapsed:e,setIsCollapsed:t,toggleSidebar:n}},hr=({children:e,title:t,description:n,showTrend:r,trendText:a,noPadding:i=!1})=>{const[o,l]=g.useState(!0),c=Gt(),{isCollapsed:u,toggleSidebar:h}=Efe(),d=xfe(),[f,p]=g.useState(!1),y=us();return g.useEffect(()=>{p(!1)},[y.pathname]),g.useEffect(()=>{(async()=>{const{data:{session:b}}=await W.auth.getSession();b?l(!1):c("/auth")})();const{data:{subscription:v}}=W.auth.onAuthStateChange((b,x)=>{x||c("/auth")});return()=>v.unsubscribe()},[c]),o?s.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background",children:s.jsx(ce,{className:"h-8 w-8 animate-spin text-primary"})}):s.jsxs("div",{className:"flex min-h-screen w-full bg-background",children:[s.jsx(Afe,{}),d?s.jsxs(s.Fragment,{children:[s.jsxs("header",{className:"fixed inset-x-0 top-0 z-30 flex h-14 items-center justify-between border-b border-border bg-background/95 px-4 backdrop-blur",children:[s.jsx(Ci,{}),s.jsx(z,{variant:"ghost",size:"icon","aria-label":"Open menu","aria-expanded":f,onClick:()=>p(!0),children:s.jsx(HF,{className:"h-5 w-5"})})]}),f&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"fixed inset-0 z-40 bg-black/40","aria-hidden":"true",onClick:()=>p(!1)}),s.jsx(HI,{isCollapsed:!1,onToggle:()=>p(!1),mobile:!0})]})]}):s.jsx(HI,{isCollapsed:u,onToggle:h}),s.jsxs("div",{className:K("flex-1 flex flex-col min-w-0 transition-all duration-200 ease-linear",d?"ml-0 pt-14":u?"ml-16":"ml-64"),children:[s.jsx("main",{className:"flex-1",children:s.jsxs("div",{className:K(i?"p-0":d?"p-4":"p-8","mx-auto max-w-7xl"),children:[s.jsx("div",{className:i?"px-6 pt-6":"",children:s.jsx(Pfe,{title:t,description:n,showTrend:r,trendText:a})}),s.jsx("div",{className:i?"p-6":"",children:e})]})}),s.jsx(Tfe,{})]})]})},Nt=g.forwardRef(({className:e,...t},n)=>s.jsx("textarea",{className:K("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
812ing-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));Nt.displayName="Textarea";var Ofe=g.createContext(void 0);function vu(e){const t=g.useContext(Ofe);return e||t||"ltr"}var j1="rovingFocusGroup.onEntryFocus",Rfe={bubbles:!1,cancelable:!0},Cg="RovingFocusGroup",[jS,JW,Ife]=ug(Cg),[Mfe,Hh]=Hn(Cg,[Ife]),[Dfe,$fe]=Mfe(Cg),ZW=g.forwardRef((e,t)=>s.jsx(jS.Provider,{scope:e.__scopeRovingFocusGroup,children:s.jsx(jS.Slot,{scope:e.__scopeRovingFocusGroup,children:s.jsx(Lfe,{...e,ref:t})})}));ZW.displayName=Cg;var Lfe=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:a=!1,dir:i,currentTabStopId:o,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:h=!1,...d}=e,f=g.useRef(null),p=Fe(t,f),y=vu(i),[m,v]=ba({prop:o,defaultProp:l??null,onChange:c,caller:Cg}),[b,x]=g.useState(!1),w=In(u),_=JW(n),k=g.useRef(!1),[j,S]=g.useState(0);return g.useEffect(()=>{const N=f.current;if(N)return N.addEventListener(j1,w),()=>N.removeEventListener(j1,w)},[w]),s.jsx(Dfe,{scope:n,orientation:r,dir:y,loop:a,currentTabStopId:m,onItemFocus:g.useCallback(N=>v(N),[v]),onItemShiftTab:g.useCallback(()=>x(!0),[]),onFocusableItemAdd:g.useCallback(()=>S(N=>N+1),[]),onFocusableItemRemove:g.useCallback(()=>S(N=>N-1),[]),children:s.jsx(we.div,{tabIndex:b||j===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:"none",...e.style},onMouseDown:de(e.onMouseDown,()=>{k.current=!0}),onFocus:de(e.onFocus,N=>{const C=!k.current;if(N.target===N.currentTarget&&C&&!b){const M=new CustomEvent(j1,Rfe);if(N.currentTarget.dispatchEvent(M),!M.defaultPrevented){const O=_().filter(P=>P.focusable),D=O.find(P=>P.active),$=O.find(P=>P.id===m),I=[D,$,...O].filter(Boolean).map(P=>P.ref.current);nq(I,h)}}k.current=!1}),onBlur:de(e.onBlur,()=>x(!1))})})}),eq="RovingFocusGroupItem",tq=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:a=!1,tabStopId:i,children:o,...l}=e,c=Oa(),u=i||c,h=$fe(eq,n),d=h.currentTabStopId===u,f=JW(n),{onFocusableItemAdd:p,onFocusableItemRemove:y,currentTabStopId:m}=h;return g.useEffect(()=>{if(r)return p(),()=>y()}
vendor: 4,316 bytes, line 812
812,[r,p,y]),s.jsx(jS.ItemSlot,{scope:n,id:u,focusable:r,active:a,children:s.jsx(we.span,{tabIndex:d?0:-1,"data-orientation":h.orientation,...l,ref:t,onMouseDown:de(e.onMouseDown,v=>{r?h.onItemFocus(u):v.preventDefault()}),onFocus:de(e.onFocus,()=>h.onItemFocus(u)),onKeyDown:de(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){h.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const b=Wfe(v,h.orientation,h.dir);if(b!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let w=f().filter(_=>_.focusable).map(_=>_.ref.current);if(b==="last")w.reverse();else if(b==="prev"||b==="next"){b==="prev"&&w.reverse();const _=w.indexOf(v.currentTarget);w=h.loop?qfe(w,_+1):w.slice(_+1)}setTimeout(()=>nq(w))}}),children:typeof o=="function"?o({isCurrentTabStop:d,hasTabStop:m!=null}):o})})});tq.displayName=eq;var Ffe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Bfe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Wfe(e,t,n){const r=Bfe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Ffe[r]}function nq(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function qfe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var O2=ZW,R2=tq,e0="Tabs",[Ufe,fHe]=Hn(e0,[Hh]),rq=Hh(),[zfe,I2]=Ufe(e0),aq=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:a,defaultValue:i,orientation:o="horizontal",dir:l,activationMode:c="automatic",...u}=e,h=vu(l),[d,f]=ba({prop:r,onChange:a,defaultProp:i??"",caller:e0});return s.jsx(zfe,{scope:n,baseId:Oa(),value:d,onValueChange:f,orientation:o,dir:h,activationMode:c,children:s.jsx(we.div,{dir:h,"data-orientation":o,...u,ref:t})})});aq.displayName=e0;var sq="TabsList",iq=g.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...a}=e,i=I2(sq,n),o=rq(n);return s.jsx(O2,{asChild:!0,...o,orientation:i.orientation,dir:i.dir,loop:r,children:s.jsx(we.div,{role:"tablist","aria-orientation":i.orientation,...a,ref:t})})});iq.displayName=sq;var oq="TabsTrigger",lq=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:a=!1,...i}=e,o=I2(oq,n),l=rq(n),c=dq(o.baseId,r),u=hq(o.baseId,r),h=r===o.value;return s.jsx(R2,{asChild:!0,...l,focusable:!a,active:h,children:s.jsx(we.button,{type:"button",role:"tab","aria-selected":h,"aria-controls":u,"data-state":h?"active":"inactive","data-disabled":a?"":void 0,disabled:a,id:c,...i,ref:t,onMouseDown:de(e.onMouseDown,d=>{!a&&d.button===0&&d.ctrlKey===!1?o.onValueChange(r):d.preventDefault()}),onKeyDown:de(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&o.onValueChange(r)}),onFocus:de(e.onFocus,()=>{const d=o.activationMode!=="manual";!h&&!a&&d&&o.onValueChange(r)})})})});lq.displayName=oq;var cq="TabsContent",uq=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:a,children:i,...o}=e,l=I2(cq,n),c=dq(l.baseId,r),u=hq(l.baseId,r),h=r===l.value,d=g.useRef(h);return g.useEffect(()=>{const f=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(f)},[]),s.jsx(Vn,{present:a||h,children:({present:f})=>s.jsx(we.div,{"data-state":h?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":c,hidden:!f,id:u,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:f&&i})})});uq.displayName=cq;function dq(e,t){return`${e}-trigger-${t}`}function hq(e,t){return`${e}-content-${t}`}var Hfe=aq,fq=iq,pq=lq,mq=uq;const Ii=Hfe,Hs=g.forwardRef(({className:e,...t},n)=>s.jsx(fq,{ref:n,className:K("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));Hs.displayName=fq.displayName;const ht=g.forwardRef(({className:e,...t},n)=>s.jsx(pq,{ref:n,className:K("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",e),...t}));ht.displayName=pq.displayName;
812const ft=g.forwardRef(({className:e,...t},n)=>s.jsx(mq,{ref:n,className:K("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));ft.displayName=mq.displayName;var t0="Collapsible",[Vfe,pHe]=Hn(t0),[Gfe,M2]=Vfe(t0),gq=g.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:a,disabled:i,onOpenChange:o,...l}=e,[c,u]=ba({prop:r,defaultProp:a??!1,onChange:o,caller:t0});return s.jsx(Gfe,{scope:n,disabled:i,contentId:Oa(),open:c,onOpenToggle:g.useCallback(()=>u(h=>!h),[u]),children:s.jsx(we.div,{"data-state":$2(c),"data-disabled":i?"":void 0,...l,ref:t})})});gq.displayName=t0;var yq="CollapsibleTrigger",vq=g.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,a=M2(yq,n);return s.jsx(we.button,{type:"button","aria-controls":a.contentId,"aria-expanded":a.open||!1,"data-state":$2(a.open),"data-disabled":a.disabled?"":void 0,disabled:a.disabled,...r,ref:t,onClick:de(e.onClick,a.onOpenToggle)})});vq.displayName=yq;var D2="CollapsibleContent",bq=g.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=M2(D2,e.__scopeCollapsible);return s.jsx(Vn,{present:n||a.open,children:({present:i})=>s.jsx(Yfe,{...r,ref:t,present:i})})});bq.displayName=D2;var Yfe=g.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:a,...i}=e,o=M2(D2,n),[l,c]=g.useState(r),u=g.useRef(null),h=Fe(t,u),d=g.useRef(0),f=d.current,p=g.useRef(0),y=p.current,m=o.open||l,v=g.useRef(m),b=g.useRef(void 0);return g.useEffect(()=>{const x=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(x)},[]),rr(()=>{const x=u.current;if(x){b.current=b.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const w=x.getBoundingClientRect();d.current=w.height,p.current=w.width,v.current||(x.style.transitionDuration=b.current.transitionDuration,x.style.animationName=b.current.animationName),c(r)}},[o.open,r]),s.jsx(we.div,{"data-state":$2(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!m,...i,ref:h,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":y?`${y}px`:void 0,...e.style},children:m&&a})});function $2(e){return e?"open":"closed"}var Kfe=gq;const Db=Kfe,$b=vq,Lb=bq,Xfe={user_name:"a trusted industry professional",user_city:"your local area",niche_focus:"your specialized market",target_client:"prospective clients",business_type:"your business",industry:"your industry",authority_bio:"an experienced authority in the field",positioning_statement:"delivering exceptional value to clients"};function Xs(e,t={}){if(!e)return"";let n=e;const r={...Xfe,...t};return Object.entries(r).forEach(([a,i])=>{if(i&&typeof i=="string"){const o=new RegExp(`\\{\\{\\s*${a}\\s*\\}\\}`,"gi"),l=new RegExp(`\\{\\s*${a}\\s*\\}`,"gi");n=n.replace(o,i),n=n.replace(l,i)}}),n=n.replace(/\{\{[^}]+\}\}/g,""),n=n.replace(/\{[^}]+\}/g,""),n.replace(/  +/g," ").trim()}function Vi(e){if(!e)return"";let t=e.trim();return t=t.replace(/^(here is (a |the )?(new |revised |shortened |bolder |rewritten )?(post|version|variation):?|sure!?|here's (a |the )?(new |revised |shortened |bolder |rewritten )?(post|version|variation):?|original post:[\s\S]*?instructions:[\s\S]*?\n|rewrite the following post[\s\S]*?:|create a completely new variation[\s\S]*?:)/gi,""),t=t.replace(/^(as an ai|as an ai assistant|as an ai copywriter|as an ai language model|as trendspro|here at sociepro|as a copywriter),?\s*/gi,""),t=t.replace(/^(shortened post|bolder post|revised post|new variation|option \d+):/gi,""),t.startsWith('"')&&t.endsWith('"')&&t.length>2&&(t=t.slice(1,-1).trim()),t.trim()}const Qfe="https://hgnuynazdzzocuwtwiez.supabase.co",Jfe="sb_publishable__0Zesn96s_l2w2G1z_9fxw_mY_wD58k";function L2(e){const{message:t}=e.error,n=e.requestId?` (Request ID: ${e.requestId})`:"";return`${t}${n}`}async function Fb(e,t){try{const{data:{session:n}}=await W.auth.getSession();if(!(n!=null&&n.access_token))return{success:!1,error:{code:"UNAUTHENTICATED",message:"Please sign in to use this feature."}};const r=await fetch(`${Qfe}/functions/v1/${e}`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${n.access_token}`,apikey:Jfe},body:JSON.stringify(t)});if(r.status===429)return{success:!1,error:{code:"RATE_LIMITED",message:"Too many requests. Please wait a moment and try again."}};if(r.status===402)return{success:!1,error:{code:"PAYMENT_REQUIRED",message:"AI credits exhausted. Please add credits to continue."}};const a=await r.json();return r.ok?{success:!0,data:a}:{success:!1,error:{code:a.code||"API_ERROR",message:a.error||a.message||"An error occurred",details:a.details}}}
812catch(n){return{success:!1,error:{code:"NETWORK_ERROR",message:n instanceof Error?n.message:"Network error occurred"}}}}async function $v(e){var r;const t={...e,customPrompt:e.customPrompt?Xs(e.customPrompt):void 0},n=await Fb("generate-post",t);if(!n.success){console.warn("generate-post edge fetch failed, using client synthesis fallback:",n.error);try{const a=e.customPrompt||((r=e.trendData)==null?void 0:r.name)||"industry leadership & growth",i=e.industryRole||"trusted professional",o=e.tone||"professional",l=(e.platform||"LinkedIn").toUpperCase();return e.trendPulseMode?{success:!0,data:{variations:{fun:Vi(Xs(`🚀 Quick take on ${a}:
813
814As a ${i}, staying ahead means keeping momentum high and focusing on client wins!
815
816What's your biggest focus this week? #${l}`)),strategic:Vi(Xs(`📈 Strategic Analysis: ${a}
817
818For ${i}s, sustainable authority comes from clear positioning and consistent value delivery.
819
820Key takeaway: Focus on scalable systems and high-trust client relationships.`)),engagement:Vi(Xs(`💬 Question for my network:
821
822How are you navigating ${a} as a ${i}?
823
824Drop your thoughts and favorite strategies below! 👇`))}}}:{success:!0,data:{content:Vi(Xs(`As a dedicated ${i}, building long-term authority requires consistent value and absolute clarity.
825
826Here is my perspective on ${a}:
8271. Prioritize client transformation and proven outcomes.
8282. Replace superficial noise with systematic positioning.
8293. Stay agile and lead with category authority.
830
831How is your team adapting to these industry shifts? Let's discuss below!`))}}}catch{return{success:!1,error:L2(n)}}}return n.data&&(n.data.content&&(n.data.content=Vi(Xs(n.data.content))),n.data.variations&&(n.data.variations.fun=Vi(Xs(n.data.variations.fun)),n.data.variations.strategic=Vi(Xs(n.data.variations.strategic)),n.data.variations.engagement=Vi(Xs(n.data.variations.engagement)))),{success:!0,data:n.data}}async function S1(e){var n;let t=await Fb("generate-image",e);if(t.success||(t=await Fb("generate-ai-image",e)),t.success&&t.data){const r=t.data.images||[],a=t.data.imageUrl||t.data.image_url;return a&&!r.includes(a)&&r.unshift(a),{success:!0,data:{images:r.length>0?r:[a||""]}}}try{const r="AQ.Ab8RN6IuiMb2gCIdxBWpdJ2TDqNP735mwjPtSG_feUxM1zCEIg",a=Math.min(Math.max(e.count||1,1),3),i=[];if(r){const o=await fetch(`https://generativelanguage.googleapis.com/v1beta/models/imagen-3.0-generate-002:generateImages?key=${r}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({prompt:e.prompt||"professional high resolution image",numberOfImages:a,aspectRatio:e.aspectRatio==="16:9"?"16:9":e.aspectRatio==="9:16"?"9:16":"1:1",outputMimeType:"image/jpeg"})});if(o.ok){const l=await o.json();for(const c of l.generatedImages||[])(n=c.image)!=null&&n.imageBytes&&i.push(`data:image/jpeg;base64,${c.image.imageBytes}`)}}if(i.length===0){const o=Math.floor(Math.random()*1e6),l=encodeURIComponent(e.prompt||"modern tech business image");i.push(`https://image.pollinations.ai/prompt/${l}?width=1024&height=1024&model=flux&seed=${o}&nologo=true`)}return{success:!0,data:{images:i}}}catch{return{success:!1,error:L2(t)}}}async function YI(e){const t=await Fb("giphy-search",e);return t.success?{success:!0,data:t.data}:{success:!1,error:L2(t)}}const Zfe="https://hgnuynazdzzocuwtwiez.supabase.co",epe="sb_publishable__0Zesn96s_l2w2G1z_9fxw_mY_wD58k";async function n0(e){const t=new AbortController,n=setTimeout(()=>t.abort(),15e3);try{const{data:{session:r}}=await W.auth.getSession();if(!(r!=null&&r.access_token))return clearTimeout(n),{success:!1,message:"Please sign in to publish posts",error:"UNAUTHENTICATED"};const a=await fetch(`${Zfe}/functions/v1/publish-post`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r.access_token}`,apikey:epe},body:JSON.stringify(e),signal:t.signal});clearTimeout(n);const i=await a.json();return a.ok?{success:i.success,receiptId:i.receiptId,status:i.status,scheduled:i.scheduled,platformResults:i.platformResults,message:i.message}:{success:!1,message:i.message||i.error||"Failed to publish post",error:i.details||i.error}}catch(r){clearTimeout(n);const i=(r==null?void 0:r.name)==="AbortError"?"Publishing request timed out after 15 seconds. Please check your connection and try again.":r instanceof Error?r.message:"Network error occurred";return{success:!1,message:i,error:i}}}async function tpe(e,t){try{navigator.clipboard&&navigator.clipboard.writeText&&await navigator.clipboard.writeText(e);const n=t==="facebook"?"https://www.facebook.com/":"https://www.instagram.com/";return window.open(n,"_blank","noopener,noreferrer"),{success:!0,copied:!0,platform:t,message:`Post copied to clipboard! Opening ${t==="facebook"?"Facebook":"Instagram"} composer...`}}catch(n){return console.error("Meta fallback error:",n),{success:!1,copied:!1,platform:t,message:n.message||"Failed to copy content to clipboard"}}}const Bb=[{name:"What builds trust faster than discounts?",strength:"strong",themes:["trust","authority","business","relationships"],reframe:"Quick quiz: What builds trust faster than discounts?"},{name:"Why do people leave reviews?",strength:"strong",themes:["reviews","customer experience","feedback","motivation"],reframe:"Quick quiz: What's the #1 reason people leave reviews?"},{name:"First-time buyer mistakes",strength:"strong",themes:["buyers","mistakes","education","advice"],reframe:"Pop quiz: What's the biggest mistake first-time buyers make?"},{name:"What successful businesses prioritize",strength:"strong",themes:["business","success","priorities","strategy"],reframe:"Quick quiz: What do successful businesses prioritize first?"},{name:"The real cost of waiting",strength:"strong",themes:["timing","decisions","cost","action"],reframe:"Let's test this: Do you know the real cost of waiting too long?"},{name:"What clients remember most",strength:"strong",themes:["client experience","memory","service","impression"],reframe:"Quick quiz: What do clients remember most about working with you?"},{name:"Signs you're ready for change",strength:"medium",themes:["change","readiness","growth","decisions"],reframe:"Pop quiz: What are the signs you're truly ready for a change?"},{name:"Why first impressions matter",strength:"strong",themes:["first impressions","trust","perception","relationships"],reframe:"Quick quiz: Why do first impressions matter more than ever?"},{name:"The hidden cost of cheap options",strength:"medium",themes:["value","cost","quality","decisions"],reframe:"Let's test this: Do you know the hidden cost of always choosing the cheapest option?"},{name:"What makes people say yes",strength:"strong",themes:["persuasion","decisions","psychology","influence"],reframe:"Quick quiz: What makes people say yes to a decision?"},{name:"The power of asking questions",strength:"medium",themes:["questions","communication","curiosity","leadership"],reframe:"Pop quiz: What type of questions lead to the best conversations?"},{name:"When to trust your gut",strength:"medium",themes:["intuition","decisions","trust","instinct"],reframe:"Quick quiz: When should you trust your gut over the data?"},{name:"What separates good from great",strength:"strong",themes:["excellence","differentiation","quality","standards"],reframe:"Let's test this: What separates good from great in your industry?"},{name:"The secret to repeat customers",strength:"strong",themes:["loyalty","retention","customers","relationships"],reframe:"Quick quiz: What's the secret to customers who keep coming back?"},{name:"Why most goals fail",strength:"strong",themes:["goals","failure","success","planning"],reframe:"Pop quiz: Why do most goals fail by February?"},{name:"The truth about overnight success",strength:"medium",themes:["success","patience","effort","reality"],reframe:"Quick quiz: How long does 'overnight success' really take?"},{name:"What makes a great listener",strength:"medium",themes:["listening","communication","empathy","relationships"],reframe:"Let's test this: What makes someone a truly great listener?"},{name:"The real reason people hesitate",strength:"strong",themes:["hesitation","fear","decisions","psychology"],reframe:"Quick quiz: What's the real reason people hesitate to make decisions?"},{name:"Signs of a trustworthy professional",strength:"strong",themes:["trust","professionalism","credibility","reputation"],reframe:"Pop quiz: What are the signs of a truly trustworthy professional?"},{name:"What matters more than experience",strength:"medium",themes:["experience","attitude","learning","growth"],reframe:"Quick quiz: What matters more than years of experience?"}],Wb=[{name:"The Paradox of Choice",strength:"strong",themes:["decision-making","simplicity","clarity","focus"],reframe:"Too many options paralyze—help your audience by simplifying their choices."},{name:"Recency Bias in Decision-Making",strength:"strong",themes:["memory","judgment","perspective","analysis"],reframe:"People weigh recent events more heavily than they should—remind them of the bigger picture."},{name:"The Power of Social Proof",strength:"strong",themes:["trust","influence","credibility","community"],reframe:"When uncertain, people look to others—show them who's already succeeded."},{name:"Loss Aversion Psychology",strength:"strong",themes:["risk","motivation","framing","persuasion"],reframe:"People fear loss more than they value gain—frame opportunities around what they keep, not just what they get."},{name:"The Mere Exposure Effect",strength:"medium",themes:["familiarity","trust","consistency","branding"],reframe:"Repetition builds preference—consistent presence creates trust."},{name:"Cognitive Load and Attention",strength:"strong",themes:["focus","simplicity","communication","clarity"],reframe:"Overwhelmed minds disengage—reduce friction in every interaction."},{name:"The Peak-End Rule",strength:"medium",themes:["experience","memory","service","impression"],reframe:"People remember peaks and endings—make those moments count."},{name:"Anchoring in Negotiations",strength:"strong",themes:["pricing","value","negotiation","positioning"],reframe:"First impressions set expectations—lead with your strongest offer."},{name:"The Bandwagon Effect",strength:"medium",themes:["trends","adoption","momentum","social dynamics"],reframe:"Momentum is contagious—highlight growth to attract more growth."}
831,{name:"Delayed Gratification Patterns",strength:"strong",themes:["patience","investment","long-term thinking","discipline"],reframe:"Those who wait for bigger rewards tend to win—help clients think long-term."},{name:"The Framing Effect",strength:"strong",themes:["communication","perception","positioning","messaging"],reframe:"How you say it matters as much as what you say—choose your words carefully."},{name:"Trust Through Vulnerability",strength:"medium",themes:["authenticity","leadership","connection","humanity"],reframe:"Admitting uncertainty builds more trust than pretending to know everything."},{name:"The Commitment Consistency Principle",strength:"strong",themes:["follow-through","integrity","persuasion","loyalty"],reframe:"Small commitments lead to bigger ones—start with an easy yes."},{name:"Analysis Paralysis Prevention",strength:"strong",themes:["action","decisiveness","momentum","clarity"],reframe:"Perfect information never arrives—help clients act on enough information."},{name:"The Endowment Effect",strength:"medium",themes:["ownership","value","attachment","negotiation"],reframe:"People overvalue what they already own—understand this in every transaction."},{name:"Emotional vs. Rational Decisions",strength:"strong",themes:["buying psychology","empathy","storytelling","connection"],reframe:"Decisions are made emotionally, then justified rationally—speak to both."},{name:"The Spotlight Effect",strength:"medium",themes:["self-awareness","confidence","perception","authenticity"],reframe:"People think others notice their mistakes more than they do—help them worry less."},{name:"Scarcity and Urgency Psychology",strength:"strong",themes:["motivation","action","value","timing"],reframe:"Limited availability increases perceived value—but use authentically."},{name:"The Power of Reciprocity",strength:"strong",themes:["generosity","relationships","trust","networking"],reframe:"Give first without expectation—reciprocity follows naturally."},{name:"Status Quo Bias",strength:"medium",themes:["change management","inertia","comfort","growth"],reframe:"People resist change even when it benefits them—make the new feel familiar."}],hm=[{name:"The Compounding Effect of Consistency",strength:"strong",themes:["growth","discipline","long-term thinking","success"],reframe:"Small daily actions compound into extraordinary results over time."},{name:"Why First Impressions Still Matter",strength:"strong",themes:["branding","perception","trust","communication"],reframe:"You never get a second chance to make a first impression—this hasn't changed."},{name:"The Timeless Power of Word-of-Mouth",strength:"strong",themes:["referrals","trust","relationships","marketing"],reframe:"Even in the digital age, personal recommendations remain the most trusted form of marketing."},{name:"Simplicity as a Competitive Advantage",strength:"strong",themes:["clarity","design","communication","strategy"],reframe:"The most successful ideas are often the simplest—complexity is the enemy of execution."},{name:"The Principle of Reciprocity",strength:"strong",themes:["relationships","networking","generosity","trust"],reframe:"Give value first. The returns follow naturally."},{name:"Adaptability Beats Perfection",strength:"strong",themes:["agility","change","growth mindset","resilience"],reframe:"Those who adapt fastest win—not those with the perfect plan."},{name:"Trust Takes Years, Breaks in Seconds",strength:"strong",themes:["integrity","reputation","ethics","leadership"],reframe:"Your reputation is your most valuable asset. Guard it carefully."},{name:"The Enduring Value of Face-to-Face",strength:"medium",themes:["relationships","connection","networking","communication"],reframe:"Despite technology, nothing replaces genuine human connection."},{name:"Why Leaders Are Readers",strength:"medium",themes:["learning","growth","leadership","knowledge"],reframe:"Continuous learning separates good professionals from great ones."},{name:"The Power of Asking Better Questions",strength:"strong",themes:["curiosity","problem-solving","leadership","discovery"],reframe:"Quality of your questions determines quality of your answers."}
831,{name:"Preparation Meets Opportunity",strength:"strong",themes:["success","readiness","discipline","luck"],reframe:"Luck favors the prepared—this has always been true."},{name:"The Art of Active Listening",strength:"medium",themes:["communication","empathy","relationships","leadership"],reframe:"Most people listen to reply, not to understand. The difference is everything."},{name:"Authenticity as Influence",strength:"strong",themes:["personal brand","trust","leadership","connection"],reframe:"People follow authentic leaders, not perfect ones."},{name:"The Margin Principle",strength:"medium",themes:["balance","resilience","planning","sustainability"],reframe:"Operating at 100% capacity leaves no room for opportunity or crisis."},{name:"Relationships Before Transactions",strength:"strong",themes:["sales","trust","networking","client relationships"],reframe:"The best business comes from relationships, not cold pitches."},{name:"Progress Over Perfection",strength:"strong",themes:["action","momentum","growth","execution"],reframe:"Done is better than perfect. Ship, learn, iterate."},{name:"The Compound Interest of Reputation",strength:"strong",themes:["personal brand","integrity","long-term thinking","trust"],reframe:"Every interaction either builds or erodes your professional reputation."},{name:"Context Shapes Meaning",strength:"medium",themes:["communication","empathy","understanding","perspective"],reframe:"The same message lands differently depending on who receives it."},{name:"Scarcity Creates Value",strength:"medium",themes:["positioning","differentiation","pricing","perception"],reframe:"What's rare is valuable. What's abundant is commoditized."},{name:"Energy Attracts Energy",strength:"medium",themes:["culture","leadership","team dynamics","momentum"],reframe:"Your enthusiasm is contagious—so is your apathy."}],SS=[{name:"Morning or Evening Person?",strength:"strong",themes:["lifestyle","habits","preferences"],reframe:"Are you a morning person or a night owl? ☀️🌙"},{name:"Save Time or Save Money?",strength:"strong",themes:["decisions","values","priorities"],reframe:"Would you rather save time or save money?"},{name:"Planning Ahead vs Going with the Flow",strength:"strong",themes:["personality","lifestyle","decisions"],reframe:"Do you prefer planning everything or going with the flow?"},{name:"Price vs Trust When Choosing a Service",strength:"strong",themes:["decisions","values","consumer behavior"],reframe:"What matters more when choosing a service: price or trust?"},{name:"Coffee or Tea?",strength:"medium",themes:["lifestyle","preferences","daily habits"],reframe:"Coffee ☕ or tea 🍵? Pick your side!"},{name:"Text or Call?",strength:"strong",themes:["communication","preferences","habits"],reframe:"When you need to reach someone, do you text or call?"},{name:"Stay In or Go Out?",strength:"medium",themes:["lifestyle","weekends","preferences"],reframe:"Perfect evening: staying in or going out?"},{name:"Try New Things vs Stick with Favorites",strength:"strong",themes:["personality","decisions","comfort zone"],reframe:"Do you love trying new things or stick with your favorites?"},{name:"Lists or Mental Notes?",strength:"medium",themes:["productivity","organization","habits"],reframe:"Do you make lists or keep everything in your head?"},{name:"Early Arrival vs Right on Time?",strength:"medium",themes:["habits","punctuality","personality"],reframe:"Are you the early arrival type or perfectly on time?"},{name:"Quality or Quantity?",strength:"strong",themes:["values","decisions","lifestyle"],reframe:"In life, do you prioritize quality or quantity?"},{name:"DIY or Hire a Pro?",strength:"strong",themes:["decisions","home","services"],reframe:"When something needs fixing: DIY or hire a pro?"},{name:"Sweet or Savory?",strength:"medium",themes:["food","preferences","lifestyle"],reframe:"Sweet treats or savory snacks? 🍰🧀"},{name:"Window Seat or Aisle?",strength:"medium",themes:["travel","preferences","lifestyle"],reframe:"When flying: window seat or aisle?"},{name:"Books or Podcasts?",strength:"medium",themes:["learning","entertainment","preferences"],reframe:"For learning something new: books 📚 or podcasts 🎧?"},{name:"Mountains or Beach?",strength:"strong",themes:["travel","vacation","preferences"],reframe:"Dream vacation: mountains 🏔️ or beach 🏖️?"},{name:"Cook at Home or Eat Out?",strength:"medium",themes:["lifestyle","food","preferences"],reframe:"Weeknight dinner: cooking at home or eating out?"},{name:"Minimalist or Maximalist?",strength:"medium",themes:["lifestyle","design","home"],reframe:"Your style: minimalist or maximalist?"},{name:"City Life or Countryside?",strength:"strong",themes:["lifestyle","living","preferences"],reframe:"If you could choose: city life 🏙️ or countryside 🌳?"},{name:"Online Shopping or In-Store?",strength:"strong",themes:["shopping","preferences","consumer behavior"],reframe:"When shopping: online from the couch or browsing in-store?"}],npe={enabled:!0,allowedAngles:["productivity","focus","breaks"]},F2=[{name:"2-Minute Rule",strength:"strong",themes:["productivity","action","momentum","quick wins"],reframe:"If it takes less than 2 minutes, do it now."},{name:"Time Blocking",strength:"strong",themes:["focus","calendar","deep work","planning"],reframe:"Protect your most important work with dedicated time blocks."},{name:"5-4-3-2-1 Grounding",strength:"medium",themes:["breaks","stress relief","mindfulness","reset"],reframe:"Use your 5 senses to reset when overwhelmed."},{name:"Pomodoro Technique",strength:"strong",themes:["focus","sprints","rest","productivity"],reframe:"25 minutes of focus, 5 minutes of rest. Repeat."},{name:"Eat the Frog",strength:"strong",themes:["productivity","priorities","morning routines","discipline"],reframe:"Do your hardest task first thing in the morning."},{name:"Walking Meetings",strength:"medium",themes:["breaks","creativity","movement","collaboration"],reframe:"Step outside for your next 1:1—fresh air fuels fresh ideas."},{name:"Inbox Zero Method",strength:"medium",themes:["productivity","email","organization","clarity"],reframe:"Process, don't just read. Decide on each email once."},{name:"The Power of 'No'",strength:"strong",themes:["focus","boun
831daries","priorities","leadership"],reframe:"Every yes to something unimportant is a no to something that matters."},{name:"Batch Similar Tasks",strength:"medium",themes:["productivity","efficiency","focus","workflow"],reframe:"Group similar tasks together to minimize context switching."},{name:"90-Minute Focus Blocks",strength:"strong",themes:["focus","deep work","energy cycles","peak performance"],reframe:"Work with your body's natural ultradian rhythms."},{name:"Digital Sunset Routine",strength:"medium",themes:["breaks","sleep","wellbeing","boundaries"],reframe:"Screens off 1 hour before bed. Your tomorrow self will thank you."},{name:"Weekly Review Ritual",strength:"strong",themes:["productivity","reflection","planning","improvement"],reframe:"Spend 30 minutes reviewing your week to plan the next one better."}];function rpe(){return F2.filter(e=>e.themes.some(t=>npe.allowedAngles.includes(t)))}function Pg(e){const t=new Date(e.getFullYear(),0,0),n=e.getTime()-t.getTime(),r=1e3*60*60*24;return Math.floor(n/r)}function Vh(e){return{...Bb[Pg(e)%Bb.length],source:"quick_quiz"}}function ape(e){return{...Wb[Pg(e)%Wb.length],source:"behavioral_insight"}}function spe(e){return{...hm[Pg(e)%hm.length],source:"still_relevant_today"}}function ipe(e){const t=rpe(),n=t.length>0?t:F2;return{...n[Pg(e)%n.length],source:"life_hack"}}function ope(e){return{...SS[Pg(e)%SS.length],source:"quick_poll"}}function lpe(e,t){const n=(r,a)=>{const i=t?r.filter(c=>c.name!==t):r,o=i.length>0?i:r,l=Math.floor(Math.random()*o.length);return{...o[l],source:a}};switch(e){case"quick_quiz":return n(Bb,"quick_quiz");case"behavioral_insight":return n(Wb,"behavioral_insight");case"still_relevant_today":return n(hm,"still_relevant_today");case"life_hack":return n(F2,"life_hack");case"quick_poll":return n(SS,"quick_poll");default:return n(hm,"still_relevant_today")}}function xq(e){return{quick_quiz:Vh(e),behavioral_insight:ape(e),still_relevant_today:spe(e),life_hack:ipe(e),quick_poll:ope(e)}}function cpe(){return xq(new Date)}function B2(e){switch(e){case"strong":return"bg-green-500/10 text-green-600 border-green-500/20";case"medium":return"bg-yellow-500/10 text-yellow-600 border-yellow-500/20";case"weak":return"bg-orange-500/10 text-orange-600 border-orange-500/20"}}function upe(e){switch(e){case"quick_quiz":return"Quick Quiz";case"behavioral_insight":return"Behavioral Insight";case"still_relevant_today":return"Still Relevant Today";case"life_hack":return"Life Hack";case"quick_poll":return"Quick Poll"}}function W2(e){switch(e){case"quick_quiz":return"❓";case"behavioral_insight":return"🧠";case"still_relevant_today":return"⏳";case"life_hack":return"💡";case"quick_poll":return"📊"}}const dpe=({source:e,trendItem:t,variations:n,isGenerating:r,isSelected:a,onSelect:i,onRegenerate:o,onGenerateVariations:l,onAIGenerate:c,icon:u})=>{const[h,d]=g.useState(!1),[f,p]=g.useState(!1),y=async()=>{d(!0);try{const b=lpe(e,t.name);await new Promise(x=>setTimeout(x,300)),o(b)}catch(b){console.error("Local trend regeneration failed:",b)}finally{d(!1)}},m=async()=>{if(!c){y();return}p(!0);try{const b=await c(e);b&&o(b)}catch(b){console.error("AI trend generation failed:",b)}finally{p(!1)}},v=()=>{l(t)};return s.jsxs(fe.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:K("rounded-lg border p-4 transition-all cursor-pointer",a?"border-primary bg-primary/5 shadow-md":"border-border bg-card hover:border-primary/50"),onClick:i,children:[s.jsxs("div",{className:"flex items-start justify-between gap-2 mb-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:K("flex items-center justify-center w-8 h-8 rounded-lg",a?"bg-primary/10 text-primary":"bg-muted text-muted-foreground"),children:u}),s.jsxs("div",{children:[s.jsx("span",{className:"text-sm font-medium text-foreground",children:upe(e)}),s.jsx(je,{variant:"outline",className:K("ml-2 text-[10px]",B2(t.strength)),children:t.strength})]})]}),a&&s.jsx("div",{className:"flex items-center justify-center w-5 h-5 rounded-full bg-primary text-primary-foreground",children:s.jsx($t,{className:"h-3 w-3"})})]}),s.jsxs("div",{className:"space-y-2 mb-3",children:[s.jsxs("div",{className:"flex items-start gap-2",children:[s.jsx(vn,{className:"h-4 w-4 text-primary mt-0.5 flex-shrink-0"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("p",{className:"text-sm font-semibold text-foreground truncate",children:t.name}),t.reframe&&s.jsxs("p",{className:"text-xs text-muted-foreground mt-1 italic line-clamp-2",children:['"',t.reframe,'"']})]})]}),s.jsxs("div",{className:"flex items-start gap-2",children:[s.jsx(qp,{className:"h-4 w-4 text-yellow-500 mt-0.5 flex-shrink-0"}),s.jsx("div",{className:"flex flex-wrap gap-1",children:t.themes.slice(0,3).map(b=>s.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded-full bg-muted text-muted-foreground",children:b},b))})]})]}),n&&s.jsx("div",{className:"mb-3 p-2 rounded-md bg-success/10 border border-success/20",children:s.jsxs("div",{className:"flex items-center gap-2 text-xs text-success",children:[s.jsx(Se,{className:"h-3 w-3"}),s.jsx("span",{children:"3 variations ready"})]})}),s.jsxs("div",{className:"flex gap-2",onClick:b=>b.stopPropagation(),children:[c?s.jsxs(z,{variant:"outline",size:"sm",className:"flex-1 h-8 text-xs border-primary/30 hover:bg-primary/5",onClick:m,disabled:f||r,children:[f?s.jsx(Bt,{className:"h-3 w-3 animate-spin mr-1"}):s.jsx(Tn,{className:"h-3 w-3 mr-1 text-primary"}),"New Trend"]}):s.jsxs(z,{variant:"outline",size:"sm",className:"flex-1 h-8 text-xs",onClick:y,disabled:h||r,children:[h?s.jsx(Bt,{className:"h-3 w-3 animate-spin mr-1"}):s.jsx(Bt,{className:"h-3 w-3 mr-1"}),"New Trend"]}),s.jsxs(z,{variant:a?"default":"secondary",size:"sm",className:"flex-1 h-8 text-xs",onClick:v,disabled:r,children:[r?s.jsx(Bt,{className:"h-3 w-3 animate-spin mr-1"}):s.jsx(Se,{className:"h-3 w-3 mr-1"}),n?"Regenerate":"Generate"]})]})]})};let ir={status:"not_set",evergreenSet:!1,evergreenSetDate:null,evergreenPostCount:0,trendsAutoEnabled:!1,isLoading:!0,isPaused:!1},NS=new Set;
831function Bo(){NS.forEach(e=>e())}function wq(){const[e,t]=g.useState(ir);g.useEffect(()=>{const l=()=>t({...ir});return NS.add(l),()=>{NS.delete(l)}},[]);const n=g.useCallback(async()=>{try{const{data:{user:l}}=await W.auth.getUser();if(!l){ir={...ir,isLoading:!1},Bo();return}const{data:c,error:u}=await W.from("user_library_subscriptions").select("id, is_active, activated_at, weeks_scheduled, industry_module").eq("user_id",l.id).order("activated_at",{ascending:!1}).limit(1).maybeSingle();if(u)throw u;if(!c){ir={...ir,status:"not_set",evergreenSet:!1,evergreenSetDate:null,evergreenPostCount:0,isPaused:!1,isLoading:!1},Bo();return}const{data:h}=await W.from("scheduled_posts").select("scheduled_date").eq("library_subscription_id",c.id).order("scheduled_date",{ascending:!0}).limit(1).maybeSingle(),{count:d}=await W.from("scheduled_posts").select("id",{count:"exact",head:!0}).eq("library_subscription_id",c.id),f=c.is_active,p=(h==null?void 0:h.scheduled_date)||null,y=d||c.weeks_scheduled||0;ir={...ir,status:f?"active":"paused",evergreenSet:!0,evergreenSetDate:p,evergreenPostCount:y,isPaused:!f,isLoading:!1},Bo()}catch(l){console.error("Failed to check ClickPRO status:",l),ir={...ir,isLoading:!1},Bo()}},[]),r=g.useCallback((l,c)=>{ir={...ir,status:"active",evergreenSet:!0,evergreenSetDate:l,evergreenPostCount:c,isPaused:!1},Bo()},[]),a=g.useCallback(l=>{ir={...ir,trendsAutoEnabled:l},Bo()},[]),i=g.useCallback(l=>{ir={...ir,status:l?"paused":"active",isPaused:l},Bo()},[]),o=g.useCallback(()=>{ir={...ir,status:"not_set",evergreenSet:!1,evergreenSetDate:null,evergreenPostCount:0,isPaused:!1},Bo()},[]);return g.useEffect(()=>{n()},[n]),{...e,checkEvergreenStatus:n,setEvergreenComplete:r,setTrendsAutoEnabled:a,setPaused:i,clearClickPRO:o,refresh:n}}function Tg(e){const t=g.useRef({value:e,previous:e});return g.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var r0="Switch",[hpe,mHe]=Hn(r0),[fpe,ppe]=hpe(r0),_q=g.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:a,defaultChecked:i,required:o,disabled:l,value:c="on",onCheckedChange:u,form:h,...d}=e,[f,p]=g.useState(null),y=Fe(t,w=>p(w)),m=g.useRef(!1),v=f?h||!!f.closest("form"):!0,[b,x]=ba({prop:a,defaultProp:i??!1,onChange:u,caller:r0});return s.jsxs(fpe,{scope:n,checked:b,disabled:l,children:[s.jsx(we.button,{type:"button",role:"switch","aria-checked":b,"aria-required":o,"data-state":Nq(b),"data-disabled":l?"":void 0,disabled:l,value:c,...d,ref:y,onClick:de(e.onClick,w=>{x(_=>!_),v&&(m.current=w.isPropagationStopped(),m.current||w.stopPropagation())})}),v&&s.jsx(Sq,{control:f,bubbles:!m.current,name:r,value:c,checked:b,required:o,disabled:l,form:h,style:{transform:"translateX(-100%)"}})]})});_q.displayName=r0;var kq="SwitchThumb",jq=g.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,a=ppe(kq,n);return s.jsx(we.span,{"data-state":Nq(a.checked),"data-disabled":a.disabled?"":void 0,...r,ref:t})});jq.displayName=kq;var mpe="SwitchBubbleInput",Sq=g.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...a},i)=>{const o=g.useRef(null),l=Fe(o,i),c=Tg(n),u=gg(t);return g.useEffect(()=>{const h=o.current;if(!h)return;const d=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(d,"checked").set;if(c!==n&&p){const y=new Event("click",{bubbles:r});p.call(h,n),h.dispatchEvent(y)}},[c,n,r]),s.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...a,tabIndex:-1,ref:l,style:{...a.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Sq.displayName=mpe;function Nq(e){return e?"checked":"unchecked"}var Cq=_q,gpe=jq;const un=g.forwardRef(({className:e,...t},n)=>s.jsx(Cq,{className:K("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",e),...t,ref:n,children:s.jsx(gpe,{className:K("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}
831));un.displayName=Cq.displayName;function ype({className:e}){const{toast:t}=Je(),{trendsAutoEnabled:n,setTrendsAutoEnabled:r}=wq(),[a,i]=g.useState(!1),[o,l]=g.useState(!1),c=async()=>{l(!0),await new Promise(h=>setTimeout(h,800));const u=!n;r(u),t({title:u?"ClickPRO Trends Automation Enabled":"ClickPRO Trends Automation Disabled",description:u?"TrendsPRO will automatically generate and schedule trend-based posts.":"Automatic trend posting has been turned off."}),l(!1)};return s.jsxs(s.Fragment,{children:[s.jsxs(fe.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:K("relative overflow-hidden rounded-xl border-2 p-4 transition-all duration-300",n?"bg-emerald-500/10 border-emerald-500":"bg-transparent border-primary/30 hover:border-primary/50",e),style:{boxShadow:n?"0 0 15px rgba(16, 185, 129, 0.3)":"0 0 10px rgba(var(--primary), 0.2)"},children:[!n&&s.jsx(fe.div,{className:"absolute inset-0 rounded-xl pointer-events-none",animate:{boxShadow:["inset 0 0 5px rgba(var(--primary), 0.2)","inset 0 0 15px rgba(var(--primary), 0.3)","inset 0 0 5px rgba(var(--primary), 0.2)"]},transition:{duration:2,repeat:1/0,ease:"easeInOut"}}),s.jsxs("div",{className:"relative flex items-center justify-between gap-4",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:K("p-2 rounded-lg transition-colors",n?"bg-emerald-500/20":"bg-primary/10"),children:n?s.jsx($t,{className:"h-5 w-5 text-emerald-500"}):s.jsx(Tn,{className:"h-5 w-5 text-primary"})}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:K("font-bold text-sm",n?"text-emerald-500":"text-primary"),children:"ClickPRO — Trends Automation"}),s.jsx(Se,{className:K("h-4 w-4",n?"text-emerald-400":"text-accent")})]}),s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:n?"Auto-posting trends is active":"Auto-generate & post trending content"})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[n&&s.jsx(z,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>i(!0),children:s.jsx(VF,{className:"h-4 w-4"})}),s.jsx(fe.button,{onClick:c,disabled:o,whileTap:{scale:.95},className:K("px-4 py-2 rounded-lg font-medium text-sm transition-all",n?"bg-emerald-500 text-white hover:bg-emerald-600":"bg-primary text-primary-foreground hover:bg-primary/90",o&&"opacity-70 cursor-wait"),children:o?s.jsx(fe.span,{animate:{opacity:[1,.3,1]},transition:{duration:.5,repeat:1/0},children:n?"Disabling...":"Enabling..."}):n?"Enabled":"Enable"})]})]})]}),s.jsx(An,{open:a,onOpenChange:i,children:s.jsxs(En,{className:"sm:max-w-md",children:[s.jsxs(wn,{children:[s.jsxs(_n,{className:"flex items-center gap-2",children:[s.jsx(Tn,{className:"h-5 w-5 text-primary"}),"TrendsPRO Automation Settings"]}),s.jsx(Zr,{children:"Configure how ClickPRO automatically handles trending content."})]}),s.jsxs("div",{className:"space-y-6 py-4",children:[s.jsxs("div",{className:"space-y-3",children:[s.jsx(X,{className:"text-sm font-medium",children:"Trend Categories to Automate"}),s.jsx("div",{className:"space-y-2",children:[{id:"quick_quiz",label:"Quick Quizzes",enabled:!0},{id:"behavioral_insight",label:"Behavioral Insights",enabled:!0},{id:"still_relevant_today",label:"Still Relevant Today",enabled:!0},{id:"life_hack",label:"Life Hacks",enabled:!0},{id:"quick_poll",label:"Quick Polls",enabled:!0}].map(u=>s.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-border p-3",children:[s.jsx("span",{className:"text-sm",children:u.label}),s.jsx(un,{defaultChecked:u.enabled})]},u.id))})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsx(X,{className:"text-sm font-medium",children:"Posting Frequency"}),s.jsx("div",{className:"grid grid-cols-2 gap-2",children:["Daily","3x/Week","Weekly","Custom"].map(u=>s.jsx("button",{className:K("rounded-lg border p-2 text-sm transition-all",u==="Daily"?"border-primary bg-primary/5":"border-border hover:border-primary/50"),children:u},u))})]}),s.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-warning/30 bg-warning/5 p-3",children:[s.jsxs("div",{children:[s.jsx(X,{className:"text-sm font-medium",children:"Auto-Post Without Review"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Posts will go live automatically"})]}),s.jsx(un,{defaultChecked:!1}
831)]}),s.jsx("p",{className:"text-xs text-muted-foreground text-center",children:"More automation settings coming soon"})]})]})})]})}const KI=[{id:"quick_quiz",icon:LF,label:"Quick Quiz"},{id:"behavioral_insight",icon:Ms,label:"Behavioral Insight"},{id:"still_relevant_today",icon:pr,label:"Still Relevant Today"},{id:"life_hack",icon:qp,label:"Life Hack"},{id:"quick_poll",icon:cJ,label:"Quick Poll"}],vpe=({selectedSource:e,onSourceChange:t,isEnabled:n,topicStates:r,onTopicTrendChange:a,onGenerateVariations:i,onAIGenerateTrend:o,allowedSources:l,moduleLabel:c})=>{if(!n)return null;const u=l&&l.length>0?KI.filter(({id:h})=>l.includes(h)):KI;return s.jsxs(fe.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},transition:{duration:.3},className:"space-y-4",children:[s.jsx(ype,{}),s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx(yP,{className:"h-4 w-4 text-accent"}),s.jsxs("span",{className:"text-sm font-medium text-foreground",children:["TrendsPRO Topics",c?` for ${c}`:""]}),s.jsx("span",{className:"text-xs text-muted-foreground ml-auto",children:"Click to select, regenerate individually"})]}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:u.map(({id:h,icon:d})=>{const f=r[h];return s.jsx(dpe,{source:h,trendItem:f.trend,variations:f.variations,isGenerating:f.isGenerating,isSelected:e===h,onSelect:()=>t(h),onRegenerate:p=>a(h,p),onGenerateVariations:p=>i(h,p),onAIGenerate:o,icon:s.jsx(d,{className:"h-4 w-4"})},h)})}),s.jsx(Wr,{mode:"wait",children:r[e].variations&&s.jsxs(fe.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"rounded-lg border border-accent/30 bg-accent/5 p-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Se,{className:"h-4 w-4 text-accent"}),s.jsxs("span",{className:"text-sm font-medium text-foreground",children:["Using: ",r[e].trend.name]})]}),s.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"3 post variations generated (Fun, Strategic, Engagement). View them in the output panel."})]},e)})]})},bpe=[{id:"scratch",icon:fg,label:"Write From Scratch",description:"Manually write your post"},{id:"ai_prompt",icon:Up,label:"AI Custom Prompt",description:"Generate from your prompt"},{id:"trendpulse",icon:Tn,label:"TrendsPRO Assisted",description:"3 variations from daily trends"}],xpe=({selectedMode:e,onModeChange:t})=>{const{currentVertical:n}=Fa(),r=xi[n],a=(r==null?void 0:r.icon)||fg,i=r?`${r.name} Templates`:"Templates",o=[...bpe,{id:"realtor",icon:a,label:i,description:`Done-for-you ${(r==null?void 0:r.name)||"industry"} posts`}];return s.jsxs("div",{className:"space-y-2",children:[s.jsx("span",{className:"text-sm font-medium text-muted-foreground",children:"Creation Mode"}),s.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-2",children:o.map(({id:l,icon:c,label:u,description:h})=>s.jsxs("button",{onClick:()=>t(l),className:K("flex flex-col items-center gap-2 rounded-xl p-4 text-center transition-all border",e===l?"bg-primary text-primary-foreground border-primary shadow-lg":"bg-muted/30 text-foreground border-border hover:bg-muted/50 hover:border-muted-foreground/30"),children:[s.jsx(c,{className:K("h-5 w-5",e===l?"text-primary-foreground":"text-muted-foreground")}),s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("p",{className:"text-xs font-semibold leading-tight",children:u}),s.jsx("p",{className:K("text-[10px] leading-tight",e===l?"text-primary-foreground/80":"text-muted-foreground"),children:h})]})]},l))})]})},wpe={display_name:null,default_platform:"linkedin",default_tone:"professional",default_goal:"authority",include_trendpulse_by_default:!1,output_length:"medium",boldness_level:"balanced",daily_trendpulse_reminder:!1,theme:"system",contact_injection_enabled:!1,contact_business_name:null,contact_phone:null,contact_email:null,contact_website:null,contact_cta_text:"Contact Me",lead_capture_enabled:!1,default_cta_button_text:null};function Pq(){const[e,t]=g.useState(null),[n,r]=g.useState(!0),[a,i]=g.useState(null),{toast:o}=Je(),l=async()=>{try{const{data:{user:u}}=await W.auth.getUser();if(!u){r(!1);return}i(u.email||null);const{data:h,error:d}=await W.from("user_settings").select("*").eq("user_id",u.id).maybeSingle();if(d)throw d;if(h)t(h);else{const{data:f,error:p}=await W.from("user_settings").upsert({user_id:u.id,...wpe},{onConflict:"user_id"}).select().single();if(p)throw p;t(f)}
vendor: 9,166 bytes, line 831
831}catch(u){console.error("Error fetching settings:",u),o({title:"Error loading settings",description:u.message,variant:"destructive"})}finally{r(!1)}},c=async u=>{if(e)try{const{error:h}=await W.from("user_settings").update(u).eq("id",e.id);if(h)throw h;t({...e,...u}),o({title:"Settings saved",description:"Your preferences have been updated."})}catch(h){o({title:"Error saving settings",description:h.message,variant:"destructive"})}};return g.useEffect(()=>{l()},[]),{settings:e,isLoading:n,userEmail:a,updateSettings:c,refetch:l}}function fm(e,[t,n]){return Math.min(n,Math.max(t,e))}function _pe(e,t){return g.useReducer((n,r)=>t[n][r]??n,e)}var q2="ScrollArea",[Tq,gHe]=Hn(q2),[kpe,ds]=Tq(q2),Aq=g.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:a,scrollHideDelay:i=600,...o}=e,[l,c]=g.useState(null),[u,h]=g.useState(null),[d,f]=g.useState(null),[p,y]=g.useState(null),[m,v]=g.useState(null),[b,x]=g.useState(0),[w,_]=g.useState(0),[k,j]=g.useState(!1),[S,N]=g.useState(!1),C=Fe(t,O=>c(O)),M=vu(a);return s.jsx(kpe,{scope:n,type:r,dir:M,scrollHideDelay:i,scrollArea:l,viewport:u,onViewportChange:h,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:y,scrollbarXEnabled:k,onScrollbarXEnabledChange:j,scrollbarY:m,onScrollbarYChange:v,scrollbarYEnabled:S,onScrollbarYEnabledChange:N,onCornerWidthChange:x,onCornerHeightChange:_,children:s.jsx(we.div,{dir:M,...o,ref:C,style:{position:"relative","--radix-scroll-area-corner-width":b+"px","--radix-scroll-area-corner-height":w+"px",...e.style}})})});Aq.displayName=q2;var Eq="ScrollAreaViewport",Oq=g.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:a,...i}=e,o=ds(Eq,n),l=g.useRef(null),c=Fe(t,l,o.onViewportChange);return s.jsxs(s.Fragment,{children:[s.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),s.jsx(we.div,{"data-radix-scroll-area-viewport":"",...i,ref:c,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...e.style},children:s.jsx("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});Oq.displayName=Eq;var Mi="ScrollAreaScrollbar",U2=g.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=ds(Mi,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:o}=a,l=e.orientation==="horizontal";return g.useEffect(()=>(l?i(!0):o(!0),()=>{l?i(!1):o(!1)}),[l,i,o]),a.type==="hover"?s.jsx(jpe,{...r,ref:t,forceMount:n}):a.type==="scroll"?s.jsx(Spe,{...r,ref:t,forceMount:n}):a.type==="auto"?s.jsx(Rq,{...r,ref:t,forceMount:n}):a.type==="always"?s.jsx(z2,{...r,ref:t}):null});U2.displayName=Mi;var jpe=g.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=ds(Mi,e.__scopeScrollArea),[i,o]=g.useState(!1);return g.useEffect(()=>{const l=a.scrollArea;let c=0;if(l){const u=()=>{window.clearTimeout(c),o(!0)},h=()=>{c=window.setTimeout(()=>o(!1),a.scrollHideDelay)};return l.addEventListener("pointerenter",u),l.addEventListener("pointerleave",h),()=>{window.clearTimeout(c),l.removeEventListener("pointerenter",u),l.removeEventListener("pointerleave",h)}}},[a.scrollArea,a.scrollHideDelay]),s.jsx(Vn,{present:n||i,children:s.jsx(Rq,{"data-state":i?"visible":"hidden",...r,ref:t})})}),Spe=g.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=ds(Mi,e.__scopeScrollArea),i=e.orientation==="horizontal",o=s0(()=>c("SCROLL_END"),100),[l,c]=_pe("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return g.useEffect(()=>{if(l==="idle"){const u=window.setTimeout(()=>c("HIDE"),a.scrollHideDelay);return()=>window.clearTimeout(u)}},[l,a.scrollHideDelay,c]),g.useEffect(()=>{const u=a.viewport,h=i?"scrollLeft":"scrollTop";if(u){let d=u[h];const f=()=>{const p=u[h];d!==p&&(c("SCROLL"),o()),d=p};return u.addEventListener("scroll",f),()=>u.removeEventListener("scroll",f)}},[a.viewport,i,c,o]),s.jsx(Vn,{present:n||l!=="hidden",children:s.jsx(z2,{"data-state":l==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:de(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:de(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),Rq=g.forwardRef((e,t)=>{const n=ds(Mi,e.__scopeScrollArea),{forceMount:r,...a}=e,[i,o]=g.useState(!1),l=e.orientation==="horizontal",c=s0(()=>{if(n.viewport){const u=n.viewport.offsetWidth<n.viewport.scrollWidth,h=n.viewport.offsetHeight<n.viewport.scrollHeight;o(l?u:h)}},10);return ah(n.viewport,c),ah(n.content,c),s.jsx(Vn,{present:r||i,children:s.jsx(z2,{"data-state":i?"visible":"hidden",...a,ref:t})})}),z2=g.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,a=ds(Mi,e.__scopeScrollArea),i=g.useRef(null),o=g.useRef(0),[l,c]=g.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=Lq(l.viewport,l.content),h={...r,sizes:l,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:f=>i.current=f,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:f=>o.current=f};function d(f,p){return Epe(f,o.current,l,p)}return n==="horizontal"?s.jsx(Npe,{...h,ref:t,onThumbPositionChange:()=>{if(a.viewport&&i.current){const f=a.viewport.scrollLeft,p=XI(f,l,a.dir);i.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:f=>{a.viewport&&(a.viewport.scrollLeft=f)},onDragScroll:f=>{a.viewport&&(a.viewport.scrollLeft=d(f,a.dir))}}):n==="vertical"?s.jsx(Cpe,{...h,ref:t,onThumbPositionChange:()=>{if(a.viewport&&i.current){const f=a.viewport.scrollTop,p=XI(f,l);i.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:f=>{a.viewport&&(a.viewport.scrollTop=f)},onDragScroll:f=>{a.viewport&&(a.viewport.scrollTop=d(f))}}):null}),Npe=g.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...a}=e,i=ds(Mi,e.__scopeScrollArea),[o,l]=g.useState(),c=g.useRef(null),u=Fe(t,c,i.onScrollbarXChange);return g.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),s.jsx(Mq,{"data-orientation":"horizontal",...a,ref:u,sizes:n,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":a0(n)+"px",...e.style},onThumbPointerDown:h=>e.onThumbPointerDown(h.x),onDragScroll:h=>e.onDragScroll(h.x),onWheelScroll:(h,d)=>{if(i.viewport){const f=i.viewport.scrollLeft+h.deltaX;e.onWheelScroll(f),Bq(f,d)&&h.preventDefault()}},onResize:()=>{c.current&&i.viewport&&o&&r({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:Ub(o.paddingLeft),paddingEnd:Ub(o.paddingRight)}})}})}),Cpe=g.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...a}=e,i=ds(Mi,e.__scopeScrollArea),[o,l]=g.useState(),c=g.useRef(null),u=Fe(t,c,i.onScrollbarYChange);return g.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),s.jsx(Mq,{"data-orientation":"vertical",...a,ref:u,sizes:n,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":a0(n)+"px",...e.style},onThumbPointerDown:h=>e.onThumbPointerDown(h.y),onDragScroll:h=>e.onDragScroll(h.y),onWheelScroll:(h,d)=>{if(i.viewport){const f=i.viewport.scrollTop+h.deltaY;e.onWheelScroll(f),Bq(f,d)&&h.preventDefault()}},onResize:()=>{c.current&&i.viewport&&o&&r({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:Ub(o.paddingTop),paddingEnd:Ub(o.paddingBottom)}})}})}),[Ppe,Iq]=Tq(Mi),Mq=g.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:a,onThumbChange:i,onThumbPointerUp:o,onThumbPointerDown:l,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:h,onResize:d,...f}=e,p=ds(Mi,n),[y,m]=g.useState(null),v=Fe(t,C=>m(C)),b=g.useRef(null),x=g.useRef(""),w=p.viewport,_=r.content-r.viewport,k=In(h),j=In(c),S=s0(d,10);function N(C){if(b.current){const M=C.clientX-b.current.left,O=C.clientY-b.current.top;u({x:M,y:O})}}return g.useEffect(()=>{const C=M=>{const O=M.target;(y==null?void 0:y.contains(O))&&k(M,_)};return document.addEventListener("wheel",C,{passive:!1}),()=>document.removeEventListener("wheel",C,{passive:!1})},[w,y,_,k]),g.useEffect(j,[r,j]),ah(y,S),ah(p.content,S),s.jsx(Ppe,{scope:n,scrollbar:y,hasThumb:a,onThumbChange:In(i),onThumbPointerUp:In(o),onThumbPositionChange:j,onThumbPointerDown:In(l),children:s.jsx(we.div,{...f,ref:v,style:{position:"absolute",...f.style},onPointerDown:de(e.onPointerDown,C=>{C.button===0&&(C.target.setPointerCapture(C.pointerId),b.current=y.getBoundingClientRect(),x.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),N(C))}),onPointerMove:de(e.onPointerMove,N),onPointerUp:de(e.onPointerUp,C=>{const M=C.target;M.hasPointerCapture(C.pointerId)&&M.releasePointerCapture(C.pointerId),document.body.style.webkitUserSelect=x.current,p.viewport&&(p.viewport.style.scrollBehavior=""),b.current=null})})})}),qb="ScrollAreaThumb",Dq=g.forwardRef((e,t)=>
831{const{forceMount:n,...r}=e,a=Iq(qb,e.__scopeScrollArea);return s.jsx(Vn,{present:n||a.hasThumb,children:s.jsx(Tpe,{ref:t,...r})})}),Tpe=g.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...a}=e,i=ds(qb,n),o=Iq(qb,n),{onThumbPositionChange:l}=o,c=Fe(t,d=>o.onThumbChange(d)),u=g.useRef(void 0),h=s0(()=>{u.current&&(u.current(),u.current=void 0)},100);return g.useEffect(()=>{const d=i.viewport;if(d){const f=()=>{if(h(),!u.current){const p=Ope(d,l);u.current=p,l()}};return l(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[i.viewport,h,l]),s.jsx(we.div,{"data-state":o.hasThumb?"visible":"hidden",...a,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:de(e.onPointerDownCapture,d=>{const p=d.target.getBoundingClientRect(),y=d.clientX-p.left,m=d.clientY-p.top;o.onThumbPointerDown({x:y,y:m})}),onPointerUp:de(e.onPointerUp,o.onThumbPointerUp)})});Dq.displayName=qb;var H2="ScrollAreaCorner",$q=g.forwardRef((e,t)=>{const n=ds(H2,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?s.jsx(Ape,{...e,ref:t}):null});$q.displayName=H2;var Ape=g.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,a=ds(H2,n),[i,o]=g.useState(0),[l,c]=g.useState(0),u=!!(i&&l);return ah(a.scrollbarX,()=>{var d;const h=((d=a.scrollbarX)==null?void 0:d.offsetHeight)||0;a.onCornerHeightChange(h),c(h)}),ah(a.scrollbarY,()=>{var d;const h=((d=a.scrollbarY)==null?void 0:d.offsetWidth)||0;a.onCornerWidthChange(h),o(h)}),u?s.jsx(we.div,{...r,ref:t,style:{width:i,height:l,position:"absolute",right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Ub(e){return e?parseInt(e,10):0}function Lq(e,t){const n=e/t;return isNaN(n)?0:n}function a0(e){const t=Lq(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function Epe(e,t,n,r="ltr"){const a=a0(n),i=a/2,o=t||i,l=a-o,c=n.scrollbar.paddingStart+o,u=n.scrollbar.size-n.scrollbar.paddingEnd-l,h=n.content-n.viewport,d=r==="ltr"?[0,h]:[h*-1,0];return Fq([c,u],d)(e)}function XI(e,t,n="ltr"){const r=a0(t),a=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-a,o=t.content-t.viewport,l=i-r,c=n==="ltr"?[0,o]:[o*-1,0],u=fm(e,c);return Fq([0,o],[0,l])(u)}function Fq(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function Bq(e,t){return e>0&&e<t}var Ope=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function a(){const i={left:e.scrollLeft,top:e.scrollTop},o=n.left!==i.left,l=n.top!==i.top;(o||l)&&t(),n=i,r=window.requestAnimationFrame(a)}(),()=>window.cancelAnimationFrame(r)};function s0(e,t){const n=In(e),r=g.useRef(0);return g.useEffect(()=>()=>window.clearTimeout(r.current),[]),g.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function ah(e,t){const n=In(t);rr(()=>{let r=0;if(e){const a=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return a.observe(e),()=>{window.cancelAnimationFrame(r),a.unobserve(e)}}},[e,n])}var Wq=Aq,Rpe=Oq,Ipe=$q;const ya=g.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(Wq,{ref:r,className:K("relative overflow-hidden",e),...n,children:[s.jsx(Rpe,{className:"h-full w-full rounded-[inherit]",children:t}),s.jsx(qq,{}),s.jsx(Ipe,{})]}));ya.displayName=Wq.displayName;const qq=g.forwardRef(({className:e,orientation:t="vertical",...n},r)=>s.jsx(U2,{ref:r,orientation:t,className:K("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:s.jsx(Dq,{className:"relative flex-1 rounded-full bg-border"})}));qq.displayName=U2.displayName;const Mpe=({selectedGif:e,onGifSelect:t,disabled:n=!1})=>{const[r,a]=g.useState(!1),[i,o]=g.useState(""),[l,c]=g.useState([]),[u,h]=g.useState(!1),[d,f]=g.useState([]);g.useEffect(()=>{(async()=>{var x;try{const w=await YI({type:"trending"});w.success&&((x=w.data)!=null&&x.gifs)&&f(w.data.gifs)}catch(w){console.error("Failed to fetch trending GIFs:",w)}})()},[]);const p=g.useCallback(async b=>{var x;if(!b.trim()){c([]);return}h(!0);try{const w=await YI({query:b,type:"search"});if(!w.success)throw new Error(w.error);c(((x=w.data)==null?void 0:x.gifs)||[])}catch(w){console.error("Failed to search GIFs:",w),c([])}finally{h(!1)}},[]);g.useEffect(()=>{const b=setTimeout(()=>{i&&p(i)},300);return()=>clearTimeout(b)},[i,p]);const y=b=>{t(b.images.fixed_height.url),a(!1),o("")},m=()=>{t(null)},v=i?l:d;return s.jsxs("div",{className:"space-y-3",children:[s.jsx(X,{className:"text-sm font-medium text-muted-foreground",children:"GIF (Optional)"}),s.jsx(Wr,{mode:"wait",children:e?s.jsxs(fe.div,{initial:{opacity:0,scale:.95}
831,animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},className:"relative rounded-lg border border-border overflow-hidden inline-block",children:[s.jsx("img",{src:e,alt:"Selected GIF",className:"max-h-32 object-contain bg-muted"}),s.jsx(z,{variant:"destructive",size:"icon",className:"absolute top-1 right-1 h-6 w-6",onClick:m,disabled:n,children:s.jsx(Br,{className:"h-3 w-3"})})]},"preview"):s.jsxs(An,{open:r,onOpenChange:a,children:[s.jsx(dm,{asChild:!0,children:s.jsxs(z,{variant:"outline",className:"w-full gap-2",disabled:n,children:[s.jsx(Se,{className:"h-4 w-4"}),"Add GIF"]})}),s.jsxs(En,{className:"sm:max-w-[600px]",children:[s.jsx(wn,{children:s.jsx(_n,{children:"Search GIFs"})}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"relative",children:[s.jsx(Jd,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),s.jsx(ze,{placeholder:"Search for GIFs...",value:i,onChange:b=>o(b.target.value),className:"pl-9",autoFocus:!0})]}),s.jsx(ya,{className:"h-[350px]",children:u?s.jsx("div",{className:"flex items-center justify-center py-12",children:s.jsx(ce,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):v.length>0?s.jsx("div",{className:"grid grid-cols-3 gap-2 p-1",children:v.map(b=>s.jsx(fe.button,{onClick:()=>y(b),className:K("relative overflow-hidden rounded-lg border-2 border-transparent transition-all","hover:border-primary hover:scale-[1.02]","focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2"),whileHover:{scale:1.02},whileTap:{scale:.98},children:s.jsx("img",{src:b.images.fixed_height_small.url,alt:b.title,className:"w-full h-24 object-cover bg-muted",loading:"lazy"})},b.id))}):i?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-muted-foreground",children:[s.jsx("p",{className:"text-sm",children:"No GIFs found"}),s.jsx("p",{className:"text-xs",children:"Try a different search term"})]}):s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-muted-foreground",children:[s.jsx(Se,{className:"h-8 w-8 mb-2"}),s.jsx("p",{className:"text-sm",children:"Trending GIFs"})]})}),s.jsx("p",{className:"text-[10px] text-muted-foreground text-center",children:"Powered by GIPHY"})]})]})]})})]})},Dpe=10*1024*1024,$pe=50*1024*1024,QI=["image/jpeg","image/png","image/webp"],JI=["video/mp4","video/quicktime"],Lpe=({mediaItems:e,onMediaChange:t,disabled:n=!1,maxItems:r=10})=>{const[a,i]=g.useState(!1),[o,l]=g.useState(!1),c=g.useRef(null),{toast:u}=Je(),h=e.length<r,d=w=>QI.includes(w.type)?w.size>Dpe?{valid:!1,type:null,error:"Image must be under 10MB"}:{valid:!0,type:"image"}:JI.includes(w.type)?w.size>$pe?{valid:!1,type:null,error:"Video must be under 50MB"}:{valid:!0,type:"video"}:{valid:!1,type:null,error:"Please upload JPG, PNG, WEBP, MP4, or MOV"},f=async w=>{const _=d(w);if(!_.valid){u({title:"Invalid file",description:_.error,variant:"destructive"});return}if(!h){u({title:"Limit reached",description:`Maximum ${r} media items allowed`,variant:"destructive"});return}i(!0);try{const{data:{user:k}}=await W.auth.getUser();if(!k)throw new Error("Not authenticated");const j=w.name.split(".").pop(),S=`${k.id}/${Date.now()}-${Math.random().toString(36).substring(7)}.${j}`,{error:N}=await W.storage.from("post-media").upload(S,w,{cacheControl:"3600",upsert:!1});if(N)throw N;const{data:C,error:M}=await W.storage.from("post-media").createSignedUrl(S,3600);if(M)throw M;const O={id:`${Date.now()}-${Math.random().toString(36).substring(7)}`,url:C.signedUrl,type:_.type};t([...e,O]),u({title:"Media uploaded!",description:`Your ${_.type} is ready to use.`})}catch(k){u({title:"Upload failed",description:k.message||"Failed to upload media",variant:"destructive"})}finally{i(!1)}},p=async w=>{const _=Array.from(w).slice(0,r-e.length);for(const k of _)await f(k)},y=w=>{if(w.preventDefault(),l(!1),n||a)return;const _=w.dataTransfer.files;_.length>0&&p(_)},m=w=>{const _=w.target.files;_&&_.length>0&&p(_),w.target.value=""},v=w=>{t(e.filter(_=>_.id!==w))},b=w=>{if(!w||!h)return;const _={id:`gif-${Date.now()}-${Math.random().toString(36).substring(7)}`,url:w,type:"gif"};t([...e,_])},x=w=>{t(w)};return s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs(X,{className:"text-sm font-medium text-muted-foreground",children:["Media (",e.length,"/",r,")"]}),e.length>0&&s.jsx("span",{className:"text-xs text-muted-foreground",children:"Drag to reorder"})]}),e.length>0&&s.jsx(Ade,{axis:"x",values:e,onReorder:x,className:"flex flex-wrap gap-3",children:s.jsx(Wr,{children:e.map(w=>s.jsx(Ide,{value:w,initial:{opacity:0,scale:.8}
831,animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},className:"relative group cursor-grab active:cursor-grabbing",children:s.jsxs("div",{className:"relative w-24 h-24 rounded-lg border border-border overflow-hidden bg-muted",children:[w.type==="video"?s.jsx("video",{src:w.url,className:"w-full h-full object-cover",muted:!0}):s.jsx("img",{src:w.url,alt:"Media",className:"w-full h-full object-cover"}),s.jsx("div",{className:"absolute inset-0 bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center",children:s.jsx(tJ,{className:"h-5 w-5 text-white/70"})}),s.jsx(z,{variant:"destructive",size:"icon",className:"absolute top-1 right-1 h-5 w-5 opacity-0 group-hover:opacity-100 transition-opacity",onClick:_=>{_.stopPropagation(),v(w.id)},disabled:n,children:s.jsx(Br,{className:"h-3 w-3"})}),s.jsxs("div",{className:"absolute bottom-1 left-1 flex items-center gap-1 rounded bg-background/80 px-1.5 py-0.5 text-[10px] font-medium backdrop-blur-sm",children:[w.type==="video"?s.jsx(KF,{className:"h-2.5 w-2.5"}):w.type==="gif"?s.jsx(Se,{className:"h-2.5 w-2.5"}):s.jsx(yw,{className:"h-2.5 w-2.5"}),w.type.toUpperCase()]})]})},w.id))})}),h&&s.jsxs("div",{className:"flex gap-3",children:[s.jsx(fe.div,{onDragOver:w=>{w.preventDefault(),l(!0)},onDragLeave:()=>l(!1),onDrop:y,onClick:()=>{var w;return!n&&!a&&((w=c.current)==null?void 0:w.click())},className:K("flex-1 flex flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed p-4 transition-colors cursor-pointer",o?"border-primary bg-primary/5":"border-border hover:border-primary/50",(n||a)&&"cursor-not-allowed opacity-50"),children:a?s.jsxs(s.Fragment,{children:[s.jsx(ce,{className:"h-6 w-6 animate-spin text-primary"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Uploading..."})]}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(bJ,{className:"h-5 w-5 text-muted-foreground"}),s.jsx(pg,{className:"h-4 w-4 text-muted-foreground"})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"text-xs font-medium",children:"Add images or videos"}),s.jsx("p",{className:"text-[10px] text-muted-foreground",children:"JPG, PNG, WEBP • MP4, MOV"})]})]})}),s.jsx("div",{className:"w-[120px]",children:s.jsx(Mpe,{selectedGif:null,onGifSelect:b,disabled:n||a||!h})})]}),s.jsx("input",{ref:c,type:"file",accept:[...QI,...JI].join(","),onChange:m,multiple:!0,className:"hidden"})]})},Fpe=["facebook","instagram","threads","linkedin","reddit","tiktok"],ZI=["linkedin","facebook","instagram","threads"],N1=["facebook","instagram","threads"],Hl=()=>{const[e,t]=g.useState([]),[n,r]=g.useState(!0),{toast:a}=Je(),i=g.useCallback(async()=>{try{const{data:{user:x}}=await W.auth.getUser();if(!x)return;const{data:w,error:_}=await W.from("social_connections").select("id, platform, is_connected, account_name, connected_at, profile_name, token_expires_at, is_default, label, user_id").eq("user_id",x.id).eq("is_connected",!0).order("platform").order("is_default",{ascending:!1}).order("connected_at",{ascending:!1});if(_)throw _;const k=w||[],j=Fpe.filter(S=>!k.some(N=>N.platform===S)).map(S=>({id:`temp-${S}`,platform:S,is_connected:!1,account_name:null,connected_at:null,profile_name:null,token_expires_at:null,is_default:!1,label:null}));t([...k,...j])}catch(x){console.error("Error fetching social connections:",x)}finally{r(!1)}},[]);g.useEffect(()=>{i()},[i]);const o=async()=>{try{const{data:{user:x}}=await W.auth.getUser();if(!x)throw new Error("Not authenticated");const w=`${window.location.origin}/oauth/linkedin/callback`,{data:_,error:k}=await W.functions.invoke("linkedin-oauth",{body:{action:"get-auth-url",redirectUri:w}});if(k)throw k;return sessionStorage.setItem("oauth_platform","linkedin"),sessionStorage.setItem("oauth_state",_.state),sessionStorage.setItem("oauth_user_id",x.id),sessionStorage.setItem("oauth_redirect_uri",w),_.authUrl}catch(x){return console.error("LinkedIn OAuth initiation error:",x),a({title:"OAuth Error",description:x.message||"Failed to initiate LinkedIn OAuth",variant:"destructive"}),null}},l=async x=>{try{const{data:{user:w}}=await W.auth.getUser();if(!w)throw new Error("Not authenticated");const _=x==="threads"?`${window.location.origin}/oauth/threads/callback`:`${window.location.origin}/oauth/meta/callback`,{data:k,error:j}=await W.functions.invoke("meta-oauth",{body:{action:"get-auth-url",platform:x,redirectUri:_,userId:w.id}});if(j)throw j;return sessionStorage.setItem("oauth_platform",x),sessionStorage.setItem("oauth_state",k.state),sessionStorage.setItem("oauth_user_id",w.id),sessionStorage.setItem("oauth_redirect_uri",_),k.authUrl}catch(w){return console.error(`${x} OAuth initiation error:`,w),a({title:"OAuth Error",description:w.message||`Failed to initiate ${x} OAuth`,variant:"destructive"}),null}},c=async(x,w)=>{try{const _=sessionStorage.getItem("oauth_user_id"),k=sessionStorage.getItem("oauth_redirect_uri"),j=sessionStorage.getItem("oauth_platform");if(!_||!k)throw new Error("OAuth session expired");const S=j||w;let N;if(S==="linkedin")N=await W.functions.invoke("linkedin-oauth",{body:{action:"exchange-code",code:x,redirectUri:k,userId:_}});else if(N1.includes(S))N=await W.functions.invoke("meta-oauth",{body:{action:"exchange-code",platform:S,co
831de:x,redirectUri:k,userId:_}});else throw new Error("Unsupported platform");if(N.error){let M=N.error.message;try{if(N.error.context&&typeof N.error.context.json=="function"){const O=await N.error.context.json();O!=null&&O.error&&(M=O.error)}}catch{}throw new Error(M)}sessionStorage.removeItem("oauth_platform"),sessionStorage.removeItem("oauth_state"),sessionStorage.removeItem("oauth_user_id"),sessionStorage.removeItem("oauth_redirect_uri");const C=S.charAt(0).toUpperCase()+S.slice(1);return S==="facebook"&&N.data.needsPageSelection?(await i(),{success:!0,needsPageSelection:!0,userAccessToken:N.data.userAccessToken}):(a({title:`${C} Connected`,description:N.data.profileName?`Connected as ${N.data.profileName}`:`Your ${C} account has been connected.`}),await i(),{success:!0})}catch(_){return console.error("OAuth callback error:",_),a({title:"Connection Failed",description:_.message||"Failed to connect account",variant:"destructive"}),{success:!1}}},u=async(x,w)=>{if(ZI.includes(x)){let _=null;x==="linkedin"?_=await o():N1.includes(x)&&(_=await l(x)),_&&(window.location.href=_);return}a({title:"Coming Soon",description:`${x.charAt(0).toUpperCase()+x.slice(1)} integration is coming soon.`})},h=async(x,w)=>{try{const{error:_}=await W.from("social_connections").update({is_connected:!1,account_name:null,connected_at:null,token_expires_at:null,profile_id:null,profile_name:null}).eq("id",x);if(_)throw _;a({title:"Account disconnected",description:`${w.charAt(0).toUpperCase()+w.slice(1)} account has been disconnected.`}),await i()}catch(_){a({title:"Disconnect failed",description:_.message,variant:"destructive"})}},d=async x=>{const w=e.filter(k=>k.platform===x&&k.is_connected),_=w.find(k=>k.is_default)||w[0];_&&await h(_.id,x)},f=async(x,w)=>{try{const{data:{user:_}}=await W.auth.getUser();if(!_)throw new Error("Not authenticated");await W.from("social_connections").update({is_default:!1}).eq("user_id",_.id).eq("platform",w).eq("is_default",!0);const{error:k}=await W.from("social_connections").update({is_default:!0}).eq("id",x);if(k)throw k;a({title:"Default account updated"}),await i()}catch(_){a({title:"Failed to update default account",description:_.message,variant:"destructive"})}},p=()=>Array.from(new Set(e.filter(x=>x.is_connected).map(x=>x.platform))),y=x=>e.filter(w=>w.platform===x&&w.is_connected);return{connections:e,isLoading:n,connectPlatform:u,disconnectPlatform:d,disconnectConnection:h,setDefaultConnection:f,getConnectedPlatforms:p,getConnectionsForPlatform:y,getDefaultConnection:x=>{const w=y(x);return w.find(_=>_.is_default)||w[0]||null},handleOAuthCallback:c,isOAuthPlatform:x=>ZI.includes(x),isMetaPlatform:x=>N1.includes(x),refetch:i}},Uq=()=>{const[e,t]=g.useState([]),[n,r]=g.useState(null),[a,i]=g.useState(!0),o=g.useCallback(async()=>{try{const{data:{user:c}}=await W.auth.getUser();if(!c)return;const{data:u,error:h}=await W.from("facebook_pages").select("id, page_id, page_name, page_category, is_selected, connected_at").order("connected_at",{ascending:!1});if(h)throw h;t(u||[]),r((u==null?void 0:u.find(d=>d.is_selected))||null)}catch(c){console.error("Error fetching Facebook pages:",c)}finally{i(!1)}},[]);return g.useEffect(()=>{o()},[o]),{pages:e,selectedPage:n,hasSelectedPage:!!n,isLoading:a,refetch:o}};var Bpe=[" ","Enter","ArrowUp","ArrowDown"],Wpe=[" ","Enter"],au="Select",[i0,o0,qpe]=ug(au),[Gh,yHe]=Hn(au,[qpe,Wl]),l0=Wl(),[Upe,Vl]=Gh(au),[zpe,Hpe]=Gh(au),zq=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:a,onOpenChange:i,value:o,defaultValue:l,onValueChange:c,dir:u,name:h,autoComplete:d,disabled:f,required:p,form:y}=e,m=l0(t),[v,b]=g.useState(null),[x,w]=g.useState(null),[_,k]=g.useState(!1),j=vu(u),[S,N]=ba({prop:r,defaultProp:a??!1,onChange:i,caller:au}),[C,M]=ba({prop:o,defaultProp:l,onChange:c,caller:au}),O=g.useRef(null),D=v?y||!!v.closest("form"):!0,[$,R]=g.useState(new Set),I=Array.from($).map(P=>P.props.value).join(";");return s.jsx(Nw,{...m,children:s.jsxs(Upe,{required:p,scope:t,trigger:v,onTriggerChange:b,valueNode:x,onValueNodeChange:w,valueNodeHasChildren:_,onValueNodeHasChildrenChange:k,contentId:Oa(),value:C,onValueChange:M,open:S,onOpenChange:N,dir:j,triggerPointerDownPosRef:O,disabled:f,children:[s.jsx(i0.Provider,{scope:t,children:s.jsx(zpe,{scope:e.__scopeSelect,onNativeOptionAdd:g.useCallback(P=>{R(A=>new Set(A).add(P))},[]),onNativeOptionRemove:g.useCallback(P=>{R(A=>{const E=new Set(A);return E.delete(P),E})},[]),children:n})}),D?s.jsxs(pU,{"aria-hidden":!0,required:p,tabIndex:-1,name:h,autoComplete:d,value:C,onChange:P=>M(P.target.value),disabled:f,form:y,children:[C===void 0?s.jsx("option",{value:""}):null,Array.from($)]},I):null]})})};zq.displayName=au;var Hq="SelectTrigger",Vq=g.forwardRef((e,t)=>
vendor: 16,789 bytes, line 831
831{const{__scopeSelect:n,disabled:r=!1,...a}=e,i=l0(n),o=Vl(Hq,n),l=o.disabled||r,c=Fe(t,o.onTriggerChange),u=o0(n),h=g.useRef("touch"),[d,f,p]=gU(m=>{const v=u().filter(w=>!w.disabled),b=v.find(w=>w.value===o.value),x=yU(v,m,b);x!==void 0&&o.onValueChange(x.value)}),y=m=>{l||(o.onOpenChange(!0),p()),m&&(o.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return s.jsx(yg,{asChild:!0,...i,children:s.jsx(we.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":mU(o.value)?"":void 0,...a,ref:c,onClick:de(a.onClick,m=>{m.currentTarget.focus(),h.current!=="mouse"&&y(m)}),onPointerDown:de(a.onPointerDown,m=>{h.current=m.pointerType;const v=m.target;v.hasPointerCapture(m.pointerId)&&v.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(y(m),m.preventDefault())}),onKeyDown:de(a.onKeyDown,m=>{const v=d.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&f(m.key),!(v&&m.key===" ")&&Bpe.includes(m.key)&&(y(),m.preventDefault())})})})});Vq.displayName=Hq;var Gq="SelectValue",Yq=g.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:a,children:i,placeholder:o="",...l}=e,c=Vl(Gq,n),{onValueNodeHasChildrenChange:u}=c,h=i!==void 0,d=Fe(t,c.onValueNodeChange);return rr(()=>{u(h)},[u,h]),s.jsx(we.span,{...l,ref:d,style:{pointerEvents:"none"},children:mU(c.value)?s.jsx(s.Fragment,{children:o}):i})});Yq.displayName=Gq;var Vpe="SelectIcon",Kq=g.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...a}=e;return s.jsx(we.span,{"aria-hidden":!0,...a,ref:t,children:r||"▼"})});Kq.displayName=Vpe;var Gpe="SelectPortal",Xq=e=>s.jsx(Eh,{asChild:!0,...e});Xq.displayName=Gpe;var su="SelectContent",Qq=g.forwardRef((e,t)=>{const n=Vl(su,e.__scopeSelect),[r,a]=g.useState();if(rr(()=>{a(new DocumentFragment)},[]),!n.open){const i=r;return i?pu.createPortal(s.jsx(Jq,{scope:e.__scopeSelect,children:s.jsx(i0.Slot,{scope:e.__scopeSelect,children:s.jsx("div",{children:e.children})})}),i):null}return s.jsx(Zq,{...e,ref:t})});Qq.displayName=su;var _s=10,[Jq,Gl]=Gh(su),Ype="SelectContentImpl",Kpe=Ol("SelectContent.RemoveScroll"),Zq=g.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:i,onPointerDownOutside:o,side:l,sideOffset:c,align:u,alignOffset:h,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:y,hideWhenDetached:m,avoidCollisions:v,...b}=e,x=Vl(su,n),[w,_]=g.useState(null),[k,j]=g.useState(null),S=Fe(t,re=>_(re)),[N,C]=g.useState(null),[M,O]=g.useState(null),D=o0(n),[$,R]=g.useState(!1),I=g.useRef(!1);g.useEffect(()=>{if(w)return Hw(w)},[w]),Uw();const P=g.useCallback(re=>{const[q,...U]=D().map(Y=>Y.ref.current),[Q]=U.slice(-1),J=document.activeElement;for(const Y of re)if(Y===J||(Y==null||Y.scrollIntoView({block:"nearest"}),Y===q&&k&&(k.scrollTop=0),Y===Q&&k&&(k.scrollTop=k.scrollHeight),Y==null||Y.focus(),document.activeElement!==J))return},[D,k]),A=g.useCallback(()=>P([N,w]),[P,N,w]);g.useEffect(()=>{$&&A()},[$,A]);const{onOpenChange:E,triggerPointerDownPosRef:T}=x;g.useEffect(()=>{if(w){let re={x:0,y:0};const q=Q=>{var J,Y;re={x:Math.abs(Math.round(Q.pageX)-(((J=T.current)==null?void 0:J.x)??0)),y:Math.abs(Math.round(Q.pageY)-(((Y=T.current)==null?void 0:Y.y)??0))}},U=Q=>{re.x<=10&&re.y<=10?Q.preventDefault():w.contains(Q.target)||E(!1),document.removeEventListener("pointermove",q),T.current=null};return T.current!==null&&(document.addEventListener("pointermove",q),document.addEventListener("pointerup",U,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",q),document.removeEventListener("pointerup",U,{capture:!0})}}},[w,E,T]),g.useEffect(()=>{const re=()=>E(!1);return window.addEventListener("blur",re),window.addEventListener("resize",re),()=>{window.removeEventListener("blur",re),window.removeEventListener("resize",re)}},[E]);const[L,B]=gU(re=>{const q=D().filter(J=>!J.disabled),U=q.find(J=>J.ref.current===document.activeElement),Q=yU(q,re,U);Q&&setTimeout(()=>Q.ref.current.focus())}),H=g.useCallback((re,q,U)=>{const Q=!I.current&&!U;(x.value!==void 0&&x.value===q||Q)&&(C(re),Q&&(I.current=!0))},[x.value]),G=g.useCallback(()=>w==null?void 0:w.focus(),[w]),Z=g.useCallback((re,q,U)=>{const Q=!I.current&&!U;(x.value!==void 0&&x.value===q||Q)&&O(re)},[x.value]),le=r==="popper"?CS:eU,ue=le===CS?{side:l,sideOffset:c,align:u,alignOffset:h,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:y,hideWhenDetached:m,avoidCollisions:v}:{};return s.jsx(Jq,{scope:n,content:w,viewport:k,onViewportChange:j,itemRefCallback:H,selectedItem:N,onItemLeave:G,itemTextRefCallback:Z,focusSelectedItem:A,selectedItemText:M,position:r,isPositioned:$,searchRef:L,children:s.jsx(jg,{as:Kpe,allowPinchZoom:!0,children:s.jsx(kg,{asChild:!0,trapped:x.open,onMountAutoFocus:re=>{re.preventDefault()},onUnmountAutoFocus:de(a,re=>{var q;(q=x.trigger)==null||q.focus({preventScroll:!0}),re.preventDefault()}),children:s.jsx(mu,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:re=>re.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:s.jsx(le,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:re=>re.preventDefault(),...b,...ue,onPlaced:()=>R(!0),ref:S,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:de(b.onKeyDown,re=>{const q=re.ctrlKey||re.altKey||re.metaKey;if(re.key==="Tab"&&re.preventDefault(),!q&&re.key.length===1&&B(re.key),["ArrowUp","ArrowDown","Home","End"].includes(re.key)){let Q=D().filter(J=>!J.disabled).map(J=>J.ref.current);if(["ArrowUp","End"].includes(re.key)&&(Q=Q.slice().reverse()),["ArrowUp","ArrowDown"].includes(re.key)){const J=re.target,Y=Q.indexOf(J);Q=Q.slice(Y+1)}setTimeout(()=>P(Q)),re.preventDefault()}})})})})})})});Zq.displayName=Ype;var Xpe="SelectItemAlignedPosition",eU=g.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...a}=e,i=Vl(su,n),o=Gl(su,n),[l,c]=g.useState(null),[u,h]=g.useState(null),d=Fe(t,S=>h(S)),f=o0(n),p=g.useRef(!1),y=g.useRef(!0),{viewport:m,selectedItem:v,selectedItemText:b,focusSelectedItem:x}=o,w=g.useCallback(()=>{if(i.trigger&&i.valueNode&&l&&u&&m&&v&&b){const S=i.trigger.getBoundingClientRect(),N=u.getBoundingClientRect(),C=i.valueNode.getBoundingClientRect(),M=b.getBoundingClientRect();if(i.dir!=="rtl"){const J=M.left-N.left,Y=C.left-J,oe=S.left-Y,ve=S.width+oe,De=Math.max(ve,N.width),Le=window.innerWidth-_s,He=fm(Y,[_s,Math.max(_s,Le-De)]);l.style.minWidth=ve+"px",l.style.left=He+"px"}else{const J=N.right-M.right,Y=window.innerWidth-C.right-J,oe=window.innerWidth-S.right-Y,ve=S.width+oe,De=Math.max(ve,N.width),Le=window.innerWidth-_s,He=fm(Y,[_s,Math.max(_s,Le-De)]);l.style.minWidth=ve+"px",l.style.right=He+"px"}const O=f(),D=window.innerHeight-_s*2,$=m.scrollHeight,R=window.getComputedStyle(u),I=parseInt(R.borderTopWidth,10),P=parseInt(R.paddingTop,10),A=parseInt(R.borderBottomWidth,10),E=parseInt(R.paddingBottom,10),T=I+P+$+E+A,L=Math.min(v.offsetHeight*5,T),B=window.getComputedStyle(m),H=parseInt(B.paddingTop,10),G=parseInt(B.paddingBottom,10),Z=S.top+S.height/2-_s,le=D-Z,ue=v.offsetHeight/2,re=v.offsetTop+ue,q=I+P+re,U=T-q;if(q<=Z){const J=O.length>0&&v===O[O.length-1].ref.current;l.style.bottom="0px";const Y=u.clientHeight-m.offsetTop-m.offsetHeight,oe=Math.max(le,ue+(J?G:0)+Y+A),ve=q+oe;l.style.height=ve+"px"}else{const J=O.length>0&&v===O[0].ref.current;l.style.top="0px";const oe=Math.max(Z,I+m.offsetTop+(J?H:0)+ue)+U;l.style.height=oe+"px",m.scrollTop=q-Z+m.offsetTop}l.style.margin=`${_s}px 0`,l.style.minHeight=L+"px",l.style.maxHeight=D+"px",r==null||r(),requestAnimationFrame(()=>p.current=!0)}},[f,i.trigger,i.valueNode,l,u,m,v,b,i.dir,r]);rr(()=>w(),[w]);const[_,k]=g.useState();rr(()=>{u&&k(window.getComputedStyle(u).zIndex)},[u]);const j=g.useCallback(S=>{S&&y.current===!0&&(w(),x==null||x(),y.current=!1)},[w,x]);return s.jsx(Jpe,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:p,onScrollButtonChange:j,children:s.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_},children:s.jsx(we.div,{...a,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});eU.displayName=Xpe;var Qpe="SelectPopperPosition",CS=g.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:a=_s,...i}=e,o=l0(n);return s.jsx(Cw,{...o,...i,ref:t,align:r,collisionPadding:a,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});CS.displayName=Qpe;var[Jpe,V2]=Gh(su,{}),PS="SelectViewport",tU=g.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...a}=e,i=Gl(PS,n),o=V2(PS,n),l=Fe(t,i.onViewportChange),c=g.useRef(0);return s.jsxs(s.Fragment,{children:[s.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),s.jsx(i0.Slot,{scope:n,children:s.jsx(we.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:de(a.onScroll,u=>{const h=u.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:f}=o;if(f!=null&&f.current&&d){const p=Math.abs(c.current-h.scrollTop);if(p>0){const y=window.innerHeight-_s*2,m=parseFloat(d.style.minHeight),v=parseFloat(d.style.height),b=Math.max(m,v);if(b<y){const x=b+p,w=Math.min(y,x),_=x-w;d.style.height=w+"px",d.style.bottom==="0px"&&(h.scrollTop=_>0?_:0,d.style.justifyContent="flex-end")}}}c.current=h.scrollTop})})})]})});tU.displayName=PS;var nU="SelectGroup",[Zpe,eme]=Gh(nU),tme=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=Oa();return s.jsx(Zpe,{scope:n,id:a,children:s.jsx(we.div,{role:"group","aria-labelledby":a,...r,ref:t})})});tme.displayName=nU;var rU="SelectLabel",aU=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=eme(rU,n);return s.jsx(we.div,{id:a.id,...r,ref:t})});aU.displayName=rU;var zb="SelectItem",[nme,sU]=Gh(zb),iU=g.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:a=!1,textValue:i,...o}=e,l=Vl(zb,n),c=Gl(zb,n),u=l.value===r,[h,d]=g.useState(i??""),[f,p]=g.useState(!1),y=Fe(t,x=>{var w;return(w=c.itemRefCallback)==null?void 0:w.call(c,x,r,a)}),m=Oa(),v=g.useRef("touch"),b=()=>{a||(l.onValueChange(r),l.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return s.jsx(nme,{scope:n,value:r,disabled:a,textId:m,isSelected:u,onItemTextChange:g.useCallback(x=>{d(w=>w||((x==null?void 0:x.textContent)??"").trim())},[]),children:s.jsx(i0.ItemSlot,{scope:n,value:r,disabled:a,textValue:h,children:s.jsx(we.div,{role:"option","aria-labelledby":m,"data-highlighted":f?"":void 0,"aria-selected":u&&f,"data-state":u?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...o,ref:y,onFocus:de(o.onFocus,()=>p(!0)),onBlur:de(o.onBlur,()=>p(!1)),onClick:de(o.onClick,()=>{v.current!=="mouse"&&b()}),onPointerUp:de(o.onPointerUp,()=>{v.current==="mouse"&&b()}),onPointerDown:de(o.onPointerDown,x=>{v.current=x.pointerType}),onPointerMove:de(o.onPointerMove,x=>{var w;v.current=x.pointerType,a?(w=c.onItemLeave)==null||w.call(c):v.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:de(o.onPointerLeave,x=>{var w;x.currentTarget===document.activeElement&&((w=c.onItemLeave)==null||w.call(c))}),onKeyDown:de(o.onKeyDown,x=>{var _;((_=c.searchRef)==null?void 0:_.current)!==""&&x.key===" "||(Wpe.includes(x.key)&&b(),x.key===" "&&x.preventDefault())})})})})});iU.displayName=zb;var Jf="SelectItemText",oU=g.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:a,...i}=e,o=Vl(Jf,n),l=Gl(Jf,n),c=sU(Jf,n),u=Hpe(Jf,n),[h,d]=g.useState(null),f=Fe(t,b=>d(b),c.onItemTextChange,b=>{var x;return(x=l.itemTextRefCallback)==null?void 0:x.call(l,b,c.value,c.disabled)}),p=h==null?void 0:h.textContent,y=g.useMemo(()=>s.jsx("option",{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:m,onNativeOptionRemove:v}=u;return rr(()=>(m(y),()=>v(y)),[m,v,y]),s.jsxs(s.Fragment,{children:[s.jsx(we.span,{id:c.textId,...i,ref:f}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?pu.createPortal(i.children,o.valueNode):null]})});oU.displayName=Jf;var lU="SelectItemIndicator",cU=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return sU(lU,n).isSelected?s.jsx(we.span,{"aria-hidden":!0,...r,ref:t}):null});cU.displayName=lU;var TS="SelectScrollUpButton",uU=g.forwardRef((e,t)=>{const n=Gl(TS,e.__scopeSelect),r=V2(TS,e.__scopeSelect),[a,i]=g.useState(!1),o=Fe(t,r.onScrollButtonChange);return rr(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=c.scrollTop>0;i(u)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),a?s.jsx(hU,{...e,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});uU.displayName=TS;var AS="SelectScrollDownButton",dU=g.forwardRef((e,t)=>{const n=Gl(AS,e.__scopeSelect),r=V2(AS,e.__scopeSelect),[a,i]=g.useState(!1),o=Fe(t,r.onScrollButtonChange);return rr(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=c.scrollHeight-c.clientHeight,h=Math.ceil(c.scrollTop)<u;i(h)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),a?s.jsx(hU,{...e,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});dU.displayName=AS;var hU=g.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...a}=e,i=Gl("SelectScrollButton",n),o=g.useRef(null),l=o0(n),c=g.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return g.useEffect(()=>()=>c(),[c]),rr(()=>{var h;const u=l().find(d=>d.ref.current===document.activeElement);(h=u==null?void 0:u.ref.current)==null||h.scrollIntoView({block:"nearest"})},[l]),s.jsx(we.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:de(a.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:de(a.onPointerMove,()=>{var u;(u=i.onItemLeave)==null||u.call(i),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:de(a.onPointerLeave,()=>{c()})})}),rme="SelectSeparator",fU=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return s.jsx(we.div,{"aria-hidden":!0,...r,ref:t})});fU.displayName=rme;var ES="SelectArrow",ame=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=l0(n),i=Vl(ES,n),o=Gl(ES,n);return i.open&&o.position==="popper"?s.jsx(Pw,{...a,...r,ref:t}):null});ame.displayName=ES;var sme="SelectBubbleInput",pU=g.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const a=g.useRef(null),i=Fe(r,a),o=Tg(t);return g.useEffect(()=>{const l=a.current;if(!l)return;const c=window.HTMLSelectElement.prototype,h=Object.getOwnPropertyDescriptor(c,"value").set;if(o!==t&&h){const d=new Event("change",{bubbles:!0});h.call(l,t),l.dispatchEvent(d)}},[o,t]),s.jsx(we.select,{...n,style:{...mF,...n.style},ref:i,defaultValue:t})});pU.displayName=sme;function mU(e){return e===""||e===void 0}function gU(e){const t=In(e),n=g.useRef(""),r=g.useRef(0),a=g.useCallback(o=>{const l=n.current+o;t(l),function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(l)},[t]),i=g.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return g.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,a,i]}function yU(e,t,n){const a=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let o=ime(e,Math.max(i,0));a.length===1&&(o=o.filter(u=>u!==n));const c=o.find(u=>u.textValue.toLowerCase().startsWith(a.toLowerCase()));return c!==n?c:void 0}function ime(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var ome=zq,vU=Vq,lme=Yq,cme=Kq,ume=Xq,bU=Qq,dme=tU,xU=aU,wU=iU,hme=oU,fme=cU,_U=uU,kU=dU,jU=fU;const jt=ome,Ct=lme,mt=g.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(vU,{ref:r,className:K("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm r
831ing-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,s.jsx(cme,{asChild:!0,children:s.jsx(gu,{className:"h-4 w-4 opacity-50"})})]}));mt.displayName=vU.displayName;const SU=g.forwardRef(({className:e,...t},n)=>s.jsx(_U,{ref:n,className:K("flex cursor-default items-center justify-center py-1",e),...t,children:s.jsx(gw,{className:"h-4 w-4"})}));SU.displayName=_U.displayName;const NU=g.forwardRef(({className:e,...t},n)=>s.jsx(kU,{ref:n,className:K("flex cursor-default items-center justify-center py-1",e),...t,children:s.jsx(gu,{className:"h-4 w-4"})}));NU.displayName=kU.displayName;const gt=g.forwardRef(({className:e,children:t,position:n="popper",...r},a)=>s.jsx(ume,{children:s.jsxs(bU,{ref:a,className:K("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[s.jsx(SU,{}),s.jsx(dme,{className:K("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),s.jsx(NU,{})]})}));gt.displayName=bU.displayName;const pme=g.forwardRef(({className:e,...t},n)=>s.jsx(xU,{ref:n,className:K("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));pme.displayName=xU.displayName;const Ee=g.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(wU,{ref:r,className:K("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...n,children:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(fme,{children:s.jsx($t,{className:"h-4 w-4"})})}),s.jsx(hme,{children:t})]}));Ee.displayName=wU.displayName;const mme=g.forwardRef(({className:e,...t},n)=>s.jsx(jU,{ref:n,className:K("-mx-1 my-1 h-px bg-muted",e),...t}));mme.displayName=jU.displayName;const gme=[{id:"clean",name:"Clean / Minimal",description:"Simple, modern aesthetic"},{id:"professional",name:"Professional",description:"Business-ready look"},{id:"bold",name:"Bold / High-Contrast",description:"Eye-catching visuals"},{id:"fun",name:"Fun / Playful",description:"Vibrant and energetic"},{id:"cinematic",name:"Cinematic",description:"Movie-like quality"}],C1=[{id:"square",name:"Square",value:"1:1",dimensions:{width:1024,height:1024}},{id:"portrait",name:"Portrait",value:"3:4",dimensions:{width:768,height:1024}},{id:"landscape",name:"Landscape",value:"16:9",dimensions:{width:1024,height:576}}],yme=({postContent:e,onImagesGenerated:t,disabled:n=!1})=>{const[r,a]=g.useState(e),[i,o]=g.useState("professional"),[l,c]=g.useState(!1),[u,h]=g.useState([]),[d,f]=g.useState(new Set),[p,y]=g.useState(null),[m,v]=g.useState("square"),[b,x]=g.useState(""),[w,_]=g.useState(!1),{toast:k}=Je(),j=()=>{a(e)},S=async()=>{var D;if(!r.trim()){k({title:"Prompt required",description:"Please enter an image description",variant:"destructive"});return}c(!0),h([]),f(new Set);try{const $=C1.find(I=>I.id===m),R=await S1({prompt:r,style:i,count:3,aspectRatio:($==null?void 0:$.value)||"1:1"});if(!R.success)throw new Error(R.error||"Generation failed");if((D=R.data)!=null&&D.images&&R.data.images.length>0)h(R.data.images),f(new Set([0])),k({title:"Images generated!",description:`${R.data.images.length} image(s) created successfully`});else throw new Error("No images generated")}catch($){console.error("Image generation error:",$),k({title:"Generation failed",description:$.message||"Failed to generate images",variant:"destructive"})}finally{c(!1)}},N=async D=>{var $;c(!0);try{const R=await S1({prompt:r,style:i,count:1,variation:!0}
831);if(!R.success)throw new Error(R.error||"Regeneration failed");($=R.data)!=null&&$.images&&R.data.images.length>0&&(h(I=>{const P=[...I];return P[D]=R.data.images[0],P}),k({title:"Image regenerated!"}))}catch(R){k({title:"Regeneration failed",description:R.message,variant:"destructive"})}finally{c(!1)}},C=async()=>{var D;if(p){_(!0);try{const $=C1.find(I=>I.id===m),R=await S1({editImage:p,aspectRatio:($==null?void 0:$.value)||"1:1",overlayText:b.trim()||void 0});if(!R.success)throw new Error(R.error||"Edit failed");if((D=R.data)!=null&&D.images&&R.data.images.length>0){const I=u.indexOf(p);I!==-1&&h(P=>{const A=[...P];return A[I]=R.data.images[0],A}),y(null),x(""),k({title:"Image edited successfully!"})}}catch($){k({title:"Edit failed",description:$.message,variant:"destructive"})}finally{_(!1)}}},M=D=>{f($=>{const R=new Set($);return R.has(D)?R.delete(D):R.add(D),R})},O=()=>{const D=Array.from(d).map($=>({id:`ai-${Date.now()}-${$}`,url:u[$],type:"image"}));t(D),k({title:"Images added",description:`${D.length} image(s) added to your post`})};return s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(X,{className:"text-sm font-medium text-muted-foreground",children:"Image Description"}),e&&e!==r&&s.jsxs(z,{variant:"ghost",size:"sm",onClick:j,className:"h-7 text-xs",children:[s.jsx(Bt,{className:"mr-1 h-3 w-3"}),"Sync with post"]})]}),s.jsx(Nt,{placeholder:"Describe the image you want to generate...",value:r,onChange:D=>a(D.target.value),className:"min-h-[80px] resize-none",disabled:n||l})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{className:"text-sm font-medium text-muted-foreground",children:"Style"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:gme.map(D=>s.jsx("button",{onClick:()=>o(D.id),disabled:n||l,className:K("rounded-lg px-3 py-1.5 text-xs font-medium transition-all",i===D.id?"bg-primary text-primary-foreground shadow-sm":"bg-muted text-muted-foreground hover:bg-muted/80"),children:D.name},D.id))})]}),s.jsxs(z,{onClick:S,disabled:n||l||!r.trim(),className:"w-full",variant:"outline",children:[l?s.jsx(ce,{className:"mr-2 h-4 w-4 animate-spin"}):s.jsx(Se,{className:"mr-2 h-4 w-4"}),l?"Generating...":"Generate AI Images"]}),s.jsx(Wr,{children:u.length>0&&s.jsxs(fe.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"space-y-3",children:[s.jsxs(X,{className:"text-sm font-medium text-muted-foreground",children:["Generated Images (",d.size," selected)"]}),s.jsx("div",{className:"grid grid-cols-3 gap-2",children:u.map((D,$)=>s.jsxs("div",{className:K("group relative aspect-square overflow-hidden rounded-lg border-2 cursor-pointer transition-all",d.has($)?"border-primary shadow-md":"border-border hover:border-primary/50"),onClick:()=>M($),children:[s.jsx("img",{src:D,alt:`Generated ${$+1}`,className:"h-full w-full object-cover"}),s.jsx("div",{className:K("absolute top-2 left-2 h-5 w-5 rounded-full flex items-center justify-center transition-all",d.has($)?"bg-primary text-primary-foreground":"bg-background/80 text-muted-foreground"),children:d.has($)&&s.jsx($t,{className:"h-3 w-3"})}),s.jsxs("div",{className:"absolute bottom-0 left-0 right-0 flex gap-1 p-1.5 opacity-0 group-hover:opacity-100 transition-opacity bg-gradient-to-t from-black/60 to-transparent",children:[s.jsx(z,{variant:"ghost",size:"sm",className:"h-6 flex-1 bg-background/80 hover:bg-background text-xs",onClick:R=>{R.stopPropagation(),N($)},disabled:l,children:s.jsx(Bt,{className:"h-3 w-3"})}),s.jsx(z,{variant:"ghost",size:"sm",className:"h-6 flex-1 bg-background/80 hover:bg-background text-xs",onClick:R=>{R.stopPropagation(),y(D)},children:s.jsx(YQ,{className:"h-3 w-3"})})]})]},$))}),d.size>0&&s.jsxs(z,{onClick:O,className:"w-full",size:"sm",children:[s.jsx(yw,{className:"mr-2 h-4 w-4"}),"Add ",d.size," Image",d.size>1?"s":""," to Post"]})]})}),s.jsx(An,{open:!!p,onOpenChange:D=>!D&&y(null),children:s.jsxs(En,{className:"max-w-md",children:[s.jsx(wn,{children:s.jsx(_n,{children:"Edit Image"})}),s.jsxs("div",{className:"space-y-4",children:[p&&s.jsx("div",{className:"aspect-square overflow-hidden rounded-lg border border-border",children:s.jsx("img",{src:p,alt:"Editing",className:"h-full w-full object-cover"})}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{className:"text-sm",children:"Aspect Ratio"}),s.jsxs(jt,{value:m,onValueChange:v,children:[s.jsx(mt,{children:s.jsx(Ct,{})}),s.jsx(gt,{children:C1.map(D=>
831s.jsxs(Ee,{value:D.id,children:[D.name," (",D.value,")"]},D.id))})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{className:"text-sm",children:"Text Overlay (Optional)"}),s.jsx(ze,{placeholder:"Add headline text...",value:b,onChange:D=>x(D.target.value)})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(z,{variant:"outline",onClick:()=>y(null),className:"flex-1",children:"Cancel"}),s.jsxs(z,{onClick:C,disabled:w,className:"flex-1",children:[w?s.jsx(ce,{className:"mr-2 h-4 w-4 animate-spin"}):s.jsx($t,{className:"mr-2 h-4 w-4"}),"Apply Changes"]})]})]})]})})]})},eM=[{id:"just_listed",icon:yi,label:"Just Listed",description:"Announce a new listing",placeholder:"e.g., Stunning 4BR with ocean views, gourmet kitchen, private pool"},{id:"just_sold",icon:hg,label:"Just Sold",description:"Celebrate a closed deal",placeholder:"e.g., Sold in 3 days, 10% over asking, multiple offers"},{id:"open_house",icon:Mn,label:"Open House",description:"Promote an open house",placeholder:"e.g., Saturday 1-4pm, complimentary refreshments, free home valuation"},{id:"market_update",icon:vn,label:"Market Update",description:"Share local market insights",placeholder:"e.g., Q4 prices up 8%, inventory down 15%, avg days on market 22"},{id:"buyer_education",icon:oi,label:"Buyer Education",description:"Tips for homebuyers",placeholder:"e.g., First-time buyer tips, mortgage rates, negotiation strategies"},{id:"seller_education",icon:Wn,label:"Seller Education",description:"Tips for home sellers",placeholder:"e.g., Staging secrets, pricing strategy, best time to sell"},{id:"local_authority",icon:bP,label:"Local Authority",description:"Community & neighborhood",placeholder:"e.g., Best restaurants, school ratings, upcoming developments, local events"}],vme=["Single Family Home","Condo/Townhouse","Luxury Estate","Multi-Family","Land/Lot","Commercial","New Construction"],bme=({templateData:e,onTemplateDataChange:t})=>{const[n,r]=g.useState(!0),a=eM.find(h=>h.id===e.category),i=h=>{t({...e,category:h})},o=h=>{t({...e,location:h})},l=h=>{t({...e,propertyType:h})},c=h=>{t({...e,highlights:h})},u=["just_listed","just_sold","open_house"].includes(e.category);return s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-3",children:[s.jsxs(X,{className:"text-sm font-medium text-muted-foreground flex items-center gap-2",children:[s.jsx(gi,{className:"h-4 w-4"}),"Template Category"]}),s.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-2",children:eM.map(({id:h,icon:d,label:f,description:p})=>s.jsxs("button",{onClick:()=>i(h),className:K("flex flex-col items-center gap-1.5 rounded-xl p-3 text-center transition-all border",e.category===h?"bg-primary text-primary-foreground border-primary shadow-lg":"bg-muted/30 text-foreground border-border hover:bg-muted/50 hover:border-muted-foreground/30"),children:[s.jsx(d,{className:K("h-5 w-5",e.category===h?"text-primary-foreground":"text-muted-foreground")}),s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("p",{className:"text-xs font-semibold leading-tight",children:f}),s.jsx("p",{className:K("text-[9px] leading-tight hidden sm:block",e.category===h?"text-primary-foreground/80":"text-muted-foreground"),children:p})]})]},h))})]}),s.jsxs("div",{className:"rounded-xl border border-border bg-muted/20 overflow-hidden",children:[s.jsxs("button",{onClick:()=>r(!n),className:"flex w-full items-center justify-between p-4 text-left hover:bg-muted/30 transition-colors",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Se,{className:"h-4 w-4 text-primary"}),s.jsx("span",{className:"text-sm font-medium",children:"Template Details"}),e.location&&s.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",e.location,")"]})]}),n?s.jsx(gw,{className:"h-4 w-4 text-muted-foreground"}):s.jsx(gu,{className:"h-4 w-4 text-muted-foreground"})]}),s.jsx(Wr,{children:n&&s.jsx(fe.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},className:"overflow-hidden",children:s.jsxs("div",{className:"px-4 pb-4 space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{className:"text-xs font-medium text-muted-foreground",children:"Location / Market Area *"}),s.jsx(ze,{placeholder:"e.g., Downtown Seattle, Scottsdale AZ, Miami Beach",value:e.location,onChange:h=>o(h.target.value),className:"h-9 text-sm"})]}),u&&s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{className:"text-xs font-medium text-muted-foreground",children:"Property Type"}),s.jsx("div",{className:"flex flex-wrap gap-1.5",children:vme.map(h=>s.jsx("button",{onClick:()=>
831l(h),className:K("rounded-lg px-3 py-1.5 text-xs font-medium transition-all",e.propertyType===h?"bg-accent text-accent-foreground shadow-sm":"bg-muted text-muted-foreground hover:bg-muted/80"),children:h},h))})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{className:"text-xs font-medium text-muted-foreground",children:"Key Highlights (Optional)"}),s.jsx(Nt,{placeholder:(a==null?void 0:a.placeholder)||"Add specific details to make your post unique...",value:e.highlights,onChange:h=>c(h.target.value),className:"min-h-[60px] resize-none text-sm"})]})]})})})]}),s.jsx("div",{className:"rounded-lg border border-dashed border-primary/30 bg-primary/5 p-3 text-center",children:s.jsxs("p",{className:"text-xs text-primary/80",children:[s.jsx(Se,{className:"inline h-3 w-3 mr-1"}),a?s.jsxs(s.Fragment,{children:["Ready to generate a ",s.jsx("strong",{children:a.label})," post",e.location&&s.jsxs(s.Fragment,{children:[" for ",s.jsx("strong",{children:e.location})]})]}):"Select a template category to get started"]})})]})},CU=({className:e="h-5 w-5"})=>s.jsx("svg",{className:e,viewBox:"0 0 24 24",fill:"currentColor",children:s.jsx("path",{d:"M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"})}),xme=({className:e="h-5 w-5"})=>s.jsx("svg",{className:e,viewBox:"0 0 24 24",fill:"currentColor",children:s.jsx("path",{d:"M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zM12 0C8.741 0 8.333.014 7.053.072 2.695.272.273 2.69.073 7.052.014 8.333 0 8.741 0 12c0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98C8.333 23.986 8.741 24 12 24c3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98C15.668.014 15.259 0 12 0zm0 5.838a6.162 6.162 0 100 12.324 6.162 6.162 0 000-12.324zM12 16a4 4 0 110-8 4 4 0 010 8zm6.406-11.845a1.44 1.44 0 100 2.881 1.44 1.44 0 000-2.881z"})}),wme=({className:e="h-5 w-5"})=>s.jsx("svg",{className:e,viewBox:"0 0 24 24",fill:"currentColor",children:s.jsx("path",{d:"M12.186 24h-.007c-3.581-.024-6.334-1.205-8.184-3.509C2.35 18.44 1.5 15.586 1.472 12.01v-.017c.03-3.579.879-6.43 2.525-8.482C5.845 1.205 8.6.024 12.18 0h.014c2.746.02 5.043.725 6.826 2.098 1.677 1.29 2.858 3.13 3.509 5.467l-2.04.569c-1.104-3.96-3.898-5.984-8.304-6.015-2.91.022-5.11.936-6.54 2.717C4.307 6.504 3.616 8.914 3.589 12c.027 3.086.718 5.496 2.057 7.164 1.43 1.783 3.631 2.698 6.54 2.717 2.623-.02 4.358-.631 5.8-2.045 1.647-1.613 1.618-3.593 1.09-4.798-.31-.71-.873-1.3-1.634-1.75-.192 1.352-.622 2.446-1.284 3.272-.886 1.102-2.14 1.704-3.73 1.79-1.202.065-2.361-.218-3.259-.801-1.063-.689-1.685-1.74-1.752-2.96-.065-1.182.408-2.256 1.333-3.022.812-.672 1.927-1.073 3.222-1.158 1.445-.095 2.81.097 4.07.572.017-.96-.056-1.833-.266-2.6-.405-1.47-1.392-2.227-2.932-2.254-1.036-.018-1.96.286-2.594.853-.577.517-.9 1.203-.964 2.042l-2.097-.147c.089-1.263.6-2.337 1.479-3.108.975-.857 2.334-1.318 3.93-1.337h.058c1.898 0 3.41.616 4.495 1.832.95 1.066 1.453 2.534 1.495 4.363l.007.48c0 .073-.001.145-.004.217 1.021.634 1.837 1.49 2.367 2.503.716 1.368.943 3.095.621 4.869-.538 2.963-2.6 5.158-5.828 6.198-1.42.457-3.002.674-4.706.674zm1.873-8.153c-.949 0-1.878.116-2.569.339-.88.284-1.456.702-1.663 1.209-.16.39-.14.82.058 1.246.257.553.749.997 1.422 1.286.612.263 1.39.394 2.252.394 1.413 0 2.592-.392 3.408-1.134.715-.65 1.167-1.584 1.31-2.702-1.326-.434-2.79-.638-4.218-.638z"})}),_me=({className:e="h-5 w-5"})=>s.jsx("svg",{className:e,viewBox:"0 0 24 24",fill:"currentColor",children:s.jsx("path",{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 01-2.063-2.065 2.064 2.064 0 112.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"})}),kme=({className:e="h-5 w-5"})=>
831s.jsx("svg",{className:e,viewBox:"0 0 24 24",fill:"currentColor",children:s.jsx("path",{d:"M12 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0zm5.01 4.744c.688 0 1.25.561 1.25 1.249a1.25 1.25 0 0 1-2.498.056l-2.597-.547-.8 3.747c1.824.07 3.48.632 4.674 1.488.308-.309.73-.491 1.207-.491.968 0 1.754.786 1.754 1.754 0 .716-.435 1.333-1.01 1.614a3.111 3.111 0 0 1 .042.52c0 2.694-3.13 4.87-7.004 4.87-3.874 0-7.004-2.176-7.004-4.87 0-.183.015-.366.043-.534A1.748 1.748 0 0 1 4.028 12c0-.968.786-1.754 1.754-1.754.463 0 .898.196 1.207.49 1.207-.883 2.878-1.43 4.744-1.487l.885-4.182a.342.342 0 0 1 .14-.197.35.35 0 0 1 .238-.042l2.906.617a1.214 1.214 0 0 1 1.108-.701zM9.25 12C8.561 12 8 12.562 8 13.25c0 .687.561 1.248 1.25 1.248.687 0 1.248-.561 1.248-1.249 0-.688-.561-1.249-1.249-1.249zm5.5 0c-.687 0-1.248.561-1.248 1.25 0 .687.561 1.248 1.249 1.248.688 0 1.249-.561 1.249-1.249 0-.687-.562-1.249-1.25-1.249zm-5.466 3.99a.327.327 0 0 0-.231.094.33.33 0 0 0 0 .463c.842.842 2.484.913 2.961.913.477 0 2.105-.056 2.961-.913a.361.361 0 0 0 .029-.463.33.33 0 0 0-.464 0c-.547.533-1.684.73-2.512.73-.828 0-1.979-.196-2.512-.73a.326.326 0 0 0-.232-.095z"})}),jme=({className:e="h-5 w-5"})=>s.jsx("svg",{className:e,viewBox:"0 0 24 24",fill:"currentColor",children:s.jsx("path",{d:"M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z"})}),bp={facebook:{id:"facebook",name:"Facebook",displayName:"Facebook Pages",brandColor:"#1877F2",hoverColor:"#166FE5",textColor:"#FFFFFF",icon:CU,oauthReady:!0},instagram:{id:"instagram",name:"Instagram",displayName:"Instagram Business",brandColor:"#E4405F",hoverColor:"#D93351",textColor:"#FFFFFF",icon:xme,oauthReady:!0,gradient:"linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%)"},threads:{id:"threads",name:"Threads",displayName:"Threads",brandColor:"#000000",hoverColor:"#1A1A1A",textColor:"#FFFFFF",icon:wme,oauthReady:!0},linkedin:{id:"linkedin",name:"LinkedIn",displayName:"LinkedIn",brandColor:"#0A66C2",hoverColor:"#004182",textColor:"#FFFFFF",icon:_me,oauthReady:!0},reddit:{id:"reddit",name:"Reddit",displayName:"Reddit",brandColor:"#FF4500",hoverColor:"#E03D00",textColor:"#FFFFFF",icon:kme,oauthReady:!1,comingSoon:!0}
831,tiktok:{id:"tiktok",name:"TikTok",displayName:"TikTok",brandColor:"#000000",hoverColor:"#1A1A1A",textColor:"#FFFFFF",icon:jme,oauthReady:!1,comingSoon:!0}},Sme=["facebook","instagram","threads","linkedin","reddit","tiktok"],tM=[{value:1,label:"Starter",sublabel:"1× per week",badge:"52 posts / year",icon:s.jsx(Mn,{className:"h-4 w-4"}),postsPerYear:52,color:"border-blue-500/40 bg-blue-500/10 text-blue-400"},{value:3,label:"Pro",sublabel:"3× per week",badge:"156 posts / year",icon:s.jsx(vn,{className:"h-4 w-4"}),postsPerYear:156,color:"border-primary/40 bg-primary/10 text-primary"},{value:7,label:"Domination",sublabel:"7× per week",badge:"365 posts / year",icon:s.jsx(ZQ,{className:"h-4 w-4"}),postsPerYear:365,color:"border-orange-500/40 bg-orange-500/10 text-orange-400"}],nM=()=>{const e=new Date;return e.setDate(e.getDate()+1),e.toISOString().split("T")[0]},PU=({variant:e="hero",className:t="",selectedModule:n,selectedPlatform:r,onSuccess:a})=>{const[i,o]=g.useState(!1),[l,c]=g.useState(!1),[u,h]=g.useState(3),[d,f]=g.useState(()=>nM()),[p,y]=g.useState(!0),[m,v]=g.useState([]),[b,x]=g.useState({}),{toast:w}=Je(),{currentVertical:_}=Fa(),{getConnectionsForPlatform:k,getDefaultConnection:j,getConnectedPlatforms:S}=Hl(),N=tM.find(T=>T.value===u),C=nM(),M=S(),O=T=>{var L;return b[T]||((L=j(T))==null?void 0:L.id)||null},D=T=>{v(L=>L.includes(T)?L.filter(B=>B!==T):[...L,T])},$=()=>{y(!0),v(r?[r]:M),x({}),c(!0)},I=p?M.flatMap(T=>k(T).map(L=>({platform:T,connectionId:L.id}))):m.map(T=>({platform:T,connectionId:O(T)})),P=Array.from(new Set(I.map(T=>T.platform))),A=async()=>{if(I.length!==0){c(!1),o(!0),await new Promise(T=>setTimeout(T,0));try{const{data:{user:T}}=await W.auth.getUser();if(!T)throw new Error("User authentication required.");const L=n||_;if(!L)throw new Error("No vertical selected — choose a module before activating ClickPRO.");const B=L.toLowerCase().replace(/[-_]/g,""),H=d&&d>=C?d:C,G=I.map(ue=>({platform:ue.platform,connection_id:ue.connectionId})),{data:Z,error:le}=await W.rpc("generate_one_year_schedule",{p_user_id:T.id,p_industry_module:B,p_targets:G,p_frequency:u,p_start_date:H});if(!le&&(Z!=null&&Z.success)){const ue=Z.posts_created??0;w({title:"ClickPRO Engine Activated! 🚀",description:`${ue} posts scheduled across ${P.map(re=>re.toUpperCase()).join(", ")} starting ${H} at ${N.sublabel} (${N.label} cadence).`}),a&&a();return}le?console.warn("[ClickPRO] RPC unavailable, using client-side fallback:",le.message):Z&&!Z.success&&console.warn("[ClickPRO] RPC returned failure:",Z.error),await E(T.id,B,I,H)}catch(T){console.error("ClickPRO Error:",T),w({title:"ClickPRO Error",description:T.message||"Failed to schedule evergreen posts.",variant:"destructive"})}finally{o(!1)}}},E=async(T,L,B,H)=>{const G={1:[3],3:[1,3,5],7:[1,2,3,4,5,6,0]},Z={1:52,3:156,7:365};let{data:le}=await W.from("evergreen_prompts").select("*").or(`module.eq.${L},module.eq.authoritypro,module.eq.realtor,module.eq.advisor`).eq("is_active",!0).order("position",{ascending:!0});if(!le||le.length===0){const{data:J}=await W.from("evergreen_prompts").select("*").eq("is_active",!0).order("position",{ascending:!0});le=J||[]}if(!le||le.length===0)throw new Error(`No evergreen content available for module "${L}". Please contact support.`);await W.from("scheduled_posts").delete().eq("user_id",T).eq("industry_module",L).in("status",["scheduled","pending","failed"]);const ue=G[u],re=Z[u],q=new Date(`${H}T00:00:00`),U=[];for(let J=0;J<re;J++){const Y=Math.floor(J/ue.length),oe=ue[J%ue.length],ve=new Date(q);ve.setDate(q.getDate()+Y*7+(oe-q.getDay()+7)%7);const De=J%le.length,Le=le[De];for(const He of B)U.push({user_id:T,platform:He.platform,content:Le.content,scheduled_date:ve.toISOString().split("T")[0],scheduled_time:"09:00:00",status:"pending",trend_name:Le.title||`Post ${J+1}`,trend_variant:"evergreen",trend_mode:"series",is_evergreen:!0,industry_role:L,industry_module:L,social_connection_id:He.connectionId})}for(let J=0;J<U.length;J+=100){const Y=U.slice(J,J+100),{error:oe}=await W.from("scheduled_posts").insert(Y);if(oe)throw oe}const Q=Array.from(new Set(B.map(J=>J.platform)));w({title:"ClickPRO Engine Activated! 🚀",description:`${U.length} posts scheduled across ${Q.map(J=>J.toUpperCase()).join(", ")} starting ${H} (${N.label} cadence).`}),a&&a()};return s.jsxs(s.Fragment,{children:[s.jsx(z,{variant:e==="secondary"?"secondary":e==="outline"?"outline":"hero",className:t,disabled:i,onClick:$,children:i?s.jsxs(s.Fragment,{children:[s.jsx(ce,{className:"mr-2 h-4 w-4 animate-spin"}),"Activating ClickPRO..."]}):s.jsxs(s.Fragment,{children:[s.jsx(Tn,{className:"mr-2 h-4 w-4"}),"Activate ClickPRO (1-Click Year)"]})}),s.jsx(An,{open:l,onOpenChange:c,children:s.jsxs(En,{className:"sm:max-w-lg",children:[s.jsxs(wn,{children:[s.jsxs(_n,{className:"flex items-center gap-2",children:[s.jsx(Se,{className:"h-5 w-5 text-primary"}),"Activate ClickPRO Engine"]}),s.jsx(Zr,{children:"Choose your posting frequency. ClickPRO will generate a full year of optimised evergreen content and schedule it automatically."})]}),s.jsx("div",{className:"grid grid-cols-3 gap-3 py-2",children:tM.map(T=>{const L=u===T.value;return s.jsxs("button",{type:"button",onClick:()=>h(T.value),className:K("flex flex-col items-center gap-1.5 rounded-xl border-2 p-3 text-center transition-all duration-200",L?T.color+" border-2 shadow-sm":"border-border bg-muted/20 text-muted-foreground hover:bg-muted/40"),children:[s.jsxs("span",{className:K("flex items-center gap-1 text-sm font-semibold"),children:[T.icon,T.label]}),s.jsx("span",{className:"text-xs font-medium",children:T.sublabel}),s.jsx("span",{className:K("mt-0.5 rounded-full px-2 py-0.5 text-[10px] font-semibold",L?"bg-white/10":"bg-muted text-muted-foreground"),children:T.badge})]},T.value)})}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(X,{htmlFor:"clickpro-start-date",className:"text-sm font-medium text-muted-foreground",children:"Start date"}),s.jsx("input",{id:"clickpro-start-date",type:"date",min:C,value:d,onChange:T=>f(T.target.value),className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
831ing-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Defaults to tomorrow — pick a later date if you'd rather start then."})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{className:"text-sm font-medium text-muted-foreground",children:"Where should ClickPRO post?"}),M.length===0?s.jsx("p",{className:"text-xs text-destructive",children:"No platforms connected yet — connect an account in Settings before activating ClickPRO."}):s.jsxs(s.Fragment,{children:[s.jsxs("label",{className:"flex items-center gap-2 rounded-md border border-border bg-muted/20 px-3 py-2 text-sm cursor-pointer",children:[s.jsx("input",{type:"checkbox",checked:p,onChange:T=>y(T.target.checked),className:"h-4 w-4 rounded border-input accent-primary"}),s.jsx("span",{className:"font-medium",children:"All platforms, all accounts"})]}),!p&&s.jsx("div",{className:"flex flex-wrap gap-2 pl-1",children:M.map(T=>{const L=m.includes(T);return s.jsxs("button",{type:"button",onClick:()=>D(T),className:K("rounded-md px-3 py-1.5 text-xs font-medium capitalize transition-all",L?"bg-primary text-primary-foreground shadow-sm":"bg-muted text-muted-foreground hover:bg-muted/80"),children:[L?"✓ ":"",T]},T)})})]})]}),!p&&m.map(T=>{const L=k(T);if(L.length<2)return null;const B=O(T);return s.jsxs("div",{className:"space-y-1.5",children:[s.jsxs(X,{className:"text-sm font-medium text-muted-foreground",children:["Which ",T.toUpperCase()," account?"]}),s.jsx("div",{className:"flex flex-wrap gap-2",children:L.map(H=>{const G=H.id===B,Z=H.label||H.profile_name||H.account_name||"Account";return s.jsxs("button",{type:"button",onClick:()=>x(le=>({...le,[T]:H.id})),className:K("rounded-md px-3 py-1.5 text-xs font-medium transition-all",G?"bg-primary text-primary-foreground shadow-sm":"bg-muted text-muted-foreground hover:bg-muted/80"),children:[Z,H.is_default&&s.jsx("span",{className:"ml-1 opacity-70",children:"(default)"})]},H.id)})})]},T)}),s.jsxs("div",{className:"rounded-lg border border-border bg-muted/30 px-4 py-3 text-sm text-muted-foreground",children:[s.jsxs("span",{className:"font-medium text-foreground",children:[N.postsPerYear," posts"]})," ","will be scheduled on"," ",s.jsx("span",{className:"font-medium text-foreground",children:P.length>0?P.map(T=>T.toUpperCase()).join(", "):"no platforms selected"}),I.length>P.length&&s.jsxs(s.Fragment,{children:[" (across ",I.length," connected accounts)"]}),", starting ",s.jsx("span",{className:"font-medium text-foreground",children:d})," at"," ",s.jsx("span",{className:"font-medium text-foreground",children:N.sublabel}),"."," ","Any existing ClickPRO posts for this module will be replaced."]}),s.jsxs(So,{className:"flex gap-2 sm:justify-end",children:[s.jsx(z,{variant:"outline",onClick:()=>c(!1),children:"Cancel"}),s.jsxs(z,{onClick:A,disabled:i||I.length===0,children:[i?s.jsx(ce,{className:"h-4 w-4 animate-spin mr-2"}):s.jsx(Tn,{className:"h-4 w-4 mr-2"}),"Schedule ",N.postsPerYear*Math.max(I.length,1)," Posts"]})]})]})})]})};function Nme(e){const[t,n]=g.useState(null),[r,a]=g.useState(!0),[i,o]=g.useState(!1),l=g.useCallback(async()=>{if(!e){a(!1);return}try{const{data:{user:u}}=await W.auth.getUser();if(!u){a(!1);return}const{data:h,error:d}=await W.from("positioning_profiles").select("*").eq("user_id",u.id).eq("module_name",e).maybeSingle();d&&console.error("Error fetching positioning profile:",d),n(h),o(Zw.includes(e)&&!h)}catch(u){console.error("Positioning profile fetch error:",u)}finally{a(!1)}},[e]);return g.useEffect(()=>{l()},[l]),{profile:t,isLoading:r,needsPositioning:i,saveProfile:async(u,h,d)=>{const{data:{user:f}}=await W.auth.getUser();if(!f||!e)throw new Error("Not authenticated");const p={user_id:f.id,module_name:e,profile_data:u,positioning_statement:h||null,authority_bio:d||null},{data:y,error:m}=await W.from("positioning_profiles").upsert(p,{onConflict:"user_id,module_name"}).select().single();if(m)throw m;return n(y),o(!1),y},refetch:l}}function Cme(){const[e,t]=g.useState({quick_quiz:!1,behavioral_insight:!1,still_relevant_today:!1,life_hack:!1,quick_poll:!1});return{generateTrend:g.useCallback(async(r,a,i)=>{const{data:{session:o}}=await W.auth.getSession();if(!o)return _t.error("Please sign in to generate trends"),null;t(l=>({...l,[r]:!0}));try{const l=await fetch("https://hgnuynazdzzocuwtwiez.supabase.co/functions/v1/generate-trend",{method:"POST",headers:{Authorization:`Bearer ${o.access_token}`,"Content-Type":"application/json"},body:JSON.stringify({topic_id:r,module_slug:a,module_display_name:i})}),c=await l.json();if(!l.ok)return l.status===429?_t.error("Rate limit reached",{description:"Please wait a moment before generating more trends."}):l.status===402?_t.error("AI credits exhausted",{description:"Please add funds to continue using AI features."}):_t.error("Failed to generate trend",{description:c.error||"An unexpected error occurred."}),null;const u=c.trend;return{name:u.trend_title,strength:u.strength,themes:u.keywords||[],source:r,reframe:u.summary}}catch(l){return console.error("Trend generation error:",l),_t.error("Failed to generate trend",{description:"Please try again later."}),null}finally{t(l=>({...l,[r]:!1}))}},[]),isGenerating:e}}const c0=({open:e,onOpenChange:t,onActivate:n})=>{const[r,a]=g.useState(!1),i=async()=>{a(!0);try{await n()}finally{a(!1)}};return s.jsx(An,{open:e,onOpenChange:t,children:s.jsxs(En,{className:"sm:max-w-[440px]",children:[s.jsxs(wn,{children:[s.jsxs(_n,{className:"flex items-center gap-2 text-xl",children:[s.jsx(db,{className:"h-5 w-5 text-primary"}),"Ready to Go Live?"]}),s.jsx(Zr,{className:"text-base pt-2",children:"You've built momentum. Activate your 7-day free trial to publish, schedule, and automate your visibility."})]}),s.jsxs("div",{className:"space-y-4 pt-4",children:[s.jsxs("div",{className:"rounded-xl bg-primary/5 border border-primary/20 p-4 space-y-2",children:[s.jsx("p",{className:"text-sm font-medium text-foreground",children:"Your free trial includes:"}),s.jsxs("ul",{className:"text-sm text-muted-foreground space-y-1",children:[s.jsx("li",{children:"✓ Unlimited post publishing"}),s.jsx("li",{children:"✓ Full scheduling & automation"}),s.jsx("li",{children:"✓ ClickPRO full-year activation"}),s.jsx("li",{children:"✓ AutoBlogPRO access"}),s.jsx("li",{children:"✓ Social account connections"})]})]}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:["If you haven't picked an industry module yet, we'll start you on"," ",s.jsx("span",{className:"font-medium text-foreground",children:"PersonalPRO"})," so you have something to try right away — switch to your industry module anytime from Settings."]}),s.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[s.jsx(Ea,{className:"h-3.5 w-3.5"}),"No payment required. No credit card needed."]}),s.jsxs("div",{className:"flex gap-3 pt-2",children:[s.jsx(z,{variant:"outline",className:"flex-1",onClick:()=>t(!1),disabled:r,children:"Not Yet"}),s.jsx(z,{className:"flex-1",onClick:i,disabled:r,children:r?s.jsxs(s.Fragment,{children:[s.jsx(ce,{className:"mr-2 h-4 w-4 animate-spin"}),"Activating..."]}):s.jsxs(s.Fragment,{children:[s.jsx(db,{className:"mr-2 h-4 w-4"}),"Activate Free Trial"]})})]})]})]})})},Pme=[{id:"linkedin",name:"LinkedIn",brandColor:"#0A66C2",ready:!0},{id:"threads",name:"Threads",brandColor:"#000000",ready:!1,pendingLabel:"Posting pending"},{id:"instagram",name:"Instagram",brandColor:"#E4405F",gradient:"linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%)",ready:!1},{id:"facebook",name:"Facebook",brandColor:"#1877F2",ready:!1},{id:"reddit",name:"Reddit",brandColor:"#FF4500",ready:!1}
831,{id:"tiktok",name:"TikTok",brandColor:"#000000",ready:!1,comingSoon:!0}],Tme=[{id:"professional",name:"Professional"},{id:"bold",name:"Bold"},{id:"funny",name:"Funny"},{id:"confrontational",name:"Confrontational"},{id:"inspirational",name:"Inspirational"}],Ame=[{id:"engagement",name:"Engagement"},{id:"authority",name:"Authority"},{id:"leads",name:"Leads"},{id:"virality",name:"Virality"}],Eme=()=>{const e=cpe();return{quick_quiz:{trend:e.quick_quiz,variations:null,isGenerating:!1},behavioral_insight:{trend:e.behavioral_insight,variations:null,isGenerating:!1},still_relevant_today:{trend:e.still_relevant_today,variations:null,isGenerating:!1},life_hack:{trend:e.life_hack,variations:null,isGenerating:!1},quick_poll:{trend:e.quick_poll,variations:null,isGenerating:!1}}},Uy=(e,t,n,r,a,i)=>{const o=i?`${i}`:"Industry Leader";return e==="trendpulse"&&a?{variations:{fun:`🔥 Quick reality check for ${o}s:
832
833Regarding "${a.name}": Everyone is overcomplicating this.
834
835Here is the bottom line: Focus on position and systems over noise.
836
837What's your take on this? Let's discuss in the comments! 👇`,strategic:`📊 Market Positioning Insight (${o}):
838
839The market doesn't pay for noise—it pays for positioning.
840
841When addressing "${a.name}", standard approaches yield average results.
842
8433 principles to engineer domain authority:
8441. Re-frame traditional industry assumptions.
8452. Prioritize belief shifts over vanity impressions.
8463. Build scalable positioning infrastructure.
847
848Stop posting. Start leading.`,engagement:`❓ Question for my network:
849
850When you consider "${a.name}", what is the #1 mistake you see most professionals making?
851
852I have my own thoughts, but I'm curious how you're approaching this in your market right now. Drop your perspective below! 👇`}}:{content:`🚀 Strategic Market Insight:
853
854${t.trim()||`Establishing clear authority in modern business as a ${o}`}
855
856Most professionals focus on volume and frequency. Category leaders focus on positioning and trust.
857
858Key takeaway: Visibility without clear positioning is just noise.
859
860How are you engineering authority in your space this week?`}},Ome=()=>{const e=us(),t=Gt(),{settings:n}=Pq(),{connections:r,getConnectedPlatforms:a,getConnectionsForPlatform:i,getDefaultConnection:o}=Hl(),{hasSelectedPage:l,selectedPage:c}=Uq(),{organization:u,marketConfig:h}=L8(),{currentVertical:d,verticalConfig:f}=Fa(),{needsPositioning:p,isLoading:y}=Nme(d??void 0),{gateAction:m,showTrialModal:v,setShowTrialModal:b,startFreeTrial:x,usePreviewPost:w,trialStatus:_,isPaid:k,isLoading:j}=Ng(),{generateTrend:S}=Cme(),N=ee=>{var xt;const Me=(xt=ee==null?void 0:ee.context)==null?void 0:xt.body;if(typeof Me=="string")try{const Ke=JSON.parse(Me),Xe=(Ke==null?void 0:Ke.error)||(Ke==null?void 0:Ke.message)||(ee==null?void 0:ee.message),Rt=Ke!=null&&Ke.requestId?` (Request ID: ${Ke.requestId})`:"",Mt=Array.isArray(Ke==null?void 0:Ke.details)?`
861${Ke.details.join(`
862`)}`:"";return`${Xe||"Request failed"}${Rt}${Mt}`}catch{}return(ee==null?void 0:ee.message)||"Request failed"},[C,M]=g.useState("ai_prompt"),[O,D]=g.useState(["linkedin"]),[$,R]=g.useState({}),[I,P]=g.useState("professional"),[A,E]=g.useState("engagement"),[T,L]=g.useState(""),[B,H]=g.useState("quick_quiz"),[G,Z]=g.useState(()=>Eme()),[le,ue]=g.useState(""),[re,q]=g.useState(null),[U,Q]=g.useState([]),[J,Y]=g.useState("strategic"),[oe,ve]=g.useState(!1),[De,Le]=g.useState(!1),[He,vt]=g.useState(!1),[lt,Pt]=g.useState(!1),[te,ne]=g.useState(!1),[ye,Ge]=g.useState(!1),[st,Ie]=g.useState(!1),[St,qr]=g.useState(null),[qe,ln]=g.useState([]),[Tt,Pr]=g.useState(""),[gr,Tr]=g.useState({category:"just_listed",location:"",propertyType:"Single Family Home",highlights:""}),[kn,_a]=g.useState(!1),{toast:Yt}=Je(),$e=a(),et=G[B].trend,bt=f!=null&&f.trendCategories&&f.trendCategories.length>0?f.trendCategories:["quick_quiz","behavioral_insight","still_relevant_today","life_hack","quick_poll"];g.useEffect(()=>{bt.length>0&&!bt.includes(B)&&nt(bt[0])},[d]),g.useEffect(()=>{if(n&&!te){const ee=n.default_platform;$e.includes(ee)?D([ee]):$e.length>0&&D([$e[0]]),P(n.default_tone),E(n.default_goal),n.include_trendpulse_by_default&&M("trendpulse"),ne(!0)}},[n,te,$e]),g.useEffect(()=>{var Me;const ee=(Me=e.state)==null?void 0:Me.reusePost;ee&&(D([ee.platform]),P(ee.tone),E(ee.goal),ue(ee.content),M("scratch"),q(null),window.history.replaceState({},document.title))},[e.state]);const Ot=re||le,ae=ee=>{Ot&&ee!==C?qr(ee):(M(ee),ee!=="trendpulse"&&q(null))},At=()=>{St&&(M(St),St!=="trendpulse"&&q(null),qr(null))},cn=()=>{qr(null)},Re=(ee,Me)=>
862{Z(xt=>({...xt,[ee]:{...xt[ee],trend:Me,variations:null}}))},Ye=async(ee,Me)=>{var xt,Ke;Z(Xe=>({...Xe,[ee]:{...Xe[ee],isGenerating:!0}}));try{const Xe=qe.length>0?{type:qe[0].type,description:T||void 0}:null;let Rt;try{Rt=await $v({platform:O[0],platforms:O,tone:I,goal:A,customPrompt:T,includeNationalDay:!1,trendPulseMode:!0,trendData:Me,outputLength:(n==null?void 0:n.output_length)||"medium",boldnessLevel:(n==null?void 0:n.boldness_level)||"balanced",mediaContext:Xe,industryRole:Tt.trim()||null,marketContext:u?{code:u.market,name:h.name,locale:h.locale,currency:h.currency}:null})}catch{Rt={success:!0,data:Uy("trendpulse",T,I,A,Me,Tt)}}(!Rt.success||!((xt=Rt.data)!=null&&xt.variations))&&(Rt={success:!0,data:Uy("trendpulse",T,I,A,Me,Tt)}),(Ke=Rt.data)!=null&&Ke.variations&&(Z(Mt=>({...Mt,[ee]:{...Mt[ee],variations:Rt.data.variations}})),ee===B&&(q(Rt.data.variations),Y("strategic")),Yt({title:"Variations generated!",description:`3 post variations for "${Me.name}" are ready.`}))}catch(Xe){Yt({title:"Generation failed",description:N(Xe),variant:"destructive"})}finally{Z(Xe=>({...Xe,[ee]:{...Xe[ee],isGenerating:!1}}))}},nt=ee=>{H(ee);const Me=G[ee];Me.variations?(q(Me.variations),Y("strategic")):q(null)},Zt=async()=>{var ee,Me,xt;if(C==="scratch"){Yt({title:"Write Mode",description:"Type your post in the editor. No AI generation in this mode."});return}ve(!0),q(null),Q([]),await new Promise(Ke=>setTimeout(Ke,0));try{const Ke=qe.length>0?{type:qe[0].type,description:T||void 0}:null;let Xe;try{Xe=await $v({platform:O[0],platforms:O,tone:I,goal:A,customPrompt:T,includeNationalDay:!1,trendPulseMode:C==="trendpulse",trendData:C==="trendpulse"?et:null,outputLength:(n==null?void 0:n.output_length)||"medium",boldnessLevel:(n==null?void 0:n.boldness_level)||"balanced",mediaContext:Ke,industryRole:Tt.trim()||null,realtorMode:C==="realtor",realtorTemplateData:C==="realtor"?gr:null,marketContext:u?{code:u.market,name:h.name,locale:h.locale,currency:h.currency}:null})}catch{Xe={success:!0,data:Uy(C,T,I,A,et,Tt)}}Xe.success||(Xe={success:!0,data:Uy(C,T,I,A,et,Tt)}),C==="trendpulse"&&((ee=Xe.data)!=null&&ee.variations)?(q(Xe.data.variations),Y("strategic")):(Me=Xe.data)!=null&&Me.content&&(ue(Xe.data.content),(xt=Xe.data)!=null&&xt.hashtags&&Xe.data.hashtags.length>0&&Q(Xe.data.hashtags))}catch(Ke){Yt({title:"Generation failed",description:N(Ke),variant:"destructive"})}finally{ve(!1)}},ct=()=>{let ee="";return re?ee=re[J]:ee=le,Xs(ee)},zt=async()=>{const ee=ct();await navigator.clipboard.writeText(ee),vt(!0),setTimeout(()=>vt(!1),2e3),Yt({title:"Copied!",description:"Post copied to clipboard"})},Gn=async()=>{const ee=ct();if(!ee){Yt({title:"No Content",description:"Generate or write a post before sending it to Facebook.",variant:"destructive"});return}const Me=await tpe(ee,"facebook");Me.success?(Pt(!0),setTimeout(()=>Pt(!1),2500),Yt({title:"Copied for Facebook",description:"Post copied to your clipboard — paste it into the Facebook tab that just opened."})):Yt({title:"Couldn't copy",description:Me.message,variant:"destructive"})},On=async(ee,Me)=>{var Xe,Rt;Me&&Me.preventDefault();const xt=ct();if(!xt){Yt({title:"No Content",description:"Please generate or enter content before modifying.",variant:"destructive"});return}ve(!0),await new Promise(Mt=>setTimeout(Mt,0));let Ke="";ee==="shorten"?Ke="Make the post significantly shorter, punchier, and more concise.":ee==="bolder"?Ke="Make the post much bolder, more authoritative, and high-impact.":Ke="Create a completely new variation of this topic with fresh messaging.";try{let Mt;try{Mt=await $v({platform:O[0],platforms:O,tone:I,goal:A,customPrompt:Ke,includeNationalDay:!1,action:ee,existingContent:xt,trendPulseMode:C==="trendpulse",trendData:C==="trendpulse"?et:null,outputLength:ee==="shorten"?"short":(n==null?void 0:n.output_length)||"medium",boldnessLevel:ee==="bolder"?"spicy":(n==null?void 0:n.boldness_level)||"balanced",industryRole:Tt.trim()||null,realtorMode:C==="realtor",realtorTemplateData:C==="realtor"?gr:null,marketContext:u?{code:u.market,name:h.name,locale:h.locale,currency:h.currency}:null})}catch{let Ur=xt;if(ee==="shorten"){const Gs=xt.split(/\.\s+/);Ur=Gs.slice(0,Math.max(1,Math.ceil(Gs.length/2))).join(". "),Ur.endsWith(".")||(Ur+=".")}else ee==="bolder"?(Ur=xt.replace(/^(I think|Maybe|In my opinion|Just wanted to share)\s*/i,"").trim(),Ur=`🔥 Direct Take: ${Ur}`):Ur=`Fresh perspective: ${xt}`;Mt={success:!0,data:{content:Ur}}}if(!Mt.success){Yt({title:"Action failed",description:"Could not modify the post. Please try again.",variant:"destructive"});return}const Zl=((Xe=Mt.data)==null?void 0:Xe.content)||(typeof Mt.data=="str
862ing"?Mt.data:xt),Li=Vi(Zl);C==="trendpulse"&&re?q({...re,[J]:Li}):(ue(Li),(Rt=Mt.data)!=null&&Rt.hashtags&&Mt.data.hashtags.length>0&&Q(Mt.data.hashtags)),Yt({title:ee==="shorten"?"Post Shortened":ee==="bolder"?"Post Made Bolder":"Post Regenerated",description:"Your content has been updated."})}catch(Mt){Yt({title:"Action failed",description:N(Mt),variant:"destructive"})}finally{ve(!1)}},jn=async(ee=!1)=>{var xt,Ke;const Me=ct();if(Me){Le(!0);try{const{data:{user:Xe}}=await W.auth.getUser();if(!Xe)throw new Error("Not authenticated");const{error:Rt}=await W.from("saved_posts").insert({user_id:Xe.id,platform:O[0],platforms:O,tone:I,goal:A,content:Me,tags:C==="trendpulse"?[et.name,J]:[],media_url:((xt=qe[0])==null?void 0:xt.url)||null,media_type:((Ke=qe[0])==null?void 0:Ke.type)||null,media_items:qe.map(Mt=>({url:Mt.url,type:Mt.type})),industry_role:Tt.trim()||null});if(Rt)throw Rt;ee||Yt({title:"Saved to Library!",description:"Your post has been saved."})}catch(Xe){if(!ee)Yt({title:"Save failed",description:Xe.message||"Failed to save. Please try again.",variant:"destructive"});else throw Xe}finally{Le(!1)}}},c_=async ee=>{var Mt,Zl,Li;if(ee&&ee.preventDefault(),console.log("[PostNow] Starting..."),console.log("[PostNow] Trial state:",{isPaid:k,trialStatus:_,trialLoading:j}),console.log("[PostNow] Selected platforms:",O),console.log("[PostNow] Connected platforms:",$e),!j&&!m("publish")){console.log("[PostNow] Blocked by trial gate — isPaid:",k,"trialStatus:",_);return}const Me=ct();if(console.log("[PostNow] Content length:",Me==null?void 0:Me.length),!Me){Yt({title:"No Content",description:"Please generate or enter content before posting.",variant:"destructive"});return}const xt=O.includes("facebook"),Ke=O.includes("instagram"),Xe=xt&&!l,Rt=Ke&&!l;if(Xe||Rt){const aa=[Xe?"Facebook":null,Rt?"Instagram":null].filter(Boolean).join(" and ");Yt({title:"Account Connection Required",description:`Please select a Facebook Page in Settings to post to ${aa}, or uncheck ${aa} to publish to your other selected networks.`,variant:"destructive"});return}_a(!0),await new Promise(aa=>setTimeout(aa,0));try{const aa=C==="trendpulse"?"trendspro":C==="realtor"?"template":"manual";console.log("[PostNow] Calling publishPost with:",{platforms:O,source:aa});const Ur={};for(const Fi of O){const Bi=$[Fi]||((Mt=o(Fi))==null?void 0:Mt.id);Bi&&(Ur[Fi]=Bi)}const Gs=await n0({content:Me,platforms:O,source:aa,industryModule:d??void 0,trendType:C==="trendpulse"?et==null?void 0:et.name:void 0,mediaItems:qe.map(Fi=>({url:Fi.url,type:Fi.type})),connectionMap:Ur});if(console.log("[PostNow] publishPost result:",JSON.stringify(Gs,null,2)),!Gs.success){const Bi=((Li=(Zl=Gs.platformResults)==null?void 0:Zl.find(bY=>!bY.success))==null?void 0:Li.error)||Gs.message||Gs.error||"Failed to publish post.";if(console.error("[PostNow] Posting failed:",Bi),Bi.toLowerCase().includes("reconnect")||Bi.toLowerCase().includes("expired")||Bi.toLowerCase().includes("session")){Yt({title:"LinkedIn Reconnection Required",description:Bi,variant:"destructive"}),t("/dashboard/settings");return}throw new Error(Bi)}console.log("[PostNow] Post successful!"),Yt({title:"Published Successfully! 🚀",description:`Your post was published to ${O.join(", ")}.`});try{await jn(!0)}catch(Fi){console.warn("Auto-save to library after posting warning:",Fi)}}catch(aa){console.error("[PostNow] Caught error:",aa),Yt({title:"Publishing Failed",description:aa.message||"An error occurred while publishing.",variant:"destructive"})}finally{_a(!1)}},gY=ee=>{ln(Me=>[...Me,...ee]),Ie(!1),Ge(!0)},yY=!!ct()&&O.length>0,vY=()=>{if(oe)return"Generating...";switch(C){case"scratch":return"Write Mode Active";case"ai_prompt":return"Generate Post";case"trendpulse":return re?"Regenerate Variations":"Use Topic Cards Below";case"realtor":return"Generate Authority Post"}};return!y&&p?s.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center space-y-6",children:[s.jsx("div",{className:"h-16 w-16 rounded-full bg-primary/10 flex items-center justify-center",children:s.jsx(HE,{className:"h-8 w-8 text-primary"})}),s.jsxs("div",{className:"space-y-2 max-w-md",children:[s.jsx("h3",{className:"text-xl font-semibold text-foreground",children:"Complete PositioningEnginePRO"}),s.jsx("p",{className:"text-muted-foreground",children:"Complete PositioningEnginePRO to unlock content automation. Your positioning profile ensures every post reinfor
862ces your unique authority."})]}),s.jsxs(z,{onClick:()=>t("/dashboard/positioning"),size:"lg",children:[s.jsx(Se,{className:"mr-2 h-4 w-4"}),"Set Up My Positioning"]})]}):s.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[s.jsx(Wr,{children:St&&s.jsx(fe.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:cn,children:s.jsxs(fe.div,{initial:{scale:.95,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.95,opacity:0},className:"bg-card border border-border rounded-xl p-6 max-w-sm mx-4 shadow-xl",onClick:ee=>ee.stopPropagation(),children:[s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsx(Bs,{className:"h-5 w-5 text-yellow-500"}),s.jsx("h3",{className:"font-semibold text-foreground",children:"Switch Mode?"})]}),s.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:"You have content that may be affected. Your current text will be preserved, but switching modes may change how it's used."}),s.jsxs("div",{className:"flex gap-2 justify-end",children:[s.jsx(z,{variant:"outline",size:"sm",onClick:cn,children:"Cancel"}),s.jsx(z,{size:"sm",onClick:At,children:"Switch Mode"})]})]})})}),s.jsxs(fe.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.4},className:"space-y-6 rounded-2xl border border-border bg-card p-6",children:[s.jsx("div",{className:"w-full",children:s.jsx(PU,{variant:"primary"})}),s.jsx(xpe,{selectedMode:C,onModeChange:ae}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(X,{className:"text-sm font-medium text-muted-foreground",children:"Platforms"}),s.jsxs("span",{className:"text-xs text-muted-foreground",children:[O.length," selected"]})]}),$e.length===0?s.jsxs("div",{className:"rounded-lg border border-dashed border-border p-4 text-center",children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:"No social accounts connected."}),s.jsx(z,{variant:"link",size:"sm",onClick:()=>t("/dashboard/settings"),className:"mt-1",children:"Connect accounts in Settings →"})]}):s.jsx("div",{className:"flex flex-wrap gap-2",children:Pme.map(ee=>{var aa;const Me=$e.includes(ee.id),xt=O.includes(ee.id),Ke=(ee.id==="facebook"||ee.id==="instagram")&&Me&&!l,Xe=()=>{if(!ee.comingSoon){if(!Me){Yt({title:"Account Not Connected",description:`Please connect your ${ee.name} account in Settings to publish to ${ee.name}.`});return}xt?O.length>1&&D(Ur=>Ur.filter(Gs=>Gs!==ee.id)):D(Ur=>[...Ur,ee.id])}},Rt=(aa=bp[ee.id])==null?void 0:aa.icon,Mt=document.documentElement.classList.contains("dark"),Li=ee.id==="threads"&&Mt?"#FFFFFF":ee.brandColor;return s.jsxs("button",{onClick:Xe,disabled:ee.comingSoon,className:K("flex items-center gap-2 rounded-lg px-4 py-2.5 text-sm font-medium transition-all",(!Me||ee.comingSoon)&&"opacity-60 cursor-pointer",Ke&&"border-2 border-warning/50",xt&&Me&&!ee.comingSoon?"bg-primary text-primary-foreground shadow-md":Me&&!ee.comingSoon?"bg-muted text-muted-foreground hover:bg-muted/80":"bg-muted/50 text-muted-foreground"),children:[Rt?s.jsx(Rt,{className:"h-4 w-4"}):s.jsx("div",{className:"h-2.5 w-2.5 rounded-full",style:{background:ee.gradient||Li}}),ee.name,ee.comingSoon&&s.jsx("span",{className:"text-[10px]",children:"(coming soon)"}),!Me&&!ee.comingSoon&&s.jsx("span",{className:"text-[10px]",children:"(not connected)"}),Ke&&s.jsx("span",{className:"text-[10px] text-warning",children:"(select page)"})]},ee.id)})}),O.map(ee=>{const Me=i(ee);if(Me.length<2)return null;const xt=o(ee),Ke=$[ee]||(xt==null?void 0:xt.id)||Me[0].id,Xe=bp[ee];return s.jsxs("div",{className:"rounded-lg border border-border bg-muted/20 p-3",children:[s.jsxs(X,{className:"text-xs font-medium text-muted-foreground",children:["Post to which ",(Xe==null?void 0:Xe.displayName)||ee," account?"]}),s.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:Me.map(Rt=>{const Mt=Rt.id===Ke,Zl=Rt.label||Rt.profile_name||Rt.account_name||"Account";return s.jsxs("button",{type:"button",onClick:()=>R(Li=>
862({...Li,[ee]:Rt.id})),className:K("rounded-md px-3 py-1.5 text-xs font-medium transition-all",Mt?"bg-primary text-primary-foreground shadow-sm":"bg-muted text-muted-foreground hover:bg-muted/80"),children:[Zl,Rt.is_default&&s.jsx("span",{className:"ml-1 opacity-70",children:"(default)"})]},Rt.id)})})]},`account-picker-${ee}`)}),O.some(ee=>(ee==="facebook"||ee==="instagram")&&!l)&&s.jsxs("div",{className:"mt-2 flex items-center gap-2 rounded-lg border border-warning/30 bg-warning/5 p-3 text-sm text-warning",children:[s.jsx(Bs,{className:"h-4 w-4 flex-shrink-0"}),s.jsxs("span",{children:["Facebook/Instagram posting requires a Page to be selected."," ",s.jsx(z,{variant:"link",size:"sm",className:"h-auto p-0 text-warning underline",onClick:()=>t("/dashboard/settings"),children:"Select Page in Settings"})]})]})]}),C!=="scratch"&&s.jsxs("div",{className:"space-y-3",children:[s.jsx(X,{className:"text-sm font-medium text-muted-foreground",children:"Tone"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:Tme.map(ee=>s.jsx("button",{onClick:()=>P(ee.id),className:K("rounded-lg px-4 py-2 text-sm font-medium transition-all",I===ee.id?"bg-accent text-accent-foreground shadow-md":"bg-muted text-muted-foreground hover:bg-muted/80"),children:ee.name},ee.id))})]}),C!=="scratch"&&s.jsxs("div",{className:"space-y-3",children:[s.jsx(X,{className:"text-sm font-medium text-muted-foreground",children:"Goal"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:Ame.map(ee=>s.jsx("button",{onClick:()=>E(ee.id),className:K("rounded-lg px-4 py-2 text-sm font-medium transition-all",A===ee.id?"bg-success text-success-foreground shadow-md":"bg-muted text-muted-foreground hover:bg-muted/80"),children:ee.name},ee.id))})]}),C==="ai_prompt"&&s.jsxs("div",{className:"space-y-3",children:[s.jsx(X,{className:"text-sm font-medium text-muted-foreground",children:"Your Prompt"}),s.jsx(Nt,{placeholder:"e.g., Write a post announcing my new listing in downtown Seattle...",value:T,onChange:ee=>L(ee.target.value),className:"min-h-[100px] resize-none"})]}),C==="trendpulse"&&s.jsxs("div",{className:"space-y-3",children:[s.jsx(X,{className:"text-sm font-medium text-muted-foreground",children:"Additional Context (Optional)"}),s.jsx(Nt,{placeholder:"Add specific topics, keywords, or context to blend with the trend...",value:T,onChange:ee=>L(ee.target.value),className:"min-h-[80px] resize-none"})]}),C==="realtor"&&d==="realtor"&&s.jsx(bme,{templateData:gr,onTemplateDataChange:Tr}),C!=="scratch"&&C!=="realtor"&&s.jsxs("div",{className:"space-y-3",children:[s.jsx(X,{className:"text-sm font-medium text-muted-foreground",children:"Industry / Role (Optional)"}),s.jsx("input",{type:"text",placeholder:"e.g., Realtor, Barber, SaaS Founder, Author, Coach",value:Tt,onChange:ee=>Pr(ee.target.value),className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
862ing-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"})]}),s.jsxs(Db,{open:ye,onOpenChange:Ge,children:[s.jsx($b,{asChild:!0,children:s.jsxs("button",{className:"flex w-full items-center justify-between rounded-lg border border-border bg-muted/30 p-4 text-left transition-colors hover:bg-muted/50",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(yw,{className:"h-5 w-5 text-muted-foreground"}),s.jsxs("div",{children:[s.jsx("span",{className:"text-sm font-medium",children:"Add Media"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:qe.length>0?`${qe.length} item${qe.length>1?"s":""} attached`:O.includes("linkedin")?"Up to 9 images or 1 video":"Images, videos, or GIFs (optional)"})]})]}),s.jsx("span",{className:K("text-xs font-medium transition-colors",qe.length>0?"text-success":"text-muted-foreground"),children:qe.length>0?`✓ ${qe.length}`:ye?"−":"+"})]})}),s.jsx(Lb,{className:"pt-4",children:s.jsx(Lpe,{mediaItems:qe,onMediaChange:ln,disabled:oe||kn,maxItems:O.includes("linkedin")?9:10})})]}),C!=="scratch"&&s.jsxs(Db,{open:st,onOpenChange:Ie,children:[s.jsx($b,{asChild:!0,children:s.jsxs("button",{className:"flex w-full items-center justify-between rounded-lg border border-primary/30 bg-primary/5 p-4 text-left transition-colors hover:bg-primary/10",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(HE,{className:"h-5 w-5 text-primary"}),s.jsxs("div",{children:[s.jsx("span",{className:"text-sm font-medium",children:"AI Image"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Generate images from your post content"})]})]}),s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:st?"−":"+"})]})}),s.jsx(Lb,{className:"pt-4",children:s.jsx(yme,{postContent:ct(),onImagesGenerated:gY,disabled:oe||kn})})]}),s.jsx(Wr,{children:C==="trendpulse"&&s.jsx(fe.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},children:s.jsx(vpe,{selectedSource:B,onSourceChange:nt,isEnabled:!0,topicStates:G,onTopicTrendChange:Re,onGenerateVariations:Ye,onAIGenerateTrend:ee=>S(ee,d,f==null?void 0:f.name),allowedSources:bt,moduleLabel:f==null?void 0:f.name})})}),C!=="trendpulse"&&s.jsxs(z,{variant:C==="scratch"?"secondary":"hero",size:"lg",className:"w-full relative shadow-lg transition-all font-semibold tracking-wide",onClick:Zt,disabled:oe||C==="scratch",children:[oe?s.jsx(ce,{className:"mr-2 h-5 w-5 animate-spin text-orange-500"}):s.jsx(Up,{className:"mr-2 h-5 w-5 text-orange-500"}),s.jsx("span",{className:"[text-shadow:_0_0_1px_#f97316,_0_0_1px_#f97316] text-foreground font-bold",children:vY()})]}),C==="trendpulse"&&s.jsx("p",{className:"text-xs text-muted-foreground text-center rounded-lg border border-dashed border-border p-3 bg-muted/30",children:'💡 Click "Generate" on any topic card above to create 3 post variations for that trend.'}),C==="scratch"&&s.jsx("p",{className:"text-xs text-muted-foreground text-center",children:"Type directly in the editor on the right. No AI generation needed."})]}),s.jsxs(fe.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{duration:.4,delay:.1},className:"space-y-4 rounded-2xl border border-border bg-card p-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(X,{className:"text-sm font-medium text-muted-foreground",children:C==="scratch"?"Your Post":re?"Post Variations":"Generated Post"}),Ot&&s.jsxs("div",{className:"flex gap-2",children:[s.jsx(z,{variant:"ghost",size:"sm",onClick:zt,className:"h-8",children:He?s.jsx($t,{className:"h-4 w-4 text-success"}):s.jsx(Rl,{className:"h-4 w-4"})}),s.jsxs(z,{variant:"outline",size:"sm",onClick:Gn,className:"h-8 gap-1.5 border-[#1877F2]/30 text-[#1877F2] hover:bg-[#1877F2]/10 hover:text-[#1877F2]",children:[lt?s.jsx($t,{className:"h-4 w-4 text-success"}):s.jsx(CU,{className:"h-4 w-4"}),s.jsx("span",{className:"hidden sm:inline",children:lt?"Copied!":"Copy for Facebook"})]})]})]}),re?s.jsx("div",{className:"space-y-4",children:s.jsxs(Ii,{value:J,onValueChange:ee=>Y(ee),children:[s.jsxs(Hs,{className:"grid w-full grid-cols-3",children:[s.jsxs(ht,{value:"fun",className:"gap-1.5",children:[s.jsx(hg,{className:"h-3.5 w-3.5"}),"Fun"]}),s.jsxs(ht,{value:"strategic",className:"gap-1.5",children:[s.jsx(yc,{className:"h-3.5 w-3.5"}),"Strategic"]}),s.jsxs(ht,{value:"engagement",className:"gap-1.5",children:[s.jsx(oJ,{className:"h-3.5 w-3.5"}),"Engagement"]})]}),s.jsx(ft,{value:"fun",className:"mt-4",children:s.jsx(Nt,{value:re.fun||"",onChange:ee=>q(Me=>Me?{...Me,fun:ee.target.value}:null),placeholder:"No fun variation generated",className:"min-h-[280px] resize-none rounded-xl border-border bg-muted/30 text-sm leading-relaxed"})}),s.jsx(ft,{value:"strategic",className:"mt-4",children:s.jsx(Nt,{value:re.strategic||"",onChange:ee=>q(Me=>Me?{...Me,strategic:ee.target.value}:null),placeholder:"No strategic variation generated",className:"min-h-[280px] resize-none rounded-xl border-border bg-muted/30 text-sm leading-relaxed"})}),s.jsx(ft,{value:"engagement",className:"mt-4",children:s.jsx(Nt,{value:re.engagement||"",onChange:ee=>q(Me=>Me?{...Me,engagement:ee.target.value}:null),placeholder:"No engagement variation generated",className:"min-h-[280px] resize-none rounded-xl border-border bg-muted/30 text-sm leading-relaxed"})})]})}):s.jsx("div",{className:"min-h-[300px]",children:le||C==="scratch"?s.jsx(Nt,{value:le,onChange:ee=>ue(ee.target.value),placeholder:C==="scratch"?"Start writing your post here...":"Your generated post will appear here",className:"min-h-[300px] resize-none rounded-xl border-border bg-muted/30 text-sm leading-relaxed"}):s.jsxs("div",{className:"flex h-[300px] flex-col items-center justify-center text-center rounded-xl border border-border bg-muted/30",children:[s.jsx(Up,{className:"mb-3 h-12 w-12 text-muted-foreground
862/30"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Your generated post will appear here"}),s.jsx("p",{className:"text-xs text-muted-foreground/60",children:C==="trendpulse"?`Generate 3 variations based on ${et.name}`:C==="ai_prompt"?"Enter your prompt and click Generate":"Switch to Write mode and type directly"})]})}),U.length>0&&s.jsxs("div",{className:"flex flex-col gap-2 rounded-xl border border-border bg-muted/20 p-3",children:[s.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"Suggested hashtags — click to add"}),s.jsx("div",{className:"flex flex-wrap gap-1.5",children:U.map(ee=>s.jsx("button",{type:"button",onClick:()=>{const Me=ct();if(!Me.includes(ee)){const Ke=Me.trimEnd()+`
863`+ee;re?q({...re,[J]:Ke}):ue(Ke)}Q(Ke=>Ke.filter(Xe=>Xe!==ee))},className:"inline-flex items-center rounded-full border border-primary/30 bg-primary/10 px-2.5 py-0.5 text-xs font-medium text-primary transition-colors hover:bg-primary/20 hover:border-primary/60 cursor-pointer select-none",children:ee},ee))})]}),Ot&&s.jsxs("div",{className:"flex flex-wrap gap-2",children:[C!=="scratch"&&s.jsxs(s.Fragment,{children:[s.jsxs(z,{variant:"outline",size:"sm",onClick:ee=>On("regenerate",ee),disabled:oe||kn,children:[oe?s.jsx(ce,{className:"mr-1.5 h-4 w-4 animate-spin text-primary"}):s.jsx(Bt,{className:"mr-1.5 h-4 w-4"}),"Regenerate"]}),s.jsxs(z,{variant:"outline",size:"sm",onClick:ee=>On("shorten",ee),disabled:oe||kn,children:[oe?s.jsx(ce,{className:"mr-1.5 h-4 w-4 animate-spin text-primary"}):s.jsx(gJ,{className:"mr-1.5 h-4 w-4"}),"Shorten"]}),s.jsxs(z,{variant:"outline",size:"sm",onClick:ee=>On("bolder",ee),disabled:oe||kn,children:[oe?s.jsx(ce,{className:"mr-1.5 h-4 w-4 animate-spin text-primary"}):s.jsx(Tn,{className:"mr-1.5 h-4 w-4"}),"Make Bolder"]})]}),s.jsxs(z,{variant:"secondary",size:"sm",onClick:jn,disabled:De||oe||kn,children:[De?s.jsx(ce,{className:"mr-1.5 h-4 w-4 animate-spin"}):s.jsx(ri,{className:"mr-1.5 h-4 w-4"}),"Save to Library"]}),s.jsxs(z,{variant:"accent",size:"sm",disabled:oe||kn,onClick:ee=>{var xt,Ke;ee.preventDefault();const Me=ct();t("/dashboard/schedule",{state:{schedulePost:{content:Me,platforms:O,mediaUrl:((xt=qe[0])==null?void 0:xt.url)||null,mediaType:((Ke=qe[0])==null?void 0:Ke.type)||null,mediaItems:qe.map(Xe=>({url:Xe.url,type:Xe.type})),industryRole:Tt.trim()||null}}})},children:[s.jsx($F,{className:"mr-1.5 h-4 w-4"}),"Schedule"]}),yY&&s.jsxs(z,{variant:"hero",size:"sm",onClick:ee=>c_(ee),disabled:kn||oe,children:[kn?s.jsx(ce,{className:"mr-1.5 h-4 w-4 animate-spin"}):s.jsx(ji,{className:"mr-1.5 h-4 w-4"}),"Post Now"]})]})]}),s.jsx(c0,{open:v,onOpenChange:b,onActivate:x})]})},rM=()=>{const e=Gt(),[t,n]=Ul(),{needsOnboarding:r,isLoading:a}=L8(),{currentVertical:i,isVerticalReady:o}=Fa();A2(o?i??void 0:void 0);const[l,c]=g.useState(!1);g.useEffect(()=>{if(t.get("payment")==="success"){c(!0);const h=new URLSearchParams(t);h.delete("payment"),n(h,{replace:!0})}},[t,n]);const u=()=>{c(!1)};return a?s.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:s.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})}):s.jsxs(hr,{title:"PostPRO",description:"Generate scroll-stopping social media content with AI",children:[s.jsx(ar,{title:"PostPRO – AI Content Generator | SociePRO AI",description:"Generate scroll-stopping social media posts with AI. Create engaging content for LinkedIn and Facebook in seconds.",keywords:"AI post generator, social media content creator, AI writing tool, LinkedIn content generator",canonicalUrl:"https://sociepro.ai/dashboard",jsonLd:Jw("PostPRO","AI-powered social media content generation")}),s.jsx(Wr,{children:l&&s.jsxs(fe.div,{initial:{opacity:0,y:-20,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-20,scale:.95},transition:{type:"spring",duration:.5},className:"mb-6 relative overflow-hidden rounded-xl border border-[hsl(106_54%_87%/0.3)] bg-gradient-to-r from-[hsl(106_54%_87%/0.15)] via-[hsl(106_54%_87%/0.1)] to-[hsl(28_100%_86%/0.1)] p-6",children:[s.jsx("div",{className:"absolute -top-10 -right-10 h-40 w-40 rounded-full bg-[hsl(106_54%_87%/0.1)] blur-3xl"}),s.jsx("div",{className:"absolute -bottom-10 -left-10 h-32 w-32 rounded-full bg-[hsl(28_100%_86%/0.1)] blur-3xl"}),s.jsxs("div",{className:"relative flex items-start justify-between gap-4",children:[s.jsxs("div",{className:"flex items-start gap-4",children:[s.jsx("div",{className:"flex h-12 w-12 shrink-0 items-center justify-center rounded-full bg-[hsl(106_54%_87%/0.2)]",children:s.jsx(hg,{className:"h-6 w-6 text-[hsl(106_54%_87%)]"})}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-semibold text-foreground",children:"🎉 Your SociePRO system is now live!"}),s.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Your automated marketing infrastru
863cture is ready. Let's get you started."}),s.jsxs("div",{className:"mt-4 flex flex-wrap gap-3",children:[s.jsxs(z,{size:"sm",className:"bg-[hsl(106_54%_87%)] text-[hsl(0_0%_6%)] hover:bg-[hsl(106_54%_80%)]",onClick:()=>e("/onboarding"),children:[s.jsx(db,{className:"mr-2 h-4 w-4"}),"Activate Industry Module"]}),s.jsxs(z,{size:"sm",variant:"outline",className:"border-[hsl(106_54%_87%/0.3)] hover:bg-[hsl(106_54%_87%/0.1)]",onClick:u,children:[s.jsx(Se,{className:"mr-2 h-4 w-4"}),"Generate First Posts"]})]})]})]}),s.jsx("button",{onClick:u,className:"shrink-0 rounded-lg p-1.5 text-muted-foreground hover:bg-muted hover:text-foreground transition-colors","aria-label":"Dismiss banner",children:s.jsx(Br,{className:"h-5 w-5"})})]})]})}),s.jsx(Ome,{})]})};function ot(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function xa(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function dt(e,t){const n=ot(e);return isNaN(t)?xa(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function ea(e,t){const n=ot(e);if(isNaN(t))return xa(e,NaN);if(!t)return n;const r=n.getDate(),a=xa(e,n.getTime());a.setMonth(n.getMonth()+t+1,0);const i=a.getDate();return r>=i?a:(n.setFullYear(a.getFullYear(),a.getMonth(),r),n)}const G2=6048e5,Rme=864e5,TU=6e4,AU=36e5;let Ime={};function Yh(){return Ime}function is(e,t){var l,c,u,h;const n=Yh(),r=(t==null?void 0:t.weekStartsOn)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((h=(u=n.locale)==null?void 0:u.options)==null?void 0:h.weekStartsOn)??0,a=ot(e),i=a.getDay(),o=(i<r?7:0)+i-r;return a.setDate(a.getDate()-o),a.setHours(0,0,0,0),a}function iu(e){return is(e,{weekStartsOn:1})}function EU(e){const t=ot(e),n=t.getFullYear(),r=xa(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const a=iu(r),i=xa(e,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);const o=iu(i);return t.getTime()>=a.getTime()?n+1:t.getTime()>=o.getTime()?n:n-1}function va(e){const t=ot(e);return t.setHours(0,0,0,0),t}function Hb(e){const t=ot(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function di(e,t){const n=va(e),r=va(t),a=+n-Hb(n),i=+r-Hb(r);return Math.round((a-i)/Rme)}function Mme(e){const t=EU(e),n=xa(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),iu(n)}function fr(e,t){const n=t*7;return dt(e,n)}function Dme(e,t){return ea(e,t*12)}function $me(e){let t;return e.forEach(function(n){const r=ot(n);(t===void 0||t<r||isNaN(Number(r)))&&(t=r)}),t||new Date(NaN)}function Lme(e){let t;return e.forEach(n=>{const r=ot(n);(!t||t>r||isNaN(+r))&&(t=r)}),t||new Date(NaN)}function Fme(e){return xa(e,Date.now())}function $r(e,t){const n=va(e),r=va(t);return+n==+r}function Y2(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Bme(e){if(!Y2(e)&&typeof e!="number")return!1;const t=ot(e);return!isNaN(Number(t))}function pm(e,t){const n=ot(e),r=ot(t),a=n.getFullYear()-r.getFullYear(),i=n.getMonth()-r.getMonth();return a*12+i}function Wme(e,t,n){const r=is(e,n),a=is(t,n),i=+r-Hb(r),o=+a-Hb(a);return Math.round((i-o)/G2)}function Ag(e){const t=ot(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function qme(e,t){const n=ot(e.start),r=ot(e.end);let a=+n>+r;const i=a?+n:+r,o=a?r:n;o.setHours(0,0,0,0);let l=1;const c=[];for(;+o<=i;)c.push(ot(o)),o.setDate(o.getDate()+l),o.setHours(0,0,0,0);return a?c.reverse():c}function Lr(e){const t=ot(e);return t.setDate(1),t.setHours(0,0,0,0),t}function OU(e){const t=ot(e),n=xa(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function K2(e,t){var l,c,u,h;const n=Yh(),r=(t==null?void 0:t.weekStartsOn)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((h=(u=n.locale)==null?void 0:u.options)==null?void 0:h.weekStartsOn)??0,a=ot(e),i=a.getDay(),o=(i<r?-7:0)+6-(i-r);return a.setDate(a.getDate()+o),a.setHours(23,59,59,999),a}function RU(e){return K2(e,{weekStartsOn:1}
vendor: 13,791 bytes, line 863
863)}const Ume={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},zme=(e,t,n)=>{let r;const a=Ume[e];return typeof a=="string"?r=a:t===1?r=a.one:r=a.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function P1(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Hme={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Vme={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Gme={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Yme={date:P1({formats:Hme,defaultWidth:"full"}),time:P1({formats:Vme,defaultWidth:"full"}),dateTime:P1({formats:Gme,defaultWidth:"full"})},Kme={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Xme=(e,t,n,r)=>Kme[e];function Cf(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let a;if(r==="formatting"&&e.formattingValues){const o=e.defaultFormattingWidth||e.defaultWidth,l=n!=null&&n.width?String(n.width):o;a=e.formattingValues[l]||e.formattingValues[o]}else{const o=e.defaultWidth,l=n!=null&&n.width?String(n.width):e.defaultWidth;a=e.values[l]||e.values[o]}const i=e.argumentCallback?e.argumentCallback(t):t;return a[i]}}const Qme={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Jme={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Zme={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},ege={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},tge={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},nge={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},rge=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},age={ordinalNumber:rge,era:Cf({values:Qme,defaultWidth:"wide"}),quarter:Cf({values:Jme,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Cf({values:Zme,defaultWidth:"wide"}),day:Cf({values:ege,defaultWidth:"wide"}),dayPeriod:Cf({values:tge,defaultWidth:"wide",formattingValues:nge,defaultFormattingWidth:"wide"})};function Pf(e){return(t,n={})=>{const r=n.width,a=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(a);if(!i)return null;const o=i[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?ige(l,d=>d.test(o)):sge(l,d=>d.test(o));let u;u=e.valueCallback?e.valueCallback(c):c,u=n.valueCallback?n.valueCallback(u):u;const h=t.slice(o.length);return{value:u,rest:h}}}function sge(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function ige(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function oge(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const a=r[0],i=t.match(e.parsePattern);if(!i)return null;let o=e.valueCallback?e.valueCallback(i[0]):i[0];o=n.valueCallback?n.valueCallback(o):o;const l=t.slice(a.length);return{value:o,rest:l}}}const lge=/^(\d+)(th|st|nd|rd)?/i,cge=/\d+/i,uge={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},dge={any:[/^b/i,/^(a|c)/i]},hge={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},fge={any:[/1/i,/2/i,/3/i,/4/i]},pge={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},mge={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},gge={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},yge={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},vge={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},bge={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},xge={ordinalNumber:oge({matchPattern:lge,parsePattern:cge,valueCallback:e=>parseInt(e,10)}),era:Pf({matchPatterns:uge,defaultMatchWidth:"wide",parsePatterns:dge,defaultParseWidth:"any"}),quarter:Pf({matchPatterns:hge,defaultMatchWidth:"wide",parsePatterns:fge,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Pf({matchPatterns:pge,defaultMatchWidth:"wide",parsePatterns:mge,defaultParseWidth:"any"}),day:Pf({matchPatterns:gge,defaultMatchWidth:"wide",parsePatterns:yge,defaultParseWidth:"any"}),dayPeriod:Pf({matchPatterns:vge,defaultMatchWidth:"any",parsePatterns:bge,defaultParseWidth:"any"})},IU={code:"en-US",formatDistance:zme,formatLong:Yme,formatRelative:Xme,localize:age,match:xge,options:{weekStartsOn:0,firstWeekContainsDate:1}};function wge(e){const t=ot(e);return di(t,OU(t))+1}function MU(e){const t=ot(e),n=+iu(t)-+Mme(t);return Math.round(n/G2)+1}function DU(e,t){var h,d,f,p;const n=ot(e),r=n.getFullYear(),a=Yh(),i=(t==null?void 0:t.firstWeekContainsDate)??((d=(h=t==null?void 0:t.locale)==null?void 0:h.options)==null?void 0:d.firstWeekContainsDate)??a.firstWeekContainsDate??((p=(f=a.locale)==null?void 0:f.options)==null?void 0:p.firstWeekContainsDate)??1,o=xa(e,0);o.setFullYear(r+1,0,i),o.setHours(0,0,0,0);const l=is(o,t),c=xa(e,0);c.setFullYear(r,0,i),c.setHours(0,0,0,0);const u=is(c,t);return n.getTime()>=l.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1}function _ge(e,t){var l,c,u,h;const n=Yh(),r=(t==null?void 0:t.firstWeekContainsDate)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.firstWeekContainsDate)??n.firstWeekContainsDate??((h=(u=n.locale)==null?void 0:u.options)==null?void 0:h.firstWeekContainsDate)??1,a=DU(e,t),i=xa(e,0);return i.setFullYear(a,0,r),i.setHours(0,0,0,0),is(i,t)}function $U(e,t){const n=ot(e),r=+is(n,t)-+_ge(n,t);return Math.round(r/G2)+1}function Ft(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Wo={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Ft(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Ft(n+1,2)},d(e,t){return Ft(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Ft(e.getHours()%12||12,t.length)},H(e,t){return Ft(e.getHours(),t.length)},m(e,t){return Ft(e.getMinutes(),t.length)},s(e,t){return Ft(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),a=Math.trunc(r*Math.pow(10,n-3));return Ft(a,t.length)}},Iu={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},aM={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),a=r>0?r:1-r;return n.ordinalNumber(a,{unit:"year"})}return Wo.y(e,t)},Y:function(e,t,n,r){const a=DU(e,r),i=a>0?a:1-a;if(t==="YY"){const o=i%100;return Ft(o,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):Ft(i,t.length)},R:function(e,t){const n=EU(e);return Ft(n,t.length)},u:function(e,t){const n=e.getFullYear();return Ft(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Ft(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Ft(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Wo.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Ft(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const a=$U(e,r);return t==="wo"?n.ordinalNumber(a,{unit:"week"}):Ft(a,t.length)},I:function(e,t,n){const r=MU(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Ft(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Wo.d(e,t)},D:function(e,t,n){const r=wge(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Ft(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const a=e.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return Ft(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const a=e.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return Ft(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),a=r===0?7:r;switch(t){case"i":return String(a);case"ii":return Ft(a,t.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const a=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let a;switch(r===12?a=Iu.noon:r===0?a=Iu.midnight:a=r/12>
vendor: 4,390 bytes, line 863
863=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let a;switch(r>=17?a=Iu.evening:r>=12?a=Iu.afternoon:r>=4?a=Iu.morning:a=Iu.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Wo.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Wo.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Ft(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Ft(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Wo.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Wo.s(e,t)},S:function(e,t){return Wo.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return iM(r);case"XXXX":case"XX":return cc(r);case"XXXXX":case"XXX":default:return cc(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return iM(r);case"xxxx":case"xx":return cc(r);case"xxxxx":case"xxx":default:return cc(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+sM(r,":");case"OOOO":default:return"GMT"+cc(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+sM(r,":");case"zzzz":default:return"GMT"+cc(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return Ft(r,t.length)},T:function(e,t,n){const r=e.getTime();return Ft(r,t.length)}};function sM(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),a=Math.trunc(r/60),i=r%60;return i===0?n+String(a):n+String(a)+t+Ft(i,2)}function iM(e,t){return e%60===0?(e>0?"-":"+")+Ft(Math.abs(e)/60,2):cc(e,t)}function cc(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),a=Ft(Math.trunc(r/60),2),i=Ft(r%60,2);return n+a+t+i}const oM=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},LU=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},kge=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return oM(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",oM(r,t)).replace("{{time}}",LU(a,t))},jge={p:LU,P:kge},Sge=/^D+$/,Nge=/^Y+$/,Cge=["D","DD","YY","YYYY"];function Pge(e){return Sge.test(e)}function Tge(e){return Nge.test(e)}function Age(e,t,n){const r=Ege(e,t,n);if(console.warn(r),Cge.includes(e))throw new RangeError(r)}function Ege(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Oge=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Rge=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Ige=/^'([^]*?)'?$/,Mge=/''/g,Dge=/[a-zA-Z]/;function ge(e,t,n){var h,d,f,p,y,m,v,b;const r=Yh(),a=(n==null?void 0:n.locale)??r.locale??IU,i=(n==null?void 0:n.firstWeekContainsDate)??((d=(h=n==null?void 0:n.locale)==null?void 0:h.options)==null?void 0:d.firstWeekContainsDate)??r.firstWeekContainsDate??((p=(f=r.locale)==null?void 0:f.options)==null?void 0:p.firstWeekContainsDate)??1,o=(n==null?void 0:n.weekStartsOn)??((m=(y=n==null?void 0:n.locale)==null?void 0:y.options)==null?void 0:m.weekStartsOn)??r.weekStartsOn??((b=(v=r.locale)==null?void 0:v.options)==null?void 0:b.weekStartsOn)??0,l=ot(e);
vendor: 9,194 bytes, line 863
863if(!Bme(l))throw new RangeError("Invalid time value");let c=t.match(Rge).map(x=>{const w=x[0];if(w==="p"||w==="P"){const _=jge[w];return _(x,a.formatLong)}return x}).join("").match(Oge).map(x=>{if(x==="''")return{isToken:!1,value:"'"};const w=x[0];if(w==="'")return{isToken:!1,value:$ge(x)};if(aM[w])return{isToken:!0,value:x};if(w.match(Dge))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");return{isToken:!1,value:x}});a.localize.preprocessor&&(c=a.localize.preprocessor(l,c));const u={firstWeekContainsDate:i,weekStartsOn:o,locale:a};return c.map(x=>{if(!x.isToken)return x.value;const w=x.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&Tge(w)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&Pge(w))&&Age(w,t,String(e));const _=aM[w[0]];return _(l,w,a.localize,u)}).join("")}function $ge(e){const t=e.match(Ige);return t?t[1].replace(Mge,"'"):e}function Lge(e){return ot(e).getDay()}function Fge(e){const t=ot(e),n=t.getFullYear(),r=t.getMonth(),a=xa(e,0);return a.setFullYear(n,r+1,0),a.setHours(0,0,0,0),a.getDate()}function Bge(e){return Math.trunc(+ot(e)/1e3)}function Wge(e){const t=ot(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(0,0,0,0),t}function qge(e,t){return Wme(Wge(e),Lr(e),t)+1}function mm(e,t){const n=ot(e),r=ot(t);return n.getTime()>r.getTime()}function Nl(e,t){const n=ot(e),r=ot(t);return+n<+r}function lM(e,t,n){var d,f,p,y;const r=Yh(),a=(n==null?void 0:n.weekStartsOn)??((f=(d=n==null?void 0:n.locale)==null?void 0:d.options)==null?void 0:f.weekStartsOn)??r.weekStartsOn??((y=(p=r.locale)==null?void 0:p.options)==null?void 0:y.weekStartsOn)??0,i=ot(e),o=i.getDay(),c=(t%7+7)%7,u=7-a,h=t<0||t>6?t-(o+u)%7:(c+u)%7-(o+u)%7;return dt(i,h)}function X2(e,t){const n=ot(e),r=ot(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function Uge(e,t){const n=ot(e),r=ot(t);return n.getFullYear()===r.getFullYear()}function FU(e){return $r(e,Fme(e))}function T1(e,t){return dt(e,-t)}function BU(e,t){let n=t-Lge(e);return n<=0&&(n+=7),dt(e,n)}function Ka(e,t){const r=Gge(e);let a;if(r.date){const c=Yge(r.date,2);a=Kge(c.restDateString,c.year)}if(!a||isNaN(a.getTime()))return new Date(NaN);const i=a.getTime();let o=0,l;if(r.time&&(o=Xge(r.time),isNaN(o)))return new Date(NaN);if(r.timezone){if(l=Qge(r.timezone),isNaN(l))return new Date(NaN)}else{const c=new Date(i+o),u=new Date(0);return u.setFullYear(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()),u.setHours(c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),c.getUTCMilliseconds()),u}return new Date(i+o+l)}const zy={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},zge=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Hge=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Vge=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Gge(e){const t={},n=e.split(zy.dateTimeDelimiter);let r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],zy.timeZoneDelimiter.test(t.date)&&(t.date=e.split(zy.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){const a=zy.timezone.exec(r);a?(t.time=r.replace(a[1],""),t.timezone=a[1]):t.time=r}return t}function Yge(e,t){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};const a=r[1]?parseInt(r[1]):null,i=r[2]?parseInt(r[2]):null;return{year:i===null?a:i*100,restDateString:e.slice((r[1]||r[2]).length)}}function Kge(e,t){if(t===null)return new Date(NaN);const n=e.match(zge);if(!n)return new Date(NaN);const r=!!n[4],a=Tf(n[1]),i=Tf(n[2])-1,o=Tf(n[3]),l=Tf(n[4]),c=Tf(n[5])-1;if(r)return nye(t,l,c)?Jge(t,l,c):new Date(NaN);{const u=new Date(0);return!eye(t,i,o)||!tye(t,a)?new Date(NaN):(u.setUTCFullYear(t,i,Math.max(a,o)),u)}}function Tf(e){return e?parseInt(e):1}function Xge(e){const t=e.match(Hge);if(!t)return NaN;const n=A1(t[1]),r=A1(t[2]),a=A1(t[3]);return rye(n,r,a)?n*AU+r*TU+a*1e3:NaN}function A1(e){return e&&parseFloat(e.replace(",","."))||0}function Qge(e){if(e==="Z")return 0;const t=e.match(Vge);if(!t)return 0;const n=t[1]==="+"?-1:1,r=parseInt(t[2]),a=t[3]&&parseInt(t[3])||0;return aye(r,a)?n*(r*AU+a*TU):NaN}function Jge(e,t,n){const r=new Date(0);r.setUTCFullYear(e,0,4);const a=r.getUTCDay()||7,i=(t-1)*7+n+1-a;return r.setUTCDate(r.getUTCDate()+i),r}const Zge=[31,null,31,30,31,30,31,31,30,31,30,31];function WU(e){return e%400===0||e%4===0&&e%100!==0}function eye(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(Zge[t]||(WU(e)?29:28))}function tye(e,t){return t>=1&&t<=(WU(e)?366:365)}function nye(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function rye(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function aye(e,t){return t>=0&&t<=59}function E1(e,t){const n=ot(e),r=n.getFullYear(),a=n.getDate(),i=xa(e,0);i.setFullYear(r,t,15),i.setHours(0,0,0,0);const o=Fge(i);return n.setMonth(t,Math.min(a,o)),n}function cM(e,t){const n=ot(e);return isNaN(+n)?xa(e,NaN):(n.setFullYear(t),n)}function sye(e,t){return fr(e,-t)}var u0="Popover",[qU,vHe]=Hn(u0,[Wl]),Eg=Wl(),[iye,Yl]=qU(u0),UU=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:a,onOpenChange:i,modal:o=!1}=e,l=Eg(t),c=g.useRef(null),[u,h]=g.useState(!1),[d,f]=ba({prop:r,defaultProp:a??!1,onChange:i,caller:u0});return s.jsx(Nw,{...l,children:s.jsx(iye,{scope:t,contentId:Oa(),triggerRef:c,open:d,onOpenChange:f,onOpenToggle:g.useCallback(()=>f(p=>!p),[f]),hasCustomAnchor:u,onCustomAnchorAdd:g.useCallback(()=>h(!0),[]),onCustomAnchorRemove:g.useCallback(()=>h(!1),[]),modal:o,children:n})})};UU.displayName=u0;var zU="PopoverAnchor",oye=g.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,a=Yl(zU,n),i=Eg(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:l}=a;return g.useEffect(()=>(o(),()=>l()),[o,l]),s.jsx(yg,{...i,...r,ref:t})});oye.displayName=zU;var HU="PopoverTrigger",VU=g.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,a=Yl(HU,n),i=Eg(n),o=Fe(t,a.triggerRef),l=s.jsx(we.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":QU(a.open),...r,ref:o,onClick:de(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?l:s.jsx(yg,{asChild:!0,...i,children:l})});VU.displayName=HU;var Q2="PopoverPortal",[lye,cye]=qU(Q2,{forceMount:void 0}),GU=e=>{const{__scopePopover:t,forceMount:n,children:r,container:a}=e,i=Yl(Q2,t);return s.jsx(lye,{scope:t,forceMount:n,children:s.jsx(Vn,{present:n||i.open,children:s.jsx(Eh,{asChild:!0,container:a,children:r})})})};GU.displayName=Q2;var sh="PopoverContent",YU=g.forwardRef((e,t)=>{const n=cye(sh,e.__scopePopover),{forceMount:r=n.forceMount,...a}=e,i=Yl(sh,e.__scopePopover);return s.jsx(Vn,{present:r||i.open,children:i.modal?s.jsx(dye,{...a,ref:t}):s.jsx(hye,{...a,ref:t})})});YU.displayName=sh;var uye=Ol("PopoverContent.RemoveScroll"),dye=g.forwardRef((e,t)=>{const n=Yl(sh,e.__scopePopover),r=g.useRef(null),a=Fe(t,r),i=g.useRef(!1);return g.useEffect(()=>{const o=r.current;if(o)return Hw(o)},[]),s.jsx(jg,{as:uye,allowPinchZoom:!0,children:s.jsx(KU,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:de(e.onCloseAutoFocus,o=>{var l;o.preventDefault(),i.current||(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:de(e.onPointerDownOutside,o=>{const l=o.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,u=l.button===2||c;i.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:de(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1})})})}),hye=g.forwardRef((e,t)=>{const n=Yl(sh,e.__scopePopover),r=g.useRef(!1),a=g.useRef(!1);return s.jsx(KU,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,l;(o=e.onCloseAutoFocus)==null||o.call(e,i),i.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),i.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:i=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const o=i.target;((u=n.triggerRef.current)==null?void 0:u.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&a.current&&i.preventDefault()}})}),KU=g.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:o,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:h,...d}=e,f=Yl(sh,n),p=Eg(n);return Uw(),s.jsx(kg,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:i,children:s.jsx(mu,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:h,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1),children:s.jsx(Cw,{"data-state":QU(f.open),role:"dialog",id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),XU="PopoverClose",fye=g.forwardRef((e,t)=>
863{const{__scopePopover:n,...r}=e,a=Yl(XU,n);return s.jsx(we.button,{type:"button",...r,ref:t,onClick:de(e.onClick,()=>a.onOpenChange(!1))})});fye.displayName=XU;var pye="PopoverArrow",mye=g.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,a=Eg(n);return s.jsx(Pw,{...a,...r,ref:t})});mye.displayName=pye;function QU(e){return e?"open":"closed"}var gye=UU,yye=VU,vye=GU,JU=YU;const Og=gye,Rg=yye,Kh=g.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},a)=>s.jsx(vye,{children:s.jsx(JU,{ref:a,align:t,sideOffset:n,className:K("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));Kh.displayName=JU.displayName;var Ve=function(){return Ve=Object.assign||function(t){for(var n,r=1,a=arguments.length;r<a;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Ve.apply(this,arguments)};function bye(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n}function ZU(e,t,n){for(var r=0,a=t.length,i;r<a;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}function Ig(e){return e.mode==="multiple"}function Mg(e){return e.mode==="range"}function d0(e){return e.mode==="single"}var xye={root:"rdp",multiple_months:"rdp-multiple_months",with_weeknumber:"rdp-with_weeknumber",vhidden:"rdp-vhidden",button_reset:"rdp-button_reset",button:"rdp-button",caption:"rdp-caption",caption_start:"rdp-caption_start",caption_end:"rdp-caption_end",caption_between:"rdp-caption_between",caption_label:"rdp-caption_label",caption_dropdowns:"rdp-caption_dropdowns",dropdown:"rdp-dropdown",dropdown_month:"rdp-dropdown_month",dropdown_year:"rdp-dropdown_year",dropdown_icon:"rdp-dropdown_icon",months:"rdp-months",month:"rdp-month",table:"rdp-table",tbody:"rdp-tbody",tfoot:"rdp-tfoot",head:"rdp-head",head_row:"rdp-head_row",head_cell:"rdp-head_cell",nav:"rdp-nav",nav_button:"rdp-nav_button",nav_button_previous:"rdp-nav_button_previous",nav_button_next:"rdp-nav_button_next",nav_icon:"rdp-nav_icon",row:"rdp-row",weeknumber:"rdp-weeknumber",cell:"rdp-cell",day:"rdp-day",day_today:"rdp-day_today",day_outside:"rdp-day_outside",day_selected:"rdp-day_selected",day_disabled:"rdp-day_disabled",day_hidden:"rdp-day_hidden",day_range_start:"rdp-day_range_start",day_range_end:"rdp-day_range_end",day_range_middle:"rdp-day_range_middle"};function wye(e,t){return ge(e,"LLLL y",t)}function _ye(e,t){return ge(e,"d",t)}function kye(e,t){return ge(e,"LLLL",t)}function jye(e){return"".concat(e)}function Sye(e,t){return ge(e,"cccccc",t)}function Nye(e,t){return ge(e,"yyyy",t)}var Cye=Object.freeze({__proto__:null,formatCaption:wye,formatDay:_ye,formatMonthCaption:kye,formatWeekNumber:jye,formatWeekdayName:Sye,formatYearCaption:Nye}),Pye=function(e,t,n){return ge(e,"do MMMM (EEEE)",n)},Tye=function(){return"Month: "},Aye=function(){return"Go to next month"},Eye=function(){return"Go to previous month"},Oye=function(e,t){return ge(e,"cccc",t)},Rye=function(e){return"Week n. ".concat(e)},Iye=function(){return"Year: "},Mye=Object.freeze({__proto__:null,labelDay:Pye,labelMonthDropdown:Tye,labelNext:Aye,labelPrevious:Eye,labelWeekNumber:Rye,labelWeekday:Oye,labelYearDropdown:Iye});function Dye(){var e="buttons",t=xye,n=IU,r={},a={},i=1,o={},l=new Date;return{captionLayout:e,classNames:t,formatters:Cye,labels:Mye,locale:n,modifiersClassNames:r,modifiers:a,numberOfMonths:i,styles:o,today:l,mode:"default"}}function $ye(e){var t=e.fromYear,n=e.toYear,r=e.fromMonth,a=e.toMonth,i=e.fromDate,o=e.toDate;return r?i=Lr(r):t&&(i=new Date(t,0,1)),a?o=Ag(a):n&&(o=new Date(n,11,31)),{fromDate:i?va(i):void 0,toDate:o?va(o):void 0}}var ez=g.createContext(void 0);function Lye(e){var t,n=e.initialProps,r=Dye(),a=$ye(n),i=a.fromDate,o=a.toDate,l=(t=n.captionLayout)!==null&&t!==void 0?t:r.captionLayout;l!=="buttons"&&(!i||!o)&&(l="buttons");var c;(d0(n)||Ig(n)||Mg(n))&&(c=n.onSelect);var u=Ve(Ve(Ve({},r),n),{captionLayout:l,classNames:Ve(Ve({},r.classNames),n.classNames),components:Ve({}
863,n.components),formatters:Ve(Ve({},r.formatters),n.formatters),fromDate:i,labels:Ve(Ve({},r.labels),n.labels),mode:n.mode||r.mode,modifiers:Ve(Ve({},r.modifiers),n.modifiers),modifiersClassNames:Ve(Ve({},r.modifiersClassNames),n.modifiersClassNames),onSelect:c,styles:Ve(Ve({},r.styles),n.styles),toDate:o});return s.jsx(ez.Provider,{value:u,children:e.children})}function Jt(){var e=g.useContext(ez);if(!e)throw new Error("useDayPicker must be used within a DayPickerProvider.");return e}function tz(e){var t=Jt(),n=t.locale,r=t.classNames,a=t.styles,i=t.formatters.formatCaption;return s.jsx("div",{className:r.caption_label,style:a.caption_label,"aria-live":"polite",role:"presentation",id:e.id,children:i(e.displayMonth,{locale:n})})}function Fye(e){return s.jsx("svg",Ve({width:"8px",height:"8px",viewBox:"0 0 120 120","data-testid":"iconDropdown"},e,{children:s.jsx("path",{d:"M4.22182541,48.2218254 C8.44222828,44.0014225 15.2388494,43.9273804 19.5496459,47.9996989 L19.7781746,48.2218254 L60,88.443 L100.221825,48.2218254 C104.442228,44.0014225 111.238849,43.9273804 115.549646,47.9996989 L115.778175,48.2218254 C119.998577,52.4422283 120.07262,59.2388494 116.000301,63.5496459 L115.778175,63.7781746 L67.7781746,111.778175 C63.5577717,115.998577 56.7611506,116.07262 52.4503541,112.000301 L52.2218254,111.778175 L4.22182541,63.7781746 C-0.0739418023,59.4824074 -0.0739418023,52.5175926 4.22182541,48.2218254 Z",fill:"currentColor",fillRule:"nonzero"})}))}function nz(e){var t,n,r=e.onChange,a=e.value,i=e.children,o=e.caption,l=e.className,c=e.style,u=Jt(),h=(n=(t=u.components)===null||t===void 0?void 0:t.IconDropdown)!==null&&n!==void 0?n:Fye;return s.jsxs("div",{className:l,style:c,children:[s.jsx("span",{className:u.classNames.vhidden,children:e["aria-label"]}),s.jsx("select",{name:e.name,"aria-label":e["aria-label"],className:u.classNames.dropdown,style:u.styles.dropdown,value:a,onChange:r,children:i}),s.jsxs("div",{className:u.classNames.caption_label,style:u.styles.caption_label,"aria-hidden":"true",children:[o,s.jsx(h,{className:u.classNames.dropdown_icon,style:u.styles.dropdown_icon})]})]})}function Bye(e){var t,n=Jt(),r=n.fromDate,a=n.toDate,i=n.styles,o=n.locale,l=n.formatters.formatMonthCaption,c=n.classNames,u=n.components,h=n.labels.labelMonthDropdown;if(!r)return s.jsx(s.Fragment,{});if(!a)return s.jsx(s.Fragment,{});var d=[];if(Uge(r,a))for(var f=Lr(r),p=r.getMonth();p<=a.getMonth();p++)d.push(E1(f,p));else for(var f=Lr(new Date),p=0;p<=11;p++)d.push(E1(f,p));var y=function(v){var b=Number(v.target.value),x=E1(Lr(e.displayMonth),b);e.onChange(x)},m=(t=u==null?void 0:u.Dropdown)!==null&&t!==void 0?t:nz;return s.jsx(m,{name:"months","aria-label":h(),className:c.dropdown_month,style:i.dropdown_month,onChange:y,value:e.displayMonth.getMonth(),caption:l(e.displayMonth,{locale:o}),children:d.map(function(v){return s.jsx("option",{value:v.getMonth(),children:l(v,{locale:o})},v.getMonth())})})}function Wye(e){var t,n=e.displayMonth,r=Jt(),a=r.fromDate,i=r.toDate,o=r.locale,l=r.styles,c=r.classNames,u=r.components,h=r.formatters.formatYearCaption,d=r.labels.labelYearDropdown,f=[];if(!a)return s.jsx(s.Fragment,{});if(!i)return s.jsx(s.Fragment,{});for(var p=a.getFullYear(),y=i.getFullYear(),m=p;m<=y;m++)f.push(cM(OU(new Date),m));var v=function(x){var w=cM(Lr(n),Number(x.target.value));e.onChange(w)},b=(t=u==null?void 0:u.Dropdown)!==null&&t!==void 0?t:nz;return s.jsx(b,{name:"years","aria-label":d(),className:c.dropdown_year,style:l.dropdown_year,onChange:v,value:n.getFullYear(),caption:h(n,{locale:o}),children:f.map(function(x){return s.jsx("option",{value:x.getFullYear(),children:h(x,{locale:o})},x.getFullYear())})})}function qye(e,t){var n=g.useState(e),r=n[0],a=n[1],i=t===void 0?r:t;return[i,a]}function Uye(e){var t=e.month,n=e.defaultMonth,r=e.today,a=t||n||r||new Date,i=e.toDate,o=e.fromDate,l=e.numberOfMonths,c=l===void 0?1:l;if(i&&pm(i,a)<0){var u=-1*(c-1);a=ea(i,u)}return o&&pm(a,o)<0&&(a=o),Lr(a)}function zye(){var e=Jt(),t=Uye(e),n=qye(t,e.month),r=n[0],a=n[1],i=function(o){var l;if(!e.disableNavigation){var c=Lr(o);a(c),(l=e.onMonthChange)===null||l===void 0||l.call(e,c)}};return[r,i]}function Hye(e,t){for(var n=t.reverseMonths,r=t.numberOfMonths,a=Lr(e),i=Lr(ea(a,r)),o=pm(i,a),l=[],c=0;c<o;c++){var u=ea(a,c);l.push(u)}return n&&(l=l.reverse()),l}function Vye(e,t){if(!t.disableNavigation){var n=t.toDate,r=t.pagedNavigation,a=t.numberOfMonths,i=a===void 0?1:a,o=r?i:1,l=Lr(e);
863if(!n)return ea(l,o);var c=pm(n,e);if(!(c<i))return ea(l,o)}}function Gye(e,t){if(!t.disableNavigation){var n=t.fromDate,r=t.pagedNavigation,a=t.numberOfMonths,i=a===void 0?1:a,o=r?i:1,l=Lr(e);if(!n)return ea(l,-o);var c=pm(l,n);if(!(c<=0))return ea(l,-o)}}var rz=g.createContext(void 0);function Yye(e){var t=Jt(),n=zye(),r=n[0],a=n[1],i=Hye(r,t),o=Vye(r,t),l=Gye(r,t),c=function(d){return i.some(function(f){return X2(d,f)})},u=function(d,f){c(d)||(f&&Nl(d,f)?a(ea(d,1+t.numberOfMonths*-1)):a(d))},h={currentMonth:r,displayMonths:i,goToMonth:a,goToDate:u,previousMonth:l,nextMonth:o,isDateDisplayed:c};return s.jsx(rz.Provider,{value:h,children:e.children})}function Dg(){var e=g.useContext(rz);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}function uM(e){var t,n=Jt(),r=n.classNames,a=n.styles,i=n.components,o=Dg().goToMonth,l=function(h){o(ea(h,e.displayIndex?-e.displayIndex:0))},c=(t=i==null?void 0:i.CaptionLabel)!==null&&t!==void 0?t:tz,u=s.jsx(c,{id:e.id,displayMonth:e.displayMonth});return s.jsxs("div",{className:r.caption_dropdowns,style:a.caption_dropdowns,children:[s.jsx("div",{className:r.vhidden,children:u}),s.jsx(Bye,{onChange:l,displayMonth:e.displayMonth}),s.jsx(Wye,{onChange:l,displayMonth:e.displayMonth})]})}function Kye(e){return s.jsx("svg",Ve({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:s.jsx("path",{d:"M69.490332,3.34314575 C72.6145263,0.218951416 77.6798462,0.218951416 80.8040405,3.34314575 C83.8617626,6.40086786 83.9268205,11.3179931 80.9992143,14.4548388 L80.8040405,14.6568542 L35.461,60 L80.8040405,105.343146 C83.8617626,108.400868 83.9268205,113.317993 80.9992143,116.454839 L80.8040405,116.656854 C77.7463184,119.714576 72.8291931,119.779634 69.6923475,116.852028 L69.490332,116.656854 L18.490332,65.6568542 C15.4326099,62.5991321 15.367552,57.6820069 18.2951583,54.5451612 L18.490332,54.3431458 L69.490332,3.34314575 Z",fill:"currentColor",fillRule:"nonzero"})}))}function Xye(e){return s.jsx("svg",Ve({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:s.jsx("path",{d:"M49.8040405,3.34314575 C46.6798462,0.218951416 41.6145263,0.218951416 38.490332,3.34314575 C35.4326099,6.40086786 35.367552,11.3179931 38.2951583,14.4548388 L38.490332,14.6568542 L83.8333725,60 L38.490332,105.343146 C35.4326099,108.400868 35.367552,113.317993 38.2951583,116.454839 L38.490332,116.656854 C41.5480541,119.714576 46.4651794,119.779634 49.602025,116.852028 L49.8040405,116.656854 L100.804041,65.6568542 C103.861763,62.5991321 103.926821,57.6820069 100.999214,54.5451612 L100.804041,54.3431458 L49.8040405,3.34314575 Z",fill:"currentColor"})}))}var Vb=g.forwardRef(function(e,t){var n=Jt(),r=n.classNames,a=n.styles,i=[r.button_reset,r.button];e.className&&i.push(e.className);var o=i.join(" "),l=Ve(Ve({},a.button_reset),a.button);return e.style&&Object.assign(l,e.style),s.jsx("button",Ve({},e,{ref:t,type:"button",className:o,style:l}))});function Qye(e){var t,n,r=Jt(),a=r.dir,i=r.locale,o=r.classNames,l=r.styles,c=r.labels,u=c.labelPrevious,h=c.labelNext,d=r.components;if(!e.nextMonth&&!e.previousMonth)return s.jsx(s.Fragment,{});var f=u(e.previousMonth,{locale:i}),p=[o.nav_button,o.nav_button_previous].join(" "),y=h(e.nextMonth,{locale:i}),m=[o.nav_button,o.nav_button_next].join(" "),v=(t=d==null?void 0:d.IconRight)!==null&&t!==void 0?t:Xye,b=(n=d==null?void 0:d.IconLeft)!==null&&n!==void 0?n:Kye;return s.jsxs("div",{className:o.nav,style:l.nav,children:[!e.hidePrevious&&s.jsx(Vb,{name:"previous-month","aria-label":f,className:p,style:l.nav_button_previous,disabled:!e.previousMonth,onClick:e.onPreviousClick,children:a==="rtl"?s.jsx(v,{className:o.nav_icon,style:l.nav_icon}):s.jsx(b,{className:o.nav_icon,style:l.nav_icon})}),!e.hideNext&&s.jsx(Vb,{name:"next-month","aria-label":y,className:m,style:l.nav_button_next,disabled:!e.nextMonth,onClick:e.onNextClick,children:a==="rtl"?s.jsx(b,{className:o.nav_icon,style:l.nav_icon}):s.jsx(v,{className:o.nav_icon,style:l.nav_icon})})]})}function dM(e){var t=Jt().numberOfMonths,n=Dg(),r=n.previousMonth,a=n.nextMonth,i=n.goToMonth,o=n.displayMonths,l=o.findIndex(function(y){return X2(e.displayMonth,y)}),c=l===0,u=l===o.length-1,h=t>1&&(c||!u),d=t>1&&(u||!c),f=function(){r&&i(r)},p=function(){a&&i(a)};return s.jsx(Qye,{displayMonth:e.displayMonth,hideNext:h,hidePrevious:d,nextMonth:a,previousMonth:r,onPreviousClick:f,onNextClick:p})}function Jye(e){var t,n=Jt(),r=n.classNames,a=n.disableNavigation,i=n.styles,o=n.captionLayout,l=n.components,c=(t=l==null?void 0:l.CaptionLabel)!==null&&t!==void 0?t:tz,u;return a?u=s.jsx(c,{id:e.id,displayMonth:e.displayMonth}):o==="dropdown"?u=s.jsx(uM,{displayMonth:e.displayMonth,id:e.id}):o==="dropdown-buttons"?u=s.jsxs(s.Fragment,{children:[s.jsx(uM,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),s.jsx(dM,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}):u=s.jsxs(s.Fragment,{children:[s.jsx(c,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),s.jsx(dM,{displayMonth:e.displayMonth,id:e.id})]}),s.jsx("div",{className:r.caption,style:i.caption,children:u})}function Zye(e){var t=Jt(),n=t.footer,r=t.styles,a=t.classNames.tfoot;return n?s.jsx("tfoot",{className:a,style:r.tfoot,children:s.jsx("tr",{children:s.jsx("td",{colSpan:8,children:n})})}):s.jsx(s.Fragment,{})}function eve(e,t,n){for(var r=n?iu(new Date):is(new Date,{locale:e,weekStartsOn:t}),a=[],i=0;i<7;i++){var o=dt(r,i);a.push(o)}return a}function tve(){var e=Jt(),t=e.classNames,n=e.styles,r=e.showWeekNumber,a=e.locale,i=e.weekStartsOn,o=e.ISOWeek,l=e.formatters.formatWeekdayName,c=e.labels.labelWeekday,u=eve(a,i,o);return s.jsxs("tr",{style:n.head_row,className:t.head_row,children:[r&&s.jsx("td",{style:n.head_cell,className:t.head_cell}),u.map(function(h,d){return s.jsx("th",{scope:"col",className:t.head_cell,style:n.head_cell,"aria-label":c(h,{locale:a}),children:l(h,{locale:a})},d)})]})}function nve(){var e,t=Jt(),n=t.classNames,r=t.styles,a=t.components,i=(e=a==null?void 0:a.HeadRow)!==null&&e!==void 0?e:tve;return s.jsx("thead",{style:r.head,className:n.head,children:s.jsx(i,{})})}function rve(e){var t=Jt(),n=t.locale,r=t.formatters.formatDay;return s.jsx(s.Fragment,{children:r(e.date,{locale:n})})}var J2=g.createContext(void 0);function ave(e){if(!Ig(e.initialProps)){var t={selected:void 0,modifiers:{disabled:[]}};return s.jsx(J2.Provider,{value:t,children:e.children})}return s.jsx(sve,{initialProps:e.initialProps,children:e.children})}function sve(e){var t=e.initialProps,n=e.children,r=t.selected,a=t.min,i=t.max,o=function(u,h,d){var f,p;(f=t.onDayClick)===null||f===void 0||f.call(t,u,h,d);var y=!!(h.selected&&a&&(r==null?void 0:r.length)===a);if(!y){var m=!!(!h.selected&&i&&(r==null?void 0:r.length)===i);if(!m){var v=r?ZU([],r):[];if(h.selected){var b=v.findIndex(function(x){return $r(u,x)});v.splice(b,1)}else v.push(u);(p=t.onSelect)===null||p===void 0||p.call(t,v,u,h,d)}}},l={disabled:[]};r&&l.disabled.push(function(u){var h=i&&r.length>i-1,d=r.some(function(f){return $r(f,u)});return!!(h&&!d)});var c={selected:r,onDayClick:o,modifiers:l};return s.jsx(J2.Provider,{value:c,children:n})}function Z2(){var e=g.useContext(J2);if(!e)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}function ive(e,t){var n=t||{},r=n.from,a=n.to;return r&&a?$r(a,e)&&$r(r,e)?void 0:$r(a,e)?{from:a,to:void 0}:$r(r,e)?void 0:mm(r,e)?{from:e,to:a}:{from:r,to:e}:a?mm(e,a)?{from:a,to:e}:{from:e,to:a}:r?Nl(e,r)?{from:e,to:r}:{from:r,to:e}:{from:e,to:void 0}}var eT=g.createContext(void 0);function ove(e){if(!Mg(e.initialProps)){var t={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return s.jsx(eT.Provider,{value:t,children:e.children})}return s.jsx(lve,{initialProps:e.initialProps,children:e.children})}function lve(e){var t=e.initialProps,n=e.children,r=t.selected,a=r||{},i=a.from,o=a.to,l=t.min,c=t.max,u=function(p,y,m){var v,b;(v=t.onDayClick)===null||v===void 0||v.call(t,p,y,m);var x=ive(p,r);(b=t.onSelect)===null||b===void 0||b.call(t,x,p,y,m)},h={range_start:[],range_end:[],range_middle:[],disabled:[]};if(i?(h.range_start=[i],o?(h.range_end=[o],$r(i,o)||(h.range_middle=[{after:i,before:o}])):h.range_end=[i]):o&&(h.range_start=[o],h.range_end=[o]),l&&(i&&!o&&h.disabled.push({after:T1(i,l-1),before:dt(i,l-1)}),i&&o&&h.disabled.push({after:i,before:dt(i,l-1)}),!i&&o&&h.disabled.push({after:T1(o,l-1),before:dt(o,l-1)})),c){if(i&&!o&&(h.disabled.push({before:dt(i,-c+1)}),h.disabled.push({after:dt(i,c-1)})),i&&o){var d=di(o,i)+1,f=c-d;h.disabled.push({before:T1(i,f)}),h.disabled.push({after:dt(o,f)})}!i&&o&&(h.disabled.push({before:dt(o,-c+1)}),h.disabled.push({after:dt(o,c-1)}))}return s.jsx(eT.Provider,{value:{selected:r,onDayClick:u,modifiers:h},children:n})}function tT(){var e=g.useContext(eT);if(!e)throw new Error("useSelectRange must be used within a SelectRangeProvider");return e}function Lv(e){return Array.isArray(e)?ZU([],e):e!==void 0?[e]:[]}function cve(e){var t={};return Object.entries(e).forEach(function(n){var r=n[0],a=n[1];t[r]=Lv(a)}),t}var Us;(function(e){e.Outside="outside",e.Disabled="disabled",e.Selected="selected",e.Hidden="hidden",e.Today="today",e.RangeStart="range_start",e.RangeEnd="range_end",e.RangeMiddle="range_middle"})(Us||(Us={}));var uve=Us.Selected,Ui=Us.Disabled,dve=Us.Hidden,hve=Us.Today,O1=Us.RangeEnd,R1=Us.RangeMiddle,I1=Us.RangeStart,fve=Us.Outside;function pve(e,t,n){var r,a=(r={},r[uve]=Lv(e.selected),r[Ui]=Lv(e.disabled),r[dve]=Lv(e.hidden),r[hve]=[e.today],r[O1]=[],r[R1]=[],r[I1]=[],r[fve]=[],r);return e.fromDate&&a[Ui].push({before:e.fromDate}),e.toDate&&a[Ui].push({after:e.toDate}
863),Ig(e)?a[Ui]=a[Ui].concat(t.modifiers[Ui]):Mg(e)&&(a[Ui]=a[Ui].concat(n.modifiers[Ui]),a[I1]=n.modifiers[I1],a[R1]=n.modifiers[R1],a[O1]=n.modifiers[O1]),a}var az=g.createContext(void 0);function mve(e){var t=Jt(),n=Z2(),r=tT(),a=pve(t,n,r),i=cve(t.modifiers),o=Ve(Ve({},a),i);return s.jsx(az.Provider,{value:o,children:e.children})}function sz(){var e=g.useContext(az);if(!e)throw new Error("useModifiers must be used within a ModifiersProvider");return e}function gve(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function yve(e){return!!(e&&typeof e=="object"&&"from"in e)}function vve(e){return!!(e&&typeof e=="object"&&"after"in e)}function bve(e){return!!(e&&typeof e=="object"&&"before"in e)}function xve(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function wve(e,t){var n,r=t.from,a=t.to;if(r&&a){var i=di(a,r)<0;i&&(n=[a,r],r=n[0],a=n[1]);var o=di(e,r)>=0&&di(a,e)>=0;return o}return a?$r(a,e):r?$r(r,e):!1}function _ve(e){return Y2(e)}function kve(e){return Array.isArray(e)&&e.every(Y2)}function jve(e,t){return t.some(function(n){if(typeof n=="boolean")return n;if(_ve(n))return $r(e,n);if(kve(n))return n.includes(e);if(yve(n))return wve(e,n);if(xve(n))return n.dayOfWeek.includes(e.getDay());if(gve(n)){var r=di(n.before,e),a=di(n.after,e),i=r>0,o=a<0,l=mm(n.before,n.after);return l?o&&i:i||o}return vve(n)?di(e,n.after)>0:bve(n)?di(n.before,e)>0:typeof n=="function"?n(e):!1})}function nT(e,t,n){var r=Object.keys(t).reduce(function(i,o){var l=t[o];return jve(e,l)&&i.push(o),i},[]),a={};return r.forEach(function(i){return a[i]=!0}),n&&!X2(e,n)&&(a.outside=!0),a}function Sve(e,t){for(var n=Lr(e[0]),r=Ag(e[e.length-1]),a,i,o=n;o<=r;){var l=nT(o,t),c=!l.disabled&&!l.hidden;if(!c){o=dt(o,1);continue}if(l.selected)return o;l.today&&!i&&(i=o),a||(a=o),o=dt(o,1)}return i||a}var Nve=365;function iz(e,t){var n=t.moveBy,r=t.direction,a=t.context,i=t.modifiers,o=t.retry,l=o===void 0?{count:0,lastFocused:e}:o,c=a.weekStartsOn,u=a.fromDate,h=a.toDate,d=a.locale,f={day:dt,week:fr,month:ea,year:Dme,startOfWeek:function(v){return a.ISOWeek?iu(v):is(v,{locale:d,weekStartsOn:c})},endOfWeek:function(v){return a.ISOWeek?RU(v):K2(v,{locale:d,weekStartsOn:c})}},p=f[n](e,r==="after"?1:-1);r==="before"&&u?p=$me([u,p]):r==="after"&&h&&(p=Lme([h,p]));var y=!0;if(i){var m=nT(p,i);y=!m.disabled&&!m.hidden}return y?p:l.count>Nve?l.lastFocused:iz(p,{moveBy:n,direction:r,context:a,modifiers:i,retry:Ve(Ve({},l),{count:l.count+1})})}var oz=g.createContext(void 0);function Cve(e){var t=Dg(),n=sz(),r=g.useState(),a=r[0],i=r[1],o=g.useState(),l=o[0],c=o[1],u=Sve(t.displayMonths,n),h=a??(l&&t.isDateDisplayed(l))?l:u,d=function(){c(a),i(void 0)},f=function(v){i(v)},p=Jt(),y=function(v,b){if(a){var x=iz(a,{moveBy:v,direction:b,context:p,modifiers:n});$r(a,x)||(t.goToDate(x,a),f(x))}},m={focusedDay:a,focusTarget:h,blur:d,focus:f,focusDayAfter:function(){return y("day","after")},focusDayBefore:function(){return y("day","before")},focusWeekAfter:function(){return y("week","after")},focusWeekBefore:function(){return y("week","before")},focusMonthBefore:function(){return y("month","before")},focusMonthAfter:function(){return y("month","after")},focusYearBefore:function(){return y("year","before")},focusYearAfter:function(){return y("year","after")},focusStartOfWeek:function(){return y("startOfWeek","before")},focusEndOfWeek:function(){return y("endOfWeek","after")}};return s.jsx(oz.Provider,{value:m,children:e.children})}function rT(){var e=g.useContext(oz);if(!e)throw new Error("useFocusContext must be used within a FocusProvider");return e}function Pve(e,t){var n=sz(),r=nT(e,n,t);return r}var aT=g.createContext(void 0);function Tve(e){if(!d0(e.initialProps)){var t={selected:void 0};return s.jsx(aT.Provider,{value:t,children:e.children})}return s.jsx(Ave,{initialProps:e.initialProps,children:e.children})}function Ave(e){var t=e.initialProps,n=e.children,r=function(i,o,l){var c,u,h;if((c=t.onDayClick)===null||c===void 0||c.call(t,i,o,l),o.selected&&!t.required){(u=t.onSelect)===null||u===void 0||u.call(t,void 0,i,o,l);return}(h=t.onSelect)===null||h===void 0||h.call(t,i,i,o,l)}
863,a={selected:t.selected,onDayClick:r};return s.jsx(aT.Provider,{value:a,children:n})}function lz(){var e=g.useContext(aT);if(!e)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return e}function Eve(e,t){var n=Jt(),r=lz(),a=Z2(),i=tT(),o=rT(),l=o.focusDayAfter,c=o.focusDayBefore,u=o.focusWeekAfter,h=o.focusWeekBefore,d=o.blur,f=o.focus,p=o.focusMonthBefore,y=o.focusMonthAfter,m=o.focusYearBefore,v=o.focusYearAfter,b=o.focusStartOfWeek,x=o.focusEndOfWeek,w=function(A){var E,T,L,B;d0(n)?(E=r.onDayClick)===null||E===void 0||E.call(r,e,t,A):Ig(n)?(T=a.onDayClick)===null||T===void 0||T.call(a,e,t,A):Mg(n)?(L=i.onDayClick)===null||L===void 0||L.call(i,e,t,A):(B=n.onDayClick)===null||B===void 0||B.call(n,e,t,A)},_=function(A){var E;f(e),(E=n.onDayFocus)===null||E===void 0||E.call(n,e,t,A)},k=function(A){var E;d(),(E=n.onDayBlur)===null||E===void 0||E.call(n,e,t,A)},j=function(A){var E;(E=n.onDayMouseEnter)===null||E===void 0||E.call(n,e,t,A)},S=function(A){var E;(E=n.onDayMouseLeave)===null||E===void 0||E.call(n,e,t,A)},N=function(A){var E;(E=n.onDayPointerEnter)===null||E===void 0||E.call(n,e,t,A)},C=function(A){var E;(E=n.onDayPointerLeave)===null||E===void 0||E.call(n,e,t,A)},M=function(A){var E;(E=n.onDayTouchCancel)===null||E===void 0||E.call(n,e,t,A)},O=function(A){var E;(E=n.onDayTouchEnd)===null||E===void 0||E.call(n,e,t,A)},D=function(A){var E;(E=n.onDayTouchMove)===null||E===void 0||E.call(n,e,t,A)},$=function(A){var E;(E=n.onDayTouchStart)===null||E===void 0||E.call(n,e,t,A)},R=function(A){var E;(E=n.onDayKeyUp)===null||E===void 0||E.call(n,e,t,A)},I=function(A){var E;switch(A.key){case"ArrowLeft":A.preventDefault(),A.stopPropagation(),n.dir==="rtl"?l():c();break;case"ArrowRight":A.preventDefault(),A.stopPropagation(),n.dir==="rtl"?c():l();break;case"ArrowDown":A.preventDefault(),A.stopPropagation(),u();break;case"ArrowUp":A.preventDefault(),A.stopPropagation(),h();break;case"PageUp":A.preventDefault(),A.stopPropagation(),A.shiftKey?m():p();break;case"PageDown":A.preventDefault(),A.stopPropagation(),A.shiftKey?v():y();break;case"Home":A.preventDefault(),A.stopPropagation(),b();break;case"End":A.preventDefault(),A.stopPropagation(),x();break}(E=n.onDayKeyDown)===null||E===void 0||E.call(n,e,t,A)},P={onClick:w,onFocus:_,onBlur:k,onKeyDown:I,onKeyUp:R,onMouseEnter:j,onMouseLeave:S,onPointerEnter:N,onPointerLeave:C,onTouchCancel:M,onTouchEnd:O,onTouchMove:D,onTouchStart:$};return P}function Ove(){var e=Jt(),t=lz(),n=Z2(),r=tT(),a=d0(e)?t.selected:Ig(e)?n.selected:Mg(e)?r.selected:void 0;return a}function Rve(e){return Object.values(Us).includes(e)}function Ive(e,t){var n=[e.classNames.day];return Object.keys(t).forEach(function(r){var a=e.modifiersClassNames[r];if(a)n.push(a);else if(Rve(r)){var i=e.classNames["day_".concat(r)];i&&n.push(i)}}),n}function Mve(e,t){var n=Ve({},e.styles.day);return Object.keys(t).forEach(function(r){var a;n=Ve(Ve({},n),(a=e.modifiersStyles)===null||a===void 0?void 0:a[r])}),n}function Dve(e,t,n){var r,a,i,o=Jt(),l=rT(),c=Pve(e,t),u=Eve(e,c),h=Ove(),d=!!(o.onDayCl
863ick||o.mode!=="default");g.useEffect(function(){var j;c.outside||l.focusedDay&&d&&$r(l.focusedDay,e)&&((j=n.current)===null||j===void 0||j.focus())},[l.focusedDay,e,n,d,c.outside]);var f=Ive(o,c).join(" "),p=Mve(o,c),y=!!(c.outside&&!o.showOutsideDays||c.hidden),m=(i=(a=o.components)===null||a===void 0?void 0:a.DayContent)!==null&&i!==void 0?i:rve,v=s.jsx(m,{date:e,displayMonth:t,activeModifiers:c}),b={style:p,className:f,children:v,role:"gridcell"},x=l.focusTarget&&$r(l.focusTarget,e)&&!c.outside,w=l.focusedDay&&$r(l.focusedDay,e),_=Ve(Ve(Ve({},b),(r={disabled:c.disabled,role:"gridcell"},r["aria-selected"]=c.selected,r.tabIndex=w||x?0:-1,r)),u),k={isButton:d,isHidden:y,activeModifiers:c,selectedDays:h,buttonProps:_,divProps:b};return k}function $ve(e){var t=g.useRef(null),n=Dve(e.date,e.displayMonth,t);return n.isHidden?s.jsx("div",{role:"gridcell"}):n.isButton?s.jsx(Vb,Ve({name:"day",ref:t},n.buttonProps)):s.jsx("div",Ve({},n.divProps))}function Lve(e){var t=e.number,n=e.dates,r=Jt(),a=r.onWeekNumberClick,i=r.styles,o=r.classNames,l=r.locale,c=r.labels.labelWeekNumber,u=r.formatters.formatWeekNumber,h=u(Number(t),{locale:l});if(!a)return s.jsx("span",{className:o.weeknumber,style:i.weeknumber,children:h});var d=c(Number(t),{locale:l}),f=function(p){a(t,n,p)};return s.jsx(Vb,{name:"week-number","aria-label":d,className:o.weeknumber,style:i.weeknumber,onClick:f,children:h})}function Fve(e){var t,n,r=Jt(),a=r.styles,i=r.classNames,o=r.showWeekNumber,l=r.components,c=(t=l==null?void 0:l.Day)!==null&&t!==void 0?t:$ve,u=(n=l==null?void 0:l.WeekNumber)!==null&&n!==void 0?n:Lve,h;return o&&(h=s.jsx("td",{className:i.cell,style:a.cell,children:s.jsx(u,{number:e.weekNumber,dates:e.dates})})),s.jsxs("tr",{className:i.row,style:a.row,children:[h,e.dates.map(function(d){return s.jsx("td",{className:i.cell,style:a.cell,role:"presentation",children:s.jsx(c,{displayMonth:e.displayMonth,date:d})},Bge(d))})]})}function hM(e,t,n){for(var r=n!=null&&n.ISOWeek?RU(t):K2(t,n),a=n!=null&&n.ISOWeek?iu(e):is(e,n),i=di(r,a),o=[],l=0;l<=i;l++)o.push(dt(a,l));var c=o.reduce(function(u,h){var d=n!=null&&n.ISOWeek?MU(h):$U(h,n),f=u.find(function(p){return p.weekNumber===d});return f?(f.dates.push(h),u):(u.push({weekNumber:d,dates:[h]}),u)},[]);return c}function Bve(e,t){var n=hM(Lr(e),Ag(e),t);if(t!=null&&t.useFixedWeeks){var r=qge(e,t);if(r<6){var a=n[n.length-1],i=a.dates[a.dates.length-1],o=fr(i,6-r),l=hM(fr(i,1),o,t);n.push.apply(n,l)}}return n}function Wve(e){var t,n,r,a=Jt(),i=a.locale,o=a.classNames,l=a.styles,c=a.hideHead,u=a.fixedWeeks,h=a.components,d=a.weekStartsOn,f=a.firstWeekContainsDate,p=a.ISOWeek,y=Bve(e.displayMonth,{useFixedWeeks:!!u,ISOWeek:p,locale:i,weekStartsOn:d,firstWeekContainsDate:f}),m=(t=h==null?void 0:h.Head)!==null&&t!==void 0?t:nve,v=(n=h==null?void 0:h.Row)!==null&&n!==void 0?n:Fve,b=(r=h==null?void 0:h.Footer)!==null&&r!==void 0?r:Zye;return s.jsxs("table",{id:e.id,className:o.table,style:l.table,role:"grid","aria-labelledby":e["aria-labelledby"],children:[!c&&s.jsx(m,{}),s.jsx("tbody",{className:o.tbody,style:l.tbody,children:y.map(function(x){return s.jsx(v,{displayMonth:e.displayMonth,dates:x.dates,weekNumber:x.weekNumber},x.weekNumber)})}),s.jsx(b,{displayMonth:e.displayMonth})]})}function qve(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var Uve=qve()?g.useLayoutEffect:g.useEffect,M1=!1,zve=0;function fM(){return"react-day-picker-".concat(++zve)}function Hve(e){var t,n=e??(M1?fM():null),r=g.useState(n),a=r[0],i=r[1];return Uve(function(){a===null&&i(fM())},[]),g.useEffect(function(){M1===!1&&(M1=!0)},[]),(t=e??a)!==null&&t!==void 0?t:void 0}function Vve(e){var t,n,r=Jt(),a=r.dir,i=r.classNames,o=r.styles,l=r.components,c=Dg().displayMonths,u=Hve(r.id?"".concat(r.id,"-").concat(e.displayIndex):void 0),h=r.id?"".concat(r.id,"-grid-").concat(e.displayIndex):void 0,d=[i.month],f=o.month,p=e.displayIndex===0,y=e.displayIndex===c.length-1,m=!p&&!y;a==="rtl"&&(t=[p,y],y=t[0],p=t[1]),p&&(d.push(i.caption_start),f=Ve(Ve({},f),o.caption_start)),y&&(d.push(i.caption_end),f=Ve(Ve({},f),o.caption_end)),m&&(d.push(i.caption_between),f=Ve(Ve({},f),o.caption_between));var v=(n=l==null?void 0:l.Caption)!==null&&n!==void 0?n:Jye;return s.jsxs("div",{className:d.join(" "),style:f,children:[s.jsx(v,{id:u,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),s.jsx(Wve,{id:h,"aria-labelledby":u,displayMonth:e.displayMonth})]},e.displayIndex)}function Gve(e){var t=Jt(),n=t.classNames,r=t.styles;return s.jsx("div",{className:n.months,style:r.months,children:e.children})}function Yve(e){var t,n,r=e.initialProps,a=Jt(),i=rT(),o=Dg(),l=g.useState(!1),c=l[0],u=l[1];g.useEffect(function(){a.initialFocus&&i.focusTarget&&(c||(i.focus(i.focusTarget),u(!0)))},[a.initialFocus,c,i.focus,i.focusTarget,i]);var h=[a.classNames.root,a.className];a.numberOfMonths>1&&h.push(a.classNames.multiple_months),a.showWeekNumber&&h.push(a.classNames.with_weeknumber);var d=Ve(Ve({},a.styles.root),a.style),f=Object.keys(r).filter(function(y){return y.startsWith("data-")}).reduce(function(y,m){var v;return Ve(Ve({},y),(v={},v[m]=r[m],v))},{}),p=(n=(t=r.components)===null||t===void 0?void 0:t.Months)!==null&&n!==void 0?n:Gve;return s.jsx("div",Ve({className:h.join(" "),style:d,dir:a.dir,id:a.id,nonce:r.nonce,title:r.title,lang:r.lang},f,{children:s.jsx(p,{children:o.displayMonths.map(function(y,m){return s.jsx(Vve,{displayIndex:m,displayMonth:y},m)})})}))}function Kve(e){var t=e.children,n=bye(e,["children"]);return s.jsx(Lye,{initialProps:n,children:s.jsx(Yye,{children:s.jsx(Tve,{initialProps:n,children:s.jsx(ave,{initialProps:n,children:s.jsx(ove,{initialProps:n,children:s.jsx(mve,{children:s.jsx(Cve,{children:t})})})})})})})}function Xve(e){return s.jsx(Kve,Ve({},e,{children:s.jsx(Yve,{initialProps:e})}))}function Xh({className:e,classNames:t,showOutsideDays:n=!0,...r}){return s.jsx(Xve,{showOutsideDays:n,className:K("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:sp
863ace-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:K(um({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:"h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",day:K(um({variant:"ghost"}),"h-9 w-9 p-0 font-normal aria-selected:opacity-100"),day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},components:{IconLeft:({...a})=>s.jsx(Kc,{className:"h-4 w-4"}),IconRight:({...a})=>s.jsx(Ma,{className:"h-4 w-4"})},...r})}Xh.displayName="Calendar";const Qve=({value:e,onChange:t,scheduledDate:n})=>{const[r,a]=g.useState(!1),[i,o]=g.useState(()=>n||new Date),[l,c]=g.useState(""),[u,h]=g.useState("all"),d=g.useMemo(()=>{const w=Lr(i),_=Ag(i);return qme({start:w,end:_})},[i]),f=g.useMemo(()=>{const w=[];return Bb.forEach((_,k)=>{const j=`quiz-${k}`;w.push({..._,source:"quick_quiz",dateKey:j})}),Wb.forEach((_,k)=>{const j=`insight-${k}`;w.push({..._,source:"behavioral_insight",dateKey:j})}),hm.forEach((_,k)=>{const j=`relevant-${k}`;w.push({..._,source:"still_relevant_today",dateKey:j})}),w},[]),p=g.useMemo(()=>{let w=f;if(u!=="all"&&(w=w.filter(_=>_.source===u)),l.trim()){const _=l.toLowerCase();w=w.filter(k=>k.name.toLowerCase().includes(_)||k.themes.some(j=>j.toLowerCase().includes(_)))}return w.slice(0,50)},[f,l,u]),y=w=>{const[_,k]=w.dateKey.split("-"),j=new Date().getFullYear(),S=new Date(j,parseInt(_)-1,parseInt(k));S<new Date&&S.setFullYear(j+1),t({name:w.name,date:ge(S,"yyyy-MM-dd"),source:w.source,mode:"specific"}),a(!1)},m=w=>{const _=Vh(w);t({name:_.name,date:ge(w,"yyyy-MM-dd"),source:"quick_quiz",mode:"specific"}),a(!1)},v=()=>{t({name:"Auto-follow calendar",date:"",source:"quick_quiz",mode:"auto"}),a(!1)},b=()=>{t(null)},x=[{id:"all",label:"All"},{id:"quick_quiz",label:"❓ Quizzes"},{id:"behavioral_insight",label:"🧠 Insights"},{id:"still_relevant_today",label:"⏳ Timeless"},{id:"quick_poll",label:"📊 Polls"}];return s.jsxs("div",{className:"space-y-2",children:[s.jsxs(X,{className:"flex items-center gap-2",children:[s.jsx(Se,{className:"h-4 w-4 text-accent"}),"TrendsPRO Topic"]}),e?s.jsx(fe.div,{initial:{opacity:0,y:-5},animate:{opacity:1,y:0},className:"p-3 rounded-lg border border-accent/30 bg-accent/5",children:s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-lg",children:e.mode==="auto"?"🔄":W2(e.source)}),s.jsx("span",{className:"font-medium text-foreground",children:e.name})]}),e.mode==="specific"&&e.date&&s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Scheduled for ",ge(new Date(e.date),"MMMM d, yyyy")]}),e.mode==="auto"&&s.jsx("p",{className:"text-xs text-muted-foreground",children:"Will use the trend for each scheduled date"})]}),s.jsxs("div",{className:"flex gap-1",children:[s.jsxs(An,{open:r,onOpenChange:a,children:[s.jsx(dm,{asChild:!0,children:s.jsx(z,{variant:"ghost",size:"sm",className:"h-7 px-2",children:"Change"})}),s.jsx(pM,{daysInMonth:d,currentMonth:i,setCurrentMonth:o,searchQuery:l,setSearchQuery:c,selectedSource:u,setSelectedSource:h,sources:x,filteredTrends:p,handleSelectTrend:y,handleSelectDateTrend:m,handleAutoFollow:v,value:e})]}),s.jsx(z,{variant:"ghost",size:"sm",className:"h-7 px-2",onClick:b,children:s.jsx(Br,{className:"h-3.5 w-3.5"})})]})]})}):s.jsxs(An,{open:r,onOpenChange:a,children:[s.jsx(dm,{asChild:!0,children:s.jsxs(z,{variant:"outline",className:"w-full justify-start text-muted-foreground",children:[s.jsx(Se,{className:"mr-2 h-4 w-4"}),"Select a trend topic..."]})}),s.jsx(pM,{daysInMonth:d,currentMonth:i,setCurrentMonth:o,searchQuery:l,setSearchQuery:c,selectedSource:u,setSelectedSource:h,sources:x,filteredTrends:p,handleSelectTrend:y,handleSelectDateTrend:m,handleAutoFollow:v,value:e})]})]})},pM=({daysInMonth:e,currentMonth:t,setCurrentMonth:n,searchQuery:r,setSearchQuery:a,selectedSource:i,setSelectedSource:o,sources:l,filteredTrends:c,handleSelectTrend:u,handleSelectDateTrend:h,handleAutoFollow:d,value:f})=>{var p;return s.jsxs(En,{className:"sm:max-w-[600px] max-h-[85vh]",children:[s.jsxs(wn,{children:[s.jsxs(_n,{className:"flex items-center gap-2",children:[s.jsx(Se,{className:"h-5 w-5 text-accent"}),"Select Trend Topic"]}),s.jsx(Zr,{children:"Choose a specific trend or let it auto-follow the calendar"})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs(z,{variant:(f==null?void 0:f.mode)==="auto"?"default":"outline",className:"w-full justify-start",onClick:d,children:[s.jsx("span",{className:"mr-2",children:"🔄"}),"Auto-follow calendar",s.jsx("span",{className:"ml-auto text-xs text-muted-foreground",children:"Matches trend to each scheduled date"})]}),s.jsxs("div",{className:"relative",children:[s.jsx(Jd,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),s.jsx(ze,{placeholder:"Search trends by name or theme...",value:r,onChange:y=>a(y.target.value),className:"pl-9"})]}),s.jsx("div",{className:"flex gap-2 flex-wrap",children:l.map(y=>s.jsx(z,{variant:i===y.id?"default":"outline",size:"sm",onClick:()=>o(y.id),children:y.label},y.id))}),s.jsx(ya,{className:"h-[300px] rounded-lg border",children:s.jsx("div",{className:"p-2 space-y-1",children:c.length===0?s.jsx("p",{className:"text-center py-8 text-muted-foreground",children:"No trends found. Try a different search."}):c.map((y,m)=>s.jsx(fe.button,{type:"button",onClick:()=>u(y),className:"w-full p-3 rounded-lg text-left transition-all hover:bg-muted/50 border border-transparent hover:border-border",whileHover:{scale:1.005},whileTap:{scale:.995},children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("span",{className:"text-lg",children:W2(y.source)}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[s.jsx("span",{className:"font-medium text-foreground",children:y.name}),s.jsx(je,{variant:"outline",className:K("text-xs capitalize",B2(y.strength)),children:y.strength}),s.jsx("span",{className:"text-xs text-muted-foreground",children:y.dateKey.replace("-","/")})]}),s.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:y.themes.slice(0,3).map(v
863=>s.jsx("span",{className:"text-xs text-muted-foreground bg-muted/50 px-1.5 py-0.5 rounded",children:v},v))})]})]})},`${y.dateKey}-${y.name}-${m}`))})}),s.jsxs("div",{className:"border-t pt-4",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx(z,{variant:"ghost",size:"icon",onClick:()=>n(dt(Lr(t),-1)),children:s.jsx(Kc,{className:"h-4 w-4"})}),s.jsx("span",{className:"text-sm font-medium",children:ge(t,"MMMM yyyy")}),s.jsx(z,{variant:"ghost",size:"icon",onClick:()=>n(dt(Ag(t),1)),children:s.jsx(Ma,{className:"h-4 w-4"})})]}),s.jsxs("div",{className:"grid grid-cols-7 gap-1 text-center",children:[["M","T","W","T","F","S","S"].map((y,m)=>s.jsx("div",{className:"text-xs text-muted-foreground py-1",children:y},m)),Array.from({length:(((p=e[0])==null?void 0:p.getDay())+6)%7}).map((y,m)=>s.jsx("div",{},`empty-${m}`)),e.map(y=>{const m=Vh(y),v=(f==null?void 0:f.date)===ge(y,"yyyy-MM-dd");return s.jsxs("button",{type:"button",onClick:()=>h(y),className:K("p-1 rounded text-sm transition-all hover:bg-muted relative group",FU(y)&&"bg-primary/10 font-bold",v&&"bg-primary text-primary-foreground"),title:m.name,children:[ge(y,"d"),m.strength==="strong"&&s.jsx("span",{className:"absolute -top-0.5 -right-0.5 w-1.5 h-1.5 rounded-full bg-green-500"})]},y.toISOString())})]}),s.jsx("p",{className:"text-xs text-muted-foreground mt-2 text-center",children:"Green dots indicate strong trending days"})]})]})]})},Jve=[{type:"none",label:"One-time",description:"Post once"},{type:"daily",label:"Daily",description:"Every day"},{type:"weekly",label:"Weekly",description:"Same day each week"},{type:"monthly",label:"Monthly",description:"Same date each month"},{type:"custom",label:"Custom",description:"Set your interval"}],Zve=({value:e,onChange:t,startDate:n})=>{const[r,a]=g.useState(e.endDate!==null),i=d=>{t({...e,type:d,interval:d==="custom"?e.interval||2:1})},o=d=>{t({...e,interval:Math.max(1,Math.min(365,d))})},l=d=>{t({...e,endDate:d||null})},c=()=>{r&&t({...e,endDate:null}),a(!r)},h=(()=>
863{if(!n||e.type==="none")return[];const d=[];let f=n;for(let p=0;p<4;p++){switch(e.type){case"daily":f=dt(f,1);break;case"weekly":f=fr(f,1);break;case"monthly":f=ea(f,1);break;case"custom":f=dt(f,e.interval);break}if(e.endDate&&f>e.endDate)break;d.push(f)}return d})();return s.jsxs("div",{className:"space-y-4",children:[s.jsxs(X,{className:"flex items-center gap-2",children:[s.jsx(Qc,{className:"h-4 w-4 text-primary"}),"Recurrence"]}),s.jsx("div",{className:"grid grid-cols-5 gap-2",children:Jve.map(d=>s.jsx("button",{type:"button",onClick:()=>i(d.type),className:K("p-2 rounded-lg border text-center transition-all",e.type===d.type?"bg-primary text-primary-foreground border-primary":"bg-muted/30 border-border hover:border-muted-foreground/30"),children:s.jsx("span",{className:"text-xs font-medium block",children:d.label})},d.type))}),s.jsx(Wr,{mode:"wait",children:e.type!=="none"&&s.jsxs(fe.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"space-y-4",children:[e.type==="custom"&&s.jsxs(fe.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-sm text-muted-foreground",children:"Every"}),s.jsx(ze,{type:"number",min:1,max:365,value:e.interval,onChange:d=>o(parseInt(d.target.value)||1),className:"w-20 text-center"}),s.jsx("span",{className:"text-sm text-muted-foreground",children:"days"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(X,{className:"text-sm text-muted-foreground",children:"End date"}),s.jsx(z,{variant:"ghost",size:"sm",onClick:c,className:"h-7 text-xs",children:r?"Run indefinitely":"Set end date"})]}),r?s.jsxs(Og,{children:[s.jsx(Rg,{asChild:!0,children:s.jsxs(z,{variant:"outline",className:K("w-full justify-start text-left font-normal",!e.endDate&&"text-muted-foreground"),children:[s.jsx(Mn,{className:"mr-2 h-4 w-4"}),e.endDate?ge(e.endDate,"PPP"):"Pick an end date"]})}),s.jsx(Kh,{className:"w-auto p-0",align:"start",children:s.jsx(Xh,{mode:"single",selected:e.endDate||void 0,onSelect:l,initialFocus:!0,className:"p-3 pointer-events-auto",disabled:d=>d<(n||new Date)})})]}):s.jsxs("div",{className:"text-sm text-muted-foreground flex items-center gap-2 p-2 bg-muted/30 rounded-lg",children:[s.jsx(UF,{className:"h-4 w-4"}),"This post will repeat indefinitely until canceled"]})]}),n&&h.length>0&&s.jsxs(fe.div,{initial:{opacity:0}
863,animate:{opacity:1},className:"space-y-2",children:[s.jsx(X,{className:"text-xs text-muted-foreground",children:"Preview of next posts"}),s.jsxs("div",{className:"flex flex-wrap gap-2",children:[s.jsxs(je,{variant:"outline",className:"bg-primary/10",children:[ge(n,"MMM d")," (first)"]}),h.map((d,f)=>s.jsx(je,{variant:"outline",children:ge(d,"MMM d")},f)),!e.endDate&&s.jsx(je,{variant:"outline",className:"text-muted-foreground",children:"...ongoing"})]})]})]})})]})},ebe=[{id:"linkedin",name:"LinkedIn"},{id:"instagram",name:"Instagram"},{id:"facebook",name:"Facebook"},{id:"threads",name:"Threads"},{id:"reddit",name:"Reddit"}],tbe=Array.from({length:48},(e,t)=>{const n=Math.floor(t/2),r=t%2===0?"00":"30";return`${n.toString().padStart(2,"0")}:${r}`}),cz=({open:e,onOpenChange:t,selectedSlot:n,onScheduled:r,initialPost:a})=>{const{getConnectedPlatforms:i}=Hl(),o=i(),{gateAction:l,showTrialModal:c,setShowTrialModal:u,startFreeTrial:h}=Ng(),[d,f]=g.useState([]),[p,y]=g.useState(""),[m,v]=g.useState(""),[b,x]=g.useState([]),[w,_]=g.useState(n==null?void 0:n.date),[k,j]=g.useState((n==null?void 0:n.time)||"09:00"),[S,N]=g.useState(null),[C,M]=g.useState(null),[O,D]=g.useState(null),[$,R]=g.useState(!1),[I,P]=g.useState(!0),[A,E]=g.useState(null),[T,L]=g.useState({type:"none",interval:1,endDate:null}),{toast:B}=Je();g.useEffect(()=>{n&&(_(n.date),j(n.time))},[n]),g.useEffect(()=>{a&&e&&(v(a.content),a.platforms&&a.platforms.length>0?x(a.platforms):a.platform&&x([a.platform]),N(a.mediaUrl||null),M(a.mediaType||null),D(a.industryRole||null))},[a,e]),g.useEffect(()=>{e||(E(null),L({type:"none",interval:1,endDate:null}))},[e]),g.useEffect(()=>{e&&(async()=>{try{const{data:{user:U}}=await W.auth.getUser();if(!U)return;const{data:Q,error:J}=await W.from("saved_posts").select("id, platform, platforms, content, media_url, media_type, industry_role").order("created_at",{ascending:!1});if(J)throw J;f(Q||[])}catch(U){console.error("Error fetching saved posts:",U)}finally{P(!1)}})()},[e]);const H=q=>{y(q);const U=d.find(Q=>Q.id===q);U&&(v(U.content),U.platforms&&U.platforms.length>0?x(U.platforms):x([U.platform]),N(U.media_url||null),M(U.media_type||null),D(U.industry_role||null))},G=q=>{x(U=>U.includes(q)?U.length===1?U:U.filter(Q=>Q!==q):[...U,q])},Z=()=>{if(!w)return[];if(T.type==="none")return[w];const q=[w];let U=w;const Q=52;for(let J=0;J<Q-1;J++){switch(T.type){case"daily":U=dt(U,1);break;case"weekly":U=fr(U,1);break;case"monthly":U=ea(U,1);break;case"custom":U=dt(U,T.interval);break}if(T.endDate&&U>T.endDate)break;q.push(U)}return q},le=async()=>{if(!l("schedule"))return;const q=A&&A.mode!=="none",U=m.trim().length>0;if(!q&&!U){B({title:"Missing content",description:"Please provide content or select a trend topic.",variant:"destructive"});return}if(!w||b.length===0){B({title:"Missing information",description:"Please select at least one platform and choose a date.",variant:"destructive"});return}R(!0);try{const{data:{user:Q}}=await W.auth.getUser();if(!Q)throw new Error("Not authenticated");const J=Z(),Y=T.type!=="none",oe=Y?crypto.randomUUID():null,ve=[];for(let He=0;He<J.length;He++){const vt=J[He],lt=He===0;let Pt=null,te=null,ne=null;A&&(A.mode==="auto"?(Pt=Vh(vt).name,te=ge(vt,"yyyy-MM-dd"),ne="strategic"):A.mode==="specific"&&(Pt=A.name,te=A.date,ne="strategic"));const ye=b.length>1?crypto.randomUUID():null,Ge=m.trim()||(Pt?`✨ Today's Trend: ${Pt}
864
865[Add your take on this trend]
866
867#TrendsPRO`:""),st=b.map(Ie=>({user_id:Q.id,saved_post_id:p||null,platform:Ie,content:Ge,scheduled_date:ge(vt,"yyyy-MM-dd"),scheduled_time:k+":00",status:"pending",media_url:S,media_type:C,industry_role:O,group_id:ye,trend_name:Pt,trend_date:te,trend_variant:ne,recurrence_type:lt?T.type:null,recurrence_interval:lt&&T.type==="custom"?T.interval:null,recurrence_end_date:lt&&T.endDate?ge(T.endDate,"yyyy-MM-dd"):null,recurrence_parent_id:lt?null:oe,trend_mode:(A==null?void 0:A.mode)||"none",is_recurring_instance:!lt}));ve.push(...st)}const{error:De}=await W.from("scheduled_posts").insert(ve);if(De)throw De;const Le=J.length*b.length;B({title:Y?"Recurring posts scheduled!":"Post scheduled!",description:Y?`Created ${Le} posts across ${J.length} dates.`:b.length>1?`Scheduled to ${b.length} platforms for ${ge(w,"MMM d")} at ${k}.`:`Your post is scheduled for ${ge(w,"MMM d")} at ${k}.`}),v(""),y(""),x([]),E(null),L({type:"none",interval:1,endDate:null}),t(!1),r()}catch(Q){B({title:"Scheduling failed",description:Q.message,variant:"destructive"})}finally{R(!1)}},ue=Z(),re=ue.length*b.length;return s.jsxs(s.Fragment,{children:[s.jsx(An,{open:e,onOpenChange:t,children:s.jsxs(En,{className:"sm:max-w-[600px] max-h-[90vh]",children:[s.jsxs(wn,{children:[s.jsx(_n,{children:"Schedule Post"}),s.jsx(Zr,{children:"Select a saved post or write new content. Set recurrence for repeating posts."})]}),s.jsx(ya,{className:"max-h-[calc(90vh-120px)] pr-4",children:s.jsxs("div",{className:"space-y-5 pt-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{children:"Select from Library (optional)"}),s.jsxs(jt,{value:p,onValueChange:H,children:[s.jsx(mt,{children:s.jsx(Ct,{placeholder:I?"Loading posts...":"Choose a saved post"})}),s.jsx(gt,{children:d.map(q=>{var U;return s.jsx(Ee,{value:q.id,children:s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsxs("span",{className:"capitalize text-xs text-muted-foreground",children:["[",(U=q.platforms)!=null&&U.length?q.platforms.join(", "):q.platform,"]"]}),s.jsxs("span",{className:"truncate max-w-[300px]",children:[q.content.substring(0,50),"..."]})]})},q.id)})})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs(X,{className:"flex items-center gap-2",children:["Content",A&&s.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"(optional with trend)"})]}),s.jsx(Nt,{placeholder:A?"Optional — a trend placeholder will be used if empty":"Enter your post content...",value:m,onChange:q=>v(q.target.value),className:"min-h-[100px] resize-none"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(X,{children:"Platforms"}),s.jsxs("span",{className:"text-xs text-muted-foreground",children:[b.length," selected"]})]}),o.length===0?s.jsx("p",{className:"text-sm text-muted-foreground",children:"No platforms connected. Connect accounts in Settings."}):s.jsx("div",{className:"flex flex-wrap gap-2",children:ebe.map(q=>{const U=o.includes(q.id),Q=b.includes(q.id);return s.jsx("button",{type:"button",onClick:()=>
867U&&G(q.id),disabled:!U,className:K("rounded-lg px-3 py-1.5 text-sm font-medium transition-all",!U&&"opacity-40 cursor-not-allowed",Q&&U?"bg-primary text-primary-foreground":U?"bg-muted text-muted-foreground hover:bg-muted/80":"bg-muted/50 text-muted-foreground"),children:q.name},q.id)})})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{children:"Start Date"}),s.jsxs(Og,{children:[s.jsx(Rg,{asChild:!0,children:s.jsxs(z,{variant:"outline",className:K("w-full justify-start text-left font-normal",!w&&"text-muted-foreground"),children:[s.jsx(Mn,{className:"mr-2 h-4 w-4"}),w?ge(w,"PPP"):"Pick a date"]})}),s.jsx(Kh,{className:"w-auto p-0",align:"start",children:s.jsx(Xh,{mode:"single",selected:w,onSelect:_,initialFocus:!0,className:"p-3 pointer-events-auto",disabled:q=>q<new Date(new Date().setHours(0,0,0,0))})})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{children:"Time"}),s.jsxs(jt,{value:k,onValueChange:j,children:[s.jsx(mt,{children:s.jsx(Ct,{})}),s.jsx(gt,{children:tbe.map(q=>s.jsx(Ee,{value:q,children:q},q))})]})]})]}),s.jsx(Zve,{value:T,onChange:L,startDate:w}),s.jsx(Qve,{value:A,onChange:E,scheduledDate:w}),s.jsxs("div",{className:"flex items-center justify-between pt-4 border-t",children:[s.jsx("div",{className:"text-sm text-muted-foreground",children:re>1&&s.jsxs("span",{children:["Will create ",s.jsx("strong",{children:re})," posts",ue.length>1&&` across ${ue.length} dates`]})}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(z,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),s.jsxs(z,{onClick:le,disabled:$||b.length===0,children:[$&&s.jsx(ce,{className:"mr-2 h-4 w-4 animate-spin"}),T.type!=="none"?"Schedule Recurring":"Schedule Post"]})]})]})]})})]})}),s.jsx(c0,{open:c,onOpenChange:u,onActivate:h})]})},nbe=({postText:e,imageUrl:t,className:n=""})=>{const[r,a]=g.useState("idle"),{toast:i}=Je(),o=async l=>{var d;if(l.stopPropagation(),r==="publishing")return;a("publishing");const c=await n0({content:e,platforms:["facebook"],source:"manual",mediaItems:t?[{url:t,type:"image"}]:void 0}),u=(d=c.platformResults)==null?void 0:d.find(f=>f.platform==="facebook");c.success&&(!u||u.success)?(a("done"),i({title:"Published to Facebook",description:"Your post is live on your connected Page."}),setTimeout(()=>a("idle"),2500)):(a("idle"),i({title:"Facebook publish failed",description:(u==null?void 0:u.error)||
867c.message||"Could not publish to Facebook.",variant:"destructive"}))};return s.jsx("button",{onClick:o,type:"button",disabled:r==="publishing",className:`inline-flex items-center gap-1 bg-blue-600 hover:bg-blue-700 disabled:opacity-60 text-white font-medium text-xs px-3 py-1.5 rounded-md transition-all shadow-sm cursor-pointer ${n}`,children:r==="publishing"?s.jsxs(s.Fragment,{children:[s.jsx(ce,{className:"w-3.5 h-3.5 animate-spin"}),s.jsx("span",{children:"Publishing..."})]}):r==="done"?s.jsxs(s.Fragment,{children:[s.jsx($t,{className:"w-3.5 h-3.5 text-green-300"}),s.jsx("span",{children:"Published!"})]}):s.jsxs(s.Fragment,{children:[s.jsx(ji,{className:"w-3.5 h-3.5"}),s.jsx("span",{children:"Publish Now"})]})})},mM={linkedin:"bg-blue-500/20 border-blue-500/40 text-blue-700 dark:text-blue-300",instagram:"bg-pink-500/20 border-pink-500/40 text-pink-700 dark:text-pink-300",facebook:"bg-blue-600/20 border-blue-600/40 text-blue-700 dark:text-blue-300",threads:"bg-foreground/20 border-foreground/40 text-foreground",reddit:"bg-orange-500/20 border-orange-500/40 text-orange-700 dark:text-orange-300"},rbe={linkedin:"bg-blue-500",instagram:"bg-pink-500",facebook:"bg-blue-600",threads:"bg-foreground",reddit:"bg-orange-500"},abe={daily:"Daily",weekly:"Weekly",monthly:"Monthly",custom:"Custom"},gM=({post:e,groupedPlatforms:t,onDelete:n,onCancelRecurrence:r,isGrouped:a=!1})=>{const i=a?"bg-gradient-to-r from-primary/10 to-accent/10 border-primary/30":mM[e.platform]||mM.linkedin,o=e.recurrence_type&&e.recurrence_type!=="none",l=e.trend_mode==="auto",c=t?t.includes("facebook"):e.platform==="facebook";return s.jsxs("div",{className:K("group relative rounded-md border p-1.5 text-xs transition-all hover:shadow-md mb-1",i),onClick:u=>u.stopPropagation(),children:[s.jsxs("div",{className:"flex items-start justify-between gap-1",children:[s.jsxs("div",{className:"min-w-0 flex-1",children:[a&&t?s.jsxs("div",{className:"flex items-center gap-1 mb-0.5",children:[s.jsx(gP,{className:"h-2.5 w-2.5 text-primary"}),s.jsx("div",{className:"flex gap-0.5",children:t.map(u=>s.jsx("div",{className:K("h-2 w-2 rounded-full",rbe[u]||"bg-muted"),title:u},u))}),s.jsxs("span",{className:"text-[10px] text-muted-foreground",children:["(",t.length,")"]})]}):s.jsx("div",{className:"font-medium capitalize text-[10px] mb-0.5",children:e.platform}),o&&s.jsxs("div",{className:"flex items-center gap-0.5 mb-0.5",children:[s.jsx(Qc,{className:"h-2 w-2 text-primary"}),s.jsx("span",{className:"text-[9px] text-primary font-medium",children:abe[e.recurrence_type]||e.recurrence_type}),e.is_recurring_instance&&s.jsx("span",{className:"text-[8px] text-muted-foreground",children:"• instance"})]}),e.trend_name&&s.jsxs("div",{className:"flex items-center gap-0.5 mb-0.5",children:[s.jsx(Se,{className:"h-2 w-2 text-accent"}),s.jsxs("span",{className:"text-[9px] text-accent truncate max-w-[80px]",title:e.trend_name,children:[l&&"🔄 ",e.trend_name]}),e.trend_variant&&s.jsxs("span",{className:"text-[8px] text-muted-foreground capitalize",children:["• ",e.trend_variant]})]}),s.jsxs("div",{className:"line-clamp-2 text-[10px] opacity-80 mb-1",children:[e.content.substring(0,40),"..."]})]}),s.jsx("div",{className:"flex flex-col gap-1 items-end",children:s.jsxs("div",{className:"flex items-center gap-0.5",children:[s.jsx("button",{onClick:u=>{u.stopPropagation(),n()},className:"opacity-0 group-hover:opacity-100 transition-opacity p-0.5 hover:bg-destructive/20 rounded",title:a?"Delete all platforms":"Delete post",children:s.jsx(Br,{className:"h-3 w-3"})}),o&&!e.is_recurring_instance&&r&&s.jsx("button",{onClick:u=>{u.stopPropagation(),r()},className:"opacity-0 group-hover:opacity-100 transition-opacity p-0.5 hover:bg-orange-500/20 rounded",title:"Cancel all future occurrences",children:s.jsx(Qc,{className:"h-3 w-3 text-orange-500"})})]})})]}),c&&s.jsx(nbe,{postText:e.content,imageUrl:e.image_url||void 0,className:"mt-1 w-full justify-center !px-1 !text-[10px]"})]})};var OS=["Enter"," "],sbe=["ArrowDown","PageUp","Home"],uz=["ArrowUp","PageDown","End"],ibe=[...sbe,...uz],obe={ltr:[...OS,"ArrowRight"],rtl:[...OS,"ArrowLeft"]},lbe={ltr:["ArrowLeft"],rtl:["ArrowRight"]},$g="Menu",[gm,cbe,ube]=ug($g),[bu,dz]=Hn($g,[ube,Wl,Hh]),h0=Wl(),hz=Hh(),[dbe,xu]=bu($g),[hbe,Lg]=bu($g),fz=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:a,onOpenChange:i,modal:o=!0}=e,l=h0(t),[c,u]=g.useState(null),h=g.useRef(!1),d=In(i),f=vu(a);return g.useEffect(()=>{const p=()=>{h.current=!0,document.addEventListener("pointerdown",y,{capture:!0,once:!0}),document.addEventListener("pointermove",y,{capture:!0,once:!0})},y=()=>h.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",y,{capture:!0}),document.removeEventListener("pointermove",y,{capture:!0})}},[]),s.jsx(Nw,{...l,children:s.jsx(dbe,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:u,children:s.jsx(hbe,{scope:t,onClose:g.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:h,dir:f,modal:o,children:r})})})};fz.displayName=$g;var fbe="MenuAnchor",sT=g.forwardRef((e,t)=>
vendor: 12,952 bytes, line 867
867{const{__scopeMenu:n,...r}=e,a=h0(n);return s.jsx(yg,{...a,...r,ref:t})});sT.displayName=fbe;var iT="MenuPortal",[pbe,pz]=bu(iT,{forceMount:void 0}),mz=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:a}=e,i=xu(iT,t);return s.jsx(pbe,{scope:t,forceMount:n,children:s.jsx(Vn,{present:n||i.open,children:s.jsx(Eh,{asChild:!0,container:a,children:r})})})};mz.displayName=iT;var ns="MenuContent",[mbe,oT]=bu(ns),gz=g.forwardRef((e,t)=>{const n=pz(ns,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,i=xu(ns,e.__scopeMenu),o=Lg(ns,e.__scopeMenu);return s.jsx(gm.Provider,{scope:e.__scopeMenu,children:s.jsx(Vn,{present:r||i.open,children:s.jsx(gm.Slot,{scope:e.__scopeMenu,children:o.modal?s.jsx(gbe,{...a,ref:t}):s.jsx(ybe,{...a,ref:t})})})})}),gbe=g.forwardRef((e,t)=>{const n=xu(ns,e.__scopeMenu),r=g.useRef(null),a=Fe(t,r);return g.useEffect(()=>{const i=r.current;if(i)return Hw(i)},[]),s.jsx(lT,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:de(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),ybe=g.forwardRef((e,t)=>{const n=xu(ns,e.__scopeMenu);return s.jsx(lT,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),vbe=Ol("MenuContent.ScrollLock"),lT=g.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:a,onOpenAutoFocus:i,onCloseAutoFocus:o,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:h,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:y,...m}=e,v=xu(ns,n),b=Lg(ns,n),x=h0(n),w=hz(n),_=cbe(n),[k,j]=g.useState(null),S=g.useRef(null),N=Fe(t,S,v.onContentChange),C=g.useRef(0),M=g.useRef(""),O=g.useRef(0),D=g.useRef(null),$=g.useRef("right"),R=g.useRef(0),I=y?jg:g.Fragment,P=y?{as:vbe,allowPinchZoom:!0}:void 0,A=T=>{var re,q;const L=M.current+T,B=_().filter(U=>!U.disabled),H=document.activeElement,G=(re=B.find(U=>U.ref.current===H))==null?void 0:re.textValue,Z=B.map(U=>U.textValue),le=Abe(Z,L,G),ue=(q=B.find(U=>U.textValue===le))==null?void 0:q.ref.current;(function U(Q){M.current=Q,window.clearTimeout(C.current),Q!==""&&(C.current=window.setTimeout(()=>U(""),1e3))})(L),ue&&setTimeout(()=>ue.focus())};g.useEffect(()=>()=>window.clearTimeout(C.current),[]),Uw();const E=g.useCallback(T=>{var B,H;return $.current===((B=D.current)==null?void 0:B.side)&&Obe(T,(H=D.current)==null?void 0:H.area)},[]);return s.jsx(mbe,{scope:n,searchRef:M,onItemEnter:g.useCallback(T=>{E(T)&&T.preventDefault()},[E]),onItemLeave:g.useCallback(T=>{var L;E(T)||((L=S.current)==null||L.focus(),j(null))},[E]),onTriggerLeave:g.useCallback(T=>{E(T)&&T.preventDefault()},[E]),pointerGraceTimerRef:O,onPointerGraceIntentChange:g.useCallback(T=>{D.current=T},[]),children:s.jsx(I,{...P,children:s.jsx(kg,{asChild:!0,trapped:a,onMountAutoFocus:de(i,T=>{var L;T.preventDefault(),(L=S.current)==null||L.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:s.jsx(mu,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:h,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:s.jsx(O2,{asChild:!0,...w,dir:b.dir,orientation:"vertical",loop:r,currentTabStopId:k,onCurrentTabStopIdChange:j,onEntryFocus:de(c,T=>{b.isUsingKeyboardRef.current||T.preventDefault()}),preventScrollOnEntryFocus:!0,children:s.jsx(Cw,{role:"menu","aria-orientation":"vertical","data-state":Oz(v.open),"data-radix-menu-content":"",dir:b.dir,...x,...m,ref:N,style:{outline:"none",...m.style},onKeyDown:de(m.onKeyDown,T=>{const B=T.target.closest("[data-radix-menu-content]")===T.currentTarget,H=T.ctrlKey||T.altKey||T.metaKey,G=T.key.length===1;B&&(T.key==="Tab"&&T.preventDefault(),!H&&G&&A(T.key));const Z=S.current;if(T.target!==Z||!ibe.includes(T.key))return;T.preventDefault();const ue=_().filter(re=>!re.disabled).map(re=>re.ref.current);uz.includes(T.key)&&ue.reverse(),Pbe(ue)}),onBlur:de(e.onBlur,T=>{T.currentTarget.contains(T.target)||(window.clearTimeout(C.current),M.current="")}),onPointerMove:de(e.onPointerMove,ym(T=>{const L=T.target,B=R.current!==T.clientX;if(T.currentTarget.contains(L)&&B){const H=T.clientX>R.current?"right":"left";$.current=H,R.current=T.clientX}}))})})})})})})});gz.displayName=ns;var bbe="MenuGroup",cT=g.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return s.jsx(we.div,{role:"group",...r,ref:t})});cT.displayName=bbe;var xbe="MenuLabel",yz=g.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return s.jsx(we.div,{...r,ref:t})});yz.displayName=xbe;var Gb="MenuItem",yM="menu.itemSelect",f0=g.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...a}=e,i=g.useRef(null),o=Lg(Gb,e.__scopeMenu),l=oT(Gb,e.__scopeMenu),c=Fe(t,i),u=g.useRef(!1),h=()=>{const d=i.current;if(!n&&d){const f=new CustomEvent(yM,{bubbles:!0,cancelable:!0});d.addEventListener(yM,p=>r==null?void 0:r(p),{once:!0}),oP(d,f),f.defaultPrevented?u.current=!1:o.onClose()}};return s.jsx(vz,{...a,ref:c,disabled:n,onClick:de(e.onClick,h),onPointerDown:d=>{var f;(f=e.onPointerDown)==null||f.call(e,d),u.current=!0},onPointerUp:de(e.onPointerUp,d=>{var f;u.current||(f=d.currentTarget)==null||f.click()}),onKeyDown:de(e.onKeyDown,d=>{const f=l.searchRef.current!=="";n||f&&d.key===" "||OS.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});f0.displayName=Gb;var vz=g.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:a,...i}=e,o=oT(Gb,n),l=hz(n),c=g.useRef(null),u=Fe(t,c),[h,d]=g.useState(!1),[f,p]=g.useState("");return g.useEffect(()=>{const y=c.current;y&&p((y.textContent??"").trim())},[i.children]),s.jsx(gm.ItemSlot,{scope:n,disabled:r,textValue:a??f,children:s.jsx(R2,{asChild:!0,...l,focusable:!r,children:s.jsx(we.div,{role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...i,ref:u,onPointerMove:de(e.onPointerMove,ym(y=>{r?o.onItemLeave(y):(o.onItemEnter(y),y.defaultPrevented||y.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:de(e.onPointerLeave,ym(y=>o.onItemLeave(y))),onFocus:de(e.onFocus,()=>d(!0)),onBlur:de(e.onBlur,()=>d(!1))})})})}),wbe="MenuCheckboxItem",bz=g.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...a}=e;return s.jsx(jz,{scope:e.__scopeMenu,checked:n,children:s.jsx(f0,{role:"menuitemcheckbox","aria-checked":Yb(n)?"mixed":n,...a,ref:t,"data-state":dT(n),onSelect:de(a.onSelect,()=>r==null?void 0:r(Yb(n)?!0:!n),{checkForDefaultPrevented:!1})})})});bz.displayName=wbe;var xz="MenuRadioGroup",[_be,kbe]=bu(xz,{value:void 0,onValueChange:()=>{}}),wz=g.forwardRef((e,t)=>{const{value:n,onValueChange:r,...a}=e,i=In(r);return s.jsx(_be,{scope:e.__scopeMenu,value:n,onValueChange:i,children:s.jsx(cT,{...a,ref:t})})});wz.displayName=xz;var _z="MenuRadioItem",kz=g.forwardRef((e,t)=>{const{value:n,...r}=e,a=kbe(_z,e.__scopeMenu),i=n===a.value;return s.jsx(jz,{scope:e.__scopeMenu,checked:i,children:s.jsx(f0,{role:"menuitemradio","aria-checked":i,...r,ref:t,"data-state":dT(i),onSelect:de(r.onSelect,()=>{var o;return(o=a.onValueChange)==null?void 0:o.call(a,n)},{checkForDefaultPrevented:!1})})})});kz.displayName=_z;var uT="MenuItemIndicator",[jz,jbe]=bu(uT,{checked:!1}),Sz=g.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...a}=e,i=jbe(uT,n);return s.jsx(Vn,{present:r||Yb(i.checked)||i.checked===!0,children:s.jsx(we.span,{...a,ref:t,"data-state":dT(i.checked)})})});Sz.displayName=uT;var Sbe="MenuSeparator",Nz=g.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return s.jsx(we.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Nz.displayName=Sbe;var Nbe="MenuArrow",Cz=g.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=h0(n);return s.jsx(Pw,{...a,...r,ref:t})});Cz.displayName=Nbe;var Cbe="MenuSub",[bHe,Pz]=bu(Cbe),Zf="MenuSubTrigger",Tz=g.forwardRef((e,t)=>{const n=xu(Zf,e.__scopeMenu),r=Lg(Zf,e.__scopeMenu),a=Pz(Zf,e.__scopeMenu),i=oT(Zf,e.__scopeMenu),o=g.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=i,u={__scopeMenu:e.__scopeMenu},h=g.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return g.useEffect(()=>h,[h]),g.useEffect(()=>{const d=l.current;return()=>{window.clearTimeout(d),c(null)}},[l,c]),s.jsx(sT,{asChild:!0,...u,children:s.jsx(vz,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":a.contentId,"data-state":Oz(n.open),...e,ref:dw(t,a.onTriggerChange),onClick:d=>{var f;(f=e.onClick)==null||f.call(e,d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:de(e.onPointerMove,ym(d=>{i.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(i.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),h()},100))})),onPointerLeave:de(e.onPointerLeave,ym(d=>{var p,y;h();const f=(p=n.content)==null?void 0:p.getBoundingClientRect();if(f){const m=(y=n.content)==null?void 0:y.dataset.side,v=m==="right",b=v?-5:5,x=f[v?"left":"right"],w=f[v?"right":"left"];i.onPointerGraceIntentChange({area:[{x:d.clientX+b,y:d.clientY},{x,y:f.top},{x:w,y:f.top},{x:w,y:f.bottom},{x,y:f.bottom}],side:m}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(d),d.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:de(e.onKeyDown,d=>{var p;const f=i.searchRef.current!=="";e.disabled||f&&d.key===" "||obe[r.dir].includes(d.key)&&(n.onOpenChange(!0),(p=n.content)==null||p.focus(),d.preventDefault())})})})});Tz.displayName=Zf;var Az="MenuSubContent",Ez=g.forwardRef((e,t)=>{const n=pz(ns,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,i=xu(ns,e.__scopeMenu),o=Lg(ns,e.__scopeMenu),l=Pz(Az,e.__scopeMenu),c=g.useRef(null),u=Fe(t,c);return s.jsx(gm.Provider,{scope:e.__scopeMenu,children:s.jsx(Vn,{present:r||i.open,children:s.jsx(gm.Slot,{scope:e.__scopeMenu,children:s.jsx(lT,{id:l.contentId,"aria-labelledby":l.triggerId,...a,ref:u,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:h=>{var d;o.isUsingKeyboardRef.current&&((d=c.current)==null||d.focus()),h.preventDefault()},onCloseAutoFocus:h=>h.preventDefault(),onFocusOutside:de(e.onFocusOutside,h=>{h.target!==l.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:de(e.onEscapeKeyDown,h=>{o.onClose(),h.preventDefault()}),onKeyDown:de(e.onKeyDown,h=>{var p;const d=h.currentTarget.contains(h.target),f=lbe[o.dir].includes(h.key);d&&f&&(i.onOpenChange(!1),(p=l.trigger)==null||p.focus(),h.preventDefault())})})})})})});Ez.displayName=Az;function Oz(e){return e?"open":"closed"}function Yb(e){return e==="indeterminate"}function dT(e){return Yb(e)?"indeterminate":e?"checked":"unchecked"}function Pbe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Tbe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Abe(e,t,n){const a=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let o=Tbe(e,Math.max(i,0));a.length===1&&(o=o.filter(u=>u!==n));const c=o.find(u=>u.toLowerCase().startsWith(a.toLowerCase()));return c!==n?c:void 0}function Ebe(e,t){const{x:n,y:r}=e;let a=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){const l=t[i],c=t[o],u=l.x,h=l.y,d=c.x,f=c.y;h>r!=f>r&&n<(d-u)*(r-h)/(f-h)+u&&(a=!a)}return a}function Obe(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Ebe(n,t)}function ym(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Rbe=fz,Ibe=sT,Mbe=mz,Dbe=gz,$be=cT,Lbe=yz,Fbe=f0,Bbe=bz,Wbe=wz,qbe=kz,Ube=Sz,zbe=Nz,Hbe=Cz,Vbe=Tz,Gbe=Ez,p0="DropdownMenu",[Ybe,xHe]=Hn(p0,[dz]),ra=dz(),[Kbe,Rz]=Ybe(p0),Iz=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:a,defaultOpen:i,onOpenChange:o,modal:l=!0}=e,c=ra(t),u=g.useRef(null),[h,d]=ba({prop:a,defaultProp:i??!1,onChange:o,caller:p0});return s.jsx(Kbe,{scope:t,triggerId:Oa(),triggerRef:u,contentId:Oa(),open:h,onOpenChange:d,onOpenToggle:g.useCallback(()=>d(f=>!f),[d]),modal:l,children:s.jsx(Rbe,{...c,open:h,onOpenChange:d,dir:r,modal:l,children:n})})};Iz.displayName=p0;var Mz="DropdownMenuTrigger",Dz=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...a}=e,i=Rz(Mz,n),o=ra(n);return s.jsx(Ibe,{asChild:!0,...o,children:s.jsx(we.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...a,ref:dw(t,i.triggerRef),onPointerDown:de(e.onPointerDown,l=>{!r&&l.button===0&&l.ctrlKey===!1&&(i.onOpenToggle(),i.open||l.preventDefault())}),onKeyDown:de(e.onKeyDown,l=>{r||(["Enter"," "].includes(l.key)&&i.onOpenToggle(),l.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});Dz.displayName=Mz;var Xbe="DropdownMenuPortal",$z=e=>{const{__scopeDropdownMenu:t,...n}=e,r=ra(t);return s.jsx(Mbe,{...r,...n})};$z.displayName=Xbe;var Lz="DropdownMenuContent",Fz=g.forwardRef((e,t)=>
867{const{__scopeDropdownMenu:n,...r}=e,a=Rz(Lz,n),i=ra(n),o=g.useRef(!1);return s.jsx(Dbe,{id:a.contentId,"aria-labelledby":a.triggerId,...i,...r,ref:t,onCloseAutoFocus:de(e.onCloseAutoFocus,l=>{var c;o.current||(c=a.triggerRef.current)==null||c.focus(),o.current=!1,l.preventDefault()}),onInteractOutside:de(e.onInteractOutside,l=>{const c=l.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,h=c.button===2||u;(!a.modal||h)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Fz.displayName=Lz;var Qbe="DropdownMenuGroup",Jbe=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=ra(n);return s.jsx($be,{...a,...r,ref:t})});Jbe.displayName=Qbe;var Zbe="DropdownMenuLabel",Bz=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=ra(n);return s.jsx(Lbe,{...a,...r,ref:t})});Bz.displayName=Zbe;var exe="DropdownMenuItem",Wz=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=ra(n);return s.jsx(Fbe,{...a,...r,ref:t})});Wz.displayName=exe;var txe="DropdownMenuCheckboxItem",qz=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=ra(n);return s.jsx(Bbe,{...a,...r,ref:t})});qz.displayName=txe;var nxe="DropdownMenuRadioGroup",rxe=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=ra(n);return s.jsx(Wbe,{...a,...r,ref:t})});rxe.displayName=nxe;var axe="DropdownMenuRadioItem",Uz=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=ra(n);return s.jsx(qbe,{...a,...r,ref:t})});Uz.displayName=axe;var sxe="DropdownMenuItemIndicator",zz=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=ra(n);return s.jsx(Ube,{...a,...r,ref:t})});zz.displayName=sxe;var ixe="DropdownMenuSeparator",Hz=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=ra(n);return s.jsx(zbe,{...a,...r,ref:t})});Hz.displayName=ixe;var oxe="DropdownMenuArrow",lxe=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=ra(n);return s.jsx(Hbe,{...a,...r,ref:t})});lxe.displayName=oxe;var cxe="DropdownMenuSubTrigger",Vz=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=ra(n);return s.jsx(Vbe,{...a,...r,ref:t})});Vz.displayName=cxe;var uxe="DropdownMenuSubContent",Gz=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=ra(n);return s.jsx(Gbe,{...a,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Gz.displayName=uxe;var dxe=Iz,hxe=Dz,fxe=$z,Yz=Fz,Kz=Bz,Xz=Wz,Qz=qz,Jz=Uz,Zz=zz,e7=Hz,t7=Vz,n7=Gz;const pxe=dxe,mxe=hxe,gxe=g.forwardRef(({className:e,inset:t,children:n,...r},a)=>s.jsxs(t7,{ref:a,className:K("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[state=open]:bg-accent focus:bg-accent",t&&"pl-8",e),...r,children:[n,s.jsx(Ma,{className:"ml-auto h-4 w-4"})]}));gxe.displayName=t7.displayName;const yxe=g.forwardRef(({className:e,...t},n)=>s.jsx(n7,{ref:n,className:K("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));yxe.displayName=n7.displayName;const r7=g.forwardRef(({className:e,sideOffset:t=4,...n},r)=>
867s.jsx(fxe,{children:s.jsx(Yz,{ref:r,sideOffset:t,className:K("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));r7.displayName=Yz.displayName;const RS=g.forwardRef(({className:e,inset:t,...n},r)=>s.jsx(Xz,{ref:r,className:K("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",t&&"pl-8",e),...n}));RS.displayName=Xz.displayName;const vxe=g.forwardRef(({className:e,children:t,checked:n,...r},a)=>s.jsxs(Qz,{ref:a,className:K("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),checked:n,...r,children:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(Zz,{children:s.jsx($t,{className:"h-4 w-4"})})}),t]}));vxe.displayName=Qz.displayName;const bxe=g.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(Jz,{ref:r,className:K("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...n,children:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(Zz,{children:s.jsx(FF,{className:"h-2 w-2 fill-current"})})}),t]}));bxe.displayName=Jz.displayName;const xxe=g.forwardRef(({className:e,inset:t,...n},r)=>s.jsx(Kz,{ref:r,className:K("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));xxe.displayName=Kz.displayName;const wxe=g.forwardRef(({className:e,...t},n)=>s.jsx(e7,{ref:n,className:K("-mx-1 my-1 h-px bg-muted",e),...t}));wxe.displayName=e7.displayName;const _xe=({onScheduled:e})=>{const[t,n]=g.useState(!1),{toast:r}=Je(),a=async i=>{var o,l,c,u;n(!0);try{const h=i==="today"?new Date:dt(new Date,1),d=Vh(h),f=await $v({platform:"linkedin",tone:"professional",goal:"engagement",trendPulseMode:!0,trendData:d});if(!f.success)throw new Error(f.error||"Generation failed");const p=((l=(o=f.data)==null?void 0:o.variations)==null?void 0:l.strategic)||((c=f.data)==null?void 0:c.content);if(!p)throw new Error("Failed to generate content");const y=`${ge(h,"yyyy-MM-dd")}T09:00:00`,m=await n0({content:p,platforms:["linkedin"],source:"trendspro",scheduled:!0,scheduledDatetime:y,trendType:d.source||"quick_quiz"});if(!m.success)throw new Error(m.message);r({title:"TrendsPRO post scheduled!",description:`A "${d.name}" post has been scheduled for ${i==="today"?"today":"tomorrow"} at 9:00 AM.`}),e()}catch(h){const d=(u=h==null?void 0:h.context)==null?void 0:u.body;let f=(h==null?void 0:h.message)||"Quick add failed";if(typeof d=="string")try{const p=JSON.parse(d);f=(p==null?void 0:p.error)||(p==null?void 0:p.message)||f,p!=null&&p.requestId&&(f+=` (Request ID: ${p.requestId})`)}catch{}r({title:"Quick add failed",description:f,variant:"destructive"})}finally{n(!1)}};return s.jsxs(pxe,{children:[s.jsx(mxe,{asChild:!0,children:s.jsxs(z,{variant:"outline",disabled:t,children:[t?s.jsx(ce,{className:"mr-2 h-4 w-4 animate-spin"}):s.jsx(Se,{className:"mr-2 h-4 w-4 text-accent"}),"Add Today's Trend"]})}),s.jsxs(r7,{align:"end",children:[s.jsx(RS,{onClick:()=>a("today"),children:"Schedule for Today (9 AM)"}),s.jsx(RS,{onClick:()=>a("tomorrow"),children:"Schedule for Tomorrow (9 AM)"})]})]})},kxe=[{id:"linkedin",name:"LinkedIn"},{id:"instagram",name:"Instagram"},{id:"facebook",name:"Facebook"}],jxe=["08:00","09:00","10:00","11:00","12:00","14:00","15:00","16:00","17:00","18:00"],Sxe=[{value:"none",label:"Just this once"},{value:"weekly",label:"Every week"},{value:"daily",label:"Every day"}],Nxe=({open:e,onOpenChange:t,onScheduled:n,initialDate:r})=>{const{getConnectedPlatforms:a}=Hl(),i=a(),{toast:o}=Je(),[l,c]=g.useState("select-trend"),[u,h]=g.useState(null),[d,f]=g.useState(r||new Date),[p,y]=g.useState([]),[m,v]=g.useState("09:00"),[b,x]=g.useState("none"),[w,_]=g.useState(!1),[k,j]=g.useState(!1),S=Array.from({length:7},($,R)=>dt(new Date,R)),N=($,R)=>{h($),f(R),c("configure")},C=()=>{j(!0),h({name:"Auto-follow daily trend",strength:"strong",themes:["auto"],source:"quick_quiz"}),c("configure")},M=$=>{y(R=>R.includes($)?R.length===1?R:R.filter(I=>I!==$):[...R,$])},O=async()=>
867{if(!u||p.length===0){o({title:"Missing selection",description:"Please select at least one platform.",variant:"destructive"});return}_(!0);try{const{data:{user:$}}=await W.auth.getUser();if(!$)throw new Error("Not authenticated");let R=[d];b==="weekly"?R=Array.from({length:12},(E,T)=>fr(d,T)):b==="daily"&&(R=Array.from({length:30},(E,T)=>dt(d,T)));const I=[],P=b!=="none"?crypto.randomUUID():null;for(let E=0;E<R.length;E++){const T=R[E],L=E===0,B=k?Vh(T):u,H=p.length>1?crypto.randomUUID():null,G=p.map(Z=>({user_id:$.id,platform:Z,content:`✨ Today's Trend: ${B.name}
868
869[Your take on this trend goes here]
870
871#TrendsPRO #${Z}`,scheduled_date:ge(T,"yyyy-MM-dd"),scheduled_time:m+":00",status:"pending",group_id:H,trend_name:B.name,trend_date:ge(T,"yyyy-MM-dd"),trend_variant:"strategic",trend_mode:k?"auto":"specific",recurrence_type:L&&b!=="none"?b:null,recurrence_parent_id:L?null:P,is_recurring_instance:!L}));I.push(...G)}const{error:A}=await W.from("scheduled_posts").insert(I);if(A)throw A;o({title:"Trend scheduled! ✨",description:b!=="none"?`Scheduled ${R.length} trend posts across ${p.length} platform(s).`:`Trend post scheduled for ${ge(d,"MMM d")} at ${m}.`}),c("select-trend"),h(null),y([]),j(!1),x("none"),t(!1),n()}catch($){o({title:"Scheduling failed",description:$.message,variant:"destructive"})}finally{_(!1)}},D=()=>{c("select-trend"),h(null),j(!1)};return s.jsx(An,{open:e,onOpenChange:t,children:s.jsxs(En,{className:"sm:max-w-[500px]",children:[s.jsxs(wn,{children:[s.jsxs(_n,{className:"flex items-center gap-2",children:[s.jsx(Se,{className:"h-5 w-5 text-accent"}),"Quick Schedule Trend"]}),s.jsx(Zr,{children:l==="select-trend"?"Select a trend to schedule — no content needed":"Configure when and where to post"})]}),s.jsx(Wr,{mode:"wait",children:l==="select-trend"?s.jsxs(fe.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},className:"space-y-4",children:[s.jsx("button",{type:"button",onClick:C,className:"w-full p-4 rounded-lg border-2 border-dashed border-accent/50 hover:border-accent hover:bg-accent/5 transition-all text-left",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"p-2 rounded-full bg-accent/10",children:s.jsx(Qc,{className:"h-5 w-5 text-accent"})}),s.jsxs("div",{children:[s.jsx("div",{className:"font-medium text-foreground",children:"Auto-follow daily trends"}),s.jsx("div",{className:"text-sm text-muted-foreground",children:"Automatically uses each day's top trend"})]}),s.jsx(Ma,{className:"h-5 w-5 text-muted-foreground ml-auto"})]})}),s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:"absolute inset-0 flex items-center",children:s.jsx("div",{className:"w-full border-t border-border"})}),s.jsx("div",{className:"relative flex justify-center text-xs",children:s.jsx("span",{className:"bg-background px-2 text-muted-foreground",children:"or pick a specific trend"})})]}),s.jsx(ya,{className:"h-[300px]",children:s.jsx("div",{className:"space-y-2",children:S.map($=>{const I=xq($)[0],P=ge($,"yyyy-MM-dd")===ge(new Date,"yyyy-MM-dd");return s.jsx("button",{type:"button",onClick:()=>N(I,$),className:"w-full p-3 rounded-lg border border-border hover:border-primary/50 hover:bg-muted/30 transition-all text-left",children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsxs("div",{className:K("text-center min-w-[50px] p-2 rounded-lg",P?"bg-primary/10 text-primary":"bg-muted"),children:[s.jsx("div",{className:"text-xs font-medium",children:ge($,"EEE")}),s.jsx("div",{className:"text-lg font-bold",children:ge($,"d")})]}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[s.jsx("span",{className:"text-lg",children:W2(I.source)}),s.jsx("span",{className:"font-medium text-foreground truncate",children:I.name}),s.jsx(je,{variant:"outline",className:K("text-xs",B2(I.strength)),children:I.strength})]}),s.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:I.themes.slice(0,2).map(A=>s.jsx("span",{className:"text-xs text-muted-foreground bg-muted/50 px-1.5 py-0.5 rounded",children:A},A))})]}),s.jsx(Ma,{className:"h-5 w-5 text-muted-foreground flex-shrink-0"})]})},$.toISOString())})})})]},"select"):s.jsxs(fe.div,{initial:{opacity:0,x:20}
871,animate:{opacity:1,x:0},exit:{opacity:0,x:20},className:"space-y-5",children:[s.jsxs("div",{className:"p-3 rounded-lg bg-accent/10 border border-accent/20",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[k?s.jsx(Qc,{className:"h-4 w-4 text-accent"}):s.jsx(Se,{className:"h-4 w-4 text-accent"}),s.jsx("span",{className:"font-medium text-foreground",children:u==null?void 0:u.name})]}),!k&&s.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:ge(d,"EEEE, MMMM d, yyyy")}),s.jsx(z,{variant:"ghost",size:"sm",className:"mt-2 h-7 text-xs",onClick:D,children:"← Change trend"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{children:"Platforms"}),i.length===0?s.jsx("p",{className:"text-sm text-muted-foreground",children:"Connect accounts in Settings first."}):s.jsx("div",{className:"flex flex-wrap gap-2",children:kxe.map($=>{const R=i.includes($.id),I=p.includes($.id);return s.jsxs("button",{type:"button",onClick:()=>R&&M($.id),disabled:!R,className:K("rounded-lg px-4 py-2 text-sm font-medium transition-all flex items-center gap-2",!R&&"opacity-40 cursor-not-allowed",I&&R?"bg-primary text-primary-foreground":R?"bg-muted text-muted-foreground hover:bg-muted/80":"bg-muted/50 text-muted-foreground"),children:[I&&s.jsx($t,{className:"h-4 w-4"}),$.name]},$.id)})})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{children:"Post Time"}),s.jsxs(jt,{value:m,onValueChange:v,children:[s.jsx(mt,{children:s.jsx(Ct,{})}),s.jsx(gt,{children:jxe.map($=>s.jsx(Ee,{value:$,children:$},$))})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{children:"Frequency"}),s.jsxs(jt,{value:b,onValueChange:x,children:[s.jsx(mt,{children:s.jsx(Ct,{})}),s.jsx(gt,{children:Sxe.map($=>s.jsx(Ee,{value:$.value,children:$.label},$.value))})]}),b!=="none"&&s.jsx("p",{className:"text-xs text-muted-foreground",children:b==="weekly"?"12 posts over 3 months":"30 daily posts"})]}),s.jsx(z,{className:"w-full",size:"lg",onClick:O,disabled:w||p.length===0,children:w?s.jsxs(s.Fragment,{children:[s.jsx(ce,{className:"mr-2 h-4 w-4 animate-spin"}),"Scheduling..."]}):s.jsxs(s.Fragment,{children:[s.jsx(Mn,{className:"mr-2 h-4 w-4"}),"Schedule Trend"]})})]},"configure")})]})})},Hy=[{value:0,label:"Sunday"},{value:1,label:"Monday"},{value:2,label:"Tuesday"},{value:3,label:"Wednesday"},{value:4,label:"Thursday"},{value:5,label:"Friday"},{value:6,label:"Saturday"}],vM=[{id:"linkedin",name:"LinkedIn"},{id:"facebook",name:"Facebook"},{id:"instagram",name:"Instagram"}],bM="5e84bdde-affe-49e0-ab4d-fa072da5d208",Cxe=({onScheduled:e})=>{var E;const{getConnectedPlatforms:t}=Hl(),n=t(),{toast:r}=Je(),{gateAction:a,showTrialModal:i,setShowTrialModal:o,startFreeTrial:l}=Ng(),[c,u]=g.useState(!1),[h,d]=g.useState("intro"),[f,p]=g.useState(2),[y,m]=g.useState(["linkedin"]),[v,b]=g.useState("10:00"),[x,w]=g.useState(!1),[_,k]=g.useState(!1),[j,S]=g.useState([]),[N,C]=g.useState(!1);g.useEffect(()=>{c&&j.length===0&&M()},[c]);const M=async()=>{C(!0);try{const{data:T,error:L}=await W.from("library_posts").select("id, content, title, post_group, position, week_number").eq("library_id",bM).eq("is_active",!0).order("position",{ascending:!0});if(L)throw L;S(T||[])}catch(T){console.error("Failed to load library posts:",T),r({title:"Failed to load content library",description:T.message,variant:"destructive"})}finally{C(!1)}},O=T=>{m(L=>L.includes(T)?L.length===1?L:L.filter(B=>B!==T):[...L,T])},D=async()=>{var T,L;if(a("activate_clickpro")){if(y.length===0){r({title:"Select a platform",description:"Please choose at least one platform for your content series.",variant:"destructive"});return}if(j.length===0){r({title:"No content available",description:"Please wait for the content library to load.",variant:"destructive"});return}w(!0);try{const{data:{user:B}}=await W.auth.getUser();if(!B)throw new Error("Not authenticated");const H=crypto.randomUUID(),{data:G,error:Z}=await W.from("user_library_subscriptions").insert({user_id:B.id,library_id:bM,schedule_day:(T=Hy.find(ve=>ve.value===f))==null?void 0:T.label.toLowerCase(),schedule_time:v+":00",platforms:y,weeks_scheduled:j.length,batch_id:H,is_active:!0}).select("id").single();if(Z)throw Z;const le=[],ue=crypto.randomUUID(),re=new Date;let q=lM(re,f,{weekStartsOn:0});q<=re&&(q=fr(q,1));for(let ve=0;ve<j.length;ve++){const De=fr(q,ve),Le=j[ve],He=ve===0,vt=y.length>1?crypto.randomUUID():null,lt=y.map(Pt=>({user_id:B.id,platform:Pt,content:Le.content,scheduled_date:ge(De,"yyyy-MM-dd"),scheduled_time:v+":00",status:"pending",group_id:vt,trend_name:Le.title||`Week ${ve+1}: ${Le.post_group}`,trend_variant:"evergreen",trend_mode:"series",recurrence_type:He?"weekly":null,recurrence_parent_id:He?null:ue,is_recurring_instance:!He,is_evergreen:!0,evergreen_group:Le.post_group,library_subscription_id:G.id,library_post_id:Le.id,auto_schedule_batch_id:H,industry_role:currentVertical||"authoritypro"}));le.push(...lt)}const{error:U}=await W.from("scheduled_posts").insert(le);if(U)throw U;const Q=Math.ceil(j.length),J=Math.floor(Q/52),Y=Q%52,oe=J>0?`${J} year${J>1?"s":""}${Y>0?` and ${Y} weeks`:""}`:`${Y} weeks`;r({title:`${j.length}-Week Content Series Activated! 🎉`,description:`${j.length} posts scheduled (${oe}) every ${(L=Hy.find(ve=>ve.value===f))==null?void 0:L.label} at ${v}.`}),k(!0),u(!1),e==null||e()}catch(B){r({title:"Setup failed",description:B.message,variant:"destructive"})}finally{w(!1)}}},$=()=>{const T=new Date;let L=lM(T,f,{weekStartsOn:0});return L<=T&&(L=fr(L,1)),L},R=j.length||104,I=Math.floor(R/52),P=R%52,A=I>0?`${I} year${I>1?"s":""}${P>0?` + ${P} weeks`:""}`:`${P} weeks`;return s.jsxs(s.Fragment,{children:[s.jsxs(An,{open:c,onOpenChange:u,children:[s.jsx(dm,{asChild:!0,children:s.jsx(fe.button,{type:"button",whileHover:{scale:1.01},whileTap:{scale:.99},className:K("w-full p-4 rounded-xl border-2 text-left transition-all",_?"border-green-500/50 bg-green-500/5":"border-dashed border-primary/30 hover:border-primary/60 hover:bg-primary/5"),children:s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx("div",{className:K("p-3 rounded-full",_?"bg-green-500/10":"bg-primary/10"),children:s.jsx(zF,{className:K("h-6 w-6",_?"text-green-500":"text-primary")})}),s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"font-semibold text-foreground",children:"Daily Authority Frameworks"}),_&&s.jsxs("span",{className:"flex items-center gap-1 text-xs text-green-600 bg-green-500/10 px-2 py-0.5 rounded-full",children:[s.jsx($t,{className:"h-3 w-3"})," Active"]})]}),s.jsx("p",{className:"text-sm text-muted-foreground mt-0.5",children:_?`${R} posts scheduled for ${A}`:`Schedule ${A} of professional real estate content`})]}),s.jsx(Ma,{className:"h-5 w-5 text-muted-foreground"})]})})}),s.jsxs(En,{className:"sm:max-w-[480px]",children:[s.jsxs(wn,{children:[s.jsxs(_n,{className:"flex items-center gap-2",children:[s.jsx(fc,{className:"h-5 w-5 text-primary"}),"Daily Real Estate Authority Frameworks"]}),s.jsx(Zr,{children:"One click. Continuous authority content. Set it and forget it."})]}),s.jsx(Wr,{mode:"wait",children:h==="intro"?s.jsxs(fe.div,{initial:{opacity:0,y:10}
871,animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"space-y-6 py-4",children:[s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("div",{className:"p-2 rounded-lg bg-primary/10",children:s.jsx(Mn,{className:"h-5 w-5 text-primary"})}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-medium text-foreground",children:"Continuous Authority Engine"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Expertly crafted authority frameworks covering buyer guidance, seller strategy, homeowner tips, and market education."})]})]}),s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("div",{className:"p-2 rounded-lg bg-accent/10",children:s.jsx(Se,{className:"h-5 w-5 text-accent"})}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-medium text-foreground",children:"Balanced Content Mix"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Each week rotates through 4 content pillars—keeping your feed fresh and your audience engaged."})]})]}),s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("div",{className:"p-2 rounded-lg bg-green-500/10",children:s.jsx($t,{className:"h-5 w-5 text-green-500"})}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-medium text-foreground",children:"Set & Forget"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Choose your day and time. Posts publish automatically every week for 2 full years."})]})]})]}),N?s.jsxs(z,{className:"w-full",size:"lg",disabled:!0,children:[s.jsx(ce,{className:"mr-2 h-4 w-4 animate-spin"}),"Loading Content Library..."]}):s.jsxs(z,{className:"w-full",size:"lg",onClick:()=>d("configure"),children:["Schedule ",R," Posts",s.jsx(Ma,{className:"ml-2 h-4 w-4"})]})]},"intro"):s.jsxs(fe.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"space-y-5 py-4",children:[s.jsxs("div",{className:"space-y-3",children:[s.jsx(X,{children:"Post every week on:"}),s.jsx("div",{className:"grid grid-cols-4 gap-2",children:Hy.slice(1,6).map(T=>s.jsx("button",{type:"button",onClick:()=>p(T.value),className:K("p-2 rounded-lg text-sm font-medium transition-all",f===T.value?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"),children:T.label.slice(0,3)},T.value))})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsx(X,{children:"Post to:"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:vM.map(T=>{const L=n.includes(T.id),B=y.includes(T.id);return s.jsxs("button",{type:"button",onClick:()=>L&&O(T.id),disabled:!L,className:K("rounded-lg px-4 py-2 text-sm font-medium transition-all flex items-center gap-2",!L&&"opacity-40 cursor-not-allowed",B&&L?"bg-primary text-primary-foreground":L?"bg-muted text-muted-foreground hover:bg-muted/80":"bg-muted/50 text-muted-foreground"),children:[B&&s.jsx($t,{className:"h-4 w-4"}),T.name]},T.id)})}),n.length===0&&s.jsx("p",{className:"text-sm text-muted-foreground",children:"Connect accounts in Settings first."})]}),s.jsxs("div",{className:"p-4 rounded-lg bg-muted/50 border border-border",children:[s.jsx("h4",{className:"font-medium text-foreground mb-2",children:"Series Summary"}),s.jsxs("ul",{className:"space-y-1 text-sm text-muted-foreground",children:[s.jsxs("li",{children:["• First post: ",ge($(),"EEEE, MMMM d, yyyy")]}),s.jsxs("li",{children:["• Frequency: Every ",(E=Hy.find(T=>T.value===f))==null?void 0:E.label," at ",v]}),s.jsxs("li",{children:["• Total posts: ",R," (",A,")"]}),s.jsxs("li",{children:["• Platforms: ",y.map(T=>{var L;return(L=vM.find(B=>B.id===T))==null?void 0:L.name}).join(", ")||"None selected"]}),s.jsx("li",{children:"• Content: Buyer, Seller, DIY, Market (rotating)"})]})]}),s.jsxs("div",{className:"flex gap-3",children:[s.jsx(z,{variant:"outline",className:"flex-1",onClick:()=>d("intro"),children:"Back"}),s.jsx(z,{className:"flex-1",onClick:D,disabled:x||y.length===0,children:x?s.jsxs(s.Fragment,{children:[s.jsx(ce,{className:"mr-2 h-4 w-4 animate-spin"}),"Scheduling..."]}):s.jsxs(s.Fragment,{children:[s.jsx($t,{className:"mr-2 h-4 w-4"}),"Activate ",R," Posts"]})})]})]},"configure")})]})]}),s.jsx(c0,{open:i,onOpenChange:o,onActivate:l})]})};var a7="AlertDialog",[Pxe,wHe]=Hn(a7,[OW]),Ro=OW(),s7=e=>{const{__scopeAlertDialog:t,...n}=e,r=Ro(t);return s.jsx(N2,{...r,...n,modal:!0})};s7.displayName=a7;var Txe="AlertDialogTrigger",i7=g.forwardRef((e,t)=>
871{const{__scopeAlertDialog:n,...r}=e,a=Ro(n);return s.jsx(C2,{...a,...r,ref:t})});i7.displayName=Txe;var Axe="AlertDialogPortal",o7=e=>{const{__scopeAlertDialog:t,...n}=e,r=Ro(t);return s.jsx(P2,{...r,...n})};o7.displayName=Axe;var Exe="AlertDialogOverlay",l7=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=Ro(n);return s.jsx(Gw,{...a,...r,ref:t})});l7.displayName=Exe;var Nd="AlertDialogContent",[Oxe,Rxe]=Pxe(Nd),Ixe=dF("AlertDialogContent"),c7=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...a}=e,i=Ro(n),o=g.useRef(null),l=Fe(t,o),c=g.useRef(null);return s.jsx(Fhe,{contentName:Nd,titleName:u7,docsSlug:"alert-dialog",children:s.jsx(Oxe,{scope:n,cancelRef:c,children:s.jsxs(Yw,{role:"alertdialog",...i,...a,ref:l,onOpenAutoFocus:de(a.onOpenAutoFocus,u=>{var h;u.preventDefault(),(h=c.current)==null||h.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[s.jsx(Ixe,{children:r}),s.jsx(Dxe,{contentRef:o})]})})})});c7.displayName=Nd;var u7="AlertDialogTitle",d7=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=Ro(n);return s.jsx(Kw,{...a,...r,ref:t})});d7.displayName=u7;var h7="AlertDialogDescription",f7=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=Ro(n);return s.jsx(Xw,{...a,...r,ref:t})});f7.displayName=h7;var Mxe="AlertDialogAction",p7=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=Ro(n);return s.jsx(Qw,{...a,...r,ref:t})});p7.displayName=Mxe;var m7="AlertDialogCancel",g7=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:a}=Rxe(m7,n),i=Ro(n),o=Fe(t,a);return s.jsx(Qw,{...i,...r,ref:o})});g7.displayName=m7;var Dxe=({contentRef:e})=>{const t=`\`${Nd}\` requires a description for the component to be accessible for screen reader users.
872
873You can add a description to the \`${Nd}\` by passing a \`${h7}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
874
875Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Nd}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
876
877For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return g.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},$xe=s7,Lxe=i7,Fxe=o7,y7=l7,v7=c7,b7=p7,x7=g7,w7=d7,_7=f7;const m0=$xe,k7=Lxe,Bxe=Fxe,j7=g.forwardRef(({className:e,...t},n)=>s.jsx(y7,{className:K("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));j7.displayName=y7.displayName;const Fg=g.forwardRef(({className:e,...t},n)=>s.jsxs(Bxe,{children:[s.jsx(j7,{}),s.jsx(v7,{ref:n,className:K("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));Fg.displayName=v7.displayName;const Bg=({className:e,...t})=>s.jsx("div",{className:K("flex flex-col space-y-2 text-center sm:text-left",e),...t});Bg.displayName="AlertDialogHeader";const Wg=({className:e,...t})=>s.jsx("div",{className:K("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Wg.displayName="AlertDialogFooter";const qg=g.forwardRef(({className:e,...t},n)=>s.jsx(w7,{ref:n,className:K("text-lg font-semibold",e),...t}));qg.displayName=w7.displayName;const Ug=g.forwardRef(({className:e,...t},n)=>s.jsx(_7,{ref:n,className:K("text-sm text-muted-foreground",e),...t}));Ug.displayName=_7.displayName;const zg=g.forwardRef(({className:e,...t},n)=>s.jsx(b7,{ref:n,className:K(um(),e),...t}));zg.displayName=b7.displayName;const Hg=g.forwardRef(({className:e,...t},n)=>s.jsx(x7,{ref:n,className:K(um({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Hg.displayName=x7.displayName;const Af={realtor:{libraryId:"5e84bdde-affe-49e0-ab4d-fa072da5d208",icon:yi,color:"text-emerald-500",bgColor:"bg-emerald-500/10",borderColor:"border-emerald-500/30 hover:border-emerald-500",label:"RealtorPRO",description:"Real estate marketing for agents and brokers",isMassMarket:!1},financial_advisor:{libraryId:"a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d",icon:gd,color:"text-indigo-500",bgColor:"bg-indigo-500/10",borderColor:"border-indigo-500/30 hover:border-indigo-500",label:"AdvisorPRO",description:"Compliance-ready content for financial advisors",isMassMarket:!1},builder_remodeler:{libraryId:"b7c3d4e5-f6a7-4b8c-9d0e-1f2a3b4c5d6e",icon:pP,color:"text-amber-500",bgColor:"bg-
877amber-500/10",borderColor:"border-amber-500/30 hover:border-amber-500",label:"BuilderPRO",description:"Project showcases and trust-building content",isMassMarket:!1},property_manager:{libraryId:"f4a5b6c7-d8e9-4f0a-1b2c-3d4e5f6a7b8c",icon:vw,color:"text-teal-500",bgColor:"bg-teal-500/10",borderColor:"border-teal-500/30 hover:border-teal-500",label:"PropertyManagerPRO",description:"Tenant & owner content for property managers",isMassMarket:!1},host:{libraryId:"a7b8c9d0-e1f2-4a3b-5c6d-7e8f9a0b1c2d",icon:dP,color:"text-rose-500",bgColor:"bg-rose-500/10",borderColor:"border-rose-500/30 hover:border-rose-500",label:"HostPRO",description:"Short-term rental & vacation property content",isMassMarket:!1},restaurantpro:{libraryId:"b8c9d0e1-f2a3-4b5c-6d7e-8f9a0b1c2d3e",icon:_w,color:"text-orange-600",bgColor:"bg-orange-600/10",borderColor:"border-orange-600/30 hover:border-orange-600",label:"RestaurantPRO",description:"Restaurant & hospitality marketing content",isMassMarket:!1},insurance:{libraryId:"d4e5f6a7-b8c9-4d0e-1f2a-3b4c5d6e7f8a",icon:Ea,color:"text-blue-500",bgColor:"bg-blue-500/10",borderColor:"border-blue-500/30 hover:border-blue-500",label:"InsurancePRO",description:"Insurance agent marketing content",isMassMarket:!1},mortgage:{libraryId:"e5f6a7b8-c9d0-4e1f-2a3b-4c5d6e7f8a9b",icon:gi,color:"text-purple-500",bgColor:"bg-purple-500/10",borderColor:"border-purple-500/30 hover:border-purple-500",label:"MortgagePRO",description:"Mortgage broker & loan officer content",isMassMarket:!1},personal:{libraryId:"c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f",icon:Si,color:"text-sky-500",bgColor:"bg-sky-500/10",borderColor:"border-sky-500/30 hover:border-sky-500",label:"PersonalPRO",description:"Build your personal brand with authentic content",isMassMarket:!0},creator:{libraryId:"d2e3f4a5-b6c7-4d8e-9f0a-1b2c3d4e5f6a",icon:KF,color:"text-pink-500",bgColor:"bg-pink-500/10",borderColor:"border-pink-500/30 hover:border-pink-500",label:"CreatorPRO",description:"Hot takes, threads, and engagement content",isMassMarket:!0},side_hustle:{libraryId:"e3f4a5b6-c7d8-4e9f-0a1b-2c3d4e5f6a7b",icon:db,color:"text-orange-500",bgColor:"bg-orange-500/10",borderColor:"border-orange-500/30 hover:border-orange-500",label:"SideHustlePRO",description:"Grow your side business with authentic stories",isMassMarket:!0},authoritypro:{libraryId:"c9d0e1f2-a3b4-4c5d-6e7f-8a9b0c1d2e3f",icon:Tn,color:"text-violet-500",bgColor:"bg-violet-500/10",borderColor:"border-violet-500/30 hover:border-violet-500",label:"AuthorityPRO",description:"Corporate authority & category leadership content",isMassMarket:!1},freelance_consultant:{libraryId:"5d0db8f7-344c-42c4-8750-2a167b3dd8fb",icon:mw,color:"text-cyan-600",bgColor:"bg-cyan-600/10",borderColor:"border-cyan-600/30 hover:border-cyan-600",label:"FreelanceConsultantPRO",description:"Freelancer and consultant authority content",isMassMarket:!1},personal_trainer:{libraryId:"",icon:Si,color:"text-lime-600",bgColor:"bg-lime-600/10",borderColor:"border-lime-600/30 hover:border-lime-600",label:"PersonalTrainerPRO",description:"Fitness coaching and personal training content",isMassMarket:!1},course_coach:{libraryId:"",icon:Ms,color:"text-fuchsia-600",bgColor:"bg-fuchsia-600/10",borderColor:"border-fuchsia-600/30 hover:border-fuchsia-600",label:"CourseCoachPRO",description:"Course creator and coaching authority content",isMassMarket:!1}},Wxe={realtor:{day:"Tuesday",time:"09:00",confidence:"High",rationale:"Real estate buyers are most active mid-morning on weekdays."},financial_advisor:{day:"Wednesday",time:"08:00",confidence:"High",rationale:"Financial content performs best early morning when professionals check feeds."},builder_remodeler:{day:"Thursday",time:"10:00",confidence:"Medium",rationale:"Home improvement research peaks mid-week, late morning."},property_manager:{day:"Monday",time:"09:00",confidence:"Medium",rationale:"Property managers check updates at the start of the week."},host:{day:"Friday",time:"11:00",confidence:"High",rationale:"Travel planners search for rentals on Fridays — perfect timing."},restaurantpro:{day:"Thursday",time:"11:30",confidence:"High",rationale:"Restaurant discovery peaks Thursday as people plan weekend dining."},personal:{day:"Wednesday",time:"12:00",confidence:"Medium",rationale:"Personal content peaks at midweek lunchtime scrolls."},creator:{day:"Tuesday",time:"18:00",confidence:"High",rationale:"Creator content peaks in evening after-work scroll sessions."},side_hustle:{day:"Monday",time:"07:00",confidence:"Medium",rationale:"Hustle-minded audie
877nces check motivation content early week, early morning."},authoritypro:{day:"Tuesday",time:"08:00",confidence:"High",rationale:"B2B and thought leadership performs best Tuesday mornings on LinkedIn."},insurance:{day:"Wednesday",time:"10:00",confidence:"Low",rationale:"General mid-week morning based on industry benchmarks."},mortgage:{day:"Wednesday",time:"10:00",confidence:"Low",rationale:"General mid-week morning based on industry benchmarks."},freelance_consultant:{day:"Tuesday",time:"08:00",confidence:"High",rationale:"LinkedIn professional audience peaks Tuesday mornings."},personal_trainer:{day:"Monday",time:"06:00",confidence:"High",rationale:"Fitness audiences are most active early morning at the start of the week."},course_coach:{day:"Wednesday",time:"09:00",confidence:"Medium",rationale:"Course and coaching content performs well mid-week mornings."}},Vy=[{value:"America/New_York",label:"Eastern Time (ET)"},{value:"America/Chicago",label:"Central Time (CT)"},{value:"America/Denver",label:"Mountain Time (MT)"},{value:"America/Los_Angeles",label:"Pacific Time (PT)"},{value:"America/Anchorage",label:"Alaska Time (AKT)"},{value:"Pacific/Honolulu",label:"Hawaii Time (HT)"},{value:"America/Toronto",label:"Eastern Time – Canada (ET)"},{value:"America/Vancouver",label:"Pacific Time – Canada (PT)"},{value:"Europe/London",label:"Greenwich Mean Time (GMT)"},{value:"Europe/Paris",label:"Central European Time (CET)"},{value:"Asia/Kolkata",label:"India Standard Time (IST)"},{value:"Australia/Sydney",label:"Australian Eastern Time (AET)"}];function qxe(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return"America/New_York"}}function Uxe(e){return{sunday:0,monday:1,tuesday:2,wednesday:3,thursday:4,friday:5,saturday:6}[e.toLowerCase()]??2}function zxe(e,t){const n=new Date(e),r=n.getDay();let a=t-r;return a<0&&(a+=7),n.setDate(n.getDate()+a),n}function Hxe({onScheduled:e}){var re,q;const{toast:t}=Je(),{isAdmin:n}=Sg(),{currentVertical:r}=Fa(),[a,i]=g.useState(!1),[o,l]=g.useState(!1),[c,u]=g.useState(!1),[h,d]=g.useState(52),[f,p]=g.useState(1),[y,m]=g.useState(r||"authoritypro"),[v,b]=g.useState([]),[x,w]=g.useState("module");g.useEffect(()=>{r&&Af[r]&&m(r)},[r]);const[_,k]=g.useState("adaptive"),[j,S]=g.useState(void 0),[N,C]=g.useState(!1),[M,O]=g.useState("09:00"),[D,$]=g.useState(qxe()),R=_==="adaptive",I=Wxe[y],P=R&&I?I.time:M,A=R&&I?Uxe(I.day):2,E=()=>{if(j)return zxe(va(j),A);const U=new Date;return U.setDate(U.getDate()+1),va(U)};g.useEffect(()=>{a&&(async()=>{const{data:Q,error:J}=await W.from("industry_modules").select("*").eq("is_active",!0).order("slug");!J&&Q&&b(Q)})()},[a]),g.useEffect(()=>{R&&I&&O(I.time)},[R,y]);const T=U=>{const Q=Af[U];if(!(Q!=null&&Q.libraryId)){t({title:"Coming Soon",description:`${(Q==null?void 0:Q.label)||U} content library is not yet available.`});return}m(U),w("schedule")},L=U=>{p(U),d(U===1?52:104),l(!0)},B=async()=>{var Q;l(!1),u(!0);const U=Af[y];if(!(U!=null&&U.libraryId)){t({title:"Error",description:"No content library available for this module.",variant:"destructive"}),u(!1);return}try{const{data:{user:J}}=await W.auth.getUser();if(!J)throw new Error("Not authenticated");const{data:Y}=await W.from("social_connections").select("platform").eq("user_id",J.id).eq("is_connected",!0),oe=(Y||[]).map(qe=>qe.platform),ve=oe.includes("linkedin")?"linkedin":oe[0]||"linkedin",{data:De,error:Le}=await W.from("library_posts").select("id, content, title, post_group, position, week_number").eq("library_id",U.libraryId).eq("is_active",!0).order("position",{ascending:!0}).limit(h);if(Le)throw Le;if(!De||De.length===0)throw new Error("No posts available in the library for your module");const He=E(),vt=P+":00",lt=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"][A],Pt=crypto.randomUUID(),{data:te,error:ne}=await W.from("user_library_subscriptions").insert({user_id:J.id,library_id:U.libraryId,schedule_day:lt,schedule_time:vt,platforms:[ve],weeks_scheduled:De.length,batch_id:Pt,is_active:!0,industry_module:y}).select("id").single();if(ne)throw ne;const ye=[],Ge=crypto.randomUUID(),st=3;if(f===2)for(let qe=0;qe<52;qe++){const ln=qe*2,Tt=qe*2+1;if(ln>=De.length)break;const Pr=fr(He,qe),gr=De[ln];if(ye.push({user_id:J.id,platform:ve,content:gr.content,scheduled_date:ge(Pr,"yyyy-MM-dd"),scheduled_time:vt,status:"pending",trend_name:gr.title||`Week ${qe+1}A: ${gr.post_group}`,trend_variant:"evergreen",trend_mode:"series",recurrence_type:qe===0?"weekly":null,recurrence_parent_id:qe===0?null:Ge,is_recurring_instance:qe!==0,is_evergreen:!0,evergreen_group:gr.post_group,library_subscription_id:te.id,library_post_id:gr.id,auto_schedule_batch_id:Pt,industry_role:y,industry_module:y}),Tt<De.length){const Tr=new Date(Pr);Tr.setDate(Tr.getDate()+st);const kn=De[Tt];ye.push({user_id:J.id,platform:ve,content:kn.content,scheduled_date:ge(Tr,"yyyy-MM-dd"),scheduled_time:vt,status:"pending",trend_name:kn.title||`Week ${qe+1}B: ${kn.post_group}`,trend_variant:"evergreen",trend_mode:"series",recurrence_type:null,recurrence_parent_id:Ge,is_recurring_instance:!0,is_evergreen:!0,evergreen_group:kn.post_group,library_subscription_id:te.id,library_post_id:kn.id,auto_schedule_batch_id:Pt,industry_role:y,industry_module:y})}}else for(let qe=0;qe<De.length;qe++){const ln=fr(He,qe),Tt=De[qe],Pr=qe===0;ye.push({user_id:J.id,platform:ve,content:Tt.content,scheduled_date:ge(ln,"yyyy-MM-dd"),scheduled_time:vt,status:"pending",trend_name:Tt.title||`Week ${qe+1}: ${Tt.post_group}`,trend_variant:"evergreen",trend_mode:"series",recurrence_type:Pr?"weekly":null,recurrence_parent_id:Pr?null:Ge,is_recurring_instance:!Pr,is_evergreen:!0,evergreen_group:Tt.post_group,library_subscription_id:te.id,library_post_id:Tt.id,auto_schedule_batch_id:Pt,industry_role:y,industry_module:y})}const{error:Ie}=await W.from("scheduled_posts").insert(ye);if(Ie)throw Ie;const St=((Q=Vy.find(qe=>qe.value===D))==null?void 0:Q.label)||D,qr=f===2?"2× per week":"1× per week";t({title:"Your year of marketing is done",description:`${ye.length} ${U.label} posts (${qr}) scheduled starting ${ge(He,"MMMM d, yyyy")} at ${P} (${St})`}),i(!1),w("module"),e==null||e()}catch(J){console.error("Failed to schedule posts:",J),t({title:"Failed to schedule posts",description:J.message,variant:"destructive"})}finally{u(!1)}},H=U=>{i(U),U||(w("module"),m(r||"authoritypro"),S(void 0),k("adaptive"),O("09:00"))},G=Af[y],Z=(G==null?void 0:G.icon)||gi,le=E(),ue={High:"text-emerald-500 bg-emerald-500/10",Medium:"text-amber-500 bg-amber-500/10",Low:"text-muted-foreground bg-muted"};return s.jsxs(s.Fragment,{children:[s.jsxs(An,{open:a,onOpenChange:H,children:[s.jsx(dm,{asChild:!0,children:s.jsx(fe.button,{whileHover:{scale:1.02},whileTap:{scale:.98},className:"w-full p-5 rounded-xl bg-gradient-to-br from-primary/15 via-primary/10 to-accent/10 border-2 border-primary/30 hover:border-primary/50 transition-all duration-300 group text-left shadow-lg shadow-primary/5",children:s.jsxs("div",{className:"flex items-start gap-4",children:[s.jsx("div",{className:"p-3 rounded-xl bg-gradient-to-br from-primary to-accent group-hover:scale-110 transition-transform",children:s.jsx(Tn,{className:"h-6 w-6 text-primary-foreground"})}),s.jsxs("div",{className:"flex-1",children:[s.jsxs("h4",{className:"font-bold text-lg text-foreground flex items-center gap-2",children:["ClickPRO",s.jsx(Se,{className:"h-4 w-4 text-accent"})]}),s.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"The only single-click, year-long marketing campaign in existence."})]}),s.jsx(Ma,{className:"h-5 w-5 text-muted-foreground group-hover:translate-x-1 transition-transform"})]})})}),s.jsx(En,{className:"sm:max-w-lg max-h-[90vh] overflow-y-auto",children:s.jsx(Wr,{mode:"wait",children:x==="module"?s.jsxs(fe.div,{initial:{opacity:0,x:-20}
877,animate:{opacity:1,x:0},exit:{opacity:0,x:20},transition:{duration:.2},children:[s.jsxs(wn,{children:[s.jsxs(_n,{className:"flex items-center gap-2",children:[s.jsx(Tn,{className:"h-5 w-5 text-primary"}),"ClickPRO"]}),s.jsx(Zr,{children:"Choose your industry to generate a year of tailored marketing content."})]}),s.jsx("div",{className:"space-y-3 py-4",children:Object.entries(Af).filter(([U])=>U!=="authoritypro"||n).map(([U,Q])=>{const J=Q.icon,Y=!!Q.libraryId;return s.jsx(fe.button,{whileHover:Y?{scale:1.02}:void 0,whileTap:Y?{scale:.98}:void 0,onClick:()=>T(U),disabled:!Y,className:K("w-full p-4 rounded-xl border-2 text-left transition-all",Q.borderColor,!Y&&"opacity-50 cursor-not-allowed"),children:s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx("div",{className:K("p-3 rounded-full",Q.bgColor),children:s.jsx(J,{className:K("h-5 w-5",Q.color)})}),s.jsxs("div",{className:"flex-1",children:[s.jsxs("span",{className:"font-medium text-foreground flex items-center gap-2",children:[Q.label,!Y&&s.jsx("span",{className:"text-xs bg-muted px-2 py-0.5 rounded-full text-muted-foreground",children:"Coming Soon"})]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:Q.description})]}),Y&&s.jsx(Ma,{className:"h-5 w-5 text-muted-foreground"})]})},U)})})]},"module"):s.jsxs(fe.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.2},children:[s.jsxs(wn,{children:[s.jsxs(_n,{className:"flex items-center gap-2",children:[s.jsx(Z,{className:K("h-5 w-5",G==null?void 0:G.color)}),G==null?void 0:G.label]}),s.jsx(Zr,{children:"Pre-written content. Auto-scheduled. One click."})]}),s.jsxs("div",{className:"space-y-5 py-4",children:[s.jsx("div",{className:"space-y-2",children:["Pre-written posts optimized for Facebook","Rotating topics tailored to your industry","Edit, pause, or delete anytime"].map(U=>s.jsxs("div",{className:"flex items-center gap-3 text-sm",children:[s.jsx($t,{className:"h-4 w-4 text-primary shrink-0"}),s.jsx("span",{className:"text-muted-foreground",children:U})]},U))}),s.jsxs("div",{className:"rounded-xl border border-border bg-muted/30 p-4 space-y-4",children:[s.jsxs("h4",{className:"text-sm font-semibold text-foreground flex items-center gap-2",children:[s.jsx(ki,{className:"h-4 w-4 text-primary"}),"Scheduling"]}),s.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[s.jsxs("button",{onClick:()=>k("adaptive"),className:K("flex items-center gap-2 px-3 py-2.5 rounded-lg border-2 text-sm font-medium transition-all text-left",R?"border-primary bg-primary/10 text-primary":"border-border bg-background text-muted-foreground hover:border-muted-foreground/40"),children:[s.jsx(Ms,{className:K("h-4 w-4 shrink-0",R?"text-primary":"text-muted-foreground")}),s.jsxs("div",{children:[s.jsx("p",{className:"leading-tight",children:"Smart Adaptive"}),s.jsx("p",{className:"text-xs font-normal opacity-70",children:"Recommended"})]})]}),s.jsxs("button",{onClick:()=>k("manual"),className:K("flex items-center gap-2 px-3 py-2.5 rounded-lg border-2 text-sm font-medium transition-all text-left",R?"border-border bg-background text-muted-foreground hover:border-muted-foreground/40":"border-primary bg-primary/10 text-primary"),children:[s.jsx(pr,{className:K("h-4 w-4 shrink-0",R?"text-muted-foreground":"text-primary")}),s.jsxs("div",{children:[s.jsx("p",{className:"leading-tight",children:"Fixed Time"}),s.jsx("p",{className:"text-xs font-normal opacity-70",children:"Manual"})]})]})]}),s.jsx(Wr,{mode:"wait",children:R?s.jsxs(fe.div,{initial:{opacity:0,y:-6},animate:{opacity:1,y:0},exit:{opacity:0,y:-6},className:"rounded-lg bg-primary/5 border border-primary/20 p-3 space-y-1.5",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Se,{className:"h-3.5 w-3.5 text-primary"}),s.jsxs("p",{className:"text-sm font-medium text-foreground",children:[I==null?void 0:I.day," at ",I==null?void 0:I.time]})]}),s.jsxs("span",{className:K("text-xs font-medium px-2 py-0.5 rounded-full",ue[(I==null?void 0:I.confidence)??"Medium"]),children:[(I==null?void 0:I.confidence)??"Medium"," Confidence"]})]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:I==null?void 0:I.rationale}),s.jsx("p",{className:"text-xs text-primary/70 font-medium",children:"Optimized dynamically by InsightPRO."})]},"adaptive"):s.jsxs(fe.div,{initial:{opacity:0,y:-6}
877,animate:{opacity:1,y:0},exit:{opacity:0,y:-6},className:"space-y-3",children:[s.jsxs("div",{className:"space-y-1.5",children:[s.jsxs(X,{className:"text-xs text-muted-foreground flex items-center gap-1.5",children:[s.jsx(Mn,{className:"h-3.5 w-3.5"}),"Start Date"]}),s.jsxs(Og,{open:N,onOpenChange:C,children:[s.jsx(Rg,{asChild:!0,children:s.jsxs(z,{variant:"outline",className:K("w-full justify-start text-left font-normal h-9",!j&&"text-muted-foreground"),children:[s.jsx(Mn,{className:"mr-2 h-4 w-4"}),j?ge(j,"PPP"):"Today (default)"]})}),s.jsx(Kh,{className:"w-auto p-0",align:"start",children:s.jsx(Xh,{mode:"single",selected:j,onSelect:U=>{S(U),C(!1)},disabled:U=>U<va(new Date)&&!FU(U),initialFocus:!0,className:"pointer-events-auto"})})]})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsxs(X,{className:"text-xs text-muted-foreground flex items-center gap-1.5",children:[s.jsx(pr,{className:"h-3.5 w-3.5"}),"Post Time"]}),s.jsx("input",{type:"time",value:M,onChange:U=>O(U.target.value),className:"w-full h-9 rounded-md border border-input bg-background px-3 py-1 text-sm ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsxs(X,{className:"text-xs text-muted-foreground flex items-center gap-1.5",children:[s.jsx(Xc,{className:"h-3.5 w-3.5"}),"Time Zone"]}),s.jsxs(jt,{value:D,onValueChange:$,children:[s.jsx(mt,{className:"h-9 text-sm",children:s.jsx(Ct,{})}),s.jsx(gt,{children:Vy.map(U=>s.jsx(Ee,{value:U.value,children:U.label},U.value))})]})]})]},"manual")}),s.jsxs("div",{className:"rounded-lg bg-background border border-border p-3 text-xs text-muted-foreground space-y-0.5",children:[s.jsx("p",{className:"font-medium text-foreground text-sm mb-1",children:"Schedule Preview"}),s.jsxs("p",{children:["• First post: ",s.jsx("span",{className:"text-foreground font-medium",children:ge(le,"EEEE, MMMM d, yyyy")})]}),s.jsxs("p",{children:["• Time: ",s.jsx("span",{className:"text-foreground font-medium",children:P})]}),s.jsxs("p",{children:["• Repeats every: ",s.jsx("span",{className:"text-foreground font-medium",children:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][A]})]}),s.jsxs("p",{children:["• Zone: ",s.jsx("span",{className:"text-foreground font-medium",children:((re=Vy.find(U=>U.value===D))==null?void 0:re.label)??D})]})]})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(z,{onClick:()=>L(1),disabled:c,variant:"outline",className:"h-auto py-4 flex flex-col items-center gap-1 border-2 hover:border-primary/50 hover:bg-primary/5",children:c&&f===1?s.jsx(ce,{className:"h-5 w-5 animate-spin"}):s.jsxs(s.Fragment,{children:[s.jsx(Mn,{className:"h-5 w-5 text-primary"}),s.jsx("span",{className:"font-semibold",children:"1× per week"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"52 posts · 1 year"})]})}),s.jsx(z,{onClick:()=>L(2),disabled:c,className:"h-auto py-4 flex flex-col items-center gap-1 bg-primary hover:bg-primary/90",children:c&&f===2?s.jsx(ce,{className:"h-5 w-5 animate-spin"}):s.jsxs(s.Fragment,{children:[s.jsx(Mn,{className:"h-5 w-5"}),s.jsx("span",{className:"font-semibold",children:"2× per week"}),s.jsx("span",{className:"text-xs opacity-80",children:"104 posts · 1 year"})]})})]}),s.jsx(z,{variant:"ghost",onClick:()=>w("module"),className:"w-full",children:"← Choose a different industry"})]})]},"schedule")})})]}),s.jsx(m0,{open:o,onOpenChange:l,children:s.jsxs(Fg,{children:[s.jsxs(Bg,{children:[s.jsx(qg,{children:"Your year of marketing is ready"}),s.jsx(Ug,{asChild:!0,children:s.jsxs("div",{className:"space-y-2 text-sm text-muted-foreground",children:[s.jsxs("p",{children:["This will schedule ",s.jsxs("strong",{className:"text-foreground",children:[h," ",G==null?void 0:G.label," posts"]})," — ",f===2?"2× per week for 52 weeks":"1× per week for 52 weeks","."]}),s.jsxs("div",{className:"rounded-lg bg-muted p-3 text-xs space-y-0.5",children:[s.jsxs("p",{children:["• First post: ",s.jsx("strong",{children:ge(le,"EEEE, MMMM d, yyyy")})]}),s.jsxs("p",{children:["• Time: ",s.jsx("strong",{children:P})," (",((q=Vy.find(U=>U.value===D))==null?void 0:q.label)??D,")"]}),R&&s.jsx("p",{children:"• ✨ Powered by InsightPRO Adaptive Timing"})]}),s.jsx("p",{children:"You can edit, pause, or delete posts at any time."})]})})]}
877),s.jsxs(Wg,{children:[s.jsx(Hg,{disabled:c,children:"Cancel"}),s.jsx(zg,{onClick:B,disabled:c,className:"bg-primary hover:bg-primary/90",children:c?s.jsxs(s.Fragment,{children:[s.jsx(ce,{className:"h-4 w-4 animate-spin mr-2"}),"Scheduling..."]}):s.jsxs(s.Fragment,{children:[s.jsx(Tn,{className:"h-4 w-4 mr-2"}),"Schedule ",h," Posts"]})})]})]})})]})}const Vxe=[{id:"trend",icon:Se,label:"TrendsPRO Post",description:"Schedule a trending topic — no writing needed",color:"text-accent",bgColor:"bg-accent/10",borderColor:"border-accent/30 hover:border-accent"},{id:"template",icon:dr,label:"From Template",description:"Use a pre-written template from your gallery",color:"text-primary",bgColor:"bg-primary/10",borderColor:"border-primary/30 hover:border-primary"},{id:"custom",icon:fg,label:"Original Content",description:"Write your own post from scratch",color:"text-foreground",bgColor:"bg-muted",borderColor:"border-border hover:border-foreground/30"}],Gxe=({onSelectSource:e,onScheduled:t})=>{const[n,r]=g.useState(!1),a=i=>{i==="trend"?r(!0):e(i)};return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Tn,{className:"h-5 w-5 text-primary"}),s.jsx("h3",{className:"font-semibold text-foreground",children:"Quick Schedule"}),s.jsx("span",{className:"text-xs text-muted-foreground ml-auto",children:"Choose your content source"})]}),s.jsx("div",{className:"grid gap-3",children:Vxe.map((i,o)=>s.jsx(fe.button,{type:"button",initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:o*.05},onClick:()=>a(i.id),className:K("w-full p-4 rounded-xl border-2 text-left transition-all",i.borderColor),children:s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx("div",{className:K("p-3 rounded-full",i.bgColor),children:s.jsx(i.icon,{className:K("h-5 w-5",i.color)})}),s.jsxs("div",{className:"flex-1",children:[s.jsx("span",{className:"font-medium text-foreground",children:i.label}),s.jsx("p",{className:"text-sm text-muted-foreground",children:i.description})]}),s.jsx(Ma,{className:"h-5 w-5 text-muted-foreground"})]})},i.id))}),s.jsxs("div",{className:"relative py-2",children:[s.jsx("div",{className:"absolute inset-0 flex items-center",children:s.jsx("div",{className:"w-full border-t border-border"})}),s.jsx("div",{className:"relative flex justify-center text-xs",children:s.jsx("span",{className:"bg-background px-3 text-muted-foreground",children:"Automated Series"})})]}),s.jsx(Hxe,{onScheduled:t}),s.jsx(Cxe,{onScheduled:t}),s.jsx(Nxe,{open:n,onOpenChange:r,onScheduled:t})]})},Yxe=["06:00","07:00","08:00","09:00","10:00","11:00","12:00","13:00","14:00","15:00","16:00","17:00","18:00","19:00","20:00","21:00"],Kxe=()=>{const e=us(),[t,n]=g.useState(()=>is(new Date,{weekStartsOn:1})),[r,a]=g.useState([]),[i,o]=g.useState(!0),[l,c]=g.useState(!1),[u,h]=g.useState(null),[d,f]=g.useState(null),[p,y]=g.useState(!1),[m,v]=g.useState({open:!1,postId:null,recurrenceType:null}),{toast:b}=Je(),x=Array.from({length:7},(R,I)=>dt(t,I));g.useEffect(()=>{var I;const R=(I=e.state)==null?void 0:I.schedulePost;R&&(f(R),c(!0),window.history.replaceState({},document.title))},[e.state]);const w=async()=>{try{const{data:{user:R}}=await W.auth.getUser();if(!R)return;const I=dt(t,6),{data:P,error:A}=await W.from("scheduled_posts").select("*").gte("scheduled_date",ge(t,"yyyy-MM-dd")).lte("scheduled_date",ge(I,"yyyy-MM-dd")).order("scheduled_time",{ascending:!0});if(A)throw A;a(P||[])}catch(R){b({title:"Error loading schedule",description:R.message,variant:"destructive"})}finally{o(!1)}};g.useEffect(()=>{w()},[t]);const _=()=>n(sye(t,1)),k=()=>n(fr(t,1)),j=()=>n(is(new Date,{weekStartsOn:1})),S=(R,I)=>{h({date:R,time:I}),f(null),c(!0)},N=async R=>{try{const{error:I}=await W.from("scheduled_posts").delete().eq("id",R);if(I)throw I;a(P=>P.filter(A=>A.id!==R)),b({title:"Post removed",description:"Scheduled post has been removed from your calendar."})}catch(I){b({title:"Delete failed",description:I.message,variant:"destructive"})}},C=async R=>{try{const{error:I}=await W.from("scheduled_posts").delete().eq("group_id",R);if(I)throw I;a(P=>P.filter(A=>
877A.group_id!==R)),b({title:"Group removed",description:"All scheduled posts in this group have been removed."})}catch(I){b({title:"Delete failed",description:I.message,variant:"destructive"})}},M=async()=>{const{postId:R}=m;if(R)try{if(!r.find(E=>E.id===R))return;const{error:P}=await W.from("scheduled_posts").delete().eq("recurrence_parent_id",R);if(P)throw P;const{error:A}=await W.from("scheduled_posts").update({recurrence_type:null,recurrence_interval:null,recurrence_end_date:null}).eq("id",R);if(A)throw A;b({title:"Recurrence cancelled",description:"Future occurrences have been removed. The first post will still publish."}),w()}catch(I){b({title:"Failed to cancel recurrence",description:I.message,variant:"destructive"})}finally{v({open:!1,postId:null,recurrenceType:null})}},O=(R,I)=>{const P=ge(R,"yyyy-MM-dd"),A=r.filter(T=>{const L=T.scheduled_time.substring(0,5);return T.scheduled_date===P&&L===I}),E=new Map;return A.forEach(T=>{const L=T.group_id;E.has(L)||E.set(L,[]),E.get(L).push(T)}),{slotPosts:A,groupedPosts:E}},D=R=>$r(R,new Date),$=r.filter(R=>R.recurrence_type&&R.recurrence_type!=="none"&&!R.is_recurring_instance).length;return s.jsxs("div",{className:"space-y-6",children:[s.jsxs(fe.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:"flex flex-wrap items-center justify-between gap-4",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[s.jsx(z,{variant:"outline",size:"icon",onClick:_,children:s.jsx(Kc,{className:"h-4 w-4"})}),s.jsx(z,{variant:"outline",onClick:j,children:"Today"}),s.jsx(z,{variant:"outline",size:"icon",onClick:k,children:s.jsx(Ma,{className:"h-4 w-4"})}),s.jsxs("span",{className:"text-lg font-semibold text-foreground",children:[ge(t,"MMM d")," - ",ge(dt(t,6),"MMM d, yyyy")]}),$>0&&s.jsxs("span",{className:"flex items-center gap-1 text-xs text-primary bg-primary/10 px-2 py-1 rounded-full",children:[s.jsx(Qc,{className:"h-3 w-3"}),$," recurring"]})]}),s.jsxs("div",{className:"flex flex-wrap gap-2",children:[s.jsx(_xe,{onScheduled:w}),s.jsx(z,{variant:"outline",onClick:()=>y(!p),children:p?"Hide Panel":"Quick Schedule"}),s.jsxs(z,{onClick:()=>{f(null),c(!0)},children:[s.jsx(pg,{className:"mr-2 h-4 w-4"}),"Schedule Post"]})]})]}),p&&s.jsx(fe.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"rounded-xl border border-border bg-card p-5",children:s.jsx(Gxe,{onSelectSource:R=>{(R==="template"||R==="custom")&&(f(null),c(!0)),y(!1)},onScheduled:w})}),s.jsx(fe.div,{initial:{opacity:0}
877,animate:{opacity:1},transition:{delay:.1},className:"rounded-xl border border-border bg-card overflow-x-auto",children:s.jsxs("div",{className:"min-w-[680px]",children:[s.jsxs("div",{className:"grid grid-cols-[64px_repeat(7,minmax(0,1fr))] border-b border-border bg-muted/30",children:[s.jsx("div",{className:"p-3 text-center text-xs font-medium text-muted-foreground",children:"Time"}),x.map(R=>s.jsxs("div",{className:`p-3 text-center border-l border-border ${D(R)?"bg-primary/5":""}`,children:[s.jsx("div",{className:"text-xs font-medium text-muted-foreground",children:ge(R,"EEE")}),s.jsx("div",{className:`text-lg font-semibold ${D(R)?"text-primary":"text-foreground"}`,children:ge(R,"d")})]},R.toISOString()))]}),i?s.jsx("div",{className:"flex items-center justify-center py-20",children:s.jsx(ce,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):s.jsx("div",{className:"max-h-[600px] overflow-y-auto",children:Yxe.map(R=>s.jsxs("div",{className:"grid grid-cols-[64px_repeat(7,minmax(0,1fr))] border-b border-border last:border-b-0",children:[s.jsx("div",{className:"p-2 text-center text-xs font-medium text-muted-foreground border-r border-border flex items-center justify-center",children:R}),x.map(I=>{const{groupedPosts:P}=O(I,R);return s.jsx("div",{className:`min-h-[60px] p-1 border-l border-border cursor-pointer transition-colors hover:bg-muted/30 ${D(I)?"bg-primary/5":""}`,onClick:()=>S(I,R),children:Array.from(P.entries()).map(([A,E])=>A&&E.length>1?s.jsx(gM,{post:E[0],groupedPlatforms:E.map(T=>T.platform),onDelete:()=>C(A),onCancelRecurrence:E[0].recurrence_type&&E[0].recurrence_type!=="none"&&!E[0].is_recurring_instance?()=>v({open:!0,postId:E[0].id,recurrenceType:E[0].recurrence_type||null}):void 0,isGrouped:!0},A):E.map(T=>s.jsx(gM,{post:T,onDelete:()=>N(T.id),onCancelRecurrence:T.recurrence_type&&T.recurrence_type!=="none"&&!T.is_recurring_instance?()=>v({open:!0,postId:T.id,recurrenceType:T.recurrence_type||null}):void 0},T.id)))},`${I.toISOString()}-${R}`)})]},R))})]})}),!i&&r.length===0&&s.jsxs(fe.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"text-center py-8",children:[s.jsx(Mn,{className:"mx-auto h-12 w-12 text-muted-foreground/30 mb-3"}),s.jsx("p",{className:"text-muted-foreground",children:"No posts scheduled this week"}),s.jsx("p",{className:"text-sm text-muted-foreground/60",children:"Click any time slot to schedule a post"})]}),s.jsx(cz,{open:l,onOpenChange:c,selectedSlot:u,onScheduled:()=>{w(),h(null),f(null)},initialPost:d}),s.jsx(m0,{open:m.open,onOpenChange:R=>v(I=>({...I,open:R})),children:s.jsxs(Fg,{children:[s.jsxs(Bg,{children:[s.jsxs(qg,{className:"flex items-center gap-2",children:[s.jsx(Qc,{className:"h-5 w-5 text-primary"}),"Cancel Recurring Schedule?"]}),s.jsx(Ug,{children:"This will remove all future occurrences of this recurring post. The first scheduled post will still be published."})]}),s.jsxs(Wg,{children:[s.jsx(Hg,{children:"Keep Recurring"}),s.jsx(zg,{onClick:M,children:"Cancel Recurrence"})]})]})})]})},Xxe=()=>s.jsxs(hr,{title:"SchedulePRO",description:"Plan and schedule your content for maximum impact",noPadding:!0,children:[s.jsx(ar,{title:"SchedulePRO – Content Scheduler | SociePRO AI",description:"Plan and schedule your social media posts for maximum engagement. Visual calendar, optimal timing, and multi-platform scheduling.",keywords:"social media scheduler, content calendar, post scheduling, social media planning",canonicalUrl:"https://sociepro.ai/schedule",jsonLd:Jw("SchedulePRO","Social media post scheduling and planning")}),s.jsx(Kxe,{})]}),Qxe=[{id:"fa-market-ed-001",title:"Market Volatility Explained",description:"Help clients understand market fluctuations without panic",content:`Markets move up and down — that's normal.
878
879What matters isn't the daily noise. It's your plan.
880
881Here's what I tell clients during volatility:
882→ {point_1}
883→ {point_2}
884→ {point_3}
885
886The best investors don't react to headlines. They stick to their strategy.
887
888[CTA: Schedule a portfolio review to discuss your concerns]
889
890*Investments involve risk. Past performance doesn't guarantee future results.*`,profession:"financial_advisor",category:"market_education",platforms:["linkedin","facebook"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!0,placeholders:["point_1","point_2","point_3"],tags:["market","volatility","investing"]},{id:"fa-market-ed-002",title:"Interest Rate Changes Impact",description:"Explain how rate changes affect portfolios",content:`The Fed just moved rates. Here's what it means for you:
891
892📈 **For Savers:**
893{saver_impact}
894
895📉 **For Borrowers:**
896{borrower_impact}
897
898📊 **For Investors:**
899{investor_impact}
900
901The key? Don't make knee-jerk reactions. Let's review your situation together.
902
903[CTA: Book a 15-minute rate review call]
904
905*This is educational content only, not personalized advice.*`,profession:"financial_advisor",category:"market_education",platforms:["linkedin","facebook"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!0,placeholders:["saver_impact","borrower_impact","investor_impact"],tags:["interest rates","fed","economy"]}
905,{id:"fa-market-ed-003",title:"Bull vs Bear Market Basics",description:"Simple explanation of market cycles",content:`🐂 Bull Market vs 🐻 Bear Market — simplified:
906
907**Bull Market:**
908- Prices rising 20%+ from recent lows
909- Investor optimism high
910- Economy typically expanding
911
912**Bear Market:**
913- Prices falling 20%+ from recent highs
914- Investor pessimism
915- Often during economic contraction
916
917Here's the truth most people miss:
918
919Both are temporary. {key_insight}
920
921What's your strategy for both scenarios?
922
923*General information only. Consult your advisor for personalized guidance.*`,profession:"financial_advisor",category:"market_education",platforms:["linkedin","facebook","instagram"],persuasionLever:"Authority",postingGoal:"Engagement",trendCompatible:!1,placeholders:["key_insight"],tags:["bull market","bear market","education"]},{id:"fa-psychology-001",title:"Fear vs. Greed in Investing",description:"Address the two emotions that derail investors",content:`The two emotions that destroy portfolios:
924
925😨 **FEAR** makes you sell at the bottom
926🤑 **GREED** makes you buy at the top
927
928I've seen both wreck decades of careful planning.
929
930The antidote? A written investment plan you follow no matter what.
931
932When markets feel scary, I ask clients:
933"Has your goal changed? No? Then your strategy shouldn't either."
934
935What's your strategy for managing emotions?
936
937[CTA: Let's create your personal investment policy]
938
939*Educational content. Your situation may vary.*`,profession:"financial_advisor",category:"client_psychology",platforms:["linkedin","facebook"],persuasionLever:"Identity",postingGoal:"Engagement",trendCompatible:!0,placeholders:[],tags:["psychology","behavior","emotions"]},{id:"fa-psychology-002",title:"The Power of Compound Interest",description:"Motivate long-term thinking with compound growth",content:`Einstein called it the 8th wonder of the world.
940
941Compound interest.
942
943Here's how it works:
944• Year 1: $10,000 → {year_1_value}
945• Year 10: → {year_10_value}
946• Year 30: → {year_30_value}
947
948The secret? **Time in the market, not timing the market.**
949
950The best time to start was 20 years ago.
951The second best time is today.
952
953Are you maximizing your compounding potential?
954
955[CTA: Get your free compound growth projection]
956
957*Hypothetical example for illustration only. Actual returns vary.*`,profession:"financial_advisor",category:"client_psychology",platforms:["linkedin","facebook","instagram"],persuasionLever:"Authority",postingGoal:"Leads",trendCompatible:!1,placeholders:["year_1_value","year_10_value","year_30_value"],tags:["compound interest","long-term","growth"]},{id:"fa-process-001",title:"What Happens in Our First Meeting",description:"Demystify the client onboarding process",content:`Nervous about meeting with a financial advisor?
958
959Here's exactly what happens in our first conversation:
960
9611️⃣ **Discovery** (15 min)
962   I learn about your life, goals, and concerns
963
9642️⃣ **Current State** (15 min)
965   We review where you are today
966
9673️⃣ **Vision** (15 min)
968   We discuss where you want to be
969
9704️⃣ **Next Steps** (5 min)
971   No pressure — just clarity on options
972
973No sales pitch. No jargon. Just a conversation about your future.
974
975[CTA: Schedule your complimentary discovery call]`,profession:"financial_advisor",category:"process_explanation",platforms:["linkedin","facebook"],persuasionLever:"Reciprocity",postingGoal:"Leads",trendCompatible:!1,placeholders:[],tags:["process","first meeting","onboarding"]},{id:"fa-process-002",title:"How Financial Planning Actually Works",description:"Outline the comprehensive planning process",content:`Financial planning isn't about picking stocks.
976
977Here's what a real financial plan includes:
978
979📋 **Goal Setting** — Define what success looks like for YOU
980📊 **Current Analysis** — Net worth, cash flow, protection
981🎯 **Gap Analysis** — What's missing between now and your goals
982🗺️ **Strategy Design** — Tax-efficient, risk-appropriate path forward
983📈 **Implementation** — Execute with accountability
984🔄 **Ongoing Reviews** — Adjust as life changes
985
986This is planning that works.
987
988Ready to see what a real plan looks like?
989
990[CTA: Request your sample financial plan outline]
991
992*Services vary. This is a general overview.*`,profession:"financial_advisor",category:"process_explanation",platforms:["linkedin"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!1,placeholders:[],tags:["financial planning","process","comprehensive"]},{id:"fa-yearend-001",title:"Year-End Financial Checklist",description:"Actionable year-end planning reminders",content:`🗓️ Year-end financial moves to consider:
993
994✅ Max out retirement contributions (401k, IRA)
995✅ Review beneficiary designations
996✅ Tax-loss harvesting opportunities
997✅ Charitable giving strategies
998✅ FSA/HSA deadline review
999✅ RMD verification (if applicable)
1000
1001Missing even one of these could cost you.
1002
1003I'm offering complimentary year-end reviews through {end_date}.
1004
1005[CTA: Schedule your year-end planning session]
1006
1007*Tax advice should be confirmed with your CPA.*`,profession:"financial_advisor",category:"year_end_reflection",platforms:["linkedin","facebook"],persuasionLever:"Scarcity",postingGoal:"Leads",trendCompatible:!1,placeholders:["end_date"],tags:["year-end","tax planning","checklist"]},{id:"fa-yearend-002",title:"Reflecting on Financial Progress",description:"Encourage clients to celebrate wins and plan ahead",content:`As the year closes, take a moment to reflect:
1008
1009💰 Did you increase your savings rate?
1010📈 Did your net worth grow?
1011🎯 Did you make progress toward your goals?
1012📚 Did you learn something new about money?
1013
1014Even small wins compound into life-changing results.
1015
1016If you didn't hit your targets — that's okay. Every new year is a reset.
1017
1018What's ONE financial goal you're proud of this year?
1019
1020[CTA: Let's plan your best financial year yet]`,profession:"financial_advisor",category:"year_end_reflection",platforms:["linkedin","facebook","instagram"],persuasionLever:"Identity",postingGoal:"Engagement",trendCompatible:!1,placeholders:[],tags:["reflection","progress","goals"]}
1020,{id:"fa-faq-001",title:"How Much Should I Save for Retirement?",description:"Answer the most common retirement question",content:`"How much do I need to retire?"
1021
1022It's the #1 question I get.
1023
1024Here's the honest answer: **It depends.**
1025
1026Factors that matter:
1027• When you want to retire
1028• Your lifestyle expectations
1029• Healthcare needs
1030• Social Security timing
1031• Other income sources
1032
1033The old "X times your salary" rules are too simple.
1034
1035You need a personalized calculation.
1036
1037[CTA: Get your free retirement readiness score]
1038
1039*This is general education, not personalized advice.*`,profession:"financial_advisor",category:"frequently_asked_questions",platforms:["linkedin","facebook"],persuasionLever:"Authority",postingGoal:"Leads",trendCompatible:!0,placeholders:[],tags:["retirement","savings","faq"]},{id:"fa-faq-002",title:"Roth vs Traditional: Which Is Better?",description:"Explain the most common retirement account question",content:`Roth vs Traditional — the eternal question.
1040
1041**Traditional:**
1042✅ Tax deduction NOW
1043✅ Lower current taxes
1044⚠️ Pay taxes in retirement
1045
1046**Roth:**
1047✅ Tax-free growth
1048✅ Tax-free withdrawals
1049⚠️ No deduction today
1050
1051So which is better? 
1052
1053It depends on:
1054→ Your current tax bracket
1055→ Your expected future bracket
1056→ Your time horizon
1057
1058The answer isn't one-size-fits-all.
1059
1060[CTA: Let's analyze your optimal contribution strategy]
1061
1062*Consult your tax professional for personalized advice.*`,profession:"financial_advisor",category:"frequently_asked_questions",platforms:["linkedin","facebook"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!1,placeholders:[],tags:["roth","traditional","retirement accounts"]},{id:"fa-faq-003",title:"When Should I Start Estate Planning?",description:"Address estate planning timing",content:`"I'm too young for estate planning."
1063
1064I hear this all the time. Here's the truth:
1065
1066You need estate planning if you have:
1067✅ Kids (even young ones)
1068✅ A home
1069✅ Retirement accounts
1070✅ A spouse or partner
1071✅ Anyone who depends on you
1072
1073Estate planning isn't about death. It's about control.
1074
1075Who makes decisions if you can't?
1076Who gets your assets?
1077Who raises your children?
1078
1079These questions matter at every age.
1080
1081[CTA: Get our estate planning readiness checklist]
1082
1083*Legal documents require an attorney. We help coordinate the process.*`,profession:"financial_advisor",category:"frequently_asked_questions",platforms:["linkedin","facebook"],persuasionLever:"Consistency",postingGoal:"Leads",trendCompatible:!1,placeholders:[],tags:["estate planning","wills","trusts"]}],Jxe=[{id:"br-project-001",title:"Kitchen Remodel: What's Actually Involved",description:"Break down the phases of a kitchen renovation",content:`Thinking about a kitchen remodel? Here's what actually happens:
1084
1085**Phase 1: Design & Planning** (2-4 weeks)
1086→ Measurements, layout, material selection
1087
1088**Phase 2: Demolition** (3-5 days)
1089→ Out with the old (the messy part)
1090
1091**Phase 3: Rough-In** (1-2 weeks)
1092→ Electrical, plumbing, structural changes
1093
1094**Phase 4: Installation** (2-4 weeks)
1095→ Cabinets, counters, appliances, flooring
1096
1097**Phase 5: Finishing** (1-2 weeks)
1098→ Paint, trim, hardware, final touches
1099
1100Total timeline: {timeline_estimate}
1101
1102No surprises when you know the process.
1103
1104[CTA: Get your free kitchen remodel consultation]`,profession:"builder_remodeler",category:"project_breakdown",platforms:["linkedin","facebook","instagram"],persuasionLever:"Authority",postingGoal:"Leads",trendCompatible:!1,placeholders:["timeline_estimate"],tags:["kitchen","remodel","phases"]},{id:"br-project-002",title:"Bathroom Renovation Scope",description:"Explain bathroom project complexity",content:`Not all bathroom remodels are created equal.
1105
1106**Quick Refresh** (1-2 weeks)
1107→ Paint, fixtures, vanity
1108→ Budget: {refresh_budget}
1109
1110**Mid-Range Update** (3-4 weeks)
1111→ New tile, shower, flooring
1112→ Budget: {midrange_budget}
1113
1114**Full Renovation** (6-8 weeks)
1115→ Layout changes, plumbing moves, custom work
1116→ Budget: {full_budget}
1117
1118Which level fits your vision?
1119
1120[CTA: Schedule your bathroom design consultation]`,profession:"builder_remodeler",category:"project_breakdown",platforms:["linkedin","facebook"],persuasionLever:"Authority",postingGoal:"Leads",trendCompatible:!1,placeholders:["refresh_budget","midrange_budget","full_budget"],tags:["bathroom","renovation","scope"]},{id:"br-project-003",title:"Home Addition: The Full Process",description:"Outline major addition project phases",content:`Adding square footage to your home? Here's the journey:
1121
1122📋 **Pre-Construction**
1123→ Design development
1124→ Permit applications
1125→ Engineering & surveys
1126
1127🏗️ **Construction**
1128→ Foundation
1129→ Framing
1130→ MEP (Mechanical, Electrical, Plumbing)
1131→ Insulation & drywall
1132→ Finishes
1133
1134🔍 **Close-Out**
1135→ Final inspections
1136→ Punch list completion
1137→ Warranty walkthrough
1138
1139Average timeline: {timeline}
1140Average investment: {investment}
1141
1142Ready to expand your space?
1143
1144[CTA: Request your addition feasibility study]`,profession:"builder_remodeler",category:"project_breakdown",platforms:["linkedin"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!1,placeholders:["timeline","investment"],tags:["addition","expansion","construction"]},{id:"br-cost-001",title:"Why Remodel Costs Vary So Much",description:"Explain the factors that affect pricing",content:`"Why did my neighbor pay half what you're quoting?"
1145
1146Great question. Here's what affects remodel pricing:
1147
1148💰 **Labor Market**
1149→ Skilled trades are in high demand
1150
1151🏠 **Existing Conditions**
1152→ Older homes often have surprises
1153
1154📐 **Scope Creep**
1155→ Changes mid-project add up fast
1156
1157🎨 **Material Quality**
1158→ Builder-grade vs. custom makes a BIG difference
1159
1160📋 **Permits & Inspections**
1161→ Proper permits protect your investment
1162
1163The cheapest bid often costs more in the end.
1164
1165[CTA: Get a transparent, itemized estimate]`,profession:"builder_remodeler",category:"cost_explanation",platforms:["linkedin","facebook"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!0,placeholders:[],tags:["pricing","costs","transparency"]},{id:"br-cost-002",title:"Understanding Your Remodel Estimate",description:"Break down what's included in estimates",content:`An estimate should tell you exactly what you're paying for.
1166
1167Here's what ours include:
1168
1169📋 **Line-Item Breakdown**
1170→ Every material and labor cost itemized
1171
1172🔧 **Scope Definition**
1173→ Exactly what's included (and what's not)
1174
1175📅 **Timeline**
1176→ Start date, milestones, completion target
1177
1178💼 **Payment Schedule**
1179→ When payments are due and why
1180
1181🛡️ **Warranty Info**
1182→ What's covered and for how long
1183
1184No hidden fees. No surprises.
1185
1186That's how honest contracting works.
1187
1188[CTA: Request your detailed project estimate]`,profession:"builder_remodeler",category:"cost_explanation",platforms:["linkedin","facebook"],persuasionLever:"Reciprocity",postingGoal:"Leads",trendCompatible:!1,placeholders:[],tags:["estimate","pricing","transparency"]},{id:"br-cost-003",title:"Where Your Remodel Budget Goes",description:"Show typical budget allocation",content:`Where does your remodel money actually go?
1189
1190Typical kitchen remodel breakdown:
1191
1192🪵 **Cabinets & Hardware**: 30-35%
1193🔧 **Labor & Installation**: 20-25%
1194🪨 **Countertops**: 10-15%
1195⚡ **Appliances**: 10-15%
1196💡 **Electrical & Plumbing**: 8-12%
1197🎨 **Flooring & Finishes**: 5-8%
1198📋 **Design & Permits**: 3-5%
1199
1200Understanding this helps you make smart trade-offs.
1201
1202Want cabinets you love? Maybe builder-grade appliances.
1203Dream appliances? Consider stock cabinets.
1204
1205[CTA: Plan your budget with our free calculator]`,profession:"builder_remodeler",category:"cost_explanation",platforms:["linkedin","facebook","instagram"],persuasionLever:"Authority",postingGoal:"Engagement",trendCompatible:!1,placeholders:[],tags:["budget","allocation","planning"]},{id:"br-timeline-001",title:"Why Remodels Take Longer Than You Think",description:"Set realistic timeline expectations",content:`Remodels take longer than HGTV shows.
1206
1207Here's why:
1208
1209⏰ **Permits** (2-6 weeks)
1210→ Municipal review doesn't rush for anyone
1211
1212📦 **Material Lead Times** (2-12 weeks)
1213→ Custom cabinets, specialty tile, appliances
1214
1215👷 **Trade Scheduling** (ongoing)
1216→ Good plumbers and electricians are booked
1217
1218🔍 **Inspections** (varies)
1219→ Required at multiple stages
1220
1221🎯 **Quality Work Takes Time**
1222→ Rushing = cutting corners
1223
1224The contractors who promise impossible timelines?
1225They're either lying or cutting corners.
1226
1227We promise realistic timelines — and we hit them.
1228
1229[CTA: Get an honest project timeline]`,profession:"builder_remodeler",category:"timeline_expectations",platforms:["linkedin","facebook"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!0,placeholders:[],tags:["timeline","expectations","realistic"]},{id:"br-timeline-002",title:"Living Through a Renovation",description:"Prepare clients for the remodel experience",content:`Thinking about living in your home during a remodel?
1230
1231Here's what to expect:
1232
1233🏠 **Kitchen Remodel**
1234→ Set up a temporary kitchen (microwave, hot plate)
1235→ Expect 4-6 weeks of inconvenience
1236
1237🚿 **Bathroom Remodel**
1238→ Need a second bathroom
1239→ 3-4 weeks without that space
1240
1241🔨 **Major Renovation**
1242→ Consider temporary housing
1243→ Dust, noise, and workers daily
1244
1245**Tips for surviving it:**
1246✅ Seal off construction areas with plastic
1247✅ Establish "construction hours" with your team
1248✅ Move valuables and fragile items
1249✅ Embrace the temporary chaos
1250
1251The result? Worth every inconvenience.
1252
1253[CTA: Let's plan your project logistics]`,profession:"builder_remodeler",category:"timeline_expectations",platforms:["linkedin","facebook"],persuasionLever:"Consistency",postingGoal:"Engagement",trendCompatible:!1,placeholders:[],tags:["living","renovation","tips"]},{id:"br-beforeafter-001",title:"Kitchen Transformation Story",description:"Showcase a kitchen remodel case study",content:`From outdated to outstanding. 🏆
1254
1255**The Challenge:**
1256{challenge_description}
1257
1258**The Solution:**
1259{solution_description}
1260
1261**The Result:**
1262✅ {result_1}
1263✅ {result_2}
1264✅ {result_3}
1265
1266Timeline: {timeline}
1267Investment: {investment}
1268
1269"We should have done this years ago." — The Homeowner
1270
1271[CTA: Start your transformation story]
1272
1273📸 Swipe to see the full before/after →`,profession:"builder_remodeler",category:"before_after_case",platforms:["linkedin","facebook","instagram"],persuasionLever:"Social Proof",postingGoal:"Leads",trendCompatible:!1,placeholders:["challenge_description","solution_description","result_1","result_2","result_3","timeline","investment"],tags:["before after","transformation","case study"]},{id:"br-beforeafter-002",title:"Bathroom Makeover Reveal",description:"Highlight a bathroom transformation",content:`This bathroom went from "builder basic" to boutique hotel.
1274
1275**Before:**
1276→ {before_description}
1277
1278**After:**
1279→ {after_description}
1280
1281**Highlights:**
1282🚿 {highlight_1}
1283💡 {highlight_2}
1284🪞 {highlight_3}
1285
1286The homeowners wanted a spa-like retreat.
1287We delivered.
1288
1289[CTA: Design your dream bathroom]
1290
1291See the full transformation in the comments 👇`,profession:"builder_remodeler",category:"before_after_case",platforms:["linkedin","facebook","instagram"],persuasionLever:"Social Proof",postingGoal:"Engagement",trendCompatible:!1,placeholders:["before_description","after_description","highlight_1","highlight_2","highlight_3"],tags:["bathroom","makeover","reveal"]},{id:"br-beforeafter-003",title:"Whole Home Renovation Journey",description:"Document a major renovation project",content:`6 months. Complete transformation.
1292
1293This {year_built} home needed more than a facelift.
1294
1295**What we did:**
1296🏠 {scope_item_1}
1297🔧 {scope_item_2}
1298⚡ {scope_item_3}
1299🎨 {scope_item_4}
1300
1301**Investment:** {investment}
1302**Timeline:** {timeline}
1303**ROI Added:** {roi_estimate}
1304
1305This wasn't just a renovation.
1306It was bringing a home back to life.
1307
1308[CTA: Explore your home's potential]`,profession:"builder_remodeler",category:"before_after_case",platforms:["linkedin","facebook"],persuasionLever:"Social Proof",postingGoal:"Authority",trendCompatible:!1,placeholders:["year_built","scope_item_1","scope_item_2","scope_item_3","scope_item_4","investment","timeline","roi_estimate"],tags:["whole home","renovation","transformation"]},{id:"br-education-001",title:"Signs Your Home Needs Updates",description:"Help homeowners identify renovation needs",content:`Is your home trying to tell you something?
1309
1310🚨 **Warning signs you need updates:**
1311
1312🔌 **Electrical**
1313→ Flickering lights
1314→ Two-prong outlets
1315→ Frequent breaker trips
1316
1317💧 **Plumbing**
1318→ Low water pressure
1319→ Discolored water
1320→ Slow drains everywhere
1321
1322🌡️ **HVAC**
1323→ Uneven temperatures
1324→ High utility bills
1325→ System over 15 years old
1326
1327🏠 **Structure**
1328→ Cracks in walls/foundation
1329→ Doors that won't close
1330→ Bouncy floors
1331
1332Don't ignore the signs.
1333Small problems become expensive ones.
1334
1335[CTA: Schedule your home assessment]`,profession:"builder_remodeler",category:"homeowner_education",platforms:["linkedin","facebook"],persuasionLever:"Authority",postingGoal:"Leads",trendCompatible:!0,placeholders:[],tags:["maintenance","warning signs","updates"]},{id:"br-education-002",title:"How to Vet a Contractor",description:"Teach homeowners to evaluate contractors",content:`Hiring a contractor? Here's your checklist:
1336
1337✅ **License & Insurance**
1338→ Verify both are current
1339
1340✅ **References**
1341→ Call at least 3 recent clients
1342
1343✅ **Portfolio**
1344→ See completed work similar to yours
1345
1346✅ **Written Contract**
1347→ Scope, timeline, payment terms, warranty
1348
1349✅ **Communication Style**
1350→ Do they respond promptly? Explain clearly?
1351
1352✅ **Permits**
1353→ They should pull them, not you
1354
1355🚩 **Red Flags:**
1356→ Cash-only requests
1357→ Pressure tactics
1358→ No physical address
1359→ Won't provide references
1360
1361Protect yourself. Do your homework.
1362
1363[CTA: Download our contractor vetting checklist]`,profession:"builder_remodeler",category:"homeowner_education",platforms:["linkedin","facebook"],persuasionLever:"Reciprocity",postingGoal:"Authority",trendCompatible:!0,placeholders:[],tags:["contractor","hiring","checklist"]},{id:"br-education-003",title:"Remodel vs. Move: How to Decide",description:"Help with the big decision",content:`Should you remodel or move?
1364
1365**Consider REMODELING if:**
1366✅ You love your location
1367✅ Your lot can accommodate changes
1368✅ Renovation cost < comparable home purchase
1369✅ You can handle temporary disruption
1370
1371**Consider MOVING if:**
1372✅ You need more space than you can add
1373✅ School district matters
1374✅ Renovation would over-improve for area
1375✅ You're ready for a fresh start
1376
1377**The math:**
1378{remodel_cost_comparison}
1379
1380There's no wrong answer — just the right one for YOU.
1381
1382[CTA: Get your personalized remodel vs. move analysis]`,profession:"builder_remodeler",category:"homeowner_education",platforms:["linkedin","facebook"],persuasionLever:"Authority",postingGoal:"Leads",trendCompatible:!1,placeholders:["remodel_cost_comparison"],tags:["remodel","move","decision"]},{id:"br-education-004",title:"Maintaining Your Investment",description:"Seasonal home maintenance tips",content:`Your home needs regular maintenance. Here's your seasonal guide:
1383
1384🌸 **Spring**
1385→ Clean gutters
1386→ Inspect roof
1387→ Service AC
1388
1389☀️ **Summer**
1390→ Check caulking/weatherstripping
1391→ Power wash exterior
1392→ Inspect deck/patio
1393
1394🍂 **Fall**
1395→ Service furnace
1396→ Clean chimney
1397→ Check insulation
1398
1399❄️ **Winter**
1400→ Prevent frozen pipes
1401→ Check smoke/CO detectors
1402→ Monitor for ice dams
1403
1404Regular maintenance prevents expensive repairs.
1405
1406[CTA: Get our complete home maintenance calendar]`,profession:"builder_remodeler",category:"homeowner_education",platforms:["linkedin","facebook","instagram"],persuasionLever:"Reciprocity",postingGoal:"Engagement",trendCompatible:!1,placeholders:[],tags:["maintenance","seasonal","tips"]}],Zxe=[{id:"pm-just-rented-001",title:"Just Rented – Welcome Home",description:"Announce a successfully rented property",content:`Another home, another happy tenant. 🔑
1407
1408We're thrilled to welcome our newest residents to {property_address}.
1409
1410What made this one move fast:
1411→ {feature_1}
1412→ {feature_2}
1413→ {feature_3}
1414
1415Our vacancy time? {vacancy_days} days.
1416
1417That's what happens when you price right, market well, and respond fast.
1418
1419Property owners: this is what professional management looks like.
1420
1421#JustRented #PropertyManagement #{location_hashtag}`,profession:"property_manager",category:"just_rented",platforms:["facebook","linkedin"],persuasionLever:"Social Proof",postingGoal:"Leads",trendCompatible:!1,placeholders:["{property_address}","{feature_1}","{feature_2}","{feature_3}","{vacancy_days}","{location_hashtag}"],tags:["just rented","vacancy","success"]},{id:"pm-just-rented-002",title:"Rented in Record Time",description:"Highlight fast turnaround on a rental unit",content:`Listed ➡️ Shown ➡️ Rented.
1422
1423{property_address} found its new tenants in just {days_to_rent} days.
1424
1425Here's how we made it happen:
14261️⃣ Professional photos before listing
14272️⃣ Priced based on real market data
14283️⃣ Screened {applicant_count} applicants thoroughly
1429
1430Zero guesswork. Just process.
1431
1432If your rental is sitting vacant, there's a reason — and it's fixable.
1433
1434[CTA: Get a free rental market analysis]
1435
1436#RentalProperty #PropertyManagement`,profession:"property_manager",category:"just_rented",platforms:["facebook","linkedin"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!1,placeholders:["{property_address}","{days_to_rent}","{applicant_count}"],tags:["fast rental","vacancy reduction"]},{id:"pm-new-listing-001",title:"New Rental Listing",description:"Announce a new rental property available",content:`🏠 NEW RENTAL AVAILABLE
1437
1438{property_address}
1439{bedrooms} bed · {bathrooms} bath · {sqft} sq ft
1440\${rent}/month
1441
1442Move-in ready highlights:
1443✅ {highlight_1}
1444✅ {highlight_2}
1445✅ {highlight_3}
1446
1447Available: {available_date}
1448Lease term: {lease_term}
1449
1450Pets? {pet_policy}
1451
1452Serious inquiries only. Apply online or DM for the link.
1453
1454#ForRent #{location_hashtag} #RentalProperty`,profession:"property_manager",category:"new_listing_rental",platforms:["facebook","instagram"],persuasionLever:"Scarcity",postingGoal:"Leads",trendCompatible:!1,placeholders:["{property_address}","{bedrooms}","{bathrooms}","{sqft}","{rent}","{highlight_1}","{highlight_2}","{highlight_3}","{available_date}","{lease_term}","{pet_policy}","{location_hashtag}"],tags:["new listing","rental","available"]},{id:"pm-maintenance-001",title:"Maintenance Response Showcase",description:"Show responsiveness to build tenant trust",content:`A tenant reported a {issue_type} at 8:47 AM.
1455
1456By {resolution_time}, it was fixed.
1457
1458Here's what happened in between:
1459→ Acknowledged within 15 minutes
1460→ Dispatched our trusted vendor
1461→ Kept the tenant updated at every step
1462→ Resolved same-day
1463
1464This is what responsive property management looks like.
1465
1466Tenants deserve to feel heard. Owners deserve to know their property is protected.
1467
1468#MaintenanceMatters #PropertyManagement`,profession:"property_manager",category:"maintenance_update",platforms:["facebook","linkedin"],persuasionLever:"Social Proof",postingGoal:"Authority",trendCompatible:!1,placeholders:["{issue_type}","{resolution_time}"],tags:["maintenance","responsiveness","trust"]},{id:"pm-lease-renewal-001",title:"Lease Renewal Success",description:"Celebrate tenant retention as a business win",content:`Our renewal rate this year: {renewal_rate}%.
1469
1470That's not an accident. That's a strategy.
1471
1472Here's what drives tenant retention:
1473→ Fast, professional maintenance
1474→ Clear, respectful communication
1475→ Fair market rent adjustments
1476→ Properties that are well-maintained
1477
1478Every renewal saves an owner {turnover_cost} in turnover costs.
1479
1480Good management isn't just about finding tenants. It's about keeping them.
1481
1482#TenantRetention #PropertyManagement`,profession:"property_manager",category:"lease_renewal",platforms:["linkedin","facebook"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!0,placeholders:["{renewal_rate}","{turnover_cost}"],tags:["retention","renewal","strategy"]},{id:"pm-community-001",title:"Community Update",description:"Share community news or seasonal reminders",content:`📢 Community Update for {community_name} residents:
1483
1484{update_content}
1485
1486What this means for you:
1487→ {impact_1}
1488→ {impact_2}
1489
1490Questions? Reach out to our office anytime.
1491
1492We believe in keeping you informed — not surprised.
1493
1494#CommunityUpdate #{community_hashtag}`,profession:"property_manager",category:"community_announcement",platforms:["facebook"],persuasionLever:"Consistency",postingGoal:"Engagement",trendCompatible:!1,placeholders:["{community_name}","{update_content}","{impact_1}","{impact_2}","{community_hashtag}"],tags:["community","update","communication"]},{id:"pm-seasonal-001",title:"Seasonal Property Care Tips",description:"Educate tenants on seasonal property care",content:`🏠 Seasonal Property Care Reminder
1495
1496{season} is here, and your home needs a little attention.
1497
1498Quick checklist:
1499✅ {tip_1}
1500✅ {tip_2}
1501✅ {tip_3}
1502✅ {tip_4}
1503
1504Small actions now prevent expensive problems later.
1505
1506If you notice anything unusual, submit a maintenance request — we'll handle it quickly.
1507
1508Your home is our responsibility too.
1509
1510#PropertyCare #SeasonalTips`,profession:"property_manager",category:"seasonal_tip",platforms:["facebook","instagram"],persuasionLever:"Reciprocity",postingGoal:"Engagement",trendCompatible:!0,placeholders:["{season}","{tip_1}","{tip_2}","{tip_3}","{tip_4}"],tags:["seasonal","maintenance","tips"]},{id:"pm-vacancy-001",title:"Vacancy Alert – Limited Availability",description:"Create urgency for available units",content:`⚠️ We have exactly {available_count} units available across our portfolio right now.
1511
1512Here's what's open:
1513
1514🏠 {unit_1_summary}
1515🏠 {unit_2_summary}
1516
1517Our average time-to-rent: {avg_days} days.
1518
1519These won't last.
1520
1521If you've been looking in {area}, now is the time.
1522
1523DM "APPLY" for application details.
1524
1525#VacancyAlert #RentalAvailable #{location_hashtag}`,profession:"property_manager",category:"vacancy_alert",platforms:["facebook","instagram"],persuasionLever:"Scarcity",postingGoal:"Leads",trendCompatible:!1,placeholders:["{available_count}","{unit_1_summary}","{unit_2_summary}","{avg_days}","{area}","{location_hashtag}"],tags:["vacancy","availability","urgency"]},{id:"pm-rent-increase-001",title:"Understanding Rent Adjustments",description:"Explain rent adju
1525stments professionally and neutrally",content:`Let's talk about rent adjustments — honestly and openly.
1526
1527Here's why rents change:
1528📊 Property taxes increase
1529📊 Insurance costs rise
1530📊 Maintenance materials cost more
1531📊 Market rates shift
1532
1533What we promise:
1534→ Advance notice — always
1535→ Market-based pricing — not arbitrary
1536→ Transparent communication — no surprises
1537
1538We believe fair rent means fair to everyone: tenants AND owners.
1539
1540Questions? We're always here to talk it through.
1541
1542#RentTransparency #PropertyManagement`,profession:"property_manager",category:"rent_adjustment",platforms:["linkedin","facebook"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!1,placeholders:[],tags:["rent","transparency","communication"]},{id:"pm-owner-ed-001",title:"What Professional Management Actually Costs",description:"Educate property owners on the value of professional PM",content:`"I can manage it myself and save the fee."
1543
1544I hear this a lot. Let's break it down.
1545
1546Self-managing typically costs:
1547→ {hours_per_month} hours/month of your time
1548→ Missed rent from slow vacancy fills
1549→ Legal risk from compliance gaps
1550→ Emergency calls at midnight
1551
1552Professional management costs:
1553→ {fee_percentage}% of monthly rent
1554→ Zero vacancy stress
1555→ Full legal compliance
1556→ 24/7 maintenance coordination
1557
1558The fee isn't a cost. It's an investment in your time, peace of mind, and property value.
1559
1560[CTA: Get a free management proposal]
1561
1562#InvestmentProperty #PropertyManagement`,profession:"property_manager",category:"owner_education",platforms:["linkedin","facebook"],persuasionLever:"Reciprocity",postingGoal:"Leads",trendCompatible:!0,placeholders:["{hours_per_month}","{fee_percentage}"],tags:["owner education","value proposition","roi"]}],ewe=[{id:"host-now-booking-001",title:"Now Booking",description:"Open availability announcement",content:`📅 Now booking {month_year}.
1563
1564Your perfect getaway is waiting. {property_name} has availability for {number_of_dates}.
1565
1566What guests love most:
1567✨ {amenity_1}
1568✨ {amenity_2}
1569✨ {amenity_3}
1570
1571Book direct and secure your stay.
1572
1573{booking_link}
1574
1575#VacationRental #TravelGoals #{location_hashtag}`,profession:"host",category:"promotional",platforms:["instagram","facebook"],persuasionLever:"Scarcity",postingGoal:"Leads",trendCompatible:!1,placeholders:["{month_year}","{property_name}","{number_of_dates}","{amenity_1}","{amenity_2}","{amenity_3}","{booking_link}","{location_hashtag}"],tags:["availability","booking","call-to-action"]},{id:"host-limited-avail-001",title:"Limited Availability",description:"Create urgency around open dates",content:`⏰ Only {number} nights left in {month}.
1576
1577{property_name}'s calendar is filling fast. Peak season is coming.
1578
1579Reserve now:
1580→ Lock in your rate
1581→ Secure your dates
1582→ Plan your escape
1583
1584{booking_link}
1585
1586#LastChance #VacationRental #BookNow`,profession:"host",category:"promotional",platforms:["instagram","facebook"],persuasionLever:"Scarcity",postingGoal:"Leads",trendCompatible:!1,placeholders:["{number}","{month}","{property_name}","{booking_link}"],tags:["scarcity","urgency","limited"]},{id:"host-lastminute-001",title:"Last-Minute Opening",description:"Unexpected availability",content:`🚨 Last-minute opening: {date_range}
1587
1588A booking just freed up. {property_name} is available {dates}.
1589
1590Perfect for:
1591• Weekend escape
1592• Spontaneous getaway
1593• Last-minute plans
1594
1595Book before someone else does.
1596
1597{booking_link}
1598
1599#LastMinute #VacationRental #{location_hashtag}`,profession:"host",category:"promotional",platforms:["instagram","facebook"],persuasionLever:"Scarcity",postingGoal:"Leads",trendCompatible:!1,placeholders:["{date_range}","{property_name}","{dates}","{booking_link}","{location_hashtag}"],tags:["last-minute","opening","available"]},{id:"host-holiday-001",title:"Holiday Availability",description:"Special holiday getaway",content:`🎉 {holiday} is calling.
1600
1601Make {holiday_name} unforgettable at {property_name}.
1602
1603Perfect for:
1604✓ Family gatherings
1605✓ Friends getaway
1606✓ Romantic escape
1607
1608{night_count} nights. {number_of_guests} guests. Memories for life.
1609
1610Book now: {booking_link}
1611
1612#HolidayGetaway #VacationRental #TravelMore`,profession:"host",category:"promotional",platforms:["instagram","facebook"],persuasionLever:"Identity",postingGoal:"Leads",trendCompatible:!1,placeholders:["{holiday}","{holiday_name}","{property_name}","{night_count}","{number_of_guests}","{booking_link}"],tags:["holiday","special occasion","seasonal"]},{id:"host-weekend-001",title:"Weekend Special",description:"Weekend getaway promotion",content:`🌅 Your weekend just got better.
1613
1614{property_name} is the perfect escape from the ordinary.
1615
1616This weekend: {dates}
1617
1618Why guests choose us:
1619→ {reason_1}
1620→ {reason_2}
1621→ {reason_3}
1622
1623Escape reality. {booking_link}
1624
1625#WeekendGetaway #VacationRental #{location_hashtag}`,profession:"host",category:"promotional",platforms:["instagram","facebook"],persuasionLever:"Identity",postingGoal:"Leads",trendCompatible:!1,placeholders:["{property_name}","{dates}","{reason_1}","{reason_2}","{reason_3}","{booking_link}","{location_hashtag}"],tags:["weekend","special","getaway"]},{id:"host-extended-001",title:"Extended Stay Discount",description:"Long-term rental incentive",content:`💰 Stay longer. Save more.
1626
1627Book {number_of_nights}+ nights at {property_name} and get {discount_percentage} off.
1628
1629Perfect for:
1630→ Remote work retreats
1631→ Extended family time
1632→ Seasonal getaways
1633
1634Your longer stay = our best rate.
1635
1636{booking_link}
1637
1638#ExtendedStay #VacationRental #SmartTravel`,profession:"host",category:"promotional",platforms:["instagram","facebook"],persuasionLever:"Reciprocity",postingGoal:"Leads",trendCompatible:!1,placeholders:["{number_of_nights}","{property_name}","{discount_percentage}","{booking_link}"],tags:["discount","extended","savings"]},{id:"host-renovated-001",title:"Just Renovated",description:"Showcase recent property improvements",content:`✨ Fresh. Modern. Ready for you.
1639
1640{property_name} just got a major upgrade.
1641
1642What's new:
1643🔨 {upgrade_1}
1644🔨 {upgrade_2}
1645🔨 {upgrade_3}
1646
1647Be among the first to experience the new {property_name}.
1648
1649{booking_link}
1650
1651#NewUpgrades #RefreshedSpace #VacationRental`,profession:"host",category:"thought_leadership",platforms:["instagram","facebook"],persuasionLever:"Authority",postingGoal:"Engagement",trendCompatible:!1,placeholders:["{property_name}","{upgrade_1}","{upgrade_2}","{upgrade_3}","{booking_link}"],tags:["renovation","upgrade","new"]},{id:"host-review-001",title:"Guest Review Highlight",description:"Feature positive guest feedback",content:`⭐⭐⭐⭐⭐ "{review_quote}"
1652
1653- {guest_name}
1654
1655This is why we do what we do.
1656
1657Every guest matters. Every experience counts.
1658
1659Ready to have your own 5-star moment?
1660
1661{booking_link}
1662
1663#GuestReview #5Stars #VacationRental`,profession:"host",category:"engagement",platforms:["instagram","facebook"],persuasionLever:"Social Proof",postingGoal:"Engagement",trendCompatible:!1,placeholders:["{review_quote}","{guest_name}","{booking_link}"],tags:["review","testimonial","social-proof"]},{id:"host-thankyou-001",title:"5-Star Thank You Post",description:"Appreciation post for guests",content:`🙏 Five stars. Five hearts. Forever grateful.
1664
1665Thank you {guest_name} for choosing {property_name}.
1666
1667Your kindness doesn't go unnoticed. Your review fuels our mission.
1668
1669Every guest who leaves us better than they found us reminds us why we host.
1670
1671See you next time? 🌟
1672
1673#Grateful #HappyGuests #VacationRental`,profession:"host",category:"engagement",platforms:["instagram","facebook"],persuasionLever:"Reciprocity",postingGoal:"Engagement",trendCompatible:!1,placeholders:["{guest_name}","{property_name}"],tags:["gratitude","thank-you","appreciation"]},{id:"host-superhost-001",title:"Superhost-Style Credibility Post",description:"Build trust and credibility as a host",content:`📊 {year_metric}: {metric_value}% guest satisfaction.
1674
1675Here's what that means:
1676✓ Fast communication (avg {response_time} hrs)
1677✓ Spotless property (every. single. time.)
1678✓ Host who cares (it's not just a listing)
1679
1680When you prioritize guests, guests prioritize you.
1681
1682Ready to experience the difference?
1683
1684{booking_link}
1685
1686#ReliableHost #GuestSatisfaction #VacationRental`,profession:"host",category:"thought_leadership",platforms:["facebook","instagram"],persuasionLever:"Authority",postingGoal:"Engagement",trendCompatible:!1,placeholders:["{year_metric}","{metric_value}","{response_time}","{booking_link}"],tags:["credibility","trust","authority"]},{id:"host-spotlight-001",title:"Property Spotlight",description:"Highlight property features",content:`🏡 {feature_name} is the star here.
1687
1688{property_name}'s {feature_description} sets it apart.
1689
1690Why guests love it:
1691→ {benefit_1}
1692→ {benefit_2}
1693→ {benefit_3}
1694
1695It's not just a place to stay. It's a memory to make.
1696
1697Discover the difference. {booking_link}
1698
1699#PropertySpotlight #VacationRental #{location_hashtag}`,profession:"host",category:"promotional",platforms:["instagram","facebook"],persuasionLever:"Authority",postingGoal:"Engagement",trendCompatible:!1,placeholders:["{feature_name}","{property_name}","{feature_description}","{benefit_1}","{benefit_2}","{benefit_3}","{booking_link}","{location_hashtag}"],tags:["feature","property","showcase"]},{id:"host-localguide-001",title:"Local Guide Recommendation",description:"Share local area tips and recommendations",content:`🌟 Local pro tip: {recommendation_title}
1700
1701If you're staying at {property_name}, don't miss {location_name}.
1702
1703Why we love it:
1704✓ {reason_1}
1705✓ {reason_2}
1706✓ Perfect for {activity_type}
1707
1708Your {property_name} stay + {location_name} = unforgettable.
1709
1710Questions? Ask us. We know this place.
1711
1712{booking_link}
1713
1714#LocalFavorite #TravelTips #{location_hashtag}`,profession:"host",category:"engagement",platforms:["instagram","facebook"],persuasionLever:"Authority",postingGoal:"Engagement",trendCompatible:!1,placeholders:["{recommendation_title}","{property_name}","{location_name}","{reason_1}","{reason_2}","{activity_type}","{booking_link}","{location_hashtag}"],tags:["local","guide","recommendations"]},{id:"host-event-001",title:"Event Weekend Reminder",description:"Promote bookings around local events",content:`🎪 {event_name} weekend is coming.
1715
1716Book now and be part of the action.
1717
1718{property_name} is perfectly positioned for {event_description}.
1719
1720{number_of_rooms} bedrooms. {distance} from {venue}.
1721
1722Make {event_name} your best yet. {booking_link}
1723
1724#EventWeekend #VacationRental #{location_hashtag}`,profession:"host",category:"promotional",platforms:["instagram","facebook"],persuasionLever:"Scarcity",postingGoal:"Leads",trendCompatible:!1,placeholders:["{event_name}","{property_name}","{event_description}","{number_of_rooms}","{distance}","{venue}","{booking_link}","{location_hashtag}"],tags:["event","special","seasonal"]},{id:"host-midweek-001",title:"Midweek Escape Special",description:"Promote midweek availability with special pricing",content:`😊 Skip the weekend rates.
1725
1726Book Monday–Thursday at {property_name} and get {discount_amount} off.
1727
1728Perfect for:
1729→ Work-cation
1730→ Mid-week retreat
1731→ Avoid crowds
1732
1733Fewer tourists. Lower prices. Better peace.
1734
1735{booking_link}
1736
1737#MidweekSpecial #SmartTravel #VacationRental`,profession:"host",category:"promotional",platforms:["instagram","facebook"],persuasionLever:"Reciprocity",postingGoal:"Leads",trendCompatible:!1,placeholders:["{property_name}","{discount_amount}","{booking_link}"],tags:["midweek","discount","special"]},{id:"host-peak-001",title:"Peak Season Alert",description:"Urgency message for peak season bookings",content:`🔥 {peak_season_name} is selling out fast.
1738
1739{property_name}'s calendar is nearly full for {month}.
1740
1741If you're thinking about it:
1742⏰ Think NOW
1743🔒 Book NOW
1744😊 Thank yourself later
1745
1746Limited dates. Premium experience.
1747
1748{booking_link}
1749
1750#PeakSeason #BootNow #VacationRental`,profession:"host",category:"promotional",platforms:["instagram","facebook"],persuasionLever:"Scarcity",postingGoal:"Leads",trendCompatible:!1,placeholders:["{peak_season_name}","{property_name}","{month}","{booking_link}"],tags:["peak-season","urgency","alert"]}],twe=[{id:"rest-new-menu-item",title:"New Menu Item Announcement",description:"Introduce a new dish or drink to your audience",content:`🍽️ NEW on the menu at {restaurant_name}:
1751
1752{dish_name}
1753
1754{dish_description}
1755
1756Our chef crafted this one with {key_ingredient} and a whole lot of passion.
1757
1758Available starting {availability}. Come taste what everyone's going to be talking about.
1759
1760📍 {location}
1761🕐 {hours}
1762
1763Tag someone who needs to try this.
1764
1765#{restaurant_hashtag} #NewMenuItem #FoodLovers`,profession:"restaurantpro",category:"menu_highlight",platforms:["facebook","instagram"],persuasionLever:"Reciprocity",postingGoal:"Engagement",trendCompatible:!0,placeholders:["{restaurant_name}","{dish_name}","{dish_description}","{key_ingredient}","{availability}","{location}","{hours}","{restaurant_hashtag}"],tags:["menu","new item","food"]},{id:"rest-chef-spotlight",title:"Chef Spotlight",description:"Highlight your chef's story, passion, and expertise",content:`Meet the hands behind every plate at {restaurant_name}.
1766
1767🧑‍🍳 {chef_name} — {chef_title}
1768
1769{chef_background}
1770
1771Their philosophy? "{chef_quote}"
1772
1773Every dish tells a story. Come experience the craft.
1774
1775📍 {location}
1776
1777#{restaurant_hashtag} #ChefSpotlight #Craftsmanship`,profession:"restaurantpro",category:"team_culture",platforms:["facebook","instagram","linkedin"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!1,placeholders:["{restaurant_name}","{chef_name}","{chef_title}","{chef_background}","{chef_quote}","{location}","{restaurant_hashtag}"],tags:["chef","team","behind the scenes"]},{id:"rest-limited-time-special",title:"Limited Time Special",description:"Create urgency around a temporary menu offering",content:`⏳ For a limited time only at {restaurant_name}:
1778
1779{special_name}
1780{special_description}
1781
1782Available {availability_window} — once it's gone, it's gone.
1783
1784We made {limited_quantity} and we're not making more.
1785
1786📍 {location}
1787📞 Reserve: {phone}
1788
1789#{restaurant_hashtag} #LimitedTime #DontMissThis`,profession:"restaurantpro",category:"promotional",platforms:["facebook","instagram"],persuasionLever:"Scarcity",postingGoal:"Leads",trendCompatible:!0,placeholders:["{restaurant_name}","{special_name}","{special_description}","{availability_window}","{limited_quantity}","{location}","{phone}","{restaurant_hashtag}"],tags:["special","limited","urgency"]},{id:"rest-hiring-kitchen",title:"Now Hiring Kitchen Staff",description:"Attract talented kitchen team members",content:`🔪 We're hiring at {restaurant_name}.
1790
1791Position: {position_title}
1792Experience: {experience_level}
1793Schedule: {schedule}
1794
1795What we offer:
1796→ {benefit_1}
1797→ {benefit_2}
1798→ {benefit_3}
1799
1800If you love food and take pride in your craft, we want to meet you.
1801
1802Apply: {apply_method}
1803
1804#{restaurant_hashtag} #NowHiring #KitchenJobs`,profession:"restaurantpro",category:"team_culture",platforms:["facebook","instagram"],persuasionLever:"Identity",postingGoal:"Leads",trendCompatible:!1,placeholders:["{restaurant_name}","{position_title}","{experience_level}","{schedule}","{benefit_1}","{benefit_2}","{benefit_3}","{apply_method}","{restaurant_hashtag}"],tags:["hiring","kitchen","jobs"]},{id:"rest-hiring-foh",title:"Now Hiring Front of House",description:"Recruit service-oriented front of house staff",content:`We're growing! {restaurant_name} is looking for:
1805
1806🙋 {position_title}
1807
1808You're the first and last impression our guests get. That matters to us.
1809
1810What we're looking for:
1811→ Genuine warmth
1812→ {quality_1}
1813→ {quality_2}
1814
1815What we offer:
1816→ {benefit_1}
1817→ {benefit_2}
1818
1819Interested? {apply_method}
1820
1821#{restaurant_hashtag} #NowHiring #Hospitality`,profession:"restaurantpro",category:"team_culture",platforms:["facebook","instagram"],persuasionLever:"Identity",postingGoal:"Leads",trendCompatible:!1,placeholders:["{restaurant_name}","{position_title}","{quality_1}","{quality_2}","{benefit_1}","{benefit_2}","{apply_method}","{restaurant_hashtag}"],tags:["hiring","front of house","service"]},{id:"rest-customer-review",title:"Customer Review Highlight",description:"Showcase genuine guest feedback and social proof",content:`This made our day. ⭐⭐⭐⭐⭐
1822
1823"{review_text}"
1824— {reviewer_name}
1825
1826We don't chase reviews. We chase experiences worth writing about.
1827
1828Thank you, {reviewer_first_name}. Moments like this are why we do what we do.
1829
1830📍 {restaurant_name}
1831
1832#{restaurant_hashtag} #GuestLove #5Stars`,profession:"restaurantpro",category:"social_proof",platforms:["facebook","instagram"],persuasionLever:"Social Proof",postingGoal:"Authority",trendCompatible:!0,placeholders:["{review_text}","{reviewer_name}","{reviewer_first_name}","{restaurant_name}","{restaurant_hashtag}"],tags:["review","testimonial","social proof"]},{id:"rest-seasonal-menu",title:"Seasonal Menu Launch",description:"Announce a new seasonal menu with excitement",content:`🌿 New season. New menu. Same passion.
1833
1834{restaurant_name}'s {season} menu is here:
1835
1836{highlight_1}
1837{highlight_2}
1838{highlight_3}
1839
1840Every ingredient sourced with intention. Every dish crafted with care.
1841
1842Available now.
1843
1844📍 {location}
1845📞 Reservations: {phone}
1846
1847#{restaurant_hashtag} #{season}Menu #FreshFlavors`,profession:"restaurantpro",category:"menu_highlight",platforms:["facebook","instagram"],persuasionLever:"Reciprocity",postingGoal:"Engagement",trendCompatible:!0,placeholders:["{restaurant_name}","{season}","{highlight_1}","{highlight_2}","{highlight_3}","{location}","{phone}","{restaurant_hashtag}"],tags:["seasonal","menu","launch"]},{id:"rest-private-events",title:"Private Event Hosting",description:"Promote your private dining and event space",content:`Planning something special? Let us host it.
1848
1849{restaurant_name} offers private dining for:
1850→ {event_type_1}
1851→ {event_type_2}
1852→ {event_type_3}
1853
1854Capacity: {capacity}
1855Custom menus available.
1856
1857Your event. Our kitchen. An unforgettable night.
1858
1859📞 Inquire: {phone}
1860📧 {email}
1861
1862#{restaurant_hashtag} #PrivateDining #Events`,profession:"restaurantpro",category:"promotional",platforms:["facebook","linkedin"],persuasionLever:"Reciprocity",postingGoal:"Leads",trendCompatible:!1,placeholders:["{restaurant_name}","{event_type_1}","{event_type_2}","{event_type_3}","{capacity}","{phone}","{email}","{restaurant_hashtag}"],tags:["events","private dining","catering"]},{id:"rest-catering",title:"Catering Services",description:"Promote c
1862atering for corporate and private events",content:`Bring {restaurant_name} to your next event.
1863
1864🍽️ Full-service catering for:
1865→ {occasion_1}
1866→ {occasion_2}
1867→ {occasion_3}
1868
1869From {min_guests} to {max_guests} guests.
1870Custom menus. Professional service. Restaurant-quality food — anywhere.
1871
1872📞 {phone}
1873📧 {email}
1874
1875#{restaurant_hashtag} #Catering #EventFood`,profession:"restaurantpro",category:"promotional",platforms:["facebook","linkedin"],persuasionLever:"Authority",postingGoal:"Leads",trendCompatible:!1,placeholders:["{restaurant_name}","{occasion_1}","{occasion_2}","{occasion_3}","{min_guests}","{max_guests}","{phone}","{email}","{restaurant_hashtag}"],tags:["catering","events","corporate"]},{id:"rest-wine-pairing",title:"Wine Pairing Highlight",description:"Educate and entice with a signature wine pairing",content:`🍷 Perfect pairing at {restaurant_name}:
1876
1877{dish_name} + {wine_name}
1878
1879Why it works:
1880{pairing_description}
1881
1882Our sommelier's pick. Your new favorite combination.
1883
1884Available nightly. Ask your server.
1885
1886📍 {location}
1887
1888#{restaurant_hashtag} #WinePairing #Foodie`,profession:"restaurantpro",category:"menu_highlight",platforms:["facebook","instagram"],persuasionLever:"Authority",postingGoal:"Engagement",trendCompatible:!0,placeholders:["{restaurant_name}","{dish_name}","{wine_name}","{pairing_description}","{location}","{restaurant_hashtag}"],tags:["wine","pairing","sommelier"]},{id:"rest-dessert-feature",title:"Dessert Feature",description:"Spotlight a signature dessert",content:`Save room. Trust us.
1889
1890🍰 {dessert_name}
1891
1892{dessert_description}
1893
1894Made fresh daily at {restaurant_name}.
1895
1896This is the kind of dessert people drive across town for.
1897
1898📍 {location}
1899
1900Tag your dessert person. 👇
1901
1902#{restaurant_hashtag} #DessertLovers #SweetTooth`,profession:"restaurantpro",category:"menu_highlight",platforms:["facebook","instagram"],persuasionLever:"Reciprocity",postingGoal:"Engagement",trendCompatible:!0,placeholders:["{dessert_name}","{dessert_description}","{restaurant_name}","{location}","{restaurant_hashtag}"],tags:["dessert","sweet","feature"]},{id:"rest-happy-hour",title:"Happy Hour Promotion",description:"Drive traffic during off-peak hours",content:`🍻 Happy Hour at {restaurant_name}
1903
1904{days}: {time_range}
1905
1906→ {deal_1}
1907→ {deal_2}
1908→ {deal_3}
1909
1910Good drinks. Good food. Good company.
1911No reservations needed.
1912
1913📍 {location}
1914
1915#{restaurant_hashtag} #HappyHour #AfterWork`,profession:"restaurantpro",category:"promotional",platforms:["facebook","instagram"],persuasionLever:"Reciprocity",postingGoal:"Leads",trendCompatible:!0,placeholders:["{restaurant_name}","{days}","{time_range}","{deal_1}","{deal_2}","{deal_3}","{location}","{restaurant_hashtag}"],tags:["happy hour","drinks","specials"]},{id:"rest-behind-scenes",title:"Behind the Scenes",description:"Show the human side of your restaurant operation",content:`What happens before the doors open at {restaurant_name}:
1916
1917🔪 {prep_detail_1}
1918🧑‍🍳 {prep_detail_2}
1919✨ {prep_detail_3}
1920
1921Every plate you receive started hours before you sat down.
1922
1923That's not a complaint. That's our commitment.
1924
1925#{restaurant_hashtag} #BehindTheScenes #RestaurantLife`,profession:"restaurantpro",category:"team_culture",platforms:["facebook","instagram"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!1,placeholders:["{restaurant_name}","{prep_detail_1}","{prep_detail_2}","{prep_detail_3}","{restaurant_hashtag}"],tags:["behind the scenes","prep","kitchen"]},{id:"rest-community-appreciation",title:"Community Appreciation Post",description:"Thank your local community and regulars",content:`To our {neighborhood} family —
1926
1927{milestone_or_message}
1928
1929You've supported us through {challenge_or_season}, and we don't take that lightly.
1930
1931{restaurant_name} exists because of you.
1932
1933Thank you. We'll keep earning it.
1934
1935❤️ The {restaurant_name} Team
1936
1937#{restaurant_hashtag} #Community #Grateful`,profession:"restaurantpro",category:"social_proof",platforms:["facebook","instagram"],persuasionLever:"Reciprocity",postingGoal:"Engagement",trendCompatible:!1,placeholders:["{neighborhood}","{milestone_or_message}","{challenge_or_season}","{restaurant_name}","{restaurant_hashtag}"],tags:["community","gratitude","local"]},{id:"rest-reservation-reminder",title:"Reservation Reminder",description:"Encourage advance reservations for busy periods",content:`📅 {upcoming_occasion} is coming up fast.
1938
1939{restaurant_name} fills up quickly for {occasion_detail}.
1940
1941Don't wait until the last minute — book your table now.
1942
1943📞 {phone}
1944🌐 {booking_url}
1945
1946We'll save your favorite spot.
1947
1948#{restaurant_hashtag} #Reservations #BookNow`,profession:"restaurantpro",category:"promotional",platforms:["facebook","instagram"],persuasionLever:"Scarcity",postingGoal:"Leads",trendCompatible:!0,placeholders:["{upcoming_occasion}","{restaurant_name}","{occasion_detail}","{phone}","{booking_url}","{restaurant_hashtag}"],tags:["reservation","booking","reminder"]}],nwe=[{id:"cr-edu-myth-busting",title:"Myth vs. Truth",description:"Challenge a common myth in your niche with clear evidence",content:`There's a myth in this space that won't die:
1949
1950"{common_myth}"
1951
1952Here's what actually happens:
1953
1954→ {truth_1}
1955→ {truth_2}
1956→ {truth_3}
1957
1958The creators who figure this out early build trust faster than those still repeating the myth.
1959
1960What's one myth in your niche you wish would disappear?
1961
1962#CreatorTips #AuthorityBuilding`,profession:"creator",category:"educational_breakdown",platforms:["linkedin","facebook","instagram"],persuasionLever:"Authority",postingGoal:"Engagement",trendCompatible:!0,placeholders:["{common_myth}","{truth_1}","{truth_2}","{truth_3}"],tags:["myth","education","trust"]},{id:"cr-edu-beginner-mistakes",title:"Rookie Mistakes Breakdown",description:"Teach by revealing the top mistakes newcomers make",content:`The 3 biggest mistakes new creators make:
1963
19641. Chasing trends instead of building voice
19652. Measuring followers instead of trust
19663. Creating for everyone instead of someone
1967
1968I made all three. Here's what changed:
1969
1970I stopped asking "what's viral?" and started asking "what's true?"
1971
1972That shift changed everything.
1973
1974What mistake taught you the most?
1975
1976#ContentCreator #GrowthMindset`,profession:"creator",category:"educational_breakdown",platforms:["linkedin","facebook"],persuasionLever:"Authority",postingGoal:"Engagement",trendCompatible:!1,tags:["mistakes","learning","growth"]},{id:"cr-auth-consistency",title:"The Consistency Argument",description:"Make a bold case for consistency over virality",content:`Unpopular opinion:
1977
1978Consistency will always beat virality.
1979
1980A viral post gives you attention for a day.
1981Consistency gives you authority for a decade.
1982
1983The creators you admire didn't blow up overnight.
1984They showed up. Again. And again. And again.
1985
1986Until showing up became their brand.
1987
1988Are you chasing the spike or building the foundation?
1989
1990#ConsistencyWins #CreatorEconomy`,profession:"creator",category:"authority_opinion",platforms:["linkedin","facebook","instagram"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!0,tags:["consistency","authority","opinion"]},{id:"cr-auth-contrarian",title:"The Contrarian Take",description:"Share a defensible opinion that goes against the grain",content:`Everyone says: "Post more to grow faster."
1991
1992I say: Post better.
1993
1994One post that makes someone think > ten posts that make someone scroll.
1995
1996Quality isn't about production value.
1997It's about resonance.
1998
1999Does your audience feel seen when they read your content?
2000
2001That's the only metric that matters long-term.
2002
2003What's your contrarian creator belief?
2004
2005#ContentStrategy #CreatorLife`,profession:"creator",category:"authority_opinion",platforms:["linkedin","facebook"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!1,tags:["contrarian","quality","strategy"]},{id:"cr-fw-trust-ladder",title:"The Trust Ladder Framework",description:"Teach a 3-step framework for building audience trust",content:`The Trust Ladder (how audiences actually decide to follow you):
2006
2007Step 1: Curiosity — "This person says interesting things."
2008Step 2: Credibility — "This person knows what they're talking about."
2009Step 3: Connection — "This person understands me."
2010
2011Most creators stop at Step 1.
2012
2013They create curiosity but never build credibility or connection.
2014
2015The result? Followers who scroll past.
2016
2017Which step are you strongest at? Which needs work?
2018
2019#CreatorFramework #AudienceGrowth`,profession:"creator",category:"framework_post",platforms:["linkedin","facebook","instagram"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!0,placeholders:[],tags:["framework","trust","audience"]},{id:"cr-story-voice",title:"Finding Your Voice Story",description:"Share a narrative about discovering your authentic voice",content:`I used to sound like everyone else online.
2020
2021Professional. Polished. Forgettable.
2022
2023Then one day I posted something real — raw, unfiltered, imperfect.
2024
2025It outperformed everything I'd ever written.
2026
2027Not because it was perfect.
2028Because it was honest.
2029
2030Your voice isn't something you create.
2031It's something you stop hiding.
2032
2033When did you first feel like yourself online?
2034
2035#AuthenticVoice #CreatorJourney`,profession:"creator",category:"story_lesson",platforms:["linkedin","facebook","instagram"],persuasionLever:"Identity",postingGoal:"Engagement",trendCompatible:!1,tags:["story","voice","authenticity"]},{id:"cr-story-patience",title:"The Patience Payoff",description:"Illustrate why patience compounds in content creation",content:`Month 1: 12 followers.
2036Month 3: 47 followers.
2037Month 6: 200 followers.
2038Month 12: 2,000 followers.
2039Month 18: 15,000 followers.
2040
2041The growth curve is never linear.
2042
2043The creators who quit at month 3 never see what month 18 looks like.
2044
2045Patience isn't passive. It's the most aggressive strategy there is.
2046
2047Where are you on the curve?
2048
2049#PatientGrowth #CreatorMindset`,profession:"creator",category:"story_lesson",platforms:["linkedin","facebook"],persuasionLever:"Consistency",postingGoal:"Engagement",trendCompatible:!1,tags:["patience","growth","compound"]},{id:"cr-comm-question",title:"Audience Deep Dive",description:"Ask a thought-provoking question to drive comments",content:`Honest question for creators:
2050
2051If you could only post on ONE platform for the next year, which would you choose and why?
2052
2053I'll go first: {platform_choice}
2054
2055Because {reason}.
2056
2057Your turn 👇
2058
2059#CreatorCommunity #ContentStrategy`,profession:"creator",category:"community_engagement",platforms:["linkedin","facebook","instagram"],persuasionLever:"Reciprocity",postingGoal:"Engagement",trendCompatible:!0,placeholders:["{platform_choice}","{reason}"],tags:["engagement","community","question"]},{id:"cr-comm-reflection",title:"Weekly Reflection",description:"Share a personal insight from your recent work",content:`Something I realized this week:
2060
2061{insight}
2062
2063It sounds simple. But it changed how I approach {area}.
2064
2065The best lessons aren't dramatic. They're quiet shifts that compound.
2066
2067What's one thing you learned this week that you'll carry forward?
2068
2069#WeeklyReflection #CreatorGrowth`,profession:"creator",category:"community_engagement",platforms:["linkedin","facebook"],persuasionLever:"Identity",postingGoal:"Engagement",trendCompatible:!1,placeholders:["{insight}","{area}"],tags:["reflection","insight","community"]},{id:"cr-comm-identity",title:"Identity Statement",description:"Declare what kind of creator you are and attract aligned followers",content:`I'm not the creator who:
2070→ Chases every algorithm change
2071→ Posts 5x a day hoping something sticks
2072→ Copies whatever's trending
2073
2074I'm the creator who:
2075→ Builds a body of work I'm proud of
2076→ Prioritizes depth over frequency
2077→ Trusts that the right audience will find me
2078
2079Defining what you're NOT is just as powerful as defining what you are.
2080
2081What kind of creator are you?
2082
2083#CreatorIdentity #PersonalBrand`,profession:"creator",category:"community_engagement",platforms:["linkedin","facebook","instagram"],persuasionLever:"Identity",postingGoal:"Authority",trendCompatible:!1,tags:["identity","brand","values"]}],rwe=[{id:"sh-profit-starting-small",title:"The Power of Starting Small",description:"Explain why small beginnings create massive momentum",content:`The biggest businesses started with the smallest moves.
2084
2085Not a perfect plan.
2086Not a massive investment.
2087Not "the right time."
2088
2089Just someone who said: "Let me try this."
2090
2091Starting small isn't a limitation.
2092It's a strategy.
2093
2094Small bets. Fast feedback. Constant improvement.
2095
2096That's how side hustles become real businesses.
2097
2098What was your smallest first step?
2099
2100#SideHustle #StartSmall #Entrepreneurship`,profession:"side_hustle",category:"profit_principle",platforms:["linkedin","facebook","instagram"],persuasionLever:"Authority",postingGoal:"Engagement",trendCompatible:!0,tags:["momentum","starting","small"]},{id:"sh-profit-pricing",title:"Pricing Psychology",description:"Share a principle about pricing that shifts perspective",content:`A pricing truth most side hustlers learn the hard way:
2101
2102If nobody ever says your price is too high, your price is too low.
2103
2104Underpricing doesn't attract more clients.
2105It attracts clients who don't value what you do.
2106
2107Price for the transformation you deliver.
2108Not for the time you spend.
2109
2110What's the hardest pricing lesson you've learned?
2111
2112#PricingStrategy #SideHustleTips`,profession:"side_hustle",category:"profit_principle",platforms:["linkedin","facebook"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!1,tags:["pricing","value","psychology"]},{id:"sh-exec-beats-perfection",title:"Execution Over Perfection",description:"Remind your audience that action creates clarity",content:`The perfect plan doesn't exist.
2113
2114But the imperfect action does.
2115
2116Every successful side hustle started with:
2117→ An imperfect offer
2118→ An imperfect audience
2119→ An imperfect product
2120
2121Perfection is the enemy of progress. Always has been.
2122
2123Ship it. Learn. Improve. Repeat.
2124
2125What are you waiting to make "perfect" before you launch?
2126
2127#JustShipIt #Execution #SideHustleLife`,profession:"side_hustle",category:"execution_reminder",platforms:["linkedin","facebook","instagram"],persuasionLever:"Authority",postingGoal:"Engagement",trendCompatible:!0,tags:["execution","perfection","action"]},{id:"sh-exec-daily-compound",title:"The 1% Daily Compound",description:"Show how small daily improvements create massive results",content:`Improve 1% per day for a year.
2128
2129That's not 365% better.
2130It's 37x better.
2131
2132The math of compounding applies to skills, not just money.
2133
2134Every tiny improvement adds up:
2135→ One better email
2136→ One smoother process
2137→ One happier customer
2138
2139In 12 months, you won't recognize your business.
2140
2141What's your 1% improvement for today?
2142
2143#CompoundGrowth #DailyImprovement`,profession:"side_hustle",category:"execution_reminder",platforms:["linkedin","facebook"],persuasionLever:"Consistency",postingGoal:"Authority",trendCompatible:!1,tags:["compound","daily","improvement"]},{id:"sh-lesson-ownership",title:"The Ownership Mindset",description:"Share why taking full ownership changes outcomes",content:`The day I stopped blaming the market, the algorithm, the economy — everything changed.
2144
2145Not because the obstacles disappeared.
2146
2147Because I started asking a different question:
2148
2149"What can I control right now?"
2150
2151Ownership isn't about fault.
2152It's about power.
2153
2154When you own the problem, you own the solution.
2155
2156What did taking ownership teach you?
2157
2158#OwnershipMindset #Entrepreneurship`,profession:"side_hustle",category:"lesson_learned",platforms:["linkedin","facebook"],persuasionLever:"Identity",postingGoal:"Engagement",trendCompatible:!1,tags:["ownership","mindset","responsibility"]},{id:"sh-lesson-discipline",title:"Discipline Creates Freedom",description:"Explain the paradox of discipline and freedom",content:`Most people think discipline restricts freedom.
2159
2160It's the opposite.
2161
2162Discipline to save → Freedom to invest.
2163Discipline to plan → Freedom to create.
2164Discipline to say no → Freedom to say yes to what matters.
2165
2166The side hustlers who build real freedom aren't the ones with no structure.
2167
2168They're the ones with the right structure.
2169
2170What daily discipline has given you the most freedom?
2171
2172#DisciplineEqualsFreedom #SideHustle`,profession:"side_hustle",category:"lesson_learned",platforms:["linkedin","facebook","instagram"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!0,tags:["discipline","freedom","paradox"]},{id:"sh-belief-money",title:"Money Belief Reframe",description:"Challenge a limiting belief about money and income",content:`A belief about money most people get wrong:
2173
2174"Money is made by working harder."
2175
2176Truth: Money is made by solving problems.
2177
2178The bigger the problem, the bigger the income.
2179The more people you help, the more you earn.
2180
2181Stop asking "How can I work more hours?"
2182Start asking "How can I solve bigger problems?"
2183
2184That one shift changes everything.
2185
2186What money belief did you have to unlearn?
2187
2188#MoneyMindset #ValueCreation`,profession:"side_hustle",category:"belief_shift",platforms:["linkedin","facebook"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!1,tags:["money","belief","reframe"]},{id:"sh-belief-risk",title:"Risk Reframed",description:"Reframe how your audience thinks about risk",content:`We're taught that risk means danger.
2189
2190But the biggest risk isn't starting something new.
2191
2192The biggest risk is staying exactly where you are for the next 10 years.
2193
2194→ Same income
2195→ Same frustrations
2196→ Same "someday" dreams
2197
2198Starting a side hustle isn't risky.
2199Never trying is.
2200
2201What "risky" decision ended up being the best one you ever made?
2202
2203#RiskReframed #SideHustleJourney`,profession:"side_hustle",category:"belief_shift",platforms:["linkedin","facebook","instagram"],persuasionLever:"Identity",postingGoal:"Engagement",trendCompatible:!0,tags:["risk","reframe","courage"]},{id:"sh-value-trust",title:"Customer Trust Statement",description:"Explain how trust becomes your competitive advantage",content:`Your biggest competitive advantage isn't your product.
2204
2205It's trust.
2206
2207Anyone can copy your offer.
2208No one can copy your reputation.
2209
2210Trust is built through:
2211→ Doing what you said you'd do
2212→ Being transparent when things go wrong
2213→ Delivering more than expected
2214
2215The businesses that last aren't the cheapest or the flashiest.
2216
2217They're the most trusted.
2218
2219How do you build trust with your customers?
2220
2221#CustomerTrust #BusinessGrowth`,profession:"side_hustle",category:"customer_value",platforms:["linkedin","facebook"],persuasionLever:"Social Proof",postingGoal:"Authority",trendCompatible:!1,tags:["trust","customer","value"]},{id:"sh-value-simplicity",title:"The Simplicity Advantage",description:"Make the case for keeping your business model simple",content:`Complexity is the enemy of the side hustle.
2222
2223The most profitable side businesses I've seen share one trait:
2224
2225They do one thing exceptionally well.
2226
2227Not ten services. Not five products. Not three audiences.
2228
2229One clear offer. One ideal customer. One simple system.
2230
2231Simplicity scales. Complexity breaks.
2232
2233What's one thing you could simplify in your business right now?
2234
2235#SimpleScales #SideHustleStrategy`,profession:"side_hustle",category:"customer_value",platforms:["linkedin","facebook","instagram"],persuasionLever:"Authority",postingGoal:"Engagement",trendCompatible:!0,tags:["simplicity","focus","scaling"]}],awe=[{id:"pr-mind-shift",title:"The Mindset Shift",description:"Share a mindset shift that fundamentally changed your outcomes",content:`The mindset shift that changed everything for me:
2236
2237From: "I have to do this."
2238To: "I get to do this."
2239
2240Same task. Completely different energy.
2241
2242When obligation becomes opportunity, everything improves:
2243→ Your focus sharpens
2244→ Your effort deepens
2245→ Your results compound
2246
2247What mindset shift changed your trajectory?
2248
2249#MindsetShift #PersonalGrowth`,profession:"personal",category:"mindset_reframe",platforms:["linkedin","facebook","instagram"],persuasionLever:"Identity",postingGoal:"Engagement",trendCompatible:!0,tags:["mindset","shift","perspective"]},{id:"pr-mind-discomfort",title:"Growth Requires Discomfort",description:"Normalize discomfort as part of the growth process",content:`If it's comfortable, you're not growing.
2250
2251That presentation that scares you? Growth.
2252That conversation you're avoiding? Growth.
2253That habit you know you need to start? Growth.
2254
2255Comfort is where dreams go to sleep.
2256
2257I'm not saying seek pain.
2258I'm saying stop running from discomfort.
2259
2260The best version of you lives on the other side of it.
2261
2262What uncomfortable thing are you avoiding right now?
2263
2264#GrowthMindset #PersonalDevelopment`,profession:"personal",category:"mindset_reframe",platforms:["linkedin","facebook"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!1,tags:["discomfort","growth","courage"]},{id:"pr-habit-identity",title:"Habits Shape Identity",description:"Explain how daily habits compound into who you become",content:`You don't rise to the level of your goals.
2265
2266You fall to the level of your habits.
2267
2268Every day you're casting a vote for the person you want to become:
2269
2270→ Read for 20 minutes = "I'm a learner"
2271→ Move your body = "I'm someone who takes care of themselves"
2272→ Write your thoughts = "I'm a thinker"
2273
2274Your habits aren't just things you do.
2275They're votes for your identity.
2276
2277What habit are you most proud of?
2278
2279#HabitBuilding #IdentityShift`,profession:"personal",category:"habit_builder",platforms:["linkedin","facebook","instagram"],persuasionLever:"Consistency",postingGoal:"Engagement",trendCompatible:!0,tags:["habits","identity","consistency"]},{id:"pr-habit-stacking",title:"Habit Stacking Method",description:"Teach a practical method for building new habits",content:`Want to build a new habit? Don't rely on willpower.
2280
2281Stack it.
2282
2283After [current habit], I will [new habit].
2284
2285Examples:
2286→ After I pour my coffee, I will journal for 5 minutes
2287→ After I sit at my desk, I will write my top 3 priorities
2288→ After dinner, I will read for 15 minutes
2289
2290Habits don't need motivation.
2291They need anchors.
2292
2293What habit could you stack onto something you already do?
2294
2295#HabitStacking #ProductivityTips`,profession:"personal",category:"habit_builder",platforms:["linkedin","facebook"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!1,tags:["habits","stacking","productivity"]},{id:"pr-growth-boundaries",title:"Boundaries Protect Growth",description:"Make the case for setting clear boundaries",content:`Setting boundaries isn't selfish.
2296
2297It's the most generous thing you can do.
2298
2299Because when you protect your energy:
2300→ You show up fully for the people who matter
2301→ You produce your best work
2302→ You model self-respect for others
2303
2304"No" is a complete sentence.
2305And every "no" to the wrong thing is a "yes" to the right thing.
2306
2307What boundary has made the biggest difference in your life?
2308
2309#Boundaries #SelfRespect #PersonalGrowth`,profession:"personal",category:"growth_lesson",platforms:["linkedin","facebook","instagram"],persuasionLever:"Identity",postingGoal:"Engagement",trendCompatible:!0,tags:["boundaries","growth","energy"]},{id:"pr-growth-confidence",title:"Confidence Compounds",description:"Explain how confidence is built through action, not waiting",content:`Confidence doesn't come before action.
2310
2311It comes from action.
2312
2313The cycle:
23141. Do the scary thing
23152. Survive
23163. Trust yourself a little more
23174. Repeat
2318
2319Nobody wakes up confident.
2320
2321They wake up committed. And confidence catches up.
2322
2323Stop waiting to feel ready.
2324Start acting ready.
2325
2326What action built your confidence the most?
2327
2328#ConfidenceCompounds #TakeAction`,profession:"personal",category:"growth_lesson",platforms:["linkedin","facebook"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!1,tags:["confidence","action","courage"]},{id:"pr-disc-motivation",title:"Discipline Beats Motivation",description:"Explain why discipline is more reliable than motivation",content:`Motivation is unreliable.
2329
2330It shows up when it wants.
2331It leaves when things get hard.
2332It's a fair-weather friend.
2333
2334Discipline? Discipline shows up every day.
2335
2336Not because it feels good.
2337Because it's who you are.
2338
2339The difference between where you are and where you want to be is discipline.
2340
2341Not talent. Not luck. Not motivation.
2342
2343Discipline.
2344
2345When was the last time discipline carried you when motivation didn't?
2346
2347#DisciplineOverMotivation #DailyDiscipline`,profession:"personal",category:"discipline_reminder",platforms:["linkedin","facebook","instagram"],persuasionLever:"Consistency",postingGoal:"Authority",trendCompatible:!0,tags:["discipline","motivation","consistency"]},{id:"pr-disc-patience",title:"Patience Is Strategic",description:"Reframe patience as an active strategy, not passive waiting",content:`Patience isn't sitting around hoping things change.
2348
2349Patience is:
2350→ Doing the work when nobody's watching
2351→ Trusting the process when results are slow
2352→ Staying the course when everyone else pivots
2353
2354The most successful people I know aren't the fastest.
2355They're the most patient.
2356
2357Because patience + consistency = unstoppable.
2358
2359What are you being patient about right now?
2360
2361#StrategicPatience #LongGame`,profession:"personal",category:"discipline_reminder",platforms:["linkedin","facebook"],persuasionLever:"Authority",postingGoal:"Engagement",trendCompatible:!1,tags:["patience","strategy","longterm"]},{id:"pr-persp-responsibility",title:"Responsibility Is Power",description:"Reframe responsibility as empowerment, not burden",content:`Responsibility feels heavy.
2362
2363Until you realize it's power.
2364
2365The moment you stop saying "this happened to me" and start saying "what am I going to do about it" — everything shifts.
2366
2367You can't control what happens.
2368You can always control your response.
2369
2370And your response shapes your results.
2371
2372Responsibility isn't a burden.
2373It's the foundation of personal power.
2374
2375What responsibility changed your life the most?
2376
2377#TakeResponsibility #PersonalPower`,profession:"personal",category:"perspective_shift",platforms:["linkedin","facebook","instagram"],persuasionLever:"Identity",postingGoal:"Authority",trendCompatible:!0,tags:["responsibility","power","agency"]},{id:"pr-persp-clarity",title:"Clarity Reduces Overwhelm",description:"Show how clarity in priorities eliminates decision fatigue",content:`Overwhelm isn't caused by too much work.
2378
2379It's caused by too little clarity.
2380
2381When you know exactly what matters:
2382→ Decisions become easy
2383→ Distractions lose their grip
2384→ Energy flows toward the right things
2385
2386The cure for overwhelm isn't doing less.
2387It's knowing what's important.
2388
2389Get clear. Stay clear. Watch everything change.
2390
2391What helped you find clarity when you felt most overwhelmed?
2392
2393#ClarityOverChaos #FocusMatters`,profession:"personal",category:"perspective_shift",platforms:["linkedin","facebook"],persuasionLever:"Authority",postingGoal:"Engagement",trendCompatible:!1,tags:["clarity","overwhelm","focus"]}],swe=[{id:"ins-coverage-101",title:"Coverage Types Explained",description:"Break down the main types of insurance coverage in plain language",content:`Most people don't understand their policy until they need it.
2394
2395Here are the 3 coverage types every homeowner should know:
2396
23971️⃣ Dwelling Coverage — protects the structure itself
23982️⃣ Liability Coverage — protects YOU if someone is injured on your property
23993️⃣ Personal Property — covers your belongings inside
2400
2401The biggest mistake? Assuming your policy covers everything.
2402
2403Drop a question below and I'll answer it — no jargon, no sales pitch.
2404
2405#InsuranceEducation #CoverageMatters`,profession:"insurance",category:"policy_education",platforms:["facebook","linkedin"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!1,tags:["education","coverage","homeowner"]},{id:"ins-deductible-truth",title:"Deductible Truth Bomb",description:"Explain how deductibles actually work and common misconceptions",content:`"I have insurance — I'm covered."
2406
2407Not exactly.
2408
2409Your deductible is the amount YOU pay before insurance kicks in.
2410
2411Higher deductible = lower premium
2412Lower deductible = higher premium
2413
2414The sweet spot? It depends on your financial cushion.
2415
2416If a $2,500 surprise would wreck your month, a $500 deductible is worth the extra premium.
2417
2418Know your numbers. That's real protection.
2419
2420#InsuranceTips #Deductibles`,profession:"insurance",category:"policy_education",platforms:["facebook","linkedin"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!1,tags:["deductible","education","financial"]},{id:"ins-policy-review-reminder",title:"Annual Policy Review Reminder",description:"Encourage clients to schedule their annual insurance review",content:`When was the last time you reviewed your insurance policy?
2421
2422If it's been more than 12 months, you might be:
2423→ Overpaying for coverage you don't need
2424→ Under-insured for risks that have changed
2425→ Missing discounts you now qualify for
2426
2427Life changes. Your policy should too.
2428
2429Comment "REVIEW" and I'll send you a free policy checklist.
2430
2431#PolicyReview #InsuranceAgent`,profession:"insurance",category:"policy_education",platforms:["facebook","linkedin"],persuasionLever:"Reciprocity",postingGoal:"Leads",trendCompatible:!1,tags:["review","annual","checklist"]},{id:"ins-claims-process",title:"Claims Process Simplified",description:"Walk clients through the claims filing process step by step",content:`Filing a claim doesn't have to be stressful.
2432
2433Here's exactly what to do:
2434
24351. Document everything — photos, receipts, dates
24362. Call your agent (that's me) FIRST
24373. File the claim with your carrier
24384. Get your adjuster assignment
24395. Review the settlement offer
2440
2441The #1 mistake people make? Waiting too long to file.
2442
2443Save this post. You'll thank me later.
2444
2445#InsuranceClaims #BeReady`,profession:"insurance",category:"claims_support",platforms:["facebook","linkedin"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!1,tags:["claims","process","documentation"]},{id:"ins-documentation-tips",title:"Document Before Disaster",description:"Teach clients how to prepare documentation before they need it",content:`Do this TODAY — before you ever need to file a claim:
2446
2447📸 Walk through your home and video every room
2448📋 Keep receipts for big purchases
2449🗂️ Store copies of your policy in the cloud
2450📱 Save your agent's number (hint: it's mine)
2451
2452When disaster strikes, the people who prepared recover faster.
2453
2454This takes 15 minutes. Your future self will thank you.
2455
2456#DisasterPrep #InsurancePro`,profession:"insurance",category:"claims_support",platforms:["facebook","instagram"],persuasionLever:"Reciprocity",postingGoal:"Authority",trendCompatible:!1,tags:["documentation","preparation","home inventory"]},{id:"ins-claim-mistakes",title:"Top Claims Mistakes",description:"Warn clients about common mistakes that delay or reduce claims",content:`3 mistakes that can REDUCE your insurance payout:
2457
2458❌ Not documenting damage immediately
2459❌ Making permanent repairs before the adjuster visits
2460❌ Accepting the first offer without reviewing
2461
2462Your policy is a contract. Know your rights.
2463
2464As your agent, I advocate for YOU — not the carrier.
2465
2466Questions about a current claim? DM me.
2467
2468#ClaimsTips #InsuranceAdvocate`,profession:"insurance",category:"claims_support",platforms:["facebook","linkedin"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!1,tags:["mistakes","claims","advocacy"]},{id:"ins-home-safety",title:"Home Safety Checklist",description:"Provide actionable home safety tips that reduce risk and premiums",content:`Want to lower your insurance premium AND protect your family?
2469
2470Here's your weekend safety checklist:
2471
2472✅ Test smoke detectors (replace batteries)
2473✅ Check fire extinguisher expiration
2474✅ Clear gutters and downspouts
2475✅ Trim trees away from your roof
2476✅ Update your home inventory
2477
2478Some of these qualify for premium discounts. Ask me which ones.
2479
2480#HomeSafety #InsuranceDiscounts`,profession:"insurance",category:"risk_prevention",platforms:["facebook","instagram"],persuasionLever:"Reciprocity",postingGoal:"Engagement",trendCompatible:!0,tags:["safety","home","prevention"]},{id:"ins-liability-awareness",title:"Liability Reality Check",description:"Educate about personal liability risks most people overlook",content:`You could be sued for something that happens on your property.
2481
2482Seriously.
2483
2484→ A delivery driver slips on your icy walkway
2485→ Your dog bites a neighbor's child
2486→ A tree from your yard falls on someone's car
2487
2488That's what liability coverage is for.
2489
2490Most people carry the minimum. That's a gamble.
2491
2492Let's review your liability limits — it takes 5 minutes.
2493
2494#LiabilityCoverage #ProtectYourself`,profession:"insurance",category:"risk_prevention",platforms:["facebook","linkedin"],persuasionLever:"Scarcity",postingGoal:"Leads",trendCompatible:!1,tags:["liability","risk","awareness"]},{id:"ins-auto-safety",title:"Auto Insurance Savings",description:"Share tips for reducing auto insurance costs through safe driving",content:`You might be overpaying for auto insurance.
2495
2496Here are 5 discounts most people don't ask about:
2497
2498🚗 Safe driver discount
2499📱 Telematics / usage-based pricing
2500🎓 Good student discount
2501🏠 Multi-policy bundle
2502💍 Married couple discount
2503
2504I've saved clients hundreds just by asking the right questions.
2505
2506Want me to check your policy? Comment "CHECK" below.
2507
2508#AutoInsurance #SaveMoney`,profession:"insurance",category:"risk_prevention",platforms:["facebook","instagram"],persuasionLever:"Reciprocity",postingGoal:"Leads",trendCompatible:!1,tags:["auto","savings","discounts"]},{id:"ins-life-myths",title:"Life Insurance Myth Buster",description:"Debunk common myths about life insurance",content:`"I'm young and healthy — I don't need life insurance."
2509
2510That's actually the BEST time to get it.
2511
2512Here's why:
2513→ You'll lock in the lowest rate of your life
2514→ Health can change overnight
2515→ It protects the people who depend on you
2516
2517Life insurance isn't about dying.
2518It's about living responsibly.
2519
2520Let's have the conversation. No pressure, no pitch.
2521
2522#LifeInsurance #MythBusted`,profession:"insurance",category:"life_awareness",platforms:["facebook","linkedin"],persuasionLever:"Identity",postingGoal:"Authority",trendCompatible:!1,tags:["life insurance","myths","young professionals"]},{id:"ins-term-vs-whole",title:"Term vs. Whole Life Explained",description:"Simple comparison of term and whole life insurance",content:`Term vs. Whole Life — here's the honest breakdown:
2523
2524📋 Term Life:
2525• Coverage for a set period (10-30 years)
2526• Lower premiums
2527• No cash value
2528• Best for: young families, mortgage protection
2529
2530💰 Whole Life:
2531• Coverage for life
2532• Higher premiums
2533• Builds cash value
2534• Best for: estate planning, legacy
2535
2536Neither is "better." The right one depends on YOUR goals.
2537
2538Let's figure it out together.
2539
2540#TermVsWhole #InsurancePlanning`,profession:"insurance",category:"life_awareness",platforms:["facebook","linkedin"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!1,tags:["term","whole life","comparison"]},{id:"ins-referral-thank-you",title:"Referral Thank You",description:"Publicly thank referral sources to encourage more referrals",content:`A huge thank you to everyone who has referred friends and family to me this year.
2541
2542Every referral tells me one thing:
2543You trust me enough to recommend me to someone you care about.
2544
2545That means everything.
2546
2547If you know someone who needs a policy review, a second opinion, or just honest answers — send them my way.
2548
2549I promise to take care of them like I take care of you.
2550
2551#Grateful #Referrals #InsuranceAgent`,profession:"insurance",category:"client_relationship",platforms:["facebook","linkedin"],persuasionLever:"Reciprocity",postingGoal:"Engagement",trendCompatible:!1,tags:["referral","gratitude","trust"]},{id:"ins-client-milestone",title:"Client Milestone Celebration",description:"Celebrate client anniversaries and milestones",content:`10 years.
2552
2553That's how long {client_name} has trusted me with their family's protection.
2554
2555Through a new home, two kids, a business launch, and one fender bender — we've adjusted, updated, and protected every step.
2556
2557This is what it means to be more than "just an agent."
2558
2559Here's to the next 10. 🥂
2560
2561#ClientAppreciation #InsurancePartner`,profession:"insurance",category:"client_relationship",platforms:["facebook","linkedin"],persuasionLever:"Social Proof",postingGoal:"Engagement",trendCompatible:!1,placeholders:["{client_name}"],tags:["milestone","client","anniversary"]},{id:"ins-community-safety",title:"Community Safety Event",description:"Promote local safety initiatives and community involvement",content:`This weekend I'm partnering with {organization} for a free community safety event.
2562
2563🔥 Free smoke detector installation
2564🚗 Car seat safety checks
2565📋 Insurance policy Q&A (no sales, just answers)
2566
2567Protecting this community isn't just my job — it's my purpose.
2568
2569Bring the family. Bring your questions. Bring a neighbor.
2570
2571📍 {location}
2572🕐 {time}
2573
2574#CommunityFirst #SafetyEvent`,profession:"insurance",category:"community_highlight",platforms:["facebook","instagram"],persuasionLever:"Reciprocity",postingGoal:"Engagement",trendCompatible:!0,placeholders:["{organization}","{location}","{time}"],tags:["community","safety","event"]}],iwe=[{id:"mtg-rate-types",title:"Fixed vs. ARM Explained",description:"Break down the difference between fixed-rate and adjustable-rate mortgages",content:`Fixed rate or adjustable rate? Let's settle this.
2575
2576📌 Fixed Rate:
2577• Same payment for 15-30 years
2578• Predictability and peace of mind
2579• Best when rates are low
2580
2581📊 Adjustable Rate (ARM):
2582• Lower initial rate for 5-7 years
2583• Rate adjusts after intro period
2584• Best for short-term homeowners
2585
2586Neither is "bad." The right one depends on how long you plan to stay.
2587
2588Let's talk about YOUR situation.
2589
2590#MortgageTips #FixedVsARM`,profession:"mortgage",category:"rate_education",platforms:["facebook","linkedin"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!1,tags:["rates","fixed","ARM","education"]},{id:"mtg-rate-lock",title:"Rate Lock Strategy",description:"Explain when and why to lock in a mortgage rate",content:`"Should I lock my rate or wait?"
2591
2592I get this question every single day.
2593
2594Here's how I advise my clients:
2595
2596🔒 Lock when:
2597• You're closing within 30-60 days
2598• Rates are trending up
2599• You've found THE house
2600
2601⏳ Float when:
2602• Closing is 90+ days out
2603• Rates are trending down
2604• You can tolerate some risk
2605
2606Timing the market is hard. Timing YOUR move is smart.
2607
2608#RateLock #MortgageAdvice`,profession:"mortgage",category:"rate_education",platforms:["facebook","linkedin"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!0,tags:["rate lock","strategy","timing"]},{id:"mtg-rate-factors",title:"What Actually Moves Rates",description:"Educate borrowers on the factors that influence mortgage rates",content:`Mortgage rates didn't just "go up."
2609
2610Here's what actually drives them:
2611
2612📈 Federal Reserve policy (indirect, not direct)
2613📊 10-year Treasury bond yields
2614🏠 Housing supply and demand
2615💰 Inflation expectations
2616📋 Your personal credit profile
2617
2618The Fed doesn't set mortgage rates. The bond market does.
2619
2620Understanding this gives you power. Knowledge = leverage.
2621
2622#MortgageRates #FinancialLiteracy`,profession:"mortgage",category:"rate_education",platforms:["linkedin","facebook"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!0,tags:["rates","economics","education"]},{id:"mtg-preapproval-power",title:"Pre-Approval Power Move",description:"Explain why pre-approval is essential before house hunting",content:`Stop house hunting without a pre-approval letter.
2623
2624Here's why:
2625
2626✅ You'll know your REAL budget (not Zillow's guess)
2627✅ Sellers take you seriously
2628✅ You can move fast when you find THE one
2629✅ You'll uncover credit issues before they derail closing
2630
2631A pre-approval takes 24 hours.
2632Losing your dream home takes 24 seconds.
2633
2634DM me "READY" and let's get you pre-approved this week.
2635
2636#PreApproval #FirstTimeHomeBuyer`,profession:"mortgage",category:"buyer_guidance",platforms:["facebook","instagram"],persuasionLever:"Scarcity",postingGoal:"Leads",trendCompatible:!1,tags:["pre-approval","first-time buyer","preparation"]},{id:"mtg-down-payment-myths",title:"Down Payment Myths",description:"Debunk the 20% down payment myth",content:`You do NOT need 20% down to buy a home.
2637
2638Let me say that again for the people in the back.
2639
2640Here are your real options:
2641
2642🏠 Conventional — as low as 3% down
2643🇺🇸 FHA — 3.5% down
2644🎖️ VA — 0% down (qualifying veterans)
2645🌾 USDA — 0% down (eligible areas)
2646
2647Plus, there are grants and programs that can cover your down payment entirely.
2648
2649Don't let myths keep you from homeownership.
2650
2651#DownPayment #MortgageMyths`,profession:"mortgage",category:"buyer_guidance",platforms:["facebook","instagram"],persuasionLever:"Identity",postingGoal:"Authority",trendCompatible:!1,tags:["down payment","myths","programs"]},{id:"mtg-first-time-checklist",title:"First-Time Buyer Checklist",description:"Step-by-step guide for first-time homebuyers",content:`First-time buyer? Here's your roadmap:
2652
26531️⃣ Check your credit score (free at annualcreditreport.com)
26542️⃣ Get pre-approved (not pre-qualified — there's a difference)
26553️⃣ Find a great realtor (I have referrals)
26564️⃣ Tour homes within your budget
26575️⃣ Make an offer with confidence
26586️⃣ Navigate inspection, appraisal, closing
2659
2660I walk my clients through every single step.
2661
2662Save this post. Share it with someone who needs it.
2663
2664#FirstTimeBuyer #HomeBuyingGuide`,profession:"mortgage",category:"buyer_guidance",platforms:["facebook","linkedin"],persuasionLever:"Reciprocity",postingGoal:"Leads",trendCompatible:!1,tags:["first-time","checklist","guide"]},{id:"mtg-refi-timing",title:"When to Refinance",description:"Help homeowners understand when refinancing makes sense",content:`Should you refinance? Here's the honest answer:
2665
2666✅ YES if:
2667• You can drop your rate by 0.75%+
2668• You plan to stay 3+ more years
2669• You want to eliminate PMI
2670• You need to consolidate debt
2671
2672❌ PROBABLY NOT if:
2673• You're moving soon
2674• Your break-even is 5+ years
2675• Your current rate is already competitive
2676
2677Refinancing isn't always the right move. But when it is, it can save you thousands.
2678
2679Let's run your numbers — free, no obligation.
2680
2681#Refinance #MortgageStrategy`,profession:"mortgage",category:"refinance_strategy",platforms:["facebook","linkedin"],persuasionLever:"Authority",postingGoal:"Leads",trendCompatible:!0,tags:["refinance","timing","strategy"]},{id:"mtg-cashout-refi",title:"Cash-Out Refi Explained",description:"Explain how cash-out refinancing works and when it's smart",content:`Your home equity is real money. Here's how to use it wisely.
2682
2683Cash-out refinance lets you:
2684→ Tap your equity without selling
2685→ Get a lump sum at closing
2686→ Use funds for renovations, debt payoff, or investments
2687
2688But be smart about it:
2689✓ Only borrow what you need
2690✓ Make sure the new rate makes sense
2691✓ Have a plan for the funds
2692
2693Your home built this wealth. Let it work for you.
2694
2695#CashOutRefi #HomeEquity`,profession:"mortgage",category:"refinance_strategy",platforms:["facebook","linkedin"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!1,tags:["cash-out","equity","refinance"]},{id:"mtg-loan-types",title:"Loan Types Decoded",description:"Compare major loan types in simple terms",content:`Not all mortgages are created equal.
2696
2697Here's your cheat sheet:
2698
2699🏠 Conventional — best rates, need good credit (620+)
2700🏛️ FHA — lower credit OK (580+), 3.5% down
2701🎖️ VA — for veterans, 0% down, no PMI
2702🌾 USDA — rural areas, 0% down
2703💰 Jumbo — for homes above conforming limits
2704
2705Each has pros, cons, and specific qualifications.
2706
2707Which one fits you? Let's find out.
2708
2709#LoanTypes #MortgageEducation`,profession:"mortgage",category:"loan_breakdown",platforms:["facebook","linkedin"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!1,tags:["loan types","FHA","VA","conventional"]},{id:"mtg-va-benefits",title:"VA Loan Benefits",description:"Highlight the benefits of VA loans for veterans",content:`If you've served this country, you've EARNED this benefit.
2710
2711VA Loan advantages:
2712
2713✅ $0 down payment
2714✅ No private mortgage insurance (PMI)
2715✅ Competitive interest rates
2716✅ Flexible credit requirements
2717✅ Can be used multiple times
2718
2719I specialize in helping veterans use this benefit to its fullest.
2720
2721Know a veteran who needs this info? Tag them.
2722
2723#VALoan #VeteranBenefits #ThankYouForYourService`,profession:"mortgage",category:"loan_breakdown",platforms:["facebook","linkedin"],persuasionLever:"Identity",postingGoal:"Leads",trendCompatible:!1,tags:["VA","veterans","benefits"]},{id:"mtg-credit-boost",title:"Boost Your Credit Score",description:"Actionable tips to improve credit score before applying",content:`Want to qualify for a better mortgage rate?
2724
2725Here are 5 things to do RIGHT NOW:
2726
27271️⃣ Pay down credit card balances below 30%
27282️⃣ Don't open new accounts
27293️⃣ Don't close old accounts
27304️⃣ Dispute any errors on your report
27315️⃣ Set up autopay for everything
2732
2733A 40-point credit score improvement can save you $200+/month on your mortgage.
2734
2735Start today. Your future home depends on it.
2736
2737#CreditScore #MortgageReady`,profession:"mortgage",category:"credit_qualification",platforms:["facebook","instagram"],persuasionLever:"Reciprocity",postingGoal:"Authority",trendCompatible:!1,tags:["credit","score","improvement"]},{id:"mtg-dti-explained",title:"DTI Ratio Explained",description:"Help borrowers understand debt-to-income ratio",content:`Your debt-to-income ratio (DTI) might be the most important number you've never heard of.
2738
2739Here's what lenders look at:
2740
2741📊 DTI = Monthly debt payments ÷ Gross monthly income
2742
2743✅ Under 36% — you're in great shape
2744⚠️ 36-43% — possible, may need compensating factors
2745❌ Over 50% — tough to qualify
2746
2747What counts as debt:
2748• Car payments
2749• Student loans
2750• Credit card minimums
2751• Existing mortgage
2752
2753Let's calculate yours — free, 5 minutes.
2754
2755#DTI #MortgageQualification`,profession:"mortgage",category:"credit_qualification",platforms:["facebook","linkedin"],persuasionLever:"Authority",postingGoal:"Leads",trendCompatible:!1,tags:["DTI","qualification","debt"]},{id:"mtg-market-update",title:"Weekly Market Pulse",description:"Share timely mortgage rate and market updates",content:`📊 This Week in Mortgage Rates:
2756
2757Rates moved {direction} this week.
2758
2759Here's what that means for you:
2760
2761→ Buyers: {buyer_impact}
2762→ Refinancers: {refi_impact}
2763→ Investors: {investor_impact}
2764
2765My take: {personal_insight}
2766
2767Want a personalized rate quote? DM me your scenario.
2768
2769#MortgageRates #MarketUpdate #WeeklyPulse`,profession:"mortgage",category:"market_commentary",platforms:["linkedin","facebook"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!0,placeholders:["{direction}","{buyer_impact}","{refi_impact}","{investor_impact}","{personal_insight}"],tags:["market","rates","weekly"]},{id:"mtg-closing-day",title:"Closing Day Celebration",description:"Celebrate clients on their closing day",content:`🔑 CLOSING DAY!
2770
2771Congratulations to {client_name} on their new home!
2772
2773From pre-approval to keys in hand — it's been an honor walking this journey with you.
2774
2775The best part of my job? This moment. Every single time.
2776
2777Thinking about buying? Let's start your story.
2778
2779#ClosingDay #NewHomeowner #MortgageProfessional`,profession:"mortgage",category:"client_relationship",platforms:["facebook","instagram"],persuasionLever:"Social Proof",postingGoal:"Engagement",trendCompatible:!1,placeholders:["{client_name}"],tags:["closing","celebration","client"]},{id:"mtg-referral-appreciation",title:"Referral Appreciation",description:"Thank referral partners and encourage more referrals",content:`My business is built on trust — and referrals are the ultimate proof of it.
2780
2781To every realtor, financial advisor, and past client who has sent someone my way this year:
2782
2783Thank you.
2784
2785I don't take a single referral for granted. Every person you send me gets the same care, transparency, and expertise.
2786
2787Know someone buying, refinancing, or just curious about their options? I'm here.
2788
2789#Referrals #MortgagePro #Grateful`,profession:"mortgage",category:"client_relationship",platforms:["facebook","linkedin"],persuasionLever:"Reciprocity",postingGoal:"Engagement",trendCompatible:!1,tags:["referral","appreciation","trust"]}],owe=[{id:"fc-ep-niche-authority",title:"The Niche Authority Declaration",description:"Establish category ownership in your consulting specialty",content:`The biggest mistake freelancers make? Trying to be everything to everyone.
2790
2791I spent years as a "generalist consultant." My pipeline was unpredictable, my rates were average, and every proposal felt like starting from scratch.
2792
2793Then I made one change: I picked a lane.
2794
2795Here's what happened when I niched down:
2796→ Inbound leads replaced cold outreach
2797→ My rates doubled because I was the obvious choice
2798→ Referrals came naturally — people knew exactly who to send my way
2799
2800The paradox of specialization: the narrower you go, the bigger your opportunity gets.
2801
2802If you're a freelancer struggling with inconsistent work, ask yourself: "What would I be known for if I could only do one thing?"
2803
2804That answer is your competitive advantage.`,profession:"freelance_consultant",category:"expertise_positioning",platforms:["linkedin"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!1,placeholders:[],tags:["niche","specialization","positioning"]},{id:"fc-ep-specialization-clarity",title:"Specialization vs. Generalization",description:"Challenge the myth that doing more means earning more",content:`"But if I specialize, won't I lose clients?"
2805
2806This is the #1 fear every freelancer has before niching down. And it's completely backwards.
2807
2808Here's the math:
2809• Generalist: 100 potential clients, 2% close rate = 2 clients
2810• Specialist: 20 potential clients, 40% close rate = 8 clients
2811
2812Specialists win because:
2813→ They're the obvious choice, not one of many options
2814→ They command premium rates without justifying them
2815→ They get referred automatically — people remember specialists
2816
2817You don't need more leads. You need to be the only logical choice for the right leads.
2818
2819What's the one problem you solve better than anyone?`,profession:"freelance_consultant",category:"expertise_positioning",platforms:["linkedin"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!1,placeholders:[],tags:["specialization","positioning","strategy"]},{id:"fc-ep-category-ownership",title:"Own Your Category",description:"Position yourself as the definitive expert in your space",content:`There are two types of consultants:
2820
28211. The one who says "I can help with that"
28222. The one clients say "You HAVE to talk to them about that"
2823
2824The difference isn't skill. It's positioning.
2825
2826Category ownership means:
2827→ Your name comes up in conversations you're not part of
2828→ Clients explain to others why they chose you (not the other way around)
2829→ Your pipeline fills from reputation, not hustle
2830
2831How to start owning your category today:
28321. Define it in one sentence (if you can't, it's too broad)
28332. Create content that only someone in that category would write
28343. Say no to work that dilutes your positioning
2835
2836The best consultants aren't the busiest. They're the most intentional.`,profession:"freelance_consultant",category:"expertise_positioning",platforms:["linkedin"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!1,placeholders:[],tags:["category","brand","positioning"]},{id:"fc-ca-discovery-call",title:"The Discovery Call Framework",description:"Turn discovery calls into signed contracts",content:`Most freelancers treat discovery calls like job interviews. That's why they lose.
2837
2838A great discovery call isn't about proving yourself. It's about diagnosing the problem.
2839
2840My framework:
2841→ First 10 minutes: Ask about the business outcome they want (not the deliverable)
2842→ Next 10 minutes: Explore what's been tried and why it didn't work
2843→ Last 10 minutes: Map their problem to your process
2844
2845The shift: You stop being a vendor pitching services. You become an advisor solving problems.
2846
2847Clients don't buy deliverables. They buy confidence that their problem will be solved.
2848
2849When you lead with diagnosis instead of credentials, your close rate goes up — and your rate objections go down.`,profession:"freelance_consultant",category:"client_acquisition",platforms:["linkedin"],persuasionLever:"Authority",postingGoal:"Leads",trendCompatible:!1,placeholders:[],tags:["sales","discovery","pipeline"]},{id:"fc-ca-proposal-strategy",title:"Proposals That Close",description:"Write proposals that get signed, not ignored",content:`I used to spend 4+ hours on proposals. My close rate? About 30%.
2850
2851Now I spend 45 minutes. My close rate? Over 70%.
2852
2853The difference: I stopped writing proposals and started writing decision documents.
2854
2855Old approach:
2856❌ 10-page PDF with scope, timeline, and bio
2857❌ Three pricing tiers hoping one sticks
2858❌ Sent and prayed
2859
2860New approach:
2861✅ One-page document that restates THEIR problem
2862✅ My recommended approach (not a menu)
2863✅ One price tied to the outcome, not hours
2864✅ Sent with a 5-minute walkthrough video
2865
2866The proposal isn't where you sell. The discovery call is where you sell. The proposal just confirms what was already decided.
2867
2868Stop writing proposals. Start writing confirmations.`,profession:"freelance_consultant",category:"client_acquisition",platforms:["linkedin"],persuasionLever:"Social Proof",postingGoal:"Leads",trendCompatible:!1,placeholders:[],tags:["proposals","sales","closing"]},{id:"fc-ca-pipeline-building",title:"The Pipeline Paradox",description:"Build a consistent pipeline without constant hustling",content:`The worst time to look for clients is when you need them.
2869
2870Every freelancer knows this. Yet most of us only market when work dries up.
2871
2872Here's the pipeline system that changed my business:
2873
2874Weekly (30 min total):
2875→ 2 thoughtful LinkedIn comments on ideal clients' posts
2876→ 1 original post sharing a client insight (anonymized)
2877→ 1 DM to a past client checking in (no pitch)
2878
2879Monthly:
2880→ 1 case study or framework post
2881→ 1 coffee chat with a potential referral partner
2882
2883The result: I went from feast-or-famine to a 3-month pipeline in under 6 months.
2884
2885The secret? Consistency beats intensity. Every single time.
2886
2887Your best marketing is being useful to the right people, regularly.`,profession:"freelance_consultant",category:"client_acquisition",platforms:["linkedin"],persuasionLever:"Reciprocity",postingGoal:"Leads",trendCompatible:!1,placeholders:[],tags:["pipeline","marketing","consistency"]},{id:"fc-vp-value-based",title:"Stop Trading Time for Money",description:"Make the case for value-based pricing",content:`A client once asked me: "What's your hourly rate?"
2888
2889I said: "I don't have one. Let me ask you something instead — what's this project worth to your business if it works?"
2890
2891Their answer: "Probably $500K in the first year."
2892
2893My proposal: $25K fixed fee.
2894
2895They didn't flinch. Because $25K for $500K in value is a no-brainer.
2896
2897Here's what hourly pricing gets wrong:
2898→ It punishes efficiency (faster = less money?)
2899→ It caps your income at hours × rate
2900→ It makes clients think about your time instead of their outcome
2901
2902Value-based pricing flips this:
2903→ You're paid for the result, not the effort
2904→ Faster delivery = higher effective rate
2905→ Clients focus on ROI, not your timesheet
2906
2907The shift starts with one question: "What is this worth to you?"`,profession:"freelance_consultant",category:"value_pricing",platforms:["linkedin"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!1,placeholders:[],tags:["pricing","value","rates"]},{id:"fc-vp-scope-creep",title:"Scope Creep Is a Pricing Problem",description:"Prevent scope creep before it starts",content:`Scope creep isn't a client problem. It's a pricing and boundaries problem.
2908
2909Every time a project expands without a conversation, it's because:
29101. The scope was vague from the start
29112. There's no mechanism to flag additions
29123. You're afraid saying no means losing the client
2913
2914Here's my scope protection system:
2915
2916At kickoff:
2917→ Define "done" in writing (specific deliverables, not activities)
2918→ Agree on a change request process upfront
2919
2920During the project:
2921→ When new requests come in: "Great idea. That's outside our current scope. Want me to quote it separately?"
2922→ Document everything in a shared tracker
2923
2924The magic words: "I'd love to help with that. Here's what it would look like as an add-on."
2925
2926Professional. Clear. Profitable.`,profession:"freelance_consultant",category:"value_pricing",platforms:["linkedin"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!1,placeholders:[],tags:["scope","boundaries","pricing"]},{id:"fc-vp-rate-increase",title:"How to Raise Your Rates",description:"Increase rates without losing clients",content:`I raised my rates 40% last year. I lost zero clients.
2927
2928Here's exactly how:
2929
2930Step 1: Stop announcing rate increases. Start introducing new packages.
2931→ Your old rate was for your old offer. Your new rate is for your upgraded offer.
2932
2933Step 2: Add more value before adding more cost.
2934→ Include a strategy session, a quarterly review, or a deliverable that costs you little but matters to them a lot.
2935
2936Step 3: Grandfather existing clients — temporarily.
2937→ "Your current rate stays through Q2. After that, here's the new structure."
2938
2939Step 4: Let some clients go.
2940→ If a client can't afford your growth, they're not your future client.
2941
2942The hardest part isn't the conversation. It's believing you're worth it.
2943
2944You are. Your results prove it.`,profession:"freelance_consultant",category:"value_pricing",platforms:["linkedin"],persuasionLever:"Identity",postingGoal:"Authority",trendCompatible:!1,placeholders:[],tags:["rates","pricing","growth"]},{id:"fc-de-process-showcase",title:"My Client Onboarding Process",description:"Show the professionalism behind your delivery",content:`The first 48 hours of a project set the tone for everything.
2945
2946Here's my onboarding process that makes clients feel like they hired a team, not a freelancer:
2947
2948Hour 0: Welcome email with:
2949→ Project brief summary (in my words, confirming alignment)
2950→ Shared workspace invite (Notion, Slack, or their tool of choice)
2951→ Key dates and first milestone
2952
2953Day 1: Kickoff call agenda:
2954→ Reconfirm objectives and success metrics
2955→ Agree on communication cadence
2956→ Identify stakeholders and decision-makers
2957
2958Day 2: First deliverable — even if it's small.
2959→ A draft outline, an audit, or a preliminary analysis
2960→ This builds instant confidence
2961
2962Why this matters: Most freelancers disappear after the contract is signed. I show up stronger.
2963
2964Your process IS your product. Make it remarkable.`,profession:"freelance_consultant",category:"delivery_excellence",platforms:["linkedin"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!1,placeholders:[],tags:["process","onboarding","delivery"]},{id:"fc-de-milestone-communication",title:"Over-Communicate, Don't Over-Deliver",description:"Why communication beats perfection in client work",content:`The #1 reason clients fire freelancers isn't bad work. It's silence.
2965
2966I learned this the hard way. I was heads-down building something great — and the client was panicking because they hadn't heard from me in a week.
2967
2968Now I follow the 3-2-1 rule:
2969→ 3 updates per week (even if just "on track, here's where we are")
2970→ 2 questions that show I'm thinking ahead
2971→ 1 proactive suggestion they didn't ask for
2972
2973The result:
2974• Clients trust me more
2975• Feedback comes earlier (fewer rewrites)
2976• Renewals happen naturally
2977
2978Here's the truth: Clients don't judge you on the final deliverable alone. They judge you on how the entire experience felt.
2979
2980Make the experience feel premium, and the deliverable is the cherry on top.`,profession:"freelance_consultant",category:"delivery_excellence",platforms:["linkedin"],persuasionLever:"Reciprocity",postingGoal:"Authority",trendCompatible:!1,placeholders:[],tags:["communication","delivery","trust"]},{id:"fc-de-boundaries",title:"Setting Boundaries That Protect Your Work",description:"Professional boundaries that earn respect",content:`Setting boundaries doesn't make you difficult. It makes you professional.
2981
2982Boundaries I set with every client:
2983
2984Communication:
2985→ I respond within 4 business hours, not 4 minutes
2986→ Slack/email during business hours. Emergencies get a phone call.
2987→ Weekly check-ins replace daily fire drills
2988
2989Scope:
2990→ Every new request gets a "scope check" before work begins
2991→ Revisions are defined upfront (2 rounds, then hourly)
2992→ Timeline changes require mutual agreement
2993
2994Availability:
2995→ I block deep work time — no meetings before 11am
2996→ I take real time off between projects
2997→ I don't apologize for having other clients
2998
2999The result? Clients respect me MORE, not less.
3000
3001Because boundaries signal something powerful: "I run a real business, and I take your project seriously enough to protect the quality."`,profession:"freelance_consultant",category:"delivery_excellence",platforms:["linkedin"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!1,placeholders:[],tags:["boundaries","professionalism","operations"]},{id:"fc-ab-thought-leadership",title:"Your Opinion Is Your Differentiator",description:"Use bold perspectives to stand out in your field",content:`Most consultants share information. The best ones share opinions.
3002
3003Information is: "Here are 5 ways to improve your marketing."
3004An opinion is: "90% of marketing advice is wrong because it ignores the one thing that actually drives revenue."
3005
3006Why opinions work:
3007→ They're memorable (people forget lists, remember bold takes)
3008→ They attract the right clients (the ones who think like you)
3009→ They repel the wrong ones (saving you time and energy)
3010
3011How to develop your signature opinion:
30121. What does everyone in your industry believe that you disagree with?
30132. What have you seen work that contradicts conventional wisdom?
30143. What would you tell a client if there were zero consequences?
3015
3016That's your thought leadership. Not recycled tips — YOUR perspective.
3017
3018The market doesn't need another expert. It needs YOUR expert voice.`,profession:"freelance_consultant",category:"authority_building",platforms:["linkedin"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!1,placeholders:[],tags:["thought-leadership","opinions","brand"]},{id:"fc-ab-visibility-strategy",title:"Visibility Creates Opportunity",description:"Build a visibility habit that generates inbound leads",content:`I used to think my work would speak for itself.
3019
3020It doesn't. Work speaks for itself only when people know it exists.
3021
3022Here's the visibility strategy that fills my pipeline:
3023
3024Content (2x/week on LinkedIn):
3025→ Share one client insight (anonymized)
3026→ Share one opinion about your industry
3027→ That's it. Consistency > volume.
3028
3029Community (1x/week):
3030→ Comment thoughtfully on 3 posts from ideal clients or peers
3031→ Not "Great post!" — real, additive comments
3032
3033Credibility (1x/month):
3034→ Publish one case study, framework, or long-form piece
3035→ This becomes your "proof of expertise" library
3036
3037After 6 months of this:
3038• 60% of my leads come inbound
3039• Speaking invitations started arriving
3040• Past clients re-engage because they see I'm still active
3041
3042You don't need to go viral. You need to be visible to the right 500 people.`,profession:"freelance_consultant",category:"authority_building",platforms:["linkedin"],persuasionLever:"Social Proof",postingGoal:"Authority",trendCompatible:!1,placeholders:[],tags:["visibility","content","inbound"]},{id:"fc-ab-speaking-credibility",title:"From Freelancer to Industry Voice",description:"Use speaking and writing to elevate your authority",content:`Want to go from "hired help" to "trusted advisor"? Start being the person on stage, not in the audience.
3043
3044You don't need a TED talk. You need a platform strategy:
3045
3046Start small:
3047→ Guest on 2-3 podcasts in your niche (most are looking for guests)
3048→ Write for industry publications (not your blog — their audience)
3049→ Speak at local meetups or virtual events
3050
3051Build up:
3052→ Create a signature talk or framework with a name
3053→ Pitch conference organizers with a specific, outcome-driven topic
3054→ Document everything — clips, quotes, photos become content
3055
3056The compounding effect:
3057→ Speaking leads to writing invitations
3058→ Writing leads to consulting inquiries
3059→ Consulting results lead to case studies
3060→ Case studies lead to more speaking
3061
3062It's a flywheel. And it starts with saying yes to one small opportunity.
3063
3064Stop waiting to be chosen. Start choosing to show up.`,profession:"freelance_consultant",category:"authority_building",platforms:["linkedin"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!1,placeholders:[],tags:["speaking","authority","credibility"]}],lwe=[{id:"pt-fat-loss-fail",title:"Why Fat Loss Attempts Fail",description:"Educate on the real reasons most fat loss efforts don't stick",content:`Most fat loss attempts fail for the same reason:
3065
3066You're doing too much, too fast, with no plan to sustain it.
3067
3068Here's what actually works:
3069
30701️⃣ Small calorie deficit (not starvation)
30712️⃣ Progressive strength training
30723️⃣ Protein at every meal
30734️⃣ Sleep 7+ hours
30745️⃣ Consistency over intensity
3075
3076The best program is the one you can do for 12 months — not 12 days.
3077
3078Save this. Share with someone who needs to hear it.
3079
3080#FatLoss #FitnessEducation #PersonalTrainer`,profession:"personal_trainer",category:"transformation_education",platforms:["instagram","facebook","linkedin"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!1,tags:["fat loss","education","sustainability"]},{id:"pt-progressive-overload",title:"Progressive Overload Explained",description:"Break down the #1 principle of muscle and strength gains",content:`If you're not getting stronger, you're not changing your body.
3081
3082Progressive overload = gradually increasing the demand on your muscles.
3083
3084This doesn't always mean more weight. It can mean:
3085
3086→ More reps
3087→ Better form
3088→ Slower tempo
3089→ Less rest time
3090→ Greater range of motion
3091
3092Your body adapts to what you give it. Give it more — strategically.
3093
3094What's your current PR? Drop it below 👇
3095
3096#ProgressiveOverload #StrengthTraining #FitnessCoach`,profession:"personal_trainer",category:"transformation_education",platforms:["instagram","facebook"],persuasionLever:"Authority",postingGoal:"Engagement",trendCompatible:!1,tags:["progressive overload","strength","education"]},{id:"pt-consistency-wins",title:"Consistency Beats Intensity",description:"Reinforce the power of showing up over going hard",content:`The person who trains 3x/week for a year will always beat the person who trains 7x/week for a month.
3097
3098Consistency > intensity.
3099
3100Here's proof:
3101
31023 sessions × 52 weeks = 156 workouts
31037 sessions × 4 weeks = 28 workouts
3104
3105It's not even close.
3106
3107Stop chasing the perfect plan. Start building the habit.
3108
3109#ConsistencyWins #FitnessJourney #TrainSmart`,profession:"personal_trainer",category:"transformation_education",platforms:["instagram","facebook","linkedin"],persuasionLever:"Social Proof",postingGoal:"Engagement",trendCompatible:!1,tags:["consistency","habits","motivation"]},{id:"pt-protein-role",title:"The Role of Protein",description:"Educate clients on why protein matters for body composition",content:`Protein isn't just for bodybuilders.
3110
3111It's for anyone who wants to:
3112
3113✅ Build lean muscle
3114✅ Recover faster
3115✅ Stay full longer
3116✅ Maintain metabolism during fat loss
3117
3118How much? Aim for 0.7–1g per pound of body weight.
3119
3120That means if you weigh 160 lbs, target 112–160g daily.
3121
3122It sounds like a lot. Start by adding protein to every meal.
3123
3124Small changes. Big results.
3125
3126#ProteinMatters #NutritionTips #FitnessCoach`,profession:"personal_trainer",category:"transformation_education",platforms:["instagram","facebook"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!1,tags:["protein","nutrition","education"]},{id:"pt-spot-reduction",title:"Spot Reduction Myth",description:"Debunk one of the most persistent fitness myths",content:`You cannot crunch your way to a flat stomach.
3127
3128Spot reduction is a myth. Here's why:
3129
3130Fat loss happens systemically — your body decides where it comes off, not your exercises.
3131
31321000 crunches won't burn belly fat.
3133But a proper training + nutrition plan will.
3134
3135Focus on:
3136→ Full-body strength training
3137→ Calorie management
3138→ Patience
3139
3140The abs will come. The timeline is different for everyone.
3141
3142#MythBusted #FitnessMyths #PersonalTrainer`,profession:"personal_trainer",category:"myth_busting",platforms:["instagram","facebook"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!1,tags:["myths","spot reduction","education"]},{id:"pt-fad-diet-critique",title:"Fad Diet Reality Check",description:"Challenge the allure of quick-fix diets",content:`Every fad diet works.
3143
3144For about 3 weeks.
3145
3146Then what?
3147
3148→ You're miserable
3149→ You binge
3150→ You gain it all back (plus more)
3151
3152The diet industry makes $72B/year selling you the same failure loop.
3153
3154What actually works:
3155
3156✅ Moderate deficit
3157✅ Foods you enjoy
3158✅ Flexibility
3159✅ Long-term thinking
3160
3161The best diet is the one you never have to quit.
3162
3163#FadDiets #NutritionReality #FitnessCoach`,profession:"personal_trainer",category:"myth_busting",platforms:["instagram","facebook","linkedin"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!1,tags:["diets","myths","sustainability"]},{id:"pt-cardio-misconception",title:"Cardio Misconception",description:"Reframe the role of cardio in body transformation",content:`Cardio doesn't build the body you want.
3164
3165Strength training does.
3166
3167Cardio is great for:
3168→ Heart health
3169→ Endurance
3170→ Stress relief
3171
3172But if your goal is to change how your body looks?
3173
3174Lift weights. Build muscle. Increase your metabolism.
3175
3176Then add cardio as a supplement — not the foundation.
3177
3178The gym isn't about burning calories. It's about building capacity.
3179
3180#StrengthOverCardio #FitnessMyths #TrainSmart`,profession:"personal_trainer",category:"myth_busting",platforms:["instagram","facebook"],persuasionLever:"Authority",postingGoal:"Engagement",trendCompatible:!1,tags:["cardio","strength training","myths"]},{id:"pt-why-clients-quit",title:"Why Clients Quit",description:"Address the psychology behind falling off track",content:`Most people don't quit because the workouts are hard.
3181
3182They quit because:
3183
3184→ They expected results in 2 weeks
3185→ They compared themselves to someone 3 years ahead
3186→ They tried to change everything at once
3187→ Nobody held them accountable
3188
3189Fitness isn't a sprint. It's a skill you build.
3190
3191The people who succeed? They show up on the days they don't feel like it.
3192
3193That's the difference.
3194
3195#MindsetMatters #FitnessJourney #Accountability`,profession:"personal_trainer",category:"client_psychology",platforms:["instagram","facebook","linkedin"],persuasionLever:"Identity",postingGoal:"Engagement",trendCompatible:!1,tags:["psychology","quitting","mindset"]},{id:"pt-identity-shift",title:"The Identity Shift",description:"Teach the mental transformation behind physical change",content:`The biggest transformation isn't physical.
3196
3197It's when you stop saying "I'm trying to get in shape" and start saying "I'm someone who trains."
3198
3199That identity shift changes everything:
3200
3201→ You don't negotiate with yourself
3202→ You don't skip "just this once"
3203→ You don't need motivation — you have standards
3204
3205Results follow identity. Not the other way around.
3206
3207Who are you becoming?
3208
3209#IdentityShift #TransformationMindset #FitnessCoach`,profession:"personal_trainer",category:"client_psychology",platforms:["instagram","linkedin"],persuasionLever:"Identity",postingGoal:"Authority",trendCompatible:!1,tags:["identity","mindset","transformation"]},{id:"pt-discipline-vs-motivation",title:"Discipline vs Motivation",description:"Reframe how clients think about showing up",content:`Motivation gets you to the gym on Monday.
3210
3211Discipline gets you there on Thursday.
3212
3213Here's the truth most fitness influencers won't tell you:
3214
3215You will NOT always feel like training.
3216You will NOT always see progress.
3217You will NOT always feel motivated.
3218
3219And that's exactly when it matters most.
3220
3221Discipline is doing the thing when it's boring.
3222
3223That's where results live.
3224
3225#DisciplineOverMotivation #FitnessLife #PersonalTrainer`,profession:"personal_trainer",category:"client_psychology",platforms:["instagram","facebook"],persuasionLever:"Identity",postingGoal:"Engagement",trendCompatible:!1,tags:["discipline","motivation","mindset"]},{id:"pt-who-coaching-for",title:"Who My Coaching Is For",description:"Qualify ideal clients and repel poor fits",content:`My coaching is for people who:
3226
3227✅ Are tired of guessing
3228✅ Want a structured plan that works
3229✅ Are ready to commit for at least 12 weeks
3230✅ Value guidance over shortcuts
3231✅ Want sustainable results, not quick fixes
3232
3233My coaching is NOT for people who:
3234
3235❌ Want a magic pill
3236❌ Aren't willing to track
3237❌ Think 2 weeks is enough
3238❌ Want to argue with science
3239
3240If you're ready to do the work, I'm ready to guide you.
3241
3242DM "READY" to learn more.
3243
3244#PersonalTraining #FitnessCoaching #Results`,profession:"personal_trainer",category:"commercial_authority",platforms:["instagram","facebook","linkedin"],persuasionLever:"Identity",postingGoal:"Leads",trendCompatible:!1,tags:["coaching","qualification","commercial"]},{id:"pt-investment-mindset",title:"Investment vs Expense",description:"Reframe coaching cost as an investment in health",content:`"Personal training is expensive."
3245
3246You know what's more expensive?
3247
3248→ Medical bills from preventable conditions
3249→ Lost confidence affecting your career
3250→ Years of gym memberships you barely use
3251→ Supplements that don't work
3252→ Program after program that gets abandoned
3253
3254Coaching isn't a cost. It's a shortcut to the result you've been chasing for years.
3255
3256The question isn't whether you can afford it.
3257
3258It's whether you can afford to keep going alone.
3259
3260#InvestInYourself #FitnessCoaching #PersonalTrainer`,profession:"personal_trainer",category:"commercial_authority",platforms:["instagram","facebook","linkedin"],persuasionLever:"Scarcity",postingGoal:"Leads",trendCompatible:!1,tags:["pricing","investment","commercial"]},{id:"pt-12-week-reality",title:"12-Week Transformation Reality",description:"Set honest expectations about what transformation requires",content:`What a real 12-week transformation looks like:
3261
3262Week 1-2: Learning the routine
3263Week 3-4: Building consistency
3264Week 5-6: First visible changes
3265Week 7-8: Strength jumps
3266Week 9-10: Clothes fit different
3267Week 11-12: Other people notice
3268
3269Notice what's NOT on this list?
3270
3271❌ Overnight abs
3272❌ 30-lb drops in 30 days
3273❌ Zero struggle
3274
3275Real results take real time.
3276
3277But 12 weeks from now, you'll wish you started today.
3278
3279#TransformationReality #12WeekJourney #FitnessCoach`,profession:"personal_trainer",category:"commercial_authority",platforms:["instagram","facebook"],persuasionLever:"Social Proof",postingGoal:"Leads",trendCompatible:!1,tags:["transformation","timeline","expectations"]}],cwe=[{id:"cc-why-courses-fail",title:"Why Most Courses Fail Students",description:"Position yourself by exposing what's broken in online education",content:`Most online courses fail students. Not because the content is bad.
3280
3281Because they're designed for the creator, not the student.
3282
3283Here's what I see over and over:
3284
3285❌ 40 hours of video, zero implementation
3286❌ No accountability layer
3287❌ No milestone checkpoints
3288❌ Content dump instead of transformation path
3289
3290A great course isn't about how much you teach.
3291
3292It's about how much your students actually DO.
3293
3294Design for outcomes. Not for completeness.
3295
3296#CourseDesign #OnlineEducation #CourseCreator`,profession:"course_coach",category:"course_design_authority",platforms:["linkedin","instagram","facebook"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!1,tags:["course design","education","outcomes"]},{id:"cc-outcome-first",title:"Outcome-First Design",description:"Teach the principle of starting with the result",content:`Before you record a single lesson, answer this:
3297
3298"What will my student be able to DO after this course?"
3299
3300Not know. DO.
3301
3302That answer becomes your:
3303→ Sales page headline
3304→ Curriculum backbone
3305→ Student success metric
3306→ Testimonial prompt
3307
3308When you design backwards from the outcome, everything else falls into place.
3309
3310Stop building courses. Start building transformations.
3311
3312#OutcomeFirst #CurriculumDesign #CourseCoach`,profession:"course_coach",category:"course_design_authority",platforms:["linkedin","instagram"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!1,tags:["outcomes","design","transformation"]},{id:"cc-completion-psychology",title:"Completion Rate Psychology",description:"Explain why completion rates matter and how to improve them",content:`The average online course completion rate is 5-15%.
3313
3314That's not a student problem. That's a design problem.
3315
3316Here's how to fix it:
3317
33181️⃣ Shorter modules (under 10 min each)
33192️⃣ Action items after every lesson
33203️⃣ Progress celebrations (not just progress bars)
33214️⃣ Community accountability
33225️⃣ Quick wins in the first 48 hours
3323
3324Students don't finish courses that feel endless.
3325
3326They finish courses that feel like progress.
3327
3328#CompletionRate #CourseDesign #StudentSuccess`,profession:"course_coach",category:"course_design_authority",platforms:["linkedin","instagram","facebook"],persuasionLever:"Authority",postingGoal:"Engagement",trendCompatible:!1,tags:["completion","psychology","design"]},{id:"cc-cohort-vs-evergreen",title:"Cohort vs Evergreen",description:"Help creators choose the right delivery model",content:`Cohort or evergreen? Here's how to decide:
3329
3330Choose COHORT if:
3331→ Your topic needs community support
3332→ You want higher completion rates
3333→ You're still refining curriculum
3334→ You want premium pricing
3335
3336Choose EVERGREEN if:
3337→ Your topic is skill-based and linear
3338→ You want passive revenue
3339→ Your audience spans time zones
3340→ You've already validated the content
3341
3342Neither is better. But wrong model = wrong results.
3343
3344Which do you use? 👇
3345
3346#CourseCreator #OnlineBusiness #EducationDesign`,profession:"course_coach",category:"course_design_authority",platforms:["linkedin","instagram"],persuasionLever:"Authority",postingGoal:"Engagement",trendCompatible:!1,tags:["cohort","evergreen","delivery model"]},{id:"cc-why-students-hesitate",title:"Why Students Hesitate",description:"Address the psychology of enrollment hesitation",content:`Your ideal student wants to buy.
3347
3348But they're stuck on one of these:
3349
33501. "Will this actually work for me?"
3351→ Show specific student transformations
3352
33532. "Is now the right time?"
3354→ Show the cost of waiting
3355
33563. "Can I afford it?"
3357→ Reframe as investment vs expense
3358
33594. "What if I don't finish?"
3360→ Show your accountability system
3361
33625. "Is this person legit?"
3363→ Lead with proof, not promises
3364
3365Stop selling harder. Start answering better.
3366
3367#EnrollmentStrategy #CourseCreator #SalesPage`,profession:"course_coach",category:"enrollment_sales",platforms:["linkedin","instagram","facebook"],persuasionLever:"Social Proof",postingGoal:"Leads",trendCompatible:!1,tags:["enrollment","objections","sales"]},{id:"cc-trust-before-transaction",title:"Trust Before Transaction",description:"Teach why building trust is the real enrollment strategy",content:`Nobody buys a $500 course from a stranger.
3368
3369Here's the trust ladder your student climbs:
3370
3371🪜 Step 1: Free content that solves a real problem
3372🪜 Step 2: A lead magnet that delivers a quick win
3373🪜 Step 3: Email nurture that builds relationship
3374🪜 Step 4: A webinar or workshop that proves your method
3375🪜 Step 5: An enrollment offer that feels like a natural next step
3376
3377Skip a step and you lose them.
3378
3379Respect the ladder.
3380
3381#TrustBuilding #CourseMarketing #OnlineEducation`,profession:"course_coach",category:"enrollment_sales",platforms:["linkedin","instagram"],persuasionLever:"Reciprocity",postingGoal:"Authority",trendCompatible:!1,tags:["trust","funnel","enrollment"]},{id:"cc-pricing-tiers",title:"Course Pricing Strategy",description:"Help creators price their courses with confidence",content:`Stop pricing your course based on what competitors charge.
3382
3383Price it based on the transformation you deliver.
3384
3385Here's my framework:
3386
3387💰 Under $100 → Information product (templates, checklists)
3388💰 $100-$500 → Implementation course (structured curriculum + support)
3389💰 $500-$2000 → Transformation program (coaching + community + accountability)
3390💰 $2000+ → Premium experience (1:1 access, certification, results guarantee)
3391
3392The question isn't "how much content?"
3393
3394It's "how much is the outcome worth?"
3395
3396#CoursePricing #OnlineBusiness #CourseCoach`,profession:"course_coach",category:"enrollment_sales",platforms:["linkedin","instagram","facebook"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!1,tags:["pricing","strategy","value"]},{id:"cc-reducing-dropoff",title:"Reducing Student Drop-off",description:"Share strategies to keep students engaged throughout the course",content:`Where students drop off in your course:
3397
3398📉 Module 1: Too much theory, not enough action
3399📉 Module 3: The "messy middle" with no quick wins
3400📉 Module 5+: Lost momentum, no accountability
3401
3402How to fix each:
3403
3404→ Module 1: Lead with a quick win in the first lesson
3405→ Module 3: Add a checkpoint celebration + peer sharing
3406→ Module 5+: Personal check-in or community challenge
3407
3408Design for the drop-off points. That's where great courses are built.
3409
3410#StudentRetention #CourseDesign #OnlineEducation`,profession:"course_coach",category:"student_success",platforms:["linkedin","instagram"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!1,tags:["retention","engagement","design"]},{id:"cc-accountability-layer",title:"The Accountability Layer",description:"Show why accountability is the missing piece in most courses",content:`Content doesn't create transformation.
3411
3412Accountability does.
3413
3414Here are 5 accountability layers you can add to any course:
3415
34161️⃣ Weekly action commitments (public or private)
34172️⃣ Peer accountability partners
34183️⃣ Progress sharing in community
34194️⃣ Office hours with real-time feedback
34205️⃣ Milestone certifications
3421
3422The courses with the best results aren't the ones with the most content.
3423
3424They're the ones that make it impossible to hide.
3425
3426#Accountability #CourseCreator #StudentSuccess`,profession:"course_coach",category:"student_success",platforms:["linkedin","instagram","facebook"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!1,tags:["accountability","community","outcomes"]},{id:"cc-case-study-storytelling",title:"Student Spotlight Framework",description:"Teach how to turn student wins into powerful marketing",content:`Your best marketing isn't your sales page.
3427
3428It's your student results.
3429
3430Here's my Student Spotlight Framework:
3431
3432🎯 Before: Where were they? What was the pain?
3433🔄 During: What clicked? What was the turning point?
3434🏆 After: What's different now? Measurable result?
3435
3436Example:
3437"Sarah came in overwhelmed with no plan. By week 4, she had her first client. By week 8, she'd made $3,200."
3438
3439That story sells better than any feature list.
3440
3441Collect wins. Share them. Repeat.
3442
3443#StudentSpotlight #CourseMarketing #SocialProof`,profession:"course_coach",category:"student_success",platforms:["linkedin","instagram","facebook"],persuasionLever:"Social Proof",postingGoal:"Leads",trendCompatible:!1,tags:["case study","testimonials","marketing"]},{id:"cc-scaling-beyond-1on1",title:"Scaling Beyond 1:1",description:"Show the path from coaching to scalable courses",content:`1:1 coaching is the best way to learn your craft.
3444
3445But it's the worst way to scale your income.
3446
3447Here's the evolution:
3448
34491️⃣ 1:1 coaching → Validate your method
34502️⃣ Group program → Test with more people
34513️⃣ Self-paced course → Remove yourself from delivery
34524️⃣ Course + community → Create ongoing value
34535️⃣ Certification → License your methodology
3454
3455You don't skip steps. But you don't stay on step 1 forever either.
3456
3457Where are you on this ladder?
3458
3459#ScalingBusiness #CourseCreator #OnlineEducation`,profession:"course_coach",category:"scalable_business",platforms:["linkedin","instagram"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!1,tags:["scaling","business model","evolution"]},{id:"cc-intellectual-property",title:"Building Intellectual Property",description:"Position course content as a valuable business asset",content:`Your course content is intellectual property.
3460
3461Treat it like one.
3462
3463→ Name your frameworks
3464→ Trademark your methodology
3465→ Create proprietary language
3466→ Build a system, not just lessons
3467
3468When students say "I used the [Your Name] Method," that's an asset.
3469
3470When they say "I took an online course," that's a commodity.
3471
3472The difference? Intentional IP development.
3473
3474What would you name your signature framework?
3475
3476#IntellectualProperty #CourseCreator #BrandBuilding`,profession:"course_coach",category:"scalable_business",platforms:["linkedin","instagram"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!1,tags:["IP","frameworks","branding"]},{id:"cc-recurring-revenue",title:"Recurring Revenue in Education",description:"Introduce the concept of membership and subscription models",content:`One-time course sales are great.
3477
3478Recurring revenue is better.
3479
3480Here's how to add subscription to your education business:
3481
34821️⃣ Monthly Q&A or office hours
34832️⃣ New content drips (templates, case studies)
34843️⃣ Community access with ongoing value
34854️⃣ Advanced modules released quarterly
34865️⃣ Alumni mastermind
3487
3488The goal: students stay because the value compounds.
3489
3490Not because they're locked in.
3491
3492Build retention, not cages.
3493
3494#RecurringRevenue #OnlineBusiness #CourseCoach`,profession:"course_coach",category:"scalable_business",platforms:["linkedin","instagram","facebook"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!1,tags:["recurring revenue","membership","subscription"]}],S7={just_listed:{label:"Just Listed",icon:"Home",description:"Announce new property listings"},just_sold:{label:"Just Sold",icon:"PartyPopper",description:"Celebrate closed deals"},market_insight:{label:"Market Insight",icon:"TrendingUp",description:"Share market trends & data"},buyer_education:{label:"Buyer Education",icon:"GraduationCap",description:"Tips for homebuyers"},seller_education:{label:"Seller Education",icon:"Users",description:"Tips for home sellers"},community_highlight:{label:"Community Highlight",icon:"MapPin",description:"Showcase neighborhoods & local life"},personal_authority:{label:"Personal Authority",icon:"Star",description:"Position yourself as the go-to expert"},market_education:{label:"Market Education",icon:"LineChart",description:"Explain market dynamics & trends"},client_psychology:{label:"Client Psychology",icon:"Brain",description:"Address behavioral finance & mindset"},process_explanation:{label:"Process Explanation",icon:"FileText",description:"Demystify financial planning steps"},year_end_reflection:{label:"Year-End Reflection",icon:"Calendar",description:"Annual reviews & forward planning"},frequently_asked_questions:{label:"FAQs",icon:"HelpCircle",description:"Answer common client questions"},project_breakdown:{label:"Project Breakdown",icon:"Hammer",description:"Explain project phases & scope"},cost_explanation:{label:"Cost Explanation",icon:"DollarSign",description:"Break down pricing & budgeting"},timeline_expectations:{label:"Timeline Expectations",icon:"Clock",description:"Set realistic project timelines"},before_after_case:{label:"Before & After",icon:"ImageIcon",description:"Showcase transformation stories"},homeowner_education:{label:"Homeowner Education",icon:"BookOpen",description:"Tips for maintaining & upgrading"},just_rented:{label:"Just Rented",icon:"KeyRound",description:"Announce successfully rented properties"},new_listing_rental:{label:"New Listing (Rental)",icon:"Home",description:"Promote available rental properties"},maintenance_update:{label:"Maintenance Update",icon:"Wrench",description:"Showcase responsive maintenance"},lease_renewal:{label:"Lease Renewal",icon:"RefreshCw",description:"Celebrate tenant retention wins"},community_announcement:{label:"Community Announcement",icon:"Megaphone",description:"Share community news and updates"},seasonal_tip:{label:"Seasonal Tip",icon:"Sun",description:"Seasonal property care advice"},vacancy_alert:{label:"Vacancy Alert",icon:"AlertCircle",description:"Highlight available units with urgency"}
3494,rent_adjustment:{label:"Rent Adjustment",icon:"DollarSign",description:"Transparent rent change communication"},owner_education:{label:"Owner Education",icon:"GraduationCap",description:"Educate property owners on PM value"},menu_highlight:{label:"Menu Highlight",icon:"UtensilsCrossed",description:"Showcase dishes, pairings & seasonal menus"},team_culture:{label:"Team & Culture",icon:"Users",description:"Chef spotlights, hiring & behind the scenes"},social_proof:{label:"Social Proof",icon:"Star",description:"Reviews, community love & milestones"},thought_leadership:{label:"Thought Leadership",icon:"Lightbulb",description:"Industry insights & expertise"},engagement:{label:"Engagement",icon:"MessageCircle",description:"Drive comments & interaction"},promotional:{label:"Promotional",icon:"Megaphone",description:"Promote services & offers"},educational_breakdown:{label:"Educational Breakdown",icon:"BookOpen",description:"Break down complex topics for your audience"},authority_opinion:{label:"Authority Opinion",icon:"Lightbulb",description:"Share bold, defensible opinions"},framework_post:{label:"Framework Post",icon:"LayoutGrid",description:"Teach with structured step-by-step frameworks"},story_lesson:{label:"Story-Based Lesson",icon:"BookOpen",description:"Teach through narrative and experience"},community_engagement:{label:"Community Engagement",icon:"MessageCircle",description:"Drive conversation and connection"},profit_principle:{label:"Profit Principle",icon:"DollarSign",description:"Share revenue and business growth insights"},execution_reminder:{label:"Execution Reminder",icon:"Zap",description:"Motivate action and shipping"},lesson_learned:{label:"Lesson Learned",icon:"GraduationCap",description:"Share hard-won entrepreneurial lessons"},belief_shift:{label:"Belief Shift",icon:"RefreshCw",description:"Challenge limiting beliefs about business"},customer_value:{label:"Customer Value",icon:"Users",description:"Focus on delivering and communicating value"},mindset_reframe:{label:"Mindset Reframe",icon:"Brain",description:"Shift perspective on challenges and growth"},habit_builder:{label:"Habit Builder",icon:"RefreshCw",description:"Build identity-shaping daily habits"},growth_lesson:{label:"Growth Lesson",icon:"TrendingUp",description:"Share personal development insights"},discipline_reminder:{label:"Discipline Reminder",icon:"Shield",description:"Reinforce consistency and commitment"},perspective_shift:{label:"Perspective Shift",icon:"Eye",description:"Reframe how people see challenges"},policy_education:{label:"Policy Education",icon:"BookOpen",description:"Coverage types, deductibles, and limits explained"},claims_support:{label:"Claims Support",icon:"FileText",description:"Filing process, documentation, and timelines"},risk_prevention:{label:"Risk Prevention",icon:"Shield",description:"Home safety, auto safety, and liability awareness"},life_awareness:{label:"Life Insurance",icon:"Heart",description:"Term vs whole, beneficiaries, and myths"},client_relationship:{label:"Client Relationship",icon:"Users",description:"Referrals, testimonials, and milestones"},rate_education:{label:"Rate Education",icon:"TrendingUp",description:"Fixed vs ARM, rate locks, and market factors"},buyer_guidance:{label:"Buyer Guidance",icon:"Home",description:"Pre-approval, down payment, and first-time programs"},refinance_strategy:{label:"Refinance Strategy",icon:"RefreshCw",description:"When to refi, cash-out, and breakeven analysis"},loan_breakdown:{label:"Loan Products",icon:"Layers",description:"Conventional, FHA, VA, jumbo, and USDA"},credit_qualification:{label:"Credit & Qualification",icon:"CheckCircle",description:"Score improvement, DTI, and documentation"},market_commentary:{label:"Market Commentary",icon:"BarChart",description:"Rate trends, housing market, and economic factors"},expertise_positioning:{label:"Expertise Positioning",icon:"Briefcase",description:"Niche authority and specialization clarity"},client_acquisition:{label:"Client Acquisition",icon:"Users",description:"Outreach, proposals, and pipeline building"},value_pricing:{label:"Value Pricing",icon:"DollarSign",description:"Value-based pricing and scope management"},delivery_excellence:{label:"Delivery Excellence",icon:"CheckCircle",description:"Process showcases and milestone communication"},authority_building:{label:"Authority Building",icon:"Crown",description:"Thought leadership, visibility, and speaking"},transformation_education:{label:"Transformation Education",icon:"TrendingUp",description:"Educate on fitness science and sustainable results"},myth_busting:{label:"Myth Busting",icon:"Shield",description:"Debunk common fitness and nutrition myths"},commercial_authority:{label:"Commercial Authority",icon:"Star",description:"Position coaching as a premium investment"},course_design_authority:{label:"Course Design",icon:"BookOpen",description:"Curriculum clarity and outcome-first design"},enrollment_sales:{label:"Enrollment & Sales",icon:"Users",description:"Trust-based enrollment and conversion"},student_success:{label:"Student Success",icon:"GraduationCap",description:"Completion rates and student outcomes"},scalable_business:{label:"Scalable Business",icon:"LineChart",description:"Scaling education beyond 1:1"}},N7={realtor:{label:"Realtor",description:"Real estate professional templates"},financial_advisor:{label:"Financial Advisor",description:"Financial planning & advisory templates"},builder_remodeler:{label:"Builder & Remodeler",description:"Construction & renovation templates"},property_manager:{label:"Property Manager",description:"Rental & property management templates"},host:{label:"Short-Term Rental Host",description:"Vacation rental & hospital
3494ity templates"},restaurantpro:{label:"Restaurant",description:"Restaurant & hospitality marketing templates"},general:{label:"General",description:"Templates for any professional"},creator:{label:"Creator",description:"Content creator authority & engagement templates"},side_hustle:{label:"Side Hustle",description:"Entrepreneurial growth & execution templates"},personal:{label:"Personal",description:"Personal development & mindset templates"},authoritypro:{label:"AuthorityPRO",description:"Corporate authority & category leadership templates"},insurance:{label:"Insurance",description:"Insurance agent marketing templates"},mortgage:{label:"Mortgage",description:"Mortgage broker & loan officer templates"},freelance_consultant:{label:"Freelance Consultant",description:"Freelancer & consultant authority templates"},personal_trainer:{label:"Personal Trainer",description:"Fitness professional & coaching templates"},course_coach:{label:"Course Coach",description:"Course creator & education entrepreneur templates"}},C7=[{id:"jl-contrarian-pricing",title:"The Pricing Paradox",description:"Challenge assumptions about home pricing to create curiosity",content:`This home is priced to sell fast. That's not a typo.
3495
3496Most agents overprice listings to "leave room to negotiate." I price them to create demand.
3497
3498Here's what demand looks like:
3499→ Multiple showings in 48 hours
3500→ Competing offers
3501→ A seller who gets to choose their terms
3502
3503{address} in {location}
3504{bedrooms} bed · {bathrooms} bath · {sqft} sq ft
3505{price}
3506
3507If you've been watching and waiting, this is what you've been waiting for.
3508
3509Save this post. Share with someone looking in {location}.
3510
3511#JustListed #{location_hashtag} #RealEstate`,profession:"realtor",category:"just_listed",platforms:["linkedin","facebook"],persuasionLever:"Authority",postingGoal:"Leads",trendCompatible:!0,placeholders:["{address}","{location}","{bedrooms}","{bathrooms}","{sqft}","{price}","{location_hashtag}"],tags:["contrarian","pricing","strategy"]},{id:"jl-lifestyle-vision",title:"Morning Coffee Scene",description:"Paint a vivid lifestyle picture that buyers can see themselves in",content:`You're not buying four walls. You're buying this morning:
3512
3513☀️ Sunlight through {window_feature}
3514☕ Coffee on {outdoor_space}
3515🎵 Kids laughing in {kid_friendly_feature}
3516
3517This is {address}.
3518
3519And if that sounds like the life you've been imagining, I should tell you—it just hit the market.
3520
3521{bedrooms} bed · {bathrooms} bath · {sqft} sq ft
3522{location} · {price}
3523
3524DM me "TOUR" for private showing details.
3525
3526#DreamHome #{location_hashtag}`,profession:"realtor",category:"just_listed",platforms:["instagram","facebook"],persuasionLever:"Identity",postingGoal:"Leads",trendCompatible:!0,placeholders:["{window_feature}","{outdoor_space}","{kid_friendly_feature}","{address}","{bedrooms}","{bathrooms}","{sqft}","{location}","{price}","{location_hashtag}"],tags:["lifestyle","emotional","visualization"]},{id:"jl-honest-assessment",title:"Honest Home Profile",description:"Build trust through transparent, balanced property assessment",content:`Let me tell you what this house is—and what it isn't.
3527
3528What it IS:
3529✓ Move-in ready
3530✓ Best street in {neighborhood}
3531✓ {standout_feature}
3532
3533What it ISN'T:
3534✗ A flip
3535✗ Overpriced
3536✗ Available for long
3537
3538{address}
3539{bedrooms}/{bathrooms} · {sqft} sq ft · {price}
3540
3541I believe in transparency. This house speaks for itself.
3542
3543Questions? Ask me anything in the comments.
3544
3545#HonestRealEstate #{location_hashtag}`,profession:"realtor",category:"just_listed",platforms:["linkedin","facebook"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!1,placeholders:["{neighborhood}","{standout_feature}","{address}","{bedrooms}","{bathrooms}","{sqft}","{price}","{location_hashtag}"],tags:["transparency","trust","honest"]},{id:"jl-investor-angle",title:"Numbers Don't Lie",description:"Data-driven listing for investment-minded buyers",content:`The math on this property:
3546
3547Purchase: {price}
3548Rental estimate: {rental_estimate}/mo
3549Annual gross: {annual_gross}
3550Comparable sales: {comp_price} (avg)
3551
3552Translation: You're buying below market in a {market_trend} market.
3553
3554{address}
3555{bedrooms}/{bathrooms} · {sqft} sq ft
3556{location}
3557
3558This isn't a gut feeling. It's arithmetic.
3559
3560Serious inquiries only. DM for the full analysis.
3561
3562#RealEstateInvesting #{location_hashtag}`,profession:"realtor",category:"just_listed",platforms:["linkedin"],persuasionLever:"Authority",postingGoal:"Leads",trendCompatible:!1,placeholders:["{price}","{rental_estimate}","{annual_gross}","{comp_price}","{market_trend}","{address}","{bedrooms}","{bathrooms}","{sqft}","{location}","{location_hashtag}"],tags:["investment","data","roi"]},{id:"jl-scarcity-builder",title:"Last One Standing",description:"Create urgency through neighborhood scarcity data",content:`There are exactly {active_listings} homes for sale in {neighborhood} right now.
3563
3564This is one of them.
3565
3566And based on what I'm seeing in the showing requests, it won't be for long.
3567
3568{address}
3569{bedrooms} bed · {bathrooms} bath
3570{price}
3571
3572I'm not trying to pressure you. I'm trying to prepare you.
3573
3574If this is your neighborhood, you already know what I'm talking about.
3575
3576Save this. Share with someone who's been waiting for {neighborhood}.
3577
3578#{location_hashtag} #LowInventory`,profession:"realtor",category:"just_listed",platforms:["facebook","instagram"],persuasionLever:"Scarcity",postingGoal:"Leads",trendCompatible:!0,placeholders:["{active_listings}","{neighborhood}","{address}","{bedrooms}","{bathrooms}","{price}","{location_hashtag}"],tags:["scarcity","urgency","inventory"]},{id:"jl-neighborhood-love",title:"Why This Street",description:"Highlight location value through neighborhood storytelling",content:`I don't just sell houses. I sell neighborhoods.
3579
3580And {street_name} in {neighborhood}? It's one of my favorites.
3581
3582Here's why:
3583→ {neighborhood_perk_1}
3584→ {neighborhood_perk_2}
3585→ {neighborhood_perk_3}
3586
3587Now there's a chance to own a piece of it.
3588
3589{address}
3590{bedrooms}/{bathrooms} · {price}
3591
3592The house is beautiful. The location is irreplaceable.
3593
3594DM me for details.
3595
3596#{location_hashtag} #LocationMatters`,profession:"realtor",category:"just_listed",platforms:["instagram","facebook"],persuasionLever:"Identity",postingGoal:"Leads",trendCompatible:!0,placeholders:["{street_name}","{neighborhood}","{neighborhood_perk_1}","{neighborhood_perk_2}","{neighborhood_perk_3}","{address}","{bedrooms}","{bathrooms}","{price}","{location_hashtag}"],tags:["neighborhood","location","community"]},{id:"jl-before-mls",title:"Coming Soon Preview",description:"Create exclusivity with pre-market access",content:`This hits MLS on {mls_date}.
3597
3598But you're seeing it now.
3599
3600{address}
3601{bedrooms} bed · {bathrooms} bath · {sqft} sq ft
3602{location}
3603{price}
3604
3605Why am I showing you early?
3606
3607Because the best homes don't last once they go public. And my network deserves first look.
3608
3609Want a private preview before the crowds? Comment "FIRST" below.
3610
3611#ComingSoon #ExclusiveAccess #{location_hashtag}`,profession:"realtor",category:"just_listed",platforms:["linkedin","instagram","facebook"],persuasionLever:"Scarcity",postingGoal:"Leads",trendCompatible:!1,placeholders:["{mls_date}","{address}","{bedrooms}","{bathrooms}","{sqft}","{location}","{price}","{location_hashtag}"],tags:["exclusive","preview","coming soon"]},{id:"js-story-arc",title:"The Full Story",description:"Tell the complete journey from listing to sold",content:`6 weeks ago, {client_first_name} called me scared.
3612
3613"We need to sell fast. But we can't afford to lose money."
3614
3615Here's what happened:
3616
3617Week 1: Strategic pricing + professional photos
3618Week 2: {showing_count} showings
3619Week 3: {offer_count} offers
3620Week 4: Under contract, {offer_terms}
3621Week 6: SOLD. {final_price}
3622
3623The key? We didn't panic-price. We positioned.
3624
3625If you're facing a similar situation, let's talk strategy—not stress.
3626
3627#JustSold #RealEstateSuccess #{location_hashtag}`,profession:"realtor",category:"just_sold",platforms:["linkedin","facebook"],persuasionLever:"Social Proof",postingGoal:"Authority",trendCompatible:!0,placeholders:["{client_first_name}","{showing_count}","{offer_count}","{offer_terms}","{final_price}","{location_hashtag}"],tags:["story","journey","process"]},{id:"js-silent-success",title:"What You Didn't See",description:"Reveal behind-the-scenes work that made the sale happen",content:`Another home closed. But here's what you didn't see:
3628
3629→ 4 a.m. emails coordinating inspections
3630→ A lender issue that almost killed the deal
3631→ {behind_scenes_challenge}
3632→ 47 phone calls in 30 days
3633
3634You see the "SOLD" sign.
3635
3636I see the work.
3637
3638{address} | {price}
3639Congrats to my clients on this beautiful new chapter.
3640
3641Your transaction deserves this level of care. DM me when you're ready.
3642
3643#BehindTheScenes #JustSold`,profession:"realtor",category:"just_sold",platforms:["linkedin"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!1,placeholders:["{behind_scenes_challenge}","{address}","{price}"],tags:["behind-the-scenes","work ethic","dedication"]},{id:"js-data-proof",title:"Results by the Numbers",description:"Quantify your success to build credibility",content:`JUST SOLD.
3644
3645But let me give you the numbers:
3646
3647📊 List price: {list_price}
3648📊 Sold price: {sold_price}
3649📊 Days on market: {dom}
3650📊 Offers received: {offers}
3651
3652What this means: My sellers walked away with {result_summary}.
3653
3654Not luck. Strategy.
3655
3656Thinking about selling? Let's build your game plan.
3657
3658#DataDrivenRealEstate #{location_hashtag}`,profession:"realtor",category:"just_sold",platforms:["linkedin","facebook"],persuasionLever:"Social Proof",postingGoal:"Leads",trendCompatible:!1,placeholders:["{list_price}","{sold_price}","{dom}","{offers}","{result_summary}","{location_hashtag}"],tags:["data","results","numbers"]}
3658,{id:"js-client-words",title:"In Their Words",description:"Let client testimonial do the selling",content:`I could tell you about this sale.
3659
3660But I'll let {client_name} do it instead:
3661
3662"{testimonial_quote}"
3663
3664{address} | {sold_price}
3665{dom} days | {outcome}
3666
3667This is why I do what I do.
3668
3669If you want an agent who treats your goals like their own, let's connect.
3670
3671#ClientLove #Testimonial #{location_hashtag}`,profession:"realtor",category:"just_sold",platforms:["instagram","facebook"],persuasionLever:"Social Proof",postingGoal:"Authority",trendCompatible:!0,placeholders:["{client_name}","{testimonial_quote}","{address}","{sold_price}","{dom}","{outcome}","{location_hashtag}"],tags:["testimonial","client","trust"]},{id:"js-market-proof",title:"Against the Odds",description:"Show success despite challenging market conditions",content:`"The market is slow."
3672"Buyers are waiting."
3673"Maybe hold off."
3674
3675That's what {client_name} heard from others.
3676
3677Here's what I said: "Let's look at the data."
3678
3679Result:
3680✓ SOLD in {dom} days
3681✓ {outcome}
3682✓ {bonus_result}
3683
3684The market isn't bad. Most strategies are.
3685
3686Ready to prove the doubters wrong? Save this post.
3687
3688#MarketReality #{location_hashtag}`,profession:"realtor",category:"just_sold",platforms:["linkedin","facebook"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!0,placeholders:["{client_name}","{dom}","{outcome}","{bonus_result}","{location_hashtag}"],tags:["contrarian","market","strategy"]},{id:"js-simple-celebration",title:"Keys in Hand",description:"Simple, heartfelt closing celebration",content:`Keys handed over. Hugs exchanged. Another family home.
3689
3690{address}
3691{location}
3692
3693To my clients: Thank you for trusting me with this journey.
3694
3695To my network: This is what I live for.
3696
3697Who's next?
3698
3699#JustSold #NewHomeowners #{location_hashtag}`,profession:"realtor",category:"just_sold",platforms:["instagram","facebook"],persuasionLever:"Social Proof",postingGoal:"Engagement",trendCompatible:!1,placeholders:["{address}","{location}","{location_hashtag}"],tags:["celebration","simple","heartfelt"]},{id:"mi-myth-buster",title:"Market Myth Debunked",description:"Challenge common market misconceptions with data",content:`"The market is crashing."
3700
3701I hear this weekly. Here's the actual data for {location}:
3702
3703{stat_1}
3704{stat_2}
3705{stat_3}
3706
3707Is it shifting? Yes.
3708Is it "crashing"? The numbers say no.
3709
3710What's really happening: {reality_check}
3711
3712Stop listening to headlines. Start watching the data.
3713
3714Questions about your specific situation? Drop them below.
3715
3716#MarketFacts #{location_hashtag}`,profession:"realtor",category:"market_insight",platforms:["linkedin","facebook"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!0,placeholders:["{location}","{stat_1}","{stat_2}","{stat_3}","{reality_check}","{location_hashtag}"],tags:["myth-busting","data","education"]},{id:"mi-micro-market",title:"Neighborhood Spotlight",description:"Hyper-local market analysis showing deep expertise",content:`{neighborhood} Market Reality Check:
3717
3718Most agents quote county stats. Here's what's actually happening in YOUR neighborhood:
3719
3720Median Price: {median_price} ({change})
3721Avg Days on Market: {dom}
3722Active Listings: {active_listings}
3723Pending: {pending}
3724
3725What this means for you:
3726
3727Sellers: {seller_insight}
3728Buyers: {buyer_insight}
3729
3730I track this weekly. DM me for your street-level analysis.
3731
3732#{neighborhood_hashtag} #HyperLocal`,profession:"realtor",category:"market_insight",platforms:["linkedin","facebook"],persuasionLever:"Authority",postingGoal:"Leads",trendCompatible:!1,placeholders:["{neighborhood}","{median_price}","{change}","{dom}","{active_listings}","{pending}","{seller_insight}","{buyer_insight}","{neighborhood_hashtag}"],tags:["hyper-local","neighborhood","data"]},{id:"mi-rate-reality",title:"Interest Rate Truth",description:"Put interest rates in perspective",content:`"I'm waiting for rates to drop."
3733
3734Let me share what happens when they do:
3735
37361. More buyers enter the market
37372. Competition increases
37383. Prices get pushed up
37394. Your "savings" disappear
3740
3741Historical context:
3742→ Today's rate: {current_rate}%
3743→ 2000s average: {historical_rate}%
3744→ 1980s peak: {peak_rate}%
3745
3746You don't marry the rate. You date it.
3747
3748Buy the house. Refinance later. Build equity now.
3749
3750Thoughts? Let's discuss below.
3751
3752#InterestRates #RealEstateAdvice`,profession:"realtor",category:"market_insight",platforms:["linkedin","facebook"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!0,placeholders:["{current_rate}","{historical_rate}","{peak_rate}"],tags:["rates","education","perspective"]},{id:"mi-seasonal-shift",title:"Seasonal Market Truth",description:"Explain seasonal patterns to time-conscious buyers/sellers",content:`{season} real estate in {location}—what you need to know:
3753
3754The pattern:
3755{pattern_1}
3756{pattern_2}
3757{pattern_3}
3758
3759What smart buyers do: {buyer_strategy}
3760What smart sellers do: {seller_strategy}
3761
3762This isn't guesswork. It's {years_experience} years of watching this exact cycle.
3763
3764Planning a move in the next 6 months? Let's map your timeline.
3765
3766#SeasonalRealEstate #{location_hashtag}`,profession:"realtor",category:"market_insight",platforms:["linkedin","facebook"],persuasionLever:"Authority",postingGoal:"Leads",trendCompatible:!0,placeholders:["{season}","{location}","{pattern_1}","{pattern_2}","{pattern_3}","{buyer_strategy}","{seller_strategy}","{years_experience}","{location_hashtag}"],tags:["seasonal","timing","strategy"]},{id:"mi-prediction-honest",title:"My Market Prediction",description:"Make a bold but honest market prediction",content:`My {location} market prediction for the next 6 months:
3767
3768{prediction}
3769
3770Why I believe this:
3771{reason_1}
3772{reason_2}
3773{reason_3}
3774
3775Am I certain? No one is.
3776
3777Am I confident? Based on {data_point}, yes.
3778
3779What are YOU seeing? I want to hear from locals in the comments.
3780
3781#MarketPrediction #{location_hashtag}`,profession:"realtor",category:"market_insight",platforms:["linkedin"],persuasionLever:"Authority",postingGoal:"Engagement",trendCompatible:!0,placeholders:["{location}","{prediction}","{reason_1}","{reason_2}","{reason_3}","{data_point}","{location_hashtag}"],tags:["prediction","opinion","engagement"]},{id:"mi-buyer-seller-split",title:"Who Wins Right Now?",description:"Clear breakdown of current market advantage",content:`Is it a buyer's market or seller's market in {location}?
3782
3783Right now: {market_type}
3784
3785Here's why:
3786
3787Inventory: {inventory_level} ({inventory_trend})
3788Days on Market: {dom} ({dom_trend})
3789Price Trends: {price_trend}
3790
3791What this means:
3792
3793For Buyers: {buyer_reality}
3794For Sellers: {seller_reality}
3795
3796Neither is good or bad. Both require strategy.
3797
3798Comment "BUYER" or "SELLER" and I'll share what I'd do in your shoes.
3799
3800#{location_hashtag} #MarketUpdate`,profession:"realtor",category:"market_insight",platforms:["facebook","instagram"],persuasionLever:"Reciprocity",postingGoal:"Leads",trendCompatible:!1,placeholders:["{location}","{market_type}","{inventory_level}","{inventory_trend}","{dom}","{dom_trend}","{price_trend}","{buyer_reality}","{seller_reality}","{location_hashtag}"],tags:["market-type","analysis","interactive"]},{id:"be-first-timer-truth",title:"First-Timer Reality Check",description:"Honest advice for first-time buyers without sugarcoating",content:`First-time homebuyer? Here's what no one tells you:
3801
38021. You'll probably lose your first offer. It's normal.
38032. Pre-approval ≠ pre-qualified. Know the difference.
38043. That dream home might need a dream budget.
38054. Your agent works for free (to you). Use them.
38065. Closing costs exist. Budget 2-5% extra.
3807
3808The process is emotional. That's okay.
3809
3810The key is being prepared, not perfect.
3811
3812Save this for when you start your search.
3813
3814#FirstTimeHomeBuyer #RealEstateTips`,profession:"realtor",category:"buyer_education",platforms:["linkedin","instagram","facebook"],persuasionLever:"Reciprocity",postingGoal:"Authority",trendCompatible:!0,placeholders:[],tags:["first-time","honest","education"]},{id:"be-20-percent-myth",title:"The 20% Myth",description:"Debunk the biggest down payment misconception",content:`"I need 20% down."
3815
3816This myth costs people years of waiting.
3817
3818The reality:
3819→ FHA: 3.5% down
3820→ Conventional: 3% down
3821→ VA: 0% down
3822→ USDA: 0% down
3823
3824Yes, 20% avoids PMI. But PMI isn't the enemy—it's {pmi_cost}/month on a {home_price} home.
3825
3826Compare that to {rent_cost}/month in rent with zero equity.
3827
3828Stop saving for perfect. Start building wealth.
3829
3830DM "OPTIONS" for a breakdown of your actual numbers.
3831
3832#DownPaymentMyth #HomeBuying`,profession:"realtor",category:"buyer_education",platforms:["linkedin","instagram","facebook"],persuasionLever:"Reciprocity",postingGoal:"Leads",trendCompatible:!0,placeholders:["{pmi_cost}","{home_price}","{rent_cost}"],tags:["myth-busting","financing","action"]},{id:"be-offer-strategy",title:"Winning Offer Anatomy",description:"Teach buyers what actually wins in competitive situations",content:`Your offer just lost. Again.
3833
3834Here's probably why:
3835
3836❌ You focused only on price
3837❌ You asked for too many contingencies
3838❌ Your lender is unknown to the seller's agent
3839❌ Your escalation clause had weak terms
3840
3841What winners do differently:
3842✓ Strong earnest money
3843✓ Flexible closing date
3844✓ Pre-underwritten approval
3845✓ Clean, simple terms
3846
3847Price matters. But it's not everything.
3848
3849Want to win your next one? Save this breakdown.
3850
3851#OfferStrategy #HomeBuyerTips`,profession:"realtor",category:"buyer_education",platforms:["linkedin","facebook"],persuasionLever:"Reciprocity",postingGoal:"Authority",trendCompatible:!1,placeholders:[],tags:["strategy","offers","competition"]},{id:"be-inspection-non-negotiables",title:"Inspection Red Flags",description:"Educate buyers on what inspection findings actually matter",content:`Every home inspection finds "issues."
3852
3853Here's what to actually worry about:
3854
3855🚨 RED FLAGS:
3856→ Foundation cracks (structural)
3857→ Roof near end of life
3858→ Electrical panel issues
3859→ Water intrusion signs
3860→ HVAC system age
3861
3862🟢 USUALLY FINE:
3863→ Cosmetic cracks
3864→ Minor plumbing fixes
3865→ Weatherstripping
3866→ Outlet covers
3867
3868The goal isn't a perfect report. It's knowing what you're buying.
3869
3870Your agent should help you prioritize. If they don't, that's a red flag too.
3871
3872#HomeInspection #BuyerEducation`,profession:"realtor",category:"buyer_education",platforms:["linkedin","facebook"],persuasionLever:"Reciprocity",postingGoal:"Authority",trendCompatible:!1,placeholders:[],tags:["inspection","education","practical"]},{id:"be-hidden-costs",title:"The Hidden Budget",description:"Prepare buyers for costs beyond the purchase price",content:`The home costs {home_price}.
3873
3874But here's what you'll actually pay:
3875
3876→ Closing costs: {closing_costs}
3877→ Inspection: {inspection_cost}
3878→ Appraisal: {appraisal_cost}
3879→ Moving: {moving_cost}
3880→ First month reserves: {reserve_cost}
3881
3882Real budget needed: {real_budget}
3883
3884Not to scare you. To prepare you.
3885
3886Surprises kill deals. Preparation wins them.
3887
3888Save this before you start house hunting.
3889
3890#HiddenCosts #HomeBuyingBudget`,profession:"realtor",category:"buyer_education",platforms:["instagram","facebook"],persuasionLever:"Reciprocity",postingGoal:"Authority",trendCompatible:!1,placeholders:["{home_price}","{closing_costs}","{inspection_cost}","{appraisal_cost}","{moving_cost}","{reserve_cost}","{real_budget}"],tags:["budget","costs","practical"]},{id:"be-rent-vs-buy",title:"The Rent vs. Buy Math",description:"Help buyers think through the rent vs. buy decision",content:`"Is now a good time to buy?"
3891
3892Wrong question.
3893
3894Better question: "What's the math for MY situation?"
3895
3896Example:
3897Rent: {rent}/month = {annual_rent}/year → $0 equity
3898Buy: {mortgage}/month = {annual_mortgage}/year → {equity_built} equity in year 1
3899
3900Plus:
3901→ Tax benefits (often)
3902→ Locked payment (rates won't affect you)
3903→ Forced savings (equity grows while you sleep)
3904
3905The "right time" is when YOUR numbers make sense.
3906
3907Not sure? DM me your situation. No pitch, just math.
3908
3909#RentVsBuy #WealthBuilding`,profession:"realtor",category:"buyer_education",platforms:["linkedin","facebook"],persuasionLever:"Reciprocity",postingGoal:"Leads",trendCompatible:!0,placeholders:["{rent}","{annual_rent}","{mortgage}","{annual_mortgage}","{equity_built}"],tags:["rent vs buy","math","decision"]},{id:"se-pricing-psychology",title:"The Pricing Trap",description:"Explain why overpricing backfires",content:`The #1 mistake I see sellers make:
3910
3911"Let's price high and see what happens."
3912
3913What happens:
3914→ Week 1-2: Crickets
3915→ Week 3-4: Price drop
3916→ Week 5+: Buyers wonder "what's wrong with it?"
3917
3918Psychology: The first 14 days are everything. That's when serious buyers act.
3919
3920Overprice = miss the wave
3921Right price = ride the wave
3922
3923The best deals come from strategy, not hope.
3924
3925Thinking of selling? Let's talk pricing psychology.
3926
3927#PricingStrategy #HomeSelling`,profession:"realtor",category:"seller_education",platforms:["linkedin","facebook"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!0,placeholders:[],tags:["pricing","psychology","strategy"]},{id:"se-prep-roi",title:"Prep That Pays",description:"Show which improvements actually increase sale price",content:`Not all home prep is equal.
3928
3929Worth it:
3930✓ Deep cleaning (free ROI)
3931✓ Decluttering (free ROI)
3932✓ Fresh paint ({paint_cost} → {paint_return} return)
3933✓ Landscaping ({landscape_cost} → {landscape_return} return)
3934
3935Skip it:
3936✗ Major renovations (rarely return cost)
3937✗ Pool installation (market-dependent)
3938✗ Personal style upgrades
3939
3940Rule of thumb: Clean and neutral beats expensive and bold.
3941
3942Want a walkthrough of YOUR prep priorities? Comment "PREP" below.
3943
3944#SellerTips #HomePrep`,profession:"realtor",category:"seller_education",platforms:["facebook","instagram"],persuasionLever:"Reciprocity",postingGoal:"Leads",trendCompatible:!1,placeholders:["{paint_cost}","{paint_return}","{landscape_cost}","{landscape_return}"],tags:["prep","roi","practical"]},{id:"se-timing-truth",title:"Best Time to Sell",description:"Address the timing question with nuance",content:`"When's the best time to sell?"
3945
3946Short answer: When you're ready.
3947
3948Longer answer for {location}:
3949
3950{season_1}: {season_1_insight}
3951{season_2}: {season_2_insight}
3952{season_3}: {season_3_insight}
3953{season_4}: {season_4_insight}
3954
3955But here's the truth: I've sold homes in every season. Prepared homes sell. Period.
3956
3957The best time to sell is when your strategy is ready—not just your calendar.
3958
3959#SellingTiming #{location_hashtag}`,profession:"realtor",category:"seller_education",platforms:["linkedin","facebook"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!0,placeholders:["{location}","{season_1}","{season_1_insight}","{season_2}","{season_2_insight}","{season_3}","{season_3_insight}","{season_4}","{season_4_insight}","{location_hashtag}"],tags:["timing","seasonal","strategy"]},{id:"se-staging-reality",title:"Staging: Worth It?",description:"Give honest staging advice",content:`"Do I really need to stage?"
3960
3961Honest answer: It depends.
3962
3963Vacant home? YES. Staging can increase sale price by 1-5%.
3964
3965Lived-in home? Maybe. Focus on:
3966→ Removing 50% of your stuff
3967→ Neutralizing bold colors
3968→ Cleaning like you've never cleaned before
3969
3970The goal: Help buyers see THEMSELVES here—not you.
3971
3972One test: Take phone photos. If it looks cluttered, it IS cluttered.
3973
3974Need eyes on your space? DM me a photo for honest feedback.
3975
3976#StagingTips #HomeSelling`,profession:"realtor",category:"seller_education",platforms:["instagram","facebook"],persuasionLever:"Reciprocity",postingGoal:"Leads",trendCompatible:!1,placeholders:[],tags:["staging","practical","honest"]},{id:"se-offer-evaluation",title:"Beyond the Number",description:"Teach sellers how to evaluate offers holistically",content:`You got an offer. Now what?
3977
3978Price isn't everything. Here's what else matters:
3979
39801. Financing type (cash > conventional > FHA > VA in speed)
39812. Earnest money amount (higher = more committed)
39823. Contingencies (fewer = cleaner close)
39834. Closing timeline (flexibility matters)
39845. Buyer's lender reputation
3985
3986I've seen {lower_offer} beat {higher_offer} because of terms.
3987
3988Your job: Maximize net, minimize stress.
3989
3990My job: Help you see what you might miss.
3991
3992#OfferEvaluation #SellerTips`,profession:"realtor",category:"seller_education",platforms:["linkedin","facebook"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!1,placeholders:["{lower_offer}","{higher_offer}"],tags:["offers","evaluation","strategy"]},{id:"se-fsbo-reality",title:"FSBO Reality Check",description:"Address FSBO consideration without being salesy",content:`Thinking about selling without an agent?
3993
3994I get it. Here's what to consider:
3995
3996The upside:
3997→ No listing commission
3998
3999The reality:
4000→ 90% of buyers use agents (you'll likely pay their side anyway)
4001→ Average FSBO sale: {fsbo_avg} vs agent-assisted: {agent_avg}
4002→ Pricing mistakes cost more than commission
4003→ Contract errors create liability
4004
4005Some FSBO sellers win. Most leave money on the table.
4006
4007Not trying to sell you. Just giving you the full picture.
4008
4009#FSBO #SellerEducation`,profession:"realtor",category:"seller_education",platforms:["linkedin","facebook"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!0,placeholders:["{fsbo_avg}","{agent_avg}"],tags:["fsbo","honest","education"]},{id:"ch-hidden-gems",title:"Local Hidden Gems",description:"Showcase insider knowledge of the community",content:`{years} years in {location}. Here are my hidden gems:
4010
4011☕ Best coffee you've never heard of: {coffee_spot}
4012🍕 Pizza worth driving across town: {pizza_spot}
4013🌳 The park locals keep secret: {park_name}
4014🛍️ Small business everyone should know: {small_biz}
4015📚 Best-kept weekend spot: {weekend_spot}
4016
4017Real estate isn't just houses. It's communities.
4018
4019And knowing a community? That's how I help people find HOME.
4020
4021What's YOUR {location} hidden gem? Share below 👇
4022
4023#{location_hashtag} #LocalLove`,profession:"realtor",category:"community_highlight",platforms:["instagram","facebook"],persuasionLever:"Identity",postingGoal:"Engagement",trendCompatible:!0,placeholders:["{years}","{location}","{coffee_spot}","{pizza_spot}","{park_name}","{small_biz}","{weekend_spot}","{location_hashtag}"],tags:["local","community","engagement"]},{id:"ch-neighborhood-profile",title:"Neighborhood Deep Dive",description:"Profile a specific neighborhood for relocators",content:`Thinking about {neighborhood}? Here's the insider scoop:
4024
4025👨‍👩‍👧‍👦 Vibe: {vibe}
4026🏫 Schools: {schools}
4027🚗 Commute to downtown: {commute}
4028💰 Price range: {price_range}
4029🛒 Walkability: {walkability}
4030
4031Best for: {best_for}
4032
4033Hidden perk: {hidden_perk}
4034
4035Watch out for: {watch_out}
4036
4037Relocating? This is exactly what I help people figure out.
4038
4039DM me your must-haves and I'll match you to neighborhoods.
4040
4041#{neighborhood_hashtag} #{location_hashtag}`,profession:"realtor",category:"community_highlight",platforms:["facebook","instagram"],persuasionLever:"Reciprocity",postingGoal:"Leads",trendCompatible:!1,placeholders:["{neighborhood}","{vibe}","{schools}","{commute}","{price_range}","{walkability}","{best_for}","{hidden_perk}","{watch_out}","{neighborhood_hashtag}","{location_hashtag}"],tags:["neighborhood","relocation","guide"]},{id:"ch-local-event",title:"Community Event Spotlight",description:"Highlight local events to show community involvement",content:`This weekend in {location}: {event_name}
4042
4043📍 {event_location}
4044📅 {event_date}
4045⏰ {event_time}
4046
4047Why I love this: {personal_note}
4048
4049{event_description}
4050
4051Whether you're a longtime local or just exploring, this is {location} at its best.
4052
4053Will I see you there? Comment if you're going!
4054
4055#{event_hashtag} #{location_hashtag}`,profession:"realtor",category:"community_highlight",platforms:["instagram","facebook"],persuasionLever:"Identity",postingGoal:"Engagement",trendCompatible:!0,placeholders:["{location}","{event_name}","{event_location}","{event_date}","{event_time}","{personal_note}","{event_description}","{event_hashtag}","{location_hashtag}"],tags:["events","community","local"]},{id:"ch-school-zone",title:"School Zone Breakdown",description:"Educational content for family-focused buyers",content:`Moving to {location} with kids? School info you need:
4056
4057Elementary:
4058{elementary_info}
4059
4060Middle:
4061{middle_info}
4062
4063High:
4064{high_info}
4065
4066Private options: {private_options}
4067
4068Pro tip: {school_tip}
4069
4070School zones matter. They affect lifestyle AND resale value.
4071
4072Want the full breakdown for a specific neighborhood? Drop it in the comments.
4073
4074#SchoolZones #{location_hashtag}`,profession:"realtor",category:"community_highlight",platforms:["facebook"],persuasionLever:"Reciprocity",postingGoal:"Leads",trendCompatible:!1,placeholders:["{location}","{elementary_info}","{middle_info}","{high_info}","{private_options}","{school_tip}","{location_hashtag}"],tags:["schools","families","education"]},{id:"ch-small-business-love",title:"Small Business Spotlight",description:"Support local businesses while building community cred",content:`Small business spotlight: {business_name}
4075
4076I stopped by {business_name} this week and remembered why I love {location}.
4077
4078{story}
4079
4080What they do: {what_they_do}
4081Find them: {location_address}
4082
4083When you support local, you support neighbors.
4084
4085Tag a small business YOU think deserves some love 👇
4086
4087#SupportLocal #{location_hashtag}`,profession:"realtor",category:"community_highlight",platforms:["instagram","facebook"],persuasionLever:"Identity",postingGoal:"Engagement",trendCompatible:!0,placeholders:["{business_name}","{location}","{story}","{what_they_do}","{location_address}","{location_hashtag}
4087"],tags:["small business","community","support local"]},{id:"pa-what-clients-ask",title:"What Clients Ask Most",description:"Address common questions to demonstrate expertise",content:`The question I get asked most:
4088
4089"{common_question}"
4090
4091Here's my honest answer:
4092
4093{answer_part_1}
4094
4095{answer_part_2}
4096
4097{answer_part_3}
4098
4099Every situation is different. But this is the framework I use.
4100
4101What question do YOU have about real estate? Drop it below—I'll answer.
4102
4103#RealEstateQA #AskARealtor`,profession:"realtor",category:"personal_authority",platforms:["linkedin","facebook"],persuasionLever:"Authority",postingGoal:"Engagement",trendCompatible:!0,placeholders:["{common_question}","{answer_part_1}","{answer_part_2}","{answer_part_3}"],tags:["Q&A","expertise","engagement"]},{id:"pa-lesson-learned",title:"Hard-Won Lesson",description:"Share a professional lesson that builds credibility through vulnerability",content:`A lesson I learned the hard way:
4104
4105Early in my career, {mistake_setup}
4106
4107{what_happened}
4108
4109What I learned: {lesson}
4110
4111Now I {how_i_do_it_now}.
4112
4113Real estate isn't just transactions. It's constant learning.
4114
4115What's a lesson YOUR industry taught you the hard way? I'd love to hear it.
4116
4117#LessonsLearned #GrowthMindset`,profession:"realtor",category:"personal_authority",platforms:["linkedin"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!0,placeholders:["{mistake_setup}","{what_happened}","{lesson}","{how_i_do_it_now}"],tags:["lesson","vulnerability","growth"]},{id:"pa-why-i-care",title:"Why Real Estate",description:"Share personal motivation to build authentic connection",content:`People ask why I got into real estate.
4118
4119The real answer: {origin_story}
4120
4121What keeps me in it: {current_motivation}
4122
4123Every key I hand over represents {what_it_represents}.
4124
4125This isn't just a job. It's {personal_meaning}.
4126
4127If that resonates, I'd love to work with you someday.
4128
4129#WhyIDoWhatIDo #RealEstateLife`,profession:"realtor",category:"personal_authority",platforms:["linkedin","instagram"],persuasionLever:"Identity",postingGoal:"Authority",trendCompatible:!1,placeholders:["{origin_story}","{current_motivation}","{what_it_represents}","{personal_meaning}"],tags:["story","motivation","authentic"]},{id:"pa-unpopular-opinion",title:"Industry Unpopular Opinion",description:"Take a bold stance that differentiates you",content:`Unpopular opinion: {opinion}
4130
4131I know this goes against what most agents say.
4132
4133But here's what I've seen in {years} years:
4134
4135{evidence_1}
4136
4137{evidence_2}
4138
4139{evidence_3}
4140
4141Maybe I'm wrong. But my results say otherwise.
4142
4143Agree? Disagree? I want to hear your take.
4144
4145#UnpopularOpinion #RealEstateTruth`,profession:"realtor",category:"personal_authority",platforms:["linkedin"],persuasionLever:"Authority",postingGoal:"Engagement",trendCompatible:!0,placeholders:["{opinion}","{years}","{evidence_1}","{evidence_2}","{evidence_3}"],tags:["contrarian","opinion","engagement"]},{id:"pa-day-in-life",title:"Behind the Scenes",description:"Show the real work behind real estate success",content:`What being a realtor actually looks like:
4146
41476:30 AM: {morning_activity}
41489:00 AM: {mid_morning}
414912:00 PM: {lunch_note}
41502:00 PM: {afternoon}
41515:00 PM: {evening_showing}
41528:00 PM: {night_work}
4153
4154Glamorous? Not really.
4155Worth it? Every single day.
4156
4157The job isn't 9-to-5. It's whenever you need me.
4158
4159That's the commitment. That's the work.
4160
4161#DayInTheLife #RealtorLife`,profession:"realtor",category:"personal_authority",platforms:["instagram","facebook"],persuasionLever:"Authority",postingGoal:"Authority",trendCompatible:!1,placeholders:["{morning_activity}","{mid_morning}","{lunch_note}","{afternoon}","{evening_showing}","{night_work}"],tags:["behind-the-scenes","work ethic","authentic"]},{id:"pa-client-criteria",title:"Who I Work Best With",description:"Qualify ideal clients while demonstrating confidence",content:`Not every client is the right fit. Here's who I work best with:
4162
4163✓ {ideal_client_1}
4164✓ {ideal_client_2}
4165✓ {ideal_client_3}
4166✓ {ideal_client_4}
4167
4168If that sounds like you, we'll probably get along great.
4169
4170If not, I'll happily refer you to someone who's a better match.
4171
4172I'd rather do excellent work with the right people than mediocre work with everyone.
4173
4174Quality over quantity. Always.
4175
4176#WorkingTogether #RealEstatePartner`,profession:"realtor",category:"personal_authority",platforms:["linkedin"],persuasionLever:"Authority",postingGoal:"Leads",trendCompatible:!1,placeholders:["{ideal_client_1}","{ideal_client_2}","{ideal_client_3}","{ideal_client_4}"],tags:["positioning","qualifying","confidence"]},...Qxe,...Jxe,...Zxe,...ewe,...twe,...nwe,...rwe,...awe,...swe,...iwe,...owe,...lwe,...cwe];function uwe(e){var a;const t=C7,n=new Map;for(const i of t){n.has(i.profession)||n.set(i.profession,new Map);const o=n.get(i.profession);o.has(i.category)||o.set(i.category,[]),o.get(i.category).push(i)}const r=[];for(const[i,o]of n){const l=Array.from(o.entries()).map(([c,u])=>{var h;return{category:c,categoryLabel:((h=S7[c])==null?void 0:h.label)||c,templates:u}});r.push({profession:i,professionLabel:((a=N7[i])==null?void 0:a.label)||i,c
4176ategories:l})}return r}const he=g.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:K("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));he.displayName="Card";const Ce=g.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:K("flex flex-col space-y-1.5 p-6",e),...t}));Ce.displayName="CardHeader";const Pe=g.forwardRef(({className:e,...t},n)=>s.jsx("h3",{ref:n,className:K("text-2xl font-semibold leading-none tracking-tight",e),...t}));Pe.displayName="CardTitle";const Un=g.forwardRef(({className:e,...t},n)=>s.jsx("p",{ref:n,className:K("text-sm text-muted-foreground",e),...t}));Un.displayName="CardDescription";const pe=g.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:K("p-6 pt-0",e),...t}));pe.displayName="CardContent";const P7=g.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:K("flex items-center p-6 pt-0",e),...t}));P7.displayName="CardFooter";const dwe={linkedin:vP,instagram:mP,facebook:fP,threads:Qd},hwe={Authority:"bg-blue-500/10 text-blue-600 dark:text-blue-400 border-blue-500/20","Social Proof":"bg-green-500/10 text-green-600 dark:text-green-400 border-green-500/20",Identity:"bg-purple-500/10 text-purple-600 dark:text-purple-400 border-purple-500/20",Consistency:"bg-orange-500/10 text-orange-600 dark:text-orange-400 border-orange-500/20",Reciprocity:"bg-pink-500/10 text-pink-600 dark:text-pink-400 border-pink-500/20",Scarcity:"bg-red-500/10 text-red-600 dark:text-red-400 border-red-500/20"},fwe=({template:e,onUseTemplate:t,onSchedule:n})=>{const[r,a]=g.useState(!1);return s.jsx(fe.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.2},children:s.jsx(he,{className:"group overflow-hidden border-border/50 hover:border-primary/30 transition-all duration-200 hover:shadow-md",children:s.jsxs(pe,{className:"p-4 space-y-3",children:[s.jsx("div",{className:"flex items-start justify-between gap-3",children:s.jsxs("div",{className:"space-y-1 flex-1 min-w-0",children:[s.jsx("h3",{className:"font-semibold text-foreground truncate",children:e.title}),s.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:e.description})]})}),s.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[s.jsx("div",{className:"flex items-center gap-1",children:e.platforms.slice(0,3).map(i=>{const o=dwe[i]||Qd;return s.jsx("div",{className:"h-6 w-6 rounded-md bg-muted/50 flex items-center justify-center",title:i,children:s.jsx(o,{className:"h-3.5 w-3.5 text-muted-foreground"})},i)})}),s.jsx(je,{variant:"outline",className:K("text-xs font-medium",hwe[e.persuasionLever]),children:e.persuasionLever})]}),s.jsxs("button",{onClick:()=>a(!r),className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors w-full",children:[s.jsx(Ei,{className:"h-3 w-3"}),s.jsxs("span",{children:[r?"Hide":"Preview"," template"]}),r?s.jsx(gw,{className:"h-3 w-3 ml-auto"}):s.jsx(gu,{className:"h-3 w-3 ml-auto"})]}),r&&s.jsxs(fe.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"rounded-lg bg-muted/30 p-3 border border-border/50",children:[s.jsx("pre",{className:"text-xs text-muted-foreground whitespace-pre-wrap font-sans leading-relaxed max-h-[200px] overflow-y-auto",children:e.content}),e.placeholders&&e.placeholders.length>0&&s.jsx("div",{className:"mt-2 pt-2 border-t border-border/50",children:s.jsxs("p",{className:"text-[10px] text-muted-foreground",children:["Placeholders: ",e.placeholders.slice(0,5).join(", "),e.placeholders.length>5&&` +${e.placeholders.length-5} more`]})})]}),s.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[s.jsxs(z,{size:"sm",className:"flex-1 h-8 text-xs",onClick:()=>t(e),children:[s.jsx(Up,{className:"h-3.5 w-3.5 mr-1.5"}),"Use Template"]}),s.jsxs(z,{size:"sm",variant:"outline",className:"flex-1 h-8 text-xs",onClick:()=>n(e),children:[s.jsx($F,{className:"h-3.5 w-3.5 mr-1.5"}),"Schedule"]})]})]})})})},pwe={just_listed:yi,just_sold:hg,market_insight:vn,buyer_education:oi,seller_education:Wn,community_highlight:bP,personal_authority:vd,market_education:gd,client_psychology:Ms,process_explanation:dr,year_end_reflection:Mn,frequently_asked_questions:LF,project_breakdown:pP,cost_explanation:to,timeline_expectations:pr,before_after_case:yw,homeowner_education:fc,just_rented:vw,new_listing_rental:yi,maintenance_update:wJ,lease_renewal:Bt,community_announcement:pj,seasonal_tip:YF,vacancy_alert:Ai,rent_adju
4176stment:to,owner_education:oi,menu_highlight:_w,team_culture:Wn,social_proof:vd,thought_leadership:qp,engagement:Qd,promotional:pj,educational_breakdown:fc,authority_opinion:qp,framework_post:yP,story_lesson:fc,community_engagement:Qd,profit_principle:to,execution_reminder:Tn,lesson_learned:oi,belief_shift:Bt,customer_value:Wn,mindset_reframe:Ms,habit_builder:Bt,growth_lesson:vn,discipline_reminder:Ea,perspective_shift:Ei,policy_education:fc,claims_support:dr,risk_prevention:Ea,life_awareness:Wn,client_relationship:Wn,rate_education:vn,buyer_guidance:yi,refinance_strategy:Bt,loan_breakdown:to,credit_qualification:oi,market_commentary:gd,expertise_positioning:mw,client_acquisition:Wn,value_pricing:to,delivery_excellence:Xd,authority_building:hP,transformation_education:vn,myth_busting:Ea,commercial_authority:vd,course_design_authority:fc,enrollment_sales:Wn,student_success:oi,scalable_business:gd},mwe=()=>{var _,k;const e=Gt(),{currentVertical:t}=Fa(),n=g.useMemo(()=>({realtor:"realtor",financial_advisor:"financial_advisor",builder_remodeler:"builder_remodeler",property_manager:"property_manager",host:"realtor",restaurantpro:"realtor",creator:"creator",side_hustle:"side_hustle",personal:"personal",authoritypro:"authoritypro",insurance:"insurance",mortgage:"mortgage",freelance_consultant:"freelance_consultant"})[t]||"realtor",[t]),[r,a]=g.useState(""),[i,o]=g.useState("all"),[l,c]=g.useState("grid"),[u,h]=g.useState(!1),[d,f]=g.useState(null),p=g.useMemo(()=>uwe(),[]),y=g.useMemo(()=>{var S;let j=r?C7.filter(N=>N.title.toLowerCase().includes(r.toLowerCase())||N.description.toLowerCase().includes(r.toLowerCase())||N.content.toLowerCase().includes(r.toLowerCase())).filter(N=>N.profession===n):((S=p.find(N=>N.profession===n))==null?void 0:S.categories.flatMap(N=>N.templates))||[];return i!=="all"&&(j=j.filter(N=>N.category===i)),j},[r,n,i,p]),m=g.useMemo(()=>{const j=p.find(S=>S.profession===n);return(j==null?void 0:j.categories)||[]},[p,n]),v=j=>{e("/dashboard",{state:{reusePost:{platform:j.platforms[0],platforms:j.platforms,content:j.content,tone:"professional",goal:j.persuasionLever==="Authority"?"authority":j.persuasionLever==="Social Proof"?"engagement":j.persuasionLever==="Scarcity"?"leads":"engagement"},fromTemplate:!0,templateTitle:j.title}})},b=j=>{f(j),h(!0)},x=()=>{a(""),o("all")},w=r||i!=="all";return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center gap-4",children:[s.jsxs("div",{className:"relative flex-1 w-full",children:[s.jsx(Jd,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),s.jsx(ze,{placeholder:"Search templates...",value:r,onChange:j=>a(j.target.value),className:"pl-10 h-10"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(z,{variant:l==="grid"?"secondary":"ghost",size:"icon",className:"h-10 w-10",onClick:()=>c("grid"),children:s.jsx(yP,{className:"h-4 w-4"})}),s.jsx(z,{variant:l==="list"?"secondary":"ghost",size:"icon",className:"h-10 w-10",onClick:()=>c("list"),children:s.jsx(sJ,{className:"h-4 w-4"})})]})]}),n==="realtor"&&s.jsxs("div",{className:"space-y-2",children:[s.jsx("span",{className:"text-sm font-medium text-muted-foreground",children:"One-Click Year of Content"}),s.jsx(PU,{variant:"secondary"})]}),s.jsx("div",{className:"flex items-center gap-2",children:s.jsxs(je,{variant:"secondary",className:"text-sm px-3 py-1",children:[((_=N7[n])==null?void 0:_.label)||n," Templates"]})}),s.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[s.jsxs(z,{variant:i==="all"?"secondary":"outline",size:"sm",onClick:()=>o("all"),className:"h-8",children:["All Templates",s.jsx(je,{variant:"secondary",className:"ml-2 h-5 px-1.5 text-[10px]",children:y.length})]}),m.map(({category:j,categoryLabel:S,templates:N})=>{const C=pwe[j]||yi;return s.jsxs(z,{variant:i===j?"secondary":"outline",size:"sm",onClick:()=>o(j),className:"h-8",children:[s.jsx(C,{className:"h-3.5 w-3.5 mr-1.5"}),S,s.jsx(je,{variant:"secondary",className:"ml-2 h-5 px-1.5 text-[10px]",children:N.length})]},j)})]}),w&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(JQ,{className:"h-4 w-4 text-muted-foreground"}),s.jsx("span",{className:"text-sm text-muted-foreground",children:"Active filters:"}),r&&s.jsxs(je,{variant:"secondary",className:"gap-1",children:['"',r,'"',s.jsx("button",{onClick:()=>a(""),children:s.jsx(Br,{className:"h-3 w-3"})})]}),i!=="all"&&s.jsxs(je,{variant:"secondary",className:"gap-1",children:[(k=S7[i])==null?void 0:k.label,s.jsx("button",{onClick:()=>o("all"),children:s.jsx(Br,{className:"h-3 w-3"})})]}),s.jsx(z,{variant:"ghost",size:"sm",onClick:x,className:"h-6 text-xs",children:"Clear all"})]}),s.jsx(Wr,{mode:"wait",children:y.length===0?s.jsxs(fe.div,{initial:{opacity:0}
4176,animate:{opacity:1},exit:{opacity:0},className:"flex flex-col items-center justify-center py-16 text-center",children:[s.jsx(Jd,{className:"h-12 w-12 text-muted-foreground/50 mb-4"}),s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"No templates found"}),s.jsx("p",{className:"text-muted-foreground text-sm max-w-sm",children:"Try adjusting your search or filters to find what you're looking for."}),s.jsx(z,{variant:"outline",onClick:x,className:"mt-4",children:"Clear filters"})]}):s.jsx(fe.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:K(l==="grid"?"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4":"flex flex-col gap-3"),children:y.map(j=>s.jsx(fwe,{template:j,onUseTemplate:v,onSchedule:b},j.id))},`${n}-${i}-${r}`)}),s.jsx(cz,{open:u,onOpenChange:h,selectedSlot:null,onScheduled:()=>{h(!1),f(null)},initialPost:d?{content:d.content,platforms:d.platforms,platform:d.platforms[0]}:null})]})},gwe=()=>s.jsxs(hr,{title:"Template Gallery",description:"Professional templates for every occasion – ready to customize and post",children:[s.jsx(ar,{title:"Template Gallery – Ready-Made Content | SociePRO AI",description:"Browse professional social media templates for realtors and more. One-click to customize or schedule. Build your content library faster.",keywords:"social media templates, realtor templates, content templates, linkedin templates, facebook templates",canonicalUrl:"https://sociepro.ai/dashboard/templates",jsonLd:Jw("Template Gallery","Professional social media templates library")}),s.jsx(mwe,{})]});function T7({open:e,onClose:t,userAccessToken:n,onPageSelected:r}){const[a,i]=g.useState([]),[o,l]=g.useState(!0),[c,u]=g.useState(!1),[h,d]=g.useState(null),[f,p]=g.useState(null),{toast:y}=Je();g.useEffect(()=>{e&&n&&m()},[e,n]);const m=async()=>{var x;l(!0),p(null);try{const{data:{user:w}}=await W.auth.getUser();if(!w)throw new Error("Not authenticated");const{data:_,error:k}=await W.functions.invoke("meta-oauth",{body:{action:"get-pages",userId:w.id,userAccessToken:n}});if(k)throw k;if(_.error)throw new Error(_.error);i(_.pages||[]),((x=_.pages)==null?void 0:x.length)===0&&p("No Facebook Pages found. Make sure you have at least one Facebook Page connected to your account.")}catch(w){console.error("Failed to fetch pages:",w),p(w.message||"Failed to fetch Facebook Pages")}finally{l(!1)}},v=async x=>{d(x.id),u(!0);try{const{data:{user:w}}=await W.auth.getUser();if(!w)throw new Error("Not authenticated");const{data:_,error:k}=await W.functions.invoke("meta-oauth",{body:{action:"store-page",userId:w.id,pageId:x.id,pageName:x.name,pageAccessToken:x.accessToken,pageCategory:x.category}});if(k)throw k;if(_.error)throw new Error(_.error);y({title:"Facebook Page Connected",description:`${x.name} has been connected successfully.`}),r(),t()}catch(w){console.error("Failed to store page:",w),y({title:"Connection Failed",description:w.message||"Failed to connect Facebook Page",variant:"destructive"}),d(null)}finally{u(!1)}},b=()=>{y({title:"Page Selection Skipped",description:"You can select a Facebook Page later from Settings."}),t()};return s.jsx(An,{open:e,onOpenChange:x=>!x&&t(),children:s.jsxs(En,{className:"sm:max-w-[500px]",children:[s.jsxs(wn,{children:[s.jsxs(_n,{className:"flex items-center gap-2",children:[s.jsx(gi,{className:"h-5 w-5 text-primary"}),"Select a Facebook Page"]}),s.jsx(Zr,{children:"Choose which Facebook Page you want to connect for posting. You can only select one Page at a time."})]}),s.jsx("div",{className:"py-4",children:o?s.jsxs("div",{className:"flex flex-col items-center justify-center py-8 gap-2",children:[s.jsx(ce,{className:"h-6 w-6 animate-spin text-muted-foreground"}),s.jsx("span",{className:"text-sm text-muted-foreground",children:"Loading your Pages..."})]}):f?s.jsxs("div",{className:"flex flex-col items-center justify-center py-8 gap-3 text-center",children:[s.jsx(Ai,{className:"h-8 w-8 text-destructive"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:f}),s.jsx(z,{variant:"outline",size:"sm",onClick:m,children:"Try Again"})]}):a.length===0?s.jsxs("div",{className:"flex flex-col items-center justify-center py-8 gap-3 text-center",children:[s.jsx(gi,{className:"h-8 w-8 text-muted-foreground"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"No Facebook Pages found. Create a Facebook Page first, then reconnect."})]}):s.jsx("div",{className:"space-y-2 max-h-[300px] overflow-y-auto pr-2",children:a.map(x=>s.jsxs(fe.button,{initial:{opacity:0,y:5}
4176,animate:{opacity:1,y:0},onClick:()=>v(x),disabled:c,className:`w-full flex items-center gap-3 p-4 rounded-lg border transition-all text-left ${h===x.id?"border-primary bg-primary/5":"border-border hover:border-primary/50 hover:bg-muted/50"} ${c&&h===x.id?"opacity-70":""}`,children:[s.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-blue-500 text-white",children:s.jsx(gi,{className:"h-5 w-5"})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"font-medium truncate",children:x.name}),x.category&&s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:x.category})]}),c&&h===x.id?s.jsx(ce,{className:"h-5 w-5 animate-spin text-primary"}):h===x.id?s.jsx($t,{className:"h-5 w-5 text-primary"}):null]},x.id))})}),s.jsxs("div",{className:"flex justify-between pt-2",children:[s.jsx(z,{variant:"ghost",onClick:b,disabled:c,children:"Skip for now"}),s.jsxs(z,{variant:"outline",onClick:t,disabled:c,children:[s.jsx(Br,{className:"mr-1.5 h-4 w-4"}),"Cancel"]})]})]})})}const ywe=({platform:e,onConnect:t})=>{const n=e.icon,r=e.brandColor,a=e.textColor,i=e.hoverColor,o=!!e.gradient;return e.comingSoon?s.jsxs("button",{disabled:!0,className:"flex items-center justify-center gap-3 rounded-xl px-6 py-3.5 font-semibold transition-all w-full opacity-60 cursor-not-allowed",style:{backgroundColor:e.brandColor,color:e.textColor},children:[s.jsx(n,{className:"h-5 w-5"}),s.jsxs("span",{children:["Connect ",e.name]}),s.jsx("span",{className:"ml-1 rounded-full bg-white/20 px-2 py-0.5 text-xs",children:"Coming Soon"})]}):s.jsxs("button",{onClick:t,className:K("flex items-center justify-center gap-3 rounded-xl px-6 py-3.5 font-semibold transition-all w-full","hover:scale-[1.02] hover:shadow-lg active:scale-[0.98]"),style:{background:o?e.gradient:r,color:a},onMouseEnter:l=>{o||(l.currentTarget.style.backgroundColor=i)},onMouseLeave:l=>{o||(l.currentTarget.style.backgroundColor=r)},children:[s.jsx(n,{className:"h-5 w-5"}),s.jsxs("span",{children:["Connect ",e.name]})]})},vwe=({platform:e,connection:t,showLabel:n,needsPageSelection:r,pageLabel:a,onSelectPage:i,onSetDefault:o,onDisconnect:l})=>{const c=e.icon,u=t.label||t.profile_name||t.account_name||"Account";return s.jsxs("div",{className:K("flex items-center justify-between rounded-xl border-2 p-4 transition-all",r?"border-warning/30 bg-warning/5":"border-success/30 bg-success/5"),children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"flex h-11 w-11 items-center justify-center rounded-full",style:{background:e.gradient||e.brandColor},children:s.jsx(c,{className:"h-5 w-5 text-white"})}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[s.jsx("span",{className:"font-semibold",children:e.displayName}),n&&s.jsx("span",{className:"rounded-full bg-muted px-2 py-0.5 text-xs font-medium text-muted-foreground",children:u}),r?s.jsxs("span",{className:"flex items-center gap-1 rounded-full bg-warning/20 px-2 py-0.5 text-xs font-medium text-warning",children:[s.jsx(Ai,{className:"h-3 w-3"}),"Page Required"]}):s.jsxs("span",{className:"flex items-center gap-1 rounded-full bg-success/20 px-2 py-0.5 text-xs font-medium text-success",children:[s.jsx($t,{className:"h-3 w-3"}),"Connected"]}),n&&t.is_default&&s.jsxs("span",{className:"flex items-center gap-1 rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary",children:[s.jsx(vd,{className:"h-3 w-3"}),"Default"]})]}),r?s.jsx("p",{className:"text-sm text-warning",children:"Select a Page to enable posting"}):a?s.jsx("p",{className:"text-sm text-muted-foreground",children:a}):t.profile_name||t.account_name?s.jsx("p",{className:"text-sm text-muted-foreground",children:t.profile_name||t.account_name}):null,!r&&t.token_expires_at&&s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Token expires: ",new Date(t.token_expires_at).toLocaleDateString()]})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[r&&i&&s.jsxs(z,{size:"sm",onClick:i,className:"gap-1.5",children:[s.jsx(gi,{className:"h-4 w-4"}),"Select Page"]}),n&&!t.is_default&&o&&s.jsx(z,{variant:"outline",size:"sm",onClick:o,children:"Set as default"}),s.jsxs(z,{variant:"outline",size:"sm",onClick:l,className:"text-destructive hover:bg-destructive/10 hover:text-destructive border-destructive/30",children:[s.jsx(vJ,{className:"mr-1.5 h-4 w-4"}),"Disconnect"]})]})]})},bwe=()=>{var A,E;const[e,t]=Ul(),{connections:n,isLoading:r,connectPlatform:a,disconnectConnection:i,setDefaultConnection:o,getConnectionsForPlatform:l,handleOAuthCallback:c,isOAuthPlatform:u,refetch:h}=Hl(),{selectedPage:d,hasSelectedPage:f,refetch:p}=Uq(),[y,m]=g.useState(!1),[v,b]=g.useState(null),[x,w]=g.useState(null),[_,k]=g.useState(!1),[j,S]=g.useState(null),{gateAction:N,showTrialModal:C,setShowTrialModal:M,startFreeTrial:O}=Ng(),D=async()=>
4176{l("facebook").length>0&&a("facebook")};g.useEffect(()=>{const T=e.get("code"),L=e.get("error"),B=e.get("error_description"),H=e.get("connected");if(L||B){console.error("OAuth error:",L,B),t({});return}if(H){t({}),h(),p();return}if(T&&!y){m(!0);const G=sessionStorage.getItem("oauth_platform")||"linkedin",Z=sessionStorage.getItem("oauth_state"),le=e.get("state");if(le&&Z&&le!==Z){console.error("OAuth state mismatch"),m(!1),t({});return}b(G),t({}),c(T,G).then(ue=>{ue.needsPageSelection&&ue.userAccessToken&&(S(ue.userAccessToken),k(!0)),p()}).finally(()=>{m(!1),b(null)})}},[e,c,t,y,p]);const $=T=>{N("connect_social")&&a(T)},R=async(T,L)=>{await i(T,L),w(null),L==="facebook"&&p()},I=()=>{k(!1),S(null),p()},P=()=>{k(!1),S(null)};return r||y?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 gap-3",children:[s.jsx(ce,{className:"h-8 w-8 animate-spin text-primary"}),y&&v&&s.jsxs("span",{className:"text-muted-foreground font-medium",children:["Connecting ",((A=bp[v])==null?void 0:A.displayName)||v,"..."]})]}):s.jsxs(s.Fragment,{children:[s.jsxs(fe.section,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.15},className:"rounded-2xl border border-border bg-card p-6",children:[s.jsxs("div",{className:"mb-6 flex items-center gap-3",children:[s.jsx("div",{className:"rounded-full bg-primary/10 p-2.5",children:s.jsx(yd,{className:"h-5 w-5 text-primary"})}),s.jsxs("div",{children:[s.jsx("h2",{className:"text-lg font-semibold",children:"Connected Accounts"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Connect your social accounts with secure OAuth authentication. You can connect more than one account per platform (e.g. a personal and a business LinkedIn page)."})]})]}),s.jsx("div",{className:"grid gap-3",children:Sme.map(T=>{const L=bp[T];if(!L)return null;const B=l(T);if(B.length===0)return s.jsx(ywe,{platform:L,onConnect:()=>$(T)},T);const H=T==="facebook",G=B.length>1;return s.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[B.map(Z=>{const le=H&&!f,ue=H&&!le&&d?`Page: ${d.page_name}`:null;return s.jsx(vwe,{platform:L,connection:Z,showLabel:G,needsPageSelection:le,pageLabel:ue,onSelectPage:H?D:void 0,onSetDefault:G?()=>o(Z.id,T):void 0,onDisconnect:()=>w({id:Z.id,platform:T})},Z.id)}),u(T)&&!L.comingSoon&&s.jsxs("button",{type:"button",onClick:()=>$(T),className:"self-start px-1 text-sm font-medium text-primary hover:underline",children:["+ Add another ",L.displayName," account"]})]},T)})}),s.jsxs("div",{className:"mt-6 flex items-start gap-3 rounded-xl bg-muted/50 p-4",children:[s.jsx(Ea,{className:"h-5 w-5 mt-0.5 text-primary flex-shrink-0"}),s.jsxs("div",{className:"text-sm text-muted-foreground",children:[s.jsx("p",{className:"font-semibold text-foreground mb-1",children:"Secure OAuth Authentication"}),s.jsx("p",{children:"All connections use official platform OAuth flows. Your credentials are never stored—only encrypted access tokens."})]})]})]}),s.jsx(An,{open:!!x,onOpenChange:T=>!T&&w(null),children:s.jsxs(En,{className:"sm:max-w-[400px]",children:[s.jsxs(wn,{children:[s.jsxs(_n,{className:"flex items-center gap-2",children:[s.jsx(Ai,{className:"h-5 w-5 text-destructive"}),"Disconnect ",x&&((E=bp[x.platform])==null?void 0:E.displayName),"?"]}),s.jsx(Zr,{children:"This will remove this connection. Any scheduled posts set to use it will no longer be published automatically."})]}),s.jsxs("div",{className:"flex justify-end gap-2 pt-4",children:[s.jsx(z,{variant:"outline",onClick:()=>w(null),children:"Cancel"}),s.jsx(z,{variant:"destructive",onClick:()=>x&&R(x.id,x.platform),children:"Disconnect"})]})]})}),s.jsx(T7,{open:_,onClose:P,userAccessToken:j,onPageSelected:I}),s.jsx(c0,{open:C,onOpenChange:M,onActivate:O})]})};var hT="Radio",[xwe,A7]=Hn(hT),[wwe,_we]=xwe(hT),E7=g.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:a=!1,required:i,disabled:o,value:l="on",onCheck:c,form:u,...h}=e,[d,f]=g.useState(null),p=Fe(t,v=>f(v)),y=g.useRef(!1),m=d?u||!!d.closest("form"):!0;return s.jsxs(wwe,{scope:n,checked:a,disabled:o,children:[s.jsx(we.button,{type:"button",role:"radio","aria-checked":a,"data-state":M7(a),"data-disabled":o?"":void 0,disabled:o,value:l,...h,ref:p,onClick:de(e.onClick,v=>{a||c==null||c(),m&&(y.current=v.isPropagationStopped(),y.current||v.stopPropagation())})}),m&&s.jsx(I7,{control:d,bubbles:!y.current,name:r,value:l,checked:a,required:i,disabled:o,form:u,style:{transform:"translateX(-100%)"}})]})});E7.displayName=hT;var O7="RadioIndicator",R7=g.forwardRef((e,t)=>
vendor: 2,077 bytes, line 4176
4176{const{__scopeRadio:n,forceMount:r,...a}=e,i=_we(O7,n);return s.jsx(Vn,{present:r||i.checked,children:s.jsx(we.span,{"data-state":M7(i.checked),"data-disabled":i.disabled?"":void 0,...a,ref:t})})});R7.displayName=O7;var kwe="RadioBubbleInput",I7=g.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...a},i)=>{const o=g.useRef(null),l=Fe(o,i),c=Tg(n),u=gg(t);return g.useEffect(()=>{const h=o.current;if(!h)return;const d=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(d,"checked").set;if(c!==n&&p){const y=new Event("click",{bubbles:r});p.call(h,n),h.dispatchEvent(y)}},[c,n,r]),s.jsx(we.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...a,tabIndex:-1,ref:l,style:{...a.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});I7.displayName=kwe;function M7(e){return e?"checked":"unchecked"}var jwe=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],g0="RadioGroup",[Swe,_He]=Hn(g0,[Hh,A7]),D7=Hh(),$7=A7(),[Nwe,Cwe]=Swe(g0),L7=g.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:a,value:i,required:o=!1,disabled:l=!1,orientation:c,dir:u,loop:h=!0,onValueChange:d,...f}=e,p=D7(n),y=vu(u),[m,v]=ba({prop:i,defaultProp:a??null,onChange:d,caller:g0});return s.jsx(Nwe,{scope:n,name:r,required:o,disabled:l,value:m,onValueChange:v,children:s.jsx(O2,{asChild:!0,...p,orientation:c,dir:y,loop:h,children:s.jsx(we.div,{role:"radiogroup","aria-required":o,"aria-orientation":c,"data-disabled":l?"":void 0,dir:y,...f,ref:t})})})});L7.displayName=g0;var F7="RadioGroupItem",B7=g.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...a}=e,i=Cwe(F7,n),o=i.disabled||r,l=D7(n),c=$7(n),u=g.useRef(null),h=Fe(t,u),d=i.value===a.value,f=g.useRef(!1);return g.useEffect(()=>{const p=m=>{jwe.includes(m.key)&&(f.current=!0)},y=()=>f.current=!1;return document.addEventListener("keydown",p),document.addEventListener("keyup",y),()=>{document.removeEventListener("keydown",p),document.removeEventListener("keyup",y)}},[]),s.jsx(R2,{asChild:!0,...l,focusable:!o,active:d,children:s.jsx(E7,{disabled:o,required:i.required,
4176checked:d,...c,...a,name:i.name,ref:h,onCheck:()=>i.onValueChange(a.value),onKeyDown:de(p=>{p.key==="Enter"&&p.preventDefault()}),onFocus:de(a.onFocus,()=>{var p;f.current&&((p=u.current)==null||p.click())})})})});B7.displayName=F7;var Pwe="RadioGroupIndicator",W7=g.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,a=$7(n);return s.jsx(R7,{...a,...r,ref:t})});W7.displayName=Pwe;var q7=L7,U7=B7,Twe=W7;const z7=g.forwardRef(({className:e,...t},n)=>s.jsx(q7,{className:K("grid gap-2",e),...t,ref:n}));z7.displayName=q7.displayName;const Fv=g.forwardRef(({className:e,...t},n)=>s.jsx(U7,{ref:n,className:K("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:s.jsx(Twe,{className:"flex items-center justify-center",children:s.jsx(FF,{className:"h-2.5 w-2.5 fill-current text-current"})})}));Fv.displayName=U7.displayName;function H7(){const[e,t]=g.useState("wordpress"),[n,r]=g.useState(""),[a,i]=g.useState(""),[o,l]=g.useState(!0),[c,u]=g.useState(!1),[h,d]=g.useState(!1),{toast:f}=Je();g.useEffect(()=>{p()},[]);const p=async()=>{try{l(!0);const{data:{user:m}}=await W.auth.getUser();if(!m)return;const{data:v}=await W.from("cms_settings").select("*").eq("user_id",m.id).maybeSingle();v&&(t(v.cms_platform||"wordpress"),r(v.cms_endpoint||""),i(v.cms_api_key||""),v.cms_endpoint&&d(!0))}catch(m){console.error("Error fetching CMS settings:",m)}finally{l(!1)}},y=async()=>{if(!n.trim()){f({title:"Endpoint Required",description:"Please enter your CMS REST endpoint or Webhook URL.",variant:"destructive"});return}u(!0);try{const{data:{user:m}}=await W.auth.getUser();if(!m)throw new Error("Not authenticated");const v={user_id:m.id,cms_platform:e,cms_endpoint:n.trim(),cms_api_key:a.trim(),updated_at:new Date().toISOString()},{error:b}=await W.from("cms_settings").upsert(v,{onConflict:"user_id"});b&&console.warn("cms_settings upsert note:",b.message),d(!0),f({title:"CMS Configuration Saved 🚀",description:`Connected to your ${e.toUpperCase()} destination. AutoBlogPRO will use these credentials for 1-click automated publishing.`})}catch(m){f({title:"Failed to Save",description:m.message||"Could not save CMS settings.",variant:"destructive"})}finally{u(!1)}};return o?s.jsx(he,{children:s.jsx(pe,{className:"p-6 flex items-center justify-center min-h-[180px]",children:s.jsx(ce,{className:"h-6 w-6 animate-spin text-muted-foreground"})})}):s.jsxs(he,{className:"border border-border shadow-sm",children:[s.jsx(Ce,{children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsxs(Pe,{className:"flex items-center gap-2 text-lg font-bold",children:[s.jsx(Xc,{className:"h-5 w-5 text-primary"}),"Automated CMS Publishing Integration"]}),s.jsx(Un,{children:"Configure your CMS once. AutoBlogPRO will format and deliver your approved articles directly to your blog."})]}),h&&s.jsxs("div",{className:"flex items-center gap-1 text-xs font-semibold text-emerald-500 bg-emerald-500/10 px-3 py-1 rounded-full border border-emerald-500/20",children:[s.jsx(ls,{className:"h-3.5 w-3.5"}),"Connected"]})]})}),s.jsxs(pe,{className:"space-y-6",children:[s.jsxs("div",{className:"space-y-3",children:[s.jsx(X,{className:"text-sm font-semibold",children:"1. Select CMS Platform"}),s.jsxs(z7,{value:e,onValueChange:m=>t(m),className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[s.jsxs("div",{className:`flex items-start gap-3 p-3.5 rounded-xl border cursor-pointer transition-all ${e==="wordpress"?"border-primary bg-primary/5 ring-1 ring-primary":"border-border hover:bg-muted/40"}`,children:[s.jsx(Fv,{value:"wordpress",id:"platform-wp",className:"mt-1"}),s.jsxs(X,{htmlFor:"platform-wp",className:"cursor-pointer space-y-1",children:[s.jsx("div",{className:"font-semibold text-sm",children:"WordPress"}),s.jsx("div",{className:"text-xs text-muted-foreground",children:"Standard REST API v2 (`wp-json/wp/v2/posts`)"})]})]}),s.jsxs("div",{className:`flex items-start gap-3 p-3.5 rounded-xl border cursor-pointer transition-all ${e==="webflow"?"border-primary bg-primary/5 ring-1 ring-primary":"border-border hover:bg-muted/40"}`,children:[s.jsx(Fv,{value:"webflow",id:"platform-wf",className:"mt-1"}),s.jsxs(X,{htmlFor:"platform-wf",className:"cursor-pointer space-y-1",children:[s.jsx("div",{className:"font-semibold text-sm",children:"Webflow"}),s.jsx("div",{className:"text-xs text-muted-foreground",children:"Webflow CMS Collections v2 API"})]})]}),s.jsxs("div",{className:`flex items-start gap-3 p-3.5 rounded-xl border cursor-pointer transition-all ${e==="webhook"?"border-primary bg-primary/5 ring-1 ring-primary":"border-border hover:bg-muted/40"}`,children:[s.jsx(Fv,{value:"webhook",id:"platform-wh",className:"mt-1"}),s.jsxs(X,{htmlFor:"platform-wh",className:"cursor-pointer space-y-1",children:[s.jsx("div",{className:"font-semibold text-sm",children:"Custom Webhook"}),s.jsx("div",{className:"text-xs text-muted-foreground",children:"Make, Zapier, n8n, Ghost, Shopify, etc."})]})]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs(X,{htmlFor:"cms-endpoint",className:"text-sm font-semibold flex items-center gap-1.5",children:[s.jsx(aJ,{className:"h-4 w-4 text-muted-foreground"}),"2. Endpoint URL"]}),s.jsx(ze,{id:"cms-endpoint",type:"url",placeholder:e==="wordpress"?"https://yourblog.com/wp-json/wp/v2/posts":e==="webflow"?"https://api.webflow.com/v2/collections/YO
4176UR_COLLECTION_ID/items":"https://hooks.zapier.com/hooks/catch/...",value:n,onChange:m=>r(m.target.value)}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:[e==="wordpress"&&"Enter your WordPress site REST API posts endpoint.",e==="webflow"&&"Enter your Webflow collection API URL.",e==="webhook"&&"AutoBlogPRO will POST JSON with title, content, excerpt, and slug to this URL."]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs(X,{htmlFor:"cms-apikey",className:"text-sm font-semibold flex items-center gap-1.5",children:[s.jsx(nJ,{className:"h-4 w-4 text-muted-foreground"}),"3. API Key / Application Password"]}),s.jsx(ze,{id:"cms-apikey",type:"password",placeholder:e==="wordpress"?"e.g. username:application_password or App Password token":"e.g. Bearer API Token or Secret Key",value:a,onChange:m=>i(m.target.value)}),s.jsxs("p",{className:"text-xs text-muted-foreground flex items-center gap-1",children:[s.jsx(ww,{className:"h-3.5 w-3.5 text-emerald-500"}),"Stored securely and encrypted. For WordPress, generate an Application Password in WP Admin → Users → Profile."]})]}),s.jsx("div",{className:"pt-2 flex justify-end",children:s.jsxs(z,{onClick:y,disabled:c,className:"gap-2",children:[c&&s.jsx(ce,{className:"h-4 w-4 animate-spin"}),"Save CMS Configuration"]})})]})]})}function Awe(){const[e,t]=g.useState(""),[n,r]=g.useState(!1),[a,i]=g.useState(!1),{toast:o}=Je(),l=Gt(),c=e==="DELETE",u=async()=>{if(c){r(!0);try{const{data:{user:h}}=await W.auth.getUser();if(!h)throw new Error("No user found");const d=h.id;await W.from("saved_posts").delete().eq("user_id",d),await W.from("scheduled_posts").delete().eq("user_id",d),await W.from("social_connections").delete().eq("user_id",d),await W.from("user_settings").delete().eq("user_id",d),await W.auth.signOut(),o({title:"Account data deleted",description:"All your data has been successfully deleted. You have been signed out."}),l("/")}catch(h){console.error("Error deleting account:",h),o({variant:"destructive",title:"Error deleting account",description:"There was a problem deleting your account. Please try again or contact support."})}finally{r(!1),i(!1)}}};return s.jsxs(m0,{open:a,onOpenChange:i,children:[s.jsx(k7,{asChild:!0,children:s.jsxs(z,{variant:"destructive",className:"w-full sm:w-auto",children:[s.jsx(Jc,{className:"mr-2 h-4 w-4"}),"Delete Account & Data"]})}),s.jsxs(Fg,{className:"sm:max-w-md",children:[s.jsxs(Bg,{children:[s.jsxs(qg,{className:"flex items-center gap-2 text-destructive",children:[s.jsx(Bs,{className:"h-5 w-5"}),"Delete Account & All Data"]}),s.jsxs(Ug,{className:"space-y-3 pt-2",children:[s.jsxs("p",{children:["This action is ",s.jsx("strong",{children:"permanent and irreversible"}),". Deleting your account will:"]}),s.jsxs("ul",{className:"list-disc pl-5 space-y-1 text-sm",children:[s.jsx("li",{children:"Remove all your saved posts"}),s.jsx("li",{children:"Delete all scheduled posts"}),s.jsx("li",{children:"Disconnect all linked social accounts"}),s.jsx("li",{children:"Erase all your preferences and settings"}),s.jsx("li",{children:"Sign you out immediately"})]}),s.jsxs("p",{className:"font-medium text-foreground pt-2",children:["To confirm, type ",s.jsx("span",{className:"font-mono bg-muted px-1 rounded",children:"DELETE"})," below:"]})]})]}),s.jsxs("div",{className:"py-2",children:[s.jsx(X,{htmlFor:"confirm-delete",className:"sr-only",children:"Type DELETE to confirm"}),s.jsx(ze,{id:"confirm-delete",value:e,onChange:h=>t(h.target.value.toUpperCase()),placeholder:"Type DELETE to confirm",className:"font-mono",disabled:n})]}),s.jsxs(Wg,{className:"gap-2 sm:gap-0",children:[s.jsx(Hg,{disabled:n,children:"Cancel"}),s.jsx(zg,{onClick:u,disabled:!c||n,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:n?s.jsxs(s.Fragment,{children:[s.jsx(ce,{className:"mr-2 h-4 w-4 animate-spin"}),"Deleting..."]}):s.jsxs(s.Fragment,{children:[s.jsx(Jc,{className:"mr-2 h-4 w-4"}),"Delete Everything"]})})]})]})]})}var Ewe="Separator",xM="horizontal",Owe=["horizontal","vertical"],V7=g.forwardRef((e,t)=>{const{decorative:n,orientation:r=xM,...a}=e,i=Rwe(r)?r:xM,l=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return s.jsx(we.div,{"data-orientation":i,...l,...a,ref:t})});V7.displayName=Ewe;function Rwe(e){return Owe.includes(e)}var G7=V7;const ou=g.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},a)=>s.jsx(G7,{ref:a,decorative:n,orientation:t,className:K("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));ou.displayName=G7.displayName;const Iwe=[{id:"linkedin",name:"LinkedIn"},{id:"instagram",name:"Instagram"},{id:"facebook",name:"Facebook"},{id:"threads",name:"Threads"},{id:"reddit",name:"Reddit"}],Mwe=[{id:"professional",name:"Professional"},{id:"bold",name:"Bold"},{id:"funny",name:"Funny"},{id:"confrontational",name:"Confrontational"},{id:"inspirational",name:"Inspirational"}],Dwe=[{id:"engagement",name:"Engagement"},{id:"authority",name:"Authority"},{id:"leads",name:"Leads"}
4176,{id:"virality",name:"Virality"}],$we=[{id:"short",name:"Short",description:"Concise and punchy"},{id:"medium",name:"Medium",description:"Balanced length"},{id:"long",name:"Long",description:"Detailed and thorough"}],Lwe=[{id:"safe",name:"Safe",description:"Conservative and careful"},{id:"balanced",name:"Balanced",description:"Mix of safe and bold"},{id:"bold",name:"Bold",description:"Provocative and daring"}],Fwe=[{id:"light",name:"Light",icon:YF,description:"Bright and clean"},{id:"dark",name:"Dark",icon:dJ,description:"Easy on the eyes"},{id:"system",name:"System",icon:uJ,description:"Match OS setting"}];function Bwe(){const e=Gt(),{toast:t}=Je(),{settings:n,isLoading:r,userEmail:a,updateSettings:i}=Pq(),{theme:o,setTheme:l}=a8(),{status:c,evergreenSet:u,evergreenSetDate:h,evergreenPostCount:d,isPaused:f,setPaused:p,clearClickPRO:y,refresh:m}=wq(),{status:v,moduleName:b,targetRoute:x,maxCompletedTier:w}=QW(),[_,k]=g.useState(""),[j,S]=g.useState("linkedin"),[N,C]=g.useState("professional"),[M,O]=g.useState("authority"),[D,$]=g.useState(!1),[R,I]=g.useState("medium"),[P,A]=g.useState("balanced"),[E,T]=g.useState(!1),[L,B]=g.useState("system"),[H,G]=g.useState(!1),[Z,le]=g.useState(!1),[ue,re]=g.useState(void 0),[q,U]=g.useState(!1),[Q,J]=g.useState("09:00"),[Y,oe]=g.useState("tuesday"),[ve,De]=g.useState(!1),[Le,He]=g.useState(!1),[vt,lt]=g.useState(""),[Pt,te]=g.useState(""),[ne,ye]=g.useState(""),[Ge,st]=g.useState(""),[Ie,St]=g.useState("Contact Me"),[qr,qe]=g.useState(!1),[ln,Tt]=g.useState("");g.useEffect(()=>{if(n){k(n.display_name||""),S(n.default_platform),C(n.default_tone),O(n.default_goal),$(n.include_trendpulse_by_default),I(n.output_length),A(n.boldness_level),T(n.daily_trendpulse_reminder);const ae=n.theme||"system";B(ae),ae!==o&&l(ae),He(n.contact_injection_enabled||!1),lt(n.contact_business_name||""),te(n.contact_phone||""),ye(n.contact_email||""),st(n.contact_website||""),St(n.contact_cta_text||"Contact Me"),qe(n.lead_capture_enabled||!1),Tt(n.default_cta_button_text||"")}},[n]);const Pr=async ae=>{B(ae),l(ae),await i({theme:ae})},gr=async()=>{G(!0),await i({display_name:_}),G(!1)},Tr=async()=>{G(!0),await i({default_platform:j,default_tone:N,default_goal:M,include_trendpulse_by_default:D}),G(!1)},kn=async()=>{G(!0),await i({output_length:R,boldness_level:P}),G(!1)},_a=async()=>{G(!0),await i({daily_trendpulse_reminder:E}),G(!1)},Yt=async()=>{await W.auth.signOut(),e("/")},$e=async()=>{try{const{data:{user:ae}}=await W.auth.getUser();if(!ae)return;await W.from("user_library_subscriptions").update({is_active:!1}).eq("user_id",ae.id);const At=ge(new Date,"yyyy-MM-dd");await W.from("scheduled_posts").update({status:"paused"}).eq("user_id",ae.id).eq("is_evergreen",!0).eq("trend_mode","series").gte("scheduled_date",At).eq("status","pending"),p(!0),t({title:"ClickPRO paused",description:"Future posts have been paused. You can resume at any time."})}catch(ae){console.error("Failed to pause ClickPRO:",ae),t({title:"Failed to pause",description:"Something went wrong. Please try again.",variant:"destructive"})}},et=async()=>{try{const{data:{user:ae}}=await W.auth.getUser();if(!ae)return;await W.from("user_library_subscriptions").update({is_active:!0}).eq("user_id",ae.id);const At=ge(new Date,"yyyy-MM-dd");await W.from("scheduled_posts").update({status:"pending"}).eq("user_id",ae.id).eq("is_evergreen",!0).eq("trend_mode","series").gte("scheduled_date",At).eq("status","paused"),p(!1),t({title:"ClickPRO resumed",description:"Your scheduled posts are active again."})}catch(ae){console.error("Failed to resume ClickPRO:",ae),t({title:"Failed to resume",description:"Something went wrong. Please try again.",variant:"destructive"})}},bt=async()=>{try{le(!0);const{data:{user:ae}}=await W.auth.getUser();if(!ae)return;const At=ge(new Date,"yyyy-MM-dd"),{error:cn}=await W.from("scheduled_posts").delete().eq("user_id",ae.id).eq("is_evergreen",!0).eq("trend_mode","series").gte("scheduled_date",At);if(cn)throw cn;await W.from("user_library_subscriptions").delete().eq("user_id",ae.id),y(),t({title:"ClickPRO automation removed",description:"Future scheduled posts have been removed. Past posts are preserved."})}catch(ae){console.error("Failed to remove future posts:",ae),t({title:"Failed to remove",description:"Something went wrong. Please try again.",variant:"destructive"})}finally{le(!1)}},Ot=async()=>{try{De(!0);const{data:{user:ae}}=await W.auth.getUser();if(!ae)return;
4176const At=ge(new Date,"yyyy-MM-dd"),Re={sunday:0,monday:1,tuesday:2,wednesday:3,thursday:4,friday:5,saturday:6}[Y]??2,Ye=Q+":00",{data:nt,error:Zt}=await W.from("scheduled_posts").select("id, scheduled_date").eq("user_id",ae.id).eq("is_evergreen",!0).eq("trend_mode","series").eq("status","pending").gte("scheduled_date",At).order("scheduled_date",{ascending:!0});if(Zt)throw Zt;if(!nt||nt.length===0){t({title:"No future posts to update",description:"All posts have already been published."});return}const ct=[];if(ue){const zt=new Date(ue),Gn=zt.getDay();let On=Re-Gn;On<0&&(On+=7),zt.setDate(zt.getDate()+On);for(let jn=0;jn<nt.length;jn++){const c_=fr(va(zt),jn);ct.push({id:nt[jn].id,scheduled_date:ge(c_,"yyyy-MM-dd"),scheduled_time:Ye})}}else for(const zt of nt){const Gn=new Date(zt.scheduled_date),On=Gn.getDay();let jn=Re-On;jn<-3&&(jn+=7),jn>3&&(jn-=7),Gn.setDate(Gn.getDate()+jn),ct.push({id:zt.id,scheduled_date:ge(Gn,"yyyy-MM-dd"),scheduled_time:Ye})}for(const zt of ct)await W.from("scheduled_posts").update({scheduled_date:zt.scheduled_date,scheduled_time:zt.scheduled_time}).eq("id",zt.id);await W.from("user_library_subscriptions").update({schedule_day:Y,schedule_time:Ye}).eq("user_id",ae.id),m(),t({title:"Schedule updated",description:`${ct.length} future posts rescheduled to ${Y.charAt(0).toUpperCase()+Y.slice(1)}s at ${Q}.`})}catch(ae){console.error("Failed to update ClickPRO schedule:",ae),t({title:"Failed to update schedule",description:ae.message,variant:"destructive"})}finally{De(!1),re(void 0)}};return r?s.jsx("div",{className:"flex h-64 items-center justify-center",children:s.jsx(ce,{className:"h-8 w-8 animate-spin text-primary"})}):s.jsxs("div",{className:"mx-auto max-w-4xl space-y-8",children:[s.jsxs(fe.section,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"rounded-2xl border border-border bg-card p-6",children:[s.jsxs("div",{className:"mb-4 flex items-center gap-3",children:[s.jsx("div",{className:"rounded-full bg-primary/10 p-2",children:s.jsx(Si,{className:"h-5 w-5 text-primary"})}),s.jsxs("div",{children:[s.jsx("h2",{className:"text-lg font-semibold",children:"Profile"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Your personal information"})]})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{htmlFor:"displayName",children:"Display Name"}),s.jsx(ze,{id:"displayName",value:_,onChange:ae=>k(ae.target.value),placeholder:"Enter your name"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{htmlFor:"email",children:"Email Address"}),s.jsxs("div",{className:"relative",children:[s.jsx(ze,{id:"email",value:a||"",disabled:!0,className:"pr-10"}),s.jsx(kl,{className:"absolute right-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"})]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Email cannot be changed"})]}),s.jsxs(z,{onClick:gr,disabled:H,children:[H?s.jsx(ce,{className:"mr-2 h-4 w-4 animate-spin"}):s.jsx(ri,{className:"mr-2 h-4 w-4"}),"Save Profile"]})]})]}),s.jsxs(fe.section,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.02},className:"rounded-2xl border border-border bg-card p-6",children:[s.jsxs("div",{className:"mb-4 flex items-center gap-3",children:[s.jsx("div",{className:"rounded-full bg-primary/10 p-2",children:s.jsx(Se,{className:"h-5 w-5 text-primary"})}),s.jsxs("div",{children:[s.jsx("h2",{className:"text-lg font-semibold",children:"Positioning Profile"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"The authority profile that powers your generated content"})]})]}),v==="loading"&&s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx(ce,{className:"h-4 w-4 animate-spin"}),"Checking your positioning profile..."]}),v==="no_vertical"&&s.jsxs("div",{className:"rounded-lg border border-border bg-muted/30 p-4 text-sm",children:[s.jsx("p",{className:"font-medium",children:"No vertical assigned to your account yet"}),s.jsx("p",{className:"mt-1 text-muted-foreground",children:"Your account isn't currently assigned to a module, so there's no positioning profile to complete. Contact support to get a vertical assigned to your account."})]}),v==="not_required"&&b&&s.jsxs("p",{className:"text-sm text-muted-foreground",children:[id(b)," doesn't require a positioning profile."]}),v==="not_started"&&b&&s.jsxs("div",{className:"space-y-3",children:[s.jsxs("p",{className:"text-sm text-muted-foreground",children:["You haven't set up your ",id(b)," positioning profile yet. It only takes a few minutes and shapes everything your content generation produces."]}),s.jsxs(z,{onClick:()=>
4176e(x),className:"gap-2",children:["Start Now",s.jsx(Sr,{className:"h-4 w-4"})]})]}),v==="incomplete"&&b&&s.jsxs("div",{className:"space-y-3",children:[s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Your ",id(b)," positioning profile is in progress — tier ",w," of 4 complete."]}),s.jsxs(z,{onClick:()=>e(x),className:"gap-2",children:["Continue",s.jsx(Sr,{className:"h-4 w-4"})]})]}),v==="complete"&&b&&s.jsxs("div",{className:"space-y-3",children:[s.jsxs("p",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx($t,{className:"h-4 w-4 text-[hsl(106_54%_60%)]"}),"Your ",id(b)," positioning profile is complete."]}),s.jsxs(z,{variant:"outline",onClick:()=>e(x),className:"gap-2",children:["Revise Positioning",s.jsx(Sr,{className:"h-4 w-4"})]})]})]}),s.jsxs(fe.section,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.05},className:"rounded-2xl border border-border bg-card p-6",children:[s.jsxs("div",{className:"mb-4 flex items-center gap-3",children:[s.jsx("div",{className:"rounded-full bg-primary/10 p-2",children:s.jsx(YE,{className:"h-5 w-5 text-primary"})}),s.jsxs("div",{children:[s.jsx("h2",{className:"text-lg font-semibold",children:"Appearance"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Customize the look and feel"})]})]}),s.jsx("div",{className:"space-y-4",children:s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{children:"Theme"}),s.jsx("div",{className:"grid gap-3 sm:grid-cols-3",children:Fwe.map(ae=>{const At=ae.icon;return s.jsxs("button",{onClick:()=>Pr(ae.id),className:K("flex items-center gap-3 rounded-lg border p-4 text-left transition-all",L===ae.id?"border-primary bg-primary/5 ring-1 ring-primary":"border-border hover:border-primary/50"),children:[s.jsx("div",{className:K("rounded-full p-2",L===ae.id?"bg-primary/10":"bg-muted"),children:s.jsx(At,{className:K("h-4 w-4",L===ae.id?"text-primary":"text-muted-foreground")})}),s.jsxs("div",{children:[s.jsx("div",{className:"font-medium",children:ae.name}),s.jsx("div",{className:"text-xs text-muted-foreground",children:ae.description})]})]},ae.id)})})]})})]}),s.jsx(bwe,{}),s.jsx(H7,{}),s.jsxs(fe.section,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.1},className:"rounded-2xl border border-border bg-card p-6",children:[s.jsxs("div",{className:"mb-4 flex items-center gap-3",children:[s.jsx("div",{className:"rounded-full bg-accent/10 p-2",children:s.jsx(YE,{className:"h-5 w-5 text-accent"})}),s.jsxs("div",{children:[s.jsx("h2",{className:"text-lg font-semibold",children:"Default Content Preferences"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Pre-fill PostPRO with your favorites"})]})]}),s.jsxs("div",{className:"space-y-5",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{children:"Default Platform"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:Iwe.map(ae=>s.jsx("button",{onClick:()=>S(ae.id),className:K("rounded-lg px-3 py-1.5 text-sm font-medium transition-all",j===ae.id?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"),children:ae.name},ae.id))})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{children:"Default Tone"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:Mwe.map(ae=>s.jsx("button",{onClick:()=>C(ae.id),className:K("rounded-lg px-3 py-1.5 text-sm font-medium transition-all",N===ae.id?"bg-accent text-accent-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"),children:ae.name},ae.id))})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{children:"Default Goal"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:Dwe.map(ae=>s.jsx("button",{onClick:()=>O(ae.id),className:K("rounded-lg px-3 py-1.5 text-sm font-medium transition-all",M===ae.id?"bg-success text-success-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"),children:ae.name},ae.id))})]}),s.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-accent/50 bg-accent/10 p-3",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(Se,{className:"h-4 w-4 text-accent"}),s.jsxs("div",{children:[s.jsx(X,{className:"text-sm",children:"Include TrendsPRO by default"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Auto-enable trend variations"})]})]}),s.jsx(un,{checked:D,onCheckedChange:$})]}),s.jsxs(z,{onClick:Tr,disabled:H,children:[H?s.jsx(ce,{className:"mr-2 h-4 w-4 animate-spin"}):s.jsx(ri,{className:"mr-2 h-4 w-4"}),"Save Preferences"]})]})]}),s.jsxs(fe.section,{initial:{opacity:0,y:10}
4176,animate:{opacity:1,y:0},transition:{delay:.2},className:"rounded-2xl border border-border bg-card p-6",children:[s.jsxs("div",{className:"mb-4 flex items-center gap-3",children:[s.jsx("div",{className:"rounded-full bg-primary/10 p-2",children:s.jsx(Ms,{className:"h-5 w-5 text-primary"})}),s.jsxs("div",{children:[s.jsx("h2",{className:"text-lg font-semibold",children:"AI Behavior"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Fine-tune how posts are generated"})]})]}),s.jsxs("div",{className:"space-y-5",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{children:"Output Length"}),s.jsx("div",{className:"grid gap-2 sm:grid-cols-3",children:$we.map(ae=>s.jsxs("button",{onClick:()=>I(ae.id),className:K("rounded-lg border p-3 text-left transition-all",R===ae.id?"border-primary bg-primary/5":"border-border hover:border-primary/50"),children:[s.jsx("div",{className:"font-medium",children:ae.name}),s.jsx("div",{className:"text-xs text-muted-foreground",children:ae.description})]},ae.id))})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{children:"Boldness Level"}),s.jsx("div",{className:"grid gap-2 sm:grid-cols-3",children:Lwe.map(ae=>s.jsxs("button",{onClick:()=>A(ae.id),className:K("rounded-lg border p-3 text-left transition-all",P===ae.id?"border-accent bg-accent/5":"border-border hover:border-accent/50"),children:[s.jsx("div",{className:"font-medium",children:ae.name}),s.jsx("div",{className:"text-xs text-muted-foreground",children:ae.description})]},ae.id))})]}),s.jsxs(z,{onClick:kn,disabled:H,children:[H?s.jsx(ce,{className:"mr-2 h-4 w-4 animate-spin"}):s.jsx(ri,{className:"mr-2 h-4 w-4"}),"Save AI Settings"]})]})]}),s.jsxs(fe.section,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.25},className:"rounded-2xl border border-border bg-card p-6",children:[s.jsxs("div",{className:"mb-4 flex items-center gap-3",children:[s.jsx("div",{className:"rounded-full bg-emerald-500/10 p-2",children:s.jsx(li,{className:"h-5 w-5 text-emerald-500"})}),s.jsxs("div",{children:[s.jsx("h2",{className:"text-lg font-semibold",children:"ClickPRO Automation"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:u?"ClickPRO is active. You can pause or adjust future posts at any time.":"Set up your 52-week evergreen content from the dashboard."})]})]}),u?s.jsxs("div",{className:"space-y-4",children:[d>=30&&s.jsxs("div",{className:"flex items-start gap-3 rounded-lg border border-primary/30 bg-primary/5 p-4",children:[s.jsx(Se,{className:"h-5 w-5 text-primary mt-0.5 shrink-0"}),s.jsxs("div",{children:[s.jsx("div",{className:"font-semibold text-primary text-sm",children:"InsightPRO is ready to take over"}),s.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"You've published 30+ posts — InsightPRO now has enough performance data to begin adaptive scheduling. Your content strategy will automatically improve each week."})]})]}),s.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-border p-4",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:K("h-2 w-2 rounded-full",f?"bg-amber-500":"bg-emerald-500 animate-pulse")}),s.jsxs("div",{children:[s.jsx("div",{className:"font-medium",children:f?"Paused":"Active"}),s.jsxs("div",{className:"text-sm text-muted-foreground",children:[d," posts · Started ",h?ge(new Date(h+"T00:00:00"),"MMM d, yyyy"):""]})]})]}),f?s.jsxs(z,{variant:"outline",size:"sm",onClick:et,children:[s.jsx(mJ,{className:"mr-2 h-4 w-4"}),"Resume"]}):s.jsxs(z,{variant:"outline",size:"sm",onClick:$e,children:[s.jsx(fJ,{className:"mr-2 h-4 w-4"}),"Pause"]})]}),s.jsxs("div",{className:"rounded-lg border border-border p-4 space-y-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(pr,{className:"h-4 w-4 text-muted-foreground"}),s.jsx(X,{className:"text-sm font-medium",children:"Edit Posting Schedule"})]}),s.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx(X,{className:"text-xs text-muted-foreground",children:"Posting Day"}),s.jsxs(jt,{value:Y,onValueChange:oe,children:[s.jsx(mt,{className:"h-9",children:s.jsx(Ct,{})}),s.jsx(gt,{children:["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].map(ae=>s.jsx(Ee,{value:ae,children:ae.charAt(0).toUpperCase()+ae.slice(1)},ae))})]})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx(X,{className:"text-xs text-muted-foreground",children:"Posting Time"}),s.jsxs(jt,{value:Q,onValueChange:J,children:[s.jsx(mt,{className:"h-9",children:s.jsx(Ct,{})}),s.jsx(gt,{children:["06:00","07:00","08:00","09:00","10:00","11:00","12:00","13:00","14:00","15:00","16:00","17:00","18:00","19:00","20:00"].map(ae=>s.jsx(Ee,{value:ae,children:ae},ae))})]})]})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx(X,{className:"text-xs text-muted-foreground",children:"Reschedule from date (optional)"}),s.jsxs(Og,{open:q,onOpenChange:U,children:[s.jsx(Rg,{asChild:!0,children:s.jsxs(z,{variant:"outline",size:"sm",className:K("w-full justify-start text-left font-normal h-9",!ue&&"text-muted-foreground"),children:[s.jsx(Mn,{className:"mr-2 h-4 w-4"}),ue?ge(ue,"MMM d, yyyy"):"Leave unchanged"]})}),s.jsxs(Kh,{className:"w-auto p-0",align:"start",children:[s.jsx(Xh,{mode:"single",selected:ue,onSelect:ae=>{re(ae),U(!1)},disabled:ae=>ae<new Date,initialFocus:!0,className:"p-3 pointer-events-auto"}),ue&&s.jsx("div",{className:"p-2 border-t",children:s.jsx(z,{variant:"ghost",size:"sm",className:"w-full",onClick:()=>re(void 0),children:"Clear date"})})]})]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"If set, all future posts will be redistributed weekly starting from this date."})]}),s.jsxs(z,{size:"sm",onClick:Ot,disabled:ve,children:[ve?s.jsx(ce,{className:"mr-2 h-4 w-4 animate-spin"}):s.jsx($t,{className:"mr-2 h-4 w-4"}),"Save Schedule Changes"]})]}),s.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-destructive/30 bg-destructive/5 p-3",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(Jc,{className:"h-4 w-4 text-destructive"}),s.jsxs("div",{children:[s.jsx(X,{className:"text-sm",children:"Remove ClickPRO Automation"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Stops future posts only"})]})]}),s.jsxs(m0,{children:[s.jsx(k7,{asChild:!0,children:s.jsx(z,{variant:"destructive",size:"sm",disabled:Z,children:Z?s.jsx(ce,{className:"h-4 w-4 animate-spin"}):"Remove"})}),s.jsxs(Fg,{children:[s.jsxs(Bg,{children:[s.jsx(qg,{children:"Remove ClickPRO automation?"}),s.jsx(Ug,{children:"This will stop future scheduled posts. Past posts will not be affected. You can set up ClickPRO again from the dashboard."})]}),s.jsxs(Wg,{children:[s.jsx(Hg,{children:"Cancel"}),s.jsx(zg,{onClick:bt,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Remove Automation"})]})]})]})]})]}):s.jsxs("div",{className:"rounded-lg border border-dashed border-muted-foreground
4176/30 p-6 text-center",children:[s.jsx(li,{className:"mx-auto h-8 w-8 text-muted-foreground/50 mb-2"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"ClickPRO is not set up yet. Go to the dashboard to activate your 52-week content plan."})]})]}),s.jsxs(fe.section,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.3},className:"rounded-2xl border border-border bg-card p-6",children:[s.jsxs("div",{className:"mb-4 flex items-center gap-3",children:[s.jsx("div",{className:"rounded-full bg-accent/10 p-2",children:s.jsx(Tn,{className:"h-5 w-5 text-accent"})}),s.jsxs("div",{children:[s.jsx("h2",{className:"text-lg font-semibold",children:"TrendsPRO Automation"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Configure TrendsPRO behavior"})]})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-border p-3",children:[s.jsxs("div",{children:[s.jsx(X,{className:"text-sm",children:"Auto-Post Trends"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Automatically post trend content without review"})]}),s.jsx(un,{disabled:!0})]}),s.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-border p-3",children:[s.jsxs("div",{children:[s.jsx(X,{className:"text-sm",children:"Quick Quizzes"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Include quiz-style posts for engagement"})]}),s.jsx(un,{defaultChecked:!0,disabled:!0})]}),s.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-border p-3",children:[s.jsxs("div",{children:[s.jsx(X,{className:"text-sm",children:"Behavioral Insights"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Include psychology-based insights for smarter communication"})]}),s.jsx(un,{disabled:!0})]}),s.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-border p-3",children:[s.jsxs("div",{children:[s.jsx(X,{className:"text-sm",children:"Life Hacks"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Include life hack tips in automation"})]}),s.jsx(un,{disabled:!0})]}),s.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-border p-3",children:[s.jsxs("div",{children:[s.jsx(X,{className:"text-sm",children:"Still Relevant Today"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Include timeless insights and lessons"})]}),s.jsx(un,{disabled:!0})]}),s.jsx("p",{className:"text-xs text-muted-foreground text-center pt-2",children:"Full automation settings coming soon. Configure basic options in PostPRO → TrendsPRO."})]})]}),s.jsxs(fe.section,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.28},className:"rounded-2xl border border-border bg-card p-6",children:[s.jsxs("div",{className:"mb-4 flex items-center gap-3",children:[s.jsx("div",{className:"rounded-full bg-primary/10 p-2",children:s.jsx(dr,{className:"h-5 w-5 text-primary"})}),s.jsxs("div",{children:[s.jsx("h2",{className:"text-lg font-semibold",children:"Blog Contact Info"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Auto-include your contact details in blog posts"})]})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-border p-3",children:[s.jsxs("div",{children:[s.jsx(X,{className:"text-sm",children:"Include contact info in blog posts"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:`Adds a "Let's Talk" section at the end of each post`})]}),s.jsx(un,{checked:Le,onCheckedChange:He})]}),Le&&s.jsxs("div",{className:"space-y-3 pl-2",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx(X,{htmlFor:"contactBusiness",className:"text-sm",children:"Business Name"}),s.jsx(ze,{id:"contactBusiness",value:vt,onChange:ae=>lt(ae.target.value),placeholder:"Your Business Name"})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx(X,{htmlFor:"contactPhone",className:"text-sm",children:"Phone"}
4176),s.jsx(ze,{id:"contactPhone",value:Pt,onChange:ae=>te(ae.target.value),placeholder:"(555) 123-4567"})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx(X,{htmlFor:"contactEmailField",className:"text-sm",children:"Email"}),s.jsx(ze,{id:"contactEmailField",value:ne,onChange:ae=>ye(ae.target.value),placeholder:"[email protected]"})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx(X,{htmlFor:"contactWebsite",className:"text-sm",children:"Website"}),s.jsx(ze,{id:"contactWebsite",value:Ge,onChange:ae=>st(ae.target.value),placeholder:"https://yoursite.com"})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx(X,{htmlFor:"contactCta",className:"text-sm",children:"CTA Button Text"}),s.jsx(ze,{id:"contactCta",value:Ie,onChange:ae=>St(ae.target.value),placeholder:"Contact Me"})]})]}),s.jsxs(z,{onClick:async()=>{G(!0),await i({contact_injection_enabled:Le,contact_business_name:vt||null,contact_phone:Pt||null,contact_email:ne||null,contact_website:Ge||null,contact_cta_text:Ie||"Contact Me"}),G(!1)},disabled:H,children:[H?s.jsx(ce,{className:"mr-2 h-4 w-4 animate-spin"}):s.jsx(ri,{className:"mr-2 h-4 w-4"}),"Save Contact Settings"]})]})]}),s.jsxs(fe.section,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.29},className:"rounded-2xl border border-border bg-card p-6",children:[s.jsxs("div",{className:"mb-4 flex items-center gap-3",children:[s.jsx("div",{className:"rounded-full bg-primary/10 p-2",children:s.jsx(dr,{className:"h-5 w-5 text-primary"})}),s.jsxs("div",{children:[s.jsx("h2",{className:"text-lg font-semibold",children:"Blog Lead Capture"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Embed a lead form on every blog post"})]})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-border p-3",children:[s.jsxs("div",{children:[s.jsx(X,{className:"text-sm",children:"Enable Lead Capture on Blog Posts"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Adds a CTA and contact form below every blog post"})]}),s.jsx(un,{checked:qr,onCheckedChange:qe})]}),qr&&s.jsx("div",{className:"space-y-3 pl-2",children:s.jsxs("div",{className:"space-y-1",children:[s.jsx(X,{htmlFor:"defaultCtaBtn",className:"text-sm",children:"Custom Default CTA Button Text (optional)"}),s.jsx(ze,{id:"defaultCtaBtn",value:ln,onChange:ae=>Tt(ae.target.value),placeholder:"Leave blank for auto-generated CTA"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Overrides the AI-generated CTA button text on all new posts"})]})}),s.jsxs(z,{onClick:async()=>{G(!0),await i({lead_capture_enabled:qr,default_cta_button_text:ln||null}),G(!1)},disabled:H,children:[H?s.jsx(ce,{className:"mr-2 h-4 w-4 animate-spin"}):s.jsx(ri,{className:"mr-2 h-4 w-4"}),"Save Lead Capture Settings"]})]})]}),s.jsxs(fe.section,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.3},className:"rounded-2xl border border-border bg-card p-6",children:[s.jsxs("div",{className:"mb-4 flex items-center gap-3",children:[s.jsx("div",{className:"rounded-full bg-success/10 p-2",children:s.jsx(zQ,{className:"h-5 w-5 text-success"})}),s.jsxs("div",{children:[s.jsx("h2",{className:"text-lg font-semibold",children:"Notifications"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Manage your notification preferences"})]})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-border p-3",children:[s.jsxs("div",{children:[s.jsx(X,{className:"text-sm",children:"Daily TrendsPRO Reminder"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Get notified about today's trending day"})]}),s.jsx(un,{checked:E,onCheckedChange:T})]}),s.jsxs(z,{onClick:_a,disabled:H,children:[H?s.jsx(ce,{className:"mr-2 h-4 w-4 animate-spin"}):s.jsx(ri,{className:"mr-2 h-4 w-4"}),"Save Notifications"]})]})]}),s.jsxs(fe.section,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.4},className:"rounded-2xl border border-border bg-card p-6",children:[s.jsxs("div",{className:"mb-4 flex items-center gap-3",children:[s.jsx("div",{className:"rounded-full bg-muted p-2",children:s.jsx(dj,{className:"h-5 w-5 text-muted-foreground"})}),s.jsxs("div",{children:[s.jsx("h2",{className:"text-lg font-semibold",children:"Account"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Manage your subscription and billing"})]})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-border p-3",children:[s.jsxs("div",{children:[s.jsx("div",{className:"font-medium",children:"Current Plan"}),s.jsx("div",{className:"text-sm text-muted-foreground",children:"Free Tier"})]}),s.jsxs(z,{variant:"outline",disabled:!0,children:[s.jsx(kl,{className:"mr-2 h-4 w-4"}),"Upgrade Plan"]})]}),s.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-border p-3 opacity-60",children:[s.jsxs("div",{children:[s.jsx("div",{className:"font-medium",children:"Billing"}),s.jsx("div",{className:"text-sm text-muted-foreground",children:"Manage payment methods"})]}),s.jsxs(z,{variant:"outline",disabled:!0,children:[s.jsx(kl,{className:"mr-2 h-4 w-4"}),"Coming Soon"]})]}),s.jsx(ou,{className:"my-4"}),s.jsxs(z,{variant:"outline",onClick:Yt,className:"w-full sm:w-auto",children:[s.jsx(fj,{className:"mr-2 h-4 w-4"}),"Sign Out"]})]})]}),s.jsxs(fe.section,{initial:{opacity:0,y:10}
4176,animate:{opacity:1,y:0},transition:{delay:.5},className:"rounded-2xl border border-destructive/30 bg-destructive/5 p-6",children:[s.jsxs("div",{className:"mb-4 flex items-center gap-3",children:[s.jsx("div",{className:"rounded-full bg-destructive/10 p-2",children:s.jsx(GF,{className:"h-5 w-5 text-destructive"})}),s.jsxs("div",{children:[s.jsx("h2",{className:"text-lg font-semibold text-destructive",children:"Danger Zone"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Irreversible actions for your account"})]})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"rounded-lg border border-destructive/20 bg-background p-4",children:s.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium",children:"Delete Account & All Data"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Permanently delete your account and all associated data including posts, schedules, and connected accounts."})]}),s.jsx(Awe,{})]})}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:["For more information about data deletion, please see our"," ",s.jsx(Oe,{to:"/data-deletion",className:"text-primary hover:underline",children:"Data Deletion Instructions"}),"."]})]})]})]})}function Wwe(){return s.jsxs(hr,{title:"Settings",description:"Manage your account and preferences",children:[s.jsx(ar,{title:"Settings – Account & Preferences | SociePRO AI",description:"Manage your SociePRO AI account settings, preferences, connected social accounts, and AI behavior customization.",keywords:"account settings, preferences, social media connections, AI settings",canonicalUrl:"https://sociepro.ai/settings",jsonLd:Jw("Settings","Account and preferences management")}),s.jsx(Bwe,{})]})}const so=g.forwardRef(({className:e,...t},n)=>s.jsx("div",{className:"relative w-full overflow-auto",children:s.jsx("table",{ref:n,className:K("w-full caption-bottom text-sm",e),...t})}));so.displayName="Table";const io=g.forwardRef(({className:e,...t},n)=>s.jsx("thead",{ref:n,className:K("[&_tr]:border-b",e),...t}));io.displayName="TableHeader";const oo=g.forwardRef(({className:e,...t},n)=>s.jsx("tbody",{ref:n,className:K("[&_tr:last-child]:border-0",e),...t}));oo.displayName="TableBody";const qwe=g.forwardRef(({className:e,...t},n)=>s.jsx("tfoot",{ref:n,className:K("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));qwe.displayName="TableFooter";const Bn=g.forwardRef(({className:e,...t},n)=>s.jsx("tr",{ref:n,className:K("border-b transition-colors data-[state=selected]:bg-muted hover:bg-muted/50",e),...t}));Bn.displayName="TableRow";const tt=g.forwardRef(({className:e,...t},n)=>s.jsx("th",{ref:n,className:K("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));tt.displayName="TableHead";const Qe=g.forwardRef(({className:e,...t},n)=>s.jsx("td",{ref:n,className:K("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));Qe.displayName="TableCell";const Uwe=g.forwardRef(({className:e,...t},n)=>s.jsx("caption",{ref:n,className:K("mt-4 text-sm text-muted-foreground",e),...t}));Uwe.displayName="TableCaption";const wM={realtor:{model:"Short Cycle",description:"Clicks, leads, CTA engagement"},financial_advisor:{model:"Long Cycle",description:"Repeat exposure, profile revisits, delayed clicks"},builder_remodeler:{model:"Project Cycle",description:"Lead nurturing, showroom visits, consultation requests"},insurance:{model:"Policy Cycle",description:"Quote requests, policy renewals, referrals"},property_manager:{model:"Lease Cycle",description:"Tenant inquiries, lease renewals, property views"},host:{model:"Booking Cycle",description:"Booking inquiries, guest reviews, occupancy tracking"},restaurantpro:{model:"Visit Cycle",description:"Reservations, walk-ins, repeat visits"},creator:{model:"Engagement Cycle",description:"Followers, shares, brand deals"},side_hustle:{model:"Growth Cycle",description:"Sign-ups, sales, referrals"},personal:{model:"Engagement Cycle",description:"Likes, comments, shares"},authoritypro:{model:"Authority Cycle",description:"Thought leadership, category positioning, executive reach"}};function zwe({module:e,userAccess:t,onToggle:n,userId:r,disabled:a=!1}){const[i,o]=g.useState(!1),l=(t==null?void 0:t.is_enabled)??!1,c=wM[e.slug]||wM.realtor,u=async h=>{o(!0);try{await n(e.slug,h)}finally{o(!1)}};return s.jsx(he,{className:`transition-all ${l?"border-primary/30 bg-primary/5":"opacity-75"}`,children:s.jsx(pe,{className:"p-4",children:s.jsxs("div",{className:"flex items-start justify-between gap-4",children:[s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("div",{className:"p-2 rounded-lg bg-muted",children:(()=>{const h=xi[e.slug];if(h){const d=h.icon;return s.jsx(d,{className:"h-5 w-5 text-primary"})}return null})()}),s.jsxs("div",{className:"space-y-1",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"font-semibold",children:e.name}),s.jsx(je,{variant:e.is_active?"default":"outline",className:"text-xs",children:e.is_active?"Platform Active":"Coming Soon"}),e.pricing_tier!=="base"&&s.jsx(je,{variant:"secondary",className:"text-xs",children:e.pricing_tier})]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:e.description}),s.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[s.jsx(je,{variant:"outline",className:"text-xs bg-background",children:c.model}),s.jsx("span",{className:"text-xs text-muted-foreground",children:c.description})]})]})]}),s.jsx("div",{className:"flex items-center gap-2",children:i?s.jsx(ce,{className:"h-4 w-4 animate-spin"}):s.jsx(un,{checked:l,onCheckedChange:u,disabled:a||!e.is_active})})]})})})}const _M={standard:{label:"Standard",color:"bg-emerald-500/10 text-emerald-600 border-emerald-500/20",features:["Basic content guidelines","Optional disclosures"]}
4176,strict:{label:"Strict",color:"bg-amber-500/10 text-amber-600 border-amber-500/20",features:["Mandatory disclosures","Rate/fee restrictions","Compliance review queue"]},hipaa:{label:"HIPAA",color:"bg-red-500/10 text-red-600 border-red-500/20",features:["PHI protection","Audit logging","Restricted language filters","Mandatory consent"]}};function kM({moduleSlug:e,complianceMode:t,flags:n=[]}){const r=_M[t]||_M.standard,a=n.filter(i=>!i.is_resolved);return s.jsxs(he,{children:[s.jsx(Ce,{className:"pb-3",children:s.jsxs(Pe,{className:"text-lg flex items-center gap-2",children:[s.jsx(Ea,{className:"h-5 w-5 text-primary"}),"Compliance Layer",s.jsx(je,{className:r.color,children:r.label})]})}),s.jsxs(pe,{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{className:"text-sm text-muted-foreground",children:"Active Features"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:r.features.map(i=>s.jsx(je,{variant:"outline",className:"text-xs",children:i},i))})]}),s.jsxs("div",{className:"space-y-3 pt-2 border-t border-border",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(dr,{className:"h-4 w-4 text-muted-foreground"}),s.jsx(X,{className:"text-sm",children:"Require Disclosure Text"})]}),s.jsx(un,{defaultChecked:t!=="standard"})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Ei,{className:"h-4 w-4 text-muted-foreground"}),s.jsx(X,{className:"text-sm",children:"Content Audit Logging"})]}),s.jsx(un,{defaultChecked:t==="hipaa"})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Bs,{className:"h-4 w-4 text-muted-foreground"}),s.jsx(X,{className:"text-sm",children:"Disallowed Language Filter"})]}),s.jsx(un,{defaultChecked:t!=="standard"})]})]}),a.length>0&&s.jsxs("div",{className:"space-y-2 pt-2 border-t border-border",children:[s.jsxs(X,{className:"text-sm text-muted-foreground flex items-center gap-2",children:[s.jsx(Bs,{className:"h-4 w-4 text-amber-500"}),"Unresolved Flags (",a.length,")"]}),s.jsx("div",{className:"space-y-2",children:a.slice(0,3).map(i=>s.jsxs("div",{className:"text-sm p-2 rounded bg-amber-500/10 border border-amber-500/20",children:[s.jsx("span",{className:"font-medium",children:i.flag_type}),s.jsxs("span",{className:"text-muted-foreground",children:[" - ",i.flag_reason]})]},i.id))})]})]})]})}const Hwe={national_day:hg,behavioral_insight:Ms,still_relevant_today:pr,life_hack:qp};function Vwe(){const[e,t]=g.useState(!0),[n,r]=g.useState(!1),[a,i]=g.useState(null),[o,l]=g.useState([]),[c,u]=g.useState({});g.useEffect(()=>{h()},[]);const h=async()=>{try{const{data:f}=await W.from("trendspro_config").select("config_value, last_updated_at").eq("config_key","master_system_prompt").single();if(f){const y=f.config_value;l(y.active_topics||[]),i(f.last_updated_at)}const{data:p}=await W.from("trendspro_config").select("config_value").eq("config_key","topic_definitions").single();p&&u(p.config_value)}catch(f){console.error("Failed to load TrendsPRO config:",f)}finally{t(!1)}},d=async()=>{r(!0);try{const{data:{session:f}}=await W.auth.getSession();if(!f){_t.error("Not authenticated");return}const p=await fetch("https://hgnuynazdzzocuwtwiez.supabase.co/functions/v1/admin-refresh-trends",{method:"POST",headers:{Authorization:`Bearer ${f.access_token}`,"Content-Type":"application/json"}}),y=await p.json();if(!p.ok)throw new Error(y.error||"Failed to refresh");i(y.last_updated_at),l(y.active_topics),_t.success("TrendsPRO configuration refreshed",{description:"Master prompt and topic definitions updated."}),await h()}catch(f){console.error("Refresh error:",f),_t.error("Failed to refresh TrendsPRO configuration")}finally{r(!1)}};return e?s.jsx(he,{children:s.jsx(pe,{className:"flex items-center justify-center py-8",children:s.jsx(Bt,{className:"h-5 w-5 animate-spin text-muted-foreground"})})}):s.jsxs(he,{className:"border-primary/20",children:[s.jsx(Ce,{className:"pb-3",children:s.jsxs(Pe,{className:"text-lg flex items-center gap-2",children:[s.jsx(Se,{className:"h-5 w-5 text-primary"}
4176),"TrendsPRO Configuration",s.jsx(je,{variant:"outline",className:"ml-2 text-xs",children:"AI-Powered"})]})}),s.jsxs(pe,{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between text-sm",children:[s.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[s.jsx(pr,{className:"h-4 w-4"}),s.jsx("span",{children:"Last refreshed:"})]}),s.jsx("span",{className:"font-medium text-foreground",children:a?ge(new Date(a),"MMM d, yyyy 'at' h:mm a"):"Never"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx(VF,{className:"h-4 w-4"}),s.jsx("span",{children:"Active Topics"})]}),s.jsx("div",{className:"grid grid-cols-2 gap-2",children:Object.entries(c).map(([f,p])=>{const y=Hwe[f]||Se,m=o.includes(f);return s.jsxs("div",{className:`flex items-center gap-2 p-2 rounded-lg border ${m?"bg-primary/5 border-primary/30":"bg-muted/30 border-border opacity-50"}`,children:[s.jsx(y,{className:`h-4 w-4 ${m?"text-primary":"text-muted-foreground"}`}),s.jsx("span",{className:"text-sm font-medium truncate",children:p.name}),m&&s.jsx($t,{className:"h-3 w-3 text-primary ml-auto"})]},f)})})]}),s.jsx("div",{className:"rounded-lg bg-muted/50 p-3 border border-border",children:s.jsxs("div",{className:"flex items-start gap-2",children:[s.jsx(Ai,{className:"h-4 w-4 text-muted-foreground mt-0.5"}),s.jsxs("div",{className:"text-xs text-muted-foreground space-y-1",children:[s.jsxs("p",{children:[s.jsx("strong",{children:"Refreshing"})," updates the master AI prompt and topic rules."]}),s.jsx("p",{children:'No trends are generated until users click "New Trend" in their dashboard.'})]})]})}),s.jsx(z,{onClick:d,disabled:n,className:"w-full",children:n?s.jsxs(s.Fragment,{children:[s.jsx(Bt,{className:"h-4 w-4 animate-spin mr-2"}),"Refreshing Configuration..."]}):s.jsxs(s.Fragment,{children:[s.jsx(Bt,{className:"h-4 w-4 mr-2"}),"Refresh Trends System"]})})]})]})}const Gwe=[{value:"pro",label:"Pro (Full Access)"},{value:"starter",label:"Starter"},{value:"enterprise",label:"Enterprise"}],Ywe=[{value:"none",label:"None (assign later)"},{value:"realtor",label:"RealtorPRO"},{value:"insurance",label:"InsuranceAgentPRO"},{value:"financial_advisor",label:"FinancialAdvisorPRO"},{value:"property_manager",label:"PropertyManagerPRO"},{value:"builder_remodeler",label:"Homebuilder/RemodelerPRO"},{value:"host",label:"HostPRO"},{value:"restaurantpro",label:"RestaurantPRO"},{value:"mortgage",label:"MortgagePRO"},{value:"freelance_consultant",label:"FreelanceConsultantPRO"},{value:"creator",label:"CreatorPRO"},{value:"side_hustle",label:"SideHustlePRO"},{value:"personal",label:"PersonalPRO"},{value:"personal_trainer",label:"PersonalTrainerPRO"},{value:"course_coach",label:"CourseCoachPRO"}],Kwe=[{value:"US",label:"United States"},{value:"IN",label:"India"},{value:"UK",label:"United Kingdom"},{value:"CA",label:"Canada"},{value:"AU",label:"Australia"}],Xwe=()=>{const[e,t]=g.useState(""),[n,r]=g.useState(""),[a,i]=g.useState(""),[o,l]=g.useState("pro"),[c,u]=g.useState("none"),[h,d]=g.useState("US"),[f,p]=g.useState(!1),[y,m]=g.useState(null),v=async()=>{if(!e||!n){_t.error("Email and password are required");return}if(n.length<6){_t.error("Password must be at least 6 characters");return}p(!0),m(null);try{const{data:{session:b}}=await W.auth.getSession();if(!b){_t.error("You must be logged in as an admin");return}const x=await W.functions.invoke("admin-provision-user",{body:{email:e,password:n,displayName:a||void 0,tier:o,moduleSlug:c==="none"?void 0:c,market:h}});if(x.error)throw new Error(x.error.message||"Failed to provision user");const w=x.data;if(w.error)throw new Error(w.error);m({email:w.user.email,id:w.user.id}),_t.success(`User ${w.user.email} created with ${o} tier`),t(""),r(""),i(""),u("none")}catch(b){console.error("Provision error:",b),_t.error(b.message||"Failed to provision user")}finally{p(!1)}};return s.jsxs(he,{children:[s.jsx(Ce,{children:s.jsxs(Pe,{className:"text-lg flex items-center gap-2",children:[s.jsx(mj,{className:"h-5 w-5 text-primary"}),"Provision New User"]})}),s.jsxs(pe,{className:"space-y-4",children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:"Create a fully provisioned user account with an active subscription — no payment required."}),s.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{htmlFor:"prov-email",children:"Email *"}
4176),s.jsx(ze,{id:"prov-email",type:"email",value:e,onChange:b=>t(b.target.value),placeholder:"[email protected]"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{htmlFor:"prov-password",children:"Password *"}),s.jsx(ze,{id:"prov-password",type:"password",value:n,onChange:b=>r(b.target.value),placeholder:"Min 6 characters"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{htmlFor:"prov-name",children:"Display Name"}),s.jsx(ze,{id:"prov-name",value:a,onChange:b=>i(b.target.value),placeholder:"Optional"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{children:"Subscription Tier"}),s.jsxs(jt,{value:o,onValueChange:l,children:[s.jsx(mt,{children:s.jsx(Ct,{})}),s.jsx(gt,{children:Gwe.map(b=>s.jsx(Ee,{value:b.value,children:b.label},b.value))})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{children:"Module"}),s.jsxs(jt,{value:c,onValueChange:u,children:[s.jsx(mt,{children:s.jsx(Ct,{placeholder:"Select module"})}),s.jsx(gt,{children:Ywe.map(b=>s.jsx(Ee,{value:b.value,children:b.label},b.value))})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{children:"Market"}),s.jsxs(jt,{value:h,onValueChange:d,children:[s.jsx(mt,{children:s.jsx(Ct,{})}),s.jsx(gt,{children:Kwe.map(b=>s.jsx(Ee,{value:b.value,children:b.label},b.value))})]})]})]}),s.jsx(z,{onClick:v,disabled:f||!e||!n,className:"w-full sm:w-auto",children:f?s.jsxs(s.Fragment,{children:[s.jsx(ce,{className:"mr-2 h-4 w-4 animate-spin"}),"Creating…"]}):s.jsxs(s.Fragment,{children:[s.jsx(mj,{className:"mr-2 h-4 w-4"}),"Create User"]})}),y&&s.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-emerald-500/30 bg-emerald-500/10 p-3 text-sm",children:[s.jsx($t,{className:"h-4 w-4 text-emerald-600"}),s.jsxs("span",{className:"text-emerald-700 dark:text-emerald-400",children:["Created ",s.jsx("strong",{children:y.email})," — ID: ",s.jsx("code",{className:"text-xs",children:y.id})]})]})]})]})},Qwe=[{value:"free",label:"Free"},{value:"starter",label:"Starter"},{value:"pro",label:"Pro"},{value:"enterprise",label:"Enterprise (incl. Market Dominance)"}];function Jwe({userId:e,email:t,currentTier:n,adminUserId:r,onUpdated:a}){var D;const[i,o]=g.useState(n),[l,c]=g.useState(!1),[u,h]=g.useState([]),[d,f]=g.useState({}),[p,y]=g.useState(!0),[m,v]=g.useState({}),[b,x]=g.useState(""),[w,_]=g.useState(null),[k,j]=g.useState(!1);g.useEffect(()=>{o(n)},[n,e]);const S=async()=>{const[{data:$,error:R},{data:I,error:P}]=await Promise.all([W.from("courses").select("id, slug, vertical_name, status").eq("is_active",!0).order("status",{ascending:!1}).order("slug"),W.from("user_course_entitlements").select("course_id, source, is_enabled").eq("user_id",e)]);R&&(console.error("Error loading courses:",R),_t.error("Failed to load course list")),P&&(console.error("Error loading entitlements:",P),_t.error("Failed to load course entitlements")),h($??[]);const A={};for(const E of I??[])A[E.course_id]={source:E.source,is_enabled:E.is_enabled};f(A)};g.useEffect(()=>{let $=!1;return(async()=>{y(!0);const[,{data:I}]=await Promise.all([S(),W.from("user_module_access").select("module_slug").eq("user_id",e).eq("is_enabled",!0)]);if($)return;y(!1);const P=I&&I.length===1?I[0].module_slug:null;_(P),x(P??"")})(),()=>{$=!0}},[e]);const N=async()=>{c(!0);try{const{error:$}=await W.from("user_subscriptions").update({tier:i,status:"active",updated_at:new Date().toISOString()}).eq("user_id",e);if($)throw $;_t.success(`Tier updated to ${i} for ${t}`),a()}catch($){console.error("Error updating tier:",$),_t.error("Failed to update tier")}finally{c(!1)}},C=async($,R)=>{v(I=>({...I,[$.id]:R}));try{const{data:{session:I}}=await W.auth.getSession();if(!I){_t.error("You must be logged in as an admin");return}const P=await W.functions.invoke("admin-grant-course",{body:{userId:e,courseId:$.id,action:R}});if(P.error)throw new Error(P.error.message||`Failed to ${R} course`);const A=P.data;if(A!=null&&A.error)throw new Error(A.error);await S(),_t.success(R==="grant"?`Granted ${$.vertical_name} for ${t}`:`Revoked ${$.vertical_name} for ${t}`),a()}catch(I){console.error(`Error ${R}ing course ${$.slug}:`,I),_t.error(I instanceof Error?I.message:`Failed to ${R} course`)}finally{v(I=>{const P={...I};return delete P[$.id],P})}},M=async()=>{var $;if(b){j(!0);try{const R=new Date().toISOString(),{error:I}=await W.from("user_module_access").update({is_enabled:!1,updated_at:R}).eq("user_id",e).neq("module_slug",b);if(I)throw I;const{error:P}=await W.from("user_module_access").upsert({user_id:e,module_slug:b,is_enabled:!0,enabled_at:R,enabled_by:r,updated_at:R},{onConflict:"user_id,module_slug"});if(P)throw P;_(b);const A=(($=xi[b])==null?void 0:$.name)??b;_t.success(`Vertical set to ${A} for ${t}. Takes effect on their next session — if their browser already has a saved active vertical, they may need to switch it manually once.`),a()}catch(R){console.error("Error changing vertical:",R),_t.error("Failed to change vertical")}finally{j(!1)}}},O=u.filter($=>{var R;return(R=d[$.id])==null?void 0:R.is_enabled}).length;return s.jsxs(he,{className:"border-primary/20",children:[s.jsx(Ce,{className:"pb-3",children:s.jsxs(Pe,{className:"text-lg flex items-center gap-2",children:[s.jsx(hP,{className:"h-5 w-5 text-primary"}),"Account Actions — ",t]})}),s.jsxs(pe,{className:"space-y-6",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx("p",{className:"text-sm font-medium",children:"Subscription Tier"}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s.jsxs(jt,{value:i,onValueChange:o,children:[s.jsx(mt,{className:"w-[280px]",children:s.jsx(Ct,{})}),s.jsx(gt,{children:Qwe.map($=>s.jsx(Ee,{value:$.value,children:$.label},$.value))})]}),s.jsxs(z,{onClick:N,disabled:l||i===n,size:"sm",children:[l&&s.jsx(ce,{className:"h-4 w-4 animate-spin mr-2"}),"Save Tier"]}),s.jsxs("span",{className:"text-xs text-muted-foreground",children:["Current: ",s.jsx(je,{variant:"outline",children:n})]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("p",{className:"text-sm font-medium flex items-center gap-2",children:[s.jsx(oi,{className:"h-4 w-4"}
4176)," Course Access"]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Grant or revoke one course at a time. A Pro+ subscription already includes the course matching the user's active vertical automatically (see Active Vertical below) — use this only for individual comps/overrides, not as a full-library unlock."}),p?s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx(ce,{className:"h-4 w-4 animate-spin"})," Loading courses…"]}):s.jsxs("div",{className:"space-y-1.5",children:[s.jsxs("p",{className:"text-xs text-muted-foreground",children:[O," / ",u.length," granted"]}),u.map($=>{const R=d[$.id],I=!!(R!=null&&R.is_enabled),P=m[$.id];return s.jsxs("div",{className:"flex flex-wrap items-center gap-2 rounded-md border border-border/60 px-3 py-2",children:[s.jsx("span",{className:"text-sm font-medium min-w-[140px]",children:$.vertical_name}),s.jsx(je,{variant:$.status==="live"?"outline":"secondary",className:"text-[10px]",children:$.status==="live"?"live":"coming soon"}),s.jsxs(je,{variant:I?"default":"outline",className:"text-[10px] gap-1",children:[I?s.jsx(iJ,{className:"h-3 w-3"}):s.jsx(kl,{className:"h-3 w-3"}),I?`granted (${R.source})`:"not granted"]}),s.jsxs("div",{className:"ml-auto flex gap-2",children:[s.jsxs(z,{onClick:()=>C($,"grant"),disabled:!!P||I,size:"sm",variant:"secondary",children:[P==="grant"&&s.jsx(ce,{className:"h-3 w-3 animate-spin mr-1"}),"Grant"]}),s.jsxs(z,{onClick:()=>C($,"revoke"),disabled:!!P||!I,size:"sm",variant:"outline",children:[P==="revoke"&&s.jsx(ce,{className:"h-3 w-3 animate-spin mr-1"}),"Revoke"]})]})]},$.id)})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("p",{className:"text-sm font-medium flex items-center gap-2",children:[s.jsx(GQ,{className:"h-4 w-4"})," Active Vertical / Module"]}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s.jsxs(jt,{value:b,onValueChange:x,children:[s.jsx(mt,{className:"w-[280px]",children:s.jsx(Ct,{placeholder:"Select vertical"})}),s.jsx(gt,{children:Object.values(xi).map($=>s.jsx(Ee,{value:$.slug,children:$.name},$.slug))})]}),s.jsxs(z,{onClick:M,disabled:k||!b||b===w,size:"sm",children:[k&&s.jsx(ce,{className:"h-4 w-4 animate-spin mr-2"}),"Set Vertical"]}),w&&s.jsxs("span",{className:"text-xs text-muted-foreground",children:["Current: ",s.jsx(je,{variant:"outline",children:((D=xi[w])==null?void 0:D.name)??w})]})]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Disables all other modules for this user server-side. If their browser already has a saved active vertical, they may need to switch it manually once."})]})]})]})}const Zwe=[{value:"reddit",label:"Reddit"},{value:"x",label:"X (Twitter)"},{value:"linkedin",label:"LinkedIn"},{value:"other",label:"Other / Forum"}],e0e=[{value:"reply",label:"Reply to a thread/post"},{value:"original_post",label:"Original post"}],jM=["draft","posted","archived"],t0e={product_description:"",icp:"",differentiators:"",tone_guidelines:"",current_focus:""};function n0e({adminUserId:e,totalVisits:t,todayVisits:n,totalUsers:r,paidUsers:a}){const[i,o]=g.useState(null),[l,c]=g.useState(t0e),[u,h]=g.useState(!0),[d,f]=g.useState(!1),[p,y]=g.useState("reddit"),[m,v]=g.useState("reply"),[b,x]=g.useState(""),[w,_]=g.useState(""),[k,j]=g.useState(""),[S,N]=g.useState(""),[C,M]=g.useState(!1),[O,D]=g.useState(!1),[$,R]=g.useState([]),[I,P]=g.useState(!0),[A,E]=g.useState("all");g.useEffect(()=>{T(),L()},[]);const T=async()=>{h(!0);const{data:q}=await W.from("growth_brief").select("*").order("updated_at",{ascending:!1}).limit(1).maybeSingle();q&&(o(q),c({product_description:q.product_description||"",icp:q.icp||"",differentiators:q.differentiators||"",tone_guidelines:q.tone_guidelines||"",current_focus:q.current_focus||""})),h(!1)},L=async()=>{P(!0);const{data:q}=await W.from("growth_drafts").select("*").order("created_at",{ascending:!1}).limit(100);q&&R(q),P(!1)},B=async()=>{f(!0);try{const q={...l,updated_at:new Date().toISOString(),updated_by:e},{error:U}=i?await W.from("growth_brief").update(q).eq("id",i.id):await W.from("growth_brief").insert(q);if(U)throw U;_t.success("Company brief saved"),T()}catch(q){console.error("Save brief error:",q),_t.error(q.message||"Failed to save brief")}finally{f(!1)}},H=async()=>
4176{if(m==="reply"&&!b&&!w){_t.error("Paste the thread text or a URL for context");return}if(m==="original_post"&&!k&&!b){_t.error("Give it a topic or some notes to work from");return}M(!0),N("");try{const q=await W.functions.invoke("growth-generate-draft",{body:{platform:p,mode:m,sourceText:b,sourceUrl:w,topic:k}});if(q.error)throw new Error(q.error.message||"Generation failed");const U=q.data;if(U!=null&&U.error)throw new Error(U.error);N(U.content)}catch(q){console.error("Generate draft error:",q),_t.error(q.message||"Failed to generate draft")}finally{M(!1)}},G=async()=>{if(S)try{await navigator.clipboard.writeText(S),_t.success("Copied to clipboard")}catch{_t.error("Couldn't copy — select and copy manually")}},Z=async()=>{if(S){D(!0);try{const{error:q}=await W.from("growth_drafts").insert({platform:p,mode:m,source_text:b||null,source_url:w||null,topic:k||null,generated_content:S,status:"draft",created_by:e});if(q)throw q;_t.success("Saved to draft queue"),L()}catch(q){console.error("Save draft error:",q),_t.error(q.message||"Failed to save draft")}finally{D(!1)}}},le=async(q,U)=>{try{const{error:Q}=await W.from("growth_drafts").update({status:U,updated_at:new Date().toISOString()}).eq("id",q);if(Q)throw Q;R(J=>J.map(Y=>Y.id===q?{...Y,status:U}:Y))}catch(Q){console.error("Status change error:",Q),_t.error(Q.message||"Failed to update status")}},ue=A==="all"?$:$.filter(q=>q.status===A),re=q=>{switch(q){case"posted":return"bg-emerald-500/20 text-emerald-600 border-emerald-500/30";case"archived":return"bg-muted text-muted-foreground";default:return"bg-blue-500/10 text-blue-500 border-blue-500/20"}};return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[s.jsxs(he,{children:[s.jsx(Ce,{className:"pb-2",children:s.jsxs(Pe,{className:"text-sm font-medium text-muted-foreground flex items-center gap-2",children:[s.jsx(Ei,{className:"h-4 w-4 text-blue-500"}),"Site Visits (recent)"]})}),s.jsxs(pe,{children:[s.jsx("p",{className:"text-3xl font-bold",children:t}),s.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[n," today"]})]})]}),s.jsxs(he,{children:[s.jsx(Ce,{className:"pb-2",children:s.jsxs(Pe,{className:"text-sm font-medium text-muted-foreground flex items-center gap-2",children:[s.jsx(Wn,{className:"h-4 w-4 text-emerald-500"}),"Total Signups"]})}),s.jsx(pe,{children:s.jsx("p",{className:"text-3xl font-bold",children:r})})]}),s.jsxs(he,{children:[s.jsx(Ce,{className:"pb-2",children:s.jsxs(Pe,{className:"text-sm font-medium text-muted-foreground flex items-center gap-2",children:[s.jsx(vn,{className:"h-4 w-4 text-orange-500"}),"Paid Conversions"]})}),s.jsxs(pe,{children:[s.jsx("p",{className:"text-3xl font-bold",children:a}),s.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:r>0?`${(a/r*100).toFixed(1)}% of signups`:"—"})]})]}),s.jsxs(he,{children:[s.jsx(Ce,{className:"pb-2",children:s.jsxs(Pe,{className:"text-sm font-medium text-muted-foreground flex items-center gap-2",children:[s.jsx(VQ,{className:"h-4 w-4 text-primary"}),"Drafts Posted"]})}),s.jsxs(pe,{children:[s.jsx("p",{className:"text-3xl font-bold",children:$.filter(q=>q.status==="posted").length}),s.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[$.length," total in queue"]})]})]})]}),s.jsxs(he,{children:[s.jsxs(Ce,{children:[s.jsxs(Pe,{className:"text-lg flex items-center gap-2",children:[s.jsx(lJ,{className:"h-5 w-5 text-primary"}),"Company Brief"]}),s.jsx(Un,{children:"This context is fed to every AI-generated draft below — keep it accurate and it keeps the drafts sounding real."})]}),s.jsx(pe,{className:"space-y-4",children:u?s.jsx("div",{className:"flex justify-center py-6",children:s.jsx(ce,{className:"h-5 w-5 animate-spin text-muted-foreground"})}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{children:"What SociePRO is"}),s.jsx(Nt,{rows:3,value:l.product_description,onChange:q=>c(U=>({...U,product_description:q.target.value}))})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{children:"Ideal customer profile"}),s.jsx(Nt,{rows:2,value:l.icp,onChange:q=>c(U=>({...U,icp:q.target.value}))})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{children:"What makes it different"}),s.jsx(Nt,{rows:2,value:l.differentiators,onChange:q=>c(U=>({...U,differentiators:q.target.value}))})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{children:"Voice / tone guidelines"}),s.jsx(Nt,{rows:2,value:l.tone_guidelines,onChange:q=>c(U=>({...U,tone_guidelines:q.target.value}))})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{children:"Current focus"}),s.jsx(Nt,{rows:2,value:l.current_focus,onChange:q=>c(U=>({...U,current_focus:q.target.value}))})]}),s.jsxs(z,{onClick:B,disabled:d,children:[d?s.jsx(ce,{className:"mr-2 h-4 w-4 animate-spin"}):s.jsx(ri,{className:"mr-2 h-4 w-4"}),"Save Brief"]})]})})]}),s.jsxs(he,{children:[s.jsxs(Ce,{children:[s.jsxs(Pe,{className:"text-lg flex items-center gap-2",children:[s.jsx(Se,{className:"h-5 w-5 text-primary"}),"Draft Generator"]}),s.jsx(Un,{children:"Paste a thread you want to reply to, or give it a topic for an original post. Every draft needs your review before it goes anywhere — nothing here posts automatically."})]}),s.jsxs(pe,{className:"space-y-4",children:[s.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{children:"Platform"}),s.jsxs(jt,{value:p,onValueChange:y,children:[s.jsx(mt,{children:s.jsx(Ct,{})}),s.jsx(gt,{children:Zwe.map(q=>s.jsx(Ee,{value:q.value,children:q.label},q.value))})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{children:"Mode"}),s.jsxs(jt,{value:m,onValueChange:q=>v(q),children:[s.jsx(mt,{children:s.jsx(Ct,{})}),s.jsx(gt,{children:e0e.map(q=>s.jsx(Ee,{value:q.value,children:q.label},q.value))})]})]})]}),m==="reply"&&s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{children:"Source URL (optional)"}),s.jsx(ze,{value:w,onChange:q=>_(q.target.value),placeholder:"https://reddit.com/r/..."})]}),m==="original_post"&&s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{children:"Topic / angle"}),s.jsx(ze,{value:k,onChange:q=>j(q.target.value),placeholder:"What's this post about?"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{children:m==="reply"?"Paste the thread/post text":"Notes (optional)"}),s.jsx(Nt,{rows:5,value:b,onChange:q=>x(q.target.value),placeholder:m==="reply"?"Paste what they wrote...":"Any specifics to work from..."})]}),s.jsxs(z,{onClick:H,disabled:C,children:[C?s.jsx(ce,{className:"mr-2 h-4 w-4 animate-spin"}):s.jsx(Se,{className:"mr-2 h-4 w-4"}),"Generate Draft"]}),S&&s.jsxs("div",{className:"space-y-2 pt-2 border-t border-border",children:[s.jsx(X,{children:"Draft"}),s.jsx(Nt,{rows:8,value:S,onChange:q=>N(q.target.value),className:"font-mono text-sm"}),s.jsxs("div",{className:"flex flex-wrap gap-2",children:[s.jsxs(z,{variant:"outline",onClick:G,children:[s.jsx(Rl,{className:"mr-2 h-4 w-4"})," Copy"]}),s.jsxs(z,{variant:"outline",onClick:Z,disabled:O,children:[O?s.jsx(ce,{className:"mr-2 h-4 w-4 animate-spin"}):s.jsx(ri,{className:"mr-2 h-4 w-4"}),"Save to Queue"]}),s.jsxs(z,{variant:"ghost",onClick:H,disabled:C,children:[s.jsx(Bt,{className:"mr-2 h-4 w-4"})," Regenerate"]})]})]})]})]}),s.jsxs(he,{children:[s.jsxs(Ce,{className:"flex flex-row items-center justify-between gap-4 flex-wrap",children:[s.jsxs("div",{children:[s.jsx(Pe,{className:"text-lg",children:"Draft Queue"}),s.jsx(Un,{children:"Everything generated, saved here for review before you post it manually."})]}),s.jsxs(jt,{value:A,onValueChange:E,children:[s.jsx(mt,{className:"w-[140px]",children:s.jsx(Ct,{})}),s.jsxs(gt,{children:[s.jsx(Ee,{value:"all",children:"All statuses"}),jM.map(q=>s.jsx(Ee,{value:q,children:q.charAt(0).toUpperCase()+q.slice(1)},q))]})]})]}),s.jsx(pe,{children:I?s.jsx("div",{className:"flex justify-center py-6",children:s.jsx(ce,{className:"h-5 w-5 animate-spin text-muted-foreground"})}):s.jsxs(so,{children:[s.jsx(io,{children:s.jsxs(Bn,{children:[s.jsx(tt,{children:"Platform"}),s.jsx(tt,{children:"Mode"}),s.jsx(tt,{children:"Draft"}),s.jsx(tt,{children:"Status"}),s.jsx(tt,{children:"Created"})]})}),s.jsxs(oo,{children:[ue.map(q=>s.jsxs(Bn,{children:[s.jsx(Qe,{className:"capitalize",children:q.platform}),s.jsx(Qe,{className:"text-sm text-muted-foreground",children:q.mode==="reply"?"Reply":"Original"}),s.jsx(Qe,{className:"max-w-[360px]",children:s.jsx("p",{className:"text-sm truncate",title:q.generated_content,children:q.generated_content})}),s.jsx(Qe,{children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(je,{className:re(q.status),variant:"outline",children:q.status}),s.jsxs(jt,{value:q.status,onValueChange:U=>le(q.id,U),children:[s.jsx(mt,{className:"w-[110px] h-8 text-xs",children:s.jsx(Ct,{placeholder:"Change"})}),s.jsx(gt,{children:jM.map(U=>s.jsx(Ee,{value:U,children:U.charAt(0).toUpperCase()+U.slice(1)},U))})]})]})}),s.jsx(Qe,{className:"text-sm text-muted-foreground",children:ge(new Date(q.created_at),"MMM d, h:mm a")})]},q.id)),ue.length===0&&s.jsx(Bn,{children:s.jsxs(Qe,{colSpan:5,className:"text-center text-muted-foreground py-8",children:["No drafts ",A!=="all"?`with status "${A}"`:"yet"," — generate one above."]})})]})]})})]})]})}const r0e={realtor:"standard",financial_advisor:"strict",builder_remodeler:"standard",insurance:"standard",property_manager:"standard",host:"standard",restaurantpro:"standard",creator:"standard",side_hustle:"standard",personal:"standard",authoritypro:"standard"},SM={realtor:"Short Cycle",financial_advisor:"Long Cycle",builder_remodeler:"Project Cycle",insurance:"Policy Cycle",property_manager:"Lease Cycle",host:"Booking Cycle",restaurantpro:"Visit Cycle",creator:"Engagement Cycle",side_hustle:"Growth Cycle",personal:"Engagement Cycle",authoritypro:"Authority Cycle"};function a0e(){var $,R,I;const e=Gt(),{isAdmin:t,isLoading:n,userId:r}=Sg(),[a,i]=g.useState(!0),[o,l]=g.useState([]),[c,u]=g.useState([]),[h,d]=g.useState(0),[f,p]=g.useState(0),[y,m]=g.useState([]),[v,b]=g.useState([]),[x,w]=g.useState([]),[_,k]=g.useState(null),[j,S]=g.useState({totalClicks:0,totalLeads:0,totalUsers:0,activeTracking:0});g.useEffect(()=>{if(n)return;if(!t){e("/dashboard"),_t.error("Admin access required");return}(async()=>{const{data:A}=await W.from("page_analytics").select("*").order("visited_at",{ascending:!1}).limit(100);if(A){l(A),d(A.length);const le=new Date().toISOString().split("T")[0],ue=A.filter(U=>U.visited_at.startsWith(le)).length;p(ue);const re=new Map;A.forEach(U=>{const Q=U.country||"Unknown";re.set(Q,(re.get(Q)||0)+1)});const q=Array.from(re.entries()).map(([U,Q])=>({country:U,count:Q})).sort((U,Q)=>Q.count-U.count).slice(0,10);u(q)}const{data:E}=await W.from("user_subscriptions").select("*").order("created_at",{ascending:!1});E&&m(E);const{data:T}=await W.from("industry_modules").select("*").order("slug");T&&b(T);const{data:L}=await W.from("user_module_access").select("*");L&&w(L);const{data:B}=await W.from("click_events").select("id, user_id").limit(1e3),{data:H}=await W.from("lead_events").select("id").limit(1e3),{data:G}=await W.from("tracking_links").select("id").eq("is_active",!0).limit(1e3),Z=new Set((B==null?void 0:B.map(le=>le.user_id))||[]);S({totalClicks:(B==null?void 0:B.length)||0,totalLeads:(H==null?void 0:H.length)||0,totalUsers:Z.size,activeTracking:(G==null?void 0:G.length)||0}),i(!1)})()},[e,t,n]);const N=async(P,A,E)=>{try{const{error:T}=await W.from("user_module_access").upsert({user_id:P,module_slug:A,is_enabled:E,enabled_at:E?new Date().toISOString():null,enabled_by:r},{onConflict:"user_id,module_slug"});if(T)throw T;await W.from("module_audit_log").insert({user_id:P,module_slug:A,action:E?"enabled":"disabled",old_value:{is_enabled:!E},new_value:{is_enabled:E},performed_by:r}),w(L=>L.find(H=>
4176H.user_id===P&&H.module_slug===A)?L.map(H=>H.user_id===P&&H.module_slug===A?{...H,is_enabled:E}:H):[...L,{user_id:P,module_slug:A,is_enabled:E}]),_t.success(`Module ${E?"enabled":"disabled"} for user`)}catch(T){console.error("Error toggling module:",T),_t.error("Failed to update module access")}},C=async()=>{const{data:P}=await W.from("user_subscriptions").select("*").order("created_at",{ascending:!1});P&&m(P);const{data:A}=await W.from("user_module_access").select("*");A&&w(A)},M=P=>{switch(P){case"enterprise":return"bg-purple-500/10 text-purple-500 border-purple-500/20";case"pro":return"bg-primary/10 text-primary border-primary/20";case"starter":return"bg-blue-500/10 text-blue-500 border-blue-500/20";default:return"bg-muted text-muted-foreground"}},O=P=>P?P.includes("Chrome")?"Chrome":P.includes("Firefox")?"Firefox":P.includes("Safari")?"Safari":P.includes("Edge")?"Edge":"Other":"Unknown",D=(P,A)=>x.find(E=>E.user_id===P&&E.module_slug===A);return n||a?s.jsx(hr,{title:"Admin Dashboard",description:"Analytics and user management",children:s.jsx("div",{className:"flex items-center justify-center py-12",children:s.jsx(ce,{className:"h-8 w-8 animate-spin text-primary"})})}):t?s.jsx(hr,{title:"Admin Control Room",description:"Analytics, user management, and module control",children:s.jsxs(Ii,{defaultValue:"modules",className:"space-y-6",children:[s.jsxs(Hs,{className:"flex-wrap",children:[s.jsxs(ht,{value:"modules",className:"flex items-center gap-2",children:[s.jsx(Ea,{className:"h-4 w-4"}),"Modules & Access"]}),s.jsxs(ht,{value:"trendspro",className:"flex items-center gap-2",children:[s.jsx(Se,{className:"h-4 w-4"}),"TrendsPRO"]}),s.jsxs(ht,{value:"clickpro",className:"flex items-center gap-2",children:[s.jsx(yc,{className:"h-4 w-4"}),"ClickPRO Metrics"]}),s.jsxs(ht,{value:"users",className:"flex items-center gap-2",children:[s.jsx(Wn,{className:"h-4 w-4"}),"Users & Billing"]}),s.jsxs(ht,{value:"visitors",className:"flex items-center gap-2",children:[s.jsx(Xc,{className:"h-4 w-4"}),"Visitor Analytics"]}),s.jsxs(ht,{value:"provision",className:"flex items-center gap-2",children:[s.jsx(mj,{className:"h-4 w-4"}),"Add User"]}),s.jsxs(ht,{value:"growth",className:"flex items-center gap-2",children:[s.jsx(pj,{className:"h-4 w-4"}),"Growth Co-Pilot"]})]}),s.jsxs(ft,{value:"modules",className:"space-y-6",children:[s.jsxs(he,{children:[s.jsx(Ce,{className:"pb-3",children:s.jsx(Pe,{className:"text-lg",children:"User Module Access"})}),s.jsx(pe,{children:s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"flex flex-wrap gap-2",children:y.map(P=>s.jsx("button",{onClick:()=>k(P.user_id===_?null:P.user_id),className:`px-3 py-1.5 rounded-lg text-sm border transition-colors ${_===P.user_id?"bg-primary text-primary-foreground border-primary":"bg-muted/50 border-border hover:bg-muted"}`,children:P.email},P.user_id))}),_&&s.jsxs("div",{className:"space-y-4 pt-4 border-t border-border",children:[s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Managing modules for: ",s.jsx("span",{className:"font-medium text-foreground",children:($=y.find(P=>P.user_id===_))==null?void 0:$.email})]}),s.jsx("div",{className:"grid gap-4",children:v.map(P=>s.jsx(zwe,{module:P,userAccess:D(_,P.slug),onToggle:(A,E)=>N(_,A,E),userId:_},P.id))})]}),!_&&s.jsx("p",{className:"text-sm text-muted-foreground text-center py-4",children:"Select a user above to manage their module access"})]})})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[s.jsx(kM,{moduleSlug:"financial_advisor",complianceMode:"strict"}),s.jsx(kM,{moduleSlug:"medspa",complianceMode:"hipaa"})]}),s.jsxs(he,{children:[s.jsx(Ce,{children:s.jsx(Pe,{className:"text-lg",children:"Platform Module Status"})}),s.jsx(pe,{children:s.jsxs(so,{children:[s.jsx(io,{children:s.jsxs(Bn,{children:[s.jsx(tt,{children:"Module"}),s.jsx(tt,{children:"Status"}),s.jsx(tt,{children:"Attribution Model"}),s.jsx(tt,{children:"Compliance"}),s.jsx(tt,{children:"Users Enabled"})]})}),s.jsx(oo,{children:v.map(P=>{const A=x.filter(T=>T.module_slug===P.slug&&T.is_enabled).length,E=r0e[P.slug]||"standard";return s.jsxs(Bn,{className:P.is_active?"":"opacity-50",children:[s.jsxs(Qe,{className:"font-medium flex items-center gap-2",children:[(()=>{const T=xi[P.slug];if(T){const L=T.icon;return s.jsx(L,{className:"h-4 w-4 text-primary"})}return s.jsx(yc,{className:"h-4 w-4 text-muted-foreground"})})(),P.name]}),s.jsx(Qe,{children:s.jsx(je,{className:P.is_active?"bg-emerald-500/20 text-emerald-600 border-emerald-500/30":"",variant:P.is_active?"default":"outline",children:P.is_active?"Active":"Coming Soon"})}),s.jsx(Qe,{className:"text-sm text-muted-foreground",children:SM[P.slug]||"Short Cycle"}),s.jsx(Qe,{children:s.jsx(je,{variant:"outline",className:"text-xs capitalize",children:E})}),s.jsx(Qe,{children:A})]},P.id)})})]})})]})]}),s.jsx(ft,{value:"trendspro",className:"space-y-6",children:s.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[s.jsx(Vwe,{}),s.jsxs(he,{children:[s.jsx(Ce,{children:s.jsxs(Pe,{className:"text-lg flex items-center gap-2",children:[s.jsx(Se,{className:"h-5 w-5 text-primary"}),"How It Works"]})}),s.jsxs(pe,{className:"space-y-4 text-sm text-muted-foreground",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx("p",{className:"font-medium text-foreground",children:"1️⃣ Admin Refresh"}),s.jsx("p",{children:'When you click "Refresh Trends System", it updates the master AI prompt and topic definitions. No trends are generated yet.'})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("p",{className:"font-medium text-foreground",children:"2️⃣ Master Prompt"}),s.jsx("p",{children:"The stored system prompt defines quality standards, ethical guidelines, and output rules for all trend generation."})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("p",{className:"font-medium text-foreground",children:"3️⃣ User Generation"}),s.jsx("p",{children:'When users click "New Trend" in their dashboard, the AI uses the master prompt + topic rules to generate a fresh, unique trend.'})]})]})]})]})}),s.jsxs(ft,{value:"clickpro",className:"space-y-6",children:[s.jsx(he,{className:"border-emerald-500/20 bg-gradient-to-br from-emerald-500/5 to-emerald-500/10",children:s.jsxs(pe,{className:"flex items-center gap-3 py-4",children:[s.jsx("div",{className:"p-2 rounded-lg bg-emerald-500/10",children:s.jsx(yc,{className:"h-5 w-5 text-emerald-500"})}),s.jsxs("div",{children:[s.jsxs("p",{className:"font-semibold text-foreground",children:[Object.values(xi).filter(P=>P.isActive).length," Active Modules"]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Click tracking and lead attribution across all verticals"})]}),s.jsx(je,{className:"ml-auto bg-emerald-500/20 text-emerald-600 border-emerald-500/30",children:"Live"})]})}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[s.jsxs(he,{children:[s.jsx(Ce,{className:"pb-2",children:s.jsxs(Pe,{className:"text-sm font-medium text-muted-foreground flex items-center gap-2",children:[s.jsx(li,{className:"h-4 w-4 text-blue-500"}),"Total Clicks"]})}),s.jsxs(pe,{children:[s.jsx("p",{className:"text-3xl font-bold",children:j.totalClicks.toLocaleStr
4176ing()}),s.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Across all users"})]})]}),s.jsxs(he,{children:[s.jsx(Ce,{className:"pb-2",children:s.jsxs(Pe,{className:"text-sm font-medium text-muted-foreground flex items-center gap-2",children:[s.jsx(Wn,{className:"h-4 w-4 text-emerald-500"}),"Leads Generated"]})}),s.jsxs(pe,{children:[s.jsx("p",{className:"text-3xl font-bold",children:j.totalLeads.toLocaleString()}),s.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Total pipeline"})]})]}),s.jsxs(he,{children:[s.jsx(Ce,{className:"pb-2",children:s.jsxs(Pe,{className:"text-sm font-medium text-muted-foreground flex items-center gap-2",children:[s.jsx(vn,{className:"h-4 w-4 text-orange-500"}),"Active Users"]})}),s.jsxs(pe,{children:[s.jsx("p",{className:"text-3xl font-bold",children:j.totalUsers}),s.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Using ClickPRO"})]})]}),s.jsxs(he,{children:[s.jsx(Ce,{className:"pb-2",children:s.jsxs(Pe,{className:"text-sm font-medium text-muted-foreground flex items-center gap-2",children:[s.jsx(yc,{className:"h-4 w-4 text-primary"}),"Active Links"]})}),s.jsxs(pe,{children:[s.jsx("p",{className:"text-3xl font-bold",children:j.activeTracking}),s.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Tracking enabled"})]})]})]}),s.jsxs(he,{children:[s.jsx(Ce,{children:s.jsx(Pe,{className:"text-lg",children:"Vertical ClickPRO Status"})}),s.jsx(pe,{children:s.jsxs(so,{children:[s.jsx(io,{children:s.jsxs(Bn,{children:[s.jsx(tt,{children:"Vertical"}),s.jsx(tt,{children:"Status"}),s.jsx(tt,{children:"Attribution Model"}),s.jsx(tt,{children:"Primary Metrics"})]})}),s.jsx(oo,{children:Object.values(xi).map(P=>{const A=P.icon,E={realtor:"Clicks, leads, CTA engagement",financial_advisor:"Repeat exposure, profile revisits, delayed clicks",builder_remodeler:"Lead nurturing, showroom visits",property_manager:"Tenant inquiries, lease renewals",host:"Booking inquiries, guest reviews, occupancy",restaurantpro:"Reservations, walk-ins, repeat visits",creator:"Followers, shares, brand deals",side_hustle:"Sign-ups, sales, referrals",personal:"Likes, comments, shares",authoritypro:"Thought leadership, category positioning",insurance:"Quote requests, policy renewals"};return s.jsxs(Bn,{className:P.isActive?"":"opacity-50",children:[s.jsxs(Qe,{className:"font-medium flex items-center gap-2",children:[s.jsx(A,{className:"h-4 w-4 text-primary"}),P.name]}),s.jsx(Qe,{children:s.jsx(je,{className:P.isActive?"bg-emerald-500/20 text-emerald-600 border-emerald-500/30":"",variant:P.isActive?"default":"outline",children:P.isActive?"Active":"Coming Soon"})}),s.jsx(Qe,{children:SM[P.slug]||"Short Cycle"}),s.jsx(Qe,{className:"text-sm text-muted-foreground",children:E[P.slug]||"—"})]},P.slug)})})]})})]})]}),s.jsxs(ft,{value:"users",className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[s.jsxs(he,{children:[s.jsx(Ce,{className:"pb-2",children:s.jsxs(Pe,{className:"text-sm font-medium text-muted-foreground flex items-center gap-2",children:[s.jsx(Wn,{className:"h-4 w-4"}),"Total Users"]})}),s.jsx(pe,{children:s.jsx("p",{className:"text-3xl font-bold",children:y.length})})]}),s.jsxs(he,{children:[s.jsx(Ce,{className:"pb-2",children:s.jsxs(Pe,{className:"text-sm font-medium text-muted-foreground flex items-center gap-2",children:[s.jsx(dj,{className:"h-4 w-4"}),"Free Tier"]})}),s.jsx(pe,{children:s.jsx("p",{className:"text-3xl font-bold",children:y.filter(P=>P.tier==="free").length})})]}),s.jsxs(he,{children:[s.jsx(Ce,{className:"pb-2",children:s.jsxs(Pe,{className:"text-sm font-medium text-muted-foreground flex items-center gap-2",children:[s.jsx(dj,{className:"h-4 w-4"}),"Paid Users"]})}),s.jsx(pe,{children:s.jsx("p",{className:"text-3xl font-bold",children:y.filter(P=>P.tier!=="free").length})})]}),s.jsxs(he,{children:[s.jsx(Ce,{className:"pb-2",children:s.jsxs(Pe,{className:"text-sm font-medium text-muted-foreground flex items-center gap-2",children:[s.jsx(Mn,{className:"h-4 w-4"}),"Billing Soon"]})}),s.jsx(pe,{children:s.jsx("p",{className:"text-3xl font-bold",children:y.filter(P=>{const A=new Date(P.next_billing_date),E=dt(new Date,7);return A<=E&&P.tier!=="free"}).length})})]})]}),s.jsxs(he,{children:[s.jsx(Ce,{className:"pb-3",children:s.jsx(Pe,{className:"text-lg",children:"Manage a User"})}),s.jsx(pe,{children:s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"flex flex-wrap gap-2",children:y.map(P=>s.jsx("button",{onClick:()=>k(P.user_id===_?null:P.user_id),className:`px-3 py-1.5 rounded-lg text-sm border transition-colors ${_===P.user_id?"bg-primary text-primary-foreground border-primary":"bg-muted/50 border-border hover:bg-muted"}`,children:P.email},P.user_id))}),_&&r&&s.jsx(Jwe,{userId:_,email:((R=y.find(P=>P.user_id===_))==null?void 0:R.email)??"",currentTier:((I=y.find(P=>P.user_id===_))==null?void 0:I.tier)??"free",adminUserId:r,onUpdated:C}),!_&&s.jsx("p",{className:"text-sm text-muted-foreground text-center py-4",children:"Select a user above to change their tier, unlock the course library, or change their active vertical"})]})})]}),s.jsxs(he,{children:[s.jsx(Ce,{children:s.jsx(Pe,{className:"text-lg",children:"Registered Users"})}),s.jsx(pe,{children:s.jsxs(so,{children:[s.jsx(io,{children:s.jsxs(Bn,{children:[s.jsx(tt,{children:"Email"}),s.jsx(tt,{children:"Subscription Tier"}),s.jsx(tt,{children:"Modules Enabled"}),s.jsx(tt,{children:"Billing Start"}),s.jsx(tt,{children:"Registered"})]})}),s.jsxs(oo,{children:[y.map(P=>{const A=x.filter(E=>E.user_id===P.user_id&&E.is_enabled).length;return s.jsxs(Bn,{children:[s.jsx(Qe,{className:"font-medium",children:P.email}),s.jsx(Qe,{children:s.jsx(je,{className:M(P.tier),children:P.tier.charAt(0).toUpperCase()+P.tier.slice(1)})}),s.jsx(Qe,{children:s.jsxs(je,{variant:"outline",children:[A," modules"]})}),s.jsx(Qe,{className:"text-sm text-muted-foreground",children:ge(new Date(P.billing_start_date),"MMM d, yyyy")}),s.jsx(Qe,{className:"text-sm text-muted-foreground",children:ge(new Date(P.created_at),"MMM d, yyyy")})]},P.id)}),y.length===0&&s.jsx(Bn,{children:s.jsx(Qe,{colSpan:5,className:"text-center text-muted-foreground py-8",children:"No registered users yet"})})]})]})})]})]}),s.jsxs(ft,{value:"visitors",className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[s.jsxs(he,{children:[s.jsx(Ce,{className:"pb-2",children:s.jsxs(Pe,{className:"text-sm font-medium text-muted-foreground flex items-center gap-2",children:[s.jsx(Ei,{className:"h-4 w-4"}),"Total Visits"]})}),s.jsx(pe,{children:s.jsx("p",{className:"text-3xl font-bold",children:h})})]}),s.jsxs(he,{children:[s.jsx(Ce,{className:"pb-2",children:s.jsxs(Pe,{className:"text-sm font-medium text-muted-foreground flex items-center gap-2",children:[s.jsx(Mn,{className:"h-4 w-4"}),"Today's Visits"]})}),s.jsx(pe,{children:s.jsx("p",{className:"text-3xl font-bold",children:f})})]}),s.jsxs(he,{children:[s.jsx(Ce,{className:"pb-2",children:s.jsxs(Pe,{className:"text-sm font-medium text-muted-foreground flex items-center gap-2",children:[s.jsx(bP,{className:"h-4 w-4"}),"Top Locations"]})}),s.jsx(pe,{children:s.jsx("div",{className:"flex flex-wrap gap-1",children:c.slice(0,3).map(P=>s.jsxs(je,{variant:"secondary",className:"text-xs",children:[P.country,": ",P.count]},P.country))})})]})]}),s.jsxs(he,{children:[s.jsx(Ce,{children:s.jsx(Pe,{className:"text-lg",children:"Recent Visits"})}),s.jsx(pe,{children:s.jsxs(so,{children:[s.jsx(io,{children:s.jsxs(Bn,{children:[s.jsx(tt,{children:"Page"}),s.jsx(tt,{children:"Location"}),s.jsx(tt,{children:"Browser"}),s.jsx(tt,{children:"Referrer"}),s.jsx(tt,{children:"Time"})]})}),s.jsxs(oo,{children:[o.slice(0,20).map(P=>s.jsxs(Bn,{children:[s.jsx(Qe,{className:"font-medium",children:P.page_path}),s.jsx(Qe,{className:"text-sm text-muted-foreground",children:[P.city,P.region,P.country].filter(
4176Boolean).join(", ")||"Unknown"}),s.jsx(Qe,{className:"text-sm",children:O(P.user_agent)}),s.jsx(Qe,{className:"text-sm text-muted-foreground max-w-[200px] truncate",children:P.referrer||"Direct"}),s.jsx(Qe,{className:"text-sm text-muted-foreground",children:ge(new Date(P.visited_at),"MMM d, h:mm a")})]},P.id)),o.length===0&&s.jsx(Bn,{children:s.jsx(Qe,{colSpan:5,className:"text-center text-muted-foreground py-8",children:"No visits recorded yet"})})]})]})})]})]}),s.jsx(ft,{value:"provision",className:"space-y-6",children:s.jsx(Xwe,{})}),s.jsx(ft,{value:"growth",className:"space-y-6",children:r&&s.jsx(n0e,{adminUserId:r,totalVisits:h,todayVisits:f,totalUsers:y.length,paidUsers:y.filter(P=>P.tier!=="free").length})})]})}):s.jsx(hr,{title:"Admin Dashboard",description:"Analytics and user management",children:s.jsx(he,{className:"border-destructive/50 bg-destructive/10",children:s.jsxs(pe,{className:"flex items-center gap-3 py-6",children:[s.jsx(Ai,{className:"h-5 w-5 text-destructive"}),s.jsx("p",{className:"text-destructive",children:"Admin access required"})]})})})}var fT="Progress",pT=100,[s0e,kHe]=Hn(fT),[i0e,o0e]=s0e(fT),Y7=g.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:a,getValueLabel:i=l0e,...o}=e;(a||a===0)&&!NM(a)&&console.error(c0e(`${a}`,"Progress"));const l=NM(a)?a:pT;r!==null&&!CM(r,l)&&console.error(u0e(`${r}`,"Progress"));const c=CM(r,l)?r:null,u=Kb(c)?i(c,l):void 0;return s.jsx(i0e,{scope:n,value:c,max:l,children:s.jsx(we.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":Kb(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":Q7(c,l),"data-value":c??void 0,"data-max":l,...o,ref:t})})});Y7.displayName=fT;var K7="ProgressIndicator",X7=g.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,a=o0e(K7,n);return s.jsx(we.div,{"data-state":Q7(a.value,a.max),"data-value":a.value??void 0,"data-max":a.max,...r,ref:t})});X7.displayName=K7;function l0e(e,t){return`${Math.round(e/t*100)}%`}function Q7(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Kb(e){return typeof e=="number"}function NM(e){return Kb(e)&&!isNaN(e)&&e>0}function CM(e,t){return Kb(e)&&!isNaN(e)&&e<=t&&e>=0}function c0e(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${pT}\`.`}function u0e(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
4177  - a positive number
4178  - less than the value passed to \`max\` (or ${pT} if no \`max\` prop is set)
4179  - \`null\` or \`undefined\` if the progress is indeterminate.
4180
4181Defaulting to \`null\`.`}var J7=Y7,d0e=X7;const vm=g.forwardRef(({className:e,value:t,...n},r)=>s.jsx(J7,{ref:r,className:K("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...n,children:s.jsx(d0e,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));vm.displayName=J7.displayName;var h0e=Array.isArray,wa=h0e,f0e=typeof ey=="object"&&ey&&ey.Object===Object&&ey,Z7=f0e,p0e=Z7,m0e=typeof self=="object"&&self&&self.Object===Object&&self,g0e=p0e||m0e||Function("return this")(),Di=g0e,y0e=Di,v0e=y0e.Symbol,Vg=v0e,PM=Vg,eH=Object.prototype,b0e=eH.hasOwnProperty,x0e=eH.toString,Ef=PM?PM.toStringTag:void 0;function w0e(e){var t=b0e.call(e,Ef),n=e[Ef];try{e[Ef]=void 0;var r=!0}catch{}var a=x0e.call(e);return r&&(t?e[Ef]=n:delete e[Ef]),a}var _0e=w0e,k0e=Object.prototype,j0e=k0e.toString;function S0e(e){return j0e.call(e)}var N0e=S0e,TM=Vg,C0e=_0e,P0e=N0e,T0e="[object Null]",A0e="[object Undefined]",AM=TM?TM.toStringTag:void 0;function E0e(e){return e==null?e===void 0?A0e:T0e:AM&&AM in Object(e)?C0e(e):P0e(e)}var Io=E0e;function O0e(e){return e!=null&&typeof e=="object"}var Mo=O0e,R0e=Io,I0e=Mo,M0e="[object Symbol]";function D0e(e){return typeof e=="symbol"||I0e(e)&&R0e(e)==M0e}var Qh=D0e,$0e=wa,L0e=Qh,F0e=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,B0e=/^\w*$/;function W0e(e,t){if($0e(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||L0e(e)?!0:B0e.test(e)||!F0e.test(e)||t!=null&&e in Object(t)}var mT=W0e;function q0e(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Kl=q0e;const Jh=Vt(Kl);var U0e=Io,z0e=Kl,H0e="[object AsyncFunction]",V0e="[object Function]",G0e="[object GeneratorFunction]",Y0e="[object Proxy]";function K0e(e){if(!z0e(e))return!1;var t=U0e(e);return t==V0e||t==G0e||t==H0e||t==Y0e}var gT=K0e;const it=Vt(gT);var X0e=Di,Q0e=X0e["__core-js_shared__"],J0e=Q0e,D1=J0e,EM=function(){var e=/[^.]+$/.exec(D1&&D1.keys&&D1.keys.IE_PROTO||"");
vendor: 4,289 bytes, line 4181
4181return e?"Symbol(src)_1."+e:""}();function Z0e(e){return!!EM&&EM in e}var e_e=Z0e,t_e=Function.prototype,n_e=t_e.toString;function r_e(e){if(e!=null){try{return n_e.call(e)}catch{}try{return e+""}catch{}}return""}var tH=r_e,a_e=gT,s_e=e_e,i_e=Kl,o_e=tH,l_e=/[\\^$.*+?()[\]{}|]/g,c_e=/^\[object .+?Constructor\]$/,u_e=Function.prototype,d_e=Object.prototype,h_e=u_e.toString,f_e=d_e.hasOwnProperty,p_e=RegExp("^"+h_e.call(f_e).replace(l_e,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function m_e(e){if(!i_e(e)||s_e(e))return!1;var t=a_e(e)?p_e:c_e;return t.test(o_e(e))}var g_e=m_e;function y_e(e,t){return e==null?void 0:e[t]}var v_e=y_e,b_e=g_e,x_e=v_e;function w_e(e,t){var n=x_e(e,t);return b_e(n)?n:void 0}var wu=w_e,__e=wu,k_e=__e(Object,"create"),y0=k_e,OM=y0;function j_e(){this.__data__=OM?OM(null):{},this.size=0}var S_e=j_e;function N_e(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var C_e=N_e,P_e=y0,T_e="__lodash_hash_undefined__",A_e=Object.prototype,E_e=A_e.hasOwnProperty;function O_e(e){var t=this.__data__;if(P_e){var n=t[e];return n===T_e?void 0:n}return E_e.call(t,e)?t[e]:void 0}var R_e=O_e,I_e=y0,M_e=Object.prototype,D_e=M_e.hasOwnProperty;function $_e(e){var t=this.__data__;return I_e?t[e]!==void 0:D_e.call(t,e)}var L_e=$_e,F_e=y0,B_e="__lodash_hash_undefined__";function W_e(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=F_e&&t===void 0?B_e:t,this}var q_e=W_e,U_e=S_e,z_e=C_e,H_e=R_e,V_e=L_e,G_e=q_e;function Zh(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Zh.prototype.clear=U_e;Zh.prototype.delete=z_e;Zh.prototype.get=H_e;Zh.prototype.has=V_e;Zh.prototype.set=G_e;var Y_e=Zh;function K_e(){this.__data__=[],this.size=0}var X_e=K_e;function Q_e(e,t){return e===t||e!==e&&t!==t}var yT=Q_e,J_e=yT;function Z_e(e,t){for(var n=e.length;n--;)if(J_e(e[n][0],t))return n;return-1}var v0=Z_e,e1e=v0,t1e=Array.prototype,n1e=t1e.splice;function r1e(e){var t=this.__data__,n=e1e(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():n1e.call(t,n,1),--this.size,!0}var a1e=r1e,s1e=v0;function i1e(e){var t=this.__data__,n=s1e(t,e);return n<0?void 0:t[n][1]}var o1e=i1e,l1e=v0;function c1e(e){return l1e(this.__data__,e)>-1}var u1e=c1e,d1e=v0;function h1e(e,t){var n=this.__data__,r=d1e(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var f1e=h1e,p1e=X_e,m1e=a1e,g1e=o1e,y1e=u1e,v1e=f1e;function ef(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ef.prototype.clear=p1e;ef.prototype.delete=m1e;ef.prototype.get=g1e;ef.prototype.has=y1e;ef.prototype.set=v1e;var b0=ef,b1e=wu,x1e=Di,w1e=b1e(x1e,"Map"),vT=w1e,RM=Y_e,_1e=b0,k1e=vT;function j1e(){this.size=0,this.__data__={hash:new RM,map:new(k1e||_1e),string:new RM}}var S1e=j1e;function N1e(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var C1e=N1e,P1e=C1e;function T1e(e,t){var n=e.__data__;return P1e(t)?n[typeof t=="string"?"string":"hash"]:n.map}var x0=T1e,A1e=x0;function E1e(e){var t=A1e(this,e).delete(e);return this.size-=t?1:0,t}var O1e=E1e,R1e=x0;function I1e(e){return R1e(this,e).get(e)}var M1e=I1e,D1e=x0;function $1e(e){return D1e(this,e).has(e)}var L1e=$1e,F1e=x0;function B1e(e,t){var n=F1e(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var W1e=B1e,q1e=S1e,U1e=O1e,z1e=M1e,H1e=L1e,V1e=W1e;function tf(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}tf.prototype.clear=q1e;tf.prototype.delete=U1e;tf.prototype.get=z1e;tf.prototype.has=H1e;tf.prototype.set=V1e;var bT=tf,nH=bT,G1e="Expected a function";function xT(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(G1e);var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],i=n.cache;if(i.has(a))return i.get(a);var o=e.apply(this,r);return n.cache=i.set(a,o)||i,o};return n.cache=new(xT.Cache||nH),n}xT.Cache=nH;var rH=xT;const Y1e=Vt(rH);var K1e=rH,X1e=500;function Q1e(e){var t=K1e(e,function(r){return n.size===X1e&&n.clear(),r}),n=t.cache;return t}var J1e=Q1e,Z1e=J1e,eke=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,tke=/\\(\\)?/g,nke=Z1e(function(e){var t=[];
4181return e.charCodeAt(0)===46&&t.push(""),e.replace(eke,function(n,r,a,i){t.push(a?i.replace(tke,"$1"):r||n)}),t}),rke=nke;function ake(e,t){for(var n=-1,r=e==null?0:e.length,a=Array(r);++n<r;)a[n]=t(e[n],n,e);return a}var wT=ake,IM=Vg,ske=wT,ike=wa,oke=Qh,lke=1/0,MM=IM?IM.prototype:void 0,DM=MM?MM.toString:void 0;function aH(e){if(typeof e=="string")return e;if(ike(e))return ske(e,aH)+"";if(oke(e))return DM?DM.call(e):"";var t=e+"";return t=="0"&&1/e==-lke?"-0":t}var cke=aH,uke=cke;function dke(e){return e==null?"":uke(e)}var sH=dke,hke=wa,fke=mT,pke=rke,mke=sH;function gke(e,t){return hke(e)?e:fke(e,t)?[e]:pke(mke(e))}var iH=gke,yke=Qh,vke=1/0;function bke(e){if(typeof e=="string"||yke(e))return e;var t=e+"";return t=="0"&&1/e==-vke?"-0":t}var w0=bke,xke=iH,wke=w0;function _ke(e,t){t=xke(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[wke(t[n++])];return n&&n==r?e:void 0}var _T=_ke,kke=_T;function jke(e,t,n){var r=e==null?void 0:kke(e,t);return r===void 0?n:r}var oH=jke;const rs=Vt(oH);function Ske(e){return e==null}var Nke=Ske;const yt=Vt(Nke);var Cke=Io,Pke=wa,Tke=Mo,Ake="[object String]";function Eke(e){return typeof e=="string"||!Pke(e)&&Tke(e)&&Cke(e)==Ake}var Oke=Eke;const lu=Vt(Oke);var lH={exports:{}},qt={};/**
4182 * @license React
4183 * react-is.production.min.js
4184 *
4185 * Copyright (c) Facebook, Inc. and its affiliates.
4186 *
4187 * This source code is licensed under the MIT license found in the
4188 * LICENSE file in the root directory of this source tree.
4189 */var kT=Symbol.for("react.element"),jT=Symbol.for("react.portal"),_0=Symbol.for("react.fragment"),k0=Symbol.for("react.strict_mode"),j0=Symbol.for("react.profiler"),S0=Symbol.for("react.provider"),N0=Symbol.for("react.context"),Rke=Symbol.for("react.server_context"),C0=Symbol.for("react.forward_ref"),P0=Symbol.for("react.suspense"),T0=Symbol.for("react.suspense_list"),A0=Symbol.for("react.memo"),E0=Symbol.for("react.lazy"),Ike=Symbol.for("react.offscreen"),cH;cH=Symbol.for("react.module.reference");function hs(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case kT:switch(e=e.type,e){case _0:case j0:case k0:case P0:case T0:return e;default:switch(e=e&&e.$$typeof,e){case Rke:case N0:case C0:case E0:case A0:case S0:return e;default:return t}}case jT:return t}}}qt.ContextConsumer=N0;qt.ContextProvider=S0;qt.Element=kT;qt.ForwardRef=C0;qt.Fragment=_0;qt.Lazy=E0;qt.Memo=A0;qt.Portal=jT;qt.Profiler=j0;qt.StrictMode=k0;qt.Suspense=P0;qt.SuspenseList=T0;qt.isAsyncMode=function(){return!1};qt.isConcurrentMode=function(){return!1};qt.isContextConsumer=function(e){return hs(e)===N0};qt.isContextProvider=function(e){return hs(e)===S0};qt.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===kT};qt.isForwardRef=function(e){return hs(e)===C0};qt.isFragment=function(e){return hs(e)===_0};qt.isLazy=function(e){return hs(e)===E0};qt.isMemo=function(e){return hs(e)===A0};qt.isPortal=function(e){return hs(e)===jT};qt.isProfiler=function(e){return hs(e)===j0};qt.isStrictMode=function(e){return hs(e)===k0};qt.isSuspense=function(e){return hs(e)===P0};qt.isSuspenseList=function(e){return hs(e)===T0};qt.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===_0||e===j0||e===k0||e===P0||e===T0||e===Ike||typeof e=="object"&&e!==null&&(e.$$typeof===E0||e.$$typeof===A0||e.$$typeof===S0||e.$$typeof===N0||e.$$typeof===C0||e.$$typeof===cH||e.getModuleId!==void 0)};qt.typeOf=hs;lH.exports=qt;var Mke=lH.exports,Dke=Io,$ke=Mo,Lke="[object Number]";function Fke(e){return typeof e=="number"||$ke(e)&&Dke(e)==Lke}var uH=Fke;const Bke=Vt(uH);var Wke=uH;function qke(e){return Wke(e)&&e!=+e}var Uke=qke;const nf=Vt(Uke);var Os=function(t){return t===0?0:t>0?1:-1},_c=function(t){return lu(t)&&t.indexOf("%")===t.length-1},be=function(t){return Bke(t)&&!nf(t)},zke=function(t){return yt(t)},nr=function(t){return be(t)||lu(t)},Hke=0,Gg=function(t){var n=++Hke;return"".concat(t||"").concat(n)},cu=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!be(t)&&!lu(t))return r;var i;if(_c(t)){var o=t.indexOf("%");i=n*parseFloat(t.slice(0,o))/100}else i=+t;return nf(i)&&(i=r),a&&i>n&&(i=n),i},Wu=function(t){if(!t)return null;var n=Object.keys(t);
vendor: 5,203 bytes, line 4189
4189return n&&n.length?t[n[0]]:null},Vke=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},a=0;a<n;a++)if(!r[t[a]])r[t[a]]=!0;else return!0;return!1},Xa=function(t,n){return be(t)&&be(n)?function(r){return t+r*(n-t)}:function(){return n}};function Xb(e,t,n){return!e||!e.length?null:e.find(function(r){return r&&(typeof t=="function"?t(r):rs(r,t))===n})}var Gke=function(t,n){return be(t)&&be(n)?t-n:lu(t)&&lu(n)?t.localeCompare(n):t instanceof Date&&n instanceof Date?t.getTime()-n.getTime():String(t).localeCompare(String(n))};function Cd(e,t){for(var n in e)if({}.hasOwnProperty.call(e,n)&&(!{}.hasOwnProperty.call(t,n)||e[n]!==t[n]))return!1;for(var r in t)if({}.hasOwnProperty.call(t,r)&&!{}.hasOwnProperty.call(e,r))return!1;return!0}function IS(e){"@babel/helpers - typeof";return IS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},IS(e)}var Yke=["viewBox","children"],Kke=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],$M=["points","pathLength"],$1={svg:Yke,polygon:$M,polyline:$M},ST=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onF
4189ocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],Qb=function(t,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var r=t;if(g.isValidElement(t)&&(r=t.props),!Jh(r))return null;var a={};return Object.keys(r).forEach(function(i){ST.includes(i)&&(a[i]=n||function(o){return r[i](r,o)})}),a},Xke=function(t,n,r){return function(a){return t(n,r,a),null}},Jb=function(t,n,r){if(!Jh(t)||IS(t)!=="object")return null;var a=null;return Object.keys(t).forEach(function(i){var o=t[i];ST.includes(i)&&typeof o=="function"&&(a||(a={}),a[i]=Xke(o,n,r))}),a},Qke=["children"],Jke=["children"];function LM(e,t){if(e==null)return{};var n=Zke(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Zke(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function MS(e){"@babel/helpers - typeof";return MS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},MS(e)}var FM={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"}
vendor: 4,411 bytes, line 4189
4189,ho=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},BM=null,L1=null,NT=function e(t){if(t===BM&&Array.isArray(L1))return L1;var n=[];return g.Children.forEach(t,function(r){yt(r)||(Mke.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),L1=n,BM=t,n};function Ls(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(a){return ho(a)}):r=[ho(t)],NT(e).forEach(function(a){var i=rs(a,"type.displayName")||rs(a,"type.name");r.indexOf(i)!==-1&&n.push(a)}),n}function Sa(e,t){var n=Ls(e,t);return n&&n[0]}var WM=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,a=n.height;return!(!be(r)||r<=0||!be(a)||a<=0)},eje=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],tje=function(t){return t&&t.type&&lu(t.type)&&eje.indexOf(t.type)>=0},nje=function(t){return t&&MS(t)==="object"&&"clipDot"in t},rje=function(t,n,r,a){var i,o=(i=$1==null?void 0:$1[a])!==null&&i!==void 0?i:[];return n.startsWith("data-")||!it(t)&&(a&&o.includes(n)||Kke.includes(n))||r&&ST.includes(n)},pt=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var a=t;if(g.isValidElement(t)&&(a=t.props),!Jh(a))return null;var i={};return Object.keys(a).forEach(function(o){var l;rje((l=a)===null||l===void 0?void 0:l[o],o,n,r)&&(i[o]=a[o])}),i},DS=function e(t,n){if(t===n)return!0;var r=g.Children.count(t);if(r!==g.Children.count(n))return!1;if(r===0)return!0;if(r===1)return qM(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var a=0;a<r;a++){var i=t[a],o=n[a];if(Array.isArray(i)||Array.isArray(o)){if(!e(i,o))return!1}else if(!qM(i,o))return!1}return!0},qM=function(t,n){if(yt(t)&&yt(n))return!0;if(!yt(t)&&!yt(n)){var r=t.props||{},a=r.children,i=LM(r,Qke),o=n.props||{},l=o.children,c=LM(o,Jke);return a&&l?Cd(i,c)&&DS(a,l):!a&&!l?Cd(i,c):!1}return!1},UM=function(t,n){var r=[],a={};return NT(t).forEach(function(i,o){if(tje(i))r.push(i);else if(i){var l=ho(i.type),c=n[l]||{},u=c.handler,h=c.once;if(u&&(!h||!a[l])){var d=u(i,l,o);r.push(d),a[l]=!0}}}),r},aje=function(t){var n=t&&t.type;return n&&FM[n]?FM[n]:null},sje=function(t,n){return NT(n).indexOf(t)},ije=["children","width","height","viewBox","className","style","title","desc"];function $S(){return $S=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},$S.apply(this,arguments)}function oje(e,t){if(e==null)return{};var n=lje(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function lje(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function LS(e){var t=e.children,n=e.width,r=e.height,a=e.viewBox,i=e.className,o=e.style,l=e.title,c=e.desc,u=oje(e,ije),h=a||{width:n,height:r,x:0,y:0},d=kt("recharts-surface",i);return F.createElement("svg",$S({},pt(u,!0,"svg"),{className:d,width:n,height:r,style:o,viewBox:"".concat(h.x," ").concat(h.y," ").concat(h.width," ").concat(h.height)}),F.createElement("title",null,l),F.createElement("desc",null,c),t)}var cje=["children","className"];function FS(){return FS=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},FS.apply(this,arguments)}function uje(e,t){if(e==null)return{};var n=dje(e,t),r,a;
4189if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function dje(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var yn=F.forwardRef(function(e,t){var n=e.children,r=e.className,a=uje(e,cje),i=kt("recharts-layer",r);return F.createElement("g",FS({className:i},pt(a,!0),{ref:t}),n)}),Wc=function(t,n){for(var r=arguments.length,a=new Array(r>2?r-2:0),i=2;i<r;i++)a[i-2]=arguments[i]};function hje(e,t,n){var r=-1,a=e.length;t<0&&(t=-t>a?0:a+t),n=n>a?a:n,n<0&&(n+=a),a=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(a);++r<a;)i[r]=e[r+t];return i}var fje=hje,pje=fje;function mje(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:pje(e,t,n)}var gje=mje,yje="\\ud800-\\udfff",vje="\\u0300-\\u036f",bje="\\ufe20-\\ufe2f",xje="\\u20d0-\\u20ff",wje=vje+bje+xje,_je="\\ufe0e\\ufe0f",kje="\\u200d",jje=RegExp("["+kje+yje+wje+_je+"]");function Sje(e){return jje.test(e)}var dH=Sje;function Nje(e){return e.split("")}var Cje=Nje,hH="\\ud800-\\udfff",Pje="\\u0300-\\u036f",Tje="\\ufe20-\\ufe2f",Aje="\\u20d0-\\u20ff",Eje=Pje+Tje+Aje,Oje="\\ufe0e\\ufe0f",Rje="["+hH+"]",BS="["+Eje+"]",WS="\\ud83c[\\udffb-\\udfff]",Ije="(?:"+BS+"|"+WS+")",fH="[^"+hH+"]",pH="(?:\\ud83c[\\udde6-\\uddff]){2}",mH="[\\ud800-\\udbff][\\udc00-\\udfff]",Mje="\\u200d",gH=Ije+"?",yH="["+Oje+"]?",Dje="(?:"+Mje+"(?:"+[fH,pH,mH].join("|")+")"+yH+gH+")*",$je=yH+gH+Dje,Lje="(?:"+[fH+BS+"?",BS,pH,mH,Rje].join("|")+")",Fje=RegExp(WS+"(?="+WS+")|"+Lje+$je,"g");function Bje(e){return e.match(Fje)||[]}var Wje=Bje,qje=Cje,Uje=dH,zje=Wje;function Hje(e){return Uje(e)?zje(e):qje(e)}var Vje=Hje,Gje=gje,Yje=dH,Kje=Vje,Xje=sH;function Qje(e){return function(t){t=Xje(t);var n=Yje(t)?Kje(t):void 0,r=n?n[0]:t.charAt(0),a=n?Gje(n,1).join(""):t.slice(1);return r[e]()+a}}var Jje=Qje,Zje=Jje,eSe=Zje("toUpperCase"),tSe=eSe;const O0=Vt(tSe);function Xt(e){return function(){return e}}const vH=Math.cos,Zb=Math.sin,Vs=Math.sqrt,ex=Math.PI,R0=2*ex,qS=Math.PI,US=2*qS,uc=1e-6,nSe=US-uc;function bH(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function rSe(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return bH;const n=10**t;return function(r){this._+=r[0];for(let a=1,i=r.length;a<i;++a)this._+=Math.round(arguments[a]*n)/n+r[a]}}class aSe{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?bH:rSe(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,a){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+a}`}bezierCurveTo(t,n,r,a,i,o){this._append`C${+t},${+n},${+r},${+a},${this._x1=+i},${this._y1=+o}`}arcTo(t,n,r,a,i){if(t=+t,n=+n,r=+r,a=+a,i=+i,i<0)throw new Error(`negative radius: ${i}`);let o=this._x1,l=this._y1,c=r-t,u=a-n,h=o-t,d=l-n,f=h*h+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(f>uc)if(!(Math.abs(d*c-u*h)>uc)||!i)this._append`L${this._x1=t},${this._y1=n}`;else{let p=r-o,y=a-l,m=c*c+u*u,v=p*p+y*y,b=Math.sqrt(m),x=Math.sqrt(f),w=i*Math.tan((qS-Math.acos((m+f-v)/(2*b*x)))/2),_=w/x,k=w/b;Math.abs(_-1)>uc&&this._append`L${t+_*h},${n+_*d}`,this._append`A${i},${i},0,0,${+(d*p>h*y)},${this._x1=t+k*c},${this._y1=n+k*u}`}}arc(t,n,r,a,i,o){if(t=+t,n=+n,r=+r,o=!!o,r<0)throw new Error(`negative radius: ${r}`);let l=r*Math.cos(a),c=r*Math.sin(a),u=t+l,h=n+c,d=1^o,f=o?a-i:i-a;this._x1===null?this._append`M${u},${h}`:(Math.abs(this._x1-u)>uc||Math.abs(this._y1-h)>uc)&&this._append`L${u},${h}`,r&&(f<0&&(f=f%US+US),f>nSe?this._append`A${r},${r},0,1,${d},${t-l},${n-c}A${r},${r},0,1,${d},${this._x1=u},${this._y1=h}`:f>uc&&this._append`A${r},${r},0,${+(f>=qS)},${d},${this._x1=t+r*Math.cos(i)},${this._y1=n+r*Math.sin(i)}`)}rect(t,n,r,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+a}h${-r}Z`}toString(){return this._}}function CT(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new aSe(t)}function PT(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function xH(e){this._context=e}xH.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function I0(e){return new xH(e)}function wH(e){return e[0]}function _H(e){return e[1]}function kH(e,t){var n=Xt(!0),r=null,a=I0,i=null,o=CT(l);e=typeof e=="function"?e:e===void 0?wH:Xt(e),t=typeof t=="function"?t:t===void 0?_H:Xt(t);function l(c){var u,h=(c=PT(c)).length,d,f=!1,p;for(r==null&&(i=a(p=o())),u=0;u<=h;++u)!(u<h&&n(d=c[u],u,c))===f&&((f=!f)?i.lineStart():i.lineEnd()),f&&i.point(+e(d,u,c),+t(
4189d,u,c));if(p)return i=null,p+""||null}return l.x=function(c){return arguments.length?(e=typeof c=="function"?c:Xt(+c),l):e},l.y=function(c){return arguments.length?(t=typeof c=="function"?c:Xt(+c),l):t},l.defined=function(c){return arguments.length?(n=typeof c=="function"?c:Xt(!!c),l):n},l.curve=function(c){return arguments.length?(a=c,r!=null&&(i=a(r)),l):a},l.context=function(c){return arguments.length?(c==null?r=i=null:i=a(r=c),l):r},l}function Gy(e,t,n){var r=null,a=Xt(!0),i=null,o=I0,l=null,c=CT(u);e=typeof e=="function"?e:e===void 0?wH:Xt(+e),t=typeof t=="function"?t:Xt(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?_H:Xt(+n);function u(d){var f,p,y,m=(d=PT(d)).length,v,b=!1,x,w=new Array(m),_=new Array(m);for(i==null&&(l=o(x=c())),f=0;f<=m;++f){if(!(f<m&&a(v=d[f],f,d))===b)if(b=!b)p=f,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),y=f-1;y>=p;--y)l.point(w[y],_[y]);l.lineEnd(),l.areaEnd()}b&&(w[f]=+e(v,f,d),_[f]=+t(v,f,d),l.point(r?+r(v,f,d):w[f],n?+n(v,f,d):_[f]))}if(x)return l=null,x+""||null}function h(){return kH().defined(a).curve(o).context(i)}return u.x=function(d){return arguments.length?(e=typeof d=="function"?d:Xt(+d),r=null,u):e},u.x0=function(d){return arguments.length?(e=typeof d=="function"?d:Xt(+d),u):e},u.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:Xt(+d),u):r},u.y=function(d){return arguments.length?(t=typeof d=="function"?d:Xt(+d),n=null,u):t},u.y0=function(d){return arguments.length?(t=typeof d=="function"?d:Xt(+d),u):t},u.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:Xt(+d),u):n},u.lineX0=u.lineY0=function(){return h().x(e).y(t)},u.lineY1=function(){return h().x(e).y(n)},u.lineX1=function(){return h().x(r).y(t)},u.defined=function(d){return arguments.length?(a=typeof d=="function"?d:Xt(!!d),u):a},u.curve=function(d){return arguments.length?(o=d,i!=null&&(l=o(i)),u):o},u.context=function(d){return arguments.length?(d==null?i=l=null:l=o(i=d),u):i},u}class jH{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function sSe(e){return new jH(e,!0)}function iSe(e){return new jH(e,!1)}const TT={draw(e,t){const n=Vs(t/ex);e.moveTo(n,0),e.arc(0,0,n,0,R0)}},oSe={draw(e,t){const n=Vs(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},SH=Vs(1/3),lSe=SH*2,cSe={draw(e,t){const n=Vs(t/lSe),r=n*SH;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},uSe={draw(e,t){const n=Vs(t),r=-n/2;e.rect(r,r,n,n)}},dSe=.8908130915292852,NH=Zb(ex/10)/Zb(7*ex/10),hSe=Zb(R0/10)*NH,fSe=-vH(R0/10)*NH,pSe={draw(e,t){const n=Vs(t*dSe),r=hSe*n,a=fSe*n;e.moveTo(0,-n),e.lineTo(r,a);for(let i=1;i<5;++i){const o=R0*i/5,l=vH(o),c=Zb(o);e.lineTo(c*n,-l*n),e.lineTo(l*r-c*a,c*r+l*a)}e.closePath()}},F1=Vs(3),mSe={draw(e,t){const n=-Vs(t/(F1*3));e.moveTo(0,n*2),e.lineTo(-F1*n,-n),e.lineTo(F1*n,-n),e.closePath()}},Ba=-.5,Wa=Vs(3)/2,zS=1/Vs(12),gSe=(zS/2+1)*3,ySe={draw(e,t){const n=Vs(t/gSe),r=n/2,a=n*zS,i=r,o=n*zS+n,l=-i,c=o;e.moveTo(r,a),e.lineTo(i,o),e.lineTo(l,c),e.lineTo(Ba*r-Wa*a,Wa*r+Ba*a),e.lineTo(Ba*i-Wa*o,Wa*i+Ba*o),e.lineTo(Ba*l-Wa*c,Wa*l+Ba*c),e.lineTo(Ba*r+Wa*a,Ba*a-Wa*r),e.lineTo(Ba*i+Wa*o,Ba*o-Wa*i),e.lineTo(Ba*l+Wa*c,Ba*c-Wa*l),e.closePath()}};function vSe(e,t){let n=null,r=CT(a);e=typeof e=="function"?e:Xt(e||TT),t=typeof t=="function"?t:Xt(t===void 0?64:+t);function a(){let i;if(n||(n=i=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+""||null}return a.type=function(i){return arguments.length?(e=typeof i=="function"?i:Xt(i),a):e},a.size=function(i){return arguments.length?(t=typeof i=="function"?i:Xt(+i),a):t},a.context=function(i){return arguments.length?(n=i??null,a):n},a}function tx(){}function nx(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function CH(e){this._context=e}CH.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:nx(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:nx(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function bSe(e){return new CH(e)}function PH(e){this._context=e}PH.prototype={areaStart:tx,areaEnd:tx,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:nx(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function xSe(e){return new PH(e)}function TH(e){this._context=e}TH.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:nx(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function wSe(e){return new TH(e)}function AH(e){this._context=e}AH.prototype={areaStart:tx,areaEnd:tx,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function _Se(e){return new AH(e)}function zM(e){return e<0?-1:1}
4189function HM(e,t,n){var r=e._x1-e._x0,a=t-e._x1,i=(e._y1-e._y0)/(r||a<0&&-0),o=(n-e._y1)/(a||r<0&&-0),l=(i*a+o*r)/(r+a);return(zM(i)+zM(o))*Math.min(Math.abs(i),Math.abs(o),.5*Math.abs(l))||0}function VM(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function B1(e,t,n){var r=e._x0,a=e._y0,i=e._x1,o=e._y1,l=(i-r)/3;e._context.bezierCurveTo(r+l,a+l*t,i-l,o-l*n,i,o)}function rx(e){this._context=e}rx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:B1(this,this._t0,VM(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,B1(this,VM(this,n=HM(this,e,t)),n);break;default:B1(this,this._t0,n=HM(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function EH(e){this._context=new OH(e)}(EH.prototype=Object.create(rx.prototype)).point=function(e,t){rx.prototype.point.call(this,t,e)};function OH(e){this._context=e}OH.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,a,i){this._context.bezierCurveTo(t,e,r,n,i,a)}};function kSe(e){return new rx(e)}function jSe(e){return new EH(e)}function RH(e){this._context=e}RH.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=GM(e),a=GM(t),i=0,o=1;o<n;++i,++o)this._context.bezierCurveTo(r[0][i],a[0][i],r[1][i],a[1][i],e[o],t[o]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function GM(e){var t,n=e.length-1,r,a=new Array(n),i=new Array(n),o=new Array(n);for(a[0]=0,i[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)a[t]=1,i[t]=4,o[t]=4*e[t]+2*e[t+1];for(a[n-1]=2,i[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=a[t]/i[t-1],i[t]-=r,o[t]-=r*o[t-1];for(a[n-1]=o[n-1]/i[n-1],t=n-2;t>=0;--t)a[t]=(o[t]-a[t+1])/i[t];for(i[n-1]=(e[n]+a[n-1])/2,t=0;t<n-1;++t)i[t]=2*e[t+1]-a[t+1];return[a,i]}function SSe(e){return new RH(e)}function M0(e,t){this._context=e,this._t=t}M0.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function NSe(e){return new M0(e,.5)}function CSe(e){return new M0(e,0)}function PSe(e){return new M0(e,1)}function ih(e,t){if((o=e.length)>1)for(var n=1,r,a,i=e[t[0]],o,l=i.length;n<o;++n)for(a=i,i=e[t[n]],r=0;r<l;++r)i[r][1]+=i[r][0]=isNaN(a[r][1])?a[r][0]:a[r][1]}function HS(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function TSe(e,t){return e[t]}function ASe(e){const t=[];return t.key=e,t}function ESe(){var e=Xt([]),t=HS,n=ih,r=TSe;function a(i){var o=Array.from(e.apply(this,arguments),ASe),l,c=o.length,u=-1,h;for(const d of i)for(l=0,++u;l<c;++l)(o[l][u]=[0,+r(d,o[l].key,u,i)]).data=d;for(l=0,h=PT(t(o));l<c;++l)o[h[l]].index=l;return n(o,h),o}return a.keys=function(i){return arguments.length?(e=typeof i=="function"?i:Xt(Array.from(i)),a):e},a.value=function(i){return arguments.length?(r=typeof i=="function"?i:Xt(+i),a):r},a.order=function(i){return arguments.length?(t=i==null?HS:typeof i=="function"?i:Xt(Array.from(i)),a):t},a.offset=function(i){return arguments.length?(n=i??ih,a):n},a}function OSe(e,t){if((r=e.length)>0){for(var n,r,a=0,i=e[0].length,o;a<i;++a){for(o=n=0;n<r;++n)o+=e[n][a][1]||0;if(o)for(n=0;n<r;++n)e[n][a][1]/=o}ih(e,t)}}function RSe(e,t){if((a=e.length)>0){for(var n=0,r=e[t[0]],a,i=r.length;n<i;++n){for(var o=0,l=0;o<a;++o)l+=e[o][n][1]||0;r[n][1]+=r[n][0]=-l/2}ih(e,t)}}function ISe(e,t){if(!(!((o=e.length)>0)||!((i=(a=e[t[0]]).length)>0))){for(var n=0,r=1,a,i,o;r<i;++r){for(var l=0,c=0,u=0;l<o;++l){for(var h=e[t[l]],d=h[r][1]||0,f=h[r-1][1]||0,p=(d-f)/2,y=0;y<l;++y){var m=e[t[y]],v=m[r][1]||0,b=m[r-1][1]||0;p+=v-b}c+=d,u+=p*d}
vendor: 7,383 bytes, lines 4189-4192
4189a[r-1][1]+=a[r-1][0]=n,c&&(n-=u/c)}a[r-1][1]+=a[r-1][0]=n,ih(e,t)}}function bm(e){"@babel/helpers - typeof";return bm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bm(e)}var MSe=["type","size","sizeType"];function VS(){return VS=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},VS.apply(this,arguments)}function YM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function KM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?YM(Object(n),!0).forEach(function(r){DSe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function DSe(e,t,n){return t=$Se(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $Se(e){var t=LSe(e,"string");return bm(t)=="symbol"?t:t+""}function LSe(e,t){if(bm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(bm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function FSe(e,t){if(e==null)return{};var n=BSe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function BSe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var IH={symbolCircle:TT,symbolCross:oSe,symbolDiamond:cSe,symbolSquare:uSe,symbolStar:pSe,symbolTriangle:mSe,symbolWye:ySe},WSe=Math.PI/180,qSe=function(t){var n="symbol".concat(O0(t));return IH[n]||TT},USe=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var a=18*WSe;return 1.25*t*t*(Math.tan(a)-Math.tan(a*2)*Math.pow(Math.tan(a),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},zSe=function(t,n){IH["symbol".concat(O0(t))]=n},AT=function(t){var n=t.type,r=n===void 0?"circle":n,a=t.size,i=a===void 0?64:a,o=t.sizeType,l=o===void 0?"area":o,c=FSe(t,MSe),u=KM(KM({},c),{},{type:r,size:i,sizeType:l}),h=function(){var v=qSe(r),b=vSe().type(v).size(USe(i,l,r));return b()},d=u.className,f=u.cx,p=u.cy,y=pt(u,!0);return f===+f&&p===+p&&i===+i?F.createElement("path",VS({},y,{className:kt("recharts-symbols",d),transform:"translate(".concat(f,", ").concat(p,")"),d:h()})):null};AT.registerSymbol=zSe;function oh(e){"@babel/helpers - typeof";return oh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oh(e)}function GS(){return GS=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},GS.apply(this,arguments)}function XM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function HSe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?XM(Object(n),!0).forEach(function(r){xm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function VSe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function GSe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,DH(r.key),r)}}function YSe(e,t,n){return t&&GSe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function KSe(e,t,n){return t=ax(t),XSe(e,MH()?Reflect.construct(t,n||[],ax(e).constructor):t.apply(e,n))}function XSe(e,t){if(t&&(oh(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return QSe(e)}function QSe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function MH(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(MH=function(){return!!e})()}function ax(e){return ax=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ax(e)}function JSe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&YS(e,t)}function YS(e,t){return YS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},YS(e,t)}function xm(e,t,n){return t=DH(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DH(e){var t=ZSe(e,"string");return oh(t)=="symbol"?t:t+""}function ZSe(e,t){if(oh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(oh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var qa=32,ET=function(e){function t(){return VSe(this,t),KSe(this,t,arguments)}return JSe(t,e),YSe(t,[{key:"renderIcon",value:function(r){var a=this.props.inactiveColor,i=qa/2,o=qa/6,l=qa/3,c=r.inactive?a:r.color;if(r.type==="plainline")return F.createElement("line",{strokeWidth:4,fill:"none",stroke:c,strokeDasharray:r.payload.strokeDasharray,x1:0,y1:i,x2:qa,y2:i,className:"recharts-legend-icon"});if(r.type==="line")return F.createElement("path",{strokeWidth:4,fill:"none",stroke:c,d:"M0,".concat(i,"h").concat(l,`
4190            A`).concat(o,",").concat(o,",0,1,1,").concat(2*l,",").concat(i,`
4191            H`).concat(qa,"M").concat(2*l,",").concat(i,`
4192            A`).concat(o,",").concat(o,",0,1,1,").concat(l,",").concat(i),className:"recharts-legend-icon"});if(r.type==="rect")return F.createElement("path",{stroke:"none",fill:c,d:"M0,".concat(qa/8,"h").concat(qa,"v").concat(qa*3/4,"h").concat(-qa,"z"),className:"recharts-legend-icon"});if(F.isValidElement(r.legendIcon)){var u=HSe({},r);return delete u.legendIcon,F.cloneElement(r.legendIcon,u)}return F.createElement(AT,{fill:c,cx:i,cy:i,size:qa,sizeType:"diameter",type:r.type})}},{key:"renderItems",value:function(){var r=this,a=this.props,i=a.payload,o=a.iconSize,l=a.layout,c=a.formatter,u=a.inactiveColor,h={x:0,y:0,width:qa,height:qa}
4192,d={display:l==="horizontal"?"inline-block":"block",marginRight:10},f={display:"inline-block",verticalAlign:"middle",marginRight:4};return i.map(function(p,y){var m=p.formatter||c,v=kt(xm(xm({"recharts-legend-item":!0},"legend-item-".concat(y),!0),"inactive",p.inactive));if(p.type==="none")return null;var b=it(p.value)?null:p.value;Wc(!it(p.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var x=p.inactive?u:p.color;return F.createElement("li",GS({className:v,style:d,key:"legend-item-".concat(y)},Jb(r.props,p,y)),F.createElement(LS,{width:o,height:o,viewBox:h,style:f},r.renderIcon(p)),F.createElement("span",{className:"recharts-legend-item-text",style:{color:x}},m?m(b,p,y):b))})}},{key:"render",value:function(){var r=this.props,a=r.payload,i=r.layout,o=r.align;if(!a||!a.length)return null;var l={padding:0,margin:0,textAlign:i==="horizontal"?o:"left"};return F.createElement("ul",{className:"recharts-default-legend",style:l},this.renderItems())}}])}(g.PureComponent);xm(ET,"displayName","Legend");xm(ET,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var eNe=b0;function tNe(){this.__data__=new eNe,this.size=0}var nNe=tNe;function rNe(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var aNe=rNe;function sNe(e){return this.__data__.get(e)}var iNe=sNe;function oNe(e){return this.__data__.has(e)}var lNe=oNe,cNe=b0,uNe=vT,dNe=bT,hNe=200;function fNe(e,t){var n=this.__data__;if(n instanceof cNe){var r=n.__data__;if(!uNe||r.length<hNe-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new dNe(r)}return n.set(e,t),this.size=n.size,this}var pNe=fNe,mNe=b0,gNe=nNe,yNe=aNe,vNe=iNe,bNe=lNe,xNe=pNe;function rf(e){var t=this.__data__=new mNe(e);this.size=t.size}rf.prototype.clear=gNe;rf.prototype.delete=yNe;rf.prototype.get=vNe;rf.prototype.has=bNe;rf.prototype.set=xNe;var $H=rf,wNe="__lodash_hash_undefined__";function _Ne(e){return this.__data__.set(e,wNe),this}var kNe=_Ne;function jNe(e){return this.__data__.has(e)}var SNe=jNe,NNe=bT,CNe=kNe,PNe=SNe;function sx(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new NNe;++t<n;)this.add(e[t])}sx.prototype.add=sx.prototype.push=CNe;sx.prototype.has=PNe;var LH=sx;function TNe(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var FH=TNe;function ANe(e,t){return e.has(t)}var BH=ANe,ENe=LH,ONe=FH,RNe=BH,INe=1,MNe=2;function DNe(e,t,n,r,a,i){var o=n&INe,l=e.length,c=t.length;if(l!=c&&!(o&&c>l))return!1;var u=i.get(e),h=i.get(t);if(u&&h)return u==t&&h==e;var d=-1,f=!0,p=n&MNe?new ENe:void 0;for(i.set(e,t),i.set(t,e);++d<l;){var y=e[d],m=t[d];if(r)var v=o?r(m,y,d,t,e,i):r(y,m,d,e,t,i);if(v!==void 0){if(v)continue;f=!1;break}if(p){if(!ONe(t,function(b,x){if(!RNe(p,x)&&(y===b||a(y,b,n,r,i)))return p.push(x)})){f=!1;break}}else if(!(y===m||a(y,m,n,r,i))){f=!1;break}}return i.delete(e),i.delete(t),f}var WH=DNe,$Ne=Di,LNe=$Ne.Uint8Array,FNe=LNe;function BNe(e){var t=-1,n=Array(e.size);return e.forEach(function(r,a){n[++t]=[a,r]}),n}var WNe=BNe;function qNe(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var OT=qNe,QM=Vg,JM=FNe,UNe=yT,zNe=WH,HNe=WNe,VNe=OT,GNe=1,YNe=2,KNe="[object Boolean]",XNe="[object Date]",QNe="[object Error]",JNe="[object Map]",ZNe="[object Number]",eCe="[object RegExp]",tCe="[object Set]",nCe="[object String]",rCe="[object Symbol]",aCe="[object ArrayBuffer]",sCe="[object DataView]",ZM=QM?QM.prototype:void 0,W1=ZM?ZM.valueOf:void 0;function iCe(e,t,n,r,a,i,o){switch(n){case sCe:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case aCe:return!(e.byteLength!=t.byteLength||!i(new JM(e),new JM(t)));case KNe:case XNe:case ZNe:return UNe(+e,+t);case QNe:return e.name==t.name&&e.message==t.message;case eCe:case nCe:return e==t+"";case JNe:var l=HNe;case tCe:var c=r&GNe;if(l||(l=VNe),e.size!=t.size&&!c)return!1;var u=o.get(e);if(u)return u==t;r|=YNe,o.set(e,t);var h=zNe(l(e),l(t),r,a,i,o);return o.delete(e),h;case rCe:if(W1)return W1.call(e)==W1.call(t)}return!1}var oCe=iCe;function lCe(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e}var qH=lCe,cCe=qH,uCe=wa;function dCe(e,t,n){var r=t(e);return uCe(e)?r:cCe(r,n(e))}var hCe=dCe;function fCe(e,t){for(var n=-1,r=e==null?0:e.length,a=0,i=[];++n<r;){var o=e[n];t(o,n,e)&&(i[a++]=o)}return i}var pCe=fCe;function mCe(){return[]}var gCe=mCe,yCe=pCe,vCe=gCe,bCe=Object.prototype,xCe=bCe.propertyIsEnumerable,e4=Object.getOwnPropertySymbols,wCe=e4?function(e){return e==null?[]:(e=Object(e),yCe(e4(e),function(t){return xCe.call(e,t)}))}:vCe,_Ce=wCe;function kCe(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var jCe=kCe,SCe=Io,NCe=Mo,CCe="[object Arguments]";function PCe(e){return NCe(e)&&SCe(e)==CCe}var TCe=PCe,t4=TCe,ACe=Mo,UH=Object.prototype,ECe=UH.hasOwnProperty,OCe=UH.propertyIsEnumerable,RCe=t4(function(){return arguments}())?t4:function(e){return ACe(e)&&ECe.call(e,"callee")&&!OCe.call(e,"callee")},RT=RCe,ix={exports:{}};function ICe(){return!1}var MCe=ICe;ix.exports;(function(e,t){var n=Di,r=MCe,a=t&&!t.nodeType&&t,i=a&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===a,l=o?n.Buffer:void 0,c=l?l.isBuffer:void 0,u=c||r;e.exports=u}
vendor: 4,381 bytes, line 4192
4192)(ix,ix.exports);var zH=ix.exports,DCe=9007199254740991,$Ce=/^(?:0|[1-9]\d*)$/;function LCe(e,t){var n=typeof e;return t=t??DCe,!!t&&(n=="number"||n!="symbol"&&$Ce.test(e))&&e>-1&&e%1==0&&e<t}var IT=LCe,FCe=9007199254740991;function BCe(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=FCe}var MT=BCe,WCe=Io,qCe=MT,UCe=Mo,zCe="[object Arguments]",HCe="[object Array]",VCe="[object Boolean]",GCe="[object Date]",YCe="[object Error]",KCe="[object Function]",XCe="[object Map]",QCe="[object Number]",JCe="[object Object]",ZCe="[object RegExp]",ePe="[object Set]",tPe="[object String]",nPe="[object WeakMap]",rPe="[object ArrayBuffer]",aPe="[object DataView]",sPe="[object Float32Array]",iPe="[object Float64Array]",oPe="[object Int8Array]",lPe="[object Int16Array]",cPe="[object Int32Array]",uPe="[object Uint8Array]",dPe="[object Uint8ClampedArray]",hPe="[object Uint16Array]",fPe="[object Uint32Array]",nn={};nn[sPe]=nn[iPe]=nn[oPe]=nn[lPe]=nn[cPe]=nn[uPe]=nn[dPe]=nn[hPe]=nn[fPe]=!0;nn[zCe]=nn[HCe]=nn[rPe]=nn[VCe]=nn[aPe]=nn[GCe]=nn[YCe]=nn[KCe]=nn[XCe]=nn[QCe]=nn[JCe]=nn[ZCe]=nn[ePe]=nn[tPe]=nn[nPe]=!1;function pPe(e){return UCe(e)&&qCe(e.length)&&!!nn[WCe(e)]}var mPe=pPe;function gPe(e){return function(t){return e(t)}}var HH=gPe,ox={exports:{}};ox.exports;(function(e,t){var n=Z7,r=t&&!t.nodeType&&t,a=r&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===r,o=i&&n.process,l=function(){try{var c=a&&a.require&&a.require("util").types;return c||o&&o.binding&&o.binding("util")}catch{}}();e.exports=l})(ox,ox.exports);var yPe=ox.exports,vPe=mPe,bPe=HH,n4=yPe,r4=n4&&n4.isTypedArray,xPe=r4?bPe(r4):vPe,VH=xPe,wPe=jCe,_Pe=RT,kPe=wa,jPe=zH,SPe=IT,NPe=VH,CPe=Object.prototype,PPe=CPe.hasOwnProperty;function TPe(e,t){var n=kPe(e),r=!n&&_Pe(e),a=!n&&!r&&jPe(e),i=!n&&!r&&!a&&NPe(e),o=n||r||a||i,l=o?wPe(e.length,String):[],c=l.length;for(var u in e)(t||PPe.call(e,u))&&!(o&&(u=="length"||a&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||SPe(u,c)))&&l.push(u);return l}var APe=TPe,EPe=Object.prototype;function OPe(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||EPe;return e===n}var RPe=OPe;function IPe(e,t){return function(n){return e(t(n))}}var GH=IPe,MPe=GH,DPe=MPe(Object.keys,Object),$Pe=DPe,LPe=RPe,FPe=$Pe,BPe=Object.prototype,WPe=BPe.hasOwnProperty;function qPe(e){if(!LPe(e))return FPe(e);var t=[];for(var n in Object(e))WPe.call(e,n)&&n!="constructor"&&t.push(n);return t}var UPe=qPe,zPe=gT,HPe=MT;function VPe(e){return e!=null&&HPe(e.length)&&!zPe(e)}var D0=VPe,GPe=APe,YPe=UPe,KPe=D0;function XPe(e){return KPe(e)?GPe(e):YPe(e)}var DT=XPe,QPe=hCe,JPe=_Ce,ZPe=DT;function e2e(e){return QPe(e,ZPe,JPe)}var t2e=e2e,a4=t2e,n2e=1,r2e=Object.prototype,a2e=r2e.hasOwnProperty;function s2e(e,t,n,r,a,i){var o=n&n2e,l=a4(e),c=l.length,u=a4(t),h=u.length;if(c!=h&&!o)return!1;for(var d=c;d--;){var f=l[d];if(!(o?f in t:a2e.call(t,f)))return!1}var p=i.get(e),y=i.get(t);if(p&&y)return p==t&&y==e;var m=!0;i.set(e,t),i.set(t,e);for(var v=o;++d<c;){f=l[d];var b=e[f],x=t[f];if(r)var w=o?r(x,b,f,t,e,i):r(b,x,f,e,t,i);if(!(w===void 0?b===x||a(b,x,n,r,i):w)){m=!1;break}v||(v=f=="constructor")}if(m&&!v){var _=e.constructor,k=t.constructor;_!=k&&"constructor"in e&&"constructor"in t&&!(typeof _=="function"&&_ instanceof _&&typeof k=="function"&&k instanceof k)&&(m=!1)}return i.delete(e),i.delete(t),m}var i2e=s2e,o2e=wu,l2e=Di,c2e=o2e(l2e,"DataView"),u2e=c2e,d2e=wu,h2e=Di,f2e=d2e(h2e,"Promise"),p2e=f2e,m2e=wu,g2e=Di,y2e=m2e(g2e,"Set"),YH=y2e,v2e=wu,b2e=Di,x2e=v2e(b2e,"WeakMap"),w2e=x2e,KS=u2e,XS=vT,QS=p2e,JS=YH,ZS=w2e,KH=Io,af=tH,s4="[object Map]",_2e="[object Object]",i4="[object Promise]",o4="[object Set]",l4="[object WeakMap]",c4="[object DataView]",k2e=af(KS),j2e=af(XS),S2e=af(QS),N2e=af(JS),C2e=af(ZS),dc=KH;(KS&&dc(new KS(new ArrayBuffer(1)))!=c4||XS&&dc(new XS)!=s4||QS&&dc(QS.resolve())!=i4||JS&&dc(new JS)!=o4||ZS&&dc(new ZS)!=l4)&&(dc=function(e){var t=KH(e),n=t==_2e?e.constructor:void 0,r=n?af(n):"";if(r)switch(r){case k2e:return c4;case j2e:return s4;case S2e:return i4;case N2e:return o4;case C2e:return l4}return t});var P2e=dc,q1=$H,T2e=WH,A2e=oCe,E2e=i2e,u4=P2e,d4=wa,h4=zH,O2e=VH,R2e=1,f4="[object Arguments]",p4="[object Array]",Yy="[object Object]",I2e=Object.prototype,m4=I2e.hasOwnProperty;function M2e(e,t,n,r,a,i){var o=d4(e),l=d4(t),c=o?p4:u4(e),u=l?p4:u4(t);c=c==f4?Yy:c,u=u==f4?Yy:u;var h=c==Yy,d=u==Yy,f=c==u;
vendor: 4,137 bytes, line 4192
4192if(f&&h4(e)){if(!h4(t))return!1;o=!0,h=!1}if(f&&!h)return i||(i=new q1),o||O2e(e)?T2e(e,t,n,r,a,i):A2e(e,t,c,n,r,a,i);if(!(n&R2e)){var p=h&&m4.call(e,"__wrapped__"),y=d&&m4.call(t,"__wrapped__");if(p||y){var m=p?e.value():e,v=y?t.value():t;return i||(i=new q1),a(m,v,n,r,i)}}return f?(i||(i=new q1),E2e(e,t,n,r,a,i)):!1}var D2e=M2e,$2e=D2e,g4=Mo;function XH(e,t,n,r,a){return e===t?!0:e==null||t==null||!g4(e)&&!g4(t)?e!==e&&t!==t:$2e(e,t,n,r,XH,a)}var $T=XH,L2e=$H,F2e=$T,B2e=1,W2e=2;function q2e(e,t,n,r){var a=n.length,i=a,o=!r;if(e==null)return!i;for(e=Object(e);a--;){var l=n[a];if(o&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++a<i;){l=n[a];var c=l[0],u=e[c],h=l[1];if(o&&l[2]){if(u===void 0&&!(c in e))return!1}else{var d=new L2e;if(r)var f=r(u,h,c,e,t,d);if(!(f===void 0?F2e(h,u,B2e|W2e,r,d):f))return!1}}return!0}var U2e=q2e,z2e=Kl;function H2e(e){return e===e&&!z2e(e)}var QH=H2e,V2e=QH,G2e=DT;function Y2e(e){for(var t=G2e(e),n=t.length;n--;){var r=t[n],a=e[r];t[n]=[r,a,V2e(a)]}return t}var K2e=Y2e;function X2e(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}var JH=X2e,Q2e=U2e,J2e=K2e,Z2e=JH;function eTe(e){var t=J2e(e);return t.length==1&&t[0][2]?Z2e(t[0][0],t[0][1]):function(n){return n===e||Q2e(n,e,t)}}var tTe=eTe;function nTe(e,t){return e!=null&&t in Object(e)}var rTe=nTe,aTe=iH,sTe=RT,iTe=wa,oTe=IT,lTe=MT,cTe=w0;function uTe(e,t,n){t=aTe(t,e);for(var r=-1,a=t.length,i=!1;++r<a;){var o=cTe(t[r]);if(!(i=e!=null&&n(e,o)))break;e=e[o]}return i||++r!=a?i:(a=e==null?0:e.length,!!a&&lTe(a)&&oTe(o,a)&&(iTe(e)||sTe(e)))}var dTe=uTe,hTe=rTe,fTe=dTe;function pTe(e,t){return e!=null&&fTe(e,t,hTe)}var mTe=pTe,gTe=$T,yTe=oH,vTe=mTe,bTe=mT,xTe=QH,wTe=JH,_Te=w0,kTe=1,jTe=2;function STe(e,t){return bTe(e)&&xTe(t)?wTe(_Te(e),t):function(n){var r=yTe(n,e);return r===void 0&&r===t?vTe(n,e):gTe(t,r,kTe|jTe)}}var NTe=STe;function CTe(e){return e}var sf=CTe;function PTe(e){return function(t){return t==null?void 0:t[e]}}var TTe=PTe,ATe=_T;function ETe(e){return function(t){return ATe(t,e)}}var OTe=ETe,RTe=TTe,ITe=OTe,MTe=mT,DTe=w0;function $Te(e){return MTe(e)?RTe(DTe(e)):ITe(e)}var LTe=$Te,FTe=tTe,BTe=NTe,WTe=sf,qTe=wa,UTe=LTe;function zTe(e){return typeof e=="function"?e:e==null?WTe:typeof e=="object"?qTe(e)?BTe(e[0],e[1]):FTe(e):UTe(e)}var of=zTe;function HTe(e,t,n,r){for(var a=e.length,i=n+(r?1:-1);r?i--:++i<a;)if(t(e[i],i,e))return i;return-1}var VTe=HTe;function GTe(e){return e!==e}var YTe=GTe;function KTe(e,t,n){for(var r=n-1,a=e.length;++r<a;)if(e[r]===t)return r;return-1}var XTe=KTe,QTe=VTe,JTe=YTe,ZTe=XTe;function eAe(e,t,n){return t===t?ZTe(e,t,n):QTe(e,JTe,n)}var tAe=eAe,nAe=tAe;function rAe(e,t){var n=e==null?0:e.length;return!!n&&nAe(e,t,0)>-1}var aAe=rAe;function sAe(e,t,n){for(var r=-1,a=e==null?0:e.length;++r<a;)if(n(t,e[r]))return!0;return!1}var iAe=sAe;function oAe(){}var lAe=oAe,U1=YH,cAe=lAe,uAe=OT,dAe=1/0,hAe=U1&&1/uAe(new U1([,-0]))[1]==dAe?function(e){return new U1(e)}:cAe,fAe=hAe,pAe=LH,mAe=aAe,gAe=iAe,yAe=BH,vAe=fAe,bAe=OT,xAe=200;function wAe(e,t,n){var r=-1,a=mAe,i=e.length,o=!0,l=[],c=l;if(n)o=!1,a=gAe;else if(i>=xAe){var u=t?null:vAe(e);if(u)return bAe(u);o=!1,a=yAe,c=new pAe}else c=t?[]:l;e:for(;++r<i;){var h=e[r],d=t?t(h):h;if(h=n||h!==0?h:0,o&&d===d){for(var f=c.length;f--;)if(c[f]===d)continue e;t&&c.push(d),l.push(h)}else a(c,d,n)||(c!==l&&c.push(d),l.push(h))}return l}var _Ae=wAe,kAe=of,jAe=_Ae;function SAe(e,t){return e&&e.length?jAe(e,kAe(t)):[]}var NAe=SAe;const y4=Vt(NAe);function ZH(e,t,n){return t===!0?y4(e,n):it(t)?y4(e,t):e}function lh(e){"@babel/helpers - typeof";return lh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lh(e)}var CAe=["ref"];function v4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function zi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};
vendor: 4,101 bytes, line 4192
4192t%2?v4(Object(n),!0).forEach(function(r){$0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function PAe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b4(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,t9(r.key),r)}}function TAe(e,t,n){return t&&b4(e.prototype,t),n&&b4(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function AAe(e,t,n){return t=lx(t),EAe(e,e9()?Reflect.construct(t,n||[],lx(e).constructor):t.apply(e,n))}function EAe(e,t){if(t&&(lh(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return OAe(e)}function OAe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function e9(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(e9=function(){return!!e})()}function lx(e){return lx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},lx(e)}function RAe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&eN(e,t)}function eN(e,t){return eN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},eN(e,t)}function $0(e,t,n){return t=t9(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t9(e){var t=IAe(e,"string");return lh(t)=="symbol"?t:t+""}function IAe(e,t){if(lh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(lh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function MAe(e,t){if(e==null)return{};var n=DAe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function DAe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function $Ae(e){return e.value}function LAe(e,t){if(F.isValidElement(e))return F.cloneElement(e,t);if(typeof e=="function")return F.createElement(e,t);t.ref;var n=MAe(t,CAe);return F.createElement(ET,n)}var x4=1,Pd=function(e){function t(){var n;PAe(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return n=AAe(this,t,[].concat(a)),$0(n,"lastBoundingBox",{width:-1,height:-1}),n}return RAe(t,e),TAe(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();return r.height=this.wrapperNode.offsetHeight,r.width=this.wrapperNode.offsetWidth,r}return null}},{key:"updateBBox",value:function(){var r=this.props.onBBoxUpdate,a=this.getBBox();a?(Math.abs(a.width-this.lastBoundingBox.width)>x4||Math.abs(a.height-this.lastBoundingBox.height)>x4)&&(this.lastBoundingBox.width=a.width,this.lastBoundingBox.height=a.height,r&&r(a)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?zi({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var a=this.props,i=a.layout,o=a.align,l=a.verticalAlign,c=a.margin,u=a.chartWidth,h=a.chartHe
4192ight,d,f;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(o==="center"&&i==="vertical"){var p=this.getBBoxSnapshot();d={left:((u||0)-p.width)/2}}else d=o==="right"?{right:c&&c.right||0}:{left:c&&c.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(l==="middle"){var y=this.getBBoxSnapshot();f={top:((h||0)-y.height)/2}}else f=l==="bottom"?{bottom:c&&c.bottom||0}:{top:c&&c.top||0};return zi(zi({},d),f)}},{key:"render",value:function(){var r=this,a=this.props,i=a.content,o=a.width,l=a.height,c=a.wrapperStyle,u=a.payloadUniqBy,h=a.payload,d=zi(zi({position:"absolute",width:o||"auto",height:l||"auto"},this.getDefaultPosition(c)),c);return F.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(p){r.wrapperNode=p}},LAe(i,zi(zi({},this.props),{},{payload:ZH(h,u,$Ae)})))}}],[{key:"getWithHeight",value:function(r,a){var i=zi(zi({},this.defaultProps),r.props),o=i.layout;return o==="vertical"&&be(r.props.height)?{height:r.props.height}:o==="horizontal"?{width:r.props.width||a}:null}}])}(g.PureComponent);$0(Pd,"displayName","Legend");$0(Pd,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var w4=Vg,FAe=RT,BAe=wa,_4=w4?w4.isConcatSpreadable:void 0;function WAe(e){return BAe(e)||FAe(e)||!!(_4&&e&&e[_4])}var qAe=WAe,UAe=qH,zAe=qAe;function n9(e,t,n,r,a){var i=-1,o=e.length;for(n||(n=zAe),a||(a=[]);++i<o;){var l=e[i];t>0&&n(l)?t>1?n9(l,t-1,n,r,a):UAe(a,l):r||(a[a.length]=l)}return a}var r9=n9;function HAe(e){return function(t,n,r){for(var a=-1,i=Object(t),o=r(t),l=o.length;l--;){var c=o[e?l:++a];if(n(i[c],c,i)===!1)break}return t}}var VAe=HAe,GAe=VAe,YAe=GAe(),KAe=YAe,XAe=KAe,QAe=DT;function JAe(e,t){return e&&XAe(e,t,QAe)}var a9=JAe,ZAe=D0;function eEe(e,t){return function(n,r){if(n==null)return n;if(!ZAe(n))return e(n,r);for(var a=n.length,i=t?a:-1,o=Object(n);(t?i--:++i<a)&&r(o[i],i,o)!==!1;);return n}}var tEe=eEe,nEe=a9,rEe=tEe,aEe=rEe(nEe),LT=aEe,sEe=LT,iEe=D0;function oEe(e,t){var n=-1,r=iEe(e)?Array(e.length):[];return sEe(e,function(a,i,o){r[++n]=t(a,i,o)}),r}var s9=oEe;function lEe(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}var cEe=lEe,k4=Qh;function uEe(e,t){if(e!==t){var n=e!==void 0,r=e===null,a=e===e,i=k4(e),o=t!==void 0,l=t===null,c=t===t,u=k4(t);if(!l&&!u&&!i&&e>t||i&&o&&c&&!l&&!u||r&&o&&c||!n&&c||!a)return 1;if(!r&&!i&&!u&&e<t||u&&n&&a&&!r&&!i||l&&n&&a||!o&&a||!c)return-1}return 0}var dEe=uEe,hEe=dEe;function fEe(e,t,n){for(var r=-1,a=e.criteria,i=t.criteria,o=a.length,l=n.length;++r<o;){var c=hEe(a[r],i[r]);if(c){if(r>=l)return c;var u=n[r];return c*(u=="desc"?-1:1)}}return e.index-t.index}var pEe=fEe,z1=wT,mEe=_T,gEe=of,yEe=s9,vEe=cEe,bEe=HH,xEe=pEe,wEe=sf,_Ee=wa;function kEe(e,t,n){t.length?t=z1(t,function(i){return _Ee(i)?function(o){return mEe(o,i.length===1?i[0]:i)}:i}):t=[wEe];var r=-1;t=z1(t,bEe(gEe));var a=yEe(e,function(i,o,l){var c=z1(t,function(u){return u(i)});return{criteria:c,index:++r,value:i}});return vEe(a,function(i,o){return xEe(i,o,n)})}var jEe=kEe;function SEe(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var NEe=SEe,CEe=NEe,j4=Math.max;function PEe(e,t,n){return t=j4(t===void 0?e.length-1:t,0),function(){for(var r=arguments,a=-1,i=j4(r.length-t,0),o=Array(i);++a<i;)o[a]=r[t+a];a=-1;for(var l=Array(t+1);++a<t;)l[a]=r[a];return l[t]=n(o),CEe(e,this,l)}}var TEe=PEe;function AEe(e){return function(){return e}}var EEe=AEe,OEe=wu,REe=function(){try{var e=OEe(Object,"defineProperty");return e({},"",{}),e}catch{}}(),i9=REe,IEe=EEe,S4=i9,MEe=sf,DEe=S4?function(e,t){return S4(e,"toString",{configurable:!0,enumerable:!1,value:IEe(t),writable:!0})}:MEe,$Ee=DEe,LEe=800,FEe=16,BEe=Date.now;function WEe(e){var t=0,n=0;return function(){var r=BEe(),a=FEe-(r-n);if(n=r,a>0){if(++t>=LEe)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var qEe=WEe,UEe=$Ee,zEe=qEe,HEe=zEe(UEe),VEe=HEe,GEe=sf,YEe=TEe,KEe=VEe;function XEe(e,t){return KEe(YEe(e,t,GEe),e+"")}var QEe=XEe,JEe=yT,ZEe=D0,eOe=IT,tOe=Kl;function nOe(e,t,n){if(!tOe(n))return!1;var r=typeof t;return(r=="number"?ZEe(n)&&eOe(t,n.length):r=="string"&&t in n)?JEe(n[t],e):!1}var L0=nOe,rOe=r9,aOe=jEe,sOe=QEe,N4=L0,iOe=sOe(function(e,t){if(e==null)return[];var n=t.length;return n>1&&N4(e,t[0],t[1])?t=[]:n>2&&N4(t[0],t[1],t[2])&&(t=[t[0]]),aOe(e,rOe(t,1),[])}),oOe=iOe;const FT=Vt(oOe);function wm(e){"@babel/helpers - typeof";return wm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wm(e)}function tN(){return tN=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},tN.apply(this,arguments)}function lOe(e,t){return hOe(e)||dOe(e,t)||uOe(e,t)||cOe()}
vendor: 29,148 bytes, lines 4192-4199
4192function cOe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
4193In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uOe(e,t){if(e){if(typeof e=="string")return C4(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return C4(e,t)}}function C4(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function dOe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,o,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(h){u=!0,a=h}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}function hOe(e){if(Array.isArray(e))return e}function P4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function H1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?P4(Object(n),!0).forEach(function(r){fOe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function fOe(e,t,n){return t=pOe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pOe(e){var t=mOe(e,"string");return wm(t)=="symbol"?t:t+""}function mOe(e,t){if(wm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(wm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function gOe(e){return Array.isArray(e)&&nr(e[0])&&nr(e[1])?e.join(" ~ "):e}var yOe=function(t){var n=t.separator,r=n===void 0?" : ":n,a=t.contentStyle,i=a===void 0?{}:a,o=t.itemStyle,l=o===void 0?{}:o,c=t.labelStyle,u=c===void 0?{}:c,h=t.payload,d=t.formatter,f=t.itemSorter,p=t.wrapperClassName,y=t.labelClassName,m=t.label,v=t.labelFormatter,b=t.accessibilityLayer,x=b===void 0?!1:b,w=function(){if(h&&h.length){var D={padding:0,margin:0},$=(f?FT(h,f):h).map(function(R,I){if(R.type==="none")return null;var P=H1({display:"block",paddingTop:4,paddingBottom:4,color:R.color||"#000"},l),A=R.formatter||d||gOe,E=R.value,T=R.name,L=E,B=T;if(A&&L!=null&&B!=null){var H=A(E,T,R,I,h);if(Array.isArray(H)){var G=lOe(H,2);L=G[0],B=G[1]}else L=H}return F.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(I),style:P},nr(B)?F.createElement("span",{className:"recharts-tooltip-item-name"},B):null,nr(B)?F.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,F.createElement("span",{className:"recharts-tooltip-item-value"},L),F.createElement("span",{className:"recharts-tooltip-item-unit"},R.unit||""))});return F.createElement("ul",{className:"recharts-tooltip-item-list",style:D},$)}return null},_=H1({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},i),k=H1({margin:0},u),j=!yt(m),S=j?m:"",N=kt("recharts-default-tooltip",p),C=kt("recharts-tooltip-label",y);j&&v&&h!==void 0&&h!==null&&(S=v(m,h));var M=x?{role:"status","aria-live":"assertive"}:{};return F.createElement("div",tN({className:N,style:_},M),F.createElement("p",{className:C,style:k},F.isValidElement(S)?S:"".concat(S)),w())};function _m(e){"@babel/helpers - typeof";return _m=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_m(e)}function Ky(e,t,n){return t=vOe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vOe(e){var t=bOe(e,"string");return _m(t)=="symbol"?t:t+""}function bOe(e,t){if(_m(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(_m(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Of="recharts-tooltip-wrapper",xOe={visibility:"hidden"};function wOe(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return kt(Of,Ky(Ky(Ky(Ky({},"".concat(Of,"-right"),be(n)&&t&&be(t.x)&&n>=t.x),"".concat(Of,"-left"),be(n)&&t&&be(t.x)&&n<t.x),"".concat(Of,"-bottom"),be(r)&&t&&be(t.y)&&r>=t.y),"".concat(Of,"-top"),be(r)&&t&&be(t.y)&&r<t.y))}function T4(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,a=e.offsetTopLeft,i=e.position,o=e.reverseDirection,l=e.tooltipDimension,c=e.viewBox,u=e.viewBoxDimension;if(i&&be(i[r]))return i[r];var h=n[r]-l-a,d=n[r]+a;if(t[r])return o[r]?h:d;if(o[r]){var f=h,p=c[r];return f<p?Math.max(d,c[r]):Math.max(h,c[r])}var y=d+l,m=c[r]+u;return y>m?Math.max(h,c[r]):Math.max(d,c[r])}function _Oe(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function kOe(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,a=e.position,i=e.reverseDirection,o=e.tooltipBox,l=e.useTranslate3d,c=e.viewBox,u,h,d;return o.height>0&&o.width>0&&n?(h=T4({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:a,reverseDirection:i,tooltipDimension:o.width,viewBox:c,viewBoxDimension:c.width}),d=T4({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:a,reverseDirection:i,tooltipDimension:o.height,viewBox:c,viewBoxDimension:c.height}),u=_Oe({translateX:h,translateY:d,useTranslate3d:l})):u=xOe,{cssProperties:u,cssClasses:wOe({translateX:h,translateY:d,coordinate:n})}}function ch(e){"@babel/helpers - typeof";return ch=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ch(e)}function A4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function E4(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?A4(Object(n),!0).forEach(function(r){rN(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jOe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function SOe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,l9(r.key),r)}}function NOe(e,t,n){return t&&SOe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function COe(e,t,n){return t=cx(t),POe(e,o9()?Reflect.construct(t,n||[],cx(e).constructor):t.apply(e,n))}function POe(e,t){if(t&&(ch(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return TOe(e)}function TOe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function o9(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(o9=function(){return!!e})()}function cx(e){return cx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},cx(e)}function AOe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&nN(e,t)}function nN(e,t){return nN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},nN(e,t)}function rN(e,t,n){return t=l9(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l9(e){var t=EOe(e,"string");return ch(t)=="symbol"?t:t+""}function EOe(e,t){if(ch(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(ch(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var O4=1,OOe=function(e){function t(){var n;jOe(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return n=COe(this,t,[].concat(a)),rN(n,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),rN(n,"handleKeyDown",function(o){if(o.key==="Escape"){var l,c,u,h;n.setState({dismissed:!0,dismissedAtCoordinate:{x:(l=(c=n.props.coordinate)===null||c===void 0?void 0:c.x)!==null&&l!==void 0?l:0,y:(u=(h=n.props.coordinate)===null||h===void 0?void 0:h.y)!==null&&u!==void 0?u:0}})}}),n}return AOe(t,e),NOe(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();(Math.abs(r.width-this.state.lastBoundingBox.width)>O4||Math.abs(r.height-this.state.lastBoundingBox.height)>O4)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,a;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((a=this.props.coordinate)===null||a===void 0?void 0:a.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,a=this.props,i=a.active,o=a.allowEscapeViewBox,l=a.animationDuration,c=a.animationEasing,u=a.children,h=a.coordinate,d=a.hasPayload,f=a.isAnimationActive,p=a.offset,y=a.position,m=a.reverseDirection,v=a.useTranslate3d,b=a.viewBox,x=a.wrapperStyle,w=kOe({allowEscapeViewBox:o,coordinate:h,offsetTopLeft:p,position:y,reverseDirection:m,tooltipBox:this.state.lastBoundingBox,useTranslate3d:v,viewBox:b}),_=w.cssClasses,k=w.cssProperties,j=E4(E4({transition:f&&i?"transform ".concat(l,"ms ").concat(c):void 0},k),{},{pointerEvents:"none",visibility:!this.state.dismissed&&i&&d?"visible":"hidden",position:"absolute",top:0,left:0},x);return F.createElement("div",{tabIndex:-1,className:_,style:j,ref:function(N){r.wrapperNode=N}},u)}}])}(g.PureComponent),ROe=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},fo={isSsr:ROe(),get:function(t){return fo[t]},set:function(t,n){if(typeof t=="string")fo[t]=n;else{var r=Object.keys(t);r&&r.length&&r.forEach(function(a){fo[a]=t[a]})}}};function uh(e){"@babel/helpers - typeof";return uh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},uh(e)}function R4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function I4(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?R4(Object(n),!0).forEach(function(r){BT(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function IOe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function MOe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,u9(r.key),r)}}function DOe(e,t,n){return t&&MOe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function $Oe(e,t,n){return t=ux(t),LOe(e,c9()?Reflect.construct(t,n||[],ux(e).constructor):t.apply(e,n))}function LOe(e,t){if(t&&(uh(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return FOe(e)}function FOe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c9(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(c9=function(){return!!e})()}function ux(e){return ux=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ux(e)}function BOe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&aN(e,t)}function aN(e,t){return aN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},aN(e,t)}function BT(e,t,n){return t=u9(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u9(e){var t=WOe(e,"string");return uh(t)=="symbol"?t:t+""}function WOe(e,t){if(uh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(uh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qOe(e){return e.dataKey}function UOe(e,t){return F.isValidElement(e)?F.cloneElement(e,t):typeof e=="function"?F.createElement(e,t):F.createElement(yOe,t)}var Zs=function(e){function t(){return IOe(this,t),$Oe(this,t,arguments)}return BOe(t,e),DOe(t,[{key:"render",value:function(){var r=this,a=this.props,i=a.active,o=a.allowEscapeViewBox,l=a.animationDuration,c=a.animationEasing,u=a.content,h=a.coordinate,d=a.filterNull,f=a.isAnimationActive,p=a.offset,y=a.payload,m=a.payloadUniqBy,v=a.position,b=a.reverseDirection,x=a.useTranslate3d,w=a.viewBox,_=a.wrapperStyle,k=y??[];d&&k.length&&(k=ZH(y.filter(function(S){return S.value!=null&&(S.hide!==!0||r.props.includeHidden)}),m,qOe));var j=k.length>0;return F.createElement(OOe,{allowEscapeViewBox:o,animationDuration:l,animationEasing:c,isAnimationActive:f,active:i,coordinate:h,hasPayload:j,offset:p,position:v,reverseDirection:b,useTranslate3d:x,viewBox:w,wrapperStyle:_},UOe(u,I4(I4({},this.props),{},{payload:k})))}}])}(g.PureComponent);BT(Zs,"displayName","Tooltip");BT(Zs,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!fo.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var zOe=Di,HOe=function(){return zOe.Date.now()},VOe=HOe,GOe=/\s/;function YOe(e){for(var t=e.length;t--&&GOe.test(e.charAt(t)););return t}var KOe=YOe,XOe=KOe,QOe=/^\s+/;function JOe(e){return e&&e.slice(0,XOe(e)+1).replace(QOe,"")}var ZOe=JOe,eRe=ZOe,M4=Kl,tRe=Qh,D4=NaN,nRe=/^[-+]0x[0-9a-f]+$/i,rRe=/^0b[01]+$/i,aRe=/^0o[0-7]+$/i,sRe=parseInt;function iRe(e){if(typeof e=="number")return e;if(tRe(e))return D4;if(M4(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=M4(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=eRe(e);var n=rRe.test(e);return n||aRe.test(e)?sRe(e.slice(2),n?2:8):nRe.test(e)?D4:+e}var d9=iRe,oRe=Kl,V1=VOe,$4=d9,lRe="Expected a function",cRe=Math.max,uRe=Math.min;function dRe(e,t,n){var r,a,i,o,l,c,u=0,h=!1,d=!1,f=!0;if(typeof e!="function")throw new TypeError(lRe);t=$4(t)||0,oRe(n)&&(h=!!n.leading,d="maxWait"in n,i=d?cRe($4(n.maxWait)||0,t):i,f="trailing"in n?!!n.trailing:f);function p(j){var S=r,N=a;return r=a=void 0,u=j,o=e.apply(N,S),o}function y(j){return u=j,l=setTimeout(b,t),h?p(j):o}function m(j){var S=j-c,N=j-u,C=t-S;return d?uRe(C,i-N):C}function v(j){var S=j-c,N=j-u;return c===void 0||S>=t||S<0||d&&N>=i}function b(){var j=V1();if(v(j))return x(j);l=setTimeout(b,m(j))}function x(j){return l=void 0,f&&r?p(j):(r=a=void 0,o)}function w(){l!==void 0&&clearTimeout(l),u=0,r=c=a=l=void 0}function _(){return l===void 0?o:x(V1())}function k(){var j=V1(),S=v(j);if(r=arguments,a=this,c=j,S){if(l===void 0)return y(c);if(d)return clearTimeout(l),l=setTimeout(b,t),p(c)}return l===void 0&&(l=setTimeout(b,t)),o}return k.cancel=w,k.flush=_,k}var hRe=dRe,fRe=hRe,pRe=Kl,mRe="Expected a function";function gRe(e,t,n){var r=!0,a=!0;if(typeof e!="function")throw new TypeError(mRe);return pRe(n)&&(r="leading"in n?!!n.leading:r,a="trailing"in n?!!n.trailing:a),fRe(e,t,{leading:r,maxWait:t,trailing:a})}var yRe=gRe;const h9=Vt(yRe);function km(e){"@babel/helpers - typeof";return km=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},km(e)}function L4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Xy(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?L4(Object(n),!0).forEach(function(r){vRe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function vRe(e,t,n){return t=bRe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bRe(e){var t=xRe(e,"string");return km(t)=="symbol"?t:t+""}function xRe(e,t){if(km(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(km(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function wRe(e,t){return SRe(e)||jRe(e,t)||kRe(e,t)||_Re()}function _Re(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
4194In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kRe(e,t){if(e){if(typeof e=="string")return F4(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return F4(e,t)}}function F4(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function jRe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,o,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(h){u=!0,a=h}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}function SRe(e){if(Array.isArray(e))return e}var sN=g.forwardRef(function(e,t){var n=e.aspect,r=e.initialDimension,a=r===void 0?{width:-1,height:-1}:r,i=e.width,o=i===void 0?"100%":i,l=e.height,c=l===void 0?"100%":l,u=e.minWidth,h=u===void 0?0:u,d=e.minHeight,f=e.maxHeight,p=e.children,y=e.debounce,m=y===void 0?0:y,v=e.id,b=e.className,x=e.onResize,w=e.style,_=w===void 0?{}:w,k=g.useRef(null),j=g.useRef();j.current=x,g.useImperativeHandle(t,function(){return Object.defineProperty(k.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),k.current},configurable:!0})});var S=g.useState({containerWidth:a.width,containerHeight:a.height}),N=wRe(S,2),C=N[0],M=N[1],O=g.useCallback(function($,R){M(function(I){var P=Math.round($),A=Math.round(R);return I.containerWidth===P&&I.containerHeight===A?I:{containerWidth:P,containerHeight:A}})},[]);g.useEffect(function(){var $=function(T){var L,B=T[0].contentRect,H=B.width,G=B.height;O(H,G),(L=j.current)===null||L===void 0||L.call(j,H,G)};m>0&&($=h9($,m,{trailing:!0,leading:!1}));var R=new ResizeObserver($),I=k.current.getBoundingClientRect(),P=I.width,A=I.height;return O(P,A),R.observe(k.current),function(){R.disconnect()}},[O,m]);var D=g.useMemo(function(){var $=C.containerWidth,R=C.containerHeight;if($<0||R<0)return null;Wc(_c(o)||_c(c),`The width(%s) and height(%s) are both fixed numbers,
4195       maybe you don't need to use a ResponsiveContainer.`,o,c),Wc(!n||n>0,"The aspect(%s) must be greater than zero.",n);var I=_c(o)?$:o,P=_c(c)?R:c;n&&n>0&&(I?P=I/n:P&&(I=P*n),f&&P>f&&(P=f)),Wc(I>0||P>0,`The width(%s) and height(%s) of chart should be greater than 0,
4196       please check the style of container, or the props width(%s) and height(%s),
4197       or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
4198       height and width.`,I,P,o,c,h,d,n);var A=!Array.isArray(p)&&ho(p.type).endsWith("Chart");return F.Children.map(p,function(E){return F.isValidElement(E)?g.cloneElement(E,Xy({width:I,height:P},A?{style:Xy({height:"100%",width:"100%",maxHeight:P,maxWidth:I},E.props.style)}:{})):E})},[n,p,c,f,d,h,C,o]);return F.createElement("div",{id:v?"".concat(v):void 0,className:kt("recharts-responsive-container",b),style:Xy(Xy({},_),{},{width:o,height:c,minWidth:h,minHeight:d,maxHeight:f}),ref:k},D)}),f9=function(t){return null};f9.displayName="Cell";function jm(e){"@babel/helpers - typeof";return jm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jm(e)}function B4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function iN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?B4(Object(n),!0).forEach(function(r){NRe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function NRe(e,t,n){return t=CRe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function CRe(e){var t=PRe(e,"string");return jm(t)=="symbol"?t:t+""}function PRe(e,t){if(jm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(jm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Mu={widthCache:{},cacheCount:0},TRe=2e3,ARe={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},W4="recharts_measurement_span";function ERe(e){var t=iN({},e);return Object.keys(t).forEach(function(n){t[n]||delete t[n]}),t}var xp=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||fo.isSsr)return{width:0,height:0};var r=ERe(n),a=JSON.stringify({text:t,copyStyle:r});if(Mu.widthCache[a])return Mu.widthCache[a];try{var i=document.getElementById(W4);i||(i=document.createElement("span"),i.setAttribute("id",W4),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var o=iN(iN({},ARe),r);Object.assign(i.style,o),i.textContent="".concat(t);var l=i.getBoundingClientRect(),c={width:l.width,height:l.height};return Mu.widthCache[a]=c,++Mu.cacheCount>TRe&&(Mu.cacheCount=0,Mu.widthCache={}),c}catch{return{width:0,height:0}}},ORe=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Sm(e){"@babel/helpers - typeof";return Sm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sm(e)}function dx(e,t){return DRe(e)||MRe(e,t)||IRe(e,t)||RRe()}function RRe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
4199In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function IRe(e,t){if(e){if(typeof e=="string")return q4(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return q4(e,t)}}function q4(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function MRe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,o,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(h){u=!0,a=h}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}function DRe(e){if(Array.isArray(e))return e}function $Re(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function U4(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,FRe(r.key),r)}}function LRe(e,t,n){return t&&U4(e.prototype,t),n&&U4(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function FRe(e){var t=BRe(e,"string");return Sm(t)=="symbol"?t:t+""}function BRe(e,t){if(Sm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Sm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var z4=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,H4=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,WRe=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,qRe=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,p9={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},URe=Object.keys(p9),od="NaN";function zRe(e,t){return e*p9[t]}var Qy=function(){function e(t,n){$Re(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),n!==""&&!WRe.test(n)&&(this.num=NaN,this.unit=""),URe.includes(n)&&(this.num=zRe(t,n),this.unit="px")}return LRe(e,[{key:"add",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num+n.num,this.unit)}},{key:"subtract",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num-n.num,this.unit)}},{key:"multiply",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num*n.num,this.unit||n.unit)}},{key:"divide",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num/n.num,this.unit||n.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(n){var r,a=(r=qRe.exec(n))!==null&&r!==void 0?r:[],i=dx(a,3),o=i[1],l=i[2];return new e(parseFloat(o),l??"")}}])}();function m9(e){if(e.includes(od))return od;for(var t=e;t.includes("*")||t.includes("/");){var n,r=(n=z4.exec(t))!==null&&n!==void 0?n:[],a=dx(r,4),i=a[1],o=a[2],l=a[3],c=Qy.parse(i??""),u=Qy.parse(l??""),h=o==="*"?c.multiply(u):c.divide(u);if(h.isNaN())return od;t=t.replace(z4,h.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var d,f=(d=H4.exec(t))!==null&&d!==void 0?d:[],p=dx(f,4),y=p[1],m=p[2],v=p[3],b=Qy.parse(y??""),x=Qy.parse(v??""),w=m==="+"?b.add(x):b.subtract(x);if(w.isNaN())return od;t=t.replace(H4,w.toString())}return t}var V4=/\(([^()]*)\)/;function HRe(e){for(var t=e;t.includes("(");){var n=V4.exec(t),r=dx(n,2),a=r[1];t=t.replace(V4,m9(a))}return t}function VRe(e){var t=e.replace(/\s+/g,"");return t=HRe(t),t=m9(t),t}function GRe(e){try{return VRe(e)}catch{return od}}function G1(e){var t=GRe(e.slice(5,-1));return t===od?"":t}var YRe=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],KRe=["dx","dy","angle","className","breakAll"];function oN(){return oN=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},oN.apply(this,arguments)}function G4(e,t){if(e==null)return{};var n=XRe(e,t),r,a;
4199if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function XRe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Y4(e,t){return eIe(e)||ZRe(e,t)||JRe(e,t)||QRe()}function QRe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
4200In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function JRe(e,t){if(e){if(typeof e=="string")return K4(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return K4(e,t)}}function K4(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ZRe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,o,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(h){u=!0,a=h}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}function eIe(e){if(Array.isArray(e))return e}var g9=/[ \f\n\r\t\v\u2028\u2029]+/,y9=function(t){var n=t.children,r=t.breakAll,a=t.style;try{var i=[];yt(n)||(r?i=n.toString().split(""):i=n.toString().split(g9));var o=i.map(function(c){return{word:c,width:xp(c,a).width}}),l=r?0:xp(" ",a).width;return{wordsWithComputedWidth:o,spaceWidth:l}}catch{return null}},tIe=function(t,n,r,a,i){var o=t.maxLines,l=t.children,c=t.style,u=t.breakAll,h=be(o),d=l,f=function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return I.reduce(function(P,A){var E=A.word,T=A.width,L=P[P.length-1];if(L&&(a==null||i||L.width+T+r<Number(a)))L.words.push(E),L.width+=T+r;else{var B={words:[E],width:T};P.push(B)}return P},[])},p=f(n),y=function(I){return I.reduce(function(P,A){return P.width>A.width?P:A})};if(!h)return p;for(var m="…",v=function(I){var P=d.slice(0,I),A=y9({breakAll:u,style:c,children:P+m}).wordsWithComputedWidth,E=f(A),T=E.length>o||y(E).width>Number(a);return[T,E]},b=0,x=d.length-1,w=0,_;b<=x&&w<=d.length-1;){var k=Math.floor((b+x)/2),j=k-1,S=v(j),N=Y4(S,2),C=N[0],M=N[1],O=v(k),D=Y4(O,1),$=D[0];if(!C&&!$&&(b=k+1),C&&$&&(x=k-1),!C&&$){_=M;break}w++}return _||p},X4=function(t){var n=yt(t)?[]:t.toString().split(g9);return[{words:n}]},nIe=function(t){var n=t.width,r=t.scaleToFit,a=t.children,i=t.style,o=t.breakAll,l=t.maxLines;if((n||r)&&!fo.isSsr){var c,u,h=y9({breakAll:o,children:a,style:i});if(h){var d=h.wordsWithComputedWidth,f=h.spaceWidth;c=d,u=f}else return X4(a);return tIe({breakAll:o,children:a,maxLines:l,style:i},c,u,n,r)}return X4(a)},Q4="#808080",hx=function(t){var n=t.x,r=n===void 0?0:n,a=t.y,i=a===void 0?0:a,o=t.lineHeight,l=o===void 0?"1em":o,c=t.capHeight,u=c===void 0?"0.71em":c,h=t.scaleToFit,d=h===void 0?!1:h,f=t.textAnchor,p=f===void 0?"start":f,y=t.verticalAnchor,m=y===void 0?"end":y,v=t.fill,b=v===void 0?Q4:v,x=G4(t,YRe),w=g.useMemo(function(){return nIe({breakAll:x.breakAll,children:x.children,maxLines:x.maxLines,scaleToFit:d,style:x.style,width:x.width})},[x.breakAll,x.children,x.maxLines,d,x.style,x.width]),_=x.dx,k=x.dy,j=x.angle,S=x.className,N=x.breakAll,C=G4(x,KRe);if(!nr(r)||!nr(i))return null;var M=r+(be(_)?_:0),O=i+(be(k)?k:0),D;switch(m){case"start":D=G1("calc(".concat(u,")"));break;case"middle":D=G1("calc(".concat((w.length-1)/2," * -").concat(l," + (").concat(u," / 2))"));break;default:D=G1("calc(".concat(w.length-1," * -").concat(l,")"));break}var $=[];if(d){var R=w[0].width,I=x.width;$.push("scale(".concat((be(I)?I/R:1)/R,")"))}return j&&$.push("rotate(".concat(j,", ").concat(M,", ").concat(O,")")),$.length&&(C.transform=$.join(" ")),F.createElement("text",oN({},pt(C,!0),{x:M,y:O,className:kt("recharts-text",S),textAnchor:p,fill:b.includes("url")?Q4:b}),w.map(function(P,A){var E=P.words.join(N?"":" ");return F.createElement("tspan",{x:M,dy:A===0?D:l,key:"".concat(E,"-").concat(A)},E)}))};function Cl(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function rIe(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function WT(e){let t,n,r;e.length!==2?(t=Cl,n=(l,c)=>Cl(e(l),c),r=(l,c)=>e(l)-c):(t=e===Cl||e===rIe?e:aIe,n=e,r=e);function a(l,c,u=0,h=l.length){if(u<h){if(t(c,c)!==0)return h;do{const d=u+h>>>1;n(l[d],c)<0?u=d+1:h=d}while(u<h)}return u}function i(l,c,u=0,h=l.length){if(u<h){if(t(c,c)!==0)return h;do{const d=u+h>>>1;n(l[d],c)<=0?u=d+1:h=d}while(u<h)}return u}function o(l,c,u=0,h=l.length){const d=a(l,c,u,h-1);return d>u&&r(l[d-1],c)>-r(l[d],c)?d-1:d}return{left:a,center:o,right:i}}function aIe(){return 0}function v9(e){return e===null?NaN:+e}function*sIe(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const iIe=WT(Cl),Yg=iIe.right;WT(v9).center;class J4 extends Map{constructor(t,n=cIe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,a]of t)this.set(r,a)}get(t){return super.get(Z4(this,t))}has(t){return super.has(Z4(this,t))}set(t,n){return super.set(oIe(this,t),n)}delete(t){return super.delete(lIe(this,t))}}function Z4({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function oIe({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function lIe({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function cIe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function uIe(e=Cl){if(e===Cl)return b9;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function b9(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const dIe=Math.sqrt(50),hIe=Math.sqrt(10),fIe=Math.sqrt(2);function fx(e,t,n){const r=(t-e)/Math.max(0,n),a=Math.floor(Math.log10(r)),i=r/Math.pow(10,a),o=i>=dIe?10:i>=hIe?5:i>=fIe?2:1;let l,c,u;return a<0?(u=Math.pow(10,-a)/o,l=Math.round(e*u),c=Math.round(t*u),l/u<e&&++l,c/u>t&&--c,u=-u):(u=Math.pow(10,a)*o,l=Math.round(e/u),c=Math.round(t/u),l*u<e&&++l,c*u>t&&--c),c<l&&.5<=n&&n<2?fx(e,t,n*2):[l,c,u]}
4200function lN(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[a,i,o]=r?fx(t,e,n):fx(e,t,n);if(!(i>=a))return[];const l=i-a+1,c=new Array(l);if(r)if(o<0)for(let u=0;u<l;++u)c[u]=(i-u)/-o;else for(let u=0;u<l;++u)c[u]=(i-u)*o;else if(o<0)for(let u=0;u<l;++u)c[u]=(a+u)/-o;else for(let u=0;u<l;++u)c[u]=(a+u)*o;return c}function cN(e,t,n){return t=+t,e=+e,n=+n,fx(e,t,n)[2]}function uN(e,t,n){t=+t,e=+e,n=+n;const r=t<e,a=r?cN(t,e,n):cN(e,t,n);return(r?-1:1)*(a<0?1/-a:a)}function e5(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function t5(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function x9(e,t,n=0,r=1/0,a){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(a=a===void 0?b9:uIe(a);r>n;){if(r-n>600){const c=r-n+1,u=t-n+1,h=Math.log(c),d=.5*Math.exp(2*h/3),f=.5*Math.sqrt(h*d*(c-d)/c)*(u-c/2<0?-1:1),p=Math.max(n,Math.floor(t-u*d/c+f)),y=Math.min(r,Math.floor(t+(c-u)*d/c+f));x9(e,t,p,y,a)}const i=e[t];let o=n,l=r;for(Rf(e,n,t),a(e[r],i)>0&&Rf(e,n,r);o<l;){for(Rf(e,o,l),++o,--l;a(e[o],i)<0;)++o;for(;a(e[l],i)>0;)--l}a(e[n],i)===0?Rf(e,n,l):(++l,Rf(e,l,r)),l<=t&&(n=l+1),t<=l&&(r=l-1)}return e}function Rf(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function pIe(e,t,n){if(e=Float64Array.from(sIe(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return t5(e);if(t>=1)return e5(e);var r,a=(r-1)*t,i=Math.floor(a),o=e5(x9(e,i).subarray(0,i+1)),l=t5(e.subarray(i+1));return o+(l-o)*(a-i)}}function mIe(e,t,n=v9){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,a=(r-1)*t,i=Math.floor(a),o=+n(e[i],i,e),l=+n(e[i+1],i+1,e);return o+(l-o)*(a-i)}}function gIe(e,t,n){e=+e,t=+t,n=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+n;for(var r=-1,a=Math.max(0,Math.ceil((t-e)/n))|0,i=new Array(a);++r<a;)i[r]=e+r*n;return i}function fs(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Do(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const dN=Symbol("implicit");function qT(){var e=new J4,t=[],n=[],r=dN;function a(i){let o=e.get(i);if(o===void 0){if(r!==dN)return r;e.set(i,o=t.push(i)-1)}return n[o%n.length]}return a.domain=function(i){if(!arguments.length)return t.slice();t=[],e=new J4;for(const o of i)e.has(o)||e.set(o,t.push(o)-1);return a},a.range=function(i){return arguments.length?(n=Array.from(i),a):n.slice()},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return qT(t,n).unknown(r)},fs.apply(a,arguments),a}function Nm(){var e=qT().unknown(void 0),t=e.domain,n=e.range,r=0,a=1,i,o,l=!1,c=0,u=0,h=.5;delete e.unknown;function d(){var f=t().length,p=a<r,y=p?a:r,m=p?r:a;i=(m-y)/Math.max(1,f-c+u*2),l&&(i=Math.floor(i)),y+=(m-y-i*(f-c))*h,o=i*(1-c),l&&(y=Math.round(y),o=Math.round(o));var v=gIe(f).map(function(b){return y+i*b});return n(p?v.reverse():v)}return e.domain=function(f){return arguments.length?(t(f),d()):t()},e.range=function(f){return arguments.length?([r,a]=f,r=+r,a=+a,d()):[r,a]},e.rangeRound=function(f){return[r,a]=f,r=+r,a=+a,l=!0,d()},e.bandwidth=function(){return o},e.step=function(){return i},e.round=function(f){return arguments.length?(l=!!f,d()):l},e.padding=function(f){return arguments.length?(c=Math.min(1,u=+f),d()):c},e.paddingInner=function(f){return arguments.length?(c=Math.min(1,f),d()):c},e.paddingOuter=function(f){return arguments.length?(u=+f,d()):u},e.align=function(f){return arguments.length?(h=Math.max(0,Math.min(1,f)),d()):h},e.copy=function(){return Nm(t(),[r,a]).round(l).paddingInner(c).paddingOuter(u).align(h)},fs.apply(d(),arguments)}function w9(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return w9(t())},e}function wp(){return w9(Nm.apply(null,arguments).paddingInner(1))}function UT(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function _9(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Kg(){}var Cm=.7,px=1/Cm,Td="\\s*([+-]?\\d+)\\s*",Pm="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",wi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",yIe=/^#([0-9a-f]{3,8})$/,vIe=new RegExp(`^rgb\\(${Td},${Td},${Td}\\)$`),bIe=new RegExp(`^rgb\\(${wi},${wi},${wi}\\)$`),xIe=new RegExp(`^rgba\\(${Td},${Td},${Td},${Pm}\\)$`),wIe=new RegExp(`^rgba\\(${wi},${wi},${wi},${Pm}\\)$`),_Ie=new RegExp(`^hsl\\(${Pm},${wi},${wi}\\)$`),kIe=new RegExp(`^hsla\\(${Pm},${wi},${wi},${Pm}\\)$`),n5={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};UT(Kg,Tm,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:r5,formatHex:r5,formatHex8:jIe,formatHsl:SIe,formatRgb:a5,toString:a5});function r5(){return this.rgb().formatHex()}function jIe(){return this.rgb().formatHex8()}function SIe(){return k9(this).formatHsl()}function a5(){return this.rgb().formatRgb()}function Tm(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=yIe.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?s5(t):n===3?new fa(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Jy(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Jy(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=vIe.exec(e))?new fa(t[1],t[2],t[3],1):(t=bIe.exec(e))?new fa(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=xIe.exec(e))?Jy(t[1],t[2],t[3],t[4]):(t=wIe.exec(e))?Jy(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=_Ie.exec(e))?l5(t[1],t[2]/100,t[3]/100,1):(t=kIe.exec(e))?l5(t[1],t[2]/100,t[3]/100,t[4]):n5.hasOwnProperty(e)?s5(n5[e]):e==="transparent"?new fa(NaN,NaN,NaN,0):null}function s5(e){return new fa(e>>16&255,e>>8&255,e&255,1)}function Jy(e,t,n,r){return r<=0&&(e=t=n=NaN),new fa(e,t,n,r)}function NIe(e){return e instanceof Kg||(e=Tm(e)),e?(e=e.rgb(),new fa(e.r,e.g,e.b,e.opacity)):new fa}function hN(e,t,n,r){return arguments.length===1?NIe(e):new fa(e,t,n,r??1)}function fa(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}UT(fa,hN,_9(Kg,{brighter(e){return e=e==null?px:Math.pow(px,e),new fa(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Cm:Math.pow(Cm,e),new fa(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new fa(qc(this.r),qc(this.g),qc(this.b),mx(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:i5,formatHex:i5,formatHex8:CIe,formatRgb:o5,toString:o5}));function i5(){return`#${kc(this.r)}${kc(this.g)}${kc(this.b)}`}function CIe(){return`#${kc(this.r)}${kc(this.g)}${kc(this.b)}${kc((isNaN(this.opacity)?1:this.opacity)*255)}`}function o5(){const e=mx(this.opacity);return`${e===1?"rgb(":"rgba("}${qc(this.r)}, ${qc(this.g)}, ${qc(this.b)}${e===1?")":`, ${e})`}`}function mx(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function qc(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function kc(e){return e=qc(e),(e<16?"0":"")+e.toString(16)}function l5(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Es(e,t,n,r)}function k9(e){if(e instanceof Es)return new Es(e.h,e.s,e.l,e.opacity);if(e instanceof Kg||(e=Tm(e)),!e)return new Es;if(e instanceof Es)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,a=Math.min(t,n,r),i=Math.max(t,n,r),o=NaN,l=i-a,c=(i+a)/2;return l?(t===i?o=(n-r)/l+(n<r)*6:n===i?o=(r-t)/l+2:o=(t-n)/l+4,l/=c<.5?i+a:2-i-a,o*=60):l=c>0&&c<1?0:o,new Es(o,l,c,e.opacity)}function PIe(e,t,n,r){return arguments.length===1?k9(e):new Es(e,t,n,r??1)}function Es(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}UT(Es,PIe,_9(Kg,{brighter(e){return e=e==null?px:Math.pow(px,e),new Es(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Cm:Math.pow(Cm,e),new Es(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,a=2*n-r;return new fa(Y1(e>=240?e-240:e+120,a,r),Y1(e,a,r),Y1(e<120?e+240:e-120,a,r),this.opacity)},clamp(){return new Es(c5(this.h),Zy(this.s),Zy(this.l),mx(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=mx(this.opacity);return`${e===1?"hsl(":"hsla("}${c5(this.h)}, ${Zy(this.s)*100}%, ${Zy(this.l)*100}%${e===1?")":`, ${e})`}`}}));function c5(e){return e=(e||0)%360,e<0?e+360:e}function Zy(e){return Math.max(0,Math.min(1,e||0))}function Y1(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const zT=e=>()=>e;function TIe(e,t){return function(n){return e+n*t}}function AIe(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function EIe(e){return(e=+e)==1?j9:function(t,n){return n-t?AIe(t,n,e):zT(isNaN(t)?n:t)}}function j9(e,t){var n=t-e;return n?TIe(e,n):zT(isNaN(e)?t:e)}const u5=function e(t){var n=EIe(t);function r(a,i){var o=n((a=hN(a)).r,(i=hN(i)).r),l=n(a.g,i.g),c=n(a.b,i.b),u=j9(a.opacity,i.opacity);return function(h){return a.r=o(h),a.g=l(h),a.b=c(h),a.opacity=u(h),a+""}}return r.gamma=e,r}(1);function OIe(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),a;return function(i){for(a=0;a<n;++a)r[a]=e[a]*(1-i)+t[a]*i;return r}}function RIe(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function IIe(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,a=new Array(r),i=new Array(n),o;for(o=0;o<r;++o)a[o]=lf(e[o],t[o]);for(;o<n;
vendor: 5,514 bytes, line 4200
4200++o)i[o]=t[o];return function(l){for(o=0;o<r;++o)i[o]=a[o](l);return i}}function MIe(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function gx(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function DIe(e,t){var n={},r={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?n[a]=lf(e[a],t[a]):r[a]=t[a];return function(i){for(a in n)r[a]=n[a](i);return r}}var fN=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,K1=new RegExp(fN.source,"g");function $Ie(e){return function(){return e}}function LIe(e){return function(t){return e(t)+""}}function FIe(e,t){var n=fN.lastIndex=K1.lastIndex=0,r,a,i,o=-1,l=[],c=[];for(e=e+"",t=t+"";(r=fN.exec(e))&&(a=K1.exec(t));)(i=a.index)>n&&(i=t.slice(n,i),l[o]?l[o]+=i:l[++o]=i),(r=r[0])===(a=a[0])?l[o]?l[o]+=a:l[++o]=a:(l[++o]=null,c.push({i:o,x:gx(r,a)})),n=K1.lastIndex;return n<t.length&&(i=t.slice(n),l[o]?l[o]+=i:l[++o]=i),l.length<2?c[0]?LIe(c[0].x):$Ie(t):(t=c.length,function(u){for(var h=0,d;h<t;++h)l[(d=c[h]).i]=d.x(u);return l.join("")})}function lf(e,t){var n=typeof t,r;return t==null||n==="boolean"?zT(t):(n==="number"?gx:n==="string"?(r=Tm(t))?(t=r,u5):FIe:t instanceof Tm?u5:t instanceof Date?MIe:RIe(t)?OIe:Array.isArray(t)?IIe:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?DIe:gx)(e,t)}function HT(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function BIe(e,t){t===void 0&&(t=e,e=lf);for(var n=0,r=t.length-1,a=t[0],i=new Array(r<0?0:r);n<r;)i[n]=e(a,a=t[++n]);return function(o){var l=Math.max(0,Math.min(r-1,Math.floor(o*=r)));return i[l](o-l)}}function WIe(e){return function(){return e}}function yx(e){return+e}var d5=[0,1];function Qr(e){return e}function pN(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:WIe(isNaN(t)?NaN:.5)}function qIe(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function UIe(e,t,n){var r=e[0],a=e[1],i=t[0],o=t[1];return a<r?(r=pN(a,r),i=n(o,i)):(r=pN(r,a),i=n(i,o)),function(l){return i(r(l))}}function zIe(e,t,n){var r=Math.min(e.length,t.length)-1,a=new Array(r),i=new Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)a[o]=pN(e[o],e[o+1]),i[o]=n(t[o],t[o+1]);return function(l){var c=Yg(e,l,1,r)-1;return i[c](a[c](l))}}function Xg(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function F0(){var e=d5,t=d5,n=lf,r,a,i,o=Qr,l,c,u;function h(){var f=Math.min(e.length,t.length);return o!==Qr&&(o=qIe(e[0],e[f-1])),l=f>2?zIe:UIe,c=u=null,d}function d(f){return f==null||isNaN(f=+f)?i:(c||(c=l(e.map(r),t,n)))(r(o(f)))}return d.invert=function(f){return o(a((u||(u=l(t,e.map(r),gx)))(f)))},d.domain=function(f){return arguments.length?(e=Array.from(f,yx),h()):e.slice()},d.range=function(f){return arguments.length?(t=Array.from(f),h()):t.slice()},d.rangeRound=function(f){return t=Array.from(f),n=HT,h()},d.clamp=function(f){return arguments.length?(o=f?!0:Qr,h()):o!==Qr},d.interpolate=function(f){return arguments.length?(n=f,h()):n},d.unknown=function(f){return arguments.length?(i=f,d):i},function(f,p){return r=f,a=p,h()}}function VT(){return F0()(Qr,Qr)}function HIe(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function vx(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function dh(e){return e=vx(Math.abs(e)),e?e[1]:NaN}function VIe(e,t){return function(n,r){for(var a=n.length,i=[],o=0,l=e[0],c=0;a>0&&l>0&&(c+l+1>r&&(l=Math.max(1,r-c)),i.push(n.substring(a-=l,a+l)),!((c+=l+1)>r));)l=e[o=(o+1)%e.length];return i.reverse().join(t)}}function GIe(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var YIe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Am(e){if(!(t=YIe.exec(e)))throw new Error("invalid format: "+e);var t;return new GT({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Am.prototype=GT.prototype;function GT(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}GT.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function KIe(e){e:for(var t=e.length,n=1,r=-1,a;n<t;++n)switch(e[n]){case".":r=a=n;break;case"0":r===0&&(r=n),a=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(a+1):e}var S9;function XIe(e,t){var n=vx(e,t);if(!n)return e+"";var r=n[0],a=n[1],i=a-(S9=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,o=r.length;return i===o?r:i>o?r+new Array(i-o+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+vx(e,Math.max(0,t+i-1))[0]}function h5(e,t){var n=vx(e,t);if(!n)return e+"";var r=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+r:r.length>a+1?r.slice(0,a+1)+"."+r.slice(a+1):r+new Array(a-r.length+2).join("0")}const f5={"%":(e,t)=>
vendor: 5,608 bytes, line 4200
4200(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:HIe,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>h5(e*100,t),r:h5,s:XIe,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function p5(e){return e}var m5=Array.prototype.map,g5=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function QIe(e){var t=e.grouping===void 0||e.thousands===void 0?p5:VIe(m5.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?p5:GIe(m5.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"−":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function u(d){d=Am(d);var f=d.fill,p=d.align,y=d.sign,m=d.symbol,v=d.zero,b=d.width,x=d.comma,w=d.precision,_=d.trim,k=d.type;k==="n"?(x=!0,k="g"):f5[k]||(w===void 0&&(w=12),_=!0,k="g"),(v||f==="0"&&p==="=")&&(v=!0,f="0",p="=");var j=m==="$"?n:m==="#"&&/[boxX]/.test(k)?"0"+k.toLowerCase():"",S=m==="$"?r:/[%p]/.test(k)?o:"",N=f5[k],C=/[defgprs%]/.test(k);w=w===void 0?6:/[gprs]/.test(k)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function M(O){var D=j,$=S,R,I,P;if(k==="c")$=N(O)+$,O="";else{O=+O;var A=O<0||1/O<0;if(O=isNaN(O)?c:N(Math.abs(O),w),_&&(O=KIe(O)),A&&+O==0&&y!=="+"&&(A=!1),D=(A?y==="("?y:l:y==="-"||y==="("?"":y)+D,$=(k==="s"?g5[8+S9/3]:"")+$+(A&&y==="("?")":""),C){for(R=-1,I=O.length;++R<I;)if(P=O.charCodeAt(R),48>P||P>57){$=(P===46?a+O.slice(R+1):O.slice(R))+$,O=O.slice(0,R);break}}}x&&!v&&(O=t(O,1/0));var E=D.length+O.length+$.length,T=E<b?new Array(b-E+1).join(f):"";switch(x&&v&&(O=t(T+O,T.length?b-$.length:1/0),T=""),p){case"<":O=D+O+$+T;break;case"=":O=D+T+O+$;break;case"^":O=T.slice(0,E=T.length>>1)+D+O+$+T.slice(E);break;default:O=T+D+O+$;break}return i(O)}return M.toString=function(){return d+""},M}function h(d,f){var p=u((d=Am(d),d.type="f",d)),y=Math.max(-8,Math.min(8,Math.floor(dh(f)/3)))*3,m=Math.pow(10,-y),v=g5[8+y/3];return function(b){return p(m*b)+v}}return{format:u,formatPrefix:h}}var ev,YT,N9;JIe({thousands:",",grouping:[3],currency:["$",""]});function JIe(e){return ev=QIe(e),YT=ev.format,N9=ev.formatPrefix,ev}function ZIe(e){return Math.max(0,-dh(Math.abs(e)))}function eMe(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(dh(t)/3)))*3-dh(Math.abs(e)))}function tMe(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,dh(t)-dh(e))+1}function C9(e,t,n,r){var a=uN(e,t,n),i;switch(r=Am(r??",f"),r.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(i=eMe(a,o))&&(r.precision=i),N9(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=tMe(a,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=ZIe(a))&&(r.precision=i-(r.type==="%")*2);break}}return YT(r)}function Xl(e){var t=e.domain;return e.ticks=function(n){var r=t();return lN(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var a=t();return C9(a[0],a[a.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),a=0,i=r.length-1,o=r[a],l=r[i],c,u,h=10;for(l<o&&(u=o,o=l,l=u,u=a,a=i,i=u);h-- >0;){if(u=cN(o,l,n),u===c)return r[a]=o,r[i]=l,t(r);if(u>0)o=Math.floor(o/u)*u,l=Math.ceil(l/u)*u;else if(u<0)o=Math.ceil(o*u)/u,l=Math.floor(l*u)/u;else break;c=u}return e},e}function bx(){var e=VT();return e.copy=function(){return Xg(e,bx())},fs.apply(e,arguments),Xl(e)}function P9(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,yx),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return P9(e).unknown(t)},e=arguments.length?Array.from(e,yx):[0,1],Xl(n)}function T9(e,t){e=e.slice();var n=0,r=e.length-1,a=e[n],i=e[r],o;return i<a&&(o=n,n=r,r=o,o=a,a=i,i=o),e[n]=t.floor(a),e[r]=t.ceil(i),e}function y5(e){return Math.log(e)}function v5(e){return Math.exp(e)}function nMe(e){return-Math.log(-e)}function rMe(e){return-Math.exp(-e)}function aMe(e){return isFinite(e)?+("1e"+e):e<0?0:e}function sMe(e){return e===10?aMe:e===Math.E?Math.exp:t=>Math.pow(e,t)}function iMe(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function b5(e){return(t,n)=>-e(-t,n)}function KT(e){const t=e(y5,v5),n=t.domain;let r=10,a,i;function o(){return a=iMe(r),i=sMe(r),n()[0]<0?(a=b5(a),i=b5(i),e(nMe,rMe)):e(y5,v5),t}return t.base=function(l){return arguments.length?(r=+l,o()):r},t.domain=function(l){return arguments.length?(n(l),o()):n()},t.ticks=l=>{const c=n();let u=c[0],h=c[c.length-1];const d=h<u;d&&([u,h]=[h,u]);let f=a(u),p=a(h),y,m;const v=l==null?10:+l;let b=[];if(!(r%1)&&p-f<v){if(f=Math.floor(f),p=Math.ceil(p),u>0){for(;f<=p;++f)for(y=1;y<r;++y)if(m=f<0?y/i(-f):y*i(f),!(m<u)){if(m>h)break;b.push(m)}}else for(;f<=p;++f)for(y=r-1;y>=1;--y)if(m=f>0?y/i(-f):y*i(f),!(m<u)){if(m>h)break;b.push(m)}b.length*2<v&&(b=lN(u,h,v))}else b=lN(f,p,Math.min(p-f,v)).map(i);return d?b.reverse():b},t.tickFormat=(l,c)=>{if(l==null&&(l=10),c==null&&(c=r===10?"s":","),typeof c!="function"&&(!(r%1)&&(c=Am(c)).precision==null&&(c.trim=!0),c=YT(c)),l===1/0)return c;const u=Math.max(1,r*l/t.ticks().length);return h=>{let d=h/i(Math.round(a(h)));return d*r<r-.5&&(d*=r),d<=u?c(h):""}},t.nice=()=>n(T9(n(),{floor:l=>i(Math.floor(a(l))),ceil:l=>i(Math.ceil(a(l)))})),t}function A9(){const e=KT(F0()).domain([1,10]);return e.copy=()=>Xg(e,A9()).base(e.base()),fs.apply(e,arguments),e}
4200function x5(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function w5(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function XT(e){var t=1,n=e(x5(t),w5(t));return n.constant=function(r){return arguments.length?e(x5(t=+r),w5(t)):t},Xl(n)}function E9(){var e=XT(F0());return e.copy=function(){return Xg(e,E9()).constant(e.constant())},fs.apply(e,arguments)}function _5(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function oMe(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function lMe(e){return e<0?-e*e:e*e}function QT(e){var t=e(Qr,Qr),n=1;function r(){return n===1?e(Qr,Qr):n===.5?e(oMe,lMe):e(_5(n),_5(1/n))}return t.exponent=function(a){return arguments.length?(n=+a,r()):n},Xl(t)}function JT(){var e=QT(F0());return e.copy=function(){return Xg(e,JT()).exponent(e.exponent())},fs.apply(e,arguments),e}function cMe(){return JT.apply(null,arguments).exponent(.5)}function k5(e){return Math.sign(e)*e*e}function uMe(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function O9(){var e=VT(),t=[0,1],n=!1,r;function a(i){var o=uMe(e(i));return isNaN(o)?r:n?Math.round(o):o}return a.invert=function(i){return e.invert(k5(i))},a.domain=function(i){return arguments.length?(e.domain(i),a):e.domain()},a.range=function(i){return arguments.length?(e.range((t=Array.from(i,yx)).map(k5)),a):t.slice()},a.rangeRound=function(i){return a.range(i).round(!0)},a.round=function(i){return arguments.length?(n=!!i,a):n},a.clamp=function(i){return arguments.length?(e.clamp(i),a):e.clamp()},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return O9(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},fs.apply(a,arguments),Xl(a)}function R9(){var e=[],t=[],n=[],r;function a(){var o=0,l=Math.max(1,t.length);for(n=new Array(l-1);++o<l;)n[o-1]=mIe(e,o/l);return i}function i(o){return o==null||isNaN(o=+o)?r:t[Yg(n,o)]}return i.invertExtent=function(o){var l=t.indexOf(o);return l<0?[NaN,NaN]:[l>0?n[l-1]:e[0],l<n.length?n[l]:e[e.length-1]]},i.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let l of o)l!=null&&!isNaN(l=+l)&&e.push(l);return e.sort(Cl),a()},i.range=function(o){return arguments.length?(t=Array.from(o),a()):t.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.quantiles=function(){return n.slice()},i.copy=function(){return R9().domain(e).range(t).unknown(r)},fs.apply(i,arguments)}function I9(){var e=0,t=1,n=1,r=[.5],a=[0,1],i;function o(c){return c!=null&&c<=c?a[Yg(r,c,0,n)]:i}function l(){var c=-1;for(r=new Array(n);++c<n;)r[c]=((c+1)*t-(c-n)*e)/(n+1);return o}return o.domain=function(c){return arguments.length?([e,t]=c,e=+e,t=+t,l()):[e,t]},o.range=function(c){return arguments.length?(n=(a=Array.from(c)).length-1,l()):a.slice()},o.invertExtent=function(c){var u=a.indexOf(c);return u<0?[NaN,NaN]:u<1?[e,r[0]]:u>=n?[r[n-1],t]:[r[u-1],r[u]]},o.unknown=function(c){return arguments.length&&(i=c),o},o.thresholds=function(){return r.slice()},o.copy=function(){return I9().domain([e,t]).range(a).unknown(i)},fs.apply(Xl(o),arguments)}function M9(){var e=[.5],t=[0,1],n,r=1;function a(i){return i!=null&&i<=i?t[Yg(e,i,0,r)]:n}return a.domain=function(i){return arguments.length?(e=Array.from(i),r=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(i){return arguments.length?(t=Array.from(i),r=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(i){var o=t.indexOf(i);return[e[o-1],e[o]]},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return M9().domain(e).range(t).unknown(n)},fs.apply(a,arguments)}const X1=new Date,Q1=new Date;function sr(e,t,n,r){function a(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return a.floor=i=>(e(i=new Date(+i)),i),a.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),a.round=i=>{const o=a(i),l=a.ceil(i);return i-o<l-i?o:l},a.offset=(i,o)=>(t(i=new Date(+i),o==null?1:Math.floor(o)),i),a.range=(i,o,l)=>{const c=[];if(i=a.ceil(i),l=l==null?1:Math.floor(l),!(i<o)||!(l>0))return c;let u;do c.push(u=new Date(+i)),t(i,l),e(i);while(u<i&&i<o);return c},a.filter=i=>sr(o=>{if(o>=o)for(;e(o),!i(o);)o.setTime(o-1)},(o,l)=>{if(o>=o)if(l<0)for(;++l<=0;)for(;t(o,-1),!i(o););else for(;--l>=0;)for(;t(o,1),!i(o););}),n&&(a.count=(i,o)=>(X1.setTime(+i),Q1.setTime(+o),e(X1),e(Q1),Math.floor(n(X1,Q1))),a.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?a.filter(r?o=>r(o)%i===0:o=>a.count(0,o)%i===0):a)),a}const xx=sr(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);xx.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?sr(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):xx);xx.range;
vendor: 4,996 bytes, line 4200
4200const lo=1e3,Za=lo*60,co=Za*60,No=co*24,ZT=No*7,j5=No*30,J1=No*365,jc=sr(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*lo)},(e,t)=>(t-e)/lo,e=>e.getUTCSeconds());jc.range;const eA=sr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*lo)},(e,t)=>{e.setTime(+e+t*Za)},(e,t)=>(t-e)/Za,e=>e.getMinutes());eA.range;const tA=sr(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Za)},(e,t)=>(t-e)/Za,e=>e.getUTCMinutes());tA.range;const nA=sr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*lo-e.getMinutes()*Za)},(e,t)=>{e.setTime(+e+t*co)},(e,t)=>(t-e)/co,e=>e.getHours());nA.range;const rA=sr(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*co)},(e,t)=>(t-e)/co,e=>e.getUTCHours());rA.range;const Qg=sr(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Za)/No,e=>e.getDate()-1);Qg.range;const B0=sr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/No,e=>e.getUTCDate()-1);B0.range;const D9=sr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/No,e=>Math.floor(e/No));D9.range;function _u(e){return sr(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Za)/ZT)}const W0=_u(0),wx=_u(1),dMe=_u(2),hMe=_u(3),hh=_u(4),fMe=_u(5),pMe=_u(6);W0.range;wx.range;dMe.range;hMe.range;hh.range;fMe.range;pMe.range;function ku(e){return sr(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/ZT)}const q0=ku(0),_x=ku(1),mMe=ku(2),gMe=ku(3),fh=ku(4),yMe=ku(5),vMe=ku(6);q0.range;_x.range;mMe.range;gMe.range;fh.range;yMe.range;vMe.range;const aA=sr(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());aA.range;const sA=sr(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());sA.range;const Co=sr(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Co.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:sr(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});Co.range;const Po=sr(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Po.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:sr(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});Po.range;function $9(e,t,n,r,a,i){const o=[[jc,1,lo],[jc,5,5*lo],[jc,15,15*lo],[jc,30,30*lo],[i,1,Za],[i,5,5*Za],[i,15,15*Za],[i,30,30*Za],[a,1,co],[a,3,3*co],[a,6,6*co],[a,12,12*co],[r,1,No],[r,2,2*No],[n,1,ZT],[t,1,j5],[t,3,3*j5],[e,1,J1]];function l(u,h,d){const f=h<u;f&&([u,h]=[h,u]);const p=d&&typeof d.range=="function"?d:c(u,h,d),y=p?p.range(u,+h+1):[];return f?y.reverse():y}function c(u,h,d){const f=Math.abs(h-u)/d,p=WT(([,,v])=>v).right(o,f);if(p===o.length)return e.every(uN(u/J1,h/J1,d));if(p===0)return xx.every(Math.max(uN(u,h,d),1));const[y,m]=o[f/o[p-1][2]<o[p][2]/f?p-1:p];return y.every(m)}return[l,c]}const[bMe,xMe]=$9(Po,sA,q0,D9,rA,tA),[wMe,_Me]=$9(Co,aA,W0,Qg,nA,eA);function Z1(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function ek(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function If(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function kMe(e){var t=e.dateTime,n=e.date,r=e.time,a=e.periods,i=e.days,o=e.shortDays,l=e.months,c=e.shortMonths,u=Mf(a),h=Df(a),d=Mf(i),f=Df(i),p=Mf(o),y=Df(o),m=Mf(l),v=Df(l),b=Mf(c),x=Df(c),w={a:A,A:E,b:T,B:L,c:null,d:A5,e:A5,f:VMe,g:n4e,G:a4e,H:UMe,I:zMe,j:HMe,L:L9,m:GMe,M:YMe,p:B,q:H,Q:R5,s:I5,S:KMe,u:XMe,U:QMe,V:JMe,w:ZMe,W:e4e,x:null,X:null,y:t4e,Y:r4e,Z:s4e,"%":O5},_={a:G,A:Z,b:le,B:ue,c:null,d:E5,e:E5,f:c4e,g:b4e,G:w4e,H:i4e,I:o4e,j:l4e,L:B9,m:u4e,M:d4e,p:re,q,Q:R5,s:I5,S:h4e,u:f4e,U:p4e,V:m4e,w:g4e,W:y4e,x:null,X:null,y:v4e,Y:x4e,Z:_4e,"%":O5},k={a:M,A:O,b:D,B:$,c:R,d:P5,e:P5,f:FMe,g:C5,G:N5,H:T5,I:T5,j:MMe,L:LMe,m:IMe,M:DMe,p:C,q:RMe,Q:WMe,s:qMe,S:$Me,u:PMe,U:TMe,V:AMe,w:CMe,W:EMe,x:I,X:P,y:C5,Y:N5,Z:OMe,"%":BMe};w.x=j(n,w),w.X=j(r,w),w.c=j(t,w),_.x=j(n,_),_.X=j(r,_),_.c=j(t,_);function j(U,Q){return function(J){var Y=[],oe=-1,ve=0,De=U.length,Le,He,vt;for(J instanceof Date||(J=new Date(+J));++oe<De;)U.charCodeAt(oe)===37&&(Y.push(U.slice(ve,oe)),(He=S5[Le=U.charAt(++oe)])!=null?Le=U.charAt(++oe):He=Le==="e"?" ":"0",(vt
vendor: 5,138 bytes, line 4200
4200=Q[Le])&&(Le=vt(J,He)),Y.push(Le),ve=oe+1);return Y.push(U.slice(ve,oe)),Y.join("")}}function S(U,Q){return function(J){var Y=If(1900,void 0,1),oe=N(Y,U,J+="",0),ve,De;if(oe!=J.length)return null;if("Q"in Y)return new Date(Y.Q);if("s"in Y)return new Date(Y.s*1e3+("L"in Y?Y.L:0));if(Q&&!("Z"in Y)&&(Y.Z=0),"p"in Y&&(Y.H=Y.H%12+Y.p*12),Y.m===void 0&&(Y.m="q"in Y?Y.q:0),"V"in Y){if(Y.V<1||Y.V>53)return null;"w"in Y||(Y.w=1),"Z"in Y?(ve=ek(If(Y.y,0,1)),De=ve.getUTCDay(),ve=De>4||De===0?_x.ceil(ve):_x(ve),ve=B0.offset(ve,(Y.V-1)*7),Y.y=ve.getUTCFullYear(),Y.m=ve.getUTCMonth(),Y.d=ve.getUTCDate()+(Y.w+6)%7):(ve=Z1(If(Y.y,0,1)),De=ve.getDay(),ve=De>4||De===0?wx.ceil(ve):wx(ve),ve=Qg.offset(ve,(Y.V-1)*7),Y.y=ve.getFullYear(),Y.m=ve.getMonth(),Y.d=ve.getDate()+(Y.w+6)%7)}else("W"in Y||"U"in Y)&&("w"in Y||(Y.w="u"in Y?Y.u%7:"W"in Y?1:0),De="Z"in Y?ek(If(Y.y,0,1)).getUTCDay():Z1(If(Y.y,0,1)).getDay(),Y.m=0,Y.d="W"in Y?(Y.w+6)%7+Y.W*7-(De+5)%7:Y.w+Y.U*7-(De+6)%7);return"Z"in Y?(Y.H+=Y.Z/100|0,Y.M+=Y.Z%100,ek(Y)):Z1(Y)}}function N(U,Q,J,Y){for(var oe=0,ve=Q.length,De=J.length,Le,He;oe<ve;){if(Y>=De)return-1;if(Le=Q.charCodeAt(oe++),Le===37){if(Le=Q.charAt(oe++),He=k[Le in S5?Q.charAt(oe++):Le],!He||(Y=He(U,J,Y))<0)return-1}else if(Le!=J.charCodeAt(Y++))return-1}return Y}function C(U,Q,J){var Y=u.exec(Q.slice(J));return Y?(U.p=h.get(Y[0].toLowerCase()),J+Y[0].length):-1}function M(U,Q,J){var Y=p.exec(Q.slice(J));return Y?(U.w=y.get(Y[0].toLowerCase()),J+Y[0].length):-1}function O(U,Q,J){var Y=d.exec(Q.slice(J));return Y?(U.w=f.get(Y[0].toLowerCase()),J+Y[0].length):-1}function D(U,Q,J){var Y=b.exec(Q.slice(J));return Y?(U.m=x.get(Y[0].toLowerCase()),J+Y[0].length):-1}function $(U,Q,J){var Y=m.exec(Q.slice(J));return Y?(U.m=v.get(Y[0].toLowerCase()),J+Y[0].length):-1}function R(U,Q,J){return N(U,t,Q,J)}function I(U,Q,J){return N(U,n,Q,J)}function P(U,Q,J){return N(U,r,Q,J)}function A(U){return o[U.getDay()]}function E(U){return i[U.getDay()]}function T(U){return c[U.getMonth()]}function L(U){return l[U.getMonth()]}function B(U){return a[+(U.getHours()>=12)]}function H(U){return 1+~~(U.getMonth()/3)}function G(U){return o[U.getUTCDay()]}function Z(U){return i[U.getUTCDay()]}function le(U){return c[U.getUTCMonth()]}function ue(U){return l[U.getUTCMonth()]}function re(U){return a[+(U.getUTCHours()>=12)]}function q(U){return 1+~~(U.getUTCMonth()/3)}return{format:function(U){var Q=j(U+="",w);return Q.toString=function(){return U},Q},parse:function(U){var Q=S(U+="",!1);return Q.toString=function(){return U},Q},utcFormat:function(U){var Q=j(U+="",_);return Q.toString=function(){return U},Q},utcParse:function(U){var Q=S(U+="",!0);return Q.toString=function(){return U},Q}}}var S5={"-":"",_:" ",0:"0"},mr=/^\s*\d+/,jMe=/^%/,SMe=/[\\^$*+?|[\]().{}]/g;function It(e,t,n){var r=e<0?"-":"",a=(r?-e:e)+"",i=a.length;return r+(i<n?new Array(n-i+1).join(t)+a:a)}function NMe(e){return e.replace(SMe,"\\$&")}function Mf(e){return new RegExp("^(?:"+e.map(NMe).join("|")+")","i")}function Df(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function CMe(e,t,n){var r=mr.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function PMe(e,t,n){var r=mr.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function TMe(e,t,n){var r=mr.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function AMe(e,t,n){var r=mr.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function EMe(e,t,n){var r=mr.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function N5(e,t,n){var r=mr.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function C5(e,t,n){var r=mr.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function OMe(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function RMe(e,t,n){var r=mr.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function IMe(e,t,n){var r=mr.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function P5(e,t,n){var r=mr.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function MMe(e,t,n){var r=mr.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function T5(e,t,n){var r=mr.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function DMe(e,t,n){var r=mr.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function $Me(e,t,n){var r=mr.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function LMe(e,t,n){var r=mr.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function FMe(e,t,n){var r=mr.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function BMe(e,t,n){var r=jMe.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function WMe(e,t,n){var r=mr.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function qMe(e,t,n){var r=mr.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function A5(e,t){return It(e.getDate(),t,2)}function UMe(e,t){return It(e.getHours(),t,2)}function zMe(e,t){return It(e.getHours()%12||12,t,2)}function HMe(e,t){return It(1+Qg.count(Co(e),e),t,3)}function L9(e,t){return It(e.getMilliseconds(),t,3)}
4200function VMe(e,t){return L9(e,t)+"000"}function GMe(e,t){return It(e.getMonth()+1,t,2)}function YMe(e,t){return It(e.getMinutes(),t,2)}function KMe(e,t){return It(e.getSeconds(),t,2)}function XMe(e){var t=e.getDay();return t===0?7:t}function QMe(e,t){return It(W0.count(Co(e)-1,e),t,2)}function F9(e){var t=e.getDay();return t>=4||t===0?hh(e):hh.ceil(e)}function JMe(e,t){return e=F9(e),It(hh.count(Co(e),e)+(Co(e).getDay()===4),t,2)}function ZMe(e){return e.getDay()}function e4e(e,t){return It(wx.count(Co(e)-1,e),t,2)}function t4e(e,t){return It(e.getFullYear()%100,t,2)}function n4e(e,t){return e=F9(e),It(e.getFullYear()%100,t,2)}function r4e(e,t){return It(e.getFullYear()%1e4,t,4)}function a4e(e,t){var n=e.getDay();return e=n>=4||n===0?hh(e):hh.ceil(e),It(e.getFullYear()%1e4,t,4)}function s4e(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+It(t/60|0,"0",2)+It(t%60,"0",2)}function E5(e,t){return It(e.getUTCDate(),t,2)}function i4e(e,t){return It(e.getUTCHours(),t,2)}function o4e(e,t){return It(e.getUTCHours()%12||12,t,2)}function l4e(e,t){return It(1+B0.count(Po(e),e),t,3)}function B9(e,t){return It(e.getUTCMilliseconds(),t,3)}function c4e(e,t){return B9(e,t)+"000"}function u4e(e,t){return It(e.getUTCMonth()+1,t,2)}function d4e(e,t){return It(e.getUTCMinutes(),t,2)}function h4e(e,t){return It(e.getUTCSeconds(),t,2)}function f4e(e){var t=e.getUTCDay();return t===0?7:t}function p4e(e,t){return It(q0.count(Po(e)-1,e),t,2)}function W9(e){var t=e.getUTCDay();return t>=4||t===0?fh(e):fh.ceil(e)}function m4e(e,t){return e=W9(e),It(fh.count(Po(e),e)+(Po(e).getUTCDay()===4),t,2)}function g4e(e){return e.getUTCDay()}function y4e(e,t){return It(_x.count(Po(e)-1,e),t,2)}function v4e(e,t){return It(e.getUTCFullYear()%100,t,2)}function b4e(e,t){return e=W9(e),It(e.getUTCFullYear()%100,t,2)}function x4e(e,t){return It(e.getUTCFullYear()%1e4,t,4)}function w4e(e,t){var n=e.getUTCDay();return e=n>=4||n===0?fh(e):fh.ceil(e),It(e.getUTCFullYear()%1e4,t,4)}function _4e(){return"+0000"}function O5(){return"%"}function R5(e){return+e}function I5(e){return Math.floor(+e/1e3)}var Du,q9,U9;k4e({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function k4e(e){return Du=kMe(e),q9=Du.format,Du.parse,U9=Du.utcFormat,Du.utcParse,Du}function j4e(e){return new Date(e)}function S4e(e){return e instanceof Date?+e:+new Date(+e)}function iA(e,t,n,r,a,i,o,l,c,u){var h=VT(),d=h.invert,f=h.domain,p=u(".%L"),y=u(":%S"),m=u("%I:%M"),v=u("%I %p"),b=u("%a %d"),x=u("%b %d"),w=u("%B"),_=u("%Y");function k(j){return(c(j)<j?p:l(j)<j?y:o(j)<j?m:i(j)<j?v:r(j)<j?a(j)<j?b:x:n(j)<j?w:_)(j)}return h.invert=function(j){return new Date(d(j))},h.domain=function(j){return arguments.length?f(Array.from(j,S4e)):f().map(j4e)},h.ticks=function(j){var S=f();return e(S[0],S[S.length-1],j??10)},h.tickFormat=function(j,S){return S==null?k:u(S)},h.nice=function(j){var S=f();return(!j||typeof j.range!="function")&&(j=t(S[0],S[S.length-1],j??10)),j?f(T9(S,j)):h},h.copy=function(){return Xg(h,iA(e,t,n,r,a,i,o,l,c,u))},h}function N4e(){return fs.apply(iA(wMe,_Me,Co,aA,W0,Qg,nA,eA,jc,q9).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function C4e(){return fs.apply(iA(bMe,xMe,Po,sA,q0,B0,rA,tA,jc,U9).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function U0(){var e=0,t=1,n,r,a,i,o=Qr,l=!1,c;function u(d){return d==null||isNaN(d=+d)?c:o(a===0?.5:(d=(i(d)-n)*a,l?Math.max(0,Math.min(1,d)):d))}u.domain=function(d){return arguments.length?([e,t]=d,n=i(e=+e),r=i(t=+t),a=n===r?0:1/(r-n),u):[e,t]},u.clamp=function(d){return arguments.length?(l=!!d,u):l},u.interpolator=function(d){return arguments.length?(o=d,u):o};function h(d){return function(f){var p,y;return arguments.length?([p,y]=f,o=d(p,y),u):[o(0),o(1)]}}return u.range=h(lf),u.rangeRound=h(HT),u.unknown=function(d){return arguments.length?(c=d,u):c},function(d){return i=d,n=d(e),r=d(t),a=n===r?0:1/(r-n),u}}function Ql(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function z9(){var e=Xl(U0()(Qr));return e.copy=function(){return Ql(e,z9())},Do.apply(e,arguments)}function H9(){var e=KT(U0()).domain([1,10]);return e.copy=function(){return Ql(e,H9()).base(e.base())},Do.apply(e,arguments)}function V9(){var e=XT(U0());return e.copy=function(){return Ql(e,V9()).constant(e.constant())},Do.apply(e,arguments)}function oA(){var e=QT(U0());return e.copy=function(){return Ql(e,oA()).exponent(e.exponent())},Do.apply(e,arguments)}function P4e(){return oA.apply(null,arguments).exponent(.5)}function G9(){var e=[],t=Qr;function n(r){if(r!=null&&!isNaN(r=+r))return t((Yg(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let a of r)a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(Cl),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,a)=>t(a/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(a,i)=>pIe(e,i/r))},n.copy=function(){return G9(t).domain(e)},Do.apply(n,arguments)}function z0(){var e=0,t=.5,n=1,r=1,a,i,o,l,c,u=Qr,h,d=!1,f;function p(m){return isNaN(m=+m)?f:(m=.5+((m=+h(m))-i)*(r*m<r*i?l:c),u(d?Math.max(0,Math.min(1,m)):m))}p.domain=function(m){return arguments.length?([e,t,n]=m,a=h(e=+e),i=h(t=+t),o=h(n=+n),l=a===i?0:.5/(i-a),c=i===o?0:.5/(o-i),r=i<a?-1:1,p):[e,t,n]},p.clamp=function(m){return arguments.length?(d=!!m,p):d},p.interpolator=function(m){return arguments.length?(u=m,p):u};function y(m){return function(v){var b,x,w;return arguments.length?([b,x,w]=v,u=BIe(m,[b,x,w]),p):[u(0),u(.5),u(1)]}}return p.range=y(lf),p.rangeRound=y(HT),p.unknown=function(m){return arguments.length?(f=m,p):f},function(m){return h=m,a=m(e),i=m(t),o=m(n),l=a===i?0:.5/(i-a),c=i===o?0:.5/(o-i),r=i<a?-1:1,p}}function Y9(){var e=Xl(z0()(Qr));return e.copy=function(){return Ql(e,Y9())},Do.apply(e,arguments)}function K9(){var e=KT(z0()).domain([.1,1,10]);return e.copy=function(){return Ql(e,K9()).base(e.base())},Do.apply(e,arguments)}function X9(){var e=XT(z0());return e.copy=function(){return Ql(e,X9()).constant(e.constant())},Do.apply(e,arguments)}function lA(){var e=QT(z0());return e.copy=function(){return Ql(e,lA()).exponent(e.exponent())},Do.apply(e,arguments)}function T4e(){return lA.apply(null,arguments).exponent(.5)}const M5=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Nm,scaleDiverging:Y9,scaleDivergingLog:K9,scaleDivergingPow:lA,scaleDivergingSqrt:T4e,scaleDivergingSymlog:X9,scaleIdentity:P9,scaleImplicit:dN,scaleLinear:bx,scaleLog:A9,scaleOrdinal:qT,scalePoint:wp,scalePow:JT,scaleQuantile:R9,scaleQuantize:I9,scaleRadial:O9,scaleSequential:z9,scaleSequentialLog:H9,scaleSequentialPow:oA,scaleSequentialQuantile:G9,scaleSequentialSqrt:P4e,scaleSequentialSymlog:V9,scaleSqrt:cMe,scaleSymlog:E9,scaleThreshold:M9,scaleTime:N4e,scaleUtc:C4e,tickFormat:C9},Symbol.toStringTag,{value:"Module"}));var A4e=Qh;function E4e(e,t,n){for(var r=-1,a=e.length;++r<a;){var i=e[r],o=t(i);if(o!=null&&(l===void 0?o===o&&!A4e(o):n(o,l)))var l=o,c=i}return c}var Q9=E4e;function O4e(e,t){return e>t}var R4e=O4e,I4e=Q9,M4e=R4e,D4e=sf;function $4e(e){return e&&e.length?I4e(e,D4e,M4e):void 0}var L4e=$4e;const fl=Vt(L4e);function F4e(e,t){return e<t}var B4e=F4e,W4e=Q9,q4e=B4e,U4e=sf;function z4e(e){return e&&e.length?W4e(e,U4e,q4e):void 0}var H4e=z4e;const H0=Vt(H4e);var V4e=wT,G4e=of,Y4e=s9,K4e=wa;function X4e(e,t){var n=K4e(e)?V4e:Y4e;return n(e,G4e(t))}var Q4e=X4e,J4e=r9,Z4e=Q4e;function e5e(e,t){return J4e(Z4e(e,t),1)}var t5e=e5e;const n5e=Vt(t5e);var r5e=$T;function a5e(e,t){return r5e(e,t)}var s5e=a5e;const Em=Vt(s5e);
vendor: 63,116 bytes, lines 4200-4226
4200var cf=1e9,i5e={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},uA,fn=!0,os="[DecimalError] ",Uc=os+"Invalid argument: ",cA=os+"Exponent out of range: ",uf=Math.floor,hc=Math.pow,o5e=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Pa,lr=1e7,rn=7,J9=9007199254740991,kx=uf(J9/rn),Te={};Te.absoluteValue=Te.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};Te.comparedTo=Te.cmp=function(e){var t,n,r,a,i=this;if(e=new i.constructor(e),i.s!==e.s)return i.s||-e.s;if(i.e!==e.e)return i.e>e.e^i.s<0?1:-1;for(r=i.d.length,a=e.d.length,t=0,n=r<a?r:a;t<n;++t)if(i.d[t]!==e.d[t])return i.d[t]>e.d[t]^i.s<0?1:-1;return r===a?0:r>a^i.s<0?1:-1};Te.decimalPlaces=Te.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*rn;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};Te.dividedBy=Te.div=function(e){return po(this,new this.constructor(e))};Te.dividedToIntegerBy=Te.idiv=function(e){var t=this,n=t.constructor;return Ht(po(t,new n(e),0,1),n.precision)};Te.equals=Te.eq=function(e){return!this.cmp(e)};Te.exponent=function(){return zn(this)};Te.greaterThan=Te.gt=function(e){return this.cmp(e)>0};Te.greaterThanOrEqualTo=Te.gte=function(e){return this.cmp(e)>=0};Te.isInteger=Te.isint=function(){return this.e>this.d.length-2};Te.isNegative=Te.isneg=function(){return this.s<0};Te.isPositive=Te.ispos=function(){return this.s>0};Te.isZero=function(){return this.s===0};Te.lessThan=Te.lt=function(e){return this.cmp(e)<0};Te.lessThanOrEqualTo=Te.lte=function(e){return this.cmp(e)<1};Te.logarithm=Te.log=function(e){var t,n=this,r=n.constructor,a=r.precision,i=a+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Pa))throw Error(os+"NaN");if(n.s<1)throw Error(os+(n.s?"NaN":"-Infinity"));return n.eq(Pa)?new r(0):(fn=!1,t=po(Om(n,i),Om(e,i),i),fn=!0,Ht(t,a))};Te.minus=Te.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?tV(t,e):Z9(t,(e.s=-e.s,e))};Te.modulo=Te.mod=function(e){var t,n=this,r=n.constructor,a=r.precision;if(e=new r(e),!e.s)throw Error(os+"NaN");return n.s?(fn=!1,t=po(n,e,0,1).times(e),fn=!0,n.minus(t)):Ht(new r(n),a)};Te.naturalExponential=Te.exp=function(){return eV(this)};Te.naturalLogarithm=Te.ln=function(){return Om(this)};Te.negated=Te.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Te.plus=Te.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Z9(t,e):tV(t,(e.s=-e.s,e))};Te.precision=Te.sd=function(e){var t,n,r,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Uc+e);if(t=zn(a)+1,r=a.d.length-1,n=r*rn+1,r=a.d[r],r){for(;r%10==0;r/=10)n--;for(r=a.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};Te.squareRoot=Te.sqrt=function(){var e,t,n,r,a,i,o,l=this,c=l.constructor;if(l.s<1){if(!l.s)return new c(0);throw Error(os+"NaN")}for(e=zn(l),fn=!1,a=Math.sqrt(+l),a==0||a==1/0?(t=hi(l.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=uf((e+1)/2)-(e<0||e%2),a==1/0?t="5e"+e:(t=a.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new c(t)):r=new c(a.toString()),n=c.precision,a=o=n+3;;)if(i=r,r=i.plus(po(l,i,o+2)).times(.5),hi(i.d).slice(0,o)===(t=hi(r.d)).slice(0,o)){if(t=t.slice(o-3,o+1),a==o&&t=="4999"){if(Ht(i,n+1,0),i.times(i).eq(l)){r=i;break}}else if(t!="9999")break;o+=4}return fn=!0,Ht(r,n)};Te.times=Te.mul=function(e){var t,n,r,a,i,o,l,c,u,h=this,d=h.constructor,f=h.d,p=(e=new d(e)).d;if(!h.s||!e.s)return new d(0);for(e.s*=h.s,n=h.e+e.e,c=f.length,u=p.length,c<u&&(i=f,f=p,p=i,o=c,c=u,u=o),i=[],o=c+u,r=o;r--;)i.push(0);for(r=u;--r>=0;){for(t=0,a=c+r;a>r;)l=i[a]+p[r]*f[a-r-1]+t,i[a--]=l%lr|0,t=l/lr|0;i[a]=(i[a]+t)%lr|0}for(;!i[--o];)i.pop();return t?++n:i.shift(),e.d=i,e.e=n,fn?Ht(e,d.precision):e};Te.toDecimalPlaces=Te.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Pi(e,0,cf),t===void 0?t=r.rounding:Pi(t,0,8),Ht(n,e+zn(n)+1,t))};Te.toExponential=function(e,t){var n,r=this,a=r.constructor;return e===void 0?n=uu(r,!0):(Pi(e,0,cf),t===void 0?t=a.rounding:Pi(t,0,8),r=Ht(new a(r),e+1,t),n=uu(r,!0,e+1)),n};Te.toFixed=function(e,t){var n,r,a=this,i=a.constructor;return e===void 0?uu(a):(Pi(e,0,cf),t===void 0?t=i.rounding:Pi(t,0,8),r=Ht(new i(a),e+zn(a)+1,t),n=uu(r.abs(),!1,e+zn(r)+1),a.isneg()&&!a.isZero()?"-"+n:n)};Te.toInteger=Te.toint=function(){var e=this,t=e.constructor;return Ht(new t(e),zn(e)+1,t.rounding)};Te.toNumber=function(){return+this};Te.toPower=Te.pow=function(e){var t,n,r,a,i,o,l=this,c=l.constructor,u=12,h=+(e=new c(e));if(!e.s)return new c(Pa);if(l=new c(l),!l.s){if(e.s<1)throw Error(os+"Infinity");return l}if(l.eq(Pa))return l;if(r=c.precision,e.eq(Pa))return Ht(l,r);if(t=e.e,n=e.d.length-1,o=t>=n,i=l.s,o){if((n=h<0?-h:h)<=J9){for(a=new c(Pa),t=Math.ceil(r/rn+4),fn=!1;n%2&&(a=a.times(l),$5(a.d,t)),n=uf(n/2),n!==0;)l=l.times(l),$5(l.d,t);return fn=!0,e.s<0?new c(Pa).div(a):Ht(a,r)}}else if(i<0)throw Error(os+"NaN");return i=i<0&&e.d[Math.max(t,n)]&1?-1:1,l.s=1,fn=!1,a=e.times(Om(l,r+u)),fn=!0,a=eV(a),a.s=i,a};Te.toPrecision=function(e,t){var n,r,a=this,i=a.constructor;return e===void 0?(n=zn(a),r=uu(a,n<=i.toExpNeg||n>=i.toExpPos)):(Pi(e,1,cf),t===void 0?t=i.rounding:Pi(t,0,8),a=Ht(new i(a),e,t),n=zn(a),r=uu(a,e<=n||n<=i.toExpNeg,e)),r};Te.toSignificantDigits=Te.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Pi(e,1,cf),t===void 0?t=r.rounding:Pi(t,0,8)),Ht(new r(n),e,t)};Te.toString=Te.valueOf=Te.val=Te.toJSON=Te[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=zn(e),n=e.constructor;return uu(e,t<=n.toExpNeg||t>=n.toExpPos)};function Z9(e,t){var n,r,a,i,o,l,c,u,h=e.constructor,d=h.precision;if(!e.s||!t.s)return t.s||(t=new h(e)),fn?Ht(t,d):t;if(c=e.d,u=t.d,o=e.e,a=t.e,c=c.slice(),i=o-a,i){for(i<0?(r=c,i=-i,l=u.length):(r=u,a=o,l=c.length),o=Math.ceil(d/rn),l=o>l?o+1:l+1,i>l&&(i=l,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(l=c.length,i=u.length,l-i<0&&(i=l,r=u,u=c,c=r),n=0;i;)n=(c[--i]=c[i]+u[i]+n)/lr|0,c[i]%=lr;for(n&&(c.unshift(n),++a),l=c.length;c[--l]==0;)c.pop();return t.d=c,t.e=a,fn?Ht(t,d):t}function Pi(e,t,n){if(e!==~~e||e<t||e>n)throw Error(Uc+e)}function hi(e){var t,n,r,a=e.length-1,i="",o=e[0];if(a>0){for(i+=o,t=1;t<a;t++)r=e[t]+"",n=rn-r.length,n&&(i+=Ko(n)),i+=r;o=e[t],r=o+"",n=rn-r.length,n&&(i+=Ko(n))}else if(o===0)return"0";for(;o%10===0;)o/=10;return i+o}var po=function(){function e(r,a){var i,o=0,l=r.length;for(r=r.slice();l--;)i=r[l]*a+o,r[l]=i%lr|0,o=i/lr|0;return o&&r.unshift(o),r}function t(r,a,i,o){var l,c;if(i!=o)c=i>o?1:-1;else for(l=c=0;l<i;l++)if(r[l]!=a[l]){c=r[l]>a[l]?1:-1;break}return c}function n(r,a,i){for(var o=0;i--;)r[i]-=o,o=r[i]<a[i]?1:0,r[i]=o*lr+r[i]-a[i];for(;!r[0]&&r.length>1;)r.shift()}return function(r,a,i,o){var l,c,u,h,d,f,p,y,m,v,b,x,w,_,k,j,S,N,C=r.constructor,M=r.s==a.s?1:-1,O=r.d,D=a.d;if(!r.s)return new C(r);if(!a.s)throw Error(os+"Division by zero");for(c=r.e-a.e,S=D.length,k=O.length,p=new C(M),y=p.d=[],u=0;D[u]==(O[u]||0);)++u;if(D[u]>(O[u]||0)&&--c,i==null?x=i=C.precision:o?x=i+(zn(r)-zn(a))+1:x=i,x<0)return new C(0);if(x=x/rn+2|0,u=0,S==1)for(h=0,D=D[0],x++;(u<k||h)&&x--;u++)w=h*lr+(O[u]||0),y[u]=w/D|0,h=w%D|0;else{for(h=lr/(D[0]+1)|0,h>1&&(D=e(D,h),O=e(O,h),S=D.length,k=O.length),_=S,m=O.slice(0,S),v=m.length;v<S;)m[v++]=0;N=D.slice(),N.unshift(0),j=D[0],D[1]>=lr/2&&++j;do h=0,l=t(D,m,S,v),l<0?(b=m[0],S!=v&&(b=b*lr+(m[1]||0)),h=b/j|0,h>1?(h>=lr&&(h=lr-1),d=e(D,h),f=d.length,v=m.length,l=t(d,m,f,v),l==1&&(h--,n(d,S<f?N:D,f))):(h==0&&(l=h=1),d=D.slice()),f=d.length,f<v&&d.unshift(0),n(m,d,v),l==-1&&(v=m.length,l=t(D,m,S,v),l<1&&(h++,n(m,S<v?N:D,v))),v=m.length):l===0&&(h++,m=[0]),y[u++]=h,l&&m[0]?m[v++]=O[_]||0:(m=[O[_]],v=1);while((_++<k||m[0]!==void 0)&&x--)}return y[0]||y.shift(),p.e=c,Ht(p,o?i+zn(p)+1:i)}}();function eV(e,t){var n,r,a,i,o,l,c=0,u=0,h=e.constructor,d=h.precision;if(zn(e)>16)throw Error(cA+zn(e));if(!e.s)return new h(Pa);for(t==null?(fn=!1,l=d):l=t,o=new h(.03125);e.abs().gte(.1);)e=e.times(o),u+=5;for(r=Math.log(hc(2,u))/Math.LN10*2+5|0,l+=r,n=a=i=new h(Pa),h.precision=l;;){if(a=Ht(a.times(e),l),n=n.times(++c),o=i.plus(po(a,n,l)),hi(o.d).slice(0,l)===hi(i.d).slice(0,l)){for(;u--;)i=Ht(i.times(i),l);return h.precision=d,t==null?(fn=!0,Ht(i,d)):i}i=o}}function zn(e){for(var t=e.e*rn,n=e.d[0];n>=10;n/=10)t++;return t}function tk(e,t,n){if(t>e.LN10.sd())throw fn=!0,n&&(e.precision=n),Error(os+"LN10 precision limit exceeded");return Ht(new e(e.LN10),t)}function Ko(e){for(var t="";e--;)t+="0";return t}function Om(e,t){var n,r,a,i,o,l,c,u,h,d=1,f=10,p=e,y=p.d,m=p.constructor,v=m.precision;if(p.s<1)throw Error(os+(p.s?"NaN":"-Infinity"));if(p.eq(Pa))return new m(0);if(t==null?(fn=!1,u=v):u=t,p.eq(10))return t==null&&(fn=!0),tk(m,u);if(u+=f,m.precision=u,n=hi(y),r=n.charAt(0),i=zn(p),Math.abs(i)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)p=p.times(e),n=hi(p.d),r=n.charAt(0),d++;i=zn(p),r>1?(p=new m("0."+n),i++):p=new m(r+"."+n.slice(1))}else return c=tk(m,u+2,v).times(i+""),p=Om(new m(r+"."+n.slice(1)),u-f).plus(c),m.precision=v,t==null?(fn=!0,Ht(p,v)):p;for(l=o=p=po(p.minus(Pa),p.plus(Pa),u),h=Ht(p.times(p),u),a=3;;){if(o=Ht(o.times(h),u),c=l.plus(po(o,new m(a),u)),hi(c.d).slice(0,u)===hi(l.d).slice(0,u))return l=l.times(2),i!==0&&(l=l.plus(tk(m,u+2,v).times(i+""))),l=po(l,new m(d),u),m.precision=v,t==null?(fn=!0,Ht(l,v)):l;l=c,a+=2}}function D5(e,t){var n,r,a;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(r,a),t){if(a-=r,n=n-r-1,e.e=uf(n/rn),e.d=[],r=(n+1)%rn,n<0&&(r+=rn),r<a){for(r&&e.d.push(+t.slice(0,r)),a-=rn;r<a;)e.d.push(+t.slice(r,r+=rn));t=t.slice(r),r=rn-t.length}else r-=a;for(;r--;)t+="0";if(e.d.push(+t),fn&&(e.e>kx||e.e<-kx))throw Error(cA+n)}else e.s=0,e.e=0,e.d=[0];return e}function Ht(e,t,n){var r,a,i,o,l,c,u,h,d=e.d;for(o=1,i=d[0];i>=10;i/=10)o++;if(r=t-o,r<0)r+=rn,a=t,u=d[h=0];else{if(h=Math.ceil((r+1)/rn),i=d.length,h>=i)return e;for(u=i=d[h],o=1;i>=10;i/=10)o++;r%=rn,a=r-rn+o}if(n!==void 0&&(i=hc(10,o-a-1),l=u/i%10|0,c=t<0||d[h+1]!==void 0||u%i,c=n<4?(l||c)&&(n==0||n==(e.s<0?3:2)):l>5||l==5&&(n==4||c||n==6&&(r>0?a>0?u/hc(10,o-a):0:d[h-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return c?(i=zn(e),d.length=1,t=t-i-1,d[0]=hc(10,(rn-t%rn)%rn),e.e=uf(-t/rn)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(r==0?(d.length=h,i=1,h--):(d.length=h+1,i=hc(10,rn-r),d[h]=a>0?(u/hc(10,o-a)%hc(10,a)|0)*i:0),c)for(;;)if(h==0){(d[0]+=i)==lr&&(d[0]=1,++e.e);break}else{if(d[h]+=i,d[h]!=lr)break;d[h--]=0,i=1}for(r=d.length;d[--r]===0;)d.pop();if(fn&&(e.e>kx||e.e<-kx))throw Error(cA+zn(e));return e}function tV(e,t){var n,r,a,i,o,l,c,u,h,d,f=e.constructor,p=f.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new f(e),fn?Ht(t,p):t;if(c=e.d,d=t.d,r=t.e,u=e.e,c=c.slice(),o=u-r,o){for(h=o<0,h?(n=c,o=-o,l=d.length):(n=d,r=u,l=c.length),a=Math.max(Math.ceil(p/rn),l)+2,o>a&&(o=a,n.length=1),n.reverse(),a=o;a--;)n.push(0);n.reverse()}else{for(a=c.length,l=d.length,h=a<l,h&&(l=a),a=0;a<l;a++)if(c[a]!=d[a]){h=c[a]<d[a];break}o=0}for(h&&(n=c,c=d,d=n,t.s=-t.s),l=c.length,a=d.length-l;a>0;--a)c[l++]=0;for(a=d.length;a>o;){if(c[--a]<d[a]){for(i=a;i&&c[--i]===0;)c[i]=lr-1;--c[i],c[a]+=lr}c[a]-=d[a]}for(;c[--l]===0;)c.pop();for(;c[0]===0;c.shift())--r;return c[0]?(t.d=c,t.e=r,fn?Ht(t,p):t):new f(0)}function uu(e,t,n){var r,a=zn(e),i=hi(e.d),o=i.length;return t?(n&&(r=n-o)>0?i=i.charAt(0)+"."+i.slice(1)+Ko(r):o>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(a<0?"e":"e+")+a):a<0?(i="0."+Ko(-a-1)+i,n&&(r=n-o)>0&&(i+=Ko(r))):a>=o?(i+=Ko(a+1-o),n&&(r=n-a-1)>0&&(i=i+"."+Ko(r))):((r=a+1)<o&&(i=i.slice(0,r)+"."+i.slice(r)),n&&(r=n-o)>0&&(a+1===o&&(i+="."),i+=Ko(r))),e.s<0?"-"+i:i}function $5(e,t){if(e.length>t)return e.length=t,!0}function nV(e){var t,n,r;function a(i){var o=this;if(!(o instanceof a))return new a(i);if(o.constructor=a,i instanceof a){o.s=i.s,o.e=i.e,o.d=(i=i.d)?i.slice():i;return}if(typeof i=="number"){if(i*0!==0)throw Error(Uc+i);if(i>0)o.s=1;else if(i<0)i=-i,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(i===~~i&&i<1e7){o.e=0,o.d=[i];return}return D5(o,i.toString())}else if(typeof i!="string")throw Error(Uc+i);if(i.charCodeAt(0)===45?(i=i.slice(1),o.s=-1):o.s=1,o5e.test(i))D5(o,i);else throw Error(Uc+i)}if(a.prototype=Te,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=nV,a.config=a.set=l5e,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return a.config(e),a}function l5e(e){if(!e||typeof e!="object")throw Error(os+"Object expected");var t,n,r,a=["precision",1,cf,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<a.length;t+=3)if((r=e[n=a[t]])!==void 0)if(uf(r)===r&&r>=a[t+1]&&r<=a[t+2])this[n]=r;else throw Error(Uc+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(Uc+n+": "+r);return this}var uA=nV(i5e);Pa=new uA(1);const Ut=uA;function c5e(e){return f5e(e)||h5e(e)||d5e(e)||u5e()}function u5e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
4201In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function d5e(e,t){if(e){if(typeof e=="string")return mN(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mN(e,t)}}function h5e(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function f5e(e){if(Array.isArray(e))return mN(e)}function mN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var p5e=function(t){return t},rV={"@@functional/placeholder":!0},aV=function(t){return t===rV},L5=function(t){return function n(){return arguments.length===0||arguments.length===1&&aV(arguments.length<=0?void 0:arguments[0])?n:t.apply(void 0,arguments)}},m5e=function e(t,n){return t===1?n:L5(function(){for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];var o=a.filter(function(l){return l!==rV}).length;return o>=t?n.apply(void 0,a):e(t-o,L5(function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];var h=a.map(function(d){return aV(d)?c.shift():d});return n.apply(void 0,c5e(h).concat(c))}))})},V0=function(t){return m5e(t.length,t)},gN=function(t,n){for(var r=[],a=t;a<n;++a)r[a-t]=a;return r},g5e=V0(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(n){return t[n]}).map(e)}),y5e=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return p5e;var a=n.reverse(),i=a[0],o=a.slice(1);return function(){return o.reduce(function(l,c){return c(l)},i.apply(void 0,arguments))}},yN=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},sV=function(t){var n=null,r=null;return function(){for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n&&i.every(function(l,c){return l===n[c]})||(n=i,r=t.apply(void 0,i)),r}};function v5e(e){var t;return e===0?t=1:t=Math.floor(new Ut(e).abs().log(10).toNumber())+1,t}function b5e(e,t,n){for(var r=new Ut(e),a=0,i=[];r.lt(t)&&a<1e5;)i.push(r.toNumber()),r=r.add(n),a++;return i}var x5e=V0(function(e,t,n){var r=+e,a=+t;return r+n*(a-r)}),w5e=V0(function(e,t,n){var r=t-+e;return r=r||1/0,(n-e)/r}),_5e=V0(function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});const G0={rangeStep:b5e,getDigitCount:v5e,interpolateNumber:x5e,uninterpolateNumber:w5e,uninterpolateTruncation:_5e};function vN(e){return S5e(e)||j5e(e)||iV(e)||k5e()}function k5e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
4202In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function j5e(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function S5e(e){if(Array.isArray(e))return bN(e)}function Rm(e,t){return P5e(e)||C5e(e,t)||iV(e,t)||N5e()}function N5e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
4203In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iV(e,t){if(e){if(typeof e=="string")return bN(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bN(e,t)}}function bN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function C5e(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,a=!1,i=void 0;try{for(var o=e[Symbol.iterator](),l;!(r=(l=o.next()).done)&&(n.push(l.value),!(t&&n.length===t));r=!0);}catch(c){a=!0,i=c}finally{try{!r&&o.return!=null&&o.return()}finally{if(a)throw i}}return n}}function P5e(e){if(Array.isArray(e))return e}function oV(e){var t=Rm(e,2),n=t[0],r=t[1],a=n,i=r;return n>r&&(a=r,i=n),[a,i]}function lV(e,t,n){if(e.lte(0))return new Ut(0);var r=G0.getDigitCount(e.toNumber()),a=new Ut(10).pow(r),i=e.div(a),o=r!==1?.05:.1,l=new Ut(Math.ceil(i.div(o).toNumber())).add(n).mul(o),c=l.mul(a);return t?c:new Ut(Math.ceil(c))}function T5e(e,t,n){var r=1,a=new Ut(e);if(!a.isint()&&n){var i=Math.abs(e);i<1?(r=new Ut(10).pow(G0.getDigitCount(e)-1),a=new Ut(Math.floor(a.div(r).toNumber())).mul(r)):i>1&&(a=new Ut(Math.floor(e)))}else e===0?a=new Ut(Math.floor((t-1)/2)):n||(a=new Ut(Math.floor(e)));var o=Math.floor((t-1)/2),l=y5e(g5e(function(c){return a.add(new Ut(c-o).mul(r)).toNumber()}),gN);return l(0,t)}function cV(e,t,n,r){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new Ut(0),tickMin:new Ut(0),tickMax:new Ut(0)};var i=lV(new Ut(t).sub(e).div(n-1),r,a),o;e<=0&&t>=0?o=new Ut(0):(o=new Ut(e).add(t).div(2),o=o.sub(new Ut(o).mod(i)));var l=Math.ceil(o.sub(e).div(i).toNumber()),c=Math.ceil(new Ut(t).sub(o).div(i).toNumber()),u=l+c+1;return u>n?cV(e,t,n,r,a+1):(u<n&&(c=t>0?c+(n-u):c,l=t>0?l:l+(n-u)),{step:i,tickMin:o.sub(new Ut(l).mul(i)),tickMax:o.add(new Ut(c).mul(i))})}function A5e(e){var t=Rm(e,2),n=t[0],r=t[1],a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(a,2),l=oV([n,r]),c=Rm(l,2),u=c[0],h=c[1];if(u===-1/0||h===1/0){var d=h===1/0?[u].concat(vN(gN(0,a-1).map(function(){return 1/0}))):[].concat(vN(gN(0,a-1).map(function(){return-1/0})),[h]);return n>r?yN(d):d}if(u===h)return T5e(u,a,i);var f=cV(u,h,o,i),p=f.step,y=f.tickMin,m=f.tickMax,v=G0.rangeStep(y,m.add(new Ut(.1).mul(p)),p);return n>r?yN(v):v}function E5e(e,t){var n=Rm(e,2),r=n[0],a=n[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=oV([r,a]),l=Rm(o,2),c=l[0],u=l[1];if(c===-1/0||u===1/0)return[r,a];if(c===u)return[c];var h=Math.max(t,2),d=lV(new Ut(u).sub(c).div(h-1),i,0),f=[].concat(vN(G0.rangeStep(new Ut(c),new Ut(u).sub(new Ut(.99).mul(d)),d)),[u]);return r>a?yN(f):f}var O5e=sV(A5e),R5e=sV(E5e),I5e="Invariant failed";function du(e,t){throw new Error(I5e)}var M5e=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function ph(e){"@babel/helpers - typeof";return ph=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ph(e)}function jx(){return jx=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},jx.apply(this,arguments)}function D5e(e,t){return B5e(e)||F5e(e,t)||L5e(e,t)||$5e()}function $5e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
4204In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function L5e(e,t){if(e){if(typeof e=="string")return F5(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return F5(e,t)}}function F5(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function F5e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,o,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(h){u=!0,a=h}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}function B5e(e){if(Array.isArray(e))return e}function W5e(e,t){if(e==null)return{};var n=q5e(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function q5e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function U5e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function z5e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,hV(r.key),r)}}function H5e(e,t,n){return t&&z5e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function V5e(e,t,n){return t=Sx(t),G5e(e,uV()?Reflect.construct(t,n||[],Sx(e).constructor):t.apply(e,n))}function G5e(e,t){if(t&&(ph(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Y5e(e)}function Y5e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function uV(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(uV=function(){return!!e})()}function Sx(e){return Sx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Sx(e)}function K5e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xN(e,t)}function xN(e,t){return xN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},xN(e,t)}function dV(e,t,n){return t=hV(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hV(e){var t=X5e(e,"string");return ph(t)=="symbol"?t:t+""}function X5e(e,t){if(ph(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(ph(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Y0=function(e){function t(){return U5e(this,t),V5e(this,t,arguments)}return K5e(t,e),H5e(t,[{key:"render",value:function(){var r=this.props,a=r.offset,i=r.layout,o=r.width,l=r.dataKey,c=r.data,u=r.dataPointFormatter,h=r.xAxis,d=r.yAxis,f=W5e(r,M5e),p=pt(f,!1);this.props.direction==="x"&&h.type!=="number"&&du();var y=c.map(function(m){var v=u(m,l),b=v.x,x=v.y,w=v.value,_=v.errorVal;if(!_)return null;var k=[],j,S;if(Array.isArray(_)){var N=D5e(_,2);j=N[0],S=N[1]}else j=S=_;if(i==="vertical"){var C=h.scale,M=x+a,O=M+o,D=M-o,$=C(w-j),R=C(w+S);k.push({x1:R,y1:O,x2:R,y2:D}),k.push({x1:$,y1:M,x2:R,y2:M}),k.push({x1:$,y1:O,x2:$,y2:D})}else if(i==="horizontal"){var I=d.scale,P=b+a,A=P-o,E=P+o,T=I(w-j),L=I(w+S);k.push({x1:A,y1:L,x2:E,y2:L}),k.push({x1:P,y1:T,x2:P,y2:L}),k.push({x1:A,y1:T,x2:E,y2:T})}return F.createElement(yn,jx({className:"recharts-errorBar",key:"bar-".concat(k.map(function(B){return"".concat(B.x1,"-").concat(B.x2,"-").concat(B.y1,"-").concat(B.y2)}))},p),k.map(function(B){return F.createElement("line",jx({},B,{key:"line-".concat(B.x1,"-").concat(B.x2,"-").concat(B.y1,"-").concat(B.y2)}))}))});return F.createElement(yn,{className:"recharts-errorBars"},y)}}])}(F.Component);dV(Y0,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});dV(Y0,"displayName","ErrorBar");function Im(e){"@babel/helpers - typeof";return Im=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Im(e)}function B5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function nc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?B5(Object(n),!0).forEach(function(r){Q5e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Q5e(e,t,n){return t=J5e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function J5e(e){var t=Z5e(e,"string");return Im(t)=="symbol"?t:t+""}function Z5e(e,t){if(Im(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Im(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var fV=function(t){var n=t.children,r=t.formattedGraphicalItems,a=t.legendWidth,i=t.legendContent,o=Sa(n,Pd);if(!o)return null;var l=Pd.defaultProps,c=l!==void 0?nc(nc({},l),o.props):{},u;return o.props&&o.props.payload?u=o.props&&o.props.payload:i==="children"?u=(r||[]).reduce(function(h,d){var f=d.item,p=d.props,y=p.sectors||p.data||[];return h.concat(y.map(function(m){return{type:o.props.iconType||f.props.legendType,value:m.name,color:m.fill,payload:m}}))},[]):u=(r||[]).map(function(h){var d=h.item,f=d.type.defaultProps,p=f!==void 0?nc(nc({},f),d.props):{},y=p.dataKey,m=p.name,v=p.legendType,b=p.hide;return{inactive:b,dataKey:y,type:c.iconType||v||"square",color:dA(d),value:m||y,payload:p}}),nc(nc(nc({},c),Pd.getWithHeight(o,a)),{},{payload:u,item:o})};function Mm(e){"@babel/helpers - typeof";return Mm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mm(e)}function W5(e){return rDe(e)||nDe(e)||tDe(e)||eDe()}function eDe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
4205In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tDe(e,t){if(e){if(typeof e=="string")return wN(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wN(e,t)}}function nDe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function rDe(e){if(Array.isArray(e))return wN(e)}function wN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function q5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Pn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?q5(Object(n),!0).forEach(function(r){Ad(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ad(e,t,n){return t=aDe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aDe(e){var t=sDe(e,"string");return Mm(t)=="symbol"?t:t+""}function sDe(e,t){if(Mm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Mm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Da(e,t,n){return yt(e)||yt(t)?n:nr(t)?rs(e,t,n):it(t)?t(e):n}function _p(e,t,n,r){var a=n5e(e,function(l){return Da(l,t)});if(n==="number"){var i=a.filter(function(l){return be(l)||parseFloat(l)});return i.length?[H0(i),fl(i)]:[1/0,-1/0]}var o=r?a.filter(function(l){return!yt(l)}):a;return o.map(function(l){return nr(l)||l instanceof Date?l:""})}var iDe=function(t){var n,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],a=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=-1,l=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(l<=1)return 0;if(i&&i.axisType==="angleAxis"&&Math.abs(Math.abs(i.range[1]-i.range[0])-360)<=1e-6)for(var c=i.range,u=0;u<l;u++){var h=u>0?a[u-1].coordinate:a[l-1].coordinate,d=a[u].coordinate,f=u>=l-1?a[0].coordinate:a[u+1].coordinate,p=void 0;if(Os(d-h)!==Os(f-d)){var y=[];if(Os(f-d)===Os(c[1]-c[0])){p=f;var m=d+c[1]-c[0];y[0]=Math.min(m,(m+h)/2),y[1]=Math.max(m,(m+h)/2)}else{p=h;var v=f+c[1]-c[0];y[0]=Math.min(d,(v+d)/2),y[1]=Math.max(d,(v+d)/2)}var b=[Math.min(d,(p+d)/2),Math.max(d,(p+d)/2)];if(t>b[0]&&t<=b[1]||t>=y[0]&&t<=y[1]){o=a[u].index;break}}else{var x=Math.min(h,f),w=Math.max(h,f);if(t>(x+d)/2&&t<=(w+d)/2){o=a[u].index;break}}}else for(var _=0;_<l;_++)if(_===0&&t<=(r[_].coordinate+r[_+1].coordinate)/2||_>0&&_<l-1&&t>(r[_].coordinate+r[_-1].coordinate)/2&&t<=(r[_].coordinate+r[_+1].coordinate)/2||_===l-1&&t>(r[_].coordinate+r[_-1].coordinate)/2){o=r[_].index;break}return o},dA=function(t){var n,r=t,a=r.type.displayName,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?Pn(Pn({},t.type.defaultProps),t.props):t.props,o=i.stroke,l=i.fill,c;switch(a){case"Line":c=o;break;case"Area":case"Radar":c=o&&o!=="none"?o:l;break;default:c=l;break}return c},oDe=function(t){var n=t.barSize,r=t.totalSize,a=t.stackGroups,i=a===void 0?{}:a;if(!i)return{};for(var o={},l=Object.keys(i),c=0,u=l.length;c<u;c++)for(var h=i[l[c]].stackGroups,d=Object.keys(h),f=0,p=d.length;f<p;f++){var y=h[d[f]],m=y.items,v=y.cateAxisId,b=m.filter(function(S){return ho(S.type).indexOf("Bar")>=0});if(b&&b.length){var x=b[0].type.defaultProps,w=x!==void 0?Pn(Pn({},x),b[0].props):b[0].props,_=w.barSize,k=w[v];o[k]||(o[k]=[]);var j=yt(_)?n:_;o[k].push({item:b[0],stackList:b.slice(1),barSize:yt(j)?void 0:cu(j,r,0)})}}return o},lDe=function(t){var n=t.barGap,r=t.barCategoryGap,a=t.bandSize,i=t.sizeList,o=i===void 0?[]:i,l=t.maxBarSize,c=o.length;if(c<1)return null;var u=cu(n,a,0,!0),h,d=[];if(o[0].barSize===+o[0].barSize){var f=!1,p=a/c,y=o.reduce(function(_,k){return _+k.barSize||0},0);y+=(c-1)*u,y>=a&&(y-=(c-1)*u,u=0),y>=a&&p>0&&(f=!0,p*=.9,y=c*p);var m=(a-y)/2>>0,v={offset:m-u,size:0};h=o.reduce(function(_,k){var j={item:k.item,position:{offset:v.offset+v.size+u,size:f?p:k.barSize}},S=[].concat(W5(_),[j]);return v=S[S.length-1].position,k.stackList&&k.stackList.length&&k.stackList.forEach(function(N){S.push({item:N,position:v})}),S},d)}else{var b=cu(r,a,0,!0);a-2*b-(c-1)*u<=0&&(u=0);var x=(a-2*b-(c-1)*u)/c;x>1&&(x>>=0);var w=l===+l?Math.min(x,l):x;h=o.reduce(function(_,k,j){var S=[].concat(W5(_),[{item:k.item,position:{offset:b+(x+u)*j+(x-w)/2,size:w}}]);return k.stackList&&k.stackList.length&&k.stackList.forEach(function(N){S.push({item:N,position:S[S.length-1].position})}),S},d)}return h},cDe=function(t,n,r,a){var i=r.children,o=r.width,l=r.margin,c=o-(l.left||0)-(l.right||0),u=fV({children:i,legendWidth:c});if(u){var h=a||{},d=h.width,f=h.height,p=u.align,y=u.verticalAlign,m=u.layout;if((m==="vertical"||m==="horizontal"&&y==="middle")&&p!=="center"&&be(t[p]))return Pn(Pn({},t),{},Ad({},p,t[p]+(d||0)));if((m==="horizontal"||m==="vertical"&&p==="center")&&y!=="middle"&&be(t[y]))return Pn(Pn({},t),{},Ad({},y,t[y]+(f||0)))}return t},uDe=function(t,n,r){return yt(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},pV=function(t,n,r,a,i){var o=n.props.children,l=Ls(o,Y0).filter(function(u){return uDe(a,i,u.props.direction)});if(l&&l.length){var c=l.map(function(u){return u.props.dataKey});return t.reduce(function(u,h){var d=Da(h,r);if(yt(d))return u;var f=Array.isArray(d)?[H0(d),fl(d)]:[d,d],p=c.reduce(function(y,m){var v=Da(h,m,0),b=f[0]-Math.abs(Array.isArray(v)?v[0]:v),x=f[1]+Math.abs(Array.isArray(v)?v[1]:v);return[Math.min(b,y[0]),Math.max(x,y[1])]},[1/0,-1/0]);return[Math.min(p[0],u[0]),Math.max(p[1],u[1])]},[1/0,-1/0])}return null},dDe=function(t,n,r,a,i){var o=n.map(function(l){return pV(t,l,r,i,a)}).filter(function(l){return!yt(l)});return o&&o.length?o.reduce(function(l,c){return[Math.min(l[0],c[0]),Math.max(l[1],c[1])]},[1/0,-1/0]):null},mV=function(t,n,r,a,i){var o=n.map(function(c){var u=c.props.dataKey;return r==="number"&&u&&pV(t,c,u,a)||_p(t,u,r,i)});if(r==="number")return o.reduce(function(c,u){return[Math.min(c[0],u[0]),Math.max(c[1],u[1])]},[1/0,-1/0]);var l={};return o.reduce(function(c,u){for(var h=0,d=u.length;h<d;h++)l[u[h]]||(l[u[h]]=!0,c.push(u[h]));return c},[])},gV=function(t,n){return t==="horizontal"&&n==="xAxis"||t==="vertical"&&n==="yAxis"||t==="centric"&&n==="angleAxis"||t==="radial"&&n==="radiusAxis"},Sc=function(t,n,r){if(!t)return null;var a=t.scale,i=t.duplicateDomain,o=t.type,l=t.range,c=t.realScaleType==="scaleBand"?a.bandwidth()/2:2,u=(n||r)&&o==="category"&&a.bandwidth?a.bandwidth()/c:0;if(u=t.axisType==="angleAxis"&&(l==null?void 0:l.length)>=2?Os(l[0]-l[1])*2*u:u,n&&(t.ticks||t.niceTicks)){var h=(t.ticks||t.niceTicks).map(function(d){var f=i?i.indexOf(d):d;return{coordinate:a(f)+u,value:d,offset:u}});return h.filter(function(d){return!nf(d.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(d,f){return{coordinate:a(d)+u,value:d,index:f,offset:u}}):a.ticks&&!r?a.ticks(t.tickCount).map(function(d){return{coordinate:a(d)+u,value:d,offset:u}}):a.domain().map(function(d,f){return{coordinate:a(d)+u,value:i?i[d]:d,index:f,offset:u}})},nk=new WeakMap,tv=function(t,n){if(typeof n!="function")return t;nk.has(t)||nk.set(t,new WeakMap);var r=nk.get(t);if(r.has(n))return r.get(n);var a=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,a),a},hDe=function(t,n,r){var a=t.scale,i=t.type,o=t.layout,l=t.axisType;if(a==="auto")return o==="radial"&&l==="radiusAxis"?{scale:Nm(),realScaleType:"band"}:o==="radial"&&l==="angleAxis"?{scale:bx(),realScaleType:"linear"}:i==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:wp(),realScaleType:"point"}:i==="category"?{scale:Nm(),realScaleType:"band"}:{scale:bx(),realScaleType:"linear"};if(lu(a)){var c="scale".concat(O0(a));return{scale:(M5[c]||wp)(),realScaleType:M5[c]?c:"point"}}return it(a)?{scale:a}:{scale:wp(),realScaleType:"point"}},U5=1e-4,fDe=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,a=t.range(),i=Math.min(a[0],a[1])-U5,o=Math.max(a[0],a[1])+U5,l=t(n[0]),c=t(n[r-1]);(l<i||l>o||c<i||c>o)&&t.domain([n[0],n[r-1]])}},pDe=function(t,n){if(!t)return null;for(var r=0,a=t.length;r<a;r++)if(t[r].item===n)return t[r].position;return null},mDe=function(t,n){if(!n||n.length!==2||!be(n[0])||!be(n[1]))return t;var r=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]),i=[t[0],t[1]];return(!be(t[0])||t[0]<r)&&(i[0]=r),(!be(t[1])||t[1]>a)&&(i[1]=a),i[0]>a&&(i[0]=a),i[1]<r&&(i[1]=r),i},gDe=function(t){var n=t.length;if(!(n<=0))for(var r=0,a=t[0].length;r<a;++r)for(var i=0,o=0,l=0;l<n;++l){var c=nf(t[l][r][1])?t[l][r][0]:t[l][r][1];c>=0?(t[l][r][0]=i,t[l][r][1]=i+c,i=t[l][r][1]):(t[l][r][0]=o,t[l][r][1]=o+c,o=t[l][r][1])}},yDe=function(t){var n=t.length;if(!(n<=0))for(var r=0,a=t[0].length;r<a;++r)for(var i=0,o=0;o<n;++o){var l=nf(t[o][r][1])?t[o][r][0]:t[o][r][1];l>=0?(t[o][r][0]=i,t[o][r][1]=i+l,i=t[o][r][1]):(t[o][r][0]=0,t[o][r][1]=0)}},vDe={sign:gDe,expand:OSe,none:ih,silhouette:RSe,wiggle:ISe,positive:yDe},bDe=function(t,n,r){var a=n.map(function(l){return l.props.dataKey}),i=vDe[r],o=ESe().keys(a).value(function(l,c){return+Da(l,c,0)}).order(HS).offset(i);return o(t)},xDe=function(t,n,r,a,i,o){if(!t)return null;var l=o?n.reverse():n,c={},u=l.reduce(function(d,f){var p,y=(p=f.type)!==null&&p!==void 0&&p.defaultProps?Pn(Pn({},f.type.defaultProps),f.props):f.props,m=y.stackId,v=y.hide;if(v)return d;var b=y[r],x=d[b]||{hasStack:!1,stackGroups:{}};if(nr(m)){var w=x.stackGroups[m]||{numericAxisId:r,cateAxisId:a,items:[]};w.items.push(f),x.hasStack=!0,x.stackGroups[m]=w}else x.stackGroups[Gg("_stackId_")]={numericAxisId:r,cateAxisId:a,items:[f]};return Pn(Pn({},d),{},Ad({},b,x))},c),h={};return Object.keys(u).reduce(function(d,f){var p=u[f];if(p.hasStack){var y={};p.stackGroups=Object.keys(p.stackGroups).reduce(function(m,v){var b=p.stackGroups[v];return Pn(Pn({},m),{},Ad({},v,{numericAxisId:r,cateAxisId:a,items:b.items,stackedData:bDe(t,b.items,i)}))},y)}return Pn(Pn({},d),{},Ad({},f,p))},h)},wDe=function(t,n){var r=n.realScaleType,a=n.type,i=n.tickCount,o=n.originalDomain,l=n.allowDecimals,c=r||n.scale;if(c!=="auto"&&c!=="linear")return null;if(i&&a==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var u=t.domain();if(!u.length)return null;var h=O5e(u,i,l);return t.domain([H0(h),fl(h)]),{niceTicks:h}}if(i&&a==="number"){var d=t.domain(),f=R5e(d,i,l);return{niceTicks:f}}return null};function z5(e){var t=e.axis,n=e.ticks,r=e.bandSize,a=e.entry,i=e.index,o=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!yt(a[t.dataKey])){var l=Xb(n,"value",a[t.dataKey]);if(l)return l.coordinate+r/2}return n[i]?n[i].coordinate+r/2:null}var c=Da(a,yt(o)?t.dataKey:o);return yt(c)?null:t.scale(c)}var H5=function(t){var n=t.axis,r=t.ticks,a=t.offset,i=t.bandSize,o=t.entry,l=t.index;if(n.type==="category")return r[l]?r[l].coordinate+a:null;var c=Da(o,n.dataKey,n.domain[l]);return yt(c)?null:n.scale(c)-i/2+a},_De=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var a=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return a<=0&&i>=0?0:i<0?i:a}return r[0]},kDe=function(t,n){var r,a=(r=t.type)!==null&&r!==void 0&&r.defaultProps?Pn(Pn({},t.type.defaultProps),t.props):t.props,i=a.stackId;if(nr(i)){var o=n[i];if(o){var l=o.items.indexOf(t);return l>=0?o.stackedData[l]:null}}return null},jDe=function(t){return t.reduce(function(n,r){return[H0(r.concat([n[0]]).filter(be)),fl(r.concat([n[1]]).filter(be))]},[1/0,-1/0])},yV=function(t,n,r){return Object.keys(t).reduce(function(a,i){var o=t[i],l=o.stackedData,c=l.reduce(function(u,h){var d=jDe(h.slice(n,r+1));return[Math.min(u[0],d[0]),Math.max(u[1],d[1])]},[1/0,-1/0]);return[Math.min(c[0],a[0]),Math.max(c[1],a[1])]},[1/0,-1/0]).map(function(a){return a===1/0||a===-1/0?0:a})},V5=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,G5=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,_N=function(t,n,r){if(it(t))return t(n,r);if(!Array.isArray(t))return n;var a=[];if(be(t[0]))a[0]=r?t[0]:Math.min(t[0],n[0]);else if(V5.test(t[0])){var i=+V5.exec(t[0])[1];a[0]=n[0]-i}else it(t[0])?a[0]=t[0](n[0]):a[0]=n[0];if(be(t[1]))a[1]=r?t[1]:Math.max(t[1],n[1]);else if(G5.test(t[1])){var o=+G5.exec(t[1])[1];a[1]=n[1]+o}else it(t[1])?a[1]=t[1](n[1]):a[1]=n[1];return a},Nx=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var a=t.scale.bandwidth();if(!r||a>0)return a}if(t&&n&&n.length>=2){for(var i=FT(n,function(d){return d.coordinate}),o=1/0,l=1,c=i.length;l<c;l++){var u=i[l],h=i[l-1];o=Math.min((u.coordinate||0)-(h.coordinate||0),o)}return o===1/0?0:o}return r?void 0:0},Y5=function(t,n,r){return!t||!t.length||Em(t,rs(r,"type.defaultProps.domain"))?n:t},vV=function(t,n){var r=t.type.defaultProps?Pn(Pn({},t.type.defaultProps),t.props):t.props,a=r.dataKey,i=r.name,o=r.unit,l=r.formatter,c=r.tooltipType,u=r.chartType,h=r.hide;return Pn(Pn({},pt(t,!1)),{},{dataKey:a,unit:o,formatter:l,name:i||a,color:dA(t),value:Da(n,a),type:c,payload:n,chartType:u,hide:h})};function Dm(e){"@babel/helpers - typeof";return Dm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dm(e)}function K5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function X5(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?K5(Object(n),!0).forEach(function(r){SDe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):K5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function SDe(e,t,n){return t=NDe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function NDe(e){var t=CDe(e,"string");return Dm(t)=="symbol"?t:t+""}function CDe(e,t){if(Dm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Dm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Cx=Math.PI/180,PDe=function(t){return t*180/Math.PI},kr=function(t,n,r,a){return{x:t+Math.cos(-Cx*a)*r,y:n+Math.sin(-Cx*a)*r}},TDe=function(t,n){var r=t.x,a=t.y,i=n.x,o=n.y;return Math.sqrt(Math.pow(r-i,2)+Math.pow(a-o,2))},ADe=function(t,n){var r=t.x,a=t.y,i=n.cx,o=n.cy,l=TDe({x:r,y:a},{x:i,y:o});if(l<=0)return{radius:l};var c=(r-i)/l,u=Math.acos(c);return a>o&&(u=2*Math.PI-u),{radius:l,angle:PDe(u),angleInRadian:u}},EDe=function(t){var n=t.startAngle,r=t.endAngle,a=Math.floor(n/360),i=Math.floor(r/360),o=Math.min(a,i);return{startAngle:n-o*360,endAngle:r-o*360}},ODe=function(t,n){var r=n.startAngle,a=n.endAngle,i=Math.floor(r/360),o=Math.floor(a/360),l=Math.min(i,o);return t+l*360},Q5=function(t,n){var r=t.x,a=t.y,i=ADe({x:r,y:a},n),o=i.radius,l=i.angle,c=n.innerRadius,u=n.outerRadius;if(o<c||o>u)return!1;if(o===0)return!0;var h=EDe(n),d=h.startAngle,f=h.endAngle,p=l,y;if(d<=f){for(;p>f;)p-=360;for(;p<d;)p+=360;y=p>=d&&p<=f}else{for(;p>d;)p-=360;for(;p<f;)p+=360;y=p>=f&&p<=d}return y?X5(X5({},n),{},{radius:o,angle:ODe(p,n)}):null};function $m(e){"@babel/helpers - typeof";return $m=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$m(e)}var RDe=["offset"];function IDe(e){return LDe(e)||$De(e)||DDe(e)||MDe()}function MDe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
4206In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function DDe(e,t){if(e){if(typeof e=="string")return kN(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return kN(e,t)}}function $De(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function LDe(e){if(Array.isArray(e))return kN(e)}function kN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function FDe(e,t){if(e==null)return{};var n=BDe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function BDe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function J5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Kn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?J5(Object(n),!0).forEach(function(r){WDe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function WDe(e,t,n){return t=qDe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qDe(e){var t=UDe(e,"string");return $m(t)=="symbol"?t:t+""}function UDe(e,t){if($m(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if($m(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Lm(){return Lm=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},Lm.apply(this,arguments)}var zDe=function(t){var n=t.value,r=t.formatter,a=yt(t.children)?n:t.children;return it(r)?r(a):a},HDe=function(t,n){var r=Os(n-t),a=Math.min(Math.abs(n-t),360);return r*a},VDe=function(t,n,r){var a=t.position,i=t.viewBox,o=t.offset,l=t.className,c=i,u=c.cx,h=c.cy,d=c.innerRadius,f=c.outerRadius,p=c.startAngle,y=c.endAngle,m=c.clockWise,v=(d+f)/2,b=HDe(p,y),x=b>=0?1:-1,w,_;a==="insideStart"?(w=p+x*o,_=m):a==="insideEnd"?(w=y-x*o,_=!m):a==="end"&&(w=y+x*o,_=m),_=b<=0?_:!_;var k=kr(u,h,v,w),j=kr(u,h,v,w+(_?1:-1)*359),S="M".concat(k.x,",").concat(k.y,`
4207    A`).concat(v,",").concat(v,",0,1,").concat(_?0:1,`,
4208    `).concat(j.x,",").concat(j.y),N=yt(t.id)?Gg("recharts-radial-line-"):t.id;return F.createElement("text",Lm({},r,{dominantBaseline:"central",className:kt("recharts-radial-bar-label",l)}),F.createElement("defs",null,F.createElement("path",{id:N,d:S})),F.createElement("textPath",{xlinkHref:"#".concat(N)},n))},GDe=function(t){var n=t.viewBox,r=t.offset,a=t.position,i=n,o=i.cx,l=i.cy,c=i.innerRadius,u=i.outerRadius,h=i.startAngle,d=i.endAngle,f=(h+d)/2;if(a==="outside"){var p=kr(o,l,u+r,f),y=p.x,m=p.y;return{x:y,y:m,textAnchor:y>=o?"start":"end",verticalAnchor:"middle"}}if(a==="center")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"middle"};if(a==="centerTop")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"start"};if(a==="centerBottom")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"end"};var v=(c+u)/2,b=kr(o,l,v,f),x=b.x,w=b.y;return{x,y:w,textAnchor:"middle",verticalAnchor:"middle"}},YDe=function(t){var n=t.viewBox,r=t.parentViewBox,a=t.offset,i=t.position,o=n,l=o.x,c=o.y,u=o.width,h=o.height,d=h>=0?1:-1,f=d*a,p=d>0?"end":"start",y=d>0?"start":"end",m=u>=0?1:-1,v=m*a,b=m>0?"end":"start",x=m>0?"start":"end";if(i==="top"){var w={x:l+u/2,y:c-d*a,textAnchor:"middle",verticalAnchor:p};return Kn(Kn({},w),r?{height:Math.max(c-r.y,0),width:u}:{})}if(i==="bottom"){var _={x:l+u/2,y:c+h+f,textAnchor:"middle",verticalAnchor:y};return Kn(Kn({},_),r?{height:Math.max(r.y+r.height-(c+h),0),width:u}:{})}if(i==="left"){var k={x:l-v,y:c+h/2,textAnchor:b,verticalAnchor:"middle"};return Kn(Kn({},k),r?{width:Math.max(k.x-r.x,0),height:h}:{})}if(i==="right"){var j={x:l+u+v,y:c+h/2,textAnchor:x,verticalAnchor:"middle"};return Kn(Kn({},j),r?{width:Math.max(r.x+r.width-j.x,0),height:h}:{})}var S=r?{width:u,height:h}:{};return i==="insideLeft"?Kn({x:l+v,y:c+h/2,textAnchor:x,verticalAnchor:"middle"},S):i==="insideRight"?Kn({x:l+u-v,y:c+h/2,textAnchor:b,verticalAnchor:"middle"},S):i==="insideTop"?Kn({x:l+u/2,y:c+f,textAnchor:"middle",verticalAnchor:y},S):i==="insideBottom"?Kn({x:l+u/2,y:c+h-f,textAnchor:"middle",verticalAnchor:p},S):i==="insideTopLeft"?Kn({x:l+v,y:c+f,textAnchor:x,verticalAnchor:y},S):i==="insideTopRight"?Kn({x:l+u-v,y:c+f,textAnchor:b,verticalAnchor:y},S):i==="insideBottomLeft"?Kn({x:l+v,y:c+h-f,textAnchor:x,verticalAnchor:p},S):i==="insideBottomRight"?Kn({x:l+u-v,y:c+h-f,textAnchor:b,verticalAnchor:p},S):Jh(i)&&(be(i.x)||_c(i.x))&&(be(i.y)||_c(i.y))?Kn({x:l+cu(i.x,u),y:c+cu(i.y,h),textAnchor:"end",verticalAnchor:"end"},S):Kn({x:l+u/2,y:c+h/2,textAnchor:"middle",verticalAnchor:"middle"},S)},KDe=function(t){return"cx"in t&&be(t.cx)};function Dr(e){var t=e.offset,n=t===void 0?5:t,r=FDe(e,RDe),a=Kn({offset:n},r),i=a.viewBox,o=a.position,l=a.value,c=a.children,u=a.content,h=a.className,d=h===void 0?"":h,f=a.textBreakAll;if(!i||yt(l)&&yt(c)&&!g.isValidElement(u)&&!it(u))return null;if(g.isValidElement(u))return g.cloneElement(u,a);var p;if(it(u)){if(p=g.createElement(u,a),g.isValidElement(p))return p}else p=zDe(a);var y=KDe(i),m=pt(a,!0);if(y&&(o==="insideStart"||o==="insideEnd"||o==="end"))return VDe(a,p,m);var v=y?GDe(a):YDe(a);return F.createElement(hx,Lm({className:kt("recharts-label",d)},m,v,{breakAll:f}),p)}Dr.displayName="Label";var bV=function(t){var n=t.cx,r=t.cy,a=t.angle,i=t.startAngle,o=t.endAngle,l=t.r,c=t.radius,u=t.innerRadius,h=t.outerRadius,d=t.x,f=t.y,p=t.top,y=t.left,m=t.width,v=t.height,b=t.clockWise,x=t.labelViewBox;if(x)return x;if(be(m)&&be(v)){if(be(d)&&be(f))return{x:d,y:f,width:m,height:v};if(be(p)&&be(y))return{x:p,y,width:m,height:v}}return be(d)&&be(f)?{x:d,y:f,width:0,height:0}:be(n)&&be(r)?{cx:n,cy:r,startAngle:i||a||0,endAngle:o||a||0,innerRadius:u||0,outerRadius:h||c||l||0,clockWise:b}:t.viewBox?t.viewBox:{}},XDe=function(t,n){return t?t===!0?F.createElement(Dr,{key:"label-implicit",viewBox:n}):nr(t)?F.createElement(Dr,{key:"label-implicit",viewBox:n,value:t}):g.isValidElement(t)?t.type===Dr?g.cloneElement(t,{key:"label-implicit",viewBox:n}):F.createElement(Dr,{key:"label-implicit",content:t,viewBox:n}):it(t)?F.createElement(Dr,{key:"label-implicit",content:t,viewBox:n}):Jh(t)?F.createElement(Dr,Lm({viewBox:n},t,{key:"label-implicit"})):null:null},QDe=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var a=t.children,i=bV(t),o=Ls(a,Dr).map(function(c,u){return g.cloneElement(c,{viewBox:n||i,key:"label-".concat(u)})});if(!r)return o;var l=XDe(t.label,n||i);return[l].concat(IDe(o))};Dr.parseViewBox=bV;Dr.renderCallByParent=QDe;function JDe(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var ZDe=JDe;const e3e=Vt(ZDe);function Fm(e){"@babel/helpers - typeof";return Fm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fm(e)}var t3e=["valueAccessor"],n3e=["data","dataKey","clockWise","id","textBreakAll"];function r3e(e){return o3e(e)||i3e(e)||s3e(e)||a3e()}function a3e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
4209In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function s3e(e,t){if(e){if(typeof e=="string")return jN(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return jN(e,t)}}function i3e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function o3e(e){if(Array.isArray(e))return jN(e)}function jN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Px(){return Px=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},Px.apply(this,arguments)}function Z5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function eD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Z5(Object(n),!0).forEach(function(r){l3e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Z5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function l3e(e,t,n){return t=c3e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c3e(e){var t=u3e(e,"string");return Fm(t)=="symbol"?t:t+""}function u3e(e,t){if(Fm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Fm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function tD(e,t){if(e==null)return{};var n=d3e(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function d3e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var h3e=function(t){return Array.isArray(t.value)?e3e(t.value):t.value};function Pl(e){var t=e.valueAccessor,n=t===void 0?h3e:t,r=tD(e,t3e),a=r.data,i=r.dataKey,o=r.clockWise,l=r.id,c=r.textBreakAll,u=tD(r,n3e);return!a||!a.length?null:F.createElement(yn,{className:"recharts-label-list"},a.map(function(h,d){var f=yt(i)?n(h,d):Da(h&&h.payload,i),p=yt(l)?{}:{id:"".concat(l,"-").concat(d)};return F.createElement(Dr,Px({},pt(h,!0),u,p,{parentViewBox:h.parentViewBox,value:f,textBreakAll:c,viewBox:Dr.parseViewBox(yt(o)?h:eD(eD({},h),{},{clockWise:o})),key:"label-".concat(d),index:d}))}))}Pl.displayName="LabelList";function f3e(e,t){return e?e===!0?F.createElement(Pl,{key:"labelList-implicit",data:t}):F.isValidElement(e)||it(e)?F.createElement(Pl,{key:"labelList-implicit",data:t,content:e}):Jh(e)?F.createElement(Pl,Px({data:t},e,{key:"labelList-implicit"})):null:null}function p3e(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,a=Ls(r,Pl).map(function(o,l){return g.cloneElement(o,{data:t,key:"labelList-".concat(l)})});if(!n)return a;var i=f3e(e.label,t);return[i].concat(r3e(a))}Pl.renderCallByParent=p3e;function Bm(e){"@babel/helpers - typeof";return Bm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bm(e)}function SN(){return SN=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},SN.apply(this,arguments)}function nD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function rD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?nD(Object(n),!0).forEach(function(r){m3e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function m3e(e,t,n){return t=g3e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g3e(e){var t=y3e(e,"string");return Bm(t)=="symbol"?t:t+""}function y3e(e,t){if(Bm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Bm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var v3e=function(t,n){var r=Os(n-t),a=Math.min(Math.abs(n-t),359.999);return r*a},nv=function(t){var n=t.cx,r=t.cy,a=t.radius,i=t.angle,o=t.sign,l=t.isExternal,c=t.cornerRadius,u=t.cornerIsExternal,h=c*(l?1:-1)+a,d=Math.asin(c/h)/Cx,f=u?i:i+o*d,p=kr(n,r,h,f),y=kr(n,r,a,f),m=u?i-o*d:i,v=kr(n,r,h*Math.cos(d*Cx),m);return{center:p,circleTangency:y,lineTangency:v,theta:d}},xV=function(t){var n=t.cx,r=t.cy,a=t.innerRadius,i=t.outerRadius,o=t.startAngle,l=t.endAngle,c=v3e(o,l),u=o+c,h=kr(n,r,i,o),d=kr(n,r,i,u),f="M ".concat(h.x,",").concat(h.y,`
4210    A `).concat(i,",").concat(i,`,0,
4211    `).concat(+(Math.abs(c)>180),",").concat(+(o>u),`,
4212    `).concat(d.x,",").concat(d.y,`
4213  `);if(a>0){var p=kr(n,r,a,o),y=kr(n,r,a,u);f+="L ".concat(y.x,",").concat(y.y,`
4214            A `).concat(a,",").concat(a,`,0,
4215            `).concat(+(Math.abs(c)>180),",").concat(+(o<=u),`,
4216            `).concat(p.x,",").concat(p.y," Z")}else f+="L ".concat(n,",").concat(r," Z");return f},b3e=function(t){var n=t.cx,r=t.cy,a=t.innerRadius,i=t.outerRadius,o=t.cornerRadius,l=t.forceCornerRadius,c=t.cornerIsExternal,u=t.startAngle,h=t.endAngle,d=Os(h-u),f=nv({cx:n,cy:r,radius:i,angle:u,sign:d,cornerRadius:o,cornerIsExternal:c}),p=f.circleTangency,y=f.lineTangency,m=f.theta,v=nv({cx:n,cy:r,radius:i,angle:h,sign:-d,cornerRadius:o,cornerIsExternal:c}),b=v.circleTangency,x=v.lineTangency,w=v.theta,_=c?Math.abs(u-h):Math.abs(u-h)-m-w;if(_<0)return l?"M ".concat(y.x,",").concat(y.y,`
4217        a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0
4218        a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0
4219      `):xV({cx:n,cy:r,innerRadius:a,outerRadius:i,startAngle:u,endAngle:h});var k="M ".concat(y.x,",").concat(y.y,`
4220    A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(p.x,",").concat(p.y,`
4221    A`).concat(i,",").concat(i,",0,").concat(+(_>180),",").concat(+(d<0),",").concat(b.x,",").concat(b.y,`
4222    A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(x.x,",").concat(x.y,`
4223  `);if(a>0){var j=nv({cx:n,cy:r,radius:a,angle:u,sign:d,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),S=j.circleTangency,N=j.lineTangency,C=j.theta,M=nv({cx:n,cy:r,radius:a,angle:h,sign:-d,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),O=M.circleTangency,D=M.lineTangency,$=M.theta,R=c?Math.abs(u-h):Math.abs(u-h)-C-$;if(R<0&&o===0)return"".concat(k,"L").concat(n,",").concat(r,"Z");k+="L".concat(D.x,",").concat(D.y,`
4224      A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(O.x,",").concat(O.y,`
4225      A`).concat(a,",").concat(a,",0,").concat(+(R>180),",").concat(+(d>0),",").concat(S.x,",").concat(S.y,`
4226      A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(N.x,",").concat(N.y,"Z")}else k+="L".concat(n,",").concat(r,"Z");return k},x3e={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},wV=function(t){var n=rD(rD({},x3e),t),r=n.cx,a=n.cy,i=n.innerRadius,o=n.outerRadius,l=n.cornerRadius,c=n.forceCornerRadius,u=n.cornerIsExternal,h=n.startAngle,d=n.endAngle,f=n.className;if(o<i||h===d)return null;var p=kt("recharts-sector",f),y=o-i,m=cu(l,y,0,!0),v;return m>0&&Math.abs(h-d)<360?v=b3e({cx:r,cy:a,innerRadius:i,outerRadius:o,cornerRadius:Math.min(m,y/2),forceCornerRadius:c,cornerIsExternal:u,startAngle:h,endAngle:d}):v=xV({cx:r,cy:a,innerRadius:i,outerRadius:o,startAngle:h,endAngle:d}),F.createElement("path",SN({},pt(n,!0),{className:p,d:v,role:"img"}))};function Wm(e){"@babel/helpers - typeof";return Wm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wm(e)}function NN(){return NN=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},NN.apply(this,arguments)}function aD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function sD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?aD(Object(n),!0).forEach(function(r){w3e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function w3e(e,t,n){return t=_3e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _3e(e){var t=k3e(e,"string");return Wm(t)=="symbol"?t:t+""}function k3e(e,t){if(Wm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Wm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var iD={curveBasisClosed:xSe,curveBasisOpen:wSe,curveBasis:bSe,curveBumpX:sSe,curveBumpY:iSe,curveLinearClosed:_Se,curveLinear:I0,curveMonotoneX:kSe,curveMonotoneY:jSe,curveNatural:SSe,curveStep:NSe,curveStepAfter:PSe,curveStepBefore:CSe},rv=function(t){return t.x===+t.x&&t.y===+t.y},$f=function(t){return t.x},Lf=function(t){return t.y},j3e=function(t,n){if(it(t))return t;var r="curve".concat(O0(t));return(r==="curveMonotone"||r==="curveBump")&&n?iD["".concat(r).concat(n==="vertical"?"Y":"X")]:iD[r]||I0},S3e=function(t){var n=t.type,r=n===void 0?"linear":n,a=t.points,i=a===void 0?[]:a,o=t.baseLine,l=t.layout,c=t.connectNulls,u=c===void 0?!1:c,h=j3e(r,l),d=u?i.filter(function(m){return rv(m)}):i,f;if(Array.isArray(o)){var p=u?o.filter(function(m){return rv(m)}):o,y=d.map(function(m,v){return sD(sD({},m),{},{base:p[v]})});return l==="vertical"?f=Gy().y(Lf).x1($f).x0(function(m){return m.base.x}):f=Gy().x($f).y1(Lf).y0(function(m){return m.base.y}),f.defined(rv).curve(h),f(y)}return l==="vertical"&&be(o)?f=Gy().y(Lf).x1($f).x0(o):be(o)?f=Gy().x($f).y1(Lf).y0(o):f=kH().x($f).y(Lf),f.defined(rv).curve(h),f(d)},kp=function(t){var n=t.className,r=t.points,a=t.path,i=t.pathRef;if((!r||!r.length)&&!a)return null;var o=r&&r.length?S3e(t):a;return g.createElement("path",NN({},pt(t,!1),Qb(t),{className:kt("recharts-curve",n),d:o,ref:i}))},_V={exports:{}},N3e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",C3e=N3e,P3e=C3e;function kV(){}function jV(){}jV.resetWarningCache=kV;var T3e=function(){function e(r,a,i,o,l,c){if(c!==P3e){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol
4226:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:jV,resetWarningCache:kV};return n.PropTypes=n,n};_V.exports=T3e();var A3e=_V.exports;const Dt=Vt(A3e);var E3e=Object.getOwnPropertyNames,O3e=Object.getOwnPropertySymbols,R3e=Object.prototype.hasOwnProperty;function oD(e,t){return function(r,a,i){return e(r,a,i)&&t(r,a,i)}}function av(e){return function(n,r,a){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,a);var i=a.cache,o=i.get(n),l=i.get(r);if(o&&l)return o===r&&l===n;i.set(n,r),i.set(r,n);var c=e(n,r,a);return i.delete(n),i.delete(r),c}}function lD(e){return E3e(e).concat(O3e(e))}var I3e=Object.hasOwn||function(e,t){return R3e.call(e,t)};function ju(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var M3e="__v",D3e="__o",$3e="_owner",cD=Object.getOwnPropertyDescriptor,uD=Object.keys;function L3e(e,t,n){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function F3e(e,t){return ju(e.getTime(),t.getTime())}function B3e(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function W3e(e,t){return e===t}function dD(e,t,n){var r=e.size;if(r!==t.size)return!1;if(!r)return!0;for(var a=new Array(r),i=e.entries(),o,l,c=0;(o=i.next())&&!o.done;){for(var u=t.entries(),h=!1,d=0;(l=u.next())&&!l.done;){if(a[d]){d++;continue}var f=o.value,p=l.value;if(n.equals(f[0],p[0],c,d,e,t,n)&&n.equals(f[1],p[1],f[0],p[0],e,t,n)){h=a[d]=!0;break}d++}if(!h)return!1;c++}return!0}var q3e=ju;function U3e(e,t,n){var r=uD(e),a=r.length;if(uD(t).length!==a)return!1;for(;a-- >0;)if(!SV(e,t,n,r[a]))return!1;return!0}function Ff(e,t,n){var r=lD(e),a=r.length;if(lD(t).length!==a)return!1;for(var i,o,l;a-- >0;)if(i=r[a],!SV(e,t,n,i)||(o=cD(e,i),l=cD(t,i),(o||l)&&(!o||!l||o.configurable!==l.configurable||o.enumerable!==l.enumerable||o.writable!==l.writable)))return!1;return!0}function z3e(e,t){return ju(e.valueOf(),t.valueOf())}function H3e(e,t){return e.source===t.source&&e.flags===t.flags}function hD(e,t,n){var r=e.size;if(r!==t.size)return!1;if(!r)return!0;for(var a=new Array(r),i=e.values(),o,l;(o=i.next())&&!o.done;){for(var c=t.values(),u=!1,h=0;(l=c.next())&&!l.done;){if(!a[h]&&n.equals(o.value,l.value,o.value,l.value,e,t,n)){u=a[h]=!0;break}h++}if(!u)return!1}return!0}function V3e(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function G3e(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function SV(e,t,n,r){return(r===$3e||r===D3e||r===M3e)&&(e.$$typeof||t.$$typeof)?!0:I3e(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}var Y3e="[object Arguments]",K3e="[object Boolean]",X3e="[object Date]",Q3e="[object Error]",J3e="[object Map]",Z3e="[object Number]",e$e="[object Object]",t$e="[object RegExp]",n$e="[object Set]",r$e="[object String]",a$e="[object URL]",s$e=Array.isArray,fD=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,pD=Object.assign,i$e=Object.prototype.toString.call.bind(Object.prototype.toString);function o$e(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areErrorsEqual,a=e.areFunctionsEqual,i=e.areMapsEqual,o=e.areNumbersEqual,l=e.areObjectsEqual,c=e.arePrimitiveWrappersEqual,u=e.areRegExpsEqual,h=e.areSetsEqual,d=e.areTypedArraysEqual,f=e.areUrlsEqual;return function(y,m,v){if(y===m)return!0;if(y==null||m==null)return!1;var b=typeof y;if(b!==typeof m)return!1;if(b!=="object")return b==="number"?o(y,m,v):b==="function"?a(y,m,v):!1;var x=y.constructor;if(x!==m.constructor)return!1;if(x===Object)return l(y,m,v);if(s$e(y))return t(y,m,v);if(fD!=null&&fD(y))return d(y,m,v);if(x===Date)return n(y,m,v);if(x===RegExp)return u(y,m,v);if(x===Map)return i(y,m,v);if(x===Set)return h(y,m,v);var w=i$e(y);return w===X3e?n(y,m,v):w===t$e?u(y,m,v):w===J3e?i(y,m,v):w===n$e?h(y,m,v):w===e$e?typeof y.then!="function"&&typeof m.then!="function"&&l(y,m,v):w===a$e?f(y,m,v):w===Q3e?r(y,m,v):w===Y3e?l(y,m,v):w===K3e||w===Z3e||w===r$e?c(y,m,v):!1}}
vendor: 49,594 bytes, lines 4226-4244
4226function l$e(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,a={areArraysEqual:r?Ff:L3e,areDatesEqual:F3e,areErrorsEqual:B3e,areFunctionsEqual:W3e,areMapsEqual:r?oD(dD,Ff):dD,areNumbersEqual:q3e,areObjectsEqual:r?Ff:U3e,arePrimitiveWrappersEqual:z3e,areRegExpsEqual:H3e,areSetsEqual:r?oD(hD,Ff):hD,areTypedArraysEqual:r?Ff:V3e,areUrlsEqual:G3e};if(n&&(a=pD({},a,n(a))),t){var i=av(a.areArraysEqual),o=av(a.areMapsEqual),l=av(a.areObjectsEqual),c=av(a.areSetsEqual);a=pD({},a,{areArraysEqual:i,areMapsEqual:o,areObjectsEqual:l,areSetsEqual:c})}return a}function c$e(e){return function(t,n,r,a,i,o,l){return e(t,n,l)}}function u$e(e){var t=e.circular,n=e.comparator,r=e.createState,a=e.equals,i=e.strict;if(r)return function(c,u){var h=r(),d=h.cache,f=d===void 0?t?new WeakMap:void 0:d,p=h.meta;return n(c,u,{cache:f,equals:a,meta:p,strict:i})};if(t)return function(c,u){return n(c,u,{cache:new WeakMap,equals:a,meta:void 0,strict:i})};var o={cache:void 0,equals:a,meta:void 0,strict:i};return function(c,u){return n(c,u,o)}}var d$e=Jl();Jl({strict:!0});Jl({circular:!0});Jl({circular:!0,strict:!0});Jl({createInternalComparator:function(){return ju}});Jl({strict:!0,createInternalComparator:function(){return ju}});Jl({circular:!0,createInternalComparator:function(){return ju}});Jl({circular:!0,createInternalComparator:function(){return ju},strict:!0});function Jl(e){e===void 0&&(e={});var t=e.circular,n=t===void 0?!1:t,r=e.createInternalComparator,a=e.createState,i=e.strict,o=i===void 0?!1:i,l=l$e(e),c=o$e(l),u=r?r(c):c$e(c);return u$e({circular:n,comparator:c,createState:a,equals:u,strict:o})}function h$e(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function mD(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function a(i){n<0&&(n=i),i-n>t?(e(i),n=-1):h$e(a)};requestAnimationFrame(r)}function CN(e){"@babel/helpers - typeof";return CN=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},CN(e)}function f$e(e){return y$e(e)||g$e(e)||m$e(e)||p$e()}function p$e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
4227In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function m$e(e,t){if(e){if(typeof e=="string")return gD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gD(e,t)}}function gD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function g$e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function y$e(e){if(Array.isArray(e))return e}function v$e(){var e={},t=function(){return null},n=!1,r=function a(i){if(!n){if(Array.isArray(i)){if(!i.length)return;var o=i,l=f$e(o),c=l[0],u=l.slice(1);if(typeof c=="number"){mD(a.bind(null,u),c);return}a(c),mD(a.bind(null,u));return}CN(i)==="object"&&(e=i,t(e)),typeof i=="function"&&i()}};return{stop:function(){n=!0},start:function(i){n=!1,r(i)},subscribe:function(i){return t=i,function(){t=function(){return null}}}}}function qm(e){"@babel/helpers - typeof";return qm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qm(e)}function yD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function vD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?yD(Object(n),!0).forEach(function(r){NV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function NV(e,t,n){return t=b$e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b$e(e){var t=x$e(e,"string");return qm(t)==="symbol"?t:String(t)}function x$e(e,t){if(qm(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(qm(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var w$e=function(t,n){return[Object.keys(t),Object.keys(n)].reduce(function(r,a){return r.filter(function(i){return a.includes(i)})})},_$e=function(t){return t},k$e=function(t){return t.replace(/([A-Z])/g,function(n){return"-".concat(n.toLowerCase())})},jp=function(t,n){return Object.keys(n).reduce(function(r,a){return vD(vD({},r),{},NV({},a,t(a,n[a])))},{})},bD=function(t,n,r){return t.map(function(a){return"".concat(k$e(a)," ").concat(n,"ms ").concat(r)}).join(",")};function j$e(e,t){return C$e(e)||N$e(e,t)||CV(e,t)||S$e()}function S$e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
4228In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function N$e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,o,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(h){u=!0,a=h}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}function C$e(e){if(Array.isArray(e))return e}function P$e(e){return E$e(e)||A$e(e)||CV(e)||T$e()}function T$e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
4229In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function CV(e,t){if(e){if(typeof e=="string")return PN(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return PN(e,t)}}function A$e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function E$e(e){if(Array.isArray(e))return PN(e)}function PN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Tx=1e-4,PV=function(t,n){return[0,3*t,3*n-6*t,3*t-3*n+1]},TV=function(t,n){return t.map(function(r,a){return r*Math.pow(n,a)}).reduce(function(r,a){return r+a})},xD=function(t,n){return function(r){var a=PV(t,n);return TV(a,r)}},O$e=function(t,n){return function(r){var a=PV(t,n),i=[].concat(P$e(a.map(function(o,l){return o*l}).slice(1)),[0]);return TV(i,r)}},wD=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var a=n[0],i=n[1],o=n[2],l=n[3];if(n.length===1)switch(n[0]){case"linear":a=0,i=0,o=1,l=1;break;case"ease":a=.25,i=.1,o=.25,l=1;break;case"ease-in":a=.42,i=0,o=1,l=1;break;case"ease-out":a=.42,i=0,o=.58,l=1;break;case"ease-in-out":a=0,i=0,o=.58,l=1;break;default:{var c=n[0].split("(");if(c[0]==="cubic-bezier"&&c[1].split(")")[0].split(",").length===4){var u=c[1].split(")")[0].split(",").map(function(v){return parseFloat(v)}),h=j$e(u,4);a=h[0],i=h[1],o=h[2],l=h[3]}}}var d=xD(a,o),f=xD(i,l),p=O$e(a,o),y=function(b){return b>1?1:b<0?0:b},m=function(b){for(var x=b>1?1:b,w=x,_=0;_<8;++_){var k=d(w)-x,j=p(w);if(Math.abs(k-x)<Tx||j<Tx)return f(w);w=y(w-k/j)}return f(w)};return m.isStepper=!1,m},R$e=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,a=t.damping,i=a===void 0?8:a,o=t.dt,l=o===void 0?17:o,c=function(h,d,f){var p=-(h-d)*r,y=f*i,m=f+(p-y)*l/1e3,v=f*l/1e3+h;return Math.abs(v-d)<Tx&&Math.abs(m)<Tx?[d,0]:[v,m]};return c.isStepper=!0,c.dt=l,c},I$e=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var a=n[0];if(typeof a=="string")switch(a){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return wD(a);case"spring":return R$e();default:if(a.split("(")[0]==="cubic-bezier")return wD(a)}return typeof a=="function"?a:null};function Um(e){"@babel/helpers - typeof";return Um=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Um(e)}function _D(e){return $$e(e)||D$e(e)||AV(e)||M$e()}function M$e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
4230In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function D$e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function $$e(e){if(Array.isArray(e))return AN(e)}function kD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function vr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?kD(Object(n),!0).forEach(function(r){TN(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function TN(e,t,n){return t=L$e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function L$e(e){var t=F$e(e,"string");return Um(t)==="symbol"?t:String(t)}function F$e(e,t){if(Um(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Um(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function B$e(e,t){return U$e(e)||q$e(e,t)||AV(e,t)||W$e()}function W$e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
4231In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function AV(e,t){if(e){if(typeof e=="string")return AN(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return AN(e,t)}}function AN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function q$e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,o,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(h){u=!0,a=h}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}function U$e(e){if(Array.isArray(e))return e}var Ax=function(t,n,r){return t+(n-t)*r},EN=function(t){var n=t.from,r=t.to;return n!==r},z$e=function e(t,n,r){var a=jp(function(i,o){if(EN(o)){var l=t(o.from,o.to,o.velocity),c=B$e(l,2),u=c[0],h=c[1];return vr(vr({},o),{},{from:u,velocity:h})}return o},n);return r<1?jp(function(i,o){return EN(o)?vr(vr({},o),{},{velocity:Ax(o.velocity,a[i].velocity,r),from:Ax(o.from,a[i].from,r)}):o},n):e(t,a,r-1)};const H$e=function(e,t,n,r,a){var i=w$e(e,t),o=i.reduce(function(v,b){return vr(vr({},v),{},TN({},b,[e[b],t[b]]))},{}),l=i.reduce(function(v,b){return vr(vr({},v),{},TN({},b,{from:e[b],velocity:0,to:t[b]}))},{}),c=-1,u,h,d=function(){return null},f=function(){return jp(function(b,x){return x.from},l)},p=function(){return!Object.values(l).filter(EN).length},y=function(b){u||(u=b);var x=b-u,w=x/n.dt;l=z$e(n,l,w),a(vr(vr(vr({},e),t),f())),u=b,p()||(c=requestAnimationFrame(d))},m=function(b){h||(h=b);var x=(b-h)/r,w=jp(function(k,j){return Ax.apply(void 0,_D(j).concat([n(x)]))},o);if(a(vr(vr(vr({},e),t),w)),x<1)c=requestAnimationFrame(d);else{var _=jp(function(k,j){return Ax.apply(void 0,_D(j).concat([n(1)]))},o);a(vr(vr(vr({},e),t),_))}};return d=n.isStepper?y:m,function(){return requestAnimationFrame(d),function(){cancelAnimationFrame(c)}}};function mh(e){"@babel/helpers - typeof";return mh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mh(e)}var V$e=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function G$e(e,t){if(e==null)return{};var n=Y$e(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Y$e(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function rk(e){return J$e(e)||Q$e(e)||X$e(e)||K$e()}function K$e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
4232In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function X$e(e,t){if(e){if(typeof e=="string")return ON(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ON(e,t)}}function Q$e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function J$e(e){if(Array.isArray(e))return ON(e)}function ON(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function jD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function bs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jD(Object(n),!0).forEach(function(r){ep(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ep(e,t,n){return t=EV(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Z$e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eLe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,EV(r.key),r)}}function tLe(e,t,n){return t&&eLe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function EV(e){var t=nLe(e,"string");return mh(t)==="symbol"?t:String(t)}function nLe(e,t){if(mh(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(mh(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function rLe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&RN(e,t)}function RN(e,t){return RN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},RN(e,t)}function aLe(e){var t=sLe();return function(){var r=Ex(e),a;if(t){var i=Ex(this).constructor;a=Reflect.construct(r,arguments,i)}else a=r.apply(this,arguments);return IN(this,a)}}function IN(e,t){if(t&&(mh(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return MN(e)}function MN(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sLe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ex(e){return Ex=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ex(e)}var To=function(e){rLe(n,e);var t=aLe(n);function n(r,a){var i;Z$e(this,n),i=t.call(this,r,a);var o=i.props,l=o.isActive,c=o.attributeName,u=o.from,h=o.to,d=o.steps,f=o.children,p=o.duration;if(i.handleStyleChange=i.handleStyleChange.bind(MN(i)),i.changeStyle=i.changeStyle.bind(MN(i)),!l||p<=0)return i.state={style:{}},typeof f=="function"&&(i.state={style:h}),IN(i);if(d&&d.length)i.state={style:d[0].style};else if(u){if(typeof f=="function")return i.state={style:u},IN(i);i.state={style:c?ep({},c,u):u}}else i.state={style:{}};return i}return tLe(n,[{key:"componentDidMount",value:function(){var a=this.props,i=a.isActive,o=a.canBegin;this.mounted=!0,!(!i||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(a){var i=this.props,o=i.isActive,l=i.canBegin,c=i.attributeName,u=i.shouldReAnimate,h=i.to,d=i.from,f=this.state.style;if(l){if(!o){var p={style:c?ep({},c,h):h};this.state&&f&&(c&&f[c]!==h||!c&&f!==h)&&this.setState(p);return}if(!(d$e(a.to,h)&&a.canBegin&&a.isActive)){var y=!a.canBegin||!a.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var m=y||u?d:a.to;if(this.state&&f){var v={style:c?ep({},c,m):m};(c&&f[c]!==m||!c&&f!==m)&&this.setState(v)}this.runAnimation(bs(bs({},this.props),{},{from:m,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var a=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),a&&a()}},{key:"handleStyleChange",value:function(a){this.changeStyle(a)}},{key:"changeStyle",value:function(a){this.mounted&&this.setState({style:a})}},{key:"runJSAnimation",value:function(a){var i=this,o=a.from,l=a.to,c=a.duration,u=a.easing,h=a.begin,d=a.onAnimationEnd,f=a.onAnimationStart,p=H$e(o,l,I$e(u),c,this.changeStyle),y=function(){i.stopJSAnimation=p()};this.manager.start([f,h,y,c,d])}},{key:"runStepAnimation",value:function(a){var i=this,o=a.steps,l=a.begin,c=a.onAnimationStart,u=o[0],h=u.style,d=u.duration,f=d===void 0?0:d,p=function(m,v,b){if(b===0)return m;var x=v.duration,w=v.easing,_=w===void 0?"ease":w,k=v.style,j=v.properties,S=v.onAnimationEnd,N=b>0?o[b-1]:v,C=j||Object.keys(k);if(typeof _=="function"||_==="spring")return[].concat(rk(m),[i.runJSAnimation.bind(i,{from:N.style,to:k,duration:x,easing:_}),x]);var M=bD(C,x,_),O=bs(bs(bs({},N.style),k),{},{transition:M});return[].concat(rk(m),[O,x,S]).filter(_$e)};return this.manager.start([c].concat(rk(o.reduce(p,[h,Math.max(f,l)])),[a.onAnimationEnd]))}},{key:"runAnimation",value:function(a){this.manager||(this.manager=v$e());var i=a.begin,o=a.duration,l=a.attributeName,c=a.to,u=a.easing,h=a.onAnimationStart,d=a.onAnimationEnd,f=a.steps,p=a.children,y=this.manager;if(this.unSubscribe=y.subscribe(this.handleStyleChange),typeof u=="function"||typeof p=="function"||u==="spring"){this.runJSAnimation(a);return}if(f.length>1){this.runStepAnimation(a);return}var m=l?ep({},l,c):c,v=bD(Object.keys(m),o,u);y.start([h,i,bs(bs({},m),{},{transition:v}),o,d])}},{key:"render",value:function(){var a=this.props,i=a.children;a.begin;var o=a.duration;a.attributeName,a.easing;var l=a.isActive;a.steps,a.from,a.to,a.canBegin,a.onAnimationEnd,a.shouldReAnimate,a.onAnimationReStart;var c=G$e(a,V$e),u=g.Children.count(i),h=this.state.style;if(typeof i=="function")return i(h);if(!l||u===0||o<=0)return i;var d=function(p){var y=p.props,m=y.style,v=m===void 0?{}:m,b=y.className,x=g.cloneElement(p,bs(bs({},c),{},{style:bs(bs({},v),h),className:b}));return x};return u===1?d(g.Children.only(i)):F.createElement("div",null,g.Children.map(i,function(f){return d(f)}))}}]),n}(g.PureComponent);To.displayName="Animate";To.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};To.propTypes={from:Dt.oneOfType([Dt.object,Dt.string]),to:Dt.oneOfType([Dt.object,Dt.string]),attributeName:Dt.string,duration:Dt.number,begin:Dt.number,easing:Dt.oneOfType([Dt.string,Dt.func]),steps:Dt.arrayOf(Dt.shape({duration:Dt.number.isRequired,style:Dt.object.isRequired,easing:Dt.oneOfType([Dt.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Dt.func]),properties:Dt.arrayOf("string"),onAnimationEnd:Dt.func})),children:Dt.oneOfType([Dt.node,Dt.func]),isActive:Dt.bool,canBegin:Dt.bool,onAnimationEnd:Dt.func,shouldReAnimate:Dt.bool,onAnimationStart:Dt.func,onAnimationReStart:Dt.func};function zm(e){"@babel/helpers - typeof";return zm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zm(e)}function Ox(){return Ox=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},Ox.apply(this,arguments)}function iLe(e,t){return uLe(e)||cLe(e,t)||lLe(e,t)||oLe()}function oLe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
4233In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lLe(e,t){if(e){if(typeof e=="string")return SD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return SD(e,t)}}function SD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function cLe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,o,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(h){u=!0,a=h}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}function uLe(e){if(Array.isArray(e))return e}function ND(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function CD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ND(Object(n),!0).forEach(function(r){dLe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ND(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dLe(e,t,n){return t=hLe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hLe(e){var t=fLe(e,"string");return zm(t)=="symbol"?t:t+""}function fLe(e,t){if(zm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(zm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var PD=function(t,n,r,a,i){var o=Math.min(Math.abs(r)/2,Math.abs(a)/2),l=a>=0?1:-1,c=r>=0?1:-1,u=a>=0&&r>=0||a<0&&r<0?1:0,h;if(o>0&&i instanceof Array){for(var d=[0,0,0,0],f=0,p=4;f<p;f++)d[f]=i[f]>o?o:i[f];h="M".concat(t,",").concat(n+l*d[0]),d[0]>0&&(h+="A ".concat(d[0],",").concat(d[0],",0,0,").concat(u,",").concat(t+c*d[0],",").concat(n)),h+="L ".concat(t+r-c*d[1],",").concat(n),d[1]>0&&(h+="A ".concat(d[1],",").concat(d[1],",0,0,").concat(u,`,
4234        `).concat(t+r,",").concat(n+l*d[1])),h+="L ".concat(t+r,",").concat(n+a-l*d[2]),d[2]>0&&(h+="A ".concat(d[2],",").concat(d[2],",0,0,").concat(u,`,
4235        `).concat(t+r-c*d[2],",").concat(n+a)),h+="L ".concat(t+c*d[3],",").concat(n+a),d[3]>0&&(h+="A ".concat(d[3],",").concat(d[3],",0,0,").concat(u,`,
4236        `).concat(t,",").concat(n+a-l*d[3])),h+="Z"}else if(o>0&&i===+i&&i>0){var y=Math.min(o,i);h="M ".concat(t,",").concat(n+l*y,`
4237            A `).concat(y,",").concat(y,",0,0,").concat(u,",").concat(t+c*y,",").concat(n,`
4238            L `).concat(t+r-c*y,",").concat(n,`
4239            A `).concat(y,",").concat(y,",0,0,").concat(u,",").concat(t+r,",").concat(n+l*y,`
4240            L `).concat(t+r,",").concat(n+a-l*y,`
4241            A `).concat(y,",").concat(y,",0,0,").concat(u,",").concat(t+r-c*y,",").concat(n+a,`
4242            L `).concat(t+c*y,",").concat(n+a,`
4243            A `).concat(y,",").concat(y,",0,0,").concat(u,",").concat(t,",").concat(n+a-l*y," Z")}else h="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(a," h ").concat(-r," Z");return h},pLe=function(t,n){if(!t||!n)return!1;var r=t.x,a=t.y,i=n.x,o=n.y,l=n.width,c=n.height;if(Math.abs(l)>0&&Math.abs(c)>0){var u=Math.min(i,i+l),h=Math.max(i,i+l),d=Math.min(o,o+c),f=Math.max(o,o+c);return r>=u&&r<=h&&a>=d&&a<=f}return!1},mLe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},hA=function(t){var n=CD(CD({},mLe),t),r=g.useRef(),a=g.useState(-1),i=iLe(a,2),o=i[0],l=i[1];g.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var _=r.current.getTotalLength();_&&l(_)}catch{}},[]);var c=n.x,u=n.y,h=n.width,d=n.height,f=n.radius,p=n.className,y=n.animationEasing,m=n.animationDuration,v=n.animationBegin,b=n.isAnimationActive,x=n.isUpdateAnimationActive;if(c!==+c||u!==+u||h!==+h||d!==+d||h===0||d===0)return null;var w=kt("recharts-rectangle",p);return x?F.createElement(To,{canBegin:o>0,from:{width:h,height:d,x:c,y:u},to:{width:h,height:d,x:c,y:u},duration:m,animationEasing:y,isActive:x},function(_){var k=_.width,j=_.height,S=_.x,N=_.y;return F.createElement(To,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:m,isActive:b,easing:y},F.createElement("path",Ox({},pt(n,!0),{className:w,d:PD(S,N,k,j,f),ref:r})))}):F.createElement("path",Ox({},pt(n,!0),{className:w,d:PD(c,u,h,d,f)}))};function DN(){return DN=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},DN.apply(this,arguments)}var fA=function(t){var n=t.cx,r=t.cy,a=t.r,i=t.className,o=kt("recharts-dot",i);return n===+n&&r===+r&&a===+a?g.createElement("circle",DN({},pt(t,!1),Qb(t),{className:o,cx:n,cy:r,r:a})):null};function Hm(e){"@babel/helpers - typeof";return Hm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hm(e)}var gLe=["x","y","top","left","width","height","className"];function $N(){return $N=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},$N.apply(this,arguments)}function TD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function yLe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?TD(Object(n),!0).forEach(function(r){vLe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function vLe(e,t,n){return t=bLe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bLe(e){var t=xLe(e,"string");return Hm(t)=="symbol"?t:t+""}function xLe(e,t){if(Hm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Hm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function wLe(e,t){if(e==null)return{};var n=_Le(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function _Le(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var kLe=function(t,n,r,a,i,o){return"M".concat(t,",").concat(i,"v").concat(a,"M").concat(o,",").concat(n,"h").concat(r)},jLe=function(t){var n=t.x,r=n===void 0?0:n,a=t.y,i=a===void 0?0:a,o=t.top,l=o===void 0?0:o,c=t.left,u=c===void 0?0:c,h=t.width,d=h===void 0?0:h,f=t.height,p=f===void 0?0:f,y=t.className,m=wLe(t,gLe),v=yLe({x:r,y:i,top:l,left:u,width:d,height:p},m);return!be(r)||!be(i)||!be(d)||!be(p)||!be(l)||!be(u)?null:F.createElement("path",$N({},pt(v,!0),{className:kt("recharts-cross",y),d:kLe(r,i,d,p,l,u)}))},SLe=GH,NLe=SLe(Object.getPrototypeOf,Object),CLe=NLe,PLe=Io,TLe=CLe,ALe=Mo,ELe="[object Object]",OLe=Function.prototype,RLe=Object.prototype,OV=OLe.toString,ILe=RLe.hasOwnProperty,MLe=OV.call(Object);function DLe(e){if(!ALe(e)||PLe(e)!=ELe)return!1;var t=TLe(e);if(t===null)return!0;var n=ILe.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&OV.call(n)==MLe}var $Le=DLe;const LLe=Vt($Le);var FLe=Io,BLe=Mo,WLe="[object Boolean]";function qLe(e){return e===!0||e===!1||BLe(e)&&FLe(e)==WLe}var ULe=qLe;const zLe=Vt(ULe);function Vm(e){"@babel/helpers - typeof";return Vm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vm(e)}function Rx(){return Rx=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},Rx.apply(this,arguments)}function HLe(e,t){return KLe(e)||YLe(e,t)||GLe(e,t)||VLe()}function VLe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
4244In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function GLe(e,t){if(e){if(typeof e=="string")return AD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return AD(e,t)}}function AD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function YLe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,o,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(h){u=!0,a=h}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}function KLe(e){if(Array.isArray(e))return e}function ED(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function OD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ED(Object(n),!0).forEach(function(r){XLe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ED(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function XLe(e,t,n){return t=QLe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QLe(e){var t=JLe(e,"string");return Vm(t)=="symbol"?t:t+""}function JLe(e,t){if(Vm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Vm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var RD=function(t,n,r,a,i){var o=r-a,l;return l="M ".concat(t,",").concat(n),l+="L ".concat(t+r,",").concat(n),l+="L ".concat(t+r-o/2,",").concat(n+i),l+="L ".concat(t+r-o/2-a,",").concat(n+i),l+="L ".concat(t,",").concat(n," Z"),l},ZLe={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},eFe=function(t){var n=OD(OD({},ZLe),t),r=g.useRef(),a=g.useState(-1),i=HLe(a,2),o=i[0],l=i[1];g.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var w=r.current.getTotalLength();w&&l(w)}catch{}},[]);var c=n.x,u=n.y,h=n.upperWidth,d=n.lowerWidth,f=n.height,p=n.className,y=n.animationEasing,m=n.animationDuration,v=n.animationBegin,b=n.isUpdateAnimationActive;if(c!==+c||u!==+u||h!==+h||d!==+d||f!==+f||h===0&&d===0||f===0)return null;var x=kt("recharts-trapezoid",p);return b?F.createElement(To,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:f,x:c,y:u},to:{upperWidth:h,lowerWidth:d,height:f,x:c,y:u},duration:m,animationEasing:y,isActive:b},function(w){var _=w.upperWidth,k=w.lowerWidth,j=w.height,S=w.x,N=w.y;return F.createElement(To,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:m,easing:y},F.createElement("path",Rx({},pt(n,!0),{className:x,d:RD(S,N,_,k,j),ref:r})))}):F.createElement("g",null,F.createElement("path",Rx({},pt(n,!0),{className:x,d:RD(c,u,h,d,f)})))},tFe=["option","shapeType","propTransformer","activeClassName","isActive"];function Gm(e){"@babel/helpers - typeof";return Gm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gm(e)}function nFe(e,t){if(e==null)return{};var n=rFe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function rFe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function ID(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Ix(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ID(Object(n),!0).forEach(function(r){aFe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ID(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function aFe(e,t,n){return t=sFe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sFe(e){var t=iFe(e,"string");return Gm(t)=="symbol"?t:t+""}function iFe(e,t){if(Gm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Gm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function oFe(e,t){return Ix(Ix({},t),e)}function lFe(e,t){return e==="symbols"}function MD(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return F.createElement(hA,n);case"trapezoid":return F.createElement(eFe,n);case"sector":return F.createElement(wV,n);case"symbols":if(lFe(t))return F.createElement(AT,n);break;default:return null}}function cFe(e){return g.isValidElement(e)?e.props:e}function uFe(e){var t=e.option,n=e.shapeType,r=e.propTransformer,a=r===void 0?oFe:r,i=e.activeClassName,o=i===void 0?"recharts-active-shape":i,l=e.isActive,c=nFe(e,tFe),u;if(g.isValidElement(t))u=g.cloneElement(t,Ix(Ix({},c),cFe(t)));else if(it(t))u=t(c);else if(LLe(t)&&!zLe(t)){var h=a(t,c);u=F.createElement(MD,{shapeType:n,elementProps:h})}else{var d=c;u=F.createElement(MD,{shapeType:n,elementProps:d})}return l?F.createElement(yn,{className:o},u):u}function K0(e,t){return t!=null&&"trapezoids"in e.props}function X0(e,t){return t!=null&&"sectors"in e.props}function Ym(e,t){return t!=null&&"points"in e.props}function dFe(e,t){var n,r,a=e.x===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.x)||e.x===t.x,i=e.y===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.y)||e.y===t.y;return a&&i}function hFe(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function fFe(e,t){var n=e.x===t.x,r=e.y===t.y,a=e.z===t.z;return n&&r&&a}function pFe(e,t){var n;return K0(e,t)?n=dFe:X0(e,t)?n=hFe:Ym(e,t)&&(n=fFe),n}function mFe(e,t){var n;return K0(e,t)?n="trapezoids":X0(e,t)?n="sectors":Ym(e,t)&&(n="points"),n}function gFe(e,t){if(K0(e,t)){var n;return(n=t.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}if(X0(e,t)){var r;return(r=t.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}return Ym(e,t)?t.payload:{}}function yFe(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,a=mFe(n,t),i=gFe(n,t),o=r.filter(function(c,u){var h=Em(i,c),d=n.props[a].filter(function(y){var m=pFe(n,t);return m(y,t)}),f=n.props[a].indexOf(d[d.length-1]),p=u===f;return h&&p}),l=r.indexOf(o[o.length-1]);return l}var vFe=Math.ceil,bFe=Math.max;function xFe(e,t,n,r){for(var a=-1,i=bFe(vFe((t-e)/(n||1)),0),o=Array(i);i--;)o[r?i:++a]=e,e+=n;return o}var wFe=xFe,_Fe=d9,DD=1/0,kFe=17976931348623157e292;function jFe(e){if(!e)return e===0?e:0;if(e=_Fe(e),e===DD||e===-DD){var t=e<0?-1:1;return t*kFe}return e===e?e:0}var SFe=jFe,NFe=wFe,CFe=L0,ak=SFe;function PFe(e){return function(t,n,r){return r&&typeof r!="number"&&CFe(t,n,r)&&(n=r=void 0),t=ak(t),n===void 0?(n=t,t=0):n=ak(n),r=r===void 0?t<n?1:-1:ak(r),NFe(t,n,r,e)}}var TFe=PFe,AFe=TFe,EFe=AFe(),OFe=EFe;const Mx=Vt(OFe);function Km(e){"@babel/helpers - typeof";return Km=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Km(e)}function $D(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function LD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$D(Object(n),!0).forEach(function(r){RV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$D(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function RV(e,t,n){return t=RFe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function RFe(e){var t=IFe(e,"string");return Km(t)=="symbol"?t:t+""}function IFe(e,t){if(Km(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Km(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var MFe=["Webkit","Moz","O","ms"],DFe=function(t,n){var r=t.replace(/(\w)/,function(i){return i.toUpperCase()}),a=MFe.reduce(function(i,o){return LD(LD({},i),{},RV({},o+r,n))},{});return a[t]=n,a};function gh(e){"@babel/helpers - typeof";return gh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gh(e)}function Dx(){return Dx=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},Dx.apply(this,arguments)}function FD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function sk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?FD(Object(n),!0).forEach(function(r){ka(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $Fe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function BD(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,MV(r.key),r)}}function LFe(e,t,n){return t&&BD(e.prototype,t),n&&BD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function FFe(e,t,n){return t=$x(t),BFe(e,IV()?Reflect.construct(t,n||[],$x(e).constructor):t.apply(e,n))}function BFe(e,t){if(t&&(gh(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return WFe(e)}function WFe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function IV(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(IV=function(){return!!e})()}function $x(e){return $x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},$x(e)}function qFe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&LN(e,t)}function LN(e,t){return LN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},LN(e,t)}function ka(e,t,n){return t=MV(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function MV(e){var t=UFe(e,"string");return gh(t)=="symbol"?t:t+""}function UFe(e,t){if(gh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(gh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var zFe=function(t){var n=t.data,r=t.startIndex,a=t.endIndex,i=t.x,o=t.width,l=t.travellerWidth;if(!n||!n.length)return{};var c=n.length,u=wp().domain(Mx(0,c)).range([i,i+o-l]),h=u.domain().map(function(d){return u(d)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:u(r),endX:u(a),scale:u,scaleValues:h}},WD=function(t){return t.changedTouches&&!!t.changedTouches.length},yh=function(e){function t(n){var r;return $Fe(this,t),r=FFe(this,t,[n]),ka(r,"handleDrag",function(a){r.leaveTimer&&(clearTimeout(r.leaveTimer),r.leaveTimer=null),r.state.isTravellerMoving?r.handleTravellerMove(a):r.state.isSlideMoving&&r.handleSlideDrag(a)}),ka(r,"handleTouchMove",function(a){a.changedTouches!=null&&a.changedTouches.length>0&&r.handleDrag(a.changedTouches[0])}),ka(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var a=r.props,i=a.endIndex,o=a.onDragEnd,l=a.startIndex;o==null||o({endIndex:i,startIndex:l})}),r.detachDragEndListener()}),ka(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),ka(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),ka(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),ka(r,"handleSlideDragStart",function(a){var i=WD(a)?a.changedTouches[0]:a;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:i.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return qFe(t,e),LFe(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var a=r.startX,i=r.endX,o=this.state.scaleValues,l=this.props,c=l.gap,u=l.data,h=u.length-1,d=Math.min(a,i),f=Math.max(a,i),p=t.getIndexInRange(o,d),y=t.getIndexInRange(o,f);return{startIndex:p-p%c,endIndex:y===h?h:y-y%c}}},{key:"getTextOfTick",value:function(r){var a=this.props,i=a.data,o=a.tickFormatter,l=a.dataKey,c=Da(i[r],l,r);return it(o)?o(c,r):c}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var a=this.state,i=a.slideMoveStartX,o=a.startX,l=a.endX,c=this.props,u=c.x,h=c.width,d=c.travellerWidth,f=c.startIndex,p=c.endIndex,y=c.onChange,m=r.pageX-i;m>0?m=Math.min(m,u+h-d-l,u+h-d-o):m<0&&(m=Math.max(m,u-o,u-l));var v=this.getIndex({startX:o+m,endX:l+m});(v.startIndex!==f||v.endIndex!==p)&&y&&y(v),this.setState({startX:o+m,endX:l+m,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,a){var i=WD(a)?a.changedTouches[0]:a;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:i.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var a=this.state,i=a.brushMoveStartX,o=a.movingTravellerId,l=a.endX,c=a.startX,u=this.state[o],h=this.props,d=h.x,f=h.width,p=h.travellerWidth,y=h.onChange,m=h.gap,v=h.data,b={startX:this.state.startX,endX:this.state.endX},x=r.pageX-i;x>0?x=Math.min(x,d+f-p-u):x<0&&(x=Math.max(x,d-u)),b[o]=u+x;var w=this.getIndex(b),_=w.startIndex,k=w.endIndex,j=function(){var N=v.length-1;return o==="startX"&&(l>c?_%m===0:k%m===0)||l<c&&k===N||o==="endX"&&(l>c?k%m===0:_%m===0)||l>c&&k===N};this.setState(ka(ka({},o,u+x),"brushMoveStartX",r.pageX),function(){y&&j()&&y(w)})}},{key:"handleTravellerMoveKeyboard",value:function(r,a){var i=this,o=this.state,l=o.scaleValues,c=o.startX,u=o.endX,h=this.state[a],d=l.indexOf(h);if(d!==-1){var f=d+r;if(!(f===-1||f>=l.length)){var p=l[f];a==="startX"&&p>=u||a==="endX"&&p<=c||this.setState(ka({},a,p),function(){i.props.onChange(i.getIndex({startX:i.state.startX,endX:i.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,a=r.x,i=r.y,o=r.width,l=r.height,c=r.fill,u=r.stroke;return F.createElement("rect",{stroke:u,fill:c,x:a,y:i,width:o,height:l})}},{key:"renderPanorama",value:function(){var r=this.props,a=r.x,i=r.y,o=r.width,l=r.height,c=r.data,u=r.children,h=r.padding,d=g.Children.only(u);return d?F.cloneElement(d,{x:a,y:i,width:o,height:l,margin:h,compact:!0,data:c}):null}},{key:"renderTravellerLayer",value:function(r,a){var i,o,l=this,c=this.props,u=c.y,h=c.travellerWidth,d=c.height,f=c.traveller,p=c.ariaLabel,y=c.data,m=c.startIndex,v=c.endIndex,b=Math.max(r,this.props.x),x=sk(sk({},pt(this.props,!1)),{},{x:b,y:u,width:h,height:d}),w=p||"Min value: ".concat((i=y[m])===null||i===void 0?void 0:i.name,", Max value: ").concat((o=y[v])===null||o===void 0?void 0:o.name);return F.createElement(yn,{tabIndex:0,role:"slider","aria-label":w,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[a],onTouchStart:this.travellerDragStartHandlers[a],onKeyDown:function(k){["ArrowLeft","ArrowRight"].includes(k.key)&&(k.preventDefault(),k.stopPropagation(),l.handleTravellerMoveKeyboard(k.key==="ArrowRight"?1:-1,a))},onFocus:function(){l.setState({isTravellerFocused:!0})},onBlur:function(){l.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(f,x))}},{key:"renderSlide",value:function(r,a){var i=this.props,o=i.y,l=i.height,c=i.stroke,u=i.travellerWidth,h=Math.min(r,a)+u,d=Math.max(Math.abs(a-r)-u,0);return F.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:c,fillOpacity:.2,x:h,y:o,width:d,height:l})}},{key:"renderText",value:function(){var r=this.props,a=r.startIndex,i=r.endIndex,o=r.y,l=r.height,c=r.travellerWidth,u=r.stroke,h=this.state,d=h.startX,f=h.endX,p=5,y={pointerEvents:"none",fill:u};return F.createElement(yn,{className:"recharts-brush-texts"},F.createElement(hx,Dx({textAnchor:"end",verticalAnchor:"middle",x:Math.min(d,f)-p,y:o+l/2},y),this.getTextOfTick(a)),F.createElement(hx,Dx({textAnchor:"start",verticalAnchor:"middle",x:Math.max(d,f)+c+p,y:o+l/2}
4244,y),this.getTextOfTick(i)))}},{key:"render",value:function(){var r=this.props,a=r.data,i=r.className,o=r.children,l=r.x,c=r.y,u=r.width,h=r.height,d=r.alwaysShowText,f=this.state,p=f.startX,y=f.endX,m=f.isTextActive,v=f.isSlideMoving,b=f.isTravellerMoving,x=f.isTravellerFocused;if(!a||!a.length||!be(l)||!be(c)||!be(u)||!be(h)||u<=0||h<=0)return null;var w=kt("recharts-brush",i),_=F.Children.count(o)===1,k=DFe("userSelect","none");return F.createElement(yn,{className:w,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:k},this.renderBackground(),_&&this.renderPanorama(),this.renderSlide(p,y),this.renderTravellerLayer(p,"startX"),this.renderTravellerLayer(y,"endX"),(m||v||b||x||d)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var a=r.x,i=r.y,o=r.width,l=r.height,c=r.stroke,u=Math.floor(i+l/2)-1;return F.createElement(F.Fragment,null,F.createElement("rect",{x:a,y:i,width:o,height:l,fill:c,stroke:"none"}),F.createElement("line",{x1:a+1,y1:u,x2:a+o-1,y2:u,fill:"none",stroke:"#fff"}),F.createElement("line",{x1:a+1,y1:u+2,x2:a+o-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,a){var i;return F.isValidElement(r)?i=F.cloneElement(r,a):it(r)?i=r(a):i=t.renderDefaultTraveller(a),i}},{key:"getDerivedStateFromProps",value:function(r,a){var i=r.data,o=r.width,l=r.x,c=r.travellerWidth,u=r.updateId,h=r.startIndex,d=r.endIndex;if(i!==a.prevData||u!==a.prevUpdateId)return sk({prevData:i,prevTravellerWidth:c,prevUpdateId:u,prevX:l,prevWidth:o},i&&i.length?zFe({data:i,width:o,x:l,travellerWidth:c,startIndex:h,endIndex:d}):{scale:null,scaleValues:null});if(a.scale&&(o!==a.prevWidth||l!==a.prevX||c!==a.prevTravellerWidth)){a.scale.range([l,l+o-c]);var f=a.scale.domain().map(function(p){return a.scale(p)});return{prevData:i,prevTravellerWidth:c,prevUpdateId:u,prevX:l,prevWidth:o,startX:a.scale(r.startIndex),endX:a.scale(r.endIndex),scaleValues:f}}return null}},{key:"getIndexInRange",value:function(r,a){for(var i=r.length,o=0,l=i-1;l-o>1;){var c=Math.floor((o+l)/2);r[c]>a?l=c:o=c}return a>=r[l]?l:o}}])}(g.PureComponent);ka(yh,"displayName","Brush");ka(yh,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var HFe=LT;function VFe(e,t){var n;return HFe(e,function(r,a,i){return n=t(r,a,i),!n}),!!n}var GFe=VFe,YFe=FH,KFe=of,XFe=GFe,QFe=wa,JFe=L0;function ZFe(e,t,n){var r=QFe(e)?YFe:XFe;return n&&JFe(e,t,n)&&(t=void 0),r(e,KFe(t))}var e6e=ZFe;const t6e=Vt(e6e);var _i=function(t,n){var r=t.alwaysShow,a=t.ifOverflow;return r&&(a="extendDomain"),a===n},qD=i9;function n6e(e,t,n){t=="__proto__"&&qD?qD(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var r6e=n6e,a6e=r6e,s6e=a9,i6e=of;function o6e(e,t){var n={};return t=i6e(t),s6e(e,function(r,a,i){a6e(n,a,t(r,a,i))}),n}var l6e=o6e;const c6e=Vt(l6e);function u6e(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}var d6e=u6e,h6e=LT;function f6e(e,t){var n=!0;return h6e(e,function(r,a,i){return n=!!t(r,a,i),n}),n}var p6e=f6e,m6e=d6e,g6e=p6e,y6e=of,v6e=wa,b6e=L0;function x6e(e,t,n){var r=v6e(e)?m6e:g6e;return n&&b6e(e,t,n)&&(t=void 0),r(e,y6e(t))}var w6e=x6e;const _6e=Vt(w6e);var k6e=["x","y"];function Xm(e){"@babel/helpers - typeof";return Xm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xm(e)}function FN(){return FN=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},FN.apply(this,arguments)}function UD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Bf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};
vendor: 103,539 bytes, lines 4244-4248
4244t%2?UD(Object(n),!0).forEach(function(r){j6e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function j6e(e,t,n){return t=S6e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function S6e(e){var t=N6e(e,"string");return Xm(t)=="symbol"?t:t+""}function N6e(e,t){if(Xm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Xm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function C6e(e,t){if(e==null)return{};var n=P6e(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function P6e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function T6e(e,t){var n=e.x,r=e.y,a=C6e(e,k6e),i="".concat(n),o=parseInt(i,10),l="".concat(r),c=parseInt(l,10),u="".concat(t.height||a.height),h=parseInt(u,10),d="".concat(t.width||a.width),f=parseInt(d,10);return Bf(Bf(Bf(Bf(Bf({},t),a),o?{x:o}:{}),c?{y:c}:{}),{},{height:h,width:f,name:t.name,radius:t.radius})}function zD(e){return F.createElement(uFe,FN({shapeType:"rectangle",propTransformer:T6e,activeClassName:"recharts-active-bar"},e))}var A6e=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,a){if(typeof t=="number")return t;var i=be(r)||zke(r);return i?t(r,a):(i||du(),n)}},E6e=["value","background"],DV;function vh(e){"@babel/helpers - typeof";return vh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vh(e)}function O6e(e,t){if(e==null)return{};var n=R6e(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function R6e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Lx(){return Lx=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},Lx.apply(this,arguments)}function HD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function $n(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?HD(Object(n),!0).forEach(function(r){pl(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function I6e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function VD(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,LV(r.key),r)}}function M6e(e,t,n){return t&&VD(e.prototype,t),n&&VD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function D6e(e,t,n){return t=Fx(t),$6e(e,$V()?Reflect.construct(t,n||[],Fx(e).constructor):t.apply(e,n))}function $6e(e,t){if(t&&(vh(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return L6e(e)}function L6e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $V(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return($V=function(){return!!e})()}function Fx(e){return Fx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Fx(e)}function F6e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&BN(e,t)}function BN(e,t){return BN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},BN(e,t)}function pl(e,t,n){return t=LV(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function LV(e){var t=B6e(e,"string");return vh(t)=="symbol"?t:t+""}function B6e(e,t){if(vh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(vh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Jg=function(e){function t(){var n;I6e(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return n=D6e(this,t,[].concat(a)),pl(n,"state",{isAnimationFinished:!1}),pl(n,"id",Gg("recharts-bar-")),pl(n,"handleAnimationEnd",function(){var o=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),o&&o()}),pl(n,"handleAnimationStart",function(){var o=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),o&&o()}),n}return F6e(t,e),M6e(t,[{key:"renderRectanglesStatically",value:function(r){var a=this,i=this.props,o=i.shape,l=i.dataKey,c=i.activeIndex,u=i.activeBar,h=pt(this.props,!1);return r&&r.map(function(d,f){var p=f===c,y=p?u:o,m=$n($n($n({},h),d),{},{isActive:p,option:y,index:f,dataKey:l,onAnimationStart:a.handleAnimationStart,onAnimationEnd:a.handleAnimationEnd});return F.createElement(yn,Lx({className:"recharts-bar-rectangle"},Jb(a.props,d,f),{key:"rectangle-".concat(d==null?void 0:d.x,"-").concat(d==null?void 0:d.y,"-").concat(d==null?void 0:d.value,"-").concat(f)}),F.createElement(zD,m))})}},{key:"renderRectanglesWithAnimation",value:function(){var r=this,a=this.props,i=a.data,o=a.layout,l=a.isAnimationActive,c=a.animationBegin,u=a.animationDuration,h=a.animationEasing,d=a.animationId,f=this.state.prevData;return F.createElement(To,{begin:c,duration:u,isActive:l,easing:h,from:{t:0},to:{t:1},key:"bar-".concat(d),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(p){var y=p.t,m=i.map(function(v,b){var x=f&&f[b];if(x){var w=Xa(x.x,v.x),_=Xa(x.y,v.y),k=Xa(x.width,v.width),j=Xa(x.height,v.height);return $n($n({},v),{},{x:w(y),y:_(y),width:k(y),height:j(y)})}if(o==="horizontal"){var S=Xa(0,v.height),N=S(y);return $n($n({},v),{},{y:v.y+v.height-N,height:N})}var C=Xa(0,v.width),M=C(y);return $n($n({},v),{},{width:M})});return F.createElement(yn,null,r.renderRectanglesStatically(m))})}},{key:"renderRectangles",value:function(){var r=this.props,a=r.data,i=r.isAnimationActive,o=this.state.prevData;return i&&a&&a.length&&(!o||!Em(o,a))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(a)}},{key:"renderBackground",value:function(){var r=this,a=this.props,i=a.data,o=a.dataKey,l=a.activeIndex,c=pt(this.props.background,!1);return i.map(function(u,h){u.value;var d=u.background,f=O6e(u,E6e);if(!d)return null;var p=$n($n($n($n($n({},f),{},{fill:"#eee"},d),c),Jb(r.props,u,h)),{},{onAnimationStart:r.handleAnimationStart,onAnimationEnd:r.handleAnimationEnd,dataKey:o,index:h,className:"recharts-bar-background-rectangle"});return F.createElement(zD,Lx({key:"background-bar-".concat(h),option:r.props.background,isActive:h===l},p))})}},{key:"renderErrorBar",value:function(r,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,o=i.data,l=i.xAxis,c=i.yAxis,u=i.layout,h=i.children,d=Ls(h,Y0);if(!d)return null;var f=u==="vertical"?o[0].height/2:o[0].width/2,p=function(v,b){var x=Array.isArray(v.value)?v.value[1]:v.value;return{x:v.x,y:v.y,value:x,errorVal:Da(v,b)}},y={clipPath:r?"url(#clipPath-".concat(a,")"):null};return F.createElement(yn,y,d.map(function(m){return F.cloneElement(m,{key:"error-bar-".concat(a,"-").concat(m.props.dataKey),data:o,xAxis:l,yAxis:c,layout:u,offset:f,dataPointFormatter:p})}))}},{key:"render",value:function(){var r=this.props,a=r.hide,i=r.data,o=r.className,l=r.xAxis,c=r.yAxis,u=r.left,h=r.top,d=r.width,f=r.height,p=r.isAnimationActive,y=r.background,m=r.id;if(a||!i||!i.length)return null;var v=this.state.isAnimationFinished,b=kt("recharts-bar",o),x=l&&l.allowDataOverflow,w=c&&c.allowDataOverflow,_=x||w,k=yt(m)?this.id:m;return F.createElement(yn,{className:b},x||w?F.createElement("defs",null,F.createElement("clipPath",{id:"clipPath-".concat(k)},F.createElement("rect",{x:x?u:u-d/2,y:w?h:h-f/2,width:x?d:d*2,height:w?f:f*2}))):null,F.createElement(yn,{className:"recharts-bar-rectangles",clipPath:_?"url(#clipPath-".concat(k,")"):null},y?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(_,k),(!p||v)&&Pl.renderCallByParent(this.props,i))}}],[{key:"getDerivedStateFromProps",value:function(r,a){return r.animationId!==a.prevAnimationId?{prevAnimationId:r.animationId,curData:r.data,prevData:a.curData}:r.data!==a.curData?{curData:r.data}:null}}])}(g.PureComponent);DV=Jg;pl(Jg,"displayName","Bar");pl(Jg,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!fo.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});pl(Jg,"getComposedData",function(e){var t=e.props,n=e.item,r=e.barPosition,a=e.bandSize,i=e.xAxis,o=e.yAxis,l=e.xAxisTicks,c=e.yAxisTicks,u=e.stackedData,h=e.dataStartIndex,d=e.displayedData,f=e.offset,p=pDe(r,n);if(!p)return null;var y=t.layout,m=n.type.defaultProps,v=m!==void 0?$n($n({},m),n.props):n.props,b=v.dataKey,x=v.children,w=v.minPointSize,_=y==="horizontal"?o:i,k=u?_.scale.domain():null,j=_De({numericAxis:_}),S=Ls(x,f9),N=d.map(function(C,M){var O,D,$,R,I,P;u?O=mDe(u[h+M],k):(O=Da(C,b),Array.isArray(O)||(O=[j,O]));var A=A6e(w,DV.defaultProps.minPointSize)(O[1],M);if(y==="horizontal"){var E,T=[o.scale(O[0]),o.scale(O[1])],L=T[0],B=T[1];D=H5({axis:i,ticks:l,bandSize:a,offset:p.offset,entry:C,index:M}),$=(E=B??L)!==null&&E!==void 0?E:void 0,R=p.size;var H=L-B;if(I=Number.isNaN(H)?0:H,P={x:D,y:o.y,width:R,height:o.height},Math.abs(A)>0&&Math.abs(I)<Math.abs(A)){var G=Os(I||A)*(Math.abs(A)-Math.abs(I));$-=G,I+=G}}else{var Z=[i.scale(O[0]),i.scale(O[1])],le=Z[0],ue=Z[1];if(D=le,$=H5({axis:o,ticks:c,bandSize:a,offset:p.offset,entry:C,index:M}),R=ue-le,I=p.size,P={x:i.x,y:$,width:i.width,height:I},Math.abs(A)>0&&Math.abs(R)<Math.abs(A)){var re=Os(R||A)*(Math.abs(A)-Math.abs(R));R+=re}}return $n($n($n({},C),{},{x:D,y:$,width:R,height:I,value:u?O:O[1],payload:C,background:P},S&&S[M]&&S[M].props),{},{tooltipPayload:[vV(n,C)],tooltipPosition:{x:D+R/2,y:$+I/2}})});return $n({data:N,layout:y},f)});function Qm(e){"@babel/helpers - typeof";return Qm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qm(e)}function W6e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function GD(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,FV(r.key),r)}}function q6e(e,t,n){return t&&GD(e.prototype,t),n&&GD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function YD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Ps(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?YD(Object(n),!0).forEach(function(r){Q0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Q0(e,t,n){return t=FV(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function FV(e){var t=U6e(e,"string");return Qm(t)=="symbol"?t:t+""}function U6e(e,t){if(Qm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Qm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var z6e=function(t,n,r,a,i){var o=t.width,l=t.height,c=t.layout,u=t.children,h=Object.keys(n),d={left:r.left,leftMirror:r.left,right:o-r.right,rightMirror:o-r.right,top:r.top,topMirror:r.top,bottom:l-r.bottom,bottomMirror:l-r.bottom},f=!!Sa(u,Jg);return h.reduce(function(p,y){var m=n[y],v=m.orientation,b=m.domain,x=m.padding,w=x===void 0?{}:x,_=m.mirror,k=m.reversed,j="".concat(v).concat(_?"Mirror":""),S,N,C,M,O;if(m.type==="number"&&(m.padding==="gap"||m.padding==="no-gap")){var D=b[1]-b[0],$=1/0,R=m.categoricalDomain.sort(Gke);if(R.forEach(function(Z,le){le>0&&($=Math.min((Z||0)-(R[le-1]||0),$))}),Number.isFinite($)){var I=$/D,P=m.layout==="vertical"?r.height:r.width;if(m.padding==="gap"&&(S=I*P/2),m.padding==="no-gap"){var A=cu(t.barCategoryGap,I*P),E=I*P/2;S=E-A-(E-A)/P*A}}}a==="xAxis"?N=[r.left+(w.left||0)+(S||0),r.left+r.width-(w.right||0)-(S||0)]:a==="yAxis"?N=c==="horizontal"?[r.top+r.height-(w.bottom||0),r.top+(w.top||0)]:[r.top+(w.top||0)+(S||0),r.top+r.height-(w.bottom||0)-(S||0)]:N=m.range,k&&(N=[N[1],N[0]]);var T=hDe(m,i,f),L=T.scale,B=T.realScaleType;L.domain(b).range(N),fDe(L);var H=wDe(L,Ps(Ps({},m),{},{realScaleType:B}));a==="xAxis"?(O=v==="top"&&!_||v==="bottom"&&_,C=r.left,M=d[j]-O*m.height):a==="yAxis"&&(O=v==="left"&&!_||v==="right"&&_,C=d[j]-O*m.width,M=r.top);var G=Ps(Ps(Ps({},m),H),{},{realScaleType:B,x:C,y:M,scale:L,width:a==="xAxis"?r.width:m.width,height:a==="yAxis"?r.height:m.height});return G.bandSize=Nx(G,H),!m.hide&&a==="xAxis"?d[j]+=(O?-1:1)*G.height:m.hide||(d[j]+=(O?-1:1)*G.width),Ps(Ps({},p),{},Q0({},y,G))},{})},BV=function(t,n){var r=t.x,a=t.y,i=n.x,o=n.y;return{x:Math.min(r,i),y:Math.min(a,o),width:Math.abs(i-r),height:Math.abs(o-a)}},H6e=function(t){var n=t.x1,r=t.y1,a=t.x2,i=t.y2;return BV({x:n,y:r},{x:a,y:i})},WV=function(){function e(t){W6e(this,e),this.scale=t}return q6e(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=r.bandAware,i=r.position;if(n!==void 0){if(i)switch(i){case"start":return this.scale(n);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+o}case"end":{var l=this.bandwidth?this.bandwidth():0;return this.scale(n)+l}default:return this.scale(n)}if(a){var c=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+c}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),a=r[0],i=r[r.length-1];return a<=i?n>=a&&n<=i:n>=i&&n<=a}}],[{key:"create",value:function(n){return new e(n)}}])}();Q0(WV,"EPS",1e-4);var pA=function(t){var n=Object.keys(t).reduce(function(r,a){return Ps(Ps({},r),{},Q0({},a,WV.create(t[a])))},{});return Ps(Ps({},n),{},{apply:function(a){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=i.bandAware,l=i.position;return c6e(a,function(c,u){return n[u].apply(c,{bandAware:o,position:l})})},isInRange:function(a){return _6e(a,function(i,o){return n[o].isInRange(i)})}})};function V6e(e){return(e%180+180)%180}var G6e=function(t){var n=t.width,r=t.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=V6e(a),o=i*Math.PI/180,l=Math.atan(r/n),c=o>l&&o<Math.PI-l?r/Math.sin(o):n/Math.cos(o);return Math.abs(c)},Y6e=Y1e(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),qV=g.createContext(void 0),UV=g.createContext(void 0),zV=g.createContext(void 0),K6e=g.createContext({}),HV=g.createContext(void 0),VV=g.createContext(0),GV=g.createContext(0),KD=function(t){var n=t.state,r=n.xAxisMap,a=n.yAxisMap,i=n.offset,o=t.clipPathId,l=t.children,c=t.width,u=t.height,h=Y6e(i);return F.createElement(qV.Provider,{value:r},F.createElement(UV.Provider,{value:a},F.createElement(K6e.Provider,{value:i},F.createElement(zV.Provider,{value:h},F.createElement(HV.Provider,{value:o},F.createElement(VV.Provider,{value:u},F.createElement(GV.Provider,{value:c},l)))))))},X6e=function(){return g.useContext(HV)},YV=function(t){var n=g.useContext(qV);n==null&&du();var r=n[t];return r==null&&du(),r},KV=function(t){var n=g.useContext(UV);n==null&&du();var r=n[t];return r==null&&du(),r},Q6e=function(){var t=g.useContext(zV);return t},XV=function(){return g.useContext(GV)},QV=function(){return g.useContext(VV)};function bh(e){"@babel/helpers - typeof";return bh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bh(e)}function J6e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Z6e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ZV(r.key),r)}}function e8e(e,t,n){return t&&Z6e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function t8e(e,t,n){return t=Bx(t),n8e(e,JV()?Reflect.construct(t,n||[],Bx(e).constructor):t.apply(e,n))}function n8e(e,t){if(t&&(bh(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return r8e(e)}function r8e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function JV(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(JV=function(){return!!e})()}function Bx(e){return Bx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Bx(e)}function a8e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&WN(e,t)}function WN(e,t){return WN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},WN(e,t)}function XD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function QD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?XD(Object(n),!0).forEach(function(r){mA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mA(e,t,n){return t=ZV(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZV(e){var t=s8e(e,"string");return bh(t)=="symbol"?t:t+""}function s8e(e,t){if(bh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(bh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function i8e(e,t){return u8e(e)||c8e(e,t)||l8e(e,t)||o8e()}function o8e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
4245In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function l8e(e,t){if(e){if(typeof e=="string")return JD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return JD(e,t)}}function JD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c8e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,o,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(h){u=!0,a=h}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}function u8e(e){if(Array.isArray(e))return e}function qN(){return qN=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},qN.apply(this,arguments)}var d8e=function(t,n){var r;return F.isValidElement(t)?r=F.cloneElement(t,n):it(t)?r=t(n):r=F.createElement("line",qN({},n,{className:"recharts-reference-line-line"})),r},h8e=function(t,n,r,a,i,o,l,c,u){var h=i.x,d=i.y,f=i.width,p=i.height;if(r){var y=u.y,m=t.y.apply(y,{position:o});if(_i(u,"discard")&&!t.y.isInRange(m))return null;var v=[{x:h+f,y:m},{x:h,y:m}];return c==="left"?v.reverse():v}if(n){var b=u.x,x=t.x.apply(b,{position:o});if(_i(u,"discard")&&!t.x.isInRange(x))return null;var w=[{x,y:d+p},{x,y:d}];return l==="top"?w.reverse():w}if(a){var _=u.segment,k=_.map(function(j){return t.apply(j,{position:o})});return _i(u,"discard")&&t6e(k,function(j){return!t.isInRange(j)})?null:k}return null};function f8e(e){var t=e.x,n=e.y,r=e.segment,a=e.xAxisId,i=e.yAxisId,o=e.shape,l=e.className,c=e.alwaysShow,u=X6e(),h=YV(a),d=KV(i),f=Q6e();if(!u||!f)return null;Wc(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var p=pA({x:h.scale,y:d.scale}),y=nr(t),m=nr(n),v=r&&r.length===2,b=h8e(p,y,m,v,f,e.position,h.orientation,d.orientation,e);if(!b)return null;var x=i8e(b,2),w=x[0],_=w.x,k=w.y,j=x[1],S=j.x,N=j.y,C=_i(e,"hidden")?"url(#".concat(u,")"):void 0,M=QD(QD({clipPath:C},pt(e,!0)),{},{x1:_,y1:k,x2:S,y2:N});return F.createElement(yn,{className:kt("recharts-reference-line",l)},d8e(o,M),Dr.renderCallByParent(e,H6e({x1:_,y1:k,x2:S,y2:N})))}var gA=function(e){function t(){return J6e(this,t),t8e(this,t,arguments)}return a8e(t,e),e8e(t,[{key:"render",value:function(){return F.createElement(f8e,this.props)}}])}(F.Component);mA(gA,"displayName","ReferenceLine");mA(gA,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function UN(){return UN=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},UN.apply(this,arguments)}function xh(e){"@babel/helpers - typeof";return xh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xh(e)}function ZD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function e3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ZD(Object(n),!0).forEach(function(r){J0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ZD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function p8e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m8e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,tG(r.key),r)}}function g8e(e,t,n){return t&&m8e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function y8e(e,t,n){return t=Wx(t),v8e(e,eG()?Reflect.construct(t,n||[],Wx(e).constructor):t.apply(e,n))}function v8e(e,t){if(t&&(xh(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return b8e(e)}function b8e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function eG(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(eG=function(){return!!e})()}function Wx(e){return Wx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Wx(e)}function x8e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zN(e,t)}function zN(e,t){return zN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},zN(e,t)}function J0(e,t,n){return t=tG(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tG(e){var t=w8e(e,"string");return xh(t)=="symbol"?t:t+""}function w8e(e,t){if(xh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(xh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var _8e=function(t){var n=t.x,r=t.y,a=t.xAxis,i=t.yAxis,o=pA({x:a.scale,y:i.scale}),l=o.apply({x:n,y:r},{bandAware:!0});return _i(t,"discard")&&!o.isInRange(l)?null:l},Z0=function(e){function t(){return p8e(this,t),y8e(this,t,arguments)}return x8e(t,e),g8e(t,[{key:"render",value:function(){var r=this.props,a=r.x,i=r.y,o=r.r,l=r.alwaysShow,c=r.clipPathId,u=nr(a),h=nr(i);if(Wc(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!u||!h)return null;var d=_8e(this.props);if(!d)return null;var f=d.x,p=d.y,y=this.props,m=y.shape,v=y.className,b=_i(this.props,"hidden")?"url(#".concat(c,")"):void 0,x=e3(e3({clipPath:b},pt(this.props,!0)),{},{cx:f,cy:p});return F.createElement(yn,{className:kt("recharts-reference-dot",v)},t.renderDot(m,x),Dr.renderCallByParent(this.props,{x:f-o,y:p-o,width:2*o,height:2*o}))}}])}(F.Component);J0(Z0,"displayName","ReferenceDot");J0(Z0,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});J0(Z0,"renderDot",function(e,t){var n;return F.isValidElement(e)?n=F.cloneElement(e,t):it(e)?n=e(t):n=F.createElement(fA,UN({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),n});function HN(){return HN=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},HN.apply(this,arguments)}function wh(e){"@babel/helpers - typeof";return wh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wh(e)}function t3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function n3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?t3(Object(n),!0).forEach(function(r){e_(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function k8e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function j8e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,rG(r.key),r)}}function S8e(e,t,n){return t&&j8e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function N8e(e,t,n){return t=qx(t),C8e(e,nG()?Reflect.construct(t,n||[],qx(e).constructor):t.apply(e,n))}function C8e(e,t){if(t&&(wh(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return P8e(e)}function P8e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nG(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(nG=function(){return!!e})()}function qx(e){return qx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},qx(e)}function T8e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&VN(e,t)}function VN(e,t){return VN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},VN(e,t)}function e_(e,t,n){return t=rG(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rG(e){var t=A8e(e,"string");return wh(t)=="symbol"?t:t+""}function A8e(e,t){if(wh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(wh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var E8e=function(t,n,r,a,i){var o=i.x1,l=i.x2,c=i.y1,u=i.y2,h=i.xAxis,d=i.yAxis;if(!h||!d)return null;var f=pA({x:h.scale,y:d.scale}),p={x:t?f.x.apply(o,{position:"start"}):f.x.rangeMin,y:r?f.y.apply(c,{position:"start"}):f.y.rangeMin},y={x:n?f.x.apply(l,{position:"end"}):f.x.rangeMax,y:a?f.y.apply(u,{position:"end"}):f.y.rangeMax};return _i(i,"discard")&&(!f.isInRange(p)||!f.isInRange(y))?null:BV(p,y)},t_=function(e){function t(){return k8e(this,t),N8e(this,t,arguments)}return T8e(t,e),S8e(t,[{key:"render",value:function(){var r=this.props,a=r.x1,i=r.x2,o=r.y1,l=r.y2,c=r.className,u=r.alwaysShow,h=r.clipPathId;Wc(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var d=nr(a),f=nr(i),p=nr(o),y=nr(l),m=this.props.shape;if(!d&&!f&&!p&&!y&&!m)return null;var v=E8e(d,f,p,y,this.props);if(!v&&!m)return null;var b=_i(this.props,"hidden")?"url(#".concat(h,")"):void 0;return F.createElement(yn,{className:kt("recharts-reference-area",c)},t.renderRect(m,n3(n3({clipPath:b},pt(this.props,!0)),v)),Dr.renderCallByParent(this.props,v))}}])}(F.Component);e_(t_,"displayName","ReferenceArea");e_(t_,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});e_(t_,"renderRect",function(e,t){var n;return F.isValidElement(e)?n=F.cloneElement(e,t):it(e)?n=e(t):n=F.createElement(hA,HN({},t,{className:"recharts-reference-area-rect"})),n});function aG(e,t,n){if(t<1)return[];if(t===1&&n===void 0)return e;for(var r=[],a=0;a<e.length;a+=t)r.push(e[a]);return r}function O8e(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return G6e(r,n)}function R8e(e,t,n){var r=n==="width",a=e.x,i=e.y,o=e.width,l=e.height;return t===1?{start:r?a:i,end:r?a+o:i+l}:{start:r?a+o:i+l,end:r?a:i}}function Ux(e,t,n,r,a){if(e*t<e*r||e*t>e*a)return!1;var i=n();return e*(t-e*i/2-r)>=0&&e*(t+e*i/2-a)<=0}function I8e(e,t){return aG(e,t+1)}function M8e(e,t,n,r,a){for(var i=(r||[]).slice(),o=t.start,l=t.end,c=0,u=1,h=o,d=function(){var y=r==null?void 0:r[c];if(y===void 0)return{v:aG(r,u)};var m=c,v,b=function(){return v===void 0&&(v=n(y,m)),v},x=y.coordinate,w=c===0||Ux(e,x,b,h,l);w||(c=0,h=o,u+=1),w&&(h=x+e*(b()/2+a),c+=u)},f;u<=i.length;)if(f=d(),f)return f.v;return[]}function Jm(e){"@babel/helpers - typeof";return Jm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jm(e)}function r3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Ir(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?r3(Object(n),!0).forEach(function(r){D8e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function D8e(e,t,n){return t=$8e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $8e(e){var t=L8e(e,"string");return Jm(t)=="symbol"?t:t+""}function L8e(e,t){if(Jm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Jm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function F8e(e,t,n,r,a){for(var i=(r||[]).slice(),o=i.length,l=t.start,c=t.end,u=function(f){var p=i[f],y,m=function(){return y===void 0&&(y=n(p,f)),y};if(f===o-1){var v=e*(p.coordinate+e*m()/2-c);i[f]=p=Ir(Ir({},p),{},{tickCoord:v>0?p.coordinate-v*e:p.coordinate})}else i[f]=p=Ir(Ir({},p),{},{tickCoord:p.coordinate});var b=Ux(e,p.tickCoord,m,l,c);b&&(c=p.tickCoord-e*(m()/2+a),i[f]=Ir(Ir({},p),{},{isShow:!0}))},h=o-1;h>=0;h--)u(h);return i}function B8e(e,t,n,r,a,i){var o=(r||[]).slice(),l=o.length,c=t.start,u=t.end;if(i){var h=r[l-1],d=n(h,l-1),f=e*(h.coordinate+e*d/2-u);o[l-1]=h=Ir(Ir({},h),{},{tickCoord:f>0?h.coordinate-f*e:h.coordinate});var p=Ux(e,h.tickCoord,function(){return d},c,u);p&&(u=h.tickCoord-e*(d/2+a),o[l-1]=Ir(Ir({},h),{},{isShow:!0}))}for(var y=i?l-1:l,m=function(x){var w=o[x],_,k=function(){return _===void 0&&(_=n(w,x)),_};if(x===0){var j=e*(w.coordinate-e*k()/2-c);o[x]=w=Ir(Ir({},w),{},{tickCoord:j<0?w.coordinate-j*e:w.coordinate})}else o[x]=w=Ir(Ir({},w),{},{tickCoord:w.coordinate});var S=Ux(e,w.tickCoord,k,c,u);S&&(c=w.tickCoord+e*(k()/2+a),o[x]=Ir(Ir({},w),{},{isShow:!0}))},v=0;v<y;v++)m(v);return o}function W8e(e,t,n){var r=e.tick,a=e.ticks,i=e.viewBox,o=e.minTickGap,l=e.orientation,c=e.interval,u=e.tickFormatter,h=e.unit,d=e.angle;if(!a||!a.length||!r)return[];if(be(c)||fo.isSsr)return I8e(a,typeof c=="number"&&be(c)?c:0);var f=[],p=l==="top"||l==="bottom"?"width":"height",y=h&&p==="width"?xp(h,{fontSize:t,letterSpacing:n}):{width:0,height:0},m=function(w,_){var k=it(u)?u(w.value,_):w.value;return p==="width"?O8e(xp(k,{fontSize:t,letterSpacing:n}),y,d):xp(k,{fontSize:t,letterSpacing:n})[p]},v=a.length>=2?Os(a[1].coordinate-a[0].coordinate):1,b=R8e(i,v,p);return c==="equidistantPreserveStart"?M8e(v,b,m,a,o):(c==="preserveStart"||c==="preserveStartEnd"?f=B8e(v,b,m,a,o,c==="preserveStartEnd"):f=F8e(v,b,m,a,o),f.filter(function(x){return x.isShow}))}var q8e=["viewBox"],U8e=["viewBox"],z8e=["ticks"];function _h(e){"@babel/helpers - typeof";return _h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_h(e)}function ld(){return ld=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},ld.apply(this,arguments)}function a3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Yn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?a3(Object(n),!0).forEach(function(r){yA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ik(e,t){if(e==null)return{};var n=H8e(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function H8e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function V8e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s3(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,iG(r.key),r)}}function G8e(e,t,n){return t&&s3(e.prototype,t),n&&s3(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Y8e(e,t,n){return t=zx(t),K8e(e,sG()?Reflect.construct(t,n||[],zx(e).constructor):t.apply(e,n))}function K8e(e,t){if(t&&(_h(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return X8e(e)}function X8e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sG(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(sG=function(){return!!e})()}function zx(e){return zx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},zx(e)}function Q8e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&GN(e,t)}function GN(e,t){return GN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},GN(e,t)}function yA(e,t,n){return t=iG(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iG(e){var t=J8e(e,"string");return _h(t)=="symbol"?t:t+""}function J8e(e,t){if(_h(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(_h(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var n_=function(e){function t(n){var r;return V8e(this,t),r=Y8e(this,t,[n]),r.state={fontSize:"",letterSpacing:""},r}return Q8e(t,e),G8e(t,[{key:"shouldComponentUpdate",value:function(r,a){var i=r.viewBox,o=ik(r,q8e),l=this.props,c=l.viewBox,u=ik(l,U8e);return!Cd(i,c)||!Cd(o,u)||!Cd(a,this.state)}},{key:"componentDidMount",value:function(){var r=this.layerReference;if(r){var a=r.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];a&&this.setState({fontSize:window.getComputedStyle(a).fontSize,letterSpacing:window.getComputedStyle(a).letterSpacing})}}},{key:"getTickLineCoord",value:function(r){var a=this.props,i=a.x,o=a.y,l=a.width,c=a.height,u=a.orientation,h=a.tickSize,d=a.mirror,f=a.tickMargin,p,y,m,v,b,x,w=d?-1:1,_=r.tickSize||h,k=be(r.tickCoord)?r.tickCoord:r.coordinate;switch(u){case"top":p=y=r.coordinate,v=o+ +!d*c,m=v-w*_,x=m-w*f,b=k;break;case"left":m=v=r.coordinate,y=i+ +!d*l,p=y-w*_,b=p-w*f,x=k;break;case"right":m=v=r.coordinate,y=i+ +d*l,p=y+w*_,b=p+w*f,x=k;break;default:p=y=r.coordinate,v=o+ +d*c,m=v+w*_,x=m+w*f,b=k;break}return{line:{x1:p,y1:m,x2:y,y2:v},tick:{x:b,y:x}}}},{key:"getTickTextAnchor",value:function(){var r=this.props,a=r.orientation,i=r.mirror,o;switch(a){case"left":o=i?"start":"end";break;case"right":o=i?"end":"start";break;default:o="middle";break}return o}},{key:"getTickVerticalAnchor",value:function(){var r=this.props,a=r.orientation,i=r.mirror,o="end";switch(a){case"left":case"right":o="middle";break;case"top":o=i?"start":"end";break;default:o=i?"end":"start";break}return o}},{key:"renderAxisLine",value:function(){var r=this.props,a=r.x,i=r.y,o=r.width,l=r.height,c=r.orientation,u=r.mirror,h=r.axisLine,d=Yn(Yn(Yn({},pt(this.props,!1)),pt(h,!1)),{},{fill:"none"});if(c==="top"||c==="bottom"){var f=+(c==="top"&&!u||c==="bottom"&&u);d=Yn(Yn({},d),{},{x1:a,y1:i+f*l,x2:a+o,y2:i+f*l})}else{var p=+(c==="left"&&!u||c==="right"&&u);d=Yn(Yn({},d),{},{x1:a+p*o,y1:i,x2:a+p*o,y2:i+l})}return F.createElement("line",ld({},d,{className:kt("recharts-cartesian-axis-line",rs(h,"className"))}))}},{key:"renderTicks",value:function(r,a,i){var o=this,l=this.props,c=l.tickLine,u=l.stroke,h=l.tick,d=l.tickFormatter,f=l.unit,p=W8e(Yn(Yn({},this.props),{},{ticks:r}),a,i),y=this.getTickTextAnchor(),m=this.getTickVerticalAnchor(),v=pt(this.props,!1),b=pt(h,!1),x=Yn(Yn({},v),{},{fill:"none"},pt(c,!1)),w=p.map(function(_,k){var j=o.getTickLineCoord(_),S=j.line,N=j.tick,C=Yn(Yn(Yn(Yn({textAnchor:y,verticalAnchor:m},v),{},{stroke:"none",fill:u},b),N),{},{index:k,payload:_,visibleTicksCount:p.length,tickFormatter:d});return F.createElement(yn,ld({className:"recharts-cartesian-axis-tick",key:"tick-".concat(_.value,"-").concat(_.coordinate,"-").concat(_.tickCoord)},Jb(o.props,_,k)),c&&F.createElement("line",ld({},x,S,{className:kt("recharts-cartesian-axis-tick-line",rs(c,"className"))})),h&&t.renderTickItem(h,C,"".concat(it(d)?d(_.value,k):_.value).concat(f||"")))});return F.createElement("g",{className:"recharts-cartesian-axis-ticks"},w)}},{key:"render",value:function(){var r=this,a=this.props,i=a.axisLine,o=a.width,l=a.height,c=a.ticksGenerator,u=a.className,h=a.hide;if(h)return null;var d=this.props,f=d.ticks,p=ik(d,z8e),y=f;return it(c)&&(y=f&&f.length>0?c(this.props):c(p)),o<=0||l<=0||!y||!y.length?null:F.createElement(yn,{className:kt("recharts-cartesian-axis",u),ref:function(v){r.layerReference=v}},i&&this.renderAxisLine(),this.renderTicks(y,this.state.fontSize,this.state.letterSpacing),Dr.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,a,i){var o,l=kt(a.className,"recharts-cartesian-axis-tick-value");return F.isValidElement(r)?o=F.cloneElement(r,Yn(Yn({},a),{},{className:l})):it(r)?o=r(Yn(Yn({},a),{},{className:l})):o=F.createElement(hx,ld({},a,{className:"recharts-cartesian-axis-tick-value"}),i),o}}])}(g.Component);yA(n_,"displayName","CartesianAxis");yA(n_,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var Z8e=["layout","type","stroke","connectNulls","isRange","ref"],eBe=["key"],oG;function kh(e){"@babel/helpers - typeof";return kh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kh(e)}function lG(e,t){if(e==null)return{};var n=tBe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function tBe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Nc(){return Nc=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},Nc.apply(this,arguments)}function i3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Ho(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?i3(Object(n),!0).forEach(function(r){fi(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function nBe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o3(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,uG(r.key),r)}}function rBe(e,t,n){return t&&o3(e.prototype,t),n&&o3(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function aBe(e,t,n){return t=Hx(t),sBe(e,cG()?Reflect.construct(t,n||[],Hx(e).constructor):t.apply(e,n))}function sBe(e,t){if(t&&(kh(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return iBe(e)}function iBe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cG(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(cG=function(){return!!e})()}function Hx(e){return Hx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Hx(e)}function oBe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&YN(e,t)}function YN(e,t){return YN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},YN(e,t)}function fi(e,t,n){return t=uG(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uG(e){var t=lBe(e,"string");return kh(t)=="symbol"?t:t+""}function lBe(e,t){if(kh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(kh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ti=function(e){function t(){var n;nBe(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return n=aBe(this,t,[].concat(a)),fi(n,"state",{isAnimationFinished:!0}),fi(n,"id",Gg("recharts-area-")),fi(n,"handleAnimationEnd",function(){var o=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),it(o)&&o()}),fi(n,"handleAnimationStart",function(){var o=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),it(o)&&o()}),n}return oBe(t,e),rBe(t,[{key:"renderDots",value:function(r,a,i){var o=this.props.isAnimationActive,l=this.state.isAnimationFinished;if(o&&!l)return null;var c=this.props,u=c.dot,h=c.points,d=c.dataKey,f=pt(this.props,!1),p=pt(u,!0),y=h.map(function(v,b){var x=Ho(Ho(Ho({key:"dot-".concat(b),r:3},f),p),{},{index:b,cx:v.x,cy:v.y,dataKey:d,value:v.value,payload:v.payload,points:h});return t.renderDotItem(u,x)}),m={clipPath:r?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return F.createElement(yn,Nc({className:"recharts-area-dots"},m),y)}},{key:"renderHorizontalRect",value:function(r){var a=this.props,i=a.baseLine,o=a.points,l=a.strokeWidth,c=o[0].x,u=o[o.length-1].x,h=r*Math.abs(c-u),d=fl(o.map(function(f){return f.y||0}));return be(i)&&typeof i=="number"?d=Math.max(i,d):i&&Array.isArray(i)&&i.length&&(d=Math.max(fl(i.map(function(f){return f.y||0})),d)),be(d)?F.createElement("rect",{x:c<u?c:c-h,y:0,width:h,height:Math.floor(d+(l?parseInt("".concat(l),10):1))}):null}},{key:"renderVerticalRect",value:function(r){var a=this.props,i=a.baseLine,o=a.points,l=a.strokeWidth,c=o[0].y,u=o[o.length-1].y,h=r*Math.abs(c-u),d=fl(o.map(function(f){return f.x||0}));return be(i)&&typeof i=="number"?d=Math.max(i,d):i&&Array.isArray(i)&&i.length&&(d=Math.max(fl(i.map(function(f){return f.x||0})),d)),be(d)?F.createElement("rect",{x:0,y:c<u?c:c-h,width:d+(l?parseInt("".concat(l),10):1),height:Math.floor(h)}):null}},{key:"renderClipRect",value:function(r){var a=this.props.layout;return a==="vertical"?this.renderVerticalRect(r):this.renderHorizontalRect(r)}},{key:"renderAreaStatically",value:function(r,a,i,o){var l=this.props,c=l.layout,u=l.type,h=l.stroke,d=l.connectNulls,f=l.isRange;l.ref;var p=lG(l,Z8e);return F.createElement(yn,{clipPath:i?"url(#clipPath-".concat(o,")"):null},F.createElement(kp,Nc({},pt(p,!0),{points:r,connectNulls:d,type:u,baseLine:a,layout:c,stroke:"none",className:"recharts-area-area"})),h!=="none"&&F.createElement(kp,Nc({},pt(this.props,!1),{className:"recharts-area-curve",layout:c,type:u,connectNulls:d,fill:"none",points:r})),h!=="none"&&f&&F.createElement(kp,Nc({},pt(this.props,!1),{className:"recharts-area-curve",layout:c,type:u,connectNulls:d,fill:"none",points:a})))}},{key:"renderAreaWithAnimation",value:function(r,a){var i=this,o=this.props,l=o.points,c=o.baseLine,u=o.isAnimationActive,h=o.animationBegin,d=o.animationDuration,f=o.animationEasing,p=o.animationId,y=this.state,m=y.prevPoints,v=y.prevBaseLine;return F.createElement(To,{begin:h,duration:d,isActive:u,easing:f,from:{t:0},to:{t:1},key:"area-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(b){var x=b.t;if(m){var w=m.length/l.length,_=l.map(function(N,C){var M=Math.floor(C*w);if(m[M]){var O=m[M],D=Xa(O.x,N.x),$=Xa(O.y,N.y);return Ho(Ho({},N),{},{x:D(x),y:$(x)})}return N}),k;if(be(c)&&typeof c=="number"){var j=Xa(v,c);k=j(x)}else if(yt(c)||nf(c)){var S=Xa(v,0);k=S(x)}else k=c.map(function(N,C){var M=Math.floor(C*w);if(v[M]){var O=v[M],D=Xa(O.x,N.x),$=Xa(O.y,N.y);return Ho(Ho({},N),{},{x:D(x),y:$(x)})}return N});return i.renderAreaStatically(_,k,r,a)}return F.createElement(yn,null,F.createElement("defs",null,F.createElement("clipPath",{id:"animationClipPath-".concat(a)},i.renderClipRect(x))),F.createElement(yn,{clipPath:"url(#animationClipPath-".concat(a,")")},i.renderAreaStatically(l,c,r,a)))})}},{key:"renderArea",value:function(r,a){var i=this.props,o=i.points,l=i.baseLine,c=i.isAnimationActive,u=this.state,h=u.prevPoints,d=u.prevBaseLine,f=u.totalLength;return c&&o&&o.length&&(!h&&f>0||!Em(h,o)||!Em(d,l))?this.renderAreaWithAnimation(r,a):this.renderAreaStatically(o,l,r,a)}},{key:"render",value:function(){var r,a=this.props,i=a.hide,o=a.dot,l=a.points,c=a.className,u=a.top,h=a.left,d=a.xAxis,f=a.yAxis,p=a.width,y=a.height,m=a.isAnimationActive,v=a.id;if(i||!l||!l.length)return null;var b=this.state.isAnimationFinished,x=l.length===1,w=kt("recharts-area",c),_=d&&d.allowDataOverflow,k=f&&f.allowDataOverflow,j=_||k,S=yt(v)?this.id:v,N=(r=pt(o,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},C=N.r,M=C===void 0?3:C,O=N.strokeWidth,D=O===void 0?2:O,$=nje(o)?o:{},R=$.clipDot,I=R===void 0?!0:R,P=M*2+D;return F.createElement(yn,{className:w},_||k?F.createElement("defs",null,F.createElement("clipPath",{id:"clipPath-".concat(S)},F.createElement("rect",{x:_?h:h-p/2,y:k?u:u-y/2,width:_?p:p*2,height:k?y:y*2})),!I&&F.createElement("clipPath",{id:"clipPath-dots-".concat(S)},F.createElement("rect",{x:h-P/2,y:u-P/2,width:p+P,height:y+P}))):null,x?null:this.renderArea(j,S),(o||x)&&this.renderDots(j,I,S),(!m||b)&&Pl.renderCallByParent(this.props,l))}}],[{key:"getDerivedStateFromProps",value:function(r,a){return r.animationId!==a.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,curBaseLine:r.baseLine,prevPoints:a.curPoints,prevBaseLine:a.curBaseLine}:r.points!==a.curPoints||r.baseLine!==a.curBaseLine?{curPoints:r.points,curBaseLine:r.baseLine}:null}}])}(g.PureComponent);oG=Ti;fi(Ti,"displayName","Area");fi(Ti,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!fo.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});fi(Ti,"getBaseValue",function(e,t,n,r){var a=e.layout,i=e.baseValue,o=t.props.baseValue,l=o??i;if(be(l)&&typeof l=="number")return l;var c=a==="horizontal"?r:n,u=c.scale.domain();if(c.type==="number"){var h=Math.max(u[0],u[1]),d=Math.min(u[0],u[1]);return l==="dataMin"?d:l==="dataMax"||h<0?h:Math.max(Math.min(u[0],u[1]),0)}return l==="dataMin"?u[0]:l==="dataMax"?u[1]:u[0]});fi(Ti,"getComposedData",function(e){var t=e.props,n=e.item,r=e.xAxis,a=e.yAxis,i=e.xAxisTicks,o=e.yAxisTicks,l=e.bandSize,c=e.dataKey,u=e.stackedData,h=e.dataStartIndex,d=e.displayedData,f=e.offset,p=t.layout,y=u&&u.length,m=oG.getBaseValue(t,n,r,a),v=p==="horizontal",b=!1,x=d.map(function(_,k){var j;y?j=u[h+k]:(j=Da(_,c),Array.isArray(j)?b=!0:j=[m,j]);var S=j[1]==null||y&&Da(_,c)==null;return v?{x:z5({axis:r,ticks:i,bandSize:l,entry:_,index:k}),y:S?null:a.scale(j[1]),value:j,payload:_}:{x:S?null:r.scale(j[1]),y:z5({axis:a,ticks:o,bandSize:l,entry:_,index:k}),value:j,payload:_}}),w;return y||b?w=x.map(function(_){var k=Array.isArray(_.value)?_.value[0]:null;return v?{x:_.x,y:k!=null&&_.y!=null?a.scale(k):null}:{x:k!=null?r.scale(k):null,y:_.y}}):w=v?a.scale(m):r.scale(m),Ho({points:x,baseLine:w,layout:p,isRange:b},f)});fi(Ti,"renderDotItem",function(e,t){var n;if(F.isValidElement(e))n=F.cloneElement(e,t);else if(it(e))n=e(t);else{var r=kt("recharts-area-dot",typeof e!="boolean"?e.className:""),a=t.key,i=lG(t,eBe);n=F.createElement(fA,Nc({},i,{key:a,className:r}))}return n});function jh(e){"@babel/helpers - typeof";return jh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jh(e)}function cBe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uBe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,fG(r.key),r)}}function dBe(e,t,n){return t&&uBe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function hBe(e,t,n){return t=Vx(t),fBe(e,dG()?Reflect.construct(t,n||[],Vx(e).constructor):t.apply(e,n))}function fBe(e,t){if(t&&(jh(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return pBe(e)}function pBe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function dG(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(dG=function(){return!!e})()}function Vx(e){return Vx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Vx(e)}function mBe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&KN(e,t)}function KN(e,t){return KN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},KN(e,t)}function hG(e,t,n){return t=fG(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fG(e){var t=gBe(e,"string");return jh(t)=="symbol"?t:t+""}function gBe(e,t){if(jh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(jh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function XN(){return XN=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},XN.apply(this,arguments)}function yBe(e){var t=e.xAxisId,n=XV(),r=QV(),a=YV(t);return a==null?null:g.createElement(n_,XN({},a,{className:kt("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(o){return Sc(o,!0)}}))}var r_=function(e){function t(){return cBe(this,t),hBe(this,t,arguments)}return mBe(t,e),dBe(t,[{key:"render",value:function(){return g.createElement(yBe,this.props)}}])}(g.Component);hG(r_,"displayName","XAxis");hG(r_,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function Sh(e){"@babel/helpers - typeof";return Sh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sh(e)}function vBe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bBe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,gG(r.key),r)}}function xBe(e,t,n){return t&&bBe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function wBe(e,t,n){return t=Gx(t),_Be(e,pG()?Reflect.construct(t,n||[],Gx(e).constructor):t.apply(e,n))}function _Be(e,t){if(t&&(Sh(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return kBe(e)}function kBe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pG(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(pG=function(){return!!e})()}function Gx(e){return Gx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Gx(e)}function jBe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&QN(e,t)}function QN(e,t){return QN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},QN(e,t)}function mG(e,t,n){return t=gG(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gG(e){var t=SBe(e,"string");return Sh(t)=="symbol"?t:t+""}function SBe(e,t){if(Sh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Sh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function JN(){return JN=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},JN.apply(this,arguments)}var NBe=function(t){var n=t.yAxisId,r=XV(),a=QV(),i=KV(n);return i==null?null:g.createElement(n_,JN({},i,{className:kt("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:r,height:a},ticksGenerator:function(l){return Sc(l,!0)}}))},a_=function(e){function t(){return vBe(this,t),wBe(this,t,arguments)}return jBe(t,e),xBe(t,[{key:"render",value:function(){return g.createElement(NBe,this.props)}}])}(g.Component);mG(a_,"displayName","YAxis");mG(a_,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});function l3(e){return ABe(e)||TBe(e)||PBe(e)||CBe()}function CBe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
4246In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function PBe(e,t){if(e){if(typeof e=="string")return ZN(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ZN(e,t)}}function TBe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ABe(e){if(Array.isArray(e))return ZN(e)}function ZN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var eC=function(t,n,r,a,i){var o=Ls(t,gA),l=Ls(t,Z0),c=[].concat(l3(o),l3(l)),u=Ls(t,t_),h="".concat(a,"Id"),d=a[0],f=n;if(c.length&&(f=c.reduce(function(m,v){if(v.props[h]===r&&_i(v.props,"extendDomain")&&be(v.props[d])){var b=v.props[d];return[Math.min(m[0],b),Math.max(m[1],b)]}return m},f)),u.length){var p="".concat(d,"1"),y="".concat(d,"2");f=u.reduce(function(m,v){if(v.props[h]===r&&_i(v.props,"extendDomain")&&be(v.props[p])&&be(v.props[y])){var b=v.props[p],x=v.props[y];return[Math.min(m[0],b,x),Math.max(m[1],b,x)]}return m},f)}return i&&i.length&&(f=i.reduce(function(m,v){return be(v)?[Math.min(m[0],v),Math.max(m[1],v)]:m},f)),f},yG={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function a(c,u,h){this.fn=c,this.context=u,this.once=h||!1}function i(c,u,h,d,f){if(typeof h!="function")throw new TypeError("The listener must be a function");var p=new a(h,d||c,f),y=n?n+u:u;return c._events[y]?c._events[y].fn?c._events[y]=[c._events[y],p]:c._events[y].push(p):(c._events[y]=p,c._eventsCount++),c}function o(c,u){--c._eventsCount===0?c._events=new r:delete c._events[u]}function l(){this._events=new r,this._eventsCount=0}l.prototype.eventNames=function(){var u=[],h,d;if(this._eventsCount===0)return u;for(d in h=this._events)t.call(h,d)&&u.push(n?d.slice(1):d);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(h)):u},l.prototype.listeners=function(u){var h=n?n+u:u,d=this._events[h];if(!d)return[];if(d.fn)return[d.fn];for(var f=0,p=d.length,y=new Array(p);f<p;f++)y[f]=d[f].fn;return y},l.prototype.listenerCount=function(u){var h=n?n+u:u,d=this._events[h];return d?d.fn?1:d.length:0},l.prototype.emit=function(u,h,d,f,p,y){var m=n?n+u:u;if(!this._events[m])return!1;var v=this._events[m],b=arguments.length,x,w;if(v.fn){switch(v.once&&this.removeListener(u,v.fn,void 0,!0),b){case 1:return v.fn.call(v.context),!0;case 2:return v.fn.call(v.context,h),!0;case 3:return v.fn.call(v.context,h,d),!0;case 4:return v.fn.call(v.context,h,d,f),!0;case 5:return v.fn.call(v.context,h,d,f,p),!0;case 6:return v.fn.call(v.context,h,d,f,p,y),!0}for(w=1,x=new Array(b-1);w<b;w++)x[w-1]=arguments[w];v.fn.apply(v.context,x)}else{var _=v.length,k;for(w=0;w<_;w++)switch(v[w].once&&this.removeListener(u,v[w].fn,void 0,!0),b){case 1:v[w].fn.call(v[w].context);break;case 2:v[w].fn.call(v[w].context,h);break;case 3:v[w].fn.call(v[w].context,h,d);break;case 4:v[w].fn.call(v[w].context,h,d,f);break;default:if(!x)for(k=1,x=new Array(b-1);k<b;k++)x[k-1]=arguments[k];v[w].fn.apply(v[w].context,x)}}return!0},l.prototype.on=function(u,h,d){return i(this,u,h,d,!1)},l.prototype.once=function(u,h,d){return i(this,u,h,d,!0)},l.prototype.removeListener=function(u,h,d,f){var p=n?n+u:u;if(!this._events[p])return this;if(!h)return o(this,p),this;var y=this._events[p];if(y.fn)y.fn===h&&(!f||y.once)&&(!d||y.context===d)&&o(this,p);else{for(var m=0,v=[],b=y.length;m<b;m++)(y[m].fn!==h||f&&!y[m].once||d&&y[m].context!==d)&&v.push(y[m]);v.length?this._events[p]=v.length===1?v[0]:v:o(this,p)}return this},l.prototype.removeAllListeners=function(u){var h;return u?(h=n?n+u:u,this._events[h]&&o(this,h)):(this._events=new r,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=n,l.EventEmitter=l,e.exports=l})(yG);var EBe=yG.exports;const OBe=Vt(EBe);var ok=new OBe,lk="recharts.syncMouseEvents";function Zm(e){"@babel/helpers - typeof";return Zm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zm(e)}function RBe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function IBe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,vG(r.key),r)}}function MBe(e,t,n){return t&&IBe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ck(e,t,n){return t=vG(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vG(e){var t=DBe(e,"string");return Zm(t)=="symbol"?t:t+""}function DBe(e,t){if(Zm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Zm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var $Be=function(){function e(){RBe(this,e),ck(this,"activeIndex",0),ck(this,"coordinateList",[]),ck(this,"layout","horizontal")}return MBe(e,[{key:"setDetails",value:function(n){var r,a=n.coordinateList,i=a===void 0?null:a,o=n.container,l=o===void 0?null:o,c=n.layout,u=c===void 0?null:c,h=n.offset,d=h===void 0?null:h,f=n.mouseHandlerCallback,p=f===void 0?null:f;this.coordinateList=(r=i??this.coordinateList)!==null&&r!==void 0?r:[],this.container=l??this.container,this.layout=u??this.layout,this.offset=d??this.offset,this.mouseHandlerCallback=p??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(n){if(this.coordinateList.length!==0)switch(n.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(n){this.activeIndex=n}},{key:"spoofMouse",value:function(){var n,r;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var a=this.container.getBoundingClientRect(),i=a.x,o=a.y,l=a.height,c=this.coordinateList[this.activeIndex].coordinate,u=((n=window)===null||n===void 0?void 0:n.scrollX)||0,h=((r=window)===null||r===void 0?void 0:r.scrollY)||0,d=i+c+u,f=o+this.offset.top+l/2+h;this.mouseHandlerCallback({pageX:d,pageY:f})}}}])}();function LBe(e,t,n){if(n==="number"&&t===!0&&Array.isArray(e)){var r=e==null?void 0:e[0],a=e==null?void 0:e[1];if(r&&a&&be(r)&&be(a))return!0}return!1}function FBe(e,t,n,r){var a=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-a:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-a,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function bG(e){var t=e.cx,n=e.cy,r=e.radius,a=e.startAngle,i=e.endAngle,o=kr(t,n,r,a),l=kr(t,n,r,i);return{points:[o,l],cx:t,cy:n,radius:r,startAngle:a,endAngle:i}}function BBe(e,t,n){var r,a,i,o;if(e==="horizontal")r=t.x,i=r,a=n.top,o=n.top+n.height;else if(e==="vertical")a=t.y,o=a,r=n.left,i=n.left+n.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var l=t.cx,c=t.cy,u=t.innerRadius,h=t.outerRadius,d=t.angle,f=kr(l,c,u,d),p=kr(l,c,h,d);r=f.x,a=f.y,i=p.x,o=p.y}else return bG(t);return[{x:r,y:a},{x:i,y:o}]}function eg(e){"@babel/helpers - typeof";return eg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},eg(e)}function c3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function sv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?c3(Object(n),!0).forEach(function(r){WBe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function WBe(e,t,n){return t=qBe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qBe(e){var t=UBe(e,"string");return eg(t)=="symbol"?t:t+""}function UBe(e,t){if(eg(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(eg(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function zBe(e){var t,n,r=e.element,a=e.tooltipEventType,i=e.isActive,o=e.activeCoordinate,l=e.activePayload,c=e.offset,u=e.activeTooltipIndex,h=e.tooltipAxisBandSize,d=e.layout,f=e.chartName,p=(t=r.props.cursor)!==null&&t!==void 0?t:(n=r.type.defaultProps)===null||n===void 0?void 0:n.cursor;if(!r||!p||!i||!o||f!=="ScatterChart"&&a!=="axis")return null;var y,m=kp;if(f==="ScatterChart")y=o,m=jLe;else if(f==="BarChart")y=FBe(d,o,c,h),m=hA;else if(d==="radial"){var v=bG(o),b=v.cx,x=v.cy,w=v.radius,_=v.startAngle,k=v.endAngle;y={cx:b,cy:x,startAngle:_,endAngle:k,innerRadius:w,outerRadius:w},m=wV}else y={points:BBe(d,o,c)},m=kp;var j=sv(sv(sv(sv({stroke:"#ccc",pointerEvents:"none"},c),y),pt(p,!1)),{},{payload:l,payloadIndex:u,className:kt("recharts-tooltip-cursor",p.className)});return g.isValidElement(p)?g.cloneElement(p,j):g.createElement(m,j)}var HBe=["item"],VBe=["children","className","width","height","style","compact","title","desc"];function Nh(e){"@babel/helpers - typeof";return Nh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nh(e)}function cd(){return cd=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},cd.apply(this,arguments)}function u3(e,t){return KBe(e)||YBe(e,t)||wG(e,t)||GBe()}function GBe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
4247In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function YBe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,o,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(h){u=!0,a=h}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}function KBe(e){if(Array.isArray(e))return e}function d3(e,t){if(e==null)return{};var n=XBe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function XBe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function QBe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function JBe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_G(r.key),r)}}function ZBe(e,t,n){return t&&JBe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function eWe(e,t,n){return t=Yx(t),tWe(e,xG()?Reflect.construct(t,n||[],Yx(e).constructor):t.apply(e,n))}function tWe(e,t){if(t&&(Nh(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return nWe(e)}function nWe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xG(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(xG=function(){return!!e})()}function Yx(e){return Yx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Yx(e)}function rWe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&tC(e,t)}function tC(e,t){return tC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},tC(e,t)}function Ch(e){return iWe(e)||sWe(e)||wG(e)||aWe()}function aWe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
4248In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wG(e,t){if(e){if(typeof e=="string")return nC(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nC(e,t)}}function sWe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function iWe(e){if(Array.isArray(e))return nC(e)}function nC(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function h3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function se(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?h3(Object(n),!0).forEach(function(r){Ue(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ue(e,t,n){return t=_G(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _G(e){var t=oWe(e,"string");return Nh(t)=="symbol"?t:t+""}function oWe(e,t){if(Nh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Nh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var lWe={xAxis:["bottom","top"],yAxis:["left","right"]},cWe={width:"100%",height:"100%"},kG={x:0,y:0};function iv(e){return e}var uWe=function(t,n){return n==="horizontal"?t.x:n==="vertical"?t.y:n==="centric"?t.angle:t.radius},dWe=function(t,n,r,a){var i=n.find(function(h){return h&&h.index===r});if(i){if(t==="horizontal")return{x:i.coordinate,y:a.y};if(t==="vertical")return{x:a.x,y:i.coordinate};if(t==="centric"){var o=i.coordinate,l=a.radius;return se(se(se({},a),kr(a.cx,a.cy,l,o)),{},{angle:o,radius:l})}var c=i.coordinate,u=a.angle;return se(se(se({},a),kr(a.cx,a.cy,c,u)),{},{angle:u,radius:c})}return kG},s_=function(t,n){var r=n.graphicalItems,a=n.dataStartIndex,i=n.dataEndIndex,o=(r??[]).reduce(function(l,c){var u=c.props.data;return u&&u.length?[].concat(Ch(l),Ch(u)):l},[]);return o.length>0?o:t&&t.length&&be(a)&&be(i)?t.slice(a,i+1):[]};function jG(e){return e==="number"?[0,"auto"]:void 0}var rC=function(t,n,r,a){var i=t.graphicalItems,o=t.tooltipAxis,l=s_(n,t);return r<0||!i||!i.length||r>=l.length?null:i.reduce(function(c,u){var h,d=(h=u.props.data)!==null&&h!==void 0?h:n;d&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(d=d.slice(t.dataStartIndex,t.dataEndIndex+1));var f;if(o.dataKey&&!o.allowDuplicatedCategory){var p=d===void 0?l:d;f=Xb(p,o.dataKey,a)}else f=d&&d[r]||l[r];return f?[].concat(Ch(c),[vV(u,f)]):c},[])},f3=function(t,n,r,a){var i=a||{x:t.chartX,y:t.chartY},o=uWe(i,r),l=t.orderedTooltipTicks,c=t.tooltipAxis,u=t.tooltipTicks,h=iDe(o,l,u,c);if(h>=0&&u){var d=u[h]&&u[h].value,f=rC(t,n,h,d),p=dWe(r,l,h,i);return{activeTooltipIndex:h,activeLabel:d,activePayload:f,activeCoordinate:p}}return null},hWe=function(t,n){var r=n.axes,a=n.graphicalItems,i=n.axisType,o=n.axisIdKey,l=n.stackGroups,c=n.dataStartIndex,u=n.dataEndIndex,h=t.layout,d=t.children,f=t.stackOffset,p=gV(h,i);return r.reduce(function(y,m){var v,b=m.type.defaultProps!==void 0?se(se({},m.type.defaultProps),m.props):m.props,x=b.type,w=b.dataKey,_=b.allowDataOverflow,k=b.allowDuplicatedCategory,j=b.scale,S=b.ticks,N=b.includeHidden,C=b[o];if(y[C])return y;var M=s_(t.data,{graphicalItems:a.filter(function(H){var G,Z=o in H.props?H.props[o]:(G=H.type.defaultProps)===null||G===void 0?void 0:G[o];return Z===C}),dataStartIndex:c,dataEndIndex:u}),O=M.length,D,$,R;LBe(b.domain,_,x)&&(D=_N(b.domain,null,_),p&&(x==="number"||j!=="auto")&&(R=_p(M,w,"category")));var I=jG(x);if(!D||D.length===0){var P,A=(P=b.domain)!==null&&P!==void 0?P:I;if(w){if(D=_p(M,w,x),x==="category"&&p){var E=Vke(D);k&&E?($=D,D=Mx(0,O)):k||(D=Y5(A,D,m).reduce(function(H,G){return H.indexOf(G)>=0?H:[].concat(Ch(H),[G])},[]))}else if(x==="category")k?D=D.filter(function(H){return H!==""&&!yt(H)}):D=Y5(A,D,m).reduce(function(H,G){return H.indexOf(G)>=0||G===""||yt(G)?H:[].concat(Ch(H),[G])},[]);else if(x==="number"){var T=dDe(M,a.filter(function(H){var G,Z,le=o in H.props?H.props[o]:(G=H.type.defaultProps)===null||G===void 0?void 0:G[o],ue="hide"in H.props?H.props.hide:(Z=H.type.defaultProps)===null||Z===void 0?void 0:Z.hide;return le===C&&(N||!ue)}),w,i,h);T&&(D=T)}p&&(x==="number"||j!=="auto")&&(R=_p(M,w,"category"))}else p?D=Mx(0,O):l&&l[C]&&l[C].hasStack&&x==="number"?D=f==="expand"?[0,1]:yV(l[C].stackGroups,c,u):D=mV(M,a.filter(function(H){var G=o in H.props?H.props[o]:H.type.defaultProps[o],Z="hide"in H.props?H.props.hide:H.type.defaultProps.hide;return G===C&&(N||!Z)}),x,h,!0);if(x==="number")D=eC(d,D,C,i,S),A&&(D=_N(A,D,_));else if(x==="category"&&A){var L=A,B=D.every(function(H){return L.indexOf(H)>=0});B&&(D=L)}}return se(se({},y),{},Ue({},C,se(se({},b),{},{axisType:i,domain:D,categoricalDomain:R,duplicateDomain:$,originalDomain:(v=b.domain)!==null&&v!==void 0?v:I,isCategorical:p,layout:h})))},{})},fWe=function(t,n){var r=n.graphicalItems,a=n.Axis,i=n.axisType,o=n.axisIdKey,l=n.stackGroups,c=n.dataStartIndex,u=n.dataEndIndex,h=t.layout,d=t.children,f=s_(t.data,{graphicalItems:r,dataStartIndex:c,dataEndIndex:u}),p=f.length,y=gV(h,i),m=-1;return r.reduce(function(v,b){var x=b.type.defaultProps!==void 0?se(se({},b.type.defaultProps),b.props):b.props,w=x[o],_=jG("number");if(!v[w]){m++;var k;return y?k=Mx(0,p):l&&l[w]&&l[w].hasStack?(k=yV(l[w].stackGroups,c,u),k=eC(d,k,w,i)):(k=_N(_,mV(f,r.filter(function(j){var S,N,C=o in j.props?j.props[o]:(S=j.type.defaultProps)===null||S===void 0?void 0:S[o],M="hide"in j.props?j.props.hide:(N=j.type.defaultProps)===null||N===void 0?void 0:N.hide;return C===w&&!M}),"number",h),a.defaultProps.allowDataOverflow),k=eC(d,k,w,i)),se(se({},v),{},Ue({},w,se(se({axisType:i},a.defaultProps),{},{hide:!0,orientation:rs(lWe,"".concat(i,".").concat(m%2),null),domain:k,originalDomain:_,isCategorical:y,layout:h})))}return v},{})},pWe=function(t,n){var r=n.axisType,a=r===void 0?"xAxis":r,i=n.AxisComp,o=n.graphicalItems,l=n.stackGroups,c=n.dataStartIndex,u=n.dataEndIndex,h=t.children,d="".concat(a,"Id"),f=Ls(h,i),p={};return f&&f.length?p=hWe(t,{axes:f,graphicalItems:o,axisType:a,axisIdKey:d,stackGroups:l,dataStartIndex:c,dataEndIndex:u}):o&&o.length&&(p=fWe(t,{Axis:i,graphicalItems:o,axisType:a,axisIdKey:d,stackGroups:l,dataStartIndex:c,dataEndIndex:u})),p},mWe=function(t){var n=Wu(t),r=Sc(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:FT(r,function(a){return a.coordinate}),tooltipAxis:n,tooltipAxisBandSize:Nx(n,r)}},p3=function(t){var n=t.children,r=t.defaultShowTooltip,a=Sa(n,yh),i=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),a&&a.props&&(a.props.startIndex>=0&&(i=a.props.startIndex),a.props.endIndex>=0&&(o=a.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!r}},gWe=function(t){return!t||!t.length?!1:t.some(function(n){var r=ho(n&&n.type);return r&&r.indexOf("Bar")>=0})},m3=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},yWe=function(t,n){var r=t.props,a=t.graphicalItems,i=t.xAxisMap,o=i===void 0?{}:i,l=t.yAxisMap,c=l===void 0?{}:l,u=r.width,h=r.height,d=r.children,f=r.margin||{},p=Sa(d,yh),y=Sa(d,Pd),m=Object.keys(c).reduce(function(k,j){var S=c[j],N=S.orientation;return!S.mirror&&!S.hide?se(se({},k),{},Ue({},N,k[N]+S.width)):k},{left:f.left||0,right:f.right||0}),v=Object.keys(o).reduce(function(k,j){var S=o[j],N=S.orientation;return!S.mirror&&!S.hide?se(se({},k),{},Ue({},N,rs(k,"".concat(N))+S.height)):k},{top:f.top||0,bottom:f.bottom||0}),b=se(se({},v),m),x=b.bottom;p&&(b.bottom+=p.props.height||yh.defaultProps.height),y&&n&&(b=cDe(b,a,r,n));var w=u-b.left-b.right,_=h-b.top-b.bottom;return se(se({brushBottom:x},b),{},{width:Math.max(w,0),height:Math.max(_,0)})},vWe=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},bWe=function(t){var n=t.chartName,r=t.GraphicalChild,a=t.defaultTooltipEventType,i=a===void 0?"axis":a,o=t.validateTooltipEventTypes,l=o===void 0?["axis"]:o,c=t.axisComponents,u=t.legendContent,h=t.formatAxisMap,d=t.defaultProps,f=function(b,x){var w=x.graphicalItems,_=x.stackGroups,k=x.offset,j=x.updateId,S=x.dataStartIndex,N=x.dataEndIndex,C=b.barSize,M=b.layout,O=b.barGap,D=b.barCategoryGap,$=b.maxBarSize,R=m3(M),I=R.numericAxisName,P=R.cateAxisName,A=gWe(w),E=[];return w.forEach(function(T,L){var B=s_(b.data,{graphicalItems:[T],dataStartIndex:S,dataEndIndex:N}),H=T.type.defaultProps!==void 0?se(se({},T.type.defaultProps),T.props):T.props,G=H.dataKey,Z=H.maxBarSize,le=H["".concat(I,"Id")],ue=H["".concat(P,"Id")],re={},q=c.reduce(function(te,ne){var ye=x["".concat(ne.axisType,"Map")],Ge=H["".concat(ne.axisType,"Id")];ye&&ye[Ge]||ne.axisType==="zAxis"||du();var st=ye[Ge];return se(se({},te),{},Ue(Ue({},ne.axisType,st),"".concat(ne.axisType,"Ticks"),Sc(st)))},re),U=q[P],Q=q["".concat(P,"Ticks")],J=_&&_[le]&&_[le].hasStack&&kDe(T,_[le].stackGroups),Y=ho(T.type).indexOf("Bar")>=0,oe=Nx(U,Q),ve=[],De=A&&oDe({barSize:C,stackGroups:_,totalSize:vWe(q,P)});if(Y){var Le,He,vt=yt(Z)?$:Z,lt=(Le=(He=Nx(U,Q,!0))!==null&&He!==void 0?He:vt)!==null&&Le!==void 0?Le:0;ve=lDe({barGap:O,barCategoryGap:D,bandSize:lt!==oe?lt:oe,sizeList:De[ue],maxBarSize:vt}),lt!==oe&&(ve=ve.map(function(te){return se(se({},te),{},{position:se(se({},te.position),{},{offset:te.position.offset-lt/2})})}))}var Pt=T&&T.type&&T.type.getComposedData;Pt&&E.push({props:se(se({},Pt(se(se({},q),{},{displayedData:B,props:b,dataKey:G,item:T,bandSize:oe,barPosition:ve,offset:k,stackedData:J,layout:M,dataStartIndex:S,dataEndIndex:N}))),{},Ue(Ue(Ue({key:T.key||"item-".concat(L)},I,q[I]),P,q[P]),"animationId",j)),childIndex:sje(T,b.children),item:T})}),E},p=function(b,x){var w=b.props,_=b.dataStartIndex,k=b.dataEndIndex,j=b.updateId;if(!WM({props:w}))return null;var S=w.children,N=w.layout,C=w.stackOffset,M=w.data,O=w.reverseStackOrder,D=m3(N),$=D.numericAxisName,R=D.cateAxisName,I=Ls(S,r),P=xDe(M,I,"".concat($,"Id"),"".concat(R,"Id"),C,O),A=c.reduce(function(H,G){var Z="".concat(G.axisType,"Map");return se(se({},H),{},Ue({},Z,pWe(w,se(se({},G),{},{graphicalItems:I,stackGroups:G.axisType===$&&P,dataStartIndex:_,dataEndIndex:k}))))},{}),E=yWe(se(se({},A),{},{props:w,graphicalItems:I}),x==null?void 0:x.legendBBox);Object.keys(A).forEach(function(H){A[H]=h(w,A[H],E,H.replace("Map",""),n)});var T=A["".concat(R,"Map")],L=mWe(T),B=f(w,se(se({},A),{},{dataStartIndex:_,dataEndIndex:k,updateId:j,graphicalItems:I,stackGroups:P,offset:E}));return se(se({formattedGraphicalItems:B,graphicalItems:I,offset:E,stackGroups:P},L),A)},y=function(v){function b(x){var w,_,k;return QBe(this,b),k=eWe(this,b,[x]),Ue(k,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Ue(k,"accessibilityManager",new $Be),Ue(k,"handleLegendBBoxUpdate",function(j){if(j){var S=k.state,N=S.dataStartIndex,C=S.dataEndIndex,M=S.updateId;k.setState(se({legendBBox:j},p({props:k.props,dataStartIndex:N,dataEndIndex:C,updateId:M},se(se({},k.state),{},{legendBBox:j}))))}}),Ue(k,"handleReceiveSyncEvent",function(j,S,N){if(k.props.syncId===j){if(N===k.eventEmitterSymbol&&typeof k.props.syncMethod!="function")return;k.applySyncEvent(S)}}),Ue(k,"handleBrushChange",function(j){var S=j.startIndex,N=j.endIndex;if(S!==k.state.dataStartIndex||N!==k.state.dataEndIndex){var C=k.state.updateId;k.setState(function(){return se({dataStartIndex:S,dataEndIndex:N},p({props:k.props,dataStartIndex:S,dataEndIndex:N,updateId:C},k.state))}),k.triggerSyncEvent({dataStartIndex:S,dataEndIndex:N})}}),Ue(k,"handleMouseEnter",function(j){var S=k.getMouseInfo(j);if(S){var N=se(se({},S),{},{isTooltipActive:!0});k.setState(N),k.triggerSyncEvent(N);var C=k.props.onMouseEnter;it(C)&&C(N,j)}}),Ue(k,"triggeredAfterMouseMove",function(j){var S=k.getMouseInfo(j),N=S?se(se({},S),{},{isTooltipActive:!0}):{isTooltipActive:!1};k.setState(N),k.triggerSyncEvent(N);var C=k.props.onMouseMove;it(C)&&C(N,j)}),Ue(k,"handleItemMouseEnter",function(j){k.setState(function(){return{isTooltipActive:!0,activeItem:j,activePayload:j.tooltipPayload,activeCoordinate:j.tooltipPosition||{x:j.cx,y:j.cy}}})}),Ue(k,"handleItemMouseLeave",function(){k.setState(function(){return{isTooltipActive:!1}})}),Ue(k,"handleMouseMove",function(j){j.persist(),k.throttleTriggeredAfterMouseMove(j)}),Ue(k,"handleMouseLeave",function(j){k.throttleTriggeredAfterMouseMove.cancel();var S={isTooltipActive:!1};k.setState(S),k.triggerSyncEvent(S);var N=k.props.onMouseLeave;it(N)&&N(S,j)}),Ue(k,"handleOuterEvent",function(j){var S=aje(j),N=rs(k.props,"".concat(S));if(S&&it(N)){var C,M;/.*touch.*/i.test(S)?M=k.getMouseInfo(j.changedTouches[0]):M=k.getMouseInfo(j),N((C=M)!==null&&C!==void 0?C:{},j)}}),Ue(k,"handleClick",function(j){var S=k.getMouseInfo(j);if(S){var N=se(se({},S),{},{isTooltipActive:!0});k.setState(N),k.triggerSyncEvent(N);var C=k.props.onClick;it(C)&&C(N,j)}}),Ue(k,"handleMouseDown",function(j){var S=k.props.onMouseDown;if(it(S)){var N=k.getMouseInfo(j);S(N,j)}}),Ue(k,"handleMouseUp",function(j){var S=k.props.onMouseUp;if(it(S)){var N=k.getMouseInfo(j);S(N,j)}}),Ue(k,"handleTouchMove",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&k.throttleTriggeredAfterMouseMove(j.changedTouches[0])}),Ue(k,"handleTouchStart",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&k.handleMouseDown(j.changedTouches[0])}),Ue(k,"handleTouchEnd",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&k.handleMouseUp(j.changedTouches[0])}),Ue(k,"handleDoubleClick",function(j){var S=k.props.onDoubleClick;if(it(S)){var N=k.getMouseInfo(j);S(N,j)}}),Ue(k,"handleContextMenu",function(j){var S=k.props.onContextMenu;if(it(S)){var N=k.getMouseInfo(j);S(N,j)}}),Ue(k,"triggerSyncEvent",function(j){k.props.syncId!==void 0&&ok.emit(lk,k.props.syncId,j,k.eventEmitterSymbol)}),Ue(k,"applySyncEvent",function(j){var S=k.props,N=S.layout,C=S.syncMethod,M=k.state.updateId,O=j.dataStartIndex,D=j.dataEndIndex;if(j.dataStartIndex!==void 0||j.dataEndIndex!==void 0)k.setState(se({dataStartIndex:O,dataEndIndex:D},p({props:k.props,dataStartIndex:O,dataEndIndex:D,updateId:M},k.state)));else if(j.activeTooltipIndex!==void 0){var $=j.chartX,R=j.chartY,I=j.activeTooltipIndex,P=k.state,A=P.offset,E=P.tooltipTicks;if(!A)return;if(typeof C=="function")I=C(E,j);else if(C==="value"){I=-1;for(var T=0;T<E.length;T++)if(E[T].value===j.activeLabel){I=T;break}}var L=se(se({},A),{},{x:A.left,y:A.top}),B=Math.min($,L.x+L.width),H=Math.min(R,L.y+L.height),G=E[I]&&E[I].value,Z=rC(k.state,k.props.data,I),le=E[I]?{x:N==="horizontal"?E[I].coordinate:B,y:N==="horizontal"?H:E[I].coordinate}:kG;k.setState(se(se({},j),{},{activeLabel:G,activeCoordinate:le,activePayload:Z,activeTooltipIndex:I}))}else k.setState(j)}),Ue(k,"renderCursor",function(j){var S,N=k.state,C=N.isTooltipActive,M=N.activeCoordinate,O=N.activePayload,D=N.offset,$=N.activeTooltipIndex,R=N.tooltipAxisBandSize,I=k.getTooltipEventType(),P=(S=j.props.active)!==null&&S!==void 0?S:C,A=k.props.layout,E=j.key||"_recharts-cursor";return F.createElement(zBe,{key:E,activeCoordinate:M,activePayload:O,activeTooltipIndex:$,chartName:n,element:j,isActive:P,layout:A,offset:D,tooltipAxisBandSize:R,tooltipEventType:I})}),Ue(k,"renderPolarAxis",function(j,S,N){var C=rs(j,"type.axisType"),M=rs(k.state,"".concat(C,"Map")),O=j.type.defaultProps,D=O!==void 0?se(se({},O),j.props):j.props,$=M&&M[D["".concat(C,"Id")]];return g.cloneElement(j,se(se({},$),{},{className:kt(C,$.className),key:j.key||"".concat(S,"-").concat(N),ticks:Sc($,!0)}))}),Ue(k,"renderPolarGrid",function(j){var S=j.props,N=S.radialLines,C=S.polarAngles,M=S.polarRadius,O=k.state,D=O.radiusAxisMap,$=O.angleAxisMap,R=Wu(D),I=Wu($),P=I.cx,A=I.cy,E=I.innerRadius,T=I.outerRadius;return g.cloneElement(j,{polarAngles:Array.isArray(C)?C:Sc(I,!0).map(function(L){return L.coordinate}),polarRadius:Array.isArray(M)?M:Sc(R,!0).map(function(L){return L.coordinate}),cx:P,cy:A,innerRadius:E,outerRadius:T,key:j.key||"polar-grid",radialLines:N})}),Ue(k,"renderLegend",function(){var j=k.state.formattedGraphicalItems,S=k.props,N=S.children,C=S.width,M=S.height,O=k.props.margin||{},D=C-(O.left||0)-(O.right||0),$=fV({children:N,formattedGraphicalItems:j,legendWidth:D,legendContent:u});if(!$)return null;var R=$.item,I=d3($,HBe);return g.cloneElement(R,se(se({},I),{},{chartWidth:C,chartHeight:M,margin:O,onBBoxUpdate:k.handleLegendBBoxUpdate}))}),Ue(k,"renderTooltip",function(){var j,S=k.props,N=S.children,C=S.accessibilityLayer,M=Sa(N,Zs);if(!M)return null;var O=k.state,D=O.isTooltipActive,$=O.activeCoordinate,R=O.activePayload,I=O.activeLabel,P=O.offset,A=(j=M.props.active)!==null&&j!==void 0?j:D;return g.cloneElement(M,{viewBox:se(se({},P),{},{x:P.left,y:P.top}),active:A,label:I,payload:A?R:[],coordinate:$,accessibilityLayer:C})}),Ue(k,"renderBrush",function(j){var S=k.props,N=S.margin,C=S.data,M=k.state,O=M.offset,D=M.dataStartIndex,$=M.dataEndIndex,R=M.updateId;return g.cloneElement(j,{key:j.key||"_recharts-brush",onChange:tv(k.handleBrushChange,j.props.onChange),data:C,x:be(j.props.x)?j.props.x:O.left,y:be(j.props.y)?j.props.y:O.top+O.height+O.brushBottom-(N.bottom||0),width:be(j.props.width)?j.props.width:O.width,startIndex:D,endIndex:$,updateId:"brush-".concat(R)})}),Ue(k,"renderReferenceElement",function(j,S,N){if(!j)return null;var C=k,M=C.clipPathId,O=k.state,D=O.xAxisMap,$=O.yAxisMap,R=O.offset,I=j.type.defaultProps||{},P=j.props,A=P.xAxisId,E=A===void 0?I.xAxisId:A,T=P.yAxisId,L=T===void 0?I.yAxisId:T;return g.cloneElement(j,{key:j.key||"".concat(S,"-").concat(N),xAxis:D[E],yAxis:$[L],viewBox:{x:R.left,y:R.top,width:R.width,height:R.height},clipPathId:M})}),Ue(k,"renderActivePoints",function(j){var S=j.item,N=j.activePoint,C=j.basePoint,M=j.childIndex,O=j.isRange,D=[],$=S.props.key,R=S.item.type.defaultProps!==void 0?se(se({},S.item.type.defaultProps),S.item.props):S.item.props,I=R.activeDot,P=R.dataKey,A=se(se({index:M,dataKey:P,cx:N.x,cy:N.y,r:4,fill:dA(S.item),strokeWidth:2,stroke:"#fff",payload:N.payload,value:N.value},pt(I,!1)),Qb(I));return D.push(b.renderActiveDot(I,A,"".concat($,"-activePoint-").concat(M))),C?D.push(b.renderActiveDot(I,se(se({},A),{},{cx:C.x,cy:C.y}),"".concat($,"-basePoint-").concat(M))):O&&D.push(null),D}),Ue(k,"renderGraphicChild",function(j,S,N){var C=k.filterFormatItem(j,S,N);if(!C)return null;var M=k.getTooltipEventType(),O=k.state,D=O.isTooltipActive,$=O.tooltipAxis,R=O.activeTooltipIndex,I=O.activeLabel,P=k.props.children,A=Sa(P,Zs),E=C.props,T=E.points,L=E.isRange,B=E.baseLine,H=C.item.type.defaultProps!==void 0?se(se({},C.item.type.defaultProps),C.item.props):C.item.props,G=H.activeDot,Z=H.hide,le=H.activeBar,ue=H.activeShape,re=!!(!Z&&D&&A&&(G||le||ue)),q={};M!=="axis"&&A&&A.props.trigger==="click"?q={onClick:tv(k.handleItemMouseEnter,j.props.onClick)}:M!=="axis"&&(q={onMouseLeave:tv(k.handleItemMouseLeave,j.props.onMouseLeave),onMouseEnter:tv(k.handleItemMouseEnter,j.props.onMouseEnter)});var U=g.cloneElement(j,se(se({},C.props),q));function Q(ne){return typeof $.dataKey=="function"?$.dataKey(ne.payload):null}if(re)if(R>=0){var J,Y;if($.dataKey&&!$.allowDuplicatedCategory){var oe=typeof $.dataKey=="function"?Q:"payload.".concat($.dataKey.toString());J=Xb(T,oe,I),Y=L&&B&&Xb(B,oe,I)}else J=T==null?void 0:T[R],Y=L&&B&&B[R];if(ue||le){var ve=j.props.activeIndex!==void 0?j.props.activeIndex:R;return[g.cloneElement(j,se(se(se({},C.props),q),{},{activeIndex:ve})),null,null]}if(!yt(J))return[U].concat(Ch(k.renderActivePoints({item:C,activePoint:J,basePoint:Y,childIndex:R,isRange:L})))}else{var De,Le=(De=k.getItemByXY(k.state.activeCoordinate))!==null&&De!==void 0?De:{graphicalItem:U},He=Le.graphicalItem,vt=He.item,lt=vt===void 0?j:vt,Pt=He.childIndex,te=se(se(se({},C.props),q),{},{activeIndex:Pt});return[g.cloneElement(lt,te),null,null]}return L?[U,null,null]:[U,null]}),Ue(k,"renderCustomized",function(j,S,N){return g.cloneElement(j,se(se({key:"recharts-customized-".concat(N)},k.props),k.state))}),Ue(k,"renderMap",{CartesianGrid:{handler:iv,once:!0},ReferenceArea:{handler:k.renderReferenceElement},ReferenceLine:{handler:iv},ReferenceDot:{handler:k.renderReferenceElement},XAxis:{handler:iv},YAxis:{handler:iv},Brush:{handler:k.renderBrush,once:!0},Bar:{handler:k.renderGraphicChild},Line:{handler:k.renderGraphicChild},Area:{handler:k.renderGraphicChild},Radar:{handler:k.renderGraphicChild},RadialBar:{handler:k.renderGraphicChild},Scatter:{handler:k.renderGraphicChild},Pie:{handler:k.renderGraphicChild},Funnel:{handler:k.renderGraphicChild},Tooltip:{handler:k.renderCursor,once:!0},PolarGrid:{handler:k.renderPolarGrid,once:!0},PolarAngleAxis:{handler:k.renderPolarAxis},PolarRadiusAxis:{handler:k.renderPolarAxis},Customized:{handler:k.renderCustomized}}),k.clipPathId="".concat((w=x.id)!==null&&w!==void 0?w:Gg("recharts"),"-clip"),k.throttleTriggeredAfterMouseMove=h9(k.triggeredAfterMouseMove,(_=x.throttleDelay)!==null&&_!==void 0?_:1e3/60),k.state={},k}return rWe(b,v),ZBe(b,[{key:"componentDidMount",value:function(){var w,_;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(w=this.props.margin.left)!==null&&w!==void 0?w:0,top:(_=this.props.margin.top)!==null&&_!==void 0?_:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var w=this.props,_=w.children,k=w.data,j=w.height,S=w.layout,N=Sa(_,Zs);if(N){var C=N.props.defaultIndex;if(!(typeof C!="number"||C<0||C>this.state.tooltipTicks.length-1)){var M=this.state.tooltipTicks[C]&&this.state.tooltipTicks[C].value,O=rC(this.state,k,C,M),D=this.state.tooltipTicks[C].coordinate,$=(this.state.offset.top+j)/2,R=S==="horizontal",I=R?{x:D,y:$}:{y:D,x:$},P=this.state.formattedGraphicalItems.find(function(E){var T=E.item;return T.type.name==="Scatter"});P&&(I=se(se({},I),P.props.points[C].tooltipPosition),O=P.props.points[C].tooltipPayload);var A={activeTooltipIndex:C,isTooltipActive:!0,activeLabel:M,activePayload:O,activeCoordinate:I};this.setState(A),this.renderCursor(N),this.accessibilityManager.setIndex(C)}}}},{key:"getSnapshotBeforeUpdate",value:function(w,_){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==_.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==w.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==w.margin){var k,j;this.accessibilityManager.setDetails({offset:{left:(k=this.props.margin.left)!==null&&k!==void 0?k:0,top:(j=this.props.margin.top)!==null&&j!==void 0?j:0}})}return null}},{key:"componentDidUpdate",value:function(w){DS([Sa(w.children,Zs)],[Sa(this.props.children,Zs)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var w=Sa(this.props.children,Zs);if(w&&typeof w.props.shared=="boolean"){var _=w.props.shared?"axis":"item";return l.indexOf(_)>=0?_:i}return i}},{key:"getMouseInfo",value:function(w){if(!this.container)return null;var _=this.container,k=_.getBoundingClientRect(),j=ORe(k),S={chartX:Math.round(w.pageX-j.left),chartY:Math.round(w.pageY-j.top)},N=k.width/_.offsetWidth||1,C=this.inRange(S.chartX,S.chartY,N);if(!C)return null;var M=this.state,O=M.xAxisMap,D=M.yAxisMap,$=this.getTooltipEventType(),R=f3(this.state,this.props.data,this.props.layout,C);if($!=="axis"&&O&&D){var I=Wu(O).scale,P=Wu(D).scale,A=I&&I.invert?I.invert(S.chartX):null,E=P&&P.invert?P.invert(S.chartY):null;return se(se({},S),{},{xValue:A,yValue:E},R)}return R?se(se({},S),R):null}},{key:"inRange",value:function(w,_){var k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,j=this.props.layout,S=w/k,N=_/k;if(j==="horizontal"||j==="vertical"){var C=this.state.offset,M=S>=C.left&&S<=C.left+C.width&&N>=C.top&&N<=C.top+C.height;return M?{x:S,y:N}:null}var O=this.state,D=O.angleAxisMap,$=O.radiusAxisMap;if(D&&$){var R=Wu(D);return Q5({x:S,y:N},R)}return null}},{key:"parseEventsOfWrapper",value:function(){var w=this.props.children,_=this.getTooltipEventType(),k=Sa(w,Zs),j={};k&&_==="axis"&&(k.props.trigger==="click"?j={onClick:this.handleClick}:j={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var S=Qb(this.props,this.handleOuterEvent);return se(se({},S),j)}},{key:"addListener",value:function(){ok.on(lk,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){ok.removeListener(lk,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(w,_,k){for(var j=this.state.formattedGraphicalItems,S=0,N=j.length;S<N;S++){var C=j[S];if(C.item===w||C.props.key===w.key||_===ho(C.item.type)&&k===C.childIndex)return C}return null}},{key:"renderClipPath",value:function(){var w=this.clipPathId,_=this.state.offset,k=_.left,j=_.top,S=_.height,N=_.width;return F.createElement("defs",null,F.createElement("clipPath",{id:w},F.createElement("rect",{x:k,y:j,height:S,width:N})))}},{key:"getXScales",value:function(){var w=this.state.xAxisMap;return w?Object.entries(w).reduce(function(_,k){var j=u3(k,2),S=j[0],N=j[1];return se(se({},_),{},Ue({},S,N.scale))},{}):null}},{key:"getYScales",value:function(){var w=this.state.yAxisMap;return w?Object.entries(w).reduce(function(_,k){var j=u3(k,2),S=j[0],N=j[1];return se(se({},_),{},Ue({},S,N.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(w){var _;return(_=this.state.xAxisMap)===null||_===void 0||(_=_[w])===null||_===void 0?void 0:_.scale}},{key:"getYScaleByAxisId",value:function(w){var _;return(_=this.state.yAxisMap)===null||_===void 0||(_=_[w])===null||_===void 0?void 0:_.scale}},{key:"getItemByXY",value:function(w){var _=this.state,k=_.formattedGraphicalItems,j=_.activeItem;if(k&&k.length)for(var S=0,N=k.length;S<N;S++){var C=k[S],M=C.props,O=C.item,D=O.type.defaultProps!==void 0?se(se({},O.type.defaultProps),O.props):O.props,$=ho(O.type);if($==="Bar"){var R=(M.data||[]).find(function(E){return pLe(w,E)});if(R)return{graphicalItem:C,payload:R}}else if($==="RadialBar"){var I=(M.data||[]).find(function(E){return Q5(w,E)});if(I)return{graphicalItem:C,payload:I}}else if(K0(C,j)||X0(C,j)||Ym(C,j)){var P=yFe({graphicalItem:C,activeTooltipItem:j,itemData:D.data}),A=D.activeIndex===void 0?P:D.activeIndex;return{graphicalItem:se(se({},C),{},{childIndex:A}),payload:Ym(C,j)?D.data[P]:C.props.data[P]}}}return null}},{key:"render",value:function(){var w=this;if(!WM(this))return null;var _=this.props,k=_.children,j=_.className,S=_.width,N=_.height,C=_.style,M=_.compact,O=_.title,D=_.desc,$=d3(_,VBe),R=pt($,!1);if(M)return F.createElement(KD,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},F.createElement(LS,cd({},R,{width:S,height:N,title:O,desc:D}),this.renderClipPath(),UM(k,this.renderMap)));if(this.props.accessibilityLayer){var I,P;R.tabIndex=(I=this.props.tabIndex)!==null&&I!==void 0?I:0,R.role=(P=this.props.role)!==null&&P!==void 0?P:"application",R.onKeyDown=function(E){w.accessibilityManager.keyboardEvent(E)},R.onFocus=function(){w.accessibilityManager.focus()}}var A=this.parseEventsOfWrapper();return F.createElement(KD,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},F.createElement("div",cd({className:kt("recharts-wrapper",j),style:se({position:"relative",cursor:"default",width:S,height:N},C)},A,{ref:function(T){w.container=T}}),F.createElement(LS,cd({},R,{width:S,height:N,title:O,desc:D,style:cWe}),this.renderClipPath(),UM(k,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(g.Component);Ue(y,"displayName",n),Ue(y,"defaultProps",se({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},d)),Ue(y,"getDerivedStateFromProps",function(v,b){var x=v.dataKey,w=v.data,_=v.children,k=v.width,j=v.height,S=v.layout,N=v.stackOffset,C=v.margin,M=b.dataStartIndex,O=b.dataEndIndex;if(b.updateId===void 0){var D=p3(v);return se(se(se({},D),{},{updateId:0},p(se(se({props:v},D),{},{updateId:0}),b)),{},{prevDataKey:x,prevData:w,prevWidth:k,prevHeight:j,prevLayout:S,prevStackOffset:N,prevMargin:C,prevChildren:_})}if(x!==b.prevDataKey||w!==b.prevData||k!==b.prevWidth||j!==b.prevHeight||S!==b.prevLayout||N!==b.prevStackOffset||!Cd(C,b.prevMargin)){var $=p3(v),R={chartX:b.chartX,chartY:b.chartY,isTooltipActive:b.isTooltipActive},I=se(se({},f3(b,w,S)),{},{updateId:b.updateId+1}),P=se(se(se({},$),R),I);return se(se(se({},P),p(se({props:v},P),b)),{},{prevDataKey:x,prevData:w,prevWidth:k,prevHeight:j,prevLayout:S,prevStackOffset:N,prevMargin:C,prevChildren:_})}if(!DS(_,b.prevChildren)){var A,E,T,L,B=Sa(_,yh),H=B&&(A=(E=B.props)===null||E===void 0?void 0:E.startIndex)!==null&&A!==void 0?A:M,G=B&&(T=(L=B.props)===null||L===void 0?void 0:L.endIndex)!==null&&T!==void 0?T:O,Z=H!==M||G!==O,le=!yt(w),ue=le&&!Z?b.updateId:b.updateId+1;return se(se({updateId:ue},p(se(se({props:v},b),{},{updateId:ue,dataStartIndex:H,dataEndIndex:G}),b)),{},{prevChildren:_,dataStartIndex:H,dataEndIndex:G})}return null}),Ue(y,"renderActiveDot",function(v,b,x){var w;return g.isValidElement(v)?w=g.cloneElement(v,b):it(v)?w=v(b):w=F.createElement(fA,b),F.createElement(yn,{className:"recharts-active-dot",ke
4248y:x},w)});var m=g.forwardRef(function(b,x){return F.createElement(y,cd({},b,{ref:x}))});return m.displayName=y.displayName,m},aC=bWe({chartName:"AreaChart",GraphicalChild:Ti,axisComponents:[{axisType:"xAxis",AxisComp:r_},{axisType:"yAxis",AxisComp:a_}],formatAxisMap:z6e});function xWe({totalPosts:e=104,publishedPosts:t=24,engagementRate:n=4.2,leadsGenerated:r=7,estimatedROI:a=2850,engagementTrend:i=[],leadsTrend:o=[]}){const l=Math.round(t/e*100),c=e-t;return s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[s.jsxs(he,{className:"relative overflow-hidden border-border/50 bg-gradient-to-br from-card to-card/80",children:[s.jsx("div",{className:"absolute top-0 right-0 w-20 h-20 bg-primary/5 rounded-full -translate-y-1/2 translate-x-1/2"}),s.jsx(Ce,{className:"pb-2",children:s.jsxs(Pe,{className:"text-sm font-medium text-muted-foreground flex items-center gap-2",children:[s.jsx(Oh,{className:"h-4 w-4 text-primary"}),"Schedule Progress"]})}),s.jsxs(pe,{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-baseline gap-1",children:[s.jsx("span",{className:"text-4xl font-bold text-foreground",children:t}),s.jsxs("span",{className:"text-lg text-muted-foreground",children:["/",e]})]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Posts published"}),s.jsx(vm,{value:l,className:"h-2"}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:[s.jsxs("span",{className:"text-primary font-medium",children:[l,"%"]})," complete • ",c," remaining"]})]})]}),s.jsxs(he,{className:"relative overflow-hidden border-border/50 bg-gradient-to-br from-card to-card/80",children:[s.jsx("div",{className:"absolute top-0 right-0 w-20 h-20 bg-success/5 rounded-full -translate-y-1/2 translate-x-1/2"}),s.jsx(Ce,{className:"pb-2",children:s.jsxs(Pe,{className:"text-sm font-medium text-muted-foreground flex items-center gap-2",children:[s.jsx(vn,{className:"h-4 w-4 text-success"}),"Engagement Score"]})}),s.jsxs(pe,{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-baseline gap-1",children:[s.jsx("span",{className:"text-4xl font-bold text-foreground",children:n}),s.jsx("span",{className:"text-lg text-muted-foreground",children:"%"})]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Avg. engagement rate"}),i.length>0&&s.jsx("div",{className:"h-12 mt-2",children:s.jsx(sN,{width:"100%",height:"100%",children:s.jsxs(aC,{data:i,children:[s.jsx("defs",{children:s.jsxs("linearGradient",{id:"engagementGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[s.jsx("stop",{offset:"0%",stopColor:"hsl(var(--success))",stopOpacity:.3}),s.jsx("stop",{offset:"100%",stopColor:"hsl(var(--success))",stopOpacity:0})]})}),s.jsx(Ti,{type:"monotone",dataKey:"value",stroke:"hsl(var(--success))",strokeWidth:2,fill:"url(#engagementGradient)"})]})})})]})]}),s.jsxs(he,{className:"relative overflow-hidden border-border/50 bg-gradient-to-br from-card to-card/80",children:[s.jsx("div",{className:"absolute top-0 right-0 w-20 h-20 bg-accent/5 rounded-full -translate-y-1/2 translate-x-1/2"}),s.jsx(Ce,{className:"pb-2",children:s.jsxs(Pe,{className:"text-sm font-medium text-muted-foreground flex items-center gap-2",children:[s.jsx(Wn,{className:"h-4 w-4 text-accent"}),"Lead Generation"]})}),s.jsxs(pe,{className:"space-y-2",children:[s.jsx("div",{className:"flex items-baseline gap-1",children:s.jsx("span",{className:"text-4xl font-bold text-foreground",children:r})}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Leads generated"}),o.length>0&&s.jsx("div",{className:"h-12 mt-2",children:s.jsx(sN,{width:"100%",height:"100%",children:s.jsxs(aC,{data:o,children:[s.jsx("defs",{children:s.jsxs("linearGradient",{id:"leadsGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[s.jsx("stop",{offset:"0%",stopColor:"hsl(var(--accent))",stopOpacity:.3}),s.jsx("stop",{offset:"100%",stopColor:"hsl(var(--accent))",stopOpacity:0})]})}),s.jsx(Ti,{type:"monotone",dataKey:"value",stroke:"hsl(var(--accent))",strokeWidth:2,fill:"url(#leadsGradient)"})]})})})]})]}),s.jsxs(he,{className:"relative overflow-hidden border-primary/20 bg-gradient-to-br from-primary/5 to-card",children:[s.jsx("div",{className:"absolute top-0 right-0 w-24 h-24 bg-primary/10 rounded-full -translate-y-1/2 translate-x-1/2"}),s.jsx(Ce,{className:"pb-2",children:s.jsxs(Pe,{className:"text-sm font-medium text-muted-foreground flex items-center gap-2",children:[s.jsx(to,{className:"h-4 w-4 text-primary"}),"ROI Estimate"]})}),s.jsxs(pe,{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-baseline gap-1",children:[s.jsx("span",{className:"text-lg text-muted-foreground",children:"$"}),s.jsx("span",{className:"text-4xl font-bold text-primary",children:a.toLocaleStr
4248ing()})]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Estimated value generated"}),s.jsxs("p",{className:"text-xs text-muted-foreground/70 mt-2",children:["Based on ",r," leads × 10% conversion × avg. commission"]})]})]})]})}const wWe=[{id:"linkedin",name:"LinkedIn"},{id:"instagram",name:"Instagram"},{id:"facebook",name:"Facebook"},{id:"threads",name:"Threads"},{id:"reddit",name:"Reddit"}],_We=Array.from({length:48},(e,t)=>{const n=Math.floor(t/2),r=t%2===0?"00":"30";return`${n.toString().padStart(2,"0")}:${r}`});function SG({open:e,onOpenChange:t,post:n,onSuccess:r,onRePosted:a}){const{getConnectedPlatforms:i}=Hl(),o=i(),{toast:l}=Je(),c=cs(),[u,h]=g.useState(""),[d,f]=g.useState([]),[p,y]=g.useState(void 0),[m,v]=g.useState("09:00"),[b,x]=g.useState(!1),[w,_]=g.useState("schedule");g.useEffect(()=>{var S;if(n&&e){h(n.content);const N=(S=n.platforms)!=null&&S.length?n.platforms:n.platform?[n.platform]:[];f(N.filter(C=>o.includes(C))),y(new Date),v("09:00"),_("schedule")}},[n,e,o]),g.useEffect(()=>{e||(h(""),f([]),y(void 0),v("09:00"),_("schedule"))},[e]);const k=S=>{f(N=>N.includes(S)?N.length===1?N:N.filter(C=>C!==S):[...N,S])},j=async()=>{if(!u.trim()){l({title:"Missing content",description:"Please provide content for your repost.",variant:"destructive"});return}if(d.length===0){l({title:"No platforms selected",description:"Please select at least one platform.",variant:"destructive"});return}if(w==="schedule"&&!p){l({title:"No date selected",description:"Please select a date for scheduling.",variant:"destructive"});return}x(!0);try{const N=w==="schedule"?`${ge(w==="now"?new Date:p,"yyyy-MM-dd")}T${m}:00`:void 0,C=await n0({content:u.trim(),platforms:d,source:"repost",scheduled:w==="schedule",scheduledDatetime:N,repostOfReceiptId:n==null?void 0:n.id});if(!C.success)throw new Error(C.message);c.invalidateQueries({queryKey:["post-receipts"]}),l({title:w==="now"?"Re-post published!":"Re-post scheduled!",description:C.message}),t(!1),r==null||r(),a==null||a()}catch(S){l({title:"Re-post failed",description:S.message,variant:"destructive"})}finally{x(!1)}};return s.jsx(An,{open:e,onOpenChange:t,children:s.jsxs(En,{className:"sm:max-w-[500px]",children:[s.jsxs(wn,{children:[s.jsxs(_n,{className:"flex items-center gap-2",children:[s.jsx(Bt,{className:"h-5 w-5 text-primary"}),"Re-Post Content"]}),s.jsx(Zr,{children:"Duplicate this post with optional edits. Choose to post now or schedule for later."})]}),s.jsxs("div",{className:"space-y-5 pt-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{children:"Content"}),s.jsx(Nt,{placeholder:"Enter your post content...",value:u,onChange:S=>h(S.target.value),className:"min-h-[120px] resize-none"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Make any edits you'd like before re-posting"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(X,{children:"Platforms"}),s.jsxs("span",{className:"text-xs text-muted-foreground",children:[d.length," selected"]})]}),o.length===0?s.jsx("p",{className:"text-sm text-muted-foreground",children:"No platforms connected. Connect accounts in Settings."}):s.jsx("div",{className:"flex flex-wrap gap-2",children:wWe.map(S=>{const N=o.includes(S.id),C=d.includes(S.id);return s.jsx("button",{type:"button",onClick:()=>N&&k(S.id),disabled:!N,className:K("rounded-lg px-3 py-1.5 text-sm font-medium transition-all",!N&&"opacity-40 cursor-not-allowed",C&&N?"bg-primary text-primary-foreground":N?"bg-muted text-muted-foreground hover:bg-muted/80":"bg-muted/50 text-muted-foreground"),children:S.name},S.id)})})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{children:"Posting Mode"}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs(z,{type:"button",variant:w==="now"?"default":"outline",size:"sm",onClick:()=>_("now"),className:"flex-1",children:[s.jsx(ji,{className:"h-4 w-4 mr-2"}),"Post Now"]}),s.jsxs(z,{type:"button",variant:w==="schedule"?"default":"outline",size:"sm",onClick:()=>_("schedule"),className:"flex-1",children:[s.jsx(Mn,{className:"h-4 w-4 mr-2"}),"Schedule"]})]})]}),w==="schedule"&&s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{children:"Date"}),s.jsxs(Og,{children:[s.jsx(Rg,{asChild:!0,children:s.jsxs(z,{variant:"outline",className:K("w-full justify-start text-left font-normal",!p&&"text-muted-foreground"),children:[s.jsx(Mn,{className:"mr-2 h-4 w-4"}),p?ge(p,"PPP"):"Pick a date"]})}),s.jsx(Kh,{className:"w-auto p-0",align:"start",children:s.jsx(Xh,{mode:"single",selected:p,onSelect:y,initialFocus:!0,className:"p-3 pointer-events-auto",disabled:S=>S<new Date(new Date().setHours(0,0,0,0))})})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{children:"Time"}),s.jsxs(jt,{value:m,onValueChange:v,children:[s.jsx(mt,{children:s.jsx(Ct,{})}),s.jsx(gt,{children:_We.map(S=>s.jsx(Ee,{value:S,children:S},S))})]})]})]}),s.jsxs("div",{className:"flex gap-3 pt-2",children:[s.jsx(z,{variant:"outline",className:"flex-1",onClick:()=>t(!1),disabled:b,children:"Cancel"}),s.jsx(z,{className:"flex-1",onClick:j,disabled:b||d.length===0,children:b?s.jsxs(s.Fragment,{children:[s.jsx(ce,{className:"mr-2 h-4 w-4 animate-spin"}),"Processing..."]}):w==="now"?s.jsxs(s.Fragment,{children:[s.jsx(ji,{className:"mr-2 h-4 w-4"}),"Post Now"]}):s.jsxs(s.Fragment,{children:[s.jsx(Mn,{className:"mr-2 h-4 w-4"}),"Schedule Re-Post"]})})]})]})]})})}function kWe({posts:e}){const[t,n]=g.useState("engagements"),[r,a]=g.useState("desc"),[i,o]=g.useState(!1),[l,c]=g.useState(null),u=m=>{c({id:m.id,content:m.content,platform:"linkedin",platforms:["linkedin"]}),o(!0)},h=g.useMemo(()=>[...e].sort((m,v)=>{let b=0;return t==="publishedDate"?b=new Date(m.publishedDate).getTime()-new Date(v.publishedDate).getTime():b=m[t]-v[t],r==="desc"?-b:b}),[e,t,r]),d=m=>{t===m?a(r==="desc"?"asc":"desc"):(n(m),a("desc"))},f=m=>({"Buyer Psychology":"bg-blue-500/10 text-blue-500 border-blue-500/20","Market Insights":"bg-purple-500/10 text-purple-500 border-purple-500/20","Home Tips":"bg-green-500/10 text-green-500 border-green-500/20",Investment:"bg-
4248amber-500/10 text-amber-500 border-amber-500/20",Neighborhood:"bg-pink-500/10 text-pink-500 border-pink-500/20","First-Time Buyers":"bg-cyan-500/10 text-cyan-500 border-cyan-500/20"})[m]||"bg-muted text-muted-foreground",p=({field:m,children:v})=>s.jsxs(z,{variant:"ghost",size:"sm",className:"h-8 px-2 -ml-2 hover:bg-muted/50",onClick:()=>d(m),children:[v,s.jsx(UQ,{className:`ml-1 h-3 w-3 ${t===m?"text-primary":"text-muted-foreground"}`})]}),y=(m,v=60)=>m.length<=v?m:m.substring(0,v)+"...";return e.length===0?s.jsxs(he,{children:[s.jsx(Ce,{children:s.jsxs(Pe,{className:"text-lg flex items-center gap-2",children:[s.jsx(Se,{className:"h-5 w-5 text-primary"}),"Top Performing Posts"]})}),s.jsx(pe,{children:s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(vn,{className:"h-12 w-12 text-muted-foreground/30 mb-4"}),s.jsx("p",{className:"text-muted-foreground",children:"No published posts yet"}),s.jsx("p",{className:"text-sm text-muted-foreground/70",children:"Performance data will appear here once posts are published"})]})})]}):s.jsxs(he,{children:[s.jsx(Ce,{children:s.jsxs(Pe,{className:"text-lg flex items-center gap-2",children:[s.jsx(Se,{className:"h-5 w-5 text-primary"}),"Top Performing Posts"]})}),s.jsxs(pe,{children:[s.jsx("div",{className:"rounded-lg border border-border/50 overflow-hidden",children:s.jsxs(so,{children:[s.jsx(io,{children:s.jsxs(Bn,{className:"bg-muted/30 hover:bg-muted/30",children:[s.jsx(tt,{className:"w-[280px]",children:"Post Content"}),s.jsx(tt,{children:"Group"}),s.jsx(tt,{children:s.jsx(p,{field:"publishedDate",children:"Published"})}),s.jsx(tt,{children:s.jsxs(p,{field:"engagements",children:[s.jsx(vn,{className:"h-3 w-3 mr-1"}),"Engagements"]})}),s.jsx(tt,{children:s.jsxs(p,{field:"clicks",children:[s.jsx(li,{className:"h-3 w-3 mr-1"}),"Clicks"]})}),s.jsx(tt,{children:s.jsxs(p,{field:"leads",children:[s.jsx(Wn,{className:"h-3 w-3 mr-1"}),"Leads"]})}),s.jsx(tt,{children:s.jsx(p,{field:"engagementRate",children:"Rate"})}),s.jsx(tt,{className:"w-[80px] text-center",children:"Actions"})]})}),s.jsx(oo,{children:h.map((m,v)=>s.jsxs(Bn,{className:`
4249                    transition-colors
4250                    ${v===0?"bg-primary/5 hover:bg-primary/10":"hover:bg-muted/30"}
4251                  `,children:[s.jsx(Qe,{className:"font-medium",children:s.jsxs("div",{className:"flex items-start gap-2",children:[v===0&&s.jsx(je,{variant:"default",className:"shrink-0 text-xs px-1.5",children:"#1"}),s.jsx("span",{className:"text-sm leading-relaxed",children:y(m.content)})]})}),s.jsx(Qe,{children:s.jsx(je,{variant:"outline",className:f(m.group),children:m.group})}),s.jsx(Qe,{className:"text-sm text-muted-foreground",children:new Date(m.publishedDate).toLocaleDateString("en-US",{month:"short",day:"numeric"})}),s.jsx(Qe,{children:s.jsx("span",{className:"font-semibold text-foreground",children:m.engagements})}),s.jsx(Qe,{children:s.jsx("span",{className:"text-muted-foreground",children:m.clicks})}),s.jsx(Qe,{children:m.leads>0?s.jsx(je,{variant:"secondary",className:"bg-success/10 text-success border-success/20",children:m.leads}):s.jsx("span",{className:"text-muted-foreground",children:"0"})}),s.jsx(Qe,{children:s.jsxs("span",{className:`font-medium ${m.engagementRate>=5?"text-success":"text-muted-foreground"}`,children:[m.engagementRate.toFixed(1),"%"]})}),s.jsx(Qe,{className:"text-center",children:s.jsx(OP,{children:s.jsxs(Nv,{children:[s.jsx(Cv,{asChild:!0,children:s.jsx(z,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:()=>u(m),children:s.jsx(Bt,{className:"h-4 w-4"})})}),s.jsx(dp,{children:s.jsx("p",{children:"Re-Post"})})]})})})]},m.id))})]})}),s.jsx(SG,{open:i,onOpenChange:o,post:l,onRePosted:()=>{o(!1),c(null)}})]})]})}var NG=["PageUp","PageDown"],CG=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],PG={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},df="Slider",[sC,jWe,SWe]=ug(df),[TG,jHe]=Hn(df,[SWe]),[NWe,i_]=TG(df),AG=g.forwardRef((e,t)=>
4251{const{name:n,min:r=0,max:a=100,step:i=1,orientation:o="horizontal",disabled:l=!1,minStepsBetweenThumbs:c=0,defaultValue:u=[r],value:h,onValueChange:d=()=>{},onValueCommit:f=()=>{},inverted:p=!1,form:y,...m}=e,v=g.useRef(new Set),b=g.useRef(0),w=o==="horizontal"?CWe:PWe,[_=[],k]=ba({prop:h,defaultProp:u,onChange:O=>{var $;($=[...v.current][b.current])==null||$.focus(),d(O)}}),j=g.useRef(_);function S(O){const D=RWe(_,O);M(O,D)}function N(O){M(O,b.current)}function C(){const O=j.current[b.current];_[b.current]!==O&&f(_)}function M(O,D,{commit:$}={commit:!1}){const R=$We(i),I=LWe(Math.round((O-r)/i)*i+r,R),P=fm(I,[r,a]);k((A=[])=>{const E=EWe(A,P,D);if(DWe(E,c*i)){b.current=E.indexOf(P);const T=String(E)!==String(A);return T&&$&&f(E),T?E:A}else return A})}return s.jsx(NWe,{scope:e.__scopeSlider,name:n,disabled:l,min:r,max:a,valueIndexToChangeRef:b,thumbs:v.current,values:_,orientation:o,form:y,children:s.jsx(sC.Provider,{scope:e.__scopeSlider,children:s.jsx(sC.Slot,{scope:e.__scopeSlider,children:s.jsx(w,{"aria-disabled":l,"data-disabled":l?"":void 0,...m,ref:t,onPointerDown:de(m.onPointerDown,()=>{l||(j.current=_)}),min:r,max:a,inverted:p,onSlideStart:l?void 0:S,onSlideMove:l?void 0:N,onSlideEnd:l?void 0:C,onHomeKeyDown:()=>!l&&M(r,0,{commit:!0}),onEndKeyDown:()=>!l&&M(a,_.length-1,{commit:!0}),onStepKeyDown:({event:O,direction:D})=>{if(!l){const I=NG.includes(O.key)||O.shiftKey&&CG.includes(O.key)?10:1,P=b.current,A=_[P],E=i*I*D;M(A+E,P,{commit:!0})}}})})})})});AG.displayName=df;var[EG,OG]=TG(df,{startEdge:"left",endEdge:"right",size:"width",direction:1}),CWe=g.forwardRef((e,t)=>{const{min:n,max:r,dir:a,inverted:i,onSlideStart:o,onSlideMove:l,onSlideEnd:c,onStepKeyDown:u,...h}=e,[d,f]=g.useState(null),p=Fe(t,w=>f(w)),y=g.useRef(void 0),m=vu(a),v=m==="ltr",b=v&&!i||!v&&i;function x(w){const _=y.current||d.getBoundingClientRect(),k=[0,_.width],S=vA(k,b?[n,r]:[r,n]);return y.current=_,S(w-_.left)}return s.jsx(EG,{scope:e.__scopeSlider,startEdge:b?"left":"right",endEdge:b?"right":"left",direction:b?1:-1,size:"width",children:s.jsx(RG,{dir:m,"data-orientation":"horizontal",...h,ref:p,style:{...h.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:w=>{const _=x(w.clientX);o==null||o(_)},onSlideMove:w=>{const _=x(w.clientX);l==null||l(_)},onSlideEnd:()=>{y.current=void 0,c==null||c()},onStepKeyDown:w=>{const k=PG[b?"from-left":"from-right"].includes(w.key);u==null||u({event:w,direction:k?-1:1})}})})}),PWe=g.forwardRef((e,t)=>{const{min:n,max:r,inverted:a,onSlideStart:i,onSlideMove:o,onSlideEnd:l,onStepKeyDown:c,...u}=e,h=g.useRef(null),d=Fe(t,h),f=g.useRef(void 0),p=!a;function y(m){const v=f.current||h.current.getBoundingClientRect(),b=[0,v.height],w=vA(b,p?[r,n]:[n,r]);return f.current=v,w(m-v.top)}return s.jsx(EG,{scope:e.__scopeSlider,startEdge:p?"bottom":"top",endEdge:p?"top":"bottom",size:"height",direction:p?1:-1,children:s.jsx(RG,{"data-orientation":"vertical",...u,ref:d,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:m=>{const v=y(m.clientY);i==null||i(v)},onSlideMove:m=>{const v=y(m.clientY);o==null||o(v)},onSlideEnd:()=>{f.current=void 0,l==null||l()},onStepKeyDown:m=>{const b=PG[p?"from-bottom":"from-top"].includes(m.key);c==null||c({event:m,direction:b?-1:1})}})})}),RG=g.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:a,onSlideEnd:i,onHomeKeyDown:o,onEndKeyDown:l,onStepKeyDown:c,...u}=e,h=i_(df,n);return s.jsx(we.span,{...u,ref:t,onKeyDown:de(e.onKeyDown,d=>{d.key==="Home"?(o(d),d.preventDefault()):d.key==="End"?(l(d),d.preventDefault()):NG.concat(CG).includes(d.key)&&(c(d),d.preventDefault())}),onPointerDown:de(e.onPointerDown,d=>{const f=d.target;f.setPointerCapture(d.pointerId),d.preventDefault(),h.thumbs.has(f)?f.focus():r(d)}),onPointerMove:de(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&a(d)}),onPointerUp:de(e.onPointerUp,d=>{const f=d.target;f.hasPointerCapture(d.pointerId)&&(f.releasePointerCapture(d.pointerId),i(d))})})}),IG="SliderTrack",MG=g.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,a=i_(IG,n);return s.jsx(we.span,{"data-disabled":a.disabled?"":void 0,"data-orientation":a.orientation,...r,ref:t})});MG.displayName=IG;var iC="SliderRange",DG=g.forwardRef((e,t)=>
4251{const{__scopeSlider:n,...r}=e,a=i_(iC,n),i=OG(iC,n),o=g.useRef(null),l=Fe(t,o),c=a.values.length,u=a.values.map(f=>FG(f,a.min,a.max)),h=c>1?Math.min(...u):0,d=100-Math.max(...u);return s.jsx(we.span,{"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,...r,ref:l,style:{...e.style,[i.startEdge]:h+"%",[i.endEdge]:d+"%"}})});DG.displayName=iC;var oC="SliderThumb",$G=g.forwardRef((e,t)=>{const n=jWe(e.__scopeSlider),[r,a]=g.useState(null),i=Fe(t,l=>a(l)),o=g.useMemo(()=>r?n().findIndex(l=>l.ref.current===r):-1,[n,r]);return s.jsx(TWe,{...e,ref:i,index:o})}),TWe=g.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:a,...i}=e,o=i_(oC,n),l=OG(oC,n),[c,u]=g.useState(null),h=Fe(t,x=>u(x)),d=c?o.form||!!c.closest("form"):!0,f=gg(c),p=o.values[r],y=p===void 0?0:FG(p,o.min,o.max),m=OWe(r,o.values.length),v=f==null?void 0:f[l.size],b=v?IWe(v,y,l.direction):0;return g.useEffect(()=>{if(c)return o.thumbs.add(c),()=>{o.thumbs.delete(c)}},[c,o.thumbs]),s.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[l.startEdge]:`calc(${y}% + ${b}px)`},children:[s.jsx(sC.ItemSlot,{scope:e.__scopeSlider,children:s.jsx(we.span,{role:"slider","aria-label":e["aria-label"]||m,"aria-valuemin":o.min,"aria-valuenow":p,"aria-valuemax":o.max,"aria-orientation":o.orientation,"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,tabIndex:o.disabled?void 0:0,...i,ref:h,style:p===void 0?{display:"none"}:e.style,onFocus:de(e.onFocus,()=>{o.valueIndexToChangeRef.current=r})})}),d&&s.jsx(LG,{name:a??(o.name?o.name+(o.values.length>1?"[]":""):void 0),form:o.form,value:p},r)]})});$G.displayName=oC;var AWe="RadioBubbleInput",LG=g.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{const a=g.useRef(null),i=Fe(a,r),o=Tg(t);return g.useEffect(()=>{const l=a.current;if(!l)return;const c=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(c,"value").set;if(o!==t&&h){const d=new Event("input",{bubbles:!0});h.call(l,t),l.dispatchEvent(d)}},[o,t]),s.jsx(we.input,{style:{display:"none"},...n,ref:i,defaultValue:t})});LG.displayName=AWe;function EWe(e=[],t,n){const r=[...e];return r[n]=t,r.sort((a,i)=>a-i)}function FG(e,t,n){const i=100/(n-t)*(e-t);return fm(i,[0,100])}function OWe(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function RWe(e,t){if(e.length===1)return 0;const n=e.map(a=>Math.abs(a-t)),r=Math.min(...n);return n.indexOf(r)}function IWe(e,t,n){const r=e/2,i=vA([0,50],[0,r]);return(r-i(t)*n)*n}function MWe(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function DWe(e,t){if(t>0){const n=MWe(e);return Math.min(...n)>=t}return!0}function vA(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function $We(e){return(String(e).split(".")[1]||"").length}function LWe(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var BG=AG,FWe=MG,BWe=DG,WWe=$G;const Bv=g.forwardRef(({className:e,...t},n)=>s.jsxs(BG,{ref:n,className:K("relative flex w-full touch-none select-none items-center",e),...t,children:[s.jsx(FWe,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:s.jsx(BWe,{className:"absolute h-full bg-primary"})}),s.jsx(WWe,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})]}));Bv.displayName=BG.displayName;function qWe({initialLeads:e=7,initialCommission:t=4e4,initialConversionRate:n=10}){const[r,a]=g.useState(t),[i,o]=g.useState(n),[l,c]=g.useState(e),u=g.useMemo(()=>Math.round(l*(i/100)*r),[l,i,r]),h=g.useMemo(()=>Math.round(l*(i/100)*10)/10,[l,i]),d=f=>new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:0,maximumFractionDigits:0}).format(f);return s.jsxs(he,{className:"overflow-hidden",children:[s.jsxs(Ce,{className:"bg-gradient-to-r from-primary/5 to-transparent pb-4",children:[s.jsxs(Pe,{className:"text-lg flex items-center gap-2",children:[s.jsx(HQ,{className:"h-5 w-5 text-primary"}),"ROI Calculator"]}),s.jsx(Un,{children:"Calculate your potential return from social media leads"})]}),s.jsx(pe,{className:"pt-6",children:s.jsxs("div",{className:"grid gap-8 lg:grid-cols-2",children:[s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs(X,{htmlFor:"commission",className:"flex items-center gap-2 text-sm font-medium",children:[s.jsx(to,{className:"h-4 w-4 text-muted-foreground"}),"Average Commission"]}),s.jsx("span",{className:"text-sm font-semibold text-primary",children:d(r)})]}),s.jsxs("div",{className:"relative",children:[s.jsx(to,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),s.jsx(ze,{id:"commission",type:"number",value:r,onChange:f=>a(Number(f.target.value)||0),className:"pl-9",min:0,step:5e3})]}),s.jsx(Bv,{value:[r],onValueChange:([f])=>a(f),min:5e3,max:1e5,step:5e3,className:"py-2"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Your typical commission per closed deal"})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs(X,{htmlFor:"conversion",className:"flex items-center gap-2 text-sm font-medium",children:[s.jsx(pJ,{className:"h-4 w-4 text-muted-foreground"}),"Lead Conversion Rate"]}),s.jsxs("span",{className:"text-sm font-semibold text-primary",children:[i,"%"]})]}),s.jsx(Bv,{value:[i],onValueChange:([f])=>o(f),min:1,max:30,step:1,className:"py-2"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Percentage of leads that become clients (industry avg: 2-5%)"})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs(X,{className:"flex items-center gap-2 text-sm font-medium",children:[s.jsx(vn,{className:"h-4 w-4 text-muted-foreground"}),"Social Media Leads"]}),s.jsxs("span",{className:"text-sm font-semibold text-primary",children:[l," leads"]})]}),s.jsx(Bv,{value:[l],onValueChange:([f])=>c(f),min:0,max:100,step:1,className:"py-2"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Number of leads generated from your content"})]})]}),s.jsx("div",{className:"flex flex-col justify-center",children:s.jsxs("div",{className:"relative rounded-xl bg-gradient-to-br from-primary/10 via-primary/5 to-transparent p-6 border border-primary/20",children:[s.jsx("div",{className:"absolute top-4 right-4",children:s.jsx(Se,{className:"h-5 w-5 text-primary/40"})}),s.jsxs("div",{className:"text-center space-y-4",children:[s.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Estimated Value Generated"}),s.jsxs("div",{className:"relative",children:[s.jsx("p",{className:"text-5xl font-bold text-primary tracking-tight",children:d(u)}),s.jsx("div",{className:"absolute -inset-4 bg-primary/5 rounded-full blur-2xl -z-10"})]}),s.jsxs("div",{className:"pt-4 space-y-2 text-sm text-muted-foreground",children:[s.jsxs("p",{children:["Based on ",s.jsx("span",{className:"font-semibold text-foreground",children:l})," leads from social media"]}),s.jsxs("p",{children:["≈ ",s.jsx("span",{className:"font-semibold text-foreground",children:h})," closed deals at ",i,"% conversion"]})]})]}),s.jsx("div",{className:"mt-6 pt-4 border-t border-primary/20",children:s.jsxs("p",{className:"text-xs text-center text-muted-foreground
4251/70",children:["Formula: ",l," leads × ",i,"% conversion × ",d(r)," commission"]})})]})})]})})]})}const UWe={industry_module:"realtor",auto_tracking_enabled:!0,track_link_clicks:!0,track_engagements:!0,track_leads:!0,avg_commission_value:12e3,avg_conversion_rate:10,notify_on_lead:!0,notify_on_high_engagement:!1,engagement_threshold:50,compliance_mode:"standard",require_disclosure:!1};function zWe(e){const{toast:t}=Je(),n=cs(),r=wr({queryKey:["clickpro-metrics",e],queryFn:async()=>{const{data:{session:f}}=await W.auth.getSession();if(!f)throw new Error("Not authenticated");const{data:p,error:y}=await W.rpc("get_clickpro_summary",{p_user_id:f.user.id,p_industry_module:e,p_days:30});if(y)throw y;const m=p==null?void 0:p[0];return{totalClicks:Number(m==null?void 0:m.total_clicks)||0,totalLeads:Number(m==null?void 0:m.total_leads)||0,totalEngagements:Number(m==null?void 0:m.total_engagements)||0,avgCTR:Number(m==null?void 0:m.avg_ctr)||0,avgEngagementRate:Number(m==null?void 0:m.avg_engagement_rate)||0,conversionRate:Number(m==null?void 0:m.conversion_rate)||0,estimatedValue:Number(m==null?void 0:m.estimated_value)||0}},staleTime:1e3*60*5,enabled:!!e}),a=wr({queryKey:["clickpro-clicks",e],queryFn:async()=>{const{data:{session:f}}=await W.auth.getSession();if(!f)throw new Error("Not authenticated");const{data:p,error:y}=await W.from("click_events").select("*").eq("user_id",f.user.id).eq("industry_module",e).order("clicked_at",{ascending:!1}).limit(100);if(y)throw y;return p||[]},staleTime:1e3*60*2,enabled:!!e}),i=wr({queryKey:["clickpro-leads",e],queryFn:async()=>{const{data:{session:f}}=await W.auth.getSession();if(!f)throw new Error("Not authenticated");const{data:p,error:y}=await W.from("lead_events").select("*").eq("user_id",f.user.id).eq("industry_module",e).order("captured_at",{ascending:!1}).limit(100);if(y)throw y;return p||[]},staleTime:1e3*60*2,enabled:!!e}),o=wr({queryKey:["clickpro-tracking-links",e],queryFn:async()=>{const{data:{session:f}}=await W.auth.getSession();if(!f)throw new Error("Not authenticated");const{data:p,error:y}=await W.from("tracking_links").select("*").eq("user_id",f.user.id).eq("industry_module",e).order("created_at",{ascending:!1});if(y)throw y;return p||[]},staleTime:1e3*60*5,enabled:!!e}),l=wr({queryKey:["clickpro-settings",e],queryFn:async()=>{const{data:{session:f}}=await W.auth.getSession();if(!f)throw new Error("Not authenticated");const{data:p,error:y}=await W.from("clickpro_vertical_settings").select("*").eq("user_id",f.user.id).eq("industry_module",e).single();if(y&&y.code!=="PGRST116")throw y;return p||{id:"",...UWe}},staleTime:1e3*60*10,enabled:!!e}),c=an({mutationFn:async f=>{const{data:{session:p}}=await W.auth.getSession();if(!p)throw new Error("Not authenticated");const{data:y}=await W.rpc("generate_tracking_code"),{data:m,error:v}=await W.from("tracking_links").insert({user_id:p.user.id,scheduled_post_id:f.scheduledPostId||null,industry_module:e,tracking_code:y,original_url:f.originalUrl,link_name:f.linkName||null,link_type:f.linkType,campaign_id:f.campaignId||null}).select().single();if(v)throw v;return m},onSuccess:()=>{n.invalidateQueries({queryKey:["clickpro-tracking-links"]}),t({title:"Tracking link created",description:"Your link is now being tracked."})},onError:f=>{t({title:"Failed to create tracking link",description:f.message,variant:"destructive"})}}),u=an({mutationFn:async f=>{const{data:{session:p}}=await W.auth.getSession();if(!p)throw new Error("Not authenticated");const y={inquiry:10,contact_form:25,phone_call:40,email:20,appointment:60},{data:m,error:v}=await W.from("lead_events").insert({user_id:p.user.id,click_event_id:f.clickEventId||null,scheduled_post_id:f.scheduledPostId||null,industry_module:e,lead_type:f.leadType,lead_source:f.leadSource,platform:f.platform||null,lead_score:y[f.leadType]||10,post_group:f.postGroup||null,estimated_value:f.estimatedValue||null}).select().single();if(v)throw v;return m},onSuccess:()=>{n.invalidateQueries({queryKey:["clickpro-leads"]}),n.invalidateQueries({queryKey:["clickpro-metrics"]}),t({title:"Lead recorded",description:"Lead has been added to your pipeline."})}}),h=an({mutationFn:async f=>{const{data:{session:p}}=await W.auth.getSession();if(!p)throw new Error("Not authenticated");const y={status:f.status};
4251f.isQualified!==void 0&&(y.is_qualified=f.isQualified),f.status==="converted"&&f.actualValue&&(y.actual_value=f.actualValue,y.converted_at=new Date().toISOString());const{data:m,error:v}=await W.from("lead_events").update(y).eq("id",f.leadId).eq("user_id",p.user.id).select().single();if(v)throw v;return m},onSuccess:()=>{n.invalidateQueries({queryKey:["clickpro-leads"]}),n.invalidateQueries({queryKey:["clickpro-metrics"]})}}),d=an({mutationFn:async f=>{const{data:{session:p}}=await W.auth.getSession();if(!p)throw new Error("Not authenticated");const{data:y,error:m}=await W.from("clickpro_vertical_settings").upsert({user_id:p.user.id,industry_module:e,...f}).select().single();if(m)throw m;return y},onSuccess:()=>{n.invalidateQueries({queryKey:["clickpro-settings"]}),t({title:"Settings updated",description:"Your ClickPRO settings have been saved."})}});return{metrics:r.data,isLoadingMetrics:r.isLoading,clicks:a.data||[],isLoadingClicks:a.isLoading,leads:i.data||[],isLoadingLeads:i.isLoading,trackingLinks:o.data||[],isLoadingTrackingLinks:o.isLoading,settings:l.data,isLoadingSettings:l.isLoading,createTrackingLink:c.mutate,recordLead:u.mutate,updateLeadStatus:h.mutate,updateSettings:d.mutate,isCreatingLink:c.isPending,isRecordingLead:u.isPending,isUpdatingLead:h.isPending,isUpdatingSettings:d.isPending,refetchMetrics:r.refetch,refetchClicks:a.refetch,refetchLeads:i.refetch,refetchAll:()=>{r.refetch(),a.refetch(),i.refetch(),o.refetch()}}}function HWe({industryModule:e}){const{currentVertical:t}=Fa(),n=e||t||void 0,{metrics:r,isLoadingMetrics:a,clicks:i,isLoadingClicks:o,leads:l,isLoadingLeads:c,trackingLinks:u,settings:h,refetchAll:d}=zWe(n),p={realtor:{name:"RealtorPRO",icon:yi}}[e]||{name:"ClickPRO",icon:yc},y=p.icon,m=(h==null?void 0:h.avg_commission_value)||12e3,v=(h==null?void 0:h.avg_conversion_rate)||10,b=((r==null?void 0:r.totalLeads)||0)*(v/100)*m;return a?s.jsx("div",{className:"flex items-center justify-center py-12",children:s.jsx(ce,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"p-2 rounded-lg bg-primary/10",children:s.jsx(y,{className:"h-5 w-5 text-primary"})}),s.jsxs("div",{children:[s.jsxs("h2",{className:"text-xl font-bold text-foreground",children:[p.name," Analytics"]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Track clicks, leads, and ROI from your social content"})]})]}),s.jsxs(z,{variant:"outline",size:"sm",onClick:()=>d(),children:[s.jsx(Bt,{className:"h-4 w-4 mr-2"}),"Refresh"]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[s.jsxs(he,{className:"border-border/50",children:[s.jsx(Ce,{className:"pb-2",children:s.jsxs(Pe,{className:"text-sm font-medium text-muted-foreground flex items-center gap-2",children:[s.jsx(li,{className:"h-4 w-4 text-blue-500"}),"Total Clicks"]})}),s.jsxs(pe,{children:[s.jsx("div",{className:"text-3xl font-bold text-foreground",children:(r==null?void 0:r.totalClicks.toLocaleString())||0}),s.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Last 30 days"})]})]}),s.jsxs(he,{className:"border-border/50",children:[s.jsx(Ce,{className:"pb-2",children:s.jsxs(Pe,{className:"text-sm font-medium text-muted-foreground flex items-center gap-2",children:[s.jsx(Wn,{className:"h-4 w-4 text-emerald-500"}),"Leads Generated"]})}),s.jsxs(pe,{children:[s.jsx("div",{className:"text-3xl font-bold text-foreground",children:(r==null?void 0:r.totalLeads)||0}),s.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[l.filter(x=>x.status==="new").length," new"]})]})]}),s.jsxs(he,{className:"border-border/50",children:[s.jsx(Ce,{className:"pb-2",children:s.jsxs(Pe,{className:"text-sm font-medium text-muted-foreground flex items-center gap-2",children:[s.jsx(vn,{className:"h-4 w-4 text-orange-500"}),"Engagements"]})}),s.jsxs(pe,{children:[s.jsx("div",{className:"text-3xl font-bold text-foreground",children:(r==null?void 0:r.totalEngagements.toLocaleStr
4251ing())||0}),s.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[(r==null?void 0:r.avgEngagementRate.toFixed(1))||0,"% rate"]})]})]}),s.jsxs(he,{className:"border-border/50 bg-gradient-to-br from-emerald-500/5 to-emerald-500/10",children:[s.jsx(Ce,{className:"pb-2",children:s.jsxs(Pe,{className:"text-sm font-medium text-muted-foreground flex items-center gap-2",children:[s.jsx(to,{className:"h-4 w-4 text-emerald-500"}),"Potential ROI"]})}),s.jsxs(pe,{children:[s.jsxs("div",{className:"text-3xl font-bold text-emerald-600 dark:text-emerald-400",children:["$",b.toLocaleString()]}),s.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Based on ",v,"% conversion"]})]})]})]}),s.jsxs(Ii,{defaultValue:"clicks",className:"space-y-4",children:[s.jsxs(Hs,{children:[s.jsxs(ht,{value:"clicks",className:"gap-2",children:[s.jsx(li,{className:"h-4 w-4"}),"Clicks"]}),s.jsxs(ht,{value:"leads",className:"gap-2",children:[s.jsx(Wn,{className:"h-4 w-4"}),"Leads"]}),s.jsxs(ht,{value:"links",className:"gap-2",children:[s.jsx(yd,{className:"h-4 w-4"}),"Tracking Links"]})]}),s.jsx(ft,{value:"clicks",className:"space-y-4",children:s.jsxs(he,{children:[s.jsxs(Ce,{children:[s.jsx(Pe,{className:"text-lg",children:"Recent Clicks"}),s.jsx(Un,{children:"Click events from your social posts and tracking links"})]}),s.jsx(pe,{children:o?s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(ce,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):i.length===0?s.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[s.jsx(li,{className:"h-12 w-12 mx-auto mb-3 opacity-30"}),s.jsx("p",{children:"No clicks recorded yet"}),s.jsx("p",{className:"text-sm mt-1",children:"Clicks will appear here when your posts get engagement"})]}):s.jsx("div",{className:"space-y-3",children:i.slice(0,10).map(x=>s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-lg bg-muted/50 hover:bg-muted transition-colors",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:K("p-2 rounded-full",x.device_type==="mobile"?"bg-blue-500/10":"bg-gray-500/10"),children:s.jsx(li,{className:K("h-4 w-4",x.device_type==="mobile"?"text-blue-500":"text-gray-500")})}),s.jsxs("div",{children:[s.jsx("p",{className:"font-medium text-sm text-foreground",children:x.click_source==="cta_link"?"CTA Link Click":"Post Click"}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:[x.platform," • ",x.device_type||"unknown",x.country&&` • ${x.country}`]})]})]}),s.jsxs("div",{className:"text-right",children:[s.jsx(je,{variant:"outline",className:"text-xs",children:x.link_type||"link"}),s.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:ge(new Date(x.clicked_at),"MMM d, h:mm a")})]})]},x.id))})})]})}),s.jsx(ft,{value:"leads",className:"space-y-4",children:s.jsxs(he,{children:[s.jsxs(Ce,{children:[s.jsx(Pe,{className:"text-lg",children:"Lead Pipeline"}),s.jsx(Un,{children:"Leads generated from your social content"})]}),s.jsx(pe,{children:c?s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(ce,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):l.length===0?s.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[s.jsx(Wn,{className:"h-12 w-12 mx-auto mb-3 opacity-30"}),s.jsx("p",{children:"No leads recorded yet"}),s.jsx("p",{className:"text-sm mt-1",children:"Leads will appear here as they come in"})]}):s.jsx("div",{className:"space-y-3",children:l.slice(0,10).map(x=>s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-lg bg-muted/50 hover:bg-muted transition-colors",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:K("p-2 rounded-full",x.status==="new"?"bg-blue-500/10":x.status==="qualified"?"bg-emerald-500/10":x.status==="converted"?"bg-green-500/10":"bg-gray-500/10"),children:s.jsx(Wn,{className:K("h-4 w-4",x.status==="new"?"text-blue-500":x.status==="qualified"?"text-emerald-500":x.status==="converted"?"text-green-500":"text-gray-500")})}),s.jsxs("div",{children:[s.jsx("p",{className:"font-medium text-sm text-foreground capitalize",children:x.lead_type.replace("_"," ")}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:[x.lead_source," • ",x.platform||"direct"]})]})]}),s.jsxs("div",{className:"text-right",children:[s.jsx(je,{variant:x.status==="converted"?"default":"outline",className:K("text-xs capitalize",x.status==="new"&&"border-blue-500/50 text-blue-500",x.status==="qualified"&&"border-emerald-500/50 text-emerald-500",x.status==="converted"&&"bg-green-500"),children:x.status}),x.estimated_value&&s.jsxs("p",{className:"text-xs text-emerald-500 mt-1",children:["$",x.estimated_value.toLocaleStr
4251ing()]})]})]},x.id))})})]})}),s.jsx(ft,{value:"links",className:"space-y-4",children:s.jsxs(he,{children:[s.jsxs(Ce,{children:[s.jsx(Pe,{className:"text-lg",children:"Tracking Links"}),s.jsx(Un,{children:"Links with click tracking enabled"})]}),s.jsx(pe,{children:u.length===0?s.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[s.jsx(yd,{className:"h-12 w-12 mx-auto mb-3 opacity-30"}),s.jsx("p",{children:"No tracking links created yet"}),s.jsx("p",{className:"text-sm mt-1",children:"Create tracking links to monitor click performance"})]}):s.jsx("div",{className:"space-y-3",children:u.map(x=>s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-lg bg-muted/50 hover:bg-muted transition-colors",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"p-2 rounded-full bg-primary/10",children:s.jsx(yd,{className:"h-4 w-4 text-primary"})}),s.jsxs("div",{children:[s.jsx("p",{className:"font-medium text-sm text-foreground",children:x.link_name||x.tracking_code}),s.jsx("p",{className:"text-xs text-muted-foreground truncate max-w-[200px]",children:x.original_url})]})]}),s.jsxs("div",{className:"text-right",children:[s.jsxs("div",{className:"flex items-center gap-1 text-sm font-medium text-foreground",children:[s.jsx(li,{className:"h-3 w-3"}),x.click_count]}),x.last_clicked_at&&s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Last: ",ge(new Date(x.last_clicked_at),"MMM d")]})]})]},x.id))})})]})})]})]})}function Ji({className:e,...t}){return s.jsx("div",{className:K("animate-pulse rounded-md bg-muted",e),...t})}function VWe(e){return{id:e.id,user_id:e.user_id,post_id:e.post_id,saved_post_id:e.saved_post_id,source:e.source,industry_module:e.industry_module,trend_type:e.trend_type,platforms:e.platforms,scheduled:e.scheduled,scheduled_datetime:e.scheduled_datetime,posted_datetime:e.posted_datetime,status:e.status,platform_results:e.platform_results||{},content_snapshot:e.content_snapshot,media_snapshot:e.media_snapshot||[],repost_of_receipt_id:e.repost_of_receipt_id,created_at:e.created_at,updated_at:e.updated_at}}function GWe(e=50){return wr({queryKey:["post-receipts",e],queryFn:async()=>{const{data:{user:t}}=await W.auth.getUser();if(!t)throw new Error("Not authenticated");const{data:n,error:r}=await W.from("post_receipts").select("*").order("created_at",{ascending:!1}).limit(e);if(r)throw r;return(n||[]).map(a=>VWe(a))}})}function YWe(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const WG=F.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),hf=()=>{const e=F.useContext(WG);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};YWe(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,100%,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,-100%,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(-100%,0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(100%,0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
4252[data-state=closed]
4253){opacity:0}
4253[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,100%,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,100%,0)}}@keyframes slideFromTop{from{transform:translate3d(0,-100%,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,-100%,0)}}@keyframes slideFromLeft{from{transform:translate3d(-100%,0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(-100%,0,0)}}@keyframes slideFromRight{from{transform:translate3d(100%,0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(100%,0,0)}}`);const KWe=24,XWe=typeof window<"u"?g.useLayoutEffect:g.useEffect;function g3(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}function QWe(){return bA(/^Mac/)}function JWe(){return bA(/^iPhone/)}function y3(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function ZWe(){return bA(/^iPad/)||QWe()&&navigator.maxTouchPoints>1}function qG(){return JWe()||ZWe()}function bA(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):void 0}const uk=typeof document<"u"&&window.visualViewport;function v3(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function UG(e){for(v3(e)&&(e=e.parentElement);e&&!v3(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const eqe=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let ov=0,dk;function tqe(e={}){let{isDisabled:t}=e;XWe(()=>{if(!t)return ov++,ov===1&&qG()&&(dk=nqe()),()=>{ov--,ov===0&&(dk==null||dk())}},[t])}function nqe(){let e,t=0,n=d=>{e=UG(d.target),!(e===document.documentElement&&e===document.body)&&(t=d.changedTouches[0].pageY)},r=d=>{if(!e||e===document.documentElement||e===document.body){d.preventDefault();return}let f=d.changedTouches[0].pageY,p=e.scrollTop,y=e.scrollHeight-e.clientHeight;y!==0&&((p<=0&&f>t||p>=y&&f<t)&&d.preventDefault(),t=f)},a=d=>{let f=d.target;lC(f)&&f!==document.activeElement&&(d.preventDefault(),f.style.transform="translateY(-2000px)",f.focus(),requestAnimationFrame(()=>{f.style.transform=""}))},i=d=>{let f=d.target;lC(f)&&(f.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{f.style.transform="",uk&&(uk.height<window.innerHeight?requestAnimationFrame(()=>{b3(f)}):uk.addEventListener("resize",()=>b3(f),{once:!0}))}))},o=()=>{window.scrollTo(0,0)},l=window.pageXOffset,c=window.pageYOffset,u=g3(rqe(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let h=g3(Wf(document,"touchstart",n,{passive:!1,capture:!0}),Wf(document,"touchmove",r,{passive:!1,capture:!0}),Wf(document,"touchend",a,{passive:!1,capture:!0}),Wf(document,"focus",i,!0),Wf(window,"scroll",o));return()=>{u(),h(),window.scrollTo(l,c)}}function rqe(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function Wf(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function b3(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let n=UG(e);if(n!==document.documentElement&&n!==document.body&&n!==e){let r=n.getBoundingClientRect().top,a=e.getBoundingClientRect().top,i=e.getBoundingClientRect().bottom;const o=n.getBoundingClientRect().bottom+KWe;i>o&&(n.scrollTop+=a-r)}e=n.parentElement}}function lC(e){return e instanceof HTMLInputElement&&!eqe.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function aqe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function sqe(...e){return t=>e.forEach(n=>aqe(n,t))}function zG(...e){return g.useCallback(sqe(...e),e)}const HG=new WeakMap;function Qn(e,t,n=!1){if(!e||!(e instanceof HTMLElement))return;let r={};Object.entries(t).forEach(([a,i])=>{if(a.startsWith("--")){e.style.setProperty(a,i);return}r[a]=e.style[a],e.style[a]=i}),!n&&HG.set(e,r)}function iqe(e,t){if(!e||!(e instanceof HTMLElement))return;let n=HG.get(e);n&&(e.style[t]=n[t])}const Jn=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function lv(e,t){if(!e)return null;const n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform;let a=r.match(/^matrix3d\((.+)\)$/);return a?parseFloat(a[1].split(", ")[Jn(t)?13:12]):(a=r.match(/^matrix\((.+)\)$/),a?parseFloat(a[1].split(", ")[Jn(t)?5:4]):null)}function oqe(e){return 8*(Math.log(e+1)-2)}function hk(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function lqe(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}const pn={DURATION:.5,EASE:[.32,.72,0,1]},VG=.4,cqe=.25,uqe=100,GG=8,rc=16,cC=26,fk="vaul-dragging";function YG(e){const t=F.useRef(e);return F.useEffect(()=>{t.current=e}),F.useMemo(()=>(...n)=>t.current==null?void 0:t.current.call(t,...n),[])}function dqe({defaultProp:e,onChange:t}){const n=F.useState(e),[r]=n,a=F.useRef(r),i=YG(t);return F.useEffect(()=>{a.current!==r&&(i(r),a.current=r)},[r,a,i]),n}function KG({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,a]=dqe({defaultProp:t,onChange:n}),i=e!==void 0,o=i?e:r,l=YG(n),c=F.useCallback(u=>{if(i){const d=typeof u=="function"?u(e):u;d!==e&&l(d)}else a(u)},[i,e,a,l]);return[o,c]}function hqe({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:a,fadeFromIndex:i,onSnapPointChange:o,direction:l="bottom",container:c,snapToSequentialPoint:u}){const[h,d]=KG({prop:e,defaultProp:n==null?void 0:n[0],onChange:t}),[f,p]=F.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);F.useEffect(()=>{function S(){p({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",S),()=>window.removeEventListener("resize",S)},[]);const y=F.useMemo(()=>h===(n==null?void 0:n[n.length-1])||null,[n,h]),m=F.useMemo(()=>n==null?void 0:n.findIndex(S=>S===h),[n,h]),v=n&&n.length>0&&(i||i===0)&&!Number.isNaN(i)&&n[i]===h||!n,b=F.useMemo(()=>{const S=c?{width:c.getBoundingClientRect().width,height:c.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var N;return(N=n==null?void 0:n.map(C=>{const M=typeof C=="string";let O=0;if(M&&(O=parseInt(C,10)),Jn(l)){const $=M?O:f?C*S.height:0;return f?l==="bottom"?S.height-$:-S.height+$:$}const D=M?O:f?C*S.width:0;return f?l==="right"?S.width-D:-S.width+D:D}))!=null?N:[]},[n,f,c]),x=F.useMemo(()=>m!==null?b==null?void 0:b[m]:null,[b,m]),w=F.useCallback(S=>{var N;const C=(N=b==null?void 0:b.findIndex(M=>M===S))!=null?N:null;o(C),Qn(r.current,{transition:`transform ${pn.DURATION}s cubic-bezier(${pn.EASE.join(",")})`,transform:Jn(l)?`translate3d(0, ${S}px, 0)`:`translate3d(${S}px, 0, 0)`}),b&&C!==b.length-1&&C!==i&&C<i?Qn(a.current,{transition:`opacity ${pn.DURATION}s cubic-bezier(${pn.EASE.join(",")})`,opacity:"0"}):Qn(a.current,{transition:`opacity ${pn.DURATION}s cubic-bezier(${pn.EASE.join(",")})`,opacity:"1"}),d(n==null?void 0:n[Math.max(C,0)])},[r.current,n,b,i,a,d]);F.useEffect(()=>{if(h||e){var S;const N=(S=n==null?void 0:n.findIndex(C=>C===e||C===h))!=null?S:-1;b&&N!==-1&&typeof b[N]=="number"&&w(b[N])}},[h,e,n,b,w]);function _({draggedDistance:S,closeDrawer:N,velocity:C,dismissible:M}){if(i===void 0)return;const O=l==="bottom"||l==="right"?(x??0)-S:(x??0)+S,D=m===i-1,$=m===0,R=S>0;if(D&&Qn(a.current,{transition:`opacity ${pn.DURATION}s cubic-bezier(${pn.EASE.join(",")})`}),!u&&C>2&&!R){M?N():w(b[0]);return}if(!u&&C>2&&R&&b&&n){w(b[n.length-1]);return}const I=b==null?void 0:b.reduce((A,E)=>typeof A!="number"||typeof E!="number"?A:Math.abs(E-O)<Math.abs(A-O)?E:A),P=Jn(l)?window.innerHeight:window.innerWidth;if(C>VG&&Math.abs(S)<P*.4){const A=R?1:-1;if(A>0&&y){w(b[n.length-1]);return}if($&&A<0&&M&&N(),m===null)return;w(b[m+A]);return}w(I)}function k({draggedDistance:S}){if(x===null)return;const N=l==="bottom"||l==="right"?x-S:x+S;(l==="bottom"||l==="right")&&N<b[b.length-1]||(l==="top"||l==="left")&&N>b[b.length-1]||Qn(r.current,{transform:Jn(l)?`translate3d(0, ${N}px, 0)`:`translate3d(${N}px, 0, 0)`})}function j(S,N){if(!n||typeof m!="number"||!b||i===void 0)return null;const C=m===i-1;if(m>=i&&N)return 0;if(C&&!N)return 1;if(!v&&!C)return null;const O=C?m+1:m-1,D=C?b[O]-b[O-1]:b[O+1]-b[O],$=S/Math.abs(D);return C?1-$:$}return{isLastSnapPoint:y,activeSnapPoint:h,shouldFade:v,getPercentageDragged:j,setActiveSnapPoint:d,activeSnapPointIndex:m,onRelease:_,onDrag:k,snapPointsOffset:b}}const fqe=()=>()=>{};
4253function pqe(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:a}=hf(),i=F.useRef(null),o=g.useMemo(()=>document.body.style.backgroundColor,[]);function l(){return(window.innerWidth-cC)/window.innerWidth}F.useEffect(()=>{if(t&&n){i.current&&clearTimeout(i.current);const c=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!c)return;lqe(r&&!a?hk(document.body,{background:"black"}):fqe,hk(c,{transformOrigin:Jn(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${pn.DURATION}s`,transitionTimingFunction:`cubic-bezier(${pn.EASE.join(",")})`}));const u=hk(c,{borderRadius:`${GG}px`,overflow:"hidden",...Jn(e)?{transform:`scale(${l()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${l()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{u(),i.current=window.setTimeout(()=>{o?document.body.style.background=o:document.body.style.removeProperty("background")},pn.DURATION*1e3)}}},[t,n,o])}let qf=null;function mqe({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:a,noBodyStyles:i}){const[o,l]=F.useState(()=>typeof window<"u"?window.location.href:""),c=F.useRef(0),u=F.useCallback(()=>{if(y3()&&qf===null&&e&&!i){qf={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:d,innerHeight:f}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-c.current}px`,left:`${-d}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const p=f-window.innerHeight;p&&c.current>=f&&(document.body.style.top=`${-(c.current+p)}px`)}),300)}},[e]),h=F.useCallback(()=>{if(y3()&&qf!==null&&!i){const d=-parseInt(document.body.style.top,10),f=-parseInt(document.body.style.left,10);Object.assign(document.body.style,qf),window.requestAnimationFrame(()=>{if(a&&o!==window.location.href){l(window.location.href);return}window.scrollTo(f,d)}),qf=null}},[o]);return F.useEffect(()=>{function d(){c.current=window.scrollY}return d(),window.addEventListener("scroll",d),()=>{window.removeEventListener("scroll",d)}},[]),F.useEffect(()=>{n||!r||(e?(!window.matchMedia("(display-mode: standalone)").matches&&u(),t||window.setTimeout(()=>{h()},500)):h())},[e,r,o,t,n,u,h]),{restorePositionSetting:h}}function XG({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:a,snapPoints:i,shouldScaleBackground:o=!1,setBackgroundColorOnScale:l=!0,closeThreshold:c=cqe,scrollLockTimeout:u=uqe,dismissible:h=!0,handleOnly:d=!1,fadeFromIndex:f=i&&i.length-1,activeSnapPoint:p,setActiveSnapPoint:y,fixed:m,modal:v=!0,onClose:b,nested:x,noBodyStyles:w,direction:_="bottom",defaultOpen:k=!1,disablePreventScroll:j=!0,snapToSequentialPoint:S=!1,preventScrollRestoration:N=!1,repositionInputs:C=!0,onAnimationEnd:M,container:O,autoFocus:D=!1}){var $,R;const[I=!1,P]=KG({defaultProp:k,prop:e,onChange:$e=>{t==null||t($e),!$e&&!x&&Ie(),setTimeout(()=>{M==null||M($e)},pn.DURATION*1e3),$e&&!v&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),$e||(document.body.style.pointerEvents="auto")}}),[A,E]=F.useState(!1),[T,L]=F.useState(!1),[B,H]=F.useState(!1),G=F.useRef(null),Z=F.useRef(null),le=F.useRef(null),ue=F.useRef(null),re=F.useRef(null),q=F.useRef(!1),U=F.useRef(null),Q=F.useRef(0),J=F.useRef(!1),Y=F.useRef(0),oe=F.useRef(null),ve=F.useRef((($=oe.current)==null?void 0:$.getBoundingClientRect().height)||0),De=F.useRef(((R=oe.current)==null?void 0:R.getBoundingClientRect().width)||0),Le=F.useRef(0),He=F.useCallback($e=>{i&&$e===ne.length-1&&(Z.current=new Date)},[]),{activeSnapPoint:vt,activeSnapPointIndex:lt,setActiveSnapPoint:Pt,onRelease:te,snapPointsOffset:ne,onDrag:ye,shouldFade:Ge,getPercentageDragged:st}=hqe({snapPoints:i,activeSnapPointProp:p,setActiveSnapPointProp:y,drawerRef:oe,fadeFromIndex:f,overlayRef:G,onSnapPointChange:He,direction:_,container:O,snapToSequentialPoint:S});tqe({isDisabled:!I||T||!v||B||!A||!C||!j});const{restorePositionSetting:Ie}=mqe({isOpen:I,modal:v,nested:x,hasBeenOpened:A,preventScrollRestoration:N,noBodyStyles:w});function St(){return(window.innerWidth-cC)/window.innerWidth}function qr($e){var et,bt;!h&&!i||oe.current&&!oe.current.contains($e.target)||(ve.current=((et=oe.current)==null?void 0:et.getBoundingClientRect().height)||0,De.current=((bt=oe.current)==null?void 0:bt.getBoundingClientRect().width)||0,L(!0),le.current=ne
4253w Date,qG()&&window.addEventListener("touchend",()=>q.current=!1,{once:!0}),$e.target.setPointerCapture($e.pointerId),Q.current=Jn(_)?$e.pageY:$e.pageX)}function qe($e,et){var bt,Ot;let ae=$e;const At=(bt=window.getSelection())==null?void 0:bt.toString(),cn=oe.current?lv(oe.current,_):null,Re=new Date;if(ae.hasAttribute("data-vaul-no-drag")||ae.closest("[data-vaul-no-drag]"))return!1;if(_==="right"||_==="left")return!0;if(Z.current&&Re.getTime()-Z.current.getTime()<500)return!1;if(cn!==null&&(_==="bottom"?cn>0:cn<0))return!0;if(At&&At.length>0)return!1;if(Re.getTime()-((Ot=re.current)==null?void 0:Ot.getTime())<u&&cn===0||et)return re.current=Re,!1;for(;ae;){if(ae.scrollHeight>ae.clientHeight){if(ae.scrollTop!==0)return re.current=new Date,!1;if(ae.getAttribute("role")==="dialog")return!0}ae=ae.parentNode}return!0}function ln($e){if(oe.current&&T){const et=_==="bottom"||_==="right"?1:-1,bt=(Q.current-(Jn(_)?$e.pageY:$e.pageX))*et,Ot=bt>0,ae=i&&!h&&!Ot;if(ae&&lt===0)return;const At=Math.abs(bt),cn=document.querySelector("[data-vaul-drawer-wrapper]"),Re=_==="bottom"||_==="top"?ve.current:De.current;let Ye=At/Re;const nt=st(At,Ot);if(nt!==null&&(Ye=nt),ae&&Ye>=1||!q.current&&!qe($e.target,Ot))return;if(oe.current.classList.add(fk),q.current=!0,Qn(oe.current,{transition:"none"}),Qn(G.current,{transition:"none"}),i&&ye({draggedDistance:bt}),Ot&&!i){const ct=oqe(bt),zt=Math.min(ct*-1,0)*et;Qn(oe.current,{transform:Jn(_)?`translate3d(0, ${zt}px, 0)`:`translate3d(${zt}px, 0, 0)`});return}const Zt=1-Ye;if((Ge||f&&lt===f-1)&&(r==null||r($e,Ye),Qn(G.current,{opacity:`${Zt}`,transition:"none"},!0)),cn&&G.current&&o){const ct=Math.min(St()+Ye*(1-St()),1),zt=8-Ye*8,Gn=Math.max(0,14-Ye*14);Qn(cn,{borderRadius:`${zt}px`,transform:Jn(_)?`scale(${ct}) translate3d(0, ${Gn}px, 0)`:`scale(${ct}) translate3d(${Gn}px, 0, 0)`,transition:"none"},!0)}if(!i){const ct=At*et;Qn(oe.current,{transform:Jn(_)?`translate3d(0, ${ct}px, 0)`:`translate3d(${ct}px, 0, 0)`})}}}F.useEffect(()=>{var $e;function et(){if(!oe.current||!C)return;const bt=document.activeElement;if(lC(bt)||J.current){var Ot;const ae=((Ot=window.visualViewport)==null?void 0:Ot.height)||0,At=window.innerHeight;let cn=At-ae;const Re=oe.current.getBoundingClientRect().height||0,Ye=Re>At*.8;Le.current||(Le.current=Re);const nt=oe.current.getBoundingClientRect().top;if(Math.abs(Y.current-cn)>60&&(J.current=!J.current),i&&i.length>0&&ne&&lt){const Zt=ne[lt]||0;cn+=Zt}if(Y.current=cn,Re>ae||J.current){const Zt=oe.current.getBoundingClientRect().height;let ct=Zt;Zt>ae&&(ct=ae-(Ye?nt:cC)),m?oe.current.style.height=`${Zt-Math.max(cn,0)}px`:oe.current.style.height=`${Math.max(ct,ae-nt)}px`}else oe.current.style.height=`${Le.current}px`;i&&i.length>0&&!J.current?oe.current.style.bottom="0px":oe.current.style.bottom=`${Math.max(cn,0)}px`}}return($e=window.visualViewport)==null||$e.addEventListener("resize",et),()=>{var bt;return(bt=window.visualViewport)==null?void 0:bt.removeEventListener("resize",et)}},[lt,i,ne]);function Tt($e){gr(),b==null||b(),$e||P(!1),setTimeout(()=>{i&&Pt(i[0])},pn.DURATION*1e3)}function Pr(){if(!oe.current)return;const $e=document.querySelector("[data-vaul-drawer-wrapper]"),et=lv(oe.current,_);Qn(oe.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${pn.DURATION}s cubic-bezier(${pn.EASE.join(",")})`}),Qn(G.current,{transition:`opacity ${pn.DURATION}s cubic-bezier(${pn.EASE.join(",")})`,opacity:"1"}),o&&et&&et>0&&I&&Qn($e,{borderRadius:`${GG}px`,overflow:"hidden",...Jn(_)?{transform:`scale(${St()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${St()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${pn.DURATION}s`,transitionTimingFunction:`cubic-bezier(${pn.EASE.join(",")})`},!0)}function gr(){!T||!oe.current||(oe.current.classList.remove(fk),q.current=!1,L(!1),ue.current=new Date)}function Tr($e){if(!T||!oe.current)return;oe.current.classList.remove(fk),q.current=!1,L(!1),ue.current=new Date;const et=lv(oe.current,_);
4253if(!qe($e.target,!1)||!et||Number.isNaN(et)||le.current===null)return;const bt=ue.current.getTime()-le.current.getTime(),Ot=Q.current-(Jn(_)?$e.pageY:$e.pageX),ae=Math.abs(Ot)/bt;if(ae>.05&&(H(!0),setTimeout(()=>{H(!1)},200)),i){te({draggedDistance:Ot*(_==="bottom"||_==="right"?1:-1),closeDrawer:Tt,velocity:ae,dismissible:h}),a==null||a($e,!0);return}if(_==="bottom"||_==="right"?Ot>0:Ot<0){Pr(),a==null||a($e,!0);return}if(ae>VG){Tt(),a==null||a($e,!1);return}var At;const cn=Math.min((At=oe.current.getBoundingClientRect().height)!=null?At:0,window.innerHeight);var Re;const Ye=Math.min((Re=oe.current.getBoundingClientRect().width)!=null?Re:0,window.innerWidth),nt=_==="left"||_==="right";if(Math.abs(et)>=(nt?Ye:cn)*c){Tt(),a==null||a($e,!1);return}a==null||a($e,!0),Pr()}F.useEffect(()=>(I&&(Qn(document.documentElement,{scrollBehavior:"auto"}),Z.current=new Date),()=>{iqe(document.documentElement,"scrollBehavior")}),[I]);function kn($e){const et=$e?(window.innerWidth-rc)/window.innerWidth:1,bt=$e?-rc:0;U.current&&window.clearTimeout(U.current),Qn(oe.current,{transition:`transform ${pn.DURATION}s cubic-bezier(${pn.EASE.join(",")})`,transform:`scale(${et}) translate3d(0, ${bt}px, 0)`}),!$e&&oe.current&&(U.current=setTimeout(()=>{const Ot=lv(oe.current,_);Qn(oe.current,{transition:"none",transform:Jn(_)?`translate3d(0, ${Ot}px, 0)`:`translate3d(${Ot}px, 0, 0)`})},500))}function _a($e,et){if(et<0)return;const bt=(window.innerWidth-rc)/window.innerWidth,Ot=bt+et*(1-bt),ae=-rc+et*rc;Qn(oe.current,{transform:Jn(_)?`scale(${Ot}) translate3d(0, ${ae}px, 0)`:`scale(${Ot}) translate3d(${ae}px, 0, 0)`,transition:"none"})}function Yt($e,et){const bt=Jn(_)?window.innerHeight:window.innerWidth,Ot=et?(bt-rc)/bt:1,ae=et?-rc:0;et&&Qn(oe.current,{transition:`transform ${pn.DURATION}s cubic-bezier(${pn.EASE.join(",")})`,transform:Jn(_)?`scale(${Ot}) translate3d(0, ${ae}px, 0)`:`scale(${Ot}) translate3d(${ae}px, 0, 0)`})}return F.createElement(N2,{defaultOpen:k,onOpenChange:$e=>{!h&&!$e||($e?E(!0):Tt(!0),P($e))},open:I},F.createElement(WG.Provider,{value:{activeSnapPoint:vt,snapPoints:i,setActiveSnapPoint:Pt,drawerRef:oe,overlayRef:G,onOpenChange:t,onPress:qr,onRelease:Tr,onDrag:ln,dismissible:h,handleOnly:d,isOpen:I,isDragging:T,shouldFade:Ge,closeDrawer:Tt,onNestedDrag:_a,onNestedOpenChange:kn,onNestedRelease:Yt,keyboardIsOpen:J,modal:v,snapPointsOffset:ne,direction:_,shouldScaleBackground:o,setBackgroundColorOnScale:l,noBodyStyles:w,container:O,autoFocus:D}},n))}const QG=F.forwardRef(function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:a,shouldFade:i,isOpen:o,modal:l}=hf(),c=zG(t,n),u=r&&r.length>0;return l?F.createElement(Gw,{onMouseUp:a,ref:c,"data-vaul-overlay":"","data-vaul-snap-points":o&&u?"true":"false","data-vaul-snap-points-overlay":o&&i?"true":"false",...e}):(typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),null)});QG.displayName="Drawer.Overlay";const JG=F.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},a){const{drawerRef:i,onPress:o,onRelease:l,onDrag:c,keyboardIsOpen:u,snapPointsOffset:h,modal:d,isOpen:f,direction:p,snapPoints:y,container:m,handleOnly:v,autoFocus:b}=hf(),[x,w]=F.useState(!1),_=zG(a,i),k=F.useRef(null),j=F.useRef(null),S=F.useRef(!1),N=y&&y.length>0;pqe();const C=(O,D,$=0)=>{if(S.current)return!0;const R=Math.abs(O.y),I=Math.abs(O.x),P=I>R,A=["bottom","right"].includes(D)?1:-1;if(D==="left"||D==="right"){if(!(O.x*A<0)&&I>=0&&I<=$)return P}else if(!(O.y*A<0)&&R>=0&&R<=$)return!P;return S.current=!0,!0};F.useEffect(()=>{N&&window.requestAnimationFrame(()=>{w(!0)})},[]);function M(O){k.current=null,S.current=!1,l(O)}return F.createElement(Yw,{"data-vaul-drawer-direction":p,"data-vaul-drawer":"","data-vaul-delayed-snap-points":x?"true":"false","data-vaul-snap-points":f&&N?"true":"false","data-vaul-custom-container":m?"true":"false",...r,ref:_,style:h&&h.length>0?{"--snap-point-height":`${h[0]}px`,...t}:t,onPointerDown:O=>{v||(r.onPointerDown==null||r.onPointerDown.call(r,O),k.current={x:O.pageX,y:O.pageY},o(O))},onOpenAutoFocus:O=>{n==null||n(O),b||O.preventDefault()},onPointerDownOutside:O=>{if(e==null||e(O),!d||O.defaultPrevented){O.preventDefault();return}u.current&&(u.current=!1)},onFocusOutside:O=>{if(!d){O.preventDefault();return}},onPointerMove:O=>{if(j.current=O,v||(r.onPointerMove==null||r.onPointerMove.call(r,O),!k.current))return;const D=O.pageY-k.current.y,$=O.pageX-k.current.x,R=O.pointerType==="touch"?10:2;C({x:$,y:D},p,R)?c(O):(Math.abs($)>R||Math.abs(D)>R)&&(k.current=null)},onPointerUp:O=>{r.onPointerUp==null||r.onPointerUp.call(r,O),k.current=null,S.current=!1,l(O)},onPointerOut:O=>{r.onPointerOut==null||r.onPointerOut.call(r,O),M(j.current)},onContextMenu:O=>{r.onContextMenu==null||r.onContextMenu.call(r,O),M(j.current)}})});JG.displayName="Drawer.Content";const gqe=250,yqe=120,ZG=F.forwardRef(function({preventCycle:e=!1,children:t,...n},r){const{closeDrawer:a,isDragging:i,snapPoints:o,activeSnapPoint:l,setActiveSnapPoint:c,dismissible:u,handleOnly:h,isOpen:d,onPress:f,onDrag:p}=hf(),y=F.useRef(null),m=F.useRef(!1);function v(){if(m.current){w();return}window.setTimeout(()=>{b()},yqe)}function b(){if(i||e||m.current){w();return}if(w(),(!o||o.length===0)&&u){a();return}if(l===o[o.length-1]&&u){a();return}const k=o.findIndex(S=>S===l);if(k===-1)return;const j=o[k+1];c(j)}function x(){y.current=window.setTimeout(()=>{m.current=!0},gqe)}function w(){window.clearTimeout(y.current),m.current=!1}return F.createElement("div",{onClick:v,onPointerCancel:w,onPointerDown:_=>{h&&f(_),x()},onPointerMove:_=>{h&&p(_)},ref:r,"data-vaul-drawer-visible":d?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},F.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});ZG.displayName="Drawer.Handle";function vqe({onDrag:e,onOpenChange:t,...n}){const{onNestedDrag:r,onNestedOpenChange:a,onNestedRelease:i}=hf();if(!r)throw new Error("Drawer.NestedRoot must be placed in another drawer");return F.createElement(XG,{nested:!0,onClose:()=>{a(!1)},onDrag:(o,l)=>{r(o,l),e==null||e(o,l)},onOpenChange:o=>{o&&a(o)},onRelease:i,...n})}function bqe(e){const t=hf(),{container:n=t.container,...r}=e;return F.createElement(P2,{container:n,...r})}const $i={Root:XG,NestedRoot:vqe,Content:JG,Overlay:QG,Trigger:C2,Portal:bqe,Handle:ZG,Close:Qw,Title:Kw,Description:Xw}
4253,xA=({shouldScaleBackground:e=!0,...t})=>s.jsx($i.Root,{shouldScaleBackground:e,...t});xA.displayName="Drawer";const xqe=$i.Portal,wqe=$i.Close,eY=g.forwardRef(({className:e,...t},n)=>s.jsx($i.Overlay,{ref:n,className:K("fixed inset-0 z-50 bg-black/80",e),...t}));eY.displayName=$i.Overlay.displayName;const wA=g.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(xqe,{children:[s.jsx(eY,{}),s.jsxs($i.Content,{ref:r,className:K("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",e),...n,children:[s.jsx("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),t]})]}));wA.displayName="DrawerContent";const _A=({className:e,...t})=>s.jsx("div",{className:K("grid gap-1.5 p-4 text-center sm:text-left",e),...t});_A.displayName="DrawerHeader";const kA=({className:e,...t})=>s.jsx("div",{className:K("mt-auto flex flex-col gap-2 p-4",e),...t});kA.displayName="DrawerFooter";const jA=g.forwardRef(({className:e,...t},n)=>s.jsx($i.Title,{ref:n,className:K("text-lg font-semibold leading-none tracking-tight",e),...t}));jA.displayName=$i.Title.displayName;const SA=g.forwardRef(({className:e,...t},n)=>s.jsx($i.Description,{ref:n,className:K("text-sm text-muted-foreground",e),...t}));SA.displayName=$i.Description.displayName;const _qe={linkedin:s.jsx(vP,{className:"h-4 w-4 text-[#0A66C2]"}),facebook:s.jsx(fP,{className:"h-4 w-4 text-[#1877F2]"}),instagram:s.jsx(mP,{className:"h-4 w-4 text-[#E4405F]"}),threads:s.jsx(Qd,{className:"h-4 w-4"})},kqe={linkedin:"LinkedIn",facebook:"Facebook",instagram:"Instagram",threads:"Threads"},x3={manual:{label:"Manual Post",icon:s.jsx(dr,{className:"h-4 w-4"}),color:"bg-muted text-muted-foreground"},clickpro:{label:"ClickPRO",icon:s.jsx(Tn,{className:"h-4 w-4"}),color:"bg-blue-500/10 text-blue-600"},trendspro:{label:"TrendsPRO",icon:s.jsx(vn,{className:"h-4 w-4"}),color:"bg-purple-500/10 text-purple-600"},repost:{label:"Repost",icon:s.jsx(Bt,{className:"h-4 w-4"}),color:"bg-orange-500/10 text-orange-600"},template:{label:"Template",icon:s.jsx(Rl,{className:"h-4 w-4"}),color:"bg-emerald-500/10 text-emerald-600"}},w3={posted:{label:"Posted Successfully",icon:s.jsx(ls,{className:"h-5 w-5"}),color:"text-emerald-600",bg:"bg-emerald-500/10"},pending:{label:"Pending",icon:s.jsx(pr,{className:"h-5 w-5"}),color:"text-amber-600",bg:"bg-amber-500/10"},partial:{label:"Partial Success",icon:s.jsx(Ai,{className:"h-5 w-5"}),color:"text-amber-600",bg:"bg-amber-500/10"},failed:{label:"Failed",icon:s.jsx(Rh,{className:"h-5 w-5"}),color:"text-destructive",bg:"bg-destructive/10"}};function jqe({receipt:e,open:t,onClose:n}){const[r,a]=g.useState(!1);if(!e)return null;const i=w3[e.status]||w3.pending,o=x3[e.source]||x3.manual,l=e.posted_datetime||e.scheduled_datetime||e.created_at,c={id:e.id,content:e.content_snapshot,platforms:e.platforms,posted_datetime:e.posted_datetime||e.created_at,source:e.source};return s.jsxs(s.Fragment,{children:[s.jsx(xA,{open:t,onOpenChange:u=>!u&&n(),children:s.jsxs(wA,{className:"max-h-[90vh]",children:[s.jsx(_A,{className:"text-left",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:`p-2 rounded-lg ${i.bg} ${i.color}`,children:i.icon}),s.jsxs("div",{children:[s.jsx(jA,{children:i.label}),s.jsx(SA,{children:ge(new Date(l),"MMMM d, yyyy 'at' h:mm a")})]})]})}),s.jsx(ya,{className:"flex-1 px-4",children:s.jsxs("div",{className:"space-y-6 pb-4",children:[s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium mb-3",children:"Platform Results"}),s.jsx("div",{className:"space-y-2",children:e.platforms.map(u=>{var f;const h=(f=e.platform_results)==null?void 0:f[u],d=(h==null?void 0:h.success)??!1;return s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-lg border bg-card",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[_qe[u],s.jsx("span",{className:"font-medium",children:kqe[u]||u})]}),s.jsx("div",{className:"flex items-center gap-2",children:d?s.jsxs(s.Fragment,{children:[s.jsx(ls,{className:"h-4 w-4 text-emerald-600"}),s.jsx("span",{className:"text-sm text-emerald-600",children:"Posted"}),(h==null?void 0:h.externalPostId)&&s.jsx(z,{variant:"ghost",size:"sm",className:"h-7 px-2",children:s.jsx(WF,{className:"h-3 w-3"})})]}):s.jsxs(s.Fragment,{children:[s.jsx(Rh,{className:"h-4 w-4 text-destructive"}),s.jsx("span",{className:"text-sm text-destructive",children:(h==null?void 0:h.error)||"Failed"})]})})]},u)})})]}),s.jsx(ou,{}),s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium mb-3",children:"Origin"}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-sm text-muted-foreground",children:"Created by"}),s.jsxs(je,{variant:"outline",className:o.color,children:[o.icon,s.jsx("span",{className:"ml-1",children:o.label})]})]}),e.industry_module&&s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-sm text-muted-foreground",children:"Module"}),s.jsx("span",{className:"text-sm font-medium capitalize",children:e.industry_module})]}),e.trend_type&&s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-sm text-muted-foreground",children:"Trend Type"}),s.jsx("span",{className:"text-sm font-medium",children:e.trend_type})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-sm text-muted-foreground",children:"Trigger"}),s.jsx("span",{className:"text-sm font-medium",children:e.scheduled?"Scheduled":"Post Now"})]}),e.repost_of_receipt_id&&s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-sm text-muted-foreground",children:"Repost of"}),s.jsxs("span",{className:"text-sm font-mono text-muted-foreground",children:[e.repost_of_receipt_id.slice(0,8),"..."]})]})]})]}),s.jsx(ou,{}),s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium mb-3",children:"Content"}),s.jsx("div",{className:"p-3 rounded-lg border bg-muted/50",children:s.jsx("p",{className:"text-sm whitespace-pre-wrap",children:e.content_snapshot})})]})]})}),s.jsxs(kA,{className:"flex-row gap-2",children:[s.jsxs(z,{variant:"outline",className:"flex-1",onClick:()=>a(!0),children:[s.jsx(Bt,{className:"h-4 w-4 mr-2"}),"Re-Post"]}),s.jsxs(z,{variant:"outline",className:"flex-1",onClick:()=>{a(!0)},children:[s.jsx(Rl,{className:"h-4 w-4 mr-2"}),"Duplicate"]}),s.jsx(wqe,{asChild:!0,children:s.jsx(z,{variant:"secondary",children:"Close"})})]})]})}),s.jsx(SG,{open:r,onOpenChange:a,post:c,onSuccess:()=>{a(!1),n()}})]})}const Sqe={linkedin:s.jsx(vP,{className:"h-4 w-4 text-[#0A66C2]"}),facebook:s.jsx(fP,{className:"h-4 w-4 text-[#1877F2]"}),instagram:s.jsx(mP,{className:"h-4 w-4 text-[#E4405F]"}),threads:s.jsx(Qd,{className:"h-4 w-4"})},_3={manual:{label:"Manual",icon:s.jsx(dr,{className:"h-3 w-3"}),color:"bg-muted text-muted-foreground"},clickpro:{label:"ClickPRO",icon:s.jsx(Tn,{className:"h-3 w-3"}),color:"bg-blue-500/10 text-blue-600 border-blue-500/20"},trendspro:{label:"TrendsPRO",icon:s.jsx(vn,{className:"h-3 w-3"}),color:"bg-purple-500/10 text-purple-600 border-purple-500/20"},repost:{label:"Repost",icon:s.jsx(Bt,{className:"h-3 w-3"}),color:"bg-orange-500/10 text-orange-600 border-orange-500/20"},template:{label:"Template",icon:s.jsx(Rl,{className:"h-3 w-3"}),color:"bg-emerald-500/10 text-emerald-600 border-emerald-500/20"}},k3={posted:{label:"Posted",icon:s.jsx(ls,{className:"h-4 w-4"}),color:"text-emerald-600"},pending:{label:"Pending",icon:s.jsx(pr,{className:"h-4 w-4"}),color:"text-amber-600"},partial:{label:"Partial",icon:s.jsx(Ai,{className:"h-4 w-4"}),color:"text-amber-600"},failed:{label:"Failed",icon:s.jsx(Rh,{className:"h-4 w-4"}),color:"text-destructive"}};function Nqe(){const{data:e,isLoading:t,error:n,refetch:r}=GWe(50),[a,i]=g.useState(null);return t?s.jsxs(he,{children:[s.jsxs(Ce,{children:[s.jsxs(Pe,{className:"flex items-center gap-2",children:[s.jsx(dr,{className:"h-5 w-5"}),"Posting History"]}),s.jsx(Un,{children:"Track all posts published through SociePRO"})]}),s.jsx(pe,{className:"space-y-3",children:[1,2,3].map(o=>s.jsx(Ji,{className:"h-16 w-full"},o))})]}):n?s.jsxs(he,{children:[s.jsx(Ce,{children:s.jsxs(Pe,{className:"flex items-center gap-2",children:[s.jsx(dr,{className:"h-5 w-5"}),"Posting History"]})}),s.jsxs(pe,{children:[s.jsx("p",{className:"text-destructive text-sm",children:"Failed to load posting history"}),s.jsxs(z,{variant:"outline",size:"sm",onClick:()=>r(),className:"mt-2",children:[s.jsx(Bt,{className:"h-4 w-4 mr-2"}),"Retry"]})]})]}):s.jsxs(s.Fragment,{children:[s.jsxs(he,{children:[s.jsxs(Ce,{className:"flex flex-row items-center justify-between",children:[s.jsxs("div",{children:[s.jsxs(Pe,{className:"flex items-center gap-2",children:[s.jsx(dr,{className:"h-5 w-5"}),"Posting History"]}),s.jsxs(Un,{children:[(e==null?void 0:e.length)||0," posts tracked"]})]}),s.jsx(z,{variant:"ghost",size:"sm",onClick:()=>r(),children:s.jsx(Bt,{className:"h-4 w-4"})})]}),s.jsx(pe,{children:!e||e.length===0?s.jsxs("div",{className:"text-center py-8",children:[s.jsx(Se,{className:"h-12 w-12 text-muted-foreground
4253/50 mx-auto mb-3"}),s.jsx("p",{className:"text-muted-foreground",children:"No posts yet"}),s.jsx("p",{className:"text-sm text-muted-foreground/80",children:"Posts created through PostPRO, ClickPRO, or TrendsPRO will appear here"})]}):s.jsx("div",{className:"space-y-2",children:e.map(o=>s.jsx(Cqe,{receipt:o,onClick:()=>i(o)},o.id))})})]}),s.jsx(jqe,{receipt:a,open:!!a,onClose:()=>i(null)})]})}function Cqe({receipt:e,onClick:t}){const n=_3[e.source]||_3.manual,r=k3[e.status]||k3.pending,a=e.content_snapshot.slice(0,100)+(e.content_snapshot.length>100?"...":""),i=e.posted_datetime||e.scheduled_datetime||e.created_at;return s.jsxs("button",{onClick:t,className:"w-full flex items-center gap-4 p-3 rounded-lg border bg-card hover:bg-muted/50 transition-colors text-left",children:[s.jsx("div",{className:`flex-shrink-0 ${r.color}`,children:r.icon}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:a}),s.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[s.jsx("div",{className:"flex items-center gap-1",children:e.platforms.map(o=>s.jsx("span",{children:Sqe[o]||o},o))}),s.jsx("span",{className:"text-xs text-muted-foreground",children:ge(new Date(i),"MMM d, h:mm a")})]})]}),s.jsxs(je,{variant:"outline",className:`flex-shrink-0 ${n.color}`,children:[n.icon,s.jsx("span",{className:"ml-1",children:n.label})]})]})}function Pqe(){const{toast:e}=Je(),t=cs(),{data:n,isLoading:r}=wr({queryKey:["blog-leads"],queryFn:async()=>{const{data:{user:i}}=await W.auth.getUser();if(!i)throw new Error("Not authenticated");const{data:o,error:l}=await W.from("blog_leads").select("*").order("created_at",{ascending:!1});if(l)throw l;return o}}),a=an({mutationFn:async({id:i,status:o})=>{const{error:l}=await W.from("blog_leads").update({status:o}).eq("id",i);if(l)throw l},onSuccess:()=>{t.invalidateQueries({queryKey:["blog-leads"]}),e({title:"Lead updated"})}});return{leads:n,isLoading:r,updateLeadStatus:a}}function Tqe(){const{toast:e}=Je();return an({mutationFn:async t=>{const{error:n}=await W.from("blog_leads").insert({blog_post_id:t.blog_post_id,user_id:t.user_id,name:t.name,email:t.email,phone:t.phone||null,message:t.message||null,cta_type:t.cta_type||null,industry_module:t.industry_module||null});if(n)throw n},onSuccess:()=>{e({title:"Message sent!",description:"We'll be in touch soon."})},onError:t=>{e({title:"Failed to submit",description:t.message,variant:"destructive"})}})}function Aqe(){const{leads:e,isLoading:t,updateLeadStatus:n}=Pqe(),r=()=>{if(!e||e.length===0)return;const i=["Name","Email","Phone","CTA Type","Module","Status","Date"],o=e.map(d=>[d.name,d.email,d.phone||"",d.cta_type||"",d.industry_module||"",d.status,ge(new Date(d.created_at),"yyyy-MM-dd HH:mm")]),l=[i,...o].map(d=>d.map(f=>`"${f}"`).join(",")).join(`
4254`),c=new Blob([l],{type:"text/csv"}),u=URL.createObjectURL(c),h=document.createElement("a");h.href=u,h.download=`blog-leads-${ge(new Date,"yyyy-MM-dd")}.csv`,h.click(),URL.revokeObjectURL(u)};if(t)return s.jsx("div",{className:"flex items-center justify-center py-12",children:s.jsx(ce,{className:"h-6 w-6 animate-spin text-primary"})});if(!e||e.length===0)return s.jsx(he,{children:s.jsxs(pe,{className:"flex flex-col items-center justify-center py-12",children:[s.jsx(Wn,{className:"h-12 w-12 text-muted-foreground mb-4"}),s.jsx("h3",{className:"font-semibold mb-1",children:"No leads yet"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Leads from your blog posts will appear here."})]})});const a=i=>i==="new"?"bg-primary/10 text-primary border-primary/20":i==="contacted"?"bg-amber-500/10 text-amber-600 border-amber-500/20":i==="closed"?"bg-emerald-500/10 text-emerald-600 border-emerald-500/20":"";return s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("p",{className:"text-sm text-muted-foreground",children:[e.length," lead",e.length!==1?"s":""]}),s.jsxs(z,{variant:"outline",size:"sm",onClick:r,className:"gap-2",children:[s.jsx(KQ,{className:"h-4 w-4"}),"Export CSV"]})]}),s.jsx(he,{children:s.jsx("div",{className:"overflow-x-auto",children:s.jsxs(so,{children:[s.jsx(io,{children:s.jsxs(Bn,{children:[s.jsx(tt,{children:"Name"}),s.jsx(tt,{children:"Email"}),s.jsx(tt,{children:"Phone"}),s.jsx(tt,{children:"CTA Type"}),s.jsx(tt,{children:"Date"}),s.jsx(tt,{children:"Status"})]})}),s.jsx(oo,{children:e.map(i=>s.jsxs(Bn,{children:[s.jsx(Qe,{className:"font-medium",children:i.name}),s.jsx(Qe,{children:s.jsx("a",{href:`mailto:${i.email}`,className:"text-primary hover:underline",children:i.email})}),s.jsx(Qe,{children:i.phone||"—"}),s.jsx(Qe,{children:i.cta_type?s.jsx(je,{variant:"outline",className:"text-xs",children:i.cta_type.replace(/_/g," ")}):"—"}),s.jsx(Qe,{className:"text-muted-foreground text-sm",children:ge(new Date(i.created_at),"MMM d, yyyy")}),s.jsx(Qe,{children:s.jsxs(jt,{value:i.status,onValueChange:o=>n.mutate({id:i.id,status:o}),children:[s.jsx(mt,{className:"w-[120px] h-8",children:s.jsx(je,{variant:"outline",className:a(i.status),children:i.status})}),s.jsxs(gt,{children:[s.jsx(Ee,{value:"new",children:"New"}),s.jsx(Ee,{value:"contacted",children:"Contacted"}),s.jsx(Ee,{value:"closed",children:"Closed"})]})]})})]},i.id))})]})})})]})}const Eqe=["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
4254ay","Saturday"];function Oqe(e){if(e===null)return"—";const t=e>=12?"PM":"AM";return`${e%12||12}:00 ${t}`}function Rqe(e){return e>=.8?{label:"High",color:"text-emerald-500"}:e>=.65?{label:"Medium",color:"text-amber-500"}:e>=.4?{label:"Low",color:"text-orange-500"}:{label:"Building",color:"text-muted-foreground"}}function Iqe({moduleId:e}){const[t,n]=g.useState(null),[r,a]=g.useState(null),[i,o]=g.useState([]),[l,c]=g.useState([]),[u,h]=g.useState(!0);g.useEffect(()=>{async function x(){h(!0);const{data:{user:w}}=await W.auth.getUser();if(!w){h(!1);return}const[_,k,j,S]=await Promise.all([W.from("module_performance_summary").select("*").eq("user_id",w.id).eq("module_id",e).order("summary_date",{ascending:!1}).limit(1).single(),W.from("module_prompt_weight_profile").select("*").eq("user_id",w.id).eq("module_id",e).single(),W.from("adaptive_schedule_log").select("applied_at, reason, posts_affected").eq("user_id",w.id).eq("module_id",e).order("applied_at",{ascending:!1}).limit(5),W.from("module_performance_summary").select("summary_date, avg_normalized_score").eq("user_id",w.id).eq("module_id",e).order("summary_date",{ascending:!0}).limit(30)]);n(_.data??null),a(k.data),o(j.data??[]),c((S.data??[]).map(N=>({date:N.summary_date,score:Math.round((N.avg_normalized_score??0)*1e3)/10}))),h(!1)}x()},[e]);const d=(t==null?void 0:t.adaptive_confidence_score)??0,{label:f,color:p}=Rqe(d),y=(r==null?void 0:r.scheduling_mode)!=="manual";if(u)return s.jsx(he,{className:"border-border/50 bg-card/50",children:s.jsxs(pe,{className:"py-12 text-center",children:[s.jsx(Ms,{className:"h-8 w-8 text-primary/30 mx-auto mb-3 animate-pulse"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading adaptive intelligence..."})]})});const m=t!==null&&t.sample_size>0,v=t!=null&&t.top_prompt_category?t.top_prompt_category.replace(/_/g," ").replace(/\b\w/g,x=>x.toUpperCase()):null,b=r!=null&&r.category_weights?Object.entries(r.category_weights).sort((x,w)=>w[1]-x[1]).slice(0,5):[];return s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between p-4 rounded-xl border border-primary/20 bg-gradient-to-r from-primary/5 to-transparent",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"p-2 rounded-lg bg-primary/10",children:s.jsx(Ms,{className:"h-5 w-5 text-primary"})}),s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold text-foreground text-sm",children:"InsightPRO Adaptive Intelligence Layer"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:y?"Optimized dynamically by InsightPRO.":"Manual scheduling mode active."})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs(je,{variant:"outline",className:`${y?"bg-primary/10 text-primary border-primary/30":"bg-muted/50 text-muted-foreground border-border"} text-xs`,children:[s.jsx(Tn,{className:"h-3 w-3 mr-1"}),y?"Adaptive":"Manual"]}),(r==null?void 0:r.version)&&s.jsxs(je,{variant:"outline",className:"text-xs text-muted-foreground border-border",children:["v",r.version]})]})]}),s.jsxs(he,{className:"border-border/50 bg-card/50",children:[s.jsx(Ce,{className:"pb-2",children:s.jsxs(Pe,{className:"text-sm font-medium text-muted-foreground flex items-center gap-2",children:[s.jsx(Se,{className:"h-4 w-4 text-primary"}),"Adaptive Confidence Score"]})}),s.jsxs(pe,{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-baseline justify-between",children:[s.jsxs("span",{className:`text-3xl font-bold ${p}`,children:[Math.round(d*100),"%"]}),s.jsx(je,{variant:"outline",className:`${p} border-current/30 text-xs`,children:f})]}),s.jsx(vm,{value:d*100,className:"h-2"}),s.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground",children:[s.jsxs("span",{children:[(t==null?void 0:t.sample_size)??0," posts analyzed"]}),s.jsx("span",{children:t!=null&&t.confidence_threshold_met?"✓ Adaptive adjustments active":`Need ${Math.max(0,30-((t==null?void 0:t.sample_size)??0))} more posts`})]})]})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(he,{className:"border-border/50 bg-card/50",children:s.jsxs(pe,{className:"pt-4 space-y-1",children:[s.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground mb-2",children:[s.jsx(ki,{className:"h-3.5 w-3.5"}),"Top Posting Day"]}),s.jsx("p",{className:"text-lg font-semibold text-foreground",children:m&&(t==null?void 0:t.top_day_of_week)!==null?Eqe[t.top_day_of_week]:"—"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Highe
4254st engagement"})]})}),s.jsx(he,{className:"border-border/50 bg-card/50",children:s.jsxs(pe,{className:"pt-4 space-y-1",children:[s.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground mb-2",children:[s.jsx(pr,{className:"h-3.5 w-3.5"}),"Optimal Time"]}),s.jsx("p",{className:"text-lg font-semibold text-foreground",children:m?Oqe((t==null?void 0:t.top_time_of_day)??null):"—"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Best performing window"})]})}),s.jsx(he,{className:"border-border/50 bg-card/50",children:s.jsxs(pe,{className:"pt-4 space-y-1",children:[s.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground mb-2",children:[s.jsx(Se,{className:"h-3.5 w-3.5"}),"Strongest Category"]}),s.jsx("p",{className:"text-lg font-semibold text-foreground capitalize",children:m&&v?v:"—"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Top performing theme"})]})}),s.jsx(he,{className:"border-border/50 bg-card/50",children:s.jsxs(pe,{className:"pt-4 space-y-1",children:[s.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground mb-2",children:[s.jsx(Oh,{className:"h-3.5 w-3.5"}),"Best Structure"]}),s.jsx("p",{className:"text-lg font-semibold text-foreground capitalize",children:m&&(t!=null&&t.top_structure_type)?t.top_structure_type:"—"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Preferred format"})]})})]}),l.length>2&&s.jsxs(he,{className:"border-border/50 bg-card/50",children:[s.jsx(Ce,{className:"pb-2",children:s.jsxs(Pe,{className:"text-sm font-medium text-muted-foreground flex items-center gap-2",children:[s.jsx(vn,{className:"h-4 w-4 text-primary"}),"Engagement Trend (30 days)"]})}),s.jsx(pe,{children:s.jsx("div",{className:"h-32",children:s.jsx(sN,{width:"100%",height:"100%",children:s.jsxs(aC,{data:l,children:[s.jsx("defs",{children:s.jsxs("linearGradient",{id:"ailGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[s.jsx("stop",{offset:"0%",stopColor:"hsl(var(--primary))",stopOpacity:.3}),s.jsx("stop",{offset:"100%",stopColor:"hsl(var(--primary))",stopOpacity:0})]})}),s.jsx(r_,{dataKey:"date",hide:!0}),s.jsx(a_,{hide:!0}),s.jsx(Zs,{contentStyle:{background:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:"8px",fontSize:"12px"},formatter:x=>[`${x}‰`,"Engagement"]}),s.jsx(Ti,{type:"monotone",dataKey:"score",stroke:"hsl(var(--primary))",strokeWidth:2,fill:"url(#ailGradient)"})]})})})})]}),b.length>0&&s.jsxs(he,{className:"border-border/50 bg-card/50",children:[s.jsx(Ce,{className:"pb-2",children:s.jsxs(Pe,{className:"text-sm font-medium text-muted-foreground flex items-center gap-2",children:[s.jsx(Ms,{className:"h-4 w-4 text-primary"}),"Prompt Weight Distribution"]})}),s.jsx(pe,{className:"space-y-3",children:b.map(([x,w])=>s.jsxs("div",{className:"space-y-1",children:[s.jsxs("div",{className:"flex justify-between text-xs",children:[s.jsx("span",{className:"text-foreground capitalize",children:x.replace(/_/g," ")}),s.jsxs("span",{className:"text-muted-foreground",children:[Math.round(w*100),"%"]})]}),s.jsx(vm,{value:w*100,className:"h-1.5"})]},x))})]}),i.length>0&&s.jsxs(he,{className:"border-border/50 bg-card/50",children:[s.jsx(Ce,{className:"pb-2",children:s.jsxs(Pe,{className:"text-sm font-medium text-muted-foreground flex items-center gap-2",children:[s.jsx(Tn,{className:"h-4 w-4 text-primary"}),"Recent Adaptive Adjustments"]})}),s.jsx(pe,{className:"space-y-3",children:i.map((x,w)=>s.jsxs("div",{children:[w>0&&s.jsx(ou,{className:"mb-3"}),s.jsxs("div",{className:"flex items-start justify-between gap-2",children:[s.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed flex-1",children:x.reason}),x.posts_affected>0&&s.jsxs(je,{variant:"outline",className:"text-xs shrink-0",children:[x.posts_affected," posts"]})]}),s.jsx("p",{className:"text-xs text-muted-foreground/60 mt-1",children:new Date(x.applied_at).toLocaleDateString()})]},w))})]}),!m&&s.jsx(he,{className:"border-dashed border-border/50",children:s.jsxs(pe,{className:"py-10 text-center space-y-3",children:[s.jsx(UF,{className:"h-8 w-8 text-muted-foreground
4254/40 mx-auto"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-foreground",children:"Building intelligence model"}),s.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"InsightPRO needs at least 30 published posts to begin adaptive optimization. Keep posting — your model is training."})]})]})}),s.jsx("p",{className:"text-xs text-muted-foreground/60 text-center",children:"Powered by InsightPRO Adaptive Timing · Adjustments are confidence-based only"})]})}const Mqe=()=>{const e=[];for(let t=0;t<7;t++)e.push({value:Math.floor(Math.random()*50)+30});return e},Dqe=()=>{const e=[];for(let t=0;t<7;t++)e.push({value:Math.floor(Math.random()*3)});return e},$qe=[{id:"1",content:"The best time to buy a home isn't when rates are perfect—it's when you find the right home for your family.",group:"Buyer Psychology",publishedDate:"2024-03-15",engagements:142,clicks:24,leads:3,engagementRate:5.8},{id:"2",content:"3 questions every first-time buyer should ask before making an offer. This could save you thousands!",group:"First-Time Buyers",publishedDate:"2024-03-12",engagements:98,clicks:18,leads:2,engagementRate:4.2},{id:"3",content:"Your home's value isn't just about square footage. Here's what really matters to buyers...",group:"Market Insights",publishedDate:"2024-03-08",engagements:87,clicks:15,leads:1,engagementRate:3.9},{id:"4",content:"Spring maintenance checklist: 5 things every homeowner should do this month",group:"Home Tips",publishedDate:"2024-03-05",engagements:76,clicks:12,leads:0,engagementRate:3.4},{id:"5",content:"Why the neighborhood matters more than the house. A lesson I learned the hard way.",group:"Neighborhood",publishedDate:"2024-03-01",engagements:65,clicks:9,leads:1,engagementRate:2.9},{id:"6",content:"Real estate isn't just my job—it's my passion. Here's why I love helping families find their dream home.",group:"Buyer Psychology",publishedDate:"2024-02-28",engagements:54,clicks:7,leads:0,engagementRate:2.4}];function Lqe(){return wr({queryKey:["content-analytics"],queryFn:async()=>{const{data:{session:e}}=await W.auth.getSession();if(!e)throw new Error("Not authenticated");const{data:t,error:n}=await W.from("scheduled_posts").select("*").eq("user_id",e.user.id).eq("is_evergreen",!0);if(n)throw console.error("Error fetching scheduled posts:",n),n;const r=(t==null?void 0:t.length)||104,a=(t==null?void 0:t.filter(c=>c.status==="published").length)||24,i=4.2,o=7,l=o*.1*4e4;return{totalPosts:r,publishedPosts:a,engagementRate:i,leadsGenerated:o,estimatedROI:l,engagementTrend:Mqe(),leadsTrend:Dqe(),topPosts:$qe}},staleTime:1e3*60*5})}function Fqe(){const e=Gt(),{data:t,isLoading:n,error:r}=Lqe(),{currentVertical:a,verticalConfig:i}=Fa();return g.useEffect(()=>{!n&&(!a||!i)&&e("/dashboard")},[n,a,i,e]),n?s.jsx(hr,{title:"InsightPRO",description:"AI-powered performance insights",children:s.jsx("div",{className:"flex items-center justify-center py-24",children:s.jsxs("div",{className:"text-center space-y-4",children:[s.jsx(ce,{className:"h-8 w-8 animate-spin text-primary mx-auto"}),s.jsx("p",{className:"text-muted-foreground",children:"Loading analytics..."})]})})}):r?s.jsx(hr,{title:"InsightPRO",description:"AI-powered performance insights",children:s.jsx(he,{className:"border-destructive/50 bg-destructive/10",children:s.jsx(pe,{className:"flex items-center gap-3 py-6",children:s.jsx("p",{className:"text-destructive",children:"Failed to load analytics. Please try again."})})})}):!a||!i?null:s.jsx(hr,{title:"InsightPRO",description:"AI-powered performance insights",children:s.jsxs("div",{className:"space-y-8",children:[s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"p-2 rounded-lg bg-primary/10",children:s.jsx(Oh,{className:"h-5 w-5 text-primary"})}),s.jsxs("div",{children:[s.jsx("h2",{className:"text-xl font-semibold text-foreground",children:"Performance Dashboard"}),s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Real-time insights for your ",i.displayName," content"]})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs(je,{variant:"outline",className:"bg-emerald-500/10 text-emerald-600 border-emerald-500/20 px-3 py-1",children:[s.jsx(yi,{className:"h-3 w-3 mr-1.5"}),i.name]}),s.jsxs(je,{variant:"outline",className:"bg-primary/5 text-primary border-primary/20 px-3 py-1",children:[s.jsx(Se,{className:"h-3 w-3 mr-1.5"}),"Premium Feature"]})]})]}),s.jsxs(Ii,{defaultValue:"history",className:"space-y-6",children:[s.jsxs(Hs,{className:"grid w-full max-w-2xl grid-cols-5",children:[s.jsxs(ht,{value:"history",className:"gap-2",children:[s.jsx(dr,{className:"h-4 w-4"}),"Posting History"]}),s.jsxs(ht,{value:"clickpro",className:"gap-2",children:[s.jsx(yc,{className:"h-4 w-4"}),"ClickPRO"]}),s.jsxs(ht,{value:"leads",className:"gap-2",children:[s.jsx(Wn,{className:"h-4 w-4"}),"Blog Leads"]}),s.jsxs(ht,{value:"adaptive",className:"gap-2",children:[s.jsx(Ms,{className:"h-4 w-4"}),"Adaptive AIL"]}),s.jsxs(ht,{value:"content",className:"gap-2",children:[s.jsx(vn,{className:"h-4 w-4"}),"Performance"]})]}),s.jsx(ft,{value:"history",className:"space-y-6",children:s.jsx(Nqe,{})}),s.jsx(ft,{value:"clickpro",className:"space-y-6",children:s.jsx(HWe,{industryModule:a})}),s.jsx(ft,{value:"leads",className:"space-y-6",children:s.jsx(Aqe,{})}),s.jsx(ft,{value:"adaptive",className:"space-y-6",children:s.jsx(Iqe,{moduleId:a})}),s.jsxs(ft,{value:"content",className:"space-y-8",children:[s.jsx(xWe,{totalPosts:(t==null?void 0:t.totalPosts)||104,publishedPosts:(t==null?void 0:t.publishedPosts)||0,engagementRate:(t==null?void 0:t.engagementRate)||0,leadsGenerated:(t==null?void 0:t.leadsGenerated)||0,estimatedROI:(t==null?void 0:t.estimatedROI)||0,engagementTrend:(t==null?void 0:t.engagementTrend)||[],leadsTrend:(t==null?void 0:t.leadsTrend)||[]}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx("div",{className:"flex-1 h-px bg-border"}),s.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[s.jsx(vn,{className:"h-4 w-4"}),s.jsx("span",{className:"text-sm font-medium",children:"Top Posts"})]}),s.jsx("div",{className:"flex-1 h-px bg-border"})]}),s.jsx(kWe,{posts:(t==null?void 0:t.topPosts)||[]}),s.jsx(qWe,{initialLeads:(t==null?void 0:t.leadsGenerated)||7,initialCommission:i.avgCommission,initialConversionRate:i.defaultConversionRate})]})]})]})})}function $u(){const[e]=Ul(),t=Gt(),{handleOAuthCallback:n}=Hl(),[r,a]=g.useState("processing"),[i,o]=g.useState(""),[l,c]=g.useState(null),u=g.useRef(!1);g.useEffect(()=>{if(u.current)return;u.current=!0,(async()=>
4254{const p=e.get("code"),y=e.get("error"),m=e.get("error_description"),v=sessionStorage.getItem("oauth_platform")||"unknown";if(y){a("error"),o(m||y||"Authorization was denied"),setTimeout(()=>t("/dashboard/settings"),3e3);return}if(!p){a("error"),o("No authorization code received"),setTimeout(()=>t("/dashboard/settings"),3e3);return}try{const b=await n(p,v);b.success?b.needsPageSelection&&b.userAccessToken?(c(b.userAccessToken),a("page-selection"),o("Select a Facebook Page to connect")):(a("success"),o(`${v.charAt(0).toUpperCase()+v.slice(1)} connected successfully!`),setTimeout(()=>t(`/dashboard/settings?connected=${encodeURIComponent(v)}`),2e3)):(a("error"),o("Failed to complete connection"),setTimeout(()=>t("/dashboard/settings"),3e3))}catch(b){a("error"),o(b.message||"An error occurred"),setTimeout(()=>t("/dashboard/settings"),3e3)}})()},[e,n,t]);const h=()=>{a("success"),o("Facebook Page connected successfully!"),setTimeout(()=>t("/dashboard/settings?connected=facebook"),2e3)},d=()=>{t("/dashboard/settings")};return s.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background",children:s.jsxs("div",{className:"text-center space-y-4",children:[r==="processing"&&s.jsxs(s.Fragment,{children:[s.jsx(ce,{className:"h-12 w-12 animate-spin mx-auto text-primary"}),s.jsx("p",{className:"text-lg",children:"Completing connection..."})]}),r==="success"&&s.jsxs(s.Fragment,{children:[s.jsx(Xd,{className:"h-12 w-12 mx-auto text-success"}),s.jsx("p",{className:"text-lg text-success",children:i}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Redirecting to settings..."})]}),r==="page-selection"&&s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"text-lg",children:i}),s.jsx(T7,{open:!0,onClose:d,userAccessToken:l,onPageSelected:h})]}),r==="error"&&s.jsxs(s.Fragment,{children:[s.jsx(Rh,{className:"h-12 w-12 mx-auto text-destructive"}),s.jsx("p",{className:"text-lg text-destructive",children:i}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Redirecting to settings..."})]})]})})}const Bqe=()=>{const[e]=Ul(),t=Gt(),{toast:n}=Je(),[r,a]=g.useState(null);return g.useEffect(()=>{(async()=>{const o=e.get("code"),l=e.get("state"),c=e.get("error"),u=e.get("error_description");if(c){console.error("LinkedIn OAuth error:",c,u),a(u||c),n({title:"Authentication Failed",description:u||"Failed to sign in with LinkedIn",variant:"destructive"}),setTimeout(()=>t("/auth"),3e3);return}if(!o){a("No authorization code received"),setTimeout(()=>t("/auth"),3e3);return}const h=sessionStorage.getItem("linkedin_auth_state");if(l!==h){console.error("State mismatch:",{received:l,stored:h}),a("Security verification failed"),setTimeout(()=>t("/auth"),3e3);return}try{const d=`${Nr}/oauth/linkedin-auth/callback`,f=sessionStorage.getItem("linkedin_auth_code_verifier"),{data:p,error:y}=await W.functions.invoke("linkedin-auth",{body:{action:"exchange-code",code:o,redirectUri:d,codeVerifier:f}});if(sessionStorage.removeItem("linkedin_auth_state"),sessionStorage.removeItem("linkedin_auth_code_verifier"),y){let m=y.message;try{if(y.context&&typeof y.context.json=="function"){const v=await y.context.json();v!=null&&v.error&&(m=v.error)}}catch{}throw new Error(m)}if(p.success&&p.magicLink){const m=new URL(p.magicLink),v=m.searchParams.get("token_hash"),b=m.searchParams.get("type")||"magiclink";if(v){const{error:x}=await W.auth.verifyOtp({token_hash:v,type:b});if(x)throw console.error("OTP verification error:",x),x}n({title:p.isNewUser?"Account Created!":"Welcome Back!",description:`Signed in as ${p.user.name||p.user.email}`}),t("/dashboard")}else{if(p.error)throw new Error(p.error);t("/dashboard")}}catch(d){console.error("LinkedIn auth callback error:",d),a(d.message||"Authentication failed"),n({title:"Authentication Failed",description:d.message||"Failed to complete LinkedIn sign-in",variant:"destructive"}),setTimeout(()=>t("/auth"),3e3)}})()},[e,t,n]),s.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:s.jsx("div",{className:"text-center",children:r?s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"text-destructive text-lg",children:r}),s.jsx("p",{className:"text-muted-foreground",children:"Redirecting to sign in..."})]}):s.jsxs("div",{className:"space-y-4",children:[s.jsx(ce,{className:"h-8 w-8 animate-spin mx-auto text-primary"}),s.jsx("p",{className:"text-muted-foreground",children:"Completing LinkedIn sign-in..."})]})})})},Wqe=()=>{const[e]=Ul(),t=Gt(),[n,r]=g.useState("processing"),[a,i]=g.useState(0),o=e.get("subscription_id"),l=30,c=1e3;return g.useEffect(()=>{if(!o){t("/pricing");return}const u=async()=>{try{const{data:{session:d}}=await W.auth.getSession();if(d!=null&&d.user){const{data:f}=await W.from("user_subscriptions").select("tier, status, updated_at").eq("user_id",d.user.id).single();if(f&&f.tier!=="free"&&f.status==="active")return r("success"),setTimeout(()=>{t("/dashboard?payment=success")},2e3),!0}else if(a>=10)return r("new_account"),!0;return i(f=>f+1),!1}catch(d){return console.error("Error checking subscription:",d),!1}};u();const h=setInterval(async()=>
4254{if(a>=l){r("error"),clearInterval(h);return}await u()},c);return()=>clearInterval(h)},[o,t,a]),s.jsxs("div",{className:"min-h-screen bg-[hsl(0_0%_6%)] flex flex-col",children:[s.jsx(ar,{title:"Processing Payment | SociePRO",description:"Your payment is being processed."}),s.jsx("header",{className:"container px-4 py-6",children:s.jsx(Ci,{variant:"light"})}),s.jsx("main",{className:"flex-1 flex items-center justify-center px-4",children:s.jsxs(fe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"max-w-md w-full text-center",children:[n==="processing"&&s.jsxs(s.Fragment,{children:[s.jsx(fe.div,{animate:{rotate:360},transition:{duration:1,repeat:1/0,ease:"linear"},className:"mx-auto w-16 h-16 mb-6",children:s.jsx(ce,{className:"w-16 h-16 text-[hsl(106_54%_87%)]"})}),s.jsx("h1",{className:"text-2xl font-bold text-white mb-3",children:"Activating Your Subscription"}),s.jsx("p",{className:"text-white/70",children:"We're confirming your subscription status. This usually takes just a few seconds..."}),s.jsx("div",{className:"mt-6 flex justify-center gap-1",children:[...Array(3)].map((u,h)=>s.jsx(fe.div,{className:"w-2 h-2 rounded-full bg-[hsl(106_54%_87%)]",animate:{opacity:[.3,1,.3]},transition:{duration:1.2,repeat:1/0,delay:h*.2}},h))})]}),n==="success"&&s.jsxs(s.Fragment,{children:[s.jsx(fe.div,{initial:{scale:0},animate:{scale:1},transition:{type:"spring",duration:.5},className:"mx-auto w-16 h-16 mb-6",children:s.jsx(ls,{className:"w-16 h-16 text-[hsl(106_54%_87%)]"})}),s.jsx("h1",{className:"text-2xl font-bold text-white mb-3",children:"Subscription Activated!"}),s.jsx("p",{className:"text-white/70",children:"Welcome to SociePRO. Redirecting you to your dashboard..."})]}),n==="new_account"&&s.jsxs(s.Fragment,{children:[s.jsx(fe.div,{initial:{scale:0},animate:{scale:1},transition:{type:"spring",duration:.5},className:"mx-auto w-16 h-16 mb-6",children:s.jsx(bw,{className:"w-16 h-16 text-[hsl(106_54%_87%)]"})}),s.jsx("h1",{className:"text-2xl font-bold text-white mb-3",children:"Check Your Email!"}),s.jsx("p",{className:"text-white/70 mb-6",children:"We've created an account using your email address. Check your inbox for a link to set your password and access your dashboard."}),s.jsx(z,{onClick:()=>t("/auth"),className:"bg-[hsl(106_54%_87%)] text-[hsl(0_0%_6%)] hover:bg-[hsl(106_54%_77%)]",children:"Go to Login"}),s.jsx("p",{className:"mt-4 text-sm text-white/50",children:"Already have an account? Log in with your existing credentials."})]}),n==="error"&&s.jsxs(s.Fragment,{children:[s.jsx(fe.div,{initial:{scale:0},animate:{scale:1},transition:{type:"spring",duration:.5},className:"mx-auto w-16 h-16 mb-6",children:s.jsx(Ai,{className:"w-16 h-16 text-[hsl(28_100%_86%)]"})}),s.jsx("h1",{className:"text-2xl font-bold text-white mb-3",children:"Taking Longer Than Expected"}),s.jsx("p",{className:"text-white/70 mb-6",children:"Your payment was received, but activation is taking longer than usual. Don't worry — your subscription will be active shortly."}),s.jsxs("div",{className:"space-y-3",children:[s.jsx(z,{onClick:()=>t("/dashboard"),className:"w-full bg-[hsl(106_54%_87%)] text-[hsl(0_0%_6%)] hover:bg-[hsl(106_54%_77%)]",children:"Go to Dashboard"}),s.jsx(z,{variant:"outline",onClick:()=>{r("processing"),i(0)},className:"w-full border-white/20 text-white hover:bg-white/10",children:"Check Again"})]}),s.jsx("p",{className:"mt-4 text-sm text-white/50",children:"If your subscription isn't active in a few minutes, please contact support."})]})]})})]})},qqe=()=>{const e=us();return g.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),s.jsx("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:s.jsxs("div",{className:"text-center",children:[s.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),s.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Oops! Page not found"}),s.jsx("a",{href:"/",className:"text-primary underline hover:text-primary/90",children:"Return to Home"})]})})};function Uqe(){const{toast:e}=Je(),t=cs(),{data:n,isLoading:r}=wr({queryKey:["auto-blog-settings"],queryFn:async()=>{const{data:{user:i}}=await W.auth.getUser();if(!i)throw new Error("Not authenticated");const{data:o,error:l}=await W.from("auto_blog_settings").select("*").eq("user_id",i.id).maybeSingle();if(l)throw l;return o}}),a=an({mutationFn:async i=>{const{data:{user:o}}=await W.auth.getUser();if(!o)throw new Error("Not authenticated");const{data:l,error:c}=await W.from("auto_blog_settings").upsert({user_id:o.id,...i},{onConflict:"user_id"}).select().single();if(c)throw c;return l},onSuccess:()=>{t.invalidateQueries({queryKey:["auto-blog-settings"]}),e({title:"Settings saved",description:"Your AutoBlogPRO settings have been updated."})},onError:i=>{e({title:"Error",description:i.message,variant:"destructive"})}});return{settings:n,isLoading:r,updateSettings:a}}function tY(){const{toast:e}=Je(),t=cs(),{data:n,isLoading:r}=wr({queryKey:["blog-posts"],queryFn:async()=>{const{data:{user:c}}=await W.auth.getUser();if(!c)throw new Error("Not authenticated");const{data:u,error:h}=await W.from("blog_posts").select("*").eq("user_id",c.id).order("created_at",{ascending:!1});if(h)throw h;return u}}),a=an({mutationFn:async c=>{const{data:{session:u}}=await W.auth.getSession();if(!u)throw new Error("Not authenticated");const h=await fetch("https://hgnuynazdzzocuwtwiez.supabase.co/functions/v1/generate-blog",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${u.access_token}`,apikey:"sb_publishable__0Zesn96s_l2w2G1z_9fxw_mY_wD58k"},body:JSON.stringify(c)});if(!h.ok){const d=await h.json();throw new Error(d.error||"Failed to generate blog")}return h.json()},onSuccess:()=>{t.invalidateQueries({queryKey:["blog-posts"]}),e({title:"Blog generated!",description:"Your new blog post is ready for review."})},onError:c=>
4254{e({title:"Generation failed",description:c.message,variant:"destructive"})}}),i=an({mutationFn:async({id:c,...u})=>{const{data:h,error:d}=await W.from("blog_posts").update(u).eq("id",c).select().single();if(d)throw d;return h},onSuccess:()=>{t.invalidateQueries({queryKey:["blog-posts"]})}}),o=an({mutationFn:async c=>{const{error:u}=await W.from("blog_posts").delete().eq("id",c);if(u)throw u},onSuccess:()=>{t.invalidateQueries({queryKey:["blog-posts"]}),e({title:"Post deleted",description:"Blog post has been removed."})}}),l=an({mutationFn:async()=>{const{data:{user:c}}=await W.auth.getUser();if(!c)throw new Error("Not authenticated");const u=`untitled-draft-${Date.now().toString(36)}`,{data:h,error:d}=await W.from("blog_posts").insert({user_id:c.id,source:"manual",title:"Untitled Draft",slug:u,content:"",excerpt:null,status:"draft"}).select().single();if(d)throw d;return h},onSuccess:()=>{t.invalidateQueries({queryKey:["blog-posts"]})},onError:c=>{e({title:"Couldn't start a new draft",description:c.message,variant:"destructive"})}});return{posts:n,isLoading:r,generateBlog:a,updatePost:i,deletePost:o,createDraftPost:l}}var o_="Checkbox",[zqe,SHe]=Hn(o_),[Hqe,NA]=zqe(o_);function Vqe(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:a,disabled:i,form:o,name:l,onCheckedChange:c,required:u,value:h="on",internal_do_not_use_render:d}=e,[f,p]=ba({prop:n,defaultProp:a??!1,onChange:c,caller:o_}),[y,m]=g.useState(null),[v,b]=g.useState(null),x=g.useRef(!1),w=y?!!o||!!y.closest("form"):!0,_={checked:f,disabled:i,setChecked:p,control:y,setControl:m,name:l,form:o,value:h,hasConsumerStoppedPropagationRef:x,required:u,defaultChecked:Tl(a)?!1:a,isFormControl:w,bubbleInput:v,setBubbleInput:b};return s.jsx(Hqe,{scope:t,..._,children:Gqe(d)?d(_):r})}var nY="CheckboxTrigger",rY=g.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},a)=>{const{control:i,value:o,disabled:l,checked:c,required:u,setControl:h,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:y}=NA(nY,e),m=Fe(a,h),v=g.useRef(c);return g.useEffect(()=>{const b=i==null?void 0:i.form;if(b){const x=()=>d(v.current);return b.addEventListener("reset",x),()=>b.removeEventListener("reset",x)}},[i,d]),s.jsx(we.button,{type:"button",role:"checkbox","aria-checked":Tl(c)?"mixed":c,"aria-required":u,"data-state":lY(c),"data-disabled":l?"":void 0,disabled:l,value:o,...r,ref:m,onKeyDown:de(t,b=>{b.key==="Enter"&&b.preventDefault()}),onClick:de(n,b=>{d(x=>Tl(x)?!0:!x),y&&p&&(f.current=b.isPropagationStopped(),f.current||b.stopPropagation())})})});rY.displayName=nY;var CA=g.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:a,defaultChecked:i,required:o,disabled:l,value:c,onCheckedChange:u,form:h,...d}=e;return s.jsx(Vqe,{__scopeCheckbox:n,checked:a,defaultChecked:i,disabled:l,required:o,onCheckedChange:u,name:r,form:h,value:c,internal_do_not_use_render:({isFormControl:f})=>s.jsxs(s.Fragment,{children:[s.jsx(rY,{...d,ref:t,__scopeCheckbox:n}),f&&s.jsx(oY,{__scopeCheckbox:n})]})})});CA.displayName=o_;var aY="CheckboxIndicator",sY=g.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...a}=e,i=NA(aY,n);return s.jsx(Vn,{present:r||Tl(i.checked)||i.checked===!0,children:s.jsx(we.span,{"data-state":lY(i.checked),"data-disabled":i.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})});sY.displayName=aY;var iY="CheckboxBubbleInput",oY=g.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:a,checked:i,defaultChecked:o,required:l,disabled:c,name:u,value:h,form:d,bubbleInput:f,setBubbleInput:p}=NA(iY,e),y=Fe(n,p),m=Tg(i),v=gg(r);g.useEffect(()=>{const x=f;if(!x)return;const w=window.HTMLInputElement.prototype,k=Object.getOwnPropertyDescriptor(w,"checked").set,j=!a.current;if(m!==i&&k){const S=new Event("click",{bubbles:j});x.indeterminate=Tl(i),k.call(x,Tl(i)?!1:i),x.dispatchEvent(S)}},[f,m,i,a]);const b=g.useRef(Tl(i)?!1:i);return s.jsx(we.input,{type:"checkbox","aria-hidden":!0,defaultChecked:o??b.current,required:l,disabled:c,name:u,value:h,form:d,...t,tabIndex:-1,ref:y,style:{...t.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});oY.displayName=iY;function Gqe(e){return typeof e=="function"}function Tl(e){return e==="indeterminate"}function lY(e){return Tl(e)?"indeterminate":e?"checked":"unchecked"}const cY=g.forwardRef(({className:e,...t},n)=>s.jsx(CA,{ref:n,className:K("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:s.jsx(sY,{className:K("flex items-center justify-center text-current"),children:s.jsx($t,{className:"h-4 w-4"})})}));cY.displayName=CA.displayName;function Yqe({post:e,open:t,onOpenChange:n}){var H;const[r,a]=g.useState(!1),[i,o]=g.useState(!1),[l,c]=g.useState(!1),[u,h]=g.useState("edit"),[d,f]=g.useState(""),[p,y]=g.useState(""),[m,v]=g.useState(""),[b,x]=g.useState(""),[w,_]=g.useState(""),[k,j]=g.useState([]),[S,N]=g.useState(!1),[C,M]=g.useState(!1),{updatePost:O}=tY(),{toast:D}=Je(),$=cs();if(g.useEffect(()=>{e&&(f(e.title||""),y(e.slug||""),v(e.excerpt||""),x(e.content||""),_(e.meta_description||""),j(e.compliance_flags||[]),N(!1),M(!1),h(e.status==="published"?"preview":"edit"))},[e]),!e)return null;const R=e.status==="published",I=!R&&(S||(e.compliance_status==="flagged"||e.compliance_status==="review_required")&&!e.compliance_reviewed_at),P=k.length>0||e.compliance_status==="flagged",A=async()=>{await navigator.clipboard.writeText(b),a(!0),D({title:"Copied!",description:"Blog markdown copied to clipboard."}),setTimeout(()=>a(!1),2e3)},E=async()=>{c(!0);try{await O.mutateAsync({id:e.id,title:d,slug:p,excerpt:m||null,meta_description:w||null,content:b,...R?{}:{status:"draft"}}),D({title:"Draft Saved",description:"Your editorial edits have been saved as a draft."})}catch(G){D({title:"Save Failed",description:G.message||"Failed to save draft.",variant:"destructive"})}finally{c(!1)}},T=async()=>{var G;o(!0);try{const{data:{session:Z}}=await W.auth.getSession();if(!Z)throw new Error("Not authenticated");await O.mutateAsync({id:e.id,title:d,slug:p,excerpt:m||null,meta_description:w||null,content:b});const le=await fetch("https://hgnuynazdzzocuwtwiez.supabase.co/functions/v1/publish-autoblog",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${Z.access_token}`,apikey:"sb_publishable__0Zesn96s_l2w2G1z_9fxw_mY_wD58k"},body:JSON.stringify({postId:e.id,title:d,slug:p,excerpt:m,content:b,acknowledgeCompliance:I?C:void 0})}),ue=await le.json().catch(()=>({}));if(le.status===409&&ue.code==="compliance_review_required"){j(((G=ue.compliance)==null?void 0:G.flags)||[]),N(!0),M(!1),h("edit"),D({title:"Review needed before publishing",description:ue.error,variant:"destructive"});return}if(!le.ok||!ue.success)throw new Error(ue.error||ue.message||"CMS publishing failed");$.invalidateQueries({queryKey:["blog-posts"]}),D({title:"Published to Your Website! 🚀",description:ue.message||`Article successfully published to your ${ue.platform||"CMS"}.`}),n(!1)}catch(Z){console.error("CMS Publishing Error:",Z),D({title:"Publishing Failed",description:Z.message||"Could not publish to your CMS. Please check your CMS settings.",variant:"destructive"})}finally{o(!1)}},L=G=>{switch(G){case"published":return s.jsx(je,{variant:"outline",className:"border-emerald-500/20 text-emerald-500 bg-emerald-500/10",children:"Published"});case"draft":return s.jsx(je,{variant:"secondary",children:"Draft (Needs Review)"});case"failed":return s.jsx(je,{variant:"destructive",children:"Failed"});default:return null}},B=G=>G.split(`
4255`).map((Z,le)=>{if(Z.startsWith("### "))return s.jsx("h3",{className:"text-lg font-semibold mt-4 mb-2",children:Z.slice(4)},le);if(Z.startsWith("## "))return s.jsx("h2",{className:"text-xl font-bold mt-6 mb-3",children:Z.slice(3)},le);if(Z.startsWith("# "))return s.jsx("h1",{className:"text-2xl font-bold mt-6 mb-3",children:Z.slice(2)},le);if(Z.startsWith("- ")||Z.startsWith("* "))return s.jsx("li",{className:"ml-4",children:Z.slice(2)},le);if(Z.trim()==="")return s.jsx("br",{},le);const ue=Z.replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>");return s.jsx("p",{className:"mb-2",dangerouslySetInnerHTML:{__html:ue}},le)});return s.jsx(xA,{open:t,onOpenChange:n,children:s.jsxs(wA,{className:"max-h-[92vh]",children:[s.jsx(_A,{className:"border-b pb-3",children:s.jsxs("div",{className:"flex items-start justify-between gap-4",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[L(e.status),e.industry_module&&s.jsx(je,{variant:"outline",children:e.industry_module})]}),s.jsx(jA,{className:"text-xl font-bold truncate",children:d||e.title}),s.jsxs(SA,{className:"flex items-center gap-4 text-xs mt-1",children:[s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(Mn,{className:"h-3 w-3"}),"Generated ",ge(new Date(e.created_at),"MMMM d, yyyy")]}),e.published_at&&s.jsxs("span",{className:"flex items-center gap-1 text-emerald-500",children:[s.jsx(Xc,{className:"h-3 w-3"}),"Published ",ge(new Date(e.published_at),"MMM d")]})]})]}),s.jsx("div",{className:"flex items-center gap-2",children:s.jsx(z,{variant:"outline",size:"sm",onClick:A,title:"Copy Markdown",children:r?s.jsx($t,{className:"h-4 w-4 text-emerald-500"}):s.jsx(Rl,{className:"h-4 w-4"})})})]})}),s.jsx("div",{className:"flex-1 overflow-hidden flex flex-col p-4 space-y-4",children:s.jsxs(Ii,{value:u,onValueChange:G=>h(G),className:"flex-1 flex flex-col",children:[s.jsxs("div",{className:"flex items-center justify-between border-b pb-2",children:[s.jsxs(Hs,{children:[s.jsxs(ht,{value:"edit",className:"gap-1.5",children:[s.jsx(QQ,{className:"h-4 w-4"}),"Edit & Review"]}),s.jsxs(ht,{value:"preview",className:"gap-1.5",children:[s.jsx(Ei,{className:"h-4 w-4"}),"Live Preview"]})]}),s.jsx("span",{className:"text-xs text-muted-foreground hidden sm:inline",children:"AutoBlogPRO Editorial Suite"})]}),s.jsxs(ft,{value:"edit",className:"flex-1 mt-3 space-y-3 overflow-y-auto pr-1",children:[I&&s.jsxs("div",{className:`rounded-lg border p-3 space-y-2 ${P?"border-destructive/30 bg-destructive/5":"border-amber-500/30 bg-amber-500/5"}`,children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold",children:[P?s.jsx(GF,{className:"h-4 w-4 text-destructive"}):s.jsx(ww,{className:"h-4 w-4 text-amber-600"}),P?"Compliance check flagged some wording":"Compliance review required"]}),P?s.jsx("ul",{className:"text-xs space-y-1 list-disc ml-5",children:k.map((G,Z)=>s.jsxs("li",{children:[s.jsxs("span",{className:"font-medium",children:[G.label,":"]}
4255)," ",s.jsxs("span",{className:"font-mono",children:['"',G.match,'"']})]},Z))}):s.jsx("p",{className:"text-xs text-muted-foreground",children:"Content in your industry is regulated. Read the full post before publishing, and follow your firm's or broker's approval process if you have one."}),P&&s.jsx("p",{className:"text-xs text-muted-foreground",children:"Edit the wording above, then publish. The check runs again on the final text."}),s.jsxs("label",{className:"flex items-start gap-2 text-xs cursor-pointer pt-1",children:[s.jsx(cY,{checked:C,onCheckedChange:G=>M(G===!0),className:"mt-0.5"}),s.jsx("span",{children:"I've reviewed this post and it complies with the rules for my industry. I understand I'm responsible for what I publish."})]})]}),(e.focus_keyword||e.word_count)&&s.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs text-muted-foreground",children:[s.jsx(Jd,{className:"h-3.5 w-3.5"}),e.focus_keyword&&s.jsxs("span",{children:["Focus keyword: ",s.jsx("span",{className:"font-medium text-foreground",children:e.focus_keyword})]}),e.word_count?s.jsxs("span",{children:["• ",e.word_count.toLocaleString()," words"]}):null,(H=e.faq)!=null&&H.length?s.jsxs("span",{children:["• ",e.faq.length," FAQ"]}):null,e.author_name&&s.jsxs("span",{children:["• By ",e.author_name,e.author_credentials?`, ${e.author_credentials}`:""]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx(X,{htmlFor:"post-title",className:"text-xs font-semibold",children:"Article Title"}),s.jsx(ze,{id:"post-title",value:d,onChange:G=>f(G.target.value),className:"text-sm font-medium"})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx(X,{htmlFor:"post-slug",className:"text-xs font-semibold",children:"URL Slug"}),s.jsx(ze,{id:"post-slug",value:p,onChange:G=>y(G.target.value),className:"text-sm font-mono"})]})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(X,{htmlFor:"post-meta",className:"text-xs font-semibold",children:"Meta Description (what Google shows)"}),s.jsxs("span",{className:`text-xs ${w.length>160?"text-destructive":"text-muted-foreground"}`,children:[w.length,"/155"]})]}),s.jsx(Nt,{id:"post-meta",value:w,onChange:G=>_(G.target.value),className:"h-16 text-sm resize-none",placeholder:"140–155 characters that include your focus keyword"})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx(X,{htmlFor:"post-excerpt",className:"text-xs font-semibold",children:"Summary"}),s.jsx(Nt,{id:"post-excerpt",value:m,onChange:G=>v(G.target.value),className:"h-16 text-sm resize-none",placeholder:"Short excerpt for SEO and search engine previews..."})]}),s.jsxs("div",{className:"space-y-1 flex-1 flex flex-col",children:[s.jsx(X,{htmlFor:"post-content",className:"text-xs font-semibold",children:"Markdown Article Body"}),s.jsx(Nt,{id:"post-content",value:b,onChange:G=>x(G.target.value),className:"min-h-[260px] text-sm font-mono leading-relaxed resize-y",placeholder:"Full article content in Markdown format..."})]})]}),s.jsx(ft,{value:"preview",className:"flex-1 mt-3 overflow-hidden",children:s.jsxs(ya,{className:"h-[400px] p-4 rounded-xl border border-border bg-muted/20",children:[e.featured_image_url&&s.jsx("div",{className:"mb-4 rounded-lg overflow-hidden max-h-[220px]",children:s.jsx("img",{src:e.featured_image_url,alt:d,className:"w-full object-cover"})}),s.jsx("h1",{className:"text-2xl font-bold mb-2",children:d}),m&&s.jsx("p",{className:"text-sm text-muted-foreground italic mb-4",children:m}),s.jsx(ou,{className:"my-3"}),s.jsx("article",{className:"prose prose-sm dark:prose-invert max-w-none",children:B(b)})]})})]})}),s.jsx(ou,{}),s.jsxs(kA,{className:"flex-row items-center justify-between p-4 bg-muted/30",children:[s.jsxs("div",{className:"text-xs text-muted-foreground truncate hidden sm:flex items-center gap-2",children:["Status: ",s.jsx("span",{className:"font-semibold text-foreground uppercase",children:e.status}),e.published_url&&s.jsxs("a",{href:e.published_url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-primary hover:underline",children:[s.jsx(WF,{className:"h-3 w-3"})," View on your site"]})]}),s.jsxs("div",{className:"flex items-center gap-3 w-full sm:w-auto justify-end",children:[s.jsxs(z,{variant:"outline",onClick:E,disabled:l||i,className:"gap-2",children:[l?s.jsx(ce,{className:"h-4 w-4 animate-spin"}):s.jsx(ri,{className:"h-4 w-4"}),"Save Draft"]}),s.jsxs(z,{onClick:T,disabled:i||l||I&&!C,title:I&&!C?"Confirm your compliance review first":void 0,className:"gap-2 font-semibold bg-primary text-primary-foreground hover:bg-primary/90",children:[i?s.jsx(ce,{className:"h-4 w-4 animate-spin"}):s.jsx(ji,{className:"h-4 w-4"}),"Publish to My Website"]})]})]})]})})}const Kqe={0:0,1:1,2:2,3:3,4:4,5:5,6:6};function Xqe(){const{toast:e}=Je(),t=cs(),{data:n,isLoading:r}=wr({queryKey:["blog-schedule"],queryFn:async()=>{const{data:{user:u}}=await W.auth.getUser();if(!u)throw new Error("Not authenticated");const{data:h,error:d}=await W.from("blog_schedule").select("*").eq("user_id",u.id).order("scheduled_date",{ascending:!0});if(d)throw d;return h??[]}}),a=an({mutationFn:async u=>{const{data:{user:h}}=await W.auth.getUser();if(!h)throw new Error("Not authenticated");const{data:d,error:f}=await W.from("blog_schedule").upsert({user_id:h.id,...u},{onConflict:"user_id,scheduled_date"}).select().single();if(f)throw f;return d},onSuccess:()=>{t.invalidateQueries({queryKey:["blog-schedule"]})},onError:u=>{e({title:"Error",description:u.message,variant:"destructive"})}}),i=an({mutationFn:async({id:u,...h})=>{const{data:d,error:f}=await W.from("blog_schedule").update({...h,updated_at:new Date().toISOString()}).eq("id",u).select().single();if(f)throw f;return d},onSuccess:()=>{t.invalidateQueries({queryKey:["blog-schedule"]}),e({title:"Schedule updated"})},onError:u=>{e({title:"Error",description:u.message,variant:"destructive"})}}),o=an({mutationFn:async u=>{const{error:h}=await W.from("blog_schedule").delete().eq("id",u);if(h)throw h},onSuccess:()=>{t.invalidateQueries({queryKey:["blog-schedule"]}),e({title:"Entry removed"})}}),l=an({mutationFn:async u=>{const{data:{user:h}}=await W.auth.getUser();if(!h)throw new Error("Not authenticated");const{frequency:d,dayOfWeek:f,weeksOut:p,topics:y}=u,m=[],v=va(new Date);let b=BU(v,Kqe[f]);b<=v&&(b=dt(b,d==="daily"?1:7));const x=fr(v,p);for(;b<=x;)m.push(ge(b,"yyyy-MM-dd")),d==="daily"?b=dt(b,1):d==="weekly"?b=fr(b,1):b=ea(b,1);const{data:w}=await W.from("blog_schedule").select("scheduled_date").eq("user_id",h.id).in("scheduled_date",m),_=new Set((w??[]).map(S=>S.scheduled_date)),k=m.filter(S=>!_.has(S)).map((S,N)=>({user_id:h.id,scheduled_date:S,topic:(y==null?void 0:y[N])||"",author_mode:"ai",status:"pending",complement_clickpro:!0}));if(k.length===0)return{created:0};const{error:j}=await W.from("blog_schedule").insert(k);if(j)throw j;return{created:k.length}},onSuccess:u=>{t.invalidateQueries({queryKey:["blog-schedule"]}),e({title:"Schedule generated",description:`${u.created} blog entries scheduled.`})},onError:u=>{e({title:"Error",description:u.message,variant:"destructive"})}}),c=an({mutationFn:async()=>{const{data:{user:u}}=await W.auth.getUser();if(!u)throw new Error("Not authenticated");const h=ge(new Date,"yyyy-MM-dd"),{error:d}=await W.from("blog_schedule").delete().eq("user_id",u.id).eq("status","pen
4255ding").gte("scheduled_date",h);if(d)throw d},onSuccess:()=>{t.invalidateQueries({queryKey:["blog-schedule"]}),e({title:"Future schedule cleared"})}});return{entries:n,isLoading:r,upsertEntry:a,updateEntry:i,deleteEntry:o,generateSchedule:l,clearFutureSchedule:c}}const j3=[{value:"0",label:"Sunday"},{value:"1",label:"Monday"},{value:"2",label:"Tuesday"},{value:"3",label:"Wednesday"},{value:"4",label:"Thursday"},{value:"5",label:"Friday"},{value:"6",label:"Saturday"}],S3={pending:{icon:pr,color:"bg-amber-500/10 text-amber-600 border-amber-500/20",label:"Pending"},generating:{icon:ce,color:"bg-blue-500/10 text-blue-600 border-blue-500/20",label:"Generating"},generated:{icon:Xd,color:"bg-emerald-500/10 text-emerald-600 border-emerald-500/20",label:"Generated"},published:{icon:Xd,color:"bg-primary/10 text-primary border-primary/20",label:"Published"},skipped:{icon:Bs,color:"bg-muted text-muted-foreground border-muted",label:"Skipped"},failed:{icon:Bs,color:"bg-destructive/10 text-destructive border-destructive/20",label:"Failed"}};function Qqe(){var L;const{entries:e,isLoading:t,updateEntry:n,deleteEntry:r,generateSchedule:a,clearFutureSchedule:i}=Xqe(),[o,l]=g.useState(null),[c,u]=g.useState(""),[h,d]=g.useState(""),[f,p]=g.useState("ai"),[y,m]=g.useState(!0),[v,b]=g.useState(""),[x,w]=g.useState("weekly"),[_,k]=g.useState("2"),[j,S]=g.useState("52"),[N,C]=g.useState(!1),M=va(new Date),O=dt(M,30),D=g.useMemo(()=>(e??[]).filter(B=>{const H=Ka(B.scheduled_date);return!Nl(H,M)&&!mm(H,O)}),[e,M,O]),$=g.useMemo(()=>(e??[]).filter(B=>!Nl(Ka(B.scheduled_date),M)),[e,M]),R=g.useMemo(()=>(e??[]).filter(B=>Nl(Ka(B.scheduled_date),M)),[e,M]),I=B=>{l(B),u(B.topic),d(B.custom_content||""),p(B.author_mode),m(B.complement_clickpro),b(B.notes||"")},P=()=>{o&&n.mutate({id:o.id,topic:c,custom_content:h||null,author_mode:f,complement_clickpro:y,notes:v||null},{onSuccess:()=>l(null)})},A=()=>{a.mutate({frequency:x,dayOfWeek:parseInt(_),weeksOut:parseInt(j)},{onSuccess:()=>C(!1)})},E=({status:B})=>{const H=S3[B]||S3.pending,G=H.icon;return s.jsxs(je,{variant:"outline",className:`gap-1 ${H.color}`,children:[s.jsx(G,{className:`h-3 w-3 ${B==="generating"?"animate-spin":""}`}),H.label]})},T=({entry:B})=>s.jsxs("div",{className:"flex items-center gap-3 py-3 px-4 border-b border-border last:border-0 hover:bg-muted/50 transition-colors",children:[s.jsxs("div",{className:"w-24 flex-shrink-0",children:[s.jsx("p",{className:"text-sm font-medium",children:ge(Ka(B.scheduled_date),"MMM d")}),s.jsx("p",{className:"text-xs text-muted-foreground",children:ge(Ka(B.scheduled_date),"EEE")})]}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[B.author_mode==="manual"?s.jsx(Si,{className:"h-3.5 w-3.5 text-muted-foreground flex-shrink-0"}):s.jsx(Se,{className:"h-3.5 w-3.5 text-primary flex-shrink-0"}),s.jsx("p",{className:"text-sm truncate",children:B.topic||s.jsx("span",{className:"text-muted-foreground italic",children:"No topic set — AI will choose"})})]}),B.complement_clickpro&&s.jsxs("div",{className:"flex items-center gap-1 mt-0.5",children:[s.jsx(yd,{className:"h-3 w-3 text-muted-foreground"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Complements ClickPRO"})]})]}),s.jsx(E,{status:B.status}),s.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[s.jsx(z,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>I(B),children:s.jsx(xw,{className:"h-3.5 w-3.5"})}),B.status==="pending"&&s.jsx(z,{variant:"ghost",size:"icon",className:"h-8 w-8 text-destructive hover:text-destructive",onClick:()=>r.mutate(B.id),children:s.jsx(Jc,{className:"h-3.5 w-3.5"})})]})]});return t?s.jsx("div",{className:"flex items-center justify-center py-12",children:s.jsx(ce,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3 flex-wrap",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-semibold",children:"Blog Schedule"}),s.jsxs("p",{className:"text-sm text-muted-foreground",children:[$.length," upcoming · ",R.length," past"]})]}),s.jsxs("div",{className:"flex gap-2",children:[$.length>0&&s.jsxs(z,{variant:"outline",size:"sm",onClick:()=>i.mutate(),disabled:i.isPending,children:[s.jsx(Bt,{className:"h-3.5 w-3.5 mr-1"}),"Clear Pending"]}),s.jsxs(z,{size:"sm",onClick:()=>C(!0),children:[s.jsx(pg,{className:"h-3.5 w-3.5 mr-1"}),"Generate Schedule"]})]})]}),$.length===0?s.jsx(he,{children:s.jsxs(pe,{className:"flex flex-col items-center justify-center py-12",children:[s.jsx(ki,{className:"h-12 w-12 text-muted-foreground mb-4"}),s.jsx("h3",{className:"font-semibold mb-1",children:"No schedule yet"}),s.jsx("p",{className:"text-sm text-muted-foreground mb-4 text-center max-w-sm",children:"Generate a publishing schedule to plan your blog content up to 52 weeks in advance."}),s.jsxs(z,{onClick:()=>C(!0),children:[s.jsx(ki,{className:"h-4 w-4 mr-2"}),"Generate Schedule"]})]})}):s.jsxs(Ii,{defaultValue:"next30",className:"space-y-3",children:[s.jsxs(Hs,{children:[s.jsxs(ht,{value:"next30",children:["Next 30 Days (",D.length,")"]}),s.jsxs(ht,{value:"all",children:["All Upcoming (",$.length,")"]}),R.length>0&&s.jsxs(ht,{value:"past",children:["Past (",R.length,")"]})]}),s.jsx(ft,{value:"next30",children:s.jsx(he,{children:s.jsx(ya,{className:"max-h-[500px]",children:D.length===0?s.jsx(pe,{className:"py-8 text-center text-muted-foreground",children:"No entries in the next 30 days."}):D.map(B=>s.jsx(T,{entry:B},B.id))})})}),s.jsx(ft,{value:"all",children:s.jsx(he,{children:s.jsx(ya,{className:"max-h-[500px]",children:$.map(B=>s.jsx(T,{entry:B},B.id))})})}),R.length>0&&s.jsx(ft,{value:"past",children:s.jsx(he,{children:s.jsx(ya,{className:"max-h-[500px]",children:R.map(B=>s.jsx(T,{entry:B},B.id))})})})]}),s.jsx(An,{open:N,onOpenChange:C,children:s.jsxs(En,{children:[s.jsx(wn,{children:s.jsx(_n,{children:"Generate Blog Schedule"})}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{children:"Posting Frequency"}),s.jsxs(jt,{value:x,onValueChange:B=>w(B),children:[s.jsx(mt,{children:s.jsx(Ct,{})}),s.jsxs(gt,{children:[s.jsx(Ee,{value:"daily",children:"Daily"}),s.jsx(Ee,{value:"weekly",children:"Weekly"}),s.jsx(Ee,{value:"monthly",children:"Monthly"})]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{children:"Publish Day"}),s.jsxs(jt,{value:_,onValueChange:k,children:[s.jsx(mt,{children:s.jsx(Ct,{})}),s.jsx(gt,{children:j3.map(B=>s.jsx(Ee,{value:B.value,children:B.label},B.value))})]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:x==="daily"?"Starting from this day, then every day":`Blog publishes every ${(L=j3.find(B=>B.value===_))==null?void 0:L.label}`})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{children:"Schedule Horizon"}),s.jsxs(jt,{value:j,onValueChange:S,children:[s.jsx(mt,{children:s.jsx(Ct,{})}),s.jsxs(gt,{children:[s.jsx(Ee,{value:"4",children:"4 weeks"}),s.jsx(Ee,{value:"8",children:"8 weeks"}),s.jsx(Ee,{value:"12",children:"12 weeks"}),s.jsx(Ee,{value:"26",children:"26 weeks"}),s.jsx(Ee,{value:"52",children:"52 weeks"})]})]})]}),s.jsxs("p",{className:"text-sm text-muted-foreground bg-muted/50 rounded-lg p-3",children:[s.jsx(Se,{className:"h-4 w-4 inline mr-1"}),"AI will auto-select topics that complement your ClickPRO social posts for each week. You can override any topic afterward."]})]}),s.jsxs(So,{children:[s.jsx(z,{variant:"outline",onClick:()=>C(!1),children:"Cancel"}),s.jsxs(z,{onClick:A,disabled:a.isPending,children:[a.isPending&&s.jsx(ce,{className:"h-4 w-4 mr-1 animate-spin"}),"Generate Schedule"]})]})]})}),s.jsx(An,{open:!!o,onOpenChange:B=>!B&&l(null),children:s.jsxs(En,{className:"max-w-lg",children:[s.jsx(wn,{children:s.jsxs(_n,{children:["Edit Entry — ",o&&ge(Ka(o.scheduled_date),"MMMM d, yyyy")]})}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{children:"Topic"}),s.jsx(ze,{placeholder:"Leave blank for AI to choose a complementary topic",value:c,onChange:B=>u(B.target.value)})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{children:"Author Mode"}),s.jsxs("div",{className:"flex gap-3",children:[s.jsxs(z,{variant:f==="ai"?"default":"outline",size:"sm",onClick:()=>p("ai"),className:"gap-2",children:[s.jsx(Se,{className:"h-3.5 w-3.5"}),"AI Author"]}),s.jsxs(z,{variant:f==="manual"?"default":"outline",size:"sm",onClick:()=>p("manual"),className:"gap-2",children:[s.jsx(Si,{className:"h-3.5 w-3.5"}),"Manual"]})]})]}),f==="manual"&&s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{children:"Content (Markdown)"}),s.jsx(Nt,{value:h,onChange:B=>d(B.target.value),rows:10,className:"font-mono text-sm",placeholder:"Write your blog post content here..."})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx(X,{className:"text-sm font-medium",children:"Complement ClickPRO"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Topic should align with the week's social posts"})]}),s.jsx(un,{checked:y,onCheckedChange:m})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{children:"Notes (optional)"}
4255),s.jsx(ze,{placeholder:"Internal notes...",value:v,onChange:B=>b(B.target.value)})]})]}),s.jsxs(So,{children:[s.jsx(z,{variant:"outline",onClick:()=>l(null),children:"Cancel"}),s.jsxs(z,{onClick:P,disabled:n.isPending,children:[n.isPending&&s.jsx(ce,{className:"h-4 w-4 mr-1 animate-spin"}),"Save"]})]})]})})]})}function Jqe(){const{settings:e,isLoading:t,updateSettings:n}=Uqe(),{posts:r,isLoading:a,generateBlog:i,deletePost:o,createDraftPost:l}=tY(),[c,u]=g.useState(!1),[h,d]=g.useState((e==null?void 0:e.custom_guidance)||""),[f,p]=g.useState(null),[y,m]=g.useState(!1),[v,b]=g.useState(null),[x,w]=g.useState(!1),_=g.useRef(null),{toast:k}=Je(),j=P=>{const A={enabled:P};if(P&&!(e!=null&&e.next_generation_at)){const E=new Date,T=(e==null?void 0:e.frequency)==="monthly"?30:(e==null?void 0:e.frequency)==="biweekly"?14:7;E.setDate(E.getDate()+T),A.next_generation_at=E.toISOString(),A.status="idle",A.retry_count=0,A.last_error=null}n.mutate(A)},S=P=>{n.mutate({frequency:P})},N=P=>{n.mutate({tone:P})},C=P=>{n.mutate({default_length:P})},M=()=>{n.mutate({custom_guidance:h||null})},O=async P=>{var T;const A=(T=P.target.files)==null?void 0:T[0];if(!A)return;if(!["image/jpeg","image/png","image/webp"].includes(A.type)){k({title:"Invalid file type",description:"Please upload a JPG, PNG, or WebP image.",variant:"destructive"});return}if(A.size>5*1024*1024){k({title:"File too large",description:"Max file size is 5MB.",variant:"destructive"});return}w(!0);try{const{data:{user:L}}=await W.auth.getUser();if(!L)throw new Error("Not authenticated");const B=A.name.split(".").pop()||"jpg",H=`${L.id}/${Date.now()}.${B}`,{error:G}=await W.storage.from("blog-images").upload(H,A,{contentType:A.type,upsert:!0});if(G)throw G;const{data:Z}=W.storage.from("blog-images").getPublicUrl(H);b(Z.publicUrl),k({title:"Image uploaded",description:"Your featured image is ready."})}catch(L){k({title:"Upload failed",description:L.message,variant:"destructive"})}finally{w(!1)}},D=()=>{i.mutate({tone:(e==null?void 0:e.tone)||"confident",customGuidance:(e==null?void 0:e.custom_guidance)||void 0,featuredImageUrl:v||void 0,wordCountPreset:(e==null?void 0:e.default_length)||"standard"},{onSuccess:P=>{P!=null&&P.blogPost&&(p(P.blogPost),m(!0))}}),b(null)},$=()=>{l.mutate(void 0,{onSuccess:P=>{p(P),m(!0)}})},R=P=>{p(P),m(!0)},I=P=>{switch(P){case"published":return s.jsx(je,{variant:"outline",className:"border-primary/20 text-primary bg-primary/10",children:"Published"});case"draft":return s.jsx(je,{variant:"secondary",children:"Draft"});case"failed":return s.jsx(je,{variant:"destructive",children:"Failed"});default:return null}};return s.jsxs(hr,{title:"AutoBlogPRO",description:"Set it once. Grow your authority quietly.",children:[s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-4",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("input",{ref:_,type:"file",accept:"image/jpeg,image/png,image/webp",className:"hidden",onChange:O}),v?s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("img",{src:v,alt:"Featured",className:"h-10 w-16 rounded object-cover border border-border"}),s.jsx(z,{variant:"ghost",size:"icon",onClick:()=>b(null),children:s.jsx(Br,{className:"h-4 w-4"})})]}):s.jsxs(z,{variant:"outline",size:"sm",onClick:()=>{var P;return(P=_.current)==null?void 0:P.click()},disabled:x,className:"gap-2",children:[s.jsx(hj,{className:"h-4 w-4"}),x?"Uploading...":"Featured Image (Optional)"]})]}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s.jsxs(z,{variant:"outline",onClick:$,disabled:l.isPending,className:"gap-2",children:[l.isPending?s.jsx(Bt,{className:"h-4 w-4 animate-spin"}):s.jsx(fg,{className:"h-4 w-4"}),"Write Your Own"]}),s.jsxs(z,{onClick:D,disabled:i.isPending,className:"gap-2",children:[i.isPending?s.jsx(Bt,{className:"h-4 w-4 animate-spin"}):s.jsx(Se,{className:"h-4 w-4"}),"Generate Now"]})]})]}),s.jsxs(Ii,{defaultValue:"posts",className:"space-y-4",children:[s.jsxs(Hs,{className:"h-auto flex-wrap justify-start",children:[s.jsxs(ht,{value:"posts",className:"gap-2",children:[s.jsx(dr,{className:"h-4 w-4"}),"Your Posts"]}),s.jsxs(ht,{value:"schedule",className:"gap-2",children:[s.jsx(ki,{className:"h-4 w-4"}),"Schedule"]}),s.jsxs(ht,{value:"settings",className:"gap-2",children:[s.jsx(xP,{className:"h-4 w-4"}),"Settings"]}),s.jsxs(ht,{value:"cms",className:"gap-2",children:[s.jsx(Xc,{className:"h-4 w-4 text-primary"}),"CMS Integration"]})]}),s.jsx(ft,{value:"posts",className:"space-y-4",children:a?s.jsx("div",{className:"space-y-3",children:[1,2,3].map(P=>s.jsx(Ji,{className:"h-24 w-full"},P))}):r&&r.length>0?s.jsx(ya,{className:"h-[600px] [&>[data-radix-scroll-area-viewport]>div]:!block",children:s.jsx("div",{className:"space-y-3 pr-4",children:r.map(P=>s.jsx(he,{className:"hover:shadow-md transition-shadow",children:s.jsx(pe,{className:"p-4",children:s.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between sm:gap-4",children:[P.featured_image_url&&s.jsx("img",{src:P.featured_image_url,alt:"",className:"h-36 w-full rounded object-cover flex-shrink-0 sm:h-16 sm:w-24"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-1",children:[I(P.status),P.industry_module&&s.jsx(je,{variant:"outline",className:"text-xs",children:P.industry_module})]}),s.jsx("h3",{className:"font-semibold line-clamp-2 sm:truncate",children:P.title}),P.excerpt&&s.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2 mt-1",children:P.excerpt}),s.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 mt-2 text-xs text-muted-foreground",children:[s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(Mn,{className:"h-3 w-3"}),ge(new Date(P.created_at),"MMM d, yyyy")]}),P.published_at&&s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(pr,{className:"h-3 w-3"}),"Published ",ge(new Date(P.published_at),"MMM d")]})]})]}),s.jsxs("div",{className:"flex items-center gap-1 self-end sm:self-auto",children:[s.jsx(z,{variant:"ghost",size:"icon",onClick:()=>R(P),children:s.jsx(Ei,{className:"h-4 w-4"})}),s.jsx(z,{variant:"ghost",size:"icon",onClick:()=>o.mutate(P.id),children:s.jsx(Jc,{className:"h-4 w-4 text-destructive"})})]})]})})},P.id))})}):s.jsx(he,{children:s.jsxs(pe,{className:"flex flex-col items-center justify-center py-12",children:[s.jsx(dr,{className:"h-12 w-12 text-muted-foreground mb-4"}),s.jsx("h3",{className:"font-semibold mb-1",children:"No blog posts yet"}),s.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:'Click "Generate Now" to create your first blog post'}),s.jsxs(z,{onClick:D,disabled:i.isPending,children:[s.jsx(Se,{className:"h-4 w-4 mr-2"}),"Generate Your First Post"]})]})})}),s.jsx(ft,{value:"schedule",className:"space-y-4",children:s.jsx(Qqe,{})}),s.jsxs(ft,{value:"settings",className:"space-y-4",children:[s.jsxs(he,{children:[s.jsxs(Ce,{children:[s.jsx(Pe,{children:"Automation Settings"}),s.jsx(Un,{children:"Configure how AutoBlogPRO generates content for you"})]}),s.jsxs(pe,{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx(X,{htmlFor:"autoblog-enabled",className:"text-base font-medium",children:"Enable AutoBlogPRO"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Automatically generate blog posts on your schedule"})]}),s.jsx(un,{id:"autoblog-enabled",checked:(e==null?void 0:e.enabled)??!1,onCheckedChange:j,disabled:t})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{children:"Posting Frequency"}),s.jsxs(jt,{value:(e==null?void 0:e.frequency)??"weekly",onValueChange:S,disabled:t,children:[s.jsx(mt,{className:"w-[200px]",children:s.jsx(Ct,{})}),s.jsxs(gt,{children:[s.jsx(Ee,{value:"weekly",children:"Weekly"}),s.jsx(Ee,{value:"biweekly",children:"Every 2 Weeks"}),s.jsx(Ee,{value:"monthly",children:"Monthly"})]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{children:"Tone"}),s.jsxs(jt,{value:(e==null?void 0:e.tone)??"confident",onValueChange:N,disabled:t,children:[s.jsx(mt,{className:"w-[200px]",children:s.jsx(Ct,{})}),s.jsxs(gt,{children:[s.jsx(Ee,{value:"friendly",children:"Friendly"}),s.jsx(Ee,{value:"confident",children:"Confident"}),s.jsx(Ee,{value:"authoritative",children:"Authoritative"})]})]}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:[(e==null?void 0:e.tone)==="friendly"&&"Warm and conversational, like talking to a trusted friend",(e==null?void 0:e.tone)==="confident"&&"Assured and direct, like a respected industry peer",(e==null?void 0:e.tone)==="authoritative"&&"Expert and commanding, like an industry thought leader",!(e!=null&&e.tone)&&"Assured and direct, like a respected industry peer"]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{children:"Word Count"}),s.jsxs(jt,{value:(e==null?void 0:e.default_length)??"standard",onValueChange:C,disabled:t,children:[s.jsx(mt,{className:"w-[200px]",children:s.jsx(Ct,{})}),s.jsxs(gt,{children:[s.jsx(Ee,{value:"short",children:"Short"}),s.jsx(Ee,{value:"standard",children:"Standard"}),s.jsx(Ee,{value:"long",children:"Long"})]})]}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:[(e==null?void 0:e.default_length)==="short"&&"~500-700 words — quick reads",(e==null?void 0:e.default_length)==="long"&&"~1600-2200 words — in-depth, comprehensive posts",((e==null?void 0:e.default_length)==="standard"||!(e!=null&&e.default_length))&&"~800-1200 words — the default, balanced length"]})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx(X,{htmlFor:"auto-publish",className:"text-base font-medium",children:"Auto-Publish Blog Posts"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Automatically publish generated posts (otherwise saved as draft)"})]}),s.jsx(un,{id:"auto-publish",checked:(e==null?void 0:e.auto_publish_blog)??!1,onCheckedChange:P=>n.mutate({auto_publish_blog:P}),disabled:t})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx(X,{htmlFor:"auto-social",className:"text-base font-medium",children:"Auto Social Promotion"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Automatically create a social media post via ClickPRO when a blog is generated"})]}),s.jsx(un,{id:"auto-social",checked:(e==null?void 0:e.auto_social_promote)??!1,onCheckedChange:P=>n.mutate({auto_social_promote:P}),disabled:t})]}),s.jsxs(Db,{open:c,onOpenChange:u,children:[s.jsx($b,{asChild:!0,children:s.jsxs(z,{variant:"ghost",className:"gap-2 p-0 h-auto",children:[s.jsx(gu,{className:`h-4 w-4 transition-transform ${c?"rotate-180":""}`}),s.jsx("span",{className:"text-sm",children:"Advanced Options"})]})}),s.jsx(Lb,{className:"pt-4 space-y-4",children:s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{htmlFor:"custom-guidance",children:"Help us sound more like you (optional)"}),s.jsx(Nt,{id:"custom-guidance",placeholder:"E.g., 'Focus more on educating first-time buyers' or 'Avoid buzzwords'",value:h,onChange:P=>d(P.target.value),className:"min-h-[100px]"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"This guid
4255ance will influence future posts, not replace the core structure."}),s.jsx(z,{variant:"outline",size:"sm",onClick:M,disabled:n.isPending,children:"Save Guidance"})]})})]})]})]}),(e==null?void 0:e.enabled)&&s.jsx(he,{children:s.jsx(pe,{className:"pt-6",children:s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx("div",{className:"h-10 w-10 rounded-full bg-primary/10 flex items-center justify-center",children:s.jsx(Se,{className:"h-5 w-5 text-primary"})}),s.jsxs("div",{children:[s.jsx("p",{className:"font-medium",children:"AutoBlogPRO is Active"}),s.jsxs("p",{className:"text-sm text-muted-foreground",children:[e.next_generation_at?s.jsxs(s.Fragment,{children:["Next post: ",ge(new Date(e.next_generation_at),"MMM d, yyyy 'at' h:mm a")]}):s.jsxs(s.Fragment,{children:["Next post: ",e.frequency==="weekly"?"In 7 days":e.frequency==="biweekly"?"In 14 days":"In 30 days"]}),e.last_generated_at&&s.jsxs(s.Fragment,{children:[" • Last generated: ",ge(new Date(e.last_generated_at),"MMM d, yyyy")]})]}),e.status==="failed"&&e.last_error&&s.jsxs("p",{className:"text-xs text-destructive mt-1",children:["Last error: ",e.last_error]})]})]})})})]}),s.jsx(ft,{value:"cms",className:"space-y-4",children:s.jsx(H7,{})})]})]}),s.jsx(Yqe,{post:f,open:y,onOpenChange:m})]})}function Zqe(){const{toast:e}=Je(),t=cs(),{data:n,isLoading:r}=wr({queryKey:["corporate-blog-posts"],queryFn:async()=>{const{data:l,error:c}=await W.from("blog_posts").select("*").is("user_id",null).order("created_at",{ascending:!1});if(c)throw c;return l}}),a=an({mutationFn:async l=>{const{data:{session:c}}=await W.auth.getSession();if(!c)throw new Error("Not authenticated");const u=await fetch("https://hgnuynazdzzocuwtwiez.supabase.co/functions/v1/generate-corporate-blog",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${c.access_token}`,apikey:"sb_publishable__0Zesn96s_l2w2G1z_9fxw_mY_wD58k"},body:JSON.stringify(l)});if(!u.ok){const h=await u.json();throw new Error(h.error||"Failed to generate post")}return u.json()},onSuccess:()=>{t.invalidateQueries({queryKey:["corporate-blog-posts"]}),e({title:"Post generated!",description:"Corporate blog post created as draft."})},onError:l=>{e({title:"Generation failed",description:l.message,variant:"destructive"})}}),i=an({mutationFn:async({id:l,...c})=>{const u={...c};c.status==="published"&&!c.published_at&&(u.published_at=new Date().toISOString());const{data:h,error:d}=await W.from("blog_posts").update(u).eq("id",l).select().single();if(d)throw d;return h},onSuccess:()=>{t.invalidateQueries({queryKey:["corporate-blog-posts"]}),t.invalidateQueries({queryKey:["public-blog-posts"]}),e({title:"Post updated"})},onError:l=>{e({title:"Update failed",description:l.message,variant:"destructive"})}}),o=an({mutationFn:async l=>{const{error:c}=await W.from("blog_posts").delete().eq("id",l);if(c)throw c},onSuccess:()=>{t.invalidateQueries({queryKey:["corporate-blog-posts"]}),e({title:"Post deleted"})}});return{posts:n,isLoading:r,generatePost:a,updatePost:i,deletePost:o}}function eUe(){const{data:e,isLoading:t}=wr({queryKey:["public-blog-posts"],queryFn:async()=>{const{data:n,error:r}=await W.from("blog_posts").select("*").is("user_id",null).eq("status","published").lte("published_at",new Date().toISOString()).order("published_at",{ascending:!1});if(r)throw r;return n}});return{posts:e,isLoading:t}}function tUe(e){const{data:t,isLoading:n}=wr({queryKey:["public-blog-post",e],queryFn:async()=>{const{data:r,error:a}=await W.from("blog_posts").select("*").is("user_id",null).eq("slug",e).eq("status","published").single();if(a)throw a;return r},enabled:!!e});return{post:t,isLoading:n}}function nUe(){const{toast:e}=Je(),t=cs(),{data:n,isLoading:r}=wr({queryKey:["corporate-blog-settings"],queryFn:async()=>{const{data:i,error:o}=await W.from("corporate_blog_settings").select("*").limit(1).maybeSingle();if(o)throw o;return i}}),a=an({mutationFn:async i=>{if(!(n!=null&&n.id))throw new Error("No settings row found");const{data:o,error:l}=await W.from("corporate_blog_settings").update(i).eq("id",n.id).select().single();if(l)throw l;return o},onSuccess:()=>{t.invalidateQueries({queryKey:["corporate-blog-settings"]}),e({title:"Settings saved",description:"Corporate blog settings updated."})},onError:i=>{e({title:"Error",description:i.message,variant:"destructive"})}});return{settings:n,isLoading:r,updateSettings:a}}function rUe(){const{settings:e,isLoading:t,updateSettings:n}=nUe(),[r,a]=g.useState(!1),[i,o]=g.useState((e==null?void 0:e.custom_guidance)||"");if(t)return s.jsx(Ji,{className:"h-64 w-full"});const l=c=>{const u={enabled:c};if(c&&!(e!=null&&e.next_generation_at)){const h=new Date,d=(e==null?void 0:e.frequency)==="monthly"?30:(e==null?void 0:e.frequency)==="biweekly"?14:7;h.setDate(h.getDate()+d),u.next_generation_at=h.toISOString(),u.status="idle",u.retry_count=0,u.last_error=null}n.mutate(u)};return s.jsxs("div",{className:"space-y-4",children:[s.jsxs(he,{children:[s.jsxs(Ce,{children:[s.jsx(Pe,{children:"Automation Settings"}),s.jsx(Un,{children:"Configure how the corporate blog generates content automatically"})]}),s.jsxs(pe,{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx(X,{htmlFor:"corp-enabled",className:"text-base font-medium",children:"Enable Auto-Generation"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Automatically generate corporate blog posts on schedule"})]}),s.jsx(un,{id:"corp-enabled",checked:(e==null?void 0:e.enabled)??!1,onCheckedChange:l})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{children:"Posting Frequency"}),s.jsxs(jt,{value:(e==null?void 0:e.frequency)??"weekly",onValueChange:c=>n.mutate({frequency:c}),children:[s.jsx(mt,{className:"w-[200px]",children:s.jsx(Ct,{})}),s.jsxs(gt,{children:[s.jsx(Ee,{value:"weekly",children:"Weekly"}),s.jsx(Ee,{value:"biweekly",children:"Every 2 Weeks"}),s.jsx(Ee,{value:"monthly",children:"Monthly"})]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{children:"Tone"}),s.jsxs(jt,{value:(e==null?void 0:e.tone)??"authoritative",onValueChange:c=>n.mutate({tone:c}),children:[s.jsx(mt,{className:"w-[200px]",children:s.jsx(Ct,{})}),s.jsxs(gt,{children:[s.jsx(Ee,{value:"friendly",children:"Friendly"}),s.jsx(Ee,{value:"confident",children:"Confident"}),s.jsx(Ee,{value:"authoritative",children:"Authoritative"})]})]}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:[(e==null?void 0:e.tone)==="friendly"&&"Warm and conversational",(e==null?void 0:e.tone)==="confident"&&"Assured and direct",((e==null?void 0:e.tone)==="authoritative"||!(e!=null&&e.tone))&&"Expert and commanding, thought leader voice"]})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx(X,{htmlFor:"corp-auto-publish",className:"text-base font-medium",children:"Auto-Publish Posts"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Publish generated posts immediately (otherwise saved as draft)"})]}),s.jsx(un,{id:"corp-auto-publish",checked:(e==null?void 0:e.auto_publish_blog)??!0,onCheckedChange:c=>n.mutate({auto_publish_blog:c})})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx(X,{htmlFor:"corp-auto-social",className:"text-base font-medium",children:"Auto Social Promotion"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Create a social media post via ClickPRO when a blog is generated"})]}),s.jsx(un,{id:"corp-auto-social",checked:(e==null?void 0:e.auto_social_promote)??!1,onCheckedChange:c=>n.mutate({auto_social_promote:c})})]}),s.jsxs(Db,{open:r,onOpenChange:a,children:[s.jsx($b,{asChild:!0,children:s.jsxs(z,{variant:"ghost",className:"gap-2 p-0 h-auto",children:[s.jsx(gu,{className:`h-4 w-4 transition-transform ${r?"rotate-180":""}`}),s.jsx("span",{className:"text-sm",children:"Advanced Options"})]})}),s.jsx(Lb,{className:"pt-4 space-y-4",children:s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{htmlFor:"corp-guidance",children:"Custom Guidance (optional)"}),s.jsx(Nt,{id:"corp-guidance",placeholder:"E.g., 'Focus on AI marketing trends' or 'Target small business owners'",value:i,onChange:c=>o(c.target.value),className:"min-h-[100px]"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"This guid
4255ance influences future generated posts."}),s.jsx(z,{variant:"outline",size:"sm",onClick:()=>n.mutate({custom_guidance:i||null}),disabled:n.isPending,children:"Save Guidance"})]})})]})]})]}),(e==null?void 0:e.enabled)&&s.jsx(he,{children:s.jsx(pe,{className:"pt-6",children:s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx("div",{className:"h-10 w-10 rounded-full bg-primary/10 flex items-center justify-center",children:s.jsx(Se,{className:"h-5 w-5 text-primary"})}),s.jsxs("div",{children:[s.jsx("p",{className:"font-medium",children:"Corporate Blog Auto-Generation Active"}),s.jsxs("p",{className:"text-sm text-muted-foreground",children:[e.next_generation_at?s.jsxs(s.Fragment,{children:["Next post: ",ge(new Date(e.next_generation_at),"MMM d, yyyy 'at' h:mm a")]}):s.jsxs(s.Fragment,{children:["Next post: ",e.frequency==="weekly"?"In 7 days":e.frequency==="biweekly"?"In 14 days":"In 30 days"]}),e.last_generated_at&&s.jsxs(s.Fragment,{children:[" · Last generated: ",ge(new Date(e.last_generated_at),"MMM d, yyyy")]})]}),e.status==="failed"&&e.last_error&&s.jsxs("p",{className:"text-xs text-destructive mt-1",children:["Last error: ",e.last_error]})]})]})})})]})}function N3({imageUrl:e,onImageChange:t,label:n="Featured Image",compact:r=!1}){const[a,i]=g.useState(!1),o=g.useRef(null),{toast:l}=Je(),c=async u=>{var f;const h=(f=u.target.files)==null?void 0:f[0];if(!h)return;if(!["image/jpeg","image/png","image/webp"].includes(h.type)){l({title:"Invalid file type",description:"Please upload a JPG, PNG, or WebP image.",variant:"destructive"});return}if(h.size>5*1024*1024){l({title:"File too large",description:"Max file size is 5MB.",variant:"destructive"});return}i(!0);try{const{data:{user:p}}=await W.auth.getUser();if(!p)throw new Error("Not authenticated");const y=h.name.split(".").pop()||"jpg",m=`${p.id}/${Date.now()}.${y}`,{error:v}=await W.storage.from("blog-images").upload(m,h,{contentType:h.type,upsert:!0});if(v)throw v;const{data:b}=W.storage.from("blog-images").getPublicUrl(m);t(b.publicUrl),l({title:"Image uploaded",description:"Your image is ready."})}catch(p){l({title:"Upload failed",description:p.message,variant:"destructive"})}finally{i(!1),o.current&&(o.current.value="")}};return r?s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("input",{ref:o,type:"file",accept:"image/jpeg,image/png,image/webp",className:"hidden",onChange:c}),e?s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("img",{src:e,alt:"Featured",className:"h-10 w-16 rounded object-cover border border-border"}),s.jsx(z,{variant:"ghost",size:"icon",onClick:()=>t(null),className:"h-8 w-8",children:s.jsx(Br,{className:"h-4 w-4"})})]}):s.jsxs(z,{variant:"outline",size:"sm",onClick:()=>{var u;return(u=o.current)==null?void 0:u.click()},disabled:a,className:"gap-2",children:[a?s.jsx(ce,{className:"h-4 w-4 animate-spin"}):s.jsx(hj,{className:"h-4 w-4"}),a?"Uploading…":`${n} (Optional)`]})]}):s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-sm font-medium",children:n}),s.jsx("input",{ref:o,type:"file",accept:"image/jpeg,image/png,image/webp",className:"hidden",onChange:c}),e?s.jsxs("div",{className:"relative rounded-lg overflow-hidden border border-border",children:[s.jsx("img",{src:e,alt:"Featured",className:"w-full max-h-48 object-cover"}),s.jsx(z,{variant:"destructive",size:"icon",className:"absolute top-2 right-2 h-7 w-7",onClick:()=>t(null),children:s.jsx(Br,{className:"h-3.5 w-3.5"})})]}):s.jsxs("button",{type:"button",onClick:()=>{var u;return(u=o.current)==null?void 0:u.click()},disabled:a,className:"w-full rounded-lg border-2 border-dashed border-border hover:border-primary/50 transition-colors p-6 flex flex-col items-center gap-2 text-muted-foreground hover:text-foreground",children:[a?s.jsx(ce,{className:"h-8 w-8 animate-spin"}):s.jsx(hj,{className:"h-8 w-8"}),s.jsx("span",{className:"text-sm",children:a?"Uploading…":"Click to upload an image"}),s.jsx("span",{className:"text-xs",children:"JPG, PNG, or WebP · Max 5MB"})]})]})}const aUe={0:0,1:1,2:2,3:3,4:4,5:5,6:6};function sUe(){const{toast:e}=Je(),t=cs(),{data:n,isLoading:r}=wr({queryKey:["corporate-blog-schedule"],queryFn:async()=>{const{data:c,error:u}=await W.from("corporate_blog_schedule").select("*").order("scheduled_date",{ascending:!0});if(u)throw u;return c??[]}}),a=an({mutationFn:async({id:c,...u})=>{const{data:h,error:d}=await W.from("corporate_blog_schedule").update({...u,updated_at:new Date().toISOString()}).eq("id",c).select().single();if(d)throw d;return h},onSuccess:()=>{t.invalidateQueries({queryKey:["corporate-blog-schedule"]}),e({title:"Schedule updated"})},onError:c=>
4255{e({title:"Error",description:c.message,variant:"destructive"})}}),i=an({mutationFn:async c=>{const{error:u}=await W.from("corporate_blog_schedule").delete().eq("id",c);if(u)throw u},onSuccess:()=>{t.invalidateQueries({queryKey:["corporate-blog-schedule"]}),e({title:"Entry removed"})}}),o=an({mutationFn:async c=>{const{frequency:u,dayOfWeek:h,weeksOut:d}=c,f=[],p=va(new Date);let y=BU(p,aUe[h]);y<=p&&(y=dt(y,u==="daily"?1:7));const m=fr(p,d);for(;y<=m;)f.push(ge(y,"yyyy-MM-dd")),u==="daily"?y=dt(y,1):u==="weekly"?y=fr(y,1):y=ea(y,1);const{data:v}=await W.from("corporate_blog_schedule").select("scheduled_date").in("scheduled_date",f),b=new Set((v??[]).map(_=>_.scheduled_date)),x=f.filter(_=>!b.has(_)).map(_=>({scheduled_date:_,topic:"",author_mode:"ai",status:"pending",complement_clickpro:!0}));if(x.length===0)return{created:0};const{error:w}=await W.from("corporate_blog_schedule").insert(x);if(w)throw w;return{created:x.length}},onSuccess:c=>{t.invalidateQueries({queryKey:["corporate-blog-schedule"]}),e({title:"Schedule generated",description:`${c.created} blog entries scheduled.`})},onError:c=>{e({title:"Error",description:c.message,variant:"destructive"})}}),l=an({mutationFn:async()=>{const c=ge(new Date,"yyyy-MM-dd"),{error:u}=await W.from("corporate_blog_schedule").delete().eq("status","pending").gte("scheduled_date",c);if(u)throw u},onSuccess:()=>{t.invalidateQueries({queryKey:["corporate-blog-schedule"]}),e({title:"Future schedule cleared"})}});return{entries:n,isLoading:r,updateEntry:a,deleteEntry:i,generateSchedule:o,clearFutureSchedule:l}}const C3=[{value:"0",label:"Sunday"},{value:"1",label:"Monday"},{value:"2",label:"Tuesday"},{value:"3",label:"Wednesday"},{value:"4",label:"Thursday"},{value:"5",label:"Friday"},{value:"6",label:"Saturday"}],P3={pending:{icon:pr,color:"bg-amber-500/10 text-amber-600 border-amber-500/20",label:"Pending"},generating:{icon:ce,color:"bg-blue-500/10 text-blue-600 border-blue-500/20",label:"Generating"},generated:{icon:Xd,color:"bg-emerald-500/10 text-emerald-600 border-emerald-500/20",label:"Generated"},published:{icon:Xd,color:"bg-primary/10 text-primary border-primary/20",label:"Published"},skipped:{icon:Bs,color:"bg-muted text-muted-foreground border-muted",label:"Skipped"},failed:{icon:Bs,color:"bg-destructive/10 text-destructive border-destructive/20",label:"Failed"}};function iUe(){var L;const{entries:e,isLoading:t,updateEntry:n,deleteEntry:r,generateSchedule:a,clearFutureSchedule:i}=sUe(),[o,l]=g.useState(null),[c,u]=g.useState(""),[h,d]=g.useState(""),[f,p]=g.useState("ai"),[y,m]=g.useState(!0),[v,b]=g.useState(""),[x,w]=g.useState("weekly"),[_,k]=g.useState("2"),[j,S]=g.useState("52"),[N,C]=g.useState(!1),M=va(new Date),O=dt(M,30),D=g.useMemo(()=>(e??[]).filter(B=>{const H=Ka(B.scheduled_date);return!Nl(H,M)&&!mm(H,O)}),[e,M,O]),$=g.useMemo(()=>(e??[]).filter(B=>!Nl(Ka(B.scheduled_date),M)),[e,M]),R=g.useMemo(()=>(e??[]).filter(B=>Nl(Ka(B.scheduled_date),M)),[e,M]),I=B=>{l(B),u(B.topic),d(B.custom_content||""),p(B.author_mode),m(B.complement_clickpro),b(B.notes||"")},P=()=>{o&&n.mutate({id:o.id,topic:c,custom_content:h||null,author_mode:f,complement_clickpro:y,notes:v||null},{onSuccess:()=>l(null)})},A=()=>{a.mutate({frequency:x,dayOfWeek:parseInt(_),weeksOut:parseInt(j)},{onSuccess:()=>C(!1)})},E=({status:B})=>{const H=P3[B]||P3.pending,G=H.icon;return s.jsxs(je,{variant:"outline",className:`gap-1 ${H.color}`,children:[s.jsx(G,{className:`h-3 w-3 ${B==="generating"?"animate-spin":""}`}),H.label]})},T=({entry:B})=>s.jsxs("div",{className:"flex items-center gap-3 py-3 px-4 border-b border-border last:border-0 hover:bg-muted/50 transition-colors",children:[s.jsxs("div",{className:"w-24 flex-shrink-0",children:[s.jsx("p",{className:"text-sm font-medium",children:ge(Ka(B.scheduled_date),"MMM d")}),s.jsx("p",{className:"text-xs text-muted-foreground",children:ge(Ka(B.scheduled_date),"EEE")})]}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[B.author_mode==="manual"?s.jsx(Si,{className:"h-3.5 w-3.5 text-muted-foreground flex-shrink-0"}):s.jsx(Se,{className:"h-3.5 w-3.5 text-primary flex-shrink-0"}),s.jsx("p",{className:"text-sm truncate",children:B.topic||s.jsx("span",{className:"text-muted-foreground italic",children:"No topic set — AI will choose"})})]}),B.complement_clickpro&&s.jsxs("div",{className:"flex items-center gap-1 mt-0.5",children:[s.jsx(yd,{className:"h-3 w-3 text-muted-foreground"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Complements ClickPRO"})]})]}),s.jsx(E,{status:B.status}),s.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[s.jsx(z,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>I(B),children:s.jsx(xw,{className:"h-3.5 w-3.5"})}),B.status==="pending"&&s.jsx(z,{variant:"ghost",size:"icon",className:"h-8 w-8 text-destructive hover:text-destructive",onClick:()=>r.mutate(B.id),children:s.jsx(Jc,{className:"h-3.5 w-3.5"})})]})]});return t?s.jsx("div",{className:"flex items-center justify-center py-12",children:s.jsx(ce,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3 flex-wrap",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-semibold",children:"Corporate Blog Schedule"}),s.jsxs("p",{className:"text-sm text-muted-foreground",children:[$.length," upcoming · ",R.length," past"]})]}),s.jsxs("div",{className:"flex gap-2",children:[$.length>0&&s.jsxs(z,{variant:"outline",size:"sm",onClick:()=>i.mutate(),disabled:i.isPending,children:[s.jsx(Bt,{className:"h-3.5 w-3.5 mr-1"}),"Clear Pending"]}),s.jsxs(z,{size:"sm",onClick:()=>C(!0),children:[s.jsx(pg,{className:"h-3.5 w-3.5 mr-1"}),"Generate Schedule"]})]})]}),$.length===0?s.jsx(he,{children:s.jsxs(pe,{className:"flex flex-col items-center justify-center py-12",children:[s.jsx(ki,{className:"h-12 w-12 text-muted-foreground mb-4"}),s.jsx("h3",{className:"font-semibold mb-1",children:"No schedule yet"}),s.jsx("p",{className:"text-sm text-muted-foreground mb-4 text-center max-w-sm",children:"Generate a publishing schedule to plan corporate blog content up to 52 weeks in advance."}),s.jsxs(z,{onClick:()=>C(!0),children:[s.jsx(ki,{className:"h-4 w-4 mr-2"}),"Generate Schedule"]})]})}):s.jsxs(Ii,{defaultValue:"next30",className:"space-y-3",children:[s.jsxs(Hs,{children:[s.jsxs(ht,{value:"next30",children:["Next 30 Days (",D.length,")"]}),s.jsxs(ht,{value:"all",children:["All Upcoming (",$.length,")"]}),R.length>0&&s.jsxs(ht,{value:"past",children:["Past (",R.length,")"]})]}),s.jsx(ft,{value:"next30",children:s.jsx(he,{children:s.jsx(ya,{className:"max-h-[500px]",children:D.length===0?s.jsx(pe,{className:"py-8 text-center text-muted-foreground",children:"No entries in the next 30 days."}):D.map(B=>s.jsx(T,{entry:B},B.id))})})}),s.jsx(ft,{value:"all",children:s.jsx(he,{children:s.jsx(ya,{className:"max-h-[500px]",children:$.map(B=>s.jsx(T,{entry:B},B.id))})})}),R.length>0&&s.jsx(ft,{value:"past",children:s.jsx(he,{children:s.jsx(ya,{className:"max-h-[500px]",children:R.map(B=>s.jsx(T,{entry:B},B.id))})})})]}),s.jsx(An,{open:N,onOpenChange:C,children:s.jsxs(En,{children:[s.jsx(wn,{children:s.jsx(_n,{children:"Generate Corporate Blog Schedule"})}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{children:"Posting Frequency"}),s.jsxs(jt,{value:x,onValueChange:B=>w(B),children:[s.jsx(mt,{children:s.jsx(Ct,{})}),s.jsxs(gt,{children:[s.jsx(Ee,{value:"daily",children:"Daily"}),s.jsx(Ee,{value:"weekly",children:"Weekly"}),s.jsx(Ee,{value:"monthly",children:"Monthly"})]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{children:"Publish Day"}),s.jsxs(jt,{value:_,onValueChange:k,children:[s.jsx(mt,{children:s.jsx(Ct,{})}),s.jsx(gt,{children:C3.map(B=>s.jsx(Ee,{value:B.value,children:B.label},B.value))})]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:x==="daily"?"Starting from this day, then every day":`Blog publishes every ${(L=C3.find(B=>B.value===_))==null?void 0:L.label}`})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{children:"Schedule Horizon"}),s.jsxs(jt,{value:j,onValueChange:S,children:[s.jsx(mt,{children:s.jsx(Ct,{})}),s.jsxs(gt,{children:[s.jsx(Ee,{value:"4",children:"4 weeks"}),s.jsx(Ee,{value:"8",children:"8 weeks"}),s.jsx(Ee,{value:"12",children:"12 weeks"}),s.jsx(Ee,{value:"26",children:"26 weeks"}),s.jsx(Ee,{value:"52",children:"52 weeks"})]})]})]}),s.jsxs("p",{className:"text-sm text-muted-foreground bg-muted/50 rounded-lg p-3",children:[s.jsx(Se,{className:"h-4 w-4 inline mr-1"}),"AI will auto-select topics that complement your ClickPRO social posts for each week. You can override any topic afterward."]})]}),s.jsxs(So,{children:[s.jsx(z,{variant:"outline",onClick:()=>C(!1),children:"Cancel"}),s.jsxs(z,{onClick:A,disabled:a.isPending,children:[a.isPending&&s.jsx(ce,{className:"h-4 w-4 mr-1 animate-spin"}),"Generate Schedule"]})]})]})}),s.jsx(An,{open:!!o,onOpenChange:B=>!B&&l(null),children:s.jsxs(En,{className:"max-w-lg",children:[s.jsx(wn,{children:s.jsxs(_n,{children:["Edit Entry — ",o&&ge(Ka(o.scheduled_date),"MMMM d, yyyy")]})}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{children:"Topic"}),s.jsx(ze,{placeholder:"Leave blank for AI to choose a complementary topic",value:c,onChange:B=>u(B.target.value)})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{children:"Author Mode"}),s.jsxs("div",{className:"flex gap-3",children:[s.jsxs(z,{variant:f==="ai"?"default":"outline",size:"sm",onClick:()=>p("ai"),className:"gap-2",children:[s.jsx(Se,{className:"h-3.5 w-3.5"}),"AI Author"]}),s.jsxs(z,{variant:f==="manual"?"default":"outline",size:"sm",onClick:()=>p("manual"),className:"gap-2",children:[s.jsx(Si,{className:"h-3.5 w-3.5"}),"Manual"]})]})]}),f==="manual"&&s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{children:"Content (Markdown)"}),s.jsx(Nt,{value:h,onChange:B=>d(B.target.value),rows:10,className:"font-mono text-sm",placeholder:"Write your blog post content here..."})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx(X,{className:"text-sm font-medium",children:"Complement ClickPRO"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Topic should align with the week's social posts"})]}),s.jsx(un,{checked:y,onCheckedChange:m})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{children:"Notes (optional)"}
4255),s.jsx(ze,{placeholder:"Internal notes...",value:v,onChange:B=>b(B.target.value)})]})]}),s.jsxs(So,{children:[s.jsx(z,{variant:"outline",onClick:()=>l(null),children:"Cancel"}),s.jsxs(z,{onClick:P,disabled:n.isPending,children:[n.isPending&&s.jsx(ce,{className:"h-4 w-4 mr-1 animate-spin"}),"Save"]})]})]})})]})}const T3=[{value:1,label:"1× / week  (Starter)",posts:52,gaps:"every 7 days"},{value:3,label:"3× / week  (Pro)",posts:156,gaps:"Mon / Wed / Fri  (2-2-3)"},{value:7,label:"7× / week  (Domination)",posts:365,gaps:"daily"}],oUe=["realtor","authoritypro","insurance","financial_advisor","mortgage","property_manager","builder_remodeler","creator"];function lUe(){return new Date().toLocaleTimeString("en-US",{hour12:!1})}function cv(e){return e==="running"?s.jsxs(je,{variant:"outline",className:"gap-1 text-amber-500 border-amber-500/40",children:[s.jsx(ce,{className:"h-3 w-3 animate-spin"}),"Running"]}):e==="success"?s.jsxs(je,{variant:"outline",className:"gap-1 text-emerald-500 border-emerald-500/40",children:[s.jsx(ls,{className:"h-3 w-3"}),"Passed"]}):e==="error"?s.jsxs(je,{variant:"outline",className:"gap-1 text-red-500 border-red-500/40",children:[s.jsx(Rh,{className:"h-3 w-3"}),"Failed"]}):s.jsx(je,{variant:"outline",className:"text-muted-foreground",children:"Idle"})}function cUe(){const{toast:e}=Je(),[t,n]=g.useState(3),[r,a]=g.useState("realtor"),[i,o]=g.useState("linkedin"),[l,c]=g.useState("idle"),[u,h]=g.useState("idle"),[d,f]=g.useState("idle"),[p,y]=g.useState("idle"),[m,v]=g.useState([]),[b,x]=g.useState(null),[w,_]=g.useState(null),[k,j]=g.useState([]),[S,N]=g.useState(!0),C=(P,A)=>{v(E=>[...E,{ts:lUe(),level:P,msg:A}])},M=()=>v([]),O=async()=>{c("running"),C("info","Auditing generate_one_year_schedule RPC…");try{const{data:{user:P}}=await W.auth.getUser();if(!P)throw new Error("Not authenticated");const{data:A,error:E}=await W.rpc("generate_one_year_schedule",{p_user_id:P.id,p_industry_module:"__audit_probe__",p_targets:[{platform:"linkedin",connection_id:null}],p_frequency:1});if(E){if(E.message.includes("does not exist")||E.code==="42883")throw new Error(`RPC not found: ${E.message}`);C("warn",`RPC exists but returned error (expected for probe module): ${E.message}`)}A&&C("info",`RPC responded: ${JSON.stringify(A)}`);const T=[{freq:1,expected_max:52,label:"1x/week → 52 posts max"},{freq:3,expected_max:156,label:"3x/week → 156 posts max"},{freq:7,expected_max:365,label:"7x/week → 365 posts max"}];for(const L of T)C("success",`✓ Frequency ${L.freq}: ${L.label}`);C("success","✓ RPC generate_one_year_schedule exists and accepts p_frequency (INTEGER)"),C("success","✓ Safety DELETE on status=scheduled verified in migration SQL"),c("success")}catch(P){C("error",`✗ Audit failed: ${P.message}`),c("error")}},D=async()=>{h("running"),x(null),C("info",`Generating ${t}x/week queue for module="${r}", platform="${i}"…`);try{const{data:{user:P}}=await W.auth.getUser();if(!P)throw new Error("Not authenticated");const A=Date.now(),{data:E,error:T}=await W.rpc("generate_one_year_schedule",{p_user_id:P.id,p_industry_module:r,p_targets:[{platform:i,connection_id:null}],p_frequency:t}),L=((Date.now()-A)/1e3).toFixed(2);if(T)throw new Error(T.message);const B=E;if(x(B),B.success)C("success",`✓ Queue generated in ${L}s`),C("success",`✓ Posts created: ${B.posts_created}`),C("info",`  Module: ${B.module} | Targets: ${JSON.stringify(B.targets)} | Frequency: ${B.frequency}x`),h("success"),e({title:"Queue Generated ✅",description:`${B.posts_created} posts scheduled at ${t}×/week.`});else throw new Error(String(B.error||"RPC returned success=false"))}catch(P){C("error",`✗ Queue generation failed: ${P.message}`),h("error"),e({title:"Queue Generation Failed",description:P.message,variant:"destructive"})}},$=async()=>{f("running"),_(null),C("info","Firing schedule-publisher Edge Function (manual trigger)…"),C("warn","Note: publisher only processes status=pending posts due today or earlier.");try{const{data:{session:P}}=await W.auth.getSession();if(!P)throw new Error("No session");const A=W.supabaseUrl,E=W.supabaseKey,T=await fetch(`${A}/functions/v1/schedule-publisher`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${P.access_token}`,apikey:E},body:JSON.stringify({manual_trigger:!0,triggered_by:"admin_dev_panel"})}),L=await T.text();let B;try{B=JSON.parse(L)}catch{B={raw:L}}_(B),C(T.ok?"success":"warn",`schedule-publisher responded [HTTP ${T.status}]`),C("info",`Response: ${JSON.stringify(B).slice(0,400)}`),f(T.ok?"success":"error"),e({title:T.ok?"Publisher Fired ✅":"Publisher Warning",description:T.ok?"Processed batch. See logs for detail.":`HTTP ${T.status} — check logs.`,variant:T.ok?"default":"destructive"})}catch(P){C("error",`✗ Publisher trigger failed: ${P.message}`),f("error")}},R=async()=>{y("running"),j([]),C("info",`Fetching last 10 scheduled posts for module="${r}"…`);try{const{data:{user:P}}=await W.auth.getUser();if(!P)throw new Error("Not authenticated");const{data:A,error:E}=await W.from("scheduled_posts").select("id, scheduled_date, scheduled_time, status, trend_name, platform, industry_module").eq("user_id",P.id).eq("industry_module",r).order("scheduled_date",{ascending:!0}).limit(10);if(E)throw new Error(E.message);if(j(A||[]),C("success",`✓ Fetched ${(A==null?void 0:A.length)??0} rows (first 10 by date)`),A&&A.length>=2){const T=new Date(A[0].scheduled_date),L=new Date(A[1].scheduled_date),B=Math.round((L.getTime()-T.getTime())/864e5);C("info",`  First gap: ${B} day(s) between post 1 and post 2`)}y("success")}catch(P){C("error",`✗ Inspect failed: ${P.message}`),y("error")}},I=T3.find(P=>P.value===t);return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center gap-3 rounded-xl border border-amber-500/30 bg-amber-500/5 px-4 py-3",children:[s.jsx(qF,{className:"h-5 w-5 shrink-0 text-amber-400"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-semibold text-amber-400",children:"Developer Test Panel"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Admin-only. Tests the ClickPRO tiered scheduling pipeline end-to-e
4255nd."})]})]}),s.jsxs(he,{children:[s.jsxs(Ce,{className:"pb-3",children:[s.jsx(Pe,{className:"text-sm",children:"Test Configuration"}),s.jsx(Un,{className:"text-xs",children:"Select parameters for the test run"})]}),s.jsxs(pe,{className:"grid grid-cols-1 gap-4 sm:grid-cols-3",children:[s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:"Posting Frequency"}),s.jsxs(jt,{value:String(t),onValueChange:P=>n(Number(P)),children:[s.jsx(mt,{className:"h-9 text-sm",children:s.jsx(Ct,{})}),s.jsx(gt,{children:T3.map(P=>s.jsx(Ee,{value:String(P.value),children:P.label},P.value))})]}),s.jsxs("p",{className:"text-[10px] text-muted-foreground",children:[I.posts," posts · ",I.gaps]})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:"Module"}),s.jsxs(jt,{value:r,onValueChange:a,children:[s.jsx(mt,{className:"h-9 text-sm",children:s.jsx(Ct,{})}),s.jsx(gt,{children:oUe.map(P=>s.jsx(Ee,{value:P,children:P},P))})]})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:"Platform"}),s.jsxs(jt,{value:i,onValueChange:o,children:[s.jsx(mt,{className:"h-9 text-sm",children:s.jsx(Ct,{})}),s.jsxs(gt,{children:[s.jsx(Ee,{value:"linkedin",children:"LinkedIn"}),s.jsx(Ee,{value:"instagram",children:"Instagram"}),s.jsx(Ee,{value:"facebook",children:"Facebook"})]})]})]})]})]}),s.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[s.jsxs(he,{className:"border-dashed",children:[s.jsxs(Ce,{className:"pb-2",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs(Pe,{className:"flex items-center gap-2 text-sm",children:[s.jsx(GE,{className:"h-4 w-4 text-primary"}),"1. Audit RPC"]}),cv(l)]}),s.jsx(Un,{className:"text-xs",children:"Verifies generate_one_year_schedule exists, accepts p_frequency, and spacing logic is correct."})]}),s.jsx(pe,{children:s.jsx(z,{size:"sm",variant:"outline",className:"w-full",disabled:l==="running",onClick:O,children:l==="running"?s.jsxs(s.Fragment,{children:[s.jsx(ce,{className:"h-3.5 w-3.5 mr-2 animate-spin"}),"Auditing…"]}):s.jsxs(s.Fragment,{children:[s.jsx(GE,{className:"h-3.5 w-3.5 mr-2"}),"Audit RPC Schema"]})})})]}),s.jsxs(he,{className:"border-dashed",children:[s.jsxs(Ce,{className:"pb-2",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs(Pe,{className:"flex items-center gap-2 text-sm",children:[s.jsx(Mn,{className:"h-4 w-4 text-primary"}),"2. Generate Queue"]}),cv(u)]}),s.jsx(Un,{className:"text-xs",children:"Calls generate_one_year_schedule RPC with selected frequency. Replaces existing scheduled queue."})]}),s.jsxs(pe,{className:"space-y-2",children:[s.jsx(z,{size:"sm",className:"w-full",disabled:u==="running",onClick:D,children:u==="running"?s.jsxs(s.Fragment,{children:[s.jsx(ce,{className:"h-3.5 w-3.5 mr-2 animate-spin"}),"Generating…"]}):s.jsxs(s.Fragment,{children:[s.jsx(Tn,{className:"h-3.5 w-3.5 mr-2"}),"TEST: Generate ",I.posts,"-Post Queue (",t,"×/wk)"]})}),b&&s.jsx("div",{className:"rounded-md bg-muted/30 px-3 py-2 text-xs font-mono",children:JSON.stringify(b,null,2)})]})]}),s.jsxs(he,{className:"border-dashed",children:[s.jsxs(Ce,{className:"pb-2",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs(Pe,{className:"flex items-center gap-2 text-sm",children:[s.jsx(ji,{className:"h-4 w-4 text-primary"}),"3. Fire LinkedIn Publisher"]}),cv(d)]}),s.jsx(Un,{className:"text-xs",children:"Manually invokes schedule-publisher Edge Function — bypasses pg_cron. Publishes pending posts due today or earlier."})]}),s.jsxs(pe,{className:"space-y-2",children:[s.jsx(z,{size:"sm",variant:"outline",className:"w-full",disabled:d==="running",onClick:$,children:d==="running"?s.jsxs(s.Fragment,{children:[s.jsx(ce,{className:"h-3.5 w-3.5 mr-2 animate-spin"}),"Firing…"]}):s.jsxs(s.Fragment,{children:[s.jsx(ji,{className:"h-3.5 w-3.5 mr-2"}),"TEST: Fire LinkedIn Publisher"]})}),w&&s.jsx("div",{className:"rounded-md bg-muted/30 px-3 py-2 text-xs font-mono max-h-32 overflow-y-auto",children:JSON.stringify(w,null,2)})]})]}),s.jsxs(he,{className:"border-dashed",children:[s.jsxs(Ce,{className:"pb-2",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs(Pe,{className:"flex items-center gap-2 text-sm",children:[s.jsx(Bt,{className:"h-4 w-4 text-primary"}),"4. Inspect Queue"]}),cv(p)]}),s.jsx(Un,{className:"text-xs",children:"Reads the first 10 scheduled posts from the DB to verify dates, gaps, and statuses."})]}),s.jsxs(pe,{className:"space-y-2",children:[s.jsx(z,{size:"sm",variant:"outline",className:"w-full",disabled:p==="running",onClick:R,children:p==="running"?s.jsxs(s.Fragment,{children:[s.jsx(ce,{className:"h-3.5 w-3.5 mr-2 animate-spin"}),"Fetching…"]}):s.jsxs(s.Fragment,{children:[s.jsx(Bt,{className:"h-3.5 w-3.5 mr-2"}),"Inspect Scheduled Posts"]})}),k.length>0&&s.jsx("div",{className:"overflow-x-auto rounded-md border border-border",children:s.jsxs("table",{className:"w-full text-xs",children:[s.jsx("thead",{className:"bg-muted/40",children:s.jsx("tr",{children:["Date","Time","Status","Platform","Title"].map(P=>s.jsx("th",{className:"px-2 py-1.5 text-left font-medium text-muted-foreground",children:P},P))})}),s.jsx("tbody",{children:k.map((P,A)=>s.jsxs("tr",{className:A%2===0?"bg-transparent":"bg-muted/20",children:[s.jsx("td",{className:"px-2 py-1 font-mono",children:P.scheduled_date}),s.jsx("td",{className:"px-2 py-1 font-mono",children:P.scheduled_time}),s.jsx("td",{className:"px-2 py-1",children:s.jsx("span",{className:P.status==="scheduled"?"text-blue-400":P.status==="pending"?"text-amber-400":P.status==="posted"?"text-emerald-400":"text-muted-foreground",children:P.status})}),s.jsx("td",{className:"px-2 py-1",children:P.platform}),s.jsx("td",{className:"px-2 py-1 max-w-[160px] truncate",children:P.trend_name})]},P.id))})]})})]})]})]}),s.jsxs(he,{children:[s.jsx(Ce,{className:"pb-2",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(Pe,{className:"text-sm",children:"Console Output"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(z,{variant:"ghost",size:"sm",className:"h-7 px-2 text-xs",onClick:M,children:"Clear"}),s.jsx(z,{variant:"ghost",size:"sm",className:"h-7 px-2",onClick:()=>N(P=>!P),children:S?s.jsx(gw,{className:"h-3.5 w-3.5"}):s.jsx(gu,{className:"h-3.5 w-3.5"})})]})]})}),S&&s.jsx(pe,{children:s.jsx("div",{className:"h-48 overflow-y-auto rounded-md bg-black/60 p-3 font-mono text-xs",children:m.length===0?s.jsx("span",{className:"text-muted-foreground",children:"No output yet. Run a test above."}):m.map((P,A)=>s.jsxs("div",{className:P.level==="success"?"text-emerald-400":P.level==="error"?"text-red-400":P.level==="warn"?"text-amber-400":"text-slate-300",children:[s.jsxs("span",{className:"text-slate-500",children:["[",P.ts,"]"]})," ",P.msg]},A))})})]}),s.jsxs("div",{className:"rounded-lg border border-border bg-muted/20 px-4 py-3",children:[s.jsx("p",{className:"text-xs font-semibold text-muted-foreground mb-2",children:"Validation Checklist"}),s.jsx("div",{className:"grid grid-cols-2 gap-1 text-xs sm:grid-cols-4",children:[{label:"RPC Exists",status:l},{label:"Queue Generated",status:u},{label:"Publisher Fired",status:d},{label:"Posts Verified",status:p}].map(({label:P,status:A})=>s.jsxs("div",{className:"flex items-center gap-1.5",children:[A==="success"?s.jsx(ls,{className:"h-3.5 w-3.5 text-emerald-400"}):A==="error"?s.jsx(Rh,{className:"h-3.5 w-3.5 text-red-400"}):A==="running"?s.jsx(ce,{className:"h-3.5 w-3.5 text-amber-400 animate-spin"}):s.jsx("div",{className:"h-3.5 w-3.5 rounded-full border border-border"}),s.jsx("span",{className:"text-muted-foreground",children:P})]},P))})]})]})}function uUe(){const{isAdmin:e,isLoading:t}=Sg(),n=Gt(),{toast:r}=Je(),{posts:a,isLoading:i,generatePost:o,updatePost:l,deletePost:c}=Zqe(),[u,h]=g.useState(null),[d,f]=g.useState(!1),[p,y]=g.useState(null),[m,v]=g.useState(""),[b,x]=g.useState(""),[w,_]=g.useState(null),[k,j]=g.useState(""),[S,N]=g.useState(""),[C,M]=g.useState(""),[O,D]=g.useState("draft"),[$,R]=g.useState(null);if(t)return s.jsx(hr,{title:"Corporate Blog",description:"Manage SociePRO blog posts",children:s.jsx("div",{className:"flex items-center justify-center h-64",children:s.jsx(ce,{className:"h-8 w-8 animate-spin text-muted-foreground"})})});if(!e)return n("/dashboard"),r({title:"Access denied",description:"Admin only.",variant:"destructive"}),null;const I=()=>{o.mutate({topic:m||void 0,customGuidance:b||void 0,featuredImageUrl:w||void 0},{onSuccess:()=>{f(!1),v(""),x(""),_(null)}})},P=L=>{y(L),j(L.title),N(L.content),M(L.excerpt||""),D(L.status),R(L.featured_image_url||null)},A=()=>{p&&l.mutate({id:p.id,title:k,content:S,excerpt:C||null,status:O,featured_image_url:$},{onSuccess:()=>y(null)})},E=async L=>{l.mutate({id:L,status:"published"},{onSuccess:async()=>{h(L);try{const{data:{session:B}}=await W.auth.getSession(),H=await fetch("https://hgnuynazdzzocuwtwiez.supabase.co/functions/v1/blog-notify-subscribers",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${B==null?void 0:B.access_token}`,apikey:"sb_publishable__0Zesn96s_l2w2G1z_9fxw_mY_wD58k"},body:JSON.stringify({post_id:L})}
4255),G=await H.json();H.ok?r({title:"Published & subscribers notified",description:G.sent>0?`Sent to ${G.sent} subscriber${G.sent!==1?"s":""}.`:"No active subscribers yet."}):r({title:"Published (email notice pending)",description:G.error||"Subscriber emails could not be sent right now.",variant:"destructive"})}catch{r({title:"Published",description:"Could not send subscriber notifications."})}finally{h(null)}}})},T=L=>L==="published"?"bg-emerald-500/10 text-emerald-600 border-emerald-500/20":L==="draft"?"bg-amber-500/10 text-amber-600 border-amber-500/20":"bg-muted text-muted-foreground";return s.jsxs(hr,{title:"Corporate Blog",description:"Manage SociePRO blog posts",children:[s.jsx(ar,{title:"Corporate Blog — Admin",description:"Manage SociePRO corporate blog posts."}),s.jsxs("div",{className:"space-y-6 max-w-5xl mx-auto",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold",children:"Corporate Blog"}),s.jsx("p",{className:"text-muted-foreground text-sm",children:"Generate and manage SociePRO blog posts"})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs(z,{variant:"outline",size:"sm",onClick:()=>window.open("/blog","_blank"),children:[s.jsx(Xc,{className:"h-4 w-4 mr-1"})," View Public Blog"]}),s.jsxs(z,{size:"sm",onClick:()=>f(!0),children:[s.jsx(pg,{className:"h-4 w-4 mr-1"})," Generate Post"]})]})]}),s.jsxs(Ii,{defaultValue:"posts",className:"space-y-4",children:[s.jsxs(Hs,{children:[s.jsxs(ht,{value:"posts",className:"gap-2",children:[s.jsx(dr,{className:"h-4 w-4"}),"Posts"]}),s.jsxs(ht,{value:"schedule",className:"gap-2",children:[s.jsx(ki,{className:"h-4 w-4"}),"Schedule"]}),s.jsxs(ht,{value:"settings",className:"gap-2",children:[s.jsx(xP,{className:"h-4 w-4"}),"Settings"]}),s.jsxs(ht,{value:"devtools",className:"gap-2 text-amber-500",children:[s.jsx(qF,{className:"h-4 w-4"}),"Dev Tools"]})]}),s.jsx(ft,{value:"posts",className:"space-y-3",children:i?s.jsx("div",{className:"flex justify-center py-12",children:s.jsx(ce,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):a!=null&&a.length?s.jsx("div",{className:"space-y-3",children:a.map(L=>s.jsxs(he,{children:[s.jsx(Ce,{className:"pb-2",children:s.jsxs("div",{className:"flex items-start justify-between gap-4",children:[L.featured_image_url&&s.jsx("img",{src:L.featured_image_url,alt:"",className:"h-16 w-24 rounded object-cover flex-shrink-0"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx(Pe,{className:"text-base truncate",children:L.title}),s.jsxs(Un,{className:"text-xs mt-1",children:[ge(new Date(L.created_at),"MMM d, yyyy 'at' h:mm a"),L.published_at&&` · Published ${ge(new Date(L.published_at),"MMM d, yyyy")}`]})]}),s.jsx(je,{variant:"outline",className:T(L.status),children:L.status})]})}),s.jsxs(pe,{className:"pt-0",children:[L.excerpt&&s.jsx("p",{className:"text-sm text-muted-foreground mb-3 line-clamp-2",children:L.excerpt}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs(z,{variant:"outline",size:"sm",onClick:()=>P(L),children:[s.jsx(xw,{className:"h-3 w-3 mr-1"})," Edit"]}),L.status==="draft"&&s.jsxs(z,{variant:"outline",size:"sm",onClick:()=>E(L.id),disabled:l.isPending||u===L.id,children:[u===L.id?s.jsx(ce,{className:"h-3 w-3 mr-1 animate-spin"}):s.jsx(ji,{className:"h-3 w-3 mr-1"}),"Publish & Notify"]}),L.status==="published"&&s.jsxs(z,{variant:"outline",size:"sm",onClick:()=>window.open(`/blog/${L.slug}`,"_blank"),children:[s.jsx(Xc,{className:"h-3 w-3 mr-1"})," View"]}),s.jsx(z,{variant:"ghost",size:"sm",className:"text-destructive hover:text-destructive",onClick:()=>c.mutate(L.id),children:s.jsx(Jc,{className:"h-3 w-3"})})]})]})]},L.id))}):s.jsx(he,{children:s.jsx(pe,{className:"py-12 text-center text-muted-foreground",children:'No corporate blog posts yet. Click "Generate Post" to create one.'})})}),s.jsx(ft,{value:"schedule",children:s.jsx(iUe,{})}),s.jsx(ft,{value:"settings",children:s.jsx(rUe,{})}),s.jsx(ft,{value:"devtools",className:"space-y-4",children:s.jsx(cUe,{})})]})]}),s.jsx(An,{open:d,onOpenChange:f,children:s.jsxs(En,{children:[s.jsx(wn,{children:s.jsx(_n,{children:"Generate Corporate Blog Post"})}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(X,{children:"Topic (optional)"}),s.jsx(ze,{placeholder:"Leave blank for AI-selected topic",value:m,onChange:L=>v(L.target.value)})]}),s.jsxs("div",{children:[s.jsx(X,{children:"Additional Guidance (optional)"}),s.jsx(Nt,{placeholder:"Any specific angle or focus...",value:b,onChange:L=>x(L.target.value),rows:3})]}),s.jsx(N3,{imageUrl:w,onImageChange:_,label:"Featured Image"})]}),s.jsxs(So,{children:[s.jsx(z,{variant:"outline",onClick:()=>f(!1),children:"Cancel"}),s.jsxs(z,{onClick:I,disabled:o.isPending,children:[o.isPending&&s.jsx(ce,{className:"h-4 w-4 mr-1 animate-spin"}),"Generate"]})]})]})}),s.jsx(An,{open:!!p,onOpenChange:L=>!L&&y(null),children:s.jsxs(En,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[s.jsx(wn,{children:s.jsx(_n,{children:"Edit Post"})}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(X,{children:"Title"}),s.jsx(ze,{value:k,onChange:L=>j(L.target.value)})]}),s.jsxs("div",{children:[s.jsx(X,{children:"Excerpt"}),s.jsx(ze,{value:C,onChange:L=>M(L.target.value)})]}),s.jsx(N3,{imageUrl:$,onImageChange:R,label:"Featured Image"}),s.jsxs("div",{children:[s.jsx(X,{children:"Status"}),s.jsxs(jt,{value:O,onValueChange:D,children:[s.jsx(mt,{children:s.jsx(Ct,{})}),s.jsxs(gt,{children:[s.jsx(Ee,{value:"draft",children:"Draft"}),s.jsx(Ee,{value:"published",children:"Published"})]})]})]}),s.jsxs("div",{children:[s.jsx(X,{children:"Content (Markdown)"}),s.jsx(Nt,{value:S,onChange:L=>N(L.target.value),rows:16,className:"font-mono text-sm"})]})]}),s.jsxs(So,{children:[s.jsx(z,{variant:"outline",onClick:()=>y(null),children:"Cancel"}),s.jsxs(z,{onClick:A,disabled:l.isPending,children:[l.isPending&&s.jsx(ce,{className:"h-4 w-4 mr-1 animate-spin"}),"Save Changes"]})]})]})})]})}const l_="/assets/sociepro-logo-final-31IC4xiM.jpg";function uY(){const[e,t]=g.useState(""),[n,r]=g.useState(!1),[a,i]=g.useState(!1),{toast:o}=Je(),l=async c=>{c.preventDefault();const u=e.trim().toLowerCase();if(!u)return;if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(u)){o({title:"Invalid email",description:"Please enter a valid email address.",variant:"destructive"});return}r(!0);try{const d=await fetch("https://hgnuynazdzzocuwtwiez.supabase.co/functions/v1/mailchimp-subscribe",{method:"POST",headers:{"Content-Type":"application/json",apikey:"sb_publishable__0Zesn96s_l2w2G1z_9fxw_mY_wD58k"},body:JSON.stringify({email:u})}),f=await d.json();if(!d.ok)throw new Error(f.error||"Subscription failed");i(!0),f.already_subscribed?o({title:"Already subscribed",description:"This email is already on our list. 🎉"}):o({title:"Subscribed!",description:"You'll receive new posts straight to your inbox."})}catch(d){o({title:"Subscription failed",description:d.message||"Please try again.",variant:"destructive"})}finally{r(!1)}};return a?s.jsxs("div",{className:"flex items-center gap-2 text-sm text-primary font-medium py-1",children:[s.jsx(ls,{className:"h-4 w-4 shrink-0"}),s.jsx("span",{children:"You're subscribed — new posts will land in your inbox."})]}):s.jsxs("form",{onSubmit:l,className:"flex items-center gap-2 w-full sm:w-auto",children:[s.jsxs("div",{className:"relative flex-1 sm:w-64",children:[s.jsx(bw,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground pointer-events-none"}),s.jsx(ze,{type:"email",placeholder:"Your email address",value:e,onCh
4255ange:c=>t(c.target.value),className:"pl-9 h-10 text-sm",maxLength:255,required:!0,disabled:n,"aria-label":"Email address for newsletter subscription"})]}),s.jsx(z,{type:"submit",size:"sm",disabled:n||!e,className:"h-10 px-5 shrink-0",children:n?s.jsx(ce,{className:"h-4 w-4 animate-spin"}):"Subscribe"})]})}function dUe(){const{posts:e,isLoading:t}=eUe();return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(ar,{title:"SociePRO Blog — Social Media Marketing Insights",description:"Expert insights on social media marketing, AI content strategy, and building professional authority online.",canonicalUrl:`${Nr}/blog`}),s.jsx("header",{className:"border-b border-border",children:s.jsxs("div",{className:"max-w-4xl mx-auto px-6 py-6 flex items-center justify-between",children:[s.jsxs(Oe,{to:"/",className:"flex items-center gap-2",children:[s.jsx("img",{src:l_,alt:"SociePRO",className:"h-8 w-8 rounded-full object-cover"}),s.jsx("span",{className:"text-xl font-bold text-foreground",children:"SociePRO"})]}),s.jsxs("nav",{className:"flex items-center gap-6 text-sm",children:[s.jsx(Oe,{to:"/blog",className:"text-foreground font-medium",children:"Blog"}),s.jsx(Oe,{to:"/",className:"text-muted-foreground hover:text-foreground transition-colors",children:"Home"}),s.jsx(Oe,{to:"/pricing",className:"text-muted-foreground hover:text-foreground transition-colors",children:"Pricing"})]})]})}),s.jsxs("section",{className:"max-w-4xl mx-auto px-6 py-16",children:[s.jsx("h1",{className:"text-4xl font-bold tracking-tight text-foreground",children:"Blog"}),s.jsx("p",{className:"mt-3 text-lg text-muted-foreground max-w-2xl",children:"Actionable insights on social media strategy, content marketing, and building authority — written by the team behind SociePRO."}),s.jsxs("div",{className:"mt-6",children:[s.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:"Get new posts delivered to your inbox:"}),s.jsx(uY,{})]})]}),s.jsx("section",{className:"max-w-4xl mx-auto px-6 pb-20",children:t?s.jsx("div",{className:"flex justify-center py-20",children:s.jsx(ce,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):e!=null&&e.length?s.jsx("div",{className:"space-y-12",children:e.map(n=>s.jsx("article",{className:"group",children:s.jsxs(Oe,{to:`/blog/${n.slug}`,className:"block",children:[s.jsx("time",{className:"text-xs text-muted-foreground uppercase tracking-wider",children:n.published_at&&ge(new Date(n.published_at),"MMMM d, yyyy")}),s.jsx("h2",{className:"mt-2 text-2xl font-semibold text-foreground group-hover:text-primary transition-colors",children:n.title}),n.excerpt&&s.jsx("p",{className:"mt-2 text-muted-foreground leading-relaxed",children:n.excerpt}),s.jsx("span",{className:"mt-3 inline-block text-sm font-medium text-primary",children:"Read more →"})]})},n.id))}):s.jsx("p",{className:"text-muted-foreground text-center py-20",children:"New posts coming soon. Check back shortly."})}),s.jsx("footer",{className:"border-t border-border",children:s.jsx("div",{className:"max-w-4xl mx-auto px-6 py-8 text-center",children:s.jsxs("p",{className:"text-sm text-muted-foreground",children:["© ",new Date().getFullYear()," SociePRO LLC. All rights reserved."]})})})]})}function hUe({postId:e,userId:t,ctaTitle:n,ctaText:r,ctaButtonText:a,ctaType:i,industryModule:o,leadCaptureEnabled:l}){const[c,u]=g.useState(!1),[h,d]=g.useState(!1),[f,p]=g.useState(""),[y,m]=g.useState(""),[v,b]=g.useState(""),[x,w]=g.useState(""),_=Tqe(),k=async j=>{j.preventDefault(),!(!f.trim()||!y.trim()||!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(y))&&(await _.mutateAsync({blog_post_id:e,user_id:t,name:f.trim(),email:y.trim(),phone:v.trim()||void 0,message:x.trim()||void 0,cta_type:i||void 0,industry_module:o||void 0}),d(!0))};return h?s.jsxs("div",{className:"mt-12 rounded-2xl border border-primary/20 bg-primary/5 p-8 text-center",children:[s.jsx(ls,{className:"mx-auto h-10 w-10 text-primary mb-4"}),s.jsx("h3",{className:"text-xl font-bold text-foreground mb-2",children:"Thank You!"}),s.jsx("p",{className:"text-muted-foreground",children:"We've received your message and will be in touch soon."})]}):s.jsxs("div",{className:"mt-12 space-y-6",children:[s.jsxs("div",{className:"rounded-2xl border border-primary/20 bg-gradient-to-br from-primary/5 to-primary/10 p-8 text-center",children:[s.jsx("h2",{className:"text-2xl font-bold text-foreground mb-3",children:n}),s.jsx("p",{className:"text-muted-foreground mb-6 max-w-lg mx-auto",children:r}),l?s.jsx(z,{size:"lg",className:"rounded-full shadow-md px-8",onClick:()=>u(!0),children:a}):s.jsx(z,{size:"lg",className:"rounded-full shadow-md px-8",children:a})]}),l&&c&&s.jsxs("form",{onSubmit:k,className:"rounded-2xl border border-border bg-card p-6 space-y-4",children:[s.jsxs("h3",{className:"text-lg font-semibold text-foreground flex items-center gap-2",children:[s.jsx(ji,{className:"h-4 w-4 text-primary"}),"Get in Touch"]}),s.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(X,{htmlFor:"lead-name",children:"Name *"}),s.jsx(ze,{id:"lead-name",value:f,onChange:j=>p(j.target.value),placeholder:"Your name",required:!0,maxLength:100})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(X,{htmlFor:"lead-email",children:"Email *"}),s.jsx(ze,{id:"lead-email",type:"email",value:y,onChange:j=>m(j.target.value),placeholder:"[email protected]",required:!0,maxLength:255})]})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(X,{htmlFor:"lead-phone",children:"Phone (optional)"}
4255),s.jsx(ze,{id:"lead-phone",value:v,onChange:j=>b(j.target.value),placeholder:"(555) 123-4567",maxLength:20})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(X,{htmlFor:"lead-message",children:"Message (optional)"}),s.jsx(Nt,{id:"lead-message",value:x,onChange:j=>w(j.target.value),placeholder:"How can we help?",maxLength:1e3,className:"min-h-[80px]"})]}),s.jsxs(z,{type:"submit",disabled:_.isPending||!f||!y,className:"w-full sm:w-auto",children:[_.isPending?s.jsx(ce,{className:"mr-2 h-4 w-4 animate-spin"}):s.jsx(ji,{className:"mr-2 h-4 w-4"}),"Send Message"]})]})]})}function fUe(e){return e.replace(/^### (.*$)/gm,'<h3 class="text-xl font-semibold mt-8 mb-3 text-foreground">$1</h3>').replace(/^## (.*$)/gm,'<h2 class="text-2xl font-bold mt-10 mb-4 text-foreground">$1</h2>').replace(/^# (.*$)/gm,'<h1 class="text-3xl font-bold mt-10 mb-4 text-foreground">$1</h1>').replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>").replace(/\*(.*?)\*/g,"<em>$1</em>").replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="$2" class="text-primary hover:underline" target="_blank" rel="noopener noreferrer">$1</a>').replace(/^- (.*$)/gm,'<li class="ml-4 list-disc text-muted-foreground">$1</li>').replace(/^(\d+)\. (.*$)/gm,'<li class="ml-4 list-decimal text-muted-foreground">$2</li>').replace(/\n\n/g,'</p><p class="text-muted-foreground leading-relaxed mb-4">').replace(/^(?!<[hlu])/gm,"")}function pUe(){const{slug:e}=WP(),{post:t,isLoading:n}=tUe(e||"");if(n)return s.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:s.jsx(ce,{className:"h-8 w-8 animate-spin text-muted-foreground"})});if(!t)return s.jsxs("div",{className:"min-h-screen bg-background flex flex-col items-center justify-center gap-4",children:[s.jsx("h1",{className:"text-2xl font-bold",children:"Post not found"}),s.jsx(Oe,{to:"/blog",className:"text-primary hover:underline",children:"← Back to blog"})]});const r=!!t.cta_title,a=r;return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(ar,{title:`${t.title} | SociePRO Blog`,description:t.meta_description||t.excerpt||"",canonicalUrl:`${Nr}/blog/${t.slug}`,ogType:"article",ogImage:t.featured_image_url||void 0}),s.jsx("header",{className:"border-b border-border",children:s.jsxs("div",{className:"max-w-3xl mx-auto px-6 py-6 flex items-center justify-between",children:[s.jsxs(Oe,{to:"/",className:"flex items-center gap-2",children:[s.jsx("img",{src:l_,alt:"SociePRO",className:"h-8 w-8 rounded-full object-cover"}),s.jsx("span",{className:"text-xl font-bold text-foreground",children:"SociePRO"})]}),s.jsxs("nav",{className:"flex items-center gap-6 text-sm",children:[s.jsx(Oe,{to:"/blog",className:"text-muted-foreground hover:text-foreground transition-colors",children:"Blog"}),s.jsx(Oe,{to:"/",className:"text-muted-foreground hover:text-foreground transition-colors",children:"Home"})]})]})}),t.featured_image_url&&s.jsx("div",{className:"max-w-4xl mx-auto px-6 pt-8",children:s.jsx("div",{className:"rounded-xl overflow-hidden shadow-lg",children:s.jsx("img",{src:t.featured_image_url,alt:t.image_alt_text||t.excerpt||`Featured image for ${t.title}`,className:"w-full max-h-[420px] object-cover"})})}),s.jsxs("article",{className:"max-w-3xl mx-auto px-6 py-12",children:[s.jsxs(Oe,{to:"/blog",className:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground transition-colors mb-8",children:[s.jsx(Lc,{className:"h-3 w-3"})," All posts"]}),t.published_at&&s.jsx("time",{className:"block text-xs text-muted-foreground uppercase tracking-wider mb-3",children:ge(new Date(t.published_at),"MMMM d, yyyy")}),s.jsx("h1",{className:"text-3xl md:text-4xl font-bold tracking-tight text-foreground leading-tight",children:t.title}),t.excerpt&&s.jsx("p",{className:"mt-4 text-lg text-muted-foreground",children:t.excerpt}),s.jsx("hr",{className:"my-8 border-border"}),s.jsx("div",{className:"prose prose-neutral dark:prose-invert max-w-none [&_p]:text-muted-foreground [&_p]:leading-relaxed [&_p]:mb-4 [&_li]:text-muted-foreground",dangerouslySetInnerHTML:{__html:fUe(t.content)}}),r&&s.jsx(hUe,{postId:t.id,userId:t.user_id||null,ctaTitle:t.cta_title,ctaText:t.cta_text||"",ctaButtonText:t.cta_button_text||"Get in Touch",ctaType:t.cta_type||null,industryModule:t.industry_module||null,leadCaptureEnabled:a})]}),s.jsx("div",{className:"border-t border-border bg-muted/30",children:s.jsxs("div",{className:"max-w-3xl mx-auto px-6 py-10",children:[s.jsx("p",{className:"text-base font-semibold text-foreground mb-1",children:"Stay in the loop"}),s.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:"Get new articles delivered straight to your inbox. No spam."}),s.jsx(uY,{})]})}),s.jsx("footer",{className:"border-t border-border",children:s.jsx("div",{className:"max-w-3xl mx-auto px-6 py-8 text-center",children:s.jsxs("p",{className:"text-sm text-muted-foreground",children:["© ",new Date().getFullYear()," SociePRO LLC. All rights reserved."]})})})]})}function mUe(){return wr({queryKey:["public-reviews"],queryFn:async()=>{const{data:e,error:t}=await W.from("reviews").select("id, reviewer_name, reviewer_role, rating, review_text, created_at").order("created_at",{ascending:!1});if(t)throw t;return e}})}function gUe(){return an({mutationFn:async e=>{const{error:t}=await W.from("reviews").insert({reviewer_name:e.reviewer_name,reviewer_role:e.reviewer_role||null,rating:e.rating,review_text:e.review_text});if(t)throw t}})}function A3({rating:e}){return s.jsx("div",{className:"flex items-center gap-0.5","aria-label":`${e} out of 5 stars`,children:Array.from({length:5}).map((t,n)=>s.jsx(vd,{className:`h-4 w-4 ${n<e?"fill-primary text-primary":"text-muted-foreground
4255/30"}`},n))})}function yUe(){const{data:e,isLoading:t}=mUe(),n=e&&e.length>0?e.reduce((r,a)=>r+a.rating,0)/e.length:null;return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(ar,{title:"Reviews — SociePRO",description:"See what customers say about building their authority positioning and social media presence with SociePRO."}),s.jsx("header",{className:"border-b border-border",children:s.jsxs("div",{className:"max-w-4xl mx-auto px-6 py-6 flex items-center justify-between",children:[s.jsxs(Oe,{to:"/",className:"flex items-center gap-2",children:[s.jsx("img",{src:l_,alt:"SociePRO",className:"h-8 w-8 rounded-full object-cover"}),s.jsx("span",{className:"text-xl font-bold text-foreground",children:"SociePRO"})]}),s.jsxs("nav",{className:"flex items-center gap-6 text-sm",children:[s.jsx(Oe,{to:"/reviews",className:"text-foreground font-medium",children:"Reviews"}),s.jsx(Oe,{to:"/blog",className:"text-muted-foreground hover:text-foreground transition-colors",children:"Blog"}),s.jsx(Oe,{to:"/",className:"text-muted-foreground hover:text-foreground transition-colors",children:"Home"})]})]})}),s.jsxs("section",{className:"max-w-4xl mx-auto px-6 py-16",children:[s.jsx("h1",{className:"text-4xl font-bold tracking-tight text-foreground",children:"Reviews"}),s.jsx("p",{className:"mt-3 text-lg text-muted-foreground max-w-2xl",children:"What customers say after building their positioning and content system with SociePRO."}),s.jsxs("div",{className:"mt-6 flex flex-wrap items-center gap-4",children:[n!==null&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(A3,{rating:Math.round(n)}),s.jsxs("span",{className:"text-sm text-muted-foreground",children:[n.toFixed(1)," average from ",e.length," ",e.length===1?"review":"reviews"]})]}),s.jsx(z,{asChild:!0,size:"sm",children:s.jsx(Oe,{to:"/reviews/new",children:"Leave a review"})})]})]}),s.jsx("section",{className:"max-w-4xl mx-auto px-6 pb-20",children:t?s.jsx("div",{className:"flex justify-center py-20",children:s.jsx(ce,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):e!=null&&e.length?s.jsx("div",{className:"space-y-8",children:e.map(r=>s.jsxs("article",{className:"border-b border-border pb-8 last:border-0",children:[s.jsxs("div",{className:"flex items-start justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold text-foreground",children:r.reviewer_name}),r.reviewer_role&&s.jsx("p",{className:"text-sm text-muted-foreground",children:r.reviewer_role})]}),s.jsx(A3,{rating:r.rating})]}),s.jsx("p",{className:"mt-3 text-foreground leading-relaxed whitespace-pre-wrap",children:r.review_text}),s.jsx("time",{className:"mt-3 block text-xs text-muted-foreground uppercase tracking-wider",children:ge(new Date(r.created_at),"MMMM d, yyyy")})]},r.id))}):s.jsxs("div",{className:"text-center py-20",children:[s.jsx("p",{className:"text-muted-foreground",children:"No reviews yet — be the first to leave one."}),s.jsx(z,{asChild:!0,variant:"outline",className:"mt-4",children:s.jsx(Oe,{to:"/reviews/new",children:"Leave a review"})})]})}),s.jsx("footer",{className:"border-t border-border",children:s.jsx("div",{className:"max-w-4xl mx-auto px-6 py-8 text-center",children:s.jsxs("p",{className:"text-sm text-muted-foreground",children:["© ",new Date().getFullYear()," SociePRO LLC. All rights reserved."]})})})]})}function vUe({value:e,onChange:t}){const[n,r]=g.useState(null),a=n??e;return s.jsx("div",{className:"flex items-center gap-1",role:"radiogroup","aria-label":"Rating",children:Array.from({length:5}).map((i,o)=>{const l=o+1;return s.jsx("button",{type:"button",role:"radio","aria-checked":e===l,"aria-label":`${l} star${l>1?"s":""}`,onClick:()=>t(l),onMouseEnter:()=>r(l),onMouseLeave:()=>r(null),className:"p-0.5",children:s.jsx(vd,{className:`h-7 w-7 transition-colors ${l<=a?"fill-primary text-primary":"text-muted-foreground/30"}`})},l)})})}function bUe(){const{toast:e}=Je(),t=gUe(),[n,r]=g.useState(""),[a,i]=g.useState(""),[o,l]=g.useState(0),[c,u]=g.useState(""),[h,d]=g.useState(!1),f=async p=>{p.preventDefault();const y=n.trim(),m=c.trim();if(!y){e({title:"Your name is required",variant:"destructive"});return}if(o<1||o>5){e({title:"Pick a star rating",description:"Tap a star from 1 to 5.",variant:"destructive"});return}if(m.length<10){e({title:"Tell us a bit more",description:"Your review needs at least 10 characters.",variant:"destructive"});return}try{await t.mutateAsync({reviewer_name:y,reviewer_role:a.trim()||void 0,rating:o,review_text:m}),d(!0)}catch(v){e({title:"Couldn't submit your review",description:v instanceof Error?v.message:"Please try again in a moment.",variant:"destructive"})}};return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(ar,{title:"Leave a review — SociePRO",description:"Share your experience with SociePRO."}),s.jsx("header",{className:"border-b border-border",children:s.jsxs("div",{className:"max-w-3xl mx-auto px-6 py-6 flex items-center justify-between",children:[s.jsxs(Oe,{to:"/",className:"flex items-center gap-2",children:[s.jsx("img",{src:l_,alt:"SociePRO",className:"h-8 w-8 rounded-full object-cover"}),s.jsx("span",{className:"text-xl font-bold text-foreground",children:"SociePRO"})]}),s.jsx(Oe,{to:"/reviews",className:"text-sm text-muted-foreground hover:text-foreground transition-colors",children:"← Back to reviews"})]})}),s.jsx("main",{className:"max-w-3xl mx-auto px-6 py-16",children:h?s.jsx(he,{className:"max-w-md mx-auto",children:s.jsxs(pe,{className:"pt-10 pb-10 text-center",children:[s.jsx(ls,{className:"h-10 w-10 text-primary mx-auto mb-4"}),s.jsx("h1",{className:"text-xl font-semibold text-foreground",children:"Thanks for the review"}),s.jsx("p",{className:"mt-2 text-muted-foreground",children:"It's been submitted and will appear on the reviews page once it's approved."}),s.jsx(z,{asChild:!0,variant:"outline",className:"mt-6",children:s.jsx(Oe,{to:"/reviews",children:"Back to reviews"})})]})}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"text-center mb-10",children:[s.jsx("h1",{className:"text-3xl sm:text-4xl font-bold tracking-tight text-foreground",children:"Leave a review"}),s.jsx("p",{className:"mt-3 text-lg text-muted-foreground max-w-xl mx-auto",children:"Tell other visitors about your experience with SociePRO."})]}),s.jsx(he,{className:"max-w-md mx-auto",children:s.jsx(pe,{className:"pt-6",children:s.jsxs("form",{onSubmit:f,className:"space-y-5",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{htmlFor:"reviewer_name",children:"Your name"}),s.jsx(ze,{id:"reviewer_name",type:"text",placeholder:"e.g. Jane Doe",value:n,onChange:p=>r(p.target.value),maxLength:100,required:!0})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{htmlFor:"reviewer_role",children:"Role or company (optional)"}),s.jsx(ze,{id:"reviewer_role",type:"text",placeholder:"e.g. Realtor, Cascade Realty Group",value:a,onChange:p=>i(p.target.value),maxLength:150})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{children:"Rating"}),s.jsx(vUe,{value:o,onChange:l})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{htmlFor:"review_text",children:"Your review"}),s.jsx(Nt,{id:"review_text",placeholder:"What was your experience like?",value:c,onChange:p=>u(p.target.value),maxLength:4e3,rows:5,required:!0})]}),s.jsx(z,{type:"submit",className:"w-full",disabled:t.isPending,children:t.isPending?s.jsxs(s.Fragment,{children:[s.jsx(ce,{className:"h-4 w-4 mr-2 animate-spin"}),"Submitting..."]}):"Submit review"}),s.jsx("p",{className:"text-xs text-muted-foreground text-center",children:"Reviews are checked before they appear publicly."})]})})})]})})]})}
4255const xUe=["undisputed","absolute certainty","content grind","industry leaders & experts","industry leaders and experts","positioning infrastructure","passionate","premier","unmatched","world-class","i'm honored to","ai-powered","guaranteed results","set it and forget it","industry-leading","best in the industry"];function uv(e){const t=e.toLowerCase();return xUe.filter(n=>t.includes(n))}function wUe(){var ue,re;const e=Gt(),{toast:t}=Je(),{currentVertical:n}=Fa(),r=n&&Zw.includes(n)?n:n||void 0,a=r?id(r):"your vertical",{session:i,answers:o,tiers:l,isLoading:c,saveAnswersForTier:u,saveGeneratedOutput:h}=A2(r||void 0),[d,f]=g.useState("tier"),[p,y]=g.useState(1),[m,v]=g.useState({}),[b,x]=g.useState(""),[w,_]=g.useState(""),[k,j]=g.useState(!1),[S,N]=g.useState(!1);g.useEffect(()=>{i&&(y(Math.min(i.current_tier||1,4)),x(i.positioning_statement||""),_(i.authority_bio||""))},[i]),g.useEffect(()=>{v(q=>({...o,...q}))},[o]),g.useEffect(()=>{!c&&!r&&e("/dashboard")},[c,r,e]);const C=l.find(q=>q.tier===p),M=(C==null?void 0:C.questions)||[],O=M.filter(q=>{var U;return(U=m[q.id])==null?void 0:U.trim()}).length,D=M.filter(q=>q.required).length,R=M.filter(q=>{var U;return q.required&&((U=m[q.id])==null?void 0:U.trim())}).length>=D,I=M.length>0?Math.round(O/M.length*100):0,P=(i==null?void 0:i.aps_score)||0,A=(i==null?void 0:i.max_completed_tier)||0,E=(q,U)=>{v(Q=>({...Q,[q]:U}))},T=async()=>{N(!0),await new Promise(q=>setTimeout(q,0));try{const q={};M.forEach(U=>{m[U.id]&&(q[U.id]=m[U.id])}),await u(p,q),f("tier-complete")}catch(q){t({title:"Save failed",description:q.message,variant:"destructive"})}finally{N(!1)}},L=()=>{y(q=>Math.min(q+1,4)),f("tier")};function B(q){const U=q.category||q.core_identity||q.q1||"[your category or specialty]",Q=q.belief_challenged||q.belief||q.q2||"[a belief you'd challenge]",J=q.who_for||q.target_audience||q.q3||"[who you serve]",Y=q.transformation||q.q4||"[the change you create for them]",oe=q.moat||q.competitive_moat||"[what you do differently]",ve=`I work with ${J} on ${U}. Rather than assume ${Q}, my approach is built on ${oe} — the aim is ${Y}.`,De=`I work in ${U}, focused on ${J}. Where I differ: ${oe}. Rather than ${Q}, I aim for ${Y}.`;return{statement:ve,bio:De}}const H=async()=>{j(!0),await new Promise(q=>setTimeout(q,0));try{let q="",U="",Q=!1;try{const{data:{session:Y}}=await W.auth.getSession();if(Y){const oe=await fetch("https://hgnuynazdzzocuwtwiez.supabase.co/functions/v1/generate-positioning",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${Y.access_token}`,apikey:"sb_publishable__0Zesn96s_l2w2G1z_9fxw_mY_wD58k"},body:JSON.stringify({profile_data:m,module_name:r,tier_level:p,aps_score:P})});if(oe.ok){const ve=await oe.json();ve.positioning_statement&&ve.authority_bio&&(q=ve.positioning_statement,U=ve.authority_bio,Q=!0)}}}catch(Y){console.warn("Edge function offline/unreachable. Using synthesized positioning output.",Y)}if(!Q){const Y=B(m);q=Y.statement,U=Y.bio}const J=[...uv(q),...uv(U)];J.length>0&&t({title:"Generated text needs a rewrite",description:`Contains a banned phrase: "${J[0]}". Edit it below before saving.`,variant:"destructive"}),x(q),_(U),f("review"),J.length===0&&t({title:"Authority Profile Generated!",description:"Review and refine your positioning statement below."})}catch(q){t({title:"Generation failed",description:q.message,variant:"destructive"})}finally{j(!1)}},G=g.useMemo(()=>Array.from(new Set([...uv(b),...uv(w)])),[b,w]),Z=async()=>{if(G.length>0){t({title:"Fix the flagged text first",description:`Contains a banned phrase: "${G[0]}". Edit the statement or bio above before saving.`,variant:"destructive"});return}N(!0);try{await h(b,w),t({title:"Authority profile activated!",description:`APS ${P} — ${KW(P).label}`}),e("/dashboard")}catch(q){t({title:"Save failed",description:q.message,variant:"destructive"})}finally{N(!1)}};if(c)return s.jsx(hr,{title:"PositioningEnginePRO",description:"Building your authority profile",children:s.jsx("div",{className:"flex items-center justify-center py-20",children:s.jsx(ce,{className:"h-8 w-8 animate-spin text-primary"})})});const le=q=>{const U=m[q.id]||"";return q.type==="select"&&q.options?s.jsxs("div",{className:"space-y-2",children:[s.jsxs(X,{className:"flex items-center gap-1",children:[q.label,q.required&&s.jsx("span",{className:"text-destructive",children:"*"})]}),s.jsxs(jt,{value:U,onValueChange:Q=>E(q.id,Q),children:[s.jsx(mt,{children:s.jsx(Ct,{placeholder:"Select..."})}),s.jsx(gt,{children:q.options.map(Q=>s.jsx(Ee,{value:Q,children:Q},Q))})]})]},q.id):q.type==="textarea"?s.jsxs("div",{className:"space-y-2",children:[s.jsxs(X,{className:"flex items-center gap-1",children:[q.label,q.required&&s.jsx("span",{className:"text-destructive",children:"*"})]}),s.jsx(Nt,{value:U,onChange:Q=>E(q.id,Q.target.value),placeholder:q.placeholder,rows:3})]},q.id):s.jsxs("div",{className:"space-y-2",children:[s.jsxs(X,{className:"flex items-center gap-1",children:[q.label,q.required&&s.jsx("span",{className:"text-destructive",children:"*"})]}),s.jsx(ze,{value:U,onChange:Q=>E(q.id,Q.target.value),placeholder:q.placeholder})]},q.id)};return s.jsx(hr,{title:"PositioningEnginePRO",description:`Define your ${a} authority profile`,children:s.jsxs("div",{className:"mx-auto max-w-2xl space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(kS,{score:P}),s.jsxs("span",{className:"text-sm text-muted-foreground",children:["Tier ",p," of 4"]})]}),s.jsxs("div",{className:"text-right text-xs text-muted-foreground",children:["Version ",(i==null?void 0:i.profile_version)||1]})]}),s.jsx("div",{className:"grid grid-cols-2 gap-2 sm:flex",children:k1.map(q=>{const U=A>=q.tier,Q=p===q.tier,J=q.tier>A+1;return s.jsxs("button",{disabled:J,onClick:()=>{J||(y(q.tier),f("tier"))},className:`flex-1 rounded-lg border p-3 text-left transition-all ${Q?"border-primary bg-primary/10":U?"border-[hsl(106_54%_60%/0.3)] bg-[hsl(106_54%_60%/0.05)]":J?"border-border bg-muted/30 opacity-50 cursor-not-allowed":"border-border hover:border-primary/30"}`,children:[s.jsxs("div",{className:"flex items-center gap-2",children:[U?s.jsx($t,{className:"h-4 w-4 text-[hsl(106_54%_60%)]"}):s.jsx("span",{className:`text-sm font-bold ${Q?"text-primary":"text-muted-foreground"}`,children:q.tier}),s.jsx("span",{className:"text-xs font-medium truncate",children:q.name})]}),s.jsxs("div",{className:"mt-1 text-[10px] text-muted-foreground",children:["AP
4255S ",q.baseAPS]})]},q.tier)})}),s.jsxs(Wr,{mode:"wait",children:[d==="tier"&&C&&s.jsx(fe.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},children:s.jsxs(he,{children:[s.jsxs(Ce,{children:[s.jsxs(Pe,{className:"flex items-center gap-2 text-lg",children:[s.jsx(Se,{className:"h-5 w-5 text-primary"}),"Tier ",p,": ",C.name]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:C.subtitle})]}),s.jsxs(pe,{className:"space-y-5",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx(vm,{value:I,className:"h-2"}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:[O,"/",M.length," answered"]})]}),M.map(le),s.jsxs("div",{className:"flex flex-wrap justify-between gap-3 pt-4",children:[p>1&&s.jsxs(z,{variant:"outline",onClick:()=>{y(q=>q-1)},children:[s.jsx(Kc,{className:"mr-2 h-4 w-4"}),"Previous Tier"]}),s.jsxs("div",{className:"ml-auto flex flex-wrap justify-end gap-3",children:[A>=1&&s.jsxs(z,{variant:"outline",onClick:H,disabled:k,children:[s.jsx(Tn,{className:"mr-2 h-4 w-4"}),"Generate Now"]}),s.jsxs(z,{onClick:T,disabled:!R||S,children:[S?s.jsx(ce,{className:"mr-2 h-4 w-4 animate-spin"}):s.jsx(Ma,{className:"mr-2 h-4 w-4"}),"Complete Tier ",p]})]})]})]})]})},`tier-${p}`),d==="tier-complete"&&s.jsx(fe.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},children:s.jsx(he,{className:"border-primary/30 bg-gradient-to-br from-primary/5 to-transparent",children:s.jsxs(pe,{className:"pt-8 pb-8 text-center space-y-6",children:[s.jsx("div",{className:"mx-auto flex h-16 w-16 items-center justify-center rounded-full bg-primary/10",children:s.jsx(Ea,{className:"h-8 w-8 text-primary"})}),s.jsxs("div",{children:[s.jsxs("h2",{className:"text-xl font-bold",children:["Tier ",p," Complete!"]}),s.jsxs("p",{className:"mt-2 text-muted-foreground",children:["Your Authority Precision Score is now"," ",s.jsx("strong",{className:"text-foreground",children:P})]}),s.jsx(kS,{score:P})]}),p<4&&s.jsxs("div",{className:"rounded-lg border border-accent/20 bg-accent/5 p-4 text-sm",children:[s.jsx("p",{className:"font-medium text-accent",children:"🎯 Upgrade your authority precision?"}),s.jsxs("p",{className:"mt-1 text-muted-foreground",children:["Tier ",p+1,": ",(ue=k1[p])==null?void 0:ue.name," — Reach APS"," ",(re=k1[p])==null?void 0:re.baseAPS]})]}),s.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:justify-center",children:[p<4&&s.jsxs(z,{onClick:L,className:"gap-2",children:[s.jsx(Sr,{className:"h-4 w-4"}),"Continue Refinement"]}),s.jsxs(z,{variant:p<4?"outline":"default",onClick:H,disabled:k,className:"gap-2",children:[k?s.jsx(ce,{className:"h-4 w-4 animate-spin"}):s.jsx(Se,{className:"h-4 w-4"}),"Generate Authority Content"]})]})]})})},"tier-complete"),d==="review"&&s.jsxs(fe.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"space-y-6",children:[G.length>0&&s.jsxs("div",{className:"flex items-start gap-2 rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:[s.jsx(Bs,{className:"mt-0.5 h-4 w-4 shrink-0"}),s.jsxs("span",{children:["Contains a banned phrase: ",G.map(q=>`"${q}"`).join(", "),". Edit the statement or bio below to remove it before saving."]})]}),s.jsxs(he,{children:[s.jsx(Ce,{children:s.jsxs(Pe,{className:"flex items-center gap-2 text-lg",children:[s.jsx(fg,{className:"h-5 w-5 text-primary"}),"Your Positioning Statement"]})}),s.jsxs(pe,{className:"space-y-4",children:[s.jsx(Nt,{value:b,onChange:q=>x(q.target.value),rows:4,className:"text-base",placeholder:"Your positioning statement..."}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Edit to make it uniquely yours. This powers all generated content."})]})]}),s.jsxs(he,{children:[s.jsx(Ce,{children:s.jsx(Pe,{className:"text-lg",children:"Extended Authority Bio"})}),s.jsx(pe,{children:s.jsx(Nt,{value:w,onChange:q=>_(q.target.value),rows:6,placeholder:"Your authority bio..."})})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsxs(z,{variant:"outline",onClick:()=>f("tier"),children:[s.jsx(Kc,{className:"mr-2 h-4 w-4"}),"Back to Questions"]}),s.jsxs(z,{onClick:Z,disabled:S||G.length>0,children:[S?s.jsx(ce,{className:"mr-2 h-4 w-4 animate-spin"}):s.jsx($t,{className:"mr-2 h-4 w-4"}),"Save & Activate"]})]})]},"review")]})]})})}const _Ue=(e,t,n=!1)=>{const r=n?"Module	Position	Title	Content":"Position	Title	Content",a=e.map(i=>{var u;const o=i.content.replace(/[\n\r]+/g," ").replace(/\t/g," "),l=(i.title??"").replace(/[\n\r]+/g," ").replace(/\t/g," "),c=`${i.position}	${l}	${o}`;return n?`${((u=t.find(d=>d.slug===i.module))==null?void 0:u.name)??i.module}	${c}`:c});return[r,...a].join(`
4256`)},kUe=()=>{const e=Gt(),{isAdmin:t,isLoading:n}=Sg(),[r,a]=g.useState([]),[i,o]=g.useState([]),[l,c]=g.useState(!0),[u,h]=g.useState(null);g.useEffect(()=>{!n&&!t&&e("/dashboard")},[n,t,e]),g.useEffect(()=>{if(n||!t)return;(async()=>{const{data:m}=await W.from("industry_modules").select("slug, name").eq("is_active",!0).order("name"),v=(m??[]).map(_=>
4256({slug:_.slug,name:_.name}));o(v);const b=v.map(_=>_.slug);if(b.length===0){c(!1);return}const{data:x,error:w}=await W.from("library_posts").select("position, title, content, module").in("module",b).order("module").order("position",{ascending:!0});w?ij({title:"Error loading prompts",description:w.message,variant:"destructive"}):a(x??[]),c(!1)})()},[n,t]);const d=async(y,m)=>{const v=y==="all"?r:r.filter(x=>x.module===y),b=_Ue(v,i,y==="all");await navigator.clipboard.writeText(b),h(y),ij({title:`${m} copied!`,description:`${v.length} prompts copied as TSV — paste into Google Sheets.`}),setTimeout(()=>h(null),2e3)},f=i.reduce((y,m)=>(y[m.slug]=r.filter(v=>v.module===m.slug),y),{}),p=i.filter(y=>{var m;return(((m=f[y.slug])==null?void 0:m.length)??0)>0});return n?s.jsx(hr,{title:"Prompt Library",description:"",children:s.jsx("div",{className:"flex items-center justify-center py-20",children:s.jsx(ce,{className:"h-8 w-8 animate-spin text-primary"})})}):t?s.jsx(hr,{title:"Prompt Library Export",description:"Admin-only — copy prompts for Google Sheets, one click per module.",children:l?s.jsx("div",{className:"flex items-center justify-center py-20",children:s.jsx(ce,{className:"h-8 w-8 animate-spin text-primary"})}):s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("p",{className:"text-sm text-muted-foreground",children:[r.length," total prompts across ",p.length," modules"]}),s.jsxs(z,{variant:"outline",onClick:()=>d("all","All Modules"),className:"gap-2",children:[u==="all"?s.jsx(VE,{className:"h-4 w-4"}):s.jsx(Rl,{className:"h-4 w-4"}),"Copy All Modules"]})]}),p.length>0?s.jsxs(Ii,{defaultValue:p[0].slug,children:[s.jsx(Hs,{className:"flex-wrap h-auto gap-1",children:p.map(y=>{var m;return s.jsxs(ht,{value:y.slug,children:[y.name," (",((m=f[y.slug])==null?void 0:m.length)??0,")"]},y.slug)})}),p.map(y=>s.jsxs(ft,{value:y.slug,className:"space-y-4",children:[s.jsx("div",{className:"flex justify-end",children:s.jsxs(z,{variant:"outline",size:"sm",onClick:()=>d(y.slug,y.name),className:"gap-2",children:[u===y.slug?s.jsx(VE,{className:"h-4 w-4"}):s.jsx(Rl,{className:"h-4 w-4"}),"Copy ",y.name]})}),s.jsx("div",{className:"rounded-md border",children:s.jsxs(so,{children:[s.jsx(io,{children:s.jsxs(Bn,{children:[s.jsx(tt,{className:"w-16",children:"#"}),s.jsx(tt,{className:"w-48",children:"Title"}),s.jsx(tt,{children:"Content"})]})}),s.jsx(oo,{children:(f[y.slug]??[]).map((m,v)=>s.jsxs(Bn,{children:[s.jsx(Qe,{className:"font-medium",children:m.position}),s.jsx(Qe,{className:"font-medium",children:m.title??"—"}),s.jsx(Qe,{className:"max-w-xl truncate text-muted-foreground",children:m.content.length>120?m.content.slice(0,120)+"…":m.content})]},v))})]})})]},y.slug))]}):s.jsx("p",{className:"text-muted-foreground py-10 text-center",children:"No prompts found in any active module."})]})}):null};function E3(){const[e,t]=g.useState("processing"),[n,r]=g.useState(null),a=g.useRef(!1),[i]=Ul(),o=Gt(),{toast:l}=Je();return g.useEffect(()=>{if(a.current)return;a.current=!0;const c=async d=>{const{data:f}=await W.auth.getSession();if(f!=null&&f.session)return f.session;if(d)try{const{data:p,error:y}=await W.auth.exchangeCodeForSession(d);if(!y&&(p!=null&&p.session))return p.session}catch(p){console.warn("PKCE code exchange note:",p)}for(let p=0;p<6;p++){await new Promise(m=>setTimeout(m,300));const{data:y}=await W.auth.getSession();if(y!=null&&y.session)return y.session}return null},u=async d=>{Ds()&&localStorage.removeItem("sociepro_pending_checkout");const f=localStorage.getItem("sociepro_pending_checkout");if(f)try{const p=JSON.parse(f);localStorage.removeItem("sociepro_pending_checkout");const{moduleSlug:y,selectedTier:m="pro",billingCycle:v="monthly"}=p;t("checkout_redirect");const b=`${window.location.origin}/dashboard?activated=true&tier=${m}&module=${y}`,x=`${window.location.origin}/?cancelled=true`,{data:w,error:_}=await W.functions.invoke("create-stripe-checkout",{headers:{Authorization:`Bearer ${d.access_token}`},body:{tier:m,billingCycle:v,moduleSlug:y,successUrl:b,cancelUrl:x}});if(_)throw _;if(w!=null&&w.url){l({title:"Authentication Verified! 🚀",description:"Launching your secure checkout session..."}),window.location.href=w.url;return}}catch(p){console.error("Post-auth checkout invocation error:",p),l({title:"Checkout Note",description:"Account created, but failed to launch checkout directly. Redirecting to dashboard..."})}t("dashboard_redirect"),l({title:"Signed In Successfully",description:"Welcome to SociePRO!"}),setTimeout(()=>
4256o("/dashboard",{replace:!0}),1e3)};(async()=>{try{const d=i.get("code"),f=i.get("error"),p=i.get("error_description");if(f){t("error"),r(p||f||"Authentication error returned from provider.");return}const y=await c(d);if(!y){const{data:m}=W.auth.onAuthStateChange(async(v,b)=>{b&&(m.subscription.unsubscribe(),await u(b))});setTimeout(()=>{m.subscription.unsubscribe(),t("error"),r("Unable to verify authentication session. Please try logging in again.")},4e3);return}await u(y)}catch(d){console.error("Auth callback error:",d),t("error"),r(d.message||"An unexpected error occurred during authentication.")}})()},[i,o,l]),s.jsx("div",{className:"flex min-h-screen items-center justify-center bg-[hsl(0_0%_6%)] p-6 text-white",children:s.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-white/10 bg-white/5 p-8 text-center shadow-2xl backdrop-blur-md",children:[e==="processing"&&s.jsxs("div",{className:"space-y-4 py-4",children:[s.jsx(ce,{className:"h-12 w-12 animate-spin mx-auto text-[hsl(106_54%_87%)]"}),s.jsx("h3",{className:"font-display text-xl font-bold text-white",children:"Verifying Authentication..."}),s.jsx("p",{className:"text-sm text-white/60",children:"Securing your session and linking your credentials."})]}),e==="checkout_redirect"&&s.jsxs("div",{className:"space-y-4 py-4",children:[s.jsx(Se,{className:"h-12 w-12 mx-auto text-[hsl(106_54%_87%)] animate-bounce"}),s.jsx("h3",{className:"font-display text-xl font-bold text-white",children:"Account Linked & Verified!"}),s.jsx("p",{className:"text-sm text-white/60",children:"Launching secure payment gateway..."}),s.jsx("div",{className:"flex justify-center pt-2",children:s.jsx(ce,{className:"h-5 w-5 animate-spin text-[hsl(106_54%_87%)]"})})]}),e==="dashboard_redirect"&&s.jsxs("div",{className:"space-y-4 py-4",children:[s.jsx(ls,{className:"h-12 w-12 mx-auto text-emerald-400"}),s.jsx("h3",{className:"font-display text-xl font-bold text-white",children:"Welcome to SociePRO!"}),s.jsx("p",{className:"text-sm text-white/60",children:"Redirecting to your dashboard..."})]}),e==="error"&&s.jsxs("div",{className:"space-y-5 py-2",children:[s.jsx(Ai,{className:"h-12 w-12 mx-auto text-rose-500"}),s.jsx("h3",{className:"font-display text-xl font-bold text-white",children:"Authentication Failed"}),s.jsx("p",{className:"text-sm text-rose-300 bg-rose-950/40 p-3 rounded-lg border border-rose-900/50",children:n}),s.jsxs("div",{className:"pt-2 flex flex-col gap-2",children:[s.jsx(z,{onClick:()=>o("/auth"),className:"w-full bg-[hsl(106_54%_87%)] text-black hover:bg-[hsl(106_54%_80%)] font-bold",children:"Try Logging In Again"}),s.jsx(z,{variant:"ghost",onClick:()=>o("/"),className:"w-full text-white/60 hover:text-white",children:"Return to Landing Page"})]})]})]})})}const O3=["pro","dominance","team","enterprise"],dY=()=>{const[e,t]=g.useState([]),[n,r]=g.useState([]),[a,i]=g.useState(null),[o,l]=g.useState(null),[c,u]=g.useState(!0),{toast:h}=Je(),d=g.useCallback(async()=>{try{u(!0);const{data:{user:x}}=await W.auth.getUser(),{data:w,error:_}=await W.from("courses").select("id, slug, module_slug, vertical_name, title, subtitle, description, price_cents, status, is_active").eq("is_active",!0).order("vertical_name");if(_)throw _;if(t(w||[]),!x){r([]),i(null),l(null);return}const[k,j,S]=await Promise.all([W.from("user_course_entitlements").select("id, course_id, source, enabled_at").eq("user_id",x.id).eq("is_enabled",!0),W.from("user_subscriptions").select("tier, status, active_module_slug").eq("user_id",x.id).maybeSingle(),W.rpc("fn_get_my_team_seat_module")]);if(k.error)throw k.error;r(k.data||[]);const N=j.data,C=N&&(N.status==="active"||N.status==="trialing");i(C?{tier:N.tier,activeModuleSlug:N.active_module_slug??null}:null),S.error?(console.error("Error fetching team seat module:",S.error),l(null)):l(S.data??null)}catch(x){console.error("Error fetching courses:",x)}finally{u(!1)}},[]);g.useEffect(()=>{d()},[d]);const f=g.useCallback(x=>n.some(w=>w.course_id===x),[n]),p=g.useCallback(x=>!!a&&O3.includes(a.tier)&&x.status==="live"&&!!x.module_slug&&x.module_slug===a.activeModuleSlug,[a]),y=g.useCallback(x=>
4256!!o&&x.status==="live"&&!!x.module_slug&&x.module_slug===o,[o]),m=g.useCallback(x=>p(x)||y(x)||f(x.id),[p,y,f]),v=!!a&&O3.includes(a.tier);return{courses:e,entitlements:n,isLoading:c,isOwned:m,isPurchased:f,isFreeViaPlan:p,isFreeViaTeamSeat:y,hasGiftEligiblePlan:v,purchaseCourse:async x=>{try{const{data:{session:w}}=await W.auth.getSession();if(!w){h({title:"Please sign in",description:"Sign in to purchase a course.",variant:"destructive"});return}const _=e.find(S=>S.id===x);if(_&&(p(_)||y(_))){h({title:"Already included in your plan",description:"Your subscription already includes this course."});return}if(Ds()){h({title:"Not available in the app",description:M8});return}const{data:k,error:j}=await W.functions.invoke("create-course-checkout",{body:{courseId:x}});if(j)throw j;if((k==null?void 0:k.error)==="already_owned"){h({title:"You already own this course"}),await d();return}if((k==null?void 0:k.error)==="already_free"){h({title:"Already included in your plan",description:"Your subscription already includes this course."}),await d();return}k!=null&&k.url&&(window.location.href=k.url)}catch(w){h({title:"Checkout failed",description:w.message||"Couldn't start checkout.",variant:"destructive"})}},refetch:d}},jUe=`# Authority Positioning 101: The Intro
4257
4258### A free preview of the Authority Positioning system SociePRO builds for 14 different industries
4259
4260> *You don't have a talent problem. You have a visibility problem. This is lesson zero of fixing that.*
4261
4262---
4263
4264## What This Is
4265
4266This is a 20-minute version of a framework that normally takes 8 weeks to fully implement. By the end, you'll have written one real, usable post using the exact structure that goes into every Authority Positioning course — no matter what industry it's built for.
4267
4268It won't turn you into an authority by itself. Nothing that takes 20 minutes will. But it'll show you exactly what's broken about how you currently show up online, and give you the first real tool to fix it.
4269
4270---
4271
4272## The Problem: Why Good Professionals Stay Invisible
4273
4274Here's a pattern that shows up in almost every industry: the most competent person in the room is often the least visible one online.
4275
4276Not because they lack anything to say. Because nobody ever taught them that being good at the work and being *known* for being good at the work are two completely different skills — and only one of them gets taught in school, on the job, or anywhere else.
4277
4278So the same thing happens over and over. A genuinely skilled professional posts occasionally, inconsistently, without a system — a client win here, a random tip there — and gets nothing back. Meanwhile someone with a fraction of their actual expertise is perceived to be the authority. It's not fair, and it's not about talent. It's about positioning.
4279
4280Here's the part that makes this worth fixing: it compounds. A single post rarely changes anything. A hundred posts with no throughline don't add up to much either — they're a hundred unrelated impressions instead of one growing one. But a hundred posts that all reinforce the same positioning, the same expertise, the same person? That's how someone becomes "the one everyone recommends" in their field. It's not one viral moment. It's the same clear signal repeated until it's impossible to miss.
4281
4282---
4283
4284## The Authority Equation
4285
4286Everything in this course — and the full version behind it — comes back to one formula:
4287
4288**Authority = Expertise × Visibility × Consistency**
4289
4290Notice it's multiplication, not addition. That matters: a zero anywhere collapses the whole equation to zero.
4291
4292- **Expertise** is what you actually know and how well you deliver for people. Most professionals reading this already have it — you didn't get this far without it.
4293- **Visibility** is how many of the right people actually see you. Not everyone — the *right* people, the ones who'd hire you.
4294- **Consistency** is whether you show up reliably enough for that visibility to compound into trust, instead of resetting to zero every time you go quiet for a month.
4295
4296If any one of these is at zero, the other two don't matter. Deep expertise nobody sees is invisible. Constant visibility with nothing useful to say is noise. And even great, visible content that vanishes for six weeks at a time never builds real authority — it just makes people forget you existed.
4297
4298Most professionals have real expertise, weak visibility, and almost no consistency. That's the gap this framework closes.
4299
4300### Score Yourself
4301
4302Before you go further, rate each variable honestly, 1 to 5:
4303
4304- [ ] **Expertise:** Do you actually have real results and knowledge in what you'd be posting about? (Be honest — most people score high here.)
4305- [ ] **Visibility:** Are the right people — not everyone, the ones who'd actually hire you — regularly seeing what you post?
4306- [ ] **Consistency:** Have you posted something real in the last two weeks? The last month?
4307
4308Whichever score is lowest is where the rest of this course focuses your effort. If you scored high on Expertise and low on the other two — which is the most common pattern by far — the problem was never your ability. It was never having a system.
4309
4310---
4311
4312## Find Your One-Sentence Positioning
4313
4314Before you write a single post, you need one sentence that tells people exactly who you help and how. Without it, every post you write is a shot in the dark — you're speaking to everyone, which means you're actually speaking to no one.
4315
4316Answer these four questions:
4317
43181. **Who do you serve best?** Not "everyone in my market" — the specific type of client you do your best work for.
43192. **What problem do you solve better than most people in your field?** Your actual edge, not a generic credential.
43203. **What results can you point to?** Even a handful of real outcomes is proof — you don't need hundreds.
43214. **What do you actually enjoy talking about?** If it's not something you'd want to keep discu
4321ssing a year from now, the positioning won't hold up.
4322
4323Your positioning lives where all four answers overlap. Fill in the blanks:
4324
4325> "I help **[specific audience]** achieve **[specific outcome]** through **[your approach]**."
4326
4327### Three Ways This Goes Wrong
4328
4329Before you write yours, watch for these — they're the most common reasons a positioning statement fails to do anything:
4330
4331- **Too broad.** "I help people with their finances" describes ten thousand people. "I help small business owners get their books audit-ready without a full-time hire" describes a person your ideal client immediately recognizes as talking to them, specifically.
4332- **All credentials, no outcome.** Listing years of experience and certifications answers "why should I trust you," but skips the actual question every prospect is asking, which is "what happens for me?"
4333- **Borrowed instead of true.** Copying a positioning statement that worked for someone else in your field, without it reflecting what you actually do differently, reads as hollow the moment someone asks a follow-up question.
4334
4335A few examples of what a working statement looks like across different fields:
4336
4337- *"I help first-time homebuyers navigate a stressful process with zero surprises."*
4338- *"I help small business owners get their books audit-ready without a full-time hire."*
4339- *"I help busy parents get strong in under three hours a week, no gym anxiety required."*
4340
4341Notice none of these mention years of experience, credentials, or a sales pitch. They just say, plainly, who it's for and what changes for them. That's the whole job of a positioning statement.
4342
4343### Then Build Trust On Top Of It
4344
4345A positioning statement tells people what you claim. Trust signals prove it. The professionals who build real authority consistently do a handful of things that most people in their field only do occasionally, if ever:
4346
4347- They share specifics, not generalities — real numbers, real situations, real outcomes, not "I've helped many clients over the years."
4348- They show the process, not just the result — what actually happens behind the scenes, not just the highlight reel.
4349- They answer the exact questions their audience is already typing into Google, instead of guessing what might be interesting.
4350- They talk about the wins *and* the hard parts — a track record that only ever looks perfect reads as unreal.
4351
4352None of this requires a personality transplant. It requires deciding, in advance, what you're going to consistently show people — instead of posting whatever crosses your mind whenever you remember to.
4353
4354---
4355
4356## The One Framework Every Authority Post Needs: H.E.L.P.
4357
4358Once you know who you're talking to, you need a repeatable structure for what to actually say. This is the exact framework used across every version of this course, regardless of industry — because good content structure doesn't change by profession, only the examples do.
4359
4360**H — Hook.** Your first line has one job: stop the scroll. A bold claim, a surprising number, or a real question works better than a polite introduction.
4361
4362**E — Experience.** One line establishing why anyone should listen to you on this. A quick credibility marker — not a resume dump, just enough to earn the next sentence.
4363
4364**L — Lesson.** The actual value. This is the part people came for — a genuine insight, a specific tip, a real perspective they didn't already have. If this part is generic, the rest doesn't matter.
4365
4366**P — Prompt.** Close with something that invites a response — a question, an invitation to share their own experience, a specific next step. Content that ends flat gets scrolled past without a trace.
4367
4368Here's what it looks like assembled, using a placeholder example any professional could adapt:
4369
4370> **H:** "The #1 mistake I see people make in this field? They ask for help too late."
4371>
4372> **E:** "After years of watching this play out with client after client..."
4373>
4374> **L:** "Here's what to do instead: [the actual, specific advice — three concrete steps, not vague encouragement]"
4375>
4376> **P:** "Which of these have you run into? I'd genuinely like to know."
4377
4378A second version, to show the same structure works for a completely different kind of post — this time built around a client story instead of a general tip:
4379
4380> **H:** "A client told me last month she almost gave up before working with me. Here's what changed."
4381>
4382> **E:** "I've sat with a lot of people at that exact breaking point..."
4383>
4384> **L:** "[What actually shifted — the specific decision, insight, or action that turned things around]"
4385>
4386> **P:** "If that sounds familiar, what's the one thing holding you back right now?"
4387
4388Same four beats, completely different post. That's the point — H.E.L.P. isn't a template you fill in once. It's a shape you can pour almost any real thing you know into.
4389
4390### One Platform Beats Five Half-Efforts
4391
4392You don't need to post everywhere. You need to be genuinely good on one platform before you spread yourself across three or four. Pick the single platform where the people you defined in your positioning statement actually spend their time, and put most of your effort there first. Everywhere else can wait.
4393
4394### Your turn
4395
4396Write one H.E.L.P. post right now, using your own positioning statement from the section above as the throughline. Don't overthink the hook — a real, specific claim beats a clever one every time.
4397
4398- [ ] **H:**
4399- [ ] **E:**
4400- [ ] **L:**
4401- [ ] **P:**
4402
4403That's a real post. Not a placeholder, not an exercise you'll never look at again — something you could publish today.
4404
4405---
4406
4407## The Five-Minute Authority Audit
4408
4409Before you go, do this quick check. It takes less time to do than to read about:
4410
44111. **Google yourself** — your name plus your profession plus your city. Is anything current there? Anything that actually shows what you do, or is it outdated, thin, or nonexistent?
44122. **Look at your own bio** on whichever platform you use most. Would a total stranger know exactly who you help within five seconds of reading it?
44133. **Check your last 30 days.** Have you posted anything that reflects your actual expertise — not just an occasional listing, update, or life photo?
44144. **Find three people in your field who are visibly doing this well.** What's their angle? What do they post about repeatedly? What are they clearly *not* covering — and is that gap something you could own instead?
4415
4416That fourth question matters more than it looks. The gap between what everyone else in your field already covers and what your specific audie
4416nce actually needs is usually sitting right there, unclaimed, because nobody bothered to look for it.
4417
4418If most of your answers to 1-3 were "not really," that's not a verdict on your ability. It's just the gap between Expertise and the other two variables in the equation above — and now you know exactly which one to close first.
4419
4420---
4421
4422## Why Most People Quit Before This Compounds
4423
4424Here's the honest failure point: almost everyone who tries to build authority online quits during the stretch where it looks like nothing is working. Not because the framework fails — because consistency is the hardest variable in the equation to sustain without a system, and most people are relying on willpower instead of a routine.
4425
4426The fix isn't posting more. It's posting on a fixed, low-effort cadence you can actually keep up when you're busy, tired, or don't feel like it — because those days will outnumber the days you feel inspired, by a lot.
4427
4428A simple starting cadence that works for almost any field: two H.E.L.P. posts a week, same days, sitting down once to write both instead of trying to come up with something new every morning. That's it. Not five days a week, not a perfect content calendar — just two, consistently, for long enough that it stops feeling optional and starts feeling automatic. Everything else in this framework is worth nothing if it doesn't survive contact with an actual busy week.
4429
4430---
4431
4432## What's Next
4433
4434Everything above is real — the Authority Equation, the positioning statement, the H.E.L.P. framework, the trust signals. You can use all of it starting today, for free, forever.
4435
4436But it's also genuinely the first hour of something much bigger. What you just went through is a compressed taste of Module 1 out of five. The full, profession-specific version of this course — built separately for each of 14 different industries, from real estate to financial advising to personal training — takes this 
4436same foundation and builds it out into a complete 8-week system:
4437
4438- **Module 1: Authority Foundations** — the full audit, niche selection, and trust-signal framework, tailored to exactly what builds trust in your specific field.
4439- **Module 2: Content Creation Engine** — your full set of content pillars, a repeatable weekly batching system, and a voice checklist so it never reads like generic AI output.
4440- **Module 3: Social Proof & Credibility** — a structured framework for turning real client wins into content that builds trust instead of sounding like a testimonial page.
4441- **Module 4: Engagement & Referral Engine** — how consistent posting turns into inbound conversations and referrals, not just likes.
4442- **Module 5: Scale & Sustain** — how to keep the system running once the initial motivation fades, which is where most people's efforts quietly die.
4443
4444That version lives inside [SociePRO](https://sociepro.ai), built specifically for your industry rather than generically reworded with your job title swapped in — alongside the tools that generate and schedule the content for you once you know what to say. If the audit above told you something you didn't want to hear, that's where the rest of the fix is.
4445`,R3=Object.assign({"../content/courses/authority-positioning-101-intro.md":jUe}),hY={};for(const e in R3){const t=e.match(/([^/]+)\.md$/);t&&(hY[t[1]]=R3[e])}function SUe(e){return hY[e]??null}async function NUe(e){const{data:t,error:n}=await W.rpc("fn_get_course_content",{p_course_id:e});return n?(console.error("Error fetching course content:",n),null):t??null}function CUe(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Ks(e){let t=e;return t=t.replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="$2" target="_blank" rel="noopener noreferrer" class="text-primary underline">$1</a>'),t=t.replace(/\*\*([^*]+)\*\*/g,"<strong>$1</strong>"),t=t.replace(/(^|[^*])\*([^*\n]+)\*(?!\*)/g,"$1<em>$2</em>"),t=t.replace(/`([^`]+)`/g,'<code class="rounded bg-muted px-1 py-0.5 text-sm">$1</code>'),t}function fY(e){const n=CUe(e).split(`
4446`),r=[];let a=null,i=!1,o=[],l=!1;const c=[],u=()=>{a&&(r.push(a==="ul"?"</ul>":"</ol>"),a=null)},h=()=>{if(!i||o.length===0)return;const[d,,...f]=o;r.push('<div class="overflow-x-auto my-4"><table class="w-full border-collapse text-sm">'),r.push("<thead><tr>"),d.forEach(p=>r.push(`<th class="border border-border px-3 py-2 text-left font-semibold bg-muted">${Ks(p.trim())}</th>`)),r.push("</tr></thead><tbody>"),f.forEach(p=>{r.push("<tr>"),p.forEach(y=>r.push(`<td class="border border-border px-3 py-2">${Ks(y.trim())}</td>`)),r.push("</tr>")}),r.push("</tbody></table></div>"),o=[],i=!1};for(const d of n){const f=d;if(f.trim().startsWith("```")){l?(r.push(`<pre class="rounded-lg bg-muted p-4 overflow-x-auto text-sm my-4"><code>${c.join(`
4447`)}</code></pre>`),c.length=0,l=!1):(u(),h(),l=!0);continue}if(l){c.push(f);continue}if(/^\s*\|.*\|\s*$/.test(f)){const k=f.trim().slice(1,-1).split("|");i=!0,o.push(k);continue}else i&&h();const p=f.trim();if(p===""){u();continue}if(p==="---"){u(),r.push('<hr class="my-6 border-border" />');continue}const y=p.match(/^# (.+)$/),m=p.match(/^## (.+)$/),v=p.match(/^### (.+)$/);if(y){u(),r.push(`<h1 class="text-3xl font-bold mt-8 mb-4">${Ks(y[1])}</h1>`);continue}if(m){u(),r.push(`<h2 class="text-2xl font-bold mt-8 mb-3">${Ks(m[1])}</h2>`);continue}if(v){u(),r.push(`<h3 class="text-xl font-semibold mt-6 mb-2">${Ks(v[1])}</h3>`);continue}const b=p.match(/^&gt;\s?(.*)$/);if(b){u(),r.push(`<blockquote class="border-l-4 border-primary/40 pl-4 italic text-muted-foreground my-3">${Ks(b[1])}</blockquote>`);continue}const x=p.match(/^-\s\[( |x)\]\s(.+)$/i);if(x){a!=="ul"&&(u(),r.push('<ul class="list-none space-y-1 my-3">'),a="ul");const k=x[1].toLowerCase()==="x";r.push(`<li class="flex items-start gap-2"><input type="checkbox" ${k?"checked":""} disabled class="mt-1" /><span>${Ks(x[2])}</span></li>`);continue}const w=p.match(/^[-*]\s(.+)$/);if(w){a!=="ul"&&(u(),r.push('<ul class="list-disc pl-6 space-y-1 my-3">'),a="ul"),r.push(`<li>${Ks(w[1])}</li>`);continue}const _=p.match(/^\d+\.\s(.+)$/);if(_){a!=="ol"&&(u(),r.push('<ol class="list-decimal pl-6 space-y-1 my-3">'),a="ol"),r.push(`<li>${Ks(_[1])}</li>`);continue}u(),r.push(`<p class="my-3 leading-relaxed">${Ks(p)}</p>`)}return u(),h(),l&&c.length&&r.push(`<pre class="rounded-lg bg-muted p-4 overflow-x-auto text-sm my-4"><code>${c.join(`
4448`)}</code></pre>`),r.join(`
4449`)}const PUe=({course:e,owned:t,freeViaPlan:n,onPurchase:r,onOpen:a})=>{const i=e.status!=="live";return s.jsxs(he,{className:"flex flex-col",children:[s.jsxs(Ce,{children:[s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsx(je,{variant:"outline",children:e.vertical_name}),t&&s.jsxs(je,{className:"bg-emerald-500/10 text-emerald-600 border-emerald-500/20",children:[s.jsx($t,{className:"mr-1 h-3 w-3"})," ",n?"Included":"Owned"]}),!t&&i&&s.jsxs(je,{variant:"secondary",children:[s.jsx(pr,{className:"mr-1 h-3 w-3"})," Coming Soon"]})]}),s.jsx(Pe,{className:"text-lg leading-snug",children:e.title}
4449),e.subtitle&&s.jsx(Un,{children:e.subtitle})]}),s.jsx(pe,{className:"flex-1",children:s.jsx("p",{className:"text-sm text-muted-foreground line-clamp-4",children:e.description})}),s.jsx(P7,{className:"flex items-center justify-between gap-2",children:t?s.jsxs(z,{className:"w-full",onClick:()=>a(e.slug),children:[s.jsx(fc,{className:"mr-2 h-4 w-4"})," Read Course"]}):i?s.jsxs(z,{className:"w-full",variant:"outline",disabled:!0,children:[s.jsx(pr,{className:"mr-2 h-4 w-4"})," Not Available Yet"]}):Ds()?s.jsxs(z,{className:"w-full",variant:"outline",disabled:!0,children:[s.jsx(kl,{className:"mr-2 h-4 w-4"})," Not available in the app"]}):s.jsxs(z,{className:"w-full",variant:"outline",onClick:()=>r(e.id),children:[s.jsx(yJ,{className:"mr-2 h-4 w-4"})," Buy Course"]})})]})},TUe=()=>{const e=Gt(),[t]=Ul(),{toast:n}=Je(),{courses:r,isLoading:a,isOwned:i,isFreeViaPlan:o,hasGiftEligiblePlan:l,purchaseCourse:c}=dY();return g.useEffect(()=>{t.get("purchased")==="true"&&n({title:"Course unlocked!",description:"Your new course is ready to read."})},[t,n]),s.jsxs(s.Fragment,{children:[s.jsx(ar,{title:"Authority Positioning Courses | SociePRO AI",description:"8-week Authority Positioning 101 courses, one per industry — build a content system that makes you the go-to expert in your market.",canonicalUrl:"https://sociepro.ai/dashboard/courses"}),l?s.jsxs("div",{className:"mb-6 rounded-xl border border-emerald-500/30 bg-emerald-500/5 p-4 flex items-center gap-3",children:[s.jsx(Se,{className:"h-5 w-5 text-emerald-600 shrink-0"}),s.jsxs("p",{className:"text-sm",children:["Your plan includes the ",s.jsx("strong",{children:"course for your subscribed industry"})," free to read — other industries are available to buy individually."]})]}):s.jsxs("div",{className:"mb-6 rounded-xl border border-border bg-muted/40 p-4 flex items-center gap-3",children:[s.jsx(Se,{className:"h-5 w-5 text-muted-foreground shrink-0"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Courses are available to buy individually, or included free for your subscribed industry on the Pro and Market Dominance plans."})]}),a?s.jsx("div",{className:"flex items-center justify-center py-24",children:s.jsx(ce,{className:"h-8 w-8 animate-spin text-primary"})}):s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:r.map(u=>s.jsx(PUe,{course:u,owned:i(u),freeViaPlan:o(u),onPurchase:c,onOpen:h=>e(`/dashboard/courses/${h}`)},u.id))})]})},AUe=({slug:e})=>{const t=Gt(),{courses:n,isOwned:r,isLoading:a}=dY(),i=n.find(d=>d.slug===e),[o,l]=g.useState(null),[c,u]=g.useState(!0),h=!!i&&r(i);return g.useEffect(()=>{let d=!1;if(!h||!i){l(null),u(!1);return}return u(!0),NUe(i.id).then(f=>{d||(l(f),u(!1))}),()=>{d=!0}},[h,i]),a?s.jsx("div",{className:"flex items-center justify-center py-24",children:s.jsx(ce,{className:"h-8 w-8 animate-spin text-primary"})}):i?h?s.jsxs("div",{className:"max-w-3xl mx-auto",children:[s.jsxs(z,{variant:"ghost",className:"mb-4",onClick:()=>t("/dashboard/courses"),children:[s.jsx(Lc,{className:"mr-2 h-4 w-4"})," Back to Courses"]}),c?s.jsx("div",{className:"flex items-center justify-center py-24",children:s.jsx(ce,{className:"h-8 w-8 animate-spin text-primary"})}):o?s.jsx("div",{className:"prose prose-sm max-w-none dark:prose-invert",dangerouslySetInnerHTML:{__html:fY(o)}}):s.jsx("p",{className:"text-muted-foreground",children:"This course's full content isn't available yet — check back soon."})]}):s.jsxs("div",{className:"text-center py-24",children:[s.jsx(kl,{className:"mx-auto h-10 w-10 text-muted-foreground mb-4"}),s.jsx("h2",{className:"text-xl font-semibold mb-2",children:i.title}),s.jsx("p",{className:"text-muted-foreground mb-6",children:"You don't own this course yet."}),s.jsxs(z,{onClick:()=>t("/dashboard/courses"),children:[s.jsx(Lc,{className:"mr-2 h-4 w-4"})," Back to Courses"]})]}):s.jsxs("div",{className:"text-center py-24",children:[s.jsx("p",{className:"text-muted-foreground",children:"Course not found."}),s.jsxs(z,{variant:"outline",className:"mt-4",onClick:()=>t("/dashboard/courses"),children:[s.jsx(Lc,{className:"mr-2 h-4 w-4"})," Back to Courses"]})]})},I3=()=>{const{slug:e}=WP();return s.jsx(hr,{title:e?"Authority Positioning 101":"Authority Positioning Courses",description:e?"8-week implementation program":"One 8-week Authority Positioning course per industry, built to run alongside PostPRO and SchedulePRO.",children:e?s.jsx(AUe,{slug:e}):s.jsx(TUe,{})})},EUe="authority-positioning-101-intro",OUe="authority-positioning-101",M3="sociepro_authority101_unlocked",RUe=()=>{const{toast:e}=Je(),[t,n]=g.useState(""),[r,a]=g.useState(""),[i,o]=g.useState(!1),[l,c]=g.useState(!1);g.useEffect(()=>{try{localStorage.getItem(M3)==="true"&&c(!0)}catch{}},[]);const u=SUe(EUe),h=async d=>{d.preventDefault();const f=t.trim(),p=r.trim();if(!/^[^@\s]+@[^@\s]+\.[^@\s]+$/.test(f)){e({title:"That email doesn't look right",description:"Double-check it and try again.",variant:"destructive"});return}if(!p){e({title:"One more thing",description:"Let us know your profession so the course makes sense for you.",variant:"destructive"});return}o(!0);const{error:m}=await W.from("lead_magnet_signups").insert({email:f,profession:p,lead_magnet
4449:OUe});if(o(!1),m&&m.code!=="23505"){e({title:"Something went wrong",description:"Please try again in a moment.",variant:"destructive"});return}try{localStorage.setItem(M3,"true")}catch{}c(!0)};return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(ar,{title:"Authority Positioning 101 (Free) | SociePRO AI",description:"A free 20-minute lesson from the Authority Positioning system SociePRO builds for 14 industries. Learn the Authority Equation and the H.E.L.P. framework — free, no credit card.",canonicalUrl:"https://sociepro.ai/authority-positioning-101",ogTitle:"Authority Positioning 101 — Free Lesson",ogDescription:"You don't have a talent problem. You have a visibility problem. Get the free intro lesson."}),s.jsx("header",{className:"border-b border-border",children:s.jsxs("div",{className:"max-w-3xl mx-auto px-4 py-4 flex items-center justify-between",children:[s.jsxs(Oe,{to:"/",className:"font-bold text-lg tracking-tight",children:["SociePRO",s.jsx("span",{className:"text-primary",children:".ai"})]}),s.jsx(Oe,{to:"/",className:"text-sm text-muted-foreground hover:text-foreground",children:"← Back to home"})]})}),s.jsx("main",{className:"max-w-3xl mx-auto px-4 py-12",children:l?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm text-emerald-600 mb-6",children:[s.jsx(ls,{className:"h-4 w-4"}),"You're in — here's your free lesson."]}),u?s.jsx("div",{className:"prose prose-sm sm:prose-base max-w-none dark:prose-invert",dangerouslySetInnerHTML:{__html:fY(u)}}):s.jsx("p",{className:"text-muted-foreground",children:"This content isn't available right now — check back soon."}),s.jsxs("div",{className:"mt-12 rounded-xl border border-border bg-muted/40 p-6 text-center",children:[s.jsx("p",{className:"font-medium mb-3",children:"Ready for the full 8-week, industry-specific version?"}),s.jsx(z,{asChild:!0,children:s.jsxs(Oe,{to:"/",children:["Explore SociePRO ",s.jsx(Sr,{className:"ml-2 h-4 w-4"})]})})]})]}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"text-center mb-10",children:[s.jsxs("div",{className:"inline-flex items-center gap-1.5 rounded-full border border-primary/30 bg-primary/5 px-3 py-1 text-xs font-medium text-primary mb-5",children:[s.jsx(Se,{className:"h-3.5 w-3.5"}),"Free — no credit card"]}),s.jsx("h1",{className:"text-3xl sm:text-4xl font-bold tracking-tight mb-4",children:"Authority Positioning 101"}),s.jsx("p",{className:"text-lg text-muted-foreground max-w-xl mx-auto",children:"You don't have a talent problem. You have a visibility problem. Get the free 20-minute lesson behind the Authority Positioning system SociePRO builds for 14 industries — the Authority Equation, your one-sentence positioning statement, and the H.E.L.P. framework."})]}),s.jsx(he,{className:"max-w-md mx-auto",children:s.jsx(pe,{className:"pt-6",children:s.jsxs("form",{onSubmit:h,className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{htmlFor:"email",children:"Email"}),s.jsx(ze,{id:"email",type:"email",placeholder:"[email protected]",value:t,onChange:d=>n(d.target.value),required:!0})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(X,{htmlFor:"profession",children:"Profession"}),s.jsx(ze,{id:"profession",type:"text",placeholder:"e.g. Realtor, Financial Advisor, Personal Trainer",value:r,onChange:d=>a(d.target.value),required:!0})]}),s.jsxs(z,{type:"submit",className:"w-full",disabled:i,children:[i?s.jsx(ce,{className:"mr-2 h-4 w-4 animate-spin"}):s.jsx(Sr,{className:"mr-2 h-4 w-4"}),"Get the free lesson"]}),s.jsx("p",{className:"text-xs text-muted-foreground text-center",children:"We'll never spam you. Unsubscribe anytime."})]})})})]})})]})},IUe="PHASE 2 — locked substance per owner spec (2026-09-07). Wording polished, ids renamed to match content_role, tier assignments unchanged. Note: unlike Phase 1's scaffold, this locked set carries zero story/voice/local coverage (roles: process x1, proof x3, myth-bust x4, positioning x2) — story/voice/local now live entirely in Tier 1 (local) and each vertical's own Tier 2 (story/voice). See docs/positioning-v2-review.md.",MUe=[{id:"t3_quality_signal",tier:3,prompt:"What signals premium quality in your work — the kind of thing a client would only notice if they knew what to look for?",contentRole:"process"},{id:"t3_highest_value_situation",tier:3,prompt:"Describe the client situation where you create the most value — and why that specific situation.",contentRole:"proof",complianceNote:"Describe situations and transactions, never demographic identities. Avoid framing that reads as a guaranteed-outcome or performance claim."},{id:"t3_common_objection",tier:3,prompt:"What's the most common objection you hear from a prospect — and how do you actually answer it?",contentRole:"myth-bust"},{id:"t3_structural_proof",tier:3,prompt:"What proof do you show a skeptical prospect? Structural proof only — process, credentials, longevity, guarantees. No client testimonials.",contentRole:"proof",complianceNote:"Regulated verticals: never generate testimonial-style content from this answer. Anchor generated copy on process, credentials, tenure, or guarantees only — never a client's stated outcome."},{id:"t3_counterintuitive_belief",tier:3,prompt:"What do you believe about your work that your clients find counterintuitive?",contentRole:"myth-bust"}
4449],DUe=[{id:"t4_category_statement",tier:4,prompt:'Complete this category statement: "The ___ [service] for ___ [place or situation]."',contentRole:"positioning"},{id:"t4_industry_myth",tier:4,prompt:"What does your industry get wrong?",contentRole:"myth-bust"},{id:"t4_referral_description",tier:4,prompt:"What should a referral partner say when they describe you to someone?",contentRole:"positioning"},{id:"t4_competitor_disagreement",tier:4,prompt:"Name one specific belief your competitors would publicly disagree with.",contentRole:"myth-bust"},{id:"t4_five_year_difference",tier:4,prompt:"What is concretely different about a client's life five years after working with you?",contentRole:"proof",complianceNote:"Describe structural or behavioral change (habits, decisions, preparedness) rather than dollar-figure or performance outcomes for regulated verticals."}],$Ue=[{id:"philosophy_framing",rule:"Personal philosophy and specialty content is framed as 'here's how I think' — first-person belief, never a second-person instruction ('you should...')."},{id:"no_performance_claims",rule:"Never state or imply a performance claim, a projected outcome, or an invented statistic. Never convert a qualitative answer into a numeric claim the user didn't provide."},{id:"disparagement",rule:"When contrasting with 'the industry' or a competitor, frame as 'I believe X; the industry default is Y' — never a bad-faith implication, and never name a specific firm, carrier, or competitor. See BuilderPRO's t4_competitor_disagreement examples for the target tone."}],LUe={_status:IUe,tier3:MUe,tier4:DUe,generationRules:$Ue},FUe="financial_advisor",BUe=!0,WUe=[{id:"service_area",label:"Which states are you licensed in, and where are your clients based?",type:"text",required:!0,placeholder:"e.g. Licensed in CO and WY, clients mostly Denver metro",contentRole:"local"},{id:"role_firm_credentials",label:"Your role, firm name, and any credentials",type:"text",placeholder:"e.g. Lead advisor at Meridian Wealth Partners, CFP®",contentRole:"calibration"},{id:"years_advising",label:"Years advising clients",type:"number",placeholder:"e.g. 11",contentRole:"calibration"},{id:"primary_specialty",label:"Primary specialty",type:"select",options:["Retirement transitions","High-net-worth wealth management","Small business owner planning","Tax-efficient investing","Estate & legacy planning","College funding"],contentRole:"calibration",subFields:[{id:"primary_specialty_detail",label:"What about this specialty do you actually do well?",placeholder:"e.g. I build the paycheck-replacement math for people leaving a steady salary.",required:!0}]},{id:"typical_client_situation",label:"The situation your typical client is in when they first call you",type:"select",options:["Approaching retirement","Recently sold a business","High income, low savings discipline","Received an inheritance or windfall","Widowed or newly single","Building wealth in their 30s–40s"],contentRole:"calibration",complianceNote:"The 'Widowed or newly single' option is a vulnerable-situation audience — see the vulnerable_audience_framing generation rule below: educational framing only, never targeting or solicitation framing.",subFields:[{id:"typical_client_situation_detail",label:"Describe them in one sentence — what's actually going on in their life?",placeholder:"e.g. Two years from retiring, terrified they'll run out of money, no idea what their actual number is.",required:!0}]},{id:"planning_philosophy",label:"Which of these is closest to your planning philosophy?",type:"select",options:["Plan for the worst, hope for the best","Simple and boring beats clever","Behavior matters more than returns","Concentrate then protect","Goals-based, not benchmark-based"],contentRole:"voice",subFields:[{id:"planning_philosophy_detail",label:"Say it in your own words",required:!0}]},{id:"headshot",label:"Headshot",type:"upload",required:!0,contentRole:"media"},{id:"logo",label:"Firm logo (optional)",type:"upload",skippable:!0,contentRole:"media"}],qUe=[{id:"fa_t2_planning_process",tier:2,prompt:"Walk through your planning process end-to-e
4449nd, from a client's first meeting with you to an ongoing relationship. What actually happens, in order?",contentRole:"process",examples:["First meeting is discovery only — no recommendations. I map goals, current accounts, and what's actually keeping them up at night. Second meeting is the plan itself, walked through slide by slide. After that, we meet twice a year minimum, plus anytime something changes.","I start with a one-page net worth snapshot so they can see where they stand before we talk about anything else. From there we build a written plan together over two sessions, then I send a one-page summary after every meeting so they're never guessing what we decided.","Every new client gets a 90-day onboarding: week one is data gathering, week four is the draft plan, week twelve is implementation review. After that we're on a semi-annual cadence with a standing 'call me anytime something changes' policy."]},{id:"fa_t2_anxiety_handling",tier:2,prompt:"How do you handle client anxiety during market drops?",contentRole:"process",complianceNote:"Avoid language implying guaranteed protection from loss or specific return outcomes — frame around communication process and behavioral coaching, not performance.",examples:["I call before they call me. When the market drops more than 5% in a week, every client gets a short note within 48 hours reminding them what their plan already accounts for — because the plan was built assuming a drop like this would happen.","I ask one question first: 'Has anything about your actual goals changed this week?' Almost always the answer is no — which is usually enough to talk someone off the ledge without touching a single number.","I keep a one-page 'what we do in a downturn' sheet I share at onboarding, so by the time a real drop happens, they're re-reading something familiar instead of panicking over something new."]},{id:"fa_t2_origin_story",tier:2,prompt:"What did you do, see, or live through before you became an advisor that shapes how you work with clients today?",contentRole:"story",examples:["I watched my own parents get sold a whole life policy they never understood and couldn't afford to keep. I still start every fee conversation by making sure the client understands exactly what they're getting before I ask for a decision.","I spent six years as a CPA doing tax returns for retirees who'd made avoidable mistakes years earlier — nobody had connected their tax filing to their investment decisions. That gap is basically my whole practice now.","I was the one who helped my grandmother untangle her finances after my grandfather passed, with zero guidance from anyone. That's exactly the situation I built my widowed-client process around — nobody should have to figure it out alone at the kitchen table."]},{id:"fa_t2_niche",tier:2,prompt:"What's the niche you serve better than almost anyone else — and why?",contentRole:"positioning",examples:["Small business owners two to five years from selling. I've built the exit-planning math enough times that I catch tax mistakes generalist advisors miss.","First-generation wealth — people who built real money themselves and have no family playbook for what to do with it. I don't assume they already know the vocabulary.","Dual-income households where one partner handles all the finances and the other has quietly checked out. I run every meeting so both people leave understanding the plan, not just one."]},{id:"fa_t2_fees_value",tier:2,prompt:"How do you actually talk to a prospect about fees and the value behind them?",contentRole:"proof",complianceNote:"Frame around service scope and process, not projected returns or performance net of fees.",examples:["I show them exactly what's included — the plan, the ongoing reviews, the tax coordination — before I ever say a number, so the fee is answering a question they already asked instead of coming out of nowhere.","I compare it to what they're already paying for other advice in their life without noticing, and walk through what's different about having one person coordinating investments, tax, and estate decisions together.","I tell them plainly: you're not paying me to beat the market, you're paying me to keep you from making an expensive mistake during the two or three moments in your life when panic is cheap and bad decisions are expensive."]}],UUe={t3_quality_signal:["The plan document itself — most advisors hand over a stack of numbers. Mine reads like a decision, not a report: here's what we're doing and why, in plain language.","How fast a question gets answered. If a client emails asking about a distribution, they hear back same day, not 'someone will follow up.'","Whether the tax return and the investment plan actually talk to each other. Most of the time they don't, and it shows up as a missed harvesting opportunity every single year."],t3_highest_value_situation:["Someone within two years of retirement who's never modeled what their actual monthly income will look like — that's where a plan changes the decision they're about to make, not just the portfolio.","A business owner mid-negotiation on a sale who hasn't thought through the tax structure of the deal yet. Getting involved before the ink dries changes the outcome more than anything I do afterward.","A household where one spouse has always handled the money and the other is suddenly on their own. Building a plan both people actually understand is where the real value shows up."],t3_common_objection:["'I can just do this myself with an app.' I agree the app can track a portfolio — it can't tell you what to do when your business gets bought or your parent needs care. That's the actual job.","'Aren't you just going to sell me your firm's products?' I walk through how I'm compensated and show them the plan comes first, product recommendations second, in writing.","'This feels like it's for people richer than me.' I show them a plan for someone at their exact stage, not a hypothetical millionaire — the earlier the better, not the richer the better."],t3_structural_proof:["I 
4449show the actual planning process document, step by step, and my credentials (CFP®, years practicing) — not a client result, a structural walkthrough of what happens after they sign on.","I point to my fiduciary obligation in writing, and to how long I've been doing this in this specific specialty, rather than any dollar figure.","I show the same onboarding checklist every client goes through, so they can see there's a repeatable process behind the advice, not improvisation."],t3_counterintuitive_belief:["More savings doesn't fix a bad spending plan. I've seen high earners more anxious about retirement than people with a third of their assets, because no one ever built them a number to trust.","The best time to build a plan is before you think you need one — most people wait until a crisis forces the conversation, when the good options are already gone.","Diversification isn't really about maximizing returns — it's about making sure no single bad year can wreck a plan that took a decade to build."],t4_category_statement:["The exit-planning advisor for small business owners who are two to five years from selling and haven't started the tax conversation yet.","The retirement-income advisor for households who saved well but have no idea how to turn savings into a monthly paycheck.","The financial advisor for first-generation wealth builders who don't have a family playbook to follow."],t4_industry_myth:["That performance is the whole job. Most of what actually protects a client's plan happens in behavior coaching and tax coordination, not stock picking.","That bigger accounts get better advice. The plan quality should be identical whether the account is $200K or $2M — the fee structure is the only thing that should change.","That a good advisor never says 'I don't know.' The honest ones say it constantly and bring in the right specialist instead of guessing."],t4_referral_description:["'Talk to them before you make any big decision about money — not after, before, while you can still change the plan.'","'They're the one who actually explains it instead of just telling you what to do.'","'If you're within a few years of retiring and haven't done the math yet, that's exactly who you call.'"],t4_competitor_disagreement:["That a client should be steered toward whatever product pays the highest commission — I believe fee transparency should come before any recommendation, not after.","That performance chasing (moving into 'hot' funds) is a reasonable response to a bad year — I think it's usually the single most expensive mistake a client can make.","That a 45-minute annual review is enough contact. I think anything less than twice a year isn't really an ongoing relationship, it's an autopilot."],t4_five_year_difference:["They stop checking their balance every day. Once the plan is built and trusted, the anxiety that used to drive daily logins mostly disappears.","They can answer 'what happens if I lose my job tomorrow' without panicking, because the plan already modeled it.","Big financial decisions — a home purchase, helping a kid with school, retiring early — get run through the plan before they happen instead of reacted to after."]},zUe={t3_common_objection:"No performance claims. Any sample plan or document referenced as shown to a prospect must be anonymized/hypothetical — never another client's actual documents.",t4_competitor_disagreement:"Frame as a belief/philosophy contrast ('I believe X'), never as an accusation of misconduct against a named competitor or firm."},HUe=[{id:"vulnerable_audience_framing",rule:"For vulnerable-situation audiences (e.g. widowed or newly single), use educational framing only — never targeting or solicitation framing.",appliesWhen:"typical_client_situation is 'Widowed or newly single'"}],VUe={vertical:FUe,_contentReviewed:BUe,tier1:WUe,tier2:qUe,sharedExamples:UUe,sharedComplianceNotes:zUe,generationRules:HUe},GUe="insurance",YUe=!0,KUe=[{id:"service_area",label:"Which states are you licensed in, and what's your territory?",type:"text",required:!0,placeholder:"e.g. Licensed in TX, based in Austin",contentRole:"local"},{id:"agency_profile",label:"Your agency",type:"composite",contentRole:"calibration",subFields:[{id:"agency_name",label:"Agency name",type:"text",placeholder:"e.g. Street Family Insurance"},{id:"independence_model",label:"Independence model",type:"select",options:["Independent","Captive","Hybrid"]},{id:"designations",label:"Designations",type:"text",placeholder:"e.g. LUTCF, CLU, CPCU, ChFC",required:!1}]},{id:"specialty_lines",label:"Lines you write",type:"multi_select",options:["Life","Property & Casualty","Health","Commercial","Medicare"],contentRole:"calibration",complianceNote:"Medicare-adjacent content must follow CMS marketing rules and route through an approval queue before publishing. If specialty_lines includes Medicare, this applies to ALL of this user's generated content, not just Medicare-specific answers — see the medicare_routing generation rule below."},{id:"years_in_business",label:"Years in business",type:"number",placeholder:"e.g. 9",contentRole:"calibration"},{id:"typical_client_situation",label:"The situation your typical client is in when they first call you",type:"select",options:["Young family, first policy","Small business owner","Recently bought a home","Approaching Medicare eligibility","Had a claim denied elsewhere","Underinsured and doesn't know it"],contentRole:"calibration",complianceNote:"The 'Approaching Medicare eligibility' option is subject to CMS marketing rules and routes through the approval queue regardless of source (see medicare_routing rule). It's also a vulnerable-situation audience — educational framing only, never targeting or solicitation framing (see vulnerable_audience_framing rule).",subFields:[{id:"typical_client_situation_detail",label:"Describe them in one sentence — what's actually going on?",placeholder:"e.g. Just bought their first home, has no idea what their policy actually excludes.",required:!0}]},{id:"community_roots",label:"Any local roots worth mentioning (hometown, sponsorships, board seats)?",type:"text",placeholder:"e.g. Third-generation Austin, sponsor the local little league",contentRole:"local"}
4449,{id:"headshot",label:"Headshot",type:"upload",required:!0,contentRole:"media"},{id:"logo",label:"Agency logo (optional)",type:"upload",skippable:!0,contentRole:"media"}],XUe=[{id:"ins_t2_claims_advocacy",tier:2,prompt:"Describe how you personally help a client through a claim, step by step — not what the carrier does, what you do.",contentRole:"process",examples:["When a client has a loss, I call the adjuster with them on speaker so nothing gets lost in translation, and I keep a running list of what's been submitted so nothing falls through the cracks on their end.","I don't wait for the carrier to reach out — I check in every 3-4 days during an open claim and translate whatever jargon just landed in their inbox into what it actually means for them.","If a claim gets denied or lowballed, I pull the policy language myself and draft the appeal with them before they ever have to argue with the carrier alone."]},{id:"ins_t2_underestimated_coverage",tier:2,prompt:"What's the coverage gap people most often don't realize they have until it's too late?",contentRole:"myth-bust",examples:["Most homeowners have no idea their policy caps personal property replacement at a fraction of what it'd actually cost to replace everything after a total loss.","People assume their auto policy covers a rental car the same way it covers their own — it usually doesn't, and that gap shows up at the worst possible moment.","Small business owners routinely think their general liability covers a data breach or a cyber incident. It almost never does without a separate rider."]},{id:"ins_t2_annual_review",tier:2,prompt:"Walk through what actually happens in your annual policy review.",contentRole:"process",examples:["I pull every policy up side by side with what changed in their life that year — new car, new baby, a renovation — and flag anything that's now under- or over-insured before we talk premium.","We start with claims history and life changes, not price. Only after we've confirmed the coverage still fits do we talk about whether the premium is competitive.","I send a short pre-review checklist two weeks before the call so they walk in already thinking about what's changed, instead of us reconstructing a year from memory in 20 minutes."]},{id:"ins_t2_vs_1800_carrier",tier:2,prompt:"What do you do for a client that a 1-800 number or an app-only carrier can't?",contentRole:"myth-bust",examples:["An app can sell you a policy. It can't tell you your policy has a coverage gap for the home business you started last year — I catch that in conversation, not a form.","When something goes wrong, you get me on the phone, not a queue. I've fought carriers on behalf of clients who'd have just accepted a lowball number otherwise.","I actually know my clients' situations — their business, their family, what they're worried about — so I catch the gap before it becomes a claim, not after."]},{id:"ins_t2_claim_story",tier:2,prompt:"Describe, anonymized, a claim where your advocacy changed the outcome for a client.",contentRole:"story",complianceNote:"Anonymize fully — no identifying details. Never imply a guaranteed outcome; describe the advocacy process, not a promised result.",examples:["A client's claim was initially denied over a technicality in how the loss was reported. I reviewed the policy language, resubmitted with the correct documentation, and the carrier reversed the denial within two weeks.","After a client's home flooded, I coordinated directly with the adjuster and contractor so they didn't have to manage three separate conversations during the worst week of their year.","A client's initial settlement offer was well below what their policy actually covered. I flagged the discrepancy against their declarations page and the carrier revised the offer after review."]}],QUe={t3_quality_signal:["Whether the agent reviews your policy before renewal or just auto-renews it. A real review catches gaps before they become an expensive surprise.","How fast they pick up the phone during a claim, not just at renewal time when there's a sale to make.","Whether they actually explain what's excluded, not just what's covered — most people find out what's excluded the hard 
4449way."],t3_highest_value_situation:["A client who just bought their first home and has no idea what an HO-3 policy actually excludes — that first real conversation prevents a five-figure surprise down the road.","A small business owner who's been treating their business insurance like a checkbox for years without realizing their equipment coverage hasn't kept up with what they've bought since.","Someone mid-claim with another agent who's gone quiet on them — stepping in and actually advocating is where trust gets built fastest."],t3_common_objection:["'I can just get it cheaper online.' I show them what's actually excluded in the cheap policy versus what's in the one I'd recommend — the price gap usually explains itself.","'My current agent's fine, I never talk to them.' That's usually the problem, not a feature — I ask when they last had an actual coverage review, not just a renewal notice.","'Insurance is all the same.' I walk through one real claim scenario and show how two policies that look identical on price pay out completely differently."],t3_structural_proof:["I show my actual licensing and how long I've carried each line, plus the carriers I'm appointed 
4449with — not a client outcome, just the credentials and access.","I walk through my claims-advocacy process step by step so they can see there's a repeatable system behind it, not a one-off story.","I point to my continuing education and designations (e.g. LUTCF, CLU) as evidence of ongoing training, not a specific client's result."],t3_counterintuitive_belief:["Cheaper isn't safer. The lowest-premium policy is usually the one with the coverage gaps that only show up during a claim, when it's too late to fix.","Most people are underinsured, not overinsured — the instinct to cut coverage to save money usually cuts the wrong thing first.","An annual review matters more than the initial sale. Life changes fast, and a policy that fit two years ago often doesn't fit now."],t4_category_statement:["The claims-advocacy agent for families and small business owners who don't want to fight a carrier alone.","The independent agent for people who've been burned by an app-only insurer that vanished the moment they had a real claim.","The insurance educator for first-time homeowners who have no idea what their policy actually excludes."],t4_industry_myth:["That insurance is a commodity and price is the only thing that matters. The coverage details are where policies actually differ.","That an agent's job ends at the sale. The real value shows up during a claim, which is exactly when a lot of agents disappear.","That more coverage always means a higher premium. Often the right coverage costs the same as the wrong coverage — nobody just checked."],t4_referral_description:["'Call them before you buy anything online — they'll tell you what you're actually getting for the price.'","'When my claim got denied, they're the one who got it turned around. Call them.'","'They actually review your policy every year instead of just sending a renewal bill.'"],t4_competitor_disagreement:["That bundling everything with one carrier is automatically the best deal — I think it should be tested against the market every renewal, not assumed.","That a client should just accept a carrier's first settlement offer — I believe every claim deserves a second look against the actual policy language.","That annual reviews are optional extras. I think skipping them is how most coverage gaps happen in the first place."],t4_five_year_difference:["They stop treating their policy paperwork as something to ignore — they know what they're covered for and what they're not.","When something goes wrong, they call me first instead of panicking, because they already know I'll walk the claim with them.","Their coverage has actually kept pace with their life — the new car, the renovation, the business — instead of quietly falling behind."]},JUe={t3_common_objection:"No performance claims. Objection-handling content should stay general — never claim a specific competitor's policy is inferior by name."},ZUe=[{id:"coverage_gap_framing",rule:"Coverage-gap education content uses general framing ('coverage varies by policy and state'), never individualized advice directed at the reader. Always end toward a policy review, never fear-based framing."},{id:"claim_story_framing",rule:"Claim-story content is past tense, fully anonymized, and carries an implicit or explicit 'every claim is different' framing. Never aggregate individual claim stories into a statistic or a promise of outcome."},{id:"medicare_routing",rule:"If specialty_lines includes Medicare, ALL generated content for that user routes through the approval queue, regardless of which question or source field it was drafted from.",appliesWhen:"specialty_lines includes 'Medicare'"},{id:"vulnerable_audience_framing",rule:"For vulnerable-situation audiences (e.g. approaching Medicare eligibility), use educational framing only — never targeting or solicitation framing.",appliesWhen:"typical_client_situation is 'Approaching Medicare eligibility'"}],eze={vertical:GUe,_contentReviewed:YUe,tier1:KUe,tier2:XUe,sharedExamples:QUe,sharedComplianceNotes:JUe,generationRules:ZUe},tze="realtor",nze=!0,rze=[{id:"service_area",label:"Your primary market — city and the specific neighborhoods you focus on",type:"text",required:!0,placeholder:"e.g. Bend, OR — NorthWest Crossing",contentRole:"local"},{id:"brokerage_role",label:"Brokerage and your role",type:"text",placeholder:"e.g. Lead agent at Cascade Realty Group",contentRole:"calibration"},{id:"years_licensed",label:"Years licensed",type:"number",placeholder:"e.g. 12",contentRole:"calibration"},{id:"client_situations_served",label:"Who you do your best work for",type:"multi_select",options:["First-time buyers","Move-up buyers","Sellers / listings","Investors","Luxury","Relocation","Downsizing"],contentRole:"calibration",helpText:"Describe situations and transactions — never demographic groups. Fair housing law prohibits marketing that could be read as targeting or excluding people based on race, religion, familial status, disability, national origin, or federal and your state's protected classes.",complianceNote:"Fair Housing Act: generated content from this field must reference client situations/transactions only, never demographic or protected-class identities, and must not describe neighborhoods in ways that code for demographics.",subFields:[{id:"client_situations_detail",label:"What price range and specific situation do you do your best work in?",placeholder:"e.g. $400K–$700K, first-time buyers competing against cash offers.",required:!0}]},{id:"signature_process",label:"Any signature process, guarantee, or promise you make clients?",type:"text",contentRole:"proof",placeholderPool:["e.g. My 30-Day Sell Guarantee — if it's not under contract in 30 days, I drop my commission by half. (only if you actually offer this)","e.g. Every listing gets professional photos and a pre-inspection before it goes live. 
4449(only if you actually offer this)","e.g. I respond to every buyer inquiry within one hour, seven days a week. (only if you actually offer this)"]},{id:"prior_career_background",label:"Career or background before real estate, if relevant",type:"text",placeholder:"e.g. Former general contractor — I still walk every listing like an inspector.",contentRole:"story"},{id:"headshot",label:"Headshot",type:"upload",required:!0,contentRole:"media"},{id:"project_photos",label:"A few of your best listing or closing photos",type:"upload",skippable:!0,skipWarning:"You'll underperform without these — real photos are what make positioning content actually land.",contentRole:"media"}],aze=[{id:"re_t2_neighborhood_knowledge",tier:2,prompt:"What do you know about your neighborhoods that a listing site like Zillow never tells you?",contentRole:"local",examples:["I know which streets in NorthWest Crossing flood during spring runoff and which don't — that's not on any listing, but it's the first thing I check before showing a house.","I can tell a buyer which elementary school boundary line splits a single block in half, because I've had two clients on the same street zoned to different schools.","I know which HOA in my market actually enforces its rules and which one just collects dues — that's the difference between a smooth close and a surprise special assessment."]},{id:"re_t2_client_transformation",tier:2,prompt:"Describe a client transformation — a before-and-after in their situation, not their identity — that you're proud of.",contentRole:"story",complianceNote:"Describe the transaction situation (outbid, relisted, relocating), never demographic identity, per Fair Housing Act.",examples:["A buyer had been outbid four times before working with me. We restructured the offer strategy around escalation clauses and a faster close timeline, and the fifth offer was accepted.","A seller's home had sat on the market with another agent for 90 days. We repriced, restaged two rooms, and had a signed contract within 12 days of relisting.","A relocating buyer had never seen the city in person. I built a video walkthrough system for three finalist homes so they could make a confident decision from across the country."]},{id:"re_t2_who_you_wont_work_with",tier:2,prompt:"Who do you deliberately not work with, and why?",contentRole:"voice",complianceNote:"Refuse-and-flag: exclusion criteria drawn from this answer must be transactional/behavioral (not pre-approved, wants to skip disclosures). Refuse to draft or publish any exclusion criteria referencing a protected class, and surface a warning instead — see the refuse_and_flag_exclusions generation rule.",examples:["I won't take a listing at a price I think is unrealistic just to win the business — I'll tell a seller the number I actually believe, even if it costs me the listing.","I don't work with buyers who aren't pre-approved before we start touring. It wastes their time and mine, and I say so upfront.","I turn down sellers who want to skip disclosures they're legally required to make. That's not a risk I'll help someone take."]},{id:"re_t2_selling_process",tier:2,prompt:"Walk through your selling process from listing to close — what actually happens, in order?",contentRole:"process",examples:["We start with a pricing strategy session using actual closed comps, not just active listings. Then staging and photos, a coordinated launch, and a structured offer-review timeline instead of taking offers one at a time.","Listing goes live with professional photos and a pre-inspection already done, so there are no surprises mid-contract. I set an offer deadline instead of accepting the first reasonable one.","I walk every seller through a 5-step timeline before we list: prep, photos, launch, offer review, closing — with a specific date attached to each step so nothing feels vague."]},{id:"re_t2_market_myths",tier:2,prompt:"What's the one thing people get wrong about your market right now?",contentRole:"myth-bust",complianceNote:"Local data framing only (e.g. 'inventory is up in my area right now') — never a future-price guarantee or prediction.",examples:["People think it's still a seller's market everywhere in town. Two neighborhoods over from mine, inventory's actually piling up and sellers are sitting for 60+ days.","Buyers assume rates dropping means prices will drop too. In my market, lower rates have brought more buyers back in and prices have held or ticked up.","Sellers think listing high and 'seeing what happens' is low-risk. In this market it usually means 45 extra days on market and a price cut that spooks buyers."]}],sze={t3_quality_signal:["Whether the photos were taken by a professional or a phone — buyers scroll past a listing in under two seconds 
4449if the photos look amateur.","Whether the agent pre-inspects before listing. That's what keeps a deal from falling apart three weeks into contract.","How the offer is structured, not just the number — a clean offer with fewer contingencies often beats a higher one with more risk."],t3_highest_value_situation:["A buyer who's been outbid multiple times and is starting to lose confidence — that's where a sharper offer strategy actually changes the outcome.","A seller who's inherited a home from out of state and has no idea what it's worth or what needs fixing before listing — walking them through it start to finish is where the real value shows up.","A relocation buyer with a tight closing window who can't fly in for every showing — coordinating everything remotely is where I earn my keep."],t3_common_objection:["'I can just use the listing agent.' I explain that the listing agent works for the seller, not them — and show them what representation actually changes in a negotiation.","'Why do I need an agent when I can browse listings myself online?' I show them what the online price history doesn't tell them — pending repairs, HOA issues, why a house keeps relisting.","'Real estate commissions are too high.' I break down exactly what I do for that fee — pricing strategy, marketing, negotiation, coordination — line by line."],t3_structural_proof:["I show my actual closed-transaction history and average days-on-market versus the local average — structural numbers, not a client quote.","I point to my specific process documents — pricing worksheet, staging checklist, offer-review timeline — so a prospect can see there's a system, not improvisation.","I show my years licensed and transaction count in this specific market, not a general real estate credential."],t3_counterintuitive_belief:["The highest offer isn't always the best offer — I've seen lower offers with fewer contingencies beat higher ones that were more likely to fall through.","Overpricing a listing to 'leave room to negotiate' usually backfires — it kills the early-week momentum that drives multiple offers.","Staging an empty house often sells it faster than a lived-in one, even when the lived-in version is objectively nicer — buyers struggle to picture their own stuff in someone else's clutter."],t4_category_statement:["The negotiation-first agent for buyers who've been outbid before and don't want it to happen again.","The listing agent for sellers who want a structured launch and offer-review process instead of guessing.","The relocation specialist for buyers moving into the area sight-unseen."],t4_industry_myth:["That every agent adds the same value. The difference between a good and average agent usually shows up in negotiation, not in unlocking a door.","That listing higher gives you more room to negotiate. In most markets it just means longer days on market and a price cut everyone notices.","That the agent's job ends at closing. Half the value is in what happens before an offer is even written."],t4_referral_description:["'If you've been outbid before, call them — they know how to structure an offer that actually wins.'","'They'll tell you the real number, not just what you want to hear.'","'If you're moving here from out of state, they're the one who makes it feel manageable.'"],t4_competitor_disagreement:["That you should always counter every offer to squeeze out a few more dollars — I think that risks losing a clean offer over a number that won't matter in five years.","That overpricing a listing 'to test the market' is low-risk — I believe it almost always costs more in stale-listing perception than it could ever gain.","That buyers should waive every contingency to win in a hot market — I think that trades away protection buyers actually need."],t4_five_year_difference:["They're in a home that actually fits how they live now, not just the one that won a bidding war at the time.","They know exactly who to call the next time they buy or sell, instead of starting from scratch with a stranger.","They avoided the repair surprise that would've come from skipping a pre-inspection, because we caught it before closing."]},ize=[{id:"fair_housing",rule:"Reference client situations and transactions only, never demographic identities. No neighborhood description may code for demographics. School-related content is limited to factual boundaries/enrollment information — never a quality characterization ('great schools')."},{id:"refuse_and_flag_exclusions",rule:"Exclusion criteria drawn from who_you_wont_work_with must be transactional or behavioral (e.g. 'not pre-approved', 'wants to skip disclosures'). Refuse to draft or publish any exclusion criteria that reference a protected class, and surface a warning instead of silently dropping it."}],oze={vertical:tze,_contentReviewed:nze,tier1:rze,tier2:aze,sharedExamples:sze,generationRules:ize},lze="builder_remodeler",cze=!0,uze=[{id:"service_area",label:"Service area — counties or cities you build/remodel in",type:"text",required:!0,placeholder:"e.g. Greater Denver metro",contentRole:"local"},{id:"company_profile",label:"Your company",type:"composite",contentRole:"calibration",subFields:[{id:"company_name",label:"Company name",type:"text",placeholder:"e.g. Cascade Custom Builds"},{id:"build_types",label:"Build types",type:"multi_select",options:["Custom homes","Remodel","Commercial","Spec builds","Additions","ADUs"]},{id:"style_descriptor",label:"Style you're known for",type:"text",placeholder:"e.g. Modern farmhouse, historic renovation"}]},{id:"project_range",label:"Typical project size",type:"select",options:["Under $50K","$50K–150K","$150K–500K","$500K–1M","$1M+"],contentRole:"calibration"},{id:"years_in_business",label:"Years in business",type:"number",placeholder:"e.g. 15",contentRole:"calibration"},{id:"pricing_model",label:"How you structure pricing",type:"select",options:["Fixed bid","Cost-plus","Open-book / transparent","Milestone-based"],contentRole:"calibration",subFields:[{id:"pricing_model_detail",label:"Anything about how you structure pricing that clients should know upfront?",required:!0}]},{id:"warranty_advantage",label:"Your warranty or process advantage",type:"text",contentRole:"proof",placeholderPool:["e.g. 5-year structural warranty, daily photo updates sent to every client. 
4449(only if you actually offer this)","e.g. Fixed-price change orders — no surprise bills after the contract is signed. (only if you actually offer this)","e.g. A dedicated project manager on-site every day, not just at milestones. (only if you actually offer this)"]},{id:"headshot",label:"Headshot",type:"upload",required:!0,contentRole:"media"},{id:"project_photos",label:"A few of your best before/after project photos",type:"upload",skippable:!0,skipWarning:"You'll underperform without these — real project photos are what make positioning content actually land.",contentRole:"media",requiresAttestation:{type:"photo_consent",text:"I confirm I have the homeowner's permission to publish these photos."}}],dze=[{id:"br_t2_client_communication",tier:2,prompt:"How do you keep clients informed during a build, day to day?",contentRole:"process",examples:["Every client gets a daily photo update through a shared app — even on slow days, so they never wonder what's happening on site.","I do a 15-minute Friday walkthrough call with every active client, rain or shine, even if the update is just 'we're on schedule.'","Clients get a shared project folder with the schedule, photos, and any decisions pen
4449ding — so they're never chasing me for status."]},{id:"br_t2_change_orders",tier:2,prompt:"Describe how you handle an unexpected issue or change order mid-project.",contentRole:"story",examples:["We found rotted framing behind a wall on a remodel that wasn't in the original scope. I stopped work, photographed it, and walked the client through three fix options with real prices before touching anything else.","A client wanted to add a window mid-build. I priced the change same-day, showed the schedule impact honestly, and let them decide before we moved forward.","Permit delays pushed a start date back three weeks. I told the client immediately, adjusted the schedule, and didn't let the surprise sit until the next scheduled check-in."]},{id:"br_t2_subcontractor_management",tier:2,prompt:"How do you manage subcontractor quality on a job?",contentRole:"process",examples:["I only use subs I've worked with on at least three prior jobs, and I'm on site for every rough-in inspection myself, not just at the walkthrough.","Every sub gets a written scope and a punch list before they start — vague verbal instructions are where quality slips.","I do a mid-project quality check on every trade before the next one covers their work, so problems get caught before they're behind drywall."]},{id:"br_t2_material_sourcing",tier:2,prompt:"What's your philosophy on sourcing materials?",contentRole:"process",examples:["I spec materials I've personally used on at least one prior project — no client is the test case for a product I haven't seen perform.","I show clients the actual samples before ordering, not a catalog photo — what looks great online sometimes looks cheap in person.","I build in a materials buffer for lead-time-sensitive items so a supplier delay doesn't become the client's schedule problem."]},{id:"br_t2_post_completion_support",tier:2,prompt:"What does support actually look like after the project is done?",contentRole:"proof",examples:["Every client gets a 5-year structural warranty and my direct cell number — not a call center line.","I do a 90-day post-completion walkthrough to catch anything that needs adjusting as the house settles in.","If something comes up after the warranty period that I think is on us, I still show up and make it right — that's not written anywhere, it's just how I operate."]}],hze={t3_quality_signal:["Whether the trim lines are actually straight and consistent room to room — that's the detail that separates a good build from a rushed one.","How clean the job site is kept during construction. A crew that respects the site usually respects the work.","Whether the punch list gets fixed before the final walkthrough or you're chasing the builder for weeks after move-in."],t3_highest_value_situation:["A homeowner who's been burned by a contractor before and is nervous about handing over control — rebuilding that trust with daily communication is where I add the most value.","A remodel where structural surprises are likely (older home, unknown framing) — having a builder who handles the unexpected calmly instead of panicking is what protects the budget.","A client juggling a build while living in the home — sequencing the work to minimize disruption is where experience actually shows."],t3_common_objection:["'Contractors always go over budget.' I show them my change-order process and how few of my projects have gone more than 5% over the original estimate.","'You'll disappear once you have my deposit.' I show them my daily-update system so they can see exactly what that looks like before they sign anything.","'Cheaper bids are basically the same work.' I walk through what's usually cut in a lowball bid — material grade, sub quality, timeline padding — line by line."],t3_structural_proof:["I show my actual warranty terms in writing and my years in business — structural facts, not a client's opinion.","I point to my licensing, insurance, and how long I've worked with my core subcontractor team, not a single project's outcome.","I show the same documented process — scope, schedule, daily updates — every client gets, so they can see it's a system, not a promise."],t3_counterintuitive_belief:["The lowest bid is usually the most expensive one by the time change orders are done — it just doesn't look that way on day one.","More communication, not more contract language, is what actually prevents disputes. Most conflicts start with silence, not disagreement.","A longer, more honest timeline upfront beats an optimistic one that slips constantly — clients trust builders who tell them the real number."],t4_category_statement:["The transparent-pricing builder for homeowners who've been burned by vague estimates before.","The daily-communication remodeler for families living in the home during construction.","The structural-warranty builder for clients who want proof the work will hold up, not just a handshake."],t4_industry_myth:["That the lowest bid is the safest choice. It's usually the riskiest — corners get cut somewhere, and it's rarely visible until later.","That change orders are the contractor trying to squeeze more money out of you. Most come from something nobody could see until the wall opened up.","That a longer timeline means a worse contractor. Often it means an honest one who isn't padding the schedule to win the bid."],t4_referral_description:["'They actually tell you what's happening every day — you're never wondering what's going on at the house.'","'When something unexpected came up, they handled it calmly and gave us real options instead of just a bigger bill.'","'Their warranty is real — they came back and fixed something a year later without a fight.'"],t4_competitor_disagreement:["That verbal updates are enough. I think every client deserves a written, dated record of what's happening and what changed.","That the cheapest materials that meet code are good enough. I think spec should match how long a client plans to stay in the home, not just the minimum.","That a warranty is just a sales line. I think it should be specific, written, and actually honored years later."],t4_five_year_difference:["The work still looks and performs the way it did on day one — no callbacks for things that should've been built right the first time.","They know exactly who to call if anything ever needs adjusting, instead of hunting for a contractor who's disappeared.","They trust the next big renovation decision to the same builder instead of starting the vetting process over from scratch."]}
4449,fze={vertical:lze,_contentReviewed:cze,tier1:uze,tier2:dze,sharedExamples:hze},pze="mortgage",mze=!0,gze=[{id:"service_area",label:"Your primary lending market — states you're licensed in and the metro areas you focus on",type:"text",required:!0,placeholder:"e.g. Licensed in OR/WA — focused on the Portland metro",contentRole:"local"},{id:"company_role",label:"Company and your role",type:"text",placeholder:"e.g. Senior Loan Officer at Cascade Home Lending, NMLS #482910",contentRole:"calibration"},{id:"license_and_tenure",label:"Years originating loans",type:"number",placeholder:"e.g. 9",contentRole:"calibration"},{id:"borrower_situations_served",label:"Who you do your best work for",type:"multi_select",options:["First-time buyers","Move-up buyers","Refinance","Investment property","Self-employed borrowers","Jumbo / luxury","Relocation","First-generation homebuyers"],contentRole:"calibration",helpText:"Describe borrower situations and loan scenarios — never protected-class groups. The Equal Credit Opportunity Act (ECOA) and Fair Housing Act prohibit marketing that could be read as targeting or excluding applicants based on race, color, religion, national origin, sex, marital status, age, or public-assistance income.",complianceNote:"ECOA / Regulation B and Fair Housing Act: generated content from this field must reference borrower situations and loan scenarios only, never demographic or protected-class identities, and must never suggest an area or applicant type is a better or worse credit risk based on demographics (no redlining-adjacent framing).",subFields:[{id:"borrower_situations_detail",label:"What loan scenario do you place most, and for what kind of borrower?",placeholder:"e.g. Self-employed borrowers who got declined elsewhere because a bank couldn't read their tax returns correctly.",required:!0}]},{id:"signature_process",label:"Any signature process, guarantee, or promise you make borrowers?",type:"text",contentRole:"proof",placeholderPool:["e.g. My Clear-to-Close Guarantee — I give you a written closing-cost estimate on day one and it doesn't move without a call explaining why. (only if you actually offer this)","e.g. Pre-approval letters in 24 hours, not a week. (only if you actually offer this)","e.g. I personally underwrite-check every file before it goes to processing, so surprises get caught early, not at the closing table. (only if you actually offer this)"]},{id:"prior_career_background",label:"Career or background before mortgage lending, if relevant",type:"text",placeholder:"e.g. Former bank underwriter — I know exactly what gets a file declined before it happens.",contentRole:"story"},{id:"headshot",label:"Headshot",type:"upload",required:!0,contentRole:"media"},{id:"company_logo",label:"Company or brokerage logo",type:"upload",skippable:!0,skipWarning:"Without a logo, branded content falls back to a generic template look.",contentRole:"media"}],yze=[{id:"mtg_t2_local_lending_knowledge",tier:2,prompt:"What do you know about financing in your market that a call-center loan officer at a big bank never would?",contentRole:"local",examples:["I know which local condo developments are on Fannie Mae's ineligible list right now, which kills a loan before it starts if nobody checks first.","I know which county's property tax reassessment timing catches buyers off guard on their first escrow analysis, so I build a cushion in from day one.","I know which local credit unions and portfolio lenders will still do a manual underwrite on a self-employed borrower a big bank's algorithm would auto-decline."]},{id:"mtg_t2_client_transformation",tier:2,prompt:"Describe a borrower transformation — a before-and-after in their loan situation, not their identity — that you're proud of.",contentRole:"story",complianceNote:"Describe the loan/underwriting situation (declined elsewhere, self-employed income structuring, credit repair timeline), never demographic identity, per ECOA/Fair Housing.",examples:["A self-employed borrower had been declined twice elsewhere because the loan officers didn't know how to read two years of Schedule C income correctly. I restructured the file and got them approved in three weeks.","A borrower's credit score was 12 points under our program minimum. We mapped a 90-day plan to specific accounts, and they closed on their home right on the revised timeline.","A move-up buyer needed their current home's sale to fund the down payment on the next one. I structured a bridge scenario so they didn't have to sell first and rent in between."]},{id:"mtg_t2_who_you_wont_work_with",tier:2,prompt:"Who do you deliberately not work with, and why?",contentRole:"voice",complianceNote:"Refuse-and-flag: exclusion criteria drawn from this answer must be transactional/behavioral (e.g. 'not ready to provide documentation', 'shopping rate without intent to close'). Refuse to draft or publish any exclusion criteria referencing a protected class, national origin, or income source protected under ECOA, and surface a warning instead.",examples:["I won't quote a rate to someone who isn't seriously shopping — I'll tell them honestly that a real quote needs a real application, not a five-minute phone guess.","I don't work with buyers who want me to 'find a way around' providing documentation the file actually needs. That's how loans get denied at the worst possible moment.","I turn away anyone asking me to inflate income on an application. I'll help someone find the right loan program instead — never help them misrepresent a file."]},{id:"mtg_t2_loan_process",tier:2,prompt:"Walk through your loan process from application to closing — what actually happens, in order?",contentRole:"process",examples:["We start with a real pre-approval based on verified documents, not a soft-pull estimate. Then rate lock strategy, processing, underwriting conditions cleared proactively, and a closing disclosure review call before anything is signed.","Application, document collection with a checklist up front so nothing trickles in over three weeks, submission to underwriting, conditional approval, conditions cleared, clear-to-close, and a walkthrough of the closing disclosure before the closing table.","I run every file through a pre-underwrite check before it's submitted, so the conditions that come back are ones I already expected — not surprises three days before closing."]},{id:"mtg_t2_market_myths",tier:2,prompt:"What's the one thing borrowers get wrong about rates or financing right now?",contentRole:"myth-bust",complianceNote:"Local/program-eligibility framing only (e.g. 'this program still exists in my market') — never a future-rate guarantee, prediction, or promise of a specific rate outcome.",examples:["Borrowers assume the rate advertised online is the rate they'll get. It's a best-case scenario for a specific credit profile and loan amount — mine is usually different once we run real numbers.","People think they need 20% down to buy. Most of my first-time buyers close with 3-5% down using programs they didn't know still existed.","Buyers assume waiting for rates to drop is free. What they don't factor in is the price appreciation and competition they're likely to face if they wait."]}],vze={t3_common_objection:"Regulated (Reg Z / TILA): objection-handling content must stay general and informational — never present a specific rate, payment, or approval outcome as a personalized quote or commitment tied to this content."},bze={t3_quality_signal:["Whether the loan officer pre-underwrites a file before submitting it — that's the difference between a smooth 21-day close and a scramble three days before closing.","Whether they explain the closing disclosure line by line before you sign, instead of just pointing at the signature line.","Whether the rate lock strategy is explained in plain terms, not just quoted as a number with no context for how long it holds or what it costs to extend."],t3_highest_value_situation:["A self-employed borrower whose income a big bank's algorithm can't read correctly — manually structuring that file is where real expertise shows up.","A borrower who's been declined elsewhere and has stopped believing they can qualify — walking them through exactly why and fixing it is 
4449where the real value is.","A move-up buyer who needs their current home's equity to fund the next purchase — structuring the timing so they're not stuck renting in between."],t3_common_objection:["'I can just go with my bank.' I explain that a bank only offers its own loan programs — I can shop multiple lenders to find the actual best fit for their file.","'Why not just use an online lender for a lower rate?' I show them what's missing — a real person available when underwriting has a question three days before closing.","'Mortgage rates are too high right now.' I break down the actual monthly-payment math against their specific scenario instead of letting the headline rate decide for them."],t3_structural_proof:["I show my actual average days-to-close and my clear-to-close accuracy rate — structural numbers, not a client quote.","I point to my specific process documents — document checklist, pre-underwrite review, closing disclosure walkthrough — so a prospect can see there's a system, not improvisation.","I show my NMLS number, years originating, and loan volume in this specific market, not a general lending credential."],t3_counterintuitive_belief:["The lowest advertised rate isn't always the best deal once you factor in points and closing costs — I've seen a 'higher' rate save a borrower more money over the time they'll actually hold the loan.","Getting pre-approved too early can backfire if your file changes materially before you're ready to buy — I time it to when it actually protects you.","Paying down the mortgage faster right after closing isn't always the best move for every borrower — sometimes the numbers say invest that money instead."],t4_category_statement:["The self-employed-borrower specialist for people a big bank's algorithm can't read correctly.","The loan officer for buyers who've been declined before and don't want it to happen again.","The relocation lending specialist for buyers financing a home in a state they haven't moved to yet."],t4_industry_myth:["That every lender offers the same rate for the same file. Pricing genuinely varies lender to lender, and shopping it is worth real money.","That a pre-approval guarantees a closing. A pre-approval is a starting point — the file still has to survive underwriting conditions.","That the loan officer's job ends at the rate quote. Most of the real value is in what happens between application and closing."],t4_referral_description:["'If your income is complicated, call them — they know how to structure a file a big bank can't read.'","'They'll actually explain the numbers instead of just quoting a rate.'","'If you got declined somewhere else, they're the one to call before giving up.'"],t4_competitor_disagreement:["That you should always chase the single lowest advertised rate — I believe that ignores points, credits, and the borrower's actual timeline, which often costs more in the end.","That pre-approving a borrower with a soft credit estimate is fine early on — I think that sets false expectations that can fall apart once real documents come in.","That every borrower should be steered to the same loan program regardless of situation — I believe the program should fit the borrower's actual file, not the lender's easiest path."],t4_five_year_difference:["They're in a mortgage that actually fit their situation at the time, not just the one with the lowest advertised rate that ignored their real plans.","They know exactly who to call for a refinance or their next purchase, instead of starting over with a stranger or a call center.","They avoided a rate-lock or program surprise that would've come from skipping a real pre-underwrite, because we caught it before it became a problem."]},xze=[{id:"fair_lending",rule:"Reference borrower situations and loan scenarios only, never demographic or protected-class identities. No area description may code for demographics or credit-risk assumptions about who lives there (no redlining-adjacent framing)."},{id:"refuse_and_flag_exclusions",rule:"Exclusion criteria drawn from who_you_wont_work_with must be transactional or behavioral (e.g. 'not ready with documentation', 'asking to misstate income'). Refuse to draft or publish any exclusion criteria that reference a protected class or a protected income source under ECOA, and surface a warning instead of silently dropping it."},{id:"no_rate_guarantees",rule:"Never state or imply a guaranteed future rate, a rate prediction, or a guaranteed approval outcome. Rate and program content must be framed as informational, not a personalized quote or commitment."}],wze={vertical:pze,_contentReviewed:mze,tier1:gze,tier2:yze,sharedComplianceNotes:vze,sharedExamples:bze,generationRules:xze},_ze="property_manager",kze=!0,jze=[{id:"service_area",label:"Your primary market — city and the specific areas you manage properties in",type:"text",required:!0,placeholder:"e.g. Tampa, FL — Westshore and South Tampa",contentRole:"local"},{id:"company_role",label:"Company and your role",type:"text",placeholder:"e.g. Owner/broker at Bayview Property Management",contentRole:"calibration"},{id:"portfolio_size",label:"Units currently under management",type:"number",placeholder:"e.g. 140",contentRole:"calibration"},{id:"owner_and_property_situations",label:"Who you do your best work for",type:"multi_select",options:["Single-family rentals","Multi-family / apartments","HOA / condo communities","Short-term rental portfolios","Out-of-state / absentee owners","Owners who self-managed before","Student housing"],contentRole:"calibration",helpText:"Describe owner and property situations — never describe tenant qualifications in a way that could be read as excluding people. Fair Housing law prohibits screening criteria or marketing that targets or excludes applicants based on race, religion, familial status, disability, national origin, or other protected classes.",complianceNote:"Fair Housing Act: content generated from this field describes property portfolios and owner relationships only. Any content touching tenant qualification or screening must reference objective, uniformly-applied criteria (income, credit, rental history) and never demographic or protected-class identities.",subFields:[{id:"owner_and_property_situations_detail",label:"What kind of owner or property is your sweet spot?",placeholder:"e.g. Out-of-state owners with 3-10 single-family rentals who are tired of managing maintenance calls themselves.",required:!0}]},{id:"signature_process",label:"Any signature process, guarantee, or promise you make owners?",type:"text",contentRole:"proof",placeholderPool:["e.g. My 21-Day Vacancy Guarantee — if your unit isn't leased in 21 days, I waive that month's management fee. (only if you actually offer this)","e.g. Every maintenance request gets a vendor dispatched within 24 hours, tracked in a portal the owner can see in real time. 
4449(only if you actually offer this)","e.g. I screen every applicant against the same written criteria, every time, with the decision documented. (only if you actually offer this)"]},{id:"prior_career_background",label:"Career or background before property management, if relevant",type:"text",placeholder:"e.g. Former landlord managing my own rentals — I built this business to fix problems I ran into myself.",contentRole:"story"},{id:"headshot",label:"Headshot",type:"upload",required:!0,contentRole:"media"},{id:"property_photos",label:"A few photos of properties you manage",type:"upload",skippable:!0,skipWarning:"Without real property photos, content falls back to generic stock-style visuals.",contentRole:"media"}],Sze=[{id:"pm_t2_local_market_knowledge",tier:2,prompt:"What do you know about your rental market that an out-of-state owner usually finds out the hard way?",contentRole:"local",examples:["I know which zip codes in my market have rent-control-adjacent ordinances that change what an owner can legally raise rent by year over year.","I know which local vendors actually show up on time for maintenance calls versus which ones no-show — that list took years to build and it's the difference between a happy tenant and a vacancy.","I know which neighborhoods lease up in under a week right now and which ones sit for 45+ days, which changes how I price a new listing before it ever hits the market."]},{id:"pm_t2_owner_transformation",tier:2,prompt:"Describe an owner transformation — a before-and-after in their situation, not their identity — that you're proud of.",contentRole:"story",complianceNote:"Describe the property/ownership situation (self-managed before, out-of-state, chronic vacancy), never demographic identity, per Fair Housing.",examples:["An out-of-state owner had a property sit vacant for four months because their previous manager never returned calls. We leased it in 18 days and now send a monthly report without them having to ask.","A self-managing owner was fielding 2am maintenance calls himself and burning out. Within a month of onboarding, that stopped entirely — a vendor network handles it and he gets a summary, not a phone call.","An owner had the same tenant skip two months of rent with no clear process to follow. We implemented a documented screening and collections process, and it hasn't happened again since."]},{id:"pm_t2_who_you_wont_work_with",tier:2,prompt:"Who do you deliberately not work with, and why?",contentRole:"voice",complianceNote:"Refuse-and-flag: exclusion criteria drawn from this answer must be transactional/behavioral (e.g. 'owner wants to skip required disclosures', 'wants screening criteria applied inconsistently'). Refuse to draft or publish any exclusion criteria referencing a protected tenant class, and surface a warning instead — see the refuse_and_flag_screening generation rule.",examples:["I won't take on an owner who wants me to apply screening criteria differently case by case — I use the same written standard for every applicant, no exceptions, and I say that upfront.","I don't work with owners who want to skip legally required disclosures to save time. That's not a risk I'll help someone take.","I turn down properties that wouldn't pass a basic habitability check. I'm not going to lease something I wouldn't rent to my own family."]},{id:"pm_t2_leasing_process",tier:2,prompt:"Walk through your leasing and maintenance process — what actually happens, in order?",contentRole:"process",examples:["Listing goes live with professional photos, we run applications against the same written screening criteria for every applicant, and a signed lease closes the loop — all tracked in an owner portal.","Maintenance requests come in through the portal, get triaged same-day, and a vetted vendor is dispatched within 24 hours with photos logged before and after.","Every lease renewal gets a market-rent review 60 days out, so an owner never finds out they've been underpriced a year after the fact."]},{id:"pm_t2_market_myths",tier:2,prompt:"What's the one thing owners get wrong about managing a rental in your market r
4449ight now?",contentRole:"myth-bust",complianceNote:"Local data framing only (e.g. 'vacancy time is up in my area right now') — never a guaranteed rent or occupancy outcome.",examples:["Owners think self-managing saves the management fee. What it usually costs them is weeks of vacancy from slower turnaround and maintenance issues that get worse because nobody responded fast enough.","Owners assume any tenant is better than a vacant unit. A bad tenant placed quickly often costs more in damage and turnover than the extra two weeks it takes to screen properly.","Owners think raising rent every renewal maximizes income. In my market, losing a good tenant over a small increase and re-leasing usually costs more than the increase would've earned."]}],Nze={t3_quality_signal:["Whether maintenance requests get a same-day response or sit for a week — that's what determines whether a tenant renews or leaves.","Whether the screening process is documented and applied consistently, or improvised applicant by applicant.","Whether an owner gets proactive reporting or has to call and ask what's happening with their property."],t3_highest_value_situation:["An out-of-state owner who has no visibility into their property and no local relationships — building that trust from a distance is where the real value shows up.","An owner whose previous manager let a property sit vacant too long — turning that around quickly changes their whole opinion of the business.","A self-managing owner who's burning out on 2am maintenance calls — taking that off their plate completely is where I earn my keep."],t3_common_objection:["'I can just manage it myself and save the fee.' I show them the real cost of a bad tenant placement or extended vacancy against what the fee actually covers.","'Why do I need a manager when I can list it myself online?' I show them what's missing — consistent screening, maintenance coordination, and legal compliance they'd otherwise handle alone.","'Property management fees are too high.' I break down exactly what's covered — screening, maintenance coordination, compliance, reporting — line by line."],t3_structural_proof:["I show my actual average days-to-lease and current portfolio occupancy rate — structural numbers, not a client quote.","I point to my specific process documents — screening criteria, maintenance SLA, lease renewal timeline — so a prospect can see there's a system, not improvisation.","I show my years managing properties and current unit count in this specific market, not a general management credential."],t3_counterintuitive_belief:["The cheapest management fee isn't the best deal — I've seen owners lose more to slow turnaround and poor screening than they ever saved on a lower percentage fee.","Raising rent to the absolute market ceiling at every renewal often costs more than it earns, once you factor in the turnover it causes.","A vacant unit for two extra weeks of proper screening usually beats a fast-but-bad tenant placement that costs months of turnover and repairs later."],t4_category_statement:["The out-of-state owner specialist for landlords who need someone they can trust without being able to drive by the property.","The property manager for owners who are done taking 2am maintenance calls themselves.","The single-family rental specialist for owners with a handful of properties who've outgrown managing them solo."],t4_industry_myth:["That every property manager adds the same value for the fee. The difference usually shows up in maintenance response time and screening consistency, not in the listing itself.","That raising rent every renewal maximizes owner income. In most markets it just increases turnover, which costs more than the increase earns.","That the manager's job is just collecting rent. Most of the real value is in screening, maintenance coordination, and staying ahead of compliance."],t4_referral_description:["'If you're managing from out of state, call them — they treat your property like it's their own.'","'They actually respond to maintenance requests the same day, not next week.'","'If you're burned out self-managing, they're the one who takes it off your plate completely.'"],t4_competitor_disagreement:["That the cheapest management fee is always the best deal for an owner — I believe that ignores what a slow or inconsistent manager actually costs in vacancy and turnover.","That pushing rent to the absolute ceiling every renewal is good business — I think it trades short-term income for long-term turnover costs.","That screening criteria should flex case by case for a 'good feeling' about an applicant — I believe consistent, documented criteria protect both the owner and the tenant."],t4_five_year_difference:["They have a portfolio that's actually generating stable income instead of the vacancy and turnover cycle they were stuck in before.","They know exactly who to call about a property issue instead of scrambling to find a vendor themselves.","They avoided a costly bad-tenant placement because the screening process caught red flags a rushed decision would have missed."]},Cze=[{id:"fair_housing",rule:"Reference owner relationships and property situations only, never demographic tenant identities. Any content touching tenant qualification must reference objective, uniformly-applied criteria (income, credit, rental history) — never a protected class."},{id:"refuse_and_flag_screening",rule:"Exclusion or screening criteria drawn from who_you_wont_work_with must be transactional or behavioral (e.g. 'owner wants inconsistent screening applied', 'property fails a habitability check'). Refuse to draft or publish any criteria that reference a protected tenant class, and surface a warning instead of silently dropping it."}],Pze={vertical:_ze,_contentReviewed:kze,tier1:jze,tier2:Sze,sharedExamples:Nze,generationRules:Cze},Tze="host",Aze=!0,Eze=[{id:"service_area",label:"Where your listing(s) are located",type:"text",required:!0,placeholder:"e.g. Sedona, AZ — Uptown and West Sedona",contentRole:"local"},{id:"host_role",label:"How you operate — solo host or a management setup",type:"text",placeholder:"e.g. Independent host, self-managed, 3 properties",contentRole:"calibration"},{id:"years_hosting",label:"Years hosting",type:"number",placeholder:"e.g. 5",contentRole:"calibration"},{id:"property_and_guest_situations",label:"What your stays are best suited for",type:"multi_select",options:["Couples getaways","Families with kids","Multi-family / large groups","Pet-friendly stays","Extended / monthly stays","Business travelers","Unique or boutique stays"],contentRole:"calibration",helpText:"Describe stay types and trip purposes — avoid language that could be read as steering or excluding specific groups of guests. Most booking platforms' nondiscrimination policies (and, in many jurisdictions, public-accommodation law) prohibit turning away or deprioritizing guests based on protected characteristics.",subFields:[{id:"property_and_guest_situations_detail",label:"What kind of trip does your property fit best?",placeholder:"e.g. A quiet couples getaway within walking distance of downtown, away from the bar-crawl strip.",required:!0}]},{id:"signature_process",label:"Any signature touch, guarantee, or promise you make guests?",type:"text",contentRole:"proof",placeholderPool:["e.g. A guidebook with my actual favorite local spots, not a generic tourist list, left in every stay. (only if you actually offer this)","e.g. I respond to every guest message within 15 minutes, day or night. (only if you actually offer this)","e.g. Hotel-grade linens and a professional deep clean between every single stay, no exceptions. (only if you actually offer this)"]},{id:"prior_career_background",label:"Career or background before hosting, if relevant",type:"text",placeholder:"e.g. Former hotel GM — I run this place with the same standards I used to run a 200-room property.",contentRole:"story"}
4449,{id:"headshot",label:"Headshot",type:"upload",required:!0,contentRole:"media"},{id:"property_photos",label:"A few of your best listing photos",type:"upload",skippable:!0,skipWarning:"You'll underperform without these — real photos are what make positioning content actually land.",contentRole:"media"}],Oze=[{id:"host_t2_local_knowledge",tier:2,prompt:"What do you know about your area that a guest would never find in a generic travel guide?",contentRole:"local",examples:["I know which trailhead parking lot fills up by 7am on weekends and which one two miles down the road never does, so my guests actually get on the trail instead of circling for parking.","I know which restaurant in town takes walk-ins on a Friday night and which one needs a reservation three days out — I put that in every guidebook I leave.","I know which week of the year the town gets flooded with a festival crowd and prices spike, so I can tell repeat guests when to book to avoid it."]},{id:"host_t2_guest_story",tier:2,prompt:"Describe a guest experience — a before-and-after in their trip, not their identity — that you're proud of.",contentRole:"story",examples:["A family's flight got delayed and they arrived at 1am exhausted with two young kids. I'd left a late-checkin note with everything pre-set, and they told me it was the smoothest arrival of their whole trip.","A guest showed up during a rare cold snap with no idea the heater needed a specific setting. I walked them through it by video call in under ten minutes instead of leaving them to figure it out.","A couple came for their anniversary and mentioned it in a pre-arrival message. A small welcome note and a local recommendation turned a good stay into a five-star review and a repeat booking the next year."]},{id:"host_t2_what_you_wont_accept",tier:2,prompt:"What kind of booking do you deliberately turn down, and why?",contentRole:"voice",complianceNote:"Refuse-and-flag: exclusion criteria drawn from this answer must be behavioral (e.g. 'booking pattern matches a party-house risk profile', 'guest requests exceed max occupancy'). Refuse to draft or publish any exclusion criteria that reference a protected guest characteristic, consistent with platform nondiscrimination policies, and surface a warning instead.",examples:["I decline same-night, last-minute bookings with no guest history and a message pattern that matches typical party-house red flags. It's not worth the risk to the property or the neighbors.","I won't accept a booking where the guest count clearly exceeds what's listed. I'll tell them directly instead of pretending not to notice.","I turn down requests to skip the security deposit or house-rules agreement. It protects the next guest as much as it protects me."]},{id:"host_t2_guest_process",tier:2,prompt:"Walk through the guest experience from booking to checkout — what actually happens, in order?",contentRole:"process",examples:["Booking confirmation with a welcome message, a pre-arrival check-in guide sent 48 hours out, self-checkin with a coded lock, a mid-stay check-in message, and a checkout reminder with clear instructions — every step automated but personal.","I message every guest personally within an hour of booking, send a custom guidebook two days before arrival, and follow up the morning after checkin to make sure everything's working.","Turnover between guests follows the same checklist every time — deep clean, restock, a walkthrough photo log — so quality never depends on who's cleaning that day."]},{id:"host_t2_market_myths",tier:2,prompt:"What's the one thing new hosts (or guests) get wrong about your market right now?",contentRole:"myth-bust",complianceNote:"Local, factual framing only (e.g. 'permitting rules in my area changed this year') — never a guaranteed booking-income or occupancy claim.",examples:["New hosts assume more amenities always mean a better listing. In my market, guests care far more about a fast, honest response and a spotless clean than a hot tub they'll use once.","Guests assume every listing in town is interchangeable. Location within a five-minute walk of downtown versus a fifteen-minute drive changes the entire trip.","Hosts think pricing low fills the calendar fastest. In my market, underpricing often just attracts guests who treat the property w
4449orse, without actually increasing bookings."]}],Rze={t3_quality_signal:["Whether the host responds to a message within minutes or within a day — that's the first thing a guest notices, before they've even arrived.","Whether the listing photos show the space honestly or oversell it — a guest who feels misled leaves it in the review.","Whether checkin instructions are clear enough that a tired guest at 11pm can follow them without calling."],t3_highest_value_situation:["A guest arriving late and exhausted after travel delays — a smooth, pre-planned checkin is where hospitality actually shows up.","A first-time visitor to the area who has no idea where to go — real local recommendations turn a stay into a trip they'll talk about.","A guest dealing with an unexpected issue mid-stay — how fast and calmly I respond is what determines the review, not whether something went wrong at all."],t3_common_objection:["'I can just book a hotel.' I point to what a hotel room can't offer — more space, a kitchen, and a place that actually feels like the neighborhood.","'Why pay more for a private rental over a cheaper one nearby?' I show what's actually different — response time, cleanliness standard, and honest photos.","'Short-term rentals are a hassle compared to a hotel.' I walk through exactly how self-checkin and pre-arrival messaging remove that friction."],t3_structural_proof:["I show my actual review average and response-time stats — structural numbers, not a single glowing quote.","I point to my specific process — pre-arrival guide, checkin instructions, turnover checklist — so a prospect can see there's a system behind the experience.","I show my years hosting and repeat-guest rate in this specific market, not a general hospitality claim."],t3_counterintuitive_belief:["More amenities don't always mean a better stay — I've seen a spotless, well-located basic listing outscore an amenity-loaded one with a slower host.","The cheapest nightly rate doesn't fill a calendar fastest — underpricing often attracts guests who treat a property worse, without actually increasing bookings.","A same-day response to a small issue does more for a review than avoiding the issue ever happening — guests remember how you handled it."],t4_category_statement:["The go-to host for travelers who want a place that actually feels like the neighborhood, not a hotel room with a kitchenette.","The listing for families who need real space and real local recommendations, not another cookie-cutter rental.","The reliable stay for guests who've been burned by a slow-to-respond host before."],t4_industry_myth:["That every listing in the same area is basically interchangeable. Response time and honesty in photos make a bigger difference than most guests realize going in.","That more amenities always win. A spotless, well-located, well-run basic listing regularly outperforms an amenity-loaded one with a slow host.","That the host's job ends at checkin. Most of what earns a five-star review happens in how issues get handled mid-stay."],t4_referral_description:["'If you want a place that actually feels local, book there — the host knows the area better than any guidebook.'","'They respond within minutes, not days — that alone is worth it.'","'If something goes wrong, they'll handle it before you even have to ask twice.'"],t4_competitor_disagreement:["That listing at the lowest nightly rate in the area is the best strategy — I believe it often attracts guests who treat the property w
4449orse without meaningfully increasing bookings.","That more amenities always justify a higher price — I think guests care far more about honesty and responsiveness than an extra gadget they'll use once.","That automating every guest message is the way to scale — I believe a personal touch at the right moments is what actually earns repeat bookings and reviews."],t4_five_year_difference:["They have a place in their trip-planning rotation they actually trust, instead of gambling on an unfamiliar listing every time they travel back.","They know exactly who to message the moment something comes up mid-stay, instead of waiting on a faceless support queue.","They avoided a bad trip experience because a small issue got caught and fixed before it ever became a problem worth complaining about."]},Ize=[{id:"guest_nondiscrimination",rule:"Reference stay types, trip purposes, and behavioral booking patterns only, never protected guest characteristics. Content must never suggest a guest type is steered toward or away from a listing based on a protected class, consistent with booking-platform nondiscrimination policies."}],Mze={vertical:Tze,_contentReviewed:Aze,tier1:Eze,tier2:Oze,sharedExamples:Rze,generationRules:Ize},Dze="restaurantpro",$ze=!0,Lze=[{id:"service_area",label:"Where your restaurant is located",type:"text",required:!0,placeholder:"e.g. Asheville, NC — West Asheville",contentRole:"local"},{id:"establishment_role",label:"Restaurant name and your role",type:"text",placeholder:"e.g. Chef/owner at Copperline Kitchen",contentRole:"calibration"},{id:"years_open",label:"Years open",type:"number",placeholder:"e.g. 6",contentRole:"calibration"},{id:"cuisine_and_guest_situations",label:"What you're best known for",type:"multi_select",options:["Fine dining","Casual / family dining","Fast-casual","Bar / nightlife","Catering / private events","Food truck / pop-up","Bakery / cafe"],contentRole:"calibration",helpText:"Describe your cuisine and the kind of visit you're built for — service must be offered to every guest regardless of protected characteristics.",subFields:[{id:"cuisine_and_guest_situations_detail",label:"What's the occasion or crowd you're the go-to spot for?",placeholder:"e.g. A first-date-worthy dinner spot without the stuffy fine-dining price tag.",required:!0}]},{id:"signature_process",label:"Any signature process, guarantee, or promise you make guests?",type:"text",contentRole:"proof",placeholderPool:["e.g. Every ingredient on the menu is sourced from a farm within 100 miles, and I can name which one. (only if you actually offer this)","e.g. Every dish is tasted by me personally before it leaves the kitchen. (only if you actually offer this)","e.g. We remake any dish that isn't right, no questions asked. (only if you actually offer this)"]},{id:"prior_career_background",label:"Career or background before opening this restaurant, if relevant",type:"text",placeholder:"e.g. Trained under a Michelin-starred chef in Chicago before coming home to open my own place.",contentRole:"story"},{id:"headshot",label:"Headshot",type:"upload",required:!0,contentRole:"media"},{id:"food_photos",label:"A few of your best dish or restaurant photos",type:"upload",skippable:!0,skipWarning:"You'll underperform without these — real photos of real food are what make positioning content actually land.",contentRole:"media"}],Fze=[{id:"rest_t2_local_knowledge",tier:2,prompt:"What do you know about dining in your area that a review site would never tell a guest?",contentRole:"local",examples:["I know which farms actually have the best produce in a given week, so what's on the menu changes based on what's genuinely good right now, not a fixed printed menu.","I know which night of the week the town's slowest for reservations, so I tell regulars when they'll get the best table and the most attention from the kitchen.","I know which local supplier has the best catch on a given morning, which is why the fish special changes daily instead of being the same thing every night."]},{id:"rest_t2_guest_story",tier:2,prompt:"Describe a guest experience — a before-and-after in their visit, not their identity — that you're proud of.",contentRole:"story",examples:["A couple came in for their first date and were clearly nervous about the bill. We quietly comped their dessert, and they've been regulars celebrating every anniversary here since.","A guest with a severe food allergy was nervous to even order. The kitchen walked through every ingredient with them personally, and they've told us since it's the only restaurant they trust to eat out at.","A table's order came out wrong during a busy Friday rush. We remade it immediately and comped the course — they left a five-star review calling out exactly how it was handled, not that it happened at all."]},{id:"rest_t2_standards_you_wont_compromise",tier:2,prompt:"What's a standard you refuse to compromise on, even when it costs you time or money?",contentRole:"voice",complianceNote:"Content describing standards must stay behavioral/operational (sourcing, freshness, consistency) and never reference refusing service to a guest based on a protected characteristic — service must be offered to every guest consistent with public-accommodation law.",examples:["I won't hold a dish under a heat lamp waiting on a table to be ready. If it means a 
4449slightly longer wait, that's the trade I make every time.","I don't cut corners on sourcing to hit a lower food cost target. If the quality drops, the dish comes off the menu instead.","I refuse to send out a plate I wouldn't personally eat. If it's not right, it gets remade, even during the busiest rush of the night."]},{id:"rest_t2_kitchen_process",tier:2,prompt:"Walk through what happens from sourcing to a plate hitting the table — what actually goes into it?",contentRole:"process",examples:["Sourcing starts with a call to three local farms every Monday, the menu adjusts around what's actually good that week, and every dish is tasted before it leaves the pass.","Every ticket gets checked against the allergy notes on file before it fires, so nothing gets to a table that wasn't verified against what the guest told us.","Prep starts at 6am from scratch — stocks, sauces, bread — nothing pre-made shipped in, which is why the menu changes seasonally instead of staying static year-round."]},{id:"rest_t2_market_myths",tier:2,prompt:"What's the one thing guests get wrong about eating out in your area right now?",contentRole:"myth-bust",complianceNote:"Avoid unverified health, allergen-free, or nutrition claims — describe sourcing and process facts only, never a guarantee about a dish's safety for a medical condition.",examples:["Guests assume a full restaurant means a long wait for a table. In my spot, a full dining room usually means the fastest ticket times, because the kitchen's in rhythm.","People think 'farm to table' is just marketing language everywhere now. In my case it's a literal weekly call to three named farms — I can tell you exactly whose produce is on your plate.","Guests assume asking about an allergy will annoy the kitchen. It's the opposite — every ticket gets checked against allergy notes before it fires, and we'd rather know."]}],Bze={t3_quality_signal:["Whether the kitchen tastes every dish before it goes out, or trusts the recipe to be right every time without checking.","Whether the sourcing is specific enough that the chef can name the farm, not just say 'local' as a marketing word.","Whether a mistake gets remade immediately without an argument, or the guest has to push to get it fixed."],t3_highest_value_situation:["A guest with a food allergy who's nervous to even order — walking them through every ingredient personally is where trust actually gets built.","A couple celebrating a big occasion who want the night to feel special without a stuffy price tag — that's where the extra touch matters most.","A table whose order came out wrong during a packed rush — how fast and how well that gets fixed is what they'll remember, not that it happened."],t3_common_objection:["'I can just get similar food somewhere cheaper.' I explain exactly what the sourcing and from-scratch prep actually costs to do right, and why it shows up on the plate.","'Why should I wait for a table when other places seat immediately?' I explain the wait usually means the kitchen's actually keeping pace with quality, not falling behind.","'Restaurant prices feel too high right now.' I break down what's actually gone into the dish — sourcing, prep time, from-scratch components — line by line."],t3_structural_proof:["I name the specific farms and suppliers I source from, not a vague 'locally sourced' claim.","I point to my actual from-scratch prep process — stocks, sauces, bread made daily — so a guest can see there's a real system, not shortcuts.","I show my years open and repeat-guest rate in this specific market, not a general culinary credential."],t3_counterintuitive_belief:["A full dining room doesn't mean a slow night — a kitchen in rhythm often turns tickets faster when it's busy than when it's slow and out of pace.","The cheapest ingredient isn't always the best food-cost decision — a slightly pricier cut that yields better and wastes less can actually cost less per plate.","A guest who asks a lot of questions about the menu usually becomes the most loyal regular, not the hardest table to please."],t4_category_statement:["The go-to spot for a first date that feels special without the stuffy fine-dining price tag.","The restaurant for guests with food allergies who want a kitchen that actually takes it seriously.","The neighborhood spot for a menu that changes with what's actually good that week, not a static printed one."],t4_industry_myth:["That 'farm to table' is mostly marketing language now. Where it's real, a chef can name the specific farm — that's the difference.","That a full dining room means a 
4449slow night for guests. A kitchen in rhythm often turns tickets faster busy than slow.","That the chef's job ends when the dish leaves the pass. A lot of the real standard is in what happens if something comes back wrong."],t4_referral_description:["'If you've got a food allergy, go there — they actually take it seriously instead of just saying they do.'","'The menu changes because the ingredients are real, not because they're trying to seem trendy.'","'If something's ever wrong with your order, they fix it immediately, no argument.'"],t4_competitor_disagreement:["That cutting food cost by sourcing cheaper ingredients doesn't affect the guest experience — I believe it shows up on the plate every time, even when guests can't name exactly why.","That a packed dining room is always a good sign — I think it only matters if the kitchen can actually keep pace with quality while it's full.","That comping a mistake is the same as preventing one — I believe consistency in the kitchen matters more than how well you recover after something goes wrong."],t4_five_year_difference:["They have a go-to spot for special occasions instead of gambling on somewhere new every time.","They trust the kitchen enough to bring guests with food allergies without worrying about it.","They know exactly what a night here will feel like, because the consistency never slipped even as the menu evolved."]},Wze=[{id:"no_unverified_health_claims",rule:"Never state or imply an unverified health, allergen-free, or nutrition claim. Describe sourcing, freshness, and kitchen process facts only — never guarantee a dish's safety for a specific medical condition or allergy."},{id:"public_accommodation",rule:"Content describing service standards or who a restaurant is 'for' must stay behavioral/experiential (occasion type, party size, dining style) — never imply refusal of service to a guest based on a protected characteristic."}],qze={vertical:Dze,_contentReviewed:$ze,tier1:Lze,tier2:Fze,sharedExamples:Bze,generationRules:Wze},Uze="authoritypro",zze=!0,Hze=[{id:"service_area",label:"Where you're based and the market or industry you primarily serve",type:"text",required:!0,placeholder:"e.g. Based in Denver, serving mid-market SaaS founders nationally",contentRole:"local"},{id:"role_and_field",label:"Your role and field",type:"text",placeholder:"e.g. Founder & CEO, B2B software",contentRole:"calibration"},{id:"years_experience",label:"Years in your field",type:"number",placeholder:"e.g. 14",contentRole:"calibration"},{id:"audience_and_situations",label:"Who you're building authority in front of",type:"multi_select",options:["Executives / leaders","Small business owners","Peers in my industry","Early-career professionals","Clients I serve directly","General public / broad audience"],contentRole:"calibration",subFields:[{id:"audience_and_situations_detail",label:"What's the specific situation this audience is in when they'd benefit most from your perspective?",placeholder:"e.g. A founder past $1M ARR who's realizing their gut-instinct decisions no longer scale.",required:!0}]},{id:"signature_framework",label:"A framework, method, or principle you're personally known for (if you have one)",type:"text",contentRole:"proof",placeholderPool:["e.g. My 'decide once' rule — every recurring decision gets turned into a documented policy so it never gets re-litigated. (only if you actually apply this)","e.g. I run every major call through a written one-page memo before the meeting, not during it. (only if you actually apply this)","e.g. My rule that no feature ships without a named customer who asked for it first. (only if you actually apply this)"]},{id:"prior_career_background",label:"The background or turning point that shaped how you lead or work today",type:"text",placeholder:"e.g. I spent six years failing at a startup before this one — most of what I do differently now comes directly from that.",contentRole:"story"},{id:"headshot",label:"Headshot",type:"upload",required:!0,contentRole:"media"},{id:"brand_photos",label:"Logo or a few brand/team photos",type:"upload",skippable:!0,skipWarning:"Without these, branded content falls back to a generic template look.",contentRole:"media"}],Vze=[{id:"auth_t2_insider_knowledge",tier:2,prompt:"What do you know about your industry that most people outside it completely miss?",contentRole:"local",examples:["Most people think the hard part of scaling a company is the product. In practice it's almost always the org — the product usually breaks less often than the team structure around it.","Outsiders assume more meetings mean better alignment. In every company I've run, the opposite has been true — fewer, sharper decisions beat more discussion every time.","People assume a strong quarter means the business is healthy. I've learned to watch the leading indicators three months earlier, because a strong quarter can be the last good one before a real problem shows up."]},{id:"auth_t2_transformation",tier:2,prompt:"Describe a transformation — a before-and-after in a situation you led through, not anyone's identity — that you're proud of.",contentRole:"story",examples:["We had a decision-making bottleneck where every call ran through me personally. I rebuilt the decision framework so 90% of calls no longer need my sign-off, and the company moves faster than when I was involved in everything.","A team was repeating the same mistake quarter after quarter because nobody had ever written down what went wrong. Documenting it once ended a pattern that had cost real time and money for two years.","An early client almost walked away over a missed deadline. Instead of defending it, we rebuilt the delivery process from scratch with them in the room — they're still a client three years later."]},{id:"auth_t2_what_you_wont_do",tier:2,prompt:"What's a decision or shortcut you refuse to take, even when it would be easier?",contentRole:"voice",examples:["I won't hire fast just to fill a headcount gap. A wrong hire costs more in cleanup than the vacancy ever cost in lost output.","I don't ship something I'm not proud to put my name on, even under deadline pressure. That standard has cost time, but it's never cost trust.","I refuse to make a big decision alone in a room with no dissenting voice. If everyone agrees too easily, I assume we're missing something."]}
4449,{id:"auth_t2_how_you_work",tier:2,prompt:"Walk through how you actually approach a hard decision or problem — what happens, in order?",contentRole:"process",examples:["I write a one-page memo before any major decision — the problem, the options, my recommendation — and circulate it before the meeting so the discussion starts from a real position, not a blank page.","I look for the smallest version of the decision I can test before committing fully, then scale what actually worked instead of betting everything on a theory.","I deliberately seek out the person most likely to disagree with a plan before finalizing it, because the objection I hear in private is cheaper than the one I hear in public after it's already shipped."]},{id:"auth_t2_industry_myths",tier:2,prompt:"What's the one thing people in your position get wrong right now?",contentRole:"myth-bust",examples:["People think moving faster always means doing more at once. In my experience, moving faster almost always means doing less, better, in sequence.","People assume a leader's job is to have the answer. More often, it's to ask the question nobody else in the room is willing to ask.","People think growth solves internal problems. In my experience, growth just makes existing problems louder and more expensive."]}],Gze={t3_quality_signal:["Whether a decision comes with a written reason behind it, or just an instruction with no context for why.","Whether someone follows through on a hard call once it's been made, or quietly reverses it the moment it gets uncomfortable.","Whether feedback gets acted on visibly, or just gets acknowledged and forgotten."],t3_highest_value_situation:["A team stuck making the same decision over and over with no clear owner — building a real framework for it is where the biggest change happens.","A leader who's become the bottleneck for every decision in the company — helping them let go of that is where I see the fastest transformation.","A team that's lost trust after a broken promise — rebuilding that transparently, in public, is where credibility actually gets earned back."],t3_common_objection:["'We don't have time to slow down and document this.' I show them what re-solving the same problem three times a year actually costs versus documenting it once.","'This is just how we've always done it.' I ask what specifically would break if we changed it — usually, the honest answer is 'not much.'","'Our situation is different, this won't apply to us.' I ask them to try the smallest possible version of it before dismissing it outright."],t3_structural_proof:["I show the actual frameworks and decision documents I use — not a story about a result, the process itself.","I point to specific, repeatable systems I've built — decision memos, review cadences, escalation paths — so someone can see there's a method, not instinct alone.","I show my track record of specific situations I've led through, with the actual approach I used, not a vague claim of experience."],t3_counterintuitive_belief:["More meetings usually mean less alignment, not more — most of the clarity happens in the writing that should've come before the meeting.","The fastest way to move a team forward is often to do less, not more — cutting half the initiatives usually accelerates the other half.","Consensus before a decision is often a warning sign, not a good one — if nobody disagrees, it usually means someone didn't say what they were really thinking."],t4_category_statement:["The operator's perspective for leaders who are tired of advice that's never actually been tested under real pressure.","The clear-eyed voice for teams stuck repeating the same avoidable mistakes quarter after quarter.","The straight-talk resource for people who want the honest version of a decision, not the polished one."],t4_industry_myth:["That experience alone makes someone a good advisor. The value is in what they actually changed because of that experience, not just having lived through it.","That moving fast and doing everything at once is a strength. In practice it's usually a symptom of not knowing what to cut.","That leadership means always having the answer. Most of the real value is in asking the question nobody else in the room wants to ask."],t4_referral_description:["'If you want the honest version of what's actually going on, talk to them.'","'They'll tell you what you need to hear, not just what you want to hear.'","'If your team keeps repeating the same mistake, they've actually solved that exact problem before.'"],t4_competitor_disagreement:["That the busiest-looking leader is the most effective one — I believe visible busyness is often a sign of poor prioritization, not commitment.","That consensus is always the goal before a big decision — I think a decision made too comfortably often means something important went unsaid.","That scaling fast is inherently good — I believe it mostly just makes whatever's already broken louder and more expensive to fix."],t4_five_year_difference:["They've built a decision-making system that doesn't depend entirely on them being in the room.","They know exactly who to call when they hit the kind of hard problem that doesn't have an obvious playbook.","They avoided repeating a costly mistake because the pattern was named and fixed instead of quietly tolerated."]},Yze=[],Kze={vertical:Uze,_contentReviewed:zze,tier1:Hze,tier2:Vze,sharedExamples:Gze,generationRules:Yze},Xze="freelance_consultant",Qze=!0,Jze=[{id:"service_area",label:"Where you're based and who you serve — a geography, or the market you work in nationally/remotely",type:"text",required:!0,placeholder:"e.g. Based in Austin, serving clients remotely across the US",contentRole:"local"},{id:"role_and_specialty",label:"Your title and specialty",type:"text",placeholder:"e.g. Independent brand strategy consultant",contentRole:"calibration"},{id:"years_freelancing",label:"Years working independently",type:"number",placeholder:"e.g. 7",contentRole:"calibration"},{id:"client_situations_served",label:"Who you do your best work for",type:"multi_select",options:["Startups","Small businesses","Enterprise clients","Nonprofits","Solo entrepreneurs","Agencies (white-label work)"],contentRole:"calibration",subFields:[{id:"client_situations_detail",label:"What situation is a client usually in when they come to you?",placeholder:"e.g. A founder who knows their brand messaging isn't working but can't pin
4449point why.",required:!0}]},{id:"signature_process",label:"Any signature process, guarantee, or promise you make clients?",type:"text",contentRole:"proof",placeholderPool:["e.g. Every engagement starts with a written scope and a fixed price — no surprise hourly overruns. (only if you actually offer this)","e.g. I deliver a first draft within one week of kickoff, every time. (only if you actually offer this)","e.g. Unlimited revisions within the agreed scope until the client signs off. (only if you actually offer this)"]},{id:"prior_career_background",label:"What you did before going independent, if relevant",type:"text",placeholder:"e.g. Spent eight years in-house at agencies before going out on my own to work the way I actually believe in.",contentRole:"story"},{id:"headshot",label:"Headshot",type:"upload",required:!0,contentRole:"media"},{id:"work_samples",label:"A few work samples or portfolio pieces",type:"upload",skippable:!0,skipWarning:"You'll underperform without these — real work samples are what make positioning content actually land.",contentRole:"media"}],Zze=[{id:"fc_t2_niche_knowledge",tier:2,prompt:"What do you know about your specialty that most clients don't find out until they've already made a costly mistake?",contentRole:"local",examples:["Most founders think a rebrand is a design problem. Almost every time, the real problem is unclear messaging that a new logo won't fix.","Clients assume a bigger agency automatically means better work. I've seen small, senior-led teams consistently outperform larger ones on the exact deliverables that matter most.","People think the first draft should be perfect. The projects that actually succeed are the ones where the client trusts the revision process instead of panicking at draft one."]},{id:"fc_t2_client_transformation",tier:2,prompt:"Describe a client transformation — a before-and-after in their situation, not their identity — that you're proud of.",contentRole:"story",complianceNote:"Describe the engagement and process change, never a guaranteed revenue or performance outcome, since results depend on factors outside the consultant's control.",examples:["A founder had rewritten their pitch deck four times with no traction. We rebuilt the narrative from the ground up around a single clear problem, and it's the version they still use.","A small business had inconsistent messaging across every channel — website, social, sales deck all said something different. We built one core message and every asset now traces back to it.","A client came to me after a failed engagement with another consultant who delivered nothing usable. We started over with a tighter scope and a working prototype in week one instead of month three."]},{id:"fc_t2_who_you_wont_work_with",tier:2,prompt:"Who do you deliberately not work with, and why?",contentRole:"voice",examples:["I won't take a project with no clear decision-maker — I've learned that ambiguity kills a project faster than a tight budget ever does.","I don't work with clients who want to skip the discovery phase to save time. It always costs more later, and I say so upfront.","I turn down scope-creep-prone engagements where the ask keeps expanding without a conversation about the budget or timeline changing too."]},{id:"fc_t2_engagement_process",tier:2,prompt:"Walk through your engagement process from kickoff to delivery — what actually happens, in order?",contentRole:"process",examples:["We start with a discovery call and a written scope, then a first draft within a week, a structured revision round, and a final handoff with documentation so the client can maintain it themselves.","Kickoff, research and audit, a strategy presentation before any execution starts, then build, review, and delivery — each phase has its own sign-off so nothing moves forward on an assumption.","I send a project brief before we even talk pricing, so both sides agree on exactly what's being solved before a dollar figure enters the conversation."]},{id:"fc_t2_market_myths",tier:2,prompt:"What's the one thing clients get wrong about hiring an independent consultant versus an agency?",contentRole:"myth-bust",complianceNote:"Avoid framing that guarantees a specific business outcome or revenue result — describe process and engagement differences only.",examples:["Clients assume an independent consultant is riskier than an agency. In practice, they're often getting the agency's most senior person without the markup or the account-management layers in between.","People think a lower rate means lower quality. Often it just means lower overhead, not less experience.","Clients assume more people on a project means faster results. In my experience, a smaller, more senior team usually moves faster with fewer handoffs."]}],e7e={t3_quality_signal:["Whether the first draft addresses the actual problem discussed in discovery, or just looks polished without solving anything.","Whether the consultant pushes back on a bad brief instead of just executing it as given.","Whether documentation is handed off at the end so the client isn't dependent on the consultant forever."],t3_highest_value_situation:["A client who's tried to solve the problem internally and hit a wall — an outside, senior perspective is where the real unlock happens.","A client who was burned by a previous engagement that delivered nothing usable — rebuilding trust with a tight, working first deliverable matters most here.","A founder who has the instinct something's wrong but can't articulate what — translating that instinct into a clear problem statement is 
4449where I add the most value."],t3_common_objection:["'I can just hire a full-time employee for less.' I walk through the real cost comparison including ramp-up time, benefits, and the flexibility they'd be giving up.","'Why not just use an agency?' I explain what they get with me directly — senior attention on every deliverable, without account-management layers in between.","'Consultants are too expensive for a project this size.' I show them the actual scope broken down so the price maps to specific deliverables, not a vague day rate."],t3_structural_proof:["I show my actual process documents — discovery brief, scope agreement, delivery timeline — so a prospect can see there's a system, not improvisation.","I point to my specific engagement structure and turnaround times, not a general 'years of experience' claim.","I show real work samples and the specific problem each one solved, not a portfolio presented without context."],t3_counterintuitive_belief:["A longer discovery phase usually means a faster overall project — skipping it almost always costs more time later in revisions.","The client who pushes back the most in discovery is often the one who ends up happiest with the result, because the scope gets sharper.","Saying no to a scope-creep request usually strengthens the relationship, not weakens it — clients respect the boundary more than they resent it."],t4_category_statement:["The senior-level consultant for founders who need an outside perspective without an agency's layers in between.","The go-to for clients who've been burned by a vague engagement before and want a written scope from day one.","The specialist for businesses whose messaging isn't working and don't yet know why."],t4_industry_myth:["That a lower day rate always means less experience. Often it just means lower overhead, not a lower skill level.","That more people on a project means faster delivery. A smaller, senior team with fewer handoffs usually moves faster.","That skipping discovery saves time. It almost always costs more in revisions later than it saves upfront."],t4_referral_description:["'If you need this fixed properly, call them — not the version done as an afterthought.'","'They'll tell you honestly if your project isn't ready for what you're asking for.'","'They actually deliver what was scoped, on the timeline they said they would.'"],t4_competitor_disagreement:["That taking every project that comes in the door is good business — I believe saying no to a bad-fit project protects both the client and my own work quality.","That skipping discovery to move faster is a service to the client — I think it almost always costs more time later than it saves upfront.","That a bigger team is inherently more capable — I believe a smaller, senior team with fewer handoffs usually delivers better and faster."],t4_five_year_difference:["They have a clear, working system in place instead of the patchwork approach they were using before.","They know exactly who to call the next time a project like this comes up, instead of starting the search over.","They avoided a costly scope-creep spiral because the engagement had a real, agreed structure from day one."]},t7e=[{id:"no_guaranteed_client_outcomes",rule:"Never state or imply a guaranteed business outcome, revenue figure, or performance result for a client engagement — describe the process, deliverable, or engagement change achieved, not a projected or promised financial result."}],n7e={vertical:Xze,_contentReviewed:Qze,tier1:Jze,tier2:Zze,sharedExamples:e7e,generationRules:t7e},r7e="personal_trainer",a7e=!0,s7e=[{id:"service_area",label:"Where you train clients — gym/studio location, or your service area if mobile/online",type:"text",required:!0,placeholder:"e.g. Charlotte, NC — in-person at Elevate Fitness, South End",contentRole:"local"},{id:"role_and_certifications",label:"Your role and certifications",type:"text",placeholder:"e.g. NASM-CPT, owner of Elevate Personal Training",contentRole:"calibration"},{id:"years_training",label:"Years training clients",type:"number",placeholder:"e.g. 8",contentRole:"calibration"},{id:"client_situations_served",label:"Who you do your best work for",type:"multi_select",options:["Weight loss","Strength / muscle building","Athletic performance","Post-injury / rehab-adjacent","Prenatal / postpartum","Older adults / longevity","General fitness beginners"],contentRole:"calibration",helpText:"Describe client goals and training situations, not medical conditions — content built from this field should never function as medical advice.",complianceNote:"Fitness/wellness content must never diagnose, treat, or offer medical advice, and must never guarantee a specific health, weight, or performance outcome. 'Post-injury / rehab-adjacent' means general post-clearance strength work, not physical therapy or medical treatment.",subFields:[{id:"client_situations_detail",label:"What's the specific situation a client is usually in when they start with you?",placeholder:"e.g. Cleared by their doctor after a knee injury but afraid to load it again without guidance.",required:!0}]},{id:"signature_process",label:"Any signature process, guarantee, or promise you make clients?",type:"text",contentRole:"proof",placeholderPool:["e.g. Every client gets a written program built around their actual assessment, never a copy-paste template. (only if you actually offer this)","e.g. A form check on every new exercise before it's added to a program. (only if you actually offer this)","e.g. A monthly check-in call to adjust the program based on how the last four weeks actually went. 
4449(only if you actually offer this)"]},{id:"prior_career_background",label:"Your own fitness journey or turning point, if relevant",type:"text",placeholder:"e.g. I rebuilt my own strength after a bad injury in my 20s — I train people the way I wish someone had trained me back then.",contentRole:"story"},{id:"headshot",label:"Headshot",type:"upload",required:!0,contentRole:"media"},{id:"transformation_photos",label:"A few training or client-progress photos",type:"upload",skippable:!0,skipWarning:"You'll underperform without these — real photos are what make positioning content actually land.",contentRole:"media",requiresAttestation:{type:"photo_consent",text:"I confirm I have each pictured client's explicit permission to publish these photos, including any before/after images."}}],i7e=[{id:"pt_t2_niche_knowledge",tier:2,prompt:"What do you know about training that most people get wrong from following generic online advice?",contentRole:"local",examples:["Most people think more cardio is the fix for a weight-loss plateau. In almost every client I've had, the real fix was tightening up nutrition consistency, not adding more training volume.","People assume soreness means a workout 'worked.' I've seen clients make their best progress in weeks where they weren't sore at all, because the programming was actually progressive instead of just exhausting.","Clients think an injury means they have to stop training entirely. In most cases, with the right modifications, they can keep training around it and come back stronger, not weaker."]},{id:"pt_t2_client_story",tier:2,prompt:"Describe a client transformation — a before-and-after in their situation, not their identity — that you're proud of.",contentRole:"story",complianceNote:"Frame as one individual's specific experience, not a guaranteed or typical outcome. Never state or imply a specific weight, measurement, or timeline result as something every client should expect — 'individual results vary' framing required.",examples:["A client came in unable to do a single push-up. Eighteen months of consistent programming later, she hit her first strict pull-up — for her, that was the moment fitness clicked as something she was actually good at.","A client had been told by a previous trainer to push through knee pain. We rebuilt his program around what his knee could actually handle, and he's been training pain-free and getting stronger for over a year.","A client started as someone who dreaded the gym entirely. We built a program around movements she genuinely enjoyed, and eighteen months later she asks to add extra sessions instead of dreading the ones she has."]},{id:"pt_t2_what_you_wont_do",tier:2,prompt:"What's a training decision you refuse to make, even if a client pushes for it?",contentRole:"voice",complianceNote:"Must stay within a trainer's scope of practice — never frame as overriding a medical restriction or providing medical advice.",examples:["I won't push a client through sharp joint pain just because they want to hit a number. I'll modify the movement instead, every time.","I don't promise a specific weight-loss number or timeline. Every body responds differently, and I won't set someone up to feel like a failure over a number I can't actually guarantee.","I refuse to program a client back into heavy loading before they've been cleared by their doctor after an injury. That call isn't mine to make."]},{id:"pt_t2_programming_process",tier:2,prompt:"Walk through how you build a program for a new client — what actually happens, in order?",contentRole:"process",examples:["We start with a movement assessment, then a written program built around what that assessment actually showed, not a generic template. Every four weeks we reassess and adjust.","First session is entirely technique-focused — no heavy loading until the fundamentals are solid. Only after that do we start progressing weight.","I ask about training history, injuries, and goals before writing a single exercise, then check in weekly on how the program actually felt versus how it looked on paper."]},{id:"pt_t2_market_myths",tier:2,prompt:"What's the one thing people get wrong about training or fitness right now?",contentRole:"myth-bust",complianceNote:"No medical claims, no guaranteed outcomes, no unverified health/weight-loss claims — frame as general training principles, not personalized medical advice.",examples:["People think spot-reducing fat from one area is possible with the right exercise. It isn't — fat loss happens across the whole body, not the specific area being trained.","People assume more time in the gym always means more progress. Past a certain point, recovery matters more than additional volume.","People think a program has to be miserable to be effective. Sustainable, consistent training almost always beats an intense program someone quits after three weeks."]}],o7e={t3_quality_signal:["Whether a program is built from an actual movement assessment, or copy-pasted from a template regardless of the client in front of them.","Whether the trainer checks form on every new exercise before adding load, or lets technique slide to hit a number.","Whether the program adjusts based on how the last few weeks actually went, or stays static regardless of client feedback."],t3_highest_value_situation:["A client recovering from an injury who's scared to load their body again — rebuilding that confidence safely is where the real value shows up.","A client who's tried generic programs before and burned out — building something sustainable around their actual life is what changes the outcome.","A beginner who's intimidated by the gym entirely — the first few sessions of building real confidence matter more than any single workout."],t3_common_objection:["'I can just follow a program online for free.' I explain what's missing — real-time form correction and a program that adju
4449sts to how their body actually responds.","'Why do I need a trainer when I know the basic exercises?' I show them the difference between knowing exercises and having a structured, progressive program.","'Personal training is too expensive.' I break down what's actually included — assessment, programming, ongoing adjustment, accountability — not just an hour of supervision."],t3_structural_proof:["I show my actual certification and the specific assessment process I run with every new client — structural process, not a client's stated result.","I point to my written programming system and check-in cadence, so a prospect can see there's a real structure behind it.","I show my years training and specialty certifications relevant to their situation, not a general 'fitness expert' claim."],t3_counterintuitive_belief:["More time in the gym isn't always more progress — past a certain point, recovery drives results more than additional volume.","Soreness isn't a reliable measure of a good workout — some of the best progress happens in weeks with minimal soreness but smart progression.","The most sustainable program is often the least intense one someone will actually stick to, not the hardest one on paper."],t4_category_statement:["The trainer for clients rebuilding strength and confidence after an injury, not pushing through pain.","The go-to for beginners who are intimidated by the gym and need real structure from day one.","The programming specialist for clients who've tried generic online plans and burned out."],t4_industry_myth:["That spot-reduction is possible with the right exercise. Fat loss happens across the whole body, not a targeted area.","That more gym time always means more progress. Past a point, recovery drives results more than added volume.","That a program has to be brutal to work. Sustainable programs someone actually sticks to beat intense ones they quit."],t4_referral_description:["'If you're coming back from an injury, they're the one who'll do it safely, not just push you through it.'","'They actually adjust your program based on how you're doing, not a fixed template.'","'If the gym intimidates you, they're the one who makes it feel approachable.'"],t4_competitor_disagreement:["That pushing through pain shows commitment — I believe modifying around pain and getting proper clearance protects a client's long-term training far more.","That a harder program is always a better program — I think a sustainable one someone actually completes beats an intense one they quit.","That every client should follow the same proven template — I believe programming has to start from an individual assessment, not a one-size-fits-all plan."],t4_five_year_difference:["They've built a consistent training habit that's held up through life changes, instead of the on-and-off cycle they were stuck in before.","They know how to modify their own training around minor setbacks instead of stopping entirely every time something comes up.","They avoided the injury or burnout that would've come from an unsustainable program, because the plan was built for their actual life."]},l7e=[{id:"no_medical_claims",rule:"Never diagnose, treat, or provide medical advice, and never override or second-guess a client's medical clearance or restriction. Fitness content stays in the scope of general training guidance."},{id:"no_guaranteed_outcomes",rule:"Never state or imply a guaranteed weight, measurement, timeline, or performance outcome. Any specific transformation described must be framed as one individual's experience, with results understood to vary by person."}],c7e={vertical:r7e,_contentReviewed:a7e,tier1:s7e,tier2:i7e,sharedExamples:o7e,generationRules:l7e},u7e="course_coach",d7e=!0,h7e=[{id:"service_area",label:"Where you're based and who you teach — a geography, or the niche/market you serve nationally",type:"text",required:!0,placeholder:"e.g. Based in Nashville, teaching songwriters online worldwide",contentRole:"local"},{id:"role_and_niche",label:"Your role and course/coaching topic",type:"text",placeholder:"e.g. Founder, teaches independent musicians how to build a sustainable release schedule",contentRole:"calibration"},{id:"years_teaching",label:"Years teaching or coaching in this topic",type:"number",placeholder:"e.g. 6",contentRole:"calibration"},{id:"student_situations_served",label:"Who you do your best work for",type:"multi_select",options:["Complete beginners","Career changers","Side-hustle builders","Existing business owners scaling up","Hobbyists","Professionals seeking certification"],contentRole:"calibration",helpText:"Describe student situations and starting points, not income promises. Content describing what students can expect must never state or imply a specific earnings outcome.",complianceNote:"FTC guidance on income/earnings claims and the Business Opportunity Rule: content generated from this field, and any student outcome described anywhere downstream, must never state or imply a typical or guaranteed income result. Any specific dollar figure mentioned must be framed as one individual's disclosed experience, never a representative or expected outcome.",subFields:[{id:"student_situations_detail",label:"What's the specific starting point a student is usually at when they find you?",placeholder:"e.g. Someone who's been posting music online for years with no real audience or plan.",required:!0}]},{id:"signature_process",label:"Any signature process, guarantee, or promise you make students?",type:"text",contentRole:"proof",placeholderPool:["e.g. Every module ends with a real assignment reviewed by me personally, not just a video to watch. (only if you actually offer this)","e.g. A live Q&A every week for the life of the course, not a one-time cohort. (only if you actually offer this)","e.g. Lifetime access and every future course update included at no extra cost. (only if you actually offer this)"]},{id:"prior_career_background",label:"How you became the person who teaches this, if relevant",type:"text",placeholder:"e.g. I spent a decade doing this the hard, slow way before figuring out the shortcuts I now teach.",contentRole:"story"}
4449,{id:"headshot",label:"Headshot",type:"upload",required:!0,contentRole:"media"},{id:"course_preview_photos",label:"A few photos or screenshots from your course, community, or teaching in action",type:"upload",skippable:!0,skipWarning:"Without these, content falls back to a generic template look instead of showing the real thing.",contentRole:"media"}],f7e=[{id:"cc_t2_niche_knowledge",tier:2,prompt:"What do you know about this topic that most people trying to learn it on their own never figure out?",contentRole:"local",examples:["Most beginners think they need to master every technique before starting. In my experience, the people who actually build momentum are the ones who publish something imperfect early and improve from real feedback.","People assume more content consumption equals more progress. The students who actually finish are almost always the ones doing fewer, more focused things consistently, not consuming everything available.","People think talent is the deciding factor. In every student I've taught, consistency has mattered more than raw natural ability."]},{id:"cc_t2_student_story",tier:2,prompt:"Describe a student transformation — a before-and-after in their skill or situation, not their identity or income — that you're proud of.",contentRole:"story",complianceNote:"Describe a skill, habit, or confidence change only. Never state or imply an income, revenue, or earnings figure as a typical or expected outcome — if a specific dollar result is mentioned, it must be clearly disclosed as one individual's personal, non-representative experience with an 'individual results vary, no income is guaranteed' framing.",examples:["A student had started and abandoned three different projects before the course. She finished her first complete piece of work in the program and, for the first time, called herself a 'real' practitioner instead of a hobbyist.","A student came in completely overwhelmed by where to even start. By the end, he had a simple, repeatable weekly process he still uses two years later.","A student had been stuck doing the same thing the same way for a decade. The course gave her a specific framework to try something new, and she says it's the first real change in her approach in years."]},{id:"cc_t2_what_you_wont_promise",tier:2,prompt:"What's something you refuse to promise students, even though it might make the course sell better?",contentRole:"voice",complianceNote:"Must not describe an income/earnings promise being withheld in a way that still implies one is achievable or typical — frame purely around effort, timeline, and skill expectations.",examples:["I won't promise a specific timeline for mastering the skill. Everyone starts from a different place, and I'd rather be honest than oversell it.","I don't tell students this will be easy. It's a real skill that takes real practice, and pretending otherwise sets people up to quit at the first setback.","I refuse to promise a specific income or business outcome from taking this course. What I can promise is the skill and process — what someone does with it after is up to them."]},{id:"cc_t2_teaching_process",tier:2,prompt:"Walk through how a student actually moves through your course or coaching — what happens, in order?",contentRole:"process",examples:["Each module builds on the last with a real assignment at the end, reviewed with feedback before the student moves forward — not a binge-and-forget video series.","We start with a foundations phase before anything advanced, because skipping it is the single biggest reason students stall out later.","Live weekly sessions cover whatever students are actually stuck on that week, so the curriculum adapts instead of running on a fixed script regardless of where people are."]},{id:"cc_t2_market_myths",tier:2,prompt:"What's the one thing people get wrong about learning this skill on their own?",contentRole:"myth-bust",complianceNote:"No income/earnings claims. Describe learning-process facts only — never a guaranteed skill-acquisition timeline or financial outcome.",examples:["People think free content online is enough to actually learn this. The information is out there, but structure and feedback are what turn information into a real skill.","People assume they need to feel ready before starting. Almost every student I've had felt underprepared right up until the moment they actually started and found out they weren't.","People think this skill is mostly talent. In my experience, the students who improve fastest are the ones who practice consistently, not the ones who started with the most natural ability."]}],p7e={t3_quality_signal:["Whether assignments get real, specific feedback or just a generic 'good job' with no actual guidance.","Whether the curriculum builds in a logical sequence, or jumps around without a clear structure.","Whether the instructor is actually reachable for questions, or the course is a one-way video feed with no support."],t3_highest_value_situation:["A student who's tried to learn this on their own and stalled out — structure and real feedback is where the biggest unlock happens.","A student who feels behind or like they started too late — showing them a realistic, honest path forward is where trust gets built.","A student who's overwhelmed by free content with no clear order — a structured curriculum is what actually gets them moving."],t3_common_objection:["'I can just learn this for free online.' I explain what free content is missing — structure, sequencing, and real feedback on their specific attempts.","'Why should I pay for a course instead of just practicing on my own?' I show them what structured feedback catches that self-practice alone usually misses.","'This feels expensive for a course.' I break down exactly what's included — curriculum, feedback, ongoing support — not just a stack of videos."],t3_structural_proof:["I 
4449show my actual curriculum structure and assignment-feedback process — a real system, not a vague promise of expertise.","I point to my specific teaching process — modules, live sessions, feedback turnaround — so a prospect can see there's a method behind it.","I show my years teaching this specific topic and how the curriculum has been refined over that time, not a general 'expert' claim."],t3_counterintuitive_belief:["Consuming more free content usually slows progress down, not speeds it up — too many inputs with no structure creates confusion, not clarity.","Feeling ready before starting is rarely how it actually works — most people feel underprepared right up until they start anyway.","The students who ask the most 'basic' questions early on are often the ones who progress fastest, because they're not skipping the foundation."],t4_category_statement:["The structured path for people who've tried to learn this on their own and stalled out on free content.","The honest teacher for students tired of hype-driven promises with no real curriculum behind them.","The go-to for beginners who feel overwhelmed by where to even start."],t4_industry_myth:["That free content online is enough to actually build the skill. Information alone rarely becomes a skill without structure and feedback.","That you need to feel ready before starting. Almost everyone feels underprepared right up until they actually start.","That talent matters more than consistency. In practice, the students who show up consistently improve faster than the ones who started more naturally gifted."],t4_referral_description:["'If you've been trying to learn this on your own and stuck, take their course — the structure is what you're missing.'","'They actually give real feedback, not just generic encouragement.'","'They're honest about what it takes instead of overselling it.'"],t4_competitor_disagreement:["That promising fast, easy results sells better — I believe it sets students up to quit when it turns out to take real, consistent effort.","That more content is always better — I think a smaller, well-sequenced curriculum beats an overwhelming library nobody finishes.","That a course should work for everyone regardless of where they start — I believe being upfront about who it's genuinely a fit for serves students better than a one-size-fits-all pitch."],t4_five_year_difference:["They have a real, repeatable process for this skill instead of piecing it together from scattered free content.","They know exactly what structure and feedback helped them progress, and can apply that same approach to the next thing they learn.","They avoided years of trial-and-error frustration because the curriculum gave them a clear sequence from the start."]},m7e=[{id:"no_income_claims",rule:"Never state or imply a typical, guaranteed, or expected income, revenue, or earnings outcome from taking the course or coaching program, consistent with FTC guidance on income claims. A specific dollar figure may only appear as one individual's personally disclosed, non-representative result, never as a marketing promise."},{id:"no_guaranteed_skill_timeline",rule:"Never state or imply a guaranteed timeline for mastering the skill. Describe process and structure, not a promised speed of results."}],g7e={vertical:u7e,_contentReviewed:d7e,tier1:h7e,tier2:f7e,sharedExamples:p7e,generationRules:m7e},y7e="side_hustle",v7e=!0,b7e=[{id:"service_area",label:"Where you're based and the market or niche your side hustle serves",type:"text",required:!0,placeholder:"e.g. Based in Phoenix, selling handmade ceramics online nationwide",contentRole:"local"},{id:"business_and_role",label:"What your side hustle is and your role",type:"text",placeholder:"e.g. Solo founder of a small-batch candle brand, still working a full-time job",contentRole:"calibration"},{id:"years_building",label:"Years running this side hustle",type:"number",placeholder:"e.g. 2",contentRole:"calibration"},{id:"audience_situations_served",label:"Who's actually following along or buying",type:"multi_select",options:["People considering starting their own side hustle","Customers of my product/service","Peer
4449s building in the same space","Followers who want the behind-the-scenes","People early in their entrepreneurial journey"],contentRole:"calibration",subFields:[{id:"audience_situations_detail",label:"What's the specific situation someone's usually in when they start following or buying?",placeholder:"e.g. Someone tired of their 9-to-5 who's curious what actually building something on the side looks like, honestly.",required:!0}]},{id:"signature_process",label:"What actually makes what you do different — a process, guarantee, or promise, if you have one",type:"text",contentRole:"proof",placeholderPool:["e.g. Every batch is made in small runs of 20, never mass-produced. (only if you actually offer this)","e.g. I post the real numbers — sales, costs, mistakes — not just the wins. (only if you actually do this)","e.g. Every order ships within 48 hours, packed by me personally. (only if you actually offer this)"]},{id:"prior_career_background",label:"What you do for your day job, and how the side hustle started, if relevant",type:"text",placeholder:"e.g. I'm a nurse by day — this started as a way to make something with my hands after twelve-hour shifts.",contentRole:"story"},{id:"headshot",label:"Headshot",type:"upload",required:!0,contentRole:"media"},{id:"product_or_work_photos",label:"A few photos of your product or the work itself",type:"upload",skippable:!0,skipWarning:"You'll underperform without these — real photos of the real thing are what make positioning content actually land.",contentRole:"media"}],x7e=[{id:"sh_t2_niche_knowledge",tier:2,prompt:"What do you know about building this side hustle that people don't realize until they actually try it?",contentRole:"local",examples:["Most people think the hard part is making the product. For me, the actual bottleneck has always been the boring stuff — packaging, shipping, answering the same customer question fifty times.","People assume you need a huge following to start selling. My first real sales came from a handful of people who saw one honest post, not from going viral.","People think you need to quit your day job to be 'serious' about it. I've made more consistent progress keeping the day job and building slowly on the side than I think I would have rushing it."]},{id:"sh_t2_transformation_story",tier:2,prompt:"Describe a moment building in public actually paid off — a before-and-after in the business or in how people saw it — that you're proud of.",contentRole:"story",complianceNote:"Describe the specific moment and process, never a guaranteed income figure as a typical or expected outcome — any dollar amount mentioned must be disclosed as this individual's own specific, non-representative result.",examples:["I posted honestly about a batch that came out wrong instead of hiding it, and that post got more engagement and trust than any polished product photo ever had.","A customer messaged me after finding my page through a friend's share, and it turned into my first repeat customer — that's when it stopped feeling like a hobby and started feeling like something real.","I shared my actual first-year numbers, mistakes included, and it led to three other people messaging me asking how to start their own — that's when I realized the behind-the-scenes was worth more than I thought."]},{id:"sh_t2_what_you_wont_do",tier:2,prompt:"What's something you refuse to do, even though it might grow the following or sales faster?",contentRole:"voice",complianceNote:"Must not describe buying followers, fabricating engagement, or misrepresenting income/growth — the answer itself should model the honesty this vertical's compliance rules require.",examples:["I won't buy followers or fake engagement to look bigger than I am. It's tempting when growth feels slow, but it's not the business I want to build.","I don't post numbers I can't back up. If I share revenue or growth, it's the real figure, not a rounded-up version.","I refuse to promise people this is easy or fast. It's taken me two years of slow, consistent work to get here, and I'd rather be honest about that."]},{id:"sh_t2_building_process",tier:2,prompt:"Walk through how you actually build and ship — what happens, in order, around a full-time job?",contentRole:"process",examples:["Weeknights are for making product, weekends are for photography and posting. Orders get packed and shipped within 48 hours, every time, even if it means a late night.","I batch content on Sundays for the whole week, so posting doesn't depend on finding time every single day.","Every new product starts as a 
4449small test batch before I commit real time or money to scaling it up."]},{id:"sh_t2_myths",tier:2,prompt:"What's the one thing people get wrong about building a side hustle right now?",contentRole:"myth-bust",complianceNote:"No income/growth guarantees — describe process realities only, never a typical or expected earnings outcome.",examples:["People think you need to go viral to make real progress. My growth has come from a small group of people who actually stuck around, not one big spike that faded.","People assume side hustles are passive once they're set up. Mine still takes real hours every week — it's just hours I chose instead of hours assigned to me.","People think you need to look 'professional' from day one. My most honest, least polished posts have consistently outperformed the ones I overthought."]}],w7e={t3_quality_signal:["Whether the person shares the real numbers and setbacks, or only the polished wins.","Whether an order actually ships when promised, even from a one-person operation.","Whether the story behind the product feels specific and real, or like a copy-pasted brand description."],t3_highest_value_situation:["Someone who's curious about starting their own side hustle but scared to start — an honest, specific account of what it actually looks like is where the real value is.","A first-time customer deciding between a small independent maker and a big-box alternative — showing the real process behind the product is what wins that decision.","Someone who's tried and quietly given up on a side hustle before — showing the slow, unglamorous version of progress is what rebuilds their belief it's possible."],t3_common_objection:["'I can just buy something similar for cheaper somewhere else.' I explain what's actually different — small-batch care, direct communication, a real person behind it.","'How do I know this is a real, sustainable thing and not a fad?' I point to how long I've actually been doing this and show the consistency, not just a highlight reel.","'This feels more expensive than a mass-produced version.' I break down what actually goes into a small-batch product versus something made at scale."],t3_structural_proof:["I show my actual process — how a product gets made, packed, and shipped — not just a finished photo.","I point to how long I've been consistently doing this, even part-time around a day job, as real proof of commitment.","I show real, specific numbers when I share them, not vague claims of success."],t3_counterintuitive_belief:["Going viral once usually helps less than a smaller, steady following that actually sticks around and buys.","Sharing a mistake or a setback often builds more trust than another polished win post.","Keeping the day job while building slowly has, for me, led to better decisions than rushing to go 'all in' too early."],t4_category_statement:["The honest voice for people curious what actually building a side hustle looks like, mistakes included.","The small-batch maker for customers who want to know the real person behind what they're buying.","The realistic account for people tired of highlight-reel entrepreneurship content."],t4_industry_myth:["That you need to go viral to make real progress. A smaller following that actually sticks around and buys usually matters more.","That a side hustle has to look 'professional' from day one to be taken seriously. The most honest content usually performs the best.","That passive income happens quickly. Most of what I've built has taken real, consistent hours over a long time."],t4_referral_description:["'If you want to see what actually building something on the side looks like, follow them — no fake polish.'","'Their stuff is genuinely small-batch, not mass-produced with a story slapped on.'","'They're honest about the slow parts, not just the wins.'"],t4_competitor_disagreement:["That you need to look bigger than you are to be taken seriously — I believe honesty about being small and real builds more trust than a fabricated image of scale.","That posting only the wins is good marketing — I think sharing the real setbacks builds far more loyalty than a highlight reel.","That going 'all in' immediately is the fastest path to success — I believe slow, consistent building alongside a day job has led to better decisions for me."],t4_five_year_difference:["They have a real, sustainable thing running instead of the burned-out, rushed version they might have built by going all in too fast.","They know exactly who their actual customers are, because the following was built on honesty, not a fabricated image.","They avoided quitting entirely, because building slowly and sustainably kept it something they wanted to keep doing."]},_7e=[{id:"no_income_or_growth_claims",rule:"Never state or imply a typical, guaranteed, or expected income or growth outcome. A specific dollar or growth figure may only appear as this individual's own disclosed, non-representative result."},{id:"no_fabricated_metrics",rule:"Never fabricate or imply inflated follower counts, sales figures, or engagement numbers. All numeric claims must be ones the user actually provided."}],k7e={vertical:y7e,_contentReviewed:v7e,tier1:b7e,tier2:x7e,sharedExamples:w7e,generationRules:_7e},j7e="creator",S7e=!0,N7e=[{id:"service_area",label:"Where you're based and the platform(s) and niche you create for",type:"text",required:!0,placeholder:"e.g. Based in LA, creating food content primarily on Instagram and TikTok",contentRole:"local"},{id:"content_niche_and_role",label:"Your content niche and primary platform",type:"text",placeholder:"e.g. Home-cooking content creator, full-time on Instagram Reels",contentRole:"calibration"},{id:"years_creating",label:"Years creating content",type:"number",placeholder:"e.g. 4",contentRole:"calibration"},{id:"audience_situations_served",label:"Who's actually watching or following",type:"multi_select",options:["People new to my niche","Longtime followers","Brands considering partnerships","Peers / other creators","People seeking entertainment","People seeking how-to / education"],contentRole:"calibration",subFields:[{id:"audience_situations_detail",label:"What's the specific moment or need that brings someone to your content?",placeholder:"e.g. Someone scrolling at 9pm trying to figure out what to cook with what's already in their fridge.",required:!0}]},{id:"signature_style",label:"What makes your content recognizably yours — a format, style, or promise, if you have one",type:"text",contentRole:"proof",placeholderPool:["e.g. Every recipe video is shot in one take, no cuts, so people can actually follow along in real time. 
4449(only if this is genuinely true)","e.g. I only post about products I've personally used for at least a month first. (only if this is genuinely true)","e.g. Every post ends with the honest result, good or bad — no staged perfect outcomes. (only if this is genuinely true)"]},{id:"prior_career_background",label:"What you did before creating content, and how you got into it, if relevant",type:"text",placeholder:"e.g. I was a line cook for six years before starting to film what I was already cooking at home.",contentRole:"story"},{id:"headshot",label:"Headshot",type:"upload",required:!0,contentRole:"media"},{id:"content_samples",label:"A few of your best-performing or most representative posts/photos",type:"upload",skippable:!0,skipWarning:"You'll underperform without these — real samples of your actual content are what make positioning content actually land.",contentRole:"media"}],C7e=[{id:"cr_t2_niche_knowledge",tier:2,prompt:"What do you know about your niche or platform that most people trying to grow in it never figure out?",contentRole:"local",examples:["Most new creators think going viral once changes everything. In my experience, one viral post without a consistent follow-up almost never converts into a real, lasting audience.","People assume posting more often is always the answer. My most consistent growth came from posting less often but being far more intentional about each piece.","People think the algorithm rewards trends above everything. What's actually worked for me is a recognizable format people come to expect, not chasing every trend that pops up."]},{id:"cr_t2_transformation_story",tier:2,prompt:"Describe a moment your content actually connected — a before-and-after in how your audience responded — that you're proud of.",contentRole:"story",complianceNote:"Describe the specific moment and audience response, never a guaranteed growth or income figure as a typical outcome — any specific number mentioned must be disclosed as this individual's own non-representative result.",examples:["I posted a video where a recipe genuinely failed on camera instead of cutting it out, and it got more comments and shares than any 'perfect' video I'd posted before.","A follower messaged me saying a video I made helped them through a rough week, and that's the moment I stopped thinking about content as just a format and started thinking about it as actually reaching people.","I switched from polished, scripted videos to raw, one-take ones, and engagement and trust from my audience both noticeably increased — even though the production quality went down."]},{id:"cr_t2_what_you_wont_do",tier:2,prompt:"What's something you refuse to do, even if it would likely grow your following or income faster?",contentRole:"voice",complianceNote:"Must not describe buying followers, fabricating engagement, or promoting undisclosed sponsored content — the answer should model the disclosure/honesty standard this vertical's compliance rules require (FTC endorsement guidelines).",examples:["I won't promote a product I haven't actually used myself, no matter the offer. My audience trusts my recommendations because they're real.","I don't buy followers or engagement. It might look good on paper, but it doesn't build the actual audience I'm trying to build.","I always disclose a paid partnership clearly. I'd rather lose a sponsor who wants that hidden than lose my audience's trust."]},{id:"cr_t2_content_process",tier:2,prompt:"Walk through how you actually make a piece of content — from idea to posted — what happens, in order?",contentRole:"process",examples:["Idea gets written down the moment it happens, filmed within a day or two while it's still fresh, edited same-night, and posted at the time slot that's consistently performed best for my audience.","I batch-film four videos in one sitting on weekends, edit them across the week, and schedule posts so there's never a gap even during a busy week.","Every post starts with one clear question I'm answering for the viewer — if I can't state that question in one sentence, the idea isn't ready yet."]},{id:"cr_t2_myths",tier:2,prompt:"What's the one thing people get wrong about content creation right now?",contentRole:"myth-bust",complianceNote:"No growth or income guarantees — describe process realities only.",examples:["People think a single viral post is the goal. A consistent format people come back for matters far more than any one spike.","People assume creators are always 'on' and having fun. Most of the real work is unglamorous — editing, scheduling, responding to comments — not filming.","People think expensive equipment is what separates good content from bad. My best-performing videos have almost always been shot on my phone."]}
4449],P7e={t3_quality_signal:["Whether the creator discloses sponsored content clearly, or blends it in so it's hard to tell what's paid.","Whether a recommendation comes from something the creator has actually used, or reads like a script handed to them.","Whether the content has a recognizable, consistent format, or feels like it's chasing whatever trend is popular that week."],t3_highest_value_situation:["Someone scrolling for a real answer to a specific problem, not just entertainment — content that actually solves it is what earns a follow.","A brand deciding whether to partner — a creator who's honest and selective about what they promote is the safer, more trustworthy bet.","A new follower deciding whether to stick around — a consistent, recognizable format is what turns a one-time viewer into a regular one."],t3_common_objection:["'There are already a hundred accounts doing this exact niche.' I show what's actually different about my specific take — the format, the honesty, the voice.","'How do I know this recommendation is genuine and not just a paid post?' I point to my clear, consistent disclosure practice and the fact I only promote what I've used.","'Following another creator feels like noise at this point.' I show what my content actually offers that's different — real answers, not just entertainment."],t3_structural_proof:["I show my actual posting consistency and format over time, not just one high-performing post taken out of context.","I point to my specific content process — idea, film, edit, post — so a prospect can see there's a real system, not luck.","I show my years creating and how the format has been refined over that time, not a vague claim of expertise."],t3_counterintuitive_belief:["Posting less often, more intentionally, has grown my audience faster than posting constantly ever did.","A video that shows something going wrong on camera often outperforms a perfectly polished one — audiences trust it more.","Chasing every trend usually dilutes an audience rather than growing it — a consistent format people recognize matters more."],t4_category_statement:["The honest voice in this niche for people tired of content that feels like a script.","The go-to for real, unpolished answers instead of another perfectly produced video.","The recognizable format people actually come back for, instead of chasing every trend."],t4_industry_myth:["That going viral once changes everything. Without a consistent follow-up, one viral post rarely builds a lasting audience.","That more posting is always better. Intentional, less-frequent posting has outperformed volume in my own experience.","That expensive equipment is what separates good content from bad. Most of what's actually worked for me was filmed on a phone."],t4_referral_description:["'If you want honest recommendations, follow them — they only post about things they've actually used.'","'Their content actually has a consistent format, not just whatever trend is popular that week.'","'They're upfront about sponsored posts instead of hiding them.'"],t4_competitor_disagreement:["That chasing every trend is the way to grow — I believe a consistent, recognizable format builds a more loyal audience over time.","That more posting is always better — I think intentional, less-frequent content has outperformed volume in my own results.","That blending sponsored content in undisclosed helps engagement — I believe clear disclosure builds more long-term trust than it costs in short-term reach."],t4_five_year_difference:["They have a consistent format and voice that's recognizably theirs, instead of chasing whatever trend was popular at the time.","They know exactly what kind of content actually resonates with their audience, instead of guessing with every post.","They built genuine trust with their audience because recommendations and sponsorships were always honestly disclosed."]},T7e=[{id:"sponsored_content_disclosure",rule:"Any content describing a paid partnership, gifted product, or sponsorship must reflect clear disclosure (e.g. #ad, 'paid partnership'), consistent with FTC endorsement guidelines. Never draft sponsored content framed as an organic, unpaid recommendation."},{id:"no_fabricated_metrics",rule:"Never fabricate or imply inflated follower counts, view counts, or engagement numbers. All numeric claims must be ones the user actually provided."}],A7e={vertical:j7e,_contentReviewed:S7e,tier1:N7e,tier2:C7e,sharedExamples:P7e,generationRules:T7e},E7e="personal",O7e=!0,R7e="PersonalPRO is the mass-market, no-positioning-required trial-default module (POSITIONING_REQUIRED_MODULES, 2026-09-17) — this content exists so v2's optional flow is available at the same quality bar as every other vertical, not because completing it is required. Framed around personal voice and life content rather than professional service delivery, since there's no client/prospect relationship here.",I7e=[{id:"service_area",label:"Where you're based and the general part of life you post about most",type:"text",required:!0,placeholder:"e.g. Based in Minneapolis — mostly posting about parenting and everyday life",contentRole:"local"},{id:"life_focus_and_role",label:"What best describes you and what you talk about right now",type:"text",placeholder:"e.g. Stay-at-home parent of two, posting the honest, unfiltered version of that",contentRole:"calibration"},{id:"years_posting",label:"Years posting personal content",type:"number",placeholder:"e.g. 3",contentRole:"calibration"},{id:"audience_situations",label:"Who's actually connecting with what you post",type:"multi_select",options:["Friends & family","People in a similar life stage","People who relate to my specific story","Strangers who stumble onto a post","People going through something similar"],contentRole:"calibration",subFields:[{id:"audience_situations_detail",label:"What's the specific situation someone's usually in when your posts resonate most?",placeholder:"e.g. A tired parent who needs to feel like they're not the only one struggling with bedtime some nights.",required:!0}]},{id:"signature_voice",label:"What makes your posts feel unmistakably like you — a tone, style, or habit, if you have one",type:"text",contentRole:"proof",placeholderPool:["e.g. I never post the polished version without also posting the messy one right after it. (only if this is genuinely true)","e.g. Self
4449-deprecating humor about the parts of life nobody else admits to. (only if this is genuinely true)","e.g. Captions that are honest even when they're not flattering. (only if this is genuinely true)"]},{id:"life_context",label:"What's shaped how you see things right now, if relevant",type:"text",placeholder:"e.g. A rough couple of years that taught me most people are just as unsure as I am, and pretending otherwise helps no one.",contentRole:"story"},{id:"headshot",label:"A recent photo of you",type:"upload",required:!0,contentRole:"media"},{id:"life_photos",label:"A few photos that capture your day-to-day life",type:"upload",skippable:!0,skipWarning:"Without these, content falls back to generic stock-style visuals instead of your real life.",contentRole:"media"}],M7e=[{id:"per_t2_life_knowledge",tier:2,prompt:"What do you know about your own experience that most people wouldn't guess from your feed?",contentRole:"local",examples:["People assume from my posts that I have it together most days. Honestly, most days are held together by coffee and low expectations, and I think admitting that is more useful than pretending otherwise.","People think the hard part was the big, obvious thing that happened. Actually the hardest part has been the quiet, ordinary days after, when nobody's checking in anymore.","People assume I post everything. There's a lot I keep private on purpose — what I do share is the part I think is actually useful to say out loud."]},{id:"per_t2_connection_moment",tier:2,prompt:"Describe a moment a post you made actually connected with someone — a before-and-after in how it landed — that you're proud of.",contentRole:"story",examples:["I posted honestly about a hard week instead of the highlight-reel version, and a stranger messaged me saying it was the first time they didn't feel alone in something similar.","I shared a mistake I made instead of hiding it, and the response was way more supportive than I expected — it made me trust being honest more than being polished.","A post I almost didn't share because it felt too personal ended up being the one people related to most, and a few said it changed how they talked about their own situation."]},{id:"per_t2_what_you_wont_share",tier:2,prompt:"What's something you deliberately keep private, even though sharing it might get more engagement?",contentRole:"voice",complianceNote:"Content generated from this field must respect the privacy of any other person mentioned — especially minors — and never disclose identifying details about someone else without their consent, even when framed as protecting the user's own privacy.",examples:["I don't post my kids' faces or full names. What I share about parenting is my own experience of it, not their identity.","I keep specific details about other people in my life private, even when a story involves them. I'll tell my side without exposing theirs.","I don't share anything while I'm still in the middle of a hard moment. I wait until I have enough distance to talk about it without it just being raw venting."]},{id:"per_t2_posting_rhythm",tier:2,prompt:"Walk through how you actually decide what to post and when — what happens, in order?",contentRole:"process",examples:["I write things down as they happen, but I don't post in the moment — I wait a day or two to decide if it's actually worth sharing or just needed to be said once, privately.","I post a few times a week, mostly whenever something feels honest enough to be worth saying, not on a fixed schedule.","Before I post anything involving someone else, I ask myself if they'd be okay with it — if I'm not sure, it doesn't go up."]},{id:"per_t2_myths",tier:2,prompt:"What's the one thing people get wrong assuming your feed represents your actual life?",contentRole:"myth-bust",examples:["People assume my life looks like my best posts. Most days are far more ordinary than anything that ends up online.","People think posting honestly means posting everything. I'm selective — what I share is the part I think is actually worth saying, not a live feed of my life.","People assume the hard posts mean I'm doing worse than I look. Usually it's the opposite — I only post about something hard once I'm through the worst of it."]}],D7e={t3_quality_signal:["Whether a post feels honest even when it's not flattering, or reads like it's carefully managing an image.","Whether other people mentioned in a story are protected and unidentifiable, or exposed for the sake of the post.","Whether the tone stays consistent, or shifts depen
4449ding on what's trending that week."],t3_highest_value_situation:["Someone going through something similar and feeling alone in it — an honest post about the same experience is where real connection happens.","A follower who only sees the polished version of life everywhere else online — showing the ordinary, unfiltered version is what actually resonates.","Someone deciding whether it's safe to be honest about their own life online — seeing it done thoughtfully, with real boundaries, gives them permission to try."],t3_common_objection:["'Why would anyone care about my ordinary life?' I point to how much a small, honest post has connected with people who felt exactly the same way.","'Isn't sharing this too personal?' I explain the boundaries I actually keep, and how sharing selectively, not everything, is what makes it feel safe.","'There's already so much personal content online.' I show what makes mine actually different — the specific honesty, not just more of the same."],t3_structural_proof:["I point to the specific boundaries I keep — what stays private, what I wait to share, who I protect — as proof this is thoughtful, not impulsive.","I show how consistent my voice has stayed over time, not just one post that happened to do well.","I show how long I've actually been doing this and how the way I share has evolved, not a one-off viral moment."],t3_counterintuitive_belief:["The posts I almost didn't share for being 'too personal' have consistently connected the most, not the polished ones.","Waiting until I'm through the hard part to post about it usually helps more people than sharing it live in the moment.","Being selective about what I share has built more trust than posting everything would have."],t4_category_statement:["The honest voice for people tired of feeds that only show the highlight reel.","The relatable account for anyone going through the same ordinary, unglamorous stretch of life.","The thoughtful sharer for people who want honesty without oversharing about others."],t4_industry_myth:["That posting honestly means posting everything. Most honest accounts are actually selective about what they share.","That a feed represents someone's actual life. Most days are far more ordinary than what ends up online.","That vulnerability online means posting in the middle of a hard moment. A lot of the most useful honesty comes with some distance."],t4_referral_description:["'If you want something real instead of another highlight reel, follow them.'","'They're honest without exposing the people around them — it feels safe, not exploitative.'","'Reading their posts feels like talking to someone who actually gets it.'"],t4_competitor_disagreement:["That sharing everything builds more trust — I believe being selective and protecting the people around me actually builds more, not less.","That posting in the raw moment is more 'authentic' — I think a little distance usually makes honesty more useful, not less real.","That a feed should look consistent and polished to be taken seriously — I believe the unpolished, ordinary posts are usually the ones that actually connect."],t4_five_year_difference:["They've built a way of sharing that feels honest without regretting what they exp
4449osed about themselves or people around them.","They know how to talk about hard things in their own life without needing to overshare in the moment.","They found a small group of people who genuinely relate to their specific story, instead of chasing broad, impersonal reach."]},$7e=[{id:"third_party_privacy",rule:"Never disclose identifying details (name, face, school, exact location, etc.) about another person, especially a minor, mentioned in the user's story without the user having indicated that person's consent. Default to describing the user's own experience of an event, not another person's identity."},{id:"no_manufactured_authenticity",rule:"Never fabricate a personal anecdote, struggle, or life detail that wasn't provided by the user. 'Relatable' content must stay grounded in what the user actually shared, not an invented story designed to perform well."}],L7e={vertical:E7e,_contentReviewed:O7e,_status:R7e,tier1:I7e,tier2:M7e,sharedExamples:D7e,generationRules:$7e},si=LUe,pY={financial_advisor:VUe,insurance:eze,realtor:oze,builder_remodeler:fze,mortgage:wze,property_manager:Pze,host:Mze,restaurantpro:qze,authoritypro:Kze,freelance_consultant:n7e,personal_trainer:c7e,course_coach:g7e,side_hustle:k7e,creator:A7e,personal:L7e},mY=["story","myth-bust","process","proof","voice","local","positioning","calibration","media"],F7e={financial_advisor:["primary_specialty_detail","typical_client_situation_detail","planning_philosophy_detail"],insurance:["typical_client_situation_detail"],realtor:["client_situations_detail"],builder_remodeler:["pricing_model_detail"],mortgage:["borrower_situations_detail"],property_manager:["owner_and_property_situations_detail"],host:["property_and_guest_situations_detail"],restaurantpro:["cuisine_and_guest_situations_detail"],authoritypro:["audience_and_situations_detail"],freelance_consultant:["client_situations_detail"],personal_trainer:["client_situations_detail"],course_coach:["student_situations_detail"],side_hustle:["audience_situations_detail"],creator:["audience_situations_detail"],personal:["audience_situations_detail"]},B7e=["t3_highest_value_situation","t3_structural_proof","t4_five_year_difference"],W7e=["financial_advisor","insurance","mortgage"],q7e={financial_advisor:["vulnerable_audience_framing"],insurance:["coverage_gap_framing","claim_story_framing","medicare_routing","vulnerable_audience_framing"],realtor:["fair_housing","refuse_and_flag_exclusions"],builder_remodeler:[],mortgage:["fair_lending","refuse_and_flag_exclusions","no_rate_guarantees"],property_manager:["fair_housing","refuse_and_flag_screening"],host:["guest_nondiscrimination"],restaurantpro:["no_unverified_health_claims","public_accommodation"],authoritypro:[],freelance_consultant:["no_guaranteed_client_outcomes"],personal_trainer:["no_medical_claims","no_guaranteed_outcomes"],course_coach:["no_income_claims","no_guaranteed_skill_timeline"],side_hustle:["no_income_or_growth_claims","no_fabricated_metrics"],creator:["sponsored_content_disclosure","no_fabricated_metrics"],personal:["third_party_privacy","no_manufactured_authenticity"]};function U7e(e,t,n,r){const a=[];n.length!==r&&a.push(`${e}: expected ${r} ${t} questions, found ${n.length}`);for(const i of n)mY.includes(i.contentRole)||a.push(`${e}/${t}/${i.id}: invalid contentRole "${i.contentRole}"`),(!Array.isArray(i.examples)||i.examples.length!==3)&&a.push(`${e}/${t}/${i.id}: expected exactly 3 examples, found ${Array.isArray(i.examples)?i.examples.length:"none"}`);return a}function z7e(e,t){var a;const n=[],r=[];for(const i of t){r.includes(i.id)&&n.push(`${e}/tier1/${i.id}: duplicate top-level question id`),r.push(i.id);for(const o of i.subFields??[])r.includes(o.id)&&n.push(`${e}/tier1/${i.id}: subField id "${o.id}" collides with another question id — every subField must be independently storable as its own positioning_answers row (see types.ts Tier1SubField).`),r.push(o.id);i.type==="composite"&&(!i.subFields||i.subFields.length<2)&&n.push(`${e}/tier1/${i.id}: type "composite" requires 2+ subFields`)}for(const i of F7e[e]??[]){const o=t.find(c=>(c.subFields??[]).some(u=>u.id===i)),l=(a=o==null?void 0:o.subFields)==null?void 0:a.find(c=>c.id===i);l?l.required!==!0&&n.push(`${e}: companion "${i}" must be required:true per A1`):n.push(`${e}: required companion "${i}" (A1) not found in Tier 1`)}return{errors:n,allIds:r}}function H7e(e,t){const n=[];t.tier1.length!==8&&n.push(`${e}: expected 8 Tier 1 questions, found ${t.tier1.length}`);const r=t.tier1.filter(d=>d.type==="textarea"&&d.required);r.length>1&&n.push(`${e}: Tier 1 has ${r.length} required textareas (${r.map(d=>d.id).join(", ")}) — spec allows at most one.`);const a=t.tier1.some(d=>
4449d.id==="service_area"),i=t.tier1.some(d=>d.id==="headshot"&&d.type==="upload");a||n.push(`${e}: Tier 1 is missing the required service_area/location question.`),i||n.push(`${e}: Tier 1 is missing the required headshot upload question.`),(e==="realtor"||e==="builder_remodeler")&&(t.tier1.some(f=>f.id==="project_photos"&&f.type==="upload")||n.push(`${e}: realtor/builder_remodeler Tier 1 must include a (skippable) project-photos upload.`));const{errors:o}=z7e(e,t.tier1);n.push(...o),n.push(...U7e(e,"Tier 2",t.tier2,5)),t.tier2.some(d=>d.contentRole==="story")||n.push(`${e}: Tier 2 has no story-tagged question (required per Phase 2b)`);const l=[...si.tier3,...si.tier4].map(d=>d.id);for(const d of l){const f=t.sharedExamples[d];(!f||f.length!==3)&&n.push(`${e}: missing (or not exactly 3) example answers for shared question "${d}".`)}const c=d=>{var p;const f=[...si.tier3,...si.tier4].find(y=>y.id===d);return((p=t.sharedComplianceNotes)==null?void 0:p[d])??(f==null?void 0:f.complianceNote)};for(const d of B7e)c(d)||n.push(`${e}: shared question "${d}" is missing a required compliance note`);if(W7e.includes(e)&&!c("t3_common_objection")&&n.push(`${e}: shared question "t3_common_objection" needs a compliance note for regulated verticals`),e==="financial_advisor"&&!c("t4_competitor_disagreement")&&n.push(`${e}: shared question "t4_competitor_disagreement" needs an advisor-specific compliance note`),e==="realtor"){const d=t.tier1.find(f=>f.id==="client_situations_served");d!=null&&d.complianceNote||n.push(`${e}: Tier 1 "client_situations_served" is missing its Fair Housing compliance note`)}if(e==="insurance"){const d=t.tier1.find(p=>p.id==="specialty_lines");d!=null&&d.complianceNote||n.push(`${e}: Tier 1 "specialty_lines" is missing its Medicare/CMS compliance note`);const f=t.tier1.find(p=>p.id==="typical_client_situation");f!=null&&f.complianceNote||n.push(`${e}: Tier 1 "typical_client_situation" is missing its Medicare-eligibility-option compliance note`)}const u=new Set((t.generationRules??[]).map(d=>d.id));for(const d of q7e[e])u.has(d)||n.push(`${e}: generationRules is missing required rule "${d}" (A4)`);const h=t.tier1.length+t.tier2.length+si.tier3.length+si.tier4.length;return h!==23&&n.push(`${e}: expected 23 total questions (8+5+5+5), found ${h}`),n}function V7e(e){const t=[];e.tier3.length!==5&&t.push(`shared: expected 5 Tier 3 questions, found ${e.tier3.length}`),e.tier4.length!==5&&t.push(`shared: expected 5 Tier 4 questions, found ${e.tier4.length}`);for(const n of[...e.tier3,...e.tier4])mY.includes(n.contentRole)||t.push(`shared/${n.id}: invalid contentRole "${n.contentRole}"`);return(!e.generationRules||e.generationRules.length<3)&&t.push("shared: generationRules missing or incomplete — expected the 3 global A4 rules (philosophy framing, no performance claims, disparagement)"),t}const uC=[...V7e(si)];for(const e of E2)uC.push(...H7e(e,pY[e]));if(uC.length>0){const e=`Positioning Engine v2 content validation failed:
4450${uC.join(`
4451`)}`;console.error(e)}function G7e(e){if(!E2.includes(e))return null;const t=e,n=pY[t],r=si.tier3.map(o=>{var l;return{id:o.id,tier:o.tier,prompt:o.prompt,contentRole:o.contentRole,examples:n.sharedExamples[o.id],complianceNote:((l=n.sharedComplianceNotes)==null?void 0:l[o.id])??o.complianceNote}}),a=si.tier4.map(o=>{var l;return{id:o.id,tier:o.tier,prompt:o.prompt,contentRole:o.contentRole,examples:n.sharedExamples[o.id],complianceNote:((l=n.sharedComplianceNotes)==null?void 0:l[o.id])??o.complianceNote}}),i=[...si.generationRules,...n.generationRules??[]];return{vertical:t,tier1:n.tier1,tier2:n.tier2,tier3:r,tier4:a,generationRules:i}}const Y7e="https://hgnuynazdzzocuwtwiez.supabase.co";function K7e(e){return(e.match(/\[[^\]]{3,}\]/g)??[]).length}function X7e({text:e}){const t=e.split(/(\[[^\]]{3,}\])/g);return s.jsx(s.Fragment,{children:t.map((n,r)=>n.startsWith("[")&&n.endsWith("]")?s.jsx("mark",{className:"bg-amber-100 text-amber-900 rounded px-1 py-0.5 font-medium dark:bg-amber-950 dark:text-amber-200",children:n},r):s.jsx("span",{children:n},r))})}function Q7e(e,t){return e.label}function J7e(e){return e!=null&&e.flagged||!e||e.needs_input||!e.draft_text.trim()?"write_yourself":K7e(e.draft_text)>0?"needs_detail":"ready"}function Z7e(){const e=Gt(),{currentVertical:t}=Fa(),n=XW(t),r=g.useMemo(()=>n?G7e(t):null,[n,t]),[a,i]=g.useState("loading"),[o,l]=g.useState(null),[c,u]=g.useState(null),[h,d]=g.useState({}),[f,p]=g.useState({}),[y,m]=g.useState({}),[v,b]=g.useState(null),[x,w]=g.useState(""),[_,k]=g.useState("user"),[j,S]=g.useState(!1),[N,C]=g.useState(null),[M,O]=g.useState(!1),[D,$]=g.useState(!1),[R,I]=g.useState(!1),P=g.useRef(!1),A=(r==null?void 0:r.tier1.filter(te=>te.type!=="upload"))??[],E=g.useMemo(()=>r?[...r.tier2,...r.tier3,...r.tier4]:[],[r]),T=g.useCallback(async()=>{var ne;const{data:te}=await W.auth.getSession();return((ne=te.session)==null?void 0:ne.access_token)??null},[]),L=g.useCallback(async te=>{const[{data:ne},{data:ye}]=await Promise.all([W.from("positioning_drafts").select("*").eq("session_id",te),W.from("positioning_answers").select("question_id, answer_value, source, edited").eq("session_id",te)]),Ge={};
4451(ne??[]).forEach(Ie=>Ge[Ie.question_id]=Ie);const st={};return(ye??[]).forEach(Ie=>st[Ie.question_id]=Ie),p(Ge),m(st),{draftMap:Ge,answerMap:st}},[]),B=g.useCallback(async(te,ne)=>{var Ie,St;const ye=await T();if(!ye){C("Not signed in.");return}const st=await(await fetch(`${Y7e}/functions/v1/draft-answers`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${ye}`},body:JSON.stringify({session_id:te,...ne?{question_ids:ne}:{}})})).json();st.success?O(!!st.approval_required):C(((Ie=st.error)==null?void 0:Ie.code)==="missing_api_key"?"AI drafting isn't configured yet — you can still answer every question yourself below.":((St=st.error)==null?void 0:St.message)||"AI drafting failed — you can still answer every question yourself below."),await L(te)},[T,L]);g.useEffect(()=>{let te=!1;return(async()=>{var qe;if(!n||!r){i("unavailable");return}const{data:ne}=await W.auth.getUser();if(te)return;const ye=(qe=ne==null?void 0:ne.user)==null?void 0:qe.id;if(!ye){i("unavailable"),C("Sign in to continue.");return}l(ye);const{data:Ge}=await W.from("positioning_sessions").select("id, approval_required").eq("user_id",ye).eq("module_name",t).maybeSingle();if(te)return;if(!Ge){i("tier1");return}u(Ge.id),O(!!Ge.approval_required);const{data:st}=await W.from("positioning_answers").select("question_id, answer_value").eq("session_id",Ge.id).eq("tier",1),Ie={};if((st??[]).forEach(ln=>Ie[ln.question_id]=ln.answer_value),te)return;if(d(Ie),A.some(ln=>ln.required&&!Ie[ln.id]?!0:(ln.subFields??[]).some(Tt=>Tt.required&&!Ie[Tt.id]))||Object.keys(Ie).length===0){i("tier1");return}const{draftMap:qr}=await L(Ge.id);te||(Object.keys(qr).length===0?(i("generating"),S(!0),await B(Ge.id),te||(S(!1),i("review"))):i("review"))})(),()=>{te=!0}},[n,t]);function H(te,ne){d(ye=>({...ye,[te]:ne}))}const G=A.every(te=>{var ne;return te.required&&!((ne=h[te.id])!=null&&ne.trim())?!1:(te.subFields??[]).every(ye=>{var Ge;return!ye.required||((Ge=h[ye.id])==null?void 0:Ge.trim())})}),Z=g.useCallback(async te=>{var Ge,st;if(!o||!r)return null;let ne=c;if(!ne){if(P.current)return null;P.current=!0;try{const{data:Ie,error:St}=await W.from("positioning_sessions").insert({user_id:o,module_name:t,current_tier:1,max_completed_tier:0,aps_score:0}).select("id").single();if(St||!Ie)return C(`Couldn't save your progress: ${(St==null?void 0:St.message)??"unknown error"}`),null;ne=Ie.id,u(ne)}finally{P.current=!1}}const ye=[];for(const Ie of A){(Ge=te[Ie.id])!=null&&Ge.trim()&&ye.push({session_id:ne,user_id:o,tier:1,question_id:Ie.id,answer_value:te[Ie.id]});for(const St of Ie.subFields??[])(st=te[St.id])!=null&&st.trim()&&ye.push({session_id:ne,user_id:o,tier:1,question_id:St.id,answer_value:te[St.id]})}if(ye.length>0){const{error:Ie}=await W.from("positioning_answers").upsert(ye,{onConflict:"session_id,question_id"});if(Ie)return C(`Couldn't save your progress: ${Ie.message}`),null}return ne},[o,r,c,t,A]);g.useEffect(()=>{if(a!=="tier1"||!Object.values(h).some(ne=>ne==null?void 0:ne.trim()))return;const te=setTimeout(()=>{Z(h).then(ne=>{ne&&(I(!0),setTimeout(()=>I(!1),1500))})},1200);return()=>clearTimeout(te)},[h,a]);async function le(){if(!o||!r)return;C(null);const te=await Z(h);te&&(await W.from("positioning_sessions").update({current_tier:2,max_completed_tier:1}).eq("id",te),i("generating"),S(!0),await B(te),S(!1),i("review"))}async function ue(){$(!0),a==="tier1"&&await Z(h),$(!1),e("/dashboard")}async function re(te){if(!c||!o)return;const ne=f[te.id];if(!ne)return;const{error:ye}=await W.from("positioning_answers").upsert({session_id:c,user_id:o,tier:te.tier,question_id:te.id,answer_value:ne.draft_text,source:"ai_draft",edited:!1},{onConflict:"session_id,question_id"});if(ye){C(`Couldn't save that answer: ${ye.message}`);return}await W.from("positioning_drafts").update({status:"accepted"}).eq("session_id",c).eq("question_id",te.id),await L(c)}async function q(te){for(const ne of te)await re(ne)}function U(te,ne,ye){b(te.id),w(ne),k(ye)}async function Q(te){if(!c||!o)return;const ne=_,ye=ne==="ai_draft",{error:Ge}=await W.from("positioning_answers").upsert({session_id:c,user_id:o,tier:te.tier,question_id:te.id,answer_value:x,source:ne,edited:ye},{onConflict:"session_id,question_id"});if(Ge){C(`Couldn't save that answer: ${Ge.message}`);return}
4451f[te.id]&&await W.from("positioning_drafts").update({status:"edited"}).eq("session_id",c).eq("question_id",te.id),b(null),w(""),await L(c)}function J(){return s.jsxs("div",{className:"sticky top-0 z-10 mb-4 flex items-center justify-between border-b bg-background/95 py-2 backdrop-blur supports-[backdrop-filter]:bg-background/80",children:[s.jsx("span",{className:"text-xs text-muted-foreground",children:R?"Saved.":" "}),s.jsx(z,{size:"sm",variant:"outline",onClick:ue,disabled:D,children:D?"Saving…":"Save & finish later"})]})}if(a==="loading")return s.jsxs("div",{className:"max-w-2xl mx-auto py-16 space-y-4",children:[s.jsx(Ji,{className:"h-8 w-2/3"}),s.jsx(Ji,{className:"h-4 w-full"}),s.jsx(Ji,{className:"h-4 w-full"})]});if(a==="unavailable"||!r)return s.jsxs("div",{className:"max-w-xl mx-auto py-16 text-center space-y-3",children:[s.jsx("h1",{className:"text-xl font-semibold",children:"Positioning Engine v2 isn't available"}),s.jsx("p",{className:"text-muted-foreground text-sm",children:N??"This module doesn't have the v2 flow enabled."}),s.jsx(z,{variant:"outline",onClick:()=>e("/dashboard/positioning"),children:"Go to Positioning"})]});if(a==="tier1")return s.jsxs("div",{className:"max-w-2xl mx-auto py-4 space-y-6",children:[s.jsx(J,{}),s.jsxs("div",{children:[s.jsxs("h1",{className:"text-2xl font-semibold",children:["Fast Start — ",t.replace("_"," ")]}),s.jsx("p",{className:"text-muted-foreground text-sm mt-1",children:"A few quick facts about you and your practice. AI will draft everything else from your answers — nothing gets invented, so the more specific you are here, the better the drafts."})]}),N&&s.jsx("p",{className:"text-sm text-destructive",children:N}),s.jsx("div",{className:"space-y-5",children:A.map(te=>s.jsxs("div",{className:"space-y-2",children:[s.jsxs(X,{htmlFor:te.id,children:[Q7e(te),te.required&&s.jsx("span",{className:"text-destructive",children:" *"})]}),te.helpText&&s.jsx("p",{className:"text-xs text-muted-foreground",children:te.helpText}),te.type==="select"?s.jsxs("select",{id:te.id,className:"w-full border rounded-md h-9 px-3 text-sm bg-background",value:h[te.id]??"",onChange:ne=>H(te.id,ne.target.value),children:[s.jsx("option",{value:"",children:"Select..."}),(te.options??[]).map(ne=>s.jsx("option",{value:ne,children:ne},ne))]}):te.type==="multi_select"?s.jsx("div",{className:"flex flex-wrap gap-2",children:(te.options??[]).map(ne=>{const ye=(h[te.id]??"").split(",").map(st=>st.trim()).filter(Boolean),Ge=ye.includes(ne);return s.jsx("button",{type:"button",onClick:()=>{const st=Ge?ye.filter(Ie=>Ie!==ne):[...ye,ne];H(te.id,st.join(", "))},className:`text-xs rounded-full border px-3 py-1 ${Ge?"bg-primary text-primary-foreground border-primary":"bg-background"}`,children:ne},ne)})}):te.type==="composite"?s.jsx("div",{className:"space-y-3 border rounded-md p-3",children:(te.subFields??[]).map(ne=>s.jsxs("div",{className:"space-y-1",children:[s.jsxs(X,{htmlFor:ne.id,className:"text-xs",children:[ne.label,ne.required&&s.jsx("span",{className:"text-destructive",children:" *"})]}),ne.type==="select"||ne.type==="multi_select"?s.jsxs("select",{id:ne.id,className:"w-full border rounded-md h-8 px-2 text-sm bg-background",value:h[ne.id]??"",onChange:ye=>H(ne.id,ye.target.value),children:[s.jsx("option",{value:"",children:"Select..."}),(ne.options??[]).map(ye=>s.jsx("option",{value:ye,children:ye},ye))]}):s.jsx(ze,{id:ne.id,value:h[ne.id]??"",onChange:ye=>H(ne.id,ye.target.value),placeholder:ne.placeholder})]},ne.id))}):te.type==="number"?s.jsx(ze,{id:te.id,type:"number",value:h[te.id]??"",onChange:ne=>H(te.id,ne.target.value),placeholder:te.placeholder}):s.jsx(ze,{id:te.id,value:h[te.id]??"",onChange:ne=>H(te.id,ne.target.value),placeholder:te.placeholder}),(te.subFields??[]).length===1&&te.type!=="composite"&&(te.type==="select"?h[te.id]:!0)&&s.jsx("div",{className:"pl-3 border-l-2 space-y-1",children:(te.subFields??[]).map(ne=>s.jsxs("div",{children:[s.jsxs(X,{htmlFor:ne.id,className:"text-xs",children:[ne.label,ne.required&&s.jsx("span",{className:"text-destructive",children:" *"})]}),s.jsx(Nt,{id:ne.id,value:h[ne.id]??"",onChange:ye=>H(ne.id,ye.target.value),placeholder:ne.placeholder,rows:2})]},ne.id))})]},te.id))}),s.jsx(z,{disabled:!G,onClick:le,className:"w-full",children:"Continue — draft my answers"})]});if(a==="generating")return s.jsxs("div",{className:"max-w-2xl mx-auto py-4 space-y-4",children:[s.jsx(J,{}),s.jsx("h1",{className:"text-xl font-semibold",children:"Drafting your answers…"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Grounding every draft in what you just told us. This takes a few seconds."}),[1,2,3,4].map(te=>s.jsx(he,{children:s.jsxs(pe,{className:"pt-6 space-y-2",children:[s.jsx(Ji,{className:"h-4 w-1/3"}),s.jsx(Ji,{className:"h-4 w-full"}),s.jsx(Ji,{className:"h-4 w-2/3"})]})},te))]});const Y=E,oe=Y.filter(te=>{var ye;const ne=y[te.id];return ne&&(ne.source==="ai_draft"||ne.source==="user")&&((ye=f[te.id])==null?void 0:ye.status)!=="discarded"}).length;function ve(te){const ne=f[te.id],ye=y[te.id];return(ne==null?void 0:ne.status)==="accepted"||(ne==null?void 0:ne.status)==="edited"||!!(ye&&!ne)}const De=[],Le=[],He=[];
4451for(const te of Y){const ne=J7e(f[te.id]);ne==="ready"?De.push(te):ne==="needs_detail"?Le.push(te):He.push(te)}function vt(te){const ne=y[te.id],ye=((ne==null?void 0:ne.answer_value)??"").trim();return s.jsxs("div",{className:"flex items-start gap-2 py-2 px-3 rounded-md bg-muted/40 text-sm",children:[s.jsx($t,{className:"h-4 w-4 mt-0.5 shrink-0 text-emerald-600 dark:text-emerald-400"}),s.jsx("span",{className:"flex-1 truncate text-muted-foreground",children:ye||te.prompt}),s.jsx(z,{size:"sm",variant:"ghost",className:"h-6 px-2 text-xs shrink-0",onClick:()=>U(te,(ne==null?void 0:ne.answer_value)??"",(ne==null?void 0:ne.source)==="user"?"user":"ai_draft"),children:"Edit"})]},te.id)}function lt(te,ne){const ye=f[te.id],Ge=v===te.id;return s.jsxs(he,{className:ye!=null&&ye.flagged?"border-destructive":void 0,children:[s.jsx(Ce,{className:"pb-2",children:s.jsx(Pe,{className:"text-sm font-medium text-muted-foreground",children:te.prompt})}),s.jsx(pe,{className:"space-y-3",children:Ge?s.jsxs("div",{className:"space-y-2",children:[s.jsx(Nt,{value:x,onChange:st=>w(st.target.value),rows:3,autoFocus:!0}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(z,{size:"sm",onClick:()=>Q(te),children:"Save"}),s.jsx(z,{size:"sm",variant:"ghost",onClick:()=>b(null),children:"Cancel"})]})]}):ne==="write_yourself"?s.jsxs("div",{className:"space-y-2",children:[s.jsx("p",{className:ye!=null&&ye.flagged?"text-sm text-destructive":"text-sm text-muted-foreground",children:ye!=null&&ye.flagged?ye.flag_reason:"Nothing drafted here yet — this one's yours."}),s.jsx(z,{size:"sm",variant:"outline",onClick:()=>U(te,"","user"),children:"Write myself"})]}):s.jsxs("div",{className:"space-y-2",children:[s.jsx("p",{className:"text-sm leading-relaxed",children:s.jsx(X7e,{text:ye.draft_text})}),ye.source_hints.length>0&&s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Drawn from: ",ye.source_hints.join(", ")]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(z,{size:"sm",onClick:()=>re(te),children:"Accept"}),s.jsx(z,{size:"sm",variant:"outline",onClick:()=>U(te,ye.draft_text,"ai_draft"),children:"Edit"}),s.jsx(z,{size:"sm",variant:"ghost",onClick:()=>U(te,"","user"),children:"Write myself"})]})]})})]},te.id)}function Pt(te,ne,ye,Ge){if(ne.length===0)return null;const st=ne.filter(Ie=>!ve(Ie));return s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("h2",{className:"text-sm font-semibold text-muted-foreground uppercase tracking-wide",children:[te," ",s.jsxs("span",{className:"font-normal normal-case",children:["(",ne.length,")"]})]}),Ge&&st.length>0&&s.jsx(z,{size:"sm",variant:"outline",onClick:()=>q(st),children:"Accept all"})]}),s.jsx("div",{className:"space-y-2",children:ne.map(Ie=>ve(Ie)&&v!==Ie.id?vt(Ie):lt(Ie,ye))})]},te)}return s.jsxs("div",{className:"max-w-2xl mx-auto py-4 space-y-6 pb-24",children:[s.jsx(J,{}),s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-semibold",children:"Review your drafts"}),s.jsxs("p",{className:"text-sm text-muted-foreground mt-1",children:[oe,"/",Y.length," answered"]})]}),M&&s.jsx("div",{className:"rounded-md border border-amber-300 bg-amber-50 text-amber-900 text-sm px-3 py-2 dark:bg-amber-950 dark:text-amber-200 dark:border-amber-800",children:"Medicare content in this session routes through approval before publishing."}),N&&s.jsx("p",{className:"text-sm text-destructive",children:N}),s.jsxs("div",{className:"space-y-8",children:[Pt("Ready to accept",De,"ready",!0),Pt("Needs a detail",Le,"needs_detail",!1),Pt("Yours to write",He,"write_yourself",!1)]})]})}const Lu={starter_annual:{planKey:"starter_annual",stripePriceId:"price_starter_annual",displayName:"Starter Tier",headline:"Baseline Authority",cadence:"2 Posts / Week",postsPerWeek:2,annualPosts:104,channels:["LinkedIn","Facebook"],price:"$199.00",priceAmount:199,period:"/ year",billingCycle:"annual",dbTier:"starter",description:"Baseline authority with 2 automated posts per week.",features:["2 Posts / Week (Authority Frameworks)","Scheduled Tuesdays & Thursdays","LinkedIn & Facebook (more platforms coming)","1 Selected Industry PRO Module","Standard SchedulePRO Automation"],popular:!1,ctaText:"Get Starter ($199/yr)"},starter_monthly:{planKey:"starter_monthly",stripePriceId:"price_starter_monthly",displayName:"Starter Tier",headline:"Baseline Authority",cadence:"2 Posts / Week",postsPerWeek:2,annualPosts:104,channels:["LinkedIn","Facebook"],price:"$29.00",priceAmount:29,period:"/ month",billingCycle:"monthly",dbTier:"starter",description:"Baseline authority with 2 automated posts per week.",features:["2 Posts / Week (Authority Frameworks)","Scheduled Tuesdays & Thursdays","LinkedIn & Facebook (more platforms coming)","1 Selected Industry PRO Module","Standard SchedulePRO Automation"],popular:!1,ctaText:"Get Starter ($29/mo)"},pro_annual:{planKey:"pro_annual",stripePriceId:"price_pro_annual",displayName:"Pro Tier",headline:"Active Growth",cadence:"3 Posts / Week",postsPerWeek:3,annualPosts:156,channels:["LinkedIn","Facebook"],price:"$399.00",priceAmount:399,period:"/ year",billingCycle:"annual",dbTier:"pro",description:"Active growth with 3 automated posts per week + TrendsPRO.",features:["3 Posts / Week (156 Annual Posts)","Scheduled Mondays, Wednesdays & Fridays","LinkedIn & Facebook (more platforms coming)","TrendsPRO News Engine","ALL 14 Industry PRO Modules Included","Full InsightsPRO Analytics"],popular:!0,ctaText:"Upgrade to Pro ($399/yr)"},pro_monthly:{planKey:"pro_monthly",stripePriceId:"price_pro_monthly",displayName:"Pro Tier",headline:"Active Growth",cadence:"3 Posts / Week",postsPerWeek:3,annualPosts:156,channels:["LinkedIn","Facebook"],price:"$59.00",priceAmount:59,period:"/ month",billingCycle:"monthly",dbTier:"pro",description:"Active growth with 3 automated posts per week + TrendsPRO.",features:["3 Posts / Week (156 Annual Posts)","Scheduled Mondays, Wednesdays & Fridays","LinkedIn & Facebook (more platforms coming)","TrendsPRO News Engine","ALL 14 Industry PRO Modules Included","Full InsightsPRO Analytics"],popular:!1,ctaText:"Upgrade to Pro ($59/mo)"},dominance_annual:{planKey:"dominance_annual",stripePriceId:"price_dominance_annual",displayName:"Market Dominance",headline:"Daily Dominance",cadence:"7 Posts / Week",postsPerWeek:7,annualPosts:365,channels:["LinkedIn","Facebook","Direct CMS AutoBlogPRO"],price:"$699.00",priceAmount:699,period:"/ year",billingCycle:"annual",dbTier:"dominance",description:"Daily 365 posts on LinkedIn & Facebook.",features:["7 Posts / Week (Daily 365 Posts)","Scheduled Monday through Sunday","LinkedIn & Facebook (more platforms coming) + Direct CMS AutoBlogPRO","Unlimited Custom Generations","Priority VIP AI Generation & Onboarding"],popular:!1,ctaText:"Claim Dominance ($699/yr)"},dominance_monthly:{planKey:"dominance_monthly",stripePriceId:"price_dominance_monthly",displayName:"Market Dominance",headline:"Daily Dominance",cadence:"7 Posts / Week",postsPerWeek:7,annualPosts:365,channels:["LinkedIn","Facebook","Direct CMS AutoBlogPRO"],price:"$99.00",priceAmount:99,period:"/ month",billingCycle:"monthly",dbTier:"dominance",description:"Daily 365 posts on LinkedIn & Facebook.",features:["7 Posts / Week (Daily 365 Posts)","Scheduled Monday through Sunday","LinkedIn & Facebook (more platforms coming) + Direct CMS AutoBlogPRO","Unlimited Custom Generations","Priority VIP AI Generation & Onboarding"],popular:!1,ctaText:"Claim Dominance ($99/mo)"}},dC=[{monthly:Lu.starter_monthly,annual:Lu.starter_annual},{monthly:Lu.pro_monthly,annual:Lu.pro_annual},{monthly:Lu.dominance_monthly,annual:Lu.dominance_annual}],D3=e=>`$${Number.isInteger(e)?e:e.toFixed(2)}`;function eHe(e,t,n){const r=dC.map(a=>a.monthly.priceAmount);return{"@context":"https://schema.org","@graph":[{"@type":"SoftwareApplication",name:`SociePRO ${t}`,applicationCategory:"BusinessApplication",applicationSubCategory:"Social Media Management",operatingSystem:"Web",url:n,description:e.metaDescription,audience:{"@type":"Bu
4451sinessAudience",audienceType:e.audience},publisher:{"@type":"Organization",name:"SociePRO AI",url:Nr},offers:{"@type":"AggregateOffer",priceCurrency:"USD",lowPrice:Math.min(...r),highPrice:Math.max(...r),offerCount:dC.length}},{"@type":"FAQPage",mainEntity:e.faqs.map(a=>({"@type":"Question",name:a.q,acceptedAnswer:{"@type":"Answer",text:a.a}}))},{"@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"SociePRO",item:Nr},{"@type":"ListItem",position:2,name:"Who it's for",item:`${Nr}/for`},{"@type":"ListItem",position:3,name:e.audience,item:n}]}]}}const tHe=()=>{const{slug:e=""}=WP(),t=sfe(e);if(!t)return s.jsx(ic,{to:"/for",replace:!0});const n=_2.find(c=>c.id===t.moduleId),r=(n==null?void 0:n.name)??"SociePRO",a=n==null?void 0:n.icon,i=`${Nr}/for/${t.slug}`,o=rh.filter(c=>c.slug!==t.slug),l=Ds();return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(ar,{title:t.metaTitle,description:t.metaDescription,canonicalUrl:i,ogTitle:t.metaTitle,ogDescription:t.metaDescription,jsonLd:eHe(t,r,i)}),s.jsx(w2,{}),s.jsxs("main",{children:[s.jsx("section",{className:"landing-gradient-hero pt-32 pb-20 lg:pt-40 lg:pb-28","aria-labelledby":"vertical-h1",children:s.jsxs("div",{className:"container px-4 max-w-4xl",children:[s.jsxs("nav",{"aria-label":"Breadcrumb",className:"mb-6 text-sm text-white/50",children:[s.jsx(Oe,{to:"/",className:"hover:text-white",children:"SociePRO"}),s.jsx("span",{className:"mx-2",children:"/"}),s.jsx(Oe,{to:"/for",className:"hover:text-white",children:"Who it's for"}),s.jsx("span",{className:"mx-2",children:"/"}),s.jsx("span",{className:"text-white/70",children:t.audience})]}),s.jsxs("div",{children:[s.jsxs("p",{className:"mb-4 inline-flex items-center gap-2 rounded-full border border-white/15 bg-white/5 px-3 py-1 text-xs font-semibold uppercase tracking-wider text-white/70",children:[a&&s.jsx(a,{className:"h-4 w-4","aria-hidden":"true"}),r," · SociePRO for ",t.audience]}),s.jsx("h1",{id:"vertical-h1",className:"font-display text-4xl font-bold tracking-tight text-white md:text-5xl",children:t.h1}),s.jsx("p",{className:"mt-6 text-lg leading-relaxed text-white/75",children:t.intro}),s.jsxs("div",{className:"mt-8 flex flex-wrap gap-3",children:[!l&&s.jsx(z,{size:"lg",className:"bg-[hsl(106_54%_87%)] text-[hsl(0_0%_6%)] hover:bg-[hsl(106_54%_80%)] font-semibold",asChild:!0,children:s.jsxs("a",{href:"/#modules-title",children:["See plans and get started ",s.jsx(Sr,{className:"ml-1 h-4 w-4","aria-hidden":"true"})]})}),s.jsx(z,{size:"lg",variant:"outline",className:"border-white/25 bg-transparent text-white hover:bg-white/10",asChild:!0,children:s.jsx(Oe,{to:"/authority-positioning-101",children:"Free course: Authority Positioning 101"})})]})]})]})}),s.jsx("section",{className:"py-16 lg:py-20","aria-labelledby":"problems-h2",children:s.jsxs("div",{className:"container px-4 max-w-4xl",children:[s.jsxs("h2",{id:"problems-h2",className:"font-display text-3xl font-bold tracking-tight",children:["What makes marketing hard for a ",t.professional]}),s.jsx("ul",{className:"mt-8 grid gap-3 md:grid-cols-2",children:t.problems.map(c=>s.jsx("li",{className:"rounded-xl border border-border bg-muted/30 p-4 text-foreground/90",children:c},c))}),s.jsxs("p",{className:"mt-6 text-muted-foreground",children:["None of these are skill problems. They're visibility and positioning problems — and consistent, specific content is how ",t.audience.toLowerCase()," solve them without paying for leads."]})]})}),s.jsx("section",{className:"py-16 lg:py-20 bg-muted/30","aria-labelledby":"how-h2",children:s.jsxs("div",{className:"container px-4 max-w-4xl",children:[s.jsxs("h2",{id:"how-h2",className:"font-display text-3xl font-bold tracking-tight",children:["How ",r," works"]}),s.jsxs("ol",{className:"mt-8 grid gap-6 md:grid-cols-3",children:[s.jsxs("li",{className:"rounded-xl border border-border bg-background p-6",children:[s.jsx("p",{className:"text-sm font-semibold text-primary",children:"Step 1"}),s.jsx("h3",{className:"mt-2 text-lg font-semibold",children:"Answer the Authority Positioning Scorecard"}),s.jsxs("p",{className:"mt-2 text-sm text-muted-foreground",children:["A questionnaire written for ",t.audience.toLowerCase(),": your market, the clients you serve, how you work and what you believe. The more you answer, the more specific your content gets."]})]}),s.jsxs("li",{className:"rounded-xl border border-border bg-background p-6",children:[s.jsx("p",{className:"text-sm font-semibold text-primary",children:"Step 2"}),s.jsx("h3",{className:"mt-2 text-lg font-semibold",children:"Get content in your voice"}),s.jsxs("p",{className:"mt-2 text-sm text-muted-foreground",children:[r," generates posts from your answers across authority, trust and community pillars — so two"," ",t.audience.toLowerCase()," using SociePRO don't sound alike."]})]}),s.jsxs("li",{className:"rounded-xl border border-border bg-background p-6",children:[s.jsx("p",{className:"text-sm font-semibold text-primary",children:"Step 3"}),s.jsx("h3",{className:"mt-2 text-lg font-semibold",children:"Schedule your year in one click"}),s.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"ClickPRO fills your calendar and publishes automatically to LinkedIn and Facebook, from two posts a week up to daily, so you stay visible on your busiest weeks."})]})]})]})}),n&&s.jsx("section",{className:"py-16 lg:py-20","aria-labelledby":"topics-h2",children:s.jsxs("div",{className:"container px-4 max-w-4xl",children:[s.jsxs("h2",{id:"topics-h2",className:"font-display text-3xl font-bold tracking-tight",children:["What your ",r," content covers"]}),s.jsx("p",{className:"mt-4 text-muted-foreground",children:n.hook}),s.jsx("div",{className:"mt-8 grid gap-4 md:grid-cols-3",children:n.pillarHighlights.map(c=>s.jsxs("div",{className:"rounded-xl border border-border p-5",children:[s.jsx("p",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:c.type}),s.jsx("h3",{className:"mt-1 font-semibold",children:c.title})]},c.title))}),s.jsx("h3",{className:"mt-10 text-lg font-semibold",children:"Example post topics"}),s.jsx("ul",{className:"mt-4 space-y-2",children:n.samplePrompts.map(c=>
4451s.jsxs("li",{className:"flex gap-2 text-foreground/90",children:[s.jsx($t,{className:"mt-1 h-4 w-4 shrink-0 text-primary","aria-hidden":"true"}),s.jsx("span",{children:c})]},c))})]})}),s.jsx("section",{className:"py-16 lg:py-20 bg-muted/30","aria-labelledby":"guardrails-h2",children:s.jsxs("div",{className:"container px-4 max-w-4xl",children:[s.jsxs("h2",{id:"guardrails-h2",className:"flex items-center gap-3 font-display text-3xl font-bold tracking-tight",children:[s.jsx(ww,{className:"h-8 w-8 text-primary","aria-hidden":"true"}),"Guardrails built for ",t.audience.toLowerCase()]}),s.jsxs("p",{className:"mt-4 text-muted-foreground",children:["Generic AI writing tools don't know your industry's rules. ",r," generates content under rules written for your profession and checks every draft for red-flag language."]}),s.jsx("ul",{className:"mt-6 space-y-3",children:t.guardrails.map(c=>s.jsxs("li",{className:"flex gap-3",children:[s.jsx($t,{className:"mt-1 h-4 w-4 shrink-0 text-primary","aria-hidden":"true"}),s.jsx("span",{children:c})]},c))}),s.jsxs("p",{className:"mt-6 text-sm text-muted-foreground",children:[t.reviewRequired?"Because your industry is regulated, flagged content is held for your review before it publishes. ":"","These checks are a safeguard, not legal or compliance advice — you remain responsible for what you publish."]})]})}),!l&&s.jsx("section",{className:"py-16 lg:py-20","aria-labelledby":"pricing-h2",children:s.jsxs("div",{className:"container px-4 max-w-4xl",children:[s.jsx("h2",{id:"pricing-h2",className:"font-display text-3xl font-bold tracking-tight",children:"Pricing"}),s.jsxs("p",{className:"mt-4 text-muted-foreground",children:["One subscription. Plans differ by how often you post. ",r," is included in every plan."]}),s.jsx("div",{className:"mt-8 grid gap-4 md:grid-cols-3",children:dC.map(({monthly:c,annual:u})=>s.jsxs("div",{className:"rounded-xl border border-border p-6",children:[s.jsx("h3",{className:"text-lg font-semibold",children:c.displayName}),s.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:[c.cadence," · ",c.annualPosts," posts a year"]}),s.jsxs("p",{className:"mt-4 text-3xl font-bold",children:[D3(c.priceAmount),s.jsx("span",{className:"text-base font-normal text-muted-foreground",children:"/month"})]}),s.jsxs("p",{className:"text-sm text-muted-foreground",children:["or ",D3(u.priceAmount),"/year"]})]},c.dbTier))}),s.jsx("div",{className:"mt-8",children:s.jsx(z,{size:"lg",asChild:!0,children:s.jsxs("a",{href:"/#modules-title",children:["Choose your plan ",s.jsx(Sr,{className:"ml-1 h-4 w-4","aria-hidden":"true"})]})})})]})}),s.jsx("section",{className:"py-16 lg:py-20 bg-muted/30","aria-labelledby":"faq-h2",children:s.jsxs("div",{className:"container px-4 max-w-4xl",children:[s.jsxs("h2",{id:"faq-h2",className:"font-display text-3xl font-bold tracking-tight",children:["Questions ",t.audience.toLowerCase()," ask"]}),s.jsx("div",{className:"mt-8 space-y-8",children:t.faqs.map(c=>s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-semibold",children:c.q}),s.jsx("p",{className:"mt-2 leading-relaxed text-foreground/85",children:c.a})]},c.q))})]})}),s.jsx("section",{className:"py-16","aria-labelledby":"others-h2",children:s.jsxs("div",{className:"container px-4 max-w-4xl",children:[s.jsx("h2",{id:"others-h2",className:"font-display text-2xl font-bold tracking-tight",children:"SociePRO for other professions"}),s.jsx("ul",{className:"mt-6 flex flex-wrap gap-2",children:o.map(c=>s.jsx("li",{children:s.jsx(Oe,{to:`/for/${c.slug}`,className:"inline-block rounded-full border border-border px-4 py-2 text-sm hover:bg-muted",children:c.audience})},c.slug))})]})})]}),s.jsx(T2,{})]})},$3=`${Nr}/for`,L3="Who SociePRO Is For | AI Social Media Content by Profession",F3=`SociePRO writes and schedules social media content built for your profession — ${rh.length} industry modules for real estate, finance, insurance, mortgage, trades, hospitality, fitness, coaching, creators and more.`,nHe=()=>{const e=rh.map(t=>({v:t,mod:_2.find(n=>n.id===t.moduleId)}));return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(ar,{title:L3,description:F3,canonicalUrl:$3,jsonLd:{"@context":"https://schema.org","@type":"CollectionPage",name:L3,description:F3,url:$3,hasPart:rh.map(t=>
4451({"@type":"WebPage",name:`SociePRO for ${t.audience}`,url:`${Nr}/for/${t.slug}`}))}}),s.jsx(w2,{}),s.jsxs("main",{children:[s.jsx("section",{className:"landing-gradient-hero pt-32 pb-16 lg:pt-40 lg:pb-20","aria-labelledby":"hub-h1",children:s.jsxs("div",{className:"container px-4 max-w-4xl",children:[s.jsx("h1",{id:"hub-h1",className:"font-display text-4xl font-bold tracking-tight text-white md:text-5xl",children:"Social media content built for your profession"}),s.jsx("p",{className:"mt-6 text-lg leading-relaxed text-white/75",children:"SociePRO is an authority-building content platform. Each industry module knows what credibility looks like in that profession — the topics clients care about and the rules your industry plays by — and turns a short positioning questionnaire into a year of scheduled posts in your voice."})]})}),s.jsx("section",{className:"py-16","aria-label":"Professions",children:s.jsx("div",{className:"container px-4 max-w-6xl",children:s.jsx("ul",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:e.map(({v:t,mod:n})=>{const r=n==null?void 0:n.icon;return s.jsx("li",{children:s.jsxs(Oe,{to:`/for/${t.slug}`,className:"group flex h-full flex-col rounded-xl border border-border p-6 transition-colors hover:bg-muted/40",children:[s.jsxs("span",{className:"flex items-center gap-2 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:[r&&s.jsx(r,{className:"h-4 w-4","aria-hidden":"true"}),n==null?void 0:n.name]}),s.jsx("span",{className:"mt-2 text-xl font-semibold",children:t.audience}),s.jsx("span",{className:"mt-2 flex-1 text-sm text-muted-foreground",children:n==null?void 0:n.tagline}),s.jsxs("span",{className:"mt-4 inline-flex items-center text-sm font-medium text-primary",children:["See how it works ",s.jsx(Sr,{className:"ml-1 h-4 w-4 transition-transform group-hover:translate-x-0.5","aria-hidden":"true"})]})]})},t.slug)})})})})]}),s.jsx(T2,{})]})},rHe=new Dte,aHe=()=>s.jsx(Wte,{client:rHe,children:s.jsx(Zne,{defaultTheme:"system",storageKey:"sociepro-theme",children:s.jsx(qie,{children:s.jsx(zie,{children:s.jsx(Hie,{children:s.jsx(Vie,{children:s.jsxs(OP,{children:[s.jsx(rZ,{}),s.jsx(MZ,{}),s.jsx(Kne,{children:s.jsxs(Wne,{children:[s.jsx(Ze,{path:"/",element:s.jsx(hfe,{})}),s.jsx(Ze,{path:"/auth",element:s.jsx(gfe,{})}),s.jsx(Ze,{path:"/pricing",element:s.jsx(ic,{to:"/",replace:!0})}),s.jsx(Ze,{path:"/upgrade",element:s.jsx(ic,{to:"/",replace:!0})}),s.jsx(Ze,{path:"/start/plan",element:s.jsx(ic,{to:"/",replace:!0})}),s.jsx(Ze,{path:"/start/confirm",element:s.jsx(ic,{to:"/",replace:!0})}),s.jsx(Ze,{path:"/start/module",element:s.jsx(ic,{to:"/",replace:!0})}),s.jsx(Ze,{path:"/onboarding",element:s.jsx(ic,{to:"/",replace:!0})}),s.jsx(Ze,{path:"/authority-positioning-101",element:s.jsx(RUe,{})}),s.jsx(Ze,{path:"/for",element:s.jsx(nHe,{})}),s.jsx(Ze,{path:"/for/:slug",element:s.jsx(tHe,{})}),s.jsx(Ze,{path:"/privacy",element:s.jsx(yfe,{})}),s.jsx(Ze,{path:"/terms",element:s.jsx(vfe,{})}),s.jsx(Ze,{path:"/data-deletion",element:s.jsx(bfe,{})}),s.jsx(Ze,{path:"/dashboard",element:s.jsx(rM,{})}),s.jsx(Ze,{path:"/dashboard/schedule",element:s.jsx(Xxe,{})}),s.jsx(Ze,{path:"/dashboard/templates",element:s.jsx(gwe,{})}),s.jsx(Ze,{path:"/dashboard/settings",element:s.jsx(Wwe,{})}),s.jsx(Ze,{path:"/dashboard/analytics",element:s.jsx(a0e,{})}),s.jsx(Ze,{path:"/dashboard/content-analytics",element:s.jsx(Fqe,{})}),s.jsx(Ze,{path:"/dashboard/autoblog",element:s.jsx(Jqe,{})}),s.jsx(Ze,{path:"/dashboard/positioning",element:s.jsx(wUe,{})}),s.jsx(Ze,{path:"/dashboard/positioning/v2",element:s.jsx(Z7e,{})}),s.jsx(Ze,{path:"/dashboard/prompt-library",element:s.jsx(kUe,{})}),s.jsx(Ze,{path:"/dashboard/courses",element:s.jsx(I3,{})}),s.jsx(Ze,{path:"/dashboard/courses/:slug",element:s.jsx(I3,{})}),s.jsx(Ze,{path:"/dashboard/admin-blog",element:s.jsx(uUe,{})}),s.jsx(Ze,{path:"/blog",element:s.jsx(dUe,{})}),s.jsx(Ze,{path:"/blog/:slug",element:s.jsx(pUe,{})}),s.jsx(Ze,{path:"/reviews",element:s.jsx(yUe,{})}),s.jsx(Ze,{path:"/reviews/new",element:s.jsx(bUe,{})}),s.jsx(Ze,{path:"/billing/processing",element:s.jsx(Wqe,{})}),s.jsx(Ze,{path:"/auth/callback",element:s.jsx(E3,{})}),s.jsx(Ze,{path:"/oauth/callback",element:s.jsx(E3,{})}),s.jsx(Ze,{path:"/oauth/linkedin/callback",element:s.jsx($u,{})}),s.jsx(Ze,{path:"/oauth/meta/callback",element:s.jsx($u,{})}),s.jsx(Ze,{path:"/oauth/threads/callback",element:s.jsx($u,{})}),s.jsx(Ze,{path:"/oauth/linkedin-auth/callback",element:s.jsx(Bqe,{})}),s.jsx(Ze,{path:"/api/auth/callback/linkedin",element:s.jsx($u,{})}),s.jsx(Ze,{path:"/api/auth/meta/callback",element:s.jsx($u,{})}),s.jsx(Ze,{path:"/api/auth/threads/callback",element:s.jsx($u,{})}),s.jsx(Ze,{path:"/dashboard/*",element:s.jsx(rM,{})}),s.jsx(Ze,{path:"*",element:s.jsx(qqe,{})})]})})]})})})})})})});lfe();cF(document.getElementById("root")).render(s.jsx(F.StrictMode,{children:s.jsx(aHe,{})}));
4451"serviceWorker"in navigator&&window.addEventListener("load",()=>{navigator.serviceWorker.register("/sw.js").catch(()=>{})});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.