@ainyc/canonry 1.13.0 → 1.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,245 @@
1
+ function pw(e,n){for(var i=0;i<n.length;i++){const l=n[i];if(typeof l!="string"&&!Array.isArray(l)){for(const o in l)if(o!=="default"&&!(o in e)){const u=Object.getOwnPropertyDescriptor(l,o);u&&Object.defineProperty(e,o,u.get?u:{enumerable:!0,get:()=>l[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))l(o);new MutationObserver(o=>{for(const u of o)if(u.type==="childList")for(const d of u.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&l(d)}).observe(document,{childList:!0,subtree:!0});function i(o){const u={};return o.integrity&&(u.integrity=o.integrity),o.referrerPolicy&&(u.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?u.credentials="include":o.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function l(o){if(o.ep)return;o.ep=!0;const u=i(o);fetch(o.href,u)}})();function x0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ld={exports:{}},Zl={};var ey;function gw(){if(ey)return Zl;ey=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function i(l,o,u){var d=null;if(u!==void 0&&(d=""+u),o.key!==void 0&&(d=""+o.key),"key"in o){u={};for(var m in o)m!=="key"&&(u[m]=o[m])}else u=o;return o=u.ref,{$$typeof:e,type:l,key:d,ref:o!==void 0?o:null,props:u}}return Zl.Fragment=n,Zl.jsx=i,Zl.jsxs=i,Zl}var ty;function yw(){return ty||(ty=1,Ld.exports=gw()),Ld.exports}var c=yw(),Md={exports:{}},ke={};var ny;function vw(){if(ny)return ke;ny=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),d=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),w=Symbol.iterator;function N(C){return C===null||typeof C!="object"?null:(C=w&&C[w]||C["@@iterator"],typeof C=="function"?C:null)}var z={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,k={};function A(C,G,ne){this.props=C,this.context=G,this.refs=k,this.updater=ne||z}A.prototype.isReactComponent={},A.prototype.setState=function(C,G){if(typeof C!="object"&&typeof C!="function"&&C!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,C,G,"setState")},A.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function E(){}E.prototype=A.prototype;function O(C,G,ne){this.props=C,this.context=G,this.refs=k,this.updater=ne||z}var D=O.prototype=new E;D.constructor=O,j(D,A.prototype),D.isPureReactComponent=!0;var M=Array.isArray;function H(){}var V={H:null,A:null,T:null,S:null},L=Object.prototype.hasOwnProperty;function Q(C,G,ne){var F=ne.ref;return{$$typeof:e,type:C,key:G,ref:F!==void 0?F:null,props:ne}}function Se(C,G){return Q(C.type,G,C.props)}function ae(C){return typeof C=="object"&&C!==null&&C.$$typeof===e}function fe(C){var G={"=":"=0",":":"=2"};return"$"+C.replace(/[=:]/g,function(ne){return G[ne]})}var Ae=/\/+/g;function qe(C,G){return typeof C=="object"&&C!==null&&C.key!=null?fe(""+C.key):G.toString(36)}function Le(C){switch(C.status){case"fulfilled":return C.value;case"rejected":throw C.reason;default:switch(typeof C.status=="string"?C.then(H,H):(C.status="pending",C.then(function(G){C.status==="pending"&&(C.status="fulfilled",C.value=G)},function(G){C.status==="pending"&&(C.status="rejected",C.reason=G)})),C.status){case"fulfilled":return C.value;case"rejected":throw C.reason}}throw C}function q(C,G,ne,F,de){var me=typeof C;(me==="undefined"||me==="boolean")&&(C=null);var we=!1;if(C===null)we=!0;else switch(me){case"bigint":case"string":case"number":we=!0;break;case"object":switch(C.$$typeof){case e:case n:we=!0;break;case b:return we=C._init,q(we(C._payload),G,ne,F,de)}}if(we)return de=de(C),we=F===""?"."+qe(C,0):F,M(de)?(ne="",we!=null&&(ne=we.replace(Ae,"$&/")+"/"),q(de,G,ne,"",function(Ze){return Ze})):de!=null&&(ae(de)&&(de=Se(de,ne+(de.key==null||C&&C.key===de.key?"":(""+de.key).replace(Ae,"$&/")+"/")+we)),G.push(de)),1;we=0;var U=F===""?".":F+":";if(M(C))for(var se=0;se<C.length;se++)F=C[se],me=U+qe(F,se),we+=q(F,G,ne,me,de);else if(se=N(C),typeof se=="function")for(C=se.call(C),se=0;!(F=C.next()).done;)F=F.value,me=U+qe(F,se++),we+=q(F,G,ne,me,de);else if(me==="object"){if(typeof C.then=="function")return q(Le(C),G,ne,F,de);throw G=String(C),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(C).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return we}function K(C,G,ne){if(C==null)return C;var F=[],de=0;return q(C,F,"","",function(me){return G.call(ne,me,de++)}),F}function ie(C){if(C._status===-1){var G=C._result;G=G(),G.then(function(ne){(C._status===0||C._status===-1)&&(C._status=1,C._result=ne)},function(ne){(C._status===0||C._status===-1)&&(C._status=2,C._result=ne)}),C._status===-1&&(C._status=0,C._result=G)}if(C._status===1)return C._result.default;throw C._result}var he=typeof reportError=="function"?reportError:function(C){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof C=="object"&&C!==null&&typeof C.message=="string"?String(C.message):String(C),error:C});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",C);return}console.error(C)},te={map:K,forEach:function(C,G,ne){K(C,function(){G.apply(this,arguments)},ne)},count:function(C){var G=0;return K(C,function(){G++}),G},toArray:function(C){return K(C,function(G){return G})||[]},only:function(C){if(!ae(C))throw Error("React.Children.only expected to receive a single React element child.");return C}};return ke.Activity=v,ke.Children=te,ke.Component=A,ke.Fragment=i,ke.Profiler=o,ke.PureComponent=O,ke.StrictMode=l,ke.Suspense=g,ke.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=V,ke.__COMPILER_RUNTIME={__proto__:null,c:function(C){return V.H.useMemoCache(C)}},ke.cache=function(C){return function(){return C.apply(null,arguments)}},ke.cacheSignal=function(){return null},ke.cloneElement=function(C,G,ne){if(C==null)throw Error("The argument must be a React element, but you passed "+C+".");var F=j({},C.props),de=C.key;if(G!=null)for(me in G.key!==void 0&&(de=""+G.key),G)!L.call(G,me)||me==="key"||me==="__self"||me==="__source"||me==="ref"&&G.ref===void 0||(F[me]=G[me]);var me=arguments.length-2;if(me===1)F.children=ne;else if(1<me){for(var we=Array(me),U=0;U<me;U++)we[U]=arguments[U+2];F.children=we}return Q(C.type,de,F)},ke.createContext=function(C){return C={$$typeof:d,_currentValue:C,_currentValue2:C,_threadCount:0,Provider:null,Consumer:null},C.Provider=C,C.Consumer={$$typeof:u,_context:C},C},ke.createElement=function(C,G,ne){var F,de={},me=null;if(G!=null)for(F in G.key!==void 0&&(me=""+G.key),G)L.call(G,F)&&F!=="key"&&F!=="__self"&&F!=="__source"&&(de[F]=G[F]);var we=arguments.length-2;if(we===1)de.children=ne;else if(1<we){for(var U=Array(we),se=0;se<we;se++)U[se]=arguments[se+2];de.children=U}if(C&&C.defaultProps)for(F in we=C.defaultProps,we)de[F]===void 0&&(de[F]=we[F]);return Q(C,me,de)},ke.createRef=function(){return{current:null}},ke.forwardRef=function(C){return{$$typeof:m,render:C}},ke.isValidElement=ae,ke.lazy=function(C){return{$$typeof:b,_payload:{_status:-1,_result:C},_init:ie}},ke.memo=function(C,G){return{$$typeof:p,type:C,compare:G===void 0?null:G}},ke.startTransition=function(C){var G=V.T,ne={};V.T=ne;try{var F=C(),de=V.S;de!==null&&de(ne,F),typeof F=="object"&&F!==null&&typeof F.then=="function"&&F.then(H,he)}catch(me){he(me)}finally{G!==null&&ne.types!==null&&(G.types=ne.types),V.T=G}},ke.unstable_useCacheRefresh=function(){return V.H.useCacheRefresh()},ke.use=function(C){return V.H.use(C)},ke.useActionState=function(C,G,ne){return V.H.useActionState(C,G,ne)},ke.useCallback=function(C,G){return V.H.useCallback(C,G)},ke.useContext=function(C){return V.H.useContext(C)},ke.useDebugValue=function(){},ke.useDeferredValue=function(C,G){return V.H.useDeferredValue(C,G)},ke.useEffect=function(C,G){return V.H.useEffect(C,G)},ke.useEffectEvent=function(C){return V.H.useEffectEvent(C)},ke.useId=function(){return V.H.useId()},ke.useImperativeHandle=function(C,G,ne){return V.H.useImperativeHandle(C,G,ne)},ke.useInsertionEffect=function(C,G){return V.H.useInsertionEffect(C,G)},ke.useLayoutEffect=function(C,G){return V.H.useLayoutEffect(C,G)},ke.useMemo=function(C,G){return V.H.useMemo(C,G)},ke.useOptimistic=function(C,G){return V.H.useOptimistic(C,G)},ke.useReducer=function(C,G,ne){return V.H.useReducer(C,G,ne)},ke.useRef=function(C){return V.H.useRef(C)},ke.useState=function(C){return V.H.useState(C)},ke.useSyncExternalStore=function(C,G,ne){return V.H.useSyncExternalStore(C,G,ne)},ke.useTransition=function(){return V.H.useTransition()},ke.version="19.2.4",ke}var sy;function Nf(){return sy||(sy=1,Md.exports=vw()),Md.exports}var x=Nf();const bw=x0(x),kf=pw({__proto__:null,default:bw},[x]);var $d={exports:{}},Hl={},Ud={exports:{}},Bd={};var iy;function xw(){return iy||(iy=1,(function(e){function n(q,K){var ie=q.length;q.push(K);e:for(;0<ie;){var he=ie-1>>>1,te=q[he];if(0<o(te,K))q[he]=K,q[ie]=te,ie=he;else break e}}function i(q){return q.length===0?null:q[0]}function l(q){if(q.length===0)return null;var K=q[0],ie=q.pop();if(ie!==K){q[0]=ie;e:for(var he=0,te=q.length,C=te>>>1;he<C;){var G=2*(he+1)-1,ne=q[G],F=G+1,de=q[F];if(0>o(ne,ie))F<te&&0>o(de,ne)?(q[he]=de,q[F]=ie,he=F):(q[he]=ne,q[G]=ie,he=G);else if(F<te&&0>o(de,ie))q[he]=de,q[F]=ie,he=F;else break e}}return K}function o(q,K){var ie=q.sortIndex-K.sortIndex;return ie!==0?ie:q.id-K.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var d=Date,m=d.now();e.unstable_now=function(){return d.now()-m}}var g=[],p=[],b=1,v=null,w=3,N=!1,z=!1,j=!1,k=!1,A=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;function D(q){for(var K=i(p);K!==null;){if(K.callback===null)l(p);else if(K.startTime<=q)l(p),K.sortIndex=K.expirationTime,n(g,K);else break;K=i(p)}}function M(q){if(j=!1,D(q),!z)if(i(g)!==null)z=!0,H||(H=!0,fe());else{var K=i(p);K!==null&&Le(M,K.startTime-q)}}var H=!1,V=-1,L=5,Q=-1;function Se(){return k?!0:!(e.unstable_now()-Q<L)}function ae(){if(k=!1,H){var q=e.unstable_now();Q=q;var K=!0;try{e:{z=!1,j&&(j=!1,E(V),V=-1),N=!0;var ie=w;try{t:{for(D(q),v=i(g);v!==null&&!(v.expirationTime>q&&Se());){var he=v.callback;if(typeof he=="function"){v.callback=null,w=v.priorityLevel;var te=he(v.expirationTime<=q);if(q=e.unstable_now(),typeof te=="function"){v.callback=te,D(q),K=!0;break t}v===i(g)&&l(g),D(q)}else l(g);v=i(g)}if(v!==null)K=!0;else{var C=i(p);C!==null&&Le(M,C.startTime-q),K=!1}}break e}finally{v=null,w=ie,N=!1}K=void 0}}finally{K?fe():H=!1}}}var fe;if(typeof O=="function")fe=function(){O(ae)};else if(typeof MessageChannel<"u"){var Ae=new MessageChannel,qe=Ae.port2;Ae.port1.onmessage=ae,fe=function(){qe.postMessage(null)}}else fe=function(){A(ae,0)};function Le(q,K){V=A(function(){q(e.unstable_now())},K)}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(q){q.callback=null},e.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<q?Math.floor(1e3/q):5},e.unstable_getCurrentPriorityLevel=function(){return w},e.unstable_next=function(q){switch(w){case 1:case 2:case 3:var K=3;break;default:K=w}var ie=w;w=K;try{return q()}finally{w=ie}},e.unstable_requestPaint=function(){k=!0},e.unstable_runWithPriority=function(q,K){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var ie=w;w=q;try{return K()}finally{w=ie}},e.unstable_scheduleCallback=function(q,K,ie){var he=e.unstable_now();switch(typeof ie=="object"&&ie!==null?(ie=ie.delay,ie=typeof ie=="number"&&0<ie?he+ie:he):ie=he,q){case 1:var te=-1;break;case 2:te=250;break;case 5:te=1073741823;break;case 4:te=1e4;break;default:te=5e3}return te=ie+te,q={id:b++,callback:K,priorityLevel:q,startTime:ie,expirationTime:te,sortIndex:-1},ie>he?(q.sortIndex=ie,n(p,q),i(g)===null&&q===i(p)&&(j?(E(V),V=-1):j=!0,Le(M,ie-he))):(q.sortIndex=te,n(g,q),z||N||(z=!0,H||(H=!0,fe()))),q},e.unstable_shouldYield=Se,e.unstable_wrapCallback=function(q){var K=w;return function(){var ie=w;w=K;try{return q.apply(this,arguments)}finally{w=ie}}}})(Bd)),Bd}var ay;function Sw(){return ay||(ay=1,Ud.exports=xw()),Ud.exports}var Id={exports:{}},tn={};var ly;function ww(){if(ly)return tn;ly=1;var e=Nf();function n(g){var p="https://react.dev/errors/"+g;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)p+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+g+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var l={d:{f:i,r:function(){throw Error(n(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for("react.portal");function u(g,p,b){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:v==null?null:""+v,children:g,containerInfo:p,implementation:b}}var d=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(g,p){if(g==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return tn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=l,tn.createPortal=function(g,p){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(n(299));return u(g,p,null,b)},tn.flushSync=function(g){var p=d.T,b=l.p;try{if(d.T=null,l.p=2,g)return g()}finally{d.T=p,l.p=b,l.d.f()}},tn.preconnect=function(g,p){typeof g=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,l.d.C(g,p))},tn.prefetchDNS=function(g){typeof g=="string"&&l.d.D(g)},tn.preinit=function(g,p){if(typeof g=="string"&&p&&typeof p.as=="string"){var b=p.as,v=m(b,p.crossOrigin),w=typeof p.integrity=="string"?p.integrity:void 0,N=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;b==="style"?l.d.S(g,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:v,integrity:w,fetchPriority:N}):b==="script"&&l.d.X(g,{crossOrigin:v,integrity:w,fetchPriority:N,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},tn.preinitModule=function(g,p){if(typeof g=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var b=m(p.as,p.crossOrigin);l.d.M(g,{crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&l.d.M(g)},tn.preload=function(g,p){if(typeof g=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var b=p.as,v=m(b,p.crossOrigin);l.d.L(g,b,{crossOrigin:v,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},tn.preloadModule=function(g,p){if(typeof g=="string")if(p){var b=m(p.as,p.crossOrigin);l.d.m(g,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else l.d.m(g)},tn.requestFormReset=function(g){l.d.r(g)},tn.unstable_batchedUpdates=function(g,p){return g(p)},tn.useFormState=function(g,p,b){return d.H.useFormState(g,p,b)},tn.useFormStatus=function(){return d.H.useHostTransitionStatus()},tn.version="19.2.4",tn}var ry;function S0(){if(ry)return Id.exports;ry=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),Id.exports=ww(),Id.exports}var oy;function jw(){if(oy)return Hl;oy=1;var e=Sw(),n=Nf(),i=S0();function l(t){var s="https://react.dev/errors/"+t;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)s+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+t+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function u(t){var s=t,a=t;if(t.alternate)for(;s.return;)s=s.return;else{t=s;do s=t,(s.flags&4098)!==0&&(a=s.return),t=s.return;while(t)}return s.tag===3?a:null}function d(t){if(t.tag===13){var s=t.memoizedState;if(s===null&&(t=t.alternate,t!==null&&(s=t.memoizedState)),s!==null)return s.dehydrated}return null}function m(t){if(t.tag===31){var s=t.memoizedState;if(s===null&&(t=t.alternate,t!==null&&(s=t.memoizedState)),s!==null)return s.dehydrated}return null}function g(t){if(u(t)!==t)throw Error(l(188))}function p(t){var s=t.alternate;if(!s){if(s=u(t),s===null)throw Error(l(188));return s!==t?null:t}for(var a=t,r=s;;){var f=a.return;if(f===null)break;var h=f.alternate;if(h===null){if(r=f.return,r!==null){a=r;continue}break}if(f.child===h.child){for(h=f.child;h;){if(h===a)return g(f),t;if(h===r)return g(f),s;h=h.sibling}throw Error(l(188))}if(a.return!==r.return)a=f,r=h;else{for(var y=!1,S=f.child;S;){if(S===a){y=!0,a=f,r=h;break}if(S===r){y=!0,r=f,a=h;break}S=S.sibling}if(!y){for(S=h.child;S;){if(S===a){y=!0,a=h,r=f;break}if(S===r){y=!0,r=h,a=f;break}S=S.sibling}if(!y)throw Error(l(189))}}if(a.alternate!==r)throw Error(l(190))}if(a.tag!==3)throw Error(l(188));return a.stateNode.current===a?t:s}function b(t){var s=t.tag;if(s===5||s===26||s===27||s===6)return t;for(t=t.child;t!==null;){if(s=b(t),s!==null)return s;t=t.sibling}return null}var v=Object.assign,w=Symbol.for("react.element"),N=Symbol.for("react.transitional.element"),z=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),O=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),H=Symbol.for("react.suspense_list"),V=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),Q=Symbol.for("react.activity"),Se=Symbol.for("react.memo_cache_sentinel"),ae=Symbol.iterator;function fe(t){return t===null||typeof t!="object"?null:(t=ae&&t[ae]||t["@@iterator"],typeof t=="function"?t:null)}var Ae=Symbol.for("react.client.reference");function qe(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===Ae?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case j:return"Fragment";case A:return"Profiler";case k:return"StrictMode";case M:return"Suspense";case H:return"SuspenseList";case Q:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case z:return"Portal";case O:return t.displayName||"Context";case E:return(t._context.displayName||"Context")+".Consumer";case D:var s=t.render;return t=t.displayName,t||(t=s.displayName||s.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case V:return s=t.displayName||null,s!==null?s:qe(t.type)||"Memo";case L:s=t._payload,t=t._init;try{return qe(t(s))}catch{}}return null}var Le=Array.isArray,q=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ie={pending:!1,data:null,method:null,action:null},he=[],te=-1;function C(t){return{current:t}}function G(t){0>te||(t.current=he[te],he[te]=null,te--)}function ne(t,s){te++,he[te]=t.current,t.current=s}var F=C(null),de=C(null),me=C(null),we=C(null);function U(t,s){switch(ne(me,s),ne(de,t),ne(F,null),s.nodeType){case 9:case 11:t=(t=s.documentElement)&&(t=t.namespaceURI)?jg(t):0;break;default:if(t=s.tagName,s=s.namespaceURI)s=jg(s),t=Ng(s,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}G(F),ne(F,t)}function se(){G(F),G(de),G(me)}function Ze(t){t.memoizedState!==null&&ne(we,t);var s=F.current,a=Ng(s,t.type);s!==a&&(ne(de,t),ne(F,a))}function re(t){de.current===t&&(G(F),G(de)),we.current===t&&(G(we),Ul._currentValue=ie)}var Ie,Ut;function ft(t){if(Ie===void 0)try{throw Error()}catch(a){var s=a.stack.trim().match(/\n( *(at )?)/);Ie=s&&s[1]||"",Ut=-1<a.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+Ie+t+Ut}var At=!1;function In(t,s){if(!t||At)return"";At=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(s){var W=function(){throw Error()};if(Object.defineProperty(W.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(W,[])}catch(Y){var Z=Y}Reflect.construct(t,[],W)}else{try{W.call()}catch(Y){Z=Y}t.call(W.prototype)}}else{try{throw Error()}catch(Y){Z=Y}(W=t())&&typeof W.catch=="function"&&W.catch(function(){})}}catch(Y){if(Y&&Z&&typeof Y.stack=="string")return[Y.stack,Z.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var h=r.DetermineComponentFrameRoot(),y=h[0],S=h[1];if(y&&S){var _=y.split(`
4
+ `),I=S.split(`
5
+ `);for(f=r=0;r<_.length&&!_[r].includes("DetermineComponentFrameRoot");)r++;for(;f<I.length&&!I[f].includes("DetermineComponentFrameRoot");)f++;if(r===_.length||f===I.length)for(r=_.length-1,f=I.length-1;1<=r&&0<=f&&_[r]!==I[f];)f--;for(;1<=r&&0<=f;r--,f--)if(_[r]!==I[f]){if(r!==1||f!==1)do if(r--,f--,0>f||_[r]!==I[f]){var P=`
6
+ `+_[r].replace(" at new "," at ");return t.displayName&&P.includes("<anonymous>")&&(P=P.replace("<anonymous>",t.displayName)),P}while(1<=r&&0<=f);break}}}finally{At=!1,Error.prepareStackTrace=a}return(a=t?t.displayName||t.name:"")?ft(a):""}function as(t,s){switch(t.tag){case 26:case 27:case 5:return ft(t.type);case 16:return ft("Lazy");case 13:return t.child!==s&&s!==null?ft("Suspense Fallback"):ft("Suspense");case 19:return ft("SuspenseList");case 0:case 15:return In(t.type,!1);case 11:return In(t.type.render,!1);case 1:return In(t.type,!0);case 31:return ft("Activity");default:return""}}function Nn(t){try{var s="",a=null;do s+=as(t,a),a=t,t=t.return;while(t);return s}catch(r){return`
7
+ Error generating stack: `+r.message+`
8
+ `+r.stack}}var Ft=Object.prototype.hasOwnProperty,ht=e.unstable_scheduleCallback,Yt=e.unstable_cancelCallback,Xn=e.unstable_shouldYield,Jn=e.unstable_requestPaint,Tt=e.unstable_now,oe=e.unstable_getCurrentPriorityLevel,Oe=e.unstable_ImmediatePriority,Bt=e.unstable_UserBlockingPriority,nt=e.unstable_NormalPriority,rn=e.unstable_LowPriority,ce=e.unstable_IdlePriority,pn=e.log,lr=e.unstable_setDisableYieldValue,Qe=null,Wt=null;function xt(t){if(typeof pn=="function"&&lr(t),Wt&&typeof Wt.setStrictMode=="function")try{Wt.setStrictMode(Qe,t)}catch{}}var Ee=Math.clz32?Math.clz32:Ja,zc=Math.log,rr=Math.LN2;function Ja(t){return t>>>=0,t===0?32:31-(zc(t)/rr|0)|0}var ls=256,hi=262144,rs=4194304;function Fn(t){var s=t&42;if(s!==0)return s;switch(t&-t){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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Hi(t,s,a){var r=t.pendingLanes;if(r===0)return 0;var f=0,h=t.suspendedLanes,y=t.pingedLanes;t=t.warmLanes;var S=r&134217727;return S!==0?(r=S&~h,r!==0?f=Fn(r):(y&=S,y!==0?f=Fn(y):a||(a=S&~t,a!==0&&(f=Fn(a))))):(S=r&~h,S!==0?f=Fn(S):y!==0?f=Fn(y):a||(a=r&~t,a!==0&&(f=Fn(a)))),f===0?0:s!==0&&s!==f&&(s&h)===0&&(h=f&-f,a=s&-s,h>=a||h===32&&(a&4194048)!==0)?s:f}function Ts(t,s){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&s)===0}function _c(t,s){switch(t){case 1:case 2:case 4:case 8:case 64:return s+250;case 16:case 32: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 s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function or(){var t=rs;return rs<<=1,(rs&62914560)===0&&(rs=4194304),t}function Fa(t){for(var s=[],a=0;31>a;a++)s.push(t);return s}function mi(t,s){t.pendingLanes|=s,s!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function cr(t,s,a,r,f,h){var y=t.pendingLanes;t.pendingLanes=a,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=a,t.entangledLanes&=a,t.errorRecoveryDisabledLanes&=a,t.shellSuspendCounter=0;var S=t.entanglements,_=t.expirationTimes,I=t.hiddenUpdates;for(a=y&~a;0<a;){var P=31-Ee(a),W=1<<P;S[P]=0,_[P]=-1;var Z=I[P];if(Z!==null)for(I[P]=null,P=0;P<Z.length;P++){var Y=Z[P];Y!==null&&(Y.lane&=-536870913)}a&=~W}r!==0&&R(t,r,0),h!==0&&f===0&&t.tag!==0&&(t.suspendedLanes|=h&~(y&~s))}function R(t,s,a){t.pendingLanes|=s,t.suspendedLanes&=~s;var r=31-Ee(s);t.entangledLanes|=s,t.entanglements[r]=t.entanglements[r]|1073741824|a&261930}function le(t,s){var a=t.entangledLanes|=s;for(t=t.entanglements;a;){var r=31-Ee(a),f=1<<r;f&s|t[r]&s&&(t[r]|=s),a&=~f}}function Ve(t,s){var a=s&-s;return a=(a&42)!==0?1:Me(a),(a&(t.suspendedLanes|s))!==0?0:a}function Me(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function jt(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function it(){var t=K.p;return t!==0?t:(t=window.event,t===void 0?32:Vg(t.type))}function at(t,s){var a=K.p;try{return K.p=t,s()}finally{K.p=a}}var It=Math.random().toString(36).slice(2),Ke="__reactFiber$"+It,Nt="__reactProps$"+It,rt="__reactContainer$"+It,qt="__reactEvents$"+It,Wa="__reactListeners$"+It,mt="__reactHandles$"+It,en="__reactResources$"+It,os="__reactMarker$"+It;function pi(t){delete t[Ke],delete t[Nt],delete t[qt],delete t[Wa],delete t[mt]}function Gi(t){var s=t[Ke];if(s)return s;for(var a=t.parentNode;a;){if(s=a[rt]||a[Ke]){if(a=s.alternate,s.child!==null||a!==null&&a.child!==null)for(t=Tg(t);t!==null;){if(a=t[Ke])return a;t=Tg(t)}return s}t=a,a=t.parentNode}return null}function Ki(t){if(t=t[Ke]||t[rt]){var s=t.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return t}return null}function el(t){var s=t.tag;if(s===5||s===26||s===27||s===6)return t.stateNode;throw Error(l(33))}function Yi(t){var s=t[en];return s||(s=t[en]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function Gt(t){t[os]=!0}var dh=new Set,fh={};function gi(t,s){Vi(t,s),Vi(t+"Capture",s)}function Vi(t,s){for(fh[t]=s,t=0;t<s.length;t++)dh.add(s[t])}var lx=RegExp("^[: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]*$"),hh={},mh={};function rx(t){return Ft.call(mh,t)?!0:Ft.call(hh,t)?!1:lx.test(t)?mh[t]=!0:(hh[t]=!0,!1)}function ur(t,s,a){if(rx(s))if(a===null)t.removeAttribute(s);else{switch(typeof a){case"undefined":case"function":case"symbol":t.removeAttribute(s);return;case"boolean":var r=s.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){t.removeAttribute(s);return}}t.setAttribute(s,""+a)}}function dr(t,s,a){if(a===null)t.removeAttribute(s);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(s);return}t.setAttribute(s,""+a)}}function cs(t,s,a,r){if(r===null)t.removeAttribute(a);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(a);return}t.setAttributeNS(s,a,""+r)}}function kn(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function ph(t){var s=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function ox(t,s,a){var r=Object.getOwnPropertyDescriptor(t.constructor.prototype,s);if(!t.hasOwnProperty(s)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var f=r.get,h=r.set;return Object.defineProperty(t,s,{configurable:!0,get:function(){return f.call(this)},set:function(y){a=""+y,h.call(this,y)}}),Object.defineProperty(t,s,{enumerable:r.enumerable}),{getValue:function(){return a},setValue:function(y){a=""+y},stopTracking:function(){t._valueTracker=null,delete t[s]}}}}function Cc(t){if(!t._valueTracker){var s=ph(t)?"checked":"value";t._valueTracker=ox(t,s,""+t[s])}}function gh(t){if(!t)return!1;var s=t._valueTracker;if(!s)return!0;var a=s.getValue(),r="";return t&&(r=ph(t)?t.checked?"true":"false":t.value),t=r,t!==a?(s.setValue(t),!0):!1}function fr(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var cx=/[\n"\\]/g;function zn(t){return t.replace(cx,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function Ec(t,s,a,r,f,h,y,S){t.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?t.type=y:t.removeAttribute("type"),s!=null?y==="number"?(s===0&&t.value===""||t.value!=s)&&(t.value=""+kn(s)):t.value!==""+kn(s)&&(t.value=""+kn(s)):y!=="submit"&&y!=="reset"||t.removeAttribute("value"),s!=null?Ac(t,y,kn(s)):a!=null?Ac(t,y,kn(a)):r!=null&&t.removeAttribute("value"),f==null&&h!=null&&(t.defaultChecked=!!h),f!=null&&(t.checked=f&&typeof f!="function"&&typeof f!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?t.name=""+kn(S):t.removeAttribute("name")}function yh(t,s,a,r,f,h,y,S){if(h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(t.type=h),s!=null||a!=null){if(!(h!=="submit"&&h!=="reset"||s!=null)){Cc(t);return}a=a!=null?""+kn(a):"",s=s!=null?""+kn(s):a,S||s===t.value||(t.value=s),t.defaultValue=s}r=r??f,r=typeof r!="function"&&typeof r!="symbol"&&!!r,t.checked=S?t.checked:!!r,t.defaultChecked=!!r,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(t.name=y),Cc(t)}function Ac(t,s,a){s==="number"&&fr(t.ownerDocument)===t||t.defaultValue===""+a||(t.defaultValue=""+a)}function Pi(t,s,a,r){if(t=t.options,s){s={};for(var f=0;f<a.length;f++)s["$"+a[f]]=!0;for(a=0;a<t.length;a++)f=s.hasOwnProperty("$"+t[a].value),t[a].selected!==f&&(t[a].selected=f),f&&r&&(t[a].defaultSelected=!0)}else{for(a=""+kn(a),s=null,f=0;f<t.length;f++){if(t[f].value===a){t[f].selected=!0,r&&(t[f].defaultSelected=!0);return}s!==null||t[f].disabled||(s=t[f])}s!==null&&(s.selected=!0)}}function vh(t,s,a){if(s!=null&&(s=""+kn(s),s!==t.value&&(t.value=s),a==null)){t.defaultValue!==s&&(t.defaultValue=s);return}t.defaultValue=a!=null?""+kn(a):""}function bh(t,s,a,r){if(s==null){if(r!=null){if(a!=null)throw Error(l(92));if(Le(r)){if(1<r.length)throw Error(l(93));r=r[0]}a=r}a==null&&(a=""),s=a}a=kn(s),t.defaultValue=a,r=t.textContent,r===a&&r!==""&&r!==null&&(t.value=r),Cc(t)}function Qi(t,s){if(s){var a=t.firstChild;if(a&&a===t.lastChild&&a.nodeType===3){a.nodeValue=s;return}}t.textContent=s}var ux=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function xh(t,s,a){var r=s.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?r?t.setProperty(s,""):s==="float"?t.cssFloat="":t[s]="":r?t.setProperty(s,a):typeof a!="number"||a===0||ux.has(s)?s==="float"?t.cssFloat=a:t[s]=(""+a).trim():t[s]=a+"px"}function Sh(t,s,a){if(s!=null&&typeof s!="object")throw Error(l(62));if(t=t.style,a!=null){for(var r in a)!a.hasOwnProperty(r)||s!=null&&s.hasOwnProperty(r)||(r.indexOf("--")===0?t.setProperty(r,""):r==="float"?t.cssFloat="":t[r]="");for(var f in s)r=s[f],s.hasOwnProperty(f)&&a[f]!==r&&xh(t,f,r)}else for(var h in s)s.hasOwnProperty(h)&&xh(t,h,s[h])}function Tc(t){if(t.indexOf("-")===-1)return!1;switch(t){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 dx=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),fx=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function hr(t){return fx.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function us(){}var Oc=null;function Dc(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Xi=null,Ji=null;function wh(t){var s=Ki(t);if(s&&(t=s.stateNode)){var a=t[Nt]||null;e:switch(t=s.stateNode,s.type){case"input":if(Ec(t,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),s=a.name,a.type==="radio"&&s!=null){for(a=t;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+zn(""+s)+'"][type="radio"]'),s=0;s<a.length;s++){var r=a[s];if(r!==t&&r.form===t.form){var f=r[Nt]||null;if(!f)throw Error(l(90));Ec(r,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(s=0;s<a.length;s++)r=a[s],r.form===t.form&&gh(r)}break e;case"textarea":vh(t,a.value,a.defaultValue);break e;case"select":s=a.value,s!=null&&Pi(t,!!a.multiple,s,!1)}}}var Rc=!1;function jh(t,s,a){if(Rc)return t(s,a);Rc=!0;try{var r=t(s);return r}finally{if(Rc=!1,(Xi!==null||Ji!==null)&&(eo(),Xi&&(s=Xi,t=Ji,Ji=Xi=null,wh(s),t)))for(s=0;s<t.length;s++)wh(t[s])}}function tl(t,s){var a=t.stateNode;if(a===null)return null;var r=a[Nt]||null;if(r===null)return null;a=r[s];e:switch(s){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)||(t=t.type,r=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!r;break e;default:t=!1}if(t)return null;if(a&&typeof a!="function")throw Error(l(231,s,typeof a));return a}var ds=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Lc=!1;if(ds)try{var nl={};Object.defineProperty(nl,"passive",{get:function(){Lc=!0}}),window.addEventListener("test",nl,nl),window.removeEventListener("test",nl,nl)}catch{Lc=!1}var Os=null,Mc=null,mr=null;function Nh(){if(mr)return mr;var t,s=Mc,a=s.length,r,f="value"in Os?Os.value:Os.textContent,h=f.length;for(t=0;t<a&&s[t]===f[t];t++);var y=a-t;for(r=1;r<=y&&s[a-r]===f[h-r];r++);return mr=f.slice(t,1<r?1-r:void 0)}function pr(t){var s=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&s===13&&(t=13)):t=s,t===10&&(t=13),32<=t||t===13?t:0}function gr(){return!0}function kh(){return!1}function on(t){function s(a,r,f,h,y){this._reactName=a,this._targetInst=f,this.type=r,this.nativeEvent=h,this.target=y,this.currentTarget=null;for(var S in t)t.hasOwnProperty(S)&&(a=t[S],this[S]=a?a(h):h[S]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?gr:kh,this.isPropagationStopped=kh,this}return v(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=gr)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=gr)},persist:function(){},isPersistent:gr}),s}var yi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},yr=on(yi),sl=v({},yi,{view:0,detail:0}),hx=on(sl),$c,Uc,il,vr=v({},sl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ic,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==il&&(il&&t.type==="mousemove"?($c=t.screenX-il.screenX,Uc=t.screenY-il.screenY):Uc=$c=0,il=t),$c)},movementY:function(t){return"movementY"in t?t.movementY:Uc}}),zh=on(vr),mx=v({},vr,{dataTransfer:0}),px=on(mx),gx=v({},sl,{relatedTarget:0}),Bc=on(gx),yx=v({},yi,{animationName:0,elapsedTime:0,pseudoElement:0}),vx=on(yx),bx=v({},yi,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),xx=on(bx),Sx=v({},yi,{data:0}),_h=on(Sx),wx={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},jx={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"},Nx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function kx(t){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(t):(t=Nx[t])?!!s[t]:!1}function Ic(){return kx}var zx=v({},sl,{key:function(t){if(t.key){var s=wx[t.key]||t.key;if(s!=="Unidentified")return s}return t.type==="keypress"?(t=pr(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?jx[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ic,charCode:function(t){return t.type==="keypress"?pr(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?pr(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),_x=on(zx),Cx=v({},vr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ch=on(Cx),Ex=v({},sl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ic}),Ax=on(Ex),Tx=v({},yi,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ox=on(Tx),Dx=v({},vr,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),Rx=on(Dx),Lx=v({},yi,{newState:0,oldState:0}),Mx=on(Lx),$x=[9,13,27,32],qc=ds&&"CompositionEvent"in window,al=null;ds&&"documentMode"in document&&(al=document.documentMode);var Ux=ds&&"TextEvent"in window&&!al,Eh=ds&&(!qc||al&&8<al&&11>=al),Ah=" ",Th=!1;function Oh(t,s){switch(t){case"keyup":return $x.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Dh(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Fi=!1;function Bx(t,s){switch(t){case"compositionend":return Dh(s);case"keypress":return s.which!==32?null:(Th=!0,Ah);case"textInput":return t=s.data,t===Ah&&Th?null:t;default:return null}}function Ix(t,s){if(Fi)return t==="compositionend"||!qc&&Oh(t,s)?(t=Nh(),mr=Mc=Os=null,Fi=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return Eh&&s.locale!=="ko"?null:s.data;default:return null}}var qx={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 Rh(t){var s=t&&t.nodeName&&t.nodeName.toLowerCase();return s==="input"?!!qx[t.type]:s==="textarea"}function Lh(t,s,a,r){Xi?Ji?Ji.push(r):Ji=[r]:Xi=r,s=ro(s,"onChange"),0<s.length&&(a=new yr("onChange","change",null,a,r),t.push({event:a,listeners:s}))}var ll=null,rl=null;function Zx(t){yg(t,0)}function br(t){var s=el(t);if(gh(s))return t}function Mh(t,s){if(t==="change")return s}var $h=!1;if(ds){var Zc;if(ds){var Hc="oninput"in document;if(!Hc){var Uh=document.createElement("div");Uh.setAttribute("oninput","return;"),Hc=typeof Uh.oninput=="function"}Zc=Hc}else Zc=!1;$h=Zc&&(!document.documentMode||9<document.documentMode)}function Bh(){ll&&(ll.detachEvent("onpropertychange",Ih),rl=ll=null)}function Ih(t){if(t.propertyName==="value"&&br(rl)){var s=[];Lh(s,rl,t,Dc(t)),jh(Zx,s)}}function Hx(t,s,a){t==="focusin"?(Bh(),ll=s,rl=a,ll.attachEvent("onpropertychange",Ih)):t==="focusout"&&Bh()}function Gx(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return br(rl)}function Kx(t,s){if(t==="click")return br(s)}function Yx(t,s){if(t==="input"||t==="change")return br(s)}function Vx(t,s){return t===s&&(t!==0||1/t===1/s)||t!==t&&s!==s}var gn=typeof Object.is=="function"?Object.is:Vx;function ol(t,s){if(gn(t,s))return!0;if(typeof t!="object"||t===null||typeof s!="object"||s===null)return!1;var a=Object.keys(t),r=Object.keys(s);if(a.length!==r.length)return!1;for(r=0;r<a.length;r++){var f=a[r];if(!Ft.call(s,f)||!gn(t[f],s[f]))return!1}return!0}function qh(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Zh(t,s){var a=qh(t);t=0;for(var r;a;){if(a.nodeType===3){if(r=t+a.textContent.length,t<=s&&r>=s)return{node:a,offset:s-t};t=r}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=qh(a)}}function Hh(t,s){return t&&s?t===s?!0:t&&t.nodeType===3?!1:s&&s.nodeType===3?Hh(t,s.parentNode):"contains"in t?t.contains(s):t.compareDocumentPosition?!!(t.compareDocumentPosition(s)&16):!1:!1}function Gh(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var s=fr(t.document);s instanceof t.HTMLIFrameElement;){try{var a=typeof s.contentWindow.location.href=="string"}catch{a=!1}if(a)t=s.contentWindow;else break;s=fr(t.document)}return s}function Gc(t){var s=t&&t.nodeName&&t.nodeName.toLowerCase();return s&&(s==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||s==="textarea"||t.contentEditable==="true")}var Px=ds&&"documentMode"in document&&11>=document.documentMode,Wi=null,Kc=null,cl=null,Yc=!1;function Kh(t,s,a){var r=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Yc||Wi==null||Wi!==fr(r)||(r=Wi,"selectionStart"in r&&Gc(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}),cl&&ol(cl,r)||(cl=r,r=ro(Kc,"onSelect"),0<r.length&&(s=new yr("onSelect","select",null,s,a),t.push({event:s,listeners:r}),s.target=Wi)))}function vi(t,s){var a={};return a[t.toLowerCase()]=s.toLowerCase(),a["Webkit"+t]="webkit"+s,a["Moz"+t]="moz"+s,a}var ea={animationend:vi("Animation","AnimationEnd"),animationiteration:vi("Animation","AnimationIteration"),animationstart:vi("Animation","AnimationStart"),transitionrun:vi("Transition","TransitionRun"),transitionstart:vi("Transition","TransitionStart"),transitioncancel:vi("Transition","TransitionCancel"),transitionend:vi("Transition","TransitionEnd")},Vc={},Yh={};ds&&(Yh=document.createElement("div").style,"AnimationEvent"in window||(delete ea.animationend.animation,delete ea.animationiteration.animation,delete ea.animationstart.animation),"TransitionEvent"in window||delete ea.transitionend.transition);function bi(t){if(Vc[t])return Vc[t];if(!ea[t])return t;var s=ea[t],a;for(a in s)if(s.hasOwnProperty(a)&&a in Yh)return Vc[t]=s[a];return t}var Vh=bi("animationend"),Ph=bi("animationiteration"),Qh=bi("animationstart"),Qx=bi("transitionrun"),Xx=bi("transitionstart"),Jx=bi("transitioncancel"),Xh=bi("transitionend"),Jh=new Map,Pc="abort auxClick beforeToggle 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(" ");Pc.push("scrollEnd");function qn(t,s){Jh.set(t,s),gi(s,[t])}var xr=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},_n=[],ta=0,Qc=0;function Sr(){for(var t=ta,s=Qc=ta=0;s<t;){var a=_n[s];_n[s++]=null;var r=_n[s];_n[s++]=null;var f=_n[s];_n[s++]=null;var h=_n[s];if(_n[s++]=null,r!==null&&f!==null){var y=r.pending;y===null?f.next=f:(f.next=y.next,y.next=f),r.pending=f}h!==0&&Fh(a,f,h)}}function wr(t,s,a,r){_n[ta++]=t,_n[ta++]=s,_n[ta++]=a,_n[ta++]=r,Qc|=r,t.lanes|=r,t=t.alternate,t!==null&&(t.lanes|=r)}function Xc(t,s,a,r){return wr(t,s,a,r),jr(t)}function xi(t,s){return wr(t,null,null,s),jr(t)}function Fh(t,s,a){t.lanes|=a;var r=t.alternate;r!==null&&(r.lanes|=a);for(var f=!1,h=t.return;h!==null;)h.childLanes|=a,r=h.alternate,r!==null&&(r.childLanes|=a),h.tag===22&&(t=h.stateNode,t===null||t._visibility&1||(f=!0)),t=h,h=h.return;return t.tag===3?(h=t.stateNode,f&&s!==null&&(f=31-Ee(a),t=h.hiddenUpdates,r=t[f],r===null?t[f]=[s]:r.push(s),s.lane=a|536870912),h):null}function jr(t){if(50<Tl)throw Tl=0,ad=null,Error(l(185));for(var s=t.return;s!==null;)t=s,s=t.return;return t.tag===3?t.stateNode:null}var na={};function Fx(t,s,a,r){this.tag=t,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,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 yn(t,s,a,r){return new Fx(t,s,a,r)}function Jc(t){return t=t.prototype,!(!t||!t.isReactComponent)}function fs(t,s){var a=t.alternate;return a===null?(a=yn(t.tag,s,t.key,t.mode),a.elementType=t.elementType,a.type=t.type,a.stateNode=t.stateNode,a.alternate=t,t.alternate=a):(a.pendingProps=s,a.type=t.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=t.flags&65011712,a.childLanes=t.childLanes,a.lanes=t.lanes,a.child=t.child,a.memoizedProps=t.memoizedProps,a.memoizedState=t.memoizedState,a.updateQueue=t.updateQueue,s=t.dependencies,a.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},a.sibling=t.sibling,a.index=t.index,a.ref=t.ref,a.refCleanup=t.refCleanup,a}function Wh(t,s){t.flags&=65011714;var a=t.alternate;return a===null?(t.childLanes=0,t.lanes=s,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=a.childLanes,t.lanes=a.lanes,t.child=a.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=a.memoizedProps,t.memoizedState=a.memoizedState,t.updateQueue=a.updateQueue,t.type=a.type,s=a.dependencies,t.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),t}function Nr(t,s,a,r,f,h){var y=0;if(r=t,typeof t=="function")Jc(t)&&(y=1);else if(typeof t=="string")y=sw(t,a,F.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case Q:return t=yn(31,a,s,f),t.elementType=Q,t.lanes=h,t;case j:return Si(a.children,f,h,s);case k:y=8,f|=24;break;case A:return t=yn(12,a,s,f|2),t.elementType=A,t.lanes=h,t;case M:return t=yn(13,a,s,f),t.elementType=M,t.lanes=h,t;case H:return t=yn(19,a,s,f),t.elementType=H,t.lanes=h,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case O:y=10;break e;case E:y=9;break e;case D:y=11;break e;case V:y=14;break e;case L:y=16,r=null;break e}y=29,a=Error(l(130,t===null?"null":typeof t,"")),r=null}return s=yn(y,a,s,f),s.elementType=t,s.type=r,s.lanes=h,s}function Si(t,s,a,r){return t=yn(7,t,r,s),t.lanes=a,t}function Fc(t,s,a){return t=yn(6,t,null,s),t.lanes=a,t}function em(t){var s=yn(18,null,null,0);return s.stateNode=t,s}function Wc(t,s,a){return s=yn(4,t.children!==null?t.children:[],t.key,s),s.lanes=a,s.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},s}var tm=new WeakMap;function Cn(t,s){if(typeof t=="object"&&t!==null){var a=tm.get(t);return a!==void 0?a:(s={value:t,source:s,stack:Nn(s)},tm.set(t,s),s)}return{value:t,source:s,stack:Nn(s)}}var sa=[],ia=0,kr=null,ul=0,En=[],An=0,Ds=null,Wn=1,es="";function hs(t,s){sa[ia++]=ul,sa[ia++]=kr,kr=t,ul=s}function nm(t,s,a){En[An++]=Wn,En[An++]=es,En[An++]=Ds,Ds=t;var r=Wn;t=es;var f=32-Ee(r)-1;r&=~(1<<f),a+=1;var h=32-Ee(s)+f;if(30<h){var y=f-f%5;h=(r&(1<<y)-1).toString(32),r>>=y,f-=y,Wn=1<<32-Ee(s)+f|a<<f|r,es=h+t}else Wn=1<<h|a<<f|r,es=t}function eu(t){t.return!==null&&(hs(t,1),nm(t,1,0))}function tu(t){for(;t===kr;)kr=sa[--ia],sa[ia]=null,ul=sa[--ia],sa[ia]=null;for(;t===Ds;)Ds=En[--An],En[An]=null,es=En[--An],En[An]=null,Wn=En[--An],En[An]=null}function sm(t,s){En[An++]=Wn,En[An++]=es,En[An++]=Ds,Wn=s.id,es=s.overflow,Ds=t}var Vt=null,ot=null,Be=!1,Rs=null,Tn=!1,nu=Error(l(519));function Ls(t){var s=Error(l(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw dl(Cn(s,t)),nu}function im(t){var s=t.stateNode,a=t.type,r=t.memoizedProps;switch(s[Ke]=t,s[Nt]=r,a){case"dialog":Re("cancel",s),Re("close",s);break;case"iframe":case"object":case"embed":Re("load",s);break;case"video":case"audio":for(a=0;a<Dl.length;a++)Re(Dl[a],s);break;case"source":Re("error",s);break;case"img":case"image":case"link":Re("error",s),Re("load",s);break;case"details":Re("toggle",s);break;case"input":Re("invalid",s),yh(s,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":Re("invalid",s);break;case"textarea":Re("invalid",s),bh(s,r.value,r.defaultValue,r.children)}a=r.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||s.textContent===""+a||r.suppressHydrationWarning===!0||Sg(s.textContent,a)?(r.popover!=null&&(Re("beforetoggle",s),Re("toggle",s)),r.onScroll!=null&&Re("scroll",s),r.onScrollEnd!=null&&Re("scrollend",s),r.onClick!=null&&(s.onclick=us),s=!0):s=!1,s||Ls(t,!0)}function am(t){for(Vt=t.return;Vt;)switch(Vt.tag){case 5:case 31:case 13:Tn=!1;return;case 27:case 3:Tn=!0;return;default:Vt=Vt.return}}function aa(t){if(t!==Vt)return!1;if(!Be)return am(t),Be=!0,!1;var s=t.tag,a;if((a=s!==3&&s!==27)&&((a=s===5)&&(a=t.type,a=!(a!=="form"&&a!=="button")||xd(t.type,t.memoizedProps)),a=!a),a&&ot&&Ls(t),am(t),s===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(317));ot=Ag(t)}else if(s===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(317));ot=Ag(t)}else s===27?(s=ot,Qs(t.type)?(t=kd,kd=null,ot=t):ot=s):ot=Vt?Dn(t.stateNode.nextSibling):null;return!0}function wi(){ot=Vt=null,Be=!1}function su(){var t=Rs;return t!==null&&(fn===null?fn=t:fn.push.apply(fn,t),Rs=null),t}function dl(t){Rs===null?Rs=[t]:Rs.push(t)}var iu=C(null),ji=null,ms=null;function Ms(t,s,a){ne(iu,s._currentValue),s._currentValue=a}function ps(t){t._currentValue=iu.current,G(iu)}function au(t,s,a){for(;t!==null;){var r=t.alternate;if((t.childLanes&s)!==s?(t.childLanes|=s,r!==null&&(r.childLanes|=s)):r!==null&&(r.childLanes&s)!==s&&(r.childLanes|=s),t===a)break;t=t.return}}function lu(t,s,a,r){var f=t.child;for(f!==null&&(f.return=t);f!==null;){var h=f.dependencies;if(h!==null){var y=f.child;h=h.firstContext;e:for(;h!==null;){var S=h;h=f;for(var _=0;_<s.length;_++)if(S.context===s[_]){h.lanes|=a,S=h.alternate,S!==null&&(S.lanes|=a),au(h.return,a,t),r||(y=null);break e}h=S.next}}else if(f.tag===18){if(y=f.return,y===null)throw Error(l(341));y.lanes|=a,h=y.alternate,h!==null&&(h.lanes|=a),au(y,a,t),y=null}else y=f.child;if(y!==null)y.return=f;else for(y=f;y!==null;){if(y===t){y=null;break}if(f=y.sibling,f!==null){f.return=y.return,y=f;break}y=y.return}f=y}}function la(t,s,a,r){t=null;for(var f=s,h=!1;f!==null;){if(!h){if((f.flags&524288)!==0)h=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var y=f.alternate;if(y===null)throw Error(l(387));if(y=y.memoizedProps,y!==null){var S=f.type;gn(f.pendingProps.value,y.value)||(t!==null?t.push(S):t=[S])}}else if(f===we.current){if(y=f.alternate,y===null)throw Error(l(387));y.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(t!==null?t.push(Ul):t=[Ul])}f=f.return}t!==null&&lu(s,t,a,r),s.flags|=262144}function zr(t){for(t=t.firstContext;t!==null;){if(!gn(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Ni(t){ji=t,ms=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Pt(t){return lm(ji,t)}function _r(t,s){return ji===null&&Ni(t),lm(t,s)}function lm(t,s){var a=s._currentValue;if(s={context:s,memoizedValue:a,next:null},ms===null){if(t===null)throw Error(l(308));ms=s,t.dependencies={lanes:0,firstContext:s},t.flags|=524288}else ms=ms.next=s;return a}var Wx=typeof AbortController<"u"?AbortController:function(){var t=[],s=this.signal={aborted:!1,addEventListener:function(a,r){t.push(r)}};this.abort=function(){s.aborted=!0,t.forEach(function(a){return a()})}},eS=e.unstable_scheduleCallback,tS=e.unstable_NormalPriority,Ot={$$typeof:O,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ru(){return{controller:new Wx,data:new Map,refCount:0}}function fl(t){t.refCount--,t.refCount===0&&eS(tS,function(){t.controller.abort()})}var hl=null,ou=0,ra=0,oa=null;function nS(t,s){if(hl===null){var a=hl=[];ou=0,ra=dd(),oa={status:"pending",value:void 0,then:function(r){a.push(r)}}}return ou++,s.then(rm,rm),s}function rm(){if(--ou===0&&hl!==null){oa!==null&&(oa.status="fulfilled");var t=hl;hl=null,ra=0,oa=null;for(var s=0;s<t.length;s++)(0,t[s])()}}function sS(t,s){var a=[],r={status:"pending",value:null,reason:null,then:function(f){a.push(f)}};return t.then(function(){r.status="fulfilled",r.value=s;for(var f=0;f<a.length;f++)(0,a[f])(s)},function(f){for(r.status="rejected",r.reason=f,f=0;f<a.length;f++)(0,a[f])(void 0)}),r}var om=q.S;q.S=function(t,s){Kp=Tt(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&nS(t,s),om!==null&&om(t,s)};var ki=C(null);function cu(){var t=ki.current;return t!==null?t:st.pooledCache}function Cr(t,s){s===null?ne(ki,ki.current):ne(ki,s.pool)}function cm(){var t=cu();return t===null?null:{parent:Ot._currentValue,pool:t}}var ca=Error(l(460)),uu=Error(l(474)),Er=Error(l(542)),Ar={then:function(){}};function um(t){return t=t.status,t==="fulfilled"||t==="rejected"}function dm(t,s,a){switch(a=t[a],a===void 0?t.push(s):a!==s&&(s.then(us,us),s=a),s.status){case"fulfilled":return s.value;case"rejected":throw t=s.reason,hm(t),t;default:if(typeof s.status=="string")s.then(us,us);else{if(t=st,t!==null&&100<t.shellSuspendCounter)throw Error(l(482));t=s,t.status="pending",t.then(function(r){if(s.status==="pending"){var f=s;f.status="fulfilled",f.value=r}},function(r){if(s.status==="pending"){var f=s;f.status="rejected",f.reason=r}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw t=s.reason,hm(t),t}throw _i=s,ca}}function zi(t){try{var s=t._init;return s(t._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(_i=a,ca):a}}var _i=null;function fm(){if(_i===null)throw Error(l(459));var t=_i;return _i=null,t}function hm(t){if(t===ca||t===Er)throw Error(l(483))}var ua=null,ml=0;function Tr(t){var s=ml;return ml+=1,ua===null&&(ua=[]),dm(ua,t,s)}function pl(t,s){s=s.props.ref,t.ref=s!==void 0?s:null}function Or(t,s){throw s.$$typeof===w?Error(l(525)):(t=Object.prototype.toString.call(s),Error(l(31,t==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":t)))}function mm(t){function s($,T){if(t){var B=$.deletions;B===null?($.deletions=[T],$.flags|=16):B.push(T)}}function a($,T){if(!t)return null;for(;T!==null;)s($,T),T=T.sibling;return null}function r($){for(var T=new Map;$!==null;)$.key!==null?T.set($.key,$):T.set($.index,$),$=$.sibling;return T}function f($,T){return $=fs($,T),$.index=0,$.sibling=null,$}function h($,T,B){return $.index=B,t?(B=$.alternate,B!==null?(B=B.index,B<T?($.flags|=67108866,T):B):($.flags|=67108866,T)):($.flags|=1048576,T)}function y($){return t&&$.alternate===null&&($.flags|=67108866),$}function S($,T,B,X){return T===null||T.tag!==6?(T=Fc(B,$.mode,X),T.return=$,T):(T=f(T,B),T.return=$,T)}function _($,T,B,X){var xe=B.type;return xe===j?P($,T,B.props.children,X,B.key):T!==null&&(T.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===L&&zi(xe)===T.type)?(T=f(T,B.props),pl(T,B),T.return=$,T):(T=Nr(B.type,B.key,B.props,null,$.mode,X),pl(T,B),T.return=$,T)}function I($,T,B,X){return T===null||T.tag!==4||T.stateNode.containerInfo!==B.containerInfo||T.stateNode.implementation!==B.implementation?(T=Wc(B,$.mode,X),T.return=$,T):(T=f(T,B.children||[]),T.return=$,T)}function P($,T,B,X,xe){return T===null||T.tag!==7?(T=Si(B,$.mode,X,xe),T.return=$,T):(T=f(T,B),T.return=$,T)}function W($,T,B){if(typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint")return T=Fc(""+T,$.mode,B),T.return=$,T;if(typeof T=="object"&&T!==null){switch(T.$$typeof){case N:return B=Nr(T.type,T.key,T.props,null,$.mode,B),pl(B,T),B.return=$,B;case z:return T=Wc(T,$.mode,B),T.return=$,T;case L:return T=zi(T),W($,T,B)}if(Le(T)||fe(T))return T=Si(T,$.mode,B,null),T.return=$,T;if(typeof T.then=="function")return W($,Tr(T),B);if(T.$$typeof===O)return W($,_r($,T),B);Or($,T)}return null}function Z($,T,B,X){var xe=T!==null?T.key:null;if(typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint")return xe!==null?null:S($,T,""+B,X);if(typeof B=="object"&&B!==null){switch(B.$$typeof){case N:return B.key===xe?_($,T,B,X):null;case z:return B.key===xe?I($,T,B,X):null;case L:return B=zi(B),Z($,T,B,X)}if(Le(B)||fe(B))return xe!==null?null:P($,T,B,X,null);if(typeof B.then=="function")return Z($,T,Tr(B),X);if(B.$$typeof===O)return Z($,T,_r($,B),X);Or($,B)}return null}function Y($,T,B,X,xe){if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return $=$.get(B)||null,S(T,$,""+X,xe);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case N:return $=$.get(X.key===null?B:X.key)||null,_(T,$,X,xe);case z:return $=$.get(X.key===null?B:X.key)||null,I(T,$,X,xe);case L:return X=zi(X),Y($,T,B,X,xe)}if(Le(X)||fe(X))return $=$.get(B)||null,P(T,$,X,xe,null);if(typeof X.then=="function")return Y($,T,B,Tr(X),xe);if(X.$$typeof===O)return Y($,T,B,_r(T,X),xe);Or(T,X)}return null}function pe($,T,B,X){for(var xe=null,He=null,ve=T,Ce=T=0,Ue=null;ve!==null&&Ce<B.length;Ce++){ve.index>Ce?(Ue=ve,ve=null):Ue=ve.sibling;var Ge=Z($,ve,B[Ce],X);if(Ge===null){ve===null&&(ve=Ue);break}t&&ve&&Ge.alternate===null&&s($,ve),T=h(Ge,T,Ce),He===null?xe=Ge:He.sibling=Ge,He=Ge,ve=Ue}if(Ce===B.length)return a($,ve),Be&&hs($,Ce),xe;if(ve===null){for(;Ce<B.length;Ce++)ve=W($,B[Ce],X),ve!==null&&(T=h(ve,T,Ce),He===null?xe=ve:He.sibling=ve,He=ve);return Be&&hs($,Ce),xe}for(ve=r(ve);Ce<B.length;Ce++)Ue=Y(ve,$,Ce,B[Ce],X),Ue!==null&&(t&&Ue.alternate!==null&&ve.delete(Ue.key===null?Ce:Ue.key),T=h(Ue,T,Ce),He===null?xe=Ue:He.sibling=Ue,He=Ue);return t&&ve.forEach(function(ei){return s($,ei)}),Be&&hs($,Ce),xe}function je($,T,B,X){if(B==null)throw Error(l(151));for(var xe=null,He=null,ve=T,Ce=T=0,Ue=null,Ge=B.next();ve!==null&&!Ge.done;Ce++,Ge=B.next()){ve.index>Ce?(Ue=ve,ve=null):Ue=ve.sibling;var ei=Z($,ve,Ge.value,X);if(ei===null){ve===null&&(ve=Ue);break}t&&ve&&ei.alternate===null&&s($,ve),T=h(ei,T,Ce),He===null?xe=ei:He.sibling=ei,He=ei,ve=Ue}if(Ge.done)return a($,ve),Be&&hs($,Ce),xe;if(ve===null){for(;!Ge.done;Ce++,Ge=B.next())Ge=W($,Ge.value,X),Ge!==null&&(T=h(Ge,T,Ce),He===null?xe=Ge:He.sibling=Ge,He=Ge);return Be&&hs($,Ce),xe}for(ve=r(ve);!Ge.done;Ce++,Ge=B.next())Ge=Y(ve,$,Ce,Ge.value,X),Ge!==null&&(t&&Ge.alternate!==null&&ve.delete(Ge.key===null?Ce:Ge.key),T=h(Ge,T,Ce),He===null?xe=Ge:He.sibling=Ge,He=Ge);return t&&ve.forEach(function(mw){return s($,mw)}),Be&&hs($,Ce),xe}function tt($,T,B,X){if(typeof B=="object"&&B!==null&&B.type===j&&B.key===null&&(B=B.props.children),typeof B=="object"&&B!==null){switch(B.$$typeof){case N:e:{for(var xe=B.key;T!==null;){if(T.key===xe){if(xe=B.type,xe===j){if(T.tag===7){a($,T.sibling),X=f(T,B.props.children),X.return=$,$=X;break e}}else if(T.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===L&&zi(xe)===T.type){a($,T.sibling),X=f(T,B.props),pl(X,B),X.return=$,$=X;break e}a($,T);break}else s($,T);T=T.sibling}B.type===j?(X=Si(B.props.children,$.mode,X,B.key),X.return=$,$=X):(X=Nr(B.type,B.key,B.props,null,$.mode,X),pl(X,B),X.return=$,$=X)}return y($);case z:e:{for(xe=B.key;T!==null;){if(T.key===xe)if(T.tag===4&&T.stateNode.containerInfo===B.containerInfo&&T.stateNode.implementation===B.implementation){a($,T.sibling),X=f(T,B.children||[]),X.return=$,$=X;break e}else{a($,T);break}else s($,T);T=T.sibling}X=Wc(B,$.mode,X),X.return=$,$=X}return y($);case L:return B=zi(B),tt($,T,B,X)}if(Le(B))return pe($,T,B,X);if(fe(B)){if(xe=fe(B),typeof xe!="function")throw Error(l(150));return B=xe.call(B),je($,T,B,X)}if(typeof B.then=="function")return tt($,T,Tr(B),X);if(B.$$typeof===O)return tt($,T,_r($,B),X);Or($,B)}return typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint"?(B=""+B,T!==null&&T.tag===6?(a($,T.sibling),X=f(T,B),X.return=$,$=X):(a($,T),X=Fc(B,$.mode,X),X.return=$,$=X),y($)):a($,T)}return function($,T,B,X){try{ml=0;var xe=tt($,T,B,X);return ua=null,xe}catch(ve){if(ve===ca||ve===Er)throw ve;var He=yn(29,ve,null,$.mode);return He.lanes=X,He.return=$,He}}}var Ci=mm(!0),pm=mm(!1),$s=!1;function du(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function fu(t,s){t=t.updateQueue,s.updateQueue===t&&(s.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Us(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Bs(t,s,a){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,(Ye&2)!==0){var f=r.pending;return f===null?s.next=s:(s.next=f.next,f.next=s),r.pending=s,s=jr(t),Fh(t,null,a),s}return wr(t,r,s,a),jr(t)}function gl(t,s,a){if(s=s.updateQueue,s!==null&&(s=s.shared,(a&4194048)!==0)){var r=s.lanes;r&=t.pendingLanes,a|=r,s.lanes=a,le(t,a)}}function hu(t,s){var a=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,a===r)){var f=null,h=null;if(a=a.firstBaseUpdate,a!==null){do{var y={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};h===null?f=h=y:h=h.next=y,a=a.next}while(a!==null);h===null?f=h=s:h=h.next=s}else f=h=s;a={baseState:r.baseState,firstBaseUpdate:f,lastBaseUpdate:h,shared:r.shared,callbacks:r.callbacks},t.updateQueue=a;return}t=a.lastBaseUpdate,t===null?a.firstBaseUpdate=s:t.next=s,a.lastBaseUpdate=s}var mu=!1;function yl(){if(mu){var t=oa;if(t!==null)throw t}}function vl(t,s,a,r){mu=!1;var f=t.updateQueue;$s=!1;var h=f.firstBaseUpdate,y=f.lastBaseUpdate,S=f.shared.pending;if(S!==null){f.shared.pending=null;var _=S,I=_.next;_.next=null,y===null?h=I:y.next=I,y=_;var P=t.alternate;P!==null&&(P=P.updateQueue,S=P.lastBaseUpdate,S!==y&&(S===null?P.firstBaseUpdate=I:S.next=I,P.lastBaseUpdate=_))}if(h!==null){var W=f.baseState;y=0,P=I=_=null,S=h;do{var Z=S.lane&-536870913,Y=Z!==S.lane;if(Y?($e&Z)===Z:(r&Z)===Z){Z!==0&&Z===ra&&(mu=!0),P!==null&&(P=P.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var pe=t,je=S;Z=s;var tt=a;switch(je.tag){case 1:if(pe=je.payload,typeof pe=="function"){W=pe.call(tt,W,Z);break e}W=pe;break e;case 3:pe.flags=pe.flags&-65537|128;case 0:if(pe=je.payload,Z=typeof pe=="function"?pe.call(tt,W,Z):pe,Z==null)break e;W=v({},W,Z);break e;case 2:$s=!0}}Z=S.callback,Z!==null&&(t.flags|=64,Y&&(t.flags|=8192),Y=f.callbacks,Y===null?f.callbacks=[Z]:Y.push(Z))}else Y={lane:Z,tag:S.tag,payload:S.payload,callback:S.callback,next:null},P===null?(I=P=Y,_=W):P=P.next=Y,y|=Z;if(S=S.next,S===null){if(S=f.shared.pending,S===null)break;Y=S,S=Y.next,Y.next=null,f.lastBaseUpdate=Y,f.shared.pending=null}}while(!0);P===null&&(_=W),f.baseState=_,f.firstBaseUpdate=I,f.lastBaseUpdate=P,h===null&&(f.shared.lanes=0),Gs|=y,t.lanes=y,t.memoizedState=W}}function gm(t,s){if(typeof t!="function")throw Error(l(191,t));t.call(s)}function ym(t,s){var a=t.callbacks;if(a!==null)for(t.callbacks=null,t=0;t<a.length;t++)gm(a[t],s)}var da=C(null),Dr=C(0);function vm(t,s){t=Ns,ne(Dr,t),ne(da,s),Ns=t|s.baseLanes}function pu(){ne(Dr,Ns),ne(da,da.current)}function gu(){Ns=Dr.current,G(da),G(Dr)}var vn=C(null),On=null;function Is(t){var s=t.alternate;ne(kt,kt.current&1),ne(vn,t),On===null&&(s===null||da.current!==null||s.memoizedState!==null)&&(On=t)}function yu(t){ne(kt,kt.current),ne(vn,t),On===null&&(On=t)}function bm(t){t.tag===22?(ne(kt,kt.current),ne(vn,t),On===null&&(On=t)):qs()}function qs(){ne(kt,kt.current),ne(vn,vn.current)}function bn(t){G(vn),On===t&&(On=null),G(kt)}var kt=C(0);function Rr(t){for(var s=t;s!==null;){if(s.tag===13){var a=s.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||jd(a)||Nd(a)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break;for(;s.sibling===null;){if(s.return===null||s.return===t)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var gs=0,_e=null,We=null,Dt=null,Lr=!1,fa=!1,Ei=!1,Mr=0,bl=0,ha=null,iS=0;function St(){throw Error(l(321))}function vu(t,s){if(s===null)return!1;for(var a=0;a<s.length&&a<t.length;a++)if(!gn(t[a],s[a]))return!1;return!0}function bu(t,s,a,r,f,h){return gs=h,_e=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,q.H=t===null||t.memoizedState===null?np:Ru,Ei=!1,h=a(r,f),Ei=!1,fa&&(h=Sm(s,a,r,f)),xm(t),h}function xm(t){q.H=wl;var s=We!==null&&We.next!==null;if(gs=0,Dt=We=_e=null,Lr=!1,bl=0,ha=null,s)throw Error(l(300));t===null||Rt||(t=t.dependencies,t!==null&&zr(t)&&(Rt=!0))}function Sm(t,s,a,r){_e=t;var f=0;do{if(fa&&(ha=null),bl=0,fa=!1,25<=f)throw Error(l(301));if(f+=1,Dt=We=null,t.updateQueue!=null){var h=t.updateQueue;h.lastEffect=null,h.events=null,h.stores=null,h.memoCache!=null&&(h.memoCache.index=0)}q.H=sp,h=s(a,r)}while(fa);return h}function aS(){var t=q.H,s=t.useState()[0];return s=typeof s.then=="function"?xl(s):s,t=t.useState()[0],(We!==null?We.memoizedState:null)!==t&&(_e.flags|=1024),s}function xu(){var t=Mr!==0;return Mr=0,t}function Su(t,s,a){s.updateQueue=t.updateQueue,s.flags&=-2053,t.lanes&=~a}function wu(t){if(Lr){for(t=t.memoizedState;t!==null;){var s=t.queue;s!==null&&(s.pending=null),t=t.next}Lr=!1}gs=0,Dt=We=_e=null,fa=!1,bl=Mr=0,ha=null}function nn(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Dt===null?_e.memoizedState=Dt=t:Dt=Dt.next=t,Dt}function zt(){if(We===null){var t=_e.alternate;t=t!==null?t.memoizedState:null}else t=We.next;var s=Dt===null?_e.memoizedState:Dt.next;if(s!==null)Dt=s,We=t;else{if(t===null)throw _e.alternate===null?Error(l(467)):Error(l(310));We=t,t={memoizedState:We.memoizedState,baseState:We.baseState,baseQueue:We.baseQueue,queue:We.queue,next:null},Dt===null?_e.memoizedState=Dt=t:Dt=Dt.next=t}return Dt}function $r(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function xl(t){var s=bl;return bl+=1,ha===null&&(ha=[]),t=dm(ha,t,s),s=_e,(Dt===null?s.memoizedState:Dt.next)===null&&(s=s.alternate,q.H=s===null||s.memoizedState===null?np:Ru),t}function Ur(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return xl(t);if(t.$$typeof===O)return Pt(t)}throw Error(l(438,String(t)))}function ju(t){var s=null,a=_e.updateQueue;if(a!==null&&(s=a.memoCache),s==null){var r=_e.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(s={data:r.data.map(function(f){return f.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),a===null&&(a=$r(),_e.updateQueue=a),a.memoCache=s,a=s.data[s.index],a===void 0)for(a=s.data[s.index]=Array(t),r=0;r<t;r++)a[r]=Se;return s.index++,a}function ys(t,s){return typeof s=="function"?s(t):s}function Br(t){var s=zt();return Nu(s,We,t)}function Nu(t,s,a){var r=t.queue;if(r===null)throw Error(l(311));r.lastRenderedReducer=a;var f=t.baseQueue,h=r.pending;if(h!==null){if(f!==null){var y=f.next;f.next=h.next,h.next=y}s.baseQueue=f=h,r.pending=null}if(h=t.baseState,f===null)t.memoizedState=h;else{s=f.next;var S=y=null,_=null,I=s,P=!1;do{var W=I.lane&-536870913;if(W!==I.lane?($e&W)===W:(gs&W)===W){var Z=I.revertLane;if(Z===0)_!==null&&(_=_.next={lane:0,revertLane:0,gesture:null,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null}),W===ra&&(P=!0);else if((gs&Z)===Z){I=I.next,Z===ra&&(P=!0);continue}else W={lane:0,revertLane:I.revertLane,gesture:null,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null},_===null?(S=_=W,y=h):_=_.next=W,_e.lanes|=Z,Gs|=Z;W=I.action,Ei&&a(h,W),h=I.hasEagerState?I.eagerState:a(h,W)}else Z={lane:W,revertLane:I.revertLane,gesture:I.gesture,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null},_===null?(S=_=Z,y=h):_=_.next=Z,_e.lanes|=W,Gs|=W;I=I.next}while(I!==null&&I!==s);if(_===null?y=h:_.next=S,!gn(h,t.memoizedState)&&(Rt=!0,P&&(a=oa,a!==null)))throw a;t.memoizedState=h,t.baseState=y,t.baseQueue=_,r.lastRenderedState=h}return f===null&&(r.lanes=0),[t.memoizedState,r.dispatch]}function ku(t){var s=zt(),a=s.queue;if(a===null)throw Error(l(311));a.lastRenderedReducer=t;var r=a.dispatch,f=a.pending,h=s.memoizedState;if(f!==null){a.pending=null;var y=f=f.next;do h=t(h,y.action),y=y.next;while(y!==f);gn(h,s.memoizedState)||(Rt=!0),s.memoizedState=h,s.baseQueue===null&&(s.baseState=h),a.lastRenderedState=h}return[h,r]}function wm(t,s,a){var r=_e,f=zt(),h=Be;if(h){if(a===void 0)throw Error(l(407));a=a()}else a=s();var y=!gn((We||f).memoizedState,a);if(y&&(f.memoizedState=a,Rt=!0),f=f.queue,Cu(km.bind(null,r,f,t),[t]),f.getSnapshot!==s||y||Dt!==null&&Dt.memoizedState.tag&1){if(r.flags|=2048,ma(9,{destroy:void 0},Nm.bind(null,r,f,a,s),null),st===null)throw Error(l(349));h||(gs&127)!==0||jm(r,s,a)}return a}function jm(t,s,a){t.flags|=16384,t={getSnapshot:s,value:a},s=_e.updateQueue,s===null?(s=$r(),_e.updateQueue=s,s.stores=[t]):(a=s.stores,a===null?s.stores=[t]:a.push(t))}function Nm(t,s,a,r){s.value=a,s.getSnapshot=r,zm(s)&&_m(t)}function km(t,s,a){return a(function(){zm(s)&&_m(t)})}function zm(t){var s=t.getSnapshot;t=t.value;try{var a=s();return!gn(t,a)}catch{return!0}}function _m(t){var s=xi(t,2);s!==null&&hn(s,t,2)}function zu(t){var s=nn();if(typeof t=="function"){var a=t;if(t=a(),Ei){xt(!0);try{a()}finally{xt(!1)}}}return s.memoizedState=s.baseState=t,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ys,lastRenderedState:t},s}function Cm(t,s,a,r){return t.baseState=a,Nu(t,We,typeof r=="function"?r:ys)}function lS(t,s,a,r,f){if(Zr(t))throw Error(l(485));if(t=s.action,t!==null){var h={payload:f,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){h.listeners.push(y)}};q.T!==null?a(!0):h.isTransition=!1,r(h),a=s.pending,a===null?(h.next=s.pending=h,Em(s,h)):(h.next=a.next,s.pending=a.next=h)}}function Em(t,s){var a=s.action,r=s.payload,f=t.state;if(s.isTransition){var h=q.T,y={};q.T=y;try{var S=a(f,r),_=q.S;_!==null&&_(y,S),Am(t,s,S)}catch(I){_u(t,s,I)}finally{h!==null&&y.types!==null&&(h.types=y.types),q.T=h}}else try{h=a(f,r),Am(t,s,h)}catch(I){_u(t,s,I)}}function Am(t,s,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(r){Tm(t,s,r)},function(r){return _u(t,s,r)}):Tm(t,s,a)}function Tm(t,s,a){s.status="fulfilled",s.value=a,Om(s),t.state=a,s=t.pending,s!==null&&(a=s.next,a===s?t.pending=null:(a=a.next,s.next=a,Em(t,a)))}function _u(t,s,a){var r=t.pending;if(t.pending=null,r!==null){r=r.next;do s.status="rejected",s.reason=a,Om(s),s=s.next;while(s!==r)}t.action=null}function Om(t){t=t.listeners;for(var s=0;s<t.length;s++)(0,t[s])()}function Dm(t,s){return s}function Rm(t,s){if(Be){var a=st.formState;if(a!==null){e:{var r=_e;if(Be){if(ot){t:{for(var f=ot,h=Tn;f.nodeType!==8;){if(!h){f=null;break t}if(f=Dn(f.nextSibling),f===null){f=null;break t}}h=f.data,f=h==="F!"||h==="F"?f:null}if(f){ot=Dn(f.nextSibling),r=f.data==="F!";break e}}Ls(r)}r=!1}r&&(s=a[0])}}return a=nn(),a.memoizedState=a.baseState=s,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dm,lastRenderedState:s},a.queue=r,a=Wm.bind(null,_e,r),r.dispatch=a,r=zu(!1),h=Du.bind(null,_e,!1,r.queue),r=nn(),f={state:s,dispatch:null,action:t,pending:null},r.queue=f,a=lS.bind(null,_e,f,h,a),f.dispatch=a,r.memoizedState=t,[s,a,!1]}function Lm(t){var s=zt();return Mm(s,We,t)}function Mm(t,s,a){if(s=Nu(t,s,Dm)[0],t=Br(ys)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var r=xl(s)}catch(y){throw y===ca?Er:y}else r=s;s=zt();var f=s.queue,h=f.dispatch;return a!==s.memoizedState&&(_e.flags|=2048,ma(9,{destroy:void 0},rS.bind(null,f,a),null)),[r,h,t]}function rS(t,s){t.action=s}function $m(t){var s=zt(),a=We;if(a!==null)return Mm(s,a,t);zt(),s=s.memoizedState,a=zt();var r=a.queue.dispatch;return a.memoizedState=t,[s,r,!1]}function ma(t,s,a,r){return t={tag:t,create:a,deps:r,inst:s,next:null},s=_e.updateQueue,s===null&&(s=$r(),_e.updateQueue=s),a=s.lastEffect,a===null?s.lastEffect=t.next=t:(r=a.next,a.next=t,t.next=r,s.lastEffect=t),t}function Um(){return zt().memoizedState}function Ir(t,s,a,r){var f=nn();_e.flags|=t,f.memoizedState=ma(1|s,{destroy:void 0},a,r===void 0?null:r)}function qr(t,s,a,r){var f=zt();r=r===void 0?null:r;var h=f.memoizedState.inst;We!==null&&r!==null&&vu(r,We.memoizedState.deps)?f.memoizedState=ma(s,h,a,r):(_e.flags|=t,f.memoizedState=ma(1|s,h,a,r))}function Bm(t,s){Ir(8390656,8,t,s)}function Cu(t,s){qr(2048,8,t,s)}function oS(t){_e.flags|=4;var s=_e.updateQueue;if(s===null)s=$r(),_e.updateQueue=s,s.events=[t];else{var a=s.events;a===null?s.events=[t]:a.push(t)}}function Im(t){var s=zt().memoizedState;return oS({ref:s,nextImpl:t}),function(){if((Ye&2)!==0)throw Error(l(440));return s.impl.apply(void 0,arguments)}}function qm(t,s){return qr(4,2,t,s)}function Zm(t,s){return qr(4,4,t,s)}function Hm(t,s){if(typeof s=="function"){t=t();var a=s(t);return function(){typeof a=="function"?a():s(null)}}if(s!=null)return t=t(),s.current=t,function(){s.current=null}}function Gm(t,s,a){a=a!=null?a.concat([t]):null,qr(4,4,Hm.bind(null,s,t),a)}function Eu(){}function Km(t,s){var a=zt();s=s===void 0?null:s;var r=a.memoizedState;return s!==null&&vu(s,r[1])?r[0]:(a.memoizedState=[t,s],t)}function Ym(t,s){var a=zt();s=s===void 0?null:s;var r=a.memoizedState;if(s!==null&&vu(s,r[1]))return r[0];if(r=t(),Ei){xt(!0);try{t()}finally{xt(!1)}}return a.memoizedState=[r,s],r}function Au(t,s,a){return a===void 0||(gs&1073741824)!==0&&($e&261930)===0?t.memoizedState=s:(t.memoizedState=a,t=Vp(),_e.lanes|=t,Gs|=t,a)}function Vm(t,s,a,r){return gn(a,s)?a:da.current!==null?(t=Au(t,a,r),gn(t,s)||(Rt=!0),t):(gs&42)===0||(gs&1073741824)!==0&&($e&261930)===0?(Rt=!0,t.memoizedState=a):(t=Vp(),_e.lanes|=t,Gs|=t,s)}function Pm(t,s,a,r,f){var h=K.p;K.p=h!==0&&8>h?h:8;var y=q.T,S={};q.T=S,Du(t,!1,s,a);try{var _=f(),I=q.S;if(I!==null&&I(S,_),_!==null&&typeof _=="object"&&typeof _.then=="function"){var P=sS(_,r);Sl(t,s,P,wn(t))}else Sl(t,s,r,wn(t))}catch(W){Sl(t,s,{then:function(){},status:"rejected",reason:W},wn())}finally{K.p=h,y!==null&&S.types!==null&&(y.types=S.types),q.T=y}}function cS(){}function Tu(t,s,a,r){if(t.tag!==5)throw Error(l(476));var f=Qm(t).queue;Pm(t,f,s,ie,a===null?cS:function(){return Xm(t),a(r)})}function Qm(t){var s=t.memoizedState;if(s!==null)return s;s={memoizedState:ie,baseState:ie,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ys,lastRenderedState:ie},next:null};var a={};return s.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ys,lastRenderedState:a},next:null},t.memoizedState=s,t=t.alternate,t!==null&&(t.memoizedState=s),s}function Xm(t){var s=Qm(t);s.next===null&&(s=t.alternate.memoizedState),Sl(t,s.next.queue,{},wn())}function Ou(){return Pt(Ul)}function Jm(){return zt().memoizedState}function Fm(){return zt().memoizedState}function uS(t){for(var s=t.return;s!==null;){switch(s.tag){case 24:case 3:var a=wn();t=Us(a);var r=Bs(s,t,a);r!==null&&(hn(r,s,a),gl(r,s,a)),s={cache:ru()},t.payload=s;return}s=s.return}}function dS(t,s,a){var r=wn();a={lane:r,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Zr(t)?ep(s,a):(a=Xc(t,s,a,r),a!==null&&(hn(a,t,r),tp(a,s,r)))}function Wm(t,s,a){var r=wn();Sl(t,s,a,r)}function Sl(t,s,a,r){var f={lane:r,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Zr(t))ep(s,f);else{var h=t.alternate;if(t.lanes===0&&(h===null||h.lanes===0)&&(h=s.lastRenderedReducer,h!==null))try{var y=s.lastRenderedState,S=h(y,a);if(f.hasEagerState=!0,f.eagerState=S,gn(S,y))return wr(t,s,f,0),st===null&&Sr(),!1}catch{}if(a=Xc(t,s,f,r),a!==null)return hn(a,t,r),tp(a,s,r),!0}return!1}function Du(t,s,a,r){if(r={lane:2,revertLane:dd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Zr(t)){if(s)throw Error(l(479))}else s=Xc(t,a,r,2),s!==null&&hn(s,t,2)}function Zr(t){var s=t.alternate;return t===_e||s!==null&&s===_e}function ep(t,s){fa=Lr=!0;var a=t.pending;a===null?s.next=s:(s.next=a.next,a.next=s),t.pending=s}function tp(t,s,a){if((a&4194048)!==0){var r=s.lanes;r&=t.pendingLanes,a|=r,s.lanes=a,le(t,a)}}var wl={readContext:Pt,use:Ur,useCallback:St,useContext:St,useEffect:St,useImperativeHandle:St,useLayoutEffect:St,useInsertionEffect:St,useMemo:St,useReducer:St,useRef:St,useState:St,useDebugValue:St,useDeferredValue:St,useTransition:St,useSyncExternalStore:St,useId:St,useHostTransitionStatus:St,useFormState:St,useActionState:St,useOptimistic:St,useMemoCache:St,useCacheRefresh:St};wl.useEffectEvent=St;var np={readContext:Pt,use:Ur,useCallback:function(t,s){return nn().memoizedState=[t,s===void 0?null:s],t},useContext:Pt,useEffect:Bm,useImperativeHandle:function(t,s,a){a=a!=null?a.concat([t]):null,Ir(4194308,4,Hm.bind(null,s,t),a)},useLayoutEffect:function(t,s){return Ir(4194308,4,t,s)},useInsertionEffect:function(t,s){Ir(4,2,t,s)},useMemo:function(t,s){var a=nn();s=s===void 0?null:s;var r=t();if(Ei){xt(!0);try{t()}finally{xt(!1)}}return a.memoizedState=[r,s],r},useReducer:function(t,s,a){var r=nn();if(a!==void 0){var f=a(s);if(Ei){xt(!0);try{a(s)}finally{xt(!1)}}}else f=s;return r.memoizedState=r.baseState=f,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:f},r.queue=t,t=t.dispatch=dS.bind(null,_e,t),[r.memoizedState,t]},useRef:function(t){var s=nn();return t={current:t},s.memoizedState=t},useState:function(t){t=zu(t);var s=t.queue,a=Wm.bind(null,_e,s);return s.dispatch=a,[t.memoizedState,a]},useDebugValue:Eu,useDeferredValue:function(t,s){var a=nn();return Au(a,t,s)},useTransition:function(){var t=zu(!1);return t=Pm.bind(null,_e,t.queue,!0,!1),nn().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,s,a){var r=_e,f=nn();if(Be){if(a===void 0)throw Error(l(407));a=a()}else{if(a=s(),st===null)throw Error(l(349));($e&127)!==0||jm(r,s,a)}f.memoizedState=a;var h={value:a,getSnapshot:s};return f.queue=h,Bm(km.bind(null,r,h,t),[t]),r.flags|=2048,ma(9,{destroy:void 0},Nm.bind(null,r,h,a,s),null),a},useId:function(){var t=nn(),s=st.identifierPrefix;if(Be){var a=es,r=Wn;a=(r&~(1<<32-Ee(r)-1)).toString(32)+a,s="_"+s+"R_"+a,a=Mr++,0<a&&(s+="H"+a.toString(32)),s+="_"}else a=iS++,s="_"+s+"r_"+a.toString(32)+"_";return t.memoizedState=s},useHostTransitionStatus:Ou,useFormState:Rm,useActionState:Rm,useOptimistic:function(t){var s=nn();s.memoizedState=s.baseState=t;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=a,s=Du.bind(null,_e,!0,a),a.dispatch=s,[t,s]},useMemoCache:ju,useCacheRefresh:function(){return nn().memoizedState=uS.bind(null,_e)},useEffectEvent:function(t){var s=nn(),a={impl:t};return s.memoizedState=a,function(){if((Ye&2)!==0)throw Error(l(440));return a.impl.apply(void 0,arguments)}}},Ru={readContext:Pt,use:Ur,useCallback:Km,useContext:Pt,useEffect:Cu,useImperativeHandle:Gm,useInsertionEffect:qm,useLayoutEffect:Zm,useMemo:Ym,useReducer:Br,useRef:Um,useState:function(){return Br(ys)},useDebugValue:Eu,useDeferredValue:function(t,s){var a=zt();return Vm(a,We.memoizedState,t,s)},useTransition:function(){var t=Br(ys)[0],s=zt().memoizedState;return[typeof t=="boolean"?t:xl(t),s]},useSyncExternalStore:wm,useId:Jm,useHostTransitionStatus:Ou,useFormState:Lm,useActionState:Lm,useOptimistic:function(t,s){var a=zt();return Cm(a,We,t,s)},useMemoCache:ju,useCacheRefresh:Fm};Ru.useEffectEvent=Im;var sp={readContext:Pt,use:Ur,useCallback:Km,useContext:Pt,useEffect:Cu,useImperativeHandle:Gm,useInsertionEffect:qm,useLayoutEffect:Zm,useMemo:Ym,useReducer:ku,useRef:Um,useState:function(){return ku(ys)},useDebugValue:Eu,useDeferredValue:function(t,s){var a=zt();return We===null?Au(a,t,s):Vm(a,We.memoizedState,t,s)},useTransition:function(){var t=ku(ys)[0],s=zt().memoizedState;return[typeof t=="boolean"?t:xl(t),s]},useSyncExternalStore:wm,useId:Jm,useHostTransitionStatus:Ou,useFormState:$m,useActionState:$m,useOptimistic:function(t,s){var a=zt();return We!==null?Cm(a,We,t,s):(a.baseState=t,[t,a.queue.dispatch])},useMemoCache:ju,useCacheRefresh:Fm};sp.useEffectEvent=Im;function Lu(t,s,a,r){s=t.memoizedState,a=a(r,s),a=a==null?s:v({},s,a),t.memoizedState=a,t.lanes===0&&(t.updateQueue.baseState=a)}var Mu={enqueueSetState:function(t,s,a){t=t._reactInternals;var r=wn(),f=Us(r);f.payload=s,a!=null&&(f.callback=a),s=Bs(t,f,r),s!==null&&(hn(s,t,r),gl(s,t,r))},enqueueReplaceState:function(t,s,a){t=t._reactInternals;var r=wn(),f=Us(r);f.tag=1,f.payload=s,a!=null&&(f.callback=a),s=Bs(t,f,r),s!==null&&(hn(s,t,r),gl(s,t,r))},enqueueForceUpdate:function(t,s){t=t._reactInternals;var a=wn(),r=Us(a);r.tag=2,s!=null&&(r.callback=s),s=Bs(t,r,a),s!==null&&(hn(s,t,a),gl(s,t,a))}};function ip(t,s,a,r,f,h,y){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(r,h,y):s.prototype&&s.prototype.isPureReactComponent?!ol(a,r)||!ol(f,h):!0}function ap(t,s,a,r){t=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(a,r),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(a,r),s.state!==t&&Mu.enqueueReplaceState(s,s.state,null)}function Ai(t,s){var a=s;if("ref"in s){a={};for(var r in s)r!=="ref"&&(a[r]=s[r])}if(t=t.defaultProps){a===s&&(a=v({},a));for(var f in t)a[f]===void 0&&(a[f]=t[f])}return a}function lp(t){xr(t)}function rp(t){console.error(t)}function op(t){xr(t)}function Hr(t,s){try{var a=t.onUncaughtError;a(s.value,{componentStack:s.stack})}catch(r){setTimeout(function(){throw r})}}function cp(t,s,a){try{var r=t.onCaughtError;r(a.value,{componentStack:a.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function $u(t,s,a){return a=Us(a),a.tag=3,a.payload={element:null},a.callback=function(){Hr(t,s)},a}function up(t){return t=Us(t),t.tag=3,t}function dp(t,s,a,r){var f=a.type.getDerivedStateFromError;if(typeof f=="function"){var h=r.value;t.payload=function(){return f(h)},t.callback=function(){cp(s,a,r)}}var y=a.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(t.callback=function(){cp(s,a,r),typeof f!="function"&&(Ks===null?Ks=new Set([this]):Ks.add(this));var S=r.stack;this.componentDidCatch(r.value,{componentStack:S!==null?S:""})})}function fS(t,s,a,r,f){if(a.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(s=a.alternate,s!==null&&la(s,a,f,!0),a=vn.current,a!==null){switch(a.tag){case 31:case 13:return On===null?to():a.alternate===null&&wt===0&&(wt=3),a.flags&=-257,a.flags|=65536,a.lanes=f,r===Ar?a.flags|=16384:(s=a.updateQueue,s===null?a.updateQueue=new Set([r]):s.add(r),od(t,r,f)),!1;case 22:return a.flags|=65536,r===Ar?a.flags|=16384:(s=a.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([r])},a.updateQueue=s):(a=s.retryQueue,a===null?s.retryQueue=new Set([r]):a.add(r)),od(t,r,f)),!1}throw Error(l(435,a.tag))}return od(t,r,f),to(),!1}if(Be)return s=vn.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=f,r!==nu&&(t=Error(l(422),{cause:r}),dl(Cn(t,a)))):(r!==nu&&(s=Error(l(423),{cause:r}),dl(Cn(s,a))),t=t.current.alternate,t.flags|=65536,f&=-f,t.lanes|=f,r=Cn(r,a),f=$u(t.stateNode,r,f),hu(t,f),wt!==4&&(wt=2)),!1;var h=Error(l(520),{cause:r});if(h=Cn(h,a),Al===null?Al=[h]:Al.push(h),wt!==4&&(wt=2),s===null)return!0;r=Cn(r,a),a=s;do{switch(a.tag){case 3:return a.flags|=65536,t=f&-f,a.lanes|=t,t=$u(a.stateNode,r,t),hu(a,t),!1;case 1:if(s=a.type,h=a.stateNode,(a.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(Ks===null||!Ks.has(h))))return a.flags|=65536,f&=-f,a.lanes|=f,f=up(f),dp(f,t,a,r),hu(a,f),!1}a=a.return}while(a!==null);return!1}var Uu=Error(l(461)),Rt=!1;function Qt(t,s,a,r){s.child=t===null?pm(s,null,a,r):Ci(s,t.child,a,r)}function fp(t,s,a,r,f){a=a.render;var h=s.ref;if("ref"in r){var y={};for(var S in r)S!=="ref"&&(y[S]=r[S])}else y=r;return Ni(s),r=bu(t,s,a,y,h,f),S=xu(),t!==null&&!Rt?(Su(t,s,f),vs(t,s,f)):(Be&&S&&eu(s),s.flags|=1,Qt(t,s,r,f),s.child)}function hp(t,s,a,r,f){if(t===null){var h=a.type;return typeof h=="function"&&!Jc(h)&&h.defaultProps===void 0&&a.compare===null?(s.tag=15,s.type=h,mp(t,s,h,r,f)):(t=Nr(a.type,null,r,s,s.mode,f),t.ref=s.ref,t.return=s,s.child=t)}if(h=t.child,!Yu(t,f)){var y=h.memoizedProps;if(a=a.compare,a=a!==null?a:ol,a(y,r)&&t.ref===s.ref)return vs(t,s,f)}return s.flags|=1,t=fs(h,r),t.ref=s.ref,t.return=s,s.child=t}function mp(t,s,a,r,f){if(t!==null){var h=t.memoizedProps;if(ol(h,r)&&t.ref===s.ref)if(Rt=!1,s.pendingProps=r=h,Yu(t,f))(t.flags&131072)!==0&&(Rt=!0);else return s.lanes=t.lanes,vs(t,s,f)}return Bu(t,s,a,r,f)}function pp(t,s,a,r){var f=r.children,h=t!==null?t.memoizedState:null;if(t===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if((s.flags&128)!==0){if(h=h!==null?h.baseLanes|a:a,t!==null){for(r=s.child=t.child,f=0;r!==null;)f=f|r.lanes|r.childLanes,r=r.sibling;r=f&~h}else r=0,s.child=null;return gp(t,s,h,a,r)}if((a&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},t!==null&&Cr(s,h!==null?h.cachePool:null),h!==null?vm(s,h):pu(),bm(s);else return r=s.lanes=536870912,gp(t,s,h!==null?h.baseLanes|a:a,a,r)}else h!==null?(Cr(s,h.cachePool),vm(s,h),qs(),s.memoizedState=null):(t!==null&&Cr(s,null),pu(),qs());return Qt(t,s,f,a),s.child}function jl(t,s){return t!==null&&t.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function gp(t,s,a,r,f){var h=cu();return h=h===null?null:{parent:Ot._currentValue,pool:h},s.memoizedState={baseLanes:a,cachePool:h},t!==null&&Cr(s,null),pu(),bm(s),t!==null&&la(t,s,r,!0),s.childLanes=f,null}function Gr(t,s){return s=Yr({mode:s.mode,children:s.children},t.mode),s.ref=t.ref,t.child=s,s.return=t,s}function yp(t,s,a){return Ci(s,t.child,null,a),t=Gr(s,s.pendingProps),t.flags|=2,bn(s),s.memoizedState=null,t}function hS(t,s,a){var r=s.pendingProps,f=(s.flags&128)!==0;if(s.flags&=-129,t===null){if(Be){if(r.mode==="hidden")return t=Gr(s,r),s.lanes=536870912,jl(null,t);if(yu(s),(t=ot)?(t=Eg(t,Tn),t=t!==null&&t.data==="&"?t:null,t!==null&&(s.memoizedState={dehydrated:t,treeContext:Ds!==null?{id:Wn,overflow:es}:null,retryLane:536870912,hydrationErrors:null},a=em(t),a.return=s,s.child=a,Vt=s,ot=null)):t=null,t===null)throw Ls(s);return s.lanes=536870912,null}return Gr(s,r)}var h=t.memoizedState;if(h!==null){var y=h.dehydrated;if(yu(s),f)if(s.flags&256)s.flags&=-257,s=yp(t,s,a);else if(s.memoizedState!==null)s.child=t.child,s.flags|=128,s=null;else throw Error(l(558));else if(Rt||la(t,s,a,!1),f=(a&t.childLanes)!==0,Rt||f){if(r=st,r!==null&&(y=Ve(r,a),y!==0&&y!==h.retryLane))throw h.retryLane=y,xi(t,y),hn(r,t,y),Uu;to(),s=yp(t,s,a)}else t=h.treeContext,ot=Dn(y.nextSibling),Vt=s,Be=!0,Rs=null,Tn=!1,t!==null&&sm(s,t),s=Gr(s,r),s.flags|=4096;return s}return t=fs(t.child,{mode:r.mode,children:r.children}),t.ref=s.ref,s.child=t,t.return=s,t}function Kr(t,s){var a=s.ref;if(a===null)t!==null&&t.ref!==null&&(s.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(l(284));(t===null||t.ref!==a)&&(s.flags|=4194816)}}function Bu(t,s,a,r,f){return Ni(s),a=bu(t,s,a,r,void 0,f),r=xu(),t!==null&&!Rt?(Su(t,s,f),vs(t,s,f)):(Be&&r&&eu(s),s.flags|=1,Qt(t,s,a,f),s.child)}function vp(t,s,a,r,f,h){return Ni(s),s.updateQueue=null,a=Sm(s,r,a,f),xm(t),r=xu(),t!==null&&!Rt?(Su(t,s,h),vs(t,s,h)):(Be&&r&&eu(s),s.flags|=1,Qt(t,s,a,h),s.child)}function bp(t,s,a,r,f){if(Ni(s),s.stateNode===null){var h=na,y=a.contextType;typeof y=="object"&&y!==null&&(h=Pt(y)),h=new a(r,h),s.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=Mu,s.stateNode=h,h._reactInternals=s,h=s.stateNode,h.props=r,h.state=s.memoizedState,h.refs={},du(s),y=a.contextType,h.context=typeof y=="object"&&y!==null?Pt(y):na,h.state=s.memoizedState,y=a.getDerivedStateFromProps,typeof y=="function"&&(Lu(s,a,y,r),h.state=s.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(y=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),y!==h.state&&Mu.enqueueReplaceState(h,h.state,null),vl(s,r,h,f),yl(),h.state=s.memoizedState),typeof h.componentDidMount=="function"&&(s.flags|=4194308),r=!0}else if(t===null){h=s.stateNode;var S=s.memoizedProps,_=Ai(a,S);h.props=_;var I=h.context,P=a.contextType;y=na,typeof P=="object"&&P!==null&&(y=Pt(P));var W=a.getDerivedStateFromProps;P=typeof W=="function"||typeof h.getSnapshotBeforeUpdate=="function",S=s.pendingProps!==S,P||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(S||I!==y)&&ap(s,h,r,y),$s=!1;var Z=s.memoizedState;h.state=Z,vl(s,r,h,f),yl(),I=s.memoizedState,S||Z!==I||$s?(typeof W=="function"&&(Lu(s,a,W,r),I=s.memoizedState),(_=$s||ip(s,a,_,r,Z,I,y))?(P||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount()),typeof h.componentDidMount=="function"&&(s.flags|=4194308)):(typeof h.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=r,s.memoizedState=I),h.props=r,h.state=I,h.context=y,r=_):(typeof h.componentDidMount=="function"&&(s.flags|=4194308),r=!1)}else{h=s.stateNode,fu(t,s),y=s.memoizedProps,P=Ai(a,y),h.props=P,W=s.pendingProps,Z=h.context,I=a.contextType,_=na,typeof I=="object"&&I!==null&&(_=Pt(I)),S=a.getDerivedStateFromProps,(I=typeof S=="function"||typeof h.getSnapshotBeforeUpdate=="function")||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(y!==W||Z!==_)&&ap(s,h,r,_),$s=!1,Z=s.memoizedState,h.state=Z,vl(s,r,h,f),yl();var Y=s.memoizedState;y!==W||Z!==Y||$s||t!==null&&t.dependencies!==null&&zr(t.dependencies)?(typeof S=="function"&&(Lu(s,a,S,r),Y=s.memoizedState),(P=$s||ip(s,a,P,r,Z,Y,_)||t!==null&&t.dependencies!==null&&zr(t.dependencies))?(I||typeof h.UNSAFE_componentWillUpdate!="function"&&typeof h.componentWillUpdate!="function"||(typeof h.componentWillUpdate=="function"&&h.componentWillUpdate(r,Y,_),typeof h.UNSAFE_componentWillUpdate=="function"&&h.UNSAFE_componentWillUpdate(r,Y,_)),typeof h.componentDidUpdate=="function"&&(s.flags|=4),typeof h.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof h.componentDidUpdate!="function"||y===t.memoizedProps&&Z===t.memoizedState||(s.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||y===t.memoizedProps&&Z===t.memoizedState||(s.flags|=1024),s.memoizedProps=r,s.memoizedState=Y),h.props=r,h.state=Y,h.context=_,r=P):(typeof h.componentDidUpdate!="function"||y===t.memoizedProps&&Z===t.memoizedState||(s.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||y===t.memoizedProps&&Z===t.memoizedState||(s.flags|=1024),r=!1)}return h=r,Kr(t,s),r=(s.flags&128)!==0,h||r?(h=s.stateNode,a=r&&typeof a.getDerivedStateFromError!="function"?null:h.render(),s.flags|=1,t!==null&&r?(s.child=Ci(s,t.child,null,f),s.child=Ci(s,null,a,f)):Qt(t,s,a,f),s.memoizedState=h.state,t=s.child):t=vs(t,s,f),t}function xp(t,s,a,r){return wi(),s.flags|=256,Qt(t,s,a,r),s.child}var Iu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function qu(t){return{baseLanes:t,cachePool:cm()}}function Zu(t,s,a){return t=t!==null?t.childLanes&~a:0,s&&(t|=Sn),t}function Sp(t,s,a){var r=s.pendingProps,f=!1,h=(s.flags&128)!==0,y;if((y=h)||(y=t!==null&&t.memoizedState===null?!1:(kt.current&2)!==0),y&&(f=!0,s.flags&=-129),y=(s.flags&32)!==0,s.flags&=-33,t===null){if(Be){if(f?Is(s):qs(),(t=ot)?(t=Eg(t,Tn),t=t!==null&&t.data!=="&"?t:null,t!==null&&(s.memoizedState={dehydrated:t,treeContext:Ds!==null?{id:Wn,overflow:es}:null,retryLane:536870912,hydrationErrors:null},a=em(t),a.return=s,s.child=a,Vt=s,ot=null)):t=null,t===null)throw Ls(s);return Nd(t)?s.lanes=32:s.lanes=536870912,null}var S=r.children;return r=r.fallback,f?(qs(),f=s.mode,S=Yr({mode:"hidden",children:S},f),r=Si(r,f,a,null),S.return=s,r.return=s,S.sibling=r,s.child=S,r=s.child,r.memoizedState=qu(a),r.childLanes=Zu(t,y,a),s.memoizedState=Iu,jl(null,r)):(Is(s),Hu(s,S))}var _=t.memoizedState;if(_!==null&&(S=_.dehydrated,S!==null)){if(h)s.flags&256?(Is(s),s.flags&=-257,s=Gu(t,s,a)):s.memoizedState!==null?(qs(),s.child=t.child,s.flags|=128,s=null):(qs(),S=r.fallback,f=s.mode,r=Yr({mode:"visible",children:r.children},f),S=Si(S,f,a,null),S.flags|=2,r.return=s,S.return=s,r.sibling=S,s.child=r,Ci(s,t.child,null,a),r=s.child,r.memoizedState=qu(a),r.childLanes=Zu(t,y,a),s.memoizedState=Iu,s=jl(null,r));else if(Is(s),Nd(S)){if(y=S.nextSibling&&S.nextSibling.dataset,y)var I=y.dgst;y=I,r=Error(l(419)),r.stack="",r.digest=y,dl({value:r,source:null,stack:null}),s=Gu(t,s,a)}else if(Rt||la(t,s,a,!1),y=(a&t.childLanes)!==0,Rt||y){if(y=st,y!==null&&(r=Ve(y,a),r!==0&&r!==_.retryLane))throw _.retryLane=r,xi(t,r),hn(y,t,r),Uu;jd(S)||to(),s=Gu(t,s,a)}else jd(S)?(s.flags|=192,s.child=t.child,s=null):(t=_.treeContext,ot=Dn(S.nextSibling),Vt=s,Be=!0,Rs=null,Tn=!1,t!==null&&sm(s,t),s=Hu(s,r.children),s.flags|=4096);return s}return f?(qs(),S=r.fallback,f=s.mode,_=t.child,I=_.sibling,r=fs(_,{mode:"hidden",children:r.children}),r.subtreeFlags=_.subtreeFlags&65011712,I!==null?S=fs(I,S):(S=Si(S,f,a,null),S.flags|=2),S.return=s,r.return=s,r.sibling=S,s.child=r,jl(null,r),r=s.child,S=t.child.memoizedState,S===null?S=qu(a):(f=S.cachePool,f!==null?(_=Ot._currentValue,f=f.parent!==_?{parent:_,pool:_}:f):f=cm(),S={baseLanes:S.baseLanes|a,cachePool:f}),r.memoizedState=S,r.childLanes=Zu(t,y,a),s.memoizedState=Iu,jl(t.child,r)):(Is(s),a=t.child,t=a.sibling,a=fs(a,{mode:"visible",children:r.children}),a.return=s,a.sibling=null,t!==null&&(y=s.deletions,y===null?(s.deletions=[t],s.flags|=16):y.push(t)),s.child=a,s.memoizedState=null,a)}function Hu(t,s){return s=Yr({mode:"visible",children:s},t.mode),s.return=t,t.child=s}function Yr(t,s){return t=yn(22,t,null,s),t.lanes=0,t}function Gu(t,s,a){return Ci(s,t.child,null,a),t=Hu(s,s.pendingProps.children),t.flags|=2,s.memoizedState=null,t}function wp(t,s,a){t.lanes|=s;var r=t.alternate;r!==null&&(r.lanes|=s),au(t.return,s,a)}function Ku(t,s,a,r,f,h){var y=t.memoizedState;y===null?t.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:r,tail:a,tailMode:f,treeForkCount:h}:(y.isBackwards=s,y.rendering=null,y.renderingStartTime=0,y.last=r,y.tail=a,y.tailMode=f,y.treeForkCount=h)}function jp(t,s,a){var r=s.pendingProps,f=r.revealOrder,h=r.tail;r=r.children;var y=kt.current,S=(y&2)!==0;if(S?(y=y&1|2,s.flags|=128):y&=1,ne(kt,y),Qt(t,s,r,a),r=Be?ul:0,!S&&t!==null&&(t.flags&128)!==0)e:for(t=s.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&wp(t,a,s);else if(t.tag===19)wp(t,a,s);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===s)break e;for(;t.sibling===null;){if(t.return===null||t.return===s)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(f){case"forwards":for(a=s.child,f=null;a!==null;)t=a.alternate,t!==null&&Rr(t)===null&&(f=a),a=a.sibling;a=f,a===null?(f=s.child,s.child=null):(f=a.sibling,a.sibling=null),Ku(s,!1,f,a,h,r);break;case"backwards":case"unstable_legacy-backwards":for(a=null,f=s.child,s.child=null;f!==null;){if(t=f.alternate,t!==null&&Rr(t)===null){s.child=f;break}t=f.sibling,f.sibling=a,a=f,f=t}Ku(s,!0,a,null,h,r);break;case"together":Ku(s,!1,null,null,void 0,r);break;default:s.memoizedState=null}return s.child}function vs(t,s,a){if(t!==null&&(s.dependencies=t.dependencies),Gs|=s.lanes,(a&s.childLanes)===0)if(t!==null){if(la(t,s,a,!1),(a&s.childLanes)===0)return null}else return null;if(t!==null&&s.child!==t.child)throw Error(l(153));if(s.child!==null){for(t=s.child,a=fs(t,t.pendingProps),s.child=a,a.return=s;t.sibling!==null;)t=t.sibling,a=a.sibling=fs(t,t.pendingProps),a.return=s;a.sibling=null}return s.child}function Yu(t,s){return(t.lanes&s)!==0?!0:(t=t.dependencies,!!(t!==null&&zr(t)))}function mS(t,s,a){switch(s.tag){case 3:U(s,s.stateNode.containerInfo),Ms(s,Ot,t.memoizedState.cache),wi();break;case 27:case 5:Ze(s);break;case 4:U(s,s.stateNode.containerInfo);break;case 10:Ms(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,yu(s),null;break;case 13:var r=s.memoizedState;if(r!==null)return r.dehydrated!==null?(Is(s),s.flags|=128,null):(a&s.child.childLanes)!==0?Sp(t,s,a):(Is(s),t=vs(t,s,a),t!==null?t.sibling:null);Is(s);break;case 19:var f=(t.flags&128)!==0;if(r=(a&s.childLanes)!==0,r||(la(t,s,a,!1),r=(a&s.childLanes)!==0),f){if(r)return jp(t,s,a);s.flags|=128}if(f=s.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),ne(kt,kt.current),r)break;return null;case 22:return s.lanes=0,pp(t,s,a,s.pendingProps);case 24:Ms(s,Ot,t.memoizedState.cache)}return vs(t,s,a)}function Np(t,s,a){if(t!==null)if(t.memoizedProps!==s.pendingProps)Rt=!0;else{if(!Yu(t,a)&&(s.flags&128)===0)return Rt=!1,mS(t,s,a);Rt=(t.flags&131072)!==0}else Rt=!1,Be&&(s.flags&1048576)!==0&&nm(s,ul,s.index);switch(s.lanes=0,s.tag){case 16:e:{var r=s.pendingProps;if(t=zi(s.elementType),s.type=t,typeof t=="function")Jc(t)?(r=Ai(t,r),s.tag=1,s=bp(null,s,t,r,a)):(s.tag=0,s=Bu(null,s,t,r,a));else{if(t!=null){var f=t.$$typeof;if(f===D){s.tag=11,s=fp(null,s,t,r,a);break e}else if(f===V){s.tag=14,s=hp(null,s,t,r,a);break e}}throw s=qe(t)||t,Error(l(306,s,""))}}return s;case 0:return Bu(t,s,s.type,s.pendingProps,a);case 1:return r=s.type,f=Ai(r,s.pendingProps),bp(t,s,r,f,a);case 3:e:{if(U(s,s.stateNode.containerInfo),t===null)throw Error(l(387));r=s.pendingProps;var h=s.memoizedState;f=h.element,fu(t,s),vl(s,r,null,a);var y=s.memoizedState;if(r=y.cache,Ms(s,Ot,r),r!==h.cache&&lu(s,[Ot],a,!0),yl(),r=y.element,h.isDehydrated)if(h={element:r,isDehydrated:!1,cache:y.cache},s.updateQueue.baseState=h,s.memoizedState=h,s.flags&256){s=xp(t,s,r,a);break e}else if(r!==f){f=Cn(Error(l(424)),s),dl(f),s=xp(t,s,r,a);break e}else for(t=s.stateNode.containerInfo,t.nodeType===9?t=t.body:t=t.nodeName==="HTML"?t.ownerDocument.body:t,ot=Dn(t.firstChild),Vt=s,Be=!0,Rs=null,Tn=!0,a=pm(s,null,r,a),s.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(wi(),r===f){s=vs(t,s,a);break e}Qt(t,s,r,a)}s=s.child}return s;case 26:return Kr(t,s),t===null?(a=Lg(s.type,null,s.pendingProps,null))?s.memoizedState=a:Be||(a=s.type,t=s.pendingProps,r=oo(me.current).createElement(a),r[Ke]=s,r[Nt]=t,Xt(r,a,t),Gt(r),s.stateNode=r):s.memoizedState=Lg(s.type,t.memoizedProps,s.pendingProps,t.memoizedState),null;case 27:return Ze(s),t===null&&Be&&(r=s.stateNode=Og(s.type,s.pendingProps,me.current),Vt=s,Tn=!0,f=ot,Qs(s.type)?(kd=f,ot=Dn(r.firstChild)):ot=f),Qt(t,s,s.pendingProps.children,a),Kr(t,s),t===null&&(s.flags|=4194304),s.child;case 5:return t===null&&Be&&((f=r=ot)&&(r=GS(r,s.type,s.pendingProps,Tn),r!==null?(s.stateNode=r,Vt=s,ot=Dn(r.firstChild),Tn=!1,f=!0):f=!1),f||Ls(s)),Ze(s),f=s.type,h=s.pendingProps,y=t!==null?t.memoizedProps:null,r=h.children,xd(f,h)?r=null:y!==null&&xd(f,y)&&(s.flags|=32),s.memoizedState!==null&&(f=bu(t,s,aS,null,null,a),Ul._currentValue=f),Kr(t,s),Qt(t,s,r,a),s.child;case 6:return t===null&&Be&&((t=a=ot)&&(a=KS(a,s.pendingProps,Tn),a!==null?(s.stateNode=a,Vt=s,ot=null,t=!0):t=!1),t||Ls(s)),null;case 13:return Sp(t,s,a);case 4:return U(s,s.stateNode.containerInfo),r=s.pendingProps,t===null?s.child=Ci(s,null,r,a):Qt(t,s,r,a),s.child;case 11:return fp(t,s,s.type,s.pendingProps,a);case 7:return Qt(t,s,s.pendingProps,a),s.child;case 8:return Qt(t,s,s.pendingProps.children,a),s.child;case 12:return Qt(t,s,s.pendingProps.children,a),s.child;case 10:return r=s.pendingProps,Ms(s,s.type,r.value),Qt(t,s,r.children,a),s.child;case 9:return f=s.type._context,r=s.pendingProps.children,Ni(s),f=Pt(f),r=r(f),s.flags|=1,Qt(t,s,r,a),s.child;case 14:return hp(t,s,s.type,s.pendingProps,a);case 15:return mp(t,s,s.type,s.pendingProps,a);case 19:return jp(t,s,a);case 31:return hS(t,s,a);case 22:return pp(t,s,a,s.pendingProps);case 24:return Ni(s),r=Pt(Ot),t===null?(f=cu(),f===null&&(f=st,h=ru(),f.pooledCache=h,h.refCount++,h!==null&&(f.pooledCacheLanes|=a),f=h),s.memoizedState={parent:r,cache:f},du(s),Ms(s,Ot,f)):((t.lanes&a)!==0&&(fu(t,s),vl(s,null,null,a),yl()),f=t.memoizedState,h=s.memoizedState,f.parent!==r?(f={parent:r,cache:r},s.memoizedState=f,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=f),Ms(s,Ot,r)):(r=h.cache,Ms(s,Ot,r),r!==f.cache&&lu(s,[Ot],a,!0))),Qt(t,s,s.pendingProps.children,a),s.child;case 29:throw s.pendingProps}throw Error(l(156,s.tag))}function bs(t){t.flags|=4}function Vu(t,s,a,r,f){if((s=(t.mode&32)!==0)&&(s=!1),s){if(t.flags|=16777216,(f&335544128)===f)if(t.stateNode.complete)t.flags|=8192;else if(Jp())t.flags|=8192;else throw _i=Ar,uu}else t.flags&=-16777217}function kp(t,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!Ig(s))if(Jp())t.flags|=8192;else throw _i=Ar,uu}function Vr(t,s){s!==null&&(t.flags|=4),t.flags&16384&&(s=t.tag!==22?or():536870912,t.lanes|=s,va|=s)}function Nl(t,s){if(!Be)switch(t.tailMode){case"hidden":s=t.tail;for(var a=null;s!==null;)s.alternate!==null&&(a=s),s=s.sibling;a===null?t.tail=null:a.sibling=null;break;case"collapsed":a=t.tail;for(var r=null;a!==null;)a.alternate!==null&&(r=a),a=a.sibling;r===null?s||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null}}function ct(t){var s=t.alternate!==null&&t.alternate.child===t.child,a=0,r=0;if(s)for(var f=t.child;f!==null;)a|=f.lanes|f.childLanes,r|=f.subtreeFlags&65011712,r|=f.flags&65011712,f.return=t,f=f.sibling;else for(f=t.child;f!==null;)a|=f.lanes|f.childLanes,r|=f.subtreeFlags,r|=f.flags,f.return=t,f=f.sibling;return t.subtreeFlags|=r,t.childLanes=a,s}function pS(t,s,a){var r=s.pendingProps;switch(tu(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ct(s),null;case 1:return ct(s),null;case 3:return a=s.stateNode,r=null,t!==null&&(r=t.memoizedState.cache),s.memoizedState.cache!==r&&(s.flags|=2048),ps(Ot),se(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(t===null||t.child===null)&&(aa(s)?bs(s):t===null||t.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,su())),ct(s),null;case 26:var f=s.type,h=s.memoizedState;return t===null?(bs(s),h!==null?(ct(s),kp(s,h)):(ct(s),Vu(s,f,null,r,a))):h?h!==t.memoizedState?(bs(s),ct(s),kp(s,h)):(ct(s),s.flags&=-16777217):(t=t.memoizedProps,t!==r&&bs(s),ct(s),Vu(s,f,t,r,a)),null;case 27:if(re(s),a=me.current,f=s.type,t!==null&&s.stateNode!=null)t.memoizedProps!==r&&bs(s);else{if(!r){if(s.stateNode===null)throw Error(l(166));return ct(s),null}t=F.current,aa(s)?im(s):(t=Og(f,r,a),s.stateNode=t,bs(s))}return ct(s),null;case 5:if(re(s),f=s.type,t!==null&&s.stateNode!=null)t.memoizedProps!==r&&bs(s);else{if(!r){if(s.stateNode===null)throw Error(l(166));return ct(s),null}if(h=F.current,aa(s))im(s);else{var y=oo(me.current);switch(h){case 1:h=y.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:h=y.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":h=y.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":h=y.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":h=y.createElement("div"),h.innerHTML="<script><\/script>",h=h.removeChild(h.firstChild);break;case"select":h=typeof r.is=="string"?y.createElement("select",{is:r.is}):y.createElement("select"),r.multiple?h.multiple=!0:r.size&&(h.size=r.size);break;default:h=typeof r.is=="string"?y.createElement(f,{is:r.is}):y.createElement(f)}}h[Ke]=s,h[Nt]=r;e:for(y=s.child;y!==null;){if(y.tag===5||y.tag===6)h.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===s)break e;for(;y.sibling===null;){if(y.return===null||y.return===s)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}s.stateNode=h;e:switch(Xt(h,f,r),f){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&bs(s)}}return ct(s),Vu(s,s.type,t===null?null:t.memoizedProps,s.pendingProps,a),null;case 6:if(t&&s.stateNode!=null)t.memoizedProps!==r&&bs(s);else{if(typeof r!="string"&&s.stateNode===null)throw Error(l(166));if(t=me.current,aa(s)){if(t=s.stateNode,a=s.memoizedProps,r=null,f=Vt,f!==null)switch(f.tag){case 27:case 5:r=f.memoizedProps}t[Ke]=s,t=!!(t.nodeValue===a||r!==null&&r.suppressHydrationWarning===!0||Sg(t.nodeValue,a)),t||Ls(s,!0)}else t=oo(t).createTextNode(r),t[Ke]=s,s.stateNode=t}return ct(s),null;case 31:if(a=s.memoizedState,t===null||t.memoizedState!==null){if(r=aa(s),a!==null){if(t===null){if(!r)throw Error(l(318));if(t=s.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(557));t[Ke]=s}else wi(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;ct(s),t=!1}else a=su(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=a),t=!0;if(!t)return s.flags&256?(bn(s),s):(bn(s),null);if((s.flags&128)!==0)throw Error(l(558))}return ct(s),null;case 13:if(r=s.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(f=aa(s),r!==null&&r.dehydrated!==null){if(t===null){if(!f)throw Error(l(318));if(f=s.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(l(317));f[Ke]=s}else wi(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;ct(s),f=!1}else f=su(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=f),f=!0;if(!f)return s.flags&256?(bn(s),s):(bn(s),null)}return bn(s),(s.flags&128)!==0?(s.lanes=a,s):(a=r!==null,t=t!==null&&t.memoizedState!==null,a&&(r=s.child,f=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(f=r.alternate.memoizedState.cachePool.pool),h=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(h=r.memoizedState.cachePool.pool),h!==f&&(r.flags|=2048)),a!==t&&a&&(s.child.flags|=8192),Vr(s,s.updateQueue),ct(s),null);case 4:return se(),t===null&&pd(s.stateNode.containerInfo),ct(s),null;case 10:return ps(s.type),ct(s),null;case 19:if(G(kt),r=s.memoizedState,r===null)return ct(s),null;if(f=(s.flags&128)!==0,h=r.rendering,h===null)if(f)Nl(r,!1);else{if(wt!==0||t!==null&&(t.flags&128)!==0)for(t=s.child;t!==null;){if(h=Rr(t),h!==null){for(s.flags|=128,Nl(r,!1),t=h.updateQueue,s.updateQueue=t,Vr(s,t),s.subtreeFlags=0,t=a,a=s.child;a!==null;)Wh(a,t),a=a.sibling;return ne(kt,kt.current&1|2),Be&&hs(s,r.treeForkCount),s.child}t=t.sibling}r.tail!==null&&Tt()>Fr&&(s.flags|=128,f=!0,Nl(r,!1),s.lanes=4194304)}else{if(!f)if(t=Rr(h),t!==null){if(s.flags|=128,f=!0,t=t.updateQueue,s.updateQueue=t,Vr(s,t),Nl(r,!0),r.tail===null&&r.tailMode==="hidden"&&!h.alternate&&!Be)return ct(s),null}else 2*Tt()-r.renderingStartTime>Fr&&a!==536870912&&(s.flags|=128,f=!0,Nl(r,!1),s.lanes=4194304);r.isBackwards?(h.sibling=s.child,s.child=h):(t=r.last,t!==null?t.sibling=h:s.child=h,r.last=h)}return r.tail!==null?(t=r.tail,r.rendering=t,r.tail=t.sibling,r.renderingStartTime=Tt(),t.sibling=null,a=kt.current,ne(kt,f?a&1|2:a&1),Be&&hs(s,r.treeForkCount),t):(ct(s),null);case 22:case 23:return bn(s),gu(),r=s.memoizedState!==null,t!==null?t.memoizedState!==null!==r&&(s.flags|=8192):r&&(s.flags|=8192),r?(a&536870912)!==0&&(s.flags&128)===0&&(ct(s),s.subtreeFlags&6&&(s.flags|=8192)):ct(s),a=s.updateQueue,a!==null&&Vr(s,a.retryQueue),a=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),r=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(r=s.memoizedState.cachePool.pool),r!==a&&(s.flags|=2048),t!==null&&G(ki),null;case 24:return a=null,t!==null&&(a=t.memoizedState.cache),s.memoizedState.cache!==a&&(s.flags|=2048),ps(Ot),ct(s),null;case 25:return null;case 30:return null}throw Error(l(156,s.tag))}function gS(t,s){switch(tu(s),s.tag){case 1:return t=s.flags,t&65536?(s.flags=t&-65537|128,s):null;case 3:return ps(Ot),se(),t=s.flags,(t&65536)!==0&&(t&128)===0?(s.flags=t&-65537|128,s):null;case 26:case 27:case 5:return re(s),null;case 31:if(s.memoizedState!==null){if(bn(s),s.alternate===null)throw Error(l(340));wi()}return t=s.flags,t&65536?(s.flags=t&-65537|128,s):null;case 13:if(bn(s),t=s.memoizedState,t!==null&&t.dehydrated!==null){if(s.alternate===null)throw Error(l(340));wi()}return t=s.flags,t&65536?(s.flags=t&-65537|128,s):null;case 19:return G(kt),null;case 4:return se(),null;case 10:return ps(s.type),null;case 22:case 23:return bn(s),gu(),t!==null&&G(ki),t=s.flags,t&65536?(s.flags=t&-65537|128,s):null;case 24:return ps(Ot),null;case 25:return null;default:return null}}function zp(t,s){switch(tu(s),s.tag){case 3:ps(Ot),se();break;case 26:case 27:case 5:re(s);break;case 4:se();break;case 31:s.memoizedState!==null&&bn(s);break;case 13:bn(s);break;case 19:G(kt);break;case 10:ps(s.type);break;case 22:case 23:bn(s),gu(),t!==null&&G(ki);break;case 24:ps(Ot)}}function kl(t,s){try{var a=s.updateQueue,r=a!==null?a.lastEffect:null;if(r!==null){var f=r.next;a=f;do{if((a.tag&t)===t){r=void 0;var h=a.create,y=a.inst;r=h(),y.destroy=r}a=a.next}while(a!==f)}}catch(S){Je(s,s.return,S)}}function Zs(t,s,a){try{var r=s.updateQueue,f=r!==null?r.lastEffect:null;if(f!==null){var h=f.next;r=h;do{if((r.tag&t)===t){var y=r.inst,S=y.destroy;if(S!==void 0){y.destroy=void 0,f=s;var _=a,I=S;try{I()}catch(P){Je(f,_,P)}}}r=r.next}while(r!==h)}}catch(P){Je(s,s.return,P)}}function _p(t){var s=t.updateQueue;if(s!==null){var a=t.stateNode;try{ym(s,a)}catch(r){Je(t,t.return,r)}}}function Cp(t,s,a){a.props=Ai(t.type,t.memoizedProps),a.state=t.memoizedState;try{a.componentWillUnmount()}catch(r){Je(t,s,r)}}function zl(t,s){try{var a=t.ref;if(a!==null){switch(t.tag){case 26:case 27:case 5:var r=t.stateNode;break;case 30:r=t.stateNode;break;default:r=t.stateNode}typeof a=="function"?t.refCleanup=a(r):a.current=r}}catch(f){Je(t,s,f)}}function ts(t,s){var a=t.ref,r=t.refCleanup;if(a!==null)if(typeof r=="function")try{r()}catch(f){Je(t,s,f)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(f){Je(t,s,f)}else a.current=null}function Ep(t){var s=t.type,a=t.memoizedProps,r=t.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":a.autoFocus&&r.focus();break e;case"img":a.src?r.src=a.src:a.srcSet&&(r.srcset=a.srcSet)}}catch(f){Je(t,t.return,f)}}function Pu(t,s,a){try{var r=t.stateNode;US(r,t.type,a,s),r[Nt]=s}catch(f){Je(t,t.return,f)}}function Ap(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Qs(t.type)||t.tag===4}function Qu(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Ap(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Qs(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Xu(t,s,a){var r=t.tag;if(r===5||r===6)t=t.stateNode,s?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(t,s):(s=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,s.appendChild(t),a=a._reactRootContainer,a!=null||s.onclick!==null||(s.onclick=us));else if(r!==4&&(r===27&&Qs(t.type)&&(a=t.stateNode,s=null),t=t.child,t!==null))for(Xu(t,s,a),t=t.sibling;t!==null;)Xu(t,s,a),t=t.sibling}function Pr(t,s,a){var r=t.tag;if(r===5||r===6)t=t.stateNode,s?a.insertBefore(t,s):a.appendChild(t);else if(r!==4&&(r===27&&Qs(t.type)&&(a=t.stateNode),t=t.child,t!==null))for(Pr(t,s,a),t=t.sibling;t!==null;)Pr(t,s,a),t=t.sibling}function Tp(t){var s=t.stateNode,a=t.memoizedProps;try{for(var r=t.type,f=s.attributes;f.length;)s.removeAttributeNode(f[0]);Xt(s,r,a),s[Ke]=t,s[Nt]=a}catch(h){Je(t,t.return,h)}}var xs=!1,Lt=!1,Ju=!1,Op=typeof WeakSet=="function"?WeakSet:Set,Kt=null;function yS(t,s){if(t=t.containerInfo,vd=go,t=Gh(t),Gc(t)){if("selectionStart"in t)var a={start:t.selectionStart,end:t.selectionEnd};else e:{a=(a=t.ownerDocument)&&a.defaultView||window;var r=a.getSelection&&a.getSelection();if(r&&r.rangeCount!==0){a=r.anchorNode;var f=r.anchorOffset,h=r.focusNode;r=r.focusOffset;try{a.nodeType,h.nodeType}catch{a=null;break e}var y=0,S=-1,_=-1,I=0,P=0,W=t,Z=null;t:for(;;){for(var Y;W!==a||f!==0&&W.nodeType!==3||(S=y+f),W!==h||r!==0&&W.nodeType!==3||(_=y+r),W.nodeType===3&&(y+=W.nodeValue.length),(Y=W.firstChild)!==null;)Z=W,W=Y;for(;;){if(W===t)break t;if(Z===a&&++I===f&&(S=y),Z===h&&++P===r&&(_=y),(Y=W.nextSibling)!==null)break;W=Z,Z=W.parentNode}W=Y}a=S===-1||_===-1?null:{start:S,end:_}}else a=null}a=a||{start:0,end:0}}else a=null;for(bd={focusedElem:t,selectionRange:a},go=!1,Kt=s;Kt!==null;)if(s=Kt,t=s.child,(s.subtreeFlags&1028)!==0&&t!==null)t.return=s,Kt=t;else for(;Kt!==null;){switch(s=Kt,h=s.alternate,t=s.flags,s.tag){case 0:if((t&4)!==0&&(t=s.updateQueue,t=t!==null?t.events:null,t!==null))for(a=0;a<t.length;a++)f=t[a],f.ref.impl=f.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&h!==null){t=void 0,a=s,f=h.memoizedProps,h=h.memoizedState,r=a.stateNode;try{var pe=Ai(a.type,f);t=r.getSnapshotBeforeUpdate(pe,h),r.__reactInternalSnapshotBeforeUpdate=t}catch(je){Je(a,a.return,je)}}break;case 3:if((t&1024)!==0){if(t=s.stateNode.containerInfo,a=t.nodeType,a===9)wd(t);else if(a===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":wd(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(l(163))}if(t=s.sibling,t!==null){t.return=s.return,Kt=t;break}Kt=s.return}}function Dp(t,s,a){var r=a.flags;switch(a.tag){case 0:case 11:case 15:ws(t,a),r&4&&kl(5,a);break;case 1:if(ws(t,a),r&4)if(t=a.stateNode,s===null)try{t.componentDidMount()}catch(y){Je(a,a.return,y)}else{var f=Ai(a.type,s.memoizedProps);s=s.memoizedState;try{t.componentDidUpdate(f,s,t.__reactInternalSnapshotBeforeUpdate)}catch(y){Je(a,a.return,y)}}r&64&&_p(a),r&512&&zl(a,a.return);break;case 3:if(ws(t,a),r&64&&(t=a.updateQueue,t!==null)){if(s=null,a.child!==null)switch(a.child.tag){case 27:case 5:s=a.child.stateNode;break;case 1:s=a.child.stateNode}try{ym(t,s)}catch(y){Je(a,a.return,y)}}break;case 27:s===null&&r&4&&Tp(a);case 26:case 5:ws(t,a),s===null&&r&4&&Ep(a),r&512&&zl(a,a.return);break;case 12:ws(t,a);break;case 31:ws(t,a),r&4&&Mp(t,a);break;case 13:ws(t,a),r&4&&$p(t,a),r&64&&(t=a.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(a=zS.bind(null,a),YS(t,a))));break;case 22:if(r=a.memoizedState!==null||xs,!r){s=s!==null&&s.memoizedState!==null||Lt,f=xs;var h=Lt;xs=r,(Lt=s)&&!h?js(t,a,(a.subtreeFlags&8772)!==0):ws(t,a),xs=f,Lt=h}break;case 30:break;default:ws(t,a)}}function Rp(t){var s=t.alternate;s!==null&&(t.alternate=null,Rp(s)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(s=t.stateNode,s!==null&&pi(s)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var pt=null,cn=!1;function Ss(t,s,a){for(a=a.child;a!==null;)Lp(t,s,a),a=a.sibling}function Lp(t,s,a){if(Wt&&typeof Wt.onCommitFiberUnmount=="function")try{Wt.onCommitFiberUnmount(Qe,a)}catch{}switch(a.tag){case 26:Lt||ts(a,s),Ss(t,s,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Lt||ts(a,s);var r=pt,f=cn;Qs(a.type)&&(pt=a.stateNode,cn=!1),Ss(t,s,a),Ll(a.stateNode),pt=r,cn=f;break;case 5:Lt||ts(a,s);case 6:if(r=pt,f=cn,pt=null,Ss(t,s,a),pt=r,cn=f,pt!==null)if(cn)try{(pt.nodeType===9?pt.body:pt.nodeName==="HTML"?pt.ownerDocument.body:pt).removeChild(a.stateNode)}catch(h){Je(a,s,h)}else try{pt.removeChild(a.stateNode)}catch(h){Je(a,s,h)}break;case 18:pt!==null&&(cn?(t=pt,_g(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,a.stateNode),za(t)):_g(pt,a.stateNode));break;case 4:r=pt,f=cn,pt=a.stateNode.containerInfo,cn=!0,Ss(t,s,a),pt=r,cn=f;break;case 0:case 11:case 14:case 15:Zs(2,a,s),Lt||Zs(4,a,s),Ss(t,s,a);break;case 1:Lt||(ts(a,s),r=a.stateNode,typeof r.componentWillUnmount=="function"&&Cp(a,s,r)),Ss(t,s,a);break;case 21:Ss(t,s,a);break;case 22:Lt=(r=Lt)||a.memoizedState!==null,Ss(t,s,a),Lt=r;break;default:Ss(t,s,a)}}function Mp(t,s){if(s.memoizedState===null&&(t=s.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{za(t)}catch(a){Je(s,s.return,a)}}}function $p(t,s){if(s.memoizedState===null&&(t=s.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{za(t)}catch(a){Je(s,s.return,a)}}function vS(t){switch(t.tag){case 31:case 13:case 19:var s=t.stateNode;return s===null&&(s=t.stateNode=new Op),s;case 22:return t=t.stateNode,s=t._retryCache,s===null&&(s=t._retryCache=new Op),s;default:throw Error(l(435,t.tag))}}function Qr(t,s){var a=vS(t);s.forEach(function(r){if(!a.has(r)){a.add(r);var f=_S.bind(null,t,r);r.then(f,f)}})}function un(t,s){var a=s.deletions;if(a!==null)for(var r=0;r<a.length;r++){var f=a[r],h=t,y=s,S=y;e:for(;S!==null;){switch(S.tag){case 27:if(Qs(S.type)){pt=S.stateNode,cn=!1;break e}break;case 5:pt=S.stateNode,cn=!1;break e;case 3:case 4:pt=S.stateNode.containerInfo,cn=!0;break e}S=S.return}if(pt===null)throw Error(l(160));Lp(h,y,f),pt=null,cn=!1,h=f.alternate,h!==null&&(h.return=null),f.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)Up(s,t),s=s.sibling}var Zn=null;function Up(t,s){var a=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:un(s,t),dn(t),r&4&&(Zs(3,t,t.return),kl(3,t),Zs(5,t,t.return));break;case 1:un(s,t),dn(t),r&512&&(Lt||a===null||ts(a,a.return)),r&64&&xs&&(t=t.updateQueue,t!==null&&(r=t.callbacks,r!==null&&(a=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=a===null?r:a.concat(r))));break;case 26:var f=Zn;if(un(s,t),dn(t),r&512&&(Lt||a===null||ts(a,a.return)),r&4){var h=a!==null?a.memoizedState:null;if(r=t.memoizedState,a===null)if(r===null)if(t.stateNode===null){e:{r=t.type,a=t.memoizedProps,f=f.ownerDocument||f;t:switch(r){case"title":h=f.getElementsByTagName("title")[0],(!h||h[os]||h[Ke]||h.namespaceURI==="http://www.w3.org/2000/svg"||h.hasAttribute("itemprop"))&&(h=f.createElement(r),f.head.insertBefore(h,f.querySelector("head > title"))),Xt(h,r,a),h[Ke]=t,Gt(h),r=h;break e;case"link":var y=Ug("link","href",f).get(r+(a.href||""));if(y){for(var S=0;S<y.length;S++)if(h=y[S],h.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&h.getAttribute("rel")===(a.rel==null?null:a.rel)&&h.getAttribute("title")===(a.title==null?null:a.title)&&h.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){y.splice(S,1);break t}}h=f.createElement(r),Xt(h,r,a),f.head.appendChild(h);break;case"meta":if(y=Ug("meta","content",f).get(r+(a.content||""))){for(S=0;S<y.length;S++)if(h=y[S],h.getAttribute("content")===(a.content==null?null:""+a.content)&&h.getAttribute("name")===(a.name==null?null:a.name)&&h.getAttribute("property")===(a.property==null?null:a.property)&&h.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&h.getAttribute("charset")===(a.charSet==null?null:a.charSet)){y.splice(S,1);break t}}h=f.createElement(r),Xt(h,r,a),f.head.appendChild(h);break;default:throw Error(l(468,r))}h[Ke]=t,Gt(h),r=h}t.stateNode=r}else Bg(f,t.type,t.stateNode);else t.stateNode=$g(f,r,t.memoizedProps);else h!==r?(h===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):h.count--,r===null?Bg(f,t.type,t.stateNode):$g(f,r,t.memoizedProps)):r===null&&t.stateNode!==null&&Pu(t,t.memoizedProps,a.memoizedProps)}break;case 27:un(s,t),dn(t),r&512&&(Lt||a===null||ts(a,a.return)),a!==null&&r&4&&Pu(t,t.memoizedProps,a.memoizedProps);break;case 5:if(un(s,t),dn(t),r&512&&(Lt||a===null||ts(a,a.return)),t.flags&32){f=t.stateNode;try{Qi(f,"")}catch(pe){Je(t,t.return,pe)}}r&4&&t.stateNode!=null&&(f=t.memoizedProps,Pu(t,f,a!==null?a.memoizedProps:f)),r&1024&&(Ju=!0);break;case 6:if(un(s,t),dn(t),r&4){if(t.stateNode===null)throw Error(l(162));r=t.memoizedProps,a=t.stateNode;try{a.nodeValue=r}catch(pe){Je(t,t.return,pe)}}break;case 3:if(fo=null,f=Zn,Zn=co(s.containerInfo),un(s,t),Zn=f,dn(t),r&4&&a!==null&&a.memoizedState.isDehydrated)try{za(s.containerInfo)}catch(pe){Je(t,t.return,pe)}Ju&&(Ju=!1,Bp(t));break;case 4:r=Zn,Zn=co(t.stateNode.containerInfo),un(s,t),dn(t),Zn=r;break;case 12:un(s,t),dn(t);break;case 31:un(s,t),dn(t),r&4&&(r=t.updateQueue,r!==null&&(t.updateQueue=null,Qr(t,r)));break;case 13:un(s,t),dn(t),t.child.flags&8192&&t.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Jr=Tt()),r&4&&(r=t.updateQueue,r!==null&&(t.updateQueue=null,Qr(t,r)));break;case 22:f=t.memoizedState!==null;var _=a!==null&&a.memoizedState!==null,I=xs,P=Lt;if(xs=I||f,Lt=P||_,un(s,t),Lt=P,xs=I,dn(t),r&8192)e:for(s=t.stateNode,s._visibility=f?s._visibility&-2:s._visibility|1,f&&(a===null||_||xs||Lt||Ti(t)),a=null,s=t;;){if(s.tag===5||s.tag===26){if(a===null){_=a=s;try{if(h=_.stateNode,f)y=h.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{S=_.stateNode;var W=_.memoizedProps.style,Z=W!=null&&W.hasOwnProperty("display")?W.display:null;S.style.display=Z==null||typeof Z=="boolean"?"":(""+Z).trim()}}catch(pe){Je(_,_.return,pe)}}}else if(s.tag===6){if(a===null){_=s;try{_.stateNode.nodeValue=f?"":_.memoizedProps}catch(pe){Je(_,_.return,pe)}}}else if(s.tag===18){if(a===null){_=s;try{var Y=_.stateNode;f?Cg(Y,!0):Cg(_.stateNode,!1)}catch(pe){Je(_,_.return,pe)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===t)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break e;for(;s.sibling===null;){if(s.return===null||s.return===t)break e;a===s&&(a=null),s=s.return}a===s&&(a=null),s.sibling.return=s.return,s=s.sibling}r&4&&(r=t.updateQueue,r!==null&&(a=r.retryQueue,a!==null&&(r.retryQueue=null,Qr(t,a))));break;case 19:un(s,t),dn(t),r&4&&(r=t.updateQueue,r!==null&&(t.updateQueue=null,Qr(t,r)));break;case 30:break;case 21:break;default:un(s,t),dn(t)}}function dn(t){var s=t.flags;if(s&2){try{for(var a,r=t.return;r!==null;){if(Ap(r)){a=r;break}r=r.return}if(a==null)throw Error(l(160));switch(a.tag){case 27:var f=a.stateNode,h=Qu(t);Pr(t,h,f);break;case 5:var y=a.stateNode;a.flags&32&&(Qi(y,""),a.flags&=-33);var S=Qu(t);Pr(t,S,y);break;case 3:case 4:var _=a.stateNode.containerInfo,I=Qu(t);Xu(t,I,_);break;default:throw Error(l(161))}}catch(P){Je(t,t.return,P)}t.flags&=-3}s&4096&&(t.flags&=-4097)}function Bp(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var s=t;Bp(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),t=t.sibling}}function ws(t,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)Dp(t,s.alternate,s),s=s.sibling}function Ti(t){for(t=t.child;t!==null;){var s=t;switch(s.tag){case 0:case 11:case 14:case 15:Zs(4,s,s.return),Ti(s);break;case 1:ts(s,s.return);var a=s.stateNode;typeof a.componentWillUnmount=="function"&&Cp(s,s.return,a),Ti(s);break;case 27:Ll(s.stateNode);case 26:case 5:ts(s,s.return),Ti(s);break;case 22:s.memoizedState===null&&Ti(s);break;case 30:Ti(s);break;default:Ti(s)}t=t.sibling}}function js(t,s,a){for(a=a&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var r=s.alternate,f=t,h=s,y=h.flags;switch(h.tag){case 0:case 11:case 15:js(f,h,a),kl(4,h);break;case 1:if(js(f,h,a),r=h,f=r.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(I){Je(r,r.return,I)}if(r=h,f=r.updateQueue,f!==null){var S=r.stateNode;try{var _=f.shared.hiddenCallbacks;if(_!==null)for(f.shared.hiddenCallbacks=null,f=0;f<_.length;f++)gm(_[f],S)}catch(I){Je(r,r.return,I)}}a&&y&64&&_p(h),zl(h,h.return);break;case 27:Tp(h);case 26:case 5:js(f,h,a),a&&r===null&&y&4&&Ep(h),zl(h,h.return);break;case 12:js(f,h,a);break;case 31:js(f,h,a),a&&y&4&&Mp(f,h);break;case 13:js(f,h,a),a&&y&4&&$p(f,h);break;case 22:h.memoizedState===null&&js(f,h,a),zl(h,h.return);break;case 30:break;default:js(f,h,a)}s=s.sibling}}function Fu(t,s){var a=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),t=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(t=s.memoizedState.cachePool.pool),t!==a&&(t!=null&&t.refCount++,a!=null&&fl(a))}function Wu(t,s){t=null,s.alternate!==null&&(t=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==t&&(s.refCount++,t!=null&&fl(t))}function Hn(t,s,a,r){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)Ip(t,s,a,r),s=s.sibling}function Ip(t,s,a,r){var f=s.flags;switch(s.tag){case 0:case 11:case 15:Hn(t,s,a,r),f&2048&&kl(9,s);break;case 1:Hn(t,s,a,r);break;case 3:Hn(t,s,a,r),f&2048&&(t=null,s.alternate!==null&&(t=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==t&&(s.refCount++,t!=null&&fl(t)));break;case 12:if(f&2048){Hn(t,s,a,r),t=s.stateNode;try{var h=s.memoizedProps,y=h.id,S=h.onPostCommit;typeof S=="function"&&S(y,s.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(_){Je(s,s.return,_)}}else Hn(t,s,a,r);break;case 31:Hn(t,s,a,r);break;case 13:Hn(t,s,a,r);break;case 23:break;case 22:h=s.stateNode,y=s.alternate,s.memoizedState!==null?h._visibility&2?Hn(t,s,a,r):_l(t,s):h._visibility&2?Hn(t,s,a,r):(h._visibility|=2,pa(t,s,a,r,(s.subtreeFlags&10256)!==0||!1)),f&2048&&Fu(y,s);break;case 24:Hn(t,s,a,r),f&2048&&Wu(s.alternate,s);break;default:Hn(t,s,a,r)}}function pa(t,s,a,r,f){for(f=f&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var h=t,y=s,S=a,_=r,I=y.flags;switch(y.tag){case 0:case 11:case 15:pa(h,y,S,_,f),kl(8,y);break;case 23:break;case 22:var P=y.stateNode;y.memoizedState!==null?P._visibility&2?pa(h,y,S,_,f):_l(h,y):(P._visibility|=2,pa(h,y,S,_,f)),f&&I&2048&&Fu(y.alternate,y);break;case 24:pa(h,y,S,_,f),f&&I&2048&&Wu(y.alternate,y);break;default:pa(h,y,S,_,f)}s=s.sibling}}function _l(t,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var a=t,r=s,f=r.flags;switch(r.tag){case 22:_l(a,r),f&2048&&Fu(r.alternate,r);break;case 24:_l(a,r),f&2048&&Wu(r.alternate,r);break;default:_l(a,r)}s=s.sibling}}var Cl=8192;function ga(t,s,a){if(t.subtreeFlags&Cl)for(t=t.child;t!==null;)qp(t,s,a),t=t.sibling}function qp(t,s,a){switch(t.tag){case 26:ga(t,s,a),t.flags&Cl&&t.memoizedState!==null&&iw(a,Zn,t.memoizedState,t.memoizedProps);break;case 5:ga(t,s,a);break;case 3:case 4:var r=Zn;Zn=co(t.stateNode.containerInfo),ga(t,s,a),Zn=r;break;case 22:t.memoizedState===null&&(r=t.alternate,r!==null&&r.memoizedState!==null?(r=Cl,Cl=16777216,ga(t,s,a),Cl=r):ga(t,s,a));break;default:ga(t,s,a)}}function Zp(t){var s=t.alternate;if(s!==null&&(t=s.child,t!==null)){s.child=null;do s=t.sibling,t.sibling=null,t=s;while(t!==null)}}function El(t){var s=t.deletions;if((t.flags&16)!==0){if(s!==null)for(var a=0;a<s.length;a++){var r=s[a];Kt=r,Gp(r,t)}Zp(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Hp(t),t=t.sibling}function Hp(t){switch(t.tag){case 0:case 11:case 15:El(t),t.flags&2048&&Zs(9,t,t.return);break;case 3:El(t);break;case 12:El(t);break;case 22:var s=t.stateNode;t.memoizedState!==null&&s._visibility&2&&(t.return===null||t.return.tag!==13)?(s._visibility&=-3,Xr(t)):El(t);break;default:El(t)}}function Xr(t){var s=t.deletions;if((t.flags&16)!==0){if(s!==null)for(var a=0;a<s.length;a++){var r=s[a];Kt=r,Gp(r,t)}Zp(t)}for(t=t.child;t!==null;){switch(s=t,s.tag){case 0:case 11:case 15:Zs(8,s,s.return),Xr(s);break;case 22:a=s.stateNode,a._visibility&2&&(a._visibility&=-3,Xr(s));break;default:Xr(s)}t=t.sibling}}function Gp(t,s){for(;Kt!==null;){var a=Kt;switch(a.tag){case 0:case 11:case 15:Zs(8,a,s);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var r=a.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:fl(a.memoizedState.cache)}if(r=a.child,r!==null)r.return=a,Kt=r;else e:for(a=t;Kt!==null;){r=Kt;var f=r.sibling,h=r.return;if(Rp(r),r===a){Kt=null;break e}if(f!==null){f.return=h,Kt=f;break e}Kt=h}}}var bS={getCacheForType:function(t){var s=Pt(Ot),a=s.data.get(t);return a===void 0&&(a=t(),s.data.set(t,a)),a},cacheSignal:function(){return Pt(Ot).controller.signal}},xS=typeof WeakMap=="function"?WeakMap:Map,Ye=0,st=null,De=null,$e=0,Xe=0,xn=null,Hs=!1,ya=!1,ed=!1,Ns=0,wt=0,Gs=0,Oi=0,td=0,Sn=0,va=0,Al=null,fn=null,nd=!1,Jr=0,Kp=0,Fr=1/0,Wr=null,Ks=null,Zt=0,Ys=null,ba=null,ks=0,sd=0,id=null,Yp=null,Tl=0,ad=null;function wn(){return(Ye&2)!==0&&$e!==0?$e&-$e:q.T!==null?dd():it()}function Vp(){if(Sn===0)if(($e&536870912)===0||Be){var t=hi;hi<<=1,(hi&3932160)===0&&(hi=262144),Sn=t}else Sn=536870912;return t=vn.current,t!==null&&(t.flags|=32),Sn}function hn(t,s,a){(t===st&&(Xe===2||Xe===9)||t.cancelPendingCommit!==null)&&(xa(t,0),Vs(t,$e,Sn,!1)),mi(t,a),((Ye&2)===0||t!==st)&&(t===st&&((Ye&2)===0&&(Oi|=a),wt===4&&Vs(t,$e,Sn,!1)),ns(t))}function Pp(t,s,a){if((Ye&6)!==0)throw Error(l(327));var r=!a&&(s&127)===0&&(s&t.expiredLanes)===0||Ts(t,s),f=r?jS(t,s):rd(t,s,!0),h=r;do{if(f===0){ya&&!r&&Vs(t,s,0,!1);break}else{if(a=t.current.alternate,h&&!SS(a)){f=rd(t,s,!1),h=!1;continue}if(f===2){if(h=s,t.errorRecoveryDisabledLanes&h)var y=0;else y=t.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){s=y;e:{var S=t;f=Al;var _=S.current.memoizedState.isDehydrated;if(_&&(xa(S,y).flags|=256),y=rd(S,y,!1),y!==2){if(ed&&!_){S.errorRecoveryDisabledLanes|=h,Oi|=h,f=4;break e}h=fn,fn=f,h!==null&&(fn===null?fn=h:fn.push.apply(fn,h))}f=y}if(h=!1,f!==2)continue}}if(f===1){xa(t,0),Vs(t,s,0,!0);break}e:{switch(r=t,h=f,h){case 0:case 1:throw Error(l(345));case 4:if((s&4194048)!==s)break;case 6:Vs(r,s,Sn,!Hs);break e;case 2:fn=null;break;case 3:case 5:break;default:throw Error(l(329))}if((s&62914560)===s&&(f=Jr+300-Tt(),10<f)){if(Vs(r,s,Sn,!Hs),Hi(r,0,!0)!==0)break e;ks=s,r.timeoutHandle=kg(Qp.bind(null,r,a,fn,Wr,nd,s,Sn,Oi,va,Hs,h,"Throttled",-0,0),f);break e}Qp(r,a,fn,Wr,nd,s,Sn,Oi,va,Hs,h,null,-0,0)}}break}while(!0);ns(t)}function Qp(t,s,a,r,f,h,y,S,_,I,P,W,Z,Y){if(t.timeoutHandle=-1,W=s.subtreeFlags,W&8192||(W&16785408)===16785408){W={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:us},qp(s,h,W);var pe=(h&62914560)===h?Jr-Tt():(h&4194048)===h?Kp-Tt():0;if(pe=aw(W,pe),pe!==null){ks=h,t.cancelPendingCommit=pe(sg.bind(null,t,s,h,a,r,f,y,S,_,P,W,null,Z,Y)),Vs(t,h,y,!I);return}}sg(t,s,h,a,r,f,y,S,_)}function SS(t){for(var s=t;;){var a=s.tag;if((a===0||a===11||a===15)&&s.flags&16384&&(a=s.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var r=0;r<a.length;r++){var f=a[r],h=f.getSnapshot;f=f.value;try{if(!gn(h(),f))return!1}catch{return!1}}if(a=s.child,s.subtreeFlags&16384&&a!==null)a.return=s,s=a;else{if(s===t)break;for(;s.sibling===null;){if(s.return===null||s.return===t)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Vs(t,s,a,r){s&=~td,s&=~Oi,t.suspendedLanes|=s,t.pingedLanes&=~s,r&&(t.warmLanes|=s),r=t.expirationTimes;for(var f=s;0<f;){var h=31-Ee(f),y=1<<h;r[h]=-1,f&=~y}a!==0&&R(t,a,s)}function eo(){return(Ye&6)===0?(Ol(0),!1):!0}function ld(){if(De!==null){if(Xe===0)var t=De.return;else t=De,ms=ji=null,wu(t),ua=null,ml=0,t=De;for(;t!==null;)zp(t.alternate,t),t=t.return;De=null}}function xa(t,s){var a=t.timeoutHandle;a!==-1&&(t.timeoutHandle=-1,qS(a)),a=t.cancelPendingCommit,a!==null&&(t.cancelPendingCommit=null,a()),ks=0,ld(),st=t,De=a=fs(t.current,null),$e=s,Xe=0,xn=null,Hs=!1,ya=Ts(t,s),ed=!1,va=Sn=td=Oi=Gs=wt=0,fn=Al=null,nd=!1,(s&8)!==0&&(s|=s&32);var r=t.entangledLanes;if(r!==0)for(t=t.entanglements,r&=s;0<r;){var f=31-Ee(r),h=1<<f;s|=t[f],r&=~h}return Ns=s,Sr(),a}function Xp(t,s){_e=null,q.H=wl,s===ca||s===Er?(s=fm(),Xe=3):s===uu?(s=fm(),Xe=4):Xe=s===Uu?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,xn=s,De===null&&(wt=1,Hr(t,Cn(s,t.current)))}function Jp(){var t=vn.current;return t===null?!0:($e&4194048)===$e?On===null:($e&62914560)===$e||($e&536870912)!==0?t===On:!1}function Fp(){var t=q.H;return q.H=wl,t===null?wl:t}function Wp(){var t=q.A;return q.A=bS,t}function to(){wt=4,Hs||($e&4194048)!==$e&&vn.current!==null||(ya=!0),(Gs&134217727)===0&&(Oi&134217727)===0||st===null||Vs(st,$e,Sn,!1)}function rd(t,s,a){var r=Ye;Ye|=2;var f=Fp(),h=Wp();(st!==t||$e!==s)&&(Wr=null,xa(t,s)),s=!1;var y=wt;e:do try{if(Xe!==0&&De!==null){var S=De,_=xn;switch(Xe){case 8:ld(),y=6;break e;case 3:case 2:case 9:case 6:vn.current===null&&(s=!0);var I=Xe;if(Xe=0,xn=null,Sa(t,S,_,I),a&&ya){y=0;break e}break;default:I=Xe,Xe=0,xn=null,Sa(t,S,_,I)}}wS(),y=wt;break}catch(P){Xp(t,P)}while(!0);return s&&t.shellSuspendCounter++,ms=ji=null,Ye=r,q.H=f,q.A=h,De===null&&(st=null,$e=0,Sr()),y}function wS(){for(;De!==null;)eg(De)}function jS(t,s){var a=Ye;Ye|=2;var r=Fp(),f=Wp();st!==t||$e!==s?(Wr=null,Fr=Tt()+500,xa(t,s)):ya=Ts(t,s);e:do try{if(Xe!==0&&De!==null){s=De;var h=xn;t:switch(Xe){case 1:Xe=0,xn=null,Sa(t,s,h,1);break;case 2:case 9:if(um(h)){Xe=0,xn=null,tg(s);break}s=function(){Xe!==2&&Xe!==9||st!==t||(Xe=7),ns(t)},h.then(s,s);break e;case 3:Xe=7;break e;case 4:Xe=5;break e;case 7:um(h)?(Xe=0,xn=null,tg(s)):(Xe=0,xn=null,Sa(t,s,h,7));break;case 5:var y=null;switch(De.tag){case 26:y=De.memoizedState;case 5:case 27:var S=De;if(y?Ig(y):S.stateNode.complete){Xe=0,xn=null;var _=S.sibling;if(_!==null)De=_;else{var I=S.return;I!==null?(De=I,no(I)):De=null}break t}}Xe=0,xn=null,Sa(t,s,h,5);break;case 6:Xe=0,xn=null,Sa(t,s,h,6);break;case 8:ld(),wt=6;break e;default:throw Error(l(462))}}NS();break}catch(P){Xp(t,P)}while(!0);return ms=ji=null,q.H=r,q.A=f,Ye=a,De!==null?0:(st=null,$e=0,Sr(),wt)}function NS(){for(;De!==null&&!Xn();)eg(De)}function eg(t){var s=Np(t.alternate,t,Ns);t.memoizedProps=t.pendingProps,s===null?no(t):De=s}function tg(t){var s=t,a=s.alternate;switch(s.tag){case 15:case 0:s=vp(a,s,s.pendingProps,s.type,void 0,$e);break;case 11:s=vp(a,s,s.pendingProps,s.type.render,s.ref,$e);break;case 5:wu(s);default:zp(a,s),s=De=Wh(s,Ns),s=Np(a,s,Ns)}t.memoizedProps=t.pendingProps,s===null?no(t):De=s}function Sa(t,s,a,r){ms=ji=null,wu(s),ua=null,ml=0;var f=s.return;try{if(fS(t,f,s,a,$e)){wt=1,Hr(t,Cn(a,t.current)),De=null;return}}catch(h){if(f!==null)throw De=f,h;wt=1,Hr(t,Cn(a,t.current)),De=null;return}s.flags&32768?(Be||r===1?t=!0:ya||($e&536870912)!==0?t=!1:(Hs=t=!0,(r===2||r===9||r===3||r===6)&&(r=vn.current,r!==null&&r.tag===13&&(r.flags|=16384))),ng(s,t)):no(s)}function no(t){var s=t;do{if((s.flags&32768)!==0){ng(s,Hs);return}t=s.return;var a=pS(s.alternate,s,Ns);if(a!==null){De=a;return}if(s=s.sibling,s!==null){De=s;return}De=s=t}while(s!==null);wt===0&&(wt=5)}function ng(t,s){do{var a=gS(t.alternate,t);if(a!==null){a.flags&=32767,De=a;return}if(a=t.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!s&&(t=t.sibling,t!==null)){De=t;return}De=t=a}while(t!==null);wt=6,De=null}function sg(t,s,a,r,f,h,y,S,_){t.cancelPendingCommit=null;do so();while(Zt!==0);if((Ye&6)!==0)throw Error(l(327));if(s!==null){if(s===t.current)throw Error(l(177));if(h=s.lanes|s.childLanes,h|=Qc,cr(t,a,h,y,S,_),t===st&&(De=st=null,$e=0),ba=s,Ys=t,ks=a,sd=h,id=f,Yp=r,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,CS(nt,function(){return og(),null})):(t.callbackNode=null,t.callbackPriority=0),r=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||r){r=q.T,q.T=null,f=K.p,K.p=2,y=Ye,Ye|=4;try{yS(t,s,a)}finally{Ye=y,K.p=f,q.T=r}}Zt=1,ig(),ag(),lg()}}function ig(){if(Zt===1){Zt=0;var t=Ys,s=ba,a=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||a){a=q.T,q.T=null;var r=K.p;K.p=2;var f=Ye;Ye|=4;try{Up(s,t);var h=bd,y=Gh(t.containerInfo),S=h.focusedElem,_=h.selectionRange;if(y!==S&&S&&S.ownerDocument&&Hh(S.ownerDocument.documentElement,S)){if(_!==null&&Gc(S)){var I=_.start,P=_.end;if(P===void 0&&(P=I),"selectionStart"in S)S.selectionStart=I,S.selectionEnd=Math.min(P,S.value.length);else{var W=S.ownerDocument||document,Z=W&&W.defaultView||window;if(Z.getSelection){var Y=Z.getSelection(),pe=S.textContent.length,je=Math.min(_.start,pe),tt=_.end===void 0?je:Math.min(_.end,pe);!Y.extend&&je>tt&&(y=tt,tt=je,je=y);var $=Zh(S,je),T=Zh(S,tt);if($&&T&&(Y.rangeCount!==1||Y.anchorNode!==$.node||Y.anchorOffset!==$.offset||Y.focusNode!==T.node||Y.focusOffset!==T.offset)){var B=W.createRange();B.setStart($.node,$.offset),Y.removeAllRanges(),je>tt?(Y.addRange(B),Y.extend(T.node,T.offset)):(B.setEnd(T.node,T.offset),Y.addRange(B))}}}}for(W=[],Y=S;Y=Y.parentNode;)Y.nodeType===1&&W.push({element:Y,left:Y.scrollLeft,top:Y.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<W.length;S++){var X=W[S];X.element.scrollLeft=X.left,X.element.scrollTop=X.top}}go=!!vd,bd=vd=null}finally{Ye=f,K.p=r,q.T=a}}t.current=s,Zt=2}}function ag(){if(Zt===2){Zt=0;var t=Ys,s=ba,a=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||a){a=q.T,q.T=null;var r=K.p;K.p=2;var f=Ye;Ye|=4;try{Dp(t,s.alternate,s)}finally{Ye=f,K.p=r,q.T=a}}Zt=3}}function lg(){if(Zt===4||Zt===3){Zt=0,Jn();var t=Ys,s=ba,a=ks,r=Yp;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?Zt=5:(Zt=0,ba=Ys=null,rg(t,t.pendingLanes));var f=t.pendingLanes;if(f===0&&(Ks=null),jt(a),s=s.stateNode,Wt&&typeof Wt.onCommitFiberRoot=="function")try{Wt.onCommitFiberRoot(Qe,s,void 0,(s.current.flags&128)===128)}catch{}if(r!==null){s=q.T,f=K.p,K.p=2,q.T=null;try{for(var h=t.onRecoverableError,y=0;y<r.length;y++){var S=r[y];h(S.value,{componentStack:S.stack})}}finally{q.T=s,K.p=f}}(ks&3)!==0&&so(),ns(t),f=t.pendingLanes,(a&261930)!==0&&(f&42)!==0?t===ad?Tl++:(Tl=0,ad=t):Tl=0,Ol(0)}}function rg(t,s){(t.pooledCacheLanes&=s)===0&&(s=t.pooledCache,s!=null&&(t.pooledCache=null,fl(s)))}function so(){return ig(),ag(),lg(),og()}function og(){if(Zt!==5)return!1;var t=Ys,s=sd;sd=0;var a=jt(ks),r=q.T,f=K.p;try{K.p=32>a?32:a,q.T=null,a=id,id=null;var h=Ys,y=ks;if(Zt=0,ba=Ys=null,ks=0,(Ye&6)!==0)throw Error(l(331));var S=Ye;if(Ye|=4,Hp(h.current),Ip(h,h.current,y,a),Ye=S,Ol(0,!1),Wt&&typeof Wt.onPostCommitFiberRoot=="function")try{Wt.onPostCommitFiberRoot(Qe,h)}catch{}return!0}finally{K.p=f,q.T=r,rg(t,s)}}function cg(t,s,a){s=Cn(a,s),s=$u(t.stateNode,s,2),t=Bs(t,s,2),t!==null&&(mi(t,2),ns(t))}function Je(t,s,a){if(t.tag===3)cg(t,t,a);else for(;s!==null;){if(s.tag===3){cg(s,t,a);break}else if(s.tag===1){var r=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Ks===null||!Ks.has(r))){t=Cn(a,t),a=up(2),r=Bs(s,a,2),r!==null&&(dp(a,r,s,t),mi(r,2),ns(r));break}}s=s.return}}function od(t,s,a){var r=t.pingCache;if(r===null){r=t.pingCache=new xS;var f=new Set;r.set(s,f)}else f=r.get(s),f===void 0&&(f=new Set,r.set(s,f));f.has(a)||(ed=!0,f.add(a),t=kS.bind(null,t,s,a),s.then(t,t))}function kS(t,s,a){var r=t.pingCache;r!==null&&r.delete(s),t.pingedLanes|=t.suspendedLanes&a,t.warmLanes&=~a,st===t&&($e&a)===a&&(wt===4||wt===3&&($e&62914560)===$e&&300>Tt()-Jr?(Ye&2)===0&&xa(t,0):td|=a,va===$e&&(va=0)),ns(t)}function ug(t,s){s===0&&(s=or()),t=xi(t,s),t!==null&&(mi(t,s),ns(t))}function zS(t){var s=t.memoizedState,a=0;s!==null&&(a=s.retryLane),ug(t,a)}function _S(t,s){var a=0;switch(t.tag){case 31:case 13:var r=t.stateNode,f=t.memoizedState;f!==null&&(a=f.retryLane);break;case 19:r=t.stateNode;break;case 22:r=t.stateNode._retryCache;break;default:throw Error(l(314))}r!==null&&r.delete(s),ug(t,a)}function CS(t,s){return ht(t,s)}var io=null,wa=null,cd=!1,ao=!1,ud=!1,Ps=0;function ns(t){t!==wa&&t.next===null&&(wa===null?io=wa=t:wa=wa.next=t),ao=!0,cd||(cd=!0,AS())}function Ol(t,s){if(!ud&&ao){ud=!0;do for(var a=!1,r=io;r!==null;){if(t!==0){var f=r.pendingLanes;if(f===0)var h=0;else{var y=r.suspendedLanes,S=r.pingedLanes;h=(1<<31-Ee(42|t)+1)-1,h&=f&~(y&~S),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(a=!0,mg(r,h))}else h=$e,h=Hi(r,r===st?h:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),(h&3)===0||Ts(r,h)||(a=!0,mg(r,h));r=r.next}while(a);ud=!1}}function ES(){dg()}function dg(){ao=cd=!1;var t=0;Ps!==0&&IS()&&(t=Ps);for(var s=Tt(),a=null,r=io;r!==null;){var f=r.next,h=fg(r,s);h===0?(r.next=null,a===null?io=f:a.next=f,f===null&&(wa=a)):(a=r,(t!==0||(h&3)!==0)&&(ao=!0)),r=f}Zt!==0&&Zt!==5||Ol(t),Ps!==0&&(Ps=0)}function fg(t,s){for(var a=t.suspendedLanes,r=t.pingedLanes,f=t.expirationTimes,h=t.pendingLanes&-62914561;0<h;){var y=31-Ee(h),S=1<<y,_=f[y];_===-1?((S&a)===0||(S&r)!==0)&&(f[y]=_c(S,s)):_<=s&&(t.expiredLanes|=S),h&=~S}if(s=st,a=$e,a=Hi(t,t===s?a:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),r=t.callbackNode,a===0||t===s&&(Xe===2||Xe===9)||t.cancelPendingCommit!==null)return r!==null&&r!==null&&Yt(r),t.callbackNode=null,t.callbackPriority=0;if((a&3)===0||Ts(t,a)){if(s=a&-a,s===t.callbackPriority)return s;switch(r!==null&&Yt(r),jt(a)){case 2:case 8:a=Bt;break;case 32:a=nt;break;case 268435456:a=ce;break;default:a=nt}return r=hg.bind(null,t),a=ht(a,r),t.callbackPriority=s,t.callbackNode=a,s}return r!==null&&r!==null&&Yt(r),t.callbackPriority=2,t.callbackNode=null,2}function hg(t,s){if(Zt!==0&&Zt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var a=t.callbackNode;if(so()&&t.callbackNode!==a)return null;var r=$e;return r=Hi(t,t===st?r:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),r===0?null:(Pp(t,r,s),fg(t,Tt()),t.callbackNode!=null&&t.callbackNode===a?hg.bind(null,t):null)}function mg(t,s){if(so())return null;Pp(t,s,!0)}function AS(){ZS(function(){(Ye&6)!==0?ht(Oe,ES):dg()})}function dd(){if(Ps===0){var t=ra;t===0&&(t=ls,ls<<=1,(ls&261888)===0&&(ls=256)),Ps=t}return Ps}function pg(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:hr(""+t)}function gg(t,s){var a=s.ownerDocument.createElement("input");return a.name=s.name,a.value=s.value,t.id&&a.setAttribute("form",t.id),s.parentNode.insertBefore(a,s),t=new FormData(t),a.parentNode.removeChild(a),t}function TS(t,s,a,r,f){if(s==="submit"&&a&&a.stateNode===f){var h=pg((f[Nt]||null).action),y=r.submitter;y&&(s=(s=y[Nt]||null)?pg(s.formAction):y.getAttribute("formAction"),s!==null&&(h=s,y=null));var S=new yr("action","action",null,r,f);t.push({event:S,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Ps!==0){var _=y?gg(f,y):new FormData(f);Tu(a,{pending:!0,data:_,method:f.method,action:h},null,_)}}else typeof h=="function"&&(S.preventDefault(),_=y?gg(f,y):new FormData(f),Tu(a,{pending:!0,data:_,method:f.method,action:h},h,_))},currentTarget:f}]})}}for(var fd=0;fd<Pc.length;fd++){var hd=Pc[fd],OS=hd.toLowerCase(),DS=hd[0].toUpperCase()+hd.slice(1);qn(OS,"on"+DS)}qn(Vh,"onAnimationEnd"),qn(Ph,"onAnimationIteration"),qn(Qh,"onAnimationStart"),qn("dblclick","onDoubleClick"),qn("focusin","onFocus"),qn("focusout","onBlur"),qn(Qx,"onTransitionRun"),qn(Xx,"onTransitionStart"),qn(Jx,"onTransitionCancel"),qn(Xh,"onTransitionEnd"),Vi("onMouseEnter",["mouseout","mouseover"]),Vi("onMouseLeave",["mouseout","mouseover"]),Vi("onPointerEnter",["pointerout","pointerover"]),Vi("onPointerLeave",["pointerout","pointerover"]),gi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),gi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),gi("onBeforeInput",["compositionend","keypress","textInput","paste"]),gi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),gi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),gi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Dl="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(" "),RS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Dl));function yg(t,s){s=(s&4)!==0;for(var a=0;a<t.length;a++){var r=t[a],f=r.event;r=r.listeners;e:{var h=void 0;if(s)for(var y=r.length-1;0<=y;y--){var S=r[y],_=S.instance,I=S.currentTarget;if(S=S.listener,_!==h&&f.isPropagationStopped())break e;h=S,f.currentTarget=I;try{h(f)}catch(P){xr(P)}f.currentTarget=null,h=_}else for(y=0;y<r.length;y++){if(S=r[y],_=S.instance,I=S.currentTarget,S=S.listener,_!==h&&f.isPropagationStopped())break e;h=S,f.currentTarget=I;try{h(f)}catch(P){xr(P)}f.currentTarget=null,h=_}}}}function Re(t,s){var a=s[qt];a===void 0&&(a=s[qt]=new Set);var r=t+"__bubble";a.has(r)||(vg(s,t,2,!1),a.add(r))}function md(t,s,a){var r=0;s&&(r|=4),vg(a,t,r,s)}var lo="_reactListening"+Math.random().toString(36).slice(2);function pd(t){if(!t[lo]){t[lo]=!0,dh.forEach(function(a){a!=="selectionchange"&&(RS.has(a)||md(a,!1,t),md(a,!0,t))});var s=t.nodeType===9?t:t.ownerDocument;s===null||s[lo]||(s[lo]=!0,md("selectionchange",!1,s))}}function vg(t,s,a,r){switch(Vg(s)){case 2:var f=ow;break;case 8:f=cw;break;default:f=Ad}a=f.bind(null,s,a,t),f=void 0,!Lc||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(f=!0),r?f!==void 0?t.addEventListener(s,a,{capture:!0,passive:f}):t.addEventListener(s,a,!0):f!==void 0?t.addEventListener(s,a,{passive:f}):t.addEventListener(s,a,!1)}function gd(t,s,a,r,f){var h=r;if((s&1)===0&&(s&2)===0&&r!==null)e:for(;;){if(r===null)return;var y=r.tag;if(y===3||y===4){var S=r.stateNode.containerInfo;if(S===f)break;if(y===4)for(y=r.return;y!==null;){var _=y.tag;if((_===3||_===4)&&y.stateNode.containerInfo===f)return;y=y.return}for(;S!==null;){if(y=Gi(S),y===null)return;if(_=y.tag,_===5||_===6||_===26||_===27){r=h=y;continue e}S=S.parentNode}}r=r.return}jh(function(){var I=h,P=Dc(a),W=[];e:{var Z=Jh.get(t);if(Z!==void 0){var Y=yr,pe=t;switch(t){case"keypress":if(pr(a)===0)break e;case"keydown":case"keyup":Y=_x;break;case"focusin":pe="focus",Y=Bc;break;case"focusout":pe="blur",Y=Bc;break;case"beforeblur":case"afterblur":Y=Bc;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Y=zh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Y=px;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Y=Ax;break;case Vh:case Ph:case Qh:Y=vx;break;case Xh:Y=Ox;break;case"scroll":case"scrollend":Y=hx;break;case"wheel":Y=Rx;break;case"copy":case"cut":case"paste":Y=xx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Y=Ch;break;case"toggle":case"beforetoggle":Y=Mx}var je=(s&4)!==0,tt=!je&&(t==="scroll"||t==="scrollend"),$=je?Z!==null?Z+"Capture":null:Z;je=[];for(var T=I,B;T!==null;){var X=T;if(B=X.stateNode,X=X.tag,X!==5&&X!==26&&X!==27||B===null||$===null||(X=tl(T,$),X!=null&&je.push(Rl(T,X,B))),tt)break;T=T.return}0<je.length&&(Z=new Y(Z,pe,null,a,P),W.push({event:Z,listeners:je}))}}if((s&7)===0){e:{if(Z=t==="mouseover"||t==="pointerover",Y=t==="mouseout"||t==="pointerout",Z&&a!==Oc&&(pe=a.relatedTarget||a.fromElement)&&(Gi(pe)||pe[rt]))break e;if((Y||Z)&&(Z=P.window===P?P:(Z=P.ownerDocument)?Z.defaultView||Z.parentWindow:window,Y?(pe=a.relatedTarget||a.toElement,Y=I,pe=pe?Gi(pe):null,pe!==null&&(tt=u(pe),je=pe.tag,pe!==tt||je!==5&&je!==27&&je!==6)&&(pe=null)):(Y=null,pe=I),Y!==pe)){if(je=zh,X="onMouseLeave",$="onMouseEnter",T="mouse",(t==="pointerout"||t==="pointerover")&&(je=Ch,X="onPointerLeave",$="onPointerEnter",T="pointer"),tt=Y==null?Z:el(Y),B=pe==null?Z:el(pe),Z=new je(X,T+"leave",Y,a,P),Z.target=tt,Z.relatedTarget=B,X=null,Gi(P)===I&&(je=new je($,T+"enter",pe,a,P),je.target=B,je.relatedTarget=tt,X=je),tt=X,Y&&pe)t:{for(je=LS,$=Y,T=pe,B=0,X=$;X;X=je(X))B++;X=0;for(var xe=T;xe;xe=je(xe))X++;for(;0<B-X;)$=je($),B--;for(;0<X-B;)T=je(T),X--;for(;B--;){if($===T||T!==null&&$===T.alternate){je=$;break t}$=je($),T=je(T)}je=null}else je=null;Y!==null&&bg(W,Z,Y,je,!1),pe!==null&&tt!==null&&bg(W,tt,pe,je,!0)}}e:{if(Z=I?el(I):window,Y=Z.nodeName&&Z.nodeName.toLowerCase(),Y==="select"||Y==="input"&&Z.type==="file")var He=Mh;else if(Rh(Z))if($h)He=Yx;else{He=Gx;var ve=Hx}else Y=Z.nodeName,!Y||Y.toLowerCase()!=="input"||Z.type!=="checkbox"&&Z.type!=="radio"?I&&Tc(I.elementType)&&(He=Mh):He=Kx;if(He&&(He=He(t,I))){Lh(W,He,a,P);break e}ve&&ve(t,Z,I),t==="focusout"&&I&&Z.type==="number"&&I.memoizedProps.value!=null&&Ac(Z,"number",Z.value)}switch(ve=I?el(I):window,t){case"focusin":(Rh(ve)||ve.contentEditable==="true")&&(Wi=ve,Kc=I,cl=null);break;case"focusout":cl=Kc=Wi=null;break;case"mousedown":Yc=!0;break;case"contextmenu":case"mouseup":case"dragend":Yc=!1,Kh(W,a,P);break;case"selectionchange":if(Px)break;case"keydown":case"keyup":Kh(W,a,P)}var Ce;if(qc)e:{switch(t){case"compositionstart":var Ue="onCompositionStart";break e;case"compositionend":Ue="onCompositionEnd";break e;case"compositionupdate":Ue="onCompositionUpdate";break e}Ue=void 0}else Fi?Oh(t,a)&&(Ue="onCompositionEnd"):t==="keydown"&&a.keyCode===229&&(Ue="onCompositionStart");Ue&&(Eh&&a.locale!=="ko"&&(Fi||Ue!=="onCompositionStart"?Ue==="onCompositionEnd"&&Fi&&(Ce=Nh()):(Os=P,Mc="value"in Os?Os.value:Os.textContent,Fi=!0)),ve=ro(I,Ue),0<ve.length&&(Ue=new _h(Ue,t,null,a,P),W.push({event:Ue,listeners:ve}),Ce?Ue.data=Ce:(Ce=Dh(a),Ce!==null&&(Ue.data=Ce)))),(Ce=Ux?Bx(t,a):Ix(t,a))&&(Ue=ro(I,"onBeforeInput"),0<Ue.length&&(ve=new _h("onBeforeInput","beforeinput",null,a,P),W.push({event:ve,listeners:Ue}),ve.data=Ce)),TS(W,t,I,a,P)}yg(W,s)})}function Rl(t,s,a){return{instance:t,listener:s,currentTarget:a}}function ro(t,s){for(var a=s+"Capture",r=[];t!==null;){var f=t,h=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||h===null||(f=tl(t,a),f!=null&&r.unshift(Rl(t,f,h)),f=tl(t,s),f!=null&&r.push(Rl(t,f,h))),t.tag===3)return r;t=t.return}return[]}function LS(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function bg(t,s,a,r,f){for(var h=s._reactName,y=[];a!==null&&a!==r;){var S=a,_=S.alternate,I=S.stateNode;if(S=S.tag,_!==null&&_===r)break;S!==5&&S!==26&&S!==27||I===null||(_=I,f?(I=tl(a,h),I!=null&&y.unshift(Rl(a,I,_))):f||(I=tl(a,h),I!=null&&y.push(Rl(a,I,_)))),a=a.return}y.length!==0&&t.push({event:s,listeners:y})}var MS=/\r\n?/g,$S=/\u0000|\uFFFD/g;function xg(t){return(typeof t=="string"?t:""+t).replace(MS,`
9
+ `).replace($S,"")}function Sg(t,s){return s=xg(s),xg(t)===s}function et(t,s,a,r,f,h){switch(a){case"children":typeof r=="string"?s==="body"||s==="textarea"&&r===""||Qi(t,r):(typeof r=="number"||typeof r=="bigint")&&s!=="body"&&Qi(t,""+r);break;case"className":dr(t,"class",r);break;case"tabIndex":dr(t,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":dr(t,a,r);break;case"style":Sh(t,r,h);break;case"data":if(s!=="object"){dr(t,"data",r);break}case"src":case"href":if(r===""&&(s!=="a"||a!=="href")){t.removeAttribute(a);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){t.removeAttribute(a);break}r=hr(""+r),t.setAttribute(a,r);break;case"action":case"formAction":if(typeof r=="function"){t.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof h=="function"&&(a==="formAction"?(s!=="input"&&et(t,s,"name",f.name,f,null),et(t,s,"formEncType",f.formEncType,f,null),et(t,s,"formMethod",f.formMethod,f,null),et(t,s,"formTarget",f.formTarget,f,null)):(et(t,s,"encType",f.encType,f,null),et(t,s,"method",f.method,f,null),et(t,s,"target",f.target,f,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){t.removeAttribute(a);break}r=hr(""+r),t.setAttribute(a,r);break;case"onClick":r!=null&&(t.onclick=us);break;case"onScroll":r!=null&&Re("scroll",t);break;case"onScrollEnd":r!=null&&Re("scrollend",t);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(l(61));if(a=r.__html,a!=null){if(f.children!=null)throw Error(l(60));t.innerHTML=a}}break;case"multiple":t.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":t.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){t.removeAttribute("xlink:href");break}a=hr(""+r),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?t.setAttribute(a,""+r):t.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&typeof r!="function"&&typeof r!="symbol"?t.setAttribute(a,""):t.removeAttribute(a);break;case"capture":case"download":r===!0?t.setAttribute(a,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?t.setAttribute(a,r):t.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?t.setAttribute(a,r):t.removeAttribute(a);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?t.removeAttribute(a):t.setAttribute(a,r);break;case"popover":Re("beforetoggle",t),Re("toggle",t),ur(t,"popover",r);break;case"xlinkActuate":cs(t,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":cs(t,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":cs(t,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":cs(t,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":cs(t,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":cs(t,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":cs(t,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":cs(t,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":cs(t,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":ur(t,"is",r);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=dx.get(a)||a,ur(t,a,r))}}function yd(t,s,a,r,f,h){switch(a){case"style":Sh(t,r,h);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(l(61));if(a=r.__html,a!=null){if(f.children!=null)throw Error(l(60));t.innerHTML=a}}break;case"children":typeof r=="string"?Qi(t,r):(typeof r=="number"||typeof r=="bigint")&&Qi(t,""+r);break;case"onScroll":r!=null&&Re("scroll",t);break;case"onScrollEnd":r!=null&&Re("scrollend",t);break;case"onClick":r!=null&&(t.onclick=us);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!fh.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(f=a.endsWith("Capture"),s=a.slice(2,f?a.length-7:void 0),h=t[Nt]||null,h=h!=null?h[a]:null,typeof h=="function"&&t.removeEventListener(s,h,f),typeof r=="function")){typeof h!="function"&&h!==null&&(a in t?t[a]=null:t.hasAttribute(a)&&t.removeAttribute(a)),t.addEventListener(s,r,f);break e}a in t?t[a]=r:r===!0?t.setAttribute(a,""):ur(t,a,r)}}}function Xt(t,s,a){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Re("error",t),Re("load",t);var r=!1,f=!1,h;for(h in a)if(a.hasOwnProperty(h)){var y=a[h];if(y!=null)switch(h){case"src":r=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(l(137,s));default:et(t,s,h,y,a,null)}}f&&et(t,s,"srcSet",a.srcSet,a,null),r&&et(t,s,"src",a.src,a,null);return;case"input":Re("invalid",t);var S=h=y=f=null,_=null,I=null;for(r in a)if(a.hasOwnProperty(r)){var P=a[r];if(P!=null)switch(r){case"name":f=P;break;case"type":y=P;break;case"checked":_=P;break;case"defaultChecked":I=P;break;case"value":h=P;break;case"defaultValue":S=P;break;case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(l(137,s));break;default:et(t,s,r,P,a,null)}}yh(t,h,S,_,I,y,f,!1);return;case"select":Re("invalid",t),r=y=h=null;for(f in a)if(a.hasOwnProperty(f)&&(S=a[f],S!=null))switch(f){case"value":h=S;break;case"defaultValue":y=S;break;case"multiple":r=S;default:et(t,s,f,S,a,null)}s=h,a=y,t.multiple=!!r,s!=null?Pi(t,!!r,s,!1):a!=null&&Pi(t,!!r,a,!0);return;case"textarea":Re("invalid",t),h=f=r=null;for(y in a)if(a.hasOwnProperty(y)&&(S=a[y],S!=null))switch(y){case"value":r=S;break;case"defaultValue":f=S;break;case"children":h=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(l(91));break;default:et(t,s,y,S,a,null)}bh(t,r,f,h);return;case"option":for(_ in a)a.hasOwnProperty(_)&&(r=a[_],r!=null)&&(_==="selected"?t.selected=r&&typeof r!="function"&&typeof r!="symbol":et(t,s,_,r,a,null));return;case"dialog":Re("beforetoggle",t),Re("toggle",t),Re("cancel",t),Re("close",t);break;case"iframe":case"object":Re("load",t);break;case"video":case"audio":for(r=0;r<Dl.length;r++)Re(Dl[r],t);break;case"image":Re("error",t),Re("load",t);break;case"details":Re("toggle",t);break;case"embed":case"source":case"link":Re("error",t),Re("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(I in a)if(a.hasOwnProperty(I)&&(r=a[I],r!=null))switch(I){case"children":case"dangerouslySetInnerHTML":throw Error(l(137,s));default:et(t,s,I,r,a,null)}return;default:if(Tc(s)){for(P in a)a.hasOwnProperty(P)&&(r=a[P],r!==void 0&&yd(t,s,P,r,a,void 0));return}}for(S in a)a.hasOwnProperty(S)&&(r=a[S],r!=null&&et(t,s,S,r,a,null))}function US(t,s,a,r){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,h=null,y=null,S=null,_=null,I=null,P=null;for(Y in a){var W=a[Y];if(a.hasOwnProperty(Y)&&W!=null)switch(Y){case"checked":break;case"value":break;case"defaultValue":_=W;default:r.hasOwnProperty(Y)||et(t,s,Y,null,r,W)}}for(var Z in r){var Y=r[Z];if(W=a[Z],r.hasOwnProperty(Z)&&(Y!=null||W!=null))switch(Z){case"type":h=Y;break;case"name":f=Y;break;case"checked":I=Y;break;case"defaultChecked":P=Y;break;case"value":y=Y;break;case"defaultValue":S=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(l(137,s));break;default:Y!==W&&et(t,s,Z,Y,r,W)}}Ec(t,y,S,_,I,P,h,f);return;case"select":Y=y=S=Z=null;for(h in a)if(_=a[h],a.hasOwnProperty(h)&&_!=null)switch(h){case"value":break;case"multiple":Y=_;default:r.hasOwnProperty(h)||et(t,s,h,null,r,_)}for(f in r)if(h=r[f],_=a[f],r.hasOwnProperty(f)&&(h!=null||_!=null))switch(f){case"value":Z=h;break;case"defaultValue":S=h;break;case"multiple":y=h;default:h!==_&&et(t,s,f,h,r,_)}s=S,a=y,r=Y,Z!=null?Pi(t,!!a,Z,!1):!!r!=!!a&&(s!=null?Pi(t,!!a,s,!0):Pi(t,!!a,a?[]:"",!1));return;case"textarea":Y=Z=null;for(S in a)if(f=a[S],a.hasOwnProperty(S)&&f!=null&&!r.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:et(t,s,S,null,r,f)}for(y in r)if(f=r[y],h=a[y],r.hasOwnProperty(y)&&(f!=null||h!=null))switch(y){case"value":Z=f;break;case"defaultValue":Y=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(l(91));break;default:f!==h&&et(t,s,y,f,r,h)}vh(t,Z,Y);return;case"option":for(var pe in a)Z=a[pe],a.hasOwnProperty(pe)&&Z!=null&&!r.hasOwnProperty(pe)&&(pe==="selected"?t.selected=!1:et(t,s,pe,null,r,Z));for(_ in r)Z=r[_],Y=a[_],r.hasOwnProperty(_)&&Z!==Y&&(Z!=null||Y!=null)&&(_==="selected"?t.selected=Z&&typeof Z!="function"&&typeof Z!="symbol":et(t,s,_,Z,r,Y));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var je in a)Z=a[je],a.hasOwnProperty(je)&&Z!=null&&!r.hasOwnProperty(je)&&et(t,s,je,null,r,Z);for(I in r)if(Z=r[I],Y=a[I],r.hasOwnProperty(I)&&Z!==Y&&(Z!=null||Y!=null))switch(I){case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(l(137,s));break;default:et(t,s,I,Z,r,Y)}return;default:if(Tc(s)){for(var tt in a)Z=a[tt],a.hasOwnProperty(tt)&&Z!==void 0&&!r.hasOwnProperty(tt)&&yd(t,s,tt,void 0,r,Z);for(P in r)Z=r[P],Y=a[P],!r.hasOwnProperty(P)||Z===Y||Z===void 0&&Y===void 0||yd(t,s,P,Z,r,Y);return}}for(var $ in a)Z=a[$],a.hasOwnProperty($)&&Z!=null&&!r.hasOwnProperty($)&&et(t,s,$,null,r,Z);for(W in r)Z=r[W],Y=a[W],!r.hasOwnProperty(W)||Z===Y||Z==null&&Y==null||et(t,s,W,Z,r,Y)}function wg(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function BS(){if(typeof performance.getEntriesByType=="function"){for(var t=0,s=0,a=performance.getEntriesByType("resource"),r=0;r<a.length;r++){var f=a[r],h=f.transferSize,y=f.initiatorType,S=f.duration;if(h&&S&&wg(y)){for(y=0,S=f.responseEnd,r+=1;r<a.length;r++){var _=a[r],I=_.startTime;if(I>S)break;var P=_.transferSize,W=_.initiatorType;P&&wg(W)&&(_=_.responseEnd,y+=P*(_<S?1:(S-I)/(_-I)))}if(--r,s+=8*(h+y)/(f.duration/1e3),t++,10<t)break}}if(0<t)return s/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var vd=null,bd=null;function oo(t){return t.nodeType===9?t:t.ownerDocument}function jg(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Ng(t,s){if(t===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&s==="foreignObject"?0:t}function xd(t,s){return t==="textarea"||t==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var Sd=null;function IS(){var t=window.event;return t&&t.type==="popstate"?t===Sd?!1:(Sd=t,!0):(Sd=null,!1)}var kg=typeof setTimeout=="function"?setTimeout:void 0,qS=typeof clearTimeout=="function"?clearTimeout:void 0,zg=typeof Promise=="function"?Promise:void 0,ZS=typeof queueMicrotask=="function"?queueMicrotask:typeof zg<"u"?function(t){return zg.resolve(null).then(t).catch(HS)}:kg;function HS(t){setTimeout(function(){throw t})}function Qs(t){return t==="head"}function _g(t,s){var a=s,r=0;do{var f=a.nextSibling;if(t.removeChild(a),f&&f.nodeType===8)if(a=f.data,a==="/$"||a==="/&"){if(r===0){t.removeChild(f),za(s);return}r--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")r++;else if(a==="html")Ll(t.ownerDocument.documentElement);else if(a==="head"){a=t.ownerDocument.head,Ll(a);for(var h=a.firstChild;h;){var y=h.nextSibling,S=h.nodeName;h[os]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&h.rel.toLowerCase()==="stylesheet"||a.removeChild(h),h=y}}else a==="body"&&Ll(t.ownerDocument.body);a=f}while(a);za(s)}function Cg(t,s){var a=t;t=0;do{var r=a.nextSibling;if(a.nodeType===1?s?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(s?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),r&&r.nodeType===8)if(a=r.data,a==="/$"){if(t===0)break;t--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||t++;a=r}while(a)}function wd(t){var s=t.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var a=s;switch(s=s.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":wd(a),pi(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}t.removeChild(a)}}function GS(t,s,a,r){for(;t.nodeType===1;){var f=a;if(t.nodeName.toLowerCase()!==s.toLowerCase()){if(!r&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(r){if(!t[os])switch(s){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(h=t.getAttribute("rel"),h==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(h!==f.rel||t.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||t.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||t.getAttribute("title")!==(f.title==null?null:f.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(h=t.getAttribute("src"),(h!==(f.src==null?null:f.src)||t.getAttribute("type")!==(f.type==null?null:f.type)||t.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&h&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(s==="input"&&t.type==="hidden"){var h=f.name==null?null:""+f.name;if(f.type==="hidden"&&t.getAttribute("name")===h)return t}else return t;if(t=Dn(t.nextSibling),t===null)break}return null}function KS(t,s,a){if(s==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!a||(t=Dn(t.nextSibling),t===null))return null;return t}function Eg(t,s){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!s||(t=Dn(t.nextSibling),t===null))return null;return t}function jd(t){return t.data==="$?"||t.data==="$~"}function Nd(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function YS(t,s){var a=t.ownerDocument;if(t.data==="$~")t._reactRetry=s;else if(t.data!=="$?"||a.readyState!=="loading")s();else{var r=function(){s(),a.removeEventListener("DOMContentLoaded",r)};a.addEventListener("DOMContentLoaded",r),t._reactRetry=r}}function Dn(t){for(;t!=null;t=t.nextSibling){var s=t.nodeType;if(s===1||s===3)break;if(s===8){if(s=t.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return t}var kd=null;function Ag(t){t=t.nextSibling;for(var s=0;t;){if(t.nodeType===8){var a=t.data;if(a==="/$"||a==="/&"){if(s===0)return Dn(t.nextSibling);s--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||s++}t=t.nextSibling}return null}function Tg(t){t=t.previousSibling;for(var s=0;t;){if(t.nodeType===8){var a=t.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(s===0)return t;s--}else a!=="/$"&&a!=="/&"||s++}t=t.previousSibling}return null}function Og(t,s,a){switch(s=oo(a),t){case"html":if(t=s.documentElement,!t)throw Error(l(452));return t;case"head":if(t=s.head,!t)throw Error(l(453));return t;case"body":if(t=s.body,!t)throw Error(l(454));return t;default:throw Error(l(451))}}function Ll(t){for(var s=t.attributes;s.length;)t.removeAttributeNode(s[0]);pi(t)}var Rn=new Map,Dg=new Set;function co(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var zs=K.d;K.d={f:VS,r:PS,D:QS,C:XS,L:JS,m:FS,X:ew,S:WS,M:tw};function VS(){var t=zs.f(),s=eo();return t||s}function PS(t){var s=Ki(t);s!==null&&s.tag===5&&s.type==="form"?Xm(s):zs.r(t)}var ja=typeof document>"u"?null:document;function Rg(t,s,a){var r=ja;if(r&&typeof s=="string"&&s){var f=zn(s);f='link[rel="'+t+'"][href="'+f+'"]',typeof a=="string"&&(f+='[crossorigin="'+a+'"]'),Dg.has(f)||(Dg.add(f),t={rel:t,crossOrigin:a,href:s},r.querySelector(f)===null&&(s=r.createElement("link"),Xt(s,"link",t),Gt(s),r.head.appendChild(s)))}}function QS(t){zs.D(t),Rg("dns-prefetch",t,null)}function XS(t,s){zs.C(t,s),Rg("preconnect",t,s)}function JS(t,s,a){zs.L(t,s,a);var r=ja;if(r&&t&&s){var f='link[rel="preload"][as="'+zn(s)+'"]';s==="image"&&a&&a.imageSrcSet?(f+='[imagesrcset="'+zn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(f+='[imagesizes="'+zn(a.imageSizes)+'"]')):f+='[href="'+zn(t)+'"]';var h=f;switch(s){case"style":h=Na(t);break;case"script":h=ka(t)}Rn.has(h)||(t=v({rel:"preload",href:s==="image"&&a&&a.imageSrcSet?void 0:t,as:s},a),Rn.set(h,t),r.querySelector(f)!==null||s==="style"&&r.querySelector(Ml(h))||s==="script"&&r.querySelector($l(h))||(s=r.createElement("link"),Xt(s,"link",t),Gt(s),r.head.appendChild(s)))}}function FS(t,s){zs.m(t,s);var a=ja;if(a&&t){var r=s&&typeof s.as=="string"?s.as:"script",f='link[rel="modulepreload"][as="'+zn(r)+'"][href="'+zn(t)+'"]',h=f;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=ka(t)}if(!Rn.has(h)&&(t=v({rel:"modulepreload",href:t},s),Rn.set(h,t),a.querySelector(f)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector($l(h)))return}r=a.createElement("link"),Xt(r,"link",t),Gt(r),a.head.appendChild(r)}}}function WS(t,s,a){zs.S(t,s,a);var r=ja;if(r&&t){var f=Yi(r).hoistableStyles,h=Na(t);s=s||"default";var y=f.get(h);if(!y){var S={loading:0,preload:null};if(y=r.querySelector(Ml(h)))S.loading=5;else{t=v({rel:"stylesheet",href:t,"data-precedence":s},a),(a=Rn.get(h))&&zd(t,a);var _=y=r.createElement("link");Gt(_),Xt(_,"link",t),_._p=new Promise(function(I,P){_.onload=I,_.onerror=P}),_.addEventListener("load",function(){S.loading|=1}),_.addEventListener("error",function(){S.loading|=2}),S.loading|=4,uo(y,s,r)}y={type:"stylesheet",instance:y,count:1,state:S},f.set(h,y)}}}function ew(t,s){zs.X(t,s);var a=ja;if(a&&t){var r=Yi(a).hoistableScripts,f=ka(t),h=r.get(f);h||(h=a.querySelector($l(f)),h||(t=v({src:t,async:!0},s),(s=Rn.get(f))&&_d(t,s),h=a.createElement("script"),Gt(h),Xt(h,"link",t),a.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},r.set(f,h))}}function tw(t,s){zs.M(t,s);var a=ja;if(a&&t){var r=Yi(a).hoistableScripts,f=ka(t),h=r.get(f);h||(h=a.querySelector($l(f)),h||(t=v({src:t,async:!0,type:"module"},s),(s=Rn.get(f))&&_d(t,s),h=a.createElement("script"),Gt(h),Xt(h,"link",t),a.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},r.set(f,h))}}function Lg(t,s,a,r){var f=(f=me.current)?co(f):null;if(!f)throw Error(l(446));switch(t){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(s=Na(a.href),a=Yi(f).hoistableStyles,r=a.get(s),r||(r={type:"style",instance:null,count:0,state:null},a.set(s,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){t=Na(a.href);var h=Yi(f).hoistableStyles,y=h.get(t);if(y||(f=f.ownerDocument||f,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},h.set(t,y),(h=f.querySelector(Ml(t)))&&!h._p&&(y.instance=h,y.state.loading=5),Rn.has(t)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Rn.set(t,a),h||nw(f,t,a,y.state))),s&&r===null)throw Error(l(528,""));return y}if(s&&r!==null)throw Error(l(529,""));return null;case"script":return s=a.async,a=a.src,typeof a=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=ka(a),a=Yi(f).hoistableScripts,r=a.get(s),r||(r={type:"script",instance:null,count:0,state:null},a.set(s,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,t))}}function Na(t){return'href="'+zn(t)+'"'}function Ml(t){return'link[rel="stylesheet"]['+t+"]"}function Mg(t){return v({},t,{"data-precedence":t.precedence,precedence:null})}function nw(t,s,a,r){t.querySelector('link[rel="preload"][as="style"]['+s+"]")?r.loading=1:(s=t.createElement("link"),r.preload=s,s.addEventListener("load",function(){return r.loading|=1}),s.addEventListener("error",function(){return r.loading|=2}),Xt(s,"link",a),Gt(s),t.head.appendChild(s))}function ka(t){return'[src="'+zn(t)+'"]'}function $l(t){return"script[async]"+t}function $g(t,s,a){if(s.count++,s.instance===null)switch(s.type){case"style":var r=t.querySelector('style[data-href~="'+zn(a.href)+'"]');if(r)return s.instance=r,Gt(r),r;var f=v({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return r=(t.ownerDocument||t).createElement("style"),Gt(r),Xt(r,"style",f),uo(r,a.precedence,t),s.instance=r;case"stylesheet":f=Na(a.href);var h=t.querySelector(Ml(f));if(h)return s.state.loading|=4,s.instance=h,Gt(h),h;r=Mg(a),(f=Rn.get(f))&&zd(r,f),h=(t.ownerDocument||t).createElement("link"),Gt(h);var y=h;return y._p=new Promise(function(S,_){y.onload=S,y.onerror=_}),Xt(h,"link",r),s.state.loading|=4,uo(h,a.precedence,t),s.instance=h;case"script":return h=ka(a.src),(f=t.querySelector($l(h)))?(s.instance=f,Gt(f),f):(r=a,(f=Rn.get(h))&&(r=v({},a),_d(r,f)),t=t.ownerDocument||t,f=t.createElement("script"),Gt(f),Xt(f,"link",r),t.head.appendChild(f),s.instance=f);case"void":return null;default:throw Error(l(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(r=s.instance,s.state.loading|=4,uo(r,a.precedence,t));return s.instance}function uo(t,s,a){for(var r=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=r.length?r[r.length-1]:null,h=f,y=0;y<r.length;y++){var S=r[y];if(S.dataset.precedence===s)h=S;else if(h!==f)break}h?h.parentNode.insertBefore(t,h.nextSibling):(s=a.nodeType===9?a.head:a,s.insertBefore(t,s.firstChild))}function zd(t,s){t.crossOrigin==null&&(t.crossOrigin=s.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=s.referrerPolicy),t.title==null&&(t.title=s.title)}function _d(t,s){t.crossOrigin==null&&(t.crossOrigin=s.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=s.referrerPolicy),t.integrity==null&&(t.integrity=s.integrity)}var fo=null;function Ug(t,s,a){if(fo===null){var r=new Map,f=fo=new Map;f.set(a,r)}else f=fo,r=f.get(a),r||(r=new Map,f.set(a,r));if(r.has(t))return r;for(r.set(t,null),a=a.getElementsByTagName(t),f=0;f<a.length;f++){var h=a[f];if(!(h[os]||h[Ke]||t==="link"&&h.getAttribute("rel")==="stylesheet")&&h.namespaceURI!=="http://www.w3.org/2000/svg"){var y=h.getAttribute(s)||"";y=t+y;var S=r.get(y);S?S.push(h):r.set(y,[h])}}return r}function Bg(t,s,a){t=t.ownerDocument||t,t.head.insertBefore(a,s==="title"?t.querySelector("head > title"):null)}function sw(t,s,a){if(a===1||s.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;return s.rel==="stylesheet"?(t=s.disabled,typeof s.precedence=="string"&&t==null):!0;case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function Ig(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function iw(t,s,a,r){if(a.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var f=Na(r.href),h=s.querySelector(Ml(f));if(h){s=h._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(t.count++,t=ho.bind(t),s.then(t,t)),a.state.loading|=4,a.instance=h,Gt(h);return}h=s.ownerDocument||s,r=Mg(r),(f=Rn.get(f))&&zd(r,f),h=h.createElement("link"),Gt(h);var y=h;y._p=new Promise(function(S,_){y.onload=S,y.onerror=_}),Xt(h,"link",r),a.instance=h}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(a,s),(s=a.state.preload)&&(a.state.loading&3)===0&&(t.count++,a=ho.bind(t),s.addEventListener("load",a),s.addEventListener("error",a))}}var Cd=0;function aw(t,s){return t.stylesheets&&t.count===0&&po(t,t.stylesheets),0<t.count||0<t.imgCount?function(a){var r=setTimeout(function(){if(t.stylesheets&&po(t,t.stylesheets),t.unsuspend){var h=t.unsuspend;t.unsuspend=null,h()}},6e4+s);0<t.imgBytes&&Cd===0&&(Cd=62500*BS());var f=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&po(t,t.stylesheets),t.unsuspend)){var h=t.unsuspend;t.unsuspend=null,h()}},(t.imgBytes>Cd?50:800)+s);return t.unsuspend=a,function(){t.unsuspend=null,clearTimeout(r),clearTimeout(f)}}:null}function ho(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)po(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var mo=null;function po(t,s){t.stylesheets=null,t.unsuspend!==null&&(t.count++,mo=new Map,s.forEach(lw,t),mo=null,ho.call(t))}function lw(t,s){if(!(s.state.loading&4)){var a=mo.get(t);if(a)var r=a.get(null);else{a=new Map,mo.set(t,a);for(var f=t.querySelectorAll("link[data-precedence],style[data-precedence]"),h=0;h<f.length;h++){var y=f[h];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(a.set(y.dataset.precedence,y),r=y)}r&&a.set(null,r)}f=s.instance,y=f.getAttribute("data-precedence"),h=a.get(y)||r,h===r&&a.set(null,f),a.set(y,f),this.count++,r=ho.bind(this),f.addEventListener("load",r),f.addEventListener("error",r),h?h.parentNode.insertBefore(f,h.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(f,t.firstChild)),s.state.loading|=4}}var Ul={$$typeof:O,Provider:null,Consumer:null,_currentValue:ie,_currentValue2:ie,_threadCount:0};function rw(t,s,a,r,f,h,y,S,_){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Fa(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Fa(0),this.hiddenUpdates=Fa(null),this.identifierPrefix=r,this.onUncaughtError=f,this.onCaughtError=h,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=_,this.incompleteTransitions=new Map}function qg(t,s,a,r,f,h,y,S,_,I,P,W){return t=new rw(t,s,a,y,_,I,P,W,S),s=1,h===!0&&(s|=24),h=yn(3,null,null,s),t.current=h,h.stateNode=t,s=ru(),s.refCount++,t.pooledCache=s,s.refCount++,h.memoizedState={element:r,isDehydrated:a,cache:s},du(h),t}function Zg(t){return t?(t=na,t):na}function Hg(t,s,a,r,f,h){f=Zg(f),r.context===null?r.context=f:r.pendingContext=f,r=Us(s),r.payload={element:a},h=h===void 0?null:h,h!==null&&(r.callback=h),a=Bs(t,r,s),a!==null&&(hn(a,t,s),gl(a,t,s))}function Gg(t,s){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var a=t.retryLane;t.retryLane=a!==0&&a<s?a:s}}function Ed(t,s){Gg(t,s),(t=t.alternate)&&Gg(t,s)}function Kg(t){if(t.tag===13||t.tag===31){var s=xi(t,67108864);s!==null&&hn(s,t,67108864),Ed(t,67108864)}}function Yg(t){if(t.tag===13||t.tag===31){var s=wn();s=Me(s);var a=xi(t,s);a!==null&&hn(a,t,s),Ed(t,s)}}var go=!0;function ow(t,s,a,r){var f=q.T;q.T=null;var h=K.p;try{K.p=2,Ad(t,s,a,r)}finally{K.p=h,q.T=f}}function cw(t,s,a,r){var f=q.T;q.T=null;var h=K.p;try{K.p=8,Ad(t,s,a,r)}finally{K.p=h,q.T=f}}function Ad(t,s,a,r){if(go){var f=Td(r);if(f===null)gd(t,s,r,yo,a),Pg(t,r);else if(dw(f,t,s,a,r))r.stopPropagation();else if(Pg(t,r),s&4&&-1<uw.indexOf(t)){for(;f!==null;){var h=Ki(f);if(h!==null)switch(h.tag){case 3:if(h=h.stateNode,h.current.memoizedState.isDehydrated){var y=Fn(h.pendingLanes);if(y!==0){var S=h;for(S.pendingLanes|=2,S.entangledLanes|=2;y;){var _=1<<31-Ee(y);S.entanglements[1]|=_,y&=~_}ns(h),(Ye&6)===0&&(Fr=Tt()+500,Ol(0))}}break;case 31:case 13:S=xi(h,2),S!==null&&hn(S,h,2),eo(),Ed(h,2)}if(h=Td(r),h===null&&gd(t,s,r,yo,a),h===f)break;f=h}f!==null&&r.stopPropagation()}else gd(t,s,r,null,a)}}function Td(t){return t=Dc(t),Od(t)}var yo=null;function Od(t){if(yo=null,t=Gi(t),t!==null){var s=u(t);if(s===null)t=null;else{var a=s.tag;if(a===13){if(t=d(s),t!==null)return t;t=null}else if(a===31){if(t=m(s),t!==null)return t;t=null}else if(a===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;t=null}else s!==t&&(t=null)}}return yo=t,null}function Vg(t){switch(t){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(oe()){case Oe:return 2;case Bt:return 8;case nt:case rn:return 32;case ce:return 268435456;default:return 32}default:return 32}}var Dd=!1,Xs=null,Js=null,Fs=null,Bl=new Map,Il=new Map,Ws=[],uw="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".split(" ");function Pg(t,s){switch(t){case"focusin":case"focusout":Xs=null;break;case"dragenter":case"dragleave":Js=null;break;case"mouseover":case"mouseout":Fs=null;break;case"pointerover":case"pointerout":Bl.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Il.delete(s.pointerId)}}function ql(t,s,a,r,f,h){return t===null||t.nativeEvent!==h?(t={blockedOn:s,domEventName:a,eventSystemFlags:r,nativeEvent:h,targetContainers:[f]},s!==null&&(s=Ki(s),s!==null&&Kg(s)),t):(t.eventSystemFlags|=r,s=t.targetContainers,f!==null&&s.indexOf(f)===-1&&s.push(f),t)}function dw(t,s,a,r,f){switch(s){case"focusin":return Xs=ql(Xs,t,s,a,r,f),!0;case"dragenter":return Js=ql(Js,t,s,a,r,f),!0;case"mouseover":return Fs=ql(Fs,t,s,a,r,f),!0;case"pointerover":var h=f.pointerId;return Bl.set(h,ql(Bl.get(h)||null,t,s,a,r,f)),!0;case"gotpointercapture":return h=f.pointerId,Il.set(h,ql(Il.get(h)||null,t,s,a,r,f)),!0}return!1}function Qg(t){var s=Gi(t.target);if(s!==null){var a=u(s);if(a!==null){if(s=a.tag,s===13){if(s=d(a),s!==null){t.blockedOn=s,at(t.priority,function(){Yg(a)});return}}else if(s===31){if(s=m(a),s!==null){t.blockedOn=s,at(t.priority,function(){Yg(a)});return}}else if(s===3&&a.stateNode.current.memoizedState.isDehydrated){t.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}t.blockedOn=null}function vo(t){if(t.blockedOn!==null)return!1;for(var s=t.targetContainers;0<s.length;){var a=Td(t.nativeEvent);if(a===null){a=t.nativeEvent;var r=new a.constructor(a.type,a);Oc=r,a.target.dispatchEvent(r),Oc=null}else return s=Ki(a),s!==null&&Kg(s),t.blockedOn=a,!1;s.shift()}return!0}function Xg(t,s,a){vo(t)&&a.delete(s)}function fw(){Dd=!1,Xs!==null&&vo(Xs)&&(Xs=null),Js!==null&&vo(Js)&&(Js=null),Fs!==null&&vo(Fs)&&(Fs=null),Bl.forEach(Xg),Il.forEach(Xg)}function bo(t,s){t.blockedOn===s&&(t.blockedOn=null,Dd||(Dd=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,fw)))}var xo=null;function Jg(t){xo!==t&&(xo=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){xo===t&&(xo=null);for(var s=0;s<t.length;s+=3){var a=t[s],r=t[s+1],f=t[s+2];if(typeof r!="function"){if(Od(r||a)===null)continue;break}var h=Ki(a);h!==null&&(t.splice(s,3),s-=3,Tu(h,{pending:!0,data:f,method:a.method,action:r},r,f))}}))}function za(t){function s(_){return bo(_,t)}Xs!==null&&bo(Xs,t),Js!==null&&bo(Js,t),Fs!==null&&bo(Fs,t),Bl.forEach(s),Il.forEach(s);for(var a=0;a<Ws.length;a++){var r=Ws[a];r.blockedOn===t&&(r.blockedOn=null)}for(;0<Ws.length&&(a=Ws[0],a.blockedOn===null);)Qg(a),a.blockedOn===null&&Ws.shift();if(a=(t.ownerDocument||t).$$reactFormReplay,a!=null)for(r=0;r<a.length;r+=3){var f=a[r],h=a[r+1],y=f[Nt]||null;if(typeof h=="function")y||Jg(a);else if(y){var S=null;if(h&&h.hasAttribute("formAction")){if(f=h,y=h[Nt]||null)S=y.formAction;else if(Od(f)!==null)continue}else S=y.action;typeof S=="function"?a[r+1]=S:(a.splice(r,3),r-=3),Jg(a)}}}function Fg(){function t(h){h.canIntercept&&h.info==="react-transition"&&h.intercept({handler:function(){return new Promise(function(y){return f=y})},focusReset:"manual",scroll:"manual"})}function s(){f!==null&&(f(),f=null),r||setTimeout(a,20)}function a(){if(!r&&!navigation.transition){var h=navigation.currentEntry;h&&h.url!=null&&navigation.navigate(h.url,{state:h.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,f=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(a,100),function(){r=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),f!==null&&(f(),f=null)}}}function Rd(t){this._internalRoot=t}So.prototype.render=Rd.prototype.render=function(t){var s=this._internalRoot;if(s===null)throw Error(l(409));var a=s.current,r=wn();Hg(a,r,t,s,null,null)},So.prototype.unmount=Rd.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var s=t.containerInfo;Hg(t.current,2,null,t,null,null),eo(),s[rt]=null}};function So(t){this._internalRoot=t}So.prototype.unstable_scheduleHydration=function(t){if(t){var s=it();t={blockedOn:null,target:t,priority:s};for(var a=0;a<Ws.length&&s!==0&&s<Ws[a].priority;a++);Ws.splice(a,0,t),a===0&&Qg(t)}};var Wg=n.version;if(Wg!=="19.2.4")throw Error(l(527,Wg,"19.2.4"));K.findDOMNode=function(t){var s=t._reactInternals;if(s===void 0)throw typeof t.render=="function"?Error(l(188)):(t=Object.keys(t).join(","),Error(l(268,t)));return t=p(s),t=t!==null?b(t):null,t=t===null?null:t.stateNode,t};var hw={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:q,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var wo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!wo.isDisabled&&wo.supportsFiber)try{Qe=wo.inject(hw),Wt=wo}catch{}}return Hl.createRoot=function(t,s){if(!o(t))throw Error(l(299));var a=!1,r="",f=lp,h=rp,y=op;return s!=null&&(s.unstable_strictMode===!0&&(a=!0),s.identifierPrefix!==void 0&&(r=s.identifierPrefix),s.onUncaughtError!==void 0&&(f=s.onUncaughtError),s.onCaughtError!==void 0&&(h=s.onCaughtError),s.onRecoverableError!==void 0&&(y=s.onRecoverableError)),s=qg(t,1,!1,null,null,a,r,null,f,h,y,Fg),t[rt]=s.current,pd(t),new Rd(s)},Hl.hydrateRoot=function(t,s,a){if(!o(t))throw Error(l(299));var r=!1,f="",h=lp,y=rp,S=op,_=null;return a!=null&&(a.unstable_strictMode===!0&&(r=!0),a.identifierPrefix!==void 0&&(f=a.identifierPrefix),a.onUncaughtError!==void 0&&(h=a.onUncaughtError),a.onCaughtError!==void 0&&(y=a.onCaughtError),a.onRecoverableError!==void 0&&(S=a.onRecoverableError),a.formState!==void 0&&(_=a.formState)),s=qg(t,1,!0,s,a??null,r,f,_,h,y,S,Fg),s.context=Zg(null),a=s.current,r=wn(),r=Me(r),f=Us(r),f.callback=null,Bs(a,f,r),a=r,s.current.lanes=a,mi(s,a),ns(s),t[rt]=s.current,pd(t),new So(s)},Hl.version="19.2.4",Hl}var cy;function Nw(){if(cy)return $d.exports;cy=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),$d.exports=jw(),$d.exports}var kw=Nw();const zf=Symbol.for("yaml.alias"),rf=Symbol.for("yaml.document"),li=Symbol.for("yaml.map"),w0=Symbol.for("yaml.pair"),is=Symbol.for("yaml.scalar"),Ya=Symbol.for("yaml.seq"),$n=Symbol.for("yaml.node.type"),Bi=e=>!!e&&typeof e=="object"&&e[$n]===zf,ac=e=>!!e&&typeof e=="object"&&e[$n]===rf,nr=e=>!!e&&typeof e=="object"&&e[$n]===li,Et=e=>!!e&&typeof e=="object"&&e[$n]===w0,lt=e=>!!e&&typeof e=="object"&&e[$n]===is,sr=e=>!!e&&typeof e=="object"&&e[$n]===Ya;function _t(e){if(e&&typeof e=="object")switch(e[$n]){case li:case Ya:return!0}return!1}function Ct(e){if(e&&typeof e=="object")switch(e[$n]){case zf:case li:case is:case Ya:return!0}return!1}const j0=e=>(lt(e)||_t(e))&&!!e.anchor,Ri=Symbol("break visit"),zw=Symbol("skip children"),Pl=Symbol("remove node");function Va(e,n){const i=_w(n);ac(e)?Oa(null,e.contents,i,Object.freeze([e]))===Pl&&(e.contents=null):Oa(null,e,i,Object.freeze([]))}Va.BREAK=Ri;Va.SKIP=zw;Va.REMOVE=Pl;function Oa(e,n,i,l){const o=Cw(e,n,i,l);if(Ct(o)||Et(o))return Ew(e,l,o),Oa(e,o,i,l);if(typeof o!="symbol"){if(_t(n)){l=Object.freeze(l.concat(n));for(let u=0;u<n.items.length;++u){const d=Oa(u,n.items[u],i,l);if(typeof d=="number")u=d-1;else{if(d===Ri)return Ri;d===Pl&&(n.items.splice(u,1),u-=1)}}}else if(Et(n)){l=Object.freeze(l.concat(n));const u=Oa("key",n.key,i,l);if(u===Ri)return Ri;u===Pl&&(n.key=null);const d=Oa("value",n.value,i,l);if(d===Ri)return Ri;d===Pl&&(n.value=null)}}return o}function _w(e){return typeof e=="object"&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function Cw(e,n,i,l){if(typeof i=="function")return i(e,n,l);if(nr(n))return i.Map?.(e,n,l);if(sr(n))return i.Seq?.(e,n,l);if(Et(n))return i.Pair?.(e,n,l);if(lt(n))return i.Scalar?.(e,n,l);if(Bi(n))return i.Alias?.(e,n,l)}function Ew(e,n,i){const l=n[n.length-1];if(_t(l))l.items[e]=i;else if(Et(l))e==="key"?l.key=i:l.value=i;else if(ac(l))l.contents=i;else{const o=Bi(l)?"alias":"scalar";throw new Error(`Cannot replace node with ${o} parent`)}}const Aw={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},Tw=e=>e.replace(/[!,[\]{}]/g,n=>Aw[n]);class an{constructor(n,i){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},an.defaultYaml,n),this.tags=Object.assign({},an.defaultTags,i)}clone(){const n=new an(this.yaml,this.tags);return n.docStart=this.docStart,n}atDocument(){const n=new an(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:an.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},an.defaultTags);break}return n}add(n,i){this.atNextDocument&&(this.yaml={explicit:an.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},an.defaultTags),this.atNextDocument=!1);const l=n.trim().split(/[ \t]+/),o=l.shift();switch(o){case"%TAG":{if(l.length!==2&&(i(0,"%TAG directive should contain exactly two parts"),l.length<2))return!1;const[u,d]=l;return this.tags[u]=d,!0}case"%YAML":{if(this.yaml.explicit=!0,l.length!==1)return i(0,"%YAML directive should contain exactly one part"),!1;const[u]=l;if(u==="1.1"||u==="1.2")return this.yaml.version=u,!0;{const d=/^\d+\.\d+$/.test(u);return i(6,`Unsupported YAML version ${u}`,d),!1}}default:return i(0,`Unknown directive ${o}`,!0),!1}}tagName(n,i){if(n==="!")return"!";if(n[0]!=="!")return i(`Not a valid tag: ${n}`),null;if(n[1]==="<"){const d=n.slice(2,-1);return d==="!"||d==="!!"?(i(`Verbatim tags aren't resolved, so ${n} is invalid.`),null):(n[n.length-1]!==">"&&i("Verbatim tags must end with a >"),d)}const[,l,o]=n.match(/^(.*!)([^!]*)$/s);o||i(`The ${n} tag has no suffix`);const u=this.tags[l];if(u)try{return u+decodeURIComponent(o)}catch(d){return i(String(d)),null}return l==="!"?n:(i(`Could not resolve tag: ${n}`),null)}tagString(n){for(const[i,l]of Object.entries(this.tags))if(n.startsWith(l))return i+Tw(n.substring(l.length));return n[0]==="!"?n:`!<${n}>`}toString(n){const i=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],l=Object.entries(this.tags);let o;if(n&&l.length>0&&Ct(n.contents)){const u={};Va(n.contents,(d,m)=>{Ct(m)&&m.tag&&(u[m.tag]=!0)}),o=Object.keys(u)}else o=[];for(const[u,d]of l)u==="!!"&&d==="tag:yaml.org,2002:"||(!n||o.some(m=>m.startsWith(d)))&&i.push(`%TAG ${u} ${d}`);return i.join(`
10
+ `)}}an.defaultYaml={explicit:!1,version:"1.2"};an.defaultTags={"!!":"tag:yaml.org,2002:"};function N0(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const i=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw new Error(i)}return!0}function k0(e){const n=new Set;return Va(e,{Value(i,l){l.anchor&&n.add(l.anchor)}}),n}function z0(e,n){for(let i=1;;++i){const l=`${e}${i}`;if(!n.has(l))return l}}function Ow(e,n){const i=[],l=new Map;let o=null;return{onAnchor:u=>{i.push(u),o??(o=k0(e));const d=z0(n,o);return o.add(d),d},setAnchors:()=>{for(const u of i){const d=l.get(u);if(typeof d=="object"&&d.anchor&&(lt(d.node)||_t(d.node)))d.node.anchor=d.anchor;else{const m=new Error("Failed to resolve repeated object (this should not happen)");throw m.source=u,m}}},sourceObjects:l}}function Da(e,n,i,l){if(l&&typeof l=="object")if(Array.isArray(l))for(let o=0,u=l.length;o<u;++o){const d=l[o],m=Da(e,l,String(o),d);m===void 0?delete l[o]:m!==d&&(l[o]=m)}else if(l instanceof Map)for(const o of Array.from(l.keys())){const u=l.get(o),d=Da(e,l,o,u);d===void 0?l.delete(o):d!==u&&l.set(o,d)}else if(l instanceof Set)for(const o of Array.from(l)){const u=Da(e,l,o,o);u===void 0?l.delete(o):u!==o&&(l.delete(o),l.add(u))}else for(const[o,u]of Object.entries(l)){const d=Da(e,l,o,u);d===void 0?delete l[o]:d!==u&&(l[o]=d)}return e.call(n,i,l)}function Mn(e,n,i){if(Array.isArray(e))return e.map((l,o)=>Mn(l,String(o),i));if(e&&typeof e.toJSON=="function"){if(!i||!j0(e))return e.toJSON(n,i);const l={aliasCount:0,count:1,res:void 0};i.anchors.set(e,l),i.onCreate=u=>{l.res=u,delete i.onCreate};const o=e.toJSON(n,i);return i.onCreate&&i.onCreate(o),o}return typeof e=="bigint"&&!i?.keep?Number(e):e}class _f{constructor(n){Object.defineProperty(this,$n,{value:n})}clone(){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(n.range=this.range.slice()),n}toJS(n,{mapAsMap:i,maxAliasCount:l,onAnchor:o,reviver:u}={}){if(!ac(n))throw new TypeError("A document argument is required");const d={anchors:new Map,doc:n,keep:!0,mapAsMap:i===!0,mapKeyWarned:!1,maxAliasCount:typeof l=="number"?l:100},m=Mn(this,"",d);if(typeof o=="function")for(const{count:g,res:p}of d.anchors.values())o(p,g);return typeof u=="function"?Da(u,{"":m},"",m):m}}class Cf extends _f{constructor(n){super(zf),this.source=n,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(n,i){let l;i?.aliasResolveCache?l=i.aliasResolveCache:(l=[],Va(n,{Node:(u,d)=>{(Bi(d)||j0(d))&&l.push(d)}}),i&&(i.aliasResolveCache=l));let o;for(const u of l){if(u===this)break;u.anchor===this.source&&(o=u)}return o}toJSON(n,i){if(!i)return{source:this.source};const{anchors:l,doc:o,maxAliasCount:u}=i,d=this.resolve(o,i);if(!d){const g=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(g)}let m=l.get(d);if(m||(Mn(d,null,i),m=l.get(d)),m?.res===void 0){const g="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(g)}if(u>=0&&(m.count+=1,m.aliasCount===0&&(m.aliasCount=qo(o,d,l)),m.count*m.aliasCount>u)){const g="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(g)}return m.res}toString(n,i,l){const o=`*${this.source}`;if(n){if(N0(this.source),n.options.verifyAliasOrder&&!n.anchors.has(this.source)){const u=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(u)}if(n.implicitKey)return`${o} `}return o}}function qo(e,n,i){if(Bi(n)){const l=n.resolve(e),o=i&&l&&i.get(l);return o?o.count*o.aliasCount:0}else if(_t(n)){let l=0;for(const o of n.items){const u=qo(e,o,i);u>l&&(l=u)}return l}else if(Et(n)){const l=qo(e,n.key,i),o=qo(e,n.value,i);return Math.max(l,o)}return 1}const _0=e=>!e||typeof e!="function"&&typeof e!="object";class ze extends _f{constructor(n){super(is),this.value=n}toJSON(n,i){return i?.keep?this.value:Mn(this.value,n,i)}toString(){return String(this.value)}}ze.BLOCK_FOLDED="BLOCK_FOLDED";ze.BLOCK_LITERAL="BLOCK_LITERAL";ze.PLAIN="PLAIN";ze.QUOTE_DOUBLE="QUOTE_DOUBLE";ze.QUOTE_SINGLE="QUOTE_SINGLE";const Dw="tag:yaml.org,2002:";function Rw(e,n,i){if(n){const l=i.filter(u=>u.tag===n),o=l.find(u=>!u.format)??l[0];if(!o)throw new Error(`Tag ${n} not found`);return o}return i.find(l=>l.identify?.(e)&&!l.format)}function Xl(e,n,i){if(ac(e)&&(e=e.contents),Ct(e))return e;if(Et(e)){const v=i.schema[li].createNode?.(i.schema,null,i);return v.items.push(e),v}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:l,onAnchor:o,onTagObj:u,schema:d,sourceObjects:m}=i;let g;if(l&&e&&typeof e=="object"){if(g=m.get(e),g)return g.anchor??(g.anchor=o(e)),new Cf(g.anchor);g={anchor:null,node:null},m.set(e,g)}n?.startsWith("!!")&&(n=Dw+n.slice(2));let p=Rw(e,n,d.tags);if(!p){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){const v=new ze(e);return g&&(g.node=v),v}p=e instanceof Map?d[li]:Symbol.iterator in Object(e)?d[Ya]:d[li]}u&&(u(p),delete i.onTagObj);const b=p?.createNode?p.createNode(i.schema,e,i):typeof p?.nodeClass?.from=="function"?p.nodeClass.from(i.schema,e,i):new ze(e);return n?b.tag=n:p.default||(b.tag=p.tag),g&&(g.node=b),b}function Yo(e,n,i){let l=i;for(let o=n.length-1;o>=0;--o){const u=n[o];if(typeof u=="number"&&Number.isInteger(u)&&u>=0){const d=[];d[u]=l,l=d}else l=new Map([[u,l]])}return Xl(l,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}const Yl=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done;class C0 extends _f{constructor(n,i){super(n),Object.defineProperty(this,"schema",{value:i,configurable:!0,enumerable:!1,writable:!0})}clone(n){const i=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return n&&(i.schema=n),i.items=i.items.map(l=>Ct(l)||Et(l)?l.clone(n):l),this.range&&(i.range=this.range.slice()),i}addIn(n,i){if(Yl(n))this.add(i);else{const[l,...o]=n,u=this.get(l,!0);if(_t(u))u.addIn(o,i);else if(u===void 0&&this.schema)this.set(l,Yo(this.schema,o,i));else throw new Error(`Expected YAML collection at ${l}. Remaining path: ${o}`)}}deleteIn(n){const[i,...l]=n;if(l.length===0)return this.delete(i);const o=this.get(i,!0);if(_t(o))return o.deleteIn(l);throw new Error(`Expected YAML collection at ${i}. Remaining path: ${l}`)}getIn(n,i){const[l,...o]=n,u=this.get(l,!0);return o.length===0?!i&&lt(u)?u.value:u:_t(u)?u.getIn(o,i):void 0}hasAllNullValues(n){return this.items.every(i=>{if(!Et(i))return!1;const l=i.value;return l==null||n&&lt(l)&&l.value==null&&!l.commentBefore&&!l.comment&&!l.tag})}hasIn(n){const[i,...l]=n;if(l.length===0)return this.has(i);const o=this.get(i,!0);return _t(o)?o.hasIn(l):!1}setIn(n,i){const[l,...o]=n;if(o.length===0)this.set(l,i);else{const u=this.get(l,!0);if(_t(u))u.setIn(o,i);else if(u===void 0&&this.schema)this.set(l,Yo(this.schema,o,i));else throw new Error(`Expected YAML collection at ${l}. Remaining path: ${o}`)}}}const Lw=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function Cs(e,n){return/^\n+$/.test(e)?e.substring(1):n?e.replace(/^(?! *$)/gm,n):e}const Li=(e,n,i)=>e.endsWith(`
11
+ `)?Cs(i,n):i.includes(`
12
+ `)?`
13
+ `+Cs(i,n):(e.endsWith(" ")?"":" ")+i,E0="flow",of="block",Zo="quoted";function lc(e,n,i="flow",{indentAtStart:l,lineWidth:o=80,minContentWidth:u=20,onFold:d,onOverflow:m}={}){if(!o||o<0)return e;o<u&&(u=0);const g=Math.max(1+u,1+o-n.length);if(e.length<=g)return e;const p=[],b={};let v=o-n.length;typeof l=="number"&&(l>o-Math.max(2,u)?p.push(0):v=o-l);let w,N,z=!1,j=-1,k=-1,A=-1;i===of&&(j=uy(e,j,n.length),j!==-1&&(v=j+g));for(let O;O=e[j+=1];){if(i===Zo&&O==="\\"){switch(k=j,e[j+1]){case"x":j+=3;break;case"u":j+=5;break;case"U":j+=9;break;default:j+=1}A=j}if(O===`
14
+ `)i===of&&(j=uy(e,j,n.length)),v=j+n.length+g,w=void 0;else{if(O===" "&&N&&N!==" "&&N!==`
15
+ `&&N!==" "){const D=e[j+1];D&&D!==" "&&D!==`
16
+ `&&D!==" "&&(w=j)}if(j>=v)if(w)p.push(w),v=w+g,w=void 0;else if(i===Zo){for(;N===" "||N===" ";)N=O,O=e[j+=1],z=!0;const D=j>A+1?j-2:k-1;if(b[D])return e;p.push(D),b[D]=!0,v=D+g,w=void 0}else z=!0}N=O}if(z&&m&&m(),p.length===0)return e;d&&d();let E=e.slice(0,p[0]);for(let O=0;O<p.length;++O){const D=p[O],M=p[O+1]||e.length;D===0?E=`
17
+ ${n}${e.slice(0,M)}`:(i===Zo&&b[D]&&(E+=`${e[D]}\\`),E+=`
18
+ ${n}${e.slice(D+1,M)}`)}return E}function uy(e,n,i){let l=n,o=n+1,u=e[o];for(;u===" "||u===" ";)if(n<o+i)u=e[++n];else{do u=e[++n];while(u&&u!==`
19
+ `);l=n,o=n+1,u=e[o]}return l}const rc=(e,n)=>({indentAtStart:n?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),oc=e=>/^(%|---|\.\.\.)/m.test(e);function Mw(e,n,i){if(!n||n<0)return!1;const l=n-i,o=e.length;if(o<=l)return!1;for(let u=0,d=0;u<o;++u)if(e[u]===`
20
+ `){if(u-d>l)return!0;if(d=u+1,o-d<=l)return!1}return!0}function Ql(e,n){const i=JSON.stringify(e);if(n.options.doubleQuotedAsJSON)return i;const{implicitKey:l}=n,o=n.options.doubleQuotedMinMultiLineLength,u=n.indent||(oc(e)?" ":"");let d="",m=0;for(let g=0,p=i[g];p;p=i[++g])if(p===" "&&i[g+1]==="\\"&&i[g+2]==="n"&&(d+=i.slice(m,g)+"\\ ",g+=1,m=g,p="\\"),p==="\\")switch(i[g+1]){case"u":{d+=i.slice(m,g);const b=i.substr(g+2,4);switch(b){case"0000":d+="\\0";break;case"0007":d+="\\a";break;case"000b":d+="\\v";break;case"001b":d+="\\e";break;case"0085":d+="\\N";break;case"00a0":d+="\\_";break;case"2028":d+="\\L";break;case"2029":d+="\\P";break;default:b.substr(0,2)==="00"?d+="\\x"+b.substr(2):d+=i.substr(g,6)}g+=5,m=g+1}break;case"n":if(l||i[g+2]==='"'||i.length<o)g+=1;else{for(d+=i.slice(m,g)+`
21
+
22
+ `;i[g+2]==="\\"&&i[g+3]==="n"&&i[g+4]!=='"';)d+=`
23
+ `,g+=2;d+=u,i[g+2]===" "&&(d+="\\"),g+=1,m=g+1}break;default:g+=1}return d=m?d+i.slice(m):i,l?d:lc(d,u,Zo,rc(n,!1))}function cf(e,n){if(n.options.singleQuote===!1||n.implicitKey&&e.includes(`
24
+ `)||/[ \t]\n|\n[ \t]/.test(e))return Ql(e,n);const i=n.indent||(oc(e)?" ":""),l="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
25
+ ${i}`)+"'";return n.implicitKey?l:lc(l,i,E0,rc(n,!1))}function Ra(e,n){const{singleQuote:i}=n.options;let l;if(i===!1)l=Ql;else{const o=e.includes('"'),u=e.includes("'");o&&!u?l=cf:u&&!o?l=Ql:l=i?cf:Ql}return l(e,n)}let uf;try{uf=new RegExp(`(^|(?<!
26
+ ))
27
+ +(?!
28
+ |$)`,"g")}catch{uf=/\n+(?!\n|$)/g}function Ho({comment:e,type:n,value:i},l,o,u){const{blockQuote:d,commentString:m,lineWidth:g}=l.options;if(!d||/\n[\t ]+$/.test(i))return Ra(i,l);const p=l.indent||(l.forceBlockIndent||oc(i)?" ":""),b=d==="literal"?!0:d==="folded"||n===ze.BLOCK_FOLDED?!1:n===ze.BLOCK_LITERAL?!0:!Mw(i,g,p.length);if(!i)return b?`|
29
+ `:`>
30
+ `;let v,w;for(w=i.length;w>0;--w){const M=i[w-1];if(M!==`
31
+ `&&M!==" "&&M!==" ")break}let N=i.substring(w);const z=N.indexOf(`
32
+ `);z===-1?v="-":i===N||z!==N.length-1?(v="+",u&&u()):v="",N&&(i=i.slice(0,-N.length),N[N.length-1]===`
33
+ `&&(N=N.slice(0,-1)),N=N.replace(uf,`$&${p}`));let j=!1,k,A=-1;for(k=0;k<i.length;++k){const M=i[k];if(M===" ")j=!0;else if(M===`
34
+ `)A=k;else break}let E=i.substring(0,A<k?A+1:k);E&&(i=i.substring(E.length),E=E.replace(/\n+/g,`$&${p}`));let D=(j?p?"2":"1":"")+v;if(e&&(D+=" "+m(e.replace(/ ?[\r\n]+/g," ")),o&&o()),!b){const M=i.replace(/\n+/g,`
35
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${p}`);let H=!1;const V=rc(l,!0);d!=="folded"&&n!==ze.BLOCK_FOLDED&&(V.onOverflow=()=>{H=!0});const L=lc(`${E}${M}${N}`,p,of,V);if(!H)return`>${D}
36
+ ${p}${L}`}return i=i.replace(/\n+/g,`$&${p}`),`|${D}
37
+ ${p}${E}${i}${N}`}function $w(e,n,i,l){const{type:o,value:u}=e,{actualString:d,implicitKey:m,indent:g,indentStep:p,inFlow:b}=n;if(m&&u.includes(`
38
+ `)||b&&/[[\]{},]/.test(u))return Ra(u,n);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(u))return m||b||!u.includes(`
39
+ `)?Ra(u,n):Ho(e,n,i,l);if(!m&&!b&&o!==ze.PLAIN&&u.includes(`
40
+ `))return Ho(e,n,i,l);if(oc(u)){if(g==="")return n.forceBlockIndent=!0,Ho(e,n,i,l);if(m&&g===p)return Ra(u,n)}const v=u.replace(/\n+/g,`$&
41
+ ${g}`);if(d){const w=j=>j.default&&j.tag!=="tag:yaml.org,2002:str"&&j.test?.test(v),{compat:N,tags:z}=n.doc.schema;if(z.some(w)||N?.some(w))return Ra(u,n)}return m?v:lc(v,g,E0,rc(n,!1))}function Ef(e,n,i,l){const{implicitKey:o,inFlow:u}=n,d=typeof e.value=="string"?e:Object.assign({},e,{value:String(e.value)});let{type:m}=e;m!==ze.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(d.value)&&(m=ze.QUOTE_DOUBLE);const g=b=>{switch(b){case ze.BLOCK_FOLDED:case ze.BLOCK_LITERAL:return o||u?Ra(d.value,n):Ho(d,n,i,l);case ze.QUOTE_DOUBLE:return Ql(d.value,n);case ze.QUOTE_SINGLE:return cf(d.value,n);case ze.PLAIN:return $w(d,n,i,l);default:return null}};let p=g(m);if(p===null){const{defaultKeyType:b,defaultStringType:v}=n.options,w=o&&b||v;if(p=g(w),p===null)throw new Error(`Unsupported default string type ${w}`)}return p}function A0(e,n){const i=Object.assign({blockQuote:!0,commentString:Lw,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,n);let l;switch(i.collectionStyle){case"block":l=!1;break;case"flow":l=!0;break;default:l=null}return{anchors:new Set,doc:e,flowCollectionPadding:i.flowCollectionPadding?" ":"",indent:"",indentStep:typeof i.indent=="number"?" ".repeat(i.indent):" ",inFlow:l,options:i}}function Uw(e,n){if(n.tag){const o=e.filter(u=>u.tag===n.tag);if(o.length>0)return o.find(u=>u.format===n.format)??o[0]}let i,l;if(lt(n)){l=n.value;let o=e.filter(u=>u.identify?.(l));if(o.length>1){const u=o.filter(d=>d.test);u.length>0&&(o=u)}i=o.find(u=>u.format===n.format)??o.find(u=>!u.format)}else l=n,i=e.find(o=>o.nodeClass&&l instanceof o.nodeClass);if(!i){const o=l?.constructor?.name??(l===null?"null":typeof l);throw new Error(`Tag not resolved for ${o} value`)}return i}function Bw(e,n,{anchors:i,doc:l}){if(!l.directives)return"";const o=[],u=(lt(e)||_t(e))&&e.anchor;u&&N0(u)&&(i.add(u),o.push(`&${u}`));const d=e.tag??(n.default?null:n.tag);return d&&o.push(l.directives.tagString(d)),o.join(" ")}function Za(e,n,i,l){if(Et(e))return e.toString(n,i,l);if(Bi(e)){if(n.doc.directives)return e.toString(n);if(n.resolvedAliases?.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");n.resolvedAliases?n.resolvedAliases.add(e):n.resolvedAliases=new Set([e]),e=e.resolve(n.doc)}let o;const u=Ct(e)?e:n.doc.createNode(e,{onTagObj:g=>o=g});o??(o=Uw(n.doc.schema.tags,u));const d=Bw(u,o,n);d.length>0&&(n.indentAtStart=(n.indentAtStart??0)+d.length+1);const m=typeof o.stringify=="function"?o.stringify(u,n,i,l):lt(u)?Ef(u,n,i,l):u.toString(n,i,l);return d?lt(u)||m[0]==="{"||m[0]==="["?`${d} ${m}`:`${d}
42
+ ${n.indent}${m}`:m}function Iw({key:e,value:n},i,l,o){const{allNullValues:u,doc:d,indent:m,indentStep:g,options:{commentString:p,indentSeq:b,simpleKeys:v}}=i;let w=Ct(e)&&e.comment||null;if(v){if(w)throw new Error("With simple keys, key nodes cannot have comments");if(_t(e)||!Ct(e)&&typeof e=="object"){const V="With simple keys, collection cannot be used as a key value";throw new Error(V)}}let N=!v&&(!e||w&&n==null&&!i.inFlow||_t(e)||(lt(e)?e.type===ze.BLOCK_FOLDED||e.type===ze.BLOCK_LITERAL:typeof e=="object"));i=Object.assign({},i,{allNullValues:!1,implicitKey:!N&&(v||!u),indent:m+g});let z=!1,j=!1,k=Za(e,i,()=>z=!0,()=>j=!0);if(!N&&!i.inFlow&&k.length>1024){if(v)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");N=!0}if(i.inFlow){if(u||n==null)return z&&l&&l(),k===""?"?":N?`? ${k}`:k}else if(u&&!v||n==null&&N)return k=`? ${k}`,w&&!z?k+=Li(k,i.indent,p(w)):j&&o&&o(),k;z&&(w=null),N?(w&&(k+=Li(k,i.indent,p(w))),k=`? ${k}
43
+ ${m}:`):(k=`${k}:`,w&&(k+=Li(k,i.indent,p(w))));let A,E,O;Ct(n)?(A=!!n.spaceBefore,E=n.commentBefore,O=n.comment):(A=!1,E=null,O=null,n&&typeof n=="object"&&(n=d.createNode(n))),i.implicitKey=!1,!N&&!w&&lt(n)&&(i.indentAtStart=k.length+1),j=!1,!b&&g.length>=2&&!i.inFlow&&!N&&sr(n)&&!n.flow&&!n.tag&&!n.anchor&&(i.indent=i.indent.substring(2));let D=!1;const M=Za(n,i,()=>D=!0,()=>j=!0);let H=" ";if(w||A||E){if(H=A?`
44
+ `:"",E){const V=p(E);H+=`
45
+ ${Cs(V,i.indent)}`}M===""&&!i.inFlow?H===`
46
+ `&&O&&(H=`
47
+
48
+ `):H+=`
49
+ ${i.indent}`}else if(!N&&_t(n)){const V=M[0],L=M.indexOf(`
50
+ `),Q=L!==-1,Se=i.inFlow??n.flow??n.items.length===0;if(Q||!Se){let ae=!1;if(Q&&(V==="&"||V==="!")){let fe=M.indexOf(" ");V==="&"&&fe!==-1&&fe<L&&M[fe+1]==="!"&&(fe=M.indexOf(" ",fe+1)),(fe===-1||L<fe)&&(ae=!0)}ae||(H=`
51
+ ${i.indent}`)}}else(M===""||M[0]===`
52
+ `)&&(H="");return k+=H+M,i.inFlow?D&&l&&l():O&&!D?k+=Li(k,i.indent,p(O)):j&&o&&o(),k}function qw(e,n){(e==="debug"||e==="warn")&&console.warn(n)}const jo="<<",Es={identify:e=>e===jo||typeof e=="symbol"&&e.description===jo,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new ze(Symbol(jo)),{addToJSMap:T0}),stringify:()=>jo},Zw=(e,n)=>(Es.identify(n)||lt(n)&&(!n.type||n.type===ze.PLAIN)&&Es.identify(n.value))&&e?.doc.schema.tags.some(i=>i.tag===Es.tag&&i.default);function T0(e,n,i){if(i=e&&Bi(i)?i.resolve(e.doc):i,sr(i))for(const l of i.items)qd(e,n,l);else if(Array.isArray(i))for(const l of i)qd(e,n,l);else qd(e,n,i)}function qd(e,n,i){const l=e&&Bi(i)?i.resolve(e.doc):i;if(!nr(l))throw new Error("Merge sources must be maps or map aliases");const o=l.toJSON(null,e,Map);for(const[u,d]of o)n instanceof Map?n.has(u)||n.set(u,d):n instanceof Set?n.add(u):Object.prototype.hasOwnProperty.call(n,u)||Object.defineProperty(n,u,{value:d,writable:!0,enumerable:!0,configurable:!0});return n}function O0(e,n,{key:i,value:l}){if(Ct(i)&&i.addToJSMap)i.addToJSMap(e,n,l);else if(Zw(e,i))T0(e,n,l);else{const o=Mn(i,"",e);if(n instanceof Map)n.set(o,Mn(l,o,e));else if(n instanceof Set)n.add(o);else{const u=Hw(i,o,e),d=Mn(l,u,e);u in n?Object.defineProperty(n,u,{value:d,writable:!0,enumerable:!0,configurable:!0}):n[u]=d}}return n}function Hw(e,n,i){if(n===null)return"";if(typeof n!="object")return String(n);if(Ct(e)&&i?.doc){const l=A0(i.doc,{});l.anchors=new Set;for(const u of i.anchors.keys())l.anchors.add(u.anchor);l.inFlow=!0,l.inStringifyKey=!0;const o=e.toString(l);if(!i.mapKeyWarned){let u=JSON.stringify(o);u.length>40&&(u=u.substring(0,36)+'..."'),qw(i.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${u}. Set mapAsMap: true to use object keys.`),i.mapKeyWarned=!0}return o}return JSON.stringify(n)}function Af(e,n,i){const l=Xl(e,void 0,i),o=Xl(n,void 0,i);return new ln(l,o)}class ln{constructor(n,i=null){Object.defineProperty(this,$n,{value:w0}),this.key=n,this.value=i}clone(n){let{key:i,value:l}=this;return Ct(i)&&(i=i.clone(n)),Ct(l)&&(l=l.clone(n)),new ln(i,l)}toJSON(n,i){const l=i?.mapAsMap?new Map:{};return O0(i,l,this)}toString(n,i,l){return n?.doc?Iw(this,n,i,l):JSON.stringify(this)}}function D0(e,n,i){return(n.inFlow??e.flow?Kw:Gw)(e,n,i)}function Gw({comment:e,items:n},i,{blockItemPrefix:l,flowChars:o,itemIndent:u,onChompKeep:d,onComment:m}){const{indent:g,options:{commentString:p}}=i,b=Object.assign({},i,{indent:u,type:null});let v=!1;const w=[];for(let z=0;z<n.length;++z){const j=n[z];let k=null;if(Ct(j))!v&&j.spaceBefore&&w.push(""),Vo(i,w,j.commentBefore,v),j.comment&&(k=j.comment);else if(Et(j)){const E=Ct(j.key)?j.key:null;E&&(!v&&E.spaceBefore&&w.push(""),Vo(i,w,E.commentBefore,v))}v=!1;let A=Za(j,b,()=>k=null,()=>v=!0);k&&(A+=Li(A,u,p(k))),v&&k&&(v=!1),w.push(l+A)}let N;if(w.length===0)N=o.start+o.end;else{N=w[0];for(let z=1;z<w.length;++z){const j=w[z];N+=j?`
53
+ ${g}${j}`:`
54
+ `}}return e?(N+=`
55
+ `+Cs(p(e),g),m&&m()):v&&d&&d(),N}function Kw({items:e},n,{flowChars:i,itemIndent:l}){const{indent:o,indentStep:u,flowCollectionPadding:d,options:{commentString:m}}=n;l+=u;const g=Object.assign({},n,{indent:l,inFlow:!0,type:null});let p=!1,b=0;const v=[];for(let z=0;z<e.length;++z){const j=e[z];let k=null;if(Ct(j))j.spaceBefore&&v.push(""),Vo(n,v,j.commentBefore,!1),j.comment&&(k=j.comment);else if(Et(j)){const E=Ct(j.key)?j.key:null;E&&(E.spaceBefore&&v.push(""),Vo(n,v,E.commentBefore,!1),E.comment&&(p=!0));const O=Ct(j.value)?j.value:null;O?(O.comment&&(k=O.comment),O.commentBefore&&(p=!0)):j.value==null&&E?.comment&&(k=E.comment)}k&&(p=!0);let A=Za(j,g,()=>k=null);z<e.length-1&&(A+=","),k&&(A+=Li(A,l,m(k))),!p&&(v.length>b||A.includes(`
56
+ `))&&(p=!0),v.push(A),b=v.length}const{start:w,end:N}=i;if(v.length===0)return w+N;if(!p){const z=v.reduce((j,k)=>j+k.length+2,2);p=n.options.lineWidth>0&&z>n.options.lineWidth}if(p){let z=w;for(const j of v)z+=j?`
57
+ ${u}${o}${j}`:`
58
+ `;return`${z}
59
+ ${o}${N}`}else return`${w}${d}${v.join(" ")}${d}${N}`}function Vo({indent:e,options:{commentString:n}},i,l,o){if(l&&o&&(l=l.replace(/^\n+/,"")),l){const u=Cs(n(l),e);i.push(u.trimStart())}}function Mi(e,n){const i=lt(n)?n.value:n;for(const l of e)if(Et(l)&&(l.key===n||l.key===i||lt(l.key)&&l.key.value===i))return l}class Ln extends C0{static get tagName(){return"tag:yaml.org,2002:map"}constructor(n){super(li,n),this.items=[]}static from(n,i,l){const{keepUndefined:o,replacer:u}=l,d=new this(n),m=(g,p)=>{if(typeof u=="function")p=u.call(i,g,p);else if(Array.isArray(u)&&!u.includes(g))return;(p!==void 0||o)&&d.items.push(Af(g,p,l))};if(i instanceof Map)for(const[g,p]of i)m(g,p);else if(i&&typeof i=="object")for(const g of Object.keys(i))m(g,i[g]);return typeof n.sortMapEntries=="function"&&d.items.sort(n.sortMapEntries),d}add(n,i){let l;Et(n)?l=n:!n||typeof n!="object"||!("key"in n)?l=new ln(n,n?.value):l=new ln(n.key,n.value);const o=Mi(this.items,l.key),u=this.schema?.sortMapEntries;if(o){if(!i)throw new Error(`Key ${l.key} already set`);lt(o.value)&&_0(l.value)?o.value.value=l.value:o.value=l.value}else if(u){const d=this.items.findIndex(m=>u(l,m)<0);d===-1?this.items.push(l):this.items.splice(d,0,l)}else this.items.push(l)}delete(n){const i=Mi(this.items,n);return i?this.items.splice(this.items.indexOf(i),1).length>0:!1}get(n,i){const o=Mi(this.items,n)?.value;return(!i&&lt(o)?o.value:o)??void 0}has(n){return!!Mi(this.items,n)}set(n,i){this.add(new ln(n,i),!0)}toJSON(n,i,l){const o=l?new l:i?.mapAsMap?new Map:{};i?.onCreate&&i.onCreate(o);for(const u of this.items)O0(i,o,u);return o}toString(n,i,l){if(!n)return JSON.stringify(this);for(const o of this.items)if(!Et(o))throw new Error(`Map items must all be pairs; found ${JSON.stringify(o)} instead`);return!n.allNullValues&&this.hasAllNullValues(!1)&&(n=Object.assign({},n,{allNullValues:!0})),D0(this,n,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:n.indent||"",onChompKeep:l,onComment:i})}}const Pa={collection:"map",default:!0,nodeClass:Ln,tag:"tag:yaml.org,2002:map",resolve(e,n){return nr(e)||n("Expected a mapping for this tag"),e},createNode:(e,n,i)=>Ln.from(e,n,i)};class $i extends C0{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(n){super(Ya,n),this.items=[]}add(n){this.items.push(n)}delete(n){const i=No(n);return typeof i!="number"?!1:this.items.splice(i,1).length>0}get(n,i){const l=No(n);if(typeof l!="number")return;const o=this.items[l];return!i&&lt(o)?o.value:o}has(n){const i=No(n);return typeof i=="number"&&i<this.items.length}set(n,i){const l=No(n);if(typeof l!="number")throw new Error(`Expected a valid index, not ${n}.`);const o=this.items[l];lt(o)&&_0(i)?o.value=i:this.items[l]=i}toJSON(n,i){const l=[];i?.onCreate&&i.onCreate(l);let o=0;for(const u of this.items)l.push(Mn(u,String(o++),i));return l}toString(n,i,l){return n?D0(this,n,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(n.indent||"")+" ",onChompKeep:l,onComment:i}):JSON.stringify(this)}static from(n,i,l){const{replacer:o}=l,u=new this(n);if(i&&Symbol.iterator in Object(i)){let d=0;for(let m of i){if(typeof o=="function"){const g=i instanceof Set?m:String(d++);m=o.call(i,g,m)}u.items.push(Xl(m,void 0,l))}}return u}}function No(e){let n=lt(e)?e.value:e;return n&&typeof n=="string"&&(n=Number(n)),typeof n=="number"&&Number.isInteger(n)&&n>=0?n:null}const Qa={collection:"seq",default:!0,nodeClass:$i,tag:"tag:yaml.org,2002:seq",resolve(e,n){return sr(e)||n("Expected a sequence for this tag"),e},createNode:(e,n,i)=>$i.from(e,n,i)},cc={identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify(e,n,i,l){return n=Object.assign({actualString:!0},n),Ef(e,n,i,l)}},uc={identify:e=>e==null,createNode:()=>new ze(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new ze(null),stringify:({source:e},n)=>typeof e=="string"&&uc.test.test(e)?e:n.options.nullStr},Tf={identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new ze(e[0]==="t"||e[0]==="T"),stringify({source:e,value:n},i){if(e&&Tf.test.test(e)){const l=e[0]==="t"||e[0]==="T";if(n===l)return e}return n?i.options.trueStr:i.options.falseStr}};function Yn({format:e,minFractionDigits:n,tag:i,value:l}){if(typeof l=="bigint")return String(l);const o=typeof l=="number"?l:Number(l);if(!isFinite(o))return isNaN(o)?".nan":o<0?"-.inf":".inf";let u=Object.is(l,-0)?"-0":JSON.stringify(l);if(!e&&n&&(!i||i==="tag:yaml.org,2002:float")&&/^\d/.test(u)){let d=u.indexOf(".");d<0&&(d=u.length,u+=".");let m=n-(u.length-d-1);for(;m-- >0;)u+="0"}return u}const R0={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Yn},L0={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){const n=Number(e.value);return isFinite(n)?n.toExponential():Yn(e)}},M0={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){const n=new ze(parseFloat(e)),i=e.indexOf(".");return i!==-1&&e[e.length-1]==="0"&&(n.minFractionDigits=e.length-i-1),n},stringify:Yn},dc=e=>typeof e=="bigint"||Number.isInteger(e),Of=(e,n,i,{intAsBigInt:l})=>l?BigInt(e):parseInt(e.substring(n),i);function $0(e,n,i){const{value:l}=e;return dc(l)&&l>=0?i+l.toString(n):Yn(e)}const U0={identify:e=>dc(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,n,i)=>Of(e,2,8,i),stringify:e=>$0(e,8,"0o")},B0={identify:dc,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,n,i)=>Of(e,0,10,i),stringify:Yn},I0={identify:e=>dc(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,n,i)=>Of(e,2,16,i),stringify:e=>$0(e,16,"0x")},Yw=[Pa,Qa,cc,uc,Tf,U0,B0,I0,R0,L0,M0];function dy(e){return typeof e=="bigint"||Number.isInteger(e)}const ko=({value:e})=>JSON.stringify(e),Vw=[{identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:ko},{identify:e=>e==null,createNode:()=>new ze(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:ko},{identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>e==="true",stringify:ko},{identify:dy,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,n,{intAsBigInt:i})=>i?BigInt(e):parseInt(e,10),stringify:({value:e})=>dy(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:ko}],Pw={default:!0,tag:"",test:/^/,resolve(e,n){return n(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},Qw=[Pa,Qa].concat(Vw,Pw),Df={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,n){if(typeof atob=="function"){const i=atob(e.replace(/[\n\r]/g,"")),l=new Uint8Array(i.length);for(let o=0;o<i.length;++o)l[o]=i.charCodeAt(o);return l}else return n("This environment does not support reading binary tags; either Buffer or atob is required"),e},stringify({comment:e,type:n,value:i},l,o,u){if(!i)return"";const d=i;let m;if(typeof btoa=="function"){let g="";for(let p=0;p<d.length;++p)g+=String.fromCharCode(d[p]);m=btoa(g)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(n??(n=ze.BLOCK_LITERAL),n!==ze.QUOTE_DOUBLE){const g=Math.max(l.options.lineWidth-l.indent.length,l.options.minContentWidth),p=Math.ceil(m.length/g),b=new Array(p);for(let v=0,w=0;v<p;++v,w+=g)b[v]=m.substr(w,g);m=b.join(n===ze.BLOCK_LITERAL?`
60
+ `:" ")}return Ef({comment:e,type:n,value:m},l,o,u)}};function q0(e,n){if(sr(e))for(let i=0;i<e.items.length;++i){let l=e.items[i];if(!Et(l)){if(nr(l)){l.items.length>1&&n("Each pair must have its own sequence indicator");const o=l.items[0]||new ln(new ze(null));if(l.commentBefore&&(o.key.commentBefore=o.key.commentBefore?`${l.commentBefore}
61
+ ${o.key.commentBefore}`:l.commentBefore),l.comment){const u=o.value??o.key;u.comment=u.comment?`${l.comment}
62
+ ${u.comment}`:l.comment}l=o}e.items[i]=Et(l)?l:new ln(l)}}else n("Expected a sequence for this tag");return e}function Z0(e,n,i){const{replacer:l}=i,o=new $i(e);o.tag="tag:yaml.org,2002:pairs";let u=0;if(n&&Symbol.iterator in Object(n))for(let d of n){typeof l=="function"&&(d=l.call(n,String(u++),d));let m,g;if(Array.isArray(d))if(d.length===2)m=d[0],g=d[1];else throw new TypeError(`Expected [key, value] tuple: ${d}`);else if(d&&d instanceof Object){const p=Object.keys(d);if(p.length===1)m=p[0],g=d[m];else throw new TypeError(`Expected tuple with one key, not ${p.length} keys`)}else m=d;o.items.push(Af(m,g,i))}return o}const Rf={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:q0,createNode:Z0};class $a extends $i{constructor(){super(),this.add=Ln.prototype.add.bind(this),this.delete=Ln.prototype.delete.bind(this),this.get=Ln.prototype.get.bind(this),this.has=Ln.prototype.has.bind(this),this.set=Ln.prototype.set.bind(this),this.tag=$a.tag}toJSON(n,i){if(!i)return super.toJSON(n);const l=new Map;i?.onCreate&&i.onCreate(l);for(const o of this.items){let u,d;if(Et(o)?(u=Mn(o.key,"",i),d=Mn(o.value,u,i)):u=Mn(o,"",i),l.has(u))throw new Error("Ordered maps must not include duplicate keys");l.set(u,d)}return l}static from(n,i,l){const o=Z0(n,i,l),u=new this;return u.items=o.items,u}}$a.tag="tag:yaml.org,2002:omap";const Lf={collection:"seq",identify:e=>e instanceof Map,nodeClass:$a,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,n){const i=q0(e,n),l=[];for(const{key:o}of i.items)lt(o)&&(l.includes(o.value)?n(`Ordered maps must not include duplicate keys: ${o.value}`):l.push(o.value));return Object.assign(new $a,i)},createNode:(e,n,i)=>$a.from(e,n,i)};function H0({value:e,source:n},i){return n&&(e?G0:K0).test.test(n)?n:e?i.options.trueStr:i.options.falseStr}const G0={identify:e=>e===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new ze(!0),stringify:H0},K0={identify:e=>e===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new ze(!1),stringify:H0},Xw={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Yn},Jw={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){const n=Number(e.value);return isFinite(n)?n.toExponential():Yn(e)}},Fw={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){const n=new ze(parseFloat(e.replace(/_/g,""))),i=e.indexOf(".");if(i!==-1){const l=e.substring(i+1).replace(/_/g,"");l[l.length-1]==="0"&&(n.minFractionDigits=l.length)}return n},stringify:Yn},ir=e=>typeof e=="bigint"||Number.isInteger(e);function fc(e,n,i,{intAsBigInt:l}){const o=e[0];if((o==="-"||o==="+")&&(n+=1),e=e.substring(n).replace(/_/g,""),l){switch(i){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}const d=BigInt(e);return o==="-"?BigInt(-1)*d:d}const u=parseInt(e,i);return o==="-"?-1*u:u}function Mf(e,n,i){const{value:l}=e;if(ir(l)){const o=l.toString(n);return l<0?"-"+i+o.substr(1):i+o}return Yn(e)}const Ww={identify:ir,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,n,i)=>fc(e,2,2,i),stringify:e=>Mf(e,2,"0b")},ej={identify:ir,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,n,i)=>fc(e,1,8,i),stringify:e=>Mf(e,8,"0")},tj={identify:ir,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,n,i)=>fc(e,0,10,i),stringify:Yn},nj={identify:ir,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,n,i)=>fc(e,2,16,i),stringify:e=>Mf(e,16,"0x")};class Ua extends Ln{constructor(n){super(n),this.tag=Ua.tag}add(n){let i;Et(n)?i=n:n&&typeof n=="object"&&"key"in n&&"value"in n&&n.value===null?i=new ln(n.key,null):i=new ln(n,null),Mi(this.items,i.key)||this.items.push(i)}get(n,i){const l=Mi(this.items,n);return!i&&Et(l)?lt(l.key)?l.key.value:l.key:l}set(n,i){if(typeof i!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof i}`);const l=Mi(this.items,n);l&&!i?this.items.splice(this.items.indexOf(l),1):!l&&i&&this.items.push(new ln(n))}toJSON(n,i){return super.toJSON(n,i,Set)}toString(n,i,l){if(!n)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},n,{allNullValues:!0}),i,l);throw new Error("Set items must all have null values")}static from(n,i,l){const{replacer:o}=l,u=new this(n);if(i&&Symbol.iterator in Object(i))for(let d of i)typeof o=="function"&&(d=o.call(i,d,d)),u.items.push(Af(d,null,l));return u}}Ua.tag="tag:yaml.org,2002:set";const $f={collection:"map",identify:e=>e instanceof Set,nodeClass:Ua,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,n,i)=>Ua.from(e,n,i),resolve(e,n){if(nr(e)){if(e.hasAllNullValues(!0))return Object.assign(new Ua,e);n("Set items must all have null values")}else n("Expected a mapping for this tag");return e}};function Uf(e,n){const i=e[0],l=i==="-"||i==="+"?e.substring(1):e,o=d=>n?BigInt(d):Number(d),u=l.replace(/_/g,"").split(":").reduce((d,m)=>d*o(60)+o(m),o(0));return i==="-"?o(-1)*u:u}function Y0(e){let{value:n}=e,i=d=>d;if(typeof n=="bigint")i=d=>BigInt(d);else if(isNaN(n)||!isFinite(n))return Yn(e);let l="";n<0&&(l="-",n*=i(-1));const o=i(60),u=[n%o];return n<60?u.unshift(0):(n=(n-u[0])/o,u.unshift(n%o),n>=60&&(n=(n-u[0])/o,u.unshift(n))),l+u.map(d=>String(d).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const V0={identify:e=>typeof e=="bigint"||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,n,{intAsBigInt:i})=>Uf(e,i),stringify:Y0},P0={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>Uf(e,!1),stringify:Y0},hc={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){const n=e.match(hc.test);if(!n)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,i,l,o,u,d,m]=n.map(Number),g=n[7]?Number((n[7]+"00").substr(1,3)):0;let p=Date.UTC(i,l-1,o,u||0,d||0,m||0,g);const b=n[8];if(b&&b!=="Z"){let v=Uf(b,!1);Math.abs(v)<30&&(v*=60),p-=6e4*v}return new Date(p)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""},fy=[Pa,Qa,cc,uc,G0,K0,Ww,ej,tj,nj,Xw,Jw,Fw,Df,Es,Lf,Rf,$f,V0,P0,hc],hy=new Map([["core",Yw],["failsafe",[Pa,Qa,cc]],["json",Qw],["yaml11",fy],["yaml-1.1",fy]]),my={binary:Df,bool:Tf,float:M0,floatExp:L0,floatNaN:R0,floatTime:P0,int:B0,intHex:I0,intOct:U0,intTime:V0,map:Pa,merge:Es,null:uc,omap:Lf,pairs:Rf,seq:Qa,set:$f,timestamp:hc},sj={"tag:yaml.org,2002:binary":Df,"tag:yaml.org,2002:merge":Es,"tag:yaml.org,2002:omap":Lf,"tag:yaml.org,2002:pairs":Rf,"tag:yaml.org,2002:set":$f,"tag:yaml.org,2002:timestamp":hc};function Zd(e,n,i){const l=hy.get(n);if(l&&!e)return i&&!l.includes(Es)?l.concat(Es):l.slice();let o=l;if(!o)if(Array.isArray(e))o=[];else{const u=Array.from(hy.keys()).filter(d=>d!=="yaml11").map(d=>JSON.stringify(d)).join(", ");throw new Error(`Unknown schema "${n}"; use one of ${u} or define customTags array`)}if(Array.isArray(e))for(const u of e)o=o.concat(u);else typeof e=="function"&&(o=e(o.slice()));return i&&(o=o.concat(Es)),o.reduce((u,d)=>{const m=typeof d=="string"?my[d]:d;if(!m){const g=JSON.stringify(d),p=Object.keys(my).map(b=>JSON.stringify(b)).join(", ");throw new Error(`Unknown custom tag ${g}; use one of ${p}`)}return u.includes(m)||u.push(m),u},[])}const ij=(e,n)=>e.key<n.key?-1:e.key>n.key?1:0;class Bf{constructor({compat:n,customTags:i,merge:l,resolveKnownTags:o,schema:u,sortMapEntries:d,toStringDefaults:m}){this.compat=Array.isArray(n)?Zd(n,"compat"):n?Zd(null,n):null,this.name=typeof u=="string"&&u||"core",this.knownTags=o?sj:{},this.tags=Zd(i,this.name,l),this.toStringOptions=m??null,Object.defineProperty(this,li,{value:Pa}),Object.defineProperty(this,is,{value:cc}),Object.defineProperty(this,Ya,{value:Qa}),this.sortMapEntries=typeof d=="function"?d:d===!0?ij:null}clone(){const n=Object.create(Bf.prototype,Object.getOwnPropertyDescriptors(this));return n.tags=this.tags.slice(),n}}function aj(e,n){const i=[];let l=n.directives===!0;if(n.directives!==!1&&e.directives){const g=e.directives.toString(e);g?(i.push(g),l=!0):e.directives.docStart&&(l=!0)}l&&i.push("---");const o=A0(e,n),{commentString:u}=o.options;if(e.commentBefore){i.length!==1&&i.unshift("");const g=u(e.commentBefore);i.unshift(Cs(g,""))}let d=!1,m=null;if(e.contents){if(Ct(e.contents)){if(e.contents.spaceBefore&&l&&i.push(""),e.contents.commentBefore){const b=u(e.contents.commentBefore);i.push(Cs(b,""))}o.forceBlockIndent=!!e.comment,m=e.contents.comment}const g=m?void 0:()=>d=!0;let p=Za(e.contents,o,()=>m=null,g);m&&(p+=Li(p,"",u(m))),(p[0]==="|"||p[0]===">")&&i[i.length-1]==="---"?i[i.length-1]=`--- ${p}`:i.push(p)}else i.push(Za(e.contents,o));if(e.directives?.docEnd)if(e.comment){const g=u(e.comment);g.includes(`
63
+ `)?(i.push("..."),i.push(Cs(g,""))):i.push(`... ${g}`)}else i.push("...");else{let g=e.comment;g&&d&&(g=g.replace(/^\n+/,"")),g&&((!d||m)&&i[i.length-1]!==""&&i.push(""),i.push(Cs(u(g),"")))}return i.join(`
64
+ `)+`
65
+ `}class mc{constructor(n,i,l){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,$n,{value:rf});let o=null;typeof i=="function"||Array.isArray(i)?o=i:l===void 0&&i&&(l=i,i=void 0);const u=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},l);this.options=u;let{version:d}=u;l?._directives?(this.directives=l._directives.atDocument(),this.directives.yaml.explicit&&(d=this.directives.yaml.version)):this.directives=new an({version:d}),this.setSchema(d,l),this.contents=n===void 0?null:this.createNode(n,o,l)}clone(){const n=Object.create(mc.prototype,{[$n]:{value:rf}});return n.commentBefore=this.commentBefore,n.comment=this.comment,n.errors=this.errors.slice(),n.warnings=this.warnings.slice(),n.options=Object.assign({},this.options),this.directives&&(n.directives=this.directives.clone()),n.schema=this.schema.clone(),n.contents=Ct(this.contents)?this.contents.clone(n.schema):this.contents,this.range&&(n.range=this.range.slice()),n}add(n){_a(this.contents)&&this.contents.add(n)}addIn(n,i){_a(this.contents)&&this.contents.addIn(n,i)}createAlias(n,i){if(!n.anchor){const l=k0(this);n.anchor=!i||l.has(i)?z0(i||"a",l):i}return new Cf(n.anchor)}createNode(n,i,l){let o;if(typeof i=="function")n=i.call({"":n},"",n),o=i;else if(Array.isArray(i)){const k=E=>typeof E=="number"||E instanceof String||E instanceof Number,A=i.filter(k).map(String);A.length>0&&(i=i.concat(A)),o=i}else l===void 0&&i&&(l=i,i=void 0);const{aliasDuplicateObjects:u,anchorPrefix:d,flow:m,keepUndefined:g,onTagObj:p,tag:b}=l??{},{onAnchor:v,setAnchors:w,sourceObjects:N}=Ow(this,d||"a"),z={aliasDuplicateObjects:u??!0,keepUndefined:g??!1,onAnchor:v,onTagObj:p,replacer:o,schema:this.schema,sourceObjects:N},j=Xl(n,b,z);return m&&_t(j)&&(j.flow=!0),w(),j}createPair(n,i,l={}){const o=this.createNode(n,null,l),u=this.createNode(i,null,l);return new ln(o,u)}delete(n){return _a(this.contents)?this.contents.delete(n):!1}deleteIn(n){return Yl(n)?this.contents==null?!1:(this.contents=null,!0):_a(this.contents)?this.contents.deleteIn(n):!1}get(n,i){return _t(this.contents)?this.contents.get(n,i):void 0}getIn(n,i){return Yl(n)?!i&&lt(this.contents)?this.contents.value:this.contents:_t(this.contents)?this.contents.getIn(n,i):void 0}has(n){return _t(this.contents)?this.contents.has(n):!1}hasIn(n){return Yl(n)?this.contents!==void 0:_t(this.contents)?this.contents.hasIn(n):!1}set(n,i){this.contents==null?this.contents=Yo(this.schema,[n],i):_a(this.contents)&&this.contents.set(n,i)}setIn(n,i){Yl(n)?this.contents=i:this.contents==null?this.contents=Yo(this.schema,Array.from(n),i):_a(this.contents)&&this.contents.setIn(n,i)}setSchema(n,i={}){typeof n=="number"&&(n=String(n));let l;switch(n){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new an({version:"1.1"}),l={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=n:this.directives=new an({version:n}),l={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,l=null;break;default:{const o=JSON.stringify(n);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${o}`)}}if(i.schema instanceof Object)this.schema=i.schema;else if(l)this.schema=new Bf(Object.assign(l,i));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:n,jsonArg:i,mapAsMap:l,maxAliasCount:o,onAnchor:u,reviver:d}={}){const m={anchors:new Map,doc:this,keep:!n,mapAsMap:l===!0,mapKeyWarned:!1,maxAliasCount:typeof o=="number"?o:100},g=Mn(this.contents,i??"",m);if(typeof u=="function")for(const{count:p,res:b}of m.anchors.values())u(b,p);return typeof d=="function"?Da(d,{"":g},"",g):g}toJSON(n,i){return this.toJS({json:!0,jsonArg:n,mapAsMap:!1,onAnchor:i})}toString(n={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in n&&(!Number.isInteger(n.indent)||Number(n.indent)<=0)){const i=JSON.stringify(n.indent);throw new Error(`"indent" option must be a positive integer, not ${i}`)}return aj(this,n)}}function _a(e){if(_t(e))return!0;throw new Error("Expected a YAML collection as document contents")}class Q0 extends Error{constructor(n,i,l,o){super(),this.name=n,this.code=l,this.message=o,this.pos=i}}class zo extends Q0{constructor(n,i,l){super("YAMLParseError",n,i,l)}}class lj extends Q0{constructor(n,i,l){super("YAMLWarning",n,i,l)}}const py=(e,n)=>i=>{if(i.pos[0]===-1)return;i.linePos=i.pos.map(m=>n.linePos(m));const{line:l,col:o}=i.linePos[0];i.message+=` at line ${l}, column ${o}`;let u=o-1,d=e.substring(n.lineStarts[l-1],n.lineStarts[l]).replace(/[\n\r]+$/,"");if(u>=60&&d.length>80){const m=Math.min(u-39,d.length-79);d="…"+d.substring(m),u-=m-1}if(d.length>80&&(d=d.substring(0,79)+"…"),l>1&&/^ *$/.test(d.substring(0,u))){let m=e.substring(n.lineStarts[l-2],n.lineStarts[l-1]);m.length>80&&(m=m.substring(0,79)+`…
66
+ `),d=m+d}if(/[^ ]/.test(d)){let m=1;const g=i.linePos[1];g?.line===l&&g.col>o&&(m=Math.max(1,Math.min(g.col-o,80-u)));const p=" ".repeat(u)+"^".repeat(m);i.message+=`:
67
+
68
+ ${d}
69
+ ${p}
70
+ `}};function Ha(e,{flow:n,indicator:i,next:l,offset:o,onError:u,parentIndent:d,startOnNewline:m}){let g=!1,p=m,b=m,v="",w="",N=!1,z=!1,j=null,k=null,A=null,E=null,O=null,D=null,M=null;for(const L of e)switch(z&&(L.type!=="space"&&L.type!=="newline"&&L.type!=="comma"&&u(L.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),z=!1),j&&(p&&L.type!=="comment"&&L.type!=="newline"&&u(j,"TAB_AS_INDENT","Tabs are not allowed as indentation"),j=null),L.type){case"space":!n&&(i!=="doc-start"||l?.type!=="flow-collection")&&L.source.includes(" ")&&(j=L),b=!0;break;case"comment":{b||u(L,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const Q=L.source.substring(1)||" ";v?v+=w+Q:v=Q,w="",p=!1;break}case"newline":p?v?v+=L.source:(!D||i!=="seq-item-ind")&&(g=!0):w+=L.source,p=!0,N=!0,(k||A)&&(E=L),b=!0;break;case"anchor":k&&u(L,"MULTIPLE_ANCHORS","A node can have at most one anchor"),L.source.endsWith(":")&&u(L.offset+L.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),k=L,M??(M=L.offset),p=!1,b=!1,z=!0;break;case"tag":{A&&u(L,"MULTIPLE_TAGS","A node can have at most one tag"),A=L,M??(M=L.offset),p=!1,b=!1,z=!0;break}case i:(k||A)&&u(L,"BAD_PROP_ORDER",`Anchors and tags must be after the ${L.source} indicator`),D&&u(L,"UNEXPECTED_TOKEN",`Unexpected ${L.source} in ${n??"collection"}`),D=L,p=i==="seq-item-ind"||i==="explicit-key-ind",b=!1;break;case"comma":if(n){O&&u(L,"UNEXPECTED_TOKEN",`Unexpected , in ${n}`),O=L,p=!1,b=!1;break}default:u(L,"UNEXPECTED_TOKEN",`Unexpected ${L.type} token`),p=!1,b=!1}const H=e[e.length-1],V=H?H.offset+H.source.length:o;return z&&l&&l.type!=="space"&&l.type!=="newline"&&l.type!=="comma"&&(l.type!=="scalar"||l.source!=="")&&u(l.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),j&&(p&&j.indent<=d||l?.type==="block-map"||l?.type==="block-seq")&&u(j,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:O,found:D,spaceBefore:g,comment:v,hasNewline:N,anchor:k,tag:A,newlineAfterProp:E,end:V,start:M??V}}function Jl(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes(`
71
+ `))return!0;if(e.end){for(const n of e.end)if(n.type==="newline")return!0}return!1;case"flow-collection":for(const n of e.items){for(const i of n.start)if(i.type==="newline")return!0;if(n.sep){for(const i of n.sep)if(i.type==="newline")return!0}if(Jl(n.key)||Jl(n.value))return!0}return!1;default:return!0}}function df(e,n,i){if(n?.type==="flow-collection"){const l=n.end[0];l.indent===e&&(l.source==="]"||l.source==="}")&&Jl(n)&&i(l,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function X0(e,n,i){const{uniqueKeys:l}=e.options;if(l===!1)return!1;const o=typeof l=="function"?l:(u,d)=>u===d||lt(u)&&lt(d)&&u.value===d.value;return n.some(u=>o(u.key,i))}const gy="All mapping items must start at the same column";function rj({composeNode:e,composeEmptyNode:n},i,l,o,u){const d=u?.nodeClass??Ln,m=new d(i.schema);i.atRoot&&(i.atRoot=!1);let g=l.offset,p=null;for(const b of l.items){const{start:v,key:w,sep:N,value:z}=b,j=Ha(v,{indicator:"explicit-key-ind",next:w??N?.[0],offset:g,onError:o,parentIndent:l.indent,startOnNewline:!0}),k=!j.found;if(k){if(w&&(w.type==="block-seq"?o(g,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in w&&w.indent!==l.indent&&o(g,"BAD_INDENT",gy)),!j.anchor&&!j.tag&&!N){p=j.end,j.comment&&(m.comment?m.comment+=`
72
+ `+j.comment:m.comment=j.comment);continue}(j.newlineAfterProp||Jl(w))&&o(w??v[v.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else j.found?.indent!==l.indent&&o(g,"BAD_INDENT",gy);i.atKey=!0;const A=j.end,E=w?e(i,w,j,o):n(i,A,v,null,j,o);i.schema.compat&&df(l.indent,w,o),i.atKey=!1,X0(i,m.items,E)&&o(A,"DUPLICATE_KEY","Map keys must be unique");const O=Ha(N??[],{indicator:"map-value-ind",next:z,offset:E.range[2],onError:o,parentIndent:l.indent,startOnNewline:!w||w.type==="block-scalar"});if(g=O.end,O.found){k&&(z?.type==="block-map"&&!O.hasNewline&&o(g,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),i.options.strict&&j.start<O.found.offset-1024&&o(E.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const D=z?e(i,z,O,o):n(i,g,N,null,O,o);i.schema.compat&&df(l.indent,z,o),g=D.range[2];const M=new ln(E,D);i.options.keepSourceTokens&&(M.srcToken=b),m.items.push(M)}else{k&&o(E.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),O.comment&&(E.comment?E.comment+=`
73
+ `+O.comment:E.comment=O.comment);const D=new ln(E);i.options.keepSourceTokens&&(D.srcToken=b),m.items.push(D)}}return p&&p<g&&o(p,"IMPOSSIBLE","Map comment with trailing content"),m.range=[l.offset,g,p??g],m}function oj({composeNode:e,composeEmptyNode:n},i,l,o,u){const d=u?.nodeClass??$i,m=new d(i.schema);i.atRoot&&(i.atRoot=!1),i.atKey&&(i.atKey=!1);let g=l.offset,p=null;for(const{start:b,value:v}of l.items){const w=Ha(b,{indicator:"seq-item-ind",next:v,offset:g,onError:o,parentIndent:l.indent,startOnNewline:!0});if(!w.found)if(w.anchor||w.tag||v)v?.type==="block-seq"?o(w.end,"BAD_INDENT","All sequence items must start at the same column"):o(g,"MISSING_CHAR","Sequence item without - indicator");else{p=w.end,w.comment&&(m.comment=w.comment);continue}const N=v?e(i,v,w,o):n(i,w.end,b,null,w,o);i.schema.compat&&df(l.indent,v,o),g=N.range[2],m.items.push(N)}return m.range=[l.offset,g,p??g],m}function ar(e,n,i,l){let o="";if(e){let u=!1,d="";for(const m of e){const{source:g,type:p}=m;switch(p){case"space":u=!0;break;case"comment":{i&&!u&&l(m,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const b=g.substring(1)||" ";o?o+=d+b:o=b,d="";break}case"newline":o&&(d+=g),u=!0;break;default:l(m,"UNEXPECTED_TOKEN",`Unexpected ${p} at node end`)}n+=g.length}}return{comment:o,offset:n}}const Hd="Block collections are not allowed within flow collections",Gd=e=>e&&(e.type==="block-map"||e.type==="block-seq");function cj({composeNode:e,composeEmptyNode:n},i,l,o,u){const d=l.start.source==="{",m=d?"flow map":"flow sequence",g=u?.nodeClass??(d?Ln:$i),p=new g(i.schema);p.flow=!0;const b=i.atRoot;b&&(i.atRoot=!1),i.atKey&&(i.atKey=!1);let v=l.offset+l.start.source.length;for(let k=0;k<l.items.length;++k){const A=l.items[k],{start:E,key:O,sep:D,value:M}=A,H=Ha(E,{flow:m,indicator:"explicit-key-ind",next:O??D?.[0],offset:v,onError:o,parentIndent:l.indent,startOnNewline:!1});if(!H.found){if(!H.anchor&&!H.tag&&!D&&!M){k===0&&H.comma?o(H.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${m}`):k<l.items.length-1&&o(H.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${m}`),H.comment&&(p.comment?p.comment+=`
74
+ `+H.comment:p.comment=H.comment),v=H.end;continue}!d&&i.options.strict&&Jl(O)&&o(O,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(k===0)H.comma&&o(H.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${m}`);else if(H.comma||o(H.start,"MISSING_CHAR",`Missing , between ${m} items`),H.comment){let V="";e:for(const L of E)switch(L.type){case"comma":case"space":break;case"comment":V=L.source.substring(1);break e;default:break e}if(V){let L=p.items[p.items.length-1];Et(L)&&(L=L.value??L.key),L.comment?L.comment+=`
75
+ `+V:L.comment=V,H.comment=H.comment.substring(V.length+1)}}if(!d&&!D&&!H.found){const V=M?e(i,M,H,o):n(i,H.end,D,null,H,o);p.items.push(V),v=V.range[2],Gd(M)&&o(V.range,"BLOCK_IN_FLOW",Hd)}else{i.atKey=!0;const V=H.end,L=O?e(i,O,H,o):n(i,V,E,null,H,o);Gd(O)&&o(L.range,"BLOCK_IN_FLOW",Hd),i.atKey=!1;const Q=Ha(D??[],{flow:m,indicator:"map-value-ind",next:M,offset:L.range[2],onError:o,parentIndent:l.indent,startOnNewline:!1});if(Q.found){if(!d&&!H.found&&i.options.strict){if(D)for(const fe of D){if(fe===Q.found)break;if(fe.type==="newline"){o(fe,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}H.start<Q.found.offset-1024&&o(Q.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else M&&("source"in M&&M.source?.[0]===":"?o(M,"MISSING_CHAR",`Missing space after : in ${m}`):o(Q.start,"MISSING_CHAR",`Missing , or : between ${m} items`));const Se=M?e(i,M,Q,o):Q.found?n(i,Q.end,D,null,Q,o):null;Se?Gd(M)&&o(Se.range,"BLOCK_IN_FLOW",Hd):Q.comment&&(L.comment?L.comment+=`
76
+ `+Q.comment:L.comment=Q.comment);const ae=new ln(L,Se);if(i.options.keepSourceTokens&&(ae.srcToken=A),d){const fe=p;X0(i,fe.items,L)&&o(V,"DUPLICATE_KEY","Map keys must be unique"),fe.items.push(ae)}else{const fe=new Ln(i.schema);fe.flow=!0,fe.items.push(ae);const Ae=(Se??L).range;fe.range=[L.range[0],Ae[1],Ae[2]],p.items.push(fe)}v=Se?Se.range[2]:Q.end}}const w=d?"}":"]",[N,...z]=l.end;let j=v;if(N?.source===w)j=N.offset+N.source.length;else{const k=m[0].toUpperCase()+m.substring(1),A=b?`${k} must end with a ${w}`:`${k} in block collection must be sufficiently indented and end with a ${w}`;o(v,b?"MISSING_CHAR":"BAD_INDENT",A),N&&N.source.length!==1&&z.unshift(N)}if(z.length>0){const k=ar(z,j,i.options.strict,o);k.comment&&(p.comment?p.comment+=`
77
+ `+k.comment:p.comment=k.comment),p.range=[l.offset,j,k.offset]}else p.range=[l.offset,j,j];return p}function Kd(e,n,i,l,o,u){const d=i.type==="block-map"?rj(e,n,i,l,u):i.type==="block-seq"?oj(e,n,i,l,u):cj(e,n,i,l,u),m=d.constructor;return o==="!"||o===m.tagName?(d.tag=m.tagName,d):(o&&(d.tag=o),d)}function uj(e,n,i,l,o){const u=l.tag,d=u?n.directives.tagName(u.source,w=>o(u,"TAG_RESOLVE_FAILED",w)):null;if(i.type==="block-seq"){const{anchor:w,newlineAfterProp:N}=l,z=w&&u?w.offset>u.offset?w:u:w??u;z&&(!N||N.offset<z.offset)&&o(z,"MISSING_CHAR","Missing newline after block sequence props")}const m=i.type==="block-map"?"map":i.type==="block-seq"?"seq":i.start.source==="{"?"map":"seq";if(!u||!d||d==="!"||d===Ln.tagName&&m==="map"||d===$i.tagName&&m==="seq")return Kd(e,n,i,o,d);let g=n.schema.tags.find(w=>w.tag===d&&w.collection===m);if(!g){const w=n.schema.knownTags[d];if(w?.collection===m)n.schema.tags.push(Object.assign({},w,{default:!1})),g=w;else return w?o(u,"BAD_COLLECTION_TYPE",`${w.tag} used for ${m} collection, but expects ${w.collection??"scalar"}`,!0):o(u,"TAG_RESOLVE_FAILED",`Unresolved tag: ${d}`,!0),Kd(e,n,i,o,d)}const p=Kd(e,n,i,o,d,g),b=g.resolve?.(p,w=>o(u,"TAG_RESOLVE_FAILED",w),n.options)??p,v=Ct(b)?b:new ze(b);return v.range=p.range,v.tag=d,g?.format&&(v.format=g.format),v}function dj(e,n,i){const l=n.offset,o=fj(n,e.options.strict,i);if(!o)return{value:"",type:null,comment:"",range:[l,l,l]};const u=o.mode===">"?ze.BLOCK_FOLDED:ze.BLOCK_LITERAL,d=n.source?hj(n.source):[];let m=d.length;for(let j=d.length-1;j>=0;--j){const k=d[j][1];if(k===""||k==="\r")m=j;else break}if(m===0){const j=o.chomp==="+"&&d.length>0?`
78
+ `.repeat(Math.max(1,d.length-1)):"";let k=l+o.length;return n.source&&(k+=n.source.length),{value:j,type:u,comment:o.comment,range:[l,k,k]}}let g=n.indent+o.indent,p=n.offset+o.length,b=0;for(let j=0;j<m;++j){const[k,A]=d[j];if(A===""||A==="\r")o.indent===0&&k.length>g&&(g=k.length);else{k.length<g&&i(p+k.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),o.indent===0&&(g=k.length),b=j,g===0&&!e.atRoot&&i(p,"BAD_INDENT","Block scalar values in collections must be indented");break}p+=k.length+A.length+1}for(let j=d.length-1;j>=m;--j)d[j][0].length>g&&(m=j+1);let v="",w="",N=!1;for(let j=0;j<b;++j)v+=d[j][0].slice(g)+`
79
+ `;for(let j=b;j<m;++j){let[k,A]=d[j];p+=k.length+A.length+1;const E=A[A.length-1]==="\r";if(E&&(A=A.slice(0,-1)),A&&k.length<g){const D=`Block scalar lines must not be less indented than their ${o.indent?"explicit indentation indicator":"first line"}`;i(p-A.length-(E?2:1),"BAD_INDENT",D),k=""}u===ze.BLOCK_LITERAL?(v+=w+k.slice(g)+A,w=`
80
+ `):k.length>g||A[0]===" "?(w===" "?w=`
81
+ `:!N&&w===`
82
+ `&&(w=`
83
+
84
+ `),v+=w+k.slice(g)+A,w=`
85
+ `,N=!0):A===""?w===`
86
+ `?v+=`
87
+ `:w=`
88
+ `:(v+=w+A,w=" ",N=!1)}switch(o.chomp){case"-":break;case"+":for(let j=m;j<d.length;++j)v+=`
89
+ `+d[j][0].slice(g);v[v.length-1]!==`
90
+ `&&(v+=`
91
+ `);break;default:v+=`
92
+ `}const z=l+o.length+n.source.length;return{value:v,type:u,comment:o.comment,range:[l,z,z]}}function fj({offset:e,props:n},i,l){if(n[0].type!=="block-scalar-header")return l(n[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:o}=n[0],u=o[0];let d=0,m="",g=-1;for(let w=1;w<o.length;++w){const N=o[w];if(!m&&(N==="-"||N==="+"))m=N;else{const z=Number(N);!d&&z?d=z:g===-1&&(g=e+w)}}g!==-1&&l(g,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${o}`);let p=!1,b="",v=o.length;for(let w=1;w<n.length;++w){const N=n[w];switch(N.type){case"space":p=!0;case"newline":v+=N.source.length;break;case"comment":i&&!p&&l(N,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),v+=N.source.length,b=N.source.substring(1);break;case"error":l(N,"UNEXPECTED_TOKEN",N.message),v+=N.source.length;break;default:{const z=`Unexpected token in block scalar header: ${N.type}`;l(N,"UNEXPECTED_TOKEN",z);const j=N.source;j&&typeof j=="string"&&(v+=j.length)}}}return{mode:u,indent:d,chomp:m,comment:b,length:v}}function hj(e){const n=e.split(/\n( *)/),i=n[0],l=i.match(/^( *)/),u=[l?.[1]?[l[1],i.slice(l[1].length)]:["",i]];for(let d=1;d<n.length;d+=2)u.push([n[d],n[d+1]]);return u}function mj(e,n,i){const{offset:l,type:o,source:u,end:d}=e;let m,g;const p=(w,N,z)=>i(l+w,N,z);switch(o){case"scalar":m=ze.PLAIN,g=pj(u,p);break;case"single-quoted-scalar":m=ze.QUOTE_SINGLE,g=gj(u,p);break;case"double-quoted-scalar":m=ze.QUOTE_DOUBLE,g=yj(u,p);break;default:return i(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${o}`),{value:"",type:null,comment:"",range:[l,l+u.length,l+u.length]}}const b=l+u.length,v=ar(d,b,n,i);return{value:g,type:m,comment:v.comment,range:[l,b,v.offset]}}function pj(e,n){let i="";switch(e[0]){case" ":i="a tab character";break;case",":i="flow indicator character ,";break;case"%":i="directive indicator character %";break;case"|":case">":{i=`block scalar indicator ${e[0]}`;break}case"@":case"`":{i=`reserved character ${e[0]}`;break}}return i&&n(0,"BAD_SCALAR_START",`Plain value cannot start with ${i}`),J0(e)}function gj(e,n){return(e[e.length-1]!=="'"||e.length===1)&&n(e.length,"MISSING_CHAR","Missing closing 'quote"),J0(e.slice(1,-1)).replace(/''/g,"'")}function J0(e){let n,i;try{n=new RegExp(`(.*?)(?<![ ])[ ]*\r?
93
+ `,"sy"),i=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
94
+ `,"sy")}catch{n=/(.*?)[ \t]*\r?\n/sy,i=/[ \t]*(.*?)[ \t]*\r?\n/sy}let l=n.exec(e);if(!l)return e;let o=l[1],u=" ",d=n.lastIndex;for(i.lastIndex=d;l=i.exec(e);)l[1]===""?u===`
95
+ `?o+=u:u=`
96
+ `:(o+=u+l[1],u=" "),d=i.lastIndex;const m=/[ \t]*(.*)/sy;return m.lastIndex=d,l=m.exec(e),o+u+(l?.[1]??"")}function yj(e,n){let i="";for(let l=1;l<e.length-1;++l){const o=e[l];if(!(o==="\r"&&e[l+1]===`
97
+ `))if(o===`
98
+ `){const{fold:u,offset:d}=vj(e,l);i+=u,l=d}else if(o==="\\"){let u=e[++l];const d=bj[u];if(d)i+=d;else if(u===`
99
+ `)for(u=e[l+1];u===" "||u===" ";)u=e[++l+1];else if(u==="\r"&&e[l+1]===`
100
+ `)for(u=e[++l+1];u===" "||u===" ";)u=e[++l+1];else if(u==="x"||u==="u"||u==="U"){const m={x:2,u:4,U:8}[u];i+=xj(e,l+1,m,n),l+=m}else{const m=e.substr(l-1,2);n(l-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${m}`),i+=m}}else if(o===" "||o===" "){const u=l;let d=e[l+1];for(;d===" "||d===" ";)d=e[++l+1];d!==`
101
+ `&&!(d==="\r"&&e[l+2]===`
102
+ `)&&(i+=l>u?e.slice(u,l+1):o)}else i+=o}return(e[e.length-1]!=='"'||e.length===1)&&n(e.length,"MISSING_CHAR",'Missing closing "quote'),i}function vj(e,n){let i="",l=e[n+1];for(;(l===" "||l===" "||l===`
103
+ `||l==="\r")&&!(l==="\r"&&e[n+2]!==`
104
+ `);)l===`
105
+ `&&(i+=`
106
+ `),n+=1,l=e[n+1];return i||(i=" "),{fold:i,offset:n}}const bj={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
107
+ `,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function xj(e,n,i,l){const o=e.substr(n,i),d=o.length===i&&/^[0-9a-fA-F]+$/.test(o)?parseInt(o,16):NaN;if(isNaN(d)){const m=e.substr(n-2,i+2);return l(n-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${m}`),m}return String.fromCodePoint(d)}function F0(e,n,i,l){const{value:o,type:u,comment:d,range:m}=n.type==="block-scalar"?dj(e,n,l):mj(n,e.options.strict,l),g=i?e.directives.tagName(i.source,v=>l(i,"TAG_RESOLVE_FAILED",v)):null;let p;e.options.stringKeys&&e.atKey?p=e.schema[is]:g?p=Sj(e.schema,o,g,i,l):n.type==="scalar"?p=wj(e,o,n,l):p=e.schema[is];let b;try{const v=p.resolve(o,w=>l(i??n,"TAG_RESOLVE_FAILED",w),e.options);b=lt(v)?v:new ze(v)}catch(v){const w=v instanceof Error?v.message:String(v);l(i??n,"TAG_RESOLVE_FAILED",w),b=new ze(o)}return b.range=m,b.source=o,u&&(b.type=u),g&&(b.tag=g),p.format&&(b.format=p.format),d&&(b.comment=d),b}function Sj(e,n,i,l,o){if(i==="!")return e[is];const u=[];for(const m of e.tags)if(!m.collection&&m.tag===i)if(m.default&&m.test)u.push(m);else return m;for(const m of u)if(m.test?.test(n))return m;const d=e.knownTags[i];return d&&!d.collection?(e.tags.push(Object.assign({},d,{default:!1,test:void 0})),d):(o(l,"TAG_RESOLVE_FAILED",`Unresolved tag: ${i}`,i!=="tag:yaml.org,2002:str"),e[is])}function wj({atKey:e,directives:n,schema:i},l,o,u){const d=i.tags.find(m=>(m.default===!0||e&&m.default==="key")&&m.test?.test(l))||i[is];if(i.compat){const m=i.compat.find(g=>g.default&&g.test?.test(l))??i[is];if(d.tag!==m.tag){const g=n.tagString(d.tag),p=n.tagString(m.tag),b=`Value may be parsed as either ${g} or ${p}`;u(o,"TAG_RESOLVE_FAILED",b,!0)}}return d}function jj(e,n,i){if(n){i??(i=n.length);for(let l=i-1;l>=0;--l){let o=n[l];switch(o.type){case"space":case"comment":case"newline":e-=o.source.length;continue}for(o=n[++l];o?.type==="space";)e+=o.source.length,o=n[++l];break}}return e}const Nj={composeNode:W0,composeEmptyNode:If};function W0(e,n,i,l){const o=e.atKey,{spaceBefore:u,comment:d,anchor:m,tag:g}=i;let p,b=!0;switch(n.type){case"alias":p=kj(e,n,l),(m||g)&&l(n,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":p=F0(e,n,g,l),m&&(p.anchor=m.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":p=uj(Nj,e,n,i,l),m&&(p.anchor=m.source.substring(1));break;default:{const v=n.type==="error"?n.message:`Unsupported token (type: ${n.type})`;l(n,"UNEXPECTED_TOKEN",v),p=If(e,n.offset,void 0,null,i,l),b=!1}}return m&&p.anchor===""&&l(m,"BAD_ALIAS","Anchor cannot be an empty string"),o&&e.options.stringKeys&&(!lt(p)||typeof p.value!="string"||p.tag&&p.tag!=="tag:yaml.org,2002:str")&&l(g??n,"NON_STRING_KEY","With stringKeys, all keys must be strings"),u&&(p.spaceBefore=!0),d&&(n.type==="scalar"&&n.source===""?p.comment=d:p.commentBefore=d),e.options.keepSourceTokens&&b&&(p.srcToken=n),p}function If(e,n,i,l,{spaceBefore:o,comment:u,anchor:d,tag:m,end:g},p){const b={type:"scalar",offset:jj(n,i,l),indent:-1,source:""},v=F0(e,b,m,p);return d&&(v.anchor=d.source.substring(1),v.anchor===""&&p(d,"BAD_ALIAS","Anchor cannot be an empty string")),o&&(v.spaceBefore=!0),u&&(v.comment=u,v.range[2]=g),v}function kj({options:e},{offset:n,source:i,end:l},o){const u=new Cf(i.substring(1));u.source===""&&o(n,"BAD_ALIAS","Alias cannot be an empty string"),u.source.endsWith(":")&&o(n+i.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const d=n+i.length,m=ar(l,d,e.strict,o);return u.range=[n,d,m.offset],m.comment&&(u.comment=m.comment),u}function zj(e,n,{offset:i,start:l,value:o,end:u},d){const m=Object.assign({_directives:n},e),g=new mc(void 0,m),p={atKey:!1,atRoot:!0,directives:g.directives,options:g.options,schema:g.schema},b=Ha(l,{indicator:"doc-start",next:o??u?.[0],offset:i,onError:d,parentIndent:0,startOnNewline:!0});b.found&&(g.directives.docStart=!0,o&&(o.type==="block-map"||o.type==="block-seq")&&!b.hasNewline&&d(b.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),g.contents=o?W0(p,o,b,d):If(p,b.end,l,null,b,d);const v=g.contents.range[2],w=ar(u,v,!1,d);return w.comment&&(g.comment=w.comment),g.range=[i,v,w.offset],g}function Gl(e){if(typeof e=="number")return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];const{offset:n,source:i}=e;return[n,n+(typeof i=="string"?i.length:1)]}function yy(e){let n="",i=!1,l=!1;for(let o=0;o<e.length;++o){const u=e[o];switch(u[0]){case"#":n+=(n===""?"":l?`
108
+
109
+ `:`
110
+ `)+(u.substring(1)||" "),i=!0,l=!1;break;case"%":e[o+1]?.[0]!=="#"&&(o+=1),i=!1;break;default:i||(l=!0),i=!1}}return{comment:n,afterEmptyLine:l}}class _j{constructor(n={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(i,l,o,u)=>{const d=Gl(i);u?this.warnings.push(new lj(d,l,o)):this.errors.push(new zo(d,l,o))},this.directives=new an({version:n.version||"1.2"}),this.options=n}decorate(n,i){const{comment:l,afterEmptyLine:o}=yy(this.prelude);if(l){const u=n.contents;if(i)n.comment=n.comment?`${n.comment}
111
+ ${l}`:l;else if(o||n.directives.docStart||!u)n.commentBefore=l;else if(_t(u)&&!u.flow&&u.items.length>0){let d=u.items[0];Et(d)&&(d=d.key);const m=d.commentBefore;d.commentBefore=m?`${l}
112
+ ${m}`:l}else{const d=u.commentBefore;u.commentBefore=d?`${l}
113
+ ${d}`:l}}i?(Array.prototype.push.apply(n.errors,this.errors),Array.prototype.push.apply(n.warnings,this.warnings)):(n.errors=this.errors,n.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:yy(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(n,i=!1,l=-1){for(const o of n)yield*this.next(o);yield*this.end(i,l)}*next(n){switch(n.type){case"directive":this.directives.add(n.source,(i,l,o)=>{const u=Gl(n);u[0]+=i,this.onError(u,"BAD_DIRECTIVE",l,o)}),this.prelude.push(n.source),this.atDirectives=!0;break;case"document":{const i=zj(this.options,this.directives,n,this.onError);this.atDirectives&&!i.directives.docStart&&this.onError(n,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(i,!1),this.doc&&(yield this.doc),this.doc=i,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(n.source);break;case"error":{const i=n.source?`${n.message}: ${JSON.stringify(n.source)}`:n.message,l=new zo(Gl(n),"UNEXPECTED_TOKEN",i);this.atDirectives||!this.doc?this.errors.push(l):this.doc.errors.push(l);break}case"doc-end":{if(!this.doc){const l="Unexpected doc-end without preceding document";this.errors.push(new zo(Gl(n),"UNEXPECTED_TOKEN",l));break}this.doc.directives.docEnd=!0;const i=ar(n.end,n.offset+n.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),i.comment){const l=this.doc.comment;this.doc.comment=l?`${l}
114
+ ${i.comment}`:i.comment}this.doc.range[2]=i.offset;break}default:this.errors.push(new zo(Gl(n),"UNEXPECTED_TOKEN",`Unsupported token ${n.type}`))}}*end(n=!1,i=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(n){const l=Object.assign({_directives:this.directives},this.options),o=new mc(void 0,l);this.atDirectives&&this.onError(i,"MISSING_CHAR","Missing directives-end indicator line"),o.range=[0,i,i],this.decorate(o,!1),yield o}}}const ev="\uFEFF",tv="",nv="",ff="";function Cj(e){switch(e){case ev:return"byte-order-mark";case tv:return"doc-mode";case nv:return"flow-error-end";case ff:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
115
+ `:case`\r
116
+ `:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}function Gn(e){switch(e){case void 0:case" ":case`
117
+ `:case"\r":case" ":return!0;default:return!1}}const vy=new Set("0123456789ABCDEFabcdef"),Ej=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),_o=new Set(",[]{}"),Aj=new Set(` ,[]{}
118
+ \r `),Yd=e=>!e||Aj.has(e);class Tj{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(n,i=!1){if(n){if(typeof n!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+n:n,this.lineEndPos=null}this.atEnd=!i;let l=this.next??"stream";for(;l&&(i||this.hasChars(1));)l=yield*this.parseNext(l)}atLineEnd(){let n=this.pos,i=this.buffer[n];for(;i===" "||i===" ";)i=this.buffer[++n];return!i||i==="#"||i===`
119
+ `?!0:i==="\r"?this.buffer[n+1]===`
120
+ `:!1}charAt(n){return this.buffer[this.pos+n]}continueScalar(n){let i=this.buffer[n];if(this.indentNext>0){let l=0;for(;i===" ";)i=this.buffer[++l+n];if(i==="\r"){const o=this.buffer[l+n+1];if(o===`
121
+ `||!o&&!this.atEnd)return n+l+1}return i===`
122
+ `||l>=this.indentNext||!i&&!this.atEnd?n+l:-1}if(i==="-"||i==="."){const l=this.buffer.substr(n,3);if((l==="---"||l==="...")&&Gn(this.buffer[n+3]))return-1}return n}getLine(){let n=this.lineEndPos;return(typeof n!="number"||n!==-1&&n<this.pos)&&(n=this.buffer.indexOf(`
123
+ `,this.pos),this.lineEndPos=n),n===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[n-1]==="\r"&&(n-=1),this.buffer.substring(this.pos,n))}hasChars(n){return this.pos+n<=this.buffer.length}setNext(n){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=n,null}peek(n){return this.buffer.substr(this.pos,n)}*parseNext(n){switch(n){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let n=this.getLine();if(n===null)return this.setNext("stream");if(n[0]===ev&&(yield*this.pushCount(1),n=n.substring(1)),n[0]==="%"){let i=n.length,l=n.indexOf("#");for(;l!==-1;){const u=n[l-1];if(u===" "||u===" "){i=l-1;break}else l=n.indexOf("#",l+1)}for(;;){const u=n[i-1];if(u===" "||u===" ")i-=1;else break}const o=(yield*this.pushCount(i))+(yield*this.pushSpaces(!0));return yield*this.pushCount(n.length-o),this.pushNewline(),"stream"}if(this.atLineEnd()){const i=yield*this.pushSpaces(!0);return yield*this.pushCount(n.length-i),yield*this.pushNewline(),"stream"}return yield tv,yield*this.parseLineStart()}*parseLineStart(){const n=this.charAt(0);if(!n&&!this.atEnd)return this.setNext("line-start");if(n==="-"||n==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const i=this.peek(3);if((i==="---"||i==="...")&&Gn(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,i==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!Gn(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[n,i]=this.peek(2);if(!i&&!this.atEnd)return this.setNext("block-start");if((n==="-"||n==="?"||n===":")&&Gn(i)){const l=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=l,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const n=this.getLine();if(n===null)return this.setNext("doc");let i=yield*this.pushIndicators();switch(n[i]){case"#":yield*this.pushCount(n.length-i);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(Yd),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return i+=yield*this.parseBlockScalarHeader(),i+=yield*this.pushSpaces(!0),yield*this.pushCount(n.length-i),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let n,i,l=-1;do n=yield*this.pushNewline(),n>0?(i=yield*this.pushSpaces(!1),this.indentValue=l=i):i=0,i+=yield*this.pushSpaces(!0);while(n+i>0);const o=this.getLine();if(o===null)return this.setNext("flow");if((l!==-1&&l<this.indentNext&&o[0]!=="#"||l===0&&(o.startsWith("---")||o.startsWith("..."))&&Gn(o[3]))&&!(l===this.indentNext-1&&this.flowLevel===1&&(o[0]==="]"||o[0]==="}")))return this.flowLevel=0,yield nv,yield*this.parseLineStart();let u=0;for(;o[u]===",";)u+=yield*this.pushCount(1),u+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(u+=yield*this.pushIndicators(),o[u]){case void 0:return"flow";case"#":return yield*this.pushCount(o.length-u),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(Yd),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const d=this.charAt(1);if(this.flowKey||Gn(d)||d===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const n=this.charAt(0);let i=this.buffer.indexOf(n,this.pos+1);if(n==="'")for(;i!==-1&&this.buffer[i+1]==="'";)i=this.buffer.indexOf("'",i+2);else for(;i!==-1;){let u=0;for(;this.buffer[i-1-u]==="\\";)u+=1;if(u%2===0)break;i=this.buffer.indexOf('"',i+1)}const l=this.buffer.substring(0,i);let o=l.indexOf(`
124
+ `,this.pos);if(o!==-1){for(;o!==-1;){const u=this.continueScalar(o+1);if(u===-1)break;o=l.indexOf(`
125
+ `,u)}o!==-1&&(i=o-(l[o-1]==="\r"?2:1))}if(i===-1){if(!this.atEnd)return this.setNext("quoted-scalar");i=this.buffer.length}return yield*this.pushToIndex(i+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let n=this.pos;for(;;){const i=this.buffer[++n];if(i==="+")this.blockScalarKeep=!0;else if(i>"0"&&i<="9")this.blockScalarIndent=Number(i)-1;else if(i!=="-")break}return yield*this.pushUntil(i=>Gn(i)||i==="#")}*parseBlockScalar(){let n=this.pos-1,i=0,l;e:for(let u=this.pos;l=this.buffer[u];++u)switch(l){case" ":i+=1;break;case`
126
+ `:n=u,i=0;break;case"\r":{const d=this.buffer[u+1];if(!d&&!this.atEnd)return this.setNext("block-scalar");if(d===`
127
+ `)break}default:break e}if(!l&&!this.atEnd)return this.setNext("block-scalar");if(i>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=i:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{const u=this.continueScalar(n+1);if(u===-1)break;n=this.buffer.indexOf(`
128
+ `,u)}while(n!==-1);if(n===-1){if(!this.atEnd)return this.setNext("block-scalar");n=this.buffer.length}}let o=n+1;for(l=this.buffer[o];l===" ";)l=this.buffer[++o];if(l===" "){for(;l===" "||l===" "||l==="\r"||l===`
129
+ `;)l=this.buffer[++o];n=o-1}else if(!this.blockScalarKeep)do{let u=n-1,d=this.buffer[u];d==="\r"&&(d=this.buffer[--u]);const m=u;for(;d===" ";)d=this.buffer[--u];if(d===`
130
+ `&&u>=this.pos&&u+1+i>m)n=u;else break}while(!0);return yield ff,yield*this.pushToIndex(n+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const n=this.flowLevel>0;let i=this.pos-1,l=this.pos-1,o;for(;o=this.buffer[++l];)if(o===":"){const u=this.buffer[l+1];if(Gn(u)||n&&_o.has(u))break;i=l}else if(Gn(o)){let u=this.buffer[l+1];if(o==="\r"&&(u===`
131
+ `?(l+=1,o=`
132
+ `,u=this.buffer[l+1]):i=l),u==="#"||n&&_o.has(u))break;if(o===`
133
+ `){const d=this.continueScalar(l+1);if(d===-1)break;l=Math.max(l,d-2)}}else{if(n&&_o.has(o))break;i=l}return!o&&!this.atEnd?this.setNext("plain-scalar"):(yield ff,yield*this.pushToIndex(i+1,!0),n?"flow":"doc")}*pushCount(n){return n>0?(yield this.buffer.substr(this.pos,n),this.pos+=n,n):0}*pushToIndex(n,i){const l=this.buffer.slice(this.pos,n);return l?(yield l,this.pos+=l.length,l.length):(i&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Yd))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const n=this.flowLevel>0,i=this.charAt(1);if(Gn(i)||n&&_o.has(i))return n?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let n=this.pos+2,i=this.buffer[n];for(;!Gn(i)&&i!==">";)i=this.buffer[++n];return yield*this.pushToIndex(i===">"?n+1:n,!1)}else{let n=this.pos+1,i=this.buffer[n];for(;i;)if(Ej.has(i))i=this.buffer[++n];else if(i==="%"&&vy.has(this.buffer[n+1])&&vy.has(this.buffer[n+2]))i=this.buffer[n+=3];else break;return yield*this.pushToIndex(n,!1)}}*pushNewline(){const n=this.buffer[this.pos];return n===`
134
+ `?yield*this.pushCount(1):n==="\r"&&this.charAt(1)===`
135
+ `?yield*this.pushCount(2):0}*pushSpaces(n){let i=this.pos-1,l;do l=this.buffer[++i];while(l===" "||n&&l===" ");const o=i-this.pos;return o>0&&(yield this.buffer.substr(this.pos,o),this.pos=i),o}*pushUntil(n){let i=this.pos,l=this.buffer[i];for(;!n(l);)l=this.buffer[++i];return yield*this.pushToIndex(i,!1)}}class Oj{constructor(){this.lineStarts=[],this.addNewLine=n=>this.lineStarts.push(n),this.linePos=n=>{let i=0,l=this.lineStarts.length;for(;i<l;){const u=i+l>>1;this.lineStarts[u]<n?i=u+1:l=u}if(this.lineStarts[i]===n)return{line:i+1,col:1};if(i===0)return{line:0,col:n};const o=this.lineStarts[i-1];return{line:i,col:n-o+1}}}}function ii(e,n){for(let i=0;i<e.length;++i)if(e[i].type===n)return!0;return!1}function by(e){for(let n=0;n<e.length;++n)switch(e[n].type){case"space":case"comment":case"newline":break;default:return n}return-1}function sv(e){switch(e?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Co(e){switch(e.type){case"document":return e.start;case"block-map":{const n=e.items[e.items.length-1];return n.sep??n.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function Ca(e){if(e.length===0)return[];let n=e.length;e:for(;--n>=0;)switch(e[n].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;e[++n]?.type==="space";);return e.splice(n,e.length)}function xy(e){if(e.start.type==="flow-seq-start")for(const n of e.items)n.sep&&!n.value&&!ii(n.start,"explicit-key-ind")&&!ii(n.sep,"map-value-ind")&&(n.key&&(n.value=n.key),delete n.key,sv(n.value)?n.value.end?Array.prototype.push.apply(n.value.end,n.sep):n.value.end=n.sep:Array.prototype.push.apply(n.start,n.sep),delete n.sep)}class Dj{constructor(n){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new Tj,this.onNewLine=n}*parse(n,i=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const l of this.lexer.lex(n,i))yield*this.next(l);i||(yield*this.end())}*next(n){if(this.source=n,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=n.length;return}const i=Cj(n);if(i)if(i==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=i,yield*this.step(),i){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+n.length);break;case"space":this.atNewLine&&n[0]===" "&&(this.indent+=n.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=n.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=n.length}else{const l=`Not a YAML token: ${n}`;yield*this.pop({type:"error",offset:this.offset,message:l,source:n}),this.offset+=n.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const n=this.peek(1);if(this.type==="doc-end"&&n?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!n)return yield*this.stream();switch(n.type){case"document":return yield*this.document(n);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(n);case"block-scalar":return yield*this.blockScalar(n);case"block-map":return yield*this.blockMap(n);case"block-seq":return yield*this.blockSequence(n);case"flow-collection":return yield*this.flowCollection(n);case"doc-end":return yield*this.documentEnd(n)}yield*this.pop()}peek(n){return this.stack[this.stack.length-n]}*pop(n){const i=n??this.stack.pop();if(!i)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield i;else{const l=this.peek(1);switch(i.type==="block-scalar"?i.indent="indent"in l?l.indent:0:i.type==="flow-collection"&&l.type==="document"&&(i.indent=0),i.type==="flow-collection"&&xy(i),l.type){case"document":l.value=i;break;case"block-scalar":l.props.push(i);break;case"block-map":{const o=l.items[l.items.length-1];if(o.value){l.items.push({start:[],key:i,sep:[]}),this.onKeyLine=!0;return}else if(o.sep)o.value=i;else{Object.assign(o,{key:i,sep:[]}),this.onKeyLine=!o.explicitKey;return}break}case"block-seq":{const o=l.items[l.items.length-1];o.value?l.items.push({start:[],value:i}):o.value=i;break}case"flow-collection":{const o=l.items[l.items.length-1];!o||o.value?l.items.push({start:[],key:i,sep:[]}):o.sep?o.value=i:Object.assign(o,{key:i,sep:[]});return}default:yield*this.pop(),yield*this.pop(i)}if((l.type==="document"||l.type==="block-map"||l.type==="block-seq")&&(i.type==="block-map"||i.type==="block-seq")){const o=i.items[i.items.length-1];o&&!o.sep&&!o.value&&o.start.length>0&&by(o.start)===-1&&(i.indent===0||o.start.every(u=>u.type!=="comment"||u.indent<i.indent))&&(l.type==="document"?l.end=o.start:l.items.push({start:o.start}),i.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{const n={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&n.start.push(this.sourceToken),this.stack.push(n);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(n){if(n.value)return yield*this.lineEnd(n);switch(this.type){case"doc-start":{by(n.start)!==-1?(yield*this.pop(),yield*this.step()):n.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":n.start.push(this.sourceToken);return}const i=this.startBlockValue(n);i?this.stack.push(i):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(n){if(this.type==="map-value-ind"){const i=Co(this.peek(2)),l=Ca(i);let o;n.end?(o=n.end,o.push(this.sourceToken),delete n.end):o=[this.sourceToken];const u={type:"block-map",offset:n.offset,indent:n.indent,items:[{start:l,key:n,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=u}else yield*this.lineEnd(n)}*blockScalar(n){switch(this.type){case"space":case"comment":case"newline":n.props.push(this.sourceToken);return;case"scalar":if(n.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let i=this.source.indexOf(`
136
+ `)+1;for(;i!==0;)this.onNewLine(this.offset+i),i=this.source.indexOf(`
137
+ `,i)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(n){const i=n.items[n.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,i.value){const l="end"in i.value?i.value.end:void 0;(Array.isArray(l)?l[l.length-1]:void 0)?.type==="comment"?l?.push(this.sourceToken):n.items.push({start:[this.sourceToken]})}else i.sep?i.sep.push(this.sourceToken):i.start.push(this.sourceToken);return;case"space":case"comment":if(i.value)n.items.push({start:[this.sourceToken]});else if(i.sep)i.sep.push(this.sourceToken);else{if(this.atIndentedComment(i.start,n.indent)){const o=n.items[n.items.length-2]?.value?.end;if(Array.isArray(o)){Array.prototype.push.apply(o,i.start),o.push(this.sourceToken),n.items.pop();return}}i.start.push(this.sourceToken)}return}if(this.indent>=n.indent){const l=!this.onKeyLine&&this.indent===n.indent,o=l&&(i.sep||i.explicitKey)&&this.type!=="seq-item-ind";let u=[];if(o&&i.sep&&!i.value){const d=[];for(let m=0;m<i.sep.length;++m){const g=i.sep[m];switch(g.type){case"newline":d.push(m);break;case"space":break;case"comment":g.indent>n.indent&&(d.length=0);break;default:d.length=0}}d.length>=2&&(u=i.sep.splice(d[1]))}switch(this.type){case"anchor":case"tag":o||i.value?(u.push(this.sourceToken),n.items.push({start:u}),this.onKeyLine=!0):i.sep?i.sep.push(this.sourceToken):i.start.push(this.sourceToken);return;case"explicit-key-ind":!i.sep&&!i.explicitKey?(i.start.push(this.sourceToken),i.explicitKey=!0):o||i.value?(u.push(this.sourceToken),n.items.push({start:u,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(i.explicitKey)if(i.sep)if(i.value)n.items.push({start:[],key:null,sep:[this.sourceToken]});else if(ii(i.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:u,key:null,sep:[this.sourceToken]}]});else if(sv(i.key)&&!ii(i.sep,"newline")){const d=Ca(i.start),m=i.key,g=i.sep;g.push(this.sourceToken),delete i.key,delete i.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:d,key:m,sep:g}]})}else u.length>0?i.sep=i.sep.concat(u,this.sourceToken):i.sep.push(this.sourceToken);else if(ii(i.start,"newline"))Object.assign(i,{key:null,sep:[this.sourceToken]});else{const d=Ca(i.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:d,key:null,sep:[this.sourceToken]}]})}else i.sep?i.value||o?n.items.push({start:u,key:null,sep:[this.sourceToken]}):ii(i.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):i.sep.push(this.sourceToken):Object.assign(i,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const d=this.flowScalar(this.type);o||i.value?(n.items.push({start:u,key:d,sep:[]}),this.onKeyLine=!0):i.sep?this.stack.push(d):(Object.assign(i,{key:d,sep:[]}),this.onKeyLine=!0);return}default:{const d=this.startBlockValue(n);if(d){if(d.type==="block-seq"){if(!i.explicitKey&&i.sep&&!ii(i.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else l&&n.items.push({start:u});this.stack.push(d);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(n){const i=n.items[n.items.length-1];switch(this.type){case"newline":if(i.value){const l="end"in i.value?i.value.end:void 0;(Array.isArray(l)?l[l.length-1]:void 0)?.type==="comment"?l?.push(this.sourceToken):n.items.push({start:[this.sourceToken]})}else i.start.push(this.sourceToken);return;case"space":case"comment":if(i.value)n.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(i.start,n.indent)){const o=n.items[n.items.length-2]?.value?.end;if(Array.isArray(o)){Array.prototype.push.apply(o,i.start),o.push(this.sourceToken),n.items.pop();return}}i.start.push(this.sourceToken)}return;case"anchor":case"tag":if(i.value||this.indent<=n.indent)break;i.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==n.indent)break;i.value||ii(i.start,"seq-item-ind")?n.items.push({start:[this.sourceToken]}):i.start.push(this.sourceToken);return}if(this.indent>n.indent){const l=this.startBlockValue(n);if(l){this.stack.push(l);return}}yield*this.pop(),yield*this.step()}*flowCollection(n){const i=n.items[n.items.length-1];if(this.type==="flow-error-end"){let l;do yield*this.pop(),l=this.peek(1);while(l?.type==="flow-collection")}else if(n.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!i||i.sep?n.items.push({start:[this.sourceToken]}):i.start.push(this.sourceToken);return;case"map-value-ind":!i||i.value?n.items.push({start:[],key:null,sep:[this.sourceToken]}):i.sep?i.sep.push(this.sourceToken):Object.assign(i,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!i||i.value?n.items.push({start:[this.sourceToken]}):i.sep?i.sep.push(this.sourceToken):i.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const o=this.flowScalar(this.type);!i||i.value?n.items.push({start:[],key:o,sep:[]}):i.sep?this.stack.push(o):Object.assign(i,{key:o,sep:[]});return}case"flow-map-end":case"flow-seq-end":n.end.push(this.sourceToken);return}const l=this.startBlockValue(n);l?this.stack.push(l):(yield*this.pop(),yield*this.step())}else{const l=this.peek(2);if(l.type==="block-map"&&(this.type==="map-value-ind"&&l.indent===n.indent||this.type==="newline"&&!l.items[l.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&l.type!=="flow-collection"){const o=Co(l),u=Ca(o);xy(n);const d=n.end.splice(1,n.end.length);d.push(this.sourceToken);const m={type:"block-map",offset:n.offset,indent:n.indent,items:[{start:u,key:n,sep:d}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=m}else yield*this.lineEnd(n)}}flowScalar(n){if(this.onNewLine){let i=this.source.indexOf(`
138
+ `)+1;for(;i!==0;)this.onNewLine(this.offset+i),i=this.source.indexOf(`
139
+ `,i)+1}return{type:n,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(n){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const i=Co(n),l=Ca(i);return l.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:l,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const i=Co(n),l=Ca(i);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:l,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(n,i){return this.type!=="comment"||this.indent<=i?!1:n.every(l=>l.type==="newline"||l.type==="space")}*documentEnd(n){this.type!=="doc-mode"&&(n.end?n.end.push(this.sourceToken):n.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(n){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:n.end?n.end.push(this.sourceToken):n.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function Rj(e){const n=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||n&&new Oj||null,prettyErrors:n}}function Lj(e,n={}){const{lineCounter:i,prettyErrors:l}=Rj(n),o=new Dj(i?.addNewLine),u=new _j(n),d=Array.from(u.compose(o.parse(e)));if(l&&i)for(const m of d)m.errors.forEach(py(e,i)),m.warnings.forEach(py(e,i));return d.length>0?d:Object.assign([],{empty:!0},u.streamInfo())}function ri(e,n,{checkForDefaultPrevented:i=!0}={}){return function(o){if(e?.(o),i===!1||!o.defaultPrevented)return n?.(o)}}function Sy(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}function qf(...e){return n=>{let i=!1;const l=e.map(o=>{const u=Sy(o,n);return!i&&typeof u=="function"&&(i=!0),u});if(i)return()=>{for(let o=0;o<l.length;o++){const u=l[o];typeof u=="function"?u():Sy(e[o],null)}}}}function Ii(...e){return x.useCallback(qf(...e),e)}function Mj(e,n){const i=x.createContext(n),l=u=>{const{children:d,...m}=u,g=x.useMemo(()=>m,Object.values(m));return c.jsx(i.Provider,{value:g,children:d})};l.displayName=e+"Provider";function o(u){const d=x.useContext(i);if(d)return d;if(n!==void 0)return n;throw new Error(`\`${u}\` must be used within \`${e}\``)}return[l,o]}function $j(e,n=[]){let i=[];function l(u,d){const m=x.createContext(d),g=i.length;i=[...i,d];const p=v=>{const{scope:w,children:N,...z}=v,j=w?.[e]?.[g]||m,k=x.useMemo(()=>z,Object.values(z));return c.jsx(j.Provider,{value:k,children:N})};p.displayName=u+"Provider";function b(v,w){const N=w?.[e]?.[g]||m,z=x.useContext(N);if(z)return z;if(d!==void 0)return d;throw new Error(`\`${v}\` must be used within \`${u}\``)}return[p,b]}const o=()=>{const u=i.map(d=>x.createContext(d));return function(m){const g=m?.[e]||u;return x.useMemo(()=>({[`__scope${e}`]:{...m,[e]:g}}),[m,g])}};return o.scopeName=e,[l,Uj(o,...n)]}function Uj(...e){const n=e[0];if(e.length===1)return n;const i=()=>{const l=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(u){const d=l.reduce((m,{useScope:g,scopeName:p})=>{const v=g(u)[`__scope${p}`];return{...m,...v}},{});return x.useMemo(()=>({[`__scope${n.scopeName}`]:d}),[d])}};return i.scopeName=n.scopeName,i}var Fl=globalThis?.document?x.useLayoutEffect:()=>{},Bj=kf[" useId ".trim().toString()]||(()=>{}),Ij=0;function Vd(e){const[n,i]=x.useState(Bj());return Fl(()=>{i(l=>l??String(Ij++))},[e]),e||(n?`radix-${n}`:"")}var qj=kf[" useInsertionEffect ".trim().toString()]||Fl;function Zj({prop:e,defaultProp:n,onChange:i=()=>{},caller:l}){const[o,u,d]=Hj({defaultProp:n,onChange:i}),m=e!==void 0,g=m?e:o;{const b=x.useRef(e!==void 0);x.useEffect(()=>{const v=b.current;v!==m&&console.warn(`${l} is changing from ${v?"controlled":"uncontrolled"} to ${m?"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.`),b.current=m},[m,l])}const p=x.useCallback(b=>{if(m){const v=Gj(b)?b(e):b;v!==e&&d.current?.(v)}else u(b)},[m,e,u,d]);return[g,p]}function Hj({defaultProp:e,onChange:n}){const[i,l]=x.useState(e),o=x.useRef(i),u=x.useRef(n);return qj(()=>{u.current=n},[n]),x.useEffect(()=>{o.current!==i&&(u.current?.(i),o.current=i)},[i,o]),[i,l,u]}function Gj(e){return typeof e=="function"}var iv=S0();const Kj=x0(iv);function av(e){const n=Yj(e),i=x.forwardRef((l,o)=>{const{children:u,...d}=l,m=x.Children.toArray(u),g=m.find(Pj);if(g){const p=g.props.children,b=m.map(v=>v===g?x.Children.count(p)>1?x.Children.only(null):x.isValidElement(p)?p.props.children:null:v);return c.jsx(n,{...d,ref:o,children:x.isValidElement(p)?x.cloneElement(p,void 0,b):null})}return c.jsx(n,{...d,ref:o,children:u})});return i.displayName=`${e}.Slot`,i}function Yj(e){const n=x.forwardRef((i,l)=>{const{children:o,...u}=i;if(x.isValidElement(o)){const d=Xj(o),m=Qj(u,o.props);return o.type!==x.Fragment&&(m.ref=l?qf(l,d):d),x.cloneElement(o,m)}return x.Children.count(o)>1?x.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var Vj=Symbol("radix.slottable");function Pj(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Vj}function Qj(e,n){const i={...n};for(const l in n){const o=e[l],u=n[l];/^on[A-Z]/.test(l)?o&&u?i[l]=(...m)=>{const g=u(...m);return o(...m),g}:o&&(i[l]=o):l==="style"?i[l]={...o,...u}:l==="className"&&(i[l]=[o,u].filter(Boolean).join(" "))}return{...e,...i}}function Xj(e){let n=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,i=n&&"isReactWarning"in n&&n.isReactWarning;return i?e.ref:(n=Object.getOwnPropertyDescriptor(e,"ref")?.get,i=n&&"isReactWarning"in n&&n.isReactWarning,i?e.props.ref:e.props.ref||e.ref)}var Jj=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],As=Jj.reduce((e,n)=>{const i=av(`Primitive.${n}`),l=x.forwardRef((o,u)=>{const{asChild:d,...m}=o,g=d?i:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(g,{...m,ref:u})});return l.displayName=`Primitive.${n}`,{...e,[n]:l}},{});function Fj(e,n){e&&iv.flushSync(()=>e.dispatchEvent(n))}function Wl(e){const n=x.useRef(e);return x.useEffect(()=>{n.current=e}),x.useMemo(()=>(...i)=>n.current?.(...i),[])}function Wj(e,n=globalThis?.document){const i=Wl(e);x.useEffect(()=>{const l=o=>{o.key==="Escape"&&i(o)};return n.addEventListener("keydown",l,{capture:!0}),()=>n.removeEventListener("keydown",l,{capture:!0})},[i,n])}var eN="DismissableLayer",hf="dismissableLayer.update",tN="dismissableLayer.pointerDownOutside",nN="dismissableLayer.focusOutside",wy,lv=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),rv=x.forwardRef((e,n)=>{const{disableOutsidePointerEvents:i=!1,onEscapeKeyDown:l,onPointerDownOutside:o,onFocusOutside:u,onInteractOutside:d,onDismiss:m,...g}=e,p=x.useContext(lv),[b,v]=x.useState(null),w=b?.ownerDocument??globalThis?.document,[,N]=x.useState({}),z=Ii(n,V=>v(V)),j=Array.from(p.layers),[k]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),A=j.indexOf(k),E=b?j.indexOf(b):-1,O=p.layersWithOutsidePointerEventsDisabled.size>0,D=E>=A,M=aN(V=>{const L=V.target,Q=[...p.branches].some(Se=>Se.contains(L));!D||Q||(o?.(V),d?.(V),V.defaultPrevented||m?.())},w),H=lN(V=>{const L=V.target;[...p.branches].some(Se=>Se.contains(L))||(u?.(V),d?.(V),V.defaultPrevented||m?.())},w);return Wj(V=>{E===p.layers.size-1&&(l?.(V),!V.defaultPrevented&&m&&(V.preventDefault(),m()))},w),x.useEffect(()=>{if(b)return i&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(wy=w.body.style.pointerEvents,w.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(b)),p.layers.add(b),jy(),()=>{i&&p.layersWithOutsidePointerEventsDisabled.size===1&&(w.body.style.pointerEvents=wy)}},[b,w,i,p]),x.useEffect(()=>()=>{b&&(p.layers.delete(b),p.layersWithOutsidePointerEventsDisabled.delete(b),jy())},[b,p]),x.useEffect(()=>{const V=()=>N({});return document.addEventListener(hf,V),()=>document.removeEventListener(hf,V)},[]),c.jsx(As.div,{...g,ref:z,style:{pointerEvents:O?D?"auto":"none":void 0,...e.style},onFocusCapture:ri(e.onFocusCapture,H.onFocusCapture),onBlurCapture:ri(e.onBlurCapture,H.onBlurCapture),onPointerDownCapture:ri(e.onPointerDownCapture,M.onPointerDownCapture)})});rv.displayName=eN;var sN="DismissableLayerBranch",iN=x.forwardRef((e,n)=>{const i=x.useContext(lv),l=x.useRef(null),o=Ii(n,l);return x.useEffect(()=>{const u=l.current;if(u)return i.branches.add(u),()=>{i.branches.delete(u)}},[i.branches]),c.jsx(As.div,{...e,ref:o})});iN.displayName=sN;function aN(e,n=globalThis?.document){const i=Wl(e),l=x.useRef(!1),o=x.useRef(()=>{});return x.useEffect(()=>{const u=m=>{if(m.target&&!l.current){let g=function(){ov(tN,i,p,{discrete:!0})};const p={originalEvent:m};m.pointerType==="touch"?(n.removeEventListener("click",o.current),o.current=g,n.addEventListener("click",o.current,{once:!0})):g()}else n.removeEventListener("click",o.current);l.current=!1},d=window.setTimeout(()=>{n.addEventListener("pointerdown",u)},0);return()=>{window.clearTimeout(d),n.removeEventListener("pointerdown",u),n.removeEventListener("click",o.current)}},[n,i]),{onPointerDownCapture:()=>l.current=!0}}function lN(e,n=globalThis?.document){const i=Wl(e),l=x.useRef(!1);return x.useEffect(()=>{const o=u=>{u.target&&!l.current&&ov(nN,i,{originalEvent:u},{discrete:!1})};return n.addEventListener("focusin",o),()=>n.removeEventListener("focusin",o)},[n,i]),{onFocusCapture:()=>l.current=!0,onBlurCapture:()=>l.current=!1}}function jy(){const e=new CustomEvent(hf);document.dispatchEvent(e)}function ov(e,n,i,{discrete:l}){const o=i.originalEvent.target,u=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:i});n&&o.addEventListener(e,n,{once:!0}),l?Fj(o,u):o.dispatchEvent(u)}var Pd="focusScope.autoFocusOnMount",Qd="focusScope.autoFocusOnUnmount",Ny={bubbles:!1,cancelable:!0},rN="FocusScope",cv=x.forwardRef((e,n)=>{const{loop:i=!1,trapped:l=!1,onMountAutoFocus:o,onUnmountAutoFocus:u,...d}=e,[m,g]=x.useState(null),p=Wl(o),b=Wl(u),v=x.useRef(null),w=Ii(n,j=>g(j)),N=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(l){let j=function(O){if(N.paused||!m)return;const D=O.target;m.contains(D)?v.current=D:si(v.current,{select:!0})},k=function(O){if(N.paused||!m)return;const D=O.relatedTarget;D!==null&&(m.contains(D)||si(v.current,{select:!0}))},A=function(O){if(document.activeElement===document.body)for(const M of O)M.removedNodes.length>0&&si(m)};document.addEventListener("focusin",j),document.addEventListener("focusout",k);const E=new MutationObserver(A);return m&&E.observe(m,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",j),document.removeEventListener("focusout",k),E.disconnect()}}},[l,m,N.paused]),x.useEffect(()=>{if(m){zy.add(N);const j=document.activeElement;if(!m.contains(j)){const A=new CustomEvent(Pd,Ny);m.addEventListener(Pd,p),m.dispatchEvent(A),A.defaultPrevented||(oN(hN(uv(m)),{select:!0}),document.activeElement===j&&si(m))}return()=>{m.removeEventListener(Pd,p),setTimeout(()=>{const A=new CustomEvent(Qd,Ny);m.addEventListener(Qd,b),m.dispatchEvent(A),A.defaultPrevented||si(j??document.body,{select:!0}),m.removeEventListener(Qd,b),zy.remove(N)},0)}}},[m,p,b,N]);const z=x.useCallback(j=>{if(!i&&!l||N.paused)return;const k=j.key==="Tab"&&!j.altKey&&!j.ctrlKey&&!j.metaKey,A=document.activeElement;if(k&&A){const E=j.currentTarget,[O,D]=cN(E);O&&D?!j.shiftKey&&A===D?(j.preventDefault(),i&&si(O,{select:!0})):j.shiftKey&&A===O&&(j.preventDefault(),i&&si(D,{select:!0})):A===E&&j.preventDefault()}},[i,l,N.paused]);return c.jsx(As.div,{tabIndex:-1,...d,ref:w,onKeyDown:z})});cv.displayName=rN;function oN(e,{select:n=!1}={}){const i=document.activeElement;for(const l of e)if(si(l,{select:n}),document.activeElement!==i)return}function cN(e){const n=uv(e),i=ky(n,e),l=ky(n.reverse(),e);return[i,l]}function uv(e){const n=[],i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:l=>{const o=l.tagName==="INPUT"&&l.type==="hidden";return l.disabled||l.hidden||o?NodeFilter.FILTER_SKIP:l.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;i.nextNode();)n.push(i.currentNode);return n}function ky(e,n){for(const i of e)if(!uN(i,{upTo:n}))return i}function uN(e,{upTo:n}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(n!==void 0&&e===n)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function dN(e){return e instanceof HTMLInputElement&&"select"in e}function si(e,{select:n=!1}={}){if(e&&e.focus){const i=document.activeElement;e.focus({preventScroll:!0}),e!==i&&dN(e)&&n&&e.select()}}var zy=fN();function fN(){let e=[];return{add(n){const i=e[0];n!==i&&i?.pause(),e=_y(e,n),e.unshift(n)},remove(n){e=_y(e,n),e[0]?.resume()}}}function _y(e,n){const i=[...e],l=i.indexOf(n);return l!==-1&&i.splice(l,1),i}function hN(e){return e.filter(n=>n.tagName!=="A")}var mN="Portal",dv=x.forwardRef((e,n)=>{const{container:i,...l}=e,[o,u]=x.useState(!1);Fl(()=>u(!0),[]);const d=i||o&&globalThis?.document?.body;return d?Kj.createPortal(c.jsx(As.div,{...l,ref:n}),d):null});dv.displayName=mN;function pN(e,n){return x.useReducer((i,l)=>n[i][l]??i,e)}var pc=e=>{const{present:n,children:i}=e,l=gN(n),o=typeof i=="function"?i({present:l.isPresent}):x.Children.only(i),u=Ii(l.ref,yN(o));return typeof i=="function"||l.isPresent?x.cloneElement(o,{ref:u}):null};pc.displayName="Presence";function gN(e){const[n,i]=x.useState(),l=x.useRef(null),o=x.useRef(e),u=x.useRef("none"),d=e?"mounted":"unmounted",[m,g]=pN(d,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const p=Eo(l.current);u.current=m==="mounted"?p:"none"},[m]),Fl(()=>{const p=l.current,b=o.current;if(b!==e){const w=u.current,N=Eo(p);e?g("MOUNT"):N==="none"||p?.display==="none"?g("UNMOUNT"):g(b&&w!==N?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,g]),Fl(()=>{if(n){let p;const b=n.ownerDocument.defaultView??window,v=N=>{const j=Eo(l.current).includes(CSS.escape(N.animationName));if(N.target===n&&j&&(g("ANIMATION_END"),!o.current)){const k=n.style.animationFillMode;n.style.animationFillMode="forwards",p=b.setTimeout(()=>{n.style.animationFillMode==="forwards"&&(n.style.animationFillMode=k)})}},w=N=>{N.target===n&&(u.current=Eo(l.current))};return n.addEventListener("animationstart",w),n.addEventListener("animationcancel",v),n.addEventListener("animationend",v),()=>{b.clearTimeout(p),n.removeEventListener("animationstart",w),n.removeEventListener("animationcancel",v),n.removeEventListener("animationend",v)}}else g("ANIMATION_END")},[n,g]),{isPresent:["mounted","unmountSuspended"].includes(m),ref:x.useCallback(p=>{l.current=p?getComputedStyle(p):null,i(p)},[])}}function Eo(e){return e?.animationName||"none"}function yN(e){let n=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,i=n&&"isReactWarning"in n&&n.isReactWarning;return i?e.ref:(n=Object.getOwnPropertyDescriptor(e,"ref")?.get,i=n&&"isReactWarning"in n&&n.isReactWarning,i?e.props.ref:e.props.ref||e.ref)}var Xd=0;function vN(){x.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Cy()),document.body.insertAdjacentElement("beforeend",e[1]??Cy()),Xd++,()=>{Xd===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),Xd--}},[])}function Cy(){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 ss=function(){return ss=Object.assign||function(n){for(var i,l=1,o=arguments.length;l<o;l++){i=arguments[l];for(var u in i)Object.prototype.hasOwnProperty.call(i,u)&&(n[u]=i[u])}return n},ss.apply(this,arguments)};function fv(e,n){var i={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&n.indexOf(l)<0&&(i[l]=e[l]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,l=Object.getOwnPropertySymbols(e);o<l.length;o++)n.indexOf(l[o])<0&&Object.prototype.propertyIsEnumerable.call(e,l[o])&&(i[l[o]]=e[l[o]]);return i}function bN(e,n,i){if(i||arguments.length===2)for(var l=0,o=n.length,u;l<o;l++)(u||!(l in n))&&(u||(u=Array.prototype.slice.call(n,0,l)),u[l]=n[l]);return e.concat(u||Array.prototype.slice.call(n))}var Go="right-scroll-bar-position",Ko="width-before-scroll-bar",xN="with-scroll-bars-hidden",SN="--removed-body-scroll-bar-size";function Jd(e,n){return typeof e=="function"?e(n):e&&(e.current=n),e}function wN(e,n){var i=x.useState(function(){return{value:e,callback:n,facade:{get current(){return i.value},set current(l){var o=i.value;o!==l&&(i.value=l,i.callback(l,o))}}}})[0];return i.callback=n,i.facade}var jN=typeof window<"u"?x.useLayoutEffect:x.useEffect,Ey=new WeakMap;function NN(e,n){var i=wN(null,function(l){return e.forEach(function(o){return Jd(o,l)})});return jN(function(){var l=Ey.get(i);if(l){var o=new Set(l),u=new Set(e),d=i.current;o.forEach(function(m){u.has(m)||Jd(m,null)}),u.forEach(function(m){o.has(m)||Jd(m,d)})}Ey.set(i,e)},[e]),i}function kN(e){return e}function zN(e,n){n===void 0&&(n=kN);var i=[],l=!1,o={read:function(){if(l)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return i.length?i[i.length-1]:e},useMedium:function(u){var d=n(u,l);return i.push(d),function(){i=i.filter(function(m){return m!==d})}},assignSyncMedium:function(u){for(l=!0;i.length;){var d=i;i=[],d.forEach(u)}i={push:function(m){return u(m)},filter:function(){return i}}},assignMedium:function(u){l=!0;var d=[];if(i.length){var m=i;i=[],m.forEach(u),d=i}var g=function(){var b=d;d=[],b.forEach(u)},p=function(){return Promise.resolve().then(g)};p(),i={push:function(b){d.push(b),p()},filter:function(b){return d=d.filter(b),i}}}};return o}function _N(e){e===void 0&&(e={});var n=zN(null);return n.options=ss({async:!0,ssr:!1},e),n}var hv=function(e){var n=e.sideCar,i=fv(e,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var l=n.read();if(!l)throw new Error("Sidecar medium not found");return x.createElement(l,ss({},i))};hv.isSideCarExport=!0;function CN(e,n){return e.useMedium(n),hv}var mv=_N(),Fd=function(){},gc=x.forwardRef(function(e,n){var i=x.useRef(null),l=x.useState({onScrollCapture:Fd,onWheelCapture:Fd,onTouchMoveCapture:Fd}),o=l[0],u=l[1],d=e.forwardProps,m=e.children,g=e.className,p=e.removeScrollBar,b=e.enabled,v=e.shards,w=e.sideCar,N=e.noRelative,z=e.noIsolation,j=e.inert,k=e.allowPinchZoom,A=e.as,E=A===void 0?"div":A,O=e.gapMode,D=fv(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),M=w,H=NN([i,n]),V=ss(ss({},D),o);return x.createElement(x.Fragment,null,b&&x.createElement(M,{sideCar:mv,removeScrollBar:p,shards:v,noRelative:N,noIsolation:z,inert:j,setCallbacks:u,allowPinchZoom:!!k,lockRef:i,gapMode:O}),d?x.cloneElement(x.Children.only(m),ss(ss({},V),{ref:H})):x.createElement(E,ss({},V,{className:g,ref:H}),m))});gc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};gc.classNames={fullWidth:Ko,zeroRight:Go};var EN=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function AN(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var n=EN();return n&&e.setAttribute("nonce",n),e}function TN(e,n){e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n))}function ON(e){var n=document.head||document.getElementsByTagName("head")[0];n.appendChild(e)}var DN=function(){var e=0,n=null;return{add:function(i){e==0&&(n=AN())&&(TN(n,i),ON(n)),e++},remove:function(){e--,!e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},RN=function(){var e=DN();return function(n,i){x.useEffect(function(){return e.add(n),function(){e.remove()}},[n&&i])}},pv=function(){var e=RN(),n=function(i){var l=i.styles,o=i.dynamic;return e(l,o),null};return n},LN={left:0,top:0,right:0,gap:0},Wd=function(e){return parseInt(e||"",10)||0},MN=function(e){var n=window.getComputedStyle(document.body),i=n[e==="padding"?"paddingLeft":"marginLeft"],l=n[e==="padding"?"paddingTop":"marginTop"],o=n[e==="padding"?"paddingRight":"marginRight"];return[Wd(i),Wd(l),Wd(o)]},$N=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return LN;var n=MN(e),i=document.documentElement.clientWidth,l=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,l-i+n[2]-n[0])}},UN=pv(),Ba="data-scroll-locked",BN=function(e,n,i,l){var o=e.left,u=e.top,d=e.right,m=e.gap;return i===void 0&&(i="margin"),`
140
+ .`.concat(xN,` {
141
+ overflow: hidden `).concat(l,`;
142
+ padding-right: `).concat(m,"px ").concat(l,`;
143
+ }
144
+ body[`).concat(Ba,`] {
145
+ overflow: hidden `).concat(l,`;
146
+ overscroll-behavior: contain;
147
+ `).concat([n&&"position: relative ".concat(l,";"),i==="margin"&&`
148
+ padding-left: `.concat(o,`px;
149
+ padding-top: `).concat(u,`px;
150
+ padding-right: `).concat(d,`px;
151
+ margin-left:0;
152
+ margin-top:0;
153
+ margin-right: `).concat(m,"px ").concat(l,`;
154
+ `),i==="padding"&&"padding-right: ".concat(m,"px ").concat(l,";")].filter(Boolean).join(""),`
155
+ }
156
+
157
+ .`).concat(Go,` {
158
+ right: `).concat(m,"px ").concat(l,`;
159
+ }
160
+
161
+ .`).concat(Ko,` {
162
+ margin-right: `).concat(m,"px ").concat(l,`;
163
+ }
164
+
165
+ .`).concat(Go," .").concat(Go,` {
166
+ right: 0 `).concat(l,`;
167
+ }
168
+
169
+ .`).concat(Ko," .").concat(Ko,` {
170
+ margin-right: 0 `).concat(l,`;
171
+ }
172
+
173
+ body[`).concat(Ba,`] {
174
+ `).concat(SN,": ").concat(m,`px;
175
+ }
176
+ `)},Ay=function(){var e=parseInt(document.body.getAttribute(Ba)||"0",10);return isFinite(e)?e:0},IN=function(){x.useEffect(function(){return document.body.setAttribute(Ba,(Ay()+1).toString()),function(){var e=Ay()-1;e<=0?document.body.removeAttribute(Ba):document.body.setAttribute(Ba,e.toString())}},[])},qN=function(e){var n=e.noRelative,i=e.noImportant,l=e.gapMode,o=l===void 0?"margin":l;IN();var u=x.useMemo(function(){return $N(o)},[o]);return x.createElement(UN,{styles:BN(u,!n,o,i?"":"!important")})},mf=!1;if(typeof window<"u")try{var Ao=Object.defineProperty({},"passive",{get:function(){return mf=!0,!0}});window.addEventListener("test",Ao,Ao),window.removeEventListener("test",Ao,Ao)}catch{mf=!1}var Ea=mf?{passive:!1}:!1,ZN=function(e){return e.tagName==="TEXTAREA"},gv=function(e,n){if(!(e instanceof Element))return!1;var i=window.getComputedStyle(e);return i[n]!=="hidden"&&!(i.overflowY===i.overflowX&&!ZN(e)&&i[n]==="visible")},HN=function(e){return gv(e,"overflowY")},GN=function(e){return gv(e,"overflowX")},Ty=function(e,n){var i=n.ownerDocument,l=n;do{typeof ShadowRoot<"u"&&l instanceof ShadowRoot&&(l=l.host);var o=yv(e,l);if(o){var u=vv(e,l),d=u[1],m=u[2];if(d>m)return!0}l=l.parentNode}while(l&&l!==i.body);return!1},KN=function(e){var n=e.scrollTop,i=e.scrollHeight,l=e.clientHeight;return[n,i,l]},YN=function(e){var n=e.scrollLeft,i=e.scrollWidth,l=e.clientWidth;return[n,i,l]},yv=function(e,n){return e==="v"?HN(n):GN(n)},vv=function(e,n){return e==="v"?KN(n):YN(n)},VN=function(e,n){return e==="h"&&n==="rtl"?-1:1},PN=function(e,n,i,l,o){var u=VN(e,window.getComputedStyle(n).direction),d=u*l,m=i.target,g=n.contains(m),p=!1,b=d>0,v=0,w=0;do{if(!m)break;var N=vv(e,m),z=N[0],j=N[1],k=N[2],A=j-k-u*z;(z||A)&&yv(e,m)&&(v+=A,w+=z);var E=m.parentNode;m=E&&E.nodeType===Node.DOCUMENT_FRAGMENT_NODE?E.host:E}while(!g&&m!==document.body||g&&(n.contains(m)||n===m));return(b&&Math.abs(v)<1||!b&&Math.abs(w)<1)&&(p=!0),p},To=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Oy=function(e){return[e.deltaX,e.deltaY]},Dy=function(e){return e&&"current"in e?e.current:e},QN=function(e,n){return e[0]===n[0]&&e[1]===n[1]},XN=function(e){return`
177
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
178
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
179
+ `)},JN=0,Aa=[];function FN(e){var n=x.useRef([]),i=x.useRef([0,0]),l=x.useRef(),o=x.useState(JN++)[0],u=x.useState(pv)[0],d=x.useRef(e);x.useEffect(function(){d.current=e},[e]),x.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var j=bN([e.lockRef.current],(e.shards||[]).map(Dy),!0).filter(Boolean);return j.forEach(function(k){return k.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),j.forEach(function(k){return k.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var m=x.useCallback(function(j,k){if("touches"in j&&j.touches.length===2||j.type==="wheel"&&j.ctrlKey)return!d.current.allowPinchZoom;var A=To(j),E=i.current,O="deltaX"in j?j.deltaX:E[0]-A[0],D="deltaY"in j?j.deltaY:E[1]-A[1],M,H=j.target,V=Math.abs(O)>Math.abs(D)?"h":"v";if("touches"in j&&V==="h"&&H.type==="range")return!1;var L=window.getSelection(),Q=L&&L.anchorNode,Se=Q?Q===H||Q.contains(H):!1;if(Se)return!1;var ae=Ty(V,H);if(!ae)return!0;if(ae?M=V:(M=V==="v"?"h":"v",ae=Ty(V,H)),!ae)return!1;if(!l.current&&"changedTouches"in j&&(O||D)&&(l.current=M),!M)return!0;var fe=l.current||M;return PN(fe,k,j,fe==="h"?O:D)},[]),g=x.useCallback(function(j){var k=j;if(!(!Aa.length||Aa[Aa.length-1]!==u)){var A="deltaY"in k?Oy(k):To(k),E=n.current.filter(function(M){return M.name===k.type&&(M.target===k.target||k.target===M.shadowParent)&&QN(M.delta,A)})[0];if(E&&E.should){k.cancelable&&k.preventDefault();return}if(!E){var O=(d.current.shards||[]).map(Dy).filter(Boolean).filter(function(M){return M.contains(k.target)}),D=O.length>0?m(k,O[0]):!d.current.noIsolation;D&&k.cancelable&&k.preventDefault()}}},[]),p=x.useCallback(function(j,k,A,E){var O={name:j,delta:k,target:A,should:E,shadowParent:WN(A)};n.current.push(O),setTimeout(function(){n.current=n.current.filter(function(D){return D!==O})},1)},[]),b=x.useCallback(function(j){i.current=To(j),l.current=void 0},[]),v=x.useCallback(function(j){p(j.type,Oy(j),j.target,m(j,e.lockRef.current))},[]),w=x.useCallback(function(j){p(j.type,To(j),j.target,m(j,e.lockRef.current))},[]);x.useEffect(function(){return Aa.push(u),e.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:w}),document.addEventListener("wheel",g,Ea),document.addEventListener("touchmove",g,Ea),document.addEventListener("touchstart",b,Ea),function(){Aa=Aa.filter(function(j){return j!==u}),document.removeEventListener("wheel",g,Ea),document.removeEventListener("touchmove",g,Ea),document.removeEventListener("touchstart",b,Ea)}},[]);var N=e.removeScrollBar,z=e.inert;return x.createElement(x.Fragment,null,z?x.createElement(u,{styles:XN(o)}):null,N?x.createElement(qN,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function WN(e){for(var n=null;e!==null;)e instanceof ShadowRoot&&(n=e.host,e=e.host),e=e.parentNode;return n}const e1=CN(mv,FN);var bv=x.forwardRef(function(e,n){return x.createElement(gc,ss({},e,{ref:n,sideCar:e1}))});bv.classNames=gc.classNames;var t1=function(e){if(typeof document>"u")return null;var n=Array.isArray(e)?e[0]:e;return n.ownerDocument.body},Ta=new WeakMap,Oo=new WeakMap,Do={},ef=0,xv=function(e){return e&&(e.host||xv(e.parentNode))},n1=function(e,n){return n.map(function(i){if(e.contains(i))return i;var l=xv(i);return l&&e.contains(l)?l:(console.error("aria-hidden",i,"in not contained inside",e,". Doing nothing"),null)}).filter(function(i){return!!i})},s1=function(e,n,i,l){var o=n1(n,Array.isArray(e)?e:[e]);Do[i]||(Do[i]=new WeakMap);var u=Do[i],d=[],m=new Set,g=new Set(o),p=function(v){!v||m.has(v)||(m.add(v),p(v.parentNode))};o.forEach(p);var b=function(v){!v||g.has(v)||Array.prototype.forEach.call(v.children,function(w){if(m.has(w))b(w);else try{var N=w.getAttribute(l),z=N!==null&&N!=="false",j=(Ta.get(w)||0)+1,k=(u.get(w)||0)+1;Ta.set(w,j),u.set(w,k),d.push(w),j===1&&z&&Oo.set(w,!0),k===1&&w.setAttribute(i,"true"),z||w.setAttribute(l,"true")}catch(A){console.error("aria-hidden: cannot operate on ",w,A)}})};return b(n),m.clear(),ef++,function(){d.forEach(function(v){var w=Ta.get(v)-1,N=u.get(v)-1;Ta.set(v,w),u.set(v,N),w||(Oo.has(v)||v.removeAttribute(l),Oo.delete(v)),N||v.removeAttribute(i)}),ef--,ef||(Ta=new WeakMap,Ta=new WeakMap,Oo=new WeakMap,Do={})}},i1=function(e,n,i){i===void 0&&(i="data-aria-hidden");var l=Array.from(Array.isArray(e)?e:[e]),o=t1(e);return o?(l.push.apply(l,Array.from(o.querySelectorAll("[aria-live], script"))),s1(l,o,i,"aria-hidden")):function(){return null}},yc="Dialog",[Sv]=$j(yc),[a1,Vn]=Sv(yc),wv=e=>{const{__scopeDialog:n,children:i,open:l,defaultOpen:o,onOpenChange:u,modal:d=!0}=e,m=x.useRef(null),g=x.useRef(null),[p,b]=Zj({prop:l,defaultProp:o??!1,onChange:u,caller:yc});return c.jsx(a1,{scope:n,triggerRef:m,contentRef:g,contentId:Vd(),titleId:Vd(),descriptionId:Vd(),open:p,onOpenChange:b,onOpenToggle:x.useCallback(()=>b(v=>!v),[b]),modal:d,children:i})};wv.displayName=yc;var jv="DialogTrigger",l1=x.forwardRef((e,n)=>{const{__scopeDialog:i,...l}=e,o=Vn(jv,i),u=Ii(n,o.triggerRef);return c.jsx(As.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Gf(o.open),...l,ref:u,onClick:ri(e.onClick,o.onOpenToggle)})});l1.displayName=jv;var Zf="DialogPortal",[r1,Nv]=Sv(Zf,{forceMount:void 0}),kv=e=>{const{__scopeDialog:n,forceMount:i,children:l,container:o}=e,u=Vn(Zf,n);return c.jsx(r1,{scope:n,forceMount:i,children:x.Children.map(l,d=>c.jsx(pc,{present:i||u.open,children:c.jsx(dv,{asChild:!0,container:o,children:d})}))})};kv.displayName=Zf;var Po="DialogOverlay",zv=x.forwardRef((e,n)=>{const i=Nv(Po,e.__scopeDialog),{forceMount:l=i.forceMount,...o}=e,u=Vn(Po,e.__scopeDialog);return u.modal?c.jsx(pc,{present:l||u.open,children:c.jsx(c1,{...o,ref:n})}):null});zv.displayName=Po;var o1=av("DialogOverlay.RemoveScroll"),c1=x.forwardRef((e,n)=>{const{__scopeDialog:i,...l}=e,o=Vn(Po,i);return c.jsx(bv,{as:o1,allowPinchZoom:!0,shards:[o.contentRef],children:c.jsx(As.div,{"data-state":Gf(o.open),...l,ref:n,style:{pointerEvents:"auto",...l.style}})})}),Ui="DialogContent",_v=x.forwardRef((e,n)=>{const i=Nv(Ui,e.__scopeDialog),{forceMount:l=i.forceMount,...o}=e,u=Vn(Ui,e.__scopeDialog);return c.jsx(pc,{present:l||u.open,children:u.modal?c.jsx(u1,{...o,ref:n}):c.jsx(d1,{...o,ref:n})})});_v.displayName=Ui;var u1=x.forwardRef((e,n)=>{const i=Vn(Ui,e.__scopeDialog),l=x.useRef(null),o=Ii(n,i.contentRef,l);return x.useEffect(()=>{const u=l.current;if(u)return i1(u)},[]),c.jsx(Cv,{...e,ref:o,trapFocus:i.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ri(e.onCloseAutoFocus,u=>{u.preventDefault(),i.triggerRef.current?.focus()}),onPointerDownOutside:ri(e.onPointerDownOutside,u=>{const d=u.detail.originalEvent,m=d.button===0&&d.ctrlKey===!0;(d.button===2||m)&&u.preventDefault()}),onFocusOutside:ri(e.onFocusOutside,u=>u.preventDefault())})}),d1=x.forwardRef((e,n)=>{const i=Vn(Ui,e.__scopeDialog),l=x.useRef(!1),o=x.useRef(!1);return c.jsx(Cv,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:u=>{e.onCloseAutoFocus?.(u),u.defaultPrevented||(l.current||i.triggerRef.current?.focus(),u.preventDefault()),l.current=!1,o.current=!1},onInteractOutside:u=>{e.onInteractOutside?.(u),u.defaultPrevented||(l.current=!0,u.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const d=u.target;i.triggerRef.current?.contains(d)&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&o.current&&u.preventDefault()}})}),Cv=x.forwardRef((e,n)=>{const{__scopeDialog:i,trapFocus:l,onOpenAutoFocus:o,onCloseAutoFocus:u,...d}=e,m=Vn(Ui,i),g=x.useRef(null),p=Ii(n,g);return vN(),c.jsxs(c.Fragment,{children:[c.jsx(cv,{asChild:!0,loop:!0,trapped:l,onMountAutoFocus:o,onUnmountAutoFocus:u,children:c.jsx(rv,{role:"dialog",id:m.contentId,"aria-describedby":m.descriptionId,"aria-labelledby":m.titleId,"data-state":Gf(m.open),...d,ref:p,onDismiss:()=>m.onOpenChange(!1)})}),c.jsxs(c.Fragment,{children:[c.jsx(f1,{titleId:m.titleId}),c.jsx(m1,{contentRef:g,descriptionId:m.descriptionId})]})]})}),Hf="DialogTitle",Ev=x.forwardRef((e,n)=>{const{__scopeDialog:i,...l}=e,o=Vn(Hf,i);return c.jsx(As.h2,{id:o.titleId,...l,ref:n})});Ev.displayName=Hf;var Av="DialogDescription",Tv=x.forwardRef((e,n)=>{const{__scopeDialog:i,...l}=e,o=Vn(Av,i);return c.jsx(As.p,{id:o.descriptionId,...l,ref:n})});Tv.displayName=Av;var Ov="DialogClose",Dv=x.forwardRef((e,n)=>{const{__scopeDialog:i,...l}=e,o=Vn(Ov,i);return c.jsx(As.button,{type:"button",...l,ref:n,onClick:ri(e.onClick,()=>o.onOpenChange(!1))})});Dv.displayName=Ov;function Gf(e){return e?"open":"closed"}var Rv="DialogTitleWarning",[eO,Lv]=Mj(Rv,{contentName:Ui,titleName:Hf,docsSlug:"dialog"}),f1=({titleId:e})=>{const n=Lv(Rv),i=`\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.
180
+
181
+ If you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.
182
+
183
+ For more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return x.useEffect(()=>{e&&(document.getElementById(e)||console.error(i))},[i,e]),null},h1="DialogDescriptionWarning",m1=({contentRef:e,descriptionId:n})=>{const l=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Lv(h1).contentName}}.`;return x.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");n&&o&&(document.getElementById(n)||console.warn(l))},[l,e,n]),null},Mv=wv,$v=kv,Kf=zv,Yf=_v,Vf=Ev,Uv=Tv,Bv=Dv;const p1=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),g1=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,i,l)=>l?l.toUpperCase():i.toLowerCase()),Ry=e=>{const n=g1(e);return n.charAt(0).toUpperCase()+n.slice(1)},Iv=(...e)=>e.filter((n,i,l)=>!!n&&n.trim()!==""&&l.indexOf(n)===i).join(" ").trim(),y1=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0};var v1={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"};const b1=x.forwardRef(({color:e="currentColor",size:n=24,strokeWidth:i=2,absoluteStrokeWidth:l,className:o="",children:u,iconNode:d,...m},g)=>x.createElement("svg",{ref:g,...v1,width:n,height:n,stroke:e,strokeWidth:l?Number(i)*24/Number(n):i,className:Iv("lucide",o),...!u&&!y1(m)&&{"aria-hidden":"true"},...m},[...d.map(([p,b])=>x.createElement(p,b)),...Array.isArray(u)?u:[u]]));const Pn=(e,n)=>{const i=x.forwardRef(({className:l,...o},u)=>x.createElement(b1,{ref:u,iconNode:n,className:Iv(`lucide-${p1(Ry(e))}`,`lucide-${e}`,l),...o}));return i.displayName=Ry(e),i};const x1=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Pf=Pn("chevron-right",x1);const S1=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],w1=Pn("download",S1);const j1=[["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"}]],N1=Pn("globe",j1);const k1=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],z1=Pn("layout-dashboard",k1);const _1=[["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 18h16",key:"19g7jn"}],["path",{d:"M4 6h16",key:"1o0s65"}]],C1=Pn("menu",_1);const E1=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],A1=Pn("play",E1);const T1=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Ly=Pn("plus",T1);const O1=[["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:"m3kijz"}],["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"}]],D1=Pn("rocket",O1);const R1=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],L1=Pn("settings",R1);const M1=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],$1=Pn("trash-2",M1);const U1=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Qf=Pn("x",U1);function J(e,n,i){function l(m,g){if(m._zod||Object.defineProperty(m,"_zod",{value:{def:g,constr:d,traits:new Set},enumerable:!1}),m._zod.traits.has(e))return;m._zod.traits.add(e),n(m,g);const p=d.prototype,b=Object.keys(p);for(let v=0;v<b.length;v++){const w=b[v];w in m||(m[w]=p[w].bind(m))}}const o=i?.Parent??Object;class u extends o{}Object.defineProperty(u,"name",{value:e});function d(m){var g;const p=i?.Parent?new u:this;l(p,m),(g=p._zod).deferred??(g.deferred=[]);for(const b of p._zod.deferred)b();return p}return Object.defineProperty(d,"init",{value:l}),Object.defineProperty(d,Symbol.hasInstance,{value:m=>i?.Parent&&m instanceof i.Parent?!0:m?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}class Ia extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class qv extends Error{constructor(n){super(`Encountered unidirectional transform during encode: ${n}`),this.name="ZodEncodeError"}}const Zv={};function oi(e){return Zv}function Hv(e){const n=Object.values(e).filter(l=>typeof l=="number");return Object.entries(e).filter(([l,o])=>n.indexOf(+l)===-1).map(([l,o])=>o)}function pf(e,n){return typeof n=="bigint"?n.toString():n}function Xf(e){return{get value(){{const n=e();return Object.defineProperty(this,"value",{value:n}),n}}}}function Jf(e){return e==null}function Ff(e){const n=e.startsWith("^")?1:0,i=e.endsWith("$")?e.length-1:e.length;return e.slice(n,i)}function B1(e,n){const i=(e.toString().split(".")[1]||"").length,l=n.toString();let o=(l.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(l)){const g=l.match(/\d?e-(\d?)/);g?.[1]&&(o=Number.parseInt(g[1]))}const u=i>o?i:o,d=Number.parseInt(e.toFixed(u).replace(".","")),m=Number.parseInt(n.toFixed(u).replace(".",""));return d%m/10**u}const My=Symbol("evaluating");function Fe(e,n,i){let l;Object.defineProperty(e,n,{get(){if(l!==My)return l===void 0&&(l=My,l=i()),l},set(o){Object.defineProperty(e,n,{value:o})},configurable:!0})}function qi(e,n,i){Object.defineProperty(e,n,{value:i,writable:!0,enumerable:!0,configurable:!0})}function ui(...e){const n={};for(const i of e){const l=Object.getOwnPropertyDescriptors(i);Object.assign(n,l)}return Object.defineProperties({},n)}function $y(e){return JSON.stringify(e)}function I1(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Gv="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Qo(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const q1=Xf(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Ga(e){if(Qo(e)===!1)return!1;const n=e.constructor;if(n===void 0||typeof n!="function")return!0;const i=n.prototype;return!(Qo(i)===!1||Object.prototype.hasOwnProperty.call(i,"isPrototypeOf")===!1)}function Kv(e){return Ga(e)?{...e}:Array.isArray(e)?[...e]:e}const Z1=new Set(["string","number","symbol"]);function Ka(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function di(e,n,i){const l=new e._zod.constr(n??e._zod.def);return(!n||i?.parent)&&(l._zod.parent=e),l}function be(e){const n=e;if(!n)return{};if(typeof n=="string")return{error:()=>n};if(n?.message!==void 0){if(n?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");n.error=n.message}return delete n.message,typeof n.error=="string"?{...n,error:()=>n.error}:n}function H1(e){return Object.keys(e).filter(n=>e[n]._zod.optin==="optional"&&e[n]._zod.optout==="optional")}const G1={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function K1(e,n){const i=e._zod.def,l=i.checks;if(l&&l.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const u=ui(e._zod.def,{get shape(){const d={};for(const m in n){if(!(m in i.shape))throw new Error(`Unrecognized key: "${m}"`);n[m]&&(d[m]=i.shape[m])}return qi(this,"shape",d),d},checks:[]});return di(e,u)}function Y1(e,n){const i=e._zod.def,l=i.checks;if(l&&l.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const u=ui(e._zod.def,{get shape(){const d={...e._zod.def.shape};for(const m in n){if(!(m in i.shape))throw new Error(`Unrecognized key: "${m}"`);n[m]&&delete d[m]}return qi(this,"shape",d),d},checks:[]});return di(e,u)}function V1(e,n){if(!Ga(n))throw new Error("Invalid input to extend: expected a plain object");const i=e._zod.def.checks;if(i&&i.length>0){const u=e._zod.def.shape;for(const d in n)if(Object.getOwnPropertyDescriptor(u,d)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=ui(e._zod.def,{get shape(){const u={...e._zod.def.shape,...n};return qi(this,"shape",u),u}});return di(e,o)}function P1(e,n){if(!Ga(n))throw new Error("Invalid input to safeExtend: expected a plain object");const i=ui(e._zod.def,{get shape(){const l={...e._zod.def.shape,...n};return qi(this,"shape",l),l}});return di(e,i)}function Q1(e,n){const i=ui(e._zod.def,{get shape(){const l={...e._zod.def.shape,...n._zod.def.shape};return qi(this,"shape",l),l},get catchall(){return n._zod.def.catchall},checks:[]});return di(e,i)}function X1(e,n,i){const o=n._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const d=ui(n._zod.def,{get shape(){const m=n._zod.def.shape,g={...m};if(i)for(const p in i){if(!(p in m))throw new Error(`Unrecognized key: "${p}"`);i[p]&&(g[p]=e?new e({type:"optional",innerType:m[p]}):m[p])}else for(const p in m)g[p]=e?new e({type:"optional",innerType:m[p]}):m[p];return qi(this,"shape",g),g},checks:[]});return di(n,d)}function J1(e,n,i){const l=ui(n._zod.def,{get shape(){const o=n._zod.def.shape,u={...o};if(i)for(const d in i){if(!(d in u))throw new Error(`Unrecognized key: "${d}"`);i[d]&&(u[d]=new e({type:"nonoptional",innerType:o[d]}))}else for(const d in o)u[d]=new e({type:"nonoptional",innerType:o[d]});return qi(this,"shape",u),u}});return di(n,l)}function La(e,n=0){if(e.aborted===!0)return!0;for(let i=n;i<e.issues.length;i++)if(e.issues[i]?.continue!==!0)return!0;return!1}function Ma(e,n){return n.map(i=>{var l;return(l=i).path??(l.path=[]),i.path.unshift(e),i})}function Ro(e){return typeof e=="string"?e:e?.message}function ci(e,n,i){const l={...e,path:e.path??[]};if(!e.message){const o=Ro(e.inst?._zod.def?.error?.(e))??Ro(n?.error?.(e))??Ro(i.customError?.(e))??Ro(i.localeError?.(e))??"Invalid input";l.message=o}return delete l.inst,delete l.continue,n?.reportInput||delete l.input,l}function Wf(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function er(...e){const[n,i,l]=e;return typeof n=="string"?{message:n,code:"custom",input:i,inst:l}:{...n}}const Yv=(e,n)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:n,enumerable:!1}),e.message=JSON.stringify(n,pf,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Vv=J("$ZodError",Yv),Pv=J("$ZodError",Yv,{Parent:Error});function F1(e,n=i=>i.message){const i={},l=[];for(const o of e.issues)o.path.length>0?(i[o.path[0]]=i[o.path[0]]||[],i[o.path[0]].push(n(o))):l.push(n(o));return{formErrors:l,fieldErrors:i}}function W1(e,n=i=>i.message){const i={_errors:[]},l=o=>{for(const u of o.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(d=>l({issues:d}));else if(u.code==="invalid_key")l({issues:u.issues});else if(u.code==="invalid_element")l({issues:u.issues});else if(u.path.length===0)i._errors.push(n(u));else{let d=i,m=0;for(;m<u.path.length;){const g=u.path[m];m===u.path.length-1?(d[g]=d[g]||{_errors:[]},d[g]._errors.push(n(u))):d[g]=d[g]||{_errors:[]},d=d[g],m++}}};return l(e),i}const eh=e=>(n,i,l,o)=>{const u=l?Object.assign(l,{async:!1}):{async:!1},d=n._zod.run({value:i,issues:[]},u);if(d instanceof Promise)throw new Ia;if(d.issues.length){const m=new(o?.Err??e)(d.issues.map(g=>ci(g,u,oi())));throw Gv(m,o?.callee),m}return d.value},th=e=>async(n,i,l,o)=>{const u=l?Object.assign(l,{async:!0}):{async:!0};let d=n._zod.run({value:i,issues:[]},u);if(d instanceof Promise&&(d=await d),d.issues.length){const m=new(o?.Err??e)(d.issues.map(g=>ci(g,u,oi())));throw Gv(m,o?.callee),m}return d.value},vc=e=>(n,i,l)=>{const o=l?{...l,async:!1}:{async:!1},u=n._zod.run({value:i,issues:[]},o);if(u instanceof Promise)throw new Ia;return u.issues.length?{success:!1,error:new(e??Vv)(u.issues.map(d=>ci(d,o,oi())))}:{success:!0,data:u.value}},e2=vc(Pv),bc=e=>async(n,i,l)=>{const o=l?Object.assign(l,{async:!0}):{async:!0};let u=n._zod.run({value:i,issues:[]},o);return u instanceof Promise&&(u=await u),u.issues.length?{success:!1,error:new e(u.issues.map(d=>ci(d,o,oi())))}:{success:!0,data:u.value}},t2=bc(Pv),n2=e=>(n,i,l)=>{const o=l?Object.assign(l,{direction:"backward"}):{direction:"backward"};return eh(e)(n,i,o)},s2=e=>(n,i,l)=>eh(e)(n,i,l),i2=e=>async(n,i,l)=>{const o=l?Object.assign(l,{direction:"backward"}):{direction:"backward"};return th(e)(n,i,o)},a2=e=>async(n,i,l)=>th(e)(n,i,l),l2=e=>(n,i,l)=>{const o=l?Object.assign(l,{direction:"backward"}):{direction:"backward"};return vc(e)(n,i,o)},r2=e=>(n,i,l)=>vc(e)(n,i,l),o2=e=>async(n,i,l)=>{const o=l?Object.assign(l,{direction:"backward"}):{direction:"backward"};return bc(e)(n,i,o)},c2=e=>async(n,i,l)=>bc(e)(n,i,l),u2=/^[cC][^\s-]{8,}$/,d2=/^[0-9a-z]+$/,f2=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,h2=/^[0-9a-vA-V]{20}$/,m2=/^[A-Za-z0-9]{27}$/,p2=/^[a-zA-Z0-9_-]{21}$/,g2=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,y2=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Uy=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,v2=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,b2="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function x2(){return new RegExp(b2,"u")}const S2=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,w2=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,j2=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,N2=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,k2=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Qv=/^[A-Za-z0-9_-]*$/,z2=/^\+[1-9]\d{6,14}$/,Xv="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",_2=new RegExp(`^${Xv}$`);function Jv(e){const n="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${n}`:e.precision===0?`${n}:[0-5]\\d`:`${n}:[0-5]\\d\\.\\d{${e.precision}}`:`${n}(?::[0-5]\\d(?:\\.\\d+)?)?`}function C2(e){return new RegExp(`^${Jv(e)}$`)}function E2(e){const n=Jv({precision:e.precision}),i=["Z"];e.local&&i.push(""),e.offset&&i.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const l=`${n}(?:${i.join("|")})`;return new RegExp(`^${Xv}T(?:${l})$`)}const A2=e=>{const n=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${n}$`)},T2=/^-?\d+$/,Fv=/^-?\d+(?:\.\d+)?$/,O2=/^(?:true|false)$/i,D2=/^[^A-Z]*$/,R2=/^[^a-z]*$/,mn=J("$ZodCheck",(e,n)=>{var i;e._zod??(e._zod={}),e._zod.def=n,(i=e._zod).onattach??(i.onattach=[])}),Wv={number:"number",bigint:"bigint",object:"date"},eb=J("$ZodCheckLessThan",(e,n)=>{mn.init(e,n);const i=Wv[typeof n.value];e._zod.onattach.push(l=>{const o=l._zod.bag,u=(n.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;n.value<u&&(n.inclusive?o.maximum=n.value:o.exclusiveMaximum=n.value)}),e._zod.check=l=>{(n.inclusive?l.value<=n.value:l.value<n.value)||l.issues.push({origin:i,code:"too_big",maximum:typeof n.value=="object"?n.value.getTime():n.value,input:l.value,inclusive:n.inclusive,inst:e,continue:!n.abort})}}),tb=J("$ZodCheckGreaterThan",(e,n)=>{mn.init(e,n);const i=Wv[typeof n.value];e._zod.onattach.push(l=>{const o=l._zod.bag,u=(n.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;n.value>u&&(n.inclusive?o.minimum=n.value:o.exclusiveMinimum=n.value)}),e._zod.check=l=>{(n.inclusive?l.value>=n.value:l.value>n.value)||l.issues.push({origin:i,code:"too_small",minimum:typeof n.value=="object"?n.value.getTime():n.value,input:l.value,inclusive:n.inclusive,inst:e,continue:!n.abort})}}),L2=J("$ZodCheckMultipleOf",(e,n)=>{mn.init(e,n),e._zod.onattach.push(i=>{var l;(l=i._zod.bag).multipleOf??(l.multipleOf=n.value)}),e._zod.check=i=>{if(typeof i.value!=typeof n.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof i.value=="bigint"?i.value%n.value===BigInt(0):B1(i.value,n.value)===0)||i.issues.push({origin:typeof i.value,code:"not_multiple_of",divisor:n.value,input:i.value,inst:e,continue:!n.abort})}}),M2=J("$ZodCheckNumberFormat",(e,n)=>{mn.init(e,n),n.format=n.format||"float64";const i=n.format?.includes("int"),l=i?"int":"number",[o,u]=G1[n.format];e._zod.onattach.push(d=>{const m=d._zod.bag;m.format=n.format,m.minimum=o,m.maximum=u,i&&(m.pattern=T2)}),e._zod.check=d=>{const m=d.value;if(i){if(!Number.isInteger(m)){d.issues.push({expected:l,format:n.format,code:"invalid_type",continue:!1,input:m,inst:e});return}if(!Number.isSafeInteger(m)){m>0?d.issues.push({input:m,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:l,inclusive:!0,continue:!n.abort}):d.issues.push({input:m,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:l,inclusive:!0,continue:!n.abort});return}}m<o&&d.issues.push({origin:"number",input:m,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!n.abort}),m>u&&d.issues.push({origin:"number",input:m,code:"too_big",maximum:u,inclusive:!0,inst:e,continue:!n.abort})}}),$2=J("$ZodCheckMaxLength",(e,n)=>{var i;mn.init(e,n),(i=e._zod.def).when??(i.when=l=>{const o=l.value;return!Jf(o)&&o.length!==void 0}),e._zod.onattach.push(l=>{const o=l._zod.bag.maximum??Number.POSITIVE_INFINITY;n.maximum<o&&(l._zod.bag.maximum=n.maximum)}),e._zod.check=l=>{const o=l.value;if(o.length<=n.maximum)return;const d=Wf(o);l.issues.push({origin:d,code:"too_big",maximum:n.maximum,inclusive:!0,input:o,inst:e,continue:!n.abort})}}),U2=J("$ZodCheckMinLength",(e,n)=>{var i;mn.init(e,n),(i=e._zod.def).when??(i.when=l=>{const o=l.value;return!Jf(o)&&o.length!==void 0}),e._zod.onattach.push(l=>{const o=l._zod.bag.minimum??Number.NEGATIVE_INFINITY;n.minimum>o&&(l._zod.bag.minimum=n.minimum)}),e._zod.check=l=>{const o=l.value;if(o.length>=n.minimum)return;const d=Wf(o);l.issues.push({origin:d,code:"too_small",minimum:n.minimum,inclusive:!0,input:o,inst:e,continue:!n.abort})}}),B2=J("$ZodCheckLengthEquals",(e,n)=>{var i;mn.init(e,n),(i=e._zod.def).when??(i.when=l=>{const o=l.value;return!Jf(o)&&o.length!==void 0}),e._zod.onattach.push(l=>{const o=l._zod.bag;o.minimum=n.length,o.maximum=n.length,o.length=n.length}),e._zod.check=l=>{const o=l.value,u=o.length;if(u===n.length)return;const d=Wf(o),m=u>n.length;l.issues.push({origin:d,...m?{code:"too_big",maximum:n.length}:{code:"too_small",minimum:n.length},inclusive:!0,exact:!0,input:l.value,inst:e,continue:!n.abort})}}),xc=J("$ZodCheckStringFormat",(e,n)=>{var i,l;mn.init(e,n),e._zod.onattach.push(o=>{const u=o._zod.bag;u.format=n.format,n.pattern&&(u.patterns??(u.patterns=new Set),u.patterns.add(n.pattern))}),n.pattern?(i=e._zod).check??(i.check=o=>{n.pattern.lastIndex=0,!n.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:n.format,input:o.value,...n.pattern?{pattern:n.pattern.toString()}:{},inst:e,continue:!n.abort})}):(l=e._zod).check??(l.check=()=>{})}),I2=J("$ZodCheckRegex",(e,n)=>{xc.init(e,n),e._zod.check=i=>{n.pattern.lastIndex=0,!n.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:"regex",input:i.value,pattern:n.pattern.toString(),inst:e,continue:!n.abort})}}),q2=J("$ZodCheckLowerCase",(e,n)=>{n.pattern??(n.pattern=D2),xc.init(e,n)}),Z2=J("$ZodCheckUpperCase",(e,n)=>{n.pattern??(n.pattern=R2),xc.init(e,n)}),H2=J("$ZodCheckIncludes",(e,n)=>{mn.init(e,n);const i=Ka(n.includes),l=new RegExp(typeof n.position=="number"?`^.{${n.position}}${i}`:i);n.pattern=l,e._zod.onattach.push(o=>{const u=o._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(l)}),e._zod.check=o=>{o.value.includes(n.includes,n.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:n.includes,input:o.value,inst:e,continue:!n.abort})}}),G2=J("$ZodCheckStartsWith",(e,n)=>{mn.init(e,n);const i=new RegExp(`^${Ka(n.prefix)}.*`);n.pattern??(n.pattern=i),e._zod.onattach.push(l=>{const o=l._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(i)}),e._zod.check=l=>{l.value.startsWith(n.prefix)||l.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:n.prefix,input:l.value,inst:e,continue:!n.abort})}}),K2=J("$ZodCheckEndsWith",(e,n)=>{mn.init(e,n);const i=new RegExp(`.*${Ka(n.suffix)}$`);n.pattern??(n.pattern=i),e._zod.onattach.push(l=>{const o=l._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(i)}),e._zod.check=l=>{l.value.endsWith(n.suffix)||l.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:n.suffix,input:l.value,inst:e,continue:!n.abort})}}),Y2=J("$ZodCheckOverwrite",(e,n)=>{mn.init(e,n),e._zod.check=i=>{i.value=n.tx(i.value)}});class V2{constructor(n=[]){this.content=[],this.indent=0,this&&(this.args=n)}indented(n){this.indent+=1,n(this),this.indent-=1}write(n){if(typeof n=="function"){n(this,{execution:"sync"}),n(this,{execution:"async"});return}const l=n.split(`
184
+ `).filter(d=>d),o=Math.min(...l.map(d=>d.length-d.trimStart().length)),u=l.map(d=>d.slice(o)).map(d=>" ".repeat(this.indent*2)+d);for(const d of u)this.content.push(d)}compile(){const n=Function,i=this?.args,o=[...(this?.content??[""]).map(u=>` ${u}`)];return new n(...i,o.join(`
185
+ `))}}const P2={major:4,minor:3,patch:6},yt=J("$ZodType",(e,n)=>{var i;e??(e={}),e._zod.def=n,e._zod.bag=e._zod.bag||{},e._zod.version=P2;const l=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&l.unshift(e);for(const o of l)for(const u of o._zod.onattach)u(e);if(l.length===0)(i=e._zod).deferred??(i.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const o=(d,m,g)=>{let p=La(d),b;for(const v of m){if(v._zod.def.when){if(!v._zod.def.when(d))continue}else if(p)continue;const w=d.issues.length,N=v._zod.check(d);if(N instanceof Promise&&g?.async===!1)throw new Ia;if(b||N instanceof Promise)b=(b??Promise.resolve()).then(async()=>{await N,d.issues.length!==w&&(p||(p=La(d,w)))});else{if(d.issues.length===w)continue;p||(p=La(d,w))}}return b?b.then(()=>d):d},u=(d,m,g)=>{if(La(d))return d.aborted=!0,d;const p=o(m,l,g);if(p instanceof Promise){if(g.async===!1)throw new Ia;return p.then(b=>e._zod.parse(b,g))}return e._zod.parse(p,g)};e._zod.run=(d,m)=>{if(m.skipChecks)return e._zod.parse(d,m);if(m.direction==="backward"){const p=e._zod.parse({value:d.value,issues:[]},{...m,skipChecks:!0});return p instanceof Promise?p.then(b=>u(b,d,m)):u(p,d,m)}const g=e._zod.parse(d,m);if(g instanceof Promise){if(m.async===!1)throw new Ia;return g.then(p=>o(p,l,m))}return o(g,l,m)}}Fe(e,"~standard",()=>({validate:o=>{try{const u=e2(e,o);return u.success?{value:u.data}:{issues:u.error?.issues}}catch{return t2(e,o).then(d=>d.success?{value:d.data}:{issues:d.error?.issues})}},vendor:"zod",version:1}))}),nh=J("$ZodString",(e,n)=>{yt.init(e,n),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??A2(e._zod.bag),e._zod.parse=(i,l)=>{if(n.coerce)try{i.value=String(i.value)}catch{}return typeof i.value=="string"||i.issues.push({expected:"string",code:"invalid_type",input:i.value,inst:e}),i}}),gt=J("$ZodStringFormat",(e,n)=>{xc.init(e,n),nh.init(e,n)}),Q2=J("$ZodGUID",(e,n)=>{n.pattern??(n.pattern=y2),gt.init(e,n)}),X2=J("$ZodUUID",(e,n)=>{if(n.version){const l={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[n.version];if(l===void 0)throw new Error(`Invalid UUID version: "${n.version}"`);n.pattern??(n.pattern=Uy(l))}else n.pattern??(n.pattern=Uy());gt.init(e,n)}),J2=J("$ZodEmail",(e,n)=>{n.pattern??(n.pattern=v2),gt.init(e,n)}),F2=J("$ZodURL",(e,n)=>{gt.init(e,n),e._zod.check=i=>{try{const l=i.value.trim(),o=new URL(l);n.hostname&&(n.hostname.lastIndex=0,n.hostname.test(o.hostname)||i.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:n.hostname.source,input:i.value,inst:e,continue:!n.abort})),n.protocol&&(n.protocol.lastIndex=0,n.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||i.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:n.protocol.source,input:i.value,inst:e,continue:!n.abort})),n.normalize?i.value=o.href:i.value=l;return}catch{i.issues.push({code:"invalid_format",format:"url",input:i.value,inst:e,continue:!n.abort})}}}),W2=J("$ZodEmoji",(e,n)=>{n.pattern??(n.pattern=x2()),gt.init(e,n)}),ek=J("$ZodNanoID",(e,n)=>{n.pattern??(n.pattern=p2),gt.init(e,n)}),tk=J("$ZodCUID",(e,n)=>{n.pattern??(n.pattern=u2),gt.init(e,n)}),nk=J("$ZodCUID2",(e,n)=>{n.pattern??(n.pattern=d2),gt.init(e,n)}),sk=J("$ZodULID",(e,n)=>{n.pattern??(n.pattern=f2),gt.init(e,n)}),ik=J("$ZodXID",(e,n)=>{n.pattern??(n.pattern=h2),gt.init(e,n)}),ak=J("$ZodKSUID",(e,n)=>{n.pattern??(n.pattern=m2),gt.init(e,n)}),lk=J("$ZodISODateTime",(e,n)=>{n.pattern??(n.pattern=E2(n)),gt.init(e,n)}),rk=J("$ZodISODate",(e,n)=>{n.pattern??(n.pattern=_2),gt.init(e,n)}),ok=J("$ZodISOTime",(e,n)=>{n.pattern??(n.pattern=C2(n)),gt.init(e,n)}),ck=J("$ZodISODuration",(e,n)=>{n.pattern??(n.pattern=g2),gt.init(e,n)}),uk=J("$ZodIPv4",(e,n)=>{n.pattern??(n.pattern=S2),gt.init(e,n),e._zod.bag.format="ipv4"}),dk=J("$ZodIPv6",(e,n)=>{n.pattern??(n.pattern=w2),gt.init(e,n),e._zod.bag.format="ipv6",e._zod.check=i=>{try{new URL(`http://[${i.value}]`)}catch{i.issues.push({code:"invalid_format",format:"ipv6",input:i.value,inst:e,continue:!n.abort})}}}),fk=J("$ZodCIDRv4",(e,n)=>{n.pattern??(n.pattern=j2),gt.init(e,n)}),hk=J("$ZodCIDRv6",(e,n)=>{n.pattern??(n.pattern=N2),gt.init(e,n),e._zod.check=i=>{const l=i.value.split("/");try{if(l.length!==2)throw new Error;const[o,u]=l;if(!u)throw new Error;const d=Number(u);if(`${d}`!==u)throw new Error;if(d<0||d>128)throw new Error;new URL(`http://[${o}]`)}catch{i.issues.push({code:"invalid_format",format:"cidrv6",input:i.value,inst:e,continue:!n.abort})}}});function nb(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const mk=J("$ZodBase64",(e,n)=>{n.pattern??(n.pattern=k2),gt.init(e,n),e._zod.bag.contentEncoding="base64",e._zod.check=i=>{nb(i.value)||i.issues.push({code:"invalid_format",format:"base64",input:i.value,inst:e,continue:!n.abort})}});function pk(e){if(!Qv.test(e))return!1;const n=e.replace(/[-_]/g,l=>l==="-"?"+":"/"),i=n.padEnd(Math.ceil(n.length/4)*4,"=");return nb(i)}const gk=J("$ZodBase64URL",(e,n)=>{n.pattern??(n.pattern=Qv),gt.init(e,n),e._zod.bag.contentEncoding="base64url",e._zod.check=i=>{pk(i.value)||i.issues.push({code:"invalid_format",format:"base64url",input:i.value,inst:e,continue:!n.abort})}}),yk=J("$ZodE164",(e,n)=>{n.pattern??(n.pattern=z2),gt.init(e,n)});function vk(e,n=null){try{const i=e.split(".");if(i.length!==3)return!1;const[l]=i;if(!l)return!1;const o=JSON.parse(atob(l));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||n&&(!("alg"in o)||o.alg!==n))}catch{return!1}}const bk=J("$ZodJWT",(e,n)=>{gt.init(e,n),e._zod.check=i=>{vk(i.value,n.alg)||i.issues.push({code:"invalid_format",format:"jwt",input:i.value,inst:e,continue:!n.abort})}}),sb=J("$ZodNumber",(e,n)=>{yt.init(e,n),e._zod.pattern=e._zod.bag.pattern??Fv,e._zod.parse=(i,l)=>{if(n.coerce)try{i.value=Number(i.value)}catch{}const o=i.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return i;const u=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return i.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...u?{received:u}:{}}),i}}),xk=J("$ZodNumberFormat",(e,n)=>{M2.init(e,n),sb.init(e,n)}),Sk=J("$ZodBoolean",(e,n)=>{yt.init(e,n),e._zod.pattern=O2,e._zod.parse=(i,l)=>{if(n.coerce)try{i.value=!!i.value}catch{}const o=i.value;return typeof o=="boolean"||i.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),i}}),wk=J("$ZodUnknown",(e,n)=>{yt.init(e,n),e._zod.parse=i=>i}),jk=J("$ZodNever",(e,n)=>{yt.init(e,n),e._zod.parse=(i,l)=>(i.issues.push({expected:"never",code:"invalid_type",input:i.value,inst:e}),i)});function By(e,n,i){e.issues.length&&n.issues.push(...Ma(i,e.issues)),n.value[i]=e.value}const Nk=J("$ZodArray",(e,n)=>{yt.init(e,n),e._zod.parse=(i,l)=>{const o=i.value;if(!Array.isArray(o))return i.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),i;i.value=Array(o.length);const u=[];for(let d=0;d<o.length;d++){const m=o[d],g=n.element._zod.run({value:m,issues:[]},l);g instanceof Promise?u.push(g.then(p=>By(p,i,d))):By(g,i,d)}return u.length?Promise.all(u).then(()=>i):i}});function Xo(e,n,i,l,o){if(e.issues.length){if(o&&!(i in l))return;n.issues.push(...Ma(i,e.issues))}e.value===void 0?i in l&&(n.value[i]=void 0):n.value[i]=e.value}function ib(e){const n=Object.keys(e.shape);for(const l of n)if(!e.shape?.[l]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${l}": expected a Zod schema`);const i=H1(e.shape);return{...e,keys:n,keySet:new Set(n),numKeys:n.length,optionalKeys:new Set(i)}}function ab(e,n,i,l,o,u){const d=[],m=o.keySet,g=o.catchall._zod,p=g.def.type,b=g.optout==="optional";for(const v in n){if(m.has(v))continue;if(p==="never"){d.push(v);continue}const w=g.run({value:n[v],issues:[]},l);w instanceof Promise?e.push(w.then(N=>Xo(N,i,v,n,b))):Xo(w,i,v,n,b)}return d.length&&i.issues.push({code:"unrecognized_keys",keys:d,input:n,inst:u}),e.length?Promise.all(e).then(()=>i):i}const kk=J("$ZodObject",(e,n)=>{if(yt.init(e,n),!Object.getOwnPropertyDescriptor(n,"shape")?.get){const m=n.shape;Object.defineProperty(n,"shape",{get:()=>{const g={...m};return Object.defineProperty(n,"shape",{value:g}),g}})}const l=Xf(()=>ib(n));Fe(e._zod,"propValues",()=>{const m=n.shape,g={};for(const p in m){const b=m[p]._zod;if(b.values){g[p]??(g[p]=new Set);for(const v of b.values)g[p].add(v)}}return g});const o=Qo,u=n.catchall;let d;e._zod.parse=(m,g)=>{d??(d=l.value);const p=m.value;if(!o(p))return m.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),m;m.value={};const b=[],v=d.shape;for(const w of d.keys){const N=v[w],z=N._zod.optout==="optional",j=N._zod.run({value:p[w],issues:[]},g);j instanceof Promise?b.push(j.then(k=>Xo(k,m,w,p,z))):Xo(j,m,w,p,z)}return u?ab(b,p,m,g,l.value,e):b.length?Promise.all(b).then(()=>m):m}}),zk=J("$ZodObjectJIT",(e,n)=>{kk.init(e,n);const i=e._zod.parse,l=Xf(()=>ib(n)),o=w=>{const N=new V2(["shape","payload","ctx"]),z=l.value,j=O=>{const D=$y(O);return`shape[${D}]._zod.run({ value: input[${D}], issues: [] }, ctx)`};N.write("const input = payload.value;");const k=Object.create(null);let A=0;for(const O of z.keys)k[O]=`key_${A++}`;N.write("const newResult = {};");for(const O of z.keys){const D=k[O],M=$y(O),V=w[O]?._zod?.optout==="optional";N.write(`const ${D} = ${j(O)};`),V?N.write(`
186
+ if (${D}.issues.length) {
187
+ if (${M} in input) {
188
+ payload.issues = payload.issues.concat(${D}.issues.map(iss => ({
189
+ ...iss,
190
+ path: iss.path ? [${M}, ...iss.path] : [${M}]
191
+ })));
192
+ }
193
+ }
194
+
195
+ if (${D}.value === undefined) {
196
+ if (${M} in input) {
197
+ newResult[${M}] = undefined;
198
+ }
199
+ } else {
200
+ newResult[${M}] = ${D}.value;
201
+ }
202
+
203
+ `):N.write(`
204
+ if (${D}.issues.length) {
205
+ payload.issues = payload.issues.concat(${D}.issues.map(iss => ({
206
+ ...iss,
207
+ path: iss.path ? [${M}, ...iss.path] : [${M}]
208
+ })));
209
+ }
210
+
211
+ if (${D}.value === undefined) {
212
+ if (${M} in input) {
213
+ newResult[${M}] = undefined;
214
+ }
215
+ } else {
216
+ newResult[${M}] = ${D}.value;
217
+ }
218
+
219
+ `)}N.write("payload.value = newResult;"),N.write("return payload;");const E=N.compile();return(O,D)=>E(w,O,D)};let u;const d=Qo,m=!Zv.jitless,p=m&&q1.value,b=n.catchall;let v;e._zod.parse=(w,N)=>{v??(v=l.value);const z=w.value;return d(z)?m&&p&&N?.async===!1&&N.jitless!==!0?(u||(u=o(n.shape)),w=u(w,N),b?ab([],z,w,N,v,e):w):i(w,N):(w.issues.push({expected:"object",code:"invalid_type",input:z,inst:e}),w)}});function Iy(e,n,i,l){for(const u of e)if(u.issues.length===0)return n.value=u.value,n;const o=e.filter(u=>!La(u));return o.length===1?(n.value=o[0].value,o[0]):(n.issues.push({code:"invalid_union",input:n.value,inst:i,errors:e.map(u=>u.issues.map(d=>ci(d,l,oi())))}),n)}const _k=J("$ZodUnion",(e,n)=>{yt.init(e,n),Fe(e._zod,"optin",()=>n.options.some(o=>o._zod.optin==="optional")?"optional":void 0),Fe(e._zod,"optout",()=>n.options.some(o=>o._zod.optout==="optional")?"optional":void 0),Fe(e._zod,"values",()=>{if(n.options.every(o=>o._zod.values))return new Set(n.options.flatMap(o=>Array.from(o._zod.values)))}),Fe(e._zod,"pattern",()=>{if(n.options.every(o=>o._zod.pattern)){const o=n.options.map(u=>u._zod.pattern);return new RegExp(`^(${o.map(u=>Ff(u.source)).join("|")})$`)}});const i=n.options.length===1,l=n.options[0]._zod.run;e._zod.parse=(o,u)=>{if(i)return l(o,u);let d=!1;const m=[];for(const g of n.options){const p=g._zod.run({value:o.value,issues:[]},u);if(p instanceof Promise)m.push(p),d=!0;else{if(p.issues.length===0)return p;m.push(p)}}return d?Promise.all(m).then(g=>Iy(g,o,e,u)):Iy(m,o,e,u)}}),Ck=J("$ZodIntersection",(e,n)=>{yt.init(e,n),e._zod.parse=(i,l)=>{const o=i.value,u=n.left._zod.run({value:o,issues:[]},l),d=n.right._zod.run({value:o,issues:[]},l);return u instanceof Promise||d instanceof Promise?Promise.all([u,d]).then(([g,p])=>qy(i,g,p)):qy(i,u,d)}});function gf(e,n){if(e===n)return{valid:!0,data:e};if(e instanceof Date&&n instanceof Date&&+e==+n)return{valid:!0,data:e};if(Ga(e)&&Ga(n)){const i=Object.keys(n),l=Object.keys(e).filter(u=>i.indexOf(u)!==-1),o={...e,...n};for(const u of l){const d=gf(e[u],n[u]);if(!d.valid)return{valid:!1,mergeErrorPath:[u,...d.mergeErrorPath]};o[u]=d.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(n)){if(e.length!==n.length)return{valid:!1,mergeErrorPath:[]};const i=[];for(let l=0;l<e.length;l++){const o=e[l],u=n[l],d=gf(o,u);if(!d.valid)return{valid:!1,mergeErrorPath:[l,...d.mergeErrorPath]};i.push(d.data)}return{valid:!0,data:i}}return{valid:!1,mergeErrorPath:[]}}function qy(e,n,i){const l=new Map;let o;for(const m of n.issues)if(m.code==="unrecognized_keys"){o??(o=m);for(const g of m.keys)l.has(g)||l.set(g,{}),l.get(g).l=!0}else e.issues.push(m);for(const m of i.issues)if(m.code==="unrecognized_keys")for(const g of m.keys)l.has(g)||l.set(g,{}),l.get(g).r=!0;else e.issues.push(m);const u=[...l].filter(([,m])=>m.l&&m.r).map(([m])=>m);if(u.length&&o&&e.issues.push({...o,keys:u}),La(e))return e;const d=gf(n.value,i.value);if(!d.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(d.mergeErrorPath)}`);return e.value=d.data,e}const Ek=J("$ZodRecord",(e,n)=>{yt.init(e,n),e._zod.parse=(i,l)=>{const o=i.value;if(!Ga(o))return i.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),i;const u=[],d=n.keyType._zod.values;if(d){i.value={};const m=new Set;for(const p of d)if(typeof p=="string"||typeof p=="number"||typeof p=="symbol"){m.add(typeof p=="number"?p.toString():p);const b=n.valueType._zod.run({value:o[p],issues:[]},l);b instanceof Promise?u.push(b.then(v=>{v.issues.length&&i.issues.push(...Ma(p,v.issues)),i.value[p]=v.value})):(b.issues.length&&i.issues.push(...Ma(p,b.issues)),i.value[p]=b.value)}let g;for(const p in o)m.has(p)||(g=g??[],g.push(p));g&&g.length>0&&i.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:g})}else{i.value={};for(const m of Reflect.ownKeys(o)){if(m==="__proto__")continue;let g=n.keyType._zod.run({value:m,issues:[]},l);if(g instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof m=="string"&&Fv.test(m)&&g.issues.length){const v=n.keyType._zod.run({value:Number(m),issues:[]},l);if(v instanceof Promise)throw new Error("Async schemas not supported in object keys currently");v.issues.length===0&&(g=v)}if(g.issues.length){n.mode==="loose"?i.value[m]=o[m]:i.issues.push({code:"invalid_key",origin:"record",issues:g.issues.map(v=>ci(v,l,oi())),input:m,path:[m],inst:e});continue}const b=n.valueType._zod.run({value:o[m],issues:[]},l);b instanceof Promise?u.push(b.then(v=>{v.issues.length&&i.issues.push(...Ma(m,v.issues)),i.value[g.value]=v.value})):(b.issues.length&&i.issues.push(...Ma(m,b.issues)),i.value[g.value]=b.value)}}return u.length?Promise.all(u).then(()=>i):i}}),Ak=J("$ZodEnum",(e,n)=>{yt.init(e,n);const i=Hv(n.entries),l=new Set(i);e._zod.values=l,e._zod.pattern=new RegExp(`^(${i.filter(o=>Z1.has(typeof o)).map(o=>typeof o=="string"?Ka(o):o.toString()).join("|")})$`),e._zod.parse=(o,u)=>{const d=o.value;return l.has(d)||o.issues.push({code:"invalid_value",values:i,input:d,inst:e}),o}}),Tk=J("$ZodLiteral",(e,n)=>{if(yt.init(e,n),n.values.length===0)throw new Error("Cannot create literal schema with no valid values");const i=new Set(n.values);e._zod.values=i,e._zod.pattern=new RegExp(`^(${n.values.map(l=>typeof l=="string"?Ka(l):l?Ka(l.toString()):String(l)).join("|")})$`),e._zod.parse=(l,o)=>{const u=l.value;return i.has(u)||l.issues.push({code:"invalid_value",values:n.values,input:u,inst:e}),l}}),Ok=J("$ZodTransform",(e,n)=>{yt.init(e,n),e._zod.parse=(i,l)=>{if(l.direction==="backward")throw new qv(e.constructor.name);const o=n.transform(i.value,i);if(l.async)return(o instanceof Promise?o:Promise.resolve(o)).then(d=>(i.value=d,i));if(o instanceof Promise)throw new Ia;return i.value=o,i}});function Zy(e,n){return e.issues.length&&n===void 0?{issues:[],value:void 0}:e}const lb=J("$ZodOptional",(e,n)=>{yt.init(e,n),e._zod.optin="optional",e._zod.optout="optional",Fe(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,void 0]):void 0),Fe(e._zod,"pattern",()=>{const i=n.innerType._zod.pattern;return i?new RegExp(`^(${Ff(i.source)})?$`):void 0}),e._zod.parse=(i,l)=>{if(n.innerType._zod.optin==="optional"){const o=n.innerType._zod.run(i,l);return o instanceof Promise?o.then(u=>Zy(u,i.value)):Zy(o,i.value)}return i.value===void 0?i:n.innerType._zod.run(i,l)}}),Dk=J("$ZodExactOptional",(e,n)=>{lb.init(e,n),Fe(e._zod,"values",()=>n.innerType._zod.values),Fe(e._zod,"pattern",()=>n.innerType._zod.pattern),e._zod.parse=(i,l)=>n.innerType._zod.run(i,l)}),Rk=J("$ZodNullable",(e,n)=>{yt.init(e,n),Fe(e._zod,"optin",()=>n.innerType._zod.optin),Fe(e._zod,"optout",()=>n.innerType._zod.optout),Fe(e._zod,"pattern",()=>{const i=n.innerType._zod.pattern;return i?new RegExp(`^(${Ff(i.source)}|null)$`):void 0}),Fe(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,null]):void 0),e._zod.parse=(i,l)=>i.value===null?i:n.innerType._zod.run(i,l)}),Lk=J("$ZodDefault",(e,n)=>{yt.init(e,n),e._zod.optin="optional",Fe(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(i,l)=>{if(l.direction==="backward")return n.innerType._zod.run(i,l);if(i.value===void 0)return i.value=n.defaultValue,i;const o=n.innerType._zod.run(i,l);return o instanceof Promise?o.then(u=>Hy(u,n)):Hy(o,n)}});function Hy(e,n){return e.value===void 0&&(e.value=n.defaultValue),e}const Mk=J("$ZodPrefault",(e,n)=>{yt.init(e,n),e._zod.optin="optional",Fe(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(i,l)=>(l.direction==="backward"||i.value===void 0&&(i.value=n.defaultValue),n.innerType._zod.run(i,l))}),$k=J("$ZodNonOptional",(e,n)=>{yt.init(e,n),Fe(e._zod,"values",()=>{const i=n.innerType._zod.values;return i?new Set([...i].filter(l=>l!==void 0)):void 0}),e._zod.parse=(i,l)=>{const o=n.innerType._zod.run(i,l);return o instanceof Promise?o.then(u=>Gy(u,e)):Gy(o,e)}});function Gy(e,n){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:n}),e}const Uk=J("$ZodCatch",(e,n)=>{yt.init(e,n),Fe(e._zod,"optin",()=>n.innerType._zod.optin),Fe(e._zod,"optout",()=>n.innerType._zod.optout),Fe(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(i,l)=>{if(l.direction==="backward")return n.innerType._zod.run(i,l);const o=n.innerType._zod.run(i,l);return o instanceof Promise?o.then(u=>(i.value=u.value,u.issues.length&&(i.value=n.catchValue({...i,error:{issues:u.issues.map(d=>ci(d,l,oi()))},input:i.value}),i.issues=[]),i)):(i.value=o.value,o.issues.length&&(i.value=n.catchValue({...i,error:{issues:o.issues.map(u=>ci(u,l,oi()))},input:i.value}),i.issues=[]),i)}}),Bk=J("$ZodPipe",(e,n)=>{yt.init(e,n),Fe(e._zod,"values",()=>n.in._zod.values),Fe(e._zod,"optin",()=>n.in._zod.optin),Fe(e._zod,"optout",()=>n.out._zod.optout),Fe(e._zod,"propValues",()=>n.in._zod.propValues),e._zod.parse=(i,l)=>{if(l.direction==="backward"){const u=n.out._zod.run(i,l);return u instanceof Promise?u.then(d=>Lo(d,n.in,l)):Lo(u,n.in,l)}const o=n.in._zod.run(i,l);return o instanceof Promise?o.then(u=>Lo(u,n.out,l)):Lo(o,n.out,l)}});function Lo(e,n,i){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:e.value,issues:e.issues},i)}const Ik=J("$ZodReadonly",(e,n)=>{yt.init(e,n),Fe(e._zod,"propValues",()=>n.innerType._zod.propValues),Fe(e._zod,"values",()=>n.innerType._zod.values),Fe(e._zod,"optin",()=>n.innerType?._zod?.optin),Fe(e._zod,"optout",()=>n.innerType?._zod?.optout),e._zod.parse=(i,l)=>{if(l.direction==="backward")return n.innerType._zod.run(i,l);const o=n.innerType._zod.run(i,l);return o instanceof Promise?o.then(Ky):Ky(o)}});function Ky(e){return e.value=Object.freeze(e.value),e}const qk=J("$ZodCustom",(e,n)=>{mn.init(e,n),yt.init(e,n),e._zod.parse=(i,l)=>i,e._zod.check=i=>{const l=i.value,o=n.fn(l);if(o instanceof Promise)return o.then(u=>Yy(u,i,l,e));Yy(o,i,l,e)}});function Yy(e,n,i,l){if(!e){const o={code:"custom",input:i,inst:l,path:[...l._zod.def.path??[]],continue:!l._zod.def.abort};l._zod.def.params&&(o.params=l._zod.def.params),n.issues.push(er(o))}}var Vy;class Zk{constructor(){this._map=new WeakMap,this._idmap=new Map}add(n,...i){const l=i[0];return this._map.set(n,l),l&&typeof l=="object"&&"id"in l&&this._idmap.set(l.id,n),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(n){const i=this._map.get(n);return i&&typeof i=="object"&&"id"in i&&this._idmap.delete(i.id),this._map.delete(n),this}get(n){const i=n._zod.parent;if(i){const l={...this.get(i)??{}};delete l.id;const o={...l,...this._map.get(n)};return Object.keys(o).length?o:void 0}return this._map.get(n)}has(n){return this._map.has(n)}}function Hk(){return new Zk}(Vy=globalThis).__zod_globalRegistry??(Vy.__zod_globalRegistry=Hk());const Vl=globalThis.__zod_globalRegistry;function Gk(e,n){return new e({type:"string",...be(n)})}function Kk(e,n){return new e({type:"string",format:"email",check:"string_format",abort:!1,...be(n)})}function Py(e,n){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...be(n)})}function Yk(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...be(n)})}function Vk(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...be(n)})}function Pk(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...be(n)})}function Qk(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...be(n)})}function Xk(e,n){return new e({type:"string",format:"url",check:"string_format",abort:!1,...be(n)})}function Jk(e,n){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...be(n)})}function Fk(e,n){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...be(n)})}function Wk(e,n){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...be(n)})}function ez(e,n){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...be(n)})}function tz(e,n){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...be(n)})}function nz(e,n){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...be(n)})}function sz(e,n){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...be(n)})}function iz(e,n){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...be(n)})}function az(e,n){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...be(n)})}function lz(e,n){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...be(n)})}function rz(e,n){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...be(n)})}function oz(e,n){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...be(n)})}function cz(e,n){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...be(n)})}function uz(e,n){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...be(n)})}function dz(e,n){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...be(n)})}function fz(e,n){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...be(n)})}function hz(e,n){return new e({type:"string",format:"date",check:"string_format",...be(n)})}function mz(e,n){return new e({type:"string",format:"time",check:"string_format",precision:null,...be(n)})}function pz(e,n){return new e({type:"string",format:"duration",check:"string_format",...be(n)})}function gz(e,n){return new e({type:"number",checks:[],...be(n)})}function yz(e,n){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...be(n)})}function vz(e,n){return new e({type:"boolean",...be(n)})}function bz(e){return new e({type:"unknown"})}function xz(e,n){return new e({type:"never",...be(n)})}function Qy(e,n){return new eb({check:"less_than",...be(n),value:e,inclusive:!1})}function tf(e,n){return new eb({check:"less_than",...be(n),value:e,inclusive:!0})}function Xy(e,n){return new tb({check:"greater_than",...be(n),value:e,inclusive:!1})}function nf(e,n){return new tb({check:"greater_than",...be(n),value:e,inclusive:!0})}function Jy(e,n){return new L2({check:"multiple_of",...be(n),value:e})}function rb(e,n){return new $2({check:"max_length",...be(n),maximum:e})}function Jo(e,n){return new U2({check:"min_length",...be(n),minimum:e})}function ob(e,n){return new B2({check:"length_equals",...be(n),length:e})}function Sz(e,n){return new I2({check:"string_format",format:"regex",...be(n),pattern:e})}function wz(e){return new q2({check:"string_format",format:"lowercase",...be(e)})}function jz(e){return new Z2({check:"string_format",format:"uppercase",...be(e)})}function Nz(e,n){return new H2({check:"string_format",format:"includes",...be(n),includes:e})}function kz(e,n){return new G2({check:"string_format",format:"starts_with",...be(n),prefix:e})}function zz(e,n){return new K2({check:"string_format",format:"ends_with",...be(n),suffix:e})}function Xa(e){return new Y2({check:"overwrite",tx:e})}function _z(e){return Xa(n=>n.normalize(e))}function Cz(){return Xa(e=>e.trim())}function Ez(){return Xa(e=>e.toLowerCase())}function Az(){return Xa(e=>e.toUpperCase())}function Tz(){return Xa(e=>I1(e))}function Oz(e,n,i){return new e({type:"array",element:n,...be(i)})}function Dz(e,n,i){return new e({type:"custom",check:"custom",fn:n,...be(i)})}function Rz(e){const n=Lz(i=>(i.addIssue=l=>{if(typeof l=="string")i.issues.push(er(l,i.value,n._zod.def));else{const o=l;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=i.value),o.inst??(o.inst=n),o.continue??(o.continue=!n._zod.def.abort),i.issues.push(er(o))}},e(i.value,i)));return n}function Lz(e,n){const i=new mn({check:"custom",...be(n)});return i._zod.check=e,i}function cb(e){let n=e?.target??"draft-2020-12";return n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Vl,target:n,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function $t(e,n,i={path:[],schemaPath:[]}){var l;const o=e._zod.def,u=n.seen.get(e);if(u)return u.count++,i.schemaPath.includes(e)&&(u.cycle=i.path),u.schema;const d={schema:{},count:1,cycle:void 0,path:i.path};n.seen.set(e,d);const m=e._zod.toJSONSchema?.();if(m)d.schema=m;else{const b={...i,schemaPath:[...i.schemaPath,e],path:i.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(n,d.schema,b);else{const w=d.schema,N=n.processors[o.type];if(!N)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);N(e,n,w,b)}const v=e._zod.parent;v&&(d.ref||(d.ref=v),$t(v,n,b),n.seen.get(v).isParent=!0)}const g=n.metadataRegistry.get(e);return g&&Object.assign(d.schema,g),n.io==="input"&&sn(e)&&(delete d.schema.examples,delete d.schema.default),n.io==="input"&&d.schema._prefault&&((l=d.schema).default??(l.default=d.schema._prefault)),delete d.schema._prefault,n.seen.get(e).schema}function ub(e,n){const i=e.seen.get(n);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");const l=new Map;for(const d of e.seen.entries()){const m=e.metadataRegistry.get(d[0])?.id;if(m){const g=l.get(m);if(g&&g!==d[0])throw new Error(`Duplicate schema id "${m}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);l.set(m,d[0])}}const o=d=>{const m=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const v=e.external.registry.get(d[0])?.id,w=e.external.uri??(z=>z);if(v)return{ref:w(v)};const N=d[1].defId??d[1].schema.id??`schema${e.counter++}`;return d[1].defId=N,{defId:N,ref:`${w("__shared")}#/${m}/${N}`}}if(d[1]===i)return{ref:"#"};const p=`#/${m}/`,b=d[1].schema.id??`__schema${e.counter++}`;return{defId:b,ref:p+b}},u=d=>{if(d[1].schema.$ref)return;const m=d[1],{ref:g,defId:p}=o(d);m.def={...m.schema},p&&(m.defId=p);const b=m.schema;for(const v in b)delete b[v];b.$ref=g};if(e.cycles==="throw")for(const d of e.seen.entries()){const m=d[1];if(m.cycle)throw new Error(`Cycle detected: #/${m.cycle?.join("/")}/<root>
220
+
221
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const d of e.seen.entries()){const m=d[1];if(n===d[0]){u(d);continue}if(e.external){const p=e.external.registry.get(d[0])?.id;if(n!==d[0]&&p){u(d);continue}}if(e.metadataRegistry.get(d[0])?.id){u(d);continue}if(m.cycle){u(d);continue}if(m.count>1&&e.reused==="ref"){u(d);continue}}}function db(e,n){const i=e.seen.get(n);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");const l=d=>{const m=e.seen.get(d);if(m.ref===null)return;const g=m.def??m.schema,p={...g},b=m.ref;if(m.ref=null,b){l(b);const w=e.seen.get(b),N=w.schema;if(N.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(g.allOf=g.allOf??[],g.allOf.push(N)):Object.assign(g,N),Object.assign(g,p),d._zod.parent===b)for(const j in g)j==="$ref"||j==="allOf"||j in p||delete g[j];if(N.$ref&&w.def)for(const j in g)j==="$ref"||j==="allOf"||j in w.def&&JSON.stringify(g[j])===JSON.stringify(w.def[j])&&delete g[j]}const v=d._zod.parent;if(v&&v!==b){l(v);const w=e.seen.get(v);if(w?.schema.$ref&&(g.$ref=w.schema.$ref,w.def))for(const N in g)N==="$ref"||N==="allOf"||N in w.def&&JSON.stringify(g[N])===JSON.stringify(w.def[N])&&delete g[N]}e.override({zodSchema:d,jsonSchema:g,path:m.path??[]})};for(const d of[...e.seen.entries()].reverse())l(d[0]);const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const d=e.external.registry.get(n)?.id;if(!d)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(d)}Object.assign(o,i.def??i.schema);const u=e.external?.defs??{};for(const d of e.seen.entries()){const m=d[1];m.def&&m.defId&&(u[m.defId]=m.def)}e.external||Object.keys(u).length>0&&(e.target==="draft-2020-12"?o.$defs=u:o.definitions=u);try{const d=JSON.parse(JSON.stringify(o));return Object.defineProperty(d,"~standard",{value:{...n["~standard"],jsonSchema:{input:Fo(n,"input",e.processors),output:Fo(n,"output",e.processors)}},enumerable:!1,writable:!1}),d}catch{throw new Error("Error converting schema to JSON.")}}function sn(e,n){const i=n??{seen:new Set};if(i.seen.has(e))return!1;i.seen.add(e);const l=e._zod.def;if(l.type==="transform")return!0;if(l.type==="array")return sn(l.element,i);if(l.type==="set")return sn(l.valueType,i);if(l.type==="lazy")return sn(l.getter(),i);if(l.type==="promise"||l.type==="optional"||l.type==="nonoptional"||l.type==="nullable"||l.type==="readonly"||l.type==="default"||l.type==="prefault")return sn(l.innerType,i);if(l.type==="intersection")return sn(l.left,i)||sn(l.right,i);if(l.type==="record"||l.type==="map")return sn(l.keyType,i)||sn(l.valueType,i);if(l.type==="pipe")return sn(l.in,i)||sn(l.out,i);if(l.type==="object"){for(const o in l.shape)if(sn(l.shape[o],i))return!0;return!1}if(l.type==="union"){for(const o of l.options)if(sn(o,i))return!0;return!1}if(l.type==="tuple"){for(const o of l.items)if(sn(o,i))return!0;return!!(l.rest&&sn(l.rest,i))}return!1}const Mz=(e,n={})=>i=>{const l=cb({...i,processors:n});return $t(e,l),ub(l,e),db(l,e)},Fo=(e,n,i={})=>l=>{const{libraryOptions:o,target:u}=l??{},d=cb({...o??{},target:u,io:n,processors:i});return $t(e,d),ub(d,e),db(d,e)},$z={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Uz=(e,n,i,l)=>{const o=i;o.type="string";const{minimum:u,maximum:d,format:m,patterns:g,contentEncoding:p}=e._zod.bag;if(typeof u=="number"&&(o.minLength=u),typeof d=="number"&&(o.maxLength=d),m&&(o.format=$z[m]??m,o.format===""&&delete o.format,m==="time"&&delete o.format),p&&(o.contentEncoding=p),g&&g.size>0){const b=[...g];b.length===1?o.pattern=b[0].source:b.length>1&&(o.allOf=[...b.map(v=>({...n.target==="draft-07"||n.target==="draft-04"||n.target==="openapi-3.0"?{type:"string"}:{},pattern:v.source}))])}},Bz=(e,n,i,l)=>{const o=i,{minimum:u,maximum:d,format:m,multipleOf:g,exclusiveMaximum:p,exclusiveMinimum:b}=e._zod.bag;typeof m=="string"&&m.includes("int")?o.type="integer":o.type="number",typeof b=="number"&&(n.target==="draft-04"||n.target==="openapi-3.0"?(o.minimum=b,o.exclusiveMinimum=!0):o.exclusiveMinimum=b),typeof u=="number"&&(o.minimum=u,typeof b=="number"&&n.target!=="draft-04"&&(b>=u?delete o.minimum:delete o.exclusiveMinimum)),typeof p=="number"&&(n.target==="draft-04"||n.target==="openapi-3.0"?(o.maximum=p,o.exclusiveMaximum=!0):o.exclusiveMaximum=p),typeof d=="number"&&(o.maximum=d,typeof p=="number"&&n.target!=="draft-04"&&(p<=d?delete o.maximum:delete o.exclusiveMaximum)),typeof g=="number"&&(o.multipleOf=g)},Iz=(e,n,i,l)=>{i.type="boolean"},qz=(e,n,i,l)=>{i.not={}},Zz=(e,n,i,l)=>{},Hz=(e,n,i,l)=>{const o=e._zod.def,u=Hv(o.entries);u.every(d=>typeof d=="number")&&(i.type="number"),u.every(d=>typeof d=="string")&&(i.type="string"),i.enum=u},Gz=(e,n,i,l)=>{const o=e._zod.def,u=[];for(const d of o.values)if(d===void 0){if(n.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof d=="bigint"){if(n.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");u.push(Number(d))}else u.push(d);if(u.length!==0)if(u.length===1){const d=u[0];i.type=d===null?"null":typeof d,n.target==="draft-04"||n.target==="openapi-3.0"?i.enum=[d]:i.const=d}else u.every(d=>typeof d=="number")&&(i.type="number"),u.every(d=>typeof d=="string")&&(i.type="string"),u.every(d=>typeof d=="boolean")&&(i.type="boolean"),u.every(d=>d===null)&&(i.type="null"),i.enum=u},Kz=(e,n,i,l)=>{if(n.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Yz=(e,n,i,l)=>{if(n.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Vz=(e,n,i,l)=>{const o=i,u=e._zod.def,{minimum:d,maximum:m}=e._zod.bag;typeof d=="number"&&(o.minItems=d),typeof m=="number"&&(o.maxItems=m),o.type="array",o.items=$t(u.element,n,{...l,path:[...l.path,"items"]})},Pz=(e,n,i,l)=>{const o=i,u=e._zod.def;o.type="object",o.properties={};const d=u.shape;for(const p in d)o.properties[p]=$t(d[p],n,{...l,path:[...l.path,"properties",p]});const m=new Set(Object.keys(d)),g=new Set([...m].filter(p=>{const b=u.shape[p]._zod;return n.io==="input"?b.optin===void 0:b.optout===void 0}));g.size>0&&(o.required=Array.from(g)),u.catchall?._zod.def.type==="never"?o.additionalProperties=!1:u.catchall?u.catchall&&(o.additionalProperties=$t(u.catchall,n,{...l,path:[...l.path,"additionalProperties"]})):n.io==="output"&&(o.additionalProperties=!1)},Qz=(e,n,i,l)=>{const o=e._zod.def,u=o.inclusive===!1,d=o.options.map((m,g)=>$t(m,n,{...l,path:[...l.path,u?"oneOf":"anyOf",g]}));u?i.oneOf=d:i.anyOf=d},Xz=(e,n,i,l)=>{const o=e._zod.def,u=$t(o.left,n,{...l,path:[...l.path,"allOf",0]}),d=$t(o.right,n,{...l,path:[...l.path,"allOf",1]}),m=p=>"allOf"in p&&Object.keys(p).length===1,g=[...m(u)?u.allOf:[u],...m(d)?d.allOf:[d]];i.allOf=g},Jz=(e,n,i,l)=>{const o=i,u=e._zod.def;o.type="object";const d=u.keyType,g=d._zod.bag?.patterns;if(u.mode==="loose"&&g&&g.size>0){const b=$t(u.valueType,n,{...l,path:[...l.path,"patternProperties","*"]});o.patternProperties={};for(const v of g)o.patternProperties[v.source]=b}else(n.target==="draft-07"||n.target==="draft-2020-12")&&(o.propertyNames=$t(u.keyType,n,{...l,path:[...l.path,"propertyNames"]})),o.additionalProperties=$t(u.valueType,n,{...l,path:[...l.path,"additionalProperties"]});const p=d._zod.values;if(p){const b=[...p].filter(v=>typeof v=="string"||typeof v=="number");b.length>0&&(o.required=b)}},Fz=(e,n,i,l)=>{const o=e._zod.def,u=$t(o.innerType,n,l),d=n.seen.get(e);n.target==="openapi-3.0"?(d.ref=o.innerType,i.nullable=!0):i.anyOf=[u,{type:"null"}]},Wz=(e,n,i,l)=>{const o=e._zod.def;$t(o.innerType,n,l);const u=n.seen.get(e);u.ref=o.innerType},e_=(e,n,i,l)=>{const o=e._zod.def;$t(o.innerType,n,l);const u=n.seen.get(e);u.ref=o.innerType,i.default=JSON.parse(JSON.stringify(o.defaultValue))},t_=(e,n,i,l)=>{const o=e._zod.def;$t(o.innerType,n,l);const u=n.seen.get(e);u.ref=o.innerType,n.io==="input"&&(i._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},n_=(e,n,i,l)=>{const o=e._zod.def;$t(o.innerType,n,l);const u=n.seen.get(e);u.ref=o.innerType;let d;try{d=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}i.default=d},s_=(e,n,i,l)=>{const o=e._zod.def,u=n.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;$t(u,n,l);const d=n.seen.get(e);d.ref=u},i_=(e,n,i,l)=>{const o=e._zod.def;$t(o.innerType,n,l);const u=n.seen.get(e);u.ref=o.innerType,i.readOnly=!0},fb=(e,n,i,l)=>{const o=e._zod.def;$t(o.innerType,n,l);const u=n.seen.get(e);u.ref=o.innerType},a_=J("ZodISODateTime",(e,n)=>{lk.init(e,n),bt.init(e,n)});function l_(e){return fz(a_,e)}const r_=J("ZodISODate",(e,n)=>{rk.init(e,n),bt.init(e,n)});function o_(e){return hz(r_,e)}const c_=J("ZodISOTime",(e,n)=>{ok.init(e,n),bt.init(e,n)});function u_(e){return mz(c_,e)}const d_=J("ZodISODuration",(e,n)=>{ck.init(e,n),bt.init(e,n)});function f_(e){return pz(d_,e)}const h_=(e,n)=>{Vv.init(e,n),e.name="ZodError",Object.defineProperties(e,{format:{value:i=>W1(e,i)},flatten:{value:i=>F1(e,i)},addIssue:{value:i=>{e.issues.push(i),e.message=JSON.stringify(e.issues,pf,2)}},addIssues:{value:i=>{e.issues.push(...i),e.message=JSON.stringify(e.issues,pf,2)}},isEmpty:{get(){return e.issues.length===0}}})},Un=J("ZodError",h_,{Parent:Error}),m_=eh(Un),p_=th(Un),g_=vc(Un),y_=bc(Un),v_=n2(Un),b_=s2(Un),x_=i2(Un),S_=a2(Un),w_=l2(Un),j_=r2(Un),N_=o2(Un),k_=c2(Un),vt=J("ZodType",(e,n)=>(yt.init(e,n),Object.assign(e["~standard"],{jsonSchema:{input:Fo(e,"input"),output:Fo(e,"output")}}),e.toJSONSchema=Mz(e,{}),e.def=n,e.type=n.type,Object.defineProperty(e,"_def",{value:n}),e.check=(...i)=>e.clone(ui(n,{checks:[...n.checks??[],...i.map(l=>typeof l=="function"?{_zod:{check:l,def:{check:"custom"},onattach:[]}}:l)]}),{parent:!0}),e.with=e.check,e.clone=(i,l)=>di(e,i,l),e.brand=()=>e,e.register=((i,l)=>(i.add(e,l),e)),e.parse=(i,l)=>m_(e,i,l,{callee:e.parse}),e.safeParse=(i,l)=>g_(e,i,l),e.parseAsync=async(i,l)=>p_(e,i,l,{callee:e.parseAsync}),e.safeParseAsync=async(i,l)=>y_(e,i,l),e.spa=e.safeParseAsync,e.encode=(i,l)=>v_(e,i,l),e.decode=(i,l)=>b_(e,i,l),e.encodeAsync=async(i,l)=>x_(e,i,l),e.decodeAsync=async(i,l)=>S_(e,i,l),e.safeEncode=(i,l)=>w_(e,i,l),e.safeDecode=(i,l)=>j_(e,i,l),e.safeEncodeAsync=async(i,l)=>N_(e,i,l),e.safeDecodeAsync=async(i,l)=>k_(e,i,l),e.refine=(i,l)=>e.check(bC(i,l)),e.superRefine=i=>e.check(xC(i)),e.overwrite=i=>e.check(Xa(i)),e.optional=()=>e0(e),e.exactOptional=()=>lC(e),e.nullable=()=>t0(e),e.nullish=()=>e0(t0(e)),e.nonoptional=i=>fC(e,i),e.array=()=>ut(e),e.or=i=>F_([e,i]),e.and=i=>eC(e,i),e.transform=i=>n0(e,iC(i)),e.default=i=>cC(e,i),e.prefault=i=>dC(e,i),e.catch=i=>mC(e,i),e.pipe=i=>n0(e,i),e.readonly=()=>yC(e),e.describe=i=>{const l=e.clone();return Vl.add(l,{description:i}),l},Object.defineProperty(e,"description",{get(){return Vl.get(e)?.description},configurable:!0}),e.meta=(...i)=>{if(i.length===0)return Vl.get(e);const l=e.clone();return Vl.add(l,i[0]),l},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=i=>i(e),e)),hb=J("_ZodString",(e,n)=>{nh.init(e,n),vt.init(e,n),e._zod.processJSONSchema=(l,o,u)=>Uz(e,l,o);const i=e._zod.bag;e.format=i.format??null,e.minLength=i.minimum??null,e.maxLength=i.maximum??null,e.regex=(...l)=>e.check(Sz(...l)),e.includes=(...l)=>e.check(Nz(...l)),e.startsWith=(...l)=>e.check(kz(...l)),e.endsWith=(...l)=>e.check(zz(...l)),e.min=(...l)=>e.check(Jo(...l)),e.max=(...l)=>e.check(rb(...l)),e.length=(...l)=>e.check(ob(...l)),e.nonempty=(...l)=>e.check(Jo(1,...l)),e.lowercase=l=>e.check(wz(l)),e.uppercase=l=>e.check(jz(l)),e.trim=()=>e.check(Cz()),e.normalize=(...l)=>e.check(_z(...l)),e.toLowerCase=()=>e.check(Ez()),e.toUpperCase=()=>e.check(Az()),e.slugify=()=>e.check(Tz())}),z_=J("ZodString",(e,n)=>{nh.init(e,n),hb.init(e,n),e.email=i=>e.check(Kk(__,i)),e.url=i=>e.check(Xk(C_,i)),e.jwt=i=>e.check(dz(H_,i)),e.emoji=i=>e.check(Jk(E_,i)),e.guid=i=>e.check(Py(Fy,i)),e.uuid=i=>e.check(Yk(Mo,i)),e.uuidv4=i=>e.check(Vk(Mo,i)),e.uuidv6=i=>e.check(Pk(Mo,i)),e.uuidv7=i=>e.check(Qk(Mo,i)),e.nanoid=i=>e.check(Fk(A_,i)),e.guid=i=>e.check(Py(Fy,i)),e.cuid=i=>e.check(Wk(T_,i)),e.cuid2=i=>e.check(ez(O_,i)),e.ulid=i=>e.check(tz(D_,i)),e.base64=i=>e.check(oz(I_,i)),e.base64url=i=>e.check(cz(q_,i)),e.xid=i=>e.check(nz(R_,i)),e.ksuid=i=>e.check(sz(L_,i)),e.ipv4=i=>e.check(iz(M_,i)),e.ipv6=i=>e.check(az($_,i)),e.cidrv4=i=>e.check(lz(U_,i)),e.cidrv6=i=>e.check(rz(B_,i)),e.e164=i=>e.check(uz(Z_,i)),e.datetime=i=>e.check(l_(i)),e.date=i=>e.check(o_(i)),e.time=i=>e.check(u_(i)),e.duration=i=>e.check(f_(i))});function ee(e){return Gk(z_,e)}const bt=J("ZodStringFormat",(e,n)=>{gt.init(e,n),hb.init(e,n)}),__=J("ZodEmail",(e,n)=>{J2.init(e,n),bt.init(e,n)}),Fy=J("ZodGUID",(e,n)=>{Q2.init(e,n),bt.init(e,n)}),Mo=J("ZodUUID",(e,n)=>{X2.init(e,n),bt.init(e,n)}),C_=J("ZodURL",(e,n)=>{F2.init(e,n),bt.init(e,n)}),E_=J("ZodEmoji",(e,n)=>{W2.init(e,n),bt.init(e,n)}),A_=J("ZodNanoID",(e,n)=>{ek.init(e,n),bt.init(e,n)}),T_=J("ZodCUID",(e,n)=>{tk.init(e,n),bt.init(e,n)}),O_=J("ZodCUID2",(e,n)=>{nk.init(e,n),bt.init(e,n)}),D_=J("ZodULID",(e,n)=>{sk.init(e,n),bt.init(e,n)}),R_=J("ZodXID",(e,n)=>{ik.init(e,n),bt.init(e,n)}),L_=J("ZodKSUID",(e,n)=>{ak.init(e,n),bt.init(e,n)}),M_=J("ZodIPv4",(e,n)=>{uk.init(e,n),bt.init(e,n)}),$_=J("ZodIPv6",(e,n)=>{dk.init(e,n),bt.init(e,n)}),U_=J("ZodCIDRv4",(e,n)=>{fk.init(e,n),bt.init(e,n)}),B_=J("ZodCIDRv6",(e,n)=>{hk.init(e,n),bt.init(e,n)}),I_=J("ZodBase64",(e,n)=>{mk.init(e,n),bt.init(e,n)}),q_=J("ZodBase64URL",(e,n)=>{gk.init(e,n),bt.init(e,n)}),Z_=J("ZodE164",(e,n)=>{yk.init(e,n),bt.init(e,n)}),H_=J("ZodJWT",(e,n)=>{bk.init(e,n),bt.init(e,n)}),mb=J("ZodNumber",(e,n)=>{sb.init(e,n),vt.init(e,n),e._zod.processJSONSchema=(l,o,u)=>Bz(e,l,o),e.gt=(l,o)=>e.check(Xy(l,o)),e.gte=(l,o)=>e.check(nf(l,o)),e.min=(l,o)=>e.check(nf(l,o)),e.lt=(l,o)=>e.check(Qy(l,o)),e.lte=(l,o)=>e.check(tf(l,o)),e.max=(l,o)=>e.check(tf(l,o)),e.int=l=>e.check(Wy(l)),e.safe=l=>e.check(Wy(l)),e.positive=l=>e.check(Xy(0,l)),e.nonnegative=l=>e.check(nf(0,l)),e.negative=l=>e.check(Qy(0,l)),e.nonpositive=l=>e.check(tf(0,l)),e.multipleOf=(l,o)=>e.check(Jy(l,o)),e.step=(l,o)=>e.check(Jy(l,o)),e.finite=()=>e;const i=e._zod.bag;e.minValue=Math.max(i.minimum??Number.NEGATIVE_INFINITY,i.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(i.maximum??Number.POSITIVE_INFINITY,i.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(i.format??"").includes("int")||Number.isSafeInteger(i.multipleOf??.5),e.isFinite=!0,e.format=i.format??null});function Jt(e){return gz(mb,e)}const G_=J("ZodNumberFormat",(e,n)=>{xk.init(e,n),mb.init(e,n)});function Wy(e){return yz(G_,e)}const K_=J("ZodBoolean",(e,n)=>{Sk.init(e,n),vt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>Iz(e,i,l)});function sh(e){return vz(K_,e)}const Y_=J("ZodUnknown",(e,n)=>{wk.init(e,n),vt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>Zz()});function yf(){return bz(Y_)}const V_=J("ZodNever",(e,n)=>{jk.init(e,n),vt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>qz(e,i,l)});function P_(e){return xz(V_,e)}const Q_=J("ZodArray",(e,n)=>{Nk.init(e,n),vt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>Vz(e,i,l,o),e.element=n.element,e.min=(i,l)=>e.check(Jo(i,l)),e.nonempty=i=>e.check(Jo(1,i)),e.max=(i,l)=>e.check(rb(i,l)),e.length=(i,l)=>e.check(ob(i,l)),e.unwrap=()=>e.element});function ut(e,n){return Oz(Q_,e,n)}const X_=J("ZodObject",(e,n)=>{zk.init(e,n),vt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>Pz(e,i,l,o),Fe(e,"shape",()=>n.shape),e.keyof=()=>Qn(Object.keys(e._zod.def.shape)),e.catchall=i=>e.clone({...e._zod.def,catchall:i}),e.passthrough=()=>e.clone({...e._zod.def,catchall:yf()}),e.loose=()=>e.clone({...e._zod.def,catchall:yf()}),e.strict=()=>e.clone({...e._zod.def,catchall:P_()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=i=>V1(e,i),e.safeExtend=i=>P1(e,i),e.merge=i=>Q1(e,i),e.pick=i=>K1(e,i),e.omit=i=>Y1(e,i),e.partial=(...i)=>X1(pb,e,i[0]),e.required=(...i)=>J1(gb,e,i[0])});function dt(e,n){const i={type:"object",shape:e??{},...be(n)};return new X_(i)}const J_=J("ZodUnion",(e,n)=>{_k.init(e,n),vt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>Qz(e,i,l,o),e.options=n.options});function F_(e,n){return new J_({type:"union",options:e,...be(n)})}const W_=J("ZodIntersection",(e,n)=>{Ck.init(e,n),vt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>Xz(e,i,l,o)});function eC(e,n){return new W_({type:"intersection",left:e,right:n})}const tC=J("ZodRecord",(e,n)=>{Ek.init(e,n),vt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>Jz(e,i,l,o),e.keyType=n.keyType,e.valueType=n.valueType});function ih(e,n,i){return new tC({type:"record",keyType:e,valueType:n,...be(i)})}const vf=J("ZodEnum",(e,n)=>{Ak.init(e,n),vt.init(e,n),e._zod.processJSONSchema=(l,o,u)=>Hz(e,l,o),e.enum=n.entries,e.options=Object.values(n.entries);const i=new Set(Object.keys(n.entries));e.extract=(l,o)=>{const u={};for(const d of l)if(i.has(d))u[d]=n.entries[d];else throw new Error(`Key ${d} not found in enum`);return new vf({...n,checks:[],...be(o),entries:u})},e.exclude=(l,o)=>{const u={...n.entries};for(const d of l)if(i.has(d))delete u[d];else throw new Error(`Key ${d} not found in enum`);return new vf({...n,checks:[],...be(o),entries:u})}});function Qn(e,n){const i=Array.isArray(e)?Object.fromEntries(e.map(l=>[l,l])):e;return new vf({type:"enum",entries:i,...be(n)})}const nC=J("ZodLiteral",(e,n)=>{Tk.init(e,n),vt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>Gz(e,i,l),e.values=new Set(n.values),Object.defineProperty(e,"value",{get(){if(n.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return n.values[0]}})});function Wo(e,n){return new nC({type:"literal",values:Array.isArray(e)?e:[e],...be(n)})}const sC=J("ZodTransform",(e,n)=>{Ok.init(e,n),vt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>Yz(e,i),e._zod.parse=(i,l)=>{if(l.direction==="backward")throw new qv(e.constructor.name);i.addIssue=u=>{if(typeof u=="string")i.issues.push(er(u,i.value,n));else{const d=u;d.fatal&&(d.continue=!1),d.code??(d.code="custom"),d.input??(d.input=i.value),d.inst??(d.inst=e),i.issues.push(er(d))}};const o=n.transform(i.value,i);return o instanceof Promise?o.then(u=>(i.value=u,i)):(i.value=o,i)}});function iC(e){return new sC({type:"transform",transform:e})}const pb=J("ZodOptional",(e,n)=>{lb.init(e,n),vt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>fb(e,i,l,o),e.unwrap=()=>e._zod.def.innerType});function e0(e){return new pb({type:"optional",innerType:e})}const aC=J("ZodExactOptional",(e,n)=>{Dk.init(e,n),vt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>fb(e,i,l,o),e.unwrap=()=>e._zod.def.innerType});function lC(e){return new aC({type:"optional",innerType:e})}const rC=J("ZodNullable",(e,n)=>{Rk.init(e,n),vt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>Fz(e,i,l,o),e.unwrap=()=>e._zod.def.innerType});function t0(e){return new rC({type:"nullable",innerType:e})}const oC=J("ZodDefault",(e,n)=>{Lk.init(e,n),vt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>e_(e,i,l,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function cC(e,n){return new oC({type:"default",innerType:e,get defaultValue(){return typeof n=="function"?n():Kv(n)}})}const uC=J("ZodPrefault",(e,n)=>{Mk.init(e,n),vt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>t_(e,i,l,o),e.unwrap=()=>e._zod.def.innerType});function dC(e,n){return new uC({type:"prefault",innerType:e,get defaultValue(){return typeof n=="function"?n():Kv(n)}})}const gb=J("ZodNonOptional",(e,n)=>{$k.init(e,n),vt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>Wz(e,i,l,o),e.unwrap=()=>e._zod.def.innerType});function fC(e,n){return new gb({type:"nonoptional",innerType:e,...be(n)})}const hC=J("ZodCatch",(e,n)=>{Uk.init(e,n),vt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>n_(e,i,l,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function mC(e,n){return new hC({type:"catch",innerType:e,catchValue:typeof n=="function"?n:()=>n})}const pC=J("ZodPipe",(e,n)=>{Bk.init(e,n),vt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>s_(e,i,l,o),e.in=n.in,e.out=n.out});function n0(e,n){return new pC({type:"pipe",in:e,out:n})}const gC=J("ZodReadonly",(e,n)=>{Ik.init(e,n),vt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>i_(e,i,l,o),e.unwrap=()=>e._zod.def.innerType});function yC(e){return new gC({type:"readonly",innerType:e})}const vC=J("ZodCustom",(e,n)=>{qk.init(e,n),vt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>Kz(e,i)});function bC(e,n={}){return Dz(vC,e,n)}function xC(e){return Rz(e)}dt({maxConcurrency:Jt().int().positive(),maxRequestsPerMinute:Jt().int().positive(),maxRequestsPerDay:Jt().int().positive()});const SC=["gemini","openai","claude","local"],Sc=Qn(SC),yb=dt({label:ee().min(1),city:ee().min(1),region:ee().min(1),country:ee().length(2),timezone:ee().optional()}),vb=Qn(["citation.lost","citation.gained","run.completed","run.failed"]);dt({id:ee(),projectId:ee(),channel:Wo("webhook"),url:ee().url(),events:ut(vb),enabled:sh().default(!0),webhookSecret:ee().optional(),createdAt:ee(),updatedAt:ee()});const wC=dt({name:ee().min(1).max(63).regex(/^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/,{message:"Name must be a lowercase slug (letters, numbers, hyphens)"}),labels:ih(ee(),ee()).optional().default({})}),jC=dt({preset:ee().optional(),cron:ee().optional(),timezone:ee().optional().default("UTC"),providers:ut(Sc).optional().default([])}).refine(e=>e.preset&&!e.cron||!e.preset&&e.cron,{message:'Exactly one of "preset" or "cron" must be provided'}).optional(),NC=dt({channel:Wo("webhook"),url:ee().url(),events:ut(vb).min(1)}),kC=dt({gsc:dt({propertyUrl:ee()}).optional(),syncSchedule:dt({preset:ee().optional(),cron:ee().optional()}).optional()}).optional(),zC=dt({displayName:ee().min(1),canonicalDomain:ee().min(1),ownedDomains:ut(ee().min(1)).optional().default([]),country:ee().length(2),language:ee().min(2),keywords:ut(ee().min(1)).optional().default([]),competitors:ut(ee().min(1)).optional().default([]),providers:ut(Sc).optional().default([]),locations:ut(yb).optional().default([]),defaultLocation:ee().optional(),schedule:jC,notifications:ut(NC).optional().default([]),google:kC});dt({apiVersion:Wo("canonry/v1"),kind:Wo("Project"),metadata:wC,spec:zC});const _C=Qn(["gsc","ga4"]);dt({id:ee(),domain:ee(),connectionType:_C,propertyId:ee().nullable().optional(),sitemapUrl:ee().nullable().optional(),scopes:ut(ee()).default([]),createdAt:ee(),updatedAt:ee()});dt({date:ee(),query:ee(),page:ee(),country:ee().nullable().optional(),device:ee().nullable().optional(),clicks:Jt(),impressions:Jt(),ctr:Jt(),position:Jt()});const bf=dt({id:ee(),url:ee(),indexingState:ee().nullable().optional(),verdict:ee().nullable().optional(),coverageState:ee().nullable().optional(),pageFetchState:ee().nullable().optional(),robotsTxtState:ee().nullable().optional(),crawlTime:ee().nullable().optional(),lastCrawlResult:ee().nullable().optional(),isMobileFriendly:sh().nullable().optional(),richResults:ut(ee()).default([]),inspectedAt:ee()});Qn(["stable","reindexed","deindexed","still-missing","new"]);const CC=dt({url:ee(),previousState:ee().nullable(),currentState:ee().nullable(),transitionDate:ee()}),EC=dt({reason:ee(),count:Jt(),urls:ut(bf).default([])});dt({summary:dt({total:Jt(),indexed:Jt(),notIndexed:Jt(),deindexed:Jt(),percentage:Jt()}),lastInspectedAt:ee().nullable(),indexed:ut(bf).default([]),notIndexed:ut(bf).default([]),deindexed:ut(CC).default([]),reasonGroups:ut(EC).default([])});dt({date:ee(),indexed:Jt(),notIndexed:Jt(),reasonBreakdown:ih(ee(),Jt()).default({})});const AC=Qn(["cli","api","config-file"]);dt({id:ee(),name:ee(),displayName:ee().optional(),canonicalDomain:ee(),ownedDomains:ut(ee()).default([]),country:ee().length(2),language:ee().min(2),tags:ut(ee()).default([]),labels:ih(ee(),ee()).default({}),locations:ut(yb).default([]),defaultLocation:ee().nullable().optional(),configSource:AC.default("cli"),configRevision:Jt().int().positive().default(1),createdAt:ee().optional(),updatedAt:ee().optional()});function xf(e){let n=e.trim().toLowerCase();try{n.includes("://")&&(n=new URL(n).hostname.toLowerCase())}catch{}return n.replace(/^www\./,"")}function TC(e){const n=[e.canonicalDomain,...e.ownedDomains??[]],i=new Set,l=[];for(const o of n){const u=o.trim();if(!u)continue;const d=xf(u);i.has(d)||(i.add(d),l.push(u))}return l}const OC=Qn(["queued","running","completed","partial","failed"]),DC=Qn(["answer-visibility","site-audit","gsc-sync","inspect-sitemap"]),RC=Qn(["manual","scheduled","config-apply"]),LC=Qn(["cited","not-cited"]),MC=Qn(["new","cited","lost","emerging","not-cited"]);dt({id:ee(),projectId:ee(),kind:DC,status:OC,trigger:RC.default("manual"),location:ee().nullable().optional(),startedAt:ee().nullable().optional(),finishedAt:ee().nullable().optional(),error:ee().nullable().optional(),createdAt:ee()});const $C=dt({uri:ee(),title:ee()});dt({id:ee(),runId:ee(),keywordId:ee(),keyword:ee().optional(),provider:Sc,citationState:LC,transition:MC.optional(),answerText:ee().nullable().optional(),citedDomains:ut(ee()).default([]),competitorOverlap:ut(ee()).default([]),groundingSources:ut($C).default([]),searchQueries:ut(ee()).default([]),model:ee().nullable().optional(),location:ee().nullable().optional(),createdAt:ee()});dt({id:ee(),projectId:ee().nullable().optional(),actor:ee(),action:ee(),entityType:ee(),entityId:ee().nullable().optional(),diff:yf().optional(),createdAt:ee()});dt({id:ee(),projectId:ee(),cronExpr:ee(),preset:ee().nullable().optional(),timezone:ee().default("UTC"),enabled:sh().default(!0),providers:ut(Sc).default([]),lastRunAt:ee().nullable().optional(),nextRunAt:ee().nullable().optional(),createdAt:ee(),updatedAt:ee()});function bb(e){var n,i,l="";if(typeof e=="string"||typeof e=="number")l+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(n=0;n<o;n++)e[n]&&(i=bb(e[n]))&&(l&&(l+=" "),l+=i)}else for(i in e)e[i]&&(l&&(l+=" "),l+=i);return l}function xb(){for(var e,n,i=0,l="",o=arguments.length;i<o;i++)(e=arguments[i])&&(n=bb(e))&&(l&&(l+=" "),l+=n);return l}const s0=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,i0=xb,Sb=(e,n)=>i=>{var l;if(n?.variants==null)return i0(e,i?.class,i?.className);const{variants:o,defaultVariants:u}=n,d=Object.keys(o).map(p=>{const b=i?.[p],v=u?.[p];if(b===null)return null;const w=s0(b)||s0(v);return o[p][w]}),m=i&&Object.entries(i).reduce((p,b)=>{let[v,w]=b;return w===void 0||(p[v]=w),p},{}),g=n==null||(l=n.compoundVariants)===null||l===void 0?void 0:l.reduce((p,b)=>{let{class:v,className:w,...N}=b;return Object.entries(N).every(z=>{let[j,k]=z;return Array.isArray(k)?k.includes({...u,...m}[j]):{...u,...m}[j]===k})?[...p,v,w]:p},[]);return i0(e,d,g,i?.class,i?.className)},UC=(e,n)=>{const i=new Array(e.length+n.length);for(let l=0;l<e.length;l++)i[l]=e[l];for(let l=0;l<n.length;l++)i[e.length+l]=n[l];return i},BC=(e,n)=>({classGroupId:e,validator:n}),wb=(e=new Map,n=null,i)=>({nextPart:e,validators:n,classGroupId:i}),ec="-",a0=[],IC="arbitrary..",qC=e=>{const n=HC(e),{conflictingClassGroups:i,conflictingClassGroupModifiers:l}=e;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return ZC(d);const m=d.split(ec),g=m[0]===""&&m.length>1?1:0;return jb(m,g,n)},getConflictingClassGroupIds:(d,m)=>{if(m){const g=l[d],p=i[d];return g?p?UC(p,g):g:p||a0}return i[d]||a0}}},jb=(e,n,i)=>{if(e.length-n===0)return i.classGroupId;const o=e[n],u=i.nextPart.get(o);if(u){const p=jb(e,n+1,u);if(p)return p}const d=i.validators;if(d===null)return;const m=n===0?e.join(ec):e.slice(n).join(ec),g=d.length;for(let p=0;p<g;p++){const b=d[p];if(b.validator(m))return b.classGroupId}},ZC=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const n=e.slice(1,-1),i=n.indexOf(":"),l=n.slice(0,i);return l?IC+l:void 0})(),HC=e=>{const{theme:n,classGroups:i}=e;return GC(i,n)},GC=(e,n)=>{const i=wb();for(const l in e){const o=e[l];ah(o,i,l,n)}return i},ah=(e,n,i,l)=>{const o=e.length;for(let u=0;u<o;u++){const d=e[u];KC(d,n,i,l)}},KC=(e,n,i,l)=>{if(typeof e=="string"){YC(e,n,i);return}if(typeof e=="function"){VC(e,n,i,l);return}PC(e,n,i,l)},YC=(e,n,i)=>{const l=e===""?n:Nb(n,e);l.classGroupId=i},VC=(e,n,i,l)=>{if(QC(e)){ah(e(l),n,i,l);return}n.validators===null&&(n.validators=[]),n.validators.push(BC(i,e))},PC=(e,n,i,l)=>{const o=Object.entries(e),u=o.length;for(let d=0;d<u;d++){const[m,g]=o[d];ah(g,Nb(n,m),i,l)}},Nb=(e,n)=>{let i=e;const l=n.split(ec),o=l.length;for(let u=0;u<o;u++){const d=l[u];let m=i.nextPart.get(d);m||(m=wb(),i.nextPart.set(d,m)),i=m}return i},QC=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,XC=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,i=Object.create(null),l=Object.create(null);const o=(u,d)=>{i[u]=d,n++,n>e&&(n=0,l=i,i=Object.create(null))};return{get(u){let d=i[u];if(d!==void 0)return d;if((d=l[u])!==void 0)return o(u,d),d},set(u,d){u in i?i[u]=d:o(u,d)}}},Sf="!",l0=":",JC=[],r0=(e,n,i,l,o)=>({modifiers:e,hasImportantModifier:n,baseClassName:i,maybePostfixModifierPosition:l,isExternal:o}),FC=e=>{const{prefix:n,experimentalParseClassName:i}=e;let l=o=>{const u=[];let d=0,m=0,g=0,p;const b=o.length;for(let j=0;j<b;j++){const k=o[j];if(d===0&&m===0){if(k===l0){u.push(o.slice(g,j)),g=j+1;continue}if(k==="/"){p=j;continue}}k==="["?d++:k==="]"?d--:k==="("?m++:k===")"&&m--}const v=u.length===0?o:o.slice(g);let w=v,N=!1;v.endsWith(Sf)?(w=v.slice(0,-1),N=!0):v.startsWith(Sf)&&(w=v.slice(1),N=!0);const z=p&&p>g?p-g:void 0;return r0(u,N,w,z)};if(n){const o=n+l0,u=l;l=d=>d.startsWith(o)?u(d.slice(o.length)):r0(JC,!1,d,void 0,!0)}if(i){const o=l;l=u=>i({className:u,parseClassName:o})}return l},WC=e=>{const n=new Map;return e.orderSensitiveModifiers.forEach((i,l)=>{n.set(i,1e6+l)}),i=>{const l=[];let o=[];for(let u=0;u<i.length;u++){const d=i[u],m=d[0]==="[",g=n.has(d);m||g?(o.length>0&&(o.sort(),l.push(...o),o=[]),l.push(d)):o.push(d)}return o.length>0&&(o.sort(),l.push(...o)),l}},eE=e=>({cache:XC(e.cacheSize),parseClassName:FC(e),sortModifiers:WC(e),...qC(e)}),tE=/\s+/,nE=(e,n)=>{const{parseClassName:i,getClassGroupId:l,getConflictingClassGroupIds:o,sortModifiers:u}=n,d=[],m=e.trim().split(tE);let g="";for(let p=m.length-1;p>=0;p-=1){const b=m[p],{isExternal:v,modifiers:w,hasImportantModifier:N,baseClassName:z,maybePostfixModifierPosition:j}=i(b);if(v){g=b+(g.length>0?" "+g:g);continue}let k=!!j,A=l(k?z.substring(0,j):z);if(!A){if(!k){g=b+(g.length>0?" "+g:g);continue}if(A=l(z),!A){g=b+(g.length>0?" "+g:g);continue}k=!1}const E=w.length===0?"":w.length===1?w[0]:u(w).join(":"),O=N?E+Sf:E,D=O+A;if(d.indexOf(D)>-1)continue;d.push(D);const M=o(A,k);for(let H=0;H<M.length;++H){const V=M[H];d.push(O+V)}g=b+(g.length>0?" "+g:g)}return g},sE=(...e)=>{let n=0,i,l,o="";for(;n<e.length;)(i=e[n++])&&(l=kb(i))&&(o&&(o+=" "),o+=l);return o},kb=e=>{if(typeof e=="string")return e;let n,i="";for(let l=0;l<e.length;l++)e[l]&&(n=kb(e[l]))&&(i&&(i+=" "),i+=n);return i},iE=(e,...n)=>{let i,l,o,u;const d=g=>{const p=n.reduce((b,v)=>v(b),e());return i=eE(p),l=i.cache.get,o=i.cache.set,u=m,m(g)},m=g=>{const p=l(g);if(p)return p;const b=nE(g,i);return o(g,b),b};return u=d,(...g)=>u(sE(...g))},aE=[],Ht=e=>{const n=i=>i[e]||aE;return n.isThemeGetter=!0,n},zb=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,_b=/^\((?:(\w[\w-]*):)?(.+)\)$/i,lE=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,rE=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,oE=/\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$/,cE=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,uE=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,dE=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ti=e=>lE.test(e),Te=e=>!!e&&!Number.isNaN(Number(e)),ni=e=>!!e&&Number.isInteger(Number(e)),sf=e=>e.endsWith("%")&&Te(e.slice(0,-1)),_s=e=>rE.test(e),Cb=()=>!0,fE=e=>oE.test(e)&&!cE.test(e),lh=()=>!1,hE=e=>uE.test(e),mE=e=>dE.test(e),pE=e=>!ge(e)&&!ye(e),gE=e=>fi(e,Tb,lh),ge=e=>zb.test(e),Di=e=>fi(e,Ob,fE),o0=e=>fi(e,NE,Te),yE=e=>fi(e,Rb,Cb),vE=e=>fi(e,Db,lh),c0=e=>fi(e,Eb,lh),bE=e=>fi(e,Ab,mE),$o=e=>fi(e,Lb,hE),ye=e=>_b.test(e),Kl=e=>Zi(e,Ob),xE=e=>Zi(e,Db),u0=e=>Zi(e,Eb),SE=e=>Zi(e,Tb),wE=e=>Zi(e,Ab),Uo=e=>Zi(e,Lb,!0),jE=e=>Zi(e,Rb,!0),fi=(e,n,i)=>{const l=zb.exec(e);return l?l[1]?n(l[1]):i(l[2]):!1},Zi=(e,n,i=!1)=>{const l=_b.exec(e);return l?l[1]?n(l[1]):i:!1},Eb=e=>e==="position"||e==="percentage",Ab=e=>e==="image"||e==="url",Tb=e=>e==="length"||e==="size"||e==="bg-size",Ob=e=>e==="length",NE=e=>e==="number",Db=e=>e==="family-name",Rb=e=>e==="number"||e==="weight",Lb=e=>e==="shadow",kE=()=>{const e=Ht("color"),n=Ht("font"),i=Ht("text"),l=Ht("font-weight"),o=Ht("tracking"),u=Ht("leading"),d=Ht("breakpoint"),m=Ht("container"),g=Ht("spacing"),p=Ht("radius"),b=Ht("shadow"),v=Ht("inset-shadow"),w=Ht("text-shadow"),N=Ht("drop-shadow"),z=Ht("blur"),j=Ht("perspective"),k=Ht("aspect"),A=Ht("ease"),E=Ht("animate"),O=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],M=()=>[...D(),ye,ge],H=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto","contain","none"],L=()=>[ye,ge,g],Q=()=>[ti,"full","auto",...L()],Se=()=>[ni,"none","subgrid",ye,ge],ae=()=>["auto",{span:["full",ni,ye,ge]},ni,ye,ge],fe=()=>[ni,"auto",ye,ge],Ae=()=>["auto","min","max","fr",ye,ge],qe=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Le=()=>["start","end","center","stretch","center-safe","end-safe"],q=()=>["auto",...L()],K=()=>[ti,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...L()],ie=()=>[ti,"screen","full","dvw","lvw","svw","min","max","fit",...L()],he=()=>[ti,"screen","full","lh","dvh","lvh","svh","min","max","fit",...L()],te=()=>[e,ye,ge],C=()=>[...D(),u0,c0,{position:[ye,ge]}],G=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ne=()=>["auto","cover","contain",SE,gE,{size:[ye,ge]}],F=()=>[sf,Kl,Di],de=()=>["","none","full",p,ye,ge],me=()=>["",Te,Kl,Di],we=()=>["solid","dashed","dotted","double"],U=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],se=()=>[Te,sf,u0,c0],Ze=()=>["","none",z,ye,ge],re=()=>["none",Te,ye,ge],Ie=()=>["none",Te,ye,ge],Ut=()=>[Te,ye,ge],ft=()=>[ti,"full",...L()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[_s],breakpoint:[_s],color:[Cb],container:[_s],"drop-shadow":[_s],ease:["in","out","in-out"],font:[pE],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[_s],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[_s],shadow:[_s],spacing:["px",Te],text:[_s],"text-shadow":[_s],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ti,ge,ye,k]}],container:["container"],columns:[{columns:[Te,ge,ye,m]}],"break-after":[{"break-after":O()}],"break-before":[{"break-before":O()}],"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"],sr:["sr-only","not-sr-only"],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:M()}],overflow:[{overflow:H()}],"overflow-x":[{"overflow-x":H()}],"overflow-y":[{"overflow-y":H()}],overscroll:[{overscroll:V()}],"overscroll-x":[{"overscroll-x":V()}],"overscroll-y":[{"overscroll-y":V()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Q()}],"inset-x":[{"inset-x":Q()}],"inset-y":[{"inset-y":Q()}],start:[{"inset-s":Q(),start:Q()}],end:[{"inset-e":Q(),end:Q()}],"inset-bs":[{"inset-bs":Q()}],"inset-be":[{"inset-be":Q()}],top:[{top:Q()}],right:[{right:Q()}],bottom:[{bottom:Q()}],left:[{left:Q()}],visibility:["visible","invisible","collapse"],z:[{z:[ni,"auto",ye,ge]}],basis:[{basis:[ti,"full","auto",m,...L()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Te,ti,"auto","initial","none",ge]}],grow:[{grow:["",Te,ye,ge]}],shrink:[{shrink:["",Te,ye,ge]}],order:[{order:[ni,"first","last","none",ye,ge]}],"grid-cols":[{"grid-cols":Se()}],"col-start-end":[{col:ae()}],"col-start":[{"col-start":fe()}],"col-end":[{"col-end":fe()}],"grid-rows":[{"grid-rows":Se()}],"row-start-end":[{row:ae()}],"row-start":[{"row-start":fe()}],"row-end":[{"row-end":fe()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Ae()}],"auto-rows":[{"auto-rows":Ae()}],gap:[{gap:L()}],"gap-x":[{"gap-x":L()}],"gap-y":[{"gap-y":L()}],"justify-content":[{justify:[...qe(),"normal"]}],"justify-items":[{"justify-items":[...Le(),"normal"]}],"justify-self":[{"justify-self":["auto",...Le()]}],"align-content":[{content:["normal",...qe()]}],"align-items":[{items:[...Le(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Le(),{baseline:["","last"]}]}],"place-content":[{"place-content":qe()}],"place-items":[{"place-items":[...Le(),"baseline"]}],"place-self":[{"place-self":["auto",...Le()]}],p:[{p:L()}],px:[{px:L()}],py:[{py:L()}],ps:[{ps:L()}],pe:[{pe:L()}],pbs:[{pbs:L()}],pbe:[{pbe:L()}],pt:[{pt:L()}],pr:[{pr:L()}],pb:[{pb:L()}],pl:[{pl:L()}],m:[{m:q()}],mx:[{mx:q()}],my:[{my:q()}],ms:[{ms:q()}],me:[{me:q()}],mbs:[{mbs:q()}],mbe:[{mbe:q()}],mt:[{mt:q()}],mr:[{mr:q()}],mb:[{mb:q()}],ml:[{ml:q()}],"space-x":[{"space-x":L()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":L()}],"space-y-reverse":["space-y-reverse"],size:[{size:K()}],"inline-size":[{inline:["auto",...ie()]}],"min-inline-size":[{"min-inline":["auto",...ie()]}],"max-inline-size":[{"max-inline":["none",...ie()]}],"block-size":[{block:["auto",...he()]}],"min-block-size":[{"min-block":["auto",...he()]}],"max-block-size":[{"max-block":["none",...he()]}],w:[{w:[m,"screen",...K()]}],"min-w":[{"min-w":[m,"screen","none",...K()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[d]},...K()]}],h:[{h:["screen","lh",...K()]}],"min-h":[{"min-h":["screen","lh","none",...K()]}],"max-h":[{"max-h":["screen","lh",...K()]}],"font-size":[{text:["base",i,Kl,Di]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[l,jE,yE]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",sf,ge]}],"font-family":[{font:[xE,vE,n]}],"font-features":[{"font-features":[ge]}],"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:[o,ye,ge]}],"line-clamp":[{"line-clamp":[Te,"none",ye,o0]}],leading:[{leading:[u,...L()]}],"list-image":[{"list-image":["none",ye,ge]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ye,ge]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:te()}],"text-color":[{text:te()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...we(),"wavy"]}],"text-decoration-thickness":[{decoration:[Te,"from-font","auto",ye,Di]}],"text-decoration-color":[{decoration:te()}],"underline-offset":[{"underline-offset":[Te,"auto",ye,ge]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:L()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ye,ge]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ye,ge]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:C()}],"bg-repeat":[{bg:G()}],"bg-size":[{bg:ne()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ni,ye,ge],radial:["",ye,ge],conic:[ni,ye,ge]},wE,bE]}],"bg-color":[{bg:te()}],"gradient-from-pos":[{from:F()}],"gradient-via-pos":[{via:F()}],"gradient-to-pos":[{to:F()}],"gradient-from":[{from:te()}],"gradient-via":[{via:te()}],"gradient-to":[{to:te()}],rounded:[{rounded:de()}],"rounded-s":[{"rounded-s":de()}],"rounded-e":[{"rounded-e":de()}],"rounded-t":[{"rounded-t":de()}],"rounded-r":[{"rounded-r":de()}],"rounded-b":[{"rounded-b":de()}],"rounded-l":[{"rounded-l":de()}],"rounded-ss":[{"rounded-ss":de()}],"rounded-se":[{"rounded-se":de()}],"rounded-ee":[{"rounded-ee":de()}],"rounded-es":[{"rounded-es":de()}],"rounded-tl":[{"rounded-tl":de()}],"rounded-tr":[{"rounded-tr":de()}],"rounded-br":[{"rounded-br":de()}],"rounded-bl":[{"rounded-bl":de()}],"border-w":[{border:me()}],"border-w-x":[{"border-x":me()}],"border-w-y":[{"border-y":me()}],"border-w-s":[{"border-s":me()}],"border-w-e":[{"border-e":me()}],"border-w-bs":[{"border-bs":me()}],"border-w-be":[{"border-be":me()}],"border-w-t":[{"border-t":me()}],"border-w-r":[{"border-r":me()}],"border-w-b":[{"border-b":me()}],"border-w-l":[{"border-l":me()}],"divide-x":[{"divide-x":me()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":me()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...we(),"hidden","none"]}],"divide-style":[{divide:[...we(),"hidden","none"]}],"border-color":[{border:te()}],"border-color-x":[{"border-x":te()}],"border-color-y":[{"border-y":te()}],"border-color-s":[{"border-s":te()}],"border-color-e":[{"border-e":te()}],"border-color-bs":[{"border-bs":te()}],"border-color-be":[{"border-be":te()}],"border-color-t":[{"border-t":te()}],"border-color-r":[{"border-r":te()}],"border-color-b":[{"border-b":te()}],"border-color-l":[{"border-l":te()}],"divide-color":[{divide:te()}],"outline-style":[{outline:[...we(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Te,ye,ge]}],"outline-w":[{outline:["",Te,Kl,Di]}],"outline-color":[{outline:te()}],shadow:[{shadow:["","none",b,Uo,$o]}],"shadow-color":[{shadow:te()}],"inset-shadow":[{"inset-shadow":["none",v,Uo,$o]}],"inset-shadow-color":[{"inset-shadow":te()}],"ring-w":[{ring:me()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:te()}],"ring-offset-w":[{"ring-offset":[Te,Di]}],"ring-offset-color":[{"ring-offset":te()}],"inset-ring-w":[{"inset-ring":me()}],"inset-ring-color":[{"inset-ring":te()}],"text-shadow":[{"text-shadow":["none",w,Uo,$o]}],"text-shadow-color":[{"text-shadow":te()}],opacity:[{opacity:[Te,ye,ge]}],"mix-blend":[{"mix-blend":[...U(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":U()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Te]}],"mask-image-linear-from-pos":[{"mask-linear-from":se()}],"mask-image-linear-to-pos":[{"mask-linear-to":se()}],"mask-image-linear-from-color":[{"mask-linear-from":te()}],"mask-image-linear-to-color":[{"mask-linear-to":te()}],"mask-image-t-from-pos":[{"mask-t-from":se()}],"mask-image-t-to-pos":[{"mask-t-to":se()}],"mask-image-t-from-color":[{"mask-t-from":te()}],"mask-image-t-to-color":[{"mask-t-to":te()}],"mask-image-r-from-pos":[{"mask-r-from":se()}],"mask-image-r-to-pos":[{"mask-r-to":se()}],"mask-image-r-from-color":[{"mask-r-from":te()}],"mask-image-r-to-color":[{"mask-r-to":te()}],"mask-image-b-from-pos":[{"mask-b-from":se()}],"mask-image-b-to-pos":[{"mask-b-to":se()}],"mask-image-b-from-color":[{"mask-b-from":te()}],"mask-image-b-to-color":[{"mask-b-to":te()}],"mask-image-l-from-pos":[{"mask-l-from":se()}],"mask-image-l-to-pos":[{"mask-l-to":se()}],"mask-image-l-from-color":[{"mask-l-from":te()}],"mask-image-l-to-color":[{"mask-l-to":te()}],"mask-image-x-from-pos":[{"mask-x-from":se()}],"mask-image-x-to-pos":[{"mask-x-to":se()}],"mask-image-x-from-color":[{"mask-x-from":te()}],"mask-image-x-to-color":[{"mask-x-to":te()}],"mask-image-y-from-pos":[{"mask-y-from":se()}],"mask-image-y-to-pos":[{"mask-y-to":se()}],"mask-image-y-from-color":[{"mask-y-from":te()}],"mask-image-y-to-color":[{"mask-y-to":te()}],"mask-image-radial":[{"mask-radial":[ye,ge]}],"mask-image-radial-from-pos":[{"mask-radial-from":se()}],"mask-image-radial-to-pos":[{"mask-radial-to":se()}],"mask-image-radial-from-color":[{"mask-radial-from":te()}],"mask-image-radial-to-color":[{"mask-radial-to":te()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":D()}],"mask-image-conic-pos":[{"mask-conic":[Te]}],"mask-image-conic-from-pos":[{"mask-conic-from":se()}],"mask-image-conic-to-pos":[{"mask-conic-to":se()}],"mask-image-conic-from-color":[{"mask-conic-from":te()}],"mask-image-conic-to-color":[{"mask-conic-to":te()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:C()}],"mask-repeat":[{mask:G()}],"mask-size":[{mask:ne()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ye,ge]}],filter:[{filter:["","none",ye,ge]}],blur:[{blur:Ze()}],brightness:[{brightness:[Te,ye,ge]}],contrast:[{contrast:[Te,ye,ge]}],"drop-shadow":[{"drop-shadow":["","none",N,Uo,$o]}],"drop-shadow-color":[{"drop-shadow":te()}],grayscale:[{grayscale:["",Te,ye,ge]}],"hue-rotate":[{"hue-rotate":[Te,ye,ge]}],invert:[{invert:["",Te,ye,ge]}],saturate:[{saturate:[Te,ye,ge]}],sepia:[{sepia:["",Te,ye,ge]}],"backdrop-filter":[{"backdrop-filter":["","none",ye,ge]}],"backdrop-blur":[{"backdrop-blur":Ze()}],"backdrop-brightness":[{"backdrop-brightness":[Te,ye,ge]}],"backdrop-contrast":[{"backdrop-contrast":[Te,ye,ge]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Te,ye,ge]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Te,ye,ge]}],"backdrop-invert":[{"backdrop-invert":["",Te,ye,ge]}],"backdrop-opacity":[{"backdrop-opacity":[Te,ye,ge]}],"backdrop-saturate":[{"backdrop-saturate":[Te,ye,ge]}],"backdrop-sepia":[{"backdrop-sepia":["",Te,ye,ge]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":L()}],"border-spacing-x":[{"border-spacing-x":L()}],"border-spacing-y":[{"border-spacing-y":L()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ye,ge]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Te,"initial",ye,ge]}],ease:[{ease:["linear","initial",A,ye,ge]}],delay:[{delay:[Te,ye,ge]}],animate:[{animate:["none",E,ye,ge]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[j,ye,ge]}],"perspective-origin":[{"perspective-origin":M()}],rotate:[{rotate:re()}],"rotate-x":[{"rotate-x":re()}],"rotate-y":[{"rotate-y":re()}],"rotate-z":[{"rotate-z":re()}],scale:[{scale:Ie()}],"scale-x":[{"scale-x":Ie()}],"scale-y":[{"scale-y":Ie()}],"scale-z":[{"scale-z":Ie()}],"scale-3d":["scale-3d"],skew:[{skew:Ut()}],"skew-x":[{"skew-x":Ut()}],"skew-y":[{"skew-y":Ut()}],transform:[{transform:[ye,ge,"","none","gpu","cpu"]}],"transform-origin":[{origin:M()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ft()}],"translate-x":[{"translate-x":ft()}],"translate-y":[{"translate-y":ft()}],"translate-z":[{"translate-z":ft()}],"translate-none":["translate-none"],accent:[{accent:te()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:te()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",ye,ge]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mbs":[{"scroll-mbs":L()}],"scroll-mbe":[{"scroll-mbe":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pbs":[{"scroll-pbs":L()}],"scroll-pbe":[{"scroll-pbe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"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"]}],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",ye,ge]}],fill:[{fill:["none",...te()]}],"stroke-w":[{stroke:[Te,Kl,Di,o0]}],stroke:[{stroke:["none",...te()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","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","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","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-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","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-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","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-pbs","scroll-pbe","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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},zE=iE(kE);function Bn(...e){return zE(xb(e))}const _E=Sb("inline-flex items-center rounded-md border px-2 py-0.5 text-[11px] font-medium tracking-wide",{variants:{variant:{neutral:"border-zinc-800 bg-zinc-950 text-zinc-300",success:"border-emerald-500/25 bg-emerald-500/10 text-emerald-300",warning:"border-amber-500/25 bg-amber-500/10 text-amber-300",destructive:"border-rose-500/25 bg-rose-500/10 text-rose-300"}},defaultVariants:{variant:"neutral"}});function Mb({className:e,variant:n,...i}){return c.jsx("div",{className:Bn(_E({variant:n}),e),...i})}var CE=Symbol.for("react.lazy"),tc=kf[" use ".trim().toString()];function EE(e){return typeof e=="object"&&e!==null&&"then"in e}function $b(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===CE&&"_payload"in e&&EE(e._payload)}function AE(e){const n=OE(e),i=x.forwardRef((l,o)=>{let{children:u,...d}=l;$b(u)&&typeof tc=="function"&&(u=tc(u._payload));const m=x.Children.toArray(u),g=m.find(RE);if(g){const p=g.props.children,b=m.map(v=>v===g?x.Children.count(p)>1?x.Children.only(null):x.isValidElement(p)?p.props.children:null:v);return c.jsx(n,{...d,ref:o,children:x.isValidElement(p)?x.cloneElement(p,void 0,b):null})}return c.jsx(n,{...d,ref:o,children:u})});return i.displayName=`${e}.Slot`,i}var TE=AE("Slot");function OE(e){const n=x.forwardRef((i,l)=>{let{children:o,...u}=i;if($b(o)&&typeof tc=="function"&&(o=tc(o._payload)),x.isValidElement(o)){const d=ME(o),m=LE(u,o.props);return o.type!==x.Fragment&&(m.ref=l?qf(l,d):d),x.cloneElement(o,m)}return x.Children.count(o)>1?x.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var DE=Symbol("radix.slottable");function RE(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===DE}function LE(e,n){const i={...n};for(const l in n){const o=e[l],u=n[l];/^on[A-Z]/.test(l)?o&&u?i[l]=(...m)=>{const g=u(...m);return o(...m),g}:o&&(i[l]=o):l==="style"?i[l]={...o,...u}:l==="className"&&(i[l]=[o,u].filter(Boolean).join(" "))}return{...e,...i}}function ME(e){let n=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,i=n&&"isReactWarning"in n&&n.isReactWarning;return i?e.ref:(n=Object.getOwnPropertyDescriptor(e,"ref")?.get,i=n&&"isReactWarning"in n&&n.isReactWarning,i?e.props.ref:e.props.ref||e.ref)}const $E=Sb("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-zinc-400 focus-visible:ring-offset-2 focus-visible:ring-offset-black disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-zinc-50 text-black hover:bg-zinc-200",secondary:"border border-zinc-800 bg-zinc-950 text-zinc-100 hover:bg-zinc-900",ghost:"text-zinc-400 hover:bg-zinc-900 hover:text-zinc-50",outline:"border border-zinc-800 bg-transparent text-zinc-100 hover:bg-zinc-900",destructive:"bg-rose-600 text-white hover:bg-rose-700"},size:{default:"h-9 px-4",sm:"h-8 px-3 text-xs",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}}),ue=x.forwardRef(({className:e,variant:n,size:i,asChild:l=!1,...o},u)=>{const d=l?TE:"button";return c.jsx(d,{ref:u,className:Bn($E({variant:n,size:i,className:e})),...o})});ue.displayName="Button";const Pe=x.forwardRef(({className:e,...n},i)=>c.jsx("div",{ref:i,className:Bn("rounded-xl border border-zinc-800 bg-zinc-950/75 shadow-[0_0_0_1px_rgba(255,255,255,0.01)] backdrop-blur",e),...n}));Pe.displayName="Card";const UE=x.forwardRef(({className:e,...n},i)=>c.jsx("div",{ref:i,className:Bn("flex flex-col gap-1.5 p-5",e),...n}));UE.displayName="CardHeader";const BE=x.forwardRef(({className:e,...n},i)=>c.jsx("h3",{ref:i,className:Bn("font-medium tracking-tight text-zinc-50",e),...n}));BE.displayName="CardTitle";const IE=x.forwardRef(({className:e,...n},i)=>c.jsx("p",{ref:i,className:Bn("text-sm text-zinc-500",e),...n}));IE.displayName="CardDescription";const qE=x.forwardRef(({className:e,...n},i)=>c.jsx("div",{ref:i,className:Bn("p-5 pt-0",e),...n}));qE.displayName="CardContent";const ZE=Mv,HE=$v,Ub=x.forwardRef(({className:e,...n},i)=>c.jsx(Kf,{ref:i,className:Bn("fixed inset-0 z-50 bg-black/70 backdrop-blur-sm",e),...n}));Ub.displayName=Kf.displayName;const GE=400,KE=1200,YE=720,Bb=x.forwardRef(({className:e,children:n,...i},l)=>{const[o,u]=x.useState(YE),d=x.useRef(!1),m=x.useRef(0),g=x.useRef(0),p=x.useCallback(w=>{d.current=!0,m.current=w.clientX,g.current=o,w.target.setPointerCapture(w.pointerId),w.preventDefault()},[o]),b=x.useCallback(w=>{if(!d.current)return;const N=m.current-w.clientX,z=Math.min(KE,Math.max(GE,g.current+N));u(z)},[]),v=x.useCallback(()=>{d.current=!1},[]);return c.jsxs(HE,{children:[c.jsx(Ub,{}),c.jsxs(Yf,{ref:l,className:Bn("fixed z-50 flex flex-col bg-zinc-950 px-5 py-4 shadow-2xl overflow-hidden","max-md:inset-x-0 max-md:bottom-0 max-md:top-auto max-md:max-h-[88vh] max-md:rounded-t-2xl max-md:border-t","md:inset-y-0 md:right-0 md:h-full md:border-l","border-zinc-800",e),style:{width:`min(${o}px, 100vw)`},...i,children:[c.jsx("div",{className:"absolute inset-y-0 left-0 w-1.5 cursor-col-resize hover:bg-zinc-700/50 active:bg-zinc-600/50 transition-colors max-md:hidden",onPointerDown:p,onPointerMove:b,onPointerUp:v}),n,c.jsxs(Bv,{className:"absolute right-4 top-4 inline-flex size-8 items-center justify-center rounded-md text-zinc-500 transition hover:bg-zinc-900 hover:text-zinc-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-zinc-400",children:[c.jsx(Qf,{className:"size-4"}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]})});Bb.displayName=Yf.displayName;const VE=({className:e,...n})=>c.jsx("div",{className:Bn("flex flex-col gap-1.5 pr-10",e),...n}),Ib=x.forwardRef(({className:e,...n},i)=>c.jsx(Vf,{ref:i,className:Bn("text-lg font-medium text-zinc-50",e),...n}));Ib.displayName=Vf.displayName;const qb=x.forwardRef(({className:e,...n},i)=>c.jsx(Uv,{ref:i,className:Bn("text-sm text-zinc-500",e),...n}));qb.displayName=Uv.displayName;function Kn(e){const n=new Date("2026-02-20");return e.map((i,l)=>({runId:`run_mock_${l+1}`,citationState:i,createdAt:new Date(n.getTime()+l*2*24*60*60*1e3).toISOString()}))}const qa=[{id:"project_citypoint",name:"Citypoint Dental NYC",canonicalDomain:"citypointdental.com",ownedDomains:[],country:"US",language:"en",tags:["local intent","priority"],labels:{},locations:[],defaultLocation:null,configSource:"cli",configRevision:1},{id:"project_harbor",name:"Harbor Legal Group",canonicalDomain:"harborlegal.com",ownedDomains:[],country:"US",language:"en",tags:["lead gen"],labels:{},locations:[],defaultLocation:null,configSource:"cli",configRevision:1},{id:"project_northstar",name:"Northstar Orthopedics",canonicalDomain:"northstarortho.com",ownedDomains:[],country:"US",language:"en",tags:["multi-location"],labels:{},locations:[],defaultLocation:null,configSource:"cli",configRevision:1}];function wc(e){return{id:e.id,projectId:e.projectId,projectName:e.projectName,kind:e.kind,kindLabel:e.kindLabel,status:e.status,trigger:e.trigger??"manual",createdAt:e.createdAt,startedAt:e.startedAt,duration:e.duration,statusDetail:e.statusDetail,summary:e.summary,triggerLabel:e.triggerLabel}}const nc=wc({id:"run_citypoint_visibility_20260308",projectId:"project_citypoint",projectName:"Citypoint Dental NYC",kind:"answer-visibility",kindLabel:"Answer visibility sweep",status:"completed",createdAt:"2026-03-08T12:15:00.000Z",startedAt:"Mar 8, 12:15 PM",duration:"6m 12s",statusDetail:"18 tracked queries checked; 3 citation losses detected on emergency-intent prompts.",summary:"Citation losses on emergency-intent prompts",triggerLabel:"Scheduled"}),rh=wc({id:"run_citypoint_queued_20260309",projectId:"project_citypoint",projectName:"Citypoint Dental NYC",kind:"answer-visibility",kindLabel:"Answer visibility sweep",status:"queued",createdAt:"2026-03-09T08:05:00.000Z",startedAt:"Mar 9, 8:05 AM",duration:"Waiting for slot",statusDetail:"Ready to enqueue after the next provider rate window clears.",summary:"Queued follow-up after local ranking movement",triggerLabel:"Manual"}),oh=wc({id:"run_harbor_visibility_20260308",projectId:"project_harbor",projectName:"Harbor Legal Group",kind:"answer-visibility",kindLabel:"Answer visibility sweep",status:"completed",createdAt:"2026-03-08T11:05:00.000Z",startedAt:"Mar 8, 11:05 AM",duration:"5m 07s",statusDetail:"12 tracked queries checked; local-intent visibility held steady across branded prompts.",summary:"Branded prompts remain stable",triggerLabel:"Scheduled"}),sc=wc({id:"run_northstar_visibility_20260308",projectId:"project_northstar",projectName:"Northstar Orthopedics",kind:"answer-visibility",kindLabel:"Answer visibility sweep",status:"running",createdAt:"2026-03-08T13:40:00.000Z",startedAt:"Mar 8, 1:40 PM",duration:"3m 10s",statusDetail:"Provider responses still in flight for 9 multi-location prompts.",summary:"Mid-run on treatment-location prompts",triggerLabel:"Manual"}),PE=[rh,nc,oh,sc],QE=[{id:"evidence_citypoint_emergency_gemini",keyword:"emergency dentist brooklyn",provider:"gemini",model:"gemini-3-flash",location:null,citationState:"lost",changeLabel:"Lost since Mar 5",answerSnippet:"For urgent dental care in Brooklyn, Downtown Smiles and Harbor Dental are now cited first for emergency availability and same-day booking.",citedDomains:["downtownsmiles.com","harbordental.com"],evidenceUrls:["https://downtownsmiles.com/emergency-dentist-brooklyn","https://harbordental.com/same-day-emergency-care"],competitorDomains:["downtownsmiles.com","harbordental.com"],groundingSources:[],relatedTechnicalSignals:["FAQ schema missing on the emergency service page","llms.txt not found during latest site audit","Location pages link weakly into the emergency care hub"],summary:"AI answers now cite two competitors while your emergency page is no longer grounded.",runHistory:Kn(["cited","cited","cited","cited","cited","cited","cited","not-cited","not-cited"])},{id:"evidence_citypoint_emergency_openai",keyword:"emergency dentist brooklyn",provider:"openai",model:"gpt-5.4",location:null,citationState:"cited",changeLabel:"Cited for 6 runs",answerSnippet:"Citypoint Dental is listed as a top emergency dentist in Brooklyn for same-day appointments and walk-in availability.",citedDomains:["citypointdental.com","downtownsmiles.com"],evidenceUrls:["https://citypointdental.com/emergency-dentist-brooklyn"],competitorDomains:["downtownsmiles.com"],groundingSources:[],relatedTechnicalSignals:["Emergency page indexed with structured data"],summary:"OpenAI cites your emergency page consistently alongside one competitor.",runHistory:Kn(["not-cited","cited","cited","cited","cited","cited","cited"])},{id:"evidence_citypoint_emergency_claude",keyword:"emergency dentist brooklyn",provider:"claude",model:"claude-sonnet-4-6",location:null,citationState:"not-cited",changeLabel:"No citation across 12 runs",answerSnippet:"Based on the search results, top-rated emergency dental practices in Brooklyn include Downtown Smiles and Harbor Dental.",citedDomains:["downtownsmiles.com","harbordental.com"],evidenceUrls:[],competitorDomains:["downtownsmiles.com","harbordental.com"],groundingSources:[],relatedTechnicalSignals:["FAQ schema missing","llms.txt not found"],summary:"Claude does not cite your domain for this emergency query.",runHistory:Kn(["not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited"])},{id:"evidence_citypoint_invisalign_openai",keyword:"best invisalign dentist downtown brooklyn",provider:"openai",model:"gpt-5.4",location:null,citationState:"emerging",changeLabel:"First citation in 7 days",answerSnippet:"Citypoint Dental appears as an emerging recommendation for Invisalign in Downtown Brooklyn, supported by recent before-and-after case pages.",citedDomains:["citypointdental.com","clearlineortho.com"],evidenceUrls:["https://citypointdental.com/invisalign-downtown-brooklyn","https://citypointdental.com/case-studies/invisalign-open-bite"],competitorDomains:["clearlineortho.com"],groundingSources:[],relatedTechnicalSignals:["Structured data now present on two case-study pages","Internal links from service pages to case studies improved crawl depth"],summary:"Fresh case-study content is starting to earn citations on Invisalign prompts.",runHistory:Kn(["not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","cited"])},{id:"evidence_citypoint_invisalign_gemini",keyword:"best invisalign dentist downtown brooklyn",provider:"gemini",model:"gemini-3-flash",location:null,citationState:"cited",changeLabel:"Cited for 8 runs",answerSnippet:"Citypoint Dental in Downtown Brooklyn is highlighted for its Invisalign expertise and patient outcomes.",citedDomains:["citypointdental.com"],evidenceUrls:["https://citypointdental.com/invisalign-downtown-brooklyn"],competitorDomains:[],groundingSources:[],relatedTechnicalSignals:["Case study pages well-indexed"],summary:"Gemini consistently cites your Invisalign page with no competitor overlap.",runHistory:Kn(["cited","cited","cited","cited","cited","cited","cited","cited"])},{id:"evidence_citypoint_invisalign_claude",keyword:"best invisalign dentist downtown brooklyn",provider:"claude",model:"claude-sonnet-4-6",location:null,citationState:"not-cited",changeLabel:"No citation across 12 runs",answerSnippet:"For Invisalign in Downtown Brooklyn, Clear Line Ortho and Brooklyn Smiles are frequently recommended for their experienced orthodontists.",citedDomains:["clearlineortho.com","brooklynsmiles.com"],evidenceUrls:[],competitorDomains:["clearlineortho.com"],groundingSources:[],relatedTechnicalSignals:["No before/after schema on case study pages"],summary:"Claude does not surface your Invisalign content despite strong page quality.",runHistory:Kn(["not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited"])},{id:"evidence_citypoint_children_claude",keyword:"pediatric dentist brooklyn heights",provider:"claude",model:"claude-sonnet-4-6",location:null,citationState:"not-cited",changeLabel:"No citation across 4 runs",answerSnippet:"Answers cite neighborhood-specific pediatric practices with stronger family-focused FAQ content and clearer insurance details.",citedDomains:["brightkidsdental.com","parkpediatricdental.com"],evidenceUrls:["https://brightkidsdental.com/pediatric-dentist-brooklyn-heights","https://parkpediatricdental.com/insurance"],competitorDomains:["brightkidsdental.com","parkpediatricdental.com"],groundingSources:[],relatedTechnicalSignals:["No dedicated pediatric service page exists for Brooklyn Heights","Insurance content is buried three clicks deep"],summary:"Coverage gap is content-driven, not purely technical.",runHistory:Kn(["not-cited","not-cited","not-cited","not-cited"])},{id:"evidence_citypoint_children_gemini",keyword:"pediatric dentist brooklyn heights",provider:"gemini",model:"gemini-3-flash",location:null,citationState:"not-cited",changeLabel:"No citation across 12 runs",answerSnippet:"For pediatric dentistry in Brooklyn Heights, Bright Kids Dental and Park Pediatric Dental are cited for family-friendly care.",citedDomains:["brightkidsdental.com","parkpediatricdental.com"],evidenceUrls:[],competitorDomains:["brightkidsdental.com","parkpediatricdental.com"],groundingSources:[],relatedTechnicalSignals:["No dedicated pediatric page for Brooklyn Heights"],summary:"Gemini does not surface your domain for pediatric queries in this area.",runHistory:Kn(["not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited"])},{id:"evidence_citypoint_children_openai",keyword:"pediatric dentist brooklyn heights",provider:"openai",model:"gpt-5.4",location:null,citationState:"cited",changeLabel:"First citation this month",answerSnippet:"Citypoint Dental is mentioned as offering pediatric services in Brooklyn, though specialized pediatric-only practices are also highlighted.",citedDomains:["citypointdental.com","brightkidsdental.com"],evidenceUrls:["https://citypointdental.com/family-dentistry"],competitorDomains:["brightkidsdental.com"],groundingSources:[],relatedTechnicalSignals:["Family dentistry page recently updated"],summary:"OpenAI recently started citing your family dentistry page for this query.",runHistory:Kn(["not-cited","not-cited","not-cited","not-cited","not-cited","cited"])}],XE=[{project:qa[0],dateRangeLabel:"Last 7 days",contextLabel:"US / English / Local-intent monitoring",visibilitySummary:{label:"Answer Visibility",value:"61 / 100",delta:"-8 this week",tone:"caution",description:"Lost citation share on emergency-intent prompts while Invisalign visibility improved.",trend:[73,71,69,66,61]},providerScores:[{provider:"gemini",model:"gemini-3-flash",score:55,cited:5,total:9},{provider:"openai",model:"gpt-5.4",score:67,cited:6,total:9},{provider:"claude",model:"claude-sonnet-4-6",score:44,cited:4,total:9}],competitorPressure:{label:"Competitor Pressure",value:"High",delta:"2 rivals moved up",tone:"negative",description:"Downtown Smiles and Harbor Dental now own the highest-intent local prompts.",trend:[54,58,61,65,69]},runStatus:{label:"Run Status",value:"Partial",delta:"1 queued follow-up",tone:"caution",description:"Latest visibility sweep completed; next sweep is queued.",trend:[76,74,72,68,67]},insights:[{id:"insight_citypoint_lost_citations",tone:"negative",title:"Lost citation on 1 key phrase",detail:"Emergency-intent prompts stopped grounding Citypoint after competitors refreshed.",actionLabel:"Lost",affectedPhrases:[{keyword:"emergency dentist brooklyn",evidenceId:"evidence_citypoint_emergency_gemini",provider:"gemini",citationState:"lost"}]},{id:"insight_citypoint_emerging",tone:"positive",title:"New citation on 1 key phrase",detail:"Case-study content is earning citations on Invisalign prompts.",actionLabel:"Emerging",affectedPhrases:[{keyword:"best invisalign dentist downtown brooklyn",evidenceId:"evidence_citypoint_invisalign_openai",provider:"openai",citationState:"emerging"}]},{id:"insight_citypoint_content_gap",tone:"caution",title:"1 key phrase not cited by any provider",detail:"No dedicated neighborhood page to support pediatric queries.",actionLabel:"Gap",affectedPhrases:[{keyword:"pediatric dentist brooklyn heights",evidenceId:"evidence_citypoint_children_claude",provider:"claude",citationState:"not-cited"}]}],visibilityEvidence:QE,competitors:[{id:"competitor_citypoint_downtown",domain:"downtownsmiles.com",citationCount:4,totalKeywords:8,pressureLabel:"High",citedKeywords:["emergency dentist","same-day dental","walk-in dentist","tooth pain"],movement:"Up on emergency and availability prompts",notes:"Recently added same-day booking proof and FAQ content."},{id:"competitor_citypoint_harbor",domain:"harbordental.com",citationCount:2,totalKeywords:8,pressureLabel:"Moderate",citedKeywords:["family dentist","emergency dentist"],movement:"Holding citations on family and emergency intents",notes:"Strong appointment and insurance content keeps answers grounded."},{id:"competitor_citypoint_clearline",domain:"clearlineortho.com",citationCount:1,totalKeywords:8,pressureLabel:"Low",citedKeywords:["invisalign near me"],movement:"Softening on Invisalign prompts",notes:"Case-study content is aging, opening room for Citypoint."}],recentRuns:[rh,nc]},{project:qa[1],dateRangeLabel:"Last 14 days",contextLabel:"US / English / Service-area legal prompts",visibilitySummary:{label:"Answer Visibility",value:"74 / 100",delta:"+2 this week",tone:"positive",description:"Branded prompts are stable and informational queries are gradually improving.",trend:[68,70,71,73,74]},providerScores:[{provider:"gemini",model:"gemini-3-flash",score:75,cited:3,total:4},{provider:"openai",model:"gpt-5.4",score:50,cited:2,total:4}],competitorPressure:{label:"Competitor Pressure",value:"Moderate",delta:"Steady",tone:"neutral",description:"Competitors are stable; no new citation displacement was detected.",trend:[44,46,45,46,46]},runStatus:{label:"Run Status",value:"Healthy",delta:"No failures in 14 days",tone:"positive",description:"Latest visibility runs completed without issues.",trend:[88,89,90,90,91]},insights:[{id:"insight_harbor_cluster",tone:"positive",title:"Practice-area clustering is paying off",detail:"Merged legal service pages now ground broader informational prompts.",actionLabel:"Cited",affectedPhrases:[{keyword:"brooklyn personal injury lawyer",evidenceId:"evidence_harbor_personal_injury",provider:"gemini",citationState:"cited"}]},{id:"insight_harbor_local",tone:"neutral",title:"No significant changes",detail:"No new displacement on borough-specific injury prompts this week.",actionLabel:"Stable",affectedPhrases:[]}],visibilityEvidence:[{id:"evidence_harbor_personal_injury",keyword:"brooklyn personal injury lawyer",provider:"gemini",model:"gemini-3-flash",location:null,citationState:"cited",changeLabel:"Held for 5 runs",answerSnippet:"Harbor Legal Group remains cited for borough-specific personal injury queries due to clear practice-area and case-result content.",citedDomains:["harborlegal.com"],evidenceUrls:["https://harborlegal.com/personal-injury/brooklyn"],competitorDomains:["shorelineinjury.com"],groundingSources:[],relatedTechnicalSignals:["Practice-area schema intact","Case results link directly from service pages"],summary:"Grounding remains durable after the service-page consolidation.",runHistory:Kn(["cited","cited","cited","cited","cited"])}],competitors:[{id:"competitor_harbor_shoreline",domain:"shorelineinjury.com",citationCount:2,totalKeywords:6,pressureLabel:"Moderate",citedKeywords:["personal injury lawyer","car accident attorney"],movement:"Stable",notes:"Strong case-result pages keep it in rotation."}],recentRuns:[oh]},{project:qa[2],dateRangeLabel:"Last 7 days",contextLabel:"US / English / Multi-location treatment prompts",visibilitySummary:{label:"Answer Visibility",value:"58 / 100",delta:"Run in progress",tone:"neutral",description:"The current run is measuring whether treatment-location pages improved citation breadth.",trend:[52,54,55,57,58]},providerScores:[{provider:"openai",model:"gpt-5.4",score:58,cited:4,total:7}],competitorPressure:{label:"Competitor Pressure",value:"Moderate",delta:"Watching 1 chain",tone:"caution",description:"Regional chain competitors are winning on broad treatment questions.",trend:[49,51,52,54,56]},runStatus:{label:"Run Status",value:"Running",delta:"9 prompts remaining",tone:"neutral",description:"Current answer-visibility sweep is still collecting provider responses.",trend:[63,64,65,67,68]},insights:[{id:"insight_northstar_location_depth",tone:"caution",title:"Location pages need stronger proof",detail:"Answers prefer competitors with physician-specific evidence.",actionLabel:"Gap",affectedPhrases:[{keyword:"knee replacement surgeon westchester",evidenceId:"evidence_northstar_knee",provider:"openai",citationState:"emerging"}]}],visibilityEvidence:[{id:"evidence_northstar_knee",keyword:"knee replacement surgeon westchester",provider:"openai",model:"gpt-5.4",location:null,citationState:"emerging",changeLabel:"Improving",answerSnippet:"Northstar Orthopedics is beginning to appear on location-sensitive treatment prompts when physician bios and treatment pages are tightly linked.",citedDomains:["northstarortho.com","regionaljointcare.com"],evidenceUrls:["https://northstarortho.com/locations/westchester/knee-replacement"],competitorDomains:["regionaljointcare.com"],groundingSources:[],relatedTechnicalSignals:["Physician bios now linked from treatment pages"],summary:"Template cleanup is helping, but proof depth still matters.",runHistory:Kn(["not-cited","not-cited","not-cited","cited"])}],competitors:[{id:"competitor_northstar_regional",domain:"regionaljointcare.com",citationCount:5,totalKeywords:7,pressureLabel:"High",citedKeywords:["knee replacement","hip surgery","joint pain treatment","orthopedic surgeon","sports medicine"],movement:"Winning broad treatment prompts",notes:"Heavy physician proof and patient-story content."}],recentRuns:[sc]}],JE={portfolioOverview:{projects:[{project:qa[0],visibilityScore:61,visibilityDelta:"-8 this week",lastRun:nc,insight:"Lost emergency-intent citations after competitors refreshed availability pages.",trend:[73,71,69,66,61],competitorPressureLabel:"High"},{project:qa[1],visibilityScore:74,visibilityDelta:"+2 this week",lastRun:oh,insight:"Practice-area consolidation is stabilizing branded and informational prompts.",trend:[68,70,71,73,74],competitorPressureLabel:"Moderate"},{project:qa[2],visibilityScore:58,visibilityDelta:"Run in progress",lastRun:sc,insight:"Location pages are improving, but local treatment proof still trails competitors.",trend:[52,54,55,57,58],competitorPressureLabel:"Moderate"}],attentionItems:[{id:"attention_citypoint",tone:"negative",title:"Citypoint Dental lost emergency-intent citations",detail:"Three high-intent prompts now cite competitors first.",actionLabel:"Open project",href:"/projects/project_citypoint"},{id:"attention_worker",tone:"neutral",title:"One follow-up run is queued",detail:"Citypoint has a queued visibility sweep waiting on provider quota.",actionLabel:"Open runs",href:"/runs"},{id:"attention_northstar",tone:"caution",title:"Northstar run still in progress",detail:"Nine prompts remain before the current treatment-location sweep finishes.",actionLabel:"View timeline",href:"/runs"}],recentRuns:[rh,sc,nc],systemHealth:[{id:"api",label:"API",tone:"positive",detail:"Healthy",meta:"phase-1 · database configured"},{id:"worker",label:"Worker",tone:"positive",detail:"Healthy",meta:"heartbeat moments ago"},{id:"providers",label:"Providers",tone:"positive",detail:"2 of 3 configured",meta:"Gemini · OpenAI"}],lastUpdatedAt:"Mar 9, 8:08 AM ET"},projects:XE,runs:PE,setup:{healthChecks:[{id:"api",label:"API reachable",detail:"Primary control plane is responding.",state:"ready",guidance:"Required for project creation and run history."},{id:"worker",label:"Worker heartbeats received",detail:"Background execution loop is alive.",state:"ready",guidance:"Required before any answer-visibility run can start."},{id:"provider",label:"Provider configured",detail:"Gemini key and quota defaults are present.",state:"ready",guidance:"Required for answer-visibility sweeps."}],projectDraft:{name:"Citypoint Dental NYC",canonicalDomain:"citypointdental.com",country:"US",language:"en"},keywordImportState:{mode:"paste",keywordCount:18,preview:["emergency dentist brooklyn","best invisalign dentist downtown brooklyn","pediatric dentist brooklyn heights"]},competitorDraft:{domains:["downtownsmiles.com","harbordental.com","clearlineortho.com"],notes:"Start with the domains that already displace the project on money prompts."},launchState:{enabled:!0,ctaLabel:"Launch first run",summary:"Queue a visibility sweep first, then follow with a site audit to explain movement."}},settings:{providerStatuses:[{name:"Gemini",model:"gemini-3-flash",state:"ready",detail:"API key detected and conservative quota defaults are active.",quota:{maxConcurrency:2,maxRequestsPerMinute:10,maxRequestsPerDay:1e3}},{name:"OpenAI",model:"gpt-5.4",state:"ready",detail:"API key configured.",quota:{maxConcurrency:2,maxRequestsPerMinute:10,maxRequestsPerDay:1e3}},{name:"Claude",model:"claude-sonnet-4-6",state:"needs-config",detail:"API key is missing."}],google:{state:"ready",detail:"Google OAuth app credentials are configured. Project-level GSC connections can be created from the dashboard."},selfHostNotes:["Configuration is stored in ~/.canonry/config.yaml.","The local config file is the source of truth for authentication credentials.","Google OAuth app credentials and per-domain Google tokens are stored in local config, not the database.","Database is SQLite at ~/.canonry/data.db.","API key was auto-generated during canonry init."],bootstrapNote:"Use the UI, CLI, or ~/.canonry/config.yaml to manage settings. Authentication credentials persist to local config."}},FE={apiStatus:{label:"API",state:"ok",detail:"phase-1 · database configured",version:"phase-1",databaseConfigured:!0},workerStatus:{label:"Worker",state:"ok",detail:"phase-1 · database configured · heartbeat 2026-03-09T08:07:00.000Z",version:"phase-1",databaseConfigured:!0,lastHeartbeatAt:"2026-03-09T08:07:00.000Z"}};function WE(e={}){const n=structuredClone(JE),i=structuredClone(FE);if(e.emptyPortfolio&&(n.portfolioOverview.projects=[],n.portfolioOverview.attentionItems=[{id:"attention_setup",tone:"neutral",title:"No projects yet",detail:"Start the guided setup flow to add a domain, import keywords, and launch the first run.",actionLabel:"Open setup",href:"/setup"}],n.portfolioOverview.recentRuns=[],n.portfolioOverview.emptyState={title:"No projects yet",detail:"Canonry becomes useful after one project, a small keyword set, and one competitor list are in place.",ctaLabel:"Launch setup",ctaHref:"/setup"}),e.runScenario==="partial"&&(n.runs[0].status="partial",n.runs[0].duration="7m 24s",n.runs[0].statusDetail="Quota window closed mid-run; 14 of 18 prompts completed before the worker paused.",n.runs[0].summary="Partial visibility sweep after quota cap",n.portfolioOverview.recentRuns[0]=n.runs[0]),e.runScenario==="failed"&&(n.runs[0].status="failed",n.runs[0].duration="1m 43s",n.runs[0].statusDetail="Worker could not reach the provider after repeated retry exhaustion.",n.runs[0].summary="Provider retries exhausted before results were captured",n.portfolioOverview.recentRuns[0]=n.runs[0],n.portfolioOverview.attentionItems.unshift({id:"attention_failed_run",tone:"negative",title:"One queued follow-up failed to start cleanly",detail:"Worker retries exhausted before the provider returned a response.",actionLabel:"Open runs",href:"/runs"})),e.degradedWorker&&(i.workerStatus={label:"Worker",state:"error",detail:"heartbeat stale · last seen 12m ago",version:"phase-1",databaseConfigured:!0,lastHeartbeatAt:"2026-03-09T07:55:00.000Z"}),e.providerNeedsConfig&&(n.settings.providerStatuses=n.settings.providerStatuses.map(l=>({...l,state:"needs-config",detail:"API key is missing, so answer-visibility sweeps are blocked."}))),e.visibilityDropProjectId){const l=n.projects.find(u=>u.project.id===e.visibilityDropProjectId),o=n.portfolioOverview.projects.find(u=>u.project.id===e.visibilityDropProjectId);l&&(l.visibilitySummary.value="49 / 100",l.visibilitySummary.delta="-12 in 48h",l.visibilitySummary.tone="negative",l.visibilitySummary.description="A sharper drop than normal; citations slipped across both local and service-intent prompts.",l.insights.unshift({id:`${l.project.id}_drop`,tone:"negative",title:"Sharp citation drop detected",detail:"Answers that previously cited the domain now ground competitors on both local and service-intent prompts.",actionLabel:"Lost",affectedPhrases:l.visibilityEvidence.filter(u=>u.citationState==="lost").slice(0,5).map(u=>({keyword:u.keyword,evidenceId:u.id,provider:u.provider||void 0,citationState:u.citationState}))})),o&&(o.visibilityScore=49,o.visibilityDelta="-12 in 48h",o.insight="Sharp citation drop detected; grounding now prefers competitors on multiple high-intent prompts.")}return{dashboard:n,health:i}}function Zb(e,n){return e.projects.find(i=>i.project.id===n)}function eA(e,n){return e.runs.find(i=>i.id===n)}function tA(e,n){for(const i of e.projects){const l=i.visibilityEvidence.find(o=>o.id===n);if(l)return{project:i,evidence:l}}}const nA="/api/v1";function sA(){return typeof window<"u"&&window.__CANONRY_CONFIG__?.apiKey?window.__CANONRY_CONFIG__.apiKey:""}async function Ne(e,n){const i=sA(),l=await fetch(`${nA}${e}`,{...n,headers:{"Content-Type":"application/json",...i?{Authorization:`Bearer ${i}`}:{},...n?.headers}});if(!l.ok){const o=await l.text();let u=`API ${l.status}: ${l.statusText}`;if(o)try{const d=JSON.parse(o);typeof d.error=="string"?u=d.error:d.error?.message?u=d.error.message:d.message&&(u=d.message)}catch{u=o}throw new Error(u)}if(l.status!==204)return l.json()}function iA(){return Ne("/projects")}function Hb(e){return Ne(`/projects/${encodeURIComponent(e)}`)}function aA(){return Ne("/runs")}function tr(e){return Ne(`/runs/${encodeURIComponent(e)}`)}function lA(e){return Ne(`/projects/${encodeURIComponent(e)}/keywords`)}function Gb(e){return Ne(`/projects/${encodeURIComponent(e)}/competitors`)}function Kb(e,n){const i=new URLSearchParams;n!==void 0&&i.set("location",n);const l=i.toString();return Ne(`/projects/${encodeURIComponent(e)}/timeline${l?`?${l}`:""}`)}function jc(e,n){return Ne(`/projects/${encodeURIComponent(e)}`,{method:"PUT",body:JSON.stringify(n)})}function rA(e,n){return Ne(`/projects/${encodeURIComponent(e)}/keywords`,{method:"PUT",body:JSON.stringify({keywords:n})})}function oA(e,n){return Ne(`/projects/${encodeURIComponent(e)}/keywords`,{method:"DELETE",body:JSON.stringify({keywords:n})})}function cA(e,n){return Ne(`/projects/${encodeURIComponent(e)}/keywords`,{method:"POST",body:JSON.stringify({keywords:n})})}function Yb(e,n){return Ne(`/projects/${encodeURIComponent(e)}/competitors`,{method:"PUT",body:JSON.stringify({competitors:n})})}async function uA(e,n){const i=await Hb(e);return jc(e,{displayName:i.displayName,canonicalDomain:i.canonicalDomain,ownedDomains:n,country:i.country,language:i.language,tags:i.tags,labels:i.labels,providers:i.providers,locations:i.locations,defaultLocation:i.defaultLocation})}async function dA(e,n){const i=await Hb(e);return jc(e,{displayName:n.displayName??i.displayName,canonicalDomain:n.canonicalDomain??i.canonicalDomain,ownedDomains:n.ownedDomains??i.ownedDomains,country:n.country??i.country,language:n.language??i.language,tags:i.tags,labels:i.labels,providers:i.providers,locations:n.locations??i.locations,defaultLocation:n.defaultLocation!==void 0?n.defaultLocation:i.defaultLocation})}function Vb(e,n){const i={};return Ne(`/projects/${encodeURIComponent(e)}/runs`,{method:"POST",body:JSON.stringify(i)})}function fA(e,n){return Ne(`/projects/${encodeURIComponent(e)}/locations`,{method:"POST",body:JSON.stringify(n)})}async function hA(e,n){await Ne(`/projects/${encodeURIComponent(e)}/locations/${encodeURIComponent(n)}`,{method:"DELETE"})}function mA(e,n){return Ne(`/projects/${encodeURIComponent(e)}/locations/default`,{method:"PUT",body:JSON.stringify({label:n})})}async function pA(e){await Ne(`/projects/${encodeURIComponent(e)}`,{method:"DELETE",body:"{}"})}function gA(e){return Ne(`/projects/${encodeURIComponent(e)}/export`)}function Pb(){return Ne("/settings")}function yA(e,n){return Ne(`/settings/providers/${encodeURIComponent(e)}`,{method:"PUT",body:JSON.stringify(n)})}function vA(e){return Ne("/settings/google",{method:"PUT",body:JSON.stringify(e)})}async function bA(e){try{return await Ne(`/projects/${encodeURIComponent(e)}/schedule`)}catch(n){if(n instanceof Error&&n.message.includes("404"))return null;throw n}}function d0(e,n){return Ne(`/projects/${encodeURIComponent(e)}/schedule`,{method:"PUT",body:JSON.stringify(n)})}async function xA(e){await Ne(`/projects/${encodeURIComponent(e)}/schedule`,{method:"DELETE",body:"{}"})}function SA(e){return Ne(`/projects/${encodeURIComponent(e)}/notifications`)}function wA(e,n){return Ne(`/projects/${encodeURIComponent(e)}/notifications`,{method:"POST",body:JSON.stringify(n)})}async function jA(e,n){await Ne(`/projects/${encodeURIComponent(e)}/notifications/${encodeURIComponent(n)}`,{method:"DELETE",body:"{}"})}function NA(e,n){return Ne(`/projects/${encodeURIComponent(e)}/notifications/${encodeURIComponent(n)}/test`,{method:"POST",body:"{}"})}function kA(e,n,i){return Ne(`/projects/${encodeURIComponent(e)}/keywords/generate`,{method:"POST",body:JSON.stringify({provider:n,count:i})})}function zA(e){return Ne("/apply",{method:"POST",body:JSON.stringify(e)})}function _A(e){return Ne("/runs",{method:"POST",body:JSON.stringify({})})}function CA(e){return Ne(`/projects/${encodeURIComponent(e)}/google/connections`)}function EA(e,n){return Ne(`/projects/${encodeURIComponent(e)}/google/connect`,{method:"POST",body:JSON.stringify({type:n})})}function AA(e,n){return Ne(`/projects/${encodeURIComponent(e)}/google/connections/${encodeURIComponent(n)}`,{method:"DELETE",body:"{}"})}function TA(e){return Ne(`/projects/${encodeURIComponent(e)}/google/properties`)}function OA(e,n,i){return Ne(`/projects/${encodeURIComponent(e)}/google/connections/${encodeURIComponent(n)}/property`,{method:"PUT",body:JSON.stringify({propertyId:i})})}function DA(e,n,i){return Ne(`/projects/${encodeURIComponent(e)}/google/connections/${encodeURIComponent(n)}/sitemap`,{method:"PUT",body:JSON.stringify({sitemapUrl:i})})}function RA(e,n){return Ne(`/projects/${encodeURIComponent(e)}/google/gsc/sync`,{method:"POST",body:JSON.stringify(n??{})})}function LA(e,n){const i=new URLSearchParams;n?.startDate&&i.set("startDate",n.startDate),n?.endDate&&i.set("endDate",n.endDate),n?.query&&i.set("query",n.query),n?.page&&i.set("page",n.page),n?.limit!==void 0&&i.set("limit",String(n.limit));const l=i.toString()?`?${i.toString()}`:"";return Ne(`/projects/${encodeURIComponent(e)}/google/gsc/performance${l}`)}function MA(e,n){return Ne(`/projects/${encodeURIComponent(e)}/google/gsc/inspect`,{method:"POST",body:JSON.stringify({url:n})})}function $A(e,n){const i=new URLSearchParams;n?.url&&i.set("url",n.url),i.set("limit",String(n.limit));const l=i.toString()?`?${i.toString()}`:"";return Ne(`/projects/${encodeURIComponent(e)}/google/gsc/inspections${l}`)}function UA(e){return Ne(`/projects/${encodeURIComponent(e)}/google/gsc/deindexed`)}function BA(e){return Ne(`/projects/${encodeURIComponent(e)}/google/gsc/coverage`)}function IA(e,n){const i=new URLSearchParams,l=i.toString()?`?${i.toString()}`:"";return Ne(`/projects/${encodeURIComponent(e)}/google/gsc/coverage/history${l}`)}function qA(e,n){return Ne(`/projects/${encodeURIComponent(e)}/google/gsc/inspect-sitemap`,{method:"POST",body:JSON.stringify(n??{})})}function ZA(e){return Ne(`/projects/${encodeURIComponent(e)}/google/gsc/sitemaps`)}function HA(e){return Ne(`/projects/${encodeURIComponent(e)}/google/gsc/discover-sitemaps`,{method:"POST",body:"{}"})}function Qb(e){return{id:e.id,name:e.name,displayName:e.displayName,canonicalDomain:e.canonicalDomain,ownedDomains:e.ownedDomains??[],country:e.country,language:e.language,tags:e.tags,labels:e.labels,locations:e.locations??[],defaultLocation:e.defaultLocation??null,configSource:e.configSource,configRevision:e.configRevision,createdAt:e.createdAt,updatedAt:e.updatedAt}}function f0(e){try{return new Date(e).toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}catch{return e}}function GA(e,n){if(!e)return"Waiting";if(!n)return"Running";const i=new Date(n).getTime()-new Date(e).getTime();if(i<1e3)return"<1s";const l=Math.floor(i/1e3);if(l<60)return`${l}s`;const o=Math.floor(l/60),u=l%60;return`${o}m ${u}s`}function Xb(e){return e==="answer-visibility"?"Answer visibility sweep":e}function KA(e){return e==="manual"?"Manual":e==="scheduled"?"Scheduled":e==="config-apply"?"Config apply":e}function ch(e,n){return{id:e.id,projectId:e.projectId,projectName:n,kind:e.kind,kindLabel:Xb(e.kind),status:e.status,trigger:e.trigger??"manual",location:e.location??null,createdAt:e.createdAt,startedAt:e.startedAt?f0(e.startedAt):f0(e.createdAt),duration:GA(e.startedAt,e.finishedAt),statusDetail:e.error?Jb(e.error):YA(e),summary:VA(e),triggerLabel:KA(e.trigger)}}function Jb(e){try{const i=JSON.parse(e);if(typeof i=="object"&&i!==null){const l=i.message??i.error?.message??i[0]?.error?.message;if(typeof l=="string"&&l.length>0)return l.length>200?l.slice(0,200)+"…":l}}catch{}const n=e.match(/\[.*?\]\s*(.+)/);if(n){const i=n[1];return i.length>200?i.slice(0,200)+"…":i}return e.length>200?e.slice(0,200)+"…":e}function YA(e){switch(e.status){case"queued":return"Waiting for execution slot.";case"running":return"Provider queries in progress.";case"completed":return"All key phrases checked.";case"partial":return"Run completed with some key phrases skipped.";case"failed":return e.error?Jb(e.error):"Run failed.";default:return""}}function VA(e){switch(e.status){case"queued":return"Queued for execution";case"running":return"In progress";case"completed":return"Visibility sweep completed";case"partial":return"Partial completion";case"failed":return"Run failed";default:return e.status}}function Fb(e){if(e.length===0)return{score:0,citedCount:0,totalCount:0};const n=new Map;for(const u of e){const d=u.keyword??u.id;n.has(d)||n.set(d,!1),u.citationState==="cited"&&n.set(d,!0)}const i=n.size,l=[...n.values()].filter(Boolean).length;return{score:i>0?Math.round(l/i*100):0,citedCount:l,totalCount:i}}function PA(e){return e>=70?"positive":e>=40?"caution":"negative"}function QA(e){return e==="High"?"negative":e==="Moderate"?"caution":"neutral"}function Wb(e,n){if(e.length===0||n.length===0)return{label:"None",count:0};const i=new Set(n);let l=0;for(const u of e)u.competitorOverlap.some(d=>i.has(d))&&l++;const o=l/e.length;return o>=.5?{label:"High",count:l}:o>=.2?{label:"Moderate",count:l}:{label:"Low",count:l}}function XA(e,n,i,l){const o=[];let u=0;const d=new Set;if(i){const m=new Map;for(const p of i.snapshots)if(p.keyword){const b=`${p.keyword}::${p.provider}`;m.set(b,p)}const g=[...new Set(i.snapshots.map(p=>p.provider))].sort();g.length===0&&g.push("gemini");for(const p of n){if(p.runs.length===0)continue;d.add(p.keyword);const v=p.runs.at(-1)?.transition??"not-cited",w=v==="lost"?"lost":v==="emerging"?"emerging":v==="cited"?"cited":"not-cited";for(const N of g){const z=m.get(`${p.keyword}::${N}`);if(!z&&g.length>1)continue;const j=z?.model??null,k=j?`${N}:${j}`:null,A=k?p.modelRuns?.[k]:void 0,E=p.providerRuns?.[N],O=(E?.length?E:null)??(A?.length?A:null),D=E?.length?"provider":A?.length?"model":"keyword",M=O?O.at(-1).transition:v,H=M==="lost"?"lost":M==="emerging"?"emerging":z?z.citationState==="cited"?"cited":"not-cited":w,V=wf(O||p.runs),L=JA(p,N),Q=(O??p.runs).map(Ae=>({runId:Ae.runId,citationState:Ae.citationState,createdAt:Ae.createdAt,model:L.get(Ae.runId)??null})),Se=FA(Q),ae=D==="provider"&&Se.length<=1?"model":D,fe=WA(Q);o.push({id:`evidence_${e}_${u++}`,keyword:p.keyword,provider:z?.provider??N,model:z?.model??null,location:z?.location??null,citationState:H,changeLabel:eT(M,V),answerSnippet:z?.answerText??"",citedDomains:z?.citedDomains??[],evidenceUrls:[],competitorDomains:z?.competitorOverlap??[],relatedTechnicalSignals:[],groundingSources:z?.groundingSources??[],summary:tT(H,p.keyword),runHistory:Q,historyScope:ae,modelsSeen:Se,modelTransitions:fe})}}}for(const m of l)d.has(m.keyword)||o.push({id:`evidence_${e}_${u++}`,keyword:m.keyword,provider:"",model:null,location:null,citationState:"pending",changeLabel:"Awaiting first run",answerSnippet:"",citedDomains:[],evidenceUrls:[],competitorDomains:[],relatedTechnicalSignals:[],groundingSources:[],summary:`"${m.keyword}" has been added but no visibility run has been triggered yet.`,runHistory:[],historyScope:"keyword",modelsSeen:[],modelTransitions:[]});return o}function JA(e,n){const i=new Map,l=`${n}:`;for(const[o,u]of Object.entries(e.modelRuns??{})){if(!o.startsWith(l))continue;const d=o.slice(l.length),m=d==="unknown"?null:d;for(const g of u)i.set(g.runId,m)}return i}function FA(e){const n=new Set;for(const i of e)i.model&&n.add(i.model);return[...n]}function WA(e){const n=[];let i=null;for(const l of e){const o=l.model??null;o!==i&&i!==null&&n.push({runId:l.runId,createdAt:l.createdAt,fromModel:i,toModel:o}),i=o}return n}function wf(e){if(e.length===0)return 0;const n=e[e.length-1].citationState;let i=0;for(let l=e.length-1;l>=0&&e[l].citationState===n;l--)i++;return i}function eT(e,n){switch(e){case"new":return"First observation";case"cited":return n<=1?"Cited in latest run":`Cited for ${n} runs`;case"lost":return"Lost since last run";case"emerging":return"First citation";case"not-cited":return n<=1?"Not cited in latest run":`Not cited across ${n} runs`;default:return e}}function tT(e,n){switch(e){case"cited":return`Your domain is cited in AI answers for "${n}".`;case"lost":return`Citation was lost for "${n}". Competitors may have gained ground.`;case"emerging":return`Your domain is starting to appear in answers for "${n}".`;case"not-cited":return`No citation detected for "${n}".`;case"pending":return`"${n}" has been added but no visibility run has been triggered yet.`}}function h0(e,n){const i=new Set(n),l=new Map;for(const o of e)if(o.keyword)for(const u of o.competitorOverlap){if(!i.has(u))continue;const d=l.get(u)??new Set;d.add(o.keyword),l.set(u,d)}return l}const af=3;function nT(e){const{evidence:n,timeline:i,latestSnapshots:l,previousSnapshots:o,trackedCompetitors:u}=e,d=[],m=[],g=new Set;for(const A of n)A.citationState==="lost"&&(g.has(A.keyword)||(g.add(A.keyword),m.push({keyword:A.keyword,evidenceId:A.id,provider:A.provider,citationState:"lost"})));m.length>0&&d.push({id:"insight_lost",tone:"negative",title:`Lost citation on ${m.length} keyword${m.length>1?"s":""}`,detail:"Citations dropped since the last run.",actionLabel:"Lost",affectedPhrases:m});const p=h0(l,u),b=h0(o,u);for(const A of u){const E=p.get(A)??new Set,O=b.get(A)??new Set,D=[...E].filter(M=>!O.has(M));D.length>0&&d.push({id:`insight_comp_gained_${A}`,tone:"negative",title:`${A} appeared on ${D.length} keyword${D.length>1?"s":""}`,detail:"A tracked competitor gained new citations.",actionLabel:"Competitor",affectedPhrases:D.map(M=>{const H=n.find(V=>V.keyword===M);return{keyword:M,evidenceId:H?.id??"",citationState:"cited"}})})}const v=new Map;for(const A of i){const E=A.runs.at(-1);E&&v.set(A.keyword,{transition:E.transition,citationState:E.citationState})}const w=[],N=[],z=new Set;for(const[A,{transition:E,citationState:O}]of v){if(!(E==="emerging"||E==="new"&&O==="cited"))continue;z.add(A);const M=n.find(H=>H.keyword===A&&(H.citationState==="emerging"||H.citationState==="cited"));w.push({keyword:A,evidenceId:M?.id??"",provider:M?.provider,citationState:"emerging"})}for(const A of n)A.citationState==="emerging"&&(z.has(A.keyword)||N.push({keyword:A.keyword,evidenceId:A.id,provider:A.provider,citationState:"emerging"}));if(N.length>0){const A=new Set(N.map(E=>E.keyword)).size;d.push({id:"insight_provider_pickup",tone:"positive",title:`Picked up by new provider on ${A} keyword${A>1?"s":""}`,detail:"Your domain started appearing on additional providers.",actionLabel:"Pickup",affectedPhrases:N})}w.length>0&&d.push({id:"insight_first_citation",tone:"positive",title:`First citation on ${z.size} keyword${z.size>1?"s":""}`,detail:"Your domain appeared in AI answers for the first time.",actionLabel:"New",affectedPhrases:w});const j=new Set(n.map(A=>A.keyword)),k=[];for(const A of i){if(!j.has(A.keyword)||A.runs.length<af||A.runs.at(-1)?.citationState!=="not-cited")continue;if(wf(A.runs)>=af){const D=n.find(M=>M.keyword===A.keyword);k.push({keyword:A.keyword,evidenceId:D?.id??"",citationState:"not-cited"})}}k.length>0&&d.push({id:"insight_persistent_gap",tone:"caution",title:`${k.length} keyword${k.length>1?"s":""} uncited for ${af}+ runs`,detail:"These keywords have not been cited by any provider across multiple consecutive runs.",actionLabel:"Gap",affectedPhrases:k});for(const A of u){const E=p.get(A)??new Set,D=[...b.get(A)??new Set].filter(M=>!E.has(M));D.length>0&&d.push({id:`insight_comp_lost_${A}`,tone:"neutral",title:`${A} dropped from ${D.length} keyword${D.length>1?"s":""}`,detail:"A tracked competitor lost citations.",actionLabel:"Competitor",affectedPhrases:D.map(M=>{const H=n.find(V=>V.keyword===M);return{keyword:M,evidenceId:H?.id??"",citationState:"not-cited"}})})}return d.length===0&&d.push({id:"insight_stable",tone:"neutral",title:"No significant changes",detail:"Citation state is stable across all tracked key phrases.",actionLabel:"Stable",affectedPhrases:[]}),d}function sT(e){const n=e[0];if(!n)return{label:"Run Status",value:"None",delta:"No runs yet",tone:"neutral",description:"Trigger a visibility sweep to start tracking.",tooltip:"Current execution state of visibility sweeps. Shows the status of the most recent run and total run count.",trend:[]};const i=n.status==="completed"?"Healthy":n.status==="running"?"Running":n.status==="queued"?"Queued":n.status==="partial"?"Partial":"Failed",l=n.status==="completed"?"positive":n.status==="failed"?"negative":n.status==="partial"?"caution":"neutral";return{label:"Run Status",value:i,delta:`${e.length} total runs`,tone:l,description:`Latest: ${Xb(n.kind)} — ${n.status}`,tooltip:"Current execution state of visibility sweeps. Shows the status of the most recent run and total run count.",trend:[]}}function iT(e){const n=Qb(e.project),i=XA(n.name,e.timeline,e.latestRunDetail,e.keywords),l=e.latestRunDetail?.snapshots??[],o=Fb(l),u=Wb(l,e.competitors.map(v=>v.domain)),d=nT({evidence:i,timeline:e.timeline,latestSnapshots:e.latestRunDetail?.snapshots??[],previousSnapshots:e.previousRunDetail?.snapshots??[],trackedCompetitors:e.competitors.map(v=>v.domain)}),m=[...e.runs].sort((v,w)=>w.createdAt.localeCompare(v.createdAt)),g=m.map(v=>ch(v,e.project.displayName||e.project.name)),p=new Map;for(const v of l){const w=v.provider||"gemini",N=v.model??null,z=`${w}::${N??"unknown"}`,j=p.get(z)??{provider:w,model:N,cited:0,total:0};j.total++,v.citationState==="cited"&&j.cited++,p.set(z,j)}const b=[...p.values()].sort((v,w)=>v.provider.localeCompare(w.provider)||(v.model??"").localeCompare(w.model??"")).map(({provider:v,model:w,cited:N,total:z})=>({provider:v,model:w,score:z>0?Math.round(N/z*100):0,cited:N,total:z}));return{project:n,dateRangeLabel:"All time",contextLabel:`${n.country} / ${n.language.toUpperCase()}`,visibilitySummary:{label:"Answer Visibility",value:l.length>0?`${o.score}`:"No data",delta:l.length>0?`${o.citedCount} of ${o.totalCount} key phrases visible`:"Run a sweep first",tone:l.length>0?PA(o.score):"neutral",description:l.length>0?`${o.citedCount} of ${o.totalCount} tracked key phrases found your domain in at least one AI answer engine.`:"No visibility data yet. Trigger a run to start tracking.",tooltip:'Percentage of tracked key phrases where your domain is cited by at least one AI answer engine. A key phrase is "visible" if any configured provider includes your site in its response.',trend:[]},providerScores:b,competitorPressure:{label:"Competitor Pressure",value:u.label,delta:u.count>0?`${u.count} overlapping citations`:"No overlap detected",tone:QA(u.label),description:e.competitors.length>0?`${e.competitors.length} competitor${e.competitors.length>1?"s":""} tracked.`:"No competitors configured.",tooltip:"How often competitor domains appear alongside yours in AI answers. High pressure means competitors are frequently cited for the same key phrases.",trend:[]},runStatus:sT(m),insights:d,visibilityEvidence:i,competitors:e.competitors.map((v,w)=>{const N=new Set;for(const E of l)(E.competitorOverlap.includes(v.domain)||E.citedDomains.includes(v.domain))&&E.keyword&&N.add(E.keyword);const z=[...N],j=new Set(l.map(E=>E.keyword).filter(Boolean)),k=j.size>0?z.length/j.size:0,A=k>=.5?"High":k>=.2?"Moderate":z.length>0?"Low":"None";return{id:v.id||`comp_${w}`,domain:v.domain,citationCount:z.length,totalKeywords:j.size,pressureLabel:A,citedKeywords:z,movement:"",notes:""}}),recentRuns:g.slice(0,5)}}function aT(e){const n=Qb(e.project),i=e.latestRunDetail?.snapshots??[],l=Fb(i),o=Wb(i,e.competitors.map(g=>g.domain)),d=[...e.runs].sort((g,p)=>p.createdAt.localeCompare(g.createdAt))[0],m=d?ch(d,e.project.displayName||e.project.name):{id:"none",projectId:e.project.id,projectName:e.project.displayName||e.project.name,kind:"answer-visibility",kindLabel:"No runs yet",status:"queued",trigger:"manual",createdAt:"",startedAt:"",duration:"",statusDetail:"",summary:"No runs yet",triggerLabel:""};return{project:n,visibilityScore:l.score,visibilityDelta:i.length>0?`${l.citedCount} of ${l.totalCount} key phrases`:"No data",lastRun:m,insight:i.length>0?`${l.citedCount} of ${l.totalCount} key phrases visible across ${new Set(i.map(g=>g.provider)).size} provider${new Set(i.map(g=>g.provider)).size>1?"s":""}.`:"No runs completed yet.",trend:[],competitorPressureLabel:o.label}}function lT(e,n){const i=[],l=[],o=[];for(const d of e){l.push(iT(d)),o.push(aT(d));const m=[...d.runs].sort((g,p)=>p.createdAt.localeCompare(g.createdAt));for(const g of m)i.push(ch(g,d.project.displayName||d.project.name))}i.sort((d,m)=>m.createdAt.localeCompare(d.createdAt));const u=e.length>0;return{portfolioOverview:{projects:o,attentionItems:u?rT(l):[{id:"attention_setup",tone:"neutral",title:"No projects yet",detail:"Create your first project using the setup wizard, CLI, or API.",actionLabel:"Open setup",href:"/setup"}],recentRuns:i.slice(0,5),systemHealth:[{id:"api",label:"API",tone:"positive",detail:"Connected",meta:"Real-time data"},{id:"provider",label:"Gemini",tone:"positive",detail:"Configured",meta:"Provider active"}],lastUpdatedAt:new Date().toLocaleString("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short"}),...u?{}:{emptyState:{title:"No projects yet",detail:"Canonry becomes useful after one project, a small key phrase set, and one competitor list are in place.",ctaLabel:"Launch setup",ctaHref:"/setup"}}},projects:l,runs:i,setup:{healthChecks:[{id:"api",label:"API reachable",detail:"API is responding.",state:"ready",guidance:"Required for project creation and run history."},{id:"provider",label:"Provider configured",detail:"Gemini key is configured.",state:"ready",guidance:"Required for answer-visibility sweeps."}],projectDraft:{name:"",canonicalDomain:"",country:"US",language:"en"},keywordImportState:{mode:"paste",keywordCount:0,preview:[]},competitorDraft:{domains:[],notes:"Use the CLI to add competitors."},launchState:{enabled:u,ctaLabel:u?"Trigger run":"Create a project first",summary:u?"Ready to run.":"Create a project first to launch a run."}},settings:{providerStatuses:(n?.providers??[]).map(d=>({name:d.name,model:d.model,state:d.configured?"ready":"needs-config",detail:d.configured?"Provider is configured.":"API key is missing.",quota:d.quota})),google:{state:n?.google?.configured?"ready":"needs-config",detail:n?.google?.configured?"Google OAuth app credentials are configured. Project-level GSC connections can be created from the dashboard.":"Google OAuth client ID and client secret are not configured yet."},selfHostNotes:["Configuration is stored in ~/.canonry/config.yaml.","The local config file is the source of truth for authentication credentials.","Google OAuth app credentials and per-domain Google tokens are stored in local config, not the database.","Database is SQLite at ~/.canonry/data.db.","API key was auto-generated during canonry init."],bootstrapNote:"Use the UI, CLI, or ~/.canonry/config.yaml to manage settings. Authentication credentials persist to local config."}}}function rT(e){const n=[];for(const i of e){const l=i.visibilityEvidence.filter(u=>u.citationState==="lost");l.length>0&&n.push({id:`attention_${i.project.id}_lost`,tone:"negative",title:`${i.project.displayName||i.project.name} lost citations`,detail:`${l.length} key phrase${l.length>1?"s":""} lost citation.`,actionLabel:"Open project",href:`/projects/${i.project.id}`});const o=i.recentRuns.filter(u=>u.status==="running"||u.status==="queued");o.length>0&&n.push({id:`attention_${i.project.id}_active`,tone:"neutral",title:`${i.project.displayName||i.project.name} has active runs`,detail:`${o.length} run${o.length>1?"s":""} in progress.`,actionLabel:"View runs",href:"/runs"})}return n.length===0&&n.push({id:"attention_stable",tone:"positive",title:"All projects stable",detail:"No citation losses or active runs to flag.",actionLabel:"View portfolio",href:"/"}),n}const m0=[{label:"Architecture",href:"https://github.com/AINYC/canonry/blob/main/docs/architecture.md"},{label:"Testing Guide",href:"https://github.com/AINYC/canonry/blob/main/docs/testing.md"}],oT=WE(),p0=e=>({label:e,state:"checking",detail:"Checking service health"}),cT={apiStatus:p0("API"),workerStatus:p0("Worker")};async function uT(e,n){try{const i=await fetch(e);if(!i.ok)return{label:n,state:"error",detail:`HTTP ${i.status}`};const l=await i.json(),o=typeof l.version=="string"?l.version:"unknown",u=typeof l.databaseUrlConfigured=="boolean"?l.databaseUrlConfigured:void 0,d=typeof l.lastHeartbeatAt=="string"?l.lastHeartbeatAt:void 0,m=[o,u===!1?"database not configured":"database configured",d?`heartbeat ${d}`:void 0].filter(Boolean).join(" · ");return{label:n,state:"ok",detail:m,version:o,databaseConfigured:u,lastHeartbeatAt:d}}catch(i){return{label:n,state:"error",detail:i instanceof Error?i.message:"unreachable"}}}function ai(e){if(!e)return"/";const n=e.split("?")[0]??"/";return n===""?"/":n.length>1&&n.endsWith("/")?n.slice(0,-1):n}function dT(e,n){const i=ai(e);if(i==="/")return{kind:"overview",path:"/"};if(i==="/runs")return{kind:"runs",path:"/runs"};if(i==="/settings")return{kind:"settings",path:"/settings"};if(i==="/setup")return{kind:"setup",path:"/setup"};if(i==="/projects")return{kind:"projects",path:"/projects"};if(i.startsWith("/projects/")){const l=i.split("/").filter(Boolean);if(l.length<2||l.length>3)return{kind:"not-found",path:i};const[,o,u]=l,d=u===void 0?"overview":u==="search-console"?"search-console":null;return d?Zb(n,o)?{kind:"project",path:i,projectId:o,tab:d}:{kind:"not-found",path:i}:{kind:"not-found",path:i}}return{kind:"not-found",path:i}}function fT(e){return e?ai(e):typeof window<"u"?ai(window.location.pathname):"/"}function ic(e){return e.state==="ok"?"positive":e.state==="checking"?"neutral":"negative"}function ex(e){switch(e){case"completed":return"positive";case"partial":return"caution";case"failed":return"negative";case"queued":case"running":return"neutral"}}function hT(e){switch(e){case"cited":return"positive";case"emerging":return"caution";case"not-cited":return"caution";case"lost":return"negative";case"pending":return"neutral"}}function mT(e){const n=e.match(/^(\[.*?\])\s*(.+)/);if(n){const i=n[1],l=n[2],o=l.indexOf("{");if(o>=0){const u=l.slice(0,o).trim(),d=l.slice(o);try{const m=JSON.parse(d);return`${i} ${u}
222
+
223
+ ${JSON.stringify(m,null,2)}`}catch{}}return`${i}
224
+ ${l}`}try{const i=JSON.parse(e);return JSON.stringify(i,null,2)}catch{return e}}function Nc(e){return e.split("-").map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join(" ")}function pT(e,n,i){return e.map(l=>{if(l.id==="api")return{...l,tone:ic(n.apiStatus),detail:n.apiStatus.state==="ok"?"Healthy":"Needs attention",meta:n.apiStatus.detail};if(l.id==="worker")return{...l,tone:ic(n.workerStatus),detail:n.workerStatus.state==="ok"?"Healthy":"Needs attention",meta:n.workerStatus.detail};const o=i.providerStatuses.filter(g=>g.state==="ready").length,u=i.providerStatuses.length,d=o>0,m=i.providerStatuses.filter(g=>g.state==="ready").map(g=>ix[g.name]??g.name).join(" · ");return{...l,label:"Providers",tone:d?"positive":"caution",detail:`${o} of ${u} configured`,meta:m||"None configured"}})}function gT(e,n){if(e.apiStatus.state!=="ok")return"Launch is blocked until the API responds cleanly.";if(e.apiStatus.databaseConfigured===!1)return"Launch is blocked until the API has a database connection configured.";if(e.workerStatus.state!=="ok")return"Launch is blocked until the worker is healthy and heartbeats are current.";if(!n.providerStatuses.some(i=>i.state==="ready"))return"Launch is blocked until at least one provider is configured."}function yT(e,n,i){const l=gT(n,i),o=structuredClone(e);return o.healthChecks=o.healthChecks.map(u=>{if(u.id==="api")return{...u,detail:n.apiStatus.detail,state:n.apiStatus.state==="ok"?"ready":"attention"};if(u.id==="worker")return{...u,detail:n.workerStatus.detail,state:n.workerStatus.state==="ok"?"ready":"attention"};const d=i.providerStatuses.some(m=>m.state==="ready");return{...u,detail:d?"At least one provider configured.":"No providers configured.",state:d?"ready":"attention"}}),o.launchState.enabled=l===void 0,o.launchState.blockedReason=l,o.launchState.summary=l??"Queue a visibility sweep first, then follow with a site audit to explain movement.",o}function jn(e,n){return i=>{i.preventDefault(),i.stopPropagation(),e(n)}}function Bo(e,n){return n==="projects"?e.kind==="projects"||e.kind==="project":n==="project"?e.kind==="project":e.kind===n}function g0({compact:e=!1,navigate:n}){return c.jsxs("a",{className:`brand-lockup ${e?"brand-lockup-compact":""}`,href:"/","aria-label":"Canonry home",onClick:jn(n,"/"),children:[c.jsx("img",{className:"brand-icon",src:"/favicon.svg",alt:"","aria-hidden":"true"}),c.jsxs("span",{className:"brand-copy",children:[c.jsx("span",{className:"brand-mark",children:"Canonry"}),e?null:c.jsx("span",{className:"brand-subtitle",children:"AEO Monitor"})]})]})}function vT({points:e,tone:n}){const i=x.useId();if(e.length===0)return null;const l=42,o=132,u=5,d=Math.min(...e),g=Math.max(...e)-d||1,p=o-u*2,b=l-u*2,v=e.map((w,N)=>{const z=u+N/Math.max(e.length-1,1)*p,j=u+(1-(w-d)/g)*b;return`${z},${j}`}).join(" ");return c.jsxs("svg",{className:`sparkline sparkline-${n}`,viewBox:`0 0 ${o} ${l}`,"aria-hidden":"true",children:[c.jsx("defs",{children:c.jsx("clipPath",{id:i,children:c.jsx("rect",{x:u,y:u,width:p,height:b,rx:"8"})})}),c.jsx("line",{className:"sparkline-guide",x1:u,x2:o-u,y1:l-u,y2:l-u}),c.jsx("polyline",{clipPath:`url(#${i})`,points:v,vectorEffect:"non-scaling-stroke"})]})}function tx({text:e}){return c.jsxs("span",{className:"info-tooltip-wrapper",children:[c.jsxs("svg",{className:"info-tooltip-icon",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[c.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),c.jsx("path",{d:"M8 7v4M8 5.5v0",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),c.jsx("span",{className:"info-tooltip-bubble",role:"tooltip",children:e})]})}function lf({value:e,label:n,delta:i,tone:l,description:o,tooltip:u,isNumeric:d=!0}){const p=2*Math.PI*48,b=Number.parseInt(e,10),v=d&&!Number.isNaN(b)?Math.min(b/100,1):.5,w=p*(1-v);return c.jsxs("div",{className:"score-gauge",children:[c.jsxs("div",{className:"gauge-ring-wrapper",children:[c.jsxs("svg",{className:"gauge-ring",viewBox:"0 0 120 120","aria-hidden":"true",children:[c.jsx("circle",{className:"gauge-bg",cx:"60",cy:"60",r:48,strokeWidth:6}),c.jsx("circle",{className:`gauge-fill gauge-fill-${l}`,cx:"60",cy:"60",r:48,strokeWidth:6,strokeDasharray:p,strokeDashoffset:w,transform:"rotate(-90 60 60)"})]}),c.jsx("div",{className:"gauge-center",children:c.jsx("span",{className:d?"gauge-value":"gauge-value-text",children:e.split(" / ")[0]})})]}),c.jsxs("p",{className:"gauge-label",children:[n,u&&c.jsx(tx,{text:u})]}),c.jsx("p",{className:"gauge-delta",children:i}),c.jsx("p",{className:"gauge-description",children:o})]})}function Mt({tone:e,children:n}){const i=e==="positive"?"success":e==="caution"?"warning":e==="negative"?"destructive":"neutral";return c.jsx(Mb,{variant:i,children:n})}function kc({status:e}){return c.jsx(Mt,{tone:ex(e),children:Nc(e)})}function nx({state:e}){return c.jsx(Mt,{tone:hT(e),children:Nc(e)})}function sx({run:e,onOpen:n}){return c.jsxs("article",{className:"run-row",children:[c.jsxs("div",{className:"run-row-main",children:[c.jsxs("div",{className:"run-row-head",children:[c.jsxs("div",{children:[c.jsx("p",{className:"run-row-title",children:e.summary}),c.jsxs("p",{className:"run-row-subtitle",children:[e.projectName,e.location?` · ${e.location}`:""," · ",e.kindLabel]})]}),c.jsx(kc,{status:e.status})]}),c.jsx("p",{className:"run-row-detail",children:e.statusDetail})]}),c.jsxs("dl",{className:"run-row-meta",children:[c.jsxs("div",{children:[c.jsx("dt",{children:"Started"}),c.jsx("dd",{children:e.startedAt})]}),c.jsxs("div",{children:[c.jsx("dt",{children:"Duration"}),c.jsx("dd",{children:e.duration})]}),c.jsxs("div",{children:[c.jsx("dt",{children:"Trigger"}),c.jsx("dd",{children:e.triggerLabel})]})]}),c.jsx(ue,{variant:"outline",size:"sm",type:"button",onClick:()=>n(e.id),children:"View run"})]})}function uh({provider:e}){const n={gemini:"border-blue-800/50 bg-blue-950/40 text-blue-300",openai:"border-green-800/50 bg-green-950/40 text-green-300",claude:"border-amber-800/50 bg-amber-950/40 text-amber-300",local:"border-purple-800/50 bg-purple-950/40 text-purple-300"};return c.jsx("span",{className:`inline-flex items-center rounded-full border px-2 py-0.5 text-[10px] font-medium uppercase tracking-wide ${n[e]??"border-zinc-700 bg-zinc-800 text-zinc-300"}`,children:e})}function bT({insights:e,onOpenEvidence:n}){const[i,l]=x.useState(null);return c.jsx("div",{className:"insight-list",children:e.map(o=>{const u=i===o.id,d=o.affectedPhrases.length>0;return c.jsxs("div",{children:[c.jsxs("div",{className:`insight-row insight-row-${o.tone} ${d?"cursor-pointer":""}`,onClick:d?()=>l(u?null:o.id):void 0,children:[c.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[d&&c.jsx(Pf,{size:12,className:`shrink-0 text-zinc-500 transition-transform duration-150 ${u?"rotate-90":""}`}),c.jsx(Mt,{tone:o.tone,children:o.actionLabel}),c.jsx("span",{className:"text-sm font-medium text-zinc-100 truncate",children:o.title}),c.jsx("span",{className:"hidden sm:inline text-xs text-zinc-500 truncate",children:o.detail})]}),d&&c.jsxs("span",{className:"text-[11px] text-zinc-600 whitespace-nowrap",children:[o.affectedPhrases.length," phrase",o.affectedPhrases.length>1?"s":""]})]}),u&&c.jsx("div",{className:"divide-y divide-zinc-800/20",children:o.affectedPhrases.map(m=>c.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-2 pl-9 bg-zinc-900/40",children:[c.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[c.jsx(nx,{state:m.citationState}),c.jsx("span",{className:"text-sm text-zinc-200 truncate",children:m.keyword}),c.jsx("div",{className:"hidden sm:flex gap-1",children:m.provider&&c.jsx(uh,{provider:m.provider})})]}),c.jsx("button",{type:"button",className:"text-xs text-zinc-400 hover:text-zinc-200 whitespace-nowrap transition-colors",onClick:g=>{g.stopPropagation(),n(m.evidenceId)},children:"View →"})]},m.evidenceId))})]},o.id)})})}function xT({history:e,maxDots:n=12}){const i=e.slice(-n);if(i.length===0)return c.jsx("span",{className:"text-[11px] text-zinc-600",children:"No data"});const l={cited:"bg-emerald-400","not-cited":"bg-zinc-600",lost:"bg-rose-400",emerging:"bg-amber-400 ring-1 ring-amber-300/60"},o=new Date(i[0].createdAt).toLocaleDateString(void 0,{month:"short",day:"numeric"}),u=new Date(i[i.length-1].createdAt).toLocaleDateString(void 0,{month:"short",day:"numeric"});return c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx("span",{className:"text-[9px] text-zinc-600 shrink-0",children:o}),c.jsx("div",{className:"flex items-center gap-[3px]",title:`${i.length} runs`,children:i.map((d,m)=>c.jsx("div",{className:`h-2.5 w-2.5 rounded-sm ${l[d.citationState]??"bg-zinc-700"} ${d.model&&m>0&&i[m-1]?.model&&i[m-1].model!==d.model?"ring-1 ring-amber-300/80 ring-offset-1 ring-offset-zinc-950":""}`,title:[d.citationState,new Date(d.createdAt).toLocaleDateString(),d.model?`model ${d.model}`:null,d.model&&m>0&&i[m-1]?.model&&i[m-1].model!==d.model?"model changed":null].filter(Boolean).join(" — ")},m))}),c.jsx("span",{className:"text-[9px] text-zinc-600 shrink-0",children:u})]})}function ST(e){const n=new Map;for(const l of e)for(const o of l.runHistory){const u=n.get(o.createdAt);u?u.states.push(o.citationState):n.set(o.createdAt,{states:[o.citationState],runId:o.runId})}return[...n.entries()].sort(([l],[o])=>l.localeCompare(o)).map(([l,{states:o,runId:u}])=>({runId:u,createdAt:l,citationState:o.includes("cited")?"cited":o.includes("emerging")?"emerging":"not-cited"}))}function wT({phrase:e,items:n,onOpenEvidence:i,showLocationLabels:l=!0,compareLocations:o=!1,timelineLoading:u=!1,onDeleteKeyword:d}){const m=n.map(z=>z.citationState),g=m.includes("cited")?"cited":m.includes("emerging")?"emerging":m.includes("lost")?"lost":m.every(z=>z==="pending")?"pending":"not-cited",p=ST(n),b=n.filter(z=>z.citationState==="cited"||z.citationState==="emerging").length,v=(()=>{if(p.length<4)return"flat";const z=p.slice(-3),j=p.slice(-6,-3);if(j.length===0)return"flat";const k=z.filter(E=>E.citationState==="cited"||E.citationState==="emerging").length,A=j.filter(E=>E.citationState==="cited"||E.citationState==="emerging").length;return k>A?"up":k<A?"down":"flat"})(),w=(()=>{if(p.length===0)return"Awaiting first run";if(p.length===1)return"First observation";const z=p[p.length-1].citationState,j=p[p.length-2].citationState,k=z==="cited"||z==="emerging",A=j==="cited"||j==="emerging";if(!A&&k)return"Newly cited";if(A&&!k)return"Lost citation";let E=0;for(let O=p.length-1;O>=0;O--){const D=p[O].citationState;if((D==="cited"||D==="emerging")===k)E++;else break}return k?E<=1?"Cited in latest run":`Cited ${E} runs in a row`:E<=1?"Missed in latest run":`Missed for ${E} runs`})(),N=v==="up"?"↑":v==="down"?"↓":"→";return c.jsxs("div",{className:`evidence-phrase-card evidence-phrase-card--${g}`,children:[c.jsxs("div",{className:"evidence-card-header",children:[c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsx("p",{className:"evidence-card-keyword",children:e}),c.jsxs("div",{className:"evidence-card-status-row",children:[c.jsx(nx,{state:g}),c.jsxs("span",{className:`evidence-card-trend evidence-card-trend--${v}`,children:[c.jsx("span",{"aria-hidden":"true",children:N}),c.jsx("span",{children:w})]})]})]}),d&&c.jsx("button",{type:"button",className:"ml-2 shrink-0 text-zinc-600 hover:text-rose-400 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-rose-500",onClick:d,title:`Remove "${e}"`,"aria-label":`Remove key phrase "${e}"`,children:"×"})]}),c.jsxs("div",{className:`evidence-card-timeline-row${u?" opacity-40 pointer-events-none":""}`,children:[u?c.jsx("span",{className:"text-[10px] text-zinc-500 italic animate-pulse",children:"Loading…"}):c.jsx(xT,{history:p,maxDots:14}),c.jsxs("span",{className:"evidence-card-ratio",children:[b,"/",n.length," provider",n.length!==1?"s":""]})]}),o?(()=>{const z=Array.from(n.reduce((j,k)=>{const A=k.location??"",E=j.get(A)??[];return j.set(A,[...E,k]),j},new Map)).map(([j,k])=>({loc:j||"No location",locItems:k}));return c.jsx("div",{className:"evidence-card-location-compare",children:z.map(({loc:j,locItems:k})=>{const A=k.filter(E=>E.citationState==="cited"||E.citationState==="emerging").length;return c.jsxs("div",{className:"evidence-card-location-row",children:[c.jsx("span",{className:"evidence-card-location-label",children:j}),c.jsxs("div",{className:"evidence-card-location-providers",children:[k.filter(E=>E.citationState!=="pending").map(E=>c.jsxs("button",{type:"button",className:`evidence-provider-btn evidence-provider-btn--${E.citationState} evidence-provider-btn--compact`,onClick:()=>i(E.id),title:`View ${E.provider} evidence for "${e}" in ${j}`,children:[c.jsx("span",{className:"capitalize",children:E.provider}),c.jsx("span",{"aria-hidden":"true",className:"font-bold",children:E.citationState==="cited"||E.citationState==="emerging"?"✓":E.citationState==="lost"?"✗":"–"})]},E.id)),k.every(E=>E.citationState==="pending")&&c.jsx("span",{className:"text-xs text-zinc-500 italic",children:"Pending"})]}),c.jsxs("span",{className:"evidence-card-location-score",children:[A,"/",k.length]})]},j)})})})():c.jsxs("div",{className:"evidence-card-providers",children:[n.filter(z=>z.citationState!=="pending").map(z=>c.jsxs("button",{type:"button",className:`evidence-provider-btn evidence-provider-btn--${z.citationState}`,onClick:()=>i(z.id),title:`View ${z.provider} evidence for "${e}"`,children:[c.jsx("span",{className:"capitalize",children:z.provider}),z.location&&l&&c.jsx("span",{className:"text-[9px] opacity-60",children:z.location}),c.jsx("span",{"aria-hidden":"true",className:"font-bold",children:z.citationState==="cited"||z.citationState==="emerging"?"✓":z.citationState==="lost"?"✗":"–"}),c.jsx("span",{className:"opacity-50 text-[10px]",children:"View →"})]},z.id)),n.every(z=>z.citationState==="pending")&&c.jsx("span",{className:"text-xs text-zinc-500 italic py-1",children:"Awaiting first run"})]})]})}function jT({evidence:e,onOpenEvidence:n,showLocationLabels:i=!0,compareLocations:l=!1,timelineLoading:o=!1,onDeleteKeyword:u}){const d=x.useMemo(()=>{const m=new Map;for(const g of e){const p=m.get(g.keyword)??[];m.set(g.keyword,[...p,g])}return[...m.entries()].map(([g,p])=>({phrase:g,items:p}))},[e]);return d.length===0?c.jsx("p",{className:"supporting-copy",children:"No key phrases tracked yet."}):c.jsx("div",{className:"evidence-card-grid",children:d.map(({phrase:m,items:g})=>c.jsx(wT,{phrase:m,items:g,onOpenEvidence:n,showLocationLabels:i,compareLocations:l,timelineLoading:o,onDeleteKeyword:u?()=>u(m):void 0},m))})}function NT(e){return e==="High"?"negative":e==="Moderate"?"caution":"neutral"}function kT({competitors:e}){return e.length===0?c.jsx("p",{className:"text-sm text-zinc-500",children:"No competitors configured. Add competitors to track overlap."}):c.jsx("div",{className:"competitor-table-wrap",children:c.jsxs("table",{className:"competitor-table",children:[c.jsx("thead",{children:c.jsxs("tr",{children:[c.jsx("th",{children:"Domain"}),c.jsx("th",{children:"Pressure"}),c.jsx("th",{children:"Citations"}),c.jsx("th",{children:"Key Phrases"})]})}),c.jsx("tbody",{children:e.map(n=>c.jsxs("tr",{children:[c.jsx("td",{className:"font-medium text-zinc-100",children:n.domain}),c.jsx("td",{children:c.jsx(Mt,{tone:NT(n.pressureLabel),children:n.pressureLabel})}),c.jsx("td",{className:"text-zinc-300 tabular-nums",children:n.totalKeywords>0?`${n.citationCount} / ${n.totalKeywords}`:"—"}),c.jsx("td",{className:"text-zinc-500 text-xs",children:n.citedKeywords.length>0?n.citedKeywords.join(", "):"Not cited"})]},n.id))})]})})}function zT({project:e,onNavigate:n}){const i=`/projects/${e.project.id}`;return c.jsxs("a",{className:"project-row cursor-pointer",href:i,onClick:jn(n,i),children:[c.jsxs("div",{className:"project-row-primary",children:[c.jsxs("div",{children:[c.jsx("p",{className:"project-name",children:e.project.name}),c.jsx("p",{className:"project-domain",children:e.project.canonicalDomain})]}),c.jsx("p",{className:"project-insight",children:e.insight})]}),c.jsx("div",{className:"project-row-stat",children:c.jsxs("div",{className:"metric-inline-block",children:[c.jsx("p",{className:"metric-inline-label",children:"Answer Visibility"}),c.jsx("p",{className:"metric-inline-value",children:e.visibilityScore}),c.jsx("p",{className:"metric-inline-delta",children:e.visibilityDelta})]})}),c.jsx("div",{className:"project-row-stat",children:c.jsxs("div",{className:"metric-inline-block",children:[c.jsx("p",{className:"metric-inline-label",children:"Competitor Pressure"}),c.jsx("p",{className:"metric-inline-value",children:e.competitorPressureLabel}),c.jsxs("p",{className:"metric-inline-delta",children:[e.lastRun.kindLabel," · ",Nc(e.lastRun.status)]})]})}),c.jsx("div",{className:"project-row-chart",children:c.jsx(vT,{points:e.trend,tone:ex(e.lastRun.status)})}),c.jsx("span",{className:"project-row-link",children:c.jsx(Pf,{className:"h-4 w-4 text-zinc-500"})})]})}function _T({model:e,systemHealth:n,onNavigate:i,onOpenRun:l}){return c.jsxs("div",{className:"page-container",children:[c.jsxs("div",{className:"page-header",children:[c.jsxs("div",{className:"page-header-left",children:[c.jsx("h1",{className:"page-title",children:"Portfolio"}),c.jsx("p",{className:"page-subtitle",children:"Visibility and execution state across all projects"})]}),c.jsx("div",{className:"page-header-right",children:c.jsx("p",{className:"text-[11px] text-zinc-600",children:e.lastUpdatedAt})})]}),e.projects.length>0?c.jsx("div",{className:"project-list project-list-scrollable",children:e.projects.map(o=>c.jsx(zT,{project:o,onNavigate:i},o.project.id))}):c.jsxs(Pe,{className:"surface-card empty-card",children:[c.jsx("h3",{children:e.emptyState?.title??"No projects yet"}),c.jsx("p",{className:"supporting-copy",children:e.emptyState?.detail}),c.jsx(ue,{size:"sm",asChild:!0,children:c.jsx("a",{href:e.emptyState?.ctaHref??"/setup",onClick:jn(i,e.emptyState?.ctaHref??"/setup"),children:e.emptyState?.ctaLabel??"Launch setup"})})]}),c.jsxs("div",{className:"overview-secondary-grid",children:[e.attentionItems.length>0&&c.jsxs("section",{className:"overview-secondary-section",children:[c.jsx("div",{className:"section-head section-head-inline",children:c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Needs attention"}),c.jsx("h2",{className:"section-title-sm",children:"What changed"})]})}),c.jsx("div",{className:"attention-list attention-list-scrollable",children:e.attentionItems.map(o=>c.jsxs("a",{className:`attention-item attention-item-${o.tone}`,href:o.href,onClick:jn(i,o.href),children:[c.jsxs("div",{children:[c.jsx("p",{className:"attention-title",children:o.title}),c.jsx("p",{className:"attention-detail",children:o.detail})]}),c.jsx("span",{className:"attention-action",children:o.actionLabel})]},o.id))})]}),c.jsxs("section",{className:"overview-secondary-section",children:[c.jsx("div",{className:"section-head section-head-inline",children:c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Recent runs"}),c.jsx("h2",{className:"section-title-sm",children:"Activity"})]})}),c.jsx("div",{className:"compact-stack compact-stack-scrollable",children:e.recentRuns.length>0?e.recentRuns.map(o=>c.jsxs("button",{className:"compact-run",type:"button",onClick:()=>l(o.id),children:[c.jsxs("div",{children:[c.jsx("p",{className:"compact-run-title",children:o.projectName}),c.jsx("p",{className:"compact-run-detail",children:o.summary})]}),c.jsx(kc,{status:o.status})]},o.id)):c.jsx("p",{className:"supporting-copy",children:"Run history appears here after the first launch."})})]})]}),c.jsxs("section",{className:"page-section",children:[c.jsx("div",{className:"section-head section-head-inline",children:c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"System health"}),c.jsx("h2",{className:"section-title-sm",children:"Infrastructure"})]})}),c.jsx("div",{className:"health-grid",children:n.map(o=>c.jsxs(Pe,{className:"surface-card compact-card",children:[c.jsxs("div",{className:"section-head",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:o.label}),c.jsx("h3",{children:o.detail})]}),c.jsx(Mt,{tone:o.tone,children:o.label})]}),c.jsx("p",{className:"supporting-copy",children:o.meta})]},o.id))})]})]})}function CT({projects:e,onNavigate:n,onProjectCreated:i}){const[l,o]=x.useState(!1),[u,d]=x.useState(""),[m,g]=x.useState(""),[p,b]=x.useState(""),[v,w]=x.useState("US"),[N,z]=x.useState("en"),[j,k]=x.useState(!1),[A,E]=x.useState(null),O=u.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),D=async()=>{if(!(!O||!p)){k(!0),E(null);try{const M=await jc(O,{displayName:m||u,canonicalDomain:p,country:v,language:N});i(),d(""),g(""),b(""),w("US"),z("en"),o(!1),n(`/projects/${M.id}`)}catch(M){E(M instanceof Error?M.message:"Failed to create project")}finally{k(!1)}}};return c.jsxs("div",{className:"page-container",children:[c.jsxs("div",{className:"page-header",children:[c.jsxs("div",{className:"page-header-left",children:[c.jsx("h1",{className:"page-title",children:"Projects"}),c.jsxs("p",{className:"page-subtitle",children:[e.length," project",e.length!==1?"s":""," tracked"]})]}),c.jsx("div",{className:"page-header-right",children:c.jsxs(ue,{type:"button",onClick:()=>o(M=>!M),children:[c.jsx(Ly,{className:"size-4 mr-1.5"}),"Add project"]})})]}),l?c.jsxs(Pe,{className:"surface-card mb-6",children:[c.jsx("div",{className:"section-head",children:c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"New project"}),c.jsx("h2",{className:"text-sm font-medium text-zinc-200",children:"Create a new monitoring project"})]})}),c.jsxs("div",{className:"compact-stack mt-4",children:[c.jsxs("div",{className:"setup-field-row",children:[c.jsxs("div",{className:"setup-field",children:[c.jsx("label",{className:"setup-label",htmlFor:"new-project-name",children:"Project name"}),c.jsx("input",{id:"new-project-name",className:"setup-input",type:"text",placeholder:"my-project",value:u,onChange:M=>d(M.target.value)}),O&&O!==u?c.jsxs("p",{className:"supporting-copy",children:["Slug: ",O]}):null]}),c.jsxs("div",{className:"setup-field",children:[c.jsx("label",{className:"setup-label",htmlFor:"new-display-name",children:"Display name"}),c.jsx("input",{id:"new-display-name",className:"setup-input",type:"text",placeholder:"My Project",value:m,onChange:M=>g(M.target.value)})]})]}),c.jsxs("div",{className:"setup-field",children:[c.jsx("label",{className:"setup-label",htmlFor:"new-domain",children:"Canonical domain"}),c.jsx("input",{id:"new-domain",className:"setup-input",type:"text",placeholder:"example.com",value:p,onChange:M=>b(M.target.value)})]}),c.jsxs("div",{className:"setup-field-row",children:[c.jsxs("div",{className:"setup-field",children:[c.jsx("label",{className:"setup-label",htmlFor:"new-country",children:"Country"}),c.jsx("input",{id:"new-country",className:"setup-input",type:"text",placeholder:"US",maxLength:2,value:v,onChange:M=>w(M.target.value.toUpperCase())})]}),c.jsxs("div",{className:"setup-field",children:[c.jsx("label",{className:"setup-label",htmlFor:"new-language",children:"Language"}),c.jsx("input",{id:"new-language",className:"setup-input",type:"text",placeholder:"en",maxLength:5,value:N,onChange:M=>z(M.target.value.toLowerCase())})]})]})]}),A?c.jsx("p",{className:"text-rose-400 text-sm mt-3",children:A}):null,c.jsxs("div",{className:"flex items-center gap-3 mt-4",children:[c.jsx(ue,{type:"button",disabled:!O||!p||j,onClick:D,children:j?"Creating...":"Create project"}),c.jsx(ue,{type:"button",variant:"ghost",onClick:()=>o(!1),children:"Cancel"})]})]}):null,e.length>0?c.jsx("div",{className:"data-table-wrapper",children:c.jsxs("table",{className:"data-table",children:[c.jsx("thead",{children:c.jsxs("tr",{children:[c.jsx("th",{children:"Name"}),c.jsx("th",{children:"Domain"}),c.jsx("th",{children:"Visibility"}),c.jsx("th",{children:"Last run"}),c.jsx("th",{className:"text-right",children:"Country"})]})}),c.jsx("tbody",{children:e.map(M=>{const H=`/projects/${M.project.id}`,V=M.recentRuns[0];return c.jsxs("tr",{className:"cursor-pointer",onClick:()=>n(H),children:[c.jsxs("td",{children:[c.jsx("a",{className:"text-zinc-100 font-medium hover:underline",href:H,onClick:jn(n,H),children:M.project.displayName||M.project.name}),c.jsx("p",{className:"text-[11px] text-zinc-500",children:M.project.name})]}),c.jsx("td",{className:"text-zinc-400",children:M.project.canonicalDomain}),c.jsx("td",{children:c.jsx(Mt,{tone:M.visibilitySummary.tone,children:M.visibilitySummary.value})}),c.jsx("td",{className:"text-zinc-500 text-sm",children:V?c.jsx(kc,{status:V.status}):c.jsx("span",{className:"text-zinc-600",children:"No runs"})}),c.jsx("td",{className:"text-right text-zinc-500",children:M.project.country})]},M.project.id)})})]})}):l?null:c.jsxs(Pe,{className:"surface-card empty-card",children:[c.jsx("h3",{children:"No projects yet"}),c.jsx("p",{className:"supporting-copy",children:"Create your first monitoring project to start tracking AI visibility."}),c.jsxs(ue,{type:"button",onClick:()=>o(!0),children:[c.jsx(Ly,{className:"size-4 mr-1.5"}),"Add project"]})]}),c.jsx(ET,{onApplied:i})]})}function ET({onApplied:e}){const[n,i]=x.useState(""),[l,o]=x.useState(!1),[u,d]=x.useState([]),[m,g]=x.useState([]),p=async()=>{if(!n.trim())return;o(!0),d([]),g([]);const b=Lj(n),v=[],w=[];for(let N=0;N<b.length;N++){const z=b[N];if(z.errors.length>0){v.push(`Document ${N+1}: ${z.errors[0]?.message}`);continue}const j=z.toJSON();if(!(!j||typeof j!="object"))try{const k=await zA(j);w.push(`Applied "${k.displayName||k.name}" (revision ${k.configRevision})`)}catch(k){v.push(`Document ${N+1}: ${k instanceof Error?k.message:String(k)}`)}}d(w),g(v),o(!1),w.length>0&&e()};return c.jsxs("section",{className:"mt-8",children:[c.jsx("div",{className:"page-section-divider"}),c.jsx("div",{className:"section-head mt-6",children:c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Config as code"}),c.jsx("h2",{className:"text-sm font-medium text-zinc-200",children:"Apply YAML"})]})}),c.jsxs("p",{className:"text-zinc-500 text-sm mb-3",children:["Paste a ",c.jsx("code",{className:"text-zinc-400",children:"canonry.yaml"})," config (multi-document YAML with ",c.jsx("code",{className:"text-zinc-400",children:"---"})," separators supported)."]}),c.jsx("textarea",{className:"setup-input w-full font-mono text-xs",rows:10,placeholder:`apiVersion: canonry/v1
225
+ kind: Project
226
+ metadata:
227
+ name: my-project
228
+ spec:
229
+ canonicalDomain: example.com
230
+ country: US
231
+ language: en
232
+ keywords: []`,value:n,onChange:b=>i(b.target.value)}),u.length>0&&c.jsx("ul",{className:"mt-2 space-y-1",children:u.map((b,v)=>c.jsx("li",{className:"text-emerald-400 text-sm",children:b},v))}),m.length>0&&c.jsx("ul",{className:"mt-2 space-y-1",children:m.map((b,v)=>c.jsx("li",{className:"text-rose-400 text-sm",children:b},v))}),c.jsx("div",{className:"mt-3",children:c.jsx(ue,{type:"button",disabled:!n.trim()||l,onClick:p,children:l?"Applying...":"Apply"})})]})}function AT({model:e,tab:n,onOpenEvidence:i,onOpenRun:l,onTriggerRun:o,onDeleteProject:u,onAddKeywords:d,onDeleteKeywords:m,onAddCompetitors:g,onUpdateOwnedDomains:p,onUpdateProject:b,onNavigate:v}){const[w,N]=x.useState(!1),[z,j]=x.useState(!1),[k,A]=x.useState(!1),[E,O]=x.useState(null),[D,M]=x.useState(!1),[H,V]=x.useState(""),[L,Q]=x.useState(!1),[Se,ae]=x.useState(null),[fe,Ae]=x.useState(!1),[qe,Le]=x.useState(""),[q,K]=x.useState(!1),[ie,he]=x.useState(!1),[te,C]=x.useState(""),[G,ne]=x.useState(!1),[F,de]=x.useState(void 0),[me,we]=x.useState(!1),[U,se]=x.useState(null),[Ze,re]=x.useState(!1),Ie=x.useMemo(()=>new Set(e.visibilityEvidence.map(oe=>oe.location??"")),[e.visibilityEvidence]),Ut=Ie.has(""),ft=x.useMemo(()=>[...Ie].filter(Boolean),[Ie]);x.useEffect(()=>{if(F===void 0||F===""){se(null),re(!1);return}re(!0),Kb(e.project.name,F).then(oe=>{se(oe),re(!1)}).catch(()=>{se(null),re(!1)})},[F,e.project.name]);const At=x.useMemo(()=>{if(!U)return null;const oe=new Map;for(const Oe of U){for(const[Bt,nt]of Object.entries(Oe.providerRuns??{}))oe.set(`${Oe.keyword}::${Bt}`,nt.map(rn=>({runId:rn.runId,citationState:rn.citationState,createdAt:rn.createdAt})));(!Oe.providerRuns||Object.keys(Oe.providerRuns).length===0)&&oe.set(`${Oe.keyword}::`,Oe.runs.map(Bt=>({runId:Bt.runId,citationState:Bt.citationState,createdAt:Bt.createdAt})))}return oe},[U]),In=x.useMemo(()=>{const oe=F!==void 0?e.visibilityEvidence.filter(Oe=>F===""?!Oe.location:Oe.location===F):e.visibilityEvidence;return At?oe.map(Oe=>{const Bt=At.get(`${Oe.keyword}::${Oe.provider}`)??At.get(`${Oe.keyword}::`);return Bt?{...Oe,runHistory:Bt}:Oe}):oe},[e.visibilityEvidence,F,At]);async function as(){const oe=await gA(e.project.name),Oe=typeof oe=="string"?oe:JSON.stringify(oe,null,2),Bt=new Blob([Oe],{type:"text/yaml"}),nt=URL.createObjectURL(Bt),rn=document.createElement("a");rn.href=nt,rn.download=`${e.project.name}.yaml`,rn.click(),URL.revokeObjectURL(nt)}async function Nn(oe){ae(oe);try{await m(e.project.name,[oe])}finally{ae(null)}}async function Ft(){const oe=H.split(`
233
+ `).map(Oe=>Oe.trim()).filter(Boolean);if(oe.length!==0){Q(!0);try{await d(e.project.name,oe),V(""),M(!1)}finally{Q(!1)}}}async function ht(){const oe=qe.trim();if(oe){K(!0);try{await g(e.project.name,[oe]),Le(""),Ae(!1)}finally{K(!1)}}}async function Yt(){const oe=te.trim();if(oe){ne(!0);try{const Oe=e.project.ownedDomains??[];await p(e.project.name,[...Oe,oe]),C(""),he(!1)}finally{ne(!1)}}}async function Xn(oe){ne(!0);try{const Oe=e.project.ownedDomains??[];await p(e.project.name,Oe.filter(Bt=>Bt!==oe))}finally{ne(!1)}}const Jn=oe=>!Number.isNaN(Number.parseInt(oe,10)),Tt=[{key:"overview",label:"Overview",href:`/projects/${e.project.id}`},{key:"search-console",label:"Search Console",href:`/projects/${e.project.id}/search-console`}];return c.jsxs("div",{className:"page-container",children:[w?c.jsxs(Pe,{className:"surface-card p-6 mb-6 border-rose-800/60",children:[c.jsx("h3",{className:"text-base font-semibold text-rose-400 mb-2",children:"Delete project?"}),c.jsxs("p",{className:"text-sm text-zinc-400 mb-4",children:["This will permanently delete ",c.jsx("strong",{className:"text-zinc-200",children:e.project.displayName||e.project.name})," and all its key phrases, competitors, runs, and snapshots. This cannot be undone."]}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx(ue,{type:"button",variant:"destructive",disabled:z,onClick:async()=>{j(!0),u(e.project.name)},children:z?"Deleting...":"Yes, delete project"}),c.jsx(ue,{type:"button",variant:"outline",disabled:z,onClick:()=>N(!1),children:"Cancel"})]})]}):null,c.jsxs("div",{className:"page-header",children:[c.jsxs("div",{className:"page-header-left",children:[c.jsx("h1",{className:"page-title",children:e.project.displayName||e.project.name}),c.jsxs("p",{className:"page-subtitle",children:[e.project.canonicalDomain,(e.project.ownedDomains??[]).length===0&&!ie&&c.jsx("button",{type:"button",className:"ml-2 text-[10px] uppercase tracking-wide text-zinc-600 hover:text-zinc-400 transition-colors",onClick:()=>he(!0),children:"+ add domain"})," "," · ",e.contextLabel]}),c.jsxs("div",{className:"tag-row",children:[c.jsx("span",{className:"tag",children:e.project.country}),c.jsx("span",{className:"tag",children:e.project.language.toUpperCase()}),e.project.tags.map(oe=>c.jsx("span",{className:"tag",children:oe},oe))]}),((e.project.ownedDomains??[]).length>0||ie)&&c.jsxs("div",{className:"mt-1.5 flex flex-wrap items-center gap-1.5",children:[c.jsx("span",{className:"text-[10px] uppercase tracking-wide text-zinc-500 mr-1",children:"Also tracking"}),(e.project.ownedDomains??[]).map(oe=>c.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-zinc-700/60 bg-zinc-800/40 px-2 py-0.5 text-xs text-zinc-300",children:[oe,c.jsx("button",{type:"button",className:"ml-0.5 text-zinc-500 hover:text-zinc-200 transition-colors",disabled:G,onClick:()=>Xn(oe),"aria-label":`Remove ${oe}`,children:"×"})]},oe)),ie?c.jsxs("span",{className:"inline-flex items-center gap-1",children:[c.jsx("input",{className:"rounded border border-zinc-700 bg-transparent px-1.5 py-0.5 text-xs text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none w-40",type:"text",placeholder:"docs.example.com",value:te,onChange:oe=>C(oe.target.value),onKeyDown:oe=>oe.key==="Enter"&&Yt(),autoFocus:!0}),c.jsx(ue,{type:"button",size:"sm",disabled:!te.trim()||G,onClick:Yt,children:G?"...":"Add"}),c.jsx("button",{type:"button",className:"text-xs text-zinc-500 hover:text-zinc-300",onClick:()=>{he(!1),C("")},children:"Cancel"})]}):c.jsx("button",{type:"button",className:"rounded-full border border-dashed border-zinc-700 px-2 py-0.5 text-[10px] uppercase tracking-wide text-zinc-500 hover:text-zinc-300 hover:border-zinc-500 transition-colors",onClick:()=>he(!0),children:"+ domain"})]})]}),c.jsxs("div",{className:"page-header-right",children:[c.jsx("p",{className:"text-sm text-zinc-500",children:e.dateRangeLabel}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(ue,{type:"button",variant:"outline",size:"icon",onClick:as,"aria-label":"Export project as YAML",children:c.jsx(w1,{className:"h-4 w-4 text-zinc-400"})}),c.jsx(ue,{type:"button",variant:"outline",size:"icon",onClick:()=>N(!0),"aria-label":"Delete project",children:c.jsx($1,{className:"h-4 w-4 text-zinc-400"})}),c.jsx(ue,{type:"button",disabled:k,onClick:async()=>{A(!0),O(null);try{await o(e.project.name)}catch(oe){O(oe instanceof Error?oe.message:"Failed to trigger run")}finally{A(!1)}},children:k?"Starting...":"Run now"})]})]})]}),E&&c.jsxs("div",{className:"mb-3 rounded-lg border border-rose-800/40 bg-rose-950/20 px-3 py-2 text-sm text-rose-300",children:[E,c.jsx("button",{type:"button",className:"ml-2 text-rose-400 hover:text-rose-200",onClick:()=>O(null),children:"×"})]}),c.jsx("nav",{className:"project-subnav","aria-label":"Project sections",children:Tt.map(oe=>c.jsx("a",{className:`project-subnav-link ${oe.key===n?"project-subnav-link-active":""}`,href:oe.href,"aria-current":oe.key===n?"page":void 0,onClick:jn(v,oe.href),children:oe.label},oe.key))}),n==="overview"?c.jsxs(c.Fragment,{children:[c.jsxs("section",{className:"gauge-row",children:[c.jsx(lf,{value:e.visibilitySummary.value,label:e.visibilitySummary.label,delta:e.visibilitySummary.delta,tone:e.visibilitySummary.tone,description:e.visibilitySummary.description,tooltip:e.visibilitySummary.tooltip,isNumeric:Jn(e.visibilitySummary.value)}),c.jsx(lf,{value:e.competitorPressure.value,label:e.competitorPressure.label,delta:e.competitorPressure.delta,tone:e.competitorPressure.tone,description:e.competitorPressure.description,tooltip:e.competitorPressure.tooltip,isNumeric:Jn(e.competitorPressure.value)}),c.jsx(lf,{value:e.runStatus.value,label:e.runStatus.label,delta:e.runStatus.delta,tone:e.runStatus.tone,description:e.runStatus.description,tooltip:e.runStatus.tooltip,isNumeric:Jn(e.runStatus.value)})]}),e.providerScores.length>1&&c.jsxs("section",{className:"page-section-divider",children:[c.jsx("div",{className:"section-head section-head-inline",children:c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Model breakdown"}),c.jsxs("h2",{children:["Visibility by model ",c.jsx(tx,{text:"Per-model citation rate. Shows how often each AI model cites your domain across all tracked key phrases. Switching models can significantly affect citation rates."})]})]})}),c.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-3",children:e.providerScores.map(oe=>c.jsxs(Pe,{className:"surface-card compact-card",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx(uh,{provider:oe.provider}),c.jsxs("span",{className:`text-lg font-semibold ${oe.score>=70?"text-emerald-400":oe.score>=40?"text-amber-400":"text-rose-400"}`,children:[oe.score,"%"]})]}),oe.model&&c.jsx("p",{className:"mt-0.5 text-[11px] font-mono text-zinc-500 truncate",children:oe.model}),c.jsxs("p",{className:"mt-1 text-xs text-zinc-500",children:[oe.cited," of ",oe.total," key phrases cited"]})]},`${oe.provider}::${oe.model??"unknown"}`))})]}),c.jsxs("section",{className:"page-section-divider",children:[c.jsx("div",{className:"section-head section-head-inline",children:c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"What changed"}),c.jsx("h2",{children:"Citation signals"})]})}),c.jsx(bT,{insights:e.insights,onOpenEvidence:i})]}),c.jsxs("section",{className:"page-section-divider",children:[c.jsxs("div",{className:"section-head section-head-inline",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Visibility evidence"}),c.jsx("h2",{children:"Key phrase citation tracking"})]}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsxs("p",{className:"supporting-copy",children:[new Set(e.visibilityEvidence.map(oe=>oe.keyword)).size," key phrases tracked"]}),c.jsx(ue,{type:"button",variant:"outline",size:"sm",onClick:()=>M(!D),children:D?"Cancel":"+ Add key phrases"})]})]}),D&&c.jsxs("div",{className:"mb-3 rounded-lg border border-zinc-800 bg-zinc-900/40 p-3",children:[c.jsx("textarea",{className:"w-full resize-none rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",rows:3,placeholder:"Enter key phrases, one per line",value:H,onChange:oe=>V(oe.target.value)}),c.jsxs("div",{className:"mt-2 flex items-center justify-between",children:[c.jsxs("p",{className:"text-xs text-zinc-500",children:[H.split(`
234
+ `).filter(oe=>oe.trim()).length," key phrases"]}),c.jsx(ue,{type:"button",size:"sm",disabled:!H.trim()||L,onClick:Ft,children:L?"Adding...":"Add key phrases"})]})]}),e.project.locations&&e.project.locations.length>0&&c.jsxs("div",{className:"filter-row mb-3",role:"toolbar","aria-label":"Location filters",children:[c.jsx("button",{className:`filter-chip ${F===void 0?"filter-chip-active":""}`,type:"button","aria-pressed":F===void 0,onClick:()=>{de(void 0)},children:"All locations"}),e.project.locations.map(oe=>Ie.has(oe.label)&&c.jsx("button",{className:`filter-chip ${F===oe.label?"filter-chip-active":""}`,type:"button","aria-pressed":F===oe.label,onClick:()=>{de(oe.label),we(!1)},children:oe.label},oe.label)),Ut&&c.jsx("button",{className:`filter-chip ${F===""?"filter-chip-active":""}`,type:"button","aria-pressed":F==="",onClick:()=>{de(""),we(!1)},children:"No location"}),ft.length>1&&F===void 0&&c.jsx("button",{className:`filter-chip filter-chip-compare ${me?"filter-chip-active":""}`,type:"button","aria-pressed":me,onClick:()=>we(oe=>!oe),title:"Side-by-side location comparison",children:"Compare"})]}),c.jsx(jT,{evidence:In,onOpenEvidence:i,showLocationLabels:F===void 0,compareLocations:F===void 0&&me,timelineLoading:Ze,onDeleteKeyword:Se?void 0:Nn})]}),c.jsxs("section",{className:"page-section-divider",children:[c.jsxs("div",{className:"section-head section-head-inline",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Competitors"}),c.jsx("h2",{children:"Competitive landscape"})]}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsxs("p",{className:"supporting-copy",children:[e.competitors.length," tracked"]}),c.jsx(ue,{type:"button",variant:"outline",size:"sm",onClick:()=>Ae(!fe),children:fe?"Cancel":"+ Add competitor"})]})]}),fe&&c.jsxs("div",{className:"mb-3 flex gap-2 rounded-lg border border-zinc-800 bg-zinc-900/40 p-3",children:[c.jsx("input",{className:"flex-1 rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",type:"text",placeholder:"competitor.com",value:qe,onChange:oe=>Le(oe.target.value),onKeyDown:oe=>oe.key==="Enter"&&ht()}),c.jsx(ue,{type:"button",size:"sm",disabled:!qe.trim()||q,onClick:ht,children:q?"Adding...":"Add"})]}),c.jsx(kT,{competitors:e.competitors})]}),c.jsxs("section",{className:"page-section-divider",children:[c.jsx("div",{className:"section-head section-head-inline",children:c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Run timeline"}),c.jsx("h2",{children:"Recent execution history"})]})}),c.jsx("div",{className:"run-list",children:e.recentRuns.map(oe=>c.jsx(sx,{run:oe,onOpen:l},oe.id))})]}),c.jsx(OT,{project:{...e.project,displayName:e.project.displayName??e.project.name,defaultLocation:e.project.defaultLocation??null},onUpdateProject:b}),c.jsx($T,{projectName:e.project.name}),c.jsx(BT,{projectName:e.project.name})]}):c.jsx(TT,{projectName:e.project.name,onOpenSettings:()=>v("/settings")})]})}function Io(e){if(!e)return"—";try{return new Date(e).toLocaleString()}catch{return e}}function y0(e){return e===null?"Unknown":e?"Pass":"Fail"}function TT({projectName:e,onOpenSettings:n}){const[i,l]=x.useState(!1),[o,u]=x.useState([]),[d,m]=x.useState([]),[g,p]=x.useState([]),[b,v]=x.useState([]),[w,N]=x.useState([]),[z,j]=x.useState(null),[k,A]=x.useState(""),[E,O]=x.useState(""),[D,M]=x.useState("30"),[H,V]=x.useState(!1),[L,Q]=x.useState({startDate:"",endDate:"",query:"",page:"",limit:"20"}),[Se,ae]=x.useState(""),[fe,Ae]=x.useState(!0),[qe,Le]=x.useState(!1),[q,K]=x.useState(!1),[ie,he]=x.useState(!1),[te,C]=x.useState(!1),[G,ne]=x.useState(!1),[F,de]=x.useState(!1),[me,we]=x.useState(!1),[U,se]=x.useState(null),[Ze,re]=x.useState(!1),[Ie,Ut]=x.useState(!1),[ft,At]=x.useState(!1),[In,as]=x.useState(!1),[Nn,Ft]=x.useState(null),[ht,Yt]=x.useState(""),[Xn,Jn]=x.useState(!1),[Tt,oe]=x.useState(!1),[Oe,Bt]=x.useState("indexed"),[nt,rn]=x.useState([]),[ce,pn]=x.useState(null),[lr,Qe]=x.useState(null),[Wt,xt]=x.useState(null),Ee=o.find(R=>R.connectionType==="gsc"),zc=g.length>0||b.length>0||w.length>0;async function rr(R){if(!R){m([]),A("");return}he(!0);try{const{sites:le}=await TA(e);m(le),A(R.propertyId??le[0]?.siteUrl??"")}catch(le){m([]),Qe(le instanceof Error?le.message:"Failed to load Search Console properties")}finally{he(!1)}}async function Ja(){ne(!0);try{const R=await LA(e,{startDate:L.startDate||void 0,endDate:L.endDate||void 0,query:L.query||void 0,page:L.page||void 0,limit:parseInt(L.limit,10)||20});p(R)}catch(R){p([]),Qe(R instanceof Error?R.message:"Failed to load GSC performance data")}finally{ne(!1)}}async function ls(){de(!0);try{const[R,le]=await Promise.all([$A(e,{url:Se.trim()||void 0,limit:20}),UA(e)]);v(R),N(le)}catch(R){v([]),N([]),Qe(R instanceof Error?R.message:"Failed to load GSC inspection history")}finally{de(!1)}}async function hi(){re(!0);try{const[R,le]=await Promise.all([BA(e),IA(e).catch(()=>[])]);se(R),rn(le)}catch{se(null),rn([])}finally{re(!1)}}async function rs(){if(ht.trim()){Jn(!0),Qe(null);try{await DA(e,"gsc",ht.trim()),u(R=>R.map(le=>le.connectionType==="gsc"?{...le,sitemapUrl:ht.trim()}:le)),xt("Sitemap URL saved."),Yt("")}catch(R){Qe(R instanceof Error?R.message:"Failed to save sitemap URL")}finally{Jn(!1)}}}async function Fn(){At(!0),Qe(null);try{const R=await HA(e);Ft(R.sitemaps),u(le=>le.map(Ve=>Ve.connectionType==="gsc"?{...Ve,sitemapUrl:R.primarySitemapUrl}:Ve)),xt(`Discovered ${R.sitemaps.length} sitemap(s). Primary sitemap saved and inspection queued (run ${R.run.id}).`)}catch(R){Qe(R instanceof Error?R.message:"Failed to discover sitemaps")}finally{At(!1)}}async function Hi(){as(!0),Qe(null);try{const R=await ZA(e);Ft(R.sitemaps),R.sitemaps.length===0&&xt("No sitemaps found in this GSC property. Submit a sitemap in Google Search Console first.")}catch(R){Qe(R instanceof Error?R.message:"Failed to list sitemaps")}finally{as(!1)}}async function Ts(){Ae(!0),Qe(null);try{const[R,le]=await Promise.all([Pb().catch(()=>null),CA(e).catch(()=>[])]);l(!!R?.google?.configured),u(le);const Ve=le.find(Me=>Me.connectionType==="gsc");await Promise.all([rr(Ve),Ja(),ls(),hi()])}finally{Ae(!1)}}x.useEffect(()=>{Ts()},[e]);async function _c(){if(!i){Qe("Google OAuth app credentials are not configured yet. Set them on the Settings page first.");return}Le(!0),Qe(null),xt(null);try{const{authUrl:R}=await EA(e,"gsc"),le=window.open(R,"_blank","width=600,height=700");if(!le){window.location.assign(R);return}xt("Finish the Google consent flow in the popup, then close it to refresh this project.");const Ve=window.setInterval(()=>{le.closed&&(window.clearInterval(Ve),xt(null),Ts())},1e3)}catch(R){Qe(R instanceof Error?R.message:"Failed to start OAuth flow")}finally{Le(!1)}}async function or(){Qe(null),xt(null);try{await AA(e,"gsc"),u(R=>R.filter(le=>le.connectionType!=="gsc")),m([]),A("")}catch(R){Qe(R instanceof Error?R.message:"Failed to disconnect")}}async function Fa(){if(k){C(!0),Qe(null);try{await OA(e,"gsc",k),u(R=>R.map(le=>le.connectionType==="gsc"?{...le,propertyId:k}:le)),xt("GSC property updated.")}catch(R){Qe(R instanceof Error?R.message:"Failed to save GSC property")}finally{C(!1)}}}async function mi(){K(!0),Qe(null),xt(null);try{await RA(e,{days:parseInt(D,10)||void 0,full:H||void 0}),xt("GSC sync queued. Refresh after the run completes to see imported data.")}catch(R){Qe(R instanceof Error?R.message:"Failed to trigger sync")}finally{K(!1)}}async function cr(){if(E.trim()){we(!0),Qe(null),xt(null);try{const R=await MA(e,E.trim());j(R),O(""),await ls()}catch(R){Qe(R instanceof Error?R.message:"Failed to inspect URL")}finally{we(!1)}}}return c.jsxs("section",{className:"page-section-divider",children:[c.jsxs("div",{className:"section-head section-head-inline",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Search Console"}),c.jsx("h2",{children:"Google Search Console"})]}),c.jsx("div",{className:"flex items-center gap-2",children:Ee&&c.jsx(ue,{type:"button",variant:"outline",size:"sm",disabled:G,onClick:()=>{Ja()},children:G?"Refreshing…":"Refresh data"})})]}),lr&&c.jsxs("div",{className:"mb-3 rounded-lg border border-rose-800/40 bg-rose-950/20 px-3 py-2 text-sm text-rose-300",children:[lr,c.jsx("button",{type:"button",className:"ml-2 text-rose-400 hover:text-rose-200",onClick:()=>Qe(null),children:"×"})]}),Wt&&c.jsxs("div",{className:"mb-3 rounded-lg border border-emerald-800/40 bg-emerald-950/20 px-3 py-2 text-sm text-emerald-300",children:[Wt,c.jsx("button",{type:"button",className:"ml-2 text-emerald-400 hover:text-emerald-200",onClick:()=>xt(null),children:"×"})]}),fe?c.jsx("p",{className:"text-sm text-zinc-500",children:"Loading…"}):c.jsxs("div",{className:"space-y-3",children:[c.jsxs(Pe,{className:"surface-card",children:[c.jsxs("div",{className:"section-head section-head-inline",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Connection"}),c.jsx("h3",{children:"Domain authorization"})]}),c.jsx(Mt,{tone:Ee?"positive":i?"caution":"negative",children:Ee?"Connected":i?"Ready to connect":"App credentials missing"})]}),Ee?c.jsxs("div",{className:"mt-3 space-y-3",children:[c.jsxs("div",{className:"rounded-lg border border-zinc-800/60 bg-zinc-900/30 px-4 py-3",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("span",{className:"h-2 w-2 rounded-full bg-emerald-500"}),c.jsx("span",{className:"text-sm text-zinc-200",children:"Authorized for this project domain"}),c.jsx("span",{className:"text-xs text-zinc-500",children:Ee.domain}),c.jsx("button",{type:"button",className:"ml-auto text-xs text-zinc-500 hover:text-rose-400 transition-colors",onClick:or,children:"Disconnect"})]}),c.jsxs("p",{className:"mt-2 text-xs text-zinc-500",children:["Canonry stores OAuth tokens per canonical domain. This project currently maps to ",c.jsx("code",{children:Ee.domain}),"."]})]}),c.jsxs("div",{className:"grid gap-3 lg:grid-cols-2",children:[c.jsxs("div",{className:"rounded-lg border border-zinc-800/60 bg-zinc-900/20 p-3",children:[c.jsx("p",{className:"text-xs uppercase tracking-wide text-zinc-500",children:"Selected property"}),c.jsx("p",{className:"mt-1 text-sm text-zinc-200",children:Ee.propertyId??"No property selected yet"})]}),c.jsxs("div",{className:"rounded-lg border border-zinc-800/60 bg-zinc-900/20 p-3",children:[c.jsx("p",{className:"text-xs uppercase tracking-wide text-zinc-500",children:"Last auth update"}),c.jsx("p",{className:"mt-1 text-sm text-zinc-200",children:Io(Ee.updatedAt)})]})]})]}):c.jsxs("div",{className:"mt-3 rounded-lg border border-zinc-800/60 bg-zinc-900/30 px-4 py-5",children:[c.jsx("p",{className:"text-sm text-zinc-300",children:i?"Generate a Google OAuth link for this project and have the client sign in with a Google account that already has access to the correct Search Console property.":"Set Google OAuth client credentials first. Once configured, you can generate a consent link for this project domain."}),c.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:[i?c.jsx(ue,{type:"button",variant:"outline",size:"sm",disabled:qe,onClick:_c,children:qe?"Opening…":"Connect Google Search Console"}):c.jsx(ue,{type:"button",variant:"outline",size:"sm",disabled:!n,onClick:n,children:"Open Settings"}),!i&&c.jsx("p",{className:"text-xs text-zinc-500",children:"The same Google OAuth app credentials are shared across all projects."})]})]})]}),Ee&&!Ee.sitemapUrl&&c.jsx("div",{className:"rounded-lg border border-amber-800/40 bg-amber-950/20 px-4 py-3",children:c.jsxs("div",{className:"flex items-start gap-3",children:[c.jsx("span",{className:"mt-0.5 text-amber-400",children:c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"h-5 w-5","aria-hidden":"true",children:c.jsx("path",{fillRule:"evenodd",d:"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495zM10 6a.75.75 0 01.75.75v3.5a.75.75 0 01-1.5 0v-3.5A.75.75 0 0110 6zm0 9a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})})}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsx("p",{className:"text-sm font-medium text-amber-300",children:"Set your sitemap URL"}),c.jsx("p",{className:"mt-1 text-xs text-amber-400/70",children:"Canonry uses your sitemap to discover URLs for index coverage inspection. Auto-discover from GSC or enter it manually."}),c.jsxs("div",{className:"mt-2 flex flex-col gap-2",children:[c.jsxs("div",{className:"flex flex-col gap-2 lg:flex-row",children:[c.jsx(ue,{type:"button",size:"sm",disabled:ft||!Ee.propertyId,onClick:Fn,children:ft?"Discovering…":"Auto-discover from GSC"}),c.jsx("span",{className:"self-center text-xs text-amber-400/60",children:"or enter manually:"})]}),c.jsxs("div",{className:"flex flex-col gap-2 lg:flex-row",children:[c.jsx("input",{className:"flex-1 rounded border border-amber-800/40 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-500 focus:border-amber-600 focus:outline-none",type:"url",placeholder:"https://example.com/sitemap.xml",value:ht,onChange:R=>Yt(R.target.value),onKeyDown:R=>R.key==="Enter"&&void rs()}),c.jsx(ue,{type:"button",size:"sm",variant:"outline",disabled:Xn||!ht.trim(),onClick:rs,children:Xn?"Saving…":"Save sitemap URL"})]})]})]})]})}),(Ee||zc)&&c.jsxs(c.Fragment,{children:[c.jsxs(Pe,{className:"surface-card",children:[c.jsxs("div",{className:"section-head section-head-inline",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Performance"}),c.jsx("h3",{children:"Search performance"})]}),c.jsx(ue,{type:"button",variant:"outline",size:"sm",disabled:G,onClick:()=>{Ja()},children:G?"Loading…":"Apply filters"})]}),g.length>1&&(()=>{const R=new Map;for(const mt of g){const en=R.get(mt.date);en?(en.clicks+=mt.clicks,en.impressions+=mt.impressions):R.set(mt.date,{clicks:mt.clicks,impressions:mt.impressions})}const le=[...R.entries()].sort(([mt],[en])=>mt.localeCompare(en));if(le.length<2)return null;const Ve=Math.max(...le.map(([,mt])=>mt.clicks),1),Me=Math.max(...le.map(([,mt])=>mt.impressions),1),jt=600,it=160,at={top:10,bottom:20,left:0,right:0},It=jt-at.left-at.right,Ke=it-at.top-at.bottom,Nt=le.map(([,mt],en)=>{const os=at.left+en/(le.length-1)*It,pi=at.top+Ke-mt.clicks/Ve*Ke;return`${os},${pi}`}).join(" "),rt=le.map(([,mt],en)=>{const os=at.left+en/(le.length-1)*It,pi=at.top+Ke-mt.impressions/Me*Ke;return`${os},${pi}`}).join(" "),qt=le.reduce((mt,[,en])=>mt+en.clicks,0),Wa=le.reduce((mt,[,en])=>mt+en.impressions,0);return c.jsxs("div",{className:"mt-3",children:[c.jsxs("div",{className:"flex items-center gap-4 mb-2",children:[c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"inline-block h-0.5 w-4 rounded bg-emerald-500"}),c.jsxs("span",{className:"text-xs text-zinc-400",children:["Clicks ",c.jsx("span",{className:"text-zinc-200 tabular-nums font-medium",children:qt.toLocaleString()})]})]}),c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"inline-block h-0.5 w-4 rounded bg-blue-500"}),c.jsxs("span",{className:"text-xs text-zinc-400",children:["Impressions ",c.jsx("span",{className:"text-zinc-200 tabular-nums font-medium",children:Wa.toLocaleString()})]})]})]}),c.jsxs("div",{className:"relative h-44 w-full",children:[c.jsxs("svg",{viewBox:`0 0 ${jt} ${it}`,className:"h-full w-full",preserveAspectRatio:"none","aria-hidden":"true",children:[c.jsx("line",{x1:at.left,y1:at.top+Ke,x2:jt-at.right,y2:at.top+Ke,stroke:"rgba(255,255,255,0.06)",strokeWidth:"1"}),c.jsx("line",{x1:at.left,y1:at.top+Ke/2,x2:jt-at.right,y2:at.top+Ke/2,stroke:"rgba(255,255,255,0.04)",strokeWidth:"1"}),c.jsx("polyline",{points:rt,fill:"none",stroke:"#3b82f6",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),c.jsx("polyline",{points:Nt,fill:"none",stroke:"#10b981",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),c.jsxs("div",{className:"flex justify-between text-[10px] text-zinc-600 mt-0.5 px-0.5",children:[c.jsx("span",{children:le[0]?.[0]}),c.jsx("span",{children:le[le.length-1]?.[0]})]})]})]})})(),g.length>1&&(()=>{const R=new Map;for(const rt of g){const qt=R.get(rt.date);qt?(qt.clicks+=rt.clicks,qt.impressions+=rt.impressions):R.set(rt.date,{clicks:rt.clicks,impressions:rt.impressions})}const le=[...R.entries()].sort(([rt],[qt])=>rt.localeCompare(qt)).map(([rt,qt])=>({date:rt,ctr:qt.impressions>0?qt.clicks/qt.impressions:0}));if(le.length<2)return null;const Ve=Math.max(...le.map(rt=>rt.ctr),.01),Me=600,jt=100,it={top:8,bottom:20,left:0,right:0},at=Me-it.left-it.right,It=jt-it.top-it.bottom,Ke=le.map((rt,qt)=>{const Wa=it.left+qt/(le.length-1)*at,mt=it.top+It-rt.ctr/Ve*It;return`${Wa},${mt}`}).join(" "),Nt=le.reduce((rt,qt)=>rt+qt.ctr,0)/le.length;return c.jsxs("div",{className:"mt-4",children:[c.jsx("div",{className:"flex items-center gap-4 mb-2",children:c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"inline-block h-0.5 w-4 rounded bg-amber-500"}),c.jsxs("span",{className:"text-xs text-zinc-400",children:["CTR ",c.jsxs("span",{className:"text-zinc-200 tabular-nums font-medium",children:[(Nt*100).toFixed(1),"% avg"]})]})]})}),c.jsxs("div",{className:"relative h-28 w-full",children:[c.jsxs("svg",{viewBox:`0 0 ${Me} ${jt}`,className:"h-full w-full",preserveAspectRatio:"none","aria-hidden":"true",children:[c.jsx("line",{x1:it.left,y1:it.top+It,x2:Me-it.right,y2:it.top+It,stroke:"rgba(255,255,255,0.06)",strokeWidth:"1"}),c.jsx("polyline",{points:Ke,fill:"none",stroke:"#f59e0b",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),c.jsxs("div",{className:"flex justify-between text-[10px] text-zinc-600 mt-0.5 px-0.5",children:[c.jsx("span",{children:le[0]?.date}),c.jsx("span",{children:le[le.length-1]?.date})]})]})]})})(),c.jsxs("div",{className:"mt-3 grid gap-2 lg:grid-cols-5",children:[c.jsx("input",{className:"rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",type:"date",value:L.startDate,onChange:R=>Q(le=>({...le,startDate:R.target.value}))}),c.jsx("input",{className:"rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",type:"date",value:L.endDate,onChange:R=>Q(le=>({...le,endDate:R.target.value}))}),c.jsx("input",{className:"rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",type:"text",placeholder:"Filter query",value:L.query,onChange:R=>Q(le=>({...le,query:R.target.value}))}),c.jsx("input",{className:"rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",type:"text",placeholder:"Filter page",value:L.page,onChange:R=>Q(le=>({...le,page:R.target.value}))}),c.jsx("input",{className:"rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",type:"number",min:"1",placeholder:"Limit",value:L.limit,onChange:R=>Q(le=>({...le,limit:R.target.value}))})]}),g.length>0?c.jsx("div",{className:"mt-3 overflow-x-auto",children:c.jsxs("table",{className:"data-table w-full text-sm",children:[c.jsx("thead",{children:c.jsxs("tr",{children:[c.jsx("th",{className:"text-left",children:"Date"}),c.jsx("th",{className:"text-left",children:"Query"}),c.jsx("th",{className:"text-left",children:"Page"}),c.jsx("th",{className:"text-right",children:"Clicks"}),c.jsx("th",{className:"text-right",children:"Impressions"}),c.jsx("th",{className:"text-right",children:"CTR"}),c.jsx("th",{className:"text-right",children:"Position"})]})}),c.jsx("tbody",{children:g.map((R,le)=>c.jsxs("tr",{children:[c.jsx("td",{className:"text-zinc-400",children:R.date}),c.jsx("td",{className:"max-w-xs truncate text-zinc-200",children:R.query}),c.jsx("td",{className:"max-w-xs truncate text-zinc-400",children:R.page}),c.jsx("td",{className:"text-right tabular-nums text-zinc-300",children:R.clicks.toLocaleString()}),c.jsx("td",{className:"text-right tabular-nums text-zinc-400",children:R.impressions.toLocaleString()}),c.jsxs("td",{className:"text-right tabular-nums text-zinc-400",children:[(R.ctr*100).toFixed(1),"%"]}),c.jsx("td",{className:"text-right tabular-nums text-zinc-400",children:R.position.toFixed(1)})]},`${R.date}:${R.query}:${R.page}:${le}`))})]})}):c.jsx("p",{className:"mt-3 text-sm text-zinc-500",children:"No performance rows match the current filters yet."})]}),c.jsxs(Pe,{className:"surface-card",children:[c.jsxs("div",{className:"section-head section-head-inline",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Coverage"}),c.jsx("h3",{children:"Index coverage"})]}),c.jsx("div",{className:"flex items-center gap-2",children:c.jsx(ue,{type:"button",variant:"outline",size:"sm",disabled:Ze,onClick:()=>{hi()},children:Ze?"Loading…":"Refresh coverage"})})]}),U&&U.summary.total>0?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"mt-3 flex flex-col gap-4 lg:flex-row lg:items-start",children:[c.jsx("div",{className:"shrink-0 flex flex-col items-center",children:(()=>{const R=U.summary.indexed+U.summary.notIndexed,le=R>0?U.summary.indexed/R:0,Ve=54,Me=2*Math.PI*Ve,jt=Me*(1-le);return c.jsxs("div",{className:"relative h-36 w-36",children:[c.jsxs("svg",{viewBox:"0 0 128 128",className:"h-full w-full","aria-hidden":"true",children:[c.jsx("circle",{cx:"64",cy:"64",r:Ve,fill:"none",stroke:"rgba(255,255,255,0.06)",strokeWidth:"12"}),c.jsx("circle",{cx:"64",cy:"64",r:Ve,fill:"none",stroke:"#10b981",strokeWidth:"12",strokeDasharray:Me,strokeDashoffset:jt,strokeLinecap:"round",transform:"rotate(-90 64 64)",style:{transition:"stroke-dashoffset 0.6s ease"}})]}),c.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[c.jsxs("span",{className:"text-xl font-bold tabular-nums text-zinc-100",children:[(le*100).toFixed(0),"%"]}),c.jsx("span",{className:"text-[10px] uppercase tracking-wide text-zinc-500",children:"Indexed"})]})]})})()}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsxs("div",{className:"flex items-stretch overflow-hidden rounded-lg border border-zinc-800/60",children:[U.summary.indexed>0&&c.jsxs("div",{className:"flex items-center gap-2 bg-emerald-950/40 border-r border-zinc-800/60 px-4 py-3",style:{flexBasis:`${U.summary.indexed/U.summary.total*100}%`},children:[c.jsx("span",{className:"inline-block h-2.5 w-2.5 rounded-full bg-emerald-500 shrink-0"}),c.jsxs("div",{className:"min-w-0",children:[c.jsx("p",{className:"text-xs uppercase tracking-wide text-emerald-400/70",children:"Indexed"}),c.jsx("p",{className:"text-lg font-semibold tabular-nums text-emerald-400",children:U.summary.indexed.toLocaleString()})]})]}),U.summary.notIndexed>0&&c.jsxs("div",{className:"flex items-center gap-2 bg-zinc-900/40 px-4 py-3",style:{flexBasis:`${U.summary.notIndexed/U.summary.total*100}%`},children:[c.jsx("span",{className:"inline-block h-2.5 w-2.5 rounded-full bg-zinc-500 shrink-0"}),c.jsxs("div",{className:"min-w-0",children:[c.jsx("p",{className:"text-xs uppercase tracking-wide text-zinc-500",children:"Not indexed"}),c.jsxs("p",{className:"text-lg font-semibold tabular-nums text-zinc-300",children:[U.summary.notIndexed.toLocaleString(),(U.reasonGroups??[]).length>0&&c.jsxs("span",{className:"ml-1 text-xs font-normal text-zinc-500",children:["· ",(U.reasonGroups??[]).length," ",(U.reasonGroups??[]).length===1?"reason":"reasons"]})]})]})]})]}),U.summary.deindexed>0&&c.jsxs("p",{className:"mt-1.5 text-xs text-rose-400",children:[U.summary.deindexed," page",U.summary.deindexed!==1?"s":""," recently lost indexing"]})]})]}),nt.length>1&&c.jsxs("div",{className:"mt-4",children:[c.jsx("p",{className:"text-xs uppercase tracking-wide text-zinc-500 mb-2",children:"Pages over time"}),c.jsxs("div",{className:"relative h-36 w-full",children:[(()=>{const R=Math.max(...nt.map(Me=>Me.indexed+Me.notIndexed),1),le=nt.length,Ve=2;return c.jsx("svg",{viewBox:`0 0 ${le*12+Ve} 140`,className:"h-full w-full",preserveAspectRatio:"none",children:nt.map((Me,jt)=>{const it=Me.indexed+Me.notIndexed,at=it/R*128,It=it>0?Me.indexed/it*at:0,Ke=at-It,Nt=jt*12+Ve;return c.jsxs("g",{children:[c.jsx("title",{children:`${Me.date}
235
+ Indexed: ${Me.indexed}
236
+ Not indexed: ${Me.notIndexed}`}),c.jsx("rect",{x:Nt,y:128-at,width:10,height:Ke,rx:1,fill:"#3f3f46"}),c.jsx("rect",{x:Nt,y:128-at+Ke,width:10,height:It,rx:1,fill:"#10b981"})]},Me.date)})})})(),c.jsxs("div",{className:"flex justify-between text-[10px] text-zinc-600 mt-0.5 px-0.5",children:[c.jsx("span",{children:nt[0]?.date}),c.jsx("span",{children:nt[nt.length-1]?.date})]})]})]}),c.jsx("div",{className:"mt-3 flex gap-1",children:["indexed","notIndexed","deindexed"].map(R=>{const le=R==="indexed"?U.indexed.length:R==="notIndexed"?U.notIndexed.length:U.deindexed.length,Ve=R==="indexed"?"Indexed":R==="notIndexed"?"Not Indexed":"Deindexed";return c.jsxs("button",{type:"button",className:`rounded-full px-3 py-1 text-xs font-medium transition-colors ${Oe===R?"bg-zinc-700 text-zinc-100":"text-zinc-400 hover:bg-zinc-800 hover:text-zinc-200"}`,onClick:()=>{Bt(R),pn(null)},children:[Ve," (",le,")"]},R)})}),c.jsxs("div",{className:"mt-3 overflow-x-auto",children:[Oe==="indexed"&&U.indexed.length>0&&c.jsxs("table",{className:"data-table w-full text-sm",children:[c.jsx("thead",{children:c.jsxs("tr",{children:[c.jsx("th",{className:"text-left",children:"URL"}),c.jsx("th",{className:"text-left",children:"Verdict"}),c.jsx("th",{className:"text-left",children:"Last Crawl"}),c.jsx("th",{className:"text-left",children:"Mobile"})]})}),c.jsx("tbody",{children:U.indexed.map(R=>c.jsxs("tr",{children:[c.jsx("td",{className:"max-w-sm truncate text-zinc-200",children:R.url}),c.jsx("td",{className:"text-zinc-400",children:R.verdict??"Unknown"}),c.jsx("td",{className:"text-zinc-400",children:R.crawlTime?R.crawlTime.split("T")[0]:"—"}),c.jsx("td",{className:"text-zinc-400",children:R.isMobileFriendly===!0?"Yes":R.isMobileFriendly===!1?"No":"—"})]},R.id))})]}),Oe==="notIndexed"&&!ce&&(U.reasonGroups??[]).length>0&&c.jsxs("table",{className:"data-table w-full text-sm",children:[c.jsx("thead",{children:c.jsxs("tr",{children:[c.jsx("th",{className:"text-left",children:"Reason"}),c.jsx("th",{className:"text-right",children:"Pages"})]})}),c.jsx("tbody",{children:(U.reasonGroups??[]).map(R=>c.jsxs("tr",{className:"cursor-pointer hover:bg-zinc-800/40",onClick:()=>pn(R.reason),children:[c.jsx("td",{className:"text-zinc-200",children:R.reason}),c.jsx("td",{className:"text-right tabular-nums text-zinc-400",children:R.count})]},R.reason))})]}),Oe==="notIndexed"&&!ce&&(U.reasonGroups??[]).length===0&&U.notIndexed.length>0&&c.jsxs("table",{className:"data-table w-full text-sm",children:[c.jsx("thead",{children:c.jsxs("tr",{children:[c.jsx("th",{className:"text-left",children:"URL"}),c.jsx("th",{className:"text-left",children:"Indexing State"}),c.jsx("th",{className:"text-left",children:"Coverage"})]})}),c.jsx("tbody",{children:U.notIndexed.map(R=>c.jsxs("tr",{children:[c.jsx("td",{className:"max-w-sm truncate text-zinc-200",children:R.url}),c.jsx("td",{className:"text-zinc-400",children:R.indexingState??"Unknown"}),c.jsx("td",{className:"text-zinc-400",children:R.coverageState??"Unknown"})]},R.id))})]}),Oe==="notIndexed"&&ce&&(()=>{const R=(U.reasonGroups??[]).find(le=>le.reason===ce);return R?c.jsxs("div",{children:[c.jsx("div",{className:"flex items-center gap-2 mb-3",children:c.jsx("button",{type:"button",className:"text-xs text-zinc-400 hover:text-zinc-200 transition-colors",onClick:()=>pn(null),children:"← Back to reasons"})}),c.jsxs("div",{className:"mb-3 rounded-lg border border-zinc-800/60 bg-zinc-900/20 p-3",children:[c.jsx("p",{className:"text-sm font-medium text-zinc-200",children:R.reason}),c.jsxs("p",{className:"mt-1 text-xs text-zinc-500",children:[R.count," affected page",R.count!==1?"s":""]})]}),nt.length>1&&(()=>{const le=nt.map(Me=>({date:Me.date,count:Me.reasonBreakdown[ce]??0})).filter((Me,jt,it)=>jt===0||jt===it.length-1||it[jt].count>0),Ve=Math.max(...le.map(Me=>Me.count),1);return le.length<2?null:c.jsxs("div",{className:"mb-3",children:[c.jsx("p",{className:"text-xs uppercase tracking-wide text-zinc-500 mb-1",children:"Affected pages over time"}),c.jsx("div",{className:"h-20 w-full",children:c.jsx("svg",{viewBox:`0 0 ${le.length*12+2} 80`,className:"h-full w-full",preserveAspectRatio:"none",children:le.map((Me,jt)=>{const it=Me.count/Ve*68;return c.jsxs("g",{children:[c.jsx("title",{children:`${Me.date}: ${Me.count} pages`}),c.jsx("rect",{x:jt*12+2,y:68-it,width:10,height:it,rx:1,fill:"#f59e0b"})]},Me.date)})})})]})})(),c.jsxs("table",{className:"data-table w-full text-sm",children:[c.jsx("thead",{children:c.jsxs("tr",{children:[c.jsx("th",{className:"text-left",children:"URL"}),c.jsx("th",{className:"text-left",children:"Last Crawl"})]})}),c.jsx("tbody",{children:R.urls.map(le=>c.jsxs("tr",{children:[c.jsx("td",{className:"max-w-sm truncate text-zinc-200",children:le.url}),c.jsx("td",{className:"text-zinc-400",children:le.crawlTime?le.crawlTime.split("T")[0]:"—"})]},le.id))})]})]}):null})(),Oe==="deindexed"&&U.deindexed.length>0&&c.jsxs("table",{className:"data-table w-full text-sm",children:[c.jsx("thead",{children:c.jsxs("tr",{children:[c.jsx("th",{className:"text-left",children:"URL"}),c.jsx("th",{className:"text-left",children:"Previous"}),c.jsx("th",{className:"text-left",children:"Current"}),c.jsx("th",{className:"text-left",children:"Detected"})]})}),c.jsx("tbody",{children:U.deindexed.map((R,le)=>c.jsxs("tr",{children:[c.jsx("td",{className:"max-w-sm truncate text-zinc-200",children:R.url}),c.jsx("td",{className:"text-zinc-400",children:R.previousState}),c.jsx("td",{className:"text-zinc-400",children:R.currentState}),c.jsx("td",{className:"text-zinc-400",children:R.transitionDate.split("T")[0]})]},`${R.url}-${le}`))})]}),(Oe==="indexed"&&U.indexed.length===0||Oe==="notIndexed"&&!ce&&U.notIndexed.length===0||Oe==="deindexed"&&U.deindexed.length===0)&&c.jsx("p",{className:"text-sm text-zinc-500",children:"No URLs in this category."})]})]}):c.jsx("p",{className:"mt-3 text-sm text-zinc-500",children:Ze?"Loading coverage data…":"No coverage data yet. Inspect your sitemap to populate this view."})]}),c.jsxs(Pe,{className:"surface-card",children:[c.jsx("div",{className:"section-head",children:c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Inspection"}),c.jsx("h3",{children:"Inspect a URL"})]})}),c.jsxs("div",{className:"mt-3 flex flex-col gap-2 lg:flex-row",children:[c.jsx("input",{className:"flex-1 rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",type:"url",placeholder:"https://example.com/page",value:E,onChange:R=>O(R.target.value),onKeyDown:R=>R.key==="Enter"&&void cr()}),c.jsx(ue,{type:"button",size:"sm",disabled:me||!Ee?.propertyId||!E.trim(),onClick:cr,children:me?"Inspecting…":"Inspect URL"})]}),z&&c.jsxs("div",{className:"mt-3 grid gap-3 md:grid-cols-2 xl:grid-cols-4",children:[c.jsxs("div",{className:"rounded-lg border border-zinc-800/60 bg-zinc-900/20 p-3",children:[c.jsx("p",{className:"text-xs uppercase tracking-wide text-zinc-500",children:"Indexing state"}),c.jsx("p",{className:"mt-1 text-sm text-zinc-200",children:z.indexingState??"Unknown"})]}),c.jsxs("div",{className:"rounded-lg border border-zinc-800/60 bg-zinc-900/20 p-3",children:[c.jsx("p",{className:"text-xs uppercase tracking-wide text-zinc-500",children:"Verdict"}),c.jsx("p",{className:"mt-1 text-sm text-zinc-200",children:z.verdict??"Unknown"})]}),c.jsxs("div",{className:"rounded-lg border border-zinc-800/60 bg-zinc-900/20 p-3",children:[c.jsx("p",{className:"text-xs uppercase tracking-wide text-zinc-500",children:"Mobile friendly"}),c.jsx("p",{className:"mt-1 text-sm text-zinc-200",children:y0(z.isMobileFriendly)})]}),c.jsxs("div",{className:"rounded-lg border border-zinc-800/60 bg-zinc-900/20 p-3",children:[c.jsx("p",{className:"text-xs uppercase tracking-wide text-zinc-500",children:"Last crawl"}),c.jsx("p",{className:"mt-1 text-sm text-zinc-200",children:Io(z.crawlTime)})]})]})]}),c.jsxs(Pe,{className:"surface-card",children:[c.jsxs("div",{className:"section-head section-head-inline",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"History"}),c.jsx("h3",{children:"Inspection log"})]}),c.jsx(ue,{type:"button",variant:"outline",size:"sm",disabled:F,onClick:()=>{ls()},children:F?"Loading…":"Refresh history"})]}),c.jsxs("div",{className:"mt-3 flex flex-col gap-2 lg:flex-row",children:[c.jsx("input",{className:"flex-1 rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",type:"text",placeholder:"Filter exact URL",value:Se,onChange:R=>ae(R.target.value)}),c.jsx(ue,{type:"button",size:"sm",variant:"outline",disabled:F,onClick:()=>{ls()},children:"Apply filter"})]}),b.length>0?c.jsx("div",{className:"mt-3 overflow-x-auto",children:c.jsxs("table",{className:"data-table w-full text-sm",children:[c.jsx("thead",{children:c.jsxs("tr",{children:[c.jsx("th",{className:"text-left",children:"URL"}),c.jsx("th",{className:"text-left",children:"Indexing"}),c.jsx("th",{className:"text-left",children:"Verdict"}),c.jsx("th",{className:"text-left",children:"Coverage"}),c.jsx("th",{className:"text-left",children:"Mobile"}),c.jsx("th",{className:"text-left",children:"Inspected"})]})}),c.jsx("tbody",{children:b.map(R=>c.jsxs("tr",{children:[c.jsx("td",{className:"max-w-sm truncate text-zinc-200",children:R.url}),c.jsx("td",{className:"text-zinc-300",children:R.indexingState??"Unknown"}),c.jsx("td",{className:"text-zinc-400",children:R.verdict??"Unknown"}),c.jsx("td",{className:"text-zinc-400",children:R.coverageState??"Unknown"}),c.jsx("td",{className:"text-zinc-400",children:y0(R.isMobileFriendly)}),c.jsx("td",{className:"text-zinc-400",children:Io(R.inspectedAt)})]},R.id))})]})}):c.jsx("p",{className:"mt-3 text-sm text-zinc-500",children:"No inspection history yet."})]}),c.jsxs(Pe,{className:"surface-card",children:[c.jsx("div",{className:"section-head",children:c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Deindexed"}),c.jsx("h3",{children:"Recent indexing losses"})]})}),w.length>0?c.jsx("div",{className:"mt-3 overflow-x-auto",children:c.jsxs("table",{className:"data-table w-full text-sm",children:[c.jsx("thead",{children:c.jsxs("tr",{children:[c.jsx("th",{className:"text-left",children:"URL"}),c.jsx("th",{className:"text-left",children:"Previous"}),c.jsx("th",{className:"text-left",children:"Current"}),c.jsx("th",{className:"text-left",children:"Changed at"})]})}),c.jsx("tbody",{children:w.map(R=>c.jsxs("tr",{children:[c.jsx("td",{className:"max-w-sm truncate text-zinc-200",children:R.url}),c.jsx("td",{className:"text-zinc-400",children:R.previousState??"Unknown"}),c.jsx("td",{className:"text-zinc-300",children:R.currentState??"Unknown"}),c.jsx("td",{className:"text-zinc-400",children:Io(R.transitionDate)})]},`${R.url}:${R.transitionDate}`))})]})}):c.jsx("p",{className:"mt-3 text-sm text-zinc-500",children:"No deindexed transitions recorded."})]})]}),Ee&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"border-t border-zinc-800/60 pt-3",children:c.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 text-left",onClick:()=>oe(R=>!R),children:[c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:`h-4 w-4 text-zinc-500 transition-transform ${Tt?"rotate-90":""}`,"aria-hidden":"true",children:c.jsx("path",{fillRule:"evenodd",d:"M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z",clipRule:"evenodd"})}),c.jsx("span",{className:"text-xs uppercase tracking-wide text-zinc-500",children:"Setup & Configuration"})]})}),Tt&&c.jsxs("div",{className:"space-y-3",children:[c.jsxs("div",{className:"grid gap-3 xl:grid-cols-2",children:[c.jsxs(Pe,{className:"surface-card",children:[c.jsx("div",{className:"section-head",children:c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Property"}),c.jsx("h3",{children:"Pick the Search Console property"})]})}),c.jsxs("div",{className:"mt-3 space-y-2",children:[c.jsx("label",{className:"text-xs text-zinc-500",htmlFor:`gsc-property-${e}`,children:"Property URL"}),c.jsx("select",{id:`gsc-property-${e}`,className:"w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 focus:border-zinc-500 focus:outline-none",value:k,disabled:ie||d.length===0,onChange:R=>A(R.target.value),children:d.length===0?c.jsx("option",{value:"",children:ie?"Loading properties…":"No properties available"}):d.map(R=>c.jsxs("option",{value:R.siteUrl,children:[R.siteUrl," · ",R.permissionLevel]},R.siteUrl))}),c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c.jsx(ue,{type:"button",size:"sm",variant:"outline",disabled:ie,onClick:()=>{rr(Ee)},children:ie?"Refreshing…":"Refresh properties"}),c.jsx(ue,{type:"button",size:"sm",disabled:!k||te,onClick:Fa,children:te?"Saving…":"Save property"})]}),c.jsx("p",{className:"text-xs text-zinc-500",children:"The selected property is used for future syncs and URL inspections for this project."})]})]}),c.jsxs(Pe,{className:"surface-card",children:[c.jsx("div",{className:"section-head",children:c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Sync"}),c.jsx("h3",{children:"Import GSC performance data"})]})}),c.jsxs("div",{className:"mt-3 space-y-3",children:[c.jsxs("div",{className:"grid gap-3 sm:grid-cols-[160px_1fr]",children:[c.jsxs("div",{children:[c.jsx("label",{className:"text-xs text-zinc-500",htmlFor:`gsc-sync-days-${e}`,children:"Days"}),c.jsx("input",{id:`gsc-sync-days-${e}`,type:"number",min:"1",className:"mt-0.5 w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",value:D,onChange:R=>M(R.target.value)})]}),c.jsxs("label",{className:"flex items-center gap-2 rounded border border-zinc-800/60 bg-zinc-900/20 px-3 py-2 text-sm text-zinc-300",children:[c.jsx("input",{type:"checkbox",checked:H,onChange:R=>V(R.target.checked)}),"Replace existing imported rows for the requested range"]})]}),c.jsx(ue,{type:"button",size:"sm",disabled:q||!Ee.propertyId,onClick:mi,children:q?"Queueing…":"Queue sync"}),!Ee.propertyId&&c.jsx("p",{className:"text-xs text-amber-400",children:"Select a Search Console property before queueing a sync."})]})]})]}),c.jsxs(Pe,{className:"surface-card",children:[c.jsx("div",{className:"section-head",children:c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Sitemap"}),c.jsx("h3",{children:"Sitemap configuration"})]})}),c.jsxs("div",{className:"mt-3 space-y-3",children:[Ee.sitemapUrl&&c.jsxs("div",{className:"rounded-lg border border-zinc-800/60 bg-zinc-900/20 p-3",children:[c.jsx("p",{className:"text-xs uppercase tracking-wide text-zinc-500",children:"Current sitemap URL"}),c.jsx("p",{className:"mt-1 text-sm text-zinc-200 break-all",children:Ee.sitemapUrl})]}),c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c.jsx(ue,{type:"button",size:"sm",variant:"outline",disabled:In||!Ee.propertyId,onClick:()=>{Hi()},children:In?"Loading…":"Browse sitemaps from GSC"}),c.jsx(ue,{type:"button",size:"sm",variant:"outline",disabled:ft||!Ee.propertyId,onClick:Fn,children:ft?"Discovering…":"Auto-discover and queue inspection"})]}),c.jsx("p",{className:"text-xs text-zinc-500",children:"Browse lists available sitemaps without queueing a run. Auto-discover saves the primary sitemap and queues an inspection."}),Nn&&Nn.length>0&&c.jsxs("div",{className:"rounded-lg border border-zinc-800/60 bg-zinc-900/20 p-3 space-y-2",children:[c.jsxs("p",{className:"text-xs uppercase tracking-wide text-zinc-500",children:["Sitemaps (",Nn.length,")"]}),Nn.map(R=>{const le=R.contents?.[0];return c.jsxs("div",{className:"flex items-start justify-between gap-2 text-xs",children:[c.jsxs("div",{children:[c.jsx("p",{className:"text-zinc-200 break-all",children:R.path}),R.lastSubmitted&&c.jsxs("p",{className:"text-zinc-500",children:["Submitted: ",R.lastSubmitted.split("T")[0]]})]}),c.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[le&&c.jsxs("div",{className:"text-right",children:[c.jsxs("p",{className:"text-zinc-300",children:[le.indexed," / ",le.submitted]}),c.jsx("p",{className:"text-zinc-500",children:"indexed"})]}),c.jsx("button",{type:"button",className:"text-xs text-zinc-400 hover:text-zinc-200 transition-colors",onClick:()=>Yt(R.path),children:"Use"})]})]},R.path)})]}),c.jsxs("div",{className:"flex flex-col gap-2 lg:flex-row",children:[c.jsx("input",{className:"flex-1 rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",type:"url",placeholder:Ee.sitemapUrl?"Update sitemap URL…":"https://example.com/sitemap.xml",value:ht,onChange:R=>Yt(R.target.value),onKeyDown:R=>R.key==="Enter"&&ht.trim()&&void rs()}),c.jsx(ue,{type:"button",size:"sm",disabled:Xn||!ht.trim(),onClick:rs,children:Xn?"Saving…":Ee.sitemapUrl?"Update":"Save"})]}),c.jsxs("div",{className:"flex flex-col gap-2 lg:flex-row",children:[c.jsx("input",{className:"flex-1 rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",type:"url",placeholder:"Sitemap URL for inspection (leave empty for saved default)",id:`gsc-sitemap-inspect-${e}`}),c.jsx(ue,{type:"button",size:"sm",variant:"outline",disabled:Ie||!Ee.propertyId,onClick:()=>{const le=document.getElementById(`gsc-sitemap-inspect-${e}`)?.value?.trim()||Ee.sitemapUrl||void 0;Ut(!0),qA(e,{sitemapUrl:le}).then(Ve=>{xt(`Sitemap inspection queued (run ${Ve.id}). Refresh coverage after the run completes.`)}).catch(Ve=>{Qe(Ve instanceof Error?Ve.message:"Failed to queue sitemap inspection")}).finally(()=>Ut(!1))},children:Ie?"Queueing…":"Inspect sitemap"})]}),!Ee.propertyId&&c.jsx("p",{className:"text-xs text-amber-400",children:"Select a Search Console property first."})]})]})]})]})]})]})}function OT({project:e,onUpdateProject:n}){const[i,l]=x.useState(!1),[o,u]=x.useState(!1),[d,m]=x.useState(null),[g,p]=x.useState(e.displayName),[b,v]=x.useState(e.canonicalDomain),[w,N]=x.useState(e.country),[z,j]=x.useState(e.language),[k,A]=x.useState(e.ownedDomains??[]),[E,O]=x.useState(""),[D,M]=x.useState(null),[H,V]=x.useState(!1),[L,Q]=x.useState(!1),[Se,ae]=x.useState(""),[fe,Ae]=x.useState(""),[qe,Le]=x.useState(""),[q,K]=x.useState(""),[ie,he]=x.useState("");x.useEffect(()=>{i||(p(e.displayName),v(e.canonicalDomain),N(e.country),j(e.language),A(e.ownedDomains??[]))},[e,i]);function te(){l(!1),m(null),p(e.displayName),v(e.canonicalDomain),N(e.country),j(e.language),A(e.ownedDomains??[]),O("")}function C(){const re=E.trim();re&&(k.includes(re)||A([...k,re]),O(""))}function G(re){A(k.filter(Ie=>Ie!==re))}async function ne(){if(!(!g.trim()||!b.trim()||!w.trim()||!z.trim())){u(!0),m(null);try{await n(e.name,{displayName:g.trim(),canonicalDomain:b.trim(),ownedDomains:k,country:w.trim(),language:z.trim()}),l(!1)}catch(re){m(re instanceof Error?re.message:"Failed to save")}finally{u(!1)}}}async function F(){const re=Se.trim(),Ie=fe.trim(),Ut=qe.trim(),ft=q.trim();if(!(!re||!Ie||!Ut||!ft)){V(!0),M(null);try{const At={label:re,city:Ie,region:Ut,country:ft};ie.trim()&&(At.timezone=ie.trim()),await fA(e.name,At),await n(e.name,{}),ae(""),Ae(""),Le(""),K(""),he(""),Q(!1)}catch(At){M(At instanceof Error?At.message:"Failed to add location")}finally{V(!1)}}}async function de(re){V(!0),M(null);try{await hA(e.name,re),await n(e.name,{})}catch(Ie){M(Ie instanceof Error?Ie.message:"Failed to remove location")}finally{V(!1)}}async function me(re){V(!0),M(null);try{await mA(e.name,re),await n(e.name,{})}catch(Ie){M(Ie instanceof Error?Ie.message:"Failed to set default location")}finally{V(!1)}}const we=g!==e.displayName||b!==e.canonicalDomain||w!==e.country||z!==e.language||JSON.stringify(k)!==JSON.stringify(e.ownedDomains??[]),U="w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",se="block text-xs font-medium text-zinc-400 mb-1",Ze=Se.trim()&&fe.trim()&&qe.trim()&&q.trim();return c.jsxs("section",{className:"page-section-divider",children:[c.jsxs("div",{className:"section-head section-head-inline",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Configuration"}),c.jsx("h2",{children:"Project settings"})]}),!i&&c.jsx(ue,{type:"button",variant:"outline",size:"sm",onClick:()=>l(!0),children:"Edit settings"})]}),d&&c.jsxs("div",{className:"mb-3 rounded-lg border border-rose-800/40 bg-rose-950/20 px-3 py-2 text-sm text-rose-300",children:[d,c.jsx("button",{type:"button",className:"ml-2 text-rose-400 hover:text-rose-200",onClick:()=>m(null),children:"×"})]}),i?c.jsxs("div",{className:"rounded-lg border border-zinc-800 bg-zinc-900/40 p-4 space-y-4",children:[c.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[c.jsxs("div",{children:[c.jsx("label",{className:se,children:"Display name"}),c.jsx("input",{className:U,type:"text",value:g,onChange:re=>p(re.target.value),placeholder:"My Project"})]}),c.jsxs("div",{children:[c.jsx("label",{className:se,children:"Canonical domain"}),c.jsx("input",{className:U,type:"text",value:b,onChange:re=>v(re.target.value),placeholder:"example.com"})]}),c.jsxs("div",{children:[c.jsx("label",{className:se,children:"Country"}),c.jsx("input",{className:U,type:"text",value:w,onChange:re=>N(re.target.value),placeholder:"US",maxLength:2})]}),c.jsxs("div",{children:[c.jsx("label",{className:se,children:"Language"}),c.jsx("input",{className:U,type:"text",value:z,onChange:re=>j(re.target.value),placeholder:"en"})]})]}),c.jsxs("div",{children:[c.jsx("label",{className:se,children:"Owned domains"}),c.jsx("div",{className:"flex flex-wrap gap-1.5 mb-2",children:k.map(re=>c.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-zinc-700/60 bg-zinc-800/40 px-2 py-0.5 text-xs text-zinc-300",children:[re,c.jsx("button",{type:"button",className:"ml-0.5 text-zinc-500 hover:text-zinc-200 transition-colors",onClick:()=>G(re),"aria-label":`Remove ${re}`,children:"×"})]},re))}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("input",{className:`${U} flex-1`,type:"text",placeholder:"docs.example.com",value:E,onChange:re=>O(re.target.value),onKeyDown:re=>re.key==="Enter"&&(re.preventDefault(),C())}),c.jsx(ue,{type:"button",variant:"outline",size:"sm",disabled:!E.trim(),onClick:C,children:"Add"})]})]}),c.jsxs("div",{className:"flex items-center gap-2 pt-2 border-t border-zinc-800/60",children:[c.jsx(ue,{type:"button",disabled:o||!we||!g.trim()||!b.trim(),onClick:ne,children:o?"Saving...":"Save changes"}),c.jsx(ue,{type:"button",variant:"outline",disabled:o,onClick:te,children:"Cancel"})]})]}):c.jsx("div",{className:"rounded-lg border border-zinc-800/60 bg-zinc-900/30 overflow-hidden",children:c.jsx("table",{className:"w-full text-sm",children:c.jsxs("tbody",{children:[c.jsxs("tr",{className:"border-b border-zinc-800/40",children:[c.jsx("td",{className:"px-4 py-2.5 text-zinc-500 font-medium w-40",children:"Display name"}),c.jsx("td",{className:"px-4 py-2.5 text-zinc-200",children:e.displayName||"—"})]}),c.jsxs("tr",{className:"border-b border-zinc-800/40",children:[c.jsx("td",{className:"px-4 py-2.5 text-zinc-500 font-medium",children:"Canonical domain"}),c.jsx("td",{className:"px-4 py-2.5 text-zinc-200",children:e.canonicalDomain})]}),c.jsxs("tr",{className:"border-b border-zinc-800/40",children:[c.jsx("td",{className:"px-4 py-2.5 text-zinc-500 font-medium",children:"Owned domains"}),c.jsx("td",{className:"px-4 py-2.5",children:(e.ownedDomains??[]).length>0?c.jsx("div",{className:"flex flex-wrap gap-1.5",children:e.ownedDomains.map(re=>c.jsx("span",{className:"rounded-full border border-zinc-700/60 bg-zinc-800/40 px-2 py-0.5 text-xs text-zinc-300",children:re},re))}):c.jsx("span",{className:"text-zinc-500",children:"—"})})]}),c.jsxs("tr",{className:"border-b border-zinc-800/40",children:[c.jsx("td",{className:"px-4 py-2.5 text-zinc-500 font-medium",children:"Country"}),c.jsx("td",{className:"px-4 py-2.5 text-zinc-200",children:e.country})]}),c.jsxs("tr",{className:"border-b border-zinc-800/40",children:[c.jsx("td",{className:"px-4 py-2.5 text-zinc-500 font-medium",children:"Language"}),c.jsx("td",{className:"px-4 py-2.5 text-zinc-200",children:e.language})]}),c.jsxs("tr",{children:[c.jsx("td",{className:"px-4 py-2.5 text-zinc-500 font-medium align-top pt-3",children:"Locations"}),c.jsxs("td",{className:"px-4 py-2.5",children:[D&&c.jsxs("div",{className:"mb-2 rounded border border-rose-800/40 bg-rose-950/20 px-2 py-1 text-xs text-rose-300",children:[D,c.jsx("button",{type:"button",className:"ml-1 text-rose-400 hover:text-rose-200",onClick:()=>M(null),children:"×"})]}),(e.locations??[]).length>0?c.jsxs("table",{className:"w-full text-xs mb-2",children:[c.jsx("thead",{children:c.jsxs("tr",{className:"text-zinc-600",children:[c.jsx("th",{className:"text-left pb-1 font-medium pr-3",children:"Label"}),c.jsx("th",{className:"text-left pb-1 font-medium pr-3",children:"City"}),c.jsx("th",{className:"text-left pb-1 font-medium pr-3",children:"Region"}),c.jsx("th",{className:"text-left pb-1 font-medium pr-3",children:"Country"}),c.jsx("th",{className:"text-left pb-1 font-medium pr-3",children:"Timezone"}),c.jsx("th",{className:"pb-1"})]})}),c.jsx("tbody",{children:e.locations.map(re=>c.jsxs("tr",{className:"border-t border-zinc-800/30",children:[c.jsx("td",{className:"py-1.5 pr-3",children:c.jsxs("span",{className:`inline-flex items-center gap-1 rounded-full border px-1.5 py-0.5 text-[10px] font-medium ${re.label===e.defaultLocation?"border-emerald-700/60 bg-emerald-950/30 text-emerald-300":"border-zinc-700/60 bg-zinc-800/40 text-zinc-300"}`,children:[re.label,re.label===e.defaultLocation?" ★":""]})}),c.jsx("td",{className:"py-1.5 pr-3 text-zinc-300",children:re.city}),c.jsx("td",{className:"py-1.5 pr-3 text-zinc-300",children:re.region}),c.jsx("td",{className:"py-1.5 pr-3 text-zinc-300",children:re.country}),c.jsx("td",{className:"py-1.5 pr-3 text-zinc-500",children:re.timezone??"—"}),c.jsx("td",{className:"py-1.5",children:c.jsxs("div",{className:"flex items-center gap-1.5",children:[re.label!==e.defaultLocation&&c.jsx("button",{type:"button",disabled:H,onClick:()=>me(re.label),className:"text-[10px] text-zinc-500 hover:text-emerald-400 transition-colors disabled:opacity-40","aria-label":`Set ${re.label} as default location`,children:"Set default"}),c.jsx("button",{type:"button",disabled:H,onClick:()=>de(re.label),className:"text-[10px] text-zinc-500 hover:text-rose-400 transition-colors disabled:opacity-40","aria-label":`Remove location ${re.label}`,children:"Remove"})]})})]},re.label))})]}):c.jsx("p",{className:"text-zinc-500 text-xs mb-2",children:"No locations configured"}),L?c.jsxs("div",{className:"mt-2 rounded border border-zinc-800 bg-zinc-900/50 p-3 space-y-2",children:[c.jsx("p",{className:"text-[10px] font-medium uppercase tracking-wide text-zinc-500",children:"Add location"}),c.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[c.jsxs("div",{children:[c.jsx("label",{className:"block text-[10px] text-zinc-500 mb-0.5",children:"Label *"}),c.jsx("input",{className:U,type:"text",value:Se,onChange:re=>ae(re.target.value),placeholder:"nyc"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-[10px] text-zinc-500 mb-0.5",children:"City *"}),c.jsx("input",{className:U,type:"text",value:fe,onChange:re=>Ae(re.target.value),placeholder:"New York"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-[10px] text-zinc-500 mb-0.5",children:"Region *"}),c.jsx("input",{className:U,type:"text",value:qe,onChange:re=>Le(re.target.value),placeholder:"NY"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-[10px] text-zinc-500 mb-0.5",children:"Country *"}),c.jsx("input",{className:U,type:"text",value:q,onChange:re=>K(re.target.value),placeholder:"US",maxLength:2})]}),c.jsxs("div",{className:"col-span-2",children:[c.jsx("label",{className:"block text-[10px] text-zinc-500 mb-0.5",children:"Timezone (optional)"}),c.jsx("input",{className:U,type:"text",value:ie,onChange:re=>he(re.target.value),placeholder:"America/New_York"})]})]}),c.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[c.jsx(ue,{type:"button",size:"sm",disabled:H||!Ze,onClick:F,children:H?"Adding...":"Add location"}),c.jsx(ue,{type:"button",size:"sm",variant:"outline",disabled:H,onClick:()=>{Q(!1),M(null)},children:"Cancel"})]})]}):c.jsx(ue,{type:"button",size:"sm",variant:"outline",onClick:()=>Q(!0),children:"+ Add location"})]})]})]})})})]})}const DT=[{value:"daily",label:"Every day"},{value:"weekly@mon",label:"Every Monday"},{value:"weekly@wed",label:"Every Wednesday"},{value:"weekly@fri",label:"Every Friday"},{value:"twice-daily",label:"Twice a day (6am & 6pm)"},{value:"custom",label:"Custom cron expression"}],v0=["UTC","America/New_York","America/Chicago","America/Denver","America/Los_Angeles","America/Toronto","America/Vancouver","Europe/London","Europe/Paris","Europe/Berlin","Asia/Tokyo","Asia/Shanghai","Asia/Singapore","Australia/Sydney"];function jf(e){return e===0?"12:00 AM":e<12?`${e}:00 AM`:e===12?"12:00 PM":`${e-12}:00 PM`}function RT(e,n){return e==="twice-daily"?"twice-daily":e.startsWith("weekly@")?`${e}@${n}`:`daily@${n}`}function LT(e,n){if(!e)return{freq:"custom",hour:6,customCron:n};if(e==="twice-daily")return{freq:"twice-daily",hour:6,customCron:""};const i=e.match(/^daily(?:@(\d+))?$/);if(i)return{freq:"daily",hour:i[1]?parseInt(i[1]):6,customCron:""};const l=e.match(/^(weekly@(?:mon|tue|wed|thu|fri|sat|sun))(?:@(\d+))?$/);return l?{freq:l[1],hour:l[2]?parseInt(l[2]):6,customCron:""}:{freq:"custom",hour:6,customCron:n}}function MT(e,n,i){const l=i==="UTC"?"UTC":i.split("/").pop()?.replace(/_/g," ")??i;if(!e)return`Custom: ${n} · ${l}`;if(e==="twice-daily")return`Twice a day (6am & 6pm) · ${l}`;const o=e.match(/^daily(?:@(\d+))?$/);if(o){const d=o[1]?parseInt(o[1]):6;return`Every day at ${jf(d)} · ${l}`}const u=e.match(/^weekly@(mon|tue|wed|thu|fri|sat|sun)(?:@(\d+))?$/);if(u){const d={mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday",sun:"Sunday"},m=u[2]?parseInt(u[2]):6;return`Every ${d[u[1]]} at ${jf(m)} · ${l}`}return`${e} · ${l}`}function $T({projectName:e}){const[n,i]=x.useState("loading"),[l,o]=x.useState(!1),[u,d]=x.useState("daily"),[m,g]=x.useState(6),[p,b]=x.useState(""),[v,w]=x.useState("UTC"),[N,z]=x.useState(!1),[j,k]=x.useState(""),[A,E]=x.useState(!1),[O,D]=x.useState(!1),[M,H]=x.useState(null);x.useEffect(()=>{bA(e).then(i).catch(()=>i(null))},[e]);const V=()=>{if(n&&n!=="loading"){const ae=LT(n.preset??null,n.cronExpr);d(ae.freq),g(ae.hour),b(ae.customCron);const fe=v0.includes(n.timezone);w(fe?n.timezone:"Other"),z(!fe),k(fe?"":n.timezone)}else d("daily"),g(6),b(""),w("UTC"),z(!1),k("");H(null),o(!0)},L=async()=>{E(!0),H(null);try{const fe={timezone:N?j.trim()||"UTC":v};u==="custom"?fe.cron=p.trim():fe.preset=RT(u,m);const Ae=await d0(e,fe);i(Ae),o(!1)}catch(ae){H(ae instanceof Error?ae.message:"Failed to save schedule")}finally{E(!1)}},Q=async()=>{if(!(!n||n==="loading")){E(!0),H(null);try{const ae={timezone:n.timezone,enabled:!n.enabled};n.preset?ae.preset=n.preset:ae.cron=n.cronExpr,i(await d0(e,ae))}catch(ae){H(ae instanceof Error?ae.message:"Failed to update schedule")}finally{E(!1)}}},Se=async()=>{D(!0),H(null);try{await xA(e),i(null),o(!1)}catch(ae){H(ae instanceof Error?ae.message:"Failed to remove schedule")}finally{D(!1)}};return c.jsxs("section",{className:"page-section-divider",children:[c.jsxs("div",{className:"section-head section-head-inline",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Automation"}),c.jsx("h2",{children:"Scheduled runs"})]}),n!=="loading"&&!l&&c.jsx(ue,{type:"button",variant:"outline",size:"sm",onClick:V,children:n?"Edit schedule":"+ Set schedule"})]}),n==="loading"&&c.jsx("p",{className:"supporting-copy",children:"Loading..."}),n!=="loading"&&!l&&n===null&&c.jsx(Pe,{className:"surface-card compact-card",children:c.jsx("p",{className:"supporting-copy",children:"No schedule configured. Set one to automatically trigger visibility sweeps."})}),n!=="loading"&&!l&&n!==null&&c.jsxs(Pe,{className:"surface-card compact-card",children:[c.jsxs("div",{className:"flex items-start justify-between gap-4",children:[c.jsxs("div",{className:"space-y-1",children:[c.jsx("p",{className:"text-sm font-medium text-zinc-200",children:MT(n.preset??null,n.cronExpr,n.timezone)}),c.jsxs("p",{className:"text-xs text-zinc-500",children:["Cron: ",c.jsx("span",{className:"font-mono",children:n.cronExpr})]}),n.nextRunAt&&c.jsxs("p",{className:"text-xs text-zinc-500",children:["Next run: ",new Date(n.nextRunAt).toLocaleString()]}),n.lastRunAt&&c.jsxs("p",{className:"text-xs text-zinc-500",children:["Last run: ",new Date(n.lastRunAt).toLocaleString()]})]}),c.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[c.jsx(Mt,{tone:n.enabled?"positive":"neutral",children:n.enabled?"Active":"Paused"}),c.jsx(ue,{type:"button",variant:"outline",size:"sm",disabled:A,onClick:Q,children:n.enabled?"Pause":"Resume"}),c.jsx(ue,{type:"button",variant:"ghost",size:"sm",disabled:O,onClick:Se,children:O?"Removing...":"Remove"})]})]}),M&&c.jsx("p",{className:"text-rose-400 text-sm mt-2",children:M})]}),l&&c.jsxs("div",{className:"rounded-lg border border-zinc-800 bg-zinc-900/40 p-4 space-y-3",children:[c.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("label",{className:"text-xs font-medium text-zinc-400",children:"Frequency"}),c.jsx("select",{className:"w-full rounded border border-zinc-700 bg-zinc-900 px-2 py-1.5 text-sm text-zinc-200 focus:border-zinc-500 focus:outline-none",value:u,onChange:ae=>d(ae.target.value),children:DT.map(ae=>c.jsx("option",{value:ae.value,children:ae.label},ae.value))})]}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("label",{className:"text-xs font-medium text-zinc-400",children:"Time"}),c.jsx("select",{className:"w-full rounded border border-zinc-700 bg-zinc-900 px-2 py-1.5 text-sm text-zinc-200 focus:border-zinc-500 focus:outline-none disabled:opacity-40",value:m,disabled:u==="twice-daily"||u==="custom",onChange:ae=>g(parseInt(ae.target.value)),children:Array.from({length:24},(ae,fe)=>c.jsx("option",{value:fe,children:jf(fe)},fe))})]})]}),u==="custom"&&c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("label",{className:"text-xs font-medium text-zinc-400",children:"Cron expression"}),c.jsx("input",{className:"w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 font-mono focus:border-zinc-500 focus:outline-none",type:"text",placeholder:"0 9 * * 1-5",value:p,onChange:ae=>b(ae.target.value)})]}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("label",{className:"text-xs font-medium text-zinc-400",children:"Timezone"}),c.jsxs("select",{className:"w-full rounded border border-zinc-700 bg-zinc-900 px-2 py-1.5 text-sm text-zinc-200 focus:border-zinc-500 focus:outline-none",value:N?"Other":v,onChange:ae=>{ae.target.value==="Other"?(z(!0),w("Other")):(z(!1),w(ae.target.value))},children:[v0.map(ae=>c.jsx("option",{value:ae,children:ae},ae)),c.jsx("option",{value:"Other",children:"Other (enter manually)…"})]}),N&&c.jsx("input",{className:"w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",type:"text",placeholder:"e.g. America/New_York",value:j,onChange:ae=>k(ae.target.value)})]}),M&&c.jsx("p",{className:"text-rose-400 text-sm",children:M}),c.jsxs("div",{className:"flex gap-2 justify-end",children:[c.jsx(ue,{type:"button",variant:"outline",size:"sm",onClick:()=>{o(!1),H(null)},children:"Cancel"}),c.jsx(ue,{type:"button",size:"sm",disabled:A||u==="custom"&&!p.trim(),onClick:L,children:A?"Saving...":"Save schedule"})]})]})]})}const UT=[{value:"citation.lost",label:"Citation lost"},{value:"citation.gained",label:"Citation gained"},{value:"run.completed",label:"Run completed"},{value:"run.failed",label:"Run failed"}];function BT({projectName:e}){const[n,i]=x.useState("loading"),[l,o]=x.useState(!1),[u,d]=x.useState(""),[m,g]=x.useState(["citation.lost","citation.gained"]),[p,b]=x.useState(!1),[v,w]=x.useState(null),[N,z]=x.useState({});x.useEffect(()=>{SA(e).then(i).catch(()=>i([]))},[e]);const j=O=>{g(D=>D.includes(O)?D.filter(M=>M!==O):[...D,O])},k=async()=>{if(!(!u.trim()||m.length===0)){b(!0),w(null);try{const O=await wA(e,{channel:"webhook",url:u.trim(),events:m});i(D=>D==="loading"?[O]:[...D,O]),d(""),g(["citation.lost","citation.gained"]),o(!1)}catch(O){w(O instanceof Error?O.message:"Failed to add webhook")}finally{b(!1)}}},A=async O=>{try{await jA(e,O),i(D=>D==="loading"?D:D.filter(M=>M.id!==O))}catch(D){w(D instanceof Error?D.message:"Failed to remove webhook")}},E=async O=>{z(D=>({...D,[O]:{state:"testing"}}));try{const D=await NA(e,O);z(M=>({...M,[O]:{state:D.ok?"ok":"fail",status:D.status}}))}catch{z(D=>({...D,[O]:{state:"fail"}}))}};return c.jsxs("section",{className:"page-section-divider",children:[c.jsxs("div",{className:"section-head section-head-inline",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Automation"}),c.jsx("h2",{children:"Notifications"})]}),n!=="loading"&&c.jsx(ue,{type:"button",variant:"outline",size:"sm",onClick:()=>{o(!l),w(null)},children:l?"Cancel":"+ Add webhook"})]}),l&&c.jsxs("div",{className:"mb-3 rounded-lg border border-zinc-800 bg-zinc-900/40 p-4 space-y-3",children:[c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("label",{className:"text-xs font-medium text-zinc-400",children:"Webhook URL"}),c.jsx("input",{className:"w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",type:"url",placeholder:"https://hooks.example.com/canonry",value:u,onChange:O=>d(O.target.value)})]}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("label",{className:"text-xs font-medium text-zinc-400",children:"Trigger on"}),c.jsx("div",{className:"flex flex-wrap gap-3",children:UT.map(O=>c.jsxs("label",{className:"flex items-center gap-1.5 cursor-pointer select-none",children:[c.jsx("input",{type:"checkbox",className:"rounded border-zinc-600 bg-zinc-800",checked:m.includes(O.value),onChange:()=>j(O.value)}),c.jsx("span",{className:"text-sm text-zinc-300",children:O.label})]},O.value))})]}),v&&c.jsx("p",{className:"text-rose-400 text-sm",children:v}),c.jsxs("div",{className:"flex gap-2 justify-end",children:[c.jsx(ue,{type:"button",variant:"outline",size:"sm",onClick:()=>{o(!1),w(null)},children:"Cancel"}),c.jsx(ue,{type:"button",size:"sm",disabled:p||!u.trim()||m.length===0,onClick:k,children:p?"Adding...":"Add webhook"})]})]}),n==="loading"&&c.jsx("p",{className:"supporting-copy",children:"Loading..."}),n!=="loading"&&n.length===0&&!l&&c.jsx(Pe,{className:"surface-card compact-card",children:c.jsx("p",{className:"supporting-copy",children:"No webhooks configured. Add one to get alerted when citations change or runs complete."})}),n!=="loading"&&n.length>0&&c.jsxs("div",{className:"evidence-table-wrap",children:[c.jsxs("table",{className:"evidence-table",children:[c.jsx("thead",{children:c.jsxs("tr",{children:[c.jsx("th",{children:"URL"}),c.jsx("th",{children:"Events"}),c.jsx("th",{children:"Status"}),c.jsx("th",{})]})}),c.jsx("tbody",{children:n.map(O=>c.jsxs("tr",{children:[c.jsx("td",{className:"evidence-keyword-cell",children:c.jsx("span",{className:"font-mono text-xs text-zinc-300 break-all",children:O.url})}),c.jsx("td",{children:c.jsx("div",{className:"flex flex-wrap gap-1",children:O.events.map(D=>c.jsx("span",{className:"inline-flex items-center rounded-full border border-zinc-700 bg-zinc-800/60 px-2 py-0.5 text-[10px] font-medium text-zinc-400 uppercase tracking-wide",children:D.replace("."," ")},D))})}),c.jsx("td",{children:c.jsx(Mt,{tone:O.enabled?"positive":"neutral",children:O.enabled?"Active":"Paused"})}),c.jsx("td",{children:c.jsxs("div",{className:"flex items-center gap-1 justify-end",children:[N[O.id]&&(()=>{const D=N[O.id],M=D.state==="testing"?"Sending…":D.state==="ok"?`Delivered${D.status?` (${D.status})`:""}`:`Failed${D.status?` (${D.status})`:""}`;return c.jsx(Mt,{tone:D.state==="ok"?"positive":D.state==="fail"?"negative":"neutral",children:M})})(),c.jsx(ue,{variant:"ghost",size:"sm",type:"button",disabled:N[O.id]?.state==="testing",onClick:()=>E(O.id),children:"Test"}),c.jsx(ue,{variant:"ghost",size:"sm",type:"button",onClick:()=>A(O.id),children:"Remove"})]})})]},O.id))})]}),v&&c.jsx("p",{className:"text-rose-400 text-sm mt-2",children:v})]})]})}function IT({runs:e,onOpenRun:n,onTriggerAll:i}){const[l,o]=x.useState("all"),u=l==="all"?e:e.filter(d=>d.status===l);return c.jsxs("div",{className:"page-container",children:[c.jsxs("div",{className:"page-header",children:[c.jsxs("div",{className:"page-header-left",children:[c.jsx("h1",{className:"page-title",children:"Runs"}),c.jsx("p",{className:"page-subtitle",children:"Status, type, project, duration, and the shortest explanation that makes the outcome trustworthy."})]}),i&&c.jsx(ue,{type:"button",variant:"outline",size:"sm",onClick:i,children:"Run all projects"})]}),c.jsxs("section",{children:[c.jsx("div",{className:"filter-row",role:"toolbar","aria-label":"Run filters",children:["all","queued","running","completed","partial","failed"].map(d=>c.jsx("button",{className:`filter-chip ${l===d?"filter-chip-active":""}`,type:"button","aria-pressed":l===d,onClick:()=>o(d),children:d==="all"?"All runs":Nc(d)},d))}),c.jsx("div",{className:"run-list",children:u.length>0?u.map(d=>c.jsx(sx,{run:d,onOpen:n},d.id)):c.jsxs(Pe,{className:"surface-card empty-card",children:[c.jsx("h2",{children:"No runs match this filter"}),c.jsx("p",{children:"Try another status filter or queue a new run from a project command center."})]})})]})]})}const qT={openai:"https://platform.openai.com/api-keys",claude:"https://platform.claude.com/settings/keys"},ix={gemini:"Gemini",openai:"OpenAI",claude:"Claude",local:"Local"},ZT={gemini:"e.g. gemini-3-flash",openai:"e.g. gpt-5.4",claude:"e.g. claude-sonnet-4-6",local:"e.g. llama3, mistral"};function HT({providerName:e,onSaved:n}){const i=e.toLowerCase()==="local",[l,o]=x.useState(""),[u,d]=x.useState(""),[m,g]=x.useState(""),[p,b]=x.useState(""),[v,w]=x.useState(""),[N,z]=x.useState(""),[j,k]=x.useState(!1),[A,E]=x.useState(null),[O,D]=x.useState(!1),M=i?u.trim().length>0:l.trim().length>0;async function H(){if(M){k(!0),E(null),D(!1);try{const Q={};p.trim()&&(Q.maxConcurrency=parseInt(p.trim(),10)),v.trim()&&(Q.maxRequestsPerMinute=parseInt(v.trim(),10)),N.trim()&&(Q.maxRequestsPerDay=parseInt(N.trim(),10)),await yA(e.toLowerCase(),{...l.trim()?{apiKey:l.trim()}:{},...u.trim()?{baseUrl:u.trim()}:{},...m.trim()?{model:m.trim()}:{},...Object.keys(Q).length>0?{quota:Q}:{}}),o(""),d(""),g(""),b(""),w(""),z(""),D(!0),n()}catch(Q){E(Q instanceof Error?Q.message:"Failed to update provider")}finally{k(!1)}}}const V=qT[e.toLowerCase()],L=ZT[e.toLowerCase()]??"Use default model";return c.jsxs("div",{className:"mt-3 rounded-lg border border-zinc-800 bg-zinc-900/40 p-3 space-y-2",children:[i&&c.jsxs("div",{children:[c.jsx("label",{className:"text-xs text-zinc-500",htmlFor:`base-url-${e}`,children:"Base URL"}),c.jsx("input",{id:`base-url-${e}`,type:"text",className:"mt-0.5 w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",placeholder:"http://localhost:11434/v1",value:u,onChange:Q=>d(Q.target.value)}),c.jsx("p",{className:"mt-0.5 text-[10px] text-zinc-600",children:"Any OpenAI-compatible endpoint — Ollama, LM Studio, llama.cpp, vLLM"})]}),c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("label",{className:"text-xs text-zinc-500",htmlFor:`api-key-${e}`,children:["API Key",i?" (optional)":""]}),V&&c.jsx("a",{href:V,target:"_blank",rel:"noopener noreferrer",className:"text-[10px] text-zinc-500 hover:text-zinc-300 underline underline-offset-2",children:"Get API key ↗"})]}),c.jsx("input",{id:`api-key-${e}`,type:"password",className:"mt-0.5 w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",placeholder:i?"Optional — most local servers don't need one":`Enter ${e} API key`,value:l,onChange:Q=>o(Q.target.value)})]}),c.jsxs("div",{children:[c.jsx("label",{className:"text-xs text-zinc-500",htmlFor:`model-${e}`,children:"Model (optional)"}),c.jsx("input",{id:`model-${e}`,type:"text",className:"mt-0.5 w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",placeholder:L,value:m,onChange:Q=>g(Q.target.value)})]}),c.jsxs("div",{children:[c.jsx("label",{className:"text-xs text-zinc-500",children:"Quota (optional)"}),c.jsxs("div",{className:"mt-0.5 grid grid-cols-3 gap-1.5",children:[c.jsxs("div",{children:[c.jsx("input",{type:"number",min:"1",className:"w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",placeholder:"Concurrent",value:p,onChange:Q=>b(Q.target.value)}),c.jsx("p",{className:"mt-0.5 text-[10px] text-zinc-600",children:"Max concurrent"})]}),c.jsxs("div",{children:[c.jsx("input",{type:"number",min:"1",className:"w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",placeholder:"/min",value:v,onChange:Q=>w(Q.target.value)}),c.jsx("p",{className:"mt-0.5 text-[10px] text-zinc-600",children:"Per minute"})]}),c.jsxs("div",{children:[c.jsx("input",{type:"number",min:"1",className:"w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",placeholder:"/day",value:N,onChange:Q=>z(Q.target.value)}),c.jsx("p",{className:"mt-0.5 text-[10px] text-zinc-600",children:"Per day"})]})]})]}),A&&c.jsx("p",{className:"text-xs text-rose-400",children:A}),O&&c.jsx("p",{className:"text-xs text-emerald-400",children:"Provider updated."}),c.jsx(ue,{type:"button",size:"sm",disabled:!M||j,onClick:H,children:j?"Saving...":"Save"})]})}function GT({onSaved:e}){const[n,i]=x.useState(""),[l,o]=x.useState(""),[u,d]=x.useState(!1),[m,g]=x.useState(null),[p,b]=x.useState(!1),v=n.trim().length>0&&l.trim().length>0;async function w(){if(v){d(!0),g(null),b(!1);try{await vA({clientId:n.trim(),clientSecret:l.trim()}),i(""),o(""),b(!0),e()}catch(N){g(N instanceof Error?N.message:"Failed to update Google OAuth credentials")}finally{d(!1)}}}return c.jsxs("div",{className:"mt-3 rounded-lg border border-zinc-800 bg-zinc-900/40 p-3 space-y-2",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("label",{className:"text-xs text-zinc-500",htmlFor:"google-client-id",children:"Client ID"}),c.jsx("a",{href:"https://console.cloud.google.com/apis/credentials",target:"_blank",rel:"noopener noreferrer",className:"text-[10px] text-zinc-500 hover:text-zinc-300 underline underline-offset-2",children:"Google Cloud ↗"})]}),c.jsx("input",{id:"google-client-id",type:"text",className:"mt-0.5 w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",placeholder:"Google OAuth client ID",value:n,onChange:N=>i(N.target.value)})]}),c.jsxs("div",{children:[c.jsx("label",{className:"text-xs text-zinc-500",htmlFor:"google-client-secret",children:"Client secret"}),c.jsx("input",{id:"google-client-secret",type:"password",className:"mt-0.5 w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",placeholder:"Google OAuth client secret",value:l,onChange:N=>o(N.target.value)})]}),c.jsxs("p",{className:"text-[11px] text-zinc-500",children:["These credentials are stored in ",c.jsx("code",{children:"~/.canonry/config.yaml"}),". Project-level Search Console connections are created separately per canonical domain."]}),m&&c.jsx("p",{className:"text-xs text-rose-400",children:m}),p&&c.jsx("p",{className:"text-xs text-emerald-400",children:"Google OAuth credentials updated."}),c.jsx(ue,{type:"button",size:"sm",disabled:!v||u,onClick:w,children:u?"Saving...":"Save Google OAuth app"})]})}function KT({settings:e,healthSnapshot:n,onSettingsChanged:i}){const[l,o]=x.useState(null),[u,d]=x.useState(!1);return c.jsxs("div",{className:"page-container",children:[c.jsx("div",{className:"page-header",children:c.jsxs("div",{className:"page-header-left",children:[c.jsx("h1",{className:"page-title",children:"Settings"}),c.jsx("p",{className:"page-subtitle",children:"Provider state, Google OAuth setup, and service health."})]})}),c.jsxs("section",{className:"settings-grid",children:[e.providerStatuses.map(m=>c.jsxs(Pe,{className:"surface-card",children:[c.jsxs("div",{className:"section-head",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Provider"}),c.jsx("h2",{children:m.name})]}),c.jsx(Mt,{tone:m.state==="ready"?"positive":"caution",children:m.state==="ready"?"Ready":"Needs config"})]}),c.jsxs("dl",{className:"definition-list mt-3",children:[c.jsxs("div",{children:[c.jsx("dt",{children:"Model"}),c.jsx("dd",{className:"font-mono text-xs",children:m.model})]}),m.quota&&c.jsxs(c.Fragment,{children:[c.jsxs("div",{children:[c.jsx("dt",{children:"Concurrency"}),c.jsx("dd",{children:m.quota.maxConcurrency})]}),c.jsxs("div",{children:[c.jsx("dt",{children:"Rate limit"}),c.jsxs("dd",{children:[m.quota.maxRequestsPerMinute,"/min · ",m.quota.maxRequestsPerDay,"/day"]})]})]})]}),c.jsx("p",{className:"mt-2 text-sm text-zinc-500",children:m.detail}),c.jsx("div",{className:"mt-2",children:c.jsx(ue,{type:"button",variant:"outline",size:"sm",onClick:()=>o(l===m.name?null:m.name),children:l===m.name?"Cancel":m.state==="ready"?m.name.toLowerCase()==="local"?"Update config":"Update key":"Configure"})}),l===m.name&&c.jsx(HT,{providerName:m.name,onSaved:()=>{o(null),i?.()}})]},m.name)),c.jsxs(Pe,{className:"surface-card",children:[c.jsxs("div",{className:"section-head",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Google"}),c.jsx("h2",{children:"Search Console OAuth"})]}),c.jsx(Mt,{tone:e.google.state==="ready"?"positive":"caution",children:e.google.state==="ready"?"Ready":"Needs config"})]}),c.jsxs("dl",{className:"definition-list mt-3",children:[c.jsxs("div",{children:[c.jsx("dt",{children:"Auth model"}),c.jsx("dd",{children:"One app credential set, then one OAuth connection per project domain"})]}),c.jsxs("div",{children:[c.jsx("dt",{children:"Storage"}),c.jsx("dd",{className:"font-mono text-xs",children:"~/.canonry/config.yaml"})]})]}),c.jsx("p",{className:"mt-2 text-sm text-zinc-500",children:e.google.detail}),c.jsx("div",{className:"mt-2",children:c.jsx(ue,{type:"button",variant:"outline",size:"sm",onClick:()=>d(!u),children:u?"Cancel":e.google.state==="ready"?"Update OAuth app":"Configure Google OAuth"})}),u&&c.jsx(GT,{onSaved:()=>{d(!1),i?.()}})]}),c.jsxs(Pe,{className:"surface-card",children:[c.jsx("div",{className:"section-head",children:c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Service health"}),c.jsx("h2",{children:"API and worker"})]})}),c.jsxs("div",{className:"compact-stack",children:[c.jsxs("div",{className:"health-row",children:[c.jsxs("div",{children:[c.jsx("p",{className:"run-row-title",children:"API"}),c.jsx("p",{className:"supporting-copy",children:n.apiStatus.detail})]}),c.jsx(Mt,{tone:ic(n.apiStatus),children:n.apiStatus.state==="ok"?"Healthy":"Attention"})]}),c.jsxs("div",{className:"health-row",children:[c.jsxs("div",{children:[c.jsx("p",{className:"run-row-title",children:"Worker"}),c.jsx("p",{className:"supporting-copy",children:n.workerStatus.detail})]}),c.jsx(Mt,{tone:ic(n.workerStatus),children:n.workerStatus.state==="ok"?"Healthy":"Attention"})]})]})]})]}),c.jsx("section",{className:"page-section",children:c.jsxs(Pe,{className:"surface-card",children:[c.jsx("div",{className:"section-head",children:c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Self-host notes"}),c.jsx("h2",{children:"Operational guidance"})]})}),c.jsx("ul",{className:"detail-list",children:e.selfHostNotes.map(m=>c.jsx("li",{children:m},m))}),c.jsx("p",{className:"supporting-copy",children:e.bootstrapNote})]})})]})}const YT=[{label:"System check",description:"Verify your instance is ready"},{label:"Create project",description:"Name, domain, and locale"},{label:"Key phrases",description:"Add key phrases to track"},{label:"Competitors",description:"Add competitor domains"},{label:"Launch",description:"Start your first visibility sweep"}];function VT({current:e,labels:n}){return c.jsx("div",{className:"setup-steps",role:"list","aria-label":"Setup progress",children:n.map((i,l)=>{const o=l<e,u=l===e;return c.jsxs("div",{className:`setup-step ${o?"setup-step-done":""} ${u?"setup-step-active":""}`,role:"listitem","aria-current":u?"step":void 0,children:[c.jsx("span",{className:"setup-step-number",children:o?"✓":l+1}),c.jsx("span",{className:"setup-step-label",children:i.label})]},i.label)})})}function PT({model:e,settings:n,onProjectCreated:i,onNavigate:l}){const[o,u]=x.useState(0),[d,m]=x.useState(""),[g,p]=x.useState(""),[b,v]=x.useState(""),[w,N]=x.useState("US"),[z,j]=x.useState("en"),[k,A]=x.useState(null),[E,O]=x.useState(null),[D,M]=x.useState(null),[H,V]=x.useState(!1),[L,Q]=x.useState(""),[Se,ae]=x.useState(!1),[fe,Ae]=x.useState(null),[qe,Le]=x.useState(!1),q=n.providerStatuses.filter(ce=>ce.state==="ready"),[K,ie]=x.useState(q[0]?.name??""),[he,te]=x.useState(5),[C,G]=x.useState(!1),[ne,F]=x.useState(null),[de,me]=x.useState(""),[we,U]=x.useState(!1),[se,Ze]=x.useState(null),[re,Ie]=x.useState(!1),[Ut,ft]=x.useState(!1),[At,In]=x.useState(null),[as,Nn]=x.useState(!1),Ft=d.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),ht=L.split(`
237
+ `).map(ce=>ce.trim()).filter(Boolean),Yt=de.split(`
238
+ `).map(ce=>ce.trim()).filter(Boolean),Xn=e.healthChecks.some(ce=>ce.id==="api"&&ce.state==="ready"),Jn=async()=>{if(!(!Ft||!b)){V(!0),M(null);try{const ce=await jc(Ft,{displayName:g||d,canonicalDomain:b,country:w,language:z});A(Ft),O(ce.id),i(),u(2)}catch(ce){M(ce instanceof Error?ce.message:"Failed to create project")}finally{V(!1)}}},Tt=async()=>{if(!k)return;const ce=ht;if(ce.length!==0){Le(!0),Ae(null);try{await rA(k,ce),ae(!0),i(),u(3)}catch(pn){Ae(pn instanceof Error?pn.message:"Failed to save key phrases")}finally{Le(!1)}}},oe=async()=>{if(!(!k||!K)){G(!0),F(null);try{const ce=await kA(k,K,he);if(ce.keywords.length>0){const pn=L?L.trimEnd()+`
239
+ `+ce.keywords.join(`
240
+ `):ce.keywords.join(`
241
+ `);Q(pn)}}catch(ce){F(ce instanceof Error?ce.message:"Failed to generate key phrases")}finally{G(!1)}}},Oe=async()=>{if(!k)return;const ce=Yt;if(ce.length!==0){Ie(!0),Ze(null);try{await Yb(k,ce),U(!0),i(),u(4)}catch(pn){Ze(pn instanceof Error?pn.message:"Failed to save competitors")}finally{Ie(!1)}}},Bt=async()=>{if(k){Nn(!0),In(null);try{await Vb(k),ft(!0),i()}catch(ce){In(ce instanceof Error?ce.message:"Failed to trigger run")}finally{Nn(!1)}}},nt=()=>u(ce=>Math.max(0,ce-1)),rn=(()=>{switch(o){case 0:return c.jsxs(Pe,{className:"surface-card step-card",children:[c.jsx("div",{className:"section-head",children:c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 1 of 5"}),c.jsx("h2",{children:"System ready"})]})}),c.jsx("p",{className:"supporting-copy",children:"Checking that your Canonry instance is configured and reachable."}),c.jsx("div",{className:"compact-stack",children:e.healthChecks.map(ce=>c.jsxs("div",{className:"health-check-row",children:[c.jsxs("div",{children:[c.jsx("p",{className:"run-row-title",children:ce.label}),c.jsx("p",{className:"supporting-copy",children:ce.detail}),ce.id==="provider"&&ce.state!=="ready"&&c.jsx("button",{type:"button",className:"text-emerald-400 hover:text-emerald-300 text-sm mt-1 underline underline-offset-2 cursor-pointer bg-transparent border-none p-0",onClick:()=>l("/settings"),children:"Configure providers"})]}),c.jsx(Mt,{tone:ce.state==="ready"?"positive":"caution",children:ce.state==="ready"?"Ready":"Attention"})]},ce.id))}),c.jsxs("div",{className:"setup-nav",children:[c.jsx("span",{}),c.jsx(ue,{type:"button",disabled:!Xn,onClick:()=>u(1),children:"Continue"})]})]});case 1:return c.jsxs(Pe,{className:"surface-card step-card",children:[c.jsxs("div",{className:"section-head",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 2 of 5"}),c.jsx("h2",{children:"Create project"})]}),k?c.jsx(Mt,{tone:"positive",children:"Created"}):null]}),k?c.jsxs("div",{className:"compact-stack",children:[c.jsxs("p",{className:"text-zinc-300",children:["Project ",c.jsx("span",{className:"text-zinc-100 font-medium",children:k})," created successfully."]}),c.jsxs("div",{className:"setup-nav",children:[c.jsx(ue,{type:"button",variant:"outline",onClick:nt,children:"Back"}),c.jsx(ue,{type:"button",onClick:()=>u(2),children:"Continue"})]})]}):c.jsxs("div",{className:"compact-stack",children:[c.jsxs("div",{className:"setup-field",children:[c.jsx("label",{className:"setup-label",htmlFor:"project-name",children:"Project name"}),c.jsx("input",{id:"project-name",className:"setup-input",type:"text",placeholder:"my-website",value:d,onChange:ce=>m(ce.target.value)}),Ft&&Ft!==d?c.jsxs("p",{className:"supporting-copy",children:["Slug: ",Ft]}):null]}),c.jsxs("div",{className:"setup-field",children:[c.jsx("label",{className:"setup-label",htmlFor:"display-name",children:"Display name (optional)"}),c.jsx("input",{id:"display-name",className:"setup-input",type:"text",placeholder:"My Website",value:g,onChange:ce=>p(ce.target.value)})]}),c.jsxs("div",{className:"setup-field",children:[c.jsx("label",{className:"setup-label",htmlFor:"domain",children:"Canonical domain"}),c.jsx("input",{id:"domain",className:"setup-input",type:"text",placeholder:"example.com",value:b,onChange:ce=>v(ce.target.value)})]}),c.jsxs("div",{className:"setup-field-row",children:[c.jsxs("div",{className:"setup-field",children:[c.jsx("label",{className:"setup-label",htmlFor:"country",children:"Country"}),c.jsx("input",{id:"country",className:"setup-input",type:"text",placeholder:"US",maxLength:2,value:w,onChange:ce=>N(ce.target.value.toUpperCase())})]}),c.jsxs("div",{className:"setup-field",children:[c.jsx("label",{className:"setup-label",htmlFor:"language",children:"Language"}),c.jsx("input",{id:"language",className:"setup-input",type:"text",placeholder:"en",maxLength:5,value:z,onChange:ce=>j(ce.target.value.toLowerCase())})]})]}),D?c.jsx("p",{className:"text-rose-400 text-sm",children:D}):null,c.jsxs("div",{className:"setup-nav",children:[c.jsx(ue,{type:"button",variant:"outline",onClick:nt,children:"Back"}),c.jsx(ue,{type:"button",disabled:!Ft||!b||H,onClick:Jn,children:H?"Creating...":"Create project"})]})]})]});case 2:return c.jsxs(Pe,{className:"surface-card step-card",children:[c.jsxs("div",{className:"section-head",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 3 of 5"}),c.jsx("h2",{children:"Add key phrases"})]}),Se?c.jsxs(Mt,{tone:"positive",children:[ht.length," saved"]}):c.jsxs(Mt,{tone:"neutral",children:[ht.length," key phrase",ht.length!==1?"s":""]})]}),c.jsx("p",{className:"supporting-copy",children:"Enter the search queries you want to track. One per line."}),Se?c.jsxs("div",{className:"compact-stack",children:[c.jsx("ul",{className:"detail-list",children:ht.map(ce=>c.jsx("li",{children:ce},ce))}),c.jsxs("div",{className:"setup-nav",children:[c.jsx(ue,{type:"button",variant:"outline",onClick:nt,children:"Back"}),c.jsx(ue,{type:"button",onClick:()=>u(3),children:"Continue"})]})]}):c.jsxs("div",{className:"compact-stack",children:[q.length>0?c.jsxs("div",{className:"compact-stack",children:[c.jsxs("div",{className:"flex items-center gap-2 text-zinc-500 text-xs uppercase tracking-wide",children:[c.jsx("span",{className:"flex-1 border-t border-zinc-800"}),"auto-generate",c.jsx("span",{className:"flex-1 border-t border-zinc-800"})]}),c.jsxs("div",{className:"flex items-end gap-2",children:[c.jsxs("div",{className:"setup-field flex-1",children:[c.jsx("label",{className:"setup-label",htmlFor:"gen-provider",children:"Provider"}),c.jsx("select",{id:"gen-provider",className:"setup-input",value:K,onChange:ce=>ie(ce.target.value),children:q.map(ce=>c.jsxs("option",{value:ce.name,children:[ix[ce.name]??ce.name,ce.model?` (${ce.model})`:""]},ce.name))})]}),c.jsxs("div",{className:"setup-field",children:[c.jsx("label",{className:"setup-label",htmlFor:"gen-count",children:"Count"}),c.jsx("select",{id:"gen-count",className:"setup-input",value:he,onChange:ce=>te(Number(ce.target.value)),children:[3,5,10,15,20].map(ce=>c.jsx("option",{value:ce,children:ce},ce))})]}),c.jsx(ue,{type:"button",variant:"outline",disabled:C||!K,onClick:oe,children:C?"Analyzing site...":"Generate"})]}),ne?c.jsx("p",{className:"text-rose-400 text-sm",children:ne}):null]}):null,c.jsxs("div",{className:"flex items-center gap-2 text-zinc-500 text-xs uppercase tracking-wide",children:[c.jsx("span",{className:"flex-1 border-t border-zinc-800"}),"or type manually",c.jsx("span",{className:"flex-1 border-t border-zinc-800"})]}),c.jsxs("div",{className:"setup-field",children:[c.jsx("label",{className:"setup-label",htmlFor:"keywords",children:"Key phrases (one per line)"}),c.jsx("textarea",{id:"keywords",className:"setup-textarea",rows:6,placeholder:`emergency dentist brooklyn
242
+ best invisalign downtown brooklyn
243
+ pediatric dentist brooklyn heights`,value:L,onChange:ce=>Q(ce.target.value)})]}),fe?c.jsx("p",{className:"text-rose-400 text-sm",children:fe}):null,c.jsxs("div",{className:"setup-nav",children:[c.jsx(ue,{type:"button",variant:"outline",onClick:nt,children:"Back"}),c.jsx(ue,{type:"button",disabled:ht.length===0||qe,onClick:Tt,children:qe?"Saving...":`Save ${ht.length} key phrase${ht.length!==1?"s":""}`})]})]})]});case 3:return c.jsxs(Pe,{className:"surface-card step-card",children:[c.jsxs("div",{className:"section-head",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 4 of 5"}),c.jsx("h2",{children:"Add competitors"})]}),we?c.jsx(Mt,{tone:"positive",children:"Saved"}):null]}),c.jsx("p",{className:"supporting-copy",children:"Domains that compete for the same key phrases. One per line."}),we?c.jsxs("div",{className:"compact-stack",children:[c.jsx("ul",{className:"detail-list",children:Yt.map(ce=>c.jsx("li",{children:ce},ce))}),c.jsxs("div",{className:"setup-nav",children:[c.jsx(ue,{type:"button",variant:"outline",onClick:nt,children:"Back"}),c.jsx(ue,{type:"button",onClick:()=>u(4),children:"Continue"})]})]}):c.jsxs("div",{className:"compact-stack",children:[c.jsxs("div",{className:"setup-field",children:[c.jsx("label",{className:"setup-label",htmlFor:"competitors",children:"Competitor domains (one per line)"}),c.jsx("textarea",{id:"competitors",className:"setup-textarea",rows:4,placeholder:`competitor1.com
244
+ competitor2.com`,value:de,onChange:ce=>me(ce.target.value)})]}),se?c.jsx("p",{className:"text-rose-400 text-sm",children:se}):null,c.jsxs("div",{className:"setup-nav",children:[c.jsx(ue,{type:"button",variant:"outline",onClick:nt,children:"Back"}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx(ue,{type:"button",variant:"outline",onClick:()=>u(4),children:"Skip"}),c.jsx(ue,{type:"button",disabled:Yt.length===0||re,onClick:Oe,children:re?"Saving...":`Save ${Yt.length} competitor${Yt.length!==1?"s":""}`})]})]})]})]});case 4:return c.jsxs(Pe,{className:"surface-card step-card",children:[c.jsxs("div",{className:"section-head",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 5 of 5"}),c.jsx("h2",{children:"Launch first run"})]}),Ut?c.jsx(Mt,{tone:"positive",children:"Queued"}):null]}),Ut?c.jsxs("div",{className:"compact-stack",children:[c.jsx("p",{className:"text-zinc-300",children:"Visibility sweep has been queued. View progress on the project page."}),c.jsxs("div",{className:"setup-nav",children:[c.jsx("span",{}),c.jsx(ue,{type:"button",onClick:()=>l(E?`/projects/${E}`:"/"),children:"Open project"})]})]}):c.jsxs("div",{className:"compact-stack",children:[c.jsxs("p",{className:"supporting-copy",children:["Everything is configured. Launch an answer-visibility sweep to start tracking citations for ",c.jsx("span",{className:"text-zinc-100 font-medium",children:k}),"."]}),At?c.jsx("p",{className:"text-rose-400 text-sm",children:At}):null,c.jsxs("div",{className:"setup-nav",children:[c.jsx(ue,{type:"button",variant:"outline",onClick:nt,children:"Back"}),c.jsx(ue,{type:"button",disabled:as,onClick:Bt,children:as?"Launching...":"Launch visibility sweep"})]})]})]});default:return null}})();return c.jsxs("div",{className:"page-container",children:[c.jsx("div",{className:"page-header",children:c.jsxs("div",{className:"page-header-left",children:[c.jsx("h1",{className:"page-title",children:"Setup"}),c.jsx("p",{className:"page-subtitle",children:"Create a project, add key phrases, add competitors, and launch the first run."})]})}),c.jsx(VT,{current:o,labels:YT}),c.jsx("section",{className:"setup-wizard",children:rn})]})}function QT({onNavigate:e}){return c.jsx("div",{className:"page-container",children:c.jsx("section",{className:"page-section",children:c.jsxs(Pe,{className:"surface-card empty-card",children:[c.jsx("h1",{children:"Route not found"}),c.jsx("p",{children:"The current path does not map to a dashboard view."}),c.jsx(ue,{asChild:!0,children:c.jsx("a",{href:"/",onClick:jn(e,"/"),children:"Return to overview"})})]})})})}function XT({title:e,subtitle:n,children:i,open:l,onClose:o}){return c.jsx(ZE,{open:l,onOpenChange:u=>u?void 0:o(),children:c.jsxs(Bb,{children:[c.jsxs(VE,{className:"drawer-head",children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:n}),c.jsx(Ib,{id:"drawer-title",children:e}),c.jsx(qb,{className:"sr-only",children:n})]}),c.jsx("div",{className:"drawer-body",children:i})]})})}function b0(e,n){const i=n.filter(d=>d.trim().length>1),l=e.split(/(\*\*[^*]+\*\*)/).filter(Boolean).map(d=>d.startsWith("**")&&d.endsWith("**")?{type:"bold",value:d.slice(2,-2)}:{type:"text",value:d});if(i.length===0)return l.map((d,m)=>d.type==="bold"?c.jsx("strong",{className:"text-zinc-200 font-semibold",children:d.value},`b-${m}`):d.value).filter(Boolean);const o=i.map(d=>d.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),u=new RegExp(`(${o.join("|")})`,"gi");return l.flatMap((d,m)=>d.value.split(u).map((p,b)=>p?b%2===1?d.type==="bold"?c.jsx("mark",{className:"answer-highlight",children:c.jsx("strong",{className:"text-zinc-200 font-semibold",children:p})},`hl-${m}-${b}`):c.jsx("mark",{className:"answer-highlight",children:p},`hl-${m}-${b}`):d.type==="bold"?c.jsx("strong",{className:"text-zinc-200 font-semibold",children:p},`b-${m}-${b}`):p:null)).filter(Boolean)}function JT({evidence:e,project:n,onClose:i}){const[l,o]=x.useState(!1),[u,d]=x.useState(-1),[m,g]=x.useState(null),[p,b]=x.useState(!1),[v,w]=x.useState({}),N=TC(n.project),z=new Set(N.map(xf)),j=e.runHistory,k=j.length>1,A=u>=0&&m!==null,E=A?m:{citationState:e.citationState,provider:e.provider,model:e.model,answerSnippet:e.answerSnippet,citedDomains:e.citedDomains,competitorDomains:e.competitorDomains,groundingSources:e.groundingSources,evidenceUrls:e.evidenceUrls,changeLabel:e.changeLabel,summary:e.summary},O=E.citationState==="cited"||E.citationState==="emerging",M=E.citedDomains.findIndex(K=>z.has(K.toLowerCase().replace(/^www\./,"")))+1,H=E.citedDomains.length,V=n.project.displayName||n.project.name,L=[...N.map(xf),V,V.split(" ").slice(0,2).join(" ")].filter(K=>K.trim().length>2),Q=O?"cited":E.citationState==="lost"?"lost":E.citationState==="pending"?"pending":"not-cited",Se=x.useRef(0),ae=x.useCallback(async K=>{const ie=++Se.current;if(K===-1||K===j.length-1){d(-1),g(null),o(!1);return}d(K),o(!1);const he=j[K],te=`${he.runId}::${e.keyword}::${e.provider}`;if(v[te]){g(v[te]);return}b(!0);try{const C=await tr(he.runId);if(ie!==Se.current)return;const G=C.snapshots.find(F=>F.keyword===e.keyword&&F.provider===e.provider)??C.snapshots.find(F=>F.keyword===e.keyword),ne=G?{citationState:G.citationState,provider:G.provider,model:G.model??null,answerSnippet:G.answerText??"",citedDomains:G.citedDomains,competitorDomains:G.competitorOverlap,groundingSources:G.groundingSources,evidenceUrls:[],changeLabel:he.citationState,summary:""}:{citationState:he.citationState,provider:e.provider,model:he.model??null,answerSnippet:"",citedDomains:[],competitorDomains:[],groundingSources:[],evidenceUrls:[],changeLabel:he.citationState,summary:"Snapshot data not available for this run."};w(F=>({...F,[te]:ne})),g(ne)}catch{if(ie!==Se.current)return;g({citationState:he.citationState,provider:e.provider,model:he.model??null,answerSnippet:"",citedDomains:[],competitorDomains:[],groundingSources:[],evidenceUrls:[],changeLabel:he.citationState,summary:"Failed to load historical run data."})}finally{ie===Se.current&&b(!1)}},[j,e.keyword,e.provider,v]),Ae=(A||e.historyScope!=="provider")&&E.model?`${E.provider} (${E.model}) · ${E.changeLabel.toLowerCase()}`:`${E.provider} · ${E.changeLabel.toLowerCase()}`,qe=!A&&e.historyScope==="provider"?[e.model?`Current model: ${e.model}`:null,e.modelsSeen&&e.modelsSeen.length>1?`History spans ${e.modelsSeen.length} models`:null].filter(Boolean).join(" · "):"",Le=O&&M>0?{label:"Citation confirmed",title:`Cited #${M} of ${H} domain${H!==1?"s":""}`,meta:Ae}:O?{label:"Citation confirmed",title:"Cited in this answer",meta:Ae}:E.citationState==="lost"?{label:"Citation lost",title:H>0?`${H} domain${H!==1?"s":""} cited instead`:"No longer appearing in this answer",meta:Ae}:E.citationState==="pending"?{label:"Pending",title:"Awaiting first visibility run",meta:"No provider data yet"}:{label:"Not in this answer",title:H>0?`${H} domain${H!==1?"s":""} cited instead`:"No domains cited for this query",meta:Ae},q=()=>{if(!E.answerSnippet)return null;const K=E.answerSnippet.split(`
245
+ `),ie=[];let he=[],te=0;const C=()=>{if(he.length===0)return;const G=he.join(" ").trim();G&&ie.push(c.jsx("p",{className:ie.length>0?"mt-2.5":"",children:b0(G,L)},te++)),he=[]};for(const G of K){const ne=G.trim();if(/^[-–—]{3,}$/.test(ne)){C(),ie.push(c.jsx("hr",{className:"border-zinc-800/60 my-3"},te++));continue}const F=ne.match(/^(#{1,3})\s+(.+)$/);if(F){C();const de=F[1].length,me=F[2].replace(/^[\p{Emoji}\p{Emoji_Component}\s#]+/u,"").trim()||F[2],we=de===1?"text-[13px] font-semibold text-zinc-100 mt-4 mb-1":de===2?"text-xs font-semibold text-zinc-200 mt-3 mb-0.5":"text-xs font-medium text-zinc-300 mt-2";ie.push(c.jsx("p",{className:we,children:b0(me,L)},te++));continue}if(ne===""){C();continue}he.push(ne)}return C(),ie};return c.jsx(Mv,{open:!0,onOpenChange:K=>{K||i()},children:c.jsxs($v,{children:[c.jsx(Kf,{className:"fixed inset-0 z-50 bg-black/80 backdrop-blur-sm"}),c.jsxs(Yf,{className:"evidence-modal","aria-describedby":void 0,children:[c.jsxs("div",{className:"evidence-modal-header",children:[c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsxs("p",{className:"eyebrow eyebrow-soft",children:[n.project.name," · ",E.provider||"All providers"]}),c.jsx(Vf,{className:"text-lg font-semibold text-zinc-50 truncate",children:e.keyword})]}),c.jsxs(Bv,{className:"inline-flex size-8 items-center justify-center rounded-md text-zinc-500 transition hover:bg-zinc-800 hover:text-zinc-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-zinc-400 shrink-0",children:[c.jsx(Qf,{className:"size-4"}),c.jsx("span",{className:"sr-only",children:"Close"})]})]}),k&&c.jsxs("div",{className:"evidence-modal-timeline",children:[c.jsx("p",{className:"drawer-section-label mb-1.5",children:"Run history"}),c.jsx("div",{className:"flex items-center gap-1 overflow-x-auto pb-1",children:j.map((K,ie)=>{const he=u===-1&&ie===j.length-1||u===ie,te=K.citationState==="cited"?"bg-emerald-400":K.citationState==="emerging"?"bg-amber-400":K.citationState==="lost"?"bg-rose-400":"bg-zinc-600",G=new Date(K.createdAt).toLocaleDateString(void 0,{month:"short",day:"numeric"}),ne=!!(K.model&&ie>0&&j[ie-1]?.model&&j[ie-1].model!==K.model);return c.jsxs("button",{type:"button",className:`evidence-run-dot ${he?"evidence-run-dot--selected":""}`,onClick:()=>ae(ie===j.length-1?-1:ie),"aria-label":[`Run ${G}: ${K.citationState}`,K.model?`model ${K.model}`:null,ne?"model changed":null].filter(Boolean).join(" — "),"aria-pressed":he,children:[c.jsx("span",{className:`size-2 rounded-full ${te} ${ne?"ring-1 ring-amber-300/80 ring-offset-2 ring-offset-zinc-950":""}`,"aria-hidden":"true"}),c.jsx("span",{className:"text-[10px] text-zinc-500",children:G})]},ie)})}),u>=0&&u<j.length&&c.jsxs("p",{className:"text-[11px] text-zinc-500 mt-1",children:["Viewing run from ",new Date(j[u].createdAt).toLocaleString()," — ",c.jsx("span",{className:"capitalize",children:j[u].citationState}),c.jsx("button",{type:"button",className:"text-zinc-400 hover:text-zinc-200 ml-2",onClick:()=>ae(-1),children:"← Back to latest"})]}),!A&&(e.modelTransitions?.length??0)>0&&c.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:e.modelTransitions.map(K=>c.jsx("span",{className:"inline-flex items-center rounded-full border border-amber-400/30 bg-amber-400/10 px-2 py-1 text-[10px] text-amber-100",children:`${K.fromModel??"unknown"} -> ${K.toModel??"unknown"} on ${new Date(K.createdAt).toLocaleDateString()}`},`${K.runId}:${K.toModel??"unknown"}`))})]}),c.jsxs("div",{className:"evidence-modal-body",children:[p&&c.jsx("div",{className:"md:col-span-2 flex items-center justify-center py-12 text-zinc-500 text-sm",children:"Loading historical run data…"}),!p&&c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"evidence-modal-main",children:[c.jsxs("div",{className:`evidence-position-hero evidence-position-hero--${Q}`,children:[c.jsx("p",{className:`evidence-position-label evidence-position-label--${Q}`,children:Le.label}),c.jsx("p",{className:`evidence-position-title evidence-position-title--${Q}`,children:Le.title}),c.jsx("p",{className:"evidence-position-meta",children:Le.meta}),qe&&c.jsx("p",{className:"mt-1 text-[11px] text-zinc-500",children:qe})]}),E.answerSnippet&&c.jsxs("div",{children:[c.jsx("p",{className:"drawer-section-label",children:"What the AI said"}),c.jsx("div",{className:`answer-snippet-block ${l?"evidence-answer-expanded":"evidence-answer-collapsed"}`,children:q()}),E.answerSnippet.length>280&&c.jsx("button",{type:"button",className:"mt-1.5 text-xs text-zinc-500 hover:text-zinc-300 transition-colors",onClick:()=>o(!l),children:l?"↑ Collapse":"↓ Show full answer"})]}),!E.answerSnippet&&!p&&c.jsx("div",{className:"rounded-lg border border-zinc-800/40 bg-zinc-900/20 px-4 py-8 text-center text-zinc-600 text-sm",children:"No answer text recorded for this run"}),!A&&e.relatedTechnicalSignals.length>0&&c.jsxs("div",{children:[c.jsx("p",{className:"drawer-section-label",children:O?"Why you're cited":"What to fix"}),c.jsx("div",{className:"action-items-list",children:e.relatedTechnicalSignals.map((K,ie)=>c.jsxs("div",{className:"action-item",children:[c.jsx("svg",{className:`action-item-icon ${O?"text-emerald-400":"text-amber-400"}`,viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:O?c.jsx("path",{d:"M3 8l3.5 3.5L13 4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}):c.jsxs(c.Fragment,{children:[c.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),c.jsx("path",{d:"M8 5v3.5M8 10.5v0",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}),c.jsx("span",{className:"action-item-text",children:K})]},ie))})]}),E.summary&&c.jsx("p",{className:"text-xs text-zinc-600 border-t border-zinc-800/40 pt-3 mt-1",children:E.summary})]}),c.jsxs("div",{className:"evidence-modal-sidebar",children:[E.citedDomains.length>0&&c.jsxs("div",{children:[c.jsx("p",{className:"drawer-section-label",children:"Who was cited — in order"}),c.jsxs("div",{className:"citation-leaderboard",children:[E.citedDomains.map((K,ie)=>{const he=K.toLowerCase().replace(/^www\./,""),te=z.has(he),C=!te&&E.competitorDomains.some(ne=>ne.toLowerCase().replace(/^www\./,"")===he),G=te?"you":C?"competitor":"other";return c.jsxs("div",{className:`citation-leaderboard-item citation-leaderboard-item--${G}`,children:[c.jsxs("span",{className:"citation-leaderboard-rank",children:["#",ie+1]}),c.jsx("span",{className:"citation-leaderboard-domain",children:K}),te&&c.jsx("span",{className:"citation-leaderboard-tag",children:"You"}),C&&c.jsx("span",{className:"citation-leaderboard-tag",children:"Competitor"})]},K)}),!O&&c.jsxs("div",{className:"citation-leaderboard-item citation-leaderboard-item--not-cited border-dashed",children:[c.jsx("span",{className:"citation-leaderboard-rank text-zinc-600",children:"—"}),c.jsx("span",{className:"citation-leaderboard-domain text-zinc-600",children:n.project.canonicalDomain}),c.jsx("span",{className:"citation-leaderboard-tag text-zinc-600",children:"Not cited"})]})]})]}),E.groundingSources.length>0&&c.jsxs("div",{children:[c.jsxs("p",{className:"drawer-section-label",children:["Grounding sources (",E.groundingSources.length,")"]}),c.jsx("ul",{className:"grid gap-0.5",children:E.groundingSources.map((K,ie)=>c.jsx("li",{className:"truncate text-sm",children:c.jsx("a",{href:K.uri,target:"_blank",rel:"noreferrer",className:"text-zinc-400 hover:text-zinc-200 transition-colors",children:K.title||K.uri})},ie))})]}),E.evidenceUrls.length>0&&c.jsxs("div",{children:[c.jsx("p",{className:"drawer-section-label",children:"Evidence URLs"}),c.jsx("ul",{className:"grid gap-1",children:E.evidenceUrls.map(K=>c.jsx("li",{className:"truncate text-sm",children:c.jsx("a",{href:K,target:"_blank",rel:"noreferrer",className:"text-zinc-400 hover:text-zinc-200 transition-colors",children:K})},K))})]}),E.citedDomains.length===0&&E.groundingSources.length===0&&E.evidenceUrls.length===0&&c.jsxs("div",{className:"flex items-center justify-center h-24 text-zinc-600 text-sm",children:["No citation data ",A?"for this run":"yet"]})]})]})]})]})]})})}async function FT(){try{const[e,n,i]=await Promise.all([iA(),aA(),Pb().catch(()=>null)]),l=await Promise.all(e.map(async o=>{const u=n.filter(w=>w.projectId===o.id),d=u.filter(w=>(w.status==="completed"||w.status==="partial")&&w.kind==="answer-visibility").sort((w,N)=>N.createdAt.localeCompare(w.createdAt)),[m,g,p,b,v]=await Promise.all([lA(o.name).catch(()=>[]),Gb(o.name).catch(()=>[]),Kb(o.name).catch(()=>[]),d[0]?tr(d[0].id).catch(()=>null):Promise.resolve(null),d[1]?tr(d[1].id).catch(()=>null):Promise.resolve(null)]);return{project:o,runs:u,keywords:m,competitors:g,timeline:p,latestRunDetail:b,previousRunDetail:v}}));return lT(l,i)}catch{return null}}function WT({initialPathname:e,initialDashboard:n,initialHealthSnapshot:i,enableLiveStatus:l=!0}){const[o,u]=x.useState(n??null),[d,m]=x.useState(!n),[g,p]=x.useState(n?!0:null),[b,v]=x.useState(()=>fT(e)),[w,N]=x.useState(!1),[z,j]=x.useState(null),[k,A]=x.useState(null),[E,O]=x.useState(!1),[D,M]=x.useState(i??cT),H=x.useCallback(async()=>{const U=await FT();U?(u(U),p(!0)):p(!1),m(!1)},[]);x.useEffect(()=>{n||H()},[n,H]);const V=o?.runs.some(U=>U.status==="running"||U.status==="queued")??!1;if(x.useEffect(()=>{if(!V)return;const U=setInterval(()=>{H()},3e3);return()=>clearInterval(U)},[V,H]),x.useEffect(()=>{if(typeof window>"u")return;const U=()=>{v(ai(window.location.pathname))};return window.addEventListener("popstate",U),()=>{window.removeEventListener("popstate",U)}},[]),x.useEffect(()=>{N(!1),j(null)},[b]),x.useEffect(()=>{if(d||!o)return;const U=o.projects.length>0;if(b==="/setup"&&U)typeof window<"u"&&ai(window.location.pathname)!=="/"&&window.history.replaceState({},"","/"),v("/");else if(b==="/"&&!U){const se="/setup";typeof window<"u"&&ai(window.location.pathname)!==se&&window.history.replaceState({},"",se),v(se)}},[d,o,b]),x.useEffect(()=>{if(typeof window>"u"||z===null)return;const U=se=>{se.key==="Escape"&&j(null)};return window.addEventListener("keydown",U),()=>{window.removeEventListener("keydown",U)}},[z]),x.useEffect(()=>{if(!l||typeof window>"u")return;let U=!0;const se=async()=>{const re=await uT("/health","API"),Ie=re.state==="ok"?{label:"Runner",state:"ok",detail:"In-process job runner"}:{label:"Runner",state:re.state,detail:"Depends on API"};U&&M({apiStatus:re,workerStatus:Ie})};se();const Ze=window.setInterval(()=>{se()},15e3);return()=>{U=!1,window.clearInterval(Ze)}},[l]),!d&&!o&&g===!1)return c.jsx("div",{className:"app-shell",children:c.jsx("div",{className:"main-area",style:{gridColumn:"1 / -1"},children:c.jsx("main",{id:"content",className:"page-shell",children:c.jsxs("div",{className:"page-container",children:[c.jsx("div",{className:"page-header",children:c.jsxs("div",{className:"page-header-left",children:[c.jsx("h1",{className:"page-title",children:"Cannot connect to API"}),c.jsxs("p",{className:"page-subtitle",children:["The dashboard could not reach the Canonry API. Make sure ",c.jsx("code",{children:"canonry serve"})," is running and try refreshing the page."]})]})}),c.jsx(ue,{type:"button",onClick:()=>{m(!0),H()},children:"Retry connection"})]})})})});const L=o??oT.dashboard,Q=dT(b,L),Se=Q.kind==="project"?Zb(L,Q.projectId):void 0,ae=U=>{const se=ai(U);if(typeof window>"u"){v(se);return}ai(window.location.pathname)!==se&&window.history.pushState({},"",se),v(se)},fe=U=>{if(!U)return;j({kind:"run",runId:U}),A(null),O(!0);const se=U;tr(U).then(Ze=>{j(re=>(re?.kind==="run"&&re.runId===se&&A(Ze),re))}).catch(()=>{j(Ze=>(Ze?.kind==="run"&&Ze.runId===se&&A(null),Ze))}).finally(()=>O(!1))},Ae=()=>{_A().catch(U=>{console.error("Failed to trigger all runs",U)}).finally(()=>{H()})};x.useEffect(()=>{if(z?.kind!=="run"||!k||k.status!=="running"&&k.status!=="queued")return;const U=setInterval(()=>{tr(z.runId).then(se=>{A(se),se.status!=="running"&&se.status!=="queued"&&H()}).catch(()=>{})},3e3);return()=>clearInterval(U)},[z,k?.status,k?.snapshots.length,H]);const qe=U=>{j({kind:"evidence",evidenceId:U})},Le=async U=>{await Vb(U),H()},q=async U=>{try{await pA(U),ae("/"),H()}catch(se){console.error("Failed to delete project:",se)}},K=async(U,se)=>{await cA(U,se),await H()},ie=async(U,se)=>{await oA(U,se),await H()},he=async(U,se)=>{const re=(await Gb(U)).map(Ut=>Ut.domain),Ie=[...new Set([...re,...se])];await Yb(U,Ie),await H()},te=async(U,se)=>{await uA(U,se),await H()},C=async(U,se)=>{await dA(U,se),await H()},G=pT(L.portfolioOverview.systemHealth,D,L.settings),ne=yT(L.setup,D,L.settings),F=z?.kind==="run"?eA(L,z.runId):void 0,de=z?.kind==="evidence"?tA(L,z.evidenceId):void 0,me=[{label:"Overview",href:"/",icon:z1,active:Bo(Q,"overview")},{label:"Projects",href:"/projects",icon:N1,active:Bo(Q,"projects")},{label:"Runs",href:"/runs",icon:A1,active:Bo(Q,"runs")},{label:"Settings",href:"/settings",icon:L1,active:Bo(Q,"settings")}],we=Q.kind==="overview"?"Portfolio":Q.kind==="projects"?"Projects":Q.kind==="project"&&Se?Se.project.name:Q.kind==="runs"?"Runs":Q.kind==="settings"?"Settings":Q.kind==="setup"?"Setup":"Not found";return c.jsxs("div",{className:"app-shell",children:[c.jsx("a",{className:"skip-link",href:"#content",children:"Skip to content"}),c.jsxs("aside",{className:"sidebar","aria-label":"Primary navigation",children:[c.jsx("div",{className:"sidebar-brand",children:c.jsx(g0,{navigate:ae})}),c.jsxs("nav",{className:"sidebar-nav",children:[me.map(U=>c.jsxs("a",{className:`sidebar-link ${U.active?"sidebar-link-active":""}`,href:U.href,"aria-current":U.active?"page":void 0,onClick:jn(ae,U.href),children:[c.jsx(U.icon,{className:"sidebar-icon"}),c.jsx("span",{children:U.label})]},U.label)),L.projects.length>0?c.jsxs(c.Fragment,{children:[c.jsx("p",{className:"sidebar-section-title",children:"Projects"}),L.projects.map(U=>{const se=Q.kind==="project"&&Se?.project.id===U.project.id,Ze=U.visibilitySummary.tone;return c.jsxs("a",{className:`sidebar-project ${se?"sidebar-project-active":""}`,href:`/projects/${U.project.id}`,onClick:jn(ae,`/projects/${U.project.id}`),children:[c.jsx("span",{className:`sidebar-dot sidebar-dot-${Ze}`}),c.jsx("span",{children:U.project.name})]},U.project.id)})]}):null,L.projects.length===0?c.jsxs(c.Fragment,{children:[c.jsx("p",{className:"sidebar-section-title",children:"Resources"}),c.jsxs("a",{className:"sidebar-link",href:"/setup","aria-current":Q.kind==="setup"?"page":void 0,onClick:jn(ae,"/setup"),children:[c.jsx(D1,{className:"sidebar-icon"}),c.jsx("span",{children:"Setup"})]})]}):null]}),c.jsx("div",{className:"sidebar-footer",children:m0.map(U=>c.jsx("a",{className:"sidebar-footer-link",href:U.href,target:"_blank",rel:"noreferrer",children:U.label},U.href))})]}),c.jsxs("div",{className:"main-area",children:[c.jsxs("header",{className:"topbar",children:[c.jsxs("div",{className:"topbar-left",children:[c.jsx("div",{className:"topbar-brand-mobile",children:c.jsx(g0,{compact:!0,navigate:ae})}),c.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[c.jsx("a",{href:"/",onClick:jn(ae,"/"),children:"Home"}),c.jsx(Pf,{className:"breadcrumb-sep size-3"}),c.jsx("span",{className:"breadcrumb-current",children:we})]})]}),c.jsxs("div",{className:"topbar-actions",children:[c.jsxs("div",{className:"health-pill-row",children:[c.jsxs("span",{className:`health-pill health-pill-${D.apiStatus.state}`,children:["API ",D.apiStatus.state==="ok"?"ok":D.apiStatus.state]}),c.jsxs("span",{className:`health-pill health-pill-${D.workerStatus.state}`,children:["Worker ",D.workerStatus.state==="ok"?"ok":D.workerStatus.state]})]}),c.jsxs(ue,{className:"nav-toggle",variant:"secondary",size:"icon",type:"button","aria-expanded":w,"aria-controls":"mobile-nav",onClick:()=>N(U=>!U),children:[c.jsx(C1,{className:"size-4"}),c.jsx("span",{className:"sr-only",children:"Open navigation"})]})]})]}),c.jsxs("div",{id:"mobile-nav",className:`mobile-nav ${w?"mobile-nav-open":""}`,children:[c.jsxs(ue,{className:"mobile-nav-close",variant:"ghost",size:"icon",type:"button",onClick:()=>N(!1),children:[c.jsx(Qf,{className:"size-5"}),c.jsx("span",{className:"sr-only",children:"Close navigation"})]}),me.map(U=>c.jsx("a",{className:`mobile-nav-link ${U.active?"mobile-nav-link-active":""}`,href:U.href,"aria-current":U.active?"page":void 0,onClick:jn(ae,U.href),children:U.label},U.label)),L.projects.length>0?c.jsxs("div",{className:"mobile-nav-section",children:[c.jsx("p",{className:"mobile-nav-section-title",children:"Projects"}),L.projects.map(U=>c.jsx("a",{className:"mobile-nav-link",href:`/projects/${U.project.id}`,onClick:jn(ae,`/projects/${U.project.id}`),children:U.project.name},U.project.id))]}):null]}),c.jsx("main",{id:"content",className:"page-shell",children:d?c.jsx("div",{className:"page-container",children:c.jsx("div",{className:"page-header",children:c.jsxs("div",{className:"page-header-left",children:[c.jsx("h1",{className:"page-title",children:"Loading"}),c.jsx("p",{className:"page-subtitle",children:"Connecting to API and loading dashboard data..."})]})})}):c.jsxs(c.Fragment,{children:[Q.kind==="overview"?c.jsx(_T,{model:L.portfolioOverview,systemHealth:G,onNavigate:ae,onOpenRun:fe}):null,Q.kind==="projects"?c.jsx(CT,{projects:L.projects,onNavigate:ae,onProjectCreated:H}):null,Q.kind==="project"&&Se?c.jsx(AT,{model:Se,tab:Q.tab,onOpenEvidence:qe,onOpenRun:fe,onTriggerRun:Le,onDeleteProject:q,onAddKeywords:K,onDeleteKeywords:ie,onAddCompetitors:he,onUpdateOwnedDomains:te,onUpdateProject:C,onNavigate:ae}):null,Q.kind==="runs"?c.jsx(IT,{runs:L.runs,onOpenRun:fe,onTriggerAll:Ae}):null,Q.kind==="settings"?c.jsx(KT,{settings:L.settings,healthSnapshot:D,onSettingsChanged:H}):null,Q.kind==="setup"?c.jsx(PT,{model:ne,settings:L.settings,onProjectCreated:H,onNavigate:ae}):null,Q.kind==="not-found"?c.jsx(QT,{onNavigate:ae}):null]})}),c.jsxs("footer",{className:"footer",children:[c.jsx("p",{className:"supporting-copy",children:"Technical readiness and answer visibility stay separate."}),c.jsx("div",{className:"footer-links",children:m0.map(U=>c.jsx("a",{href:U.href,target:"_blank",rel:"noreferrer",children:U.label},U.href))})]})]}),F?c.jsxs(XT,{open:F!==void 0,title:F.summary,subtitle:`${F.projectName} · ${F.kindLabel}`,onClose:()=>j(null),children:[c.jsxs("div",{className:"flex flex-wrap items-center gap-x-5 gap-y-1 text-sm",children:[c.jsx(kc,{status:F.status}),c.jsx("span",{className:"text-zinc-400",children:F.startedAt}),c.jsx("span",{className:"text-zinc-500",children:F.duration}),c.jsx("span",{className:"text-zinc-600",children:F.triggerLabel})]}),F.status==="failed"&&F.statusDetail&&c.jsx("p",{className:"text-sm text-rose-300/80 mt-2",children:F.statusDetail}),c.jsxs("div",{className:"mt-4",children:[c.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-zinc-500 mb-2",children:"Activity Log"}),E?c.jsx("p",{className:"text-sm text-zinc-500",children:"Loading run details..."}):k&&k.snapshots.length>0?c.jsxs("div",{className:"space-y-2",children:[k.snapshots.map(U=>c.jsxs("div",{className:"rounded-lg border border-zinc-800/60 bg-zinc-900/30 p-3",children:[c.jsxs("div",{className:"flex items-center justify-between gap-2 mb-1",children:[c.jsx("p",{className:"text-sm font-medium text-zinc-200 truncate",children:U.keyword??"Unknown key phrase"}),c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx(uh,{provider:U.provider}),c.jsx(Mb,{variant:U.citationState==="cited"?"success":"neutral",children:U.citationState})]})]}),U.model&&c.jsx("p",{className:"text-[11px] text-zinc-500 font-mono",children:U.model}),U.citedDomains.length>0&&c.jsxs("p",{className:"text-xs text-zinc-500 mt-1",children:[c.jsx("span",{className:"text-zinc-400",children:"Sources:"})," ",U.citedDomains.join(", ")]}),U.competitorOverlap.length>0&&c.jsxs("p",{className:"text-xs text-rose-400/80 mt-0.5",children:["Competitor cited: ",U.competitorOverlap.join(", ")]}),U.groundingSources&&U.groundingSources.length>0&&c.jsxs("details",{className:"mt-2",children:[c.jsxs("summary",{className:"text-xs text-zinc-500 cursor-pointer hover:text-zinc-400",children:[U.groundingSources.length," grounding source",U.groundingSources.length!==1?"s":""]}),c.jsx("ul",{className:"mt-1 space-y-0.5",children:U.groundingSources.map((se,Ze)=>c.jsx("li",{className:"text-xs text-zinc-500 truncate",children:c.jsx("a",{href:se.uri,target:"_blank",rel:"noreferrer",className:"hover:text-zinc-300",children:se.title||se.uri})},Ze))})]}),U.answerText&&c.jsxs("details",{className:"mt-1",children:[c.jsx("summary",{className:"text-xs text-zinc-500 cursor-pointer hover:text-zinc-400",children:"Answer preview"}),c.jsx("p",{className:"mt-1 text-xs text-zinc-400 leading-relaxed whitespace-pre-wrap",children:U.answerText})]})]},U.id)),k.status==="running"&&c.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-zinc-500",children:[c.jsx("span",{className:"inline-block h-2 w-2 rounded-full bg-amber-500 animate-pulse"}),"Querying remaining key phrases..."]})]}):k&&k.status==="running"?c.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-zinc-500",children:[c.jsx("span",{className:"inline-block h-2 w-2 rounded-full bg-amber-500 animate-pulse"}),"Waiting for first key phrase result..."]}):k&&k.status==="queued"?c.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-zinc-500",children:[c.jsx("span",{className:"inline-block h-2 w-2 rounded-full bg-zinc-500 animate-pulse"}),"Run queued, waiting for execution slot..."]}):k&&k.error?c.jsxs("div",{className:"rounded-lg border border-rose-800/40 bg-rose-950/20 p-3",children:[c.jsx("p",{className:"text-sm font-medium text-rose-300 mb-2",children:"Run failed"}),c.jsx("pre",{className:"text-xs text-rose-300/80 whitespace-pre-wrap break-words max-h-48 overflow-y-auto font-mono leading-5",children:mT(k.error)})]}):c.jsx("p",{className:"text-sm text-zinc-500",children:"No snapshot data available."})]})]}):null,de?c.jsx(JT,{evidence:de.evidence,project:de.project,onClose:()=>j(null)}):null]})}const ax=document.getElementById("root");if(!ax)throw new Error("Expected #root element for web app bootstrap.");kw.createRoot(ax).render(c.jsx(x.StrictMode,{children:c.jsx(WT,{})}));