@ainyc/canonry 4.53.0 → 4.54.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.
@@ -1,19 +1,19 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ProjectPage-CM_uQa2L.js","./vendor-tanstack-Dq7p98wZ.js","./RunRow-aqJEr7XJ.js","./ChartPrimitives-9Kx3gzQL.js","./server-traffic-D_1gSi-b.js","./vendor-recharts-DWvKDyBF.js","./trash-2-8JiADnUJ.js","./vendor-radix-B57xfQbP.js","./vendor-markdown-DK7fbRNb.js","./RunsPage-Dhuj1w72.js","./SettingsPage-B2_vxr4y.js","./BacklinksPage-DELb5ok3.js","./TrafficPage-BKaiZRIH.js","./arrow-left-CYjzP3M3.js","./TrafficSourceDetailPage-DXIQ4g9S.js"])))=>i.map(i=>d[i]);
2
- import{c as nw,d as aw,Q as iw,M as sw,r as $,q as Ue,j as f,L as rt,a as rw,e as ks,u as cn,f as ow,h as dc,k as lw,l as cw,m as Yb,O as Xb,n as Ka,o as Ai,p as uw,s as Bt,t as Jb,v as Gs,x as dw,y as fw,z as pw}from"./vendor-tanstack-Dq7p98wZ.js";import{S as mw,O as Df,P as Fb,C as Rf,a as Wb,T as Mf,D as ev,R as tv}from"./vendor-radix-B57xfQbP.js";import{c as nv}from"./vendor-recharts-DWvKDyBF.js";import{M as hw}from"./vendor-markdown-DK7fbRNb.js";(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const c of l)if(c.type==="childList")for(const d of c.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&r(d)}).observe(document,{childList:!0,subtree:!0});function i(l){const c={};return l.integrity&&(c.integrity=l.integrity),l.referrerPolicy&&(c.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?c.credentials="include":l.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function r(l){if(l.ep)return;l.ep=!0;const c=i(l);fetch(l.href,c)}})();var Qd={exports:{}},Kr={},Yd={exports:{}},Xd={};var Ay;function gw(){return Ay||(Ay=1,(function(e){function n(U,F){var de=U.length;U.push(F);e:for(;0<de;){var je=de-1>>>1,ie=U[je];if(0<l(ie,F))U[je]=F,U[de]=ie,de=je;else break e}}function i(U){return U.length===0?null:U[0]}function r(U){if(U.length===0)return null;var F=U[0],de=U.pop();if(de!==F){U[0]=de;e:for(var je=0,ie=U.length,Qe=ie>>>1;je<Qe;){var Q=2*(je+1)-1,le=U[Q],te=Q+1,ue=U[te];if(0>l(le,de))te<ie&&0>l(ue,le)?(U[je]=ue,U[te]=de,je=te):(U[je]=le,U[Q]=de,je=Q);else if(te<ie&&0>l(ue,de))U[je]=ue,U[te]=de,je=te;else break e}}return F}function l(U,F){var de=U.sortIndex-F.sortIndex;return de!==0?de:U.id-F.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;e.unstable_now=function(){return c.now()}}else{var d=Date,m=d.now();e.unstable_now=function(){return d.now()-m}}var g=[],b=[],v=1,S=null,w=3,_=!1,C=!1,N=!1,T=!1,R=typeof setTimeout=="function"?setTimeout:null,G=typeof clearTimeout=="function"?clearTimeout:null,H=typeof setImmediate<"u"?setImmediate:null;function K(U){for(var F=i(b);F!==null;){if(F.callback===null)r(b);else if(F.startTime<=U)r(b),F.sortIndex=F.expirationTime,n(g,F);else break;F=i(b)}}function X(U){if(N=!1,K(U),!C)if(i(g)!==null)C=!0,J||(J=!0,ve());else{var F=i(b);F!==null&&pe(X,F.startTime-U)}}var J=!1,D=-1,M=5,oe=-1;function Ne(){return T?!0:!(e.unstable_now()-oe<M)}function Ae(){if(T=!1,J){var U=e.unstable_now();oe=U;var F=!0;try{e:{C=!1,N&&(N=!1,G(D),D=-1),_=!0;var de=w;try{t:{for(K(U),S=i(g);S!==null&&!(S.expirationTime>U&&Ne());){var je=S.callback;if(typeof je=="function"){S.callback=null,w=S.priorityLevel;var ie=je(S.expirationTime<=U);if(U=e.unstable_now(),typeof ie=="function"){S.callback=ie,K(U),F=!0;break t}S===i(g)&&r(g),K(U)}else r(g);S=i(g)}if(S!==null)F=!0;else{var Qe=i(b);Qe!==null&&pe(X,Qe.startTime-U),F=!1}}break e}finally{S=null,w=de,_=!1}F=void 0}}finally{F?ve():J=!1}}}var ve;if(typeof H=="function")ve=function(){H(Ae)};else if(typeof MessageChannel<"u"){var et=new MessageChannel,re=et.port2;et.port1.onmessage=Ae,ve=function(){re.postMessage(null)}}else ve=function(){R(Ae,0)};function pe(U,F){D=R(function(){U(e.unstable_now())},F)}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(U){U.callback=null},e.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<U?Math.floor(1e3/U):5},e.unstable_getCurrentPriorityLevel=function(){return w},e.unstable_next=function(U){switch(w){case 1:case 2:case 3:var F=3;break;default:F=w}var de=w;w=F;try{return U()}finally{w=de}},e.unstable_requestPaint=function(){T=!0},e.unstable_runWithPriority=function(U,F){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var de=w;w=U;try{return F()}finally{w=de}},e.unstable_scheduleCallback=function(U,F,de){var je=e.unstable_now();switch(typeof de=="object"&&de!==null?(de=de.delay,de=typeof de=="number"&&0<de?je+de:je):de=je,U){case 1:var ie=-1;break;case 2:ie=250;break;case 5:ie=1073741823;break;case 4:ie=1e4;break;default:ie=5e3}return ie=de+ie,U={id:v++,callback:F,priorityLevel:U,startTime:de,expirationTime:ie,sortIndex:-1},de>je?(U.sortIndex=de,n(b,U),i(g)===null&&U===i(b)&&(N?(G(D),D=-1):N=!0,pe(X,de-je))):(U.sortIndex=ie,n(g,U),C||_||(C=!0,J||(J=!0,ve()))),U},e.unstable_shouldYield=Ne,e.unstable_wrapCallback=function(U){var F=w;return function(){var de=w;w=F;try{return U.apply(this,arguments)}finally{w=de}}}})(Xd)),Xd}var _y;function yw(){return _y||(_y=1,Yd.exports=gw()),Yd.exports}var zy;function bw(){if(zy)return Kr;zy=1;var e=yw(),n=nw(),i=aw();function r(t){var a="https://react.dev/errors/"+t;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)a+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+t+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function c(t){var a=t,s=t;if(t.alternate)for(;a.return;)a=a.return;else{t=a;do a=t,(a.flags&4098)!==0&&(s=a.return),t=a.return;while(t)}return a.tag===3?s:null}function d(t){if(t.tag===13){var a=t.memoizedState;if(a===null&&(t=t.alternate,t!==null&&(a=t.memoizedState)),a!==null)return a.dehydrated}return null}function m(t){if(t.tag===31){var a=t.memoizedState;if(a===null&&(t=t.alternate,t!==null&&(a=t.memoizedState)),a!==null)return a.dehydrated}return null}function g(t){if(c(t)!==t)throw Error(r(188))}function b(t){var a=t.alternate;if(!a){if(a=c(t),a===null)throw Error(r(188));return a!==t?null:t}for(var s=t,o=a;;){var u=s.return;if(u===null)break;var p=u.alternate;if(p===null){if(o=u.return,o!==null){s=o;continue}break}if(u.child===p.child){for(p=u.child;p;){if(p===s)return g(u),t;if(p===o)return g(u),a;p=p.sibling}throw Error(r(188))}if(s.return!==o.return)s=u,o=p;else{for(var y=!1,x=u.child;x;){if(x===s){y=!0,s=u,o=p;break}if(x===o){y=!0,o=u,s=p;break}x=x.sibling}if(!y){for(x=p.child;x;){if(x===s){y=!0,s=p,o=u;break}if(x===o){y=!0,o=p,s=u;break}x=x.sibling}if(!y)throw Error(r(189))}}if(s.alternate!==o)throw Error(r(190))}if(s.tag!==3)throw Error(r(188));return s.stateNode.current===s?t:a}function v(t){var a=t.tag;if(a===5||a===26||a===27||a===6)return t;for(t=t.child;t!==null;){if(a=v(t),a!==null)return a;t=t.sibling}return null}var S=Object.assign,w=Symbol.for("react.element"),_=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),G=Symbol.for("react.consumer"),H=Symbol.for("react.context"),K=Symbol.for("react.forward_ref"),X=Symbol.for("react.suspense"),J=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),oe=Symbol.for("react.activity"),Ne=Symbol.for("react.memo_cache_sentinel"),Ae=Symbol.iterator;function ve(t){return t===null||typeof t!="object"?null:(t=Ae&&t[Ae]||t["@@iterator"],typeof t=="function"?t:null)}var et=Symbol.for("react.client.reference");function re(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===et?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case N:return"Fragment";case R:return"Profiler";case T:return"StrictMode";case X:return"Suspense";case J:return"SuspenseList";case oe:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case C:return"Portal";case H:return t.displayName||"Context";case G:return(t._context.displayName||"Context")+".Consumer";case K:var a=t.render;return t=t.displayName,t||(t=a.displayName||a.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case D:return a=t.displayName||null,a!==null?a:re(t.type)||"Memo";case M:a=t._payload,t=t._init;try{return re(t(a))}catch{}}return null}var pe=Array.isArray,U=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,de={pending:!1,data:null,method:null,action:null},je=[],ie=-1;function Qe(t){return{current:t}}function Q(t){0>ie||(t.current=je[ie],je[ie]=null,ie--)}function le(t,a){ie++,je[ie]=t.current,t.current=a}var te=Qe(null),ue=Qe(null),ne=Qe(null),_e=Qe(null);function tt(t,a){switch(le(ne,a),le(ue,t),le(te,null),a.nodeType){case 9:case 11:t=(t=a.documentElement)&&(t=t.namespaceURI)?Yg(t):0;break;default:if(t=a.tagName,a=a.namespaceURI)a=Yg(a),t=Xg(a,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}Q(te),le(te,t)}function xe(){Q(te),Q(ue),Q(ne)}function $e(t){t.memoizedState!==null&&le(_e,t);var a=te.current,s=Xg(a,t.type);a!==s&&(le(ue,t),le(te,s))}function Ze(t){ue.current===t&&(Q(te),Q(ue)),_e.current===t&&(Q(_e),Ir._currentValue=de)}var Ct,zn;function Tt(t){if(Ct===void 0)try{throw Error()}catch(s){var a=s.stack.trim().match(/\n( *(at )?)/);Ct=a&&a[1]||"",zn=-1<s.stack.indexOf(`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ProjectPage-DAtd9Vay.js","./vendor-tanstack-Dq7p98wZ.js","./RunRow-38dDceGl.js","./ChartPrimitives-9Kx3gzQL.js","./server-traffic-GqiQYm6x.js","./vendor-recharts-DWvKDyBF.js","./trash-2-BwPzJ8NI.js","./vendor-radix-B57xfQbP.js","./vendor-markdown-DK7fbRNb.js","./RunsPage-AJnFLtaE.js","./SettingsPage-FT9ZAvFH.js","./BacklinksPage-BXFT4pLI.js","./TrafficPage-B4A3oO8M.js","./arrow-left-DgI0X1Q1.js","./TrafficSourceDetailPage-8NYU1TA6.js"])))=>i.map(i=>d[i]);
2
+ import{c as nw,d as aw,Q as iw,M as sw,r as U,q as $e,j as f,L as rt,a as rw,e as ks,u as cn,f as ow,h as dc,k as lw,l as cw,m as Yb,O as Xb,n as Ka,o as Ai,p as uw,s as Bt,t as Jb,v as Gs,x as dw,y as fw,z as pw}from"./vendor-tanstack-Dq7p98wZ.js";import{S as mw,O as Df,P as Fb,C as Rf,a as Wb,T as Mf,D as ev,R as tv}from"./vendor-radix-B57xfQbP.js";import{c as nv}from"./vendor-recharts-DWvKDyBF.js";import{M as hw}from"./vendor-markdown-DK7fbRNb.js";(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const c of l)if(c.type==="childList")for(const d of c.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&r(d)}).observe(document,{childList:!0,subtree:!0});function i(l){const c={};return l.integrity&&(c.integrity=l.integrity),l.referrerPolicy&&(c.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?c.credentials="include":l.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function r(l){if(l.ep)return;l.ep=!0;const c=i(l);fetch(l.href,c)}})();var Qd={exports:{}},Kr={},Yd={exports:{}},Xd={};var Ay;function gw(){return Ay||(Ay=1,(function(e){function n($,F){var de=$.length;$.push(F);e:for(;0<de;){var je=de-1>>>1,ie=$[je];if(0<l(ie,F))$[je]=F,$[de]=ie,de=je;else break e}}function i($){return $.length===0?null:$[0]}function r($){if($.length===0)return null;var F=$[0],de=$.pop();if(de!==F){$[0]=de;e:for(var je=0,ie=$.length,Qe=ie>>>1;je<Qe;){var Q=2*(je+1)-1,le=$[Q],te=Q+1,ue=$[te];if(0>l(le,de))te<ie&&0>l(ue,le)?($[je]=ue,$[te]=de,je=te):($[je]=le,$[Q]=de,je=Q);else if(te<ie&&0>l(ue,de))$[je]=ue,$[te]=de,je=te;else break e}}return F}function l($,F){var de=$.sortIndex-F.sortIndex;return de!==0?de:$.id-F.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;e.unstable_now=function(){return c.now()}}else{var d=Date,m=d.now();e.unstable_now=function(){return d.now()-m}}var g=[],b=[],v=1,S=null,w=3,_=!1,C=!1,N=!1,T=!1,R=typeof setTimeout=="function"?setTimeout:null,G=typeof clearTimeout=="function"?clearTimeout:null,H=typeof setImmediate<"u"?setImmediate:null;function K($){for(var F=i(b);F!==null;){if(F.callback===null)r(b);else if(F.startTime<=$)r(b),F.sortIndex=F.expirationTime,n(g,F);else break;F=i(b)}}function X($){if(N=!1,K($),!C)if(i(g)!==null)C=!0,J||(J=!0,ve());else{var F=i(b);F!==null&&pe(X,F.startTime-$)}}var J=!1,D=-1,M=5,oe=-1;function Ne(){return T?!0:!(e.unstable_now()-oe<M)}function Ae(){if(T=!1,J){var $=e.unstable_now();oe=$;var F=!0;try{e:{C=!1,N&&(N=!1,G(D),D=-1),_=!0;var de=w;try{t:{for(K($),S=i(g);S!==null&&!(S.expirationTime>$&&Ne());){var je=S.callback;if(typeof je=="function"){S.callback=null,w=S.priorityLevel;var ie=je(S.expirationTime<=$);if($=e.unstable_now(),typeof ie=="function"){S.callback=ie,K($),F=!0;break t}S===i(g)&&r(g),K($)}else r(g);S=i(g)}if(S!==null)F=!0;else{var Qe=i(b);Qe!==null&&pe(X,Qe.startTime-$),F=!1}}break e}finally{S=null,w=de,_=!1}F=void 0}}finally{F?ve():J=!1}}}var ve;if(typeof H=="function")ve=function(){H(Ae)};else if(typeof MessageChannel<"u"){var et=new MessageChannel,re=et.port2;et.port1.onmessage=Ae,ve=function(){re.postMessage(null)}}else ve=function(){R(Ae,0)};function pe($,F){D=R(function(){$(e.unstable_now())},F)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function($){$.callback=null},e.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<$?Math.floor(1e3/$):5},e.unstable_getCurrentPriorityLevel=function(){return w},e.unstable_next=function($){switch(w){case 1:case 2:case 3:var F=3;break;default:F=w}var de=w;w=F;try{return $()}finally{w=de}},e.unstable_requestPaint=function(){T=!0},e.unstable_runWithPriority=function($,F){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var de=w;w=$;try{return F()}finally{w=de}},e.unstable_scheduleCallback=function($,F,de){var je=e.unstable_now();switch(typeof de=="object"&&de!==null?(de=de.delay,de=typeof de=="number"&&0<de?je+de:je):de=je,$){case 1:var ie=-1;break;case 2:ie=250;break;case 5:ie=1073741823;break;case 4:ie=1e4;break;default:ie=5e3}return ie=de+ie,$={id:v++,callback:F,priorityLevel:$,startTime:de,expirationTime:ie,sortIndex:-1},de>je?($.sortIndex=de,n(b,$),i(g)===null&&$===i(b)&&(N?(G(D),D=-1):N=!0,pe(X,de-je))):($.sortIndex=ie,n(g,$),C||_||(C=!0,J||(J=!0,ve()))),$},e.unstable_shouldYield=Ne,e.unstable_wrapCallback=function($){var F=w;return function(){var de=w;w=F;try{return $.apply(this,arguments)}finally{w=de}}}})(Xd)),Xd}var _y;function yw(){return _y||(_y=1,Yd.exports=gw()),Yd.exports}var zy;function bw(){if(zy)return Kr;zy=1;var e=yw(),n=nw(),i=aw();function r(t){var a="https://react.dev/errors/"+t;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)a+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+t+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function c(t){var a=t,s=t;if(t.alternate)for(;a.return;)a=a.return;else{t=a;do a=t,(a.flags&4098)!==0&&(s=a.return),t=a.return;while(t)}return a.tag===3?s:null}function d(t){if(t.tag===13){var a=t.memoizedState;if(a===null&&(t=t.alternate,t!==null&&(a=t.memoizedState)),a!==null)return a.dehydrated}return null}function m(t){if(t.tag===31){var a=t.memoizedState;if(a===null&&(t=t.alternate,t!==null&&(a=t.memoizedState)),a!==null)return a.dehydrated}return null}function g(t){if(c(t)!==t)throw Error(r(188))}function b(t){var a=t.alternate;if(!a){if(a=c(t),a===null)throw Error(r(188));return a!==t?null:t}for(var s=t,o=a;;){var u=s.return;if(u===null)break;var p=u.alternate;if(p===null){if(o=u.return,o!==null){s=o;continue}break}if(u.child===p.child){for(p=u.child;p;){if(p===s)return g(u),t;if(p===o)return g(u),a;p=p.sibling}throw Error(r(188))}if(s.return!==o.return)s=u,o=p;else{for(var y=!1,x=u.child;x;){if(x===s){y=!0,s=u,o=p;break}if(x===o){y=!0,o=u,s=p;break}x=x.sibling}if(!y){for(x=p.child;x;){if(x===s){y=!0,s=p,o=u;break}if(x===o){y=!0,o=p,s=u;break}x=x.sibling}if(!y)throw Error(r(189))}}if(s.alternate!==o)throw Error(r(190))}if(s.tag!==3)throw Error(r(188));return s.stateNode.current===s?t:a}function v(t){var a=t.tag;if(a===5||a===26||a===27||a===6)return t;for(t=t.child;t!==null;){if(a=v(t),a!==null)return a;t=t.sibling}return null}var S=Object.assign,w=Symbol.for("react.element"),_=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),G=Symbol.for("react.consumer"),H=Symbol.for("react.context"),K=Symbol.for("react.forward_ref"),X=Symbol.for("react.suspense"),J=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),oe=Symbol.for("react.activity"),Ne=Symbol.for("react.memo_cache_sentinel"),Ae=Symbol.iterator;function ve(t){return t===null||typeof t!="object"?null:(t=Ae&&t[Ae]||t["@@iterator"],typeof t=="function"?t:null)}var et=Symbol.for("react.client.reference");function re(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===et?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case N:return"Fragment";case R:return"Profiler";case T:return"StrictMode";case X:return"Suspense";case J:return"SuspenseList";case oe:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case C:return"Portal";case H:return t.displayName||"Context";case G:return(t._context.displayName||"Context")+".Consumer";case K:var a=t.render;return t=t.displayName,t||(t=a.displayName||a.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case D:return a=t.displayName||null,a!==null?a:re(t.type)||"Memo";case M:a=t._payload,t=t._init;try{return re(t(a))}catch{}}return null}var pe=Array.isArray,$=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,de={pending:!1,data:null,method:null,action:null},je=[],ie=-1;function Qe(t){return{current:t}}function Q(t){0>ie||(t.current=je[ie],je[ie]=null,ie--)}function le(t,a){ie++,je[ie]=t.current,t.current=a}var te=Qe(null),ue=Qe(null),ne=Qe(null),_e=Qe(null);function tt(t,a){switch(le(ne,a),le(ue,t),le(te,null),a.nodeType){case 9:case 11:t=(t=a.documentElement)&&(t=t.namespaceURI)?Yg(t):0;break;default:if(t=a.tagName,a=a.namespaceURI)a=Yg(a),t=Xg(a,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}Q(te),le(te,t)}function xe(){Q(te),Q(ue),Q(ne)}function Ue(t){t.memoizedState!==null&&le(_e,t);var a=te.current,s=Xg(a,t.type);a!==s&&(le(ue,t),le(te,s))}function Ze(t){ue.current===t&&(Q(te),Q(ue)),_e.current===t&&(Q(_e),Ir._currentValue=de)}var Ct,zn;function Tt(t){if(Ct===void 0)try{throw Error()}catch(s){var a=s.stack.trim().match(/\n( *(at )?)/);Ct=a&&a[1]||"",zn=-1<s.stack.indexOf(`
3
3
  at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
4
4
  `+Ct+t+zn}var Fs=!1;function Ei(t,a){if(!t||Fs)return"";Fs=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(a){var Y=function(){throw Error()};if(Object.defineProperty(Y.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Y,[])}catch(V){var q=V}Reflect.construct(t,[],Y)}else{try{Y.call()}catch(V){q=V}t.call(Y.prototype)}}else{try{throw Error()}catch(V){q=V}(Y=t())&&typeof Y.catch=="function"&&Y.catch(function(){})}}catch(V){if(V&&q&&typeof V.stack=="string")return[V.stack,q.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var u=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");u&&u.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var p=o.DetermineComponentFrameRoot(),y=p[0],x=p[1];if(y&&x){var A=y.split(`
5
5
  `),L=x.split(`
6
6
  `);for(u=o=0;o<A.length&&!A[o].includes("DetermineComponentFrameRoot");)o++;for(;u<L.length&&!L[u].includes("DetermineComponentFrameRoot");)u++;if(o===A.length||u===L.length)for(o=A.length-1,u=L.length-1;1<=o&&0<=u&&A[o]!==L[u];)u--;for(;1<=o&&0<=u;o--,u--)if(A[o]!==L[u]){if(o!==1||u!==1)do if(o--,u--,0>u||A[o]!==L[u]){var I=`
7
7
  `+A[o].replace(" at new "," at ");return t.displayName&&I.includes("<anonymous>")&&(I=I.replace("<anonymous>",t.displayName)),I}while(1<=o&&0<=u);break}}}finally{Fs=!1,Error.prepareStackTrace=s}return(s=t?t.displayName||t.name:"")?Tt(s):""}function Mc(t,a){switch(t.tag){case 26:case 27:case 5:return Tt(t.type);case 16:return Tt("Lazy");case 13:return t.child!==a&&a!==null?Tt("Suspense Fallback"):Tt("Suspense");case 19:return Tt("SuspenseList");case 0:case 15:return Ei(t.type,!1);case 11:return Ei(t.type.render,!1);case 1:return Ei(t.type,!0);case 31:return Tt("Activity");default:return""}}function Ws(t){try{var a="",s=null;do a+=Mc(t,s),s=t,t=t.return;while(t);return a}catch(o){return`
8
8
  Error generating stack: `+o.message+`
9
- `+o.stack}}var Oi=Object.prototype.hasOwnProperty,Di=e.unstable_scheduleCallback,Ri=e.unstable_cancelCallback,go=e.unstable_shouldYield,Bc=e.unstable_requestPaint,Lt=e.unstable_now,yo=e.unstable_getCurrentPriorityLevel,er=e.unstable_ImmediatePriority,bo=e.unstable_UserBlockingPriority,Mi=e.unstable_NormalPriority,Lc=e.unstable_LowPriority,Bi=e.unstable_IdlePriority,vo=e.log,tr=e.unstable_setDisableYieldValue,ga=null,qt=null;function Cn(t){if(typeof vo=="function"&&tr(t),qt&&typeof qt.setStrictMode=="function")try{qt.setStrictMode(ga,t)}catch{}}var mt=Math.clz32?Math.clz32:qc,qn=Math.log,Fa=Math.LN2;function qc(t){return t>>>=0,t===0?32:31-(qn(t)/Fa|0)|0}var Li=256,qi=262144,Ui=4194304;function Pn(t){var a=t&42;if(a!==0)return a;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 $i(t,a,s){var o=t.pendingLanes;if(o===0)return 0;var u=0,p=t.suspendedLanes,y=t.pingedLanes;t=t.warmLanes;var x=o&134217727;return x!==0?(o=x&~p,o!==0?u=Pn(o):(y&=x,y!==0?u=Pn(y):s||(s=x&~t,s!==0&&(u=Pn(s))))):(x=o&~p,x!==0?u=Pn(x):y!==0?u=Pn(y):s||(s=o&~t,s!==0&&(u=Pn(s)))),u===0?0:a!==0&&a!==u&&(a&p)===0&&(p=u&-u,s=a&-a,p>=s||p===32&&(s&4194048)!==0)?a:u}function Wa(t,a){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&a)===0}function Kn(t,a){switch(t){case 1:case 2:case 4:case 8:case 64:return a+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 a+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 So(){var t=Ui;return Ui<<=1,(Ui&62914560)===0&&(Ui=4194304),t}function ee(t){for(var a=[],s=0;31>s;s++)a.push(t);return a}function Fe(t,a){t.pendingLanes|=a,a!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function ei(t,a,s,o,u,p){var y=t.pendingLanes;t.pendingLanes=s,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=s,t.entangledLanes&=s,t.errorRecoveryDisabledLanes&=s,t.shellSuspendCounter=0;var x=t.entanglements,A=t.expirationTimes,L=t.hiddenUpdates;for(s=y&~s;0<s;){var I=31-mt(s),Y=1<<I;x[I]=0,A[I]=-1;var q=L[I];if(q!==null)for(L[I]=null,I=0;I<q.length;I++){var V=q[I];V!==null&&(V.lane&=-536870913)}s&=~Y}o!==0&&xo(t,o,0),p!==0&&u===0&&t.tag!==0&&(t.suspendedLanes|=p&~(y&~a))}function xo(t,a,s){t.pendingLanes|=a,t.suspendedLanes&=~a;var o=31-mt(a);t.entangledLanes|=a,t.entanglements[o]=t.entanglements[o]|1073741824|s&261930}function wo(t,a){var s=t.entangledLanes|=a;for(t=t.entanglements;s;){var o=31-mt(s),u=1<<o;u&a|t[o]&a&&(t[o]|=a),s&=~u}}function nr(t,a){var s=a&-a;return s=(s&42)!==0?1:ar(s),(s&(t.suspendedLanes|a))!==0?0:s}function ar(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 Tn(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Rp(){var t=F.p;return t!==0?t:(t=window.event,t===void 0?32:vy(t.type))}function Mp(t,a){var s=F.p;try{return F.p=t,a()}finally{F.p=s}}var ya=Math.random().toString(36).slice(2),Et="__reactFiber$"+ya,Pt="__reactProps$"+ya,Vi="__reactContainer$"+ya,Uc="__reactEvents$"+ya,Z1="__reactListeners$"+ya,P1="__reactHandles$"+ya,Bp="__reactResources$"+ya,ir="__reactMarker$"+ya;function $c(t){delete t[Et],delete t[Pt],delete t[Uc],delete t[Z1],delete t[P1]}function Gi(t){var a=t[Et];if(a)return a;for(var s=t.parentNode;s;){if(a=s[Vi]||s[Et]){if(s=a.alternate,a.child!==null||s!==null&&s.child!==null)for(t=ay(t);t!==null;){if(s=t[Et])return s;t=ay(t)}return a}t=s,s=t.parentNode}return null}function Ii(t){if(t=t[Et]||t[Vi]){var a=t.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return t}return null}function sr(t){var a=t.tag;if(a===5||a===26||a===27||a===6)return t.stateNode;throw Error(r(33))}function Hi(t){var a=t[Bp];return a||(a=t[Bp]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function _t(t){t[ir]=!0}var Lp=new Set,qp={};function ti(t,a){Zi(t,a),Zi(t+"Capture",a)}function Zi(t,a){for(qp[t]=a,t=0;t<a.length;t++)Lp.add(a[t])}var K1=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]*$"),Up={},$p={};function Q1(t){return Oi.call($p,t)?!0:Oi.call(Up,t)?!1:K1.test(t)?$p[t]=!0:(Up[t]=!0,!1)}function jo(t,a,s){if(Q1(a))if(s===null)t.removeAttribute(a);else{switch(typeof s){case"undefined":case"function":case"symbol":t.removeAttribute(a);return;case"boolean":var o=a.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){t.removeAttribute(a);return}}t.setAttribute(a,""+s)}}function No(t,a,s){if(s===null)t.removeAttribute(a);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(a);return}t.setAttribute(a,""+s)}}function Qn(t,a,s,o){if(o===null)t.removeAttribute(s);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(s);return}t.setAttributeNS(a,s,""+o)}}function dn(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Vp(t){var a=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function Y1(t,a,s){var o=Object.getOwnPropertyDescriptor(t.constructor.prototype,a);if(!t.hasOwnProperty(a)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var u=o.get,p=o.set;return Object.defineProperty(t,a,{configurable:!0,get:function(){return u.call(this)},set:function(y){s=""+y,p.call(this,y)}}),Object.defineProperty(t,a,{enumerable:o.enumerable}),{getValue:function(){return s},setValue:function(y){s=""+y},stopTracking:function(){t._valueTracker=null,delete t[a]}}}}function Vc(t){if(!t._valueTracker){var a=Vp(t)?"checked":"value";t._valueTracker=Y1(t,a,""+t[a])}}function Gp(t){if(!t)return!1;var a=t._valueTracker;if(!a)return!0;var s=a.getValue(),o="";return t&&(o=Vp(t)?t.checked?"true":"false":t.value),t=o,t!==s?(a.setValue(t),!0):!1}function ko(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 X1=/[\n"\\]/g;function fn(t){return t.replace(X1,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function Gc(t,a,s,o,u,p,y,x){t.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?t.type=y:t.removeAttribute("type"),a!=null?y==="number"?(a===0&&t.value===""||t.value!=a)&&(t.value=""+dn(a)):t.value!==""+dn(a)&&(t.value=""+dn(a)):y!=="submit"&&y!=="reset"||t.removeAttribute("value"),a!=null?Ic(t,y,dn(a)):s!=null?Ic(t,y,dn(s)):o!=null&&t.removeAttribute("value"),u==null&&p!=null&&(t.defaultChecked=!!p),u!=null&&(t.checked=u&&typeof u!="function"&&typeof u!="symbol"),x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?t.name=""+dn(x):t.removeAttribute("name")}function Ip(t,a,s,o,u,p,y,x){if(p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(t.type=p),a!=null||s!=null){if(!(p!=="submit"&&p!=="reset"||a!=null)){Vc(t);return}s=s!=null?""+dn(s):"",a=a!=null?""+dn(a):s,x||a===t.value||(t.value=a),t.defaultValue=a}o=o??u,o=typeof o!="function"&&typeof o!="symbol"&&!!o,t.checked=x?t.checked:!!o,t.defaultChecked=!!o,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(t.name=y),Vc(t)}function Ic(t,a,s){a==="number"&&ko(t.ownerDocument)===t||t.defaultValue===""+s||(t.defaultValue=""+s)}function Pi(t,a,s,o){if(t=t.options,a){a={};for(var u=0;u<s.length;u++)a["$"+s[u]]=!0;for(s=0;s<t.length;s++)u=a.hasOwnProperty("$"+t[s].value),t[s].selected!==u&&(t[s].selected=u),u&&o&&(t[s].defaultSelected=!0)}else{for(s=""+dn(s),a=null,u=0;u<t.length;u++){if(t[u].value===s){t[u].selected=!0,o&&(t[u].defaultSelected=!0);return}a!==null||t[u].disabled||(a=t[u])}a!==null&&(a.selected=!0)}}function Hp(t,a,s){if(a!=null&&(a=""+dn(a),a!==t.value&&(t.value=a),s==null)){t.defaultValue!==a&&(t.defaultValue=a);return}t.defaultValue=s!=null?""+dn(s):""}function Zp(t,a,s,o){if(a==null){if(o!=null){if(s!=null)throw Error(r(92));if(pe(o)){if(1<o.length)throw Error(r(93));o=o[0]}s=o}s==null&&(s=""),a=s}s=dn(a),t.defaultValue=s,o=t.textContent,o===s&&o!==""&&o!==null&&(t.value=o),Vc(t)}function Ki(t,a){if(a){var s=t.firstChild;if(s&&s===t.lastChild&&s.nodeType===3){s.nodeValue=a;return}}t.textContent=a}var J1=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 Pp(t,a,s){var o=a.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?o?t.setProperty(a,""):a==="float"?t.cssFloat="":t[a]="":o?t.setProperty(a,s):typeof s!="number"||s===0||J1.has(a)?a==="float"?t.cssFloat=s:t[a]=(""+s).trim():t[a]=s+"px"}function Kp(t,a,s){if(a!=null&&typeof a!="object")throw Error(r(62));if(t=t.style,s!=null){for(var o in s)!s.hasOwnProperty(o)||a!=null&&a.hasOwnProperty(o)||(o.indexOf("--")===0?t.setProperty(o,""):o==="float"?t.cssFloat="":t[o]="");for(var u in a)o=a[u],a.hasOwnProperty(u)&&s[u]!==o&&Pp(t,u,o)}else for(var p in a)a.hasOwnProperty(p)&&Pp(t,p,a[p])}function Hc(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 F1=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"]]),W1=/^[\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 Ao(t){return W1.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Yn(){}var Zc=null;function Pc(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Qi=null,Yi=null;function Qp(t){var a=Ii(t);if(a&&(t=a.stateNode)){var s=t[Pt]||null;e:switch(t=a.stateNode,a.type){case"input":if(Gc(t,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),a=s.name,s.type==="radio"&&a!=null){for(s=t;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+fn(""+a)+'"][type="radio"]'),a=0;a<s.length;a++){var o=s[a];if(o!==t&&o.form===t.form){var u=o[Pt]||null;if(!u)throw Error(r(90));Gc(o,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name)}}for(a=0;a<s.length;a++)o=s[a],o.form===t.form&&Gp(o)}break e;case"textarea":Hp(t,s.value,s.defaultValue);break e;case"select":a=s.value,a!=null&&Pi(t,!!s.multiple,a,!1)}}}var Kc=!1;function Yp(t,a,s){if(Kc)return t(a,s);Kc=!0;try{var o=t(a);return o}finally{if(Kc=!1,(Qi!==null||Yi!==null)&&(pl(),Qi&&(a=Qi,t=Yi,Yi=Qi=null,Qp(a),t)))for(a=0;a<t.length;a++)Qp(t[a])}}function rr(t,a){var s=t.stateNode;if(s===null)return null;var o=s[Pt]||null;if(o===null)return null;s=o[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(t=t.type,o=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!o;break e;default:t=!1}if(t)return null;if(s&&typeof s!="function")throw Error(r(231,a,typeof s));return s}var Xn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Qc=!1;if(Xn)try{var or={};Object.defineProperty(or,"passive",{get:function(){Qc=!0}}),window.addEventListener("test",or,or),window.removeEventListener("test",or,or)}catch{Qc=!1}var ba=null,Yc=null,_o=null;function Xp(){if(_o)return _o;var t,a=Yc,s=a.length,o,u="value"in ba?ba.value:ba.textContent,p=u.length;for(t=0;t<s&&a[t]===u[t];t++);var y=s-t;for(o=1;o<=y&&a[s-o]===u[p-o];o++);return _o=u.slice(t,1<o?1-o:void 0)}function zo(t){var a=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&a===13&&(t=13)):t=a,t===10&&(t=13),32<=t||t===13?t:0}function Co(){return!0}function Jp(){return!1}function Kt(t){function a(s,o,u,p,y){this._reactName=s,this._targetInst=u,this.type=o,this.nativeEvent=p,this.target=y,this.currentTarget=null;for(var x in t)t.hasOwnProperty(x)&&(s=t[x],this[x]=s?s(p):p[x]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?Co:Jp,this.isPropagationStopped=Jp,this}return S(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=Co)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=Co)},persist:function(){},isPersistent:Co}),a}var ni={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},To=Kt(ni),lr=S({},ni,{view:0,detail:0}),eS=Kt(lr),Xc,Jc,cr,Eo=S({},lr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Wc,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!==cr&&(cr&&t.type==="mousemove"?(Xc=t.screenX-cr.screenX,Jc=t.screenY-cr.screenY):Jc=Xc=0,cr=t),Xc)},movementY:function(t){return"movementY"in t?t.movementY:Jc}}),Fp=Kt(Eo),tS=S({},Eo,{dataTransfer:0}),nS=Kt(tS),aS=S({},lr,{relatedTarget:0}),Fc=Kt(aS),iS=S({},ni,{animationName:0,elapsedTime:0,pseudoElement:0}),sS=Kt(iS),rS=S({},ni,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),oS=Kt(rS),lS=S({},ni,{data:0}),Wp=Kt(lS),cS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},uS={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"},dS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function fS(t){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(t):(t=dS[t])?!!a[t]:!1}function Wc(){return fS}var pS=S({},lr,{key:function(t){if(t.key){var a=cS[t.key]||t.key;if(a!=="Unidentified")return a}return t.type==="keypress"?(t=zo(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?uS[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Wc,charCode:function(t){return t.type==="keypress"?zo(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?zo(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),mS=Kt(pS),hS=S({},Eo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),em=Kt(hS),gS=S({},lr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Wc}),yS=Kt(gS),bS=S({},ni,{propertyName:0,elapsedTime:0,pseudoElement:0}),vS=Kt(bS),SS=S({},Eo,{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}),xS=Kt(SS),wS=S({},ni,{newState:0,oldState:0}),jS=Kt(wS),NS=[9,13,27,32],eu=Xn&&"CompositionEvent"in window,ur=null;Xn&&"documentMode"in document&&(ur=document.documentMode);var kS=Xn&&"TextEvent"in window&&!ur,tm=Xn&&(!eu||ur&&8<ur&&11>=ur),nm=" ",am=!1;function im(t,a){switch(t){case"keyup":return NS.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function sm(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Xi=!1;function AS(t,a){switch(t){case"compositionend":return sm(a);case"keypress":return a.which!==32?null:(am=!0,nm);case"textInput":return t=a.data,t===nm&&am?null:t;default:return null}}function _S(t,a){if(Xi)return t==="compositionend"||!eu&&im(t,a)?(t=Xp(),_o=Yc=ba=null,Xi=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return tm&&a.locale!=="ko"?null:a.data;default:return null}}var zS={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 rm(t){var a=t&&t.nodeName&&t.nodeName.toLowerCase();return a==="input"?!!zS[t.type]:a==="textarea"}function om(t,a,s,o){Qi?Yi?Yi.push(o):Yi=[o]:Qi=o,a=Sl(a,"onChange"),0<a.length&&(s=new To("onChange","change",null,s,o),t.push({event:s,listeners:a}))}var dr=null,fr=null;function CS(t){Ig(t,0)}function Oo(t){var a=sr(t);if(Gp(a))return t}function lm(t,a){if(t==="change")return a}var cm=!1;if(Xn){var tu;if(Xn){var nu="oninput"in document;if(!nu){var um=document.createElement("div");um.setAttribute("oninput","return;"),nu=typeof um.oninput=="function"}tu=nu}else tu=!1;cm=tu&&(!document.documentMode||9<document.documentMode)}function dm(){dr&&(dr.detachEvent("onpropertychange",fm),fr=dr=null)}function fm(t){if(t.propertyName==="value"&&Oo(fr)){var a=[];om(a,fr,t,Pc(t)),Yp(CS,a)}}function TS(t,a,s){t==="focusin"?(dm(),dr=a,fr=s,dr.attachEvent("onpropertychange",fm)):t==="focusout"&&dm()}function ES(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Oo(fr)}function OS(t,a){if(t==="click")return Oo(a)}function DS(t,a){if(t==="input"||t==="change")return Oo(a)}function RS(t,a){return t===a&&(t!==0||1/t===1/a)||t!==t&&a!==a}var tn=typeof Object.is=="function"?Object.is:RS;function pr(t,a){if(tn(t,a))return!0;if(typeof t!="object"||t===null||typeof a!="object"||a===null)return!1;var s=Object.keys(t),o=Object.keys(a);if(s.length!==o.length)return!1;for(o=0;o<s.length;o++){var u=s[o];if(!Oi.call(a,u)||!tn(t[u],a[u]))return!1}return!0}function pm(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function mm(t,a){var s=pm(t);t=0;for(var o;s;){if(s.nodeType===3){if(o=t+s.textContent.length,t<=a&&o>=a)return{node:s,offset:a-t};t=o}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=pm(s)}}function hm(t,a){return t&&a?t===a?!0:t&&t.nodeType===3?!1:a&&a.nodeType===3?hm(t,a.parentNode):"contains"in t?t.contains(a):t.compareDocumentPosition?!!(t.compareDocumentPosition(a)&16):!1:!1}function gm(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var a=ko(t.document);a instanceof t.HTMLIFrameElement;){try{var s=typeof a.contentWindow.location.href=="string"}catch{s=!1}if(s)t=a.contentWindow;else break;a=ko(t.document)}return a}function au(t){var a=t&&t.nodeName&&t.nodeName.toLowerCase();return a&&(a==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||a==="textarea"||t.contentEditable==="true")}var MS=Xn&&"documentMode"in document&&11>=document.documentMode,Ji=null,iu=null,mr=null,su=!1;function ym(t,a,s){var o=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;su||Ji==null||Ji!==ko(o)||(o=Ji,"selectionStart"in o&&au(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),mr&&pr(mr,o)||(mr=o,o=Sl(iu,"onSelect"),0<o.length&&(a=new To("onSelect","select",null,a,s),t.push({event:a,listeners:o}),a.target=Ji)))}function ai(t,a){var s={};return s[t.toLowerCase()]=a.toLowerCase(),s["Webkit"+t]="webkit"+a,s["Moz"+t]="moz"+a,s}var Fi={animationend:ai("Animation","AnimationEnd"),animationiteration:ai("Animation","AnimationIteration"),animationstart:ai("Animation","AnimationStart"),transitionrun:ai("Transition","TransitionRun"),transitionstart:ai("Transition","TransitionStart"),transitioncancel:ai("Transition","TransitionCancel"),transitionend:ai("Transition","TransitionEnd")},ru={},bm={};Xn&&(bm=document.createElement("div").style,"AnimationEvent"in window||(delete Fi.animationend.animation,delete Fi.animationiteration.animation,delete Fi.animationstart.animation),"TransitionEvent"in window||delete Fi.transitionend.transition);function ii(t){if(ru[t])return ru[t];if(!Fi[t])return t;var a=Fi[t],s;for(s in a)if(a.hasOwnProperty(s)&&s in bm)return ru[t]=a[s];return t}var vm=ii("animationend"),Sm=ii("animationiteration"),xm=ii("animationstart"),BS=ii("transitionrun"),LS=ii("transitionstart"),qS=ii("transitioncancel"),wm=ii("transitionend"),jm=new Map,ou="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(" ");ou.push("scrollEnd");function En(t,a){jm.set(t,a),ti(a,[t])}var Do=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=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(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},pn=[],Wi=0,lu=0;function Ro(){for(var t=Wi,a=lu=Wi=0;a<t;){var s=pn[a];pn[a++]=null;var o=pn[a];pn[a++]=null;var u=pn[a];pn[a++]=null;var p=pn[a];if(pn[a++]=null,o!==null&&u!==null){var y=o.pending;y===null?u.next=u:(u.next=y.next,y.next=u),o.pending=u}p!==0&&Nm(s,u,p)}}function Mo(t,a,s,o){pn[Wi++]=t,pn[Wi++]=a,pn[Wi++]=s,pn[Wi++]=o,lu|=o,t.lanes|=o,t=t.alternate,t!==null&&(t.lanes|=o)}function cu(t,a,s,o){return Mo(t,a,s,o),Bo(t)}function si(t,a){return Mo(t,null,null,a),Bo(t)}function Nm(t,a,s){t.lanes|=s;var o=t.alternate;o!==null&&(o.lanes|=s);for(var u=!1,p=t.return;p!==null;)p.childLanes|=s,o=p.alternate,o!==null&&(o.childLanes|=s),p.tag===22&&(t=p.stateNode,t===null||t._visibility&1||(u=!0)),t=p,p=p.return;return t.tag===3?(p=t.stateNode,u&&a!==null&&(u=31-mt(s),t=p.hiddenUpdates,o=t[u],o===null?t[u]=[a]:o.push(a),a.lane=s|536870912),p):null}function Bo(t){if(50<Br)throw Br=0,bd=null,Error(r(185));for(var a=t.return;a!==null;)t=a,a=t.return;return t.tag===3?t.stateNode:null}var es={};function US(t,a,s,o){this.tag=t,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function nn(t,a,s,o){return new US(t,a,s,o)}function uu(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Jn(t,a){var s=t.alternate;return s===null?(s=nn(t.tag,a,t.key,t.mode),s.elementType=t.elementType,s.type=t.type,s.stateNode=t.stateNode,s.alternate=t,t.alternate=s):(s.pendingProps=a,s.type=t.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=t.flags&65011712,s.childLanes=t.childLanes,s.lanes=t.lanes,s.child=t.child,s.memoizedProps=t.memoizedProps,s.memoizedState=t.memoizedState,s.updateQueue=t.updateQueue,a=t.dependencies,s.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},s.sibling=t.sibling,s.index=t.index,s.ref=t.ref,s.refCleanup=t.refCleanup,s}function km(t,a){t.flags&=65011714;var s=t.alternate;return s===null?(t.childLanes=0,t.lanes=a,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=s.childLanes,t.lanes=s.lanes,t.child=s.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=s.memoizedProps,t.memoizedState=s.memoizedState,t.updateQueue=s.updateQueue,t.type=s.type,a=s.dependencies,t.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),t}function Lo(t,a,s,o,u,p){var y=0;if(o=t,typeof t=="function")uu(t)&&(y=1);else if(typeof t=="string")y=Hx(t,s,te.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case oe:return t=nn(31,s,a,u),t.elementType=oe,t.lanes=p,t;case N:return ri(s.children,u,p,a);case T:y=8,u|=24;break;case R:return t=nn(12,s,a,u|2),t.elementType=R,t.lanes=p,t;case X:return t=nn(13,s,a,u),t.elementType=X,t.lanes=p,t;case J:return t=nn(19,s,a,u),t.elementType=J,t.lanes=p,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case H:y=10;break e;case G:y=9;break e;case K:y=11;break e;case D:y=14;break e;case M:y=16,o=null;break e}y=29,s=Error(r(130,t===null?"null":typeof t,"")),o=null}return a=nn(y,s,a,u),a.elementType=t,a.type=o,a.lanes=p,a}function ri(t,a,s,o){return t=nn(7,t,o,a),t.lanes=s,t}function du(t,a,s){return t=nn(6,t,null,a),t.lanes=s,t}function Am(t){var a=nn(18,null,null,0);return a.stateNode=t,a}function fu(t,a,s){return a=nn(4,t.children!==null?t.children:[],t.key,a),a.lanes=s,a.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},a}var _m=new WeakMap;function mn(t,a){if(typeof t=="object"&&t!==null){var s=_m.get(t);return s!==void 0?s:(a={value:t,source:a,stack:Ws(a)},_m.set(t,a),a)}return{value:t,source:a,stack:Ws(a)}}var ts=[],ns=0,qo=null,hr=0,hn=[],gn=0,va=null,Un=1,$n="";function Fn(t,a){ts[ns++]=hr,ts[ns++]=qo,qo=t,hr=a}function zm(t,a,s){hn[gn++]=Un,hn[gn++]=$n,hn[gn++]=va,va=t;var o=Un;t=$n;var u=32-mt(o)-1;o&=~(1<<u),s+=1;var p=32-mt(a)+u;if(30<p){var y=u-u%5;p=(o&(1<<y)-1).toString(32),o>>=y,u-=y,Un=1<<32-mt(a)+u|s<<u|o,$n=p+t}else Un=1<<p|s<<u|o,$n=t}function pu(t){t.return!==null&&(Fn(t,1),zm(t,1,0))}function mu(t){for(;t===qo;)qo=ts[--ns],ts[ns]=null,hr=ts[--ns],ts[ns]=null;for(;t===va;)va=hn[--gn],hn[gn]=null,$n=hn[--gn],hn[gn]=null,Un=hn[--gn],hn[gn]=null}function Cm(t,a){hn[gn++]=Un,hn[gn++]=$n,hn[gn++]=va,Un=a.id,$n=a.overflow,va=t}var Ot=null,it=null,Be=!1,Sa=null,yn=!1,hu=Error(r(519));function xa(t){var a=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw gr(mn(a,t)),hu}function Tm(t){var a=t.stateNode,s=t.type,o=t.memoizedProps;switch(a[Et]=t,a[Pt]=o,s){case"dialog":De("cancel",a),De("close",a);break;case"iframe":case"object":case"embed":De("load",a);break;case"video":case"audio":for(s=0;s<qr.length;s++)De(qr[s],a);break;case"source":De("error",a);break;case"img":case"image":case"link":De("error",a),De("load",a);break;case"details":De("toggle",a);break;case"input":De("invalid",a),Ip(a,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":De("invalid",a);break;case"textarea":De("invalid",a),Zp(a,o.value,o.defaultValue,o.children)}s=o.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||a.textContent===""+s||o.suppressHydrationWarning===!0||Kg(a.textContent,s)?(o.popover!=null&&(De("beforetoggle",a),De("toggle",a)),o.onScroll!=null&&De("scroll",a),o.onScrollEnd!=null&&De("scrollend",a),o.onClick!=null&&(a.onclick=Yn),a=!0):a=!1,a||xa(t,!0)}function Em(t){for(Ot=t.return;Ot;)switch(Ot.tag){case 5:case 31:case 13:yn=!1;return;case 27:case 3:yn=!0;return;default:Ot=Ot.return}}function as(t){if(t!==Ot)return!1;if(!Be)return Em(t),Be=!0,!1;var a=t.tag,s;if((s=a!==3&&a!==27)&&((s=a===5)&&(s=t.type,s=!(s!=="form"&&s!=="button")||Dd(t.type,t.memoizedProps)),s=!s),s&&it&&xa(t),Em(t),a===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));it=ny(t)}else if(a===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));it=ny(t)}else a===27?(a=it,Ma(t.type)?(t=qd,qd=null,it=t):it=a):it=Ot?vn(t.stateNode.nextSibling):null;return!0}function oi(){it=Ot=null,Be=!1}function gu(){var t=Sa;return t!==null&&(Jt===null?Jt=t:Jt.push.apply(Jt,t),Sa=null),t}function gr(t){Sa===null?Sa=[t]:Sa.push(t)}var yu=Qe(null),li=null,Wn=null;function wa(t,a,s){le(yu,a._currentValue),a._currentValue=s}function ea(t){t._currentValue=yu.current,Q(yu)}function bu(t,a,s){for(;t!==null;){var o=t.alternate;if((t.childLanes&a)!==a?(t.childLanes|=a,o!==null&&(o.childLanes|=a)):o!==null&&(o.childLanes&a)!==a&&(o.childLanes|=a),t===s)break;t=t.return}}function vu(t,a,s,o){var u=t.child;for(u!==null&&(u.return=t);u!==null;){var p=u.dependencies;if(p!==null){var y=u.child;p=p.firstContext;e:for(;p!==null;){var x=p;p=u;for(var A=0;A<a.length;A++)if(x.context===a[A]){p.lanes|=s,x=p.alternate,x!==null&&(x.lanes|=s),bu(p.return,s,t),o||(y=null);break e}p=x.next}}else if(u.tag===18){if(y=u.return,y===null)throw Error(r(341));y.lanes|=s,p=y.alternate,p!==null&&(p.lanes|=s),bu(y,s,t),y=null}else y=u.child;if(y!==null)y.return=u;else for(y=u;y!==null;){if(y===t){y=null;break}if(u=y.sibling,u!==null){u.return=y.return,y=u;break}y=y.return}u=y}}function is(t,a,s,o){t=null;for(var u=a,p=!1;u!==null;){if(!p){if((u.flags&524288)!==0)p=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var y=u.alternate;if(y===null)throw Error(r(387));if(y=y.memoizedProps,y!==null){var x=u.type;tn(u.pendingProps.value,y.value)||(t!==null?t.push(x):t=[x])}}else if(u===_e.current){if(y=u.alternate,y===null)throw Error(r(387));y.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(t!==null?t.push(Ir):t=[Ir])}u=u.return}t!==null&&vu(a,t,s,o),a.flags|=262144}function Uo(t){for(t=t.firstContext;t!==null;){if(!tn(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function ci(t){li=t,Wn=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Dt(t){return Om(li,t)}function $o(t,a){return li===null&&ci(t),Om(t,a)}function Om(t,a){var s=a._currentValue;if(a={context:a,memoizedValue:s,next:null},Wn===null){if(t===null)throw Error(r(308));Wn=a,t.dependencies={lanes:0,firstContext:a},t.flags|=524288}else Wn=Wn.next=a;return s}var $S=typeof AbortController<"u"?AbortController:function(){var t=[],a=this.signal={aborted:!1,addEventListener:function(s,o){t.push(o)}};this.abort=function(){a.aborted=!0,t.forEach(function(s){return s()})}},VS=e.unstable_scheduleCallback,GS=e.unstable_NormalPriority,St={$$typeof:H,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Su(){return{controller:new $S,data:new Map,refCount:0}}function yr(t){t.refCount--,t.refCount===0&&VS(GS,function(){t.controller.abort()})}var br=null,xu=0,ss=0,rs=null;function IS(t,a){if(br===null){var s=br=[];xu=0,ss=Nd(),rs={status:"pending",value:void 0,then:function(o){s.push(o)}}}return xu++,a.then(Dm,Dm),a}function Dm(){if(--xu===0&&br!==null){rs!==null&&(rs.status="fulfilled");var t=br;br=null,ss=0,rs=null;for(var a=0;a<t.length;a++)(0,t[a])()}}function HS(t,a){var s=[],o={status:"pending",value:null,reason:null,then:function(u){s.push(u)}};return t.then(function(){o.status="fulfilled",o.value=a;for(var u=0;u<s.length;u++)(0,s[u])(a)},function(u){for(o.status="rejected",o.reason=u,u=0;u<s.length;u++)(0,s[u])(void 0)}),o}var Rm=U.S;U.S=function(t,a){yg=Lt(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&IS(t,a),Rm!==null&&Rm(t,a)};var ui=Qe(null);function wu(){var t=ui.current;return t!==null?t:We.pooledCache}function Vo(t,a){a===null?le(ui,ui.current):le(ui,a.pool)}function Mm(){var t=wu();return t===null?null:{parent:St._currentValue,pool:t}}var os=Error(r(460)),ju=Error(r(474)),Go=Error(r(542)),Io={then:function(){}};function Bm(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Lm(t,a,s){switch(s=t[s],s===void 0?t.push(a):s!==a&&(a.then(Yn,Yn),a=s),a.status){case"fulfilled":return a.value;case"rejected":throw t=a.reason,Um(t),t;default:if(typeof a.status=="string")a.then(Yn,Yn);else{if(t=We,t!==null&&100<t.shellSuspendCounter)throw Error(r(482));t=a,t.status="pending",t.then(function(o){if(a.status==="pending"){var u=a;u.status="fulfilled",u.value=o}},function(o){if(a.status==="pending"){var u=a;u.status="rejected",u.reason=o}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw t=a.reason,Um(t),t}throw fi=a,os}}function di(t){try{var a=t._init;return a(t._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(fi=s,os):s}}var fi=null;function qm(){if(fi===null)throw Error(r(459));var t=fi;return fi=null,t}function Um(t){if(t===os||t===Go)throw Error(r(483))}var ls=null,vr=0;function Ho(t){var a=vr;return vr+=1,ls===null&&(ls=[]),Lm(ls,t,a)}function Sr(t,a){a=a.props.ref,t.ref=a!==void 0?a:null}function Zo(t,a){throw a.$$typeof===w?Error(r(525)):(t=Object.prototype.toString.call(a),Error(r(31,t==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":t)))}function $m(t){function a(O,z){if(t){var B=O.deletions;B===null?(O.deletions=[z],O.flags|=16):B.push(z)}}function s(O,z){if(!t)return null;for(;z!==null;)a(O,z),z=z.sibling;return null}function o(O){for(var z=new Map;O!==null;)O.key!==null?z.set(O.key,O):z.set(O.index,O),O=O.sibling;return z}function u(O,z){return O=Jn(O,z),O.index=0,O.sibling=null,O}function p(O,z,B){return O.index=B,t?(B=O.alternate,B!==null?(B=B.index,B<z?(O.flags|=67108866,z):B):(O.flags|=67108866,z)):(O.flags|=1048576,z)}function y(O){return t&&O.alternate===null&&(O.flags|=67108866),O}function x(O,z,B,P){return z===null||z.tag!==6?(z=du(B,O.mode,P),z.return=O,z):(z=u(z,B),z.return=O,z)}function A(O,z,B,P){var Se=B.type;return Se===N?I(O,z,B.props.children,P,B.key):z!==null&&(z.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===M&&di(Se)===z.type)?(z=u(z,B.props),Sr(z,B),z.return=O,z):(z=Lo(B.type,B.key,B.props,null,O.mode,P),Sr(z,B),z.return=O,z)}function L(O,z,B,P){return z===null||z.tag!==4||z.stateNode.containerInfo!==B.containerInfo||z.stateNode.implementation!==B.implementation?(z=fu(B,O.mode,P),z.return=O,z):(z=u(z,B.children||[]),z.return=O,z)}function I(O,z,B,P,Se){return z===null||z.tag!==7?(z=ri(B,O.mode,P,Se),z.return=O,z):(z=u(z,B),z.return=O,z)}function Y(O,z,B){if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return z=du(""+z,O.mode,B),z.return=O,z;if(typeof z=="object"&&z!==null){switch(z.$$typeof){case _:return B=Lo(z.type,z.key,z.props,null,O.mode,B),Sr(B,z),B.return=O,B;case C:return z=fu(z,O.mode,B),z.return=O,z;case M:return z=di(z),Y(O,z,B)}if(pe(z)||ve(z))return z=ri(z,O.mode,B,null),z.return=O,z;if(typeof z.then=="function")return Y(O,Ho(z),B);if(z.$$typeof===H)return Y(O,$o(O,z),B);Zo(O,z)}return null}function q(O,z,B,P){var Se=z!==null?z.key:null;if(typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint")return Se!==null?null:x(O,z,""+B,P);if(typeof B=="object"&&B!==null){switch(B.$$typeof){case _:return B.key===Se?A(O,z,B,P):null;case C:return B.key===Se?L(O,z,B,P):null;case M:return B=di(B),q(O,z,B,P)}if(pe(B)||ve(B))return Se!==null?null:I(O,z,B,P,null);if(typeof B.then=="function")return q(O,z,Ho(B),P);if(B.$$typeof===H)return q(O,z,$o(O,B),P);Zo(O,B)}return null}function V(O,z,B,P,Se){if(typeof P=="string"&&P!==""||typeof P=="number"||typeof P=="bigint")return O=O.get(B)||null,x(z,O,""+P,Se);if(typeof P=="object"&&P!==null){switch(P.$$typeof){case _:return O=O.get(P.key===null?B:P.key)||null,A(z,O,P,Se);case C:return O=O.get(P.key===null?B:P.key)||null,L(z,O,P,Se);case M:return P=di(P),V(O,z,B,P,Se)}if(pe(P)||ve(P))return O=O.get(B)||null,I(z,O,P,Se,null);if(typeof P.then=="function")return V(O,z,B,Ho(P),Se);if(P.$$typeof===H)return V(O,z,B,$o(z,P),Se);Zo(z,P)}return null}function fe(O,z,B,P){for(var Se=null,Ve=null,ge=z,Ce=z=0,Me=null;ge!==null&&Ce<B.length;Ce++){ge.index>Ce?(Me=ge,ge=null):Me=ge.sibling;var Ge=q(O,ge,B[Ce],P);if(Ge===null){ge===null&&(ge=Me);break}t&&ge&&Ge.alternate===null&&a(O,ge),z=p(Ge,z,Ce),Ve===null?Se=Ge:Ve.sibling=Ge,Ve=Ge,ge=Me}if(Ce===B.length)return s(O,ge),Be&&Fn(O,Ce),Se;if(ge===null){for(;Ce<B.length;Ce++)ge=Y(O,B[Ce],P),ge!==null&&(z=p(ge,z,Ce),Ve===null?Se=ge:Ve.sibling=ge,Ve=ge);return Be&&Fn(O,Ce),Se}for(ge=o(ge);Ce<B.length;Ce++)Me=V(ge,O,Ce,B[Ce],P),Me!==null&&(t&&Me.alternate!==null&&ge.delete(Me.key===null?Ce:Me.key),z=p(Me,z,Ce),Ve===null?Se=Me:Ve.sibling=Me,Ve=Me);return t&&ge.forEach(function($a){return a(O,$a)}),Be&&Fn(O,Ce),Se}function we(O,z,B,P){if(B==null)throw Error(r(151));for(var Se=null,Ve=null,ge=z,Ce=z=0,Me=null,Ge=B.next();ge!==null&&!Ge.done;Ce++,Ge=B.next()){ge.index>Ce?(Me=ge,ge=null):Me=ge.sibling;var $a=q(O,ge,Ge.value,P);if($a===null){ge===null&&(ge=Me);break}t&&ge&&$a.alternate===null&&a(O,ge),z=p($a,z,Ce),Ve===null?Se=$a:Ve.sibling=$a,Ve=$a,ge=Me}if(Ge.done)return s(O,ge),Be&&Fn(O,Ce),Se;if(ge===null){for(;!Ge.done;Ce++,Ge=B.next())Ge=Y(O,Ge.value,P),Ge!==null&&(z=p(Ge,z,Ce),Ve===null?Se=Ge:Ve.sibling=Ge,Ve=Ge);return Be&&Fn(O,Ce),Se}for(ge=o(ge);!Ge.done;Ce++,Ge=B.next())Ge=V(ge,O,Ce,Ge.value,P),Ge!==null&&(t&&Ge.alternate!==null&&ge.delete(Ge.key===null?Ce:Ge.key),z=p(Ge,z,Ce),Ve===null?Se=Ge:Ve.sibling=Ge,Ve=Ge);return t&&ge.forEach(function(tw){return a(O,tw)}),Be&&Fn(O,Ce),Se}function Je(O,z,B,P){if(typeof B=="object"&&B!==null&&B.type===N&&B.key===null&&(B=B.props.children),typeof B=="object"&&B!==null){switch(B.$$typeof){case _:e:{for(var Se=B.key;z!==null;){if(z.key===Se){if(Se=B.type,Se===N){if(z.tag===7){s(O,z.sibling),P=u(z,B.props.children),P.return=O,O=P;break e}}else if(z.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===M&&di(Se)===z.type){s(O,z.sibling),P=u(z,B.props),Sr(P,B),P.return=O,O=P;break e}s(O,z);break}else a(O,z);z=z.sibling}B.type===N?(P=ri(B.props.children,O.mode,P,B.key),P.return=O,O=P):(P=Lo(B.type,B.key,B.props,null,O.mode,P),Sr(P,B),P.return=O,O=P)}return y(O);case C:e:{for(Se=B.key;z!==null;){if(z.key===Se)if(z.tag===4&&z.stateNode.containerInfo===B.containerInfo&&z.stateNode.implementation===B.implementation){s(O,z.sibling),P=u(z,B.children||[]),P.return=O,O=P;break e}else{s(O,z);break}else a(O,z);z=z.sibling}P=fu(B,O.mode,P),P.return=O,O=P}return y(O);case M:return B=di(B),Je(O,z,B,P)}if(pe(B))return fe(O,z,B,P);if(ve(B)){if(Se=ve(B),typeof Se!="function")throw Error(r(150));return B=Se.call(B),we(O,z,B,P)}if(typeof B.then=="function")return Je(O,z,Ho(B),P);if(B.$$typeof===H)return Je(O,z,$o(O,B),P);Zo(O,B)}return typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint"?(B=""+B,z!==null&&z.tag===6?(s(O,z.sibling),P=u(z,B),P.return=O,O=P):(s(O,z),P=du(B,O.mode,P),P.return=O,O=P),y(O)):s(O,z)}return function(O,z,B,P){try{vr=0;var Se=Je(O,z,B,P);return ls=null,Se}catch(ge){if(ge===os||ge===Go)throw ge;var Ve=nn(29,ge,null,O.mode);return Ve.lanes=P,Ve.return=O,Ve}}}var pi=$m(!0),Vm=$m(!1),ja=!1;function Nu(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ku(t,a){t=t.updateQueue,a.updateQueue===t&&(a.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Na(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function ka(t,a,s){var o=t.updateQueue;if(o===null)return null;if(o=o.shared,(Ie&2)!==0){var u=o.pending;return u===null?a.next=a:(a.next=u.next,u.next=a),o.pending=a,a=Bo(t),Nm(t,null,s),a}return Mo(t,o,a,s),Bo(t)}function xr(t,a,s){if(a=a.updateQueue,a!==null&&(a=a.shared,(s&4194048)!==0)){var o=a.lanes;o&=t.pendingLanes,s|=o,a.lanes=s,wo(t,s)}}function Au(t,a){var s=t.updateQueue,o=t.alternate;if(o!==null&&(o=o.updateQueue,s===o)){var u=null,p=null;if(s=s.firstBaseUpdate,s!==null){do{var y={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};p===null?u=p=y:p=p.next=y,s=s.next}while(s!==null);p===null?u=p=a:p=p.next=a}else u=p=a;s={baseState:o.baseState,firstBaseUpdate:u,lastBaseUpdate:p,shared:o.shared,callbacks:o.callbacks},t.updateQueue=s;return}t=s.lastBaseUpdate,t===null?s.firstBaseUpdate=a:t.next=a,s.lastBaseUpdate=a}var _u=!1;function wr(){if(_u){var t=rs;if(t!==null)throw t}}function jr(t,a,s,o){_u=!1;var u=t.updateQueue;ja=!1;var p=u.firstBaseUpdate,y=u.lastBaseUpdate,x=u.shared.pending;if(x!==null){u.shared.pending=null;var A=x,L=A.next;A.next=null,y===null?p=L:y.next=L,y=A;var I=t.alternate;I!==null&&(I=I.updateQueue,x=I.lastBaseUpdate,x!==y&&(x===null?I.firstBaseUpdate=L:x.next=L,I.lastBaseUpdate=A))}if(p!==null){var Y=u.baseState;y=0,I=L=A=null,x=p;do{var q=x.lane&-536870913,V=q!==x.lane;if(V?(Re&q)===q:(o&q)===q){q!==0&&q===ss&&(_u=!0),I!==null&&(I=I.next={lane:0,tag:x.tag,payload:x.payload,callback:null,next:null});e:{var fe=t,we=x;q=a;var Je=s;switch(we.tag){case 1:if(fe=we.payload,typeof fe=="function"){Y=fe.call(Je,Y,q);break e}Y=fe;break e;case 3:fe.flags=fe.flags&-65537|128;case 0:if(fe=we.payload,q=typeof fe=="function"?fe.call(Je,Y,q):fe,q==null)break e;Y=S({},Y,q);break e;case 2:ja=!0}}q=x.callback,q!==null&&(t.flags|=64,V&&(t.flags|=8192),V=u.callbacks,V===null?u.callbacks=[q]:V.push(q))}else V={lane:q,tag:x.tag,payload:x.payload,callback:x.callback,next:null},I===null?(L=I=V,A=Y):I=I.next=V,y|=q;if(x=x.next,x===null){if(x=u.shared.pending,x===null)break;V=x,x=V.next,V.next=null,u.lastBaseUpdate=V,u.shared.pending=null}}while(!0);I===null&&(A=Y),u.baseState=A,u.firstBaseUpdate=L,u.lastBaseUpdate=I,p===null&&(u.shared.lanes=0),Ta|=y,t.lanes=y,t.memoizedState=Y}}function Gm(t,a){if(typeof t!="function")throw Error(r(191,t));t.call(a)}function Im(t,a){var s=t.callbacks;if(s!==null)for(t.callbacks=null,t=0;t<s.length;t++)Gm(s[t],a)}var cs=Qe(null),Po=Qe(0);function Hm(t,a){t=ca,le(Po,t),le(cs,a),ca=t|a.baseLanes}function zu(){le(Po,ca),le(cs,cs.current)}function Cu(){ca=Po.current,Q(cs),Q(Po)}var an=Qe(null),bn=null;function Aa(t){var a=t.alternate;le(ht,ht.current&1),le(an,t),bn===null&&(a===null||cs.current!==null||a.memoizedState!==null)&&(bn=t)}function Tu(t){le(ht,ht.current),le(an,t),bn===null&&(bn=t)}function Zm(t){t.tag===22?(le(ht,ht.current),le(an,t),bn===null&&(bn=t)):_a()}function _a(){le(ht,ht.current),le(an,an.current)}function sn(t){Q(an),bn===t&&(bn=null),Q(ht)}var ht=Qe(0);function Ko(t){for(var a=t;a!==null;){if(a.tag===13){var s=a.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||Bd(s)||Ld(s)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break;for(;a.sibling===null;){if(a.return===null||a.return===t)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var ta=0,ze=null,Ye=null,xt=null,Qo=!1,us=!1,mi=!1,Yo=0,Nr=0,ds=null,ZS=0;function ft(){throw Error(r(321))}function Eu(t,a){if(a===null)return!1;for(var s=0;s<a.length&&s<t.length;s++)if(!tn(t[s],a[s]))return!1;return!0}function Ou(t,a,s,o,u,p){return ta=p,ze=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,U.H=t===null||t.memoizedState===null?zh:Ku,mi=!1,p=s(o,u),mi=!1,us&&(p=Km(a,s,o,u)),Pm(t),p}function Pm(t){U.H=_r;var a=Ye!==null&&Ye.next!==null;if(ta=0,xt=Ye=ze=null,Qo=!1,Nr=0,ds=null,a)throw Error(r(300));t===null||wt||(t=t.dependencies,t!==null&&Uo(t)&&(wt=!0))}function Km(t,a,s,o){ze=t;var u=0;do{if(us&&(ds=null),Nr=0,us=!1,25<=u)throw Error(r(301));if(u+=1,xt=Ye=null,t.updateQueue!=null){var p=t.updateQueue;p.lastEffect=null,p.events=null,p.stores=null,p.memoCache!=null&&(p.memoCache.index=0)}U.H=Ch,p=a(s,o)}while(us);return p}function PS(){var t=U.H,a=t.useState()[0];return a=typeof a.then=="function"?kr(a):a,t=t.useState()[0],(Ye!==null?Ye.memoizedState:null)!==t&&(ze.flags|=1024),a}function Du(){var t=Yo!==0;return Yo=0,t}function Ru(t,a,s){a.updateQueue=t.updateQueue,a.flags&=-2053,t.lanes&=~s}function Mu(t){if(Qo){for(t=t.memoizedState;t!==null;){var a=t.queue;a!==null&&(a.pending=null),t=t.next}Qo=!1}ta=0,xt=Ye=ze=null,us=!1,Nr=Yo=0,ds=null}function $t(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return xt===null?ze.memoizedState=xt=t:xt=xt.next=t,xt}function gt(){if(Ye===null){var t=ze.alternate;t=t!==null?t.memoizedState:null}else t=Ye.next;var a=xt===null?ze.memoizedState:xt.next;if(a!==null)xt=a,Ye=t;else{if(t===null)throw ze.alternate===null?Error(r(467)):Error(r(310));Ye=t,t={memoizedState:Ye.memoizedState,baseState:Ye.baseState,baseQueue:Ye.baseQueue,queue:Ye.queue,next:null},xt===null?ze.memoizedState=xt=t:xt=xt.next=t}return xt}function Xo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function kr(t){var a=Nr;return Nr+=1,ds===null&&(ds=[]),t=Lm(ds,t,a),a=ze,(xt===null?a.memoizedState:xt.next)===null&&(a=a.alternate,U.H=a===null||a.memoizedState===null?zh:Ku),t}function Jo(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return kr(t);if(t.$$typeof===H)return Dt(t)}throw Error(r(438,String(t)))}function Bu(t){var a=null,s=ze.updateQueue;if(s!==null&&(a=s.memoCache),a==null){var o=ze.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(a={data:o.data.map(function(u){return u.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),s===null&&(s=Xo(),ze.updateQueue=s),s.memoCache=a,s=a.data[a.index],s===void 0)for(s=a.data[a.index]=Array(t),o=0;o<t;o++)s[o]=Ne;return a.index++,s}function na(t,a){return typeof a=="function"?a(t):a}function Fo(t){var a=gt();return Lu(a,Ye,t)}function Lu(t,a,s){var o=t.queue;if(o===null)throw Error(r(311));o.lastRenderedReducer=s;var u=t.baseQueue,p=o.pending;if(p!==null){if(u!==null){var y=u.next;u.next=p.next,p.next=y}a.baseQueue=u=p,o.pending=null}if(p=t.baseState,u===null)t.memoizedState=p;else{a=u.next;var x=y=null,A=null,L=a,I=!1;do{var Y=L.lane&-536870913;if(Y!==L.lane?(Re&Y)===Y:(ta&Y)===Y){var q=L.revertLane;if(q===0)A!==null&&(A=A.next={lane:0,revertLane:0,gesture:null,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null}),Y===ss&&(I=!0);else if((ta&q)===q){L=L.next,q===ss&&(I=!0);continue}else Y={lane:0,revertLane:L.revertLane,gesture:null,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},A===null?(x=A=Y,y=p):A=A.next=Y,ze.lanes|=q,Ta|=q;Y=L.action,mi&&s(p,Y),p=L.hasEagerState?L.eagerState:s(p,Y)}else q={lane:Y,revertLane:L.revertLane,gesture:L.gesture,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},A===null?(x=A=q,y=p):A=A.next=q,ze.lanes|=Y,Ta|=Y;L=L.next}while(L!==null&&L!==a);if(A===null?y=p:A.next=x,!tn(p,t.memoizedState)&&(wt=!0,I&&(s=rs,s!==null)))throw s;t.memoizedState=p,t.baseState=y,t.baseQueue=A,o.lastRenderedState=p}return u===null&&(o.lanes=0),[t.memoizedState,o.dispatch]}function qu(t){var a=gt(),s=a.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=t;var o=s.dispatch,u=s.pending,p=a.memoizedState;if(u!==null){s.pending=null;var y=u=u.next;do p=t(p,y.action),y=y.next;while(y!==u);tn(p,a.memoizedState)||(wt=!0),a.memoizedState=p,a.baseQueue===null&&(a.baseState=p),s.lastRenderedState=p}return[p,o]}function Qm(t,a,s){var o=ze,u=gt(),p=Be;if(p){if(s===void 0)throw Error(r(407));s=s()}else s=a();var y=!tn((Ye||u).memoizedState,s);if(y&&(u.memoizedState=s,wt=!0),u=u.queue,Vu(Jm.bind(null,o,u,t),[t]),u.getSnapshot!==a||y||xt!==null&&xt.memoizedState.tag&1){if(o.flags|=2048,fs(9,{destroy:void 0},Xm.bind(null,o,u,s,a),null),We===null)throw Error(r(349));p||(ta&127)!==0||Ym(o,a,s)}return s}function Ym(t,a,s){t.flags|=16384,t={getSnapshot:a,value:s},a=ze.updateQueue,a===null?(a=Xo(),ze.updateQueue=a,a.stores=[t]):(s=a.stores,s===null?a.stores=[t]:s.push(t))}function Xm(t,a,s,o){a.value=s,a.getSnapshot=o,Fm(a)&&Wm(t)}function Jm(t,a,s){return s(function(){Fm(a)&&Wm(t)})}function Fm(t){var a=t.getSnapshot;t=t.value;try{var s=a();return!tn(t,s)}catch{return!0}}function Wm(t){var a=si(t,2);a!==null&&Ft(a,t,2)}function Uu(t){var a=$t();if(typeof t=="function"){var s=t;if(t=s(),mi){Cn(!0);try{s()}finally{Cn(!1)}}}return a.memoizedState=a.baseState=t,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:na,lastRenderedState:t},a}function eh(t,a,s,o){return t.baseState=s,Lu(t,Ye,typeof o=="function"?o:na)}function KS(t,a,s,o,u){if(tl(t))throw Error(r(485));if(t=a.action,t!==null){var p={payload:u,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){p.listeners.push(y)}};U.T!==null?s(!0):p.isTransition=!1,o(p),s=a.pending,s===null?(p.next=a.pending=p,th(a,p)):(p.next=s.next,a.pending=s.next=p)}}function th(t,a){var s=a.action,o=a.payload,u=t.state;if(a.isTransition){var p=U.T,y={};U.T=y;try{var x=s(u,o),A=U.S;A!==null&&A(y,x),nh(t,a,x)}catch(L){$u(t,a,L)}finally{p!==null&&y.types!==null&&(p.types=y.types),U.T=p}}else try{p=s(u,o),nh(t,a,p)}catch(L){$u(t,a,L)}}function nh(t,a,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(o){ah(t,a,o)},function(o){return $u(t,a,o)}):ah(t,a,s)}function ah(t,a,s){a.status="fulfilled",a.value=s,ih(a),t.state=s,a=t.pending,a!==null&&(s=a.next,s===a?t.pending=null:(s=s.next,a.next=s,th(t,s)))}function $u(t,a,s){var o=t.pending;if(t.pending=null,o!==null){o=o.next;do a.status="rejected",a.reason=s,ih(a),a=a.next;while(a!==o)}t.action=null}function ih(t){t=t.listeners;for(var a=0;a<t.length;a++)(0,t[a])()}function sh(t,a){return a}function rh(t,a){if(Be){var s=We.formState;if(s!==null){e:{var o=ze;if(Be){if(it){t:{for(var u=it,p=yn;u.nodeType!==8;){if(!p){u=null;break t}if(u=vn(u.nextSibling),u===null){u=null;break t}}p=u.data,u=p==="F!"||p==="F"?u:null}if(u){it=vn(u.nextSibling),o=u.data==="F!";break e}}xa(o)}o=!1}o&&(a=s[0])}}return s=$t(),s.memoizedState=s.baseState=a,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:sh,lastRenderedState:a},s.queue=o,s=kh.bind(null,ze,o),o.dispatch=s,o=Uu(!1),p=Pu.bind(null,ze,!1,o.queue),o=$t(),u={state:a,dispatch:null,action:t,pending:null},o.queue=u,s=KS.bind(null,ze,u,p,s),u.dispatch=s,o.memoizedState=t,[a,s,!1]}function oh(t){var a=gt();return lh(a,Ye,t)}function lh(t,a,s){if(a=Lu(t,a,sh)[0],t=Fo(na)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var o=kr(a)}catch(y){throw y===os?Go:y}else o=a;a=gt();var u=a.queue,p=u.dispatch;return s!==a.memoizedState&&(ze.flags|=2048,fs(9,{destroy:void 0},QS.bind(null,u,s),null)),[o,p,t]}function QS(t,a){t.action=a}function ch(t){var a=gt(),s=Ye;if(s!==null)return lh(a,s,t);gt(),a=a.memoizedState,s=gt();var o=s.queue.dispatch;return s.memoizedState=t,[a,o,!1]}function fs(t,a,s,o){return t={tag:t,create:s,deps:o,inst:a,next:null},a=ze.updateQueue,a===null&&(a=Xo(),ze.updateQueue=a),s=a.lastEffect,s===null?a.lastEffect=t.next=t:(o=s.next,s.next=t,t.next=o,a.lastEffect=t),t}function uh(){return gt().memoizedState}function Wo(t,a,s,o){var u=$t();ze.flags|=t,u.memoizedState=fs(1|a,{destroy:void 0},s,o===void 0?null:o)}function el(t,a,s,o){var u=gt();o=o===void 0?null:o;var p=u.memoizedState.inst;Ye!==null&&o!==null&&Eu(o,Ye.memoizedState.deps)?u.memoizedState=fs(a,p,s,o):(ze.flags|=t,u.memoizedState=fs(1|a,p,s,o))}function dh(t,a){Wo(8390656,8,t,a)}function Vu(t,a){el(2048,8,t,a)}function YS(t){ze.flags|=4;var a=ze.updateQueue;if(a===null)a=Xo(),ze.updateQueue=a,a.events=[t];else{var s=a.events;s===null?a.events=[t]:s.push(t)}}function fh(t){var a=gt().memoizedState;return YS({ref:a,nextImpl:t}),function(){if((Ie&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}function ph(t,a){return el(4,2,t,a)}function mh(t,a){return el(4,4,t,a)}function hh(t,a){if(typeof a=="function"){t=t();var s=a(t);return function(){typeof s=="function"?s():a(null)}}if(a!=null)return t=t(),a.current=t,function(){a.current=null}}function gh(t,a,s){s=s!=null?s.concat([t]):null,el(4,4,hh.bind(null,a,t),s)}function Gu(){}function yh(t,a){var s=gt();a=a===void 0?null:a;var o=s.memoizedState;return a!==null&&Eu(a,o[1])?o[0]:(s.memoizedState=[t,a],t)}function bh(t,a){var s=gt();a=a===void 0?null:a;var o=s.memoizedState;if(a!==null&&Eu(a,o[1]))return o[0];if(o=t(),mi){Cn(!0);try{t()}finally{Cn(!1)}}return s.memoizedState=[o,a],o}function Iu(t,a,s){return s===void 0||(ta&1073741824)!==0&&(Re&261930)===0?t.memoizedState=a:(t.memoizedState=s,t=vg(),ze.lanes|=t,Ta|=t,s)}function vh(t,a,s,o){return tn(s,a)?s:cs.current!==null?(t=Iu(t,s,o),tn(t,a)||(wt=!0),t):(ta&42)===0||(ta&1073741824)!==0&&(Re&261930)===0?(wt=!0,t.memoizedState=s):(t=vg(),ze.lanes|=t,Ta|=t,a)}function Sh(t,a,s,o,u){var p=F.p;F.p=p!==0&&8>p?p:8;var y=U.T,x={};U.T=x,Pu(t,!1,a,s);try{var A=u(),L=U.S;if(L!==null&&L(x,A),A!==null&&typeof A=="object"&&typeof A.then=="function"){var I=HS(A,o);Ar(t,a,I,ln(t))}else Ar(t,a,o,ln(t))}catch(Y){Ar(t,a,{then:function(){},status:"rejected",reason:Y},ln())}finally{F.p=p,y!==null&&x.types!==null&&(y.types=x.types),U.T=y}}function XS(){}function Hu(t,a,s,o){if(t.tag!==5)throw Error(r(476));var u=xh(t).queue;Sh(t,u,a,de,s===null?XS:function(){return wh(t),s(o)})}function xh(t){var a=t.memoizedState;if(a!==null)return a;a={memoizedState:de,baseState:de,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:na,lastRenderedState:de},next:null};var s={};return a.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:na,lastRenderedState:s},next:null},t.memoizedState=a,t=t.alternate,t!==null&&(t.memoizedState=a),a}function wh(t){var a=xh(t);a.next===null&&(a=t.alternate.memoizedState),Ar(t,a.next.queue,{},ln())}function Zu(){return Dt(Ir)}function jh(){return gt().memoizedState}function Nh(){return gt().memoizedState}function JS(t){for(var a=t.return;a!==null;){switch(a.tag){case 24:case 3:var s=ln();t=Na(s);var o=ka(a,t,s);o!==null&&(Ft(o,a,s),xr(o,a,s)),a={cache:Su()},t.payload=a;return}a=a.return}}function FS(t,a,s){var o=ln();s={lane:o,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},tl(t)?Ah(a,s):(s=cu(t,a,s,o),s!==null&&(Ft(s,t,o),_h(s,a,o)))}function kh(t,a,s){var o=ln();Ar(t,a,s,o)}function Ar(t,a,s,o){var u={lane:o,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(tl(t))Ah(a,u);else{var p=t.alternate;if(t.lanes===0&&(p===null||p.lanes===0)&&(p=a.lastRenderedReducer,p!==null))try{var y=a.lastRenderedState,x=p(y,s);if(u.hasEagerState=!0,u.eagerState=x,tn(x,y))return Mo(t,a,u,0),We===null&&Ro(),!1}catch{}if(s=cu(t,a,u,o),s!==null)return Ft(s,t,o),_h(s,a,o),!0}return!1}function Pu(t,a,s,o){if(o={lane:2,revertLane:Nd(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},tl(t)){if(a)throw Error(r(479))}else a=cu(t,s,o,2),a!==null&&Ft(a,t,2)}function tl(t){var a=t.alternate;return t===ze||a!==null&&a===ze}function Ah(t,a){us=Qo=!0;var s=t.pending;s===null?a.next=a:(a.next=s.next,s.next=a),t.pending=a}function _h(t,a,s){if((s&4194048)!==0){var o=a.lanes;o&=t.pendingLanes,s|=o,a.lanes=s,wo(t,s)}}var _r={readContext:Dt,use:Jo,useCallback:ft,useContext:ft,useEffect:ft,useImperativeHandle:ft,useLayoutEffect:ft,useInsertionEffect:ft,useMemo:ft,useReducer:ft,useRef:ft,useState:ft,useDebugValue:ft,useDeferredValue:ft,useTransition:ft,useSyncExternalStore:ft,useId:ft,useHostTransitionStatus:ft,useFormState:ft,useActionState:ft,useOptimistic:ft,useMemoCache:ft,useCacheRefresh:ft};_r.useEffectEvent=ft;var zh={readContext:Dt,use:Jo,useCallback:function(t,a){return $t().memoizedState=[t,a===void 0?null:a],t},useContext:Dt,useEffect:dh,useImperativeHandle:function(t,a,s){s=s!=null?s.concat([t]):null,Wo(4194308,4,hh.bind(null,a,t),s)},useLayoutEffect:function(t,a){return Wo(4194308,4,t,a)},useInsertionEffect:function(t,a){Wo(4,2,t,a)},useMemo:function(t,a){var s=$t();a=a===void 0?null:a;var o=t();if(mi){Cn(!0);try{t()}finally{Cn(!1)}}return s.memoizedState=[o,a],o},useReducer:function(t,a,s){var o=$t();if(s!==void 0){var u=s(a);if(mi){Cn(!0);try{s(a)}finally{Cn(!1)}}}else u=a;return o.memoizedState=o.baseState=u,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:u},o.queue=t,t=t.dispatch=FS.bind(null,ze,t),[o.memoizedState,t]},useRef:function(t){var a=$t();return t={current:t},a.memoizedState=t},useState:function(t){t=Uu(t);var a=t.queue,s=kh.bind(null,ze,a);return a.dispatch=s,[t.memoizedState,s]},useDebugValue:Gu,useDeferredValue:function(t,a){var s=$t();return Iu(s,t,a)},useTransition:function(){var t=Uu(!1);return t=Sh.bind(null,ze,t.queue,!0,!1),$t().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,a,s){var o=ze,u=$t();if(Be){if(s===void 0)throw Error(r(407));s=s()}else{if(s=a(),We===null)throw Error(r(349));(Re&127)!==0||Ym(o,a,s)}u.memoizedState=s;var p={value:s,getSnapshot:a};return u.queue=p,dh(Jm.bind(null,o,p,t),[t]),o.flags|=2048,fs(9,{destroy:void 0},Xm.bind(null,o,p,s,a),null),s},useId:function(){var t=$t(),a=We.identifierPrefix;if(Be){var s=$n,o=Un;s=(o&~(1<<32-mt(o)-1)).toString(32)+s,a="_"+a+"R_"+s,s=Yo++,0<s&&(a+="H"+s.toString(32)),a+="_"}else s=ZS++,a="_"+a+"r_"+s.toString(32)+"_";return t.memoizedState=a},useHostTransitionStatus:Zu,useFormState:rh,useActionState:rh,useOptimistic:function(t){var a=$t();a.memoizedState=a.baseState=t;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=s,a=Pu.bind(null,ze,!0,s),s.dispatch=a,[t,a]},useMemoCache:Bu,useCacheRefresh:function(){return $t().memoizedState=JS.bind(null,ze)},useEffectEvent:function(t){var a=$t(),s={impl:t};return a.memoizedState=s,function(){if((Ie&2)!==0)throw Error(r(440));return s.impl.apply(void 0,arguments)}}},Ku={readContext:Dt,use:Jo,useCallback:yh,useContext:Dt,useEffect:Vu,useImperativeHandle:gh,useInsertionEffect:ph,useLayoutEffect:mh,useMemo:bh,useReducer:Fo,useRef:uh,useState:function(){return Fo(na)},useDebugValue:Gu,useDeferredValue:function(t,a){var s=gt();return vh(s,Ye.memoizedState,t,a)},useTransition:function(){var t=Fo(na)[0],a=gt().memoizedState;return[typeof t=="boolean"?t:kr(t),a]},useSyncExternalStore:Qm,useId:jh,useHostTransitionStatus:Zu,useFormState:oh,useActionState:oh,useOptimistic:function(t,a){var s=gt();return eh(s,Ye,t,a)},useMemoCache:Bu,useCacheRefresh:Nh};Ku.useEffectEvent=fh;var Ch={readContext:Dt,use:Jo,useCallback:yh,useContext:Dt,useEffect:Vu,useImperativeHandle:gh,useInsertionEffect:ph,useLayoutEffect:mh,useMemo:bh,useReducer:qu,useRef:uh,useState:function(){return qu(na)},useDebugValue:Gu,useDeferredValue:function(t,a){var s=gt();return Ye===null?Iu(s,t,a):vh(s,Ye.memoizedState,t,a)},useTransition:function(){var t=qu(na)[0],a=gt().memoizedState;return[typeof t=="boolean"?t:kr(t),a]},useSyncExternalStore:Qm,useId:jh,useHostTransitionStatus:Zu,useFormState:ch,useActionState:ch,useOptimistic:function(t,a){var s=gt();return Ye!==null?eh(s,Ye,t,a):(s.baseState=t,[t,s.queue.dispatch])},useMemoCache:Bu,useCacheRefresh:Nh};Ch.useEffectEvent=fh;function Qu(t,a,s,o){a=t.memoizedState,s=s(o,a),s=s==null?a:S({},a,s),t.memoizedState=s,t.lanes===0&&(t.updateQueue.baseState=s)}var Yu={enqueueSetState:function(t,a,s){t=t._reactInternals;var o=ln(),u=Na(o);u.payload=a,s!=null&&(u.callback=s),a=ka(t,u,o),a!==null&&(Ft(a,t,o),xr(a,t,o))},enqueueReplaceState:function(t,a,s){t=t._reactInternals;var o=ln(),u=Na(o);u.tag=1,u.payload=a,s!=null&&(u.callback=s),a=ka(t,u,o),a!==null&&(Ft(a,t,o),xr(a,t,o))},enqueueForceUpdate:function(t,a){t=t._reactInternals;var s=ln(),o=Na(s);o.tag=2,a!=null&&(o.callback=a),a=ka(t,o,s),a!==null&&(Ft(a,t,s),xr(a,t,s))}};function Th(t,a,s,o,u,p,y){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(o,p,y):a.prototype&&a.prototype.isPureReactComponent?!pr(s,o)||!pr(u,p):!0}function Eh(t,a,s,o){t=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(s,o),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(s,o),a.state!==t&&Yu.enqueueReplaceState(a,a.state,null)}function hi(t,a){var s=a;if("ref"in a){s={};for(var o in a)o!=="ref"&&(s[o]=a[o])}if(t=t.defaultProps){s===a&&(s=S({},s));for(var u in t)s[u]===void 0&&(s[u]=t[u])}return s}function Oh(t){Do(t)}function Dh(t){console.error(t)}function Rh(t){Do(t)}function nl(t,a){try{var s=t.onUncaughtError;s(a.value,{componentStack:a.stack})}catch(o){setTimeout(function(){throw o})}}function Mh(t,a,s){try{var o=t.onCaughtError;o(s.value,{componentStack:s.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function Xu(t,a,s){return s=Na(s),s.tag=3,s.payload={element:null},s.callback=function(){nl(t,a)},s}function Bh(t){return t=Na(t),t.tag=3,t}function Lh(t,a,s,o){var u=s.type.getDerivedStateFromError;if(typeof u=="function"){var p=o.value;t.payload=function(){return u(p)},t.callback=function(){Mh(a,s,o)}}var y=s.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(t.callback=function(){Mh(a,s,o),typeof u!="function"&&(Ea===null?Ea=new Set([this]):Ea.add(this));var x=o.stack;this.componentDidCatch(o.value,{componentStack:x!==null?x:""})})}function WS(t,a,s,o,u){if(s.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(a=s.alternate,a!==null&&is(a,s,u,!0),s=an.current,s!==null){switch(s.tag){case 31:case 13:return bn===null?ml():s.alternate===null&&pt===0&&(pt=3),s.flags&=-257,s.flags|=65536,s.lanes=u,o===Io?s.flags|=16384:(a=s.updateQueue,a===null?s.updateQueue=new Set([o]):a.add(o),xd(t,o,u)),!1;case 22:return s.flags|=65536,o===Io?s.flags|=16384:(a=s.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([o])},s.updateQueue=a):(s=a.retryQueue,s===null?a.retryQueue=new Set([o]):s.add(o)),xd(t,o,u)),!1}throw Error(r(435,s.tag))}return xd(t,o,u),ml(),!1}if(Be)return a=an.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=u,o!==hu&&(t=Error(r(422),{cause:o}),gr(mn(t,s)))):(o!==hu&&(a=Error(r(423),{cause:o}),gr(mn(a,s))),t=t.current.alternate,t.flags|=65536,u&=-u,t.lanes|=u,o=mn(o,s),u=Xu(t.stateNode,o,u),Au(t,u),pt!==4&&(pt=2)),!1;var p=Error(r(520),{cause:o});if(p=mn(p,s),Mr===null?Mr=[p]:Mr.push(p),pt!==4&&(pt=2),a===null)return!0;o=mn(o,s),s=a;do{switch(s.tag){case 3:return s.flags|=65536,t=u&-u,s.lanes|=t,t=Xu(s.stateNode,o,t),Au(s,t),!1;case 1:if(a=s.type,p=s.stateNode,(s.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(Ea===null||!Ea.has(p))))return s.flags|=65536,u&=-u,s.lanes|=u,u=Bh(u),Lh(u,t,s,o),Au(s,u),!1}s=s.return}while(s!==null);return!1}var Ju=Error(r(461)),wt=!1;function Rt(t,a,s,o){a.child=t===null?Vm(a,null,s,o):pi(a,t.child,s,o)}function qh(t,a,s,o,u){s=s.render;var p=a.ref;if("ref"in o){var y={};for(var x in o)x!=="ref"&&(y[x]=o[x])}else y=o;return ci(a),o=Ou(t,a,s,y,p,u),x=Du(),t!==null&&!wt?(Ru(t,a,u),aa(t,a,u)):(Be&&x&&pu(a),a.flags|=1,Rt(t,a,o,u),a.child)}function Uh(t,a,s,o,u){if(t===null){var p=s.type;return typeof p=="function"&&!uu(p)&&p.defaultProps===void 0&&s.compare===null?(a.tag=15,a.type=p,$h(t,a,p,o,u)):(t=Lo(s.type,null,o,a,a.mode,u),t.ref=a.ref,t.return=a,a.child=t)}if(p=t.child,!sd(t,u)){var y=p.memoizedProps;if(s=s.compare,s=s!==null?s:pr,s(y,o)&&t.ref===a.ref)return aa(t,a,u)}return a.flags|=1,t=Jn(p,o),t.ref=a.ref,t.return=a,a.child=t}function $h(t,a,s,o,u){if(t!==null){var p=t.memoizedProps;if(pr(p,o)&&t.ref===a.ref)if(wt=!1,a.pendingProps=o=p,sd(t,u))(t.flags&131072)!==0&&(wt=!0);else return a.lanes=t.lanes,aa(t,a,u)}return Fu(t,a,s,o,u)}function Vh(t,a,s,o){var u=o.children,p=t!==null?t.memoizedState:null;if(t===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((a.flags&128)!==0){if(p=p!==null?p.baseLanes|s:s,t!==null){for(o=a.child=t.child,u=0;o!==null;)u=u|o.lanes|o.childLanes,o=o.sibling;o=u&~p}else o=0,a.child=null;return Gh(t,a,p,s,o)}if((s&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},t!==null&&Vo(a,p!==null?p.cachePool:null),p!==null?Hm(a,p):zu(),Zm(a);else return o=a.lanes=536870912,Gh(t,a,p!==null?p.baseLanes|s:s,s,o)}else p!==null?(Vo(a,p.cachePool),Hm(a,p),_a(),a.memoizedState=null):(t!==null&&Vo(a,null),zu(),_a());return Rt(t,a,u,s),a.child}function zr(t,a){return t!==null&&t.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function Gh(t,a,s,o,u){var p=wu();return p=p===null?null:{parent:St._currentValue,pool:p},a.memoizedState={baseLanes:s,cachePool:p},t!==null&&Vo(a,null),zu(),Zm(a),t!==null&&is(t,a,o,!0),a.childLanes=u,null}function al(t,a){return a=sl({mode:a.mode,children:a.children},t.mode),a.ref=t.ref,t.child=a,a.return=t,a}function Ih(t,a,s){return pi(a,t.child,null,s),t=al(a,a.pendingProps),t.flags|=2,sn(a),a.memoizedState=null,t}function ex(t,a,s){var o=a.pendingProps,u=(a.flags&128)!==0;if(a.flags&=-129,t===null){if(Be){if(o.mode==="hidden")return t=al(a,o),a.lanes=536870912,zr(null,t);if(Tu(a),(t=it)?(t=ty(t,yn),t=t!==null&&t.data==="&"?t:null,t!==null&&(a.memoizedState={dehydrated:t,treeContext:va!==null?{id:Un,overflow:$n}:null,retryLane:536870912,hydrationErrors:null},s=Am(t),s.return=a,a.child=s,Ot=a,it=null)):t=null,t===null)throw xa(a);return a.lanes=536870912,null}return al(a,o)}var p=t.memoizedState;if(p!==null){var y=p.dehydrated;if(Tu(a),u)if(a.flags&256)a.flags&=-257,a=Ih(t,a,s);else if(a.memoizedState!==null)a.child=t.child,a.flags|=128,a=null;else throw Error(r(558));else if(wt||is(t,a,s,!1),u=(s&t.childLanes)!==0,wt||u){if(o=We,o!==null&&(y=nr(o,s),y!==0&&y!==p.retryLane))throw p.retryLane=y,si(t,y),Ft(o,t,y),Ju;ml(),a=Ih(t,a,s)}else t=p.treeContext,it=vn(y.nextSibling),Ot=a,Be=!0,Sa=null,yn=!1,t!==null&&Cm(a,t),a=al(a,o),a.flags|=4096;return a}return t=Jn(t.child,{mode:o.mode,children:o.children}),t.ref=a.ref,a.child=t,t.return=a,t}function il(t,a){var s=a.ref;if(s===null)t!==null&&t.ref!==null&&(a.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(r(284));(t===null||t.ref!==s)&&(a.flags|=4194816)}}function Fu(t,a,s,o,u){return ci(a),s=Ou(t,a,s,o,void 0,u),o=Du(),t!==null&&!wt?(Ru(t,a,u),aa(t,a,u)):(Be&&o&&pu(a),a.flags|=1,Rt(t,a,s,u),a.child)}function Hh(t,a,s,o,u,p){return ci(a),a.updateQueue=null,s=Km(a,o,s,u),Pm(t),o=Du(),t!==null&&!wt?(Ru(t,a,p),aa(t,a,p)):(Be&&o&&pu(a),a.flags|=1,Rt(t,a,s,p),a.child)}function Zh(t,a,s,o,u){if(ci(a),a.stateNode===null){var p=es,y=s.contextType;typeof y=="object"&&y!==null&&(p=Dt(y)),p=new s(o,p),a.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,p.updater=Yu,a.stateNode=p,p._reactInternals=a,p=a.stateNode,p.props=o,p.state=a.memoizedState,p.refs={},Nu(a),y=s.contextType,p.context=typeof y=="object"&&y!==null?Dt(y):es,p.state=a.memoizedState,y=s.getDerivedStateFromProps,typeof y=="function"&&(Qu(a,s,y,o),p.state=a.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(y=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),y!==p.state&&Yu.enqueueReplaceState(p,p.state,null),jr(a,o,p,u),wr(),p.state=a.memoizedState),typeof p.componentDidMount=="function"&&(a.flags|=4194308),o=!0}else if(t===null){p=a.stateNode;var x=a.memoizedProps,A=hi(s,x);p.props=A;var L=p.context,I=s.contextType;y=es,typeof I=="object"&&I!==null&&(y=Dt(I));var Y=s.getDerivedStateFromProps;I=typeof Y=="function"||typeof p.getSnapshotBeforeUpdate=="function",x=a.pendingProps!==x,I||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(x||L!==y)&&Eh(a,p,o,y),ja=!1;var q=a.memoizedState;p.state=q,jr(a,o,p,u),wr(),L=a.memoizedState,x||q!==L||ja?(typeof Y=="function"&&(Qu(a,s,Y,o),L=a.memoizedState),(A=ja||Th(a,s,A,o,q,L,y))?(I||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount()),typeof p.componentDidMount=="function"&&(a.flags|=4194308)):(typeof p.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=o,a.memoizedState=L),p.props=o,p.state=L,p.context=y,o=A):(typeof p.componentDidMount=="function"&&(a.flags|=4194308),o=!1)}else{p=a.stateNode,ku(t,a),y=a.memoizedProps,I=hi(s,y),p.props=I,Y=a.pendingProps,q=p.context,L=s.contextType,A=es,typeof L=="object"&&L!==null&&(A=Dt(L)),x=s.getDerivedStateFromProps,(L=typeof x=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(y!==Y||q!==A)&&Eh(a,p,o,A),ja=!1,q=a.memoizedState,p.state=q,jr(a,o,p,u),wr();var V=a.memoizedState;y!==Y||q!==V||ja||t!==null&&t.dependencies!==null&&Uo(t.dependencies)?(typeof x=="function"&&(Qu(a,s,x,o),V=a.memoizedState),(I=ja||Th(a,s,I,o,q,V,A)||t!==null&&t.dependencies!==null&&Uo(t.dependencies))?(L||typeof p.UNSAFE_componentWillUpdate!="function"&&typeof p.componentWillUpdate!="function"||(typeof p.componentWillUpdate=="function"&&p.componentWillUpdate(o,V,A),typeof p.UNSAFE_componentWillUpdate=="function"&&p.UNSAFE_componentWillUpdate(o,V,A)),typeof p.componentDidUpdate=="function"&&(a.flags|=4),typeof p.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof p.componentDidUpdate!="function"||y===t.memoizedProps&&q===t.memoizedState||(a.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||y===t.memoizedProps&&q===t.memoizedState||(a.flags|=1024),a.memoizedProps=o,a.memoizedState=V),p.props=o,p.state=V,p.context=A,o=I):(typeof p.componentDidUpdate!="function"||y===t.memoizedProps&&q===t.memoizedState||(a.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||y===t.memoizedProps&&q===t.memoizedState||(a.flags|=1024),o=!1)}return p=o,il(t,a),o=(a.flags&128)!==0,p||o?(p=a.stateNode,s=o&&typeof s.getDerivedStateFromError!="function"?null:p.render(),a.flags|=1,t!==null&&o?(a.child=pi(a,t.child,null,u),a.child=pi(a,null,s,u)):Rt(t,a,s,u),a.memoizedState=p.state,t=a.child):t=aa(t,a,u),t}function Ph(t,a,s,o){return oi(),a.flags|=256,Rt(t,a,s,o),a.child}var Wu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ed(t){return{baseLanes:t,cachePool:Mm()}}function td(t,a,s){return t=t!==null?t.childLanes&~s:0,a&&(t|=on),t}function Kh(t,a,s){var o=a.pendingProps,u=!1,p=(a.flags&128)!==0,y;if((y=p)||(y=t!==null&&t.memoizedState===null?!1:(ht.current&2)!==0),y&&(u=!0,a.flags&=-129),y=(a.flags&32)!==0,a.flags&=-33,t===null){if(Be){if(u?Aa(a):_a(),(t=it)?(t=ty(t,yn),t=t!==null&&t.data!=="&"?t:null,t!==null&&(a.memoizedState={dehydrated:t,treeContext:va!==null?{id:Un,overflow:$n}:null,retryLane:536870912,hydrationErrors:null},s=Am(t),s.return=a,a.child=s,Ot=a,it=null)):t=null,t===null)throw xa(a);return Ld(t)?a.lanes=32:a.lanes=536870912,null}var x=o.children;return o=o.fallback,u?(_a(),u=a.mode,x=sl({mode:"hidden",children:x},u),o=ri(o,u,s,null),x.return=a,o.return=a,x.sibling=o,a.child=x,o=a.child,o.memoizedState=ed(s),o.childLanes=td(t,y,s),a.memoizedState=Wu,zr(null,o)):(Aa(a),nd(a,x))}var A=t.memoizedState;if(A!==null&&(x=A.dehydrated,x!==null)){if(p)a.flags&256?(Aa(a),a.flags&=-257,a=ad(t,a,s)):a.memoizedState!==null?(_a(),a.child=t.child,a.flags|=128,a=null):(_a(),x=o.fallback,u=a.mode,o=sl({mode:"visible",children:o.children},u),x=ri(x,u,s,null),x.flags|=2,o.return=a,x.return=a,o.sibling=x,a.child=o,pi(a,t.child,null,s),o=a.child,o.memoizedState=ed(s),o.childLanes=td(t,y,s),a.memoizedState=Wu,a=zr(null,o));else if(Aa(a),Ld(x)){if(y=x.nextSibling&&x.nextSibling.dataset,y)var L=y.dgst;y=L,o=Error(r(419)),o.stack="",o.digest=y,gr({value:o,source:null,stack:null}),a=ad(t,a,s)}else if(wt||is(t,a,s,!1),y=(s&t.childLanes)!==0,wt||y){if(y=We,y!==null&&(o=nr(y,s),o!==0&&o!==A.retryLane))throw A.retryLane=o,si(t,o),Ft(y,t,o),Ju;Bd(x)||ml(),a=ad(t,a,s)}else Bd(x)?(a.flags|=192,a.child=t.child,a=null):(t=A.treeContext,it=vn(x.nextSibling),Ot=a,Be=!0,Sa=null,yn=!1,t!==null&&Cm(a,t),a=nd(a,o.children),a.flags|=4096);return a}return u?(_a(),x=o.fallback,u=a.mode,A=t.child,L=A.sibling,o=Jn(A,{mode:"hidden",children:o.children}),o.subtreeFlags=A.subtreeFlags&65011712,L!==null?x=Jn(L,x):(x=ri(x,u,s,null),x.flags|=2),x.return=a,o.return=a,o.sibling=x,a.child=o,zr(null,o),o=a.child,x=t.child.memoizedState,x===null?x=ed(s):(u=x.cachePool,u!==null?(A=St._currentValue,u=u.parent!==A?{parent:A,pool:A}:u):u=Mm(),x={baseLanes:x.baseLanes|s,cachePool:u}),o.memoizedState=x,o.childLanes=td(t,y,s),a.memoizedState=Wu,zr(t.child,o)):(Aa(a),s=t.child,t=s.sibling,s=Jn(s,{mode:"visible",children:o.children}),s.return=a,s.sibling=null,t!==null&&(y=a.deletions,y===null?(a.deletions=[t],a.flags|=16):y.push(t)),a.child=s,a.memoizedState=null,s)}function nd(t,a){return a=sl({mode:"visible",children:a},t.mode),a.return=t,t.child=a}function sl(t,a){return t=nn(22,t,null,a),t.lanes=0,t}function ad(t,a,s){return pi(a,t.child,null,s),t=nd(a,a.pendingProps.children),t.flags|=2,a.memoizedState=null,t}function Qh(t,a,s){t.lanes|=a;var o=t.alternate;o!==null&&(o.lanes|=a),bu(t.return,a,s)}function id(t,a,s,o,u,p){var y=t.memoizedState;y===null?t.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:o,tail:s,tailMode:u,treeForkCount:p}:(y.isBackwards=a,y.rendering=null,y.renderingStartTime=0,y.last=o,y.tail=s,y.tailMode=u,y.treeForkCount=p)}function Yh(t,a,s){var o=a.pendingProps,u=o.revealOrder,p=o.tail;o=o.children;var y=ht.current,x=(y&2)!==0;if(x?(y=y&1|2,a.flags|=128):y&=1,le(ht,y),Rt(t,a,o,s),o=Be?hr:0,!x&&t!==null&&(t.flags&128)!==0)e:for(t=a.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Qh(t,s,a);else if(t.tag===19)Qh(t,s,a);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===a)break e;for(;t.sibling===null;){if(t.return===null||t.return===a)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(u){case"forwards":for(s=a.child,u=null;s!==null;)t=s.alternate,t!==null&&Ko(t)===null&&(u=s),s=s.sibling;s=u,s===null?(u=a.child,a.child=null):(u=s.sibling,s.sibling=null),id(a,!1,u,s,p,o);break;case"backwards":case"unstable_legacy-backwards":for(s=null,u=a.child,a.child=null;u!==null;){if(t=u.alternate,t!==null&&Ko(t)===null){a.child=u;break}t=u.sibling,u.sibling=s,s=u,u=t}id(a,!0,s,null,p,o);break;case"together":id(a,!1,null,null,void 0,o);break;default:a.memoizedState=null}return a.child}function aa(t,a,s){if(t!==null&&(a.dependencies=t.dependencies),Ta|=a.lanes,(s&a.childLanes)===0)if(t!==null){if(is(t,a,s,!1),(s&a.childLanes)===0)return null}else return null;if(t!==null&&a.child!==t.child)throw Error(r(153));if(a.child!==null){for(t=a.child,s=Jn(t,t.pendingProps),a.child=s,s.return=a;t.sibling!==null;)t=t.sibling,s=s.sibling=Jn(t,t.pendingProps),s.return=a;s.sibling=null}return a.child}function sd(t,a){return(t.lanes&a)!==0?!0:(t=t.dependencies,!!(t!==null&&Uo(t)))}function tx(t,a,s){switch(a.tag){case 3:tt(a,a.stateNode.containerInfo),wa(a,St,t.memoizedState.cache),oi();break;case 27:case 5:$e(a);break;case 4:tt(a,a.stateNode.containerInfo);break;case 10:wa(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,Tu(a),null;break;case 13:var o=a.memoizedState;if(o!==null)return o.dehydrated!==null?(Aa(a),a.flags|=128,null):(s&a.child.childLanes)!==0?Kh(t,a,s):(Aa(a),t=aa(t,a,s),t!==null?t.sibling:null);Aa(a);break;case 19:var u=(t.flags&128)!==0;if(o=(s&a.childLanes)!==0,o||(is(t,a,s,!1),o=(s&a.childLanes)!==0),u){if(o)return Yh(t,a,s);a.flags|=128}if(u=a.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),le(ht,ht.current),o)break;return null;case 22:return a.lanes=0,Vh(t,a,s,a.pendingProps);case 24:wa(a,St,t.memoizedState.cache)}return aa(t,a,s)}function Xh(t,a,s){if(t!==null)if(t.memoizedProps!==a.pendingProps)wt=!0;else{if(!sd(t,s)&&(a.flags&128)===0)return wt=!1,tx(t,a,s);wt=(t.flags&131072)!==0}else wt=!1,Be&&(a.flags&1048576)!==0&&zm(a,hr,a.index);switch(a.lanes=0,a.tag){case 16:e:{var o=a.pendingProps;if(t=di(a.elementType),a.type=t,typeof t=="function")uu(t)?(o=hi(t,o),a.tag=1,a=Zh(null,a,t,o,s)):(a.tag=0,a=Fu(null,a,t,o,s));else{if(t!=null){var u=t.$$typeof;if(u===K){a.tag=11,a=qh(null,a,t,o,s);break e}else if(u===D){a.tag=14,a=Uh(null,a,t,o,s);break e}}throw a=re(t)||t,Error(r(306,a,""))}}return a;case 0:return Fu(t,a,a.type,a.pendingProps,s);case 1:return o=a.type,u=hi(o,a.pendingProps),Zh(t,a,o,u,s);case 3:e:{if(tt(a,a.stateNode.containerInfo),t===null)throw Error(r(387));o=a.pendingProps;var p=a.memoizedState;u=p.element,ku(t,a),jr(a,o,null,s);var y=a.memoizedState;if(o=y.cache,wa(a,St,o),o!==p.cache&&vu(a,[St],s,!0),wr(),o=y.element,p.isDehydrated)if(p={element:o,isDehydrated:!1,cache:y.cache},a.updateQueue.baseState=p,a.memoizedState=p,a.flags&256){a=Ph(t,a,o,s);break e}else if(o!==u){u=mn(Error(r(424)),a),gr(u),a=Ph(t,a,o,s);break e}else for(t=a.stateNode.containerInfo,t.nodeType===9?t=t.body:t=t.nodeName==="HTML"?t.ownerDocument.body:t,it=vn(t.firstChild),Ot=a,Be=!0,Sa=null,yn=!0,s=Vm(a,null,o,s),a.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(oi(),o===u){a=aa(t,a,s);break e}Rt(t,a,o,s)}a=a.child}return a;case 26:return il(t,a),t===null?(s=oy(a.type,null,a.pendingProps,null))?a.memoizedState=s:Be||(s=a.type,t=a.pendingProps,o=xl(ne.current).createElement(s),o[Et]=a,o[Pt]=t,Mt(o,s,t),_t(o),a.stateNode=o):a.memoizedState=oy(a.type,t.memoizedProps,a.pendingProps,t.memoizedState),null;case 27:return $e(a),t===null&&Be&&(o=a.stateNode=iy(a.type,a.pendingProps,ne.current),Ot=a,yn=!0,u=it,Ma(a.type)?(qd=u,it=vn(o.firstChild)):it=u),Rt(t,a,a.pendingProps.children,s),il(t,a),t===null&&(a.flags|=4194304),a.child;case 5:return t===null&&Be&&((u=o=it)&&(o=Ex(o,a.type,a.pendingProps,yn),o!==null?(a.stateNode=o,Ot=a,it=vn(o.firstChild),yn=!1,u=!0):u=!1),u||xa(a)),$e(a),u=a.type,p=a.pendingProps,y=t!==null?t.memoizedProps:null,o=p.children,Dd(u,p)?o=null:y!==null&&Dd(u,y)&&(a.flags|=32),a.memoizedState!==null&&(u=Ou(t,a,PS,null,null,s),Ir._currentValue=u),il(t,a),Rt(t,a,o,s),a.child;case 6:return t===null&&Be&&((t=s=it)&&(s=Ox(s,a.pendingProps,yn),s!==null?(a.stateNode=s,Ot=a,it=null,t=!0):t=!1),t||xa(a)),null;case 13:return Kh(t,a,s);case 4:return tt(a,a.stateNode.containerInfo),o=a.pendingProps,t===null?a.child=pi(a,null,o,s):Rt(t,a,o,s),a.child;case 11:return qh(t,a,a.type,a.pendingProps,s);case 7:return Rt(t,a,a.pendingProps,s),a.child;case 8:return Rt(t,a,a.pendingProps.children,s),a.child;case 12:return Rt(t,a,a.pendingProps.children,s),a.child;case 10:return o=a.pendingProps,wa(a,a.type,o.value),Rt(t,a,o.children,s),a.child;case 9:return u=a.type._context,o=a.pendingProps.children,ci(a),u=Dt(u),o=o(u),a.flags|=1,Rt(t,a,o,s),a.child;case 14:return Uh(t,a,a.type,a.pendingProps,s);case 15:return $h(t,a,a.type,a.pendingProps,s);case 19:return Yh(t,a,s);case 31:return ex(t,a,s);case 22:return Vh(t,a,s,a.pendingProps);case 24:return ci(a),o=Dt(St),t===null?(u=wu(),u===null&&(u=We,p=Su(),u.pooledCache=p,p.refCount++,p!==null&&(u.pooledCacheLanes|=s),u=p),a.memoizedState={parent:o,cache:u},Nu(a),wa(a,St,u)):((t.lanes&s)!==0&&(ku(t,a),jr(a,null,null,s),wr()),u=t.memoizedState,p=a.memoizedState,u.parent!==o?(u={parent:o,cache:o},a.memoizedState=u,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=u),wa(a,St,o)):(o=p.cache,wa(a,St,o),o!==u.cache&&vu(a,[St],s,!0))),Rt(t,a,a.pendingProps.children,s),a.child;case 29:throw a.pendingProps}throw Error(r(156,a.tag))}function ia(t){t.flags|=4}function rd(t,a,s,o,u){if((a=(t.mode&32)!==0)&&(a=!1),a){if(t.flags|=16777216,(u&335544128)===u)if(t.stateNode.complete)t.flags|=8192;else if(jg())t.flags|=8192;else throw fi=Io,ju}else t.flags&=-16777217}function Jh(t,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!fy(a))if(jg())t.flags|=8192;else throw fi=Io,ju}function rl(t,a){a!==null&&(t.flags|=4),t.flags&16384&&(a=t.tag!==22?So():536870912,t.lanes|=a,gs|=a)}function Cr(t,a){if(!Be)switch(t.tailMode){case"hidden":a=t.tail;for(var s=null;a!==null;)a.alternate!==null&&(s=a),a=a.sibling;s===null?t.tail=null:s.sibling=null;break;case"collapsed":s=t.tail;for(var o=null;s!==null;)s.alternate!==null&&(o=s),s=s.sibling;o===null?a||t.tail===null?t.tail=null:t.tail.sibling=null:o.sibling=null}}function st(t){var a=t.alternate!==null&&t.alternate.child===t.child,s=0,o=0;if(a)for(var u=t.child;u!==null;)s|=u.lanes|u.childLanes,o|=u.subtreeFlags&65011712,o|=u.flags&65011712,u.return=t,u=u.sibling;else for(u=t.child;u!==null;)s|=u.lanes|u.childLanes,o|=u.subtreeFlags,o|=u.flags,u.return=t,u=u.sibling;return t.subtreeFlags|=o,t.childLanes=s,a}function nx(t,a,s){var o=a.pendingProps;switch(mu(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return st(a),null;case 1:return st(a),null;case 3:return s=a.stateNode,o=null,t!==null&&(o=t.memoizedState.cache),a.memoizedState.cache!==o&&(a.flags|=2048),ea(St),xe(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(t===null||t.child===null)&&(as(a)?ia(a):t===null||t.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,gu())),st(a),null;case 26:var u=a.type,p=a.memoizedState;return t===null?(ia(a),p!==null?(st(a),Jh(a,p)):(st(a),rd(a,u,null,o,s))):p?p!==t.memoizedState?(ia(a),st(a),Jh(a,p)):(st(a),a.flags&=-16777217):(t=t.memoizedProps,t!==o&&ia(a),st(a),rd(a,u,t,o,s)),null;case 27:if(Ze(a),s=ne.current,u=a.type,t!==null&&a.stateNode!=null)t.memoizedProps!==o&&ia(a);else{if(!o){if(a.stateNode===null)throw Error(r(166));return st(a),null}t=te.current,as(a)?Tm(a):(t=iy(u,o,s),a.stateNode=t,ia(a))}return st(a),null;case 5:if(Ze(a),u=a.type,t!==null&&a.stateNode!=null)t.memoizedProps!==o&&ia(a);else{if(!o){if(a.stateNode===null)throw Error(r(166));return st(a),null}if(p=te.current,as(a))Tm(a);else{var y=xl(ne.current);switch(p){case 1:p=y.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:p=y.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":p=y.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":p=y.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":p=y.createElement("div"),p.innerHTML="<script><\/script>",p=p.removeChild(p.firstChild);break;case"select":p=typeof o.is=="string"?y.createElement("select",{is:o.is}):y.createElement("select"),o.multiple?p.multiple=!0:o.size&&(p.size=o.size);break;default:p=typeof o.is=="string"?y.createElement(u,{is:o.is}):y.createElement(u)}}p[Et]=a,p[Pt]=o;e:for(y=a.child;y!==null;){if(y.tag===5||y.tag===6)p.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===a)break e;for(;y.sibling===null;){if(y.return===null||y.return===a)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}a.stateNode=p;e:switch(Mt(p,u,o),u){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&ia(a)}}return st(a),rd(a,a.type,t===null?null:t.memoizedProps,a.pendingProps,s),null;case 6:if(t&&a.stateNode!=null)t.memoizedProps!==o&&ia(a);else{if(typeof o!="string"&&a.stateNode===null)throw Error(r(166));if(t=ne.current,as(a)){if(t=a.stateNode,s=a.memoizedProps,o=null,u=Ot,u!==null)switch(u.tag){case 27:case 5:o=u.memoizedProps}t[Et]=a,t=!!(t.nodeValue===s||o!==null&&o.suppressHydrationWarning===!0||Kg(t.nodeValue,s)),t||xa(a,!0)}else t=xl(t).createTextNode(o),t[Et]=a,a.stateNode=t}return st(a),null;case 31:if(s=a.memoizedState,t===null||t.memoizedState!==null){if(o=as(a),s!==null){if(t===null){if(!o)throw Error(r(318));if(t=a.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(557));t[Et]=a}else oi(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;st(a),t=!1}else s=gu(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=s),t=!0;if(!t)return a.flags&256?(sn(a),a):(sn(a),null);if((a.flags&128)!==0)throw Error(r(558))}return st(a),null;case 13:if(o=a.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(u=as(a),o!==null&&o.dehydrated!==null){if(t===null){if(!u)throw Error(r(318));if(u=a.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(r(317));u[Et]=a}else oi(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;st(a),u=!1}else u=gu(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=u),u=!0;if(!u)return a.flags&256?(sn(a),a):(sn(a),null)}return sn(a),(a.flags&128)!==0?(a.lanes=s,a):(s=o!==null,t=t!==null&&t.memoizedState!==null,s&&(o=a.child,u=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(u=o.alternate.memoizedState.cachePool.pool),p=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(p=o.memoizedState.cachePool.pool),p!==u&&(o.flags|=2048)),s!==t&&s&&(a.child.flags|=8192),rl(a,a.updateQueue),st(a),null);case 4:return xe(),t===null&&zd(a.stateNode.containerInfo),st(a),null;case 10:return ea(a.type),st(a),null;case 19:if(Q(ht),o=a.memoizedState,o===null)return st(a),null;if(u=(a.flags&128)!==0,p=o.rendering,p===null)if(u)Cr(o,!1);else{if(pt!==0||t!==null&&(t.flags&128)!==0)for(t=a.child;t!==null;){if(p=Ko(t),p!==null){for(a.flags|=128,Cr(o,!1),t=p.updateQueue,a.updateQueue=t,rl(a,t),a.subtreeFlags=0,t=s,s=a.child;s!==null;)km(s,t),s=s.sibling;return le(ht,ht.current&1|2),Be&&Fn(a,o.treeForkCount),a.child}t=t.sibling}o.tail!==null&&Lt()>dl&&(a.flags|=128,u=!0,Cr(o,!1),a.lanes=4194304)}else{if(!u)if(t=Ko(p),t!==null){if(a.flags|=128,u=!0,t=t.updateQueue,a.updateQueue=t,rl(a,t),Cr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!p.alternate&&!Be)return st(a),null}else 2*Lt()-o.renderingStartTime>dl&&s!==536870912&&(a.flags|=128,u=!0,Cr(o,!1),a.lanes=4194304);o.isBackwards?(p.sibling=a.child,a.child=p):(t=o.last,t!==null?t.sibling=p:a.child=p,o.last=p)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Lt(),t.sibling=null,s=ht.current,le(ht,u?s&1|2:s&1),Be&&Fn(a,o.treeForkCount),t):(st(a),null);case 22:case 23:return sn(a),Cu(),o=a.memoizedState!==null,t!==null?t.memoizedState!==null!==o&&(a.flags|=8192):o&&(a.flags|=8192),o?(s&536870912)!==0&&(a.flags&128)===0&&(st(a),a.subtreeFlags&6&&(a.flags|=8192)):st(a),s=a.updateQueue,s!==null&&rl(a,s.retryQueue),s=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),o=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(o=a.memoizedState.cachePool.pool),o!==s&&(a.flags|=2048),t!==null&&Q(ui),null;case 24:return s=null,t!==null&&(s=t.memoizedState.cache),a.memoizedState.cache!==s&&(a.flags|=2048),ea(St),st(a),null;case 25:return null;case 30:return null}throw Error(r(156,a.tag))}function ax(t,a){switch(mu(a),a.tag){case 1:return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 3:return ea(St),xe(),t=a.flags,(t&65536)!==0&&(t&128)===0?(a.flags=t&-65537|128,a):null;case 26:case 27:case 5:return Ze(a),null;case 31:if(a.memoizedState!==null){if(sn(a),a.alternate===null)throw Error(r(340));oi()}return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 13:if(sn(a),t=a.memoizedState,t!==null&&t.dehydrated!==null){if(a.alternate===null)throw Error(r(340));oi()}return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 19:return Q(ht),null;case 4:return xe(),null;case 10:return ea(a.type),null;case 22:case 23:return sn(a),Cu(),t!==null&&Q(ui),t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 24:return ea(St),null;case 25:return null;default:return null}}function Fh(t,a){switch(mu(a),a.tag){case 3:ea(St),xe();break;case 26:case 27:case 5:Ze(a);break;case 4:xe();break;case 31:a.memoizedState!==null&&sn(a);break;case 13:sn(a);break;case 19:Q(ht);break;case 10:ea(a.type);break;case 22:case 23:sn(a),Cu(),t!==null&&Q(ui);break;case 24:ea(St)}}function Tr(t,a){try{var s=a.updateQueue,o=s!==null?s.lastEffect:null;if(o!==null){var u=o.next;s=u;do{if((s.tag&t)===t){o=void 0;var p=s.create,y=s.inst;o=p(),y.destroy=o}s=s.next}while(s!==u)}}catch(x){Ke(a,a.return,x)}}function za(t,a,s){try{var o=a.updateQueue,u=o!==null?o.lastEffect:null;if(u!==null){var p=u.next;o=p;do{if((o.tag&t)===t){var y=o.inst,x=y.destroy;if(x!==void 0){y.destroy=void 0,u=a;var A=s,L=x;try{L()}catch(I){Ke(u,A,I)}}}o=o.next}while(o!==p)}}catch(I){Ke(a,a.return,I)}}function Wh(t){var a=t.updateQueue;if(a!==null){var s=t.stateNode;try{Im(a,s)}catch(o){Ke(t,t.return,o)}}}function eg(t,a,s){s.props=hi(t.type,t.memoizedProps),s.state=t.memoizedState;try{s.componentWillUnmount()}catch(o){Ke(t,a,o)}}function Er(t,a){try{var s=t.ref;if(s!==null){switch(t.tag){case 26:case 27:case 5:var o=t.stateNode;break;case 30:o=t.stateNode;break;default:o=t.stateNode}typeof s=="function"?t.refCleanup=s(o):s.current=o}}catch(u){Ke(t,a,u)}}function Vn(t,a){var s=t.ref,o=t.refCleanup;if(s!==null)if(typeof o=="function")try{o()}catch(u){Ke(t,a,u)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(u){Ke(t,a,u)}else s.current=null}function tg(t){var a=t.type,s=t.memoizedProps,o=t.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":s.autoFocus&&o.focus();break e;case"img":s.src?o.src=s.src:s.srcSet&&(o.srcset=s.srcSet)}}catch(u){Ke(t,t.return,u)}}function od(t,a,s){try{var o=t.stateNode;kx(o,t.type,s,a),o[Pt]=a}catch(u){Ke(t,t.return,u)}}function ng(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Ma(t.type)||t.tag===4}function ld(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||ng(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&&Ma(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 cd(t,a,s){var o=t.tag;if(o===5||o===6)t=t.stateNode,a?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(t,a):(a=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,a.appendChild(t),s=s._reactRootContainer,s!=null||a.onclick!==null||(a.onclick=Yn));else if(o!==4&&(o===27&&Ma(t.type)&&(s=t.stateNode,a=null),t=t.child,t!==null))for(cd(t,a,s),t=t.sibling;t!==null;)cd(t,a,s),t=t.sibling}function ol(t,a,s){var o=t.tag;if(o===5||o===6)t=t.stateNode,a?s.insertBefore(t,a):s.appendChild(t);else if(o!==4&&(o===27&&Ma(t.type)&&(s=t.stateNode),t=t.child,t!==null))for(ol(t,a,s),t=t.sibling;t!==null;)ol(t,a,s),t=t.sibling}function ag(t){var a=t.stateNode,s=t.memoizedProps;try{for(var o=t.type,u=a.attributes;u.length;)a.removeAttributeNode(u[0]);Mt(a,o,s),a[Et]=t,a[Pt]=s}catch(p){Ke(t,t.return,p)}}var sa=!1,jt=!1,ud=!1,ig=typeof WeakSet=="function"?WeakSet:Set,zt=null;function ix(t,a){if(t=t.containerInfo,Ed=zl,t=gm(t),au(t)){if("selectionStart"in t)var s={start:t.selectionStart,end:t.selectionEnd};else e:{s=(s=t.ownerDocument)&&s.defaultView||window;var o=s.getSelection&&s.getSelection();if(o&&o.rangeCount!==0){s=o.anchorNode;var u=o.anchorOffset,p=o.focusNode;o=o.focusOffset;try{s.nodeType,p.nodeType}catch{s=null;break e}var y=0,x=-1,A=-1,L=0,I=0,Y=t,q=null;t:for(;;){for(var V;Y!==s||u!==0&&Y.nodeType!==3||(x=y+u),Y!==p||o!==0&&Y.nodeType!==3||(A=y+o),Y.nodeType===3&&(y+=Y.nodeValue.length),(V=Y.firstChild)!==null;)q=Y,Y=V;for(;;){if(Y===t)break t;if(q===s&&++L===u&&(x=y),q===p&&++I===o&&(A=y),(V=Y.nextSibling)!==null)break;Y=q,q=Y.parentNode}Y=V}s=x===-1||A===-1?null:{start:x,end:A}}else s=null}s=s||{start:0,end:0}}else s=null;for(Od={focusedElem:t,selectionRange:s},zl=!1,zt=a;zt!==null;)if(a=zt,t=a.child,(a.subtreeFlags&1028)!==0&&t!==null)t.return=a,zt=t;else for(;zt!==null;){switch(a=zt,p=a.alternate,t=a.flags,a.tag){case 0:if((t&4)!==0&&(t=a.updateQueue,t=t!==null?t.events:null,t!==null))for(s=0;s<t.length;s++)u=t[s],u.ref.impl=u.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&p!==null){t=void 0,s=a,u=p.memoizedProps,p=p.memoizedState,o=s.stateNode;try{var fe=hi(s.type,u);t=o.getSnapshotBeforeUpdate(fe,p),o.__reactInternalSnapshotBeforeUpdate=t}catch(we){Ke(s,s.return,we)}}break;case 3:if((t&1024)!==0){if(t=a.stateNode.containerInfo,s=t.nodeType,s===9)Md(t);else if(s===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":Md(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(r(163))}if(t=a.sibling,t!==null){t.return=a.return,zt=t;break}zt=a.return}}function sg(t,a,s){var o=s.flags;switch(s.tag){case 0:case 11:case 15:oa(t,s),o&4&&Tr(5,s);break;case 1:if(oa(t,s),o&4)if(t=s.stateNode,a===null)try{t.componentDidMount()}catch(y){Ke(s,s.return,y)}else{var u=hi(s.type,a.memoizedProps);a=a.memoizedState;try{t.componentDidUpdate(u,a,t.__reactInternalSnapshotBeforeUpdate)}catch(y){Ke(s,s.return,y)}}o&64&&Wh(s),o&512&&Er(s,s.return);break;case 3:if(oa(t,s),o&64&&(t=s.updateQueue,t!==null)){if(a=null,s.child!==null)switch(s.child.tag){case 27:case 5:a=s.child.stateNode;break;case 1:a=s.child.stateNode}try{Im(t,a)}catch(y){Ke(s,s.return,y)}}break;case 27:a===null&&o&4&&ag(s);case 26:case 5:oa(t,s),a===null&&o&4&&tg(s),o&512&&Er(s,s.return);break;case 12:oa(t,s);break;case 31:oa(t,s),o&4&&lg(t,s);break;case 13:oa(t,s),o&4&&cg(t,s),o&64&&(t=s.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(s=px.bind(null,s),Dx(t,s))));break;case 22:if(o=s.memoizedState!==null||sa,!o){a=a!==null&&a.memoizedState!==null||jt,u=sa;var p=jt;sa=o,(jt=a)&&!p?la(t,s,(s.subtreeFlags&8772)!==0):oa(t,s),sa=u,jt=p}break;case 30:break;default:oa(t,s)}}function rg(t){var a=t.alternate;a!==null&&(t.alternate=null,rg(a)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(a=t.stateNode,a!==null&&$c(a)),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 ot=null,Qt=!1;function ra(t,a,s){for(s=s.child;s!==null;)og(t,a,s),s=s.sibling}function og(t,a,s){if(qt&&typeof qt.onCommitFiberUnmount=="function")try{qt.onCommitFiberUnmount(ga,s)}catch{}switch(s.tag){case 26:jt||Vn(s,a),ra(t,a,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:jt||Vn(s,a);var o=ot,u=Qt;Ma(s.type)&&(ot=s.stateNode,Qt=!1),ra(t,a,s),$r(s.stateNode),ot=o,Qt=u;break;case 5:jt||Vn(s,a);case 6:if(o=ot,u=Qt,ot=null,ra(t,a,s),ot=o,Qt=u,ot!==null)if(Qt)try{(ot.nodeType===9?ot.body:ot.nodeName==="HTML"?ot.ownerDocument.body:ot).removeChild(s.stateNode)}catch(p){Ke(s,a,p)}else try{ot.removeChild(s.stateNode)}catch(p){Ke(s,a,p)}break;case 18:ot!==null&&(Qt?(t=ot,Wg(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,s.stateNode),Ns(t)):Wg(ot,s.stateNode));break;case 4:o=ot,u=Qt,ot=s.stateNode.containerInfo,Qt=!0,ra(t,a,s),ot=o,Qt=u;break;case 0:case 11:case 14:case 15:za(2,s,a),jt||za(4,s,a),ra(t,a,s);break;case 1:jt||(Vn(s,a),o=s.stateNode,typeof o.componentWillUnmount=="function"&&eg(s,a,o)),ra(t,a,s);break;case 21:ra(t,a,s);break;case 22:jt=(o=jt)||s.memoizedState!==null,ra(t,a,s),jt=o;break;default:ra(t,a,s)}}function lg(t,a){if(a.memoizedState===null&&(t=a.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{Ns(t)}catch(s){Ke(a,a.return,s)}}}function cg(t,a){if(a.memoizedState===null&&(t=a.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Ns(t)}catch(s){Ke(a,a.return,s)}}function sx(t){switch(t.tag){case 31:case 13:case 19:var a=t.stateNode;return a===null&&(a=t.stateNode=new ig),a;case 22:return t=t.stateNode,a=t._retryCache,a===null&&(a=t._retryCache=new ig),a;default:throw Error(r(435,t.tag))}}function ll(t,a){var s=sx(t);a.forEach(function(o){if(!s.has(o)){s.add(o);var u=mx.bind(null,t,o);o.then(u,u)}})}function Yt(t,a){var s=a.deletions;if(s!==null)for(var o=0;o<s.length;o++){var u=s[o],p=t,y=a,x=y;e:for(;x!==null;){switch(x.tag){case 27:if(Ma(x.type)){ot=x.stateNode,Qt=!1;break e}break;case 5:ot=x.stateNode,Qt=!1;break e;case 3:case 4:ot=x.stateNode.containerInfo,Qt=!0;break e}x=x.return}if(ot===null)throw Error(r(160));og(p,y,u),ot=null,Qt=!1,p=u.alternate,p!==null&&(p.return=null),u.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)ug(a,t),a=a.sibling}var On=null;function ug(t,a){var s=t.alternate,o=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:Yt(a,t),Xt(t),o&4&&(za(3,t,t.return),Tr(3,t),za(5,t,t.return));break;case 1:Yt(a,t),Xt(t),o&512&&(jt||s===null||Vn(s,s.return)),o&64&&sa&&(t=t.updateQueue,t!==null&&(o=t.callbacks,o!==null&&(s=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=s===null?o:s.concat(o))));break;case 26:var u=On;if(Yt(a,t),Xt(t),o&512&&(jt||s===null||Vn(s,s.return)),o&4){var p=s!==null?s.memoizedState:null;if(o=t.memoizedState,s===null)if(o===null)if(t.stateNode===null){e:{o=t.type,s=t.memoizedProps,u=u.ownerDocument||u;t:switch(o){case"title":p=u.getElementsByTagName("title")[0],(!p||p[ir]||p[Et]||p.namespaceURI==="http://www.w3.org/2000/svg"||p.hasAttribute("itemprop"))&&(p=u.createElement(o),u.head.insertBefore(p,u.querySelector("head > title"))),Mt(p,o,s),p[Et]=t,_t(p),o=p;break e;case"link":var y=uy("link","href",u).get(o+(s.href||""));if(y){for(var x=0;x<y.length;x++)if(p=y[x],p.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&p.getAttribute("rel")===(s.rel==null?null:s.rel)&&p.getAttribute("title")===(s.title==null?null:s.title)&&p.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){y.splice(x,1);break t}}p=u.createElement(o),Mt(p,o,s),u.head.appendChild(p);break;case"meta":if(y=uy("meta","content",u).get(o+(s.content||""))){for(x=0;x<y.length;x++)if(p=y[x],p.getAttribute("content")===(s.content==null?null:""+s.content)&&p.getAttribute("name")===(s.name==null?null:s.name)&&p.getAttribute("property")===(s.property==null?null:s.property)&&p.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&p.getAttribute("charset")===(s.charSet==null?null:s.charSet)){y.splice(x,1);break t}}p=u.createElement(o),Mt(p,o,s),u.head.appendChild(p);break;default:throw Error(r(468,o))}p[Et]=t,_t(p),o=p}t.stateNode=o}else dy(u,t.type,t.stateNode);else t.stateNode=cy(u,o,t.memoizedProps);else p!==o?(p===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):p.count--,o===null?dy(u,t.type,t.stateNode):cy(u,o,t.memoizedProps)):o===null&&t.stateNode!==null&&od(t,t.memoizedProps,s.memoizedProps)}break;case 27:Yt(a,t),Xt(t),o&512&&(jt||s===null||Vn(s,s.return)),s!==null&&o&4&&od(t,t.memoizedProps,s.memoizedProps);break;case 5:if(Yt(a,t),Xt(t),o&512&&(jt||s===null||Vn(s,s.return)),t.flags&32){u=t.stateNode;try{Ki(u,"")}catch(fe){Ke(t,t.return,fe)}}o&4&&t.stateNode!=null&&(u=t.memoizedProps,od(t,u,s!==null?s.memoizedProps:u)),o&1024&&(ud=!0);break;case 6:if(Yt(a,t),Xt(t),o&4){if(t.stateNode===null)throw Error(r(162));o=t.memoizedProps,s=t.stateNode;try{s.nodeValue=o}catch(fe){Ke(t,t.return,fe)}}break;case 3:if(Nl=null,u=On,On=wl(a.containerInfo),Yt(a,t),On=u,Xt(t),o&4&&s!==null&&s.memoizedState.isDehydrated)try{Ns(a.containerInfo)}catch(fe){Ke(t,t.return,fe)}ud&&(ud=!1,dg(t));break;case 4:o=On,On=wl(t.stateNode.containerInfo),Yt(a,t),Xt(t),On=o;break;case 12:Yt(a,t),Xt(t);break;case 31:Yt(a,t),Xt(t),o&4&&(o=t.updateQueue,o!==null&&(t.updateQueue=null,ll(t,o)));break;case 13:Yt(a,t),Xt(t),t.child.flags&8192&&t.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(ul=Lt()),o&4&&(o=t.updateQueue,o!==null&&(t.updateQueue=null,ll(t,o)));break;case 22:u=t.memoizedState!==null;var A=s!==null&&s.memoizedState!==null,L=sa,I=jt;if(sa=L||u,jt=I||A,Yt(a,t),jt=I,sa=L,Xt(t),o&8192)e:for(a=t.stateNode,a._visibility=u?a._visibility&-2:a._visibility|1,u&&(s===null||A||sa||jt||gi(t)),s=null,a=t;;){if(a.tag===5||a.tag===26){if(s===null){A=s=a;try{if(p=A.stateNode,u)y=p.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{x=A.stateNode;var Y=A.memoizedProps.style,q=Y!=null&&Y.hasOwnProperty("display")?Y.display:null;x.style.display=q==null||typeof q=="boolean"?"":(""+q).trim()}}catch(fe){Ke(A,A.return,fe)}}}else if(a.tag===6){if(s===null){A=a;try{A.stateNode.nodeValue=u?"":A.memoizedProps}catch(fe){Ke(A,A.return,fe)}}}else if(a.tag===18){if(s===null){A=a;try{var V=A.stateNode;u?ey(V,!0):ey(A.stateNode,!1)}catch(fe){Ke(A,A.return,fe)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===t)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break e;for(;a.sibling===null;){if(a.return===null||a.return===t)break e;s===a&&(s=null),a=a.return}s===a&&(s=null),a.sibling.return=a.return,a=a.sibling}o&4&&(o=t.updateQueue,o!==null&&(s=o.retryQueue,s!==null&&(o.retryQueue=null,ll(t,s))));break;case 19:Yt(a,t),Xt(t),o&4&&(o=t.updateQueue,o!==null&&(t.updateQueue=null,ll(t,o)));break;case 30:break;case 21:break;default:Yt(a,t),Xt(t)}}function Xt(t){var a=t.flags;if(a&2){try{for(var s,o=t.return;o!==null;){if(ng(o)){s=o;break}o=o.return}if(s==null)throw Error(r(160));switch(s.tag){case 27:var u=s.stateNode,p=ld(t);ol(t,p,u);break;case 5:var y=s.stateNode;s.flags&32&&(Ki(y,""),s.flags&=-33);var x=ld(t);ol(t,x,y);break;case 3:case 4:var A=s.stateNode.containerInfo,L=ld(t);cd(t,L,A);break;default:throw Error(r(161))}}catch(I){Ke(t,t.return,I)}t.flags&=-3}a&4096&&(t.flags&=-4097)}function dg(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var a=t;dg(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),t=t.sibling}}function oa(t,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)sg(t,a.alternate,a),a=a.sibling}function gi(t){for(t=t.child;t!==null;){var a=t;switch(a.tag){case 0:case 11:case 14:case 15:za(4,a,a.return),gi(a);break;case 1:Vn(a,a.return);var s=a.stateNode;typeof s.componentWillUnmount=="function"&&eg(a,a.return,s),gi(a);break;case 27:$r(a.stateNode);case 26:case 5:Vn(a,a.return),gi(a);break;case 22:a.memoizedState===null&&gi(a);break;case 30:gi(a);break;default:gi(a)}t=t.sibling}}function la(t,a,s){for(s=s&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var o=a.alternate,u=t,p=a,y=p.flags;switch(p.tag){case 0:case 11:case 15:la(u,p,s),Tr(4,p);break;case 1:if(la(u,p,s),o=p,u=o.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(L){Ke(o,o.return,L)}if(o=p,u=o.updateQueue,u!==null){var x=o.stateNode;try{var A=u.shared.hiddenCallbacks;if(A!==null)for(u.shared.hiddenCallbacks=null,u=0;u<A.length;u++)Gm(A[u],x)}catch(L){Ke(o,o.return,L)}}s&&y&64&&Wh(p),Er(p,p.return);break;case 27:ag(p);case 26:case 5:la(u,p,s),s&&o===null&&y&4&&tg(p),Er(p,p.return);break;case 12:la(u,p,s);break;case 31:la(u,p,s),s&&y&4&&lg(u,p);break;case 13:la(u,p,s),s&&y&4&&cg(u,p);break;case 22:p.memoizedState===null&&la(u,p,s),Er(p,p.return);break;case 30:break;default:la(u,p,s)}a=a.sibling}}function dd(t,a){var s=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),t=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(t=a.memoizedState.cachePool.pool),t!==s&&(t!=null&&t.refCount++,s!=null&&yr(s))}function fd(t,a){t=null,a.alternate!==null&&(t=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==t&&(a.refCount++,t!=null&&yr(t))}function Dn(t,a,s,o){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)fg(t,a,s,o),a=a.sibling}function fg(t,a,s,o){var u=a.flags;switch(a.tag){case 0:case 11:case 15:Dn(t,a,s,o),u&2048&&Tr(9,a);break;case 1:Dn(t,a,s,o);break;case 3:Dn(t,a,s,o),u&2048&&(t=null,a.alternate!==null&&(t=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==t&&(a.refCount++,t!=null&&yr(t)));break;case 12:if(u&2048){Dn(t,a,s,o),t=a.stateNode;try{var p=a.memoizedProps,y=p.id,x=p.onPostCommit;typeof x=="function"&&x(y,a.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(A){Ke(a,a.return,A)}}else Dn(t,a,s,o);break;case 31:Dn(t,a,s,o);break;case 13:Dn(t,a,s,o);break;case 23:break;case 22:p=a.stateNode,y=a.alternate,a.memoizedState!==null?p._visibility&2?Dn(t,a,s,o):Or(t,a):p._visibility&2?Dn(t,a,s,o):(p._visibility|=2,ps(t,a,s,o,(a.subtreeFlags&10256)!==0||!1)),u&2048&&dd(y,a);break;case 24:Dn(t,a,s,o),u&2048&&fd(a.alternate,a);break;default:Dn(t,a,s,o)}}function ps(t,a,s,o,u){for(u=u&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var p=t,y=a,x=s,A=o,L=y.flags;switch(y.tag){case 0:case 11:case 15:ps(p,y,x,A,u),Tr(8,y);break;case 23:break;case 22:var I=y.stateNode;y.memoizedState!==null?I._visibility&2?ps(p,y,x,A,u):Or(p,y):(I._visibility|=2,ps(p,y,x,A,u)),u&&L&2048&&dd(y.alternate,y);break;case 24:ps(p,y,x,A,u),u&&L&2048&&fd(y.alternate,y);break;default:ps(p,y,x,A,u)}a=a.sibling}}function Or(t,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var s=t,o=a,u=o.flags;switch(o.tag){case 22:Or(s,o),u&2048&&dd(o.alternate,o);break;case 24:Or(s,o),u&2048&&fd(o.alternate,o);break;default:Or(s,o)}a=a.sibling}}var Dr=8192;function ms(t,a,s){if(t.subtreeFlags&Dr)for(t=t.child;t!==null;)pg(t,a,s),t=t.sibling}function pg(t,a,s){switch(t.tag){case 26:ms(t,a,s),t.flags&Dr&&t.memoizedState!==null&&Zx(s,On,t.memoizedState,t.memoizedProps);break;case 5:ms(t,a,s);break;case 3:case 4:var o=On;On=wl(t.stateNode.containerInfo),ms(t,a,s),On=o;break;case 22:t.memoizedState===null&&(o=t.alternate,o!==null&&o.memoizedState!==null?(o=Dr,Dr=16777216,ms(t,a,s),Dr=o):ms(t,a,s));break;default:ms(t,a,s)}}function mg(t){var a=t.alternate;if(a!==null&&(t=a.child,t!==null)){a.child=null;do a=t.sibling,t.sibling=null,t=a;while(t!==null)}}function Rr(t){var a=t.deletions;if((t.flags&16)!==0){if(a!==null)for(var s=0;s<a.length;s++){var o=a[s];zt=o,gg(o,t)}mg(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)hg(t),t=t.sibling}function hg(t){switch(t.tag){case 0:case 11:case 15:Rr(t),t.flags&2048&&za(9,t,t.return);break;case 3:Rr(t);break;case 12:Rr(t);break;case 22:var a=t.stateNode;t.memoizedState!==null&&a._visibility&2&&(t.return===null||t.return.tag!==13)?(a._visibility&=-3,cl(t)):Rr(t);break;default:Rr(t)}}function cl(t){var a=t.deletions;if((t.flags&16)!==0){if(a!==null)for(var s=0;s<a.length;s++){var o=a[s];zt=o,gg(o,t)}mg(t)}for(t=t.child;t!==null;){switch(a=t,a.tag){case 0:case 11:case 15:za(8,a,a.return),cl(a);break;case 22:s=a.stateNode,s._visibility&2&&(s._visibility&=-3,cl(a));break;default:cl(a)}t=t.sibling}}function gg(t,a){for(;zt!==null;){var s=zt;switch(s.tag){case 0:case 11:case 15:za(8,s,a);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var o=s.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:yr(s.memoizedState.cache)}if(o=s.child,o!==null)o.return=s,zt=o;else e:for(s=t;zt!==null;){o=zt;var u=o.sibling,p=o.return;if(rg(o),o===s){zt=null;break e}if(u!==null){u.return=p,zt=u;break e}zt=p}}}var rx={getCacheForType:function(t){var a=Dt(St),s=a.data.get(t);return s===void 0&&(s=t(),a.data.set(t,s)),s},cacheSignal:function(){return Dt(St).controller.signal}},ox=typeof WeakMap=="function"?WeakMap:Map,Ie=0,We=null,Oe=null,Re=0,Pe=0,rn=null,Ca=!1,hs=!1,pd=!1,ca=0,pt=0,Ta=0,yi=0,md=0,on=0,gs=0,Mr=null,Jt=null,hd=!1,ul=0,yg=0,dl=1/0,fl=null,Ea=null,kt=0,Oa=null,ys=null,ua=0,gd=0,yd=null,bg=null,Br=0,bd=null;function ln(){return(Ie&2)!==0&&Re!==0?Re&-Re:U.T!==null?Nd():Rp()}function vg(){if(on===0)if((Re&536870912)===0||Be){var t=qi;qi<<=1,(qi&3932160)===0&&(qi=262144),on=t}else on=536870912;return t=an.current,t!==null&&(t.flags|=32),on}function Ft(t,a,s){(t===We&&(Pe===2||Pe===9)||t.cancelPendingCommit!==null)&&(bs(t,0),Da(t,Re,on,!1)),Fe(t,s),((Ie&2)===0||t!==We)&&(t===We&&((Ie&2)===0&&(yi|=s),pt===4&&Da(t,Re,on,!1)),Gn(t))}function Sg(t,a,s){if((Ie&6)!==0)throw Error(r(327));var o=!s&&(a&127)===0&&(a&t.expiredLanes)===0||Wa(t,a),u=o?ux(t,a):Sd(t,a,!0),p=o;do{if(u===0){hs&&!o&&Da(t,a,0,!1);break}else{if(s=t.current.alternate,p&&!lx(s)){u=Sd(t,a,!1),p=!1;continue}if(u===2){if(p=a,t.errorRecoveryDisabledLanes&p)var y=0;else y=t.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){a=y;e:{var x=t;u=Mr;var A=x.current.memoizedState.isDehydrated;if(A&&(bs(x,y).flags|=256),y=Sd(x,y,!1),y!==2){if(pd&&!A){x.errorRecoveryDisabledLanes|=p,yi|=p,u=4;break e}p=Jt,Jt=u,p!==null&&(Jt===null?Jt=p:Jt.push.apply(Jt,p))}u=y}if(p=!1,u!==2)continue}}if(u===1){bs(t,0),Da(t,a,0,!0);break}e:{switch(o=t,p=u,p){case 0:case 1:throw Error(r(345));case 4:if((a&4194048)!==a)break;case 6:Da(o,a,on,!Ca);break e;case 2:Jt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((a&62914560)===a&&(u=ul+300-Lt(),10<u)){if(Da(o,a,on,!Ca),$i(o,0,!0)!==0)break e;ua=a,o.timeoutHandle=Jg(xg.bind(null,o,s,Jt,fl,hd,a,on,yi,gs,Ca,p,"Throttled",-0,0),u);break e}xg(o,s,Jt,fl,hd,a,on,yi,gs,Ca,p,null,-0,0)}}break}while(!0);Gn(t)}function xg(t,a,s,o,u,p,y,x,A,L,I,Y,q,V){if(t.timeoutHandle=-1,Y=a.subtreeFlags,Y&8192||(Y&16785408)===16785408){Y={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Yn},pg(a,p,Y);var fe=(p&62914560)===p?ul-Lt():(p&4194048)===p?yg-Lt():0;if(fe=Px(Y,fe),fe!==null){ua=p,t.cancelPendingCommit=fe(Cg.bind(null,t,a,p,s,o,u,y,x,A,I,Y,null,q,V)),Da(t,p,y,!L);return}}Cg(t,a,p,s,o,u,y,x,A)}function lx(t){for(var a=t;;){var s=a.tag;if((s===0||s===11||s===15)&&a.flags&16384&&(s=a.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var o=0;o<s.length;o++){var u=s[o],p=u.getSnapshot;u=u.value;try{if(!tn(p(),u))return!1}catch{return!1}}if(s=a.child,a.subtreeFlags&16384&&s!==null)s.return=a,a=s;else{if(a===t)break;for(;a.sibling===null;){if(a.return===null||a.return===t)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function Da(t,a,s,o){a&=~md,a&=~yi,t.suspendedLanes|=a,t.pingedLanes&=~a,o&&(t.warmLanes|=a),o=t.expirationTimes;for(var u=a;0<u;){var p=31-mt(u),y=1<<p;o[p]=-1,u&=~y}s!==0&&xo(t,s,a)}function pl(){return(Ie&6)===0?(Lr(0),!1):!0}function vd(){if(Oe!==null){if(Pe===0)var t=Oe.return;else t=Oe,Wn=li=null,Mu(t),ls=null,vr=0,t=Oe;for(;t!==null;)Fh(t.alternate,t),t=t.return;Oe=null}}function bs(t,a){var s=t.timeoutHandle;s!==-1&&(t.timeoutHandle=-1,zx(s)),s=t.cancelPendingCommit,s!==null&&(t.cancelPendingCommit=null,s()),ua=0,vd(),We=t,Oe=s=Jn(t.current,null),Re=a,Pe=0,rn=null,Ca=!1,hs=Wa(t,a),pd=!1,gs=on=md=yi=Ta=pt=0,Jt=Mr=null,hd=!1,(a&8)!==0&&(a|=a&32);var o=t.entangledLanes;if(o!==0)for(t=t.entanglements,o&=a;0<o;){var u=31-mt(o),p=1<<u;a|=t[u],o&=~p}return ca=a,Ro(),s}function wg(t,a){ze=null,U.H=_r,a===os||a===Go?(a=qm(),Pe=3):a===ju?(a=qm(),Pe=4):Pe=a===Ju?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,rn=a,Oe===null&&(pt=1,nl(t,mn(a,t.current)))}function jg(){var t=an.current;return t===null?!0:(Re&4194048)===Re?bn===null:(Re&62914560)===Re||(Re&536870912)!==0?t===bn:!1}function Ng(){var t=U.H;return U.H=_r,t===null?_r:t}function kg(){var t=U.A;return U.A=rx,t}function ml(){pt=4,Ca||(Re&4194048)!==Re&&an.current!==null||(hs=!0),(Ta&134217727)===0&&(yi&134217727)===0||We===null||Da(We,Re,on,!1)}function Sd(t,a,s){var o=Ie;Ie|=2;var u=Ng(),p=kg();(We!==t||Re!==a)&&(fl=null,bs(t,a)),a=!1;var y=pt;e:do try{if(Pe!==0&&Oe!==null){var x=Oe,A=rn;switch(Pe){case 8:vd(),y=6;break e;case 3:case 2:case 9:case 6:an.current===null&&(a=!0);var L=Pe;if(Pe=0,rn=null,vs(t,x,A,L),s&&hs){y=0;break e}break;default:L=Pe,Pe=0,rn=null,vs(t,x,A,L)}}cx(),y=pt;break}catch(I){wg(t,I)}while(!0);return a&&t.shellSuspendCounter++,Wn=li=null,Ie=o,U.H=u,U.A=p,Oe===null&&(We=null,Re=0,Ro()),y}function cx(){for(;Oe!==null;)Ag(Oe)}function ux(t,a){var s=Ie;Ie|=2;var o=Ng(),u=kg();We!==t||Re!==a?(fl=null,dl=Lt()+500,bs(t,a)):hs=Wa(t,a);e:do try{if(Pe!==0&&Oe!==null){a=Oe;var p=rn;t:switch(Pe){case 1:Pe=0,rn=null,vs(t,a,p,1);break;case 2:case 9:if(Bm(p)){Pe=0,rn=null,_g(a);break}a=function(){Pe!==2&&Pe!==9||We!==t||(Pe=7),Gn(t)},p.then(a,a);break e;case 3:Pe=7;break e;case 4:Pe=5;break e;case 7:Bm(p)?(Pe=0,rn=null,_g(a)):(Pe=0,rn=null,vs(t,a,p,7));break;case 5:var y=null;switch(Oe.tag){case 26:y=Oe.memoizedState;case 5:case 27:var x=Oe;if(y?fy(y):x.stateNode.complete){Pe=0,rn=null;var A=x.sibling;if(A!==null)Oe=A;else{var L=x.return;L!==null?(Oe=L,hl(L)):Oe=null}break t}}Pe=0,rn=null,vs(t,a,p,5);break;case 6:Pe=0,rn=null,vs(t,a,p,6);break;case 8:vd(),pt=6;break e;default:throw Error(r(462))}}dx();break}catch(I){wg(t,I)}while(!0);return Wn=li=null,U.H=o,U.A=u,Ie=s,Oe!==null?0:(We=null,Re=0,Ro(),pt)}function dx(){for(;Oe!==null&&!go();)Ag(Oe)}function Ag(t){var a=Xh(t.alternate,t,ca);t.memoizedProps=t.pendingProps,a===null?hl(t):Oe=a}function _g(t){var a=t,s=a.alternate;switch(a.tag){case 15:case 0:a=Hh(s,a,a.pendingProps,a.type,void 0,Re);break;case 11:a=Hh(s,a,a.pendingProps,a.type.render,a.ref,Re);break;case 5:Mu(a);default:Fh(s,a),a=Oe=km(a,ca),a=Xh(s,a,ca)}t.memoizedProps=t.pendingProps,a===null?hl(t):Oe=a}function vs(t,a,s,o){Wn=li=null,Mu(a),ls=null,vr=0;var u=a.return;try{if(WS(t,u,a,s,Re)){pt=1,nl(t,mn(s,t.current)),Oe=null;return}}catch(p){if(u!==null)throw Oe=u,p;pt=1,nl(t,mn(s,t.current)),Oe=null;return}a.flags&32768?(Be||o===1?t=!0:hs||(Re&536870912)!==0?t=!1:(Ca=t=!0,(o===2||o===9||o===3||o===6)&&(o=an.current,o!==null&&o.tag===13&&(o.flags|=16384))),zg(a,t)):hl(a)}function hl(t){var a=t;do{if((a.flags&32768)!==0){zg(a,Ca);return}t=a.return;var s=nx(a.alternate,a,ca);if(s!==null){Oe=s;return}if(a=a.sibling,a!==null){Oe=a;return}Oe=a=t}while(a!==null);pt===0&&(pt=5)}function zg(t,a){do{var s=ax(t.alternate,t);if(s!==null){s.flags&=32767,Oe=s;return}if(s=t.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!a&&(t=t.sibling,t!==null)){Oe=t;return}Oe=t=s}while(t!==null);pt=6,Oe=null}function Cg(t,a,s,o,u,p,y,x,A){t.cancelPendingCommit=null;do gl();while(kt!==0);if((Ie&6)!==0)throw Error(r(327));if(a!==null){if(a===t.current)throw Error(r(177));if(p=a.lanes|a.childLanes,p|=lu,ei(t,s,p,y,x,A),t===We&&(Oe=We=null,Re=0),ys=a,Oa=t,ua=s,gd=p,yd=u,bg=o,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,hx(Mi,function(){return Rg(),null})):(t.callbackNode=null,t.callbackPriority=0),o=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||o){o=U.T,U.T=null,u=F.p,F.p=2,y=Ie,Ie|=4;try{ix(t,a,s)}finally{Ie=y,F.p=u,U.T=o}}kt=1,Tg(),Eg(),Og()}}function Tg(){if(kt===1){kt=0;var t=Oa,a=ys,s=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||s){s=U.T,U.T=null;var o=F.p;F.p=2;var u=Ie;Ie|=4;try{ug(a,t);var p=Od,y=gm(t.containerInfo),x=p.focusedElem,A=p.selectionRange;if(y!==x&&x&&x.ownerDocument&&hm(x.ownerDocument.documentElement,x)){if(A!==null&&au(x)){var L=A.start,I=A.end;if(I===void 0&&(I=L),"selectionStart"in x)x.selectionStart=L,x.selectionEnd=Math.min(I,x.value.length);else{var Y=x.ownerDocument||document,q=Y&&Y.defaultView||window;if(q.getSelection){var V=q.getSelection(),fe=x.textContent.length,we=Math.min(A.start,fe),Je=A.end===void 0?we:Math.min(A.end,fe);!V.extend&&we>Je&&(y=Je,Je=we,we=y);var O=mm(x,we),z=mm(x,Je);if(O&&z&&(V.rangeCount!==1||V.anchorNode!==O.node||V.anchorOffset!==O.offset||V.focusNode!==z.node||V.focusOffset!==z.offset)){var B=Y.createRange();B.setStart(O.node,O.offset),V.removeAllRanges(),we>Je?(V.addRange(B),V.extend(z.node,z.offset)):(B.setEnd(z.node,z.offset),V.addRange(B))}}}}for(Y=[],V=x;V=V.parentNode;)V.nodeType===1&&Y.push({element:V,left:V.scrollLeft,top:V.scrollTop});for(typeof x.focus=="function"&&x.focus(),x=0;x<Y.length;x++){var P=Y[x];P.element.scrollLeft=P.left,P.element.scrollTop=P.top}}zl=!!Ed,Od=Ed=null}finally{Ie=u,F.p=o,U.T=s}}t.current=a,kt=2}}function Eg(){if(kt===2){kt=0;var t=Oa,a=ys,s=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||s){s=U.T,U.T=null;var o=F.p;F.p=2;var u=Ie;Ie|=4;try{sg(t,a.alternate,a)}finally{Ie=u,F.p=o,U.T=s}}kt=3}}function Og(){if(kt===4||kt===3){kt=0,Bc();var t=Oa,a=ys,s=ua,o=bg;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?kt=5:(kt=0,ys=Oa=null,Dg(t,t.pendingLanes));var u=t.pendingLanes;if(u===0&&(Ea=null),Tn(s),a=a.stateNode,qt&&typeof qt.onCommitFiberRoot=="function")try{qt.onCommitFiberRoot(ga,a,void 0,(a.current.flags&128)===128)}catch{}if(o!==null){a=U.T,u=F.p,F.p=2,U.T=null;try{for(var p=t.onRecoverableError,y=0;y<o.length;y++){var x=o[y];p(x.value,{componentStack:x.stack})}}finally{U.T=a,F.p=u}}(ua&3)!==0&&gl(),Gn(t),u=t.pendingLanes,(s&261930)!==0&&(u&42)!==0?t===bd?Br++:(Br=0,bd=t):Br=0,Lr(0)}}function Dg(t,a){(t.pooledCacheLanes&=a)===0&&(a=t.pooledCache,a!=null&&(t.pooledCache=null,yr(a)))}function gl(){return Tg(),Eg(),Og(),Rg()}function Rg(){if(kt!==5)return!1;var t=Oa,a=gd;gd=0;var s=Tn(ua),o=U.T,u=F.p;try{F.p=32>s?32:s,U.T=null,s=yd,yd=null;var p=Oa,y=ua;if(kt=0,ys=Oa=null,ua=0,(Ie&6)!==0)throw Error(r(331));var x=Ie;if(Ie|=4,hg(p.current),fg(p,p.current,y,s),Ie=x,Lr(0,!1),qt&&typeof qt.onPostCommitFiberRoot=="function")try{qt.onPostCommitFiberRoot(ga,p)}catch{}return!0}finally{F.p=u,U.T=o,Dg(t,a)}}function Mg(t,a,s){a=mn(s,a),a=Xu(t.stateNode,a,2),t=ka(t,a,2),t!==null&&(Fe(t,2),Gn(t))}function Ke(t,a,s){if(t.tag===3)Mg(t,t,s);else for(;a!==null;){if(a.tag===3){Mg(a,t,s);break}else if(a.tag===1){var o=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(Ea===null||!Ea.has(o))){t=mn(s,t),s=Bh(2),o=ka(a,s,2),o!==null&&(Lh(s,o,a,t),Fe(o,2),Gn(o));break}}a=a.return}}function xd(t,a,s){var o=t.pingCache;if(o===null){o=t.pingCache=new ox;var u=new Set;o.set(a,u)}else u=o.get(a),u===void 0&&(u=new Set,o.set(a,u));u.has(s)||(pd=!0,u.add(s),t=fx.bind(null,t,a,s),a.then(t,t))}function fx(t,a,s){var o=t.pingCache;o!==null&&o.delete(a),t.pingedLanes|=t.suspendedLanes&s,t.warmLanes&=~s,We===t&&(Re&s)===s&&(pt===4||pt===3&&(Re&62914560)===Re&&300>Lt()-ul?(Ie&2)===0&&bs(t,0):md|=s,gs===Re&&(gs=0)),Gn(t)}function Bg(t,a){a===0&&(a=So()),t=si(t,a),t!==null&&(Fe(t,a),Gn(t))}function px(t){var a=t.memoizedState,s=0;a!==null&&(s=a.retryLane),Bg(t,s)}function mx(t,a){var s=0;switch(t.tag){case 31:case 13:var o=t.stateNode,u=t.memoizedState;u!==null&&(s=u.retryLane);break;case 19:o=t.stateNode;break;case 22:o=t.stateNode._retryCache;break;default:throw Error(r(314))}o!==null&&o.delete(a),Bg(t,s)}function hx(t,a){return Di(t,a)}var yl=null,Ss=null,wd=!1,bl=!1,jd=!1,Ra=0;function Gn(t){t!==Ss&&t.next===null&&(Ss===null?yl=Ss=t:Ss=Ss.next=t),bl=!0,wd||(wd=!0,yx())}function Lr(t,a){if(!jd&&bl){jd=!0;do for(var s=!1,o=yl;o!==null;){if(t!==0){var u=o.pendingLanes;if(u===0)var p=0;else{var y=o.suspendedLanes,x=o.pingedLanes;p=(1<<31-mt(42|t)+1)-1,p&=u&~(y&~x),p=p&201326741?p&201326741|1:p?p|2:0}p!==0&&(s=!0,$g(o,p))}else p=Re,p=$i(o,o===We?p:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(p&3)===0||Wa(o,p)||(s=!0,$g(o,p));o=o.next}while(s);jd=!1}}function gx(){Lg()}function Lg(){bl=wd=!1;var t=0;Ra!==0&&_x()&&(t=Ra);for(var a=Lt(),s=null,o=yl;o!==null;){var u=o.next,p=qg(o,a);p===0?(o.next=null,s===null?yl=u:s.next=u,u===null&&(Ss=s)):(s=o,(t!==0||(p&3)!==0)&&(bl=!0)),o=u}kt!==0&&kt!==5||Lr(t),Ra!==0&&(Ra=0)}function qg(t,a){for(var s=t.suspendedLanes,o=t.pingedLanes,u=t.expirationTimes,p=t.pendingLanes&-62914561;0<p;){var y=31-mt(p),x=1<<y,A=u[y];A===-1?((x&s)===0||(x&o)!==0)&&(u[y]=Kn(x,a)):A<=a&&(t.expiredLanes|=x),p&=~x}if(a=We,s=Re,s=$i(t,t===a?s:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),o=t.callbackNode,s===0||t===a&&(Pe===2||Pe===9)||t.cancelPendingCommit!==null)return o!==null&&o!==null&&Ri(o),t.callbackNode=null,t.callbackPriority=0;if((s&3)===0||Wa(t,s)){if(a=s&-s,a===t.callbackPriority)return a;switch(o!==null&&Ri(o),Tn(s)){case 2:case 8:s=bo;break;case 32:s=Mi;break;case 268435456:s=Bi;break;default:s=Mi}return o=Ug.bind(null,t),s=Di(s,o),t.callbackPriority=a,t.callbackNode=s,a}return o!==null&&o!==null&&Ri(o),t.callbackPriority=2,t.callbackNode=null,2}function Ug(t,a){if(kt!==0&&kt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var s=t.callbackNode;if(gl()&&t.callbackNode!==s)return null;var o=Re;return o=$i(t,t===We?o:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),o===0?null:(Sg(t,o,a),qg(t,Lt()),t.callbackNode!=null&&t.callbackNode===s?Ug.bind(null,t):null)}function $g(t,a){if(gl())return null;Sg(t,a,!0)}function yx(){Cx(function(){(Ie&6)!==0?Di(er,gx):Lg()})}function Nd(){if(Ra===0){var t=ss;t===0&&(t=Li,Li<<=1,(Li&261888)===0&&(Li=256)),Ra=t}return Ra}function Vg(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:Ao(""+t)}function Gg(t,a){var s=a.ownerDocument.createElement("input");return s.name=a.name,s.value=a.value,t.id&&s.setAttribute("form",t.id),a.parentNode.insertBefore(s,a),t=new FormData(t),s.parentNode.removeChild(s),t}function bx(t,a,s,o,u){if(a==="submit"&&s&&s.stateNode===u){var p=Vg((u[Pt]||null).action),y=o.submitter;y&&(a=(a=y[Pt]||null)?Vg(a.formAction):y.getAttribute("formAction"),a!==null&&(p=a,y=null));var x=new To("action","action",null,o,u);t.push({event:x,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(Ra!==0){var A=y?Gg(u,y):new FormData(u);Hu(s,{pending:!0,data:A,method:u.method,action:p},null,A)}}else typeof p=="function"&&(x.preventDefault(),A=y?Gg(u,y):new FormData(u),Hu(s,{pending:!0,data:A,method:u.method,action:p},p,A))},currentTarget:u}]})}}for(var kd=0;kd<ou.length;kd++){var Ad=ou[kd],vx=Ad.toLowerCase(),Sx=Ad[0].toUpperCase()+Ad.slice(1);En(vx,"on"+Sx)}En(vm,"onAnimationEnd"),En(Sm,"onAnimationIteration"),En(xm,"onAnimationStart"),En("dblclick","onDoubleClick"),En("focusin","onFocus"),En("focusout","onBlur"),En(BS,"onTransitionRun"),En(LS,"onTransitionStart"),En(qS,"onTransitionCancel"),En(wm,"onTransitionEnd"),Zi("onMouseEnter",["mouseout","mouseover"]),Zi("onMouseLeave",["mouseout","mouseover"]),Zi("onPointerEnter",["pointerout","pointerover"]),Zi("onPointerLeave",["pointerout","pointerover"]),ti("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ti("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ti("onBeforeInput",["compositionend","keypress","textInput","paste"]),ti("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ti("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ti("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var qr="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(" "),xx=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(qr));function Ig(t,a){a=(a&4)!==0;for(var s=0;s<t.length;s++){var o=t[s],u=o.event;o=o.listeners;e:{var p=void 0;if(a)for(var y=o.length-1;0<=y;y--){var x=o[y],A=x.instance,L=x.currentTarget;if(x=x.listener,A!==p&&u.isPropagationStopped())break e;p=x,u.currentTarget=L;try{p(u)}catch(I){Do(I)}u.currentTarget=null,p=A}else for(y=0;y<o.length;y++){if(x=o[y],A=x.instance,L=x.currentTarget,x=x.listener,A!==p&&u.isPropagationStopped())break e;p=x,u.currentTarget=L;try{p(u)}catch(I){Do(I)}u.currentTarget=null,p=A}}}}function De(t,a){var s=a[Uc];s===void 0&&(s=a[Uc]=new Set);var o=t+"__bubble";s.has(o)||(Hg(a,t,2,!1),s.add(o))}function _d(t,a,s){var o=0;a&&(o|=4),Hg(s,t,o,a)}var vl="_reactListening"+Math.random().toString(36).slice(2);function zd(t){if(!t[vl]){t[vl]=!0,Lp.forEach(function(s){s!=="selectionchange"&&(xx.has(s)||_d(s,!1,t),_d(s,!0,t))});var a=t.nodeType===9?t:t.ownerDocument;a===null||a[vl]||(a[vl]=!0,_d("selectionchange",!1,a))}}function Hg(t,a,s,o){switch(vy(a)){case 2:var u=Yx;break;case 8:u=Xx;break;default:u=Id}s=u.bind(null,a,s,t),u=void 0,!Qc||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(u=!0),o?u!==void 0?t.addEventListener(a,s,{capture:!0,passive:u}):t.addEventListener(a,s,!0):u!==void 0?t.addEventListener(a,s,{passive:u}):t.addEventListener(a,s,!1)}function Cd(t,a,s,o,u){var p=o;if((a&1)===0&&(a&2)===0&&o!==null)e:for(;;){if(o===null)return;var y=o.tag;if(y===3||y===4){var x=o.stateNode.containerInfo;if(x===u)break;if(y===4)for(y=o.return;y!==null;){var A=y.tag;if((A===3||A===4)&&y.stateNode.containerInfo===u)return;y=y.return}for(;x!==null;){if(y=Gi(x),y===null)return;if(A=y.tag,A===5||A===6||A===26||A===27){o=p=y;continue e}x=x.parentNode}}o=o.return}Yp(function(){var L=p,I=Pc(s),Y=[];e:{var q=jm.get(t);if(q!==void 0){var V=To,fe=t;switch(t){case"keypress":if(zo(s)===0)break e;case"keydown":case"keyup":V=mS;break;case"focusin":fe="focus",V=Fc;break;case"focusout":fe="blur",V=Fc;break;case"beforeblur":case"afterblur":V=Fc;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":V=Fp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":V=nS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":V=yS;break;case vm:case Sm:case xm:V=sS;break;case wm:V=vS;break;case"scroll":case"scrollend":V=eS;break;case"wheel":V=xS;break;case"copy":case"cut":case"paste":V=oS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":V=em;break;case"toggle":case"beforetoggle":V=jS}var we=(a&4)!==0,Je=!we&&(t==="scroll"||t==="scrollend"),O=we?q!==null?q+"Capture":null:q;we=[];for(var z=L,B;z!==null;){var P=z;if(B=P.stateNode,P=P.tag,P!==5&&P!==26&&P!==27||B===null||O===null||(P=rr(z,O),P!=null&&we.push(Ur(z,P,B))),Je)break;z=z.return}0<we.length&&(q=new V(q,fe,null,s,I),Y.push({event:q,listeners:we}))}}if((a&7)===0){e:{if(q=t==="mouseover"||t==="pointerover",V=t==="mouseout"||t==="pointerout",q&&s!==Zc&&(fe=s.relatedTarget||s.fromElement)&&(Gi(fe)||fe[Vi]))break e;if((V||q)&&(q=I.window===I?I:(q=I.ownerDocument)?q.defaultView||q.parentWindow:window,V?(fe=s.relatedTarget||s.toElement,V=L,fe=fe?Gi(fe):null,fe!==null&&(Je=c(fe),we=fe.tag,fe!==Je||we!==5&&we!==27&&we!==6)&&(fe=null)):(V=null,fe=L),V!==fe)){if(we=Fp,P="onMouseLeave",O="onMouseEnter",z="mouse",(t==="pointerout"||t==="pointerover")&&(we=em,P="onPointerLeave",O="onPointerEnter",z="pointer"),Je=V==null?q:sr(V),B=fe==null?q:sr(fe),q=new we(P,z+"leave",V,s,I),q.target=Je,q.relatedTarget=B,P=null,Gi(I)===L&&(we=new we(O,z+"enter",fe,s,I),we.target=B,we.relatedTarget=Je,P=we),Je=P,V&&fe)t:{for(we=wx,O=V,z=fe,B=0,P=O;P;P=we(P))B++;P=0;for(var Se=z;Se;Se=we(Se))P++;for(;0<B-P;)O=we(O),B--;for(;0<P-B;)z=we(z),P--;for(;B--;){if(O===z||z!==null&&O===z.alternate){we=O;break t}O=we(O),z=we(z)}we=null}else we=null;V!==null&&Zg(Y,q,V,we,!1),fe!==null&&Je!==null&&Zg(Y,Je,fe,we,!0)}}e:{if(q=L?sr(L):window,V=q.nodeName&&q.nodeName.toLowerCase(),V==="select"||V==="input"&&q.type==="file")var Ve=lm;else if(rm(q))if(cm)Ve=DS;else{Ve=ES;var ge=TS}else V=q.nodeName,!V||V.toLowerCase()!=="input"||q.type!=="checkbox"&&q.type!=="radio"?L&&Hc(L.elementType)&&(Ve=lm):Ve=OS;if(Ve&&(Ve=Ve(t,L))){om(Y,Ve,s,I);break e}ge&&ge(t,q,L),t==="focusout"&&L&&q.type==="number"&&L.memoizedProps.value!=null&&Ic(q,"number",q.value)}switch(ge=L?sr(L):window,t){case"focusin":(rm(ge)||ge.contentEditable==="true")&&(Ji=ge,iu=L,mr=null);break;case"focusout":mr=iu=Ji=null;break;case"mousedown":su=!0;break;case"contextmenu":case"mouseup":case"dragend":su=!1,ym(Y,s,I);break;case"selectionchange":if(MS)break;case"keydown":case"keyup":ym(Y,s,I)}var Ce;if(eu)e:{switch(t){case"compositionstart":var Me="onCompositionStart";break e;case"compositionend":Me="onCompositionEnd";break e;case"compositionupdate":Me="onCompositionUpdate";break e}Me=void 0}else Xi?im(t,s)&&(Me="onCompositionEnd"):t==="keydown"&&s.keyCode===229&&(Me="onCompositionStart");Me&&(tm&&s.locale!=="ko"&&(Xi||Me!=="onCompositionStart"?Me==="onCompositionEnd"&&Xi&&(Ce=Xp()):(ba=I,Yc="value"in ba?ba.value:ba.textContent,Xi=!0)),ge=Sl(L,Me),0<ge.length&&(Me=new Wp(Me,t,null,s,I),Y.push({event:Me,listeners:ge}),Ce?Me.data=Ce:(Ce=sm(s),Ce!==null&&(Me.data=Ce)))),(Ce=kS?AS(t,s):_S(t,s))&&(Me=Sl(L,"onBeforeInput"),0<Me.length&&(ge=new Wp("onBeforeInput","beforeinput",null,s,I),Y.push({event:ge,listeners:Me}),ge.data=Ce)),bx(Y,t,L,s,I)}Ig(Y,a)})}function Ur(t,a,s){return{instance:t,listener:a,currentTarget:s}}function Sl(t,a){for(var s=a+"Capture",o=[];t!==null;){var u=t,p=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||p===null||(u=rr(t,s),u!=null&&o.unshift(Ur(t,u,p)),u=rr(t,a),u!=null&&o.push(Ur(t,u,p))),t.tag===3)return o;t=t.return}return[]}function wx(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function Zg(t,a,s,o,u){for(var p=a._reactName,y=[];s!==null&&s!==o;){var x=s,A=x.alternate,L=x.stateNode;if(x=x.tag,A!==null&&A===o)break;x!==5&&x!==26&&x!==27||L===null||(A=L,u?(L=rr(s,p),L!=null&&y.unshift(Ur(s,L,A))):u||(L=rr(s,p),L!=null&&y.push(Ur(s,L,A)))),s=s.return}y.length!==0&&t.push({event:a,listeners:y})}var jx=/\r\n?/g,Nx=/\u0000|\uFFFD/g;function Pg(t){return(typeof t=="string"?t:""+t).replace(jx,`
10
- `).replace(Nx,"")}function Kg(t,a){return a=Pg(a),Pg(t)===a}function Xe(t,a,s,o,u,p){switch(s){case"children":typeof o=="string"?a==="body"||a==="textarea"&&o===""||Ki(t,o):(typeof o=="number"||typeof o=="bigint")&&a!=="body"&&Ki(t,""+o);break;case"className":No(t,"class",o);break;case"tabIndex":No(t,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":No(t,s,o);break;case"style":Kp(t,o,p);break;case"data":if(a!=="object"){No(t,"data",o);break}case"src":case"href":if(o===""&&(a!=="a"||s!=="href")){t.removeAttribute(s);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){t.removeAttribute(s);break}o=Ao(""+o),t.setAttribute(s,o);break;case"action":case"formAction":if(typeof o=="function"){t.setAttribute(s,"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 p=="function"&&(s==="formAction"?(a!=="input"&&Xe(t,a,"name",u.name,u,null),Xe(t,a,"formEncType",u.formEncType,u,null),Xe(t,a,"formMethod",u.formMethod,u,null),Xe(t,a,"formTarget",u.formTarget,u,null)):(Xe(t,a,"encType",u.encType,u,null),Xe(t,a,"method",u.method,u,null),Xe(t,a,"target",u.target,u,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){t.removeAttribute(s);break}o=Ao(""+o),t.setAttribute(s,o);break;case"onClick":o!=null&&(t.onclick=Yn);break;case"onScroll":o!=null&&De("scroll",t);break;case"onScrollEnd":o!=null&&De("scrollend",t);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(r(61));if(s=o.__html,s!=null){if(u.children!=null)throw Error(r(60));t.innerHTML=s}}break;case"multiple":t.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":t.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){t.removeAttribute("xlink:href");break}s=Ao(""+o),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?t.setAttribute(s,""+o):t.removeAttribute(s);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":o&&typeof o!="function"&&typeof o!="symbol"?t.setAttribute(s,""):t.removeAttribute(s);break;case"capture":case"download":o===!0?t.setAttribute(s,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?t.setAttribute(s,o):t.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?t.setAttribute(s,o):t.removeAttribute(s);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?t.removeAttribute(s):t.setAttribute(s,o);break;case"popover":De("beforetoggle",t),De("toggle",t),jo(t,"popover",o);break;case"xlinkActuate":Qn(t,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":Qn(t,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":Qn(t,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":Qn(t,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":Qn(t,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":Qn(t,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":Qn(t,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":Qn(t,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":Qn(t,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":jo(t,"is",o);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=F1.get(s)||s,jo(t,s,o))}}function Td(t,a,s,o,u,p){switch(s){case"style":Kp(t,o,p);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(r(61));if(s=o.__html,s!=null){if(u.children!=null)throw Error(r(60));t.innerHTML=s}}break;case"children":typeof o=="string"?Ki(t,o):(typeof o=="number"||typeof o=="bigint")&&Ki(t,""+o);break;case"onScroll":o!=null&&De("scroll",t);break;case"onScrollEnd":o!=null&&De("scrollend",t);break;case"onClick":o!=null&&(t.onclick=Yn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!qp.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(u=s.endsWith("Capture"),a=s.slice(2,u?s.length-7:void 0),p=t[Pt]||null,p=p!=null?p[s]:null,typeof p=="function"&&t.removeEventListener(a,p,u),typeof o=="function")){typeof p!="function"&&p!==null&&(s in t?t[s]=null:t.hasAttribute(s)&&t.removeAttribute(s)),t.addEventListener(a,o,u);break e}s in t?t[s]=o:o===!0?t.setAttribute(s,""):jo(t,s,o)}}}function Mt(t,a,s){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":De("error",t),De("load",t);var o=!1,u=!1,p;for(p in s)if(s.hasOwnProperty(p)){var y=s[p];if(y!=null)switch(p){case"src":o=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,a));default:Xe(t,a,p,y,s,null)}}u&&Xe(t,a,"srcSet",s.srcSet,s,null),o&&Xe(t,a,"src",s.src,s,null);return;case"input":De("invalid",t);var x=p=y=u=null,A=null,L=null;for(o in s)if(s.hasOwnProperty(o)){var I=s[o];if(I!=null)switch(o){case"name":u=I;break;case"type":y=I;break;case"checked":A=I;break;case"defaultChecked":L=I;break;case"value":p=I;break;case"defaultValue":x=I;break;case"children":case"dangerouslySetInnerHTML":if(I!=null)throw Error(r(137,a));break;default:Xe(t,a,o,I,s,null)}}Ip(t,p,x,A,L,y,u,!1);return;case"select":De("invalid",t),o=y=p=null;for(u in s)if(s.hasOwnProperty(u)&&(x=s[u],x!=null))switch(u){case"value":p=x;break;case"defaultValue":y=x;break;case"multiple":o=x;default:Xe(t,a,u,x,s,null)}a=p,s=y,t.multiple=!!o,a!=null?Pi(t,!!o,a,!1):s!=null&&Pi(t,!!o,s,!0);return;case"textarea":De("invalid",t),p=u=o=null;for(y in s)if(s.hasOwnProperty(y)&&(x=s[y],x!=null))switch(y){case"value":o=x;break;case"defaultValue":u=x;break;case"children":p=x;break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(r(91));break;default:Xe(t,a,y,x,s,null)}Zp(t,o,u,p);return;case"option":for(A in s)s.hasOwnProperty(A)&&(o=s[A],o!=null)&&(A==="selected"?t.selected=o&&typeof o!="function"&&typeof o!="symbol":Xe(t,a,A,o,s,null));return;case"dialog":De("beforetoggle",t),De("toggle",t),De("cancel",t),De("close",t);break;case"iframe":case"object":De("load",t);break;case"video":case"audio":for(o=0;o<qr.length;o++)De(qr[o],t);break;case"image":De("error",t),De("load",t);break;case"details":De("toggle",t);break;case"embed":case"source":case"link":De("error",t),De("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(L in s)if(s.hasOwnProperty(L)&&(o=s[L],o!=null))switch(L){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,a));default:Xe(t,a,L,o,s,null)}return;default:if(Hc(a)){for(I in s)s.hasOwnProperty(I)&&(o=s[I],o!==void 0&&Td(t,a,I,o,s,void 0));return}}for(x in s)s.hasOwnProperty(x)&&(o=s[x],o!=null&&Xe(t,a,x,o,s,null))}function kx(t,a,s,o){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var u=null,p=null,y=null,x=null,A=null,L=null,I=null;for(V in s){var Y=s[V];if(s.hasOwnProperty(V)&&Y!=null)switch(V){case"checked":break;case"value":break;case"defaultValue":A=Y;default:o.hasOwnProperty(V)||Xe(t,a,V,null,o,Y)}}for(var q in o){var V=o[q];if(Y=s[q],o.hasOwnProperty(q)&&(V!=null||Y!=null))switch(q){case"type":p=V;break;case"name":u=V;break;case"checked":L=V;break;case"defaultChecked":I=V;break;case"value":y=V;break;case"defaultValue":x=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(r(137,a));break;default:V!==Y&&Xe(t,a,q,V,o,Y)}}Gc(t,y,x,A,L,I,p,u);return;case"select":V=y=x=q=null;for(p in s)if(A=s[p],s.hasOwnProperty(p)&&A!=null)switch(p){case"value":break;case"multiple":V=A;default:o.hasOwnProperty(p)||Xe(t,a,p,null,o,A)}for(u in o)if(p=o[u],A=s[u],o.hasOwnProperty(u)&&(p!=null||A!=null))switch(u){case"value":q=p;break;case"defaultValue":x=p;break;case"multiple":y=p;default:p!==A&&Xe(t,a,u,p,o,A)}a=x,s=y,o=V,q!=null?Pi(t,!!s,q,!1):!!o!=!!s&&(a!=null?Pi(t,!!s,a,!0):Pi(t,!!s,s?[]:"",!1));return;case"textarea":V=q=null;for(x in s)if(u=s[x],s.hasOwnProperty(x)&&u!=null&&!o.hasOwnProperty(x))switch(x){case"value":break;case"children":break;default:Xe(t,a,x,null,o,u)}for(y in o)if(u=o[y],p=s[y],o.hasOwnProperty(y)&&(u!=null||p!=null))switch(y){case"value":q=u;break;case"defaultValue":V=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(r(91));break;default:u!==p&&Xe(t,a,y,u,o,p)}Hp(t,q,V);return;case"option":for(var fe in s)q=s[fe],s.hasOwnProperty(fe)&&q!=null&&!o.hasOwnProperty(fe)&&(fe==="selected"?t.selected=!1:Xe(t,a,fe,null,o,q));for(A in o)q=o[A],V=s[A],o.hasOwnProperty(A)&&q!==V&&(q!=null||V!=null)&&(A==="selected"?t.selected=q&&typeof q!="function"&&typeof q!="symbol":Xe(t,a,A,q,o,V));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 we in s)q=s[we],s.hasOwnProperty(we)&&q!=null&&!o.hasOwnProperty(we)&&Xe(t,a,we,null,o,q);for(L in o)if(q=o[L],V=s[L],o.hasOwnProperty(L)&&q!==V&&(q!=null||V!=null))switch(L){case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(r(137,a));break;default:Xe(t,a,L,q,o,V)}return;default:if(Hc(a)){for(var Je in s)q=s[Je],s.hasOwnProperty(Je)&&q!==void 0&&!o.hasOwnProperty(Je)&&Td(t,a,Je,void 0,o,q);for(I in o)q=o[I],V=s[I],!o.hasOwnProperty(I)||q===V||q===void 0&&V===void 0||Td(t,a,I,q,o,V);return}}for(var O in s)q=s[O],s.hasOwnProperty(O)&&q!=null&&!o.hasOwnProperty(O)&&Xe(t,a,O,null,o,q);for(Y in o)q=o[Y],V=s[Y],!o.hasOwnProperty(Y)||q===V||q==null&&V==null||Xe(t,a,Y,q,o,V)}function Qg(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Ax(){if(typeof performance.getEntriesByType=="function"){for(var t=0,a=0,s=performance.getEntriesByType("resource"),o=0;o<s.length;o++){var u=s[o],p=u.transferSize,y=u.initiatorType,x=u.duration;if(p&&x&&Qg(y)){for(y=0,x=u.responseEnd,o+=1;o<s.length;o++){var A=s[o],L=A.startTime;if(L>x)break;var I=A.transferSize,Y=A.initiatorType;I&&Qg(Y)&&(A=A.responseEnd,y+=I*(A<x?1:(x-L)/(A-L)))}if(--o,a+=8*(p+y)/(u.duration/1e3),t++,10<t)break}}if(0<t)return a/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var Ed=null,Od=null;function xl(t){return t.nodeType===9?t:t.ownerDocument}function Yg(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 Xg(t,a){if(t===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&a==="foreignObject"?0:t}function Dd(t,a){return t==="textarea"||t==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var Rd=null;function _x(){var t=window.event;return t&&t.type==="popstate"?t===Rd?!1:(Rd=t,!0):(Rd=null,!1)}var Jg=typeof setTimeout=="function"?setTimeout:void 0,zx=typeof clearTimeout=="function"?clearTimeout:void 0,Fg=typeof Promise=="function"?Promise:void 0,Cx=typeof queueMicrotask=="function"?queueMicrotask:typeof Fg<"u"?function(t){return Fg.resolve(null).then(t).catch(Tx)}:Jg;function Tx(t){setTimeout(function(){throw t})}function Ma(t){return t==="head"}function Wg(t,a){var s=a,o=0;do{var u=s.nextSibling;if(t.removeChild(s),u&&u.nodeType===8)if(s=u.data,s==="/$"||s==="/&"){if(o===0){t.removeChild(u),Ns(a);return}o--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")o++;else if(s==="html")$r(t.ownerDocument.documentElement);else if(s==="head"){s=t.ownerDocument.head,$r(s);for(var p=s.firstChild;p;){var y=p.nextSibling,x=p.nodeName;p[ir]||x==="SCRIPT"||x==="STYLE"||x==="LINK"&&p.rel.toLowerCase()==="stylesheet"||s.removeChild(p),p=y}}else s==="body"&&$r(t.ownerDocument.body);s=u}while(s);Ns(a)}function ey(t,a){var s=t;t=0;do{var o=s.nextSibling;if(s.nodeType===1?a?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(a?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),o&&o.nodeType===8)if(s=o.data,s==="/$"){if(t===0)break;t--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||t++;s=o}while(s)}function Md(t){var a=t.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var s=a;switch(a=a.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":Md(s),$c(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}t.removeChild(s)}}function Ex(t,a,s,o){for(;t.nodeType===1;){var u=s;if(t.nodeName.toLowerCase()!==a.toLowerCase()){if(!o&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(o){if(!t[ir])switch(a){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(p=t.getAttribute("rel"),p==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(p!==u.rel||t.getAttribute("href")!==(u.href==null||u.href===""?null:u.href)||t.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||t.getAttribute("title")!==(u.title==null?null:u.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(p=t.getAttribute("src"),(p!==(u.src==null?null:u.src)||t.getAttribute("type")!==(u.type==null?null:u.type)||t.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&p&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(a==="input"&&t.type==="hidden"){var p=u.name==null?null:""+u.name;if(u.type==="hidden"&&t.getAttribute("name")===p)return t}else return t;if(t=vn(t.nextSibling),t===null)break}return null}function Ox(t,a,s){if(a==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!s||(t=vn(t.nextSibling),t===null))return null;return t}function ty(t,a){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!a||(t=vn(t.nextSibling),t===null))return null;return t}function Bd(t){return t.data==="$?"||t.data==="$~"}function Ld(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function Dx(t,a){var s=t.ownerDocument;if(t.data==="$~")t._reactRetry=a;else if(t.data!=="$?"||s.readyState!=="loading")a();else{var o=function(){a(),s.removeEventListener("DOMContentLoaded",o)};s.addEventListener("DOMContentLoaded",o),t._reactRetry=o}}function vn(t){for(;t!=null;t=t.nextSibling){var a=t.nodeType;if(a===1||a===3)break;if(a===8){if(a=t.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return t}var qd=null;function ny(t){t=t.nextSibling;for(var a=0;t;){if(t.nodeType===8){var s=t.data;if(s==="/$"||s==="/&"){if(a===0)return vn(t.nextSibling);a--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||a++}t=t.nextSibling}return null}function ay(t){t=t.previousSibling;for(var a=0;t;){if(t.nodeType===8){var s=t.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(a===0)return t;a--}else s!=="/$"&&s!=="/&"||a++}t=t.previousSibling}return null}function iy(t,a,s){switch(a=xl(s),t){case"html":if(t=a.documentElement,!t)throw Error(r(452));return t;case"head":if(t=a.head,!t)throw Error(r(453));return t;case"body":if(t=a.body,!t)throw Error(r(454));return t;default:throw Error(r(451))}}function $r(t){for(var a=t.attributes;a.length;)t.removeAttributeNode(a[0]);$c(t)}var Sn=new Map,sy=new Set;function wl(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var da=F.d;F.d={f:Rx,r:Mx,D:Bx,C:Lx,L:qx,m:Ux,X:Vx,S:$x,M:Gx};function Rx(){var t=da.f(),a=pl();return t||a}function Mx(t){var a=Ii(t);a!==null&&a.tag===5&&a.type==="form"?wh(a):da.r(t)}var xs=typeof document>"u"?null:document;function ry(t,a,s){var o=xs;if(o&&typeof a=="string"&&a){var u=fn(a);u='link[rel="'+t+'"][href="'+u+'"]',typeof s=="string"&&(u+='[crossorigin="'+s+'"]'),sy.has(u)||(sy.add(u),t={rel:t,crossOrigin:s,href:a},o.querySelector(u)===null&&(a=o.createElement("link"),Mt(a,"link",t),_t(a),o.head.appendChild(a)))}}function Bx(t){da.D(t),ry("dns-prefetch",t,null)}function Lx(t,a){da.C(t,a),ry("preconnect",t,a)}function qx(t,a,s){da.L(t,a,s);var o=xs;if(o&&t&&a){var u='link[rel="preload"][as="'+fn(a)+'"]';a==="image"&&s&&s.imageSrcSet?(u+='[imagesrcset="'+fn(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(u+='[imagesizes="'+fn(s.imageSizes)+'"]')):u+='[href="'+fn(t)+'"]';var p=u;switch(a){case"style":p=ws(t);break;case"script":p=js(t)}Sn.has(p)||(t=S({rel:"preload",href:a==="image"&&s&&s.imageSrcSet?void 0:t,as:a},s),Sn.set(p,t),o.querySelector(u)!==null||a==="style"&&o.querySelector(Vr(p))||a==="script"&&o.querySelector(Gr(p))||(a=o.createElement("link"),Mt(a,"link",t),_t(a),o.head.appendChild(a)))}}function Ux(t,a){da.m(t,a);var s=xs;if(s&&t){var o=a&&typeof a.as=="string"?a.as:"script",u='link[rel="modulepreload"][as="'+fn(o)+'"][href="'+fn(t)+'"]',p=u;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":p=js(t)}if(!Sn.has(p)&&(t=S({rel:"modulepreload",href:t},a),Sn.set(p,t),s.querySelector(u)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(Gr(p)))return}o=s.createElement("link"),Mt(o,"link",t),_t(o),s.head.appendChild(o)}}}function $x(t,a,s){da.S(t,a,s);var o=xs;if(o&&t){var u=Hi(o).hoistableStyles,p=ws(t);a=a||"default";var y=u.get(p);if(!y){var x={loading:0,preload:null};if(y=o.querySelector(Vr(p)))x.loading=5;else{t=S({rel:"stylesheet",href:t,"data-precedence":a},s),(s=Sn.get(p))&&Ud(t,s);var A=y=o.createElement("link");_t(A),Mt(A,"link",t),A._p=new Promise(function(L,I){A.onload=L,A.onerror=I}),A.addEventListener("load",function(){x.loading|=1}),A.addEventListener("error",function(){x.loading|=2}),x.loading|=4,jl(y,a,o)}y={type:"stylesheet",instance:y,count:1,state:x},u.set(p,y)}}}function Vx(t,a){da.X(t,a);var s=xs;if(s&&t){var o=Hi(s).hoistableScripts,u=js(t),p=o.get(u);p||(p=s.querySelector(Gr(u)),p||(t=S({src:t,async:!0},a),(a=Sn.get(u))&&$d(t,a),p=s.createElement("script"),_t(p),Mt(p,"link",t),s.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},o.set(u,p))}}function Gx(t,a){da.M(t,a);var s=xs;if(s&&t){var o=Hi(s).hoistableScripts,u=js(t),p=o.get(u);p||(p=s.querySelector(Gr(u)),p||(t=S({src:t,async:!0,type:"module"},a),(a=Sn.get(u))&&$d(t,a),p=s.createElement("script"),_t(p),Mt(p,"link",t),s.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},o.set(u,p))}}function oy(t,a,s,o){var u=(u=ne.current)?wl(u):null;if(!u)throw Error(r(446));switch(t){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(a=ws(s.href),s=Hi(u).hoistableStyles,o=s.get(a),o||(o={type:"style",instance:null,count:0,state:null},s.set(a,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){t=ws(s.href);var p=Hi(u).hoistableStyles,y=p.get(t);if(y||(u=u.ownerDocument||u,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},p.set(t,y),(p=u.querySelector(Vr(t)))&&!p._p&&(y.instance=p,y.state.loading=5),Sn.has(t)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},Sn.set(t,s),p||Ix(u,t,s,y.state))),a&&o===null)throw Error(r(528,""));return y}if(a&&o!==null)throw Error(r(529,""));return null;case"script":return a=s.async,s=s.src,typeof s=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=js(s),s=Hi(u).hoistableScripts,o=s.get(a),o||(o={type:"script",instance:null,count:0,state:null},s.set(a,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,t))}}function ws(t){return'href="'+fn(t)+'"'}function Vr(t){return'link[rel="stylesheet"]['+t+"]"}function ly(t){return S({},t,{"data-precedence":t.precedence,precedence:null})}function Ix(t,a,s,o){t.querySelector('link[rel="preload"][as="style"]['+a+"]")?o.loading=1:(a=t.createElement("link"),o.preload=a,a.addEventListener("load",function(){return o.loading|=1}),a.addEventListener("error",function(){return o.loading|=2}),Mt(a,"link",s),_t(a),t.head.appendChild(a))}function js(t){return'[src="'+fn(t)+'"]'}function Gr(t){return"script[async]"+t}function cy(t,a,s){if(a.count++,a.instance===null)switch(a.type){case"style":var o=t.querySelector('style[data-href~="'+fn(s.href)+'"]');if(o)return a.instance=o,_t(o),o;var u=S({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return o=(t.ownerDocument||t).createElement("style"),_t(o),Mt(o,"style",u),jl(o,s.precedence,t),a.instance=o;case"stylesheet":u=ws(s.href);var p=t.querySelector(Vr(u));if(p)return a.state.loading|=4,a.instance=p,_t(p),p;o=ly(s),(u=Sn.get(u))&&Ud(o,u),p=(t.ownerDocument||t).createElement("link"),_t(p);var y=p;return y._p=new Promise(function(x,A){y.onload=x,y.onerror=A}),Mt(p,"link",o),a.state.loading|=4,jl(p,s.precedence,t),a.instance=p;case"script":return p=js(s.src),(u=t.querySelector(Gr(p)))?(a.instance=u,_t(u),u):(o=s,(u=Sn.get(p))&&(o=S({},s),$d(o,u)),t=t.ownerDocument||t,u=t.createElement("script"),_t(u),Mt(u,"link",o),t.head.appendChild(u),a.instance=u);case"void":return null;default:throw Error(r(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(o=a.instance,a.state.loading|=4,jl(o,s.precedence,t));return a.instance}function jl(t,a,s){for(var o=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=o.length?o[o.length-1]:null,p=u,y=0;y<o.length;y++){var x=o[y];if(x.dataset.precedence===a)p=x;else if(p!==u)break}p?p.parentNode.insertBefore(t,p.nextSibling):(a=s.nodeType===9?s.head:s,a.insertBefore(t,a.firstChild))}function Ud(t,a){t.crossOrigin==null&&(t.crossOrigin=a.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=a.referrerPolicy),t.title==null&&(t.title=a.title)}function $d(t,a){t.crossOrigin==null&&(t.crossOrigin=a.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=a.referrerPolicy),t.integrity==null&&(t.integrity=a.integrity)}var Nl=null;function uy(t,a,s){if(Nl===null){var o=new Map,u=Nl=new Map;u.set(s,o)}else u=Nl,o=u.get(s),o||(o=new Map,u.set(s,o));if(o.has(t))return o;for(o.set(t,null),s=s.getElementsByTagName(t),u=0;u<s.length;u++){var p=s[u];if(!(p[ir]||p[Et]||t==="link"&&p.getAttribute("rel")==="stylesheet")&&p.namespaceURI!=="http://www.w3.org/2000/svg"){var y=p.getAttribute(a)||"";y=t+y;var x=o.get(y);x?x.push(p):o.set(y,[p])}}return o}function dy(t,a,s){t=t.ownerDocument||t,t.head.insertBefore(s,a==="title"?t.querySelector("head > title"):null)}function Hx(t,a,s){if(s===1||a.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;return a.rel==="stylesheet"?(t=a.disabled,typeof a.precedence=="string"&&t==null):!0;case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function fy(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function Zx(t,a,s,o){if(s.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var u=ws(o.href),p=a.querySelector(Vr(u));if(p){a=p._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(t.count++,t=kl.bind(t),a.then(t,t)),s.state.loading|=4,s.instance=p,_t(p);return}p=a.ownerDocument||a,o=ly(o),(u=Sn.get(u))&&Ud(o,u),p=p.createElement("link"),_t(p);var y=p;y._p=new Promise(function(x,A){y.onload=x,y.onerror=A}),Mt(p,"link",o),s.instance=p}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(s,a),(a=s.state.preload)&&(s.state.loading&3)===0&&(t.count++,s=kl.bind(t),a.addEventListener("load",s),a.addEventListener("error",s))}}var Vd=0;function Px(t,a){return t.stylesheets&&t.count===0&&_l(t,t.stylesheets),0<t.count||0<t.imgCount?function(s){var o=setTimeout(function(){if(t.stylesheets&&_l(t,t.stylesheets),t.unsuspend){var p=t.unsuspend;t.unsuspend=null,p()}},6e4+a);0<t.imgBytes&&Vd===0&&(Vd=62500*Ax());var u=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&_l(t,t.stylesheets),t.unsuspend)){var p=t.unsuspend;t.unsuspend=null,p()}},(t.imgBytes>Vd?50:800)+a);return t.unsuspend=s,function(){t.unsuspend=null,clearTimeout(o),clearTimeout(u)}}:null}function kl(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)_l(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Al=null;function _l(t,a){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Al=new Map,a.forEach(Kx,t),Al=null,kl.call(t))}function Kx(t,a){if(!(a.state.loading&4)){var s=Al.get(t);if(s)var o=s.get(null);else{s=new Map,Al.set(t,s);for(var u=t.querySelectorAll("link[data-precedence],style[data-precedence]"),p=0;p<u.length;p++){var y=u[p];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(s.set(y.dataset.precedence,y),o=y)}o&&s.set(null,o)}u=a.instance,y=u.getAttribute("data-precedence"),p=s.get(y)||o,p===o&&s.set(null,u),s.set(y,u),this.count++,o=kl.bind(this),u.addEventListener("load",o),u.addEventListener("error",o),p?p.parentNode.insertBefore(u,p.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(u,t.firstChild)),a.state.loading|=4}}var Ir={$$typeof:H,Provider:null,Consumer:null,_currentValue:de,_currentValue2:de,_threadCount:0};function Qx(t,a,s,o,u,p,y,x,A){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=ee(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ee(0),this.hiddenUpdates=ee(null),this.identifierPrefix=o,this.onUncaughtError=u,this.onCaughtError=p,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=A,this.incompleteTransitions=new Map}function py(t,a,s,o,u,p,y,x,A,L,I,Y){return t=new Qx(t,a,s,y,A,L,I,Y,x),a=1,p===!0&&(a|=24),p=nn(3,null,null,a),t.current=p,p.stateNode=t,a=Su(),a.refCount++,t.pooledCache=a,a.refCount++,p.memoizedState={element:o,isDehydrated:s,cache:a},Nu(p),t}function my(t){return t?(t=es,t):es}function hy(t,a,s,o,u,p){u=my(u),o.context===null?o.context=u:o.pendingContext=u,o=Na(a),o.payload={element:s},p=p===void 0?null:p,p!==null&&(o.callback=p),s=ka(t,o,a),s!==null&&(Ft(s,t,a),xr(s,t,a))}function gy(t,a){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var s=t.retryLane;t.retryLane=s!==0&&s<a?s:a}}function Gd(t,a){gy(t,a),(t=t.alternate)&&gy(t,a)}function yy(t){if(t.tag===13||t.tag===31){var a=si(t,67108864);a!==null&&Ft(a,t,67108864),Gd(t,67108864)}}function by(t){if(t.tag===13||t.tag===31){var a=ln();a=ar(a);var s=si(t,a);s!==null&&Ft(s,t,a),Gd(t,a)}}var zl=!0;function Yx(t,a,s,o){var u=U.T;U.T=null;var p=F.p;try{F.p=2,Id(t,a,s,o)}finally{F.p=p,U.T=u}}function Xx(t,a,s,o){var u=U.T;U.T=null;var p=F.p;try{F.p=8,Id(t,a,s,o)}finally{F.p=p,U.T=u}}function Id(t,a,s,o){if(zl){var u=Hd(o);if(u===null)Cd(t,a,o,Cl,s),Sy(t,o);else if(Fx(u,t,a,s,o))o.stopPropagation();else if(Sy(t,o),a&4&&-1<Jx.indexOf(t)){for(;u!==null;){var p=Ii(u);if(p!==null)switch(p.tag){case 3:if(p=p.stateNode,p.current.memoizedState.isDehydrated){var y=Pn(p.pendingLanes);if(y!==0){var x=p;for(x.pendingLanes|=2,x.entangledLanes|=2;y;){var A=1<<31-mt(y);x.entanglements[1]|=A,y&=~A}Gn(p),(Ie&6)===0&&(dl=Lt()+500,Lr(0))}}break;case 31:case 13:x=si(p,2),x!==null&&Ft(x,p,2),pl(),Gd(p,2)}if(p=Hd(o),p===null&&Cd(t,a,o,Cl,s),p===u)break;u=p}u!==null&&o.stopPropagation()}else Cd(t,a,o,null,s)}}function Hd(t){return t=Pc(t),Zd(t)}var Cl=null;function Zd(t){if(Cl=null,t=Gi(t),t!==null){var a=c(t);if(a===null)t=null;else{var s=a.tag;if(s===13){if(t=d(a),t!==null)return t;t=null}else if(s===31){if(t=m(a),t!==null)return t;t=null}else if(s===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;t=null}else a!==t&&(t=null)}}return Cl=t,null}function vy(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(yo()){case er:return 2;case bo:return 8;case Mi:case Lc:return 32;case Bi:return 268435456;default:return 32}default:return 32}}var Pd=!1,Ba=null,La=null,qa=null,Hr=new Map,Zr=new Map,Ua=[],Jx="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 Sy(t,a){switch(t){case"focusin":case"focusout":Ba=null;break;case"dragenter":case"dragleave":La=null;break;case"mouseover":case"mouseout":qa=null;break;case"pointerover":case"pointerout":Hr.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":Zr.delete(a.pointerId)}}function Pr(t,a,s,o,u,p){return t===null||t.nativeEvent!==p?(t={blockedOn:a,domEventName:s,eventSystemFlags:o,nativeEvent:p,targetContainers:[u]},a!==null&&(a=Ii(a),a!==null&&yy(a)),t):(t.eventSystemFlags|=o,a=t.targetContainers,u!==null&&a.indexOf(u)===-1&&a.push(u),t)}function Fx(t,a,s,o,u){switch(a){case"focusin":return Ba=Pr(Ba,t,a,s,o,u),!0;case"dragenter":return La=Pr(La,t,a,s,o,u),!0;case"mouseover":return qa=Pr(qa,t,a,s,o,u),!0;case"pointerover":var p=u.pointerId;return Hr.set(p,Pr(Hr.get(p)||null,t,a,s,o,u)),!0;case"gotpointercapture":return p=u.pointerId,Zr.set(p,Pr(Zr.get(p)||null,t,a,s,o,u)),!0}return!1}function xy(t){var a=Gi(t.target);if(a!==null){var s=c(a);if(s!==null){if(a=s.tag,a===13){if(a=d(s),a!==null){t.blockedOn=a,Mp(t.priority,function(){by(s)});return}}else if(a===31){if(a=m(s),a!==null){t.blockedOn=a,Mp(t.priority,function(){by(s)});return}}else if(a===3&&s.stateNode.current.memoizedState.isDehydrated){t.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Tl(t){if(t.blockedOn!==null)return!1;for(var a=t.targetContainers;0<a.length;){var s=Hd(t.nativeEvent);if(s===null){s=t.nativeEvent;var o=new s.constructor(s.type,s);Zc=o,s.target.dispatchEvent(o),Zc=null}else return a=Ii(s),a!==null&&yy(a),t.blockedOn=s,!1;a.shift()}return!0}function wy(t,a,s){Tl(t)&&s.delete(a)}function Wx(){Pd=!1,Ba!==null&&Tl(Ba)&&(Ba=null),La!==null&&Tl(La)&&(La=null),qa!==null&&Tl(qa)&&(qa=null),Hr.forEach(wy),Zr.forEach(wy)}function El(t,a){t.blockedOn===a&&(t.blockedOn=null,Pd||(Pd=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Wx)))}var Ol=null;function jy(t){Ol!==t&&(Ol=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Ol===t&&(Ol=null);for(var a=0;a<t.length;a+=3){var s=t[a],o=t[a+1],u=t[a+2];if(typeof o!="function"){if(Zd(o||s)===null)continue;break}var p=Ii(s);p!==null&&(t.splice(a,3),a-=3,Hu(p,{pending:!0,data:u,method:s.method,action:o},o,u))}}))}function Ns(t){function a(A){return El(A,t)}Ba!==null&&El(Ba,t),La!==null&&El(La,t),qa!==null&&El(qa,t),Hr.forEach(a),Zr.forEach(a);for(var s=0;s<Ua.length;s++){var o=Ua[s];o.blockedOn===t&&(o.blockedOn=null)}for(;0<Ua.length&&(s=Ua[0],s.blockedOn===null);)xy(s),s.blockedOn===null&&Ua.shift();if(s=(t.ownerDocument||t).$$reactFormReplay,s!=null)for(o=0;o<s.length;o+=3){var u=s[o],p=s[o+1],y=u[Pt]||null;if(typeof p=="function")y||jy(s);else if(y){var x=null;if(p&&p.hasAttribute("formAction")){if(u=p,y=p[Pt]||null)x=y.formAction;else if(Zd(u)!==null)continue}else x=y.action;typeof x=="function"?s[o+1]=x:(s.splice(o,3),o-=3),jy(s)}}}function Ny(){function t(p){p.canIntercept&&p.info==="react-transition"&&p.intercept({handler:function(){return new Promise(function(y){return u=y})},focusReset:"manual",scroll:"manual"})}function a(){u!==null&&(u(),u=null),o||setTimeout(s,20)}function s(){if(!o&&!navigation.transition){var p=navigation.currentEntry;p&&p.url!=null&&navigation.navigate(p.url,{state:p.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,u=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(s,100),function(){o=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),u!==null&&(u(),u=null)}}}function Kd(t){this._internalRoot=t}Dl.prototype.render=Kd.prototype.render=function(t){var a=this._internalRoot;if(a===null)throw Error(r(409));var s=a.current,o=ln();hy(s,o,t,a,null,null)},Dl.prototype.unmount=Kd.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var a=t.containerInfo;hy(t.current,2,null,t,null,null),pl(),a[Vi]=null}};function Dl(t){this._internalRoot=t}Dl.prototype.unstable_scheduleHydration=function(t){if(t){var a=Rp();t={blockedOn:null,target:t,priority:a};for(var s=0;s<Ua.length&&a!==0&&a<Ua[s].priority;s++);Ua.splice(s,0,t),s===0&&xy(t)}};var ky=n.version;if(ky!=="19.2.4")throw Error(r(527,ky,"19.2.4"));F.findDOMNode=function(t){var a=t._reactInternals;if(a===void 0)throw typeof t.render=="function"?Error(r(188)):(t=Object.keys(t).join(","),Error(r(268,t)));return t=b(a),t=t!==null?v(t):null,t=t===null?null:t.stateNode,t};var ew={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Rl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Rl.isDisabled&&Rl.supportsFiber)try{ga=Rl.inject(ew),qt=Rl}catch{}}return Kr.createRoot=function(t,a){if(!l(t))throw Error(r(299));var s=!1,o="",u=Oh,p=Dh,y=Rh;return a!=null&&(a.unstable_strictMode===!0&&(s=!0),a.identifierPrefix!==void 0&&(o=a.identifierPrefix),a.onUncaughtError!==void 0&&(u=a.onUncaughtError),a.onCaughtError!==void 0&&(p=a.onCaughtError),a.onRecoverableError!==void 0&&(y=a.onRecoverableError)),a=py(t,1,!1,null,null,s,o,null,u,p,y,Ny),t[Vi]=a.current,zd(t),new Kd(a)},Kr.hydrateRoot=function(t,a,s){if(!l(t))throw Error(r(299));var o=!1,u="",p=Oh,y=Dh,x=Rh,A=null;return s!=null&&(s.unstable_strictMode===!0&&(o=!0),s.identifierPrefix!==void 0&&(u=s.identifierPrefix),s.onUncaughtError!==void 0&&(p=s.onUncaughtError),s.onCaughtError!==void 0&&(y=s.onCaughtError),s.onRecoverableError!==void 0&&(x=s.onRecoverableError),s.formState!==void 0&&(A=s.formState)),a=py(t,1,!0,a,s??null,o,u,A,p,y,x,Ny),a.context=my(null),s=a.current,o=ln(),o=ar(o),u=Na(o),u.callback=null,ka(s,u,o),s=o,a.current.lanes=s,Fe(a,s),Gn(a),t[Vi]=a.current,zd(t),new Dl(a)},Kr.version="19.2.4",Kr}var Cy;function vw(){if(Cy)return Qd.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(),Qd.exports=bw(),Qd.exports}var Sw=vw();const xw={bodySerializer:e=>JSON.stringify(e,(n,i)=>typeof i=="bigint"?i.toString():i)},ww=({onRequest:e,onSseError:n,onSseEvent:i,responseTransformer:r,responseValidator:l,sseDefaultRetryDelay:c,sseMaxRetryAttempts:d,sseMaxRetryDelay:m,sseSleepFn:g,url:b,...v})=>{let S;const w=g??(N=>new Promise(T=>setTimeout(T,N)));return{stream:async function*(){let N=c??3e3,T=0;const R=v.signal??new AbortController().signal;for(;!R.aborted;){T++;const G=v.headers instanceof Headers?v.headers:new Headers(v.headers);S!==void 0&&G.set("Last-Event-ID",S);try{const H={redirect:"follow",...v,body:v.serializedBody,headers:G,signal:R};let K=new Request(b,H);e&&(K=await e(b,H));const J=await(v.fetch??globalThis.fetch)(K);if(!J.ok)throw new Error(`SSE failed: ${J.status} ${J.statusText}`);if(!J.body)throw new Error("No body in SSE response");const D=J.body.pipeThrough(new TextDecoderStream).getReader();let M="";const oe=()=>{try{D.cancel()}catch{}};R.addEventListener("abort",oe);try{for(;;){const{done:Ne,value:Ae}=await D.read();if(Ne)break;M+=Ae;const ve=M.split(`
9
+ `+o.stack}}var Oi=Object.prototype.hasOwnProperty,Di=e.unstable_scheduleCallback,Ri=e.unstable_cancelCallback,go=e.unstable_shouldYield,Bc=e.unstable_requestPaint,Lt=e.unstable_now,yo=e.unstable_getCurrentPriorityLevel,er=e.unstable_ImmediatePriority,bo=e.unstable_UserBlockingPriority,Mi=e.unstable_NormalPriority,Lc=e.unstable_LowPriority,Bi=e.unstable_IdlePriority,vo=e.log,tr=e.unstable_setDisableYieldValue,ga=null,qt=null;function Cn(t){if(typeof vo=="function"&&tr(t),qt&&typeof qt.setStrictMode=="function")try{qt.setStrictMode(ga,t)}catch{}}var mt=Math.clz32?Math.clz32:qc,qn=Math.log,Fa=Math.LN2;function qc(t){return t>>>=0,t===0?32:31-(qn(t)/Fa|0)|0}var Li=256,qi=262144,$i=4194304;function Pn(t){var a=t&42;if(a!==0)return a;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 Ui(t,a,s){var o=t.pendingLanes;if(o===0)return 0;var u=0,p=t.suspendedLanes,y=t.pingedLanes;t=t.warmLanes;var x=o&134217727;return x!==0?(o=x&~p,o!==0?u=Pn(o):(y&=x,y!==0?u=Pn(y):s||(s=x&~t,s!==0&&(u=Pn(s))))):(x=o&~p,x!==0?u=Pn(x):y!==0?u=Pn(y):s||(s=o&~t,s!==0&&(u=Pn(s)))),u===0?0:a!==0&&a!==u&&(a&p)===0&&(p=u&-u,s=a&-a,p>=s||p===32&&(s&4194048)!==0)?a:u}function Wa(t,a){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&a)===0}function Kn(t,a){switch(t){case 1:case 2:case 4:case 8:case 64:return a+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 a+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 So(){var t=$i;return $i<<=1,($i&62914560)===0&&($i=4194304),t}function ee(t){for(var a=[],s=0;31>s;s++)a.push(t);return a}function Fe(t,a){t.pendingLanes|=a,a!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function ei(t,a,s,o,u,p){var y=t.pendingLanes;t.pendingLanes=s,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=s,t.entangledLanes&=s,t.errorRecoveryDisabledLanes&=s,t.shellSuspendCounter=0;var x=t.entanglements,A=t.expirationTimes,L=t.hiddenUpdates;for(s=y&~s;0<s;){var I=31-mt(s),Y=1<<I;x[I]=0,A[I]=-1;var q=L[I];if(q!==null)for(L[I]=null,I=0;I<q.length;I++){var V=q[I];V!==null&&(V.lane&=-536870913)}s&=~Y}o!==0&&xo(t,o,0),p!==0&&u===0&&t.tag!==0&&(t.suspendedLanes|=p&~(y&~a))}function xo(t,a,s){t.pendingLanes|=a,t.suspendedLanes&=~a;var o=31-mt(a);t.entangledLanes|=a,t.entanglements[o]=t.entanglements[o]|1073741824|s&261930}function wo(t,a){var s=t.entangledLanes|=a;for(t=t.entanglements;s;){var o=31-mt(s),u=1<<o;u&a|t[o]&a&&(t[o]|=a),s&=~u}}function nr(t,a){var s=a&-a;return s=(s&42)!==0?1:ar(s),(s&(t.suspendedLanes|a))!==0?0:s}function ar(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 Tn(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Rp(){var t=F.p;return t!==0?t:(t=window.event,t===void 0?32:vy(t.type))}function Mp(t,a){var s=F.p;try{return F.p=t,a()}finally{F.p=s}}var ya=Math.random().toString(36).slice(2),Et="__reactFiber$"+ya,Pt="__reactProps$"+ya,Vi="__reactContainer$"+ya,$c="__reactEvents$"+ya,Z1="__reactListeners$"+ya,P1="__reactHandles$"+ya,Bp="__reactResources$"+ya,ir="__reactMarker$"+ya;function Uc(t){delete t[Et],delete t[Pt],delete t[$c],delete t[Z1],delete t[P1]}function Gi(t){var a=t[Et];if(a)return a;for(var s=t.parentNode;s;){if(a=s[Vi]||s[Et]){if(s=a.alternate,a.child!==null||s!==null&&s.child!==null)for(t=ay(t);t!==null;){if(s=t[Et])return s;t=ay(t)}return a}t=s,s=t.parentNode}return null}function Ii(t){if(t=t[Et]||t[Vi]){var a=t.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return t}return null}function sr(t){var a=t.tag;if(a===5||a===26||a===27||a===6)return t.stateNode;throw Error(r(33))}function Hi(t){var a=t[Bp];return a||(a=t[Bp]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function _t(t){t[ir]=!0}var Lp=new Set,qp={};function ti(t,a){Zi(t,a),Zi(t+"Capture",a)}function Zi(t,a){for(qp[t]=a,t=0;t<a.length;t++)Lp.add(a[t])}var K1=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]*$"),$p={},Up={};function Q1(t){return Oi.call(Up,t)?!0:Oi.call($p,t)?!1:K1.test(t)?Up[t]=!0:($p[t]=!0,!1)}function jo(t,a,s){if(Q1(a))if(s===null)t.removeAttribute(a);else{switch(typeof s){case"undefined":case"function":case"symbol":t.removeAttribute(a);return;case"boolean":var o=a.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){t.removeAttribute(a);return}}t.setAttribute(a,""+s)}}function No(t,a,s){if(s===null)t.removeAttribute(a);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(a);return}t.setAttribute(a,""+s)}}function Qn(t,a,s,o){if(o===null)t.removeAttribute(s);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(s);return}t.setAttributeNS(a,s,""+o)}}function dn(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Vp(t){var a=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function Y1(t,a,s){var o=Object.getOwnPropertyDescriptor(t.constructor.prototype,a);if(!t.hasOwnProperty(a)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var u=o.get,p=o.set;return Object.defineProperty(t,a,{configurable:!0,get:function(){return u.call(this)},set:function(y){s=""+y,p.call(this,y)}}),Object.defineProperty(t,a,{enumerable:o.enumerable}),{getValue:function(){return s},setValue:function(y){s=""+y},stopTracking:function(){t._valueTracker=null,delete t[a]}}}}function Vc(t){if(!t._valueTracker){var a=Vp(t)?"checked":"value";t._valueTracker=Y1(t,a,""+t[a])}}function Gp(t){if(!t)return!1;var a=t._valueTracker;if(!a)return!0;var s=a.getValue(),o="";return t&&(o=Vp(t)?t.checked?"true":"false":t.value),t=o,t!==s?(a.setValue(t),!0):!1}function ko(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 X1=/[\n"\\]/g;function fn(t){return t.replace(X1,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function Gc(t,a,s,o,u,p,y,x){t.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?t.type=y:t.removeAttribute("type"),a!=null?y==="number"?(a===0&&t.value===""||t.value!=a)&&(t.value=""+dn(a)):t.value!==""+dn(a)&&(t.value=""+dn(a)):y!=="submit"&&y!=="reset"||t.removeAttribute("value"),a!=null?Ic(t,y,dn(a)):s!=null?Ic(t,y,dn(s)):o!=null&&t.removeAttribute("value"),u==null&&p!=null&&(t.defaultChecked=!!p),u!=null&&(t.checked=u&&typeof u!="function"&&typeof u!="symbol"),x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?t.name=""+dn(x):t.removeAttribute("name")}function Ip(t,a,s,o,u,p,y,x){if(p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(t.type=p),a!=null||s!=null){if(!(p!=="submit"&&p!=="reset"||a!=null)){Vc(t);return}s=s!=null?""+dn(s):"",a=a!=null?""+dn(a):s,x||a===t.value||(t.value=a),t.defaultValue=a}o=o??u,o=typeof o!="function"&&typeof o!="symbol"&&!!o,t.checked=x?t.checked:!!o,t.defaultChecked=!!o,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(t.name=y),Vc(t)}function Ic(t,a,s){a==="number"&&ko(t.ownerDocument)===t||t.defaultValue===""+s||(t.defaultValue=""+s)}function Pi(t,a,s,o){if(t=t.options,a){a={};for(var u=0;u<s.length;u++)a["$"+s[u]]=!0;for(s=0;s<t.length;s++)u=a.hasOwnProperty("$"+t[s].value),t[s].selected!==u&&(t[s].selected=u),u&&o&&(t[s].defaultSelected=!0)}else{for(s=""+dn(s),a=null,u=0;u<t.length;u++){if(t[u].value===s){t[u].selected=!0,o&&(t[u].defaultSelected=!0);return}a!==null||t[u].disabled||(a=t[u])}a!==null&&(a.selected=!0)}}function Hp(t,a,s){if(a!=null&&(a=""+dn(a),a!==t.value&&(t.value=a),s==null)){t.defaultValue!==a&&(t.defaultValue=a);return}t.defaultValue=s!=null?""+dn(s):""}function Zp(t,a,s,o){if(a==null){if(o!=null){if(s!=null)throw Error(r(92));if(pe(o)){if(1<o.length)throw Error(r(93));o=o[0]}s=o}s==null&&(s=""),a=s}s=dn(a),t.defaultValue=s,o=t.textContent,o===s&&o!==""&&o!==null&&(t.value=o),Vc(t)}function Ki(t,a){if(a){var s=t.firstChild;if(s&&s===t.lastChild&&s.nodeType===3){s.nodeValue=a;return}}t.textContent=a}var J1=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 Pp(t,a,s){var o=a.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?o?t.setProperty(a,""):a==="float"?t.cssFloat="":t[a]="":o?t.setProperty(a,s):typeof s!="number"||s===0||J1.has(a)?a==="float"?t.cssFloat=s:t[a]=(""+s).trim():t[a]=s+"px"}function Kp(t,a,s){if(a!=null&&typeof a!="object")throw Error(r(62));if(t=t.style,s!=null){for(var o in s)!s.hasOwnProperty(o)||a!=null&&a.hasOwnProperty(o)||(o.indexOf("--")===0?t.setProperty(o,""):o==="float"?t.cssFloat="":t[o]="");for(var u in a)o=a[u],a.hasOwnProperty(u)&&s[u]!==o&&Pp(t,u,o)}else for(var p in a)a.hasOwnProperty(p)&&Pp(t,p,a[p])}function Hc(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 F1=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"]]),W1=/^[\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 Ao(t){return W1.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Yn(){}var Zc=null;function Pc(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Qi=null,Yi=null;function Qp(t){var a=Ii(t);if(a&&(t=a.stateNode)){var s=t[Pt]||null;e:switch(t=a.stateNode,a.type){case"input":if(Gc(t,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),a=s.name,s.type==="radio"&&a!=null){for(s=t;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+fn(""+a)+'"][type="radio"]'),a=0;a<s.length;a++){var o=s[a];if(o!==t&&o.form===t.form){var u=o[Pt]||null;if(!u)throw Error(r(90));Gc(o,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name)}}for(a=0;a<s.length;a++)o=s[a],o.form===t.form&&Gp(o)}break e;case"textarea":Hp(t,s.value,s.defaultValue);break e;case"select":a=s.value,a!=null&&Pi(t,!!s.multiple,a,!1)}}}var Kc=!1;function Yp(t,a,s){if(Kc)return t(a,s);Kc=!0;try{var o=t(a);return o}finally{if(Kc=!1,(Qi!==null||Yi!==null)&&(pl(),Qi&&(a=Qi,t=Yi,Yi=Qi=null,Qp(a),t)))for(a=0;a<t.length;a++)Qp(t[a])}}function rr(t,a){var s=t.stateNode;if(s===null)return null;var o=s[Pt]||null;if(o===null)return null;s=o[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(t=t.type,o=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!o;break e;default:t=!1}if(t)return null;if(s&&typeof s!="function")throw Error(r(231,a,typeof s));return s}var Xn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Qc=!1;if(Xn)try{var or={};Object.defineProperty(or,"passive",{get:function(){Qc=!0}}),window.addEventListener("test",or,or),window.removeEventListener("test",or,or)}catch{Qc=!1}var ba=null,Yc=null,_o=null;function Xp(){if(_o)return _o;var t,a=Yc,s=a.length,o,u="value"in ba?ba.value:ba.textContent,p=u.length;for(t=0;t<s&&a[t]===u[t];t++);var y=s-t;for(o=1;o<=y&&a[s-o]===u[p-o];o++);return _o=u.slice(t,1<o?1-o:void 0)}function zo(t){var a=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&a===13&&(t=13)):t=a,t===10&&(t=13),32<=t||t===13?t:0}function Co(){return!0}function Jp(){return!1}function Kt(t){function a(s,o,u,p,y){this._reactName=s,this._targetInst=u,this.type=o,this.nativeEvent=p,this.target=y,this.currentTarget=null;for(var x in t)t.hasOwnProperty(x)&&(s=t[x],this[x]=s?s(p):p[x]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?Co:Jp,this.isPropagationStopped=Jp,this}return S(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=Co)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=Co)},persist:function(){},isPersistent:Co}),a}var ni={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},To=Kt(ni),lr=S({},ni,{view:0,detail:0}),eS=Kt(lr),Xc,Jc,cr,Eo=S({},lr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Wc,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!==cr&&(cr&&t.type==="mousemove"?(Xc=t.screenX-cr.screenX,Jc=t.screenY-cr.screenY):Jc=Xc=0,cr=t),Xc)},movementY:function(t){return"movementY"in t?t.movementY:Jc}}),Fp=Kt(Eo),tS=S({},Eo,{dataTransfer:0}),nS=Kt(tS),aS=S({},lr,{relatedTarget:0}),Fc=Kt(aS),iS=S({},ni,{animationName:0,elapsedTime:0,pseudoElement:0}),sS=Kt(iS),rS=S({},ni,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),oS=Kt(rS),lS=S({},ni,{data:0}),Wp=Kt(lS),cS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},uS={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"},dS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function fS(t){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(t):(t=dS[t])?!!a[t]:!1}function Wc(){return fS}var pS=S({},lr,{key:function(t){if(t.key){var a=cS[t.key]||t.key;if(a!=="Unidentified")return a}return t.type==="keypress"?(t=zo(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?uS[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Wc,charCode:function(t){return t.type==="keypress"?zo(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?zo(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),mS=Kt(pS),hS=S({},Eo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),em=Kt(hS),gS=S({},lr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Wc}),yS=Kt(gS),bS=S({},ni,{propertyName:0,elapsedTime:0,pseudoElement:0}),vS=Kt(bS),SS=S({},Eo,{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}),xS=Kt(SS),wS=S({},ni,{newState:0,oldState:0}),jS=Kt(wS),NS=[9,13,27,32],eu=Xn&&"CompositionEvent"in window,ur=null;Xn&&"documentMode"in document&&(ur=document.documentMode);var kS=Xn&&"TextEvent"in window&&!ur,tm=Xn&&(!eu||ur&&8<ur&&11>=ur),nm=" ",am=!1;function im(t,a){switch(t){case"keyup":return NS.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function sm(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Xi=!1;function AS(t,a){switch(t){case"compositionend":return sm(a);case"keypress":return a.which!==32?null:(am=!0,nm);case"textInput":return t=a.data,t===nm&&am?null:t;default:return null}}function _S(t,a){if(Xi)return t==="compositionend"||!eu&&im(t,a)?(t=Xp(),_o=Yc=ba=null,Xi=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return tm&&a.locale!=="ko"?null:a.data;default:return null}}var zS={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 rm(t){var a=t&&t.nodeName&&t.nodeName.toLowerCase();return a==="input"?!!zS[t.type]:a==="textarea"}function om(t,a,s,o){Qi?Yi?Yi.push(o):Yi=[o]:Qi=o,a=Sl(a,"onChange"),0<a.length&&(s=new To("onChange","change",null,s,o),t.push({event:s,listeners:a}))}var dr=null,fr=null;function CS(t){Ig(t,0)}function Oo(t){var a=sr(t);if(Gp(a))return t}function lm(t,a){if(t==="change")return a}var cm=!1;if(Xn){var tu;if(Xn){var nu="oninput"in document;if(!nu){var um=document.createElement("div");um.setAttribute("oninput","return;"),nu=typeof um.oninput=="function"}tu=nu}else tu=!1;cm=tu&&(!document.documentMode||9<document.documentMode)}function dm(){dr&&(dr.detachEvent("onpropertychange",fm),fr=dr=null)}function fm(t){if(t.propertyName==="value"&&Oo(fr)){var a=[];om(a,fr,t,Pc(t)),Yp(CS,a)}}function TS(t,a,s){t==="focusin"?(dm(),dr=a,fr=s,dr.attachEvent("onpropertychange",fm)):t==="focusout"&&dm()}function ES(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Oo(fr)}function OS(t,a){if(t==="click")return Oo(a)}function DS(t,a){if(t==="input"||t==="change")return Oo(a)}function RS(t,a){return t===a&&(t!==0||1/t===1/a)||t!==t&&a!==a}var tn=typeof Object.is=="function"?Object.is:RS;function pr(t,a){if(tn(t,a))return!0;if(typeof t!="object"||t===null||typeof a!="object"||a===null)return!1;var s=Object.keys(t),o=Object.keys(a);if(s.length!==o.length)return!1;for(o=0;o<s.length;o++){var u=s[o];if(!Oi.call(a,u)||!tn(t[u],a[u]))return!1}return!0}function pm(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function mm(t,a){var s=pm(t);t=0;for(var o;s;){if(s.nodeType===3){if(o=t+s.textContent.length,t<=a&&o>=a)return{node:s,offset:a-t};t=o}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=pm(s)}}function hm(t,a){return t&&a?t===a?!0:t&&t.nodeType===3?!1:a&&a.nodeType===3?hm(t,a.parentNode):"contains"in t?t.contains(a):t.compareDocumentPosition?!!(t.compareDocumentPosition(a)&16):!1:!1}function gm(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var a=ko(t.document);a instanceof t.HTMLIFrameElement;){try{var s=typeof a.contentWindow.location.href=="string"}catch{s=!1}if(s)t=a.contentWindow;else break;a=ko(t.document)}return a}function au(t){var a=t&&t.nodeName&&t.nodeName.toLowerCase();return a&&(a==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||a==="textarea"||t.contentEditable==="true")}var MS=Xn&&"documentMode"in document&&11>=document.documentMode,Ji=null,iu=null,mr=null,su=!1;function ym(t,a,s){var o=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;su||Ji==null||Ji!==ko(o)||(o=Ji,"selectionStart"in o&&au(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),mr&&pr(mr,o)||(mr=o,o=Sl(iu,"onSelect"),0<o.length&&(a=new To("onSelect","select",null,a,s),t.push({event:a,listeners:o}),a.target=Ji)))}function ai(t,a){var s={};return s[t.toLowerCase()]=a.toLowerCase(),s["Webkit"+t]="webkit"+a,s["Moz"+t]="moz"+a,s}var Fi={animationend:ai("Animation","AnimationEnd"),animationiteration:ai("Animation","AnimationIteration"),animationstart:ai("Animation","AnimationStart"),transitionrun:ai("Transition","TransitionRun"),transitionstart:ai("Transition","TransitionStart"),transitioncancel:ai("Transition","TransitionCancel"),transitionend:ai("Transition","TransitionEnd")},ru={},bm={};Xn&&(bm=document.createElement("div").style,"AnimationEvent"in window||(delete Fi.animationend.animation,delete Fi.animationiteration.animation,delete Fi.animationstart.animation),"TransitionEvent"in window||delete Fi.transitionend.transition);function ii(t){if(ru[t])return ru[t];if(!Fi[t])return t;var a=Fi[t],s;for(s in a)if(a.hasOwnProperty(s)&&s in bm)return ru[t]=a[s];return t}var vm=ii("animationend"),Sm=ii("animationiteration"),xm=ii("animationstart"),BS=ii("transitionrun"),LS=ii("transitionstart"),qS=ii("transitioncancel"),wm=ii("transitionend"),jm=new Map,ou="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(" ");ou.push("scrollEnd");function En(t,a){jm.set(t,a),ti(a,[t])}var Do=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=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(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},pn=[],Wi=0,lu=0;function Ro(){for(var t=Wi,a=lu=Wi=0;a<t;){var s=pn[a];pn[a++]=null;var o=pn[a];pn[a++]=null;var u=pn[a];pn[a++]=null;var p=pn[a];if(pn[a++]=null,o!==null&&u!==null){var y=o.pending;y===null?u.next=u:(u.next=y.next,y.next=u),o.pending=u}p!==0&&Nm(s,u,p)}}function Mo(t,a,s,o){pn[Wi++]=t,pn[Wi++]=a,pn[Wi++]=s,pn[Wi++]=o,lu|=o,t.lanes|=o,t=t.alternate,t!==null&&(t.lanes|=o)}function cu(t,a,s,o){return Mo(t,a,s,o),Bo(t)}function si(t,a){return Mo(t,null,null,a),Bo(t)}function Nm(t,a,s){t.lanes|=s;var o=t.alternate;o!==null&&(o.lanes|=s);for(var u=!1,p=t.return;p!==null;)p.childLanes|=s,o=p.alternate,o!==null&&(o.childLanes|=s),p.tag===22&&(t=p.stateNode,t===null||t._visibility&1||(u=!0)),t=p,p=p.return;return t.tag===3?(p=t.stateNode,u&&a!==null&&(u=31-mt(s),t=p.hiddenUpdates,o=t[u],o===null?t[u]=[a]:o.push(a),a.lane=s|536870912),p):null}function Bo(t){if(50<Br)throw Br=0,bd=null,Error(r(185));for(var a=t.return;a!==null;)t=a,a=t.return;return t.tag===3?t.stateNode:null}var es={};function $S(t,a,s,o){this.tag=t,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function nn(t,a,s,o){return new $S(t,a,s,o)}function uu(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Jn(t,a){var s=t.alternate;return s===null?(s=nn(t.tag,a,t.key,t.mode),s.elementType=t.elementType,s.type=t.type,s.stateNode=t.stateNode,s.alternate=t,t.alternate=s):(s.pendingProps=a,s.type=t.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=t.flags&65011712,s.childLanes=t.childLanes,s.lanes=t.lanes,s.child=t.child,s.memoizedProps=t.memoizedProps,s.memoizedState=t.memoizedState,s.updateQueue=t.updateQueue,a=t.dependencies,s.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},s.sibling=t.sibling,s.index=t.index,s.ref=t.ref,s.refCleanup=t.refCleanup,s}function km(t,a){t.flags&=65011714;var s=t.alternate;return s===null?(t.childLanes=0,t.lanes=a,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=s.childLanes,t.lanes=s.lanes,t.child=s.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=s.memoizedProps,t.memoizedState=s.memoizedState,t.updateQueue=s.updateQueue,t.type=s.type,a=s.dependencies,t.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),t}function Lo(t,a,s,o,u,p){var y=0;if(o=t,typeof t=="function")uu(t)&&(y=1);else if(typeof t=="string")y=Hx(t,s,te.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case oe:return t=nn(31,s,a,u),t.elementType=oe,t.lanes=p,t;case N:return ri(s.children,u,p,a);case T:y=8,u|=24;break;case R:return t=nn(12,s,a,u|2),t.elementType=R,t.lanes=p,t;case X:return t=nn(13,s,a,u),t.elementType=X,t.lanes=p,t;case J:return t=nn(19,s,a,u),t.elementType=J,t.lanes=p,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case H:y=10;break e;case G:y=9;break e;case K:y=11;break e;case D:y=14;break e;case M:y=16,o=null;break e}y=29,s=Error(r(130,t===null?"null":typeof t,"")),o=null}return a=nn(y,s,a,u),a.elementType=t,a.type=o,a.lanes=p,a}function ri(t,a,s,o){return t=nn(7,t,o,a),t.lanes=s,t}function du(t,a,s){return t=nn(6,t,null,a),t.lanes=s,t}function Am(t){var a=nn(18,null,null,0);return a.stateNode=t,a}function fu(t,a,s){return a=nn(4,t.children!==null?t.children:[],t.key,a),a.lanes=s,a.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},a}var _m=new WeakMap;function mn(t,a){if(typeof t=="object"&&t!==null){var s=_m.get(t);return s!==void 0?s:(a={value:t,source:a,stack:Ws(a)},_m.set(t,a),a)}return{value:t,source:a,stack:Ws(a)}}var ts=[],ns=0,qo=null,hr=0,hn=[],gn=0,va=null,$n=1,Un="";function Fn(t,a){ts[ns++]=hr,ts[ns++]=qo,qo=t,hr=a}function zm(t,a,s){hn[gn++]=$n,hn[gn++]=Un,hn[gn++]=va,va=t;var o=$n;t=Un;var u=32-mt(o)-1;o&=~(1<<u),s+=1;var p=32-mt(a)+u;if(30<p){var y=u-u%5;p=(o&(1<<y)-1).toString(32),o>>=y,u-=y,$n=1<<32-mt(a)+u|s<<u|o,Un=p+t}else $n=1<<p|s<<u|o,Un=t}function pu(t){t.return!==null&&(Fn(t,1),zm(t,1,0))}function mu(t){for(;t===qo;)qo=ts[--ns],ts[ns]=null,hr=ts[--ns],ts[ns]=null;for(;t===va;)va=hn[--gn],hn[gn]=null,Un=hn[--gn],hn[gn]=null,$n=hn[--gn],hn[gn]=null}function Cm(t,a){hn[gn++]=$n,hn[gn++]=Un,hn[gn++]=va,$n=a.id,Un=a.overflow,va=t}var Ot=null,it=null,Be=!1,Sa=null,yn=!1,hu=Error(r(519));function xa(t){var a=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw gr(mn(a,t)),hu}function Tm(t){var a=t.stateNode,s=t.type,o=t.memoizedProps;switch(a[Et]=t,a[Pt]=o,s){case"dialog":De("cancel",a),De("close",a);break;case"iframe":case"object":case"embed":De("load",a);break;case"video":case"audio":for(s=0;s<qr.length;s++)De(qr[s],a);break;case"source":De("error",a);break;case"img":case"image":case"link":De("error",a),De("load",a);break;case"details":De("toggle",a);break;case"input":De("invalid",a),Ip(a,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":De("invalid",a);break;case"textarea":De("invalid",a),Zp(a,o.value,o.defaultValue,o.children)}s=o.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||a.textContent===""+s||o.suppressHydrationWarning===!0||Kg(a.textContent,s)?(o.popover!=null&&(De("beforetoggle",a),De("toggle",a)),o.onScroll!=null&&De("scroll",a),o.onScrollEnd!=null&&De("scrollend",a),o.onClick!=null&&(a.onclick=Yn),a=!0):a=!1,a||xa(t,!0)}function Em(t){for(Ot=t.return;Ot;)switch(Ot.tag){case 5:case 31:case 13:yn=!1;return;case 27:case 3:yn=!0;return;default:Ot=Ot.return}}function as(t){if(t!==Ot)return!1;if(!Be)return Em(t),Be=!0,!1;var a=t.tag,s;if((s=a!==3&&a!==27)&&((s=a===5)&&(s=t.type,s=!(s!=="form"&&s!=="button")||Dd(t.type,t.memoizedProps)),s=!s),s&&it&&xa(t),Em(t),a===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));it=ny(t)}else if(a===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));it=ny(t)}else a===27?(a=it,Ma(t.type)?(t=qd,qd=null,it=t):it=a):it=Ot?vn(t.stateNode.nextSibling):null;return!0}function oi(){it=Ot=null,Be=!1}function gu(){var t=Sa;return t!==null&&(Jt===null?Jt=t:Jt.push.apply(Jt,t),Sa=null),t}function gr(t){Sa===null?Sa=[t]:Sa.push(t)}var yu=Qe(null),li=null,Wn=null;function wa(t,a,s){le(yu,a._currentValue),a._currentValue=s}function ea(t){t._currentValue=yu.current,Q(yu)}function bu(t,a,s){for(;t!==null;){var o=t.alternate;if((t.childLanes&a)!==a?(t.childLanes|=a,o!==null&&(o.childLanes|=a)):o!==null&&(o.childLanes&a)!==a&&(o.childLanes|=a),t===s)break;t=t.return}}function vu(t,a,s,o){var u=t.child;for(u!==null&&(u.return=t);u!==null;){var p=u.dependencies;if(p!==null){var y=u.child;p=p.firstContext;e:for(;p!==null;){var x=p;p=u;for(var A=0;A<a.length;A++)if(x.context===a[A]){p.lanes|=s,x=p.alternate,x!==null&&(x.lanes|=s),bu(p.return,s,t),o||(y=null);break e}p=x.next}}else if(u.tag===18){if(y=u.return,y===null)throw Error(r(341));y.lanes|=s,p=y.alternate,p!==null&&(p.lanes|=s),bu(y,s,t),y=null}else y=u.child;if(y!==null)y.return=u;else for(y=u;y!==null;){if(y===t){y=null;break}if(u=y.sibling,u!==null){u.return=y.return,y=u;break}y=y.return}u=y}}function is(t,a,s,o){t=null;for(var u=a,p=!1;u!==null;){if(!p){if((u.flags&524288)!==0)p=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var y=u.alternate;if(y===null)throw Error(r(387));if(y=y.memoizedProps,y!==null){var x=u.type;tn(u.pendingProps.value,y.value)||(t!==null?t.push(x):t=[x])}}else if(u===_e.current){if(y=u.alternate,y===null)throw Error(r(387));y.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(t!==null?t.push(Ir):t=[Ir])}u=u.return}t!==null&&vu(a,t,s,o),a.flags|=262144}function $o(t){for(t=t.firstContext;t!==null;){if(!tn(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function ci(t){li=t,Wn=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Dt(t){return Om(li,t)}function Uo(t,a){return li===null&&ci(t),Om(t,a)}function Om(t,a){var s=a._currentValue;if(a={context:a,memoizedValue:s,next:null},Wn===null){if(t===null)throw Error(r(308));Wn=a,t.dependencies={lanes:0,firstContext:a},t.flags|=524288}else Wn=Wn.next=a;return s}var US=typeof AbortController<"u"?AbortController:function(){var t=[],a=this.signal={aborted:!1,addEventListener:function(s,o){t.push(o)}};this.abort=function(){a.aborted=!0,t.forEach(function(s){return s()})}},VS=e.unstable_scheduleCallback,GS=e.unstable_NormalPriority,St={$$typeof:H,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Su(){return{controller:new US,data:new Map,refCount:0}}function yr(t){t.refCount--,t.refCount===0&&VS(GS,function(){t.controller.abort()})}var br=null,xu=0,ss=0,rs=null;function IS(t,a){if(br===null){var s=br=[];xu=0,ss=Nd(),rs={status:"pending",value:void 0,then:function(o){s.push(o)}}}return xu++,a.then(Dm,Dm),a}function Dm(){if(--xu===0&&br!==null){rs!==null&&(rs.status="fulfilled");var t=br;br=null,ss=0,rs=null;for(var a=0;a<t.length;a++)(0,t[a])()}}function HS(t,a){var s=[],o={status:"pending",value:null,reason:null,then:function(u){s.push(u)}};return t.then(function(){o.status="fulfilled",o.value=a;for(var u=0;u<s.length;u++)(0,s[u])(a)},function(u){for(o.status="rejected",o.reason=u,u=0;u<s.length;u++)(0,s[u])(void 0)}),o}var Rm=$.S;$.S=function(t,a){yg=Lt(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&IS(t,a),Rm!==null&&Rm(t,a)};var ui=Qe(null);function wu(){var t=ui.current;return t!==null?t:We.pooledCache}function Vo(t,a){a===null?le(ui,ui.current):le(ui,a.pool)}function Mm(){var t=wu();return t===null?null:{parent:St._currentValue,pool:t}}var os=Error(r(460)),ju=Error(r(474)),Go=Error(r(542)),Io={then:function(){}};function Bm(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Lm(t,a,s){switch(s=t[s],s===void 0?t.push(a):s!==a&&(a.then(Yn,Yn),a=s),a.status){case"fulfilled":return a.value;case"rejected":throw t=a.reason,$m(t),t;default:if(typeof a.status=="string")a.then(Yn,Yn);else{if(t=We,t!==null&&100<t.shellSuspendCounter)throw Error(r(482));t=a,t.status="pending",t.then(function(o){if(a.status==="pending"){var u=a;u.status="fulfilled",u.value=o}},function(o){if(a.status==="pending"){var u=a;u.status="rejected",u.reason=o}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw t=a.reason,$m(t),t}throw fi=a,os}}function di(t){try{var a=t._init;return a(t._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(fi=s,os):s}}var fi=null;function qm(){if(fi===null)throw Error(r(459));var t=fi;return fi=null,t}function $m(t){if(t===os||t===Go)throw Error(r(483))}var ls=null,vr=0;function Ho(t){var a=vr;return vr+=1,ls===null&&(ls=[]),Lm(ls,t,a)}function Sr(t,a){a=a.props.ref,t.ref=a!==void 0?a:null}function Zo(t,a){throw a.$$typeof===w?Error(r(525)):(t=Object.prototype.toString.call(a),Error(r(31,t==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":t)))}function Um(t){function a(O,z){if(t){var B=O.deletions;B===null?(O.deletions=[z],O.flags|=16):B.push(z)}}function s(O,z){if(!t)return null;for(;z!==null;)a(O,z),z=z.sibling;return null}function o(O){for(var z=new Map;O!==null;)O.key!==null?z.set(O.key,O):z.set(O.index,O),O=O.sibling;return z}function u(O,z){return O=Jn(O,z),O.index=0,O.sibling=null,O}function p(O,z,B){return O.index=B,t?(B=O.alternate,B!==null?(B=B.index,B<z?(O.flags|=67108866,z):B):(O.flags|=67108866,z)):(O.flags|=1048576,z)}function y(O){return t&&O.alternate===null&&(O.flags|=67108866),O}function x(O,z,B,P){return z===null||z.tag!==6?(z=du(B,O.mode,P),z.return=O,z):(z=u(z,B),z.return=O,z)}function A(O,z,B,P){var Se=B.type;return Se===N?I(O,z,B.props.children,P,B.key):z!==null&&(z.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===M&&di(Se)===z.type)?(z=u(z,B.props),Sr(z,B),z.return=O,z):(z=Lo(B.type,B.key,B.props,null,O.mode,P),Sr(z,B),z.return=O,z)}function L(O,z,B,P){return z===null||z.tag!==4||z.stateNode.containerInfo!==B.containerInfo||z.stateNode.implementation!==B.implementation?(z=fu(B,O.mode,P),z.return=O,z):(z=u(z,B.children||[]),z.return=O,z)}function I(O,z,B,P,Se){return z===null||z.tag!==7?(z=ri(B,O.mode,P,Se),z.return=O,z):(z=u(z,B),z.return=O,z)}function Y(O,z,B){if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return z=du(""+z,O.mode,B),z.return=O,z;if(typeof z=="object"&&z!==null){switch(z.$$typeof){case _:return B=Lo(z.type,z.key,z.props,null,O.mode,B),Sr(B,z),B.return=O,B;case C:return z=fu(z,O.mode,B),z.return=O,z;case M:return z=di(z),Y(O,z,B)}if(pe(z)||ve(z))return z=ri(z,O.mode,B,null),z.return=O,z;if(typeof z.then=="function")return Y(O,Ho(z),B);if(z.$$typeof===H)return Y(O,Uo(O,z),B);Zo(O,z)}return null}function q(O,z,B,P){var Se=z!==null?z.key:null;if(typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint")return Se!==null?null:x(O,z,""+B,P);if(typeof B=="object"&&B!==null){switch(B.$$typeof){case _:return B.key===Se?A(O,z,B,P):null;case C:return B.key===Se?L(O,z,B,P):null;case M:return B=di(B),q(O,z,B,P)}if(pe(B)||ve(B))return Se!==null?null:I(O,z,B,P,null);if(typeof B.then=="function")return q(O,z,Ho(B),P);if(B.$$typeof===H)return q(O,z,Uo(O,B),P);Zo(O,B)}return null}function V(O,z,B,P,Se){if(typeof P=="string"&&P!==""||typeof P=="number"||typeof P=="bigint")return O=O.get(B)||null,x(z,O,""+P,Se);if(typeof P=="object"&&P!==null){switch(P.$$typeof){case _:return O=O.get(P.key===null?B:P.key)||null,A(z,O,P,Se);case C:return O=O.get(P.key===null?B:P.key)||null,L(z,O,P,Se);case M:return P=di(P),V(O,z,B,P,Se)}if(pe(P)||ve(P))return O=O.get(B)||null,I(z,O,P,Se,null);if(typeof P.then=="function")return V(O,z,B,Ho(P),Se);if(P.$$typeof===H)return V(O,z,B,Uo(z,P),Se);Zo(z,P)}return null}function fe(O,z,B,P){for(var Se=null,Ve=null,ge=z,Ce=z=0,Me=null;ge!==null&&Ce<B.length;Ce++){ge.index>Ce?(Me=ge,ge=null):Me=ge.sibling;var Ge=q(O,ge,B[Ce],P);if(Ge===null){ge===null&&(ge=Me);break}t&&ge&&Ge.alternate===null&&a(O,ge),z=p(Ge,z,Ce),Ve===null?Se=Ge:Ve.sibling=Ge,Ve=Ge,ge=Me}if(Ce===B.length)return s(O,ge),Be&&Fn(O,Ce),Se;if(ge===null){for(;Ce<B.length;Ce++)ge=Y(O,B[Ce],P),ge!==null&&(z=p(ge,z,Ce),Ve===null?Se=ge:Ve.sibling=ge,Ve=ge);return Be&&Fn(O,Ce),Se}for(ge=o(ge);Ce<B.length;Ce++)Me=V(ge,O,Ce,B[Ce],P),Me!==null&&(t&&Me.alternate!==null&&ge.delete(Me.key===null?Ce:Me.key),z=p(Me,z,Ce),Ve===null?Se=Me:Ve.sibling=Me,Ve=Me);return t&&ge.forEach(function(Ua){return a(O,Ua)}),Be&&Fn(O,Ce),Se}function we(O,z,B,P){if(B==null)throw Error(r(151));for(var Se=null,Ve=null,ge=z,Ce=z=0,Me=null,Ge=B.next();ge!==null&&!Ge.done;Ce++,Ge=B.next()){ge.index>Ce?(Me=ge,ge=null):Me=ge.sibling;var Ua=q(O,ge,Ge.value,P);if(Ua===null){ge===null&&(ge=Me);break}t&&ge&&Ua.alternate===null&&a(O,ge),z=p(Ua,z,Ce),Ve===null?Se=Ua:Ve.sibling=Ua,Ve=Ua,ge=Me}if(Ge.done)return s(O,ge),Be&&Fn(O,Ce),Se;if(ge===null){for(;!Ge.done;Ce++,Ge=B.next())Ge=Y(O,Ge.value,P),Ge!==null&&(z=p(Ge,z,Ce),Ve===null?Se=Ge:Ve.sibling=Ge,Ve=Ge);return Be&&Fn(O,Ce),Se}for(ge=o(ge);!Ge.done;Ce++,Ge=B.next())Ge=V(ge,O,Ce,Ge.value,P),Ge!==null&&(t&&Ge.alternate!==null&&ge.delete(Ge.key===null?Ce:Ge.key),z=p(Ge,z,Ce),Ve===null?Se=Ge:Ve.sibling=Ge,Ve=Ge);return t&&ge.forEach(function(tw){return a(O,tw)}),Be&&Fn(O,Ce),Se}function Je(O,z,B,P){if(typeof B=="object"&&B!==null&&B.type===N&&B.key===null&&(B=B.props.children),typeof B=="object"&&B!==null){switch(B.$$typeof){case _:e:{for(var Se=B.key;z!==null;){if(z.key===Se){if(Se=B.type,Se===N){if(z.tag===7){s(O,z.sibling),P=u(z,B.props.children),P.return=O,O=P;break e}}else if(z.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===M&&di(Se)===z.type){s(O,z.sibling),P=u(z,B.props),Sr(P,B),P.return=O,O=P;break e}s(O,z);break}else a(O,z);z=z.sibling}B.type===N?(P=ri(B.props.children,O.mode,P,B.key),P.return=O,O=P):(P=Lo(B.type,B.key,B.props,null,O.mode,P),Sr(P,B),P.return=O,O=P)}return y(O);case C:e:{for(Se=B.key;z!==null;){if(z.key===Se)if(z.tag===4&&z.stateNode.containerInfo===B.containerInfo&&z.stateNode.implementation===B.implementation){s(O,z.sibling),P=u(z,B.children||[]),P.return=O,O=P;break e}else{s(O,z);break}else a(O,z);z=z.sibling}P=fu(B,O.mode,P),P.return=O,O=P}return y(O);case M:return B=di(B),Je(O,z,B,P)}if(pe(B))return fe(O,z,B,P);if(ve(B)){if(Se=ve(B),typeof Se!="function")throw Error(r(150));return B=Se.call(B),we(O,z,B,P)}if(typeof B.then=="function")return Je(O,z,Ho(B),P);if(B.$$typeof===H)return Je(O,z,Uo(O,B),P);Zo(O,B)}return typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint"?(B=""+B,z!==null&&z.tag===6?(s(O,z.sibling),P=u(z,B),P.return=O,O=P):(s(O,z),P=du(B,O.mode,P),P.return=O,O=P),y(O)):s(O,z)}return function(O,z,B,P){try{vr=0;var Se=Je(O,z,B,P);return ls=null,Se}catch(ge){if(ge===os||ge===Go)throw ge;var Ve=nn(29,ge,null,O.mode);return Ve.lanes=P,Ve.return=O,Ve}}}var pi=Um(!0),Vm=Um(!1),ja=!1;function Nu(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ku(t,a){t=t.updateQueue,a.updateQueue===t&&(a.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Na(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function ka(t,a,s){var o=t.updateQueue;if(o===null)return null;if(o=o.shared,(Ie&2)!==0){var u=o.pending;return u===null?a.next=a:(a.next=u.next,u.next=a),o.pending=a,a=Bo(t),Nm(t,null,s),a}return Mo(t,o,a,s),Bo(t)}function xr(t,a,s){if(a=a.updateQueue,a!==null&&(a=a.shared,(s&4194048)!==0)){var o=a.lanes;o&=t.pendingLanes,s|=o,a.lanes=s,wo(t,s)}}function Au(t,a){var s=t.updateQueue,o=t.alternate;if(o!==null&&(o=o.updateQueue,s===o)){var u=null,p=null;if(s=s.firstBaseUpdate,s!==null){do{var y={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};p===null?u=p=y:p=p.next=y,s=s.next}while(s!==null);p===null?u=p=a:p=p.next=a}else u=p=a;s={baseState:o.baseState,firstBaseUpdate:u,lastBaseUpdate:p,shared:o.shared,callbacks:o.callbacks},t.updateQueue=s;return}t=s.lastBaseUpdate,t===null?s.firstBaseUpdate=a:t.next=a,s.lastBaseUpdate=a}var _u=!1;function wr(){if(_u){var t=rs;if(t!==null)throw t}}function jr(t,a,s,o){_u=!1;var u=t.updateQueue;ja=!1;var p=u.firstBaseUpdate,y=u.lastBaseUpdate,x=u.shared.pending;if(x!==null){u.shared.pending=null;var A=x,L=A.next;A.next=null,y===null?p=L:y.next=L,y=A;var I=t.alternate;I!==null&&(I=I.updateQueue,x=I.lastBaseUpdate,x!==y&&(x===null?I.firstBaseUpdate=L:x.next=L,I.lastBaseUpdate=A))}if(p!==null){var Y=u.baseState;y=0,I=L=A=null,x=p;do{var q=x.lane&-536870913,V=q!==x.lane;if(V?(Re&q)===q:(o&q)===q){q!==0&&q===ss&&(_u=!0),I!==null&&(I=I.next={lane:0,tag:x.tag,payload:x.payload,callback:null,next:null});e:{var fe=t,we=x;q=a;var Je=s;switch(we.tag){case 1:if(fe=we.payload,typeof fe=="function"){Y=fe.call(Je,Y,q);break e}Y=fe;break e;case 3:fe.flags=fe.flags&-65537|128;case 0:if(fe=we.payload,q=typeof fe=="function"?fe.call(Je,Y,q):fe,q==null)break e;Y=S({},Y,q);break e;case 2:ja=!0}}q=x.callback,q!==null&&(t.flags|=64,V&&(t.flags|=8192),V=u.callbacks,V===null?u.callbacks=[q]:V.push(q))}else V={lane:q,tag:x.tag,payload:x.payload,callback:x.callback,next:null},I===null?(L=I=V,A=Y):I=I.next=V,y|=q;if(x=x.next,x===null){if(x=u.shared.pending,x===null)break;V=x,x=V.next,V.next=null,u.lastBaseUpdate=V,u.shared.pending=null}}while(!0);I===null&&(A=Y),u.baseState=A,u.firstBaseUpdate=L,u.lastBaseUpdate=I,p===null&&(u.shared.lanes=0),Ta|=y,t.lanes=y,t.memoizedState=Y}}function Gm(t,a){if(typeof t!="function")throw Error(r(191,t));t.call(a)}function Im(t,a){var s=t.callbacks;if(s!==null)for(t.callbacks=null,t=0;t<s.length;t++)Gm(s[t],a)}var cs=Qe(null),Po=Qe(0);function Hm(t,a){t=ca,le(Po,t),le(cs,a),ca=t|a.baseLanes}function zu(){le(Po,ca),le(cs,cs.current)}function Cu(){ca=Po.current,Q(cs),Q(Po)}var an=Qe(null),bn=null;function Aa(t){var a=t.alternate;le(ht,ht.current&1),le(an,t),bn===null&&(a===null||cs.current!==null||a.memoizedState!==null)&&(bn=t)}function Tu(t){le(ht,ht.current),le(an,t),bn===null&&(bn=t)}function Zm(t){t.tag===22?(le(ht,ht.current),le(an,t),bn===null&&(bn=t)):_a()}function _a(){le(ht,ht.current),le(an,an.current)}function sn(t){Q(an),bn===t&&(bn=null),Q(ht)}var ht=Qe(0);function Ko(t){for(var a=t;a!==null;){if(a.tag===13){var s=a.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||Bd(s)||Ld(s)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break;for(;a.sibling===null;){if(a.return===null||a.return===t)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var ta=0,ze=null,Ye=null,xt=null,Qo=!1,us=!1,mi=!1,Yo=0,Nr=0,ds=null,ZS=0;function ft(){throw Error(r(321))}function Eu(t,a){if(a===null)return!1;for(var s=0;s<a.length&&s<t.length;s++)if(!tn(t[s],a[s]))return!1;return!0}function Ou(t,a,s,o,u,p){return ta=p,ze=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,$.H=t===null||t.memoizedState===null?zh:Ku,mi=!1,p=s(o,u),mi=!1,us&&(p=Km(a,s,o,u)),Pm(t),p}function Pm(t){$.H=_r;var a=Ye!==null&&Ye.next!==null;if(ta=0,xt=Ye=ze=null,Qo=!1,Nr=0,ds=null,a)throw Error(r(300));t===null||wt||(t=t.dependencies,t!==null&&$o(t)&&(wt=!0))}function Km(t,a,s,o){ze=t;var u=0;do{if(us&&(ds=null),Nr=0,us=!1,25<=u)throw Error(r(301));if(u+=1,xt=Ye=null,t.updateQueue!=null){var p=t.updateQueue;p.lastEffect=null,p.events=null,p.stores=null,p.memoCache!=null&&(p.memoCache.index=0)}$.H=Ch,p=a(s,o)}while(us);return p}function PS(){var t=$.H,a=t.useState()[0];return a=typeof a.then=="function"?kr(a):a,t=t.useState()[0],(Ye!==null?Ye.memoizedState:null)!==t&&(ze.flags|=1024),a}function Du(){var t=Yo!==0;return Yo=0,t}function Ru(t,a,s){a.updateQueue=t.updateQueue,a.flags&=-2053,t.lanes&=~s}function Mu(t){if(Qo){for(t=t.memoizedState;t!==null;){var a=t.queue;a!==null&&(a.pending=null),t=t.next}Qo=!1}ta=0,xt=Ye=ze=null,us=!1,Nr=Yo=0,ds=null}function Ut(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return xt===null?ze.memoizedState=xt=t:xt=xt.next=t,xt}function gt(){if(Ye===null){var t=ze.alternate;t=t!==null?t.memoizedState:null}else t=Ye.next;var a=xt===null?ze.memoizedState:xt.next;if(a!==null)xt=a,Ye=t;else{if(t===null)throw ze.alternate===null?Error(r(467)):Error(r(310));Ye=t,t={memoizedState:Ye.memoizedState,baseState:Ye.baseState,baseQueue:Ye.baseQueue,queue:Ye.queue,next:null},xt===null?ze.memoizedState=xt=t:xt=xt.next=t}return xt}function Xo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function kr(t){var a=Nr;return Nr+=1,ds===null&&(ds=[]),t=Lm(ds,t,a),a=ze,(xt===null?a.memoizedState:xt.next)===null&&(a=a.alternate,$.H=a===null||a.memoizedState===null?zh:Ku),t}function Jo(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return kr(t);if(t.$$typeof===H)return Dt(t)}throw Error(r(438,String(t)))}function Bu(t){var a=null,s=ze.updateQueue;if(s!==null&&(a=s.memoCache),a==null){var o=ze.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(a={data:o.data.map(function(u){return u.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),s===null&&(s=Xo(),ze.updateQueue=s),s.memoCache=a,s=a.data[a.index],s===void 0)for(s=a.data[a.index]=Array(t),o=0;o<t;o++)s[o]=Ne;return a.index++,s}function na(t,a){return typeof a=="function"?a(t):a}function Fo(t){var a=gt();return Lu(a,Ye,t)}function Lu(t,a,s){var o=t.queue;if(o===null)throw Error(r(311));o.lastRenderedReducer=s;var u=t.baseQueue,p=o.pending;if(p!==null){if(u!==null){var y=u.next;u.next=p.next,p.next=y}a.baseQueue=u=p,o.pending=null}if(p=t.baseState,u===null)t.memoizedState=p;else{a=u.next;var x=y=null,A=null,L=a,I=!1;do{var Y=L.lane&-536870913;if(Y!==L.lane?(Re&Y)===Y:(ta&Y)===Y){var q=L.revertLane;if(q===0)A!==null&&(A=A.next={lane:0,revertLane:0,gesture:null,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null}),Y===ss&&(I=!0);else if((ta&q)===q){L=L.next,q===ss&&(I=!0);continue}else Y={lane:0,revertLane:L.revertLane,gesture:null,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},A===null?(x=A=Y,y=p):A=A.next=Y,ze.lanes|=q,Ta|=q;Y=L.action,mi&&s(p,Y),p=L.hasEagerState?L.eagerState:s(p,Y)}else q={lane:Y,revertLane:L.revertLane,gesture:L.gesture,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},A===null?(x=A=q,y=p):A=A.next=q,ze.lanes|=Y,Ta|=Y;L=L.next}while(L!==null&&L!==a);if(A===null?y=p:A.next=x,!tn(p,t.memoizedState)&&(wt=!0,I&&(s=rs,s!==null)))throw s;t.memoizedState=p,t.baseState=y,t.baseQueue=A,o.lastRenderedState=p}return u===null&&(o.lanes=0),[t.memoizedState,o.dispatch]}function qu(t){var a=gt(),s=a.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=t;var o=s.dispatch,u=s.pending,p=a.memoizedState;if(u!==null){s.pending=null;var y=u=u.next;do p=t(p,y.action),y=y.next;while(y!==u);tn(p,a.memoizedState)||(wt=!0),a.memoizedState=p,a.baseQueue===null&&(a.baseState=p),s.lastRenderedState=p}return[p,o]}function Qm(t,a,s){var o=ze,u=gt(),p=Be;if(p){if(s===void 0)throw Error(r(407));s=s()}else s=a();var y=!tn((Ye||u).memoizedState,s);if(y&&(u.memoizedState=s,wt=!0),u=u.queue,Vu(Jm.bind(null,o,u,t),[t]),u.getSnapshot!==a||y||xt!==null&&xt.memoizedState.tag&1){if(o.flags|=2048,fs(9,{destroy:void 0},Xm.bind(null,o,u,s,a),null),We===null)throw Error(r(349));p||(ta&127)!==0||Ym(o,a,s)}return s}function Ym(t,a,s){t.flags|=16384,t={getSnapshot:a,value:s},a=ze.updateQueue,a===null?(a=Xo(),ze.updateQueue=a,a.stores=[t]):(s=a.stores,s===null?a.stores=[t]:s.push(t))}function Xm(t,a,s,o){a.value=s,a.getSnapshot=o,Fm(a)&&Wm(t)}function Jm(t,a,s){return s(function(){Fm(a)&&Wm(t)})}function Fm(t){var a=t.getSnapshot;t=t.value;try{var s=a();return!tn(t,s)}catch{return!0}}function Wm(t){var a=si(t,2);a!==null&&Ft(a,t,2)}function $u(t){var a=Ut();if(typeof t=="function"){var s=t;if(t=s(),mi){Cn(!0);try{s()}finally{Cn(!1)}}}return a.memoizedState=a.baseState=t,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:na,lastRenderedState:t},a}function eh(t,a,s,o){return t.baseState=s,Lu(t,Ye,typeof o=="function"?o:na)}function KS(t,a,s,o,u){if(tl(t))throw Error(r(485));if(t=a.action,t!==null){var p={payload:u,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){p.listeners.push(y)}};$.T!==null?s(!0):p.isTransition=!1,o(p),s=a.pending,s===null?(p.next=a.pending=p,th(a,p)):(p.next=s.next,a.pending=s.next=p)}}function th(t,a){var s=a.action,o=a.payload,u=t.state;if(a.isTransition){var p=$.T,y={};$.T=y;try{var x=s(u,o),A=$.S;A!==null&&A(y,x),nh(t,a,x)}catch(L){Uu(t,a,L)}finally{p!==null&&y.types!==null&&(p.types=y.types),$.T=p}}else try{p=s(u,o),nh(t,a,p)}catch(L){Uu(t,a,L)}}function nh(t,a,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(o){ah(t,a,o)},function(o){return Uu(t,a,o)}):ah(t,a,s)}function ah(t,a,s){a.status="fulfilled",a.value=s,ih(a),t.state=s,a=t.pending,a!==null&&(s=a.next,s===a?t.pending=null:(s=s.next,a.next=s,th(t,s)))}function Uu(t,a,s){var o=t.pending;if(t.pending=null,o!==null){o=o.next;do a.status="rejected",a.reason=s,ih(a),a=a.next;while(a!==o)}t.action=null}function ih(t){t=t.listeners;for(var a=0;a<t.length;a++)(0,t[a])()}function sh(t,a){return a}function rh(t,a){if(Be){var s=We.formState;if(s!==null){e:{var o=ze;if(Be){if(it){t:{for(var u=it,p=yn;u.nodeType!==8;){if(!p){u=null;break t}if(u=vn(u.nextSibling),u===null){u=null;break t}}p=u.data,u=p==="F!"||p==="F"?u:null}if(u){it=vn(u.nextSibling),o=u.data==="F!";break e}}xa(o)}o=!1}o&&(a=s[0])}}return s=Ut(),s.memoizedState=s.baseState=a,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:sh,lastRenderedState:a},s.queue=o,s=kh.bind(null,ze,o),o.dispatch=s,o=$u(!1),p=Pu.bind(null,ze,!1,o.queue),o=Ut(),u={state:a,dispatch:null,action:t,pending:null},o.queue=u,s=KS.bind(null,ze,u,p,s),u.dispatch=s,o.memoizedState=t,[a,s,!1]}function oh(t){var a=gt();return lh(a,Ye,t)}function lh(t,a,s){if(a=Lu(t,a,sh)[0],t=Fo(na)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var o=kr(a)}catch(y){throw y===os?Go:y}else o=a;a=gt();var u=a.queue,p=u.dispatch;return s!==a.memoizedState&&(ze.flags|=2048,fs(9,{destroy:void 0},QS.bind(null,u,s),null)),[o,p,t]}function QS(t,a){t.action=a}function ch(t){var a=gt(),s=Ye;if(s!==null)return lh(a,s,t);gt(),a=a.memoizedState,s=gt();var o=s.queue.dispatch;return s.memoizedState=t,[a,o,!1]}function fs(t,a,s,o){return t={tag:t,create:s,deps:o,inst:a,next:null},a=ze.updateQueue,a===null&&(a=Xo(),ze.updateQueue=a),s=a.lastEffect,s===null?a.lastEffect=t.next=t:(o=s.next,s.next=t,t.next=o,a.lastEffect=t),t}function uh(){return gt().memoizedState}function Wo(t,a,s,o){var u=Ut();ze.flags|=t,u.memoizedState=fs(1|a,{destroy:void 0},s,o===void 0?null:o)}function el(t,a,s,o){var u=gt();o=o===void 0?null:o;var p=u.memoizedState.inst;Ye!==null&&o!==null&&Eu(o,Ye.memoizedState.deps)?u.memoizedState=fs(a,p,s,o):(ze.flags|=t,u.memoizedState=fs(1|a,p,s,o))}function dh(t,a){Wo(8390656,8,t,a)}function Vu(t,a){el(2048,8,t,a)}function YS(t){ze.flags|=4;var a=ze.updateQueue;if(a===null)a=Xo(),ze.updateQueue=a,a.events=[t];else{var s=a.events;s===null?a.events=[t]:s.push(t)}}function fh(t){var a=gt().memoizedState;return YS({ref:a,nextImpl:t}),function(){if((Ie&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}function ph(t,a){return el(4,2,t,a)}function mh(t,a){return el(4,4,t,a)}function hh(t,a){if(typeof a=="function"){t=t();var s=a(t);return function(){typeof s=="function"?s():a(null)}}if(a!=null)return t=t(),a.current=t,function(){a.current=null}}function gh(t,a,s){s=s!=null?s.concat([t]):null,el(4,4,hh.bind(null,a,t),s)}function Gu(){}function yh(t,a){var s=gt();a=a===void 0?null:a;var o=s.memoizedState;return a!==null&&Eu(a,o[1])?o[0]:(s.memoizedState=[t,a],t)}function bh(t,a){var s=gt();a=a===void 0?null:a;var o=s.memoizedState;if(a!==null&&Eu(a,o[1]))return o[0];if(o=t(),mi){Cn(!0);try{t()}finally{Cn(!1)}}return s.memoizedState=[o,a],o}function Iu(t,a,s){return s===void 0||(ta&1073741824)!==0&&(Re&261930)===0?t.memoizedState=a:(t.memoizedState=s,t=vg(),ze.lanes|=t,Ta|=t,s)}function vh(t,a,s,o){return tn(s,a)?s:cs.current!==null?(t=Iu(t,s,o),tn(t,a)||(wt=!0),t):(ta&42)===0||(ta&1073741824)!==0&&(Re&261930)===0?(wt=!0,t.memoizedState=s):(t=vg(),ze.lanes|=t,Ta|=t,a)}function Sh(t,a,s,o,u){var p=F.p;F.p=p!==0&&8>p?p:8;var y=$.T,x={};$.T=x,Pu(t,!1,a,s);try{var A=u(),L=$.S;if(L!==null&&L(x,A),A!==null&&typeof A=="object"&&typeof A.then=="function"){var I=HS(A,o);Ar(t,a,I,ln(t))}else Ar(t,a,o,ln(t))}catch(Y){Ar(t,a,{then:function(){},status:"rejected",reason:Y},ln())}finally{F.p=p,y!==null&&x.types!==null&&(y.types=x.types),$.T=y}}function XS(){}function Hu(t,a,s,o){if(t.tag!==5)throw Error(r(476));var u=xh(t).queue;Sh(t,u,a,de,s===null?XS:function(){return wh(t),s(o)})}function xh(t){var a=t.memoizedState;if(a!==null)return a;a={memoizedState:de,baseState:de,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:na,lastRenderedState:de},next:null};var s={};return a.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:na,lastRenderedState:s},next:null},t.memoizedState=a,t=t.alternate,t!==null&&(t.memoizedState=a),a}function wh(t){var a=xh(t);a.next===null&&(a=t.alternate.memoizedState),Ar(t,a.next.queue,{},ln())}function Zu(){return Dt(Ir)}function jh(){return gt().memoizedState}function Nh(){return gt().memoizedState}function JS(t){for(var a=t.return;a!==null;){switch(a.tag){case 24:case 3:var s=ln();t=Na(s);var o=ka(a,t,s);o!==null&&(Ft(o,a,s),xr(o,a,s)),a={cache:Su()},t.payload=a;return}a=a.return}}function FS(t,a,s){var o=ln();s={lane:o,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},tl(t)?Ah(a,s):(s=cu(t,a,s,o),s!==null&&(Ft(s,t,o),_h(s,a,o)))}function kh(t,a,s){var o=ln();Ar(t,a,s,o)}function Ar(t,a,s,o){var u={lane:o,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(tl(t))Ah(a,u);else{var p=t.alternate;if(t.lanes===0&&(p===null||p.lanes===0)&&(p=a.lastRenderedReducer,p!==null))try{var y=a.lastRenderedState,x=p(y,s);if(u.hasEagerState=!0,u.eagerState=x,tn(x,y))return Mo(t,a,u,0),We===null&&Ro(),!1}catch{}if(s=cu(t,a,u,o),s!==null)return Ft(s,t,o),_h(s,a,o),!0}return!1}function Pu(t,a,s,o){if(o={lane:2,revertLane:Nd(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},tl(t)){if(a)throw Error(r(479))}else a=cu(t,s,o,2),a!==null&&Ft(a,t,2)}function tl(t){var a=t.alternate;return t===ze||a!==null&&a===ze}function Ah(t,a){us=Qo=!0;var s=t.pending;s===null?a.next=a:(a.next=s.next,s.next=a),t.pending=a}function _h(t,a,s){if((s&4194048)!==0){var o=a.lanes;o&=t.pendingLanes,s|=o,a.lanes=s,wo(t,s)}}var _r={readContext:Dt,use:Jo,useCallback:ft,useContext:ft,useEffect:ft,useImperativeHandle:ft,useLayoutEffect:ft,useInsertionEffect:ft,useMemo:ft,useReducer:ft,useRef:ft,useState:ft,useDebugValue:ft,useDeferredValue:ft,useTransition:ft,useSyncExternalStore:ft,useId:ft,useHostTransitionStatus:ft,useFormState:ft,useActionState:ft,useOptimistic:ft,useMemoCache:ft,useCacheRefresh:ft};_r.useEffectEvent=ft;var zh={readContext:Dt,use:Jo,useCallback:function(t,a){return Ut().memoizedState=[t,a===void 0?null:a],t},useContext:Dt,useEffect:dh,useImperativeHandle:function(t,a,s){s=s!=null?s.concat([t]):null,Wo(4194308,4,hh.bind(null,a,t),s)},useLayoutEffect:function(t,a){return Wo(4194308,4,t,a)},useInsertionEffect:function(t,a){Wo(4,2,t,a)},useMemo:function(t,a){var s=Ut();a=a===void 0?null:a;var o=t();if(mi){Cn(!0);try{t()}finally{Cn(!1)}}return s.memoizedState=[o,a],o},useReducer:function(t,a,s){var o=Ut();if(s!==void 0){var u=s(a);if(mi){Cn(!0);try{s(a)}finally{Cn(!1)}}}else u=a;return o.memoizedState=o.baseState=u,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:u},o.queue=t,t=t.dispatch=FS.bind(null,ze,t),[o.memoizedState,t]},useRef:function(t){var a=Ut();return t={current:t},a.memoizedState=t},useState:function(t){t=$u(t);var a=t.queue,s=kh.bind(null,ze,a);return a.dispatch=s,[t.memoizedState,s]},useDebugValue:Gu,useDeferredValue:function(t,a){var s=Ut();return Iu(s,t,a)},useTransition:function(){var t=$u(!1);return t=Sh.bind(null,ze,t.queue,!0,!1),Ut().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,a,s){var o=ze,u=Ut();if(Be){if(s===void 0)throw Error(r(407));s=s()}else{if(s=a(),We===null)throw Error(r(349));(Re&127)!==0||Ym(o,a,s)}u.memoizedState=s;var p={value:s,getSnapshot:a};return u.queue=p,dh(Jm.bind(null,o,p,t),[t]),o.flags|=2048,fs(9,{destroy:void 0},Xm.bind(null,o,p,s,a),null),s},useId:function(){var t=Ut(),a=We.identifierPrefix;if(Be){var s=Un,o=$n;s=(o&~(1<<32-mt(o)-1)).toString(32)+s,a="_"+a+"R_"+s,s=Yo++,0<s&&(a+="H"+s.toString(32)),a+="_"}else s=ZS++,a="_"+a+"r_"+s.toString(32)+"_";return t.memoizedState=a},useHostTransitionStatus:Zu,useFormState:rh,useActionState:rh,useOptimistic:function(t){var a=Ut();a.memoizedState=a.baseState=t;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=s,a=Pu.bind(null,ze,!0,s),s.dispatch=a,[t,a]},useMemoCache:Bu,useCacheRefresh:function(){return Ut().memoizedState=JS.bind(null,ze)},useEffectEvent:function(t){var a=Ut(),s={impl:t};return a.memoizedState=s,function(){if((Ie&2)!==0)throw Error(r(440));return s.impl.apply(void 0,arguments)}}},Ku={readContext:Dt,use:Jo,useCallback:yh,useContext:Dt,useEffect:Vu,useImperativeHandle:gh,useInsertionEffect:ph,useLayoutEffect:mh,useMemo:bh,useReducer:Fo,useRef:uh,useState:function(){return Fo(na)},useDebugValue:Gu,useDeferredValue:function(t,a){var s=gt();return vh(s,Ye.memoizedState,t,a)},useTransition:function(){var t=Fo(na)[0],a=gt().memoizedState;return[typeof t=="boolean"?t:kr(t),a]},useSyncExternalStore:Qm,useId:jh,useHostTransitionStatus:Zu,useFormState:oh,useActionState:oh,useOptimistic:function(t,a){var s=gt();return eh(s,Ye,t,a)},useMemoCache:Bu,useCacheRefresh:Nh};Ku.useEffectEvent=fh;var Ch={readContext:Dt,use:Jo,useCallback:yh,useContext:Dt,useEffect:Vu,useImperativeHandle:gh,useInsertionEffect:ph,useLayoutEffect:mh,useMemo:bh,useReducer:qu,useRef:uh,useState:function(){return qu(na)},useDebugValue:Gu,useDeferredValue:function(t,a){var s=gt();return Ye===null?Iu(s,t,a):vh(s,Ye.memoizedState,t,a)},useTransition:function(){var t=qu(na)[0],a=gt().memoizedState;return[typeof t=="boolean"?t:kr(t),a]},useSyncExternalStore:Qm,useId:jh,useHostTransitionStatus:Zu,useFormState:ch,useActionState:ch,useOptimistic:function(t,a){var s=gt();return Ye!==null?eh(s,Ye,t,a):(s.baseState=t,[t,s.queue.dispatch])},useMemoCache:Bu,useCacheRefresh:Nh};Ch.useEffectEvent=fh;function Qu(t,a,s,o){a=t.memoizedState,s=s(o,a),s=s==null?a:S({},a,s),t.memoizedState=s,t.lanes===0&&(t.updateQueue.baseState=s)}var Yu={enqueueSetState:function(t,a,s){t=t._reactInternals;var o=ln(),u=Na(o);u.payload=a,s!=null&&(u.callback=s),a=ka(t,u,o),a!==null&&(Ft(a,t,o),xr(a,t,o))},enqueueReplaceState:function(t,a,s){t=t._reactInternals;var o=ln(),u=Na(o);u.tag=1,u.payload=a,s!=null&&(u.callback=s),a=ka(t,u,o),a!==null&&(Ft(a,t,o),xr(a,t,o))},enqueueForceUpdate:function(t,a){t=t._reactInternals;var s=ln(),o=Na(s);o.tag=2,a!=null&&(o.callback=a),a=ka(t,o,s),a!==null&&(Ft(a,t,s),xr(a,t,s))}};function Th(t,a,s,o,u,p,y){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(o,p,y):a.prototype&&a.prototype.isPureReactComponent?!pr(s,o)||!pr(u,p):!0}function Eh(t,a,s,o){t=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(s,o),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(s,o),a.state!==t&&Yu.enqueueReplaceState(a,a.state,null)}function hi(t,a){var s=a;if("ref"in a){s={};for(var o in a)o!=="ref"&&(s[o]=a[o])}if(t=t.defaultProps){s===a&&(s=S({},s));for(var u in t)s[u]===void 0&&(s[u]=t[u])}return s}function Oh(t){Do(t)}function Dh(t){console.error(t)}function Rh(t){Do(t)}function nl(t,a){try{var s=t.onUncaughtError;s(a.value,{componentStack:a.stack})}catch(o){setTimeout(function(){throw o})}}function Mh(t,a,s){try{var o=t.onCaughtError;o(s.value,{componentStack:s.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function Xu(t,a,s){return s=Na(s),s.tag=3,s.payload={element:null},s.callback=function(){nl(t,a)},s}function Bh(t){return t=Na(t),t.tag=3,t}function Lh(t,a,s,o){var u=s.type.getDerivedStateFromError;if(typeof u=="function"){var p=o.value;t.payload=function(){return u(p)},t.callback=function(){Mh(a,s,o)}}var y=s.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(t.callback=function(){Mh(a,s,o),typeof u!="function"&&(Ea===null?Ea=new Set([this]):Ea.add(this));var x=o.stack;this.componentDidCatch(o.value,{componentStack:x!==null?x:""})})}function WS(t,a,s,o,u){if(s.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(a=s.alternate,a!==null&&is(a,s,u,!0),s=an.current,s!==null){switch(s.tag){case 31:case 13:return bn===null?ml():s.alternate===null&&pt===0&&(pt=3),s.flags&=-257,s.flags|=65536,s.lanes=u,o===Io?s.flags|=16384:(a=s.updateQueue,a===null?s.updateQueue=new Set([o]):a.add(o),xd(t,o,u)),!1;case 22:return s.flags|=65536,o===Io?s.flags|=16384:(a=s.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([o])},s.updateQueue=a):(s=a.retryQueue,s===null?a.retryQueue=new Set([o]):s.add(o)),xd(t,o,u)),!1}throw Error(r(435,s.tag))}return xd(t,o,u),ml(),!1}if(Be)return a=an.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=u,o!==hu&&(t=Error(r(422),{cause:o}),gr(mn(t,s)))):(o!==hu&&(a=Error(r(423),{cause:o}),gr(mn(a,s))),t=t.current.alternate,t.flags|=65536,u&=-u,t.lanes|=u,o=mn(o,s),u=Xu(t.stateNode,o,u),Au(t,u),pt!==4&&(pt=2)),!1;var p=Error(r(520),{cause:o});if(p=mn(p,s),Mr===null?Mr=[p]:Mr.push(p),pt!==4&&(pt=2),a===null)return!0;o=mn(o,s),s=a;do{switch(s.tag){case 3:return s.flags|=65536,t=u&-u,s.lanes|=t,t=Xu(s.stateNode,o,t),Au(s,t),!1;case 1:if(a=s.type,p=s.stateNode,(s.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(Ea===null||!Ea.has(p))))return s.flags|=65536,u&=-u,s.lanes|=u,u=Bh(u),Lh(u,t,s,o),Au(s,u),!1}s=s.return}while(s!==null);return!1}var Ju=Error(r(461)),wt=!1;function Rt(t,a,s,o){a.child=t===null?Vm(a,null,s,o):pi(a,t.child,s,o)}function qh(t,a,s,o,u){s=s.render;var p=a.ref;if("ref"in o){var y={};for(var x in o)x!=="ref"&&(y[x]=o[x])}else y=o;return ci(a),o=Ou(t,a,s,y,p,u),x=Du(),t!==null&&!wt?(Ru(t,a,u),aa(t,a,u)):(Be&&x&&pu(a),a.flags|=1,Rt(t,a,o,u),a.child)}function $h(t,a,s,o,u){if(t===null){var p=s.type;return typeof p=="function"&&!uu(p)&&p.defaultProps===void 0&&s.compare===null?(a.tag=15,a.type=p,Uh(t,a,p,o,u)):(t=Lo(s.type,null,o,a,a.mode,u),t.ref=a.ref,t.return=a,a.child=t)}if(p=t.child,!sd(t,u)){var y=p.memoizedProps;if(s=s.compare,s=s!==null?s:pr,s(y,o)&&t.ref===a.ref)return aa(t,a,u)}return a.flags|=1,t=Jn(p,o),t.ref=a.ref,t.return=a,a.child=t}function Uh(t,a,s,o,u){if(t!==null){var p=t.memoizedProps;if(pr(p,o)&&t.ref===a.ref)if(wt=!1,a.pendingProps=o=p,sd(t,u))(t.flags&131072)!==0&&(wt=!0);else return a.lanes=t.lanes,aa(t,a,u)}return Fu(t,a,s,o,u)}function Vh(t,a,s,o){var u=o.children,p=t!==null?t.memoizedState:null;if(t===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((a.flags&128)!==0){if(p=p!==null?p.baseLanes|s:s,t!==null){for(o=a.child=t.child,u=0;o!==null;)u=u|o.lanes|o.childLanes,o=o.sibling;o=u&~p}else o=0,a.child=null;return Gh(t,a,p,s,o)}if((s&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},t!==null&&Vo(a,p!==null?p.cachePool:null),p!==null?Hm(a,p):zu(),Zm(a);else return o=a.lanes=536870912,Gh(t,a,p!==null?p.baseLanes|s:s,s,o)}else p!==null?(Vo(a,p.cachePool),Hm(a,p),_a(),a.memoizedState=null):(t!==null&&Vo(a,null),zu(),_a());return Rt(t,a,u,s),a.child}function zr(t,a){return t!==null&&t.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function Gh(t,a,s,o,u){var p=wu();return p=p===null?null:{parent:St._currentValue,pool:p},a.memoizedState={baseLanes:s,cachePool:p},t!==null&&Vo(a,null),zu(),Zm(a),t!==null&&is(t,a,o,!0),a.childLanes=u,null}function al(t,a){return a=sl({mode:a.mode,children:a.children},t.mode),a.ref=t.ref,t.child=a,a.return=t,a}function Ih(t,a,s){return pi(a,t.child,null,s),t=al(a,a.pendingProps),t.flags|=2,sn(a),a.memoizedState=null,t}function ex(t,a,s){var o=a.pendingProps,u=(a.flags&128)!==0;if(a.flags&=-129,t===null){if(Be){if(o.mode==="hidden")return t=al(a,o),a.lanes=536870912,zr(null,t);if(Tu(a),(t=it)?(t=ty(t,yn),t=t!==null&&t.data==="&"?t:null,t!==null&&(a.memoizedState={dehydrated:t,treeContext:va!==null?{id:$n,overflow:Un}:null,retryLane:536870912,hydrationErrors:null},s=Am(t),s.return=a,a.child=s,Ot=a,it=null)):t=null,t===null)throw xa(a);return a.lanes=536870912,null}return al(a,o)}var p=t.memoizedState;if(p!==null){var y=p.dehydrated;if(Tu(a),u)if(a.flags&256)a.flags&=-257,a=Ih(t,a,s);else if(a.memoizedState!==null)a.child=t.child,a.flags|=128,a=null;else throw Error(r(558));else if(wt||is(t,a,s,!1),u=(s&t.childLanes)!==0,wt||u){if(o=We,o!==null&&(y=nr(o,s),y!==0&&y!==p.retryLane))throw p.retryLane=y,si(t,y),Ft(o,t,y),Ju;ml(),a=Ih(t,a,s)}else t=p.treeContext,it=vn(y.nextSibling),Ot=a,Be=!0,Sa=null,yn=!1,t!==null&&Cm(a,t),a=al(a,o),a.flags|=4096;return a}return t=Jn(t.child,{mode:o.mode,children:o.children}),t.ref=a.ref,a.child=t,t.return=a,t}function il(t,a){var s=a.ref;if(s===null)t!==null&&t.ref!==null&&(a.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(r(284));(t===null||t.ref!==s)&&(a.flags|=4194816)}}function Fu(t,a,s,o,u){return ci(a),s=Ou(t,a,s,o,void 0,u),o=Du(),t!==null&&!wt?(Ru(t,a,u),aa(t,a,u)):(Be&&o&&pu(a),a.flags|=1,Rt(t,a,s,u),a.child)}function Hh(t,a,s,o,u,p){return ci(a),a.updateQueue=null,s=Km(a,o,s,u),Pm(t),o=Du(),t!==null&&!wt?(Ru(t,a,p),aa(t,a,p)):(Be&&o&&pu(a),a.flags|=1,Rt(t,a,s,p),a.child)}function Zh(t,a,s,o,u){if(ci(a),a.stateNode===null){var p=es,y=s.contextType;typeof y=="object"&&y!==null&&(p=Dt(y)),p=new s(o,p),a.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,p.updater=Yu,a.stateNode=p,p._reactInternals=a,p=a.stateNode,p.props=o,p.state=a.memoizedState,p.refs={},Nu(a),y=s.contextType,p.context=typeof y=="object"&&y!==null?Dt(y):es,p.state=a.memoizedState,y=s.getDerivedStateFromProps,typeof y=="function"&&(Qu(a,s,y,o),p.state=a.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(y=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),y!==p.state&&Yu.enqueueReplaceState(p,p.state,null),jr(a,o,p,u),wr(),p.state=a.memoizedState),typeof p.componentDidMount=="function"&&(a.flags|=4194308),o=!0}else if(t===null){p=a.stateNode;var x=a.memoizedProps,A=hi(s,x);p.props=A;var L=p.context,I=s.contextType;y=es,typeof I=="object"&&I!==null&&(y=Dt(I));var Y=s.getDerivedStateFromProps;I=typeof Y=="function"||typeof p.getSnapshotBeforeUpdate=="function",x=a.pendingProps!==x,I||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(x||L!==y)&&Eh(a,p,o,y),ja=!1;var q=a.memoizedState;p.state=q,jr(a,o,p,u),wr(),L=a.memoizedState,x||q!==L||ja?(typeof Y=="function"&&(Qu(a,s,Y,o),L=a.memoizedState),(A=ja||Th(a,s,A,o,q,L,y))?(I||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount()),typeof p.componentDidMount=="function"&&(a.flags|=4194308)):(typeof p.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=o,a.memoizedState=L),p.props=o,p.state=L,p.context=y,o=A):(typeof p.componentDidMount=="function"&&(a.flags|=4194308),o=!1)}else{p=a.stateNode,ku(t,a),y=a.memoizedProps,I=hi(s,y),p.props=I,Y=a.pendingProps,q=p.context,L=s.contextType,A=es,typeof L=="object"&&L!==null&&(A=Dt(L)),x=s.getDerivedStateFromProps,(L=typeof x=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(y!==Y||q!==A)&&Eh(a,p,o,A),ja=!1,q=a.memoizedState,p.state=q,jr(a,o,p,u),wr();var V=a.memoizedState;y!==Y||q!==V||ja||t!==null&&t.dependencies!==null&&$o(t.dependencies)?(typeof x=="function"&&(Qu(a,s,x,o),V=a.memoizedState),(I=ja||Th(a,s,I,o,q,V,A)||t!==null&&t.dependencies!==null&&$o(t.dependencies))?(L||typeof p.UNSAFE_componentWillUpdate!="function"&&typeof p.componentWillUpdate!="function"||(typeof p.componentWillUpdate=="function"&&p.componentWillUpdate(o,V,A),typeof p.UNSAFE_componentWillUpdate=="function"&&p.UNSAFE_componentWillUpdate(o,V,A)),typeof p.componentDidUpdate=="function"&&(a.flags|=4),typeof p.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof p.componentDidUpdate!="function"||y===t.memoizedProps&&q===t.memoizedState||(a.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||y===t.memoizedProps&&q===t.memoizedState||(a.flags|=1024),a.memoizedProps=o,a.memoizedState=V),p.props=o,p.state=V,p.context=A,o=I):(typeof p.componentDidUpdate!="function"||y===t.memoizedProps&&q===t.memoizedState||(a.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||y===t.memoizedProps&&q===t.memoizedState||(a.flags|=1024),o=!1)}return p=o,il(t,a),o=(a.flags&128)!==0,p||o?(p=a.stateNode,s=o&&typeof s.getDerivedStateFromError!="function"?null:p.render(),a.flags|=1,t!==null&&o?(a.child=pi(a,t.child,null,u),a.child=pi(a,null,s,u)):Rt(t,a,s,u),a.memoizedState=p.state,t=a.child):t=aa(t,a,u),t}function Ph(t,a,s,o){return oi(),a.flags|=256,Rt(t,a,s,o),a.child}var Wu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ed(t){return{baseLanes:t,cachePool:Mm()}}function td(t,a,s){return t=t!==null?t.childLanes&~s:0,a&&(t|=on),t}function Kh(t,a,s){var o=a.pendingProps,u=!1,p=(a.flags&128)!==0,y;if((y=p)||(y=t!==null&&t.memoizedState===null?!1:(ht.current&2)!==0),y&&(u=!0,a.flags&=-129),y=(a.flags&32)!==0,a.flags&=-33,t===null){if(Be){if(u?Aa(a):_a(),(t=it)?(t=ty(t,yn),t=t!==null&&t.data!=="&"?t:null,t!==null&&(a.memoizedState={dehydrated:t,treeContext:va!==null?{id:$n,overflow:Un}:null,retryLane:536870912,hydrationErrors:null},s=Am(t),s.return=a,a.child=s,Ot=a,it=null)):t=null,t===null)throw xa(a);return Ld(t)?a.lanes=32:a.lanes=536870912,null}var x=o.children;return o=o.fallback,u?(_a(),u=a.mode,x=sl({mode:"hidden",children:x},u),o=ri(o,u,s,null),x.return=a,o.return=a,x.sibling=o,a.child=x,o=a.child,o.memoizedState=ed(s),o.childLanes=td(t,y,s),a.memoizedState=Wu,zr(null,o)):(Aa(a),nd(a,x))}var A=t.memoizedState;if(A!==null&&(x=A.dehydrated,x!==null)){if(p)a.flags&256?(Aa(a),a.flags&=-257,a=ad(t,a,s)):a.memoizedState!==null?(_a(),a.child=t.child,a.flags|=128,a=null):(_a(),x=o.fallback,u=a.mode,o=sl({mode:"visible",children:o.children},u),x=ri(x,u,s,null),x.flags|=2,o.return=a,x.return=a,o.sibling=x,a.child=o,pi(a,t.child,null,s),o=a.child,o.memoizedState=ed(s),o.childLanes=td(t,y,s),a.memoizedState=Wu,a=zr(null,o));else if(Aa(a),Ld(x)){if(y=x.nextSibling&&x.nextSibling.dataset,y)var L=y.dgst;y=L,o=Error(r(419)),o.stack="",o.digest=y,gr({value:o,source:null,stack:null}),a=ad(t,a,s)}else if(wt||is(t,a,s,!1),y=(s&t.childLanes)!==0,wt||y){if(y=We,y!==null&&(o=nr(y,s),o!==0&&o!==A.retryLane))throw A.retryLane=o,si(t,o),Ft(y,t,o),Ju;Bd(x)||ml(),a=ad(t,a,s)}else Bd(x)?(a.flags|=192,a.child=t.child,a=null):(t=A.treeContext,it=vn(x.nextSibling),Ot=a,Be=!0,Sa=null,yn=!1,t!==null&&Cm(a,t),a=nd(a,o.children),a.flags|=4096);return a}return u?(_a(),x=o.fallback,u=a.mode,A=t.child,L=A.sibling,o=Jn(A,{mode:"hidden",children:o.children}),o.subtreeFlags=A.subtreeFlags&65011712,L!==null?x=Jn(L,x):(x=ri(x,u,s,null),x.flags|=2),x.return=a,o.return=a,o.sibling=x,a.child=o,zr(null,o),o=a.child,x=t.child.memoizedState,x===null?x=ed(s):(u=x.cachePool,u!==null?(A=St._currentValue,u=u.parent!==A?{parent:A,pool:A}:u):u=Mm(),x={baseLanes:x.baseLanes|s,cachePool:u}),o.memoizedState=x,o.childLanes=td(t,y,s),a.memoizedState=Wu,zr(t.child,o)):(Aa(a),s=t.child,t=s.sibling,s=Jn(s,{mode:"visible",children:o.children}),s.return=a,s.sibling=null,t!==null&&(y=a.deletions,y===null?(a.deletions=[t],a.flags|=16):y.push(t)),a.child=s,a.memoizedState=null,s)}function nd(t,a){return a=sl({mode:"visible",children:a},t.mode),a.return=t,t.child=a}function sl(t,a){return t=nn(22,t,null,a),t.lanes=0,t}function ad(t,a,s){return pi(a,t.child,null,s),t=nd(a,a.pendingProps.children),t.flags|=2,a.memoizedState=null,t}function Qh(t,a,s){t.lanes|=a;var o=t.alternate;o!==null&&(o.lanes|=a),bu(t.return,a,s)}function id(t,a,s,o,u,p){var y=t.memoizedState;y===null?t.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:o,tail:s,tailMode:u,treeForkCount:p}:(y.isBackwards=a,y.rendering=null,y.renderingStartTime=0,y.last=o,y.tail=s,y.tailMode=u,y.treeForkCount=p)}function Yh(t,a,s){var o=a.pendingProps,u=o.revealOrder,p=o.tail;o=o.children;var y=ht.current,x=(y&2)!==0;if(x?(y=y&1|2,a.flags|=128):y&=1,le(ht,y),Rt(t,a,o,s),o=Be?hr:0,!x&&t!==null&&(t.flags&128)!==0)e:for(t=a.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Qh(t,s,a);else if(t.tag===19)Qh(t,s,a);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===a)break e;for(;t.sibling===null;){if(t.return===null||t.return===a)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(u){case"forwards":for(s=a.child,u=null;s!==null;)t=s.alternate,t!==null&&Ko(t)===null&&(u=s),s=s.sibling;s=u,s===null?(u=a.child,a.child=null):(u=s.sibling,s.sibling=null),id(a,!1,u,s,p,o);break;case"backwards":case"unstable_legacy-backwards":for(s=null,u=a.child,a.child=null;u!==null;){if(t=u.alternate,t!==null&&Ko(t)===null){a.child=u;break}t=u.sibling,u.sibling=s,s=u,u=t}id(a,!0,s,null,p,o);break;case"together":id(a,!1,null,null,void 0,o);break;default:a.memoizedState=null}return a.child}function aa(t,a,s){if(t!==null&&(a.dependencies=t.dependencies),Ta|=a.lanes,(s&a.childLanes)===0)if(t!==null){if(is(t,a,s,!1),(s&a.childLanes)===0)return null}else return null;if(t!==null&&a.child!==t.child)throw Error(r(153));if(a.child!==null){for(t=a.child,s=Jn(t,t.pendingProps),a.child=s,s.return=a;t.sibling!==null;)t=t.sibling,s=s.sibling=Jn(t,t.pendingProps),s.return=a;s.sibling=null}return a.child}function sd(t,a){return(t.lanes&a)!==0?!0:(t=t.dependencies,!!(t!==null&&$o(t)))}function tx(t,a,s){switch(a.tag){case 3:tt(a,a.stateNode.containerInfo),wa(a,St,t.memoizedState.cache),oi();break;case 27:case 5:Ue(a);break;case 4:tt(a,a.stateNode.containerInfo);break;case 10:wa(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,Tu(a),null;break;case 13:var o=a.memoizedState;if(o!==null)return o.dehydrated!==null?(Aa(a),a.flags|=128,null):(s&a.child.childLanes)!==0?Kh(t,a,s):(Aa(a),t=aa(t,a,s),t!==null?t.sibling:null);Aa(a);break;case 19:var u=(t.flags&128)!==0;if(o=(s&a.childLanes)!==0,o||(is(t,a,s,!1),o=(s&a.childLanes)!==0),u){if(o)return Yh(t,a,s);a.flags|=128}if(u=a.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),le(ht,ht.current),o)break;return null;case 22:return a.lanes=0,Vh(t,a,s,a.pendingProps);case 24:wa(a,St,t.memoizedState.cache)}return aa(t,a,s)}function Xh(t,a,s){if(t!==null)if(t.memoizedProps!==a.pendingProps)wt=!0;else{if(!sd(t,s)&&(a.flags&128)===0)return wt=!1,tx(t,a,s);wt=(t.flags&131072)!==0}else wt=!1,Be&&(a.flags&1048576)!==0&&zm(a,hr,a.index);switch(a.lanes=0,a.tag){case 16:e:{var o=a.pendingProps;if(t=di(a.elementType),a.type=t,typeof t=="function")uu(t)?(o=hi(t,o),a.tag=1,a=Zh(null,a,t,o,s)):(a.tag=0,a=Fu(null,a,t,o,s));else{if(t!=null){var u=t.$$typeof;if(u===K){a.tag=11,a=qh(null,a,t,o,s);break e}else if(u===D){a.tag=14,a=$h(null,a,t,o,s);break e}}throw a=re(t)||t,Error(r(306,a,""))}}return a;case 0:return Fu(t,a,a.type,a.pendingProps,s);case 1:return o=a.type,u=hi(o,a.pendingProps),Zh(t,a,o,u,s);case 3:e:{if(tt(a,a.stateNode.containerInfo),t===null)throw Error(r(387));o=a.pendingProps;var p=a.memoizedState;u=p.element,ku(t,a),jr(a,o,null,s);var y=a.memoizedState;if(o=y.cache,wa(a,St,o),o!==p.cache&&vu(a,[St],s,!0),wr(),o=y.element,p.isDehydrated)if(p={element:o,isDehydrated:!1,cache:y.cache},a.updateQueue.baseState=p,a.memoizedState=p,a.flags&256){a=Ph(t,a,o,s);break e}else if(o!==u){u=mn(Error(r(424)),a),gr(u),a=Ph(t,a,o,s);break e}else for(t=a.stateNode.containerInfo,t.nodeType===9?t=t.body:t=t.nodeName==="HTML"?t.ownerDocument.body:t,it=vn(t.firstChild),Ot=a,Be=!0,Sa=null,yn=!0,s=Vm(a,null,o,s),a.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(oi(),o===u){a=aa(t,a,s);break e}Rt(t,a,o,s)}a=a.child}return a;case 26:return il(t,a),t===null?(s=oy(a.type,null,a.pendingProps,null))?a.memoizedState=s:Be||(s=a.type,t=a.pendingProps,o=xl(ne.current).createElement(s),o[Et]=a,o[Pt]=t,Mt(o,s,t),_t(o),a.stateNode=o):a.memoizedState=oy(a.type,t.memoizedProps,a.pendingProps,t.memoizedState),null;case 27:return Ue(a),t===null&&Be&&(o=a.stateNode=iy(a.type,a.pendingProps,ne.current),Ot=a,yn=!0,u=it,Ma(a.type)?(qd=u,it=vn(o.firstChild)):it=u),Rt(t,a,a.pendingProps.children,s),il(t,a),t===null&&(a.flags|=4194304),a.child;case 5:return t===null&&Be&&((u=o=it)&&(o=Ex(o,a.type,a.pendingProps,yn),o!==null?(a.stateNode=o,Ot=a,it=vn(o.firstChild),yn=!1,u=!0):u=!1),u||xa(a)),Ue(a),u=a.type,p=a.pendingProps,y=t!==null?t.memoizedProps:null,o=p.children,Dd(u,p)?o=null:y!==null&&Dd(u,y)&&(a.flags|=32),a.memoizedState!==null&&(u=Ou(t,a,PS,null,null,s),Ir._currentValue=u),il(t,a),Rt(t,a,o,s),a.child;case 6:return t===null&&Be&&((t=s=it)&&(s=Ox(s,a.pendingProps,yn),s!==null?(a.stateNode=s,Ot=a,it=null,t=!0):t=!1),t||xa(a)),null;case 13:return Kh(t,a,s);case 4:return tt(a,a.stateNode.containerInfo),o=a.pendingProps,t===null?a.child=pi(a,null,o,s):Rt(t,a,o,s),a.child;case 11:return qh(t,a,a.type,a.pendingProps,s);case 7:return Rt(t,a,a.pendingProps,s),a.child;case 8:return Rt(t,a,a.pendingProps.children,s),a.child;case 12:return Rt(t,a,a.pendingProps.children,s),a.child;case 10:return o=a.pendingProps,wa(a,a.type,o.value),Rt(t,a,o.children,s),a.child;case 9:return u=a.type._context,o=a.pendingProps.children,ci(a),u=Dt(u),o=o(u),a.flags|=1,Rt(t,a,o,s),a.child;case 14:return $h(t,a,a.type,a.pendingProps,s);case 15:return Uh(t,a,a.type,a.pendingProps,s);case 19:return Yh(t,a,s);case 31:return ex(t,a,s);case 22:return Vh(t,a,s,a.pendingProps);case 24:return ci(a),o=Dt(St),t===null?(u=wu(),u===null&&(u=We,p=Su(),u.pooledCache=p,p.refCount++,p!==null&&(u.pooledCacheLanes|=s),u=p),a.memoizedState={parent:o,cache:u},Nu(a),wa(a,St,u)):((t.lanes&s)!==0&&(ku(t,a),jr(a,null,null,s),wr()),u=t.memoizedState,p=a.memoizedState,u.parent!==o?(u={parent:o,cache:o},a.memoizedState=u,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=u),wa(a,St,o)):(o=p.cache,wa(a,St,o),o!==u.cache&&vu(a,[St],s,!0))),Rt(t,a,a.pendingProps.children,s),a.child;case 29:throw a.pendingProps}throw Error(r(156,a.tag))}function ia(t){t.flags|=4}function rd(t,a,s,o,u){if((a=(t.mode&32)!==0)&&(a=!1),a){if(t.flags|=16777216,(u&335544128)===u)if(t.stateNode.complete)t.flags|=8192;else if(jg())t.flags|=8192;else throw fi=Io,ju}else t.flags&=-16777217}function Jh(t,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!fy(a))if(jg())t.flags|=8192;else throw fi=Io,ju}function rl(t,a){a!==null&&(t.flags|=4),t.flags&16384&&(a=t.tag!==22?So():536870912,t.lanes|=a,gs|=a)}function Cr(t,a){if(!Be)switch(t.tailMode){case"hidden":a=t.tail;for(var s=null;a!==null;)a.alternate!==null&&(s=a),a=a.sibling;s===null?t.tail=null:s.sibling=null;break;case"collapsed":s=t.tail;for(var o=null;s!==null;)s.alternate!==null&&(o=s),s=s.sibling;o===null?a||t.tail===null?t.tail=null:t.tail.sibling=null:o.sibling=null}}function st(t){var a=t.alternate!==null&&t.alternate.child===t.child,s=0,o=0;if(a)for(var u=t.child;u!==null;)s|=u.lanes|u.childLanes,o|=u.subtreeFlags&65011712,o|=u.flags&65011712,u.return=t,u=u.sibling;else for(u=t.child;u!==null;)s|=u.lanes|u.childLanes,o|=u.subtreeFlags,o|=u.flags,u.return=t,u=u.sibling;return t.subtreeFlags|=o,t.childLanes=s,a}function nx(t,a,s){var o=a.pendingProps;switch(mu(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return st(a),null;case 1:return st(a),null;case 3:return s=a.stateNode,o=null,t!==null&&(o=t.memoizedState.cache),a.memoizedState.cache!==o&&(a.flags|=2048),ea(St),xe(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(t===null||t.child===null)&&(as(a)?ia(a):t===null||t.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,gu())),st(a),null;case 26:var u=a.type,p=a.memoizedState;return t===null?(ia(a),p!==null?(st(a),Jh(a,p)):(st(a),rd(a,u,null,o,s))):p?p!==t.memoizedState?(ia(a),st(a),Jh(a,p)):(st(a),a.flags&=-16777217):(t=t.memoizedProps,t!==o&&ia(a),st(a),rd(a,u,t,o,s)),null;case 27:if(Ze(a),s=ne.current,u=a.type,t!==null&&a.stateNode!=null)t.memoizedProps!==o&&ia(a);else{if(!o){if(a.stateNode===null)throw Error(r(166));return st(a),null}t=te.current,as(a)?Tm(a):(t=iy(u,o,s),a.stateNode=t,ia(a))}return st(a),null;case 5:if(Ze(a),u=a.type,t!==null&&a.stateNode!=null)t.memoizedProps!==o&&ia(a);else{if(!o){if(a.stateNode===null)throw Error(r(166));return st(a),null}if(p=te.current,as(a))Tm(a);else{var y=xl(ne.current);switch(p){case 1:p=y.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:p=y.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":p=y.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":p=y.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":p=y.createElement("div"),p.innerHTML="<script><\/script>",p=p.removeChild(p.firstChild);break;case"select":p=typeof o.is=="string"?y.createElement("select",{is:o.is}):y.createElement("select"),o.multiple?p.multiple=!0:o.size&&(p.size=o.size);break;default:p=typeof o.is=="string"?y.createElement(u,{is:o.is}):y.createElement(u)}}p[Et]=a,p[Pt]=o;e:for(y=a.child;y!==null;){if(y.tag===5||y.tag===6)p.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===a)break e;for(;y.sibling===null;){if(y.return===null||y.return===a)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}a.stateNode=p;e:switch(Mt(p,u,o),u){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&ia(a)}}return st(a),rd(a,a.type,t===null?null:t.memoizedProps,a.pendingProps,s),null;case 6:if(t&&a.stateNode!=null)t.memoizedProps!==o&&ia(a);else{if(typeof o!="string"&&a.stateNode===null)throw Error(r(166));if(t=ne.current,as(a)){if(t=a.stateNode,s=a.memoizedProps,o=null,u=Ot,u!==null)switch(u.tag){case 27:case 5:o=u.memoizedProps}t[Et]=a,t=!!(t.nodeValue===s||o!==null&&o.suppressHydrationWarning===!0||Kg(t.nodeValue,s)),t||xa(a,!0)}else t=xl(t).createTextNode(o),t[Et]=a,a.stateNode=t}return st(a),null;case 31:if(s=a.memoizedState,t===null||t.memoizedState!==null){if(o=as(a),s!==null){if(t===null){if(!o)throw Error(r(318));if(t=a.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(557));t[Et]=a}else oi(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;st(a),t=!1}else s=gu(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=s),t=!0;if(!t)return a.flags&256?(sn(a),a):(sn(a),null);if((a.flags&128)!==0)throw Error(r(558))}return st(a),null;case 13:if(o=a.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(u=as(a),o!==null&&o.dehydrated!==null){if(t===null){if(!u)throw Error(r(318));if(u=a.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(r(317));u[Et]=a}else oi(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;st(a),u=!1}else u=gu(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=u),u=!0;if(!u)return a.flags&256?(sn(a),a):(sn(a),null)}return sn(a),(a.flags&128)!==0?(a.lanes=s,a):(s=o!==null,t=t!==null&&t.memoizedState!==null,s&&(o=a.child,u=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(u=o.alternate.memoizedState.cachePool.pool),p=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(p=o.memoizedState.cachePool.pool),p!==u&&(o.flags|=2048)),s!==t&&s&&(a.child.flags|=8192),rl(a,a.updateQueue),st(a),null);case 4:return xe(),t===null&&zd(a.stateNode.containerInfo),st(a),null;case 10:return ea(a.type),st(a),null;case 19:if(Q(ht),o=a.memoizedState,o===null)return st(a),null;if(u=(a.flags&128)!==0,p=o.rendering,p===null)if(u)Cr(o,!1);else{if(pt!==0||t!==null&&(t.flags&128)!==0)for(t=a.child;t!==null;){if(p=Ko(t),p!==null){for(a.flags|=128,Cr(o,!1),t=p.updateQueue,a.updateQueue=t,rl(a,t),a.subtreeFlags=0,t=s,s=a.child;s!==null;)km(s,t),s=s.sibling;return le(ht,ht.current&1|2),Be&&Fn(a,o.treeForkCount),a.child}t=t.sibling}o.tail!==null&&Lt()>dl&&(a.flags|=128,u=!0,Cr(o,!1),a.lanes=4194304)}else{if(!u)if(t=Ko(p),t!==null){if(a.flags|=128,u=!0,t=t.updateQueue,a.updateQueue=t,rl(a,t),Cr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!p.alternate&&!Be)return st(a),null}else 2*Lt()-o.renderingStartTime>dl&&s!==536870912&&(a.flags|=128,u=!0,Cr(o,!1),a.lanes=4194304);o.isBackwards?(p.sibling=a.child,a.child=p):(t=o.last,t!==null?t.sibling=p:a.child=p,o.last=p)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Lt(),t.sibling=null,s=ht.current,le(ht,u?s&1|2:s&1),Be&&Fn(a,o.treeForkCount),t):(st(a),null);case 22:case 23:return sn(a),Cu(),o=a.memoizedState!==null,t!==null?t.memoizedState!==null!==o&&(a.flags|=8192):o&&(a.flags|=8192),o?(s&536870912)!==0&&(a.flags&128)===0&&(st(a),a.subtreeFlags&6&&(a.flags|=8192)):st(a),s=a.updateQueue,s!==null&&rl(a,s.retryQueue),s=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),o=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(o=a.memoizedState.cachePool.pool),o!==s&&(a.flags|=2048),t!==null&&Q(ui),null;case 24:return s=null,t!==null&&(s=t.memoizedState.cache),a.memoizedState.cache!==s&&(a.flags|=2048),ea(St),st(a),null;case 25:return null;case 30:return null}throw Error(r(156,a.tag))}function ax(t,a){switch(mu(a),a.tag){case 1:return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 3:return ea(St),xe(),t=a.flags,(t&65536)!==0&&(t&128)===0?(a.flags=t&-65537|128,a):null;case 26:case 27:case 5:return Ze(a),null;case 31:if(a.memoizedState!==null){if(sn(a),a.alternate===null)throw Error(r(340));oi()}return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 13:if(sn(a),t=a.memoizedState,t!==null&&t.dehydrated!==null){if(a.alternate===null)throw Error(r(340));oi()}return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 19:return Q(ht),null;case 4:return xe(),null;case 10:return ea(a.type),null;case 22:case 23:return sn(a),Cu(),t!==null&&Q(ui),t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 24:return ea(St),null;case 25:return null;default:return null}}function Fh(t,a){switch(mu(a),a.tag){case 3:ea(St),xe();break;case 26:case 27:case 5:Ze(a);break;case 4:xe();break;case 31:a.memoizedState!==null&&sn(a);break;case 13:sn(a);break;case 19:Q(ht);break;case 10:ea(a.type);break;case 22:case 23:sn(a),Cu(),t!==null&&Q(ui);break;case 24:ea(St)}}function Tr(t,a){try{var s=a.updateQueue,o=s!==null?s.lastEffect:null;if(o!==null){var u=o.next;s=u;do{if((s.tag&t)===t){o=void 0;var p=s.create,y=s.inst;o=p(),y.destroy=o}s=s.next}while(s!==u)}}catch(x){Ke(a,a.return,x)}}function za(t,a,s){try{var o=a.updateQueue,u=o!==null?o.lastEffect:null;if(u!==null){var p=u.next;o=p;do{if((o.tag&t)===t){var y=o.inst,x=y.destroy;if(x!==void 0){y.destroy=void 0,u=a;var A=s,L=x;try{L()}catch(I){Ke(u,A,I)}}}o=o.next}while(o!==p)}}catch(I){Ke(a,a.return,I)}}function Wh(t){var a=t.updateQueue;if(a!==null){var s=t.stateNode;try{Im(a,s)}catch(o){Ke(t,t.return,o)}}}function eg(t,a,s){s.props=hi(t.type,t.memoizedProps),s.state=t.memoizedState;try{s.componentWillUnmount()}catch(o){Ke(t,a,o)}}function Er(t,a){try{var s=t.ref;if(s!==null){switch(t.tag){case 26:case 27:case 5:var o=t.stateNode;break;case 30:o=t.stateNode;break;default:o=t.stateNode}typeof s=="function"?t.refCleanup=s(o):s.current=o}}catch(u){Ke(t,a,u)}}function Vn(t,a){var s=t.ref,o=t.refCleanup;if(s!==null)if(typeof o=="function")try{o()}catch(u){Ke(t,a,u)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(u){Ke(t,a,u)}else s.current=null}function tg(t){var a=t.type,s=t.memoizedProps,o=t.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":s.autoFocus&&o.focus();break e;case"img":s.src?o.src=s.src:s.srcSet&&(o.srcset=s.srcSet)}}catch(u){Ke(t,t.return,u)}}function od(t,a,s){try{var o=t.stateNode;kx(o,t.type,s,a),o[Pt]=a}catch(u){Ke(t,t.return,u)}}function ng(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Ma(t.type)||t.tag===4}function ld(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||ng(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&&Ma(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 cd(t,a,s){var o=t.tag;if(o===5||o===6)t=t.stateNode,a?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(t,a):(a=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,a.appendChild(t),s=s._reactRootContainer,s!=null||a.onclick!==null||(a.onclick=Yn));else if(o!==4&&(o===27&&Ma(t.type)&&(s=t.stateNode,a=null),t=t.child,t!==null))for(cd(t,a,s),t=t.sibling;t!==null;)cd(t,a,s),t=t.sibling}function ol(t,a,s){var o=t.tag;if(o===5||o===6)t=t.stateNode,a?s.insertBefore(t,a):s.appendChild(t);else if(o!==4&&(o===27&&Ma(t.type)&&(s=t.stateNode),t=t.child,t!==null))for(ol(t,a,s),t=t.sibling;t!==null;)ol(t,a,s),t=t.sibling}function ag(t){var a=t.stateNode,s=t.memoizedProps;try{for(var o=t.type,u=a.attributes;u.length;)a.removeAttributeNode(u[0]);Mt(a,o,s),a[Et]=t,a[Pt]=s}catch(p){Ke(t,t.return,p)}}var sa=!1,jt=!1,ud=!1,ig=typeof WeakSet=="function"?WeakSet:Set,zt=null;function ix(t,a){if(t=t.containerInfo,Ed=zl,t=gm(t),au(t)){if("selectionStart"in t)var s={start:t.selectionStart,end:t.selectionEnd};else e:{s=(s=t.ownerDocument)&&s.defaultView||window;var o=s.getSelection&&s.getSelection();if(o&&o.rangeCount!==0){s=o.anchorNode;var u=o.anchorOffset,p=o.focusNode;o=o.focusOffset;try{s.nodeType,p.nodeType}catch{s=null;break e}var y=0,x=-1,A=-1,L=0,I=0,Y=t,q=null;t:for(;;){for(var V;Y!==s||u!==0&&Y.nodeType!==3||(x=y+u),Y!==p||o!==0&&Y.nodeType!==3||(A=y+o),Y.nodeType===3&&(y+=Y.nodeValue.length),(V=Y.firstChild)!==null;)q=Y,Y=V;for(;;){if(Y===t)break t;if(q===s&&++L===u&&(x=y),q===p&&++I===o&&(A=y),(V=Y.nextSibling)!==null)break;Y=q,q=Y.parentNode}Y=V}s=x===-1||A===-1?null:{start:x,end:A}}else s=null}s=s||{start:0,end:0}}else s=null;for(Od={focusedElem:t,selectionRange:s},zl=!1,zt=a;zt!==null;)if(a=zt,t=a.child,(a.subtreeFlags&1028)!==0&&t!==null)t.return=a,zt=t;else for(;zt!==null;){switch(a=zt,p=a.alternate,t=a.flags,a.tag){case 0:if((t&4)!==0&&(t=a.updateQueue,t=t!==null?t.events:null,t!==null))for(s=0;s<t.length;s++)u=t[s],u.ref.impl=u.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&p!==null){t=void 0,s=a,u=p.memoizedProps,p=p.memoizedState,o=s.stateNode;try{var fe=hi(s.type,u);t=o.getSnapshotBeforeUpdate(fe,p),o.__reactInternalSnapshotBeforeUpdate=t}catch(we){Ke(s,s.return,we)}}break;case 3:if((t&1024)!==0){if(t=a.stateNode.containerInfo,s=t.nodeType,s===9)Md(t);else if(s===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":Md(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(r(163))}if(t=a.sibling,t!==null){t.return=a.return,zt=t;break}zt=a.return}}function sg(t,a,s){var o=s.flags;switch(s.tag){case 0:case 11:case 15:oa(t,s),o&4&&Tr(5,s);break;case 1:if(oa(t,s),o&4)if(t=s.stateNode,a===null)try{t.componentDidMount()}catch(y){Ke(s,s.return,y)}else{var u=hi(s.type,a.memoizedProps);a=a.memoizedState;try{t.componentDidUpdate(u,a,t.__reactInternalSnapshotBeforeUpdate)}catch(y){Ke(s,s.return,y)}}o&64&&Wh(s),o&512&&Er(s,s.return);break;case 3:if(oa(t,s),o&64&&(t=s.updateQueue,t!==null)){if(a=null,s.child!==null)switch(s.child.tag){case 27:case 5:a=s.child.stateNode;break;case 1:a=s.child.stateNode}try{Im(t,a)}catch(y){Ke(s,s.return,y)}}break;case 27:a===null&&o&4&&ag(s);case 26:case 5:oa(t,s),a===null&&o&4&&tg(s),o&512&&Er(s,s.return);break;case 12:oa(t,s);break;case 31:oa(t,s),o&4&&lg(t,s);break;case 13:oa(t,s),o&4&&cg(t,s),o&64&&(t=s.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(s=px.bind(null,s),Dx(t,s))));break;case 22:if(o=s.memoizedState!==null||sa,!o){a=a!==null&&a.memoizedState!==null||jt,u=sa;var p=jt;sa=o,(jt=a)&&!p?la(t,s,(s.subtreeFlags&8772)!==0):oa(t,s),sa=u,jt=p}break;case 30:break;default:oa(t,s)}}function rg(t){var a=t.alternate;a!==null&&(t.alternate=null,rg(a)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(a=t.stateNode,a!==null&&Uc(a)),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 ot=null,Qt=!1;function ra(t,a,s){for(s=s.child;s!==null;)og(t,a,s),s=s.sibling}function og(t,a,s){if(qt&&typeof qt.onCommitFiberUnmount=="function")try{qt.onCommitFiberUnmount(ga,s)}catch{}switch(s.tag){case 26:jt||Vn(s,a),ra(t,a,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:jt||Vn(s,a);var o=ot,u=Qt;Ma(s.type)&&(ot=s.stateNode,Qt=!1),ra(t,a,s),Ur(s.stateNode),ot=o,Qt=u;break;case 5:jt||Vn(s,a);case 6:if(o=ot,u=Qt,ot=null,ra(t,a,s),ot=o,Qt=u,ot!==null)if(Qt)try{(ot.nodeType===9?ot.body:ot.nodeName==="HTML"?ot.ownerDocument.body:ot).removeChild(s.stateNode)}catch(p){Ke(s,a,p)}else try{ot.removeChild(s.stateNode)}catch(p){Ke(s,a,p)}break;case 18:ot!==null&&(Qt?(t=ot,Wg(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,s.stateNode),Ns(t)):Wg(ot,s.stateNode));break;case 4:o=ot,u=Qt,ot=s.stateNode.containerInfo,Qt=!0,ra(t,a,s),ot=o,Qt=u;break;case 0:case 11:case 14:case 15:za(2,s,a),jt||za(4,s,a),ra(t,a,s);break;case 1:jt||(Vn(s,a),o=s.stateNode,typeof o.componentWillUnmount=="function"&&eg(s,a,o)),ra(t,a,s);break;case 21:ra(t,a,s);break;case 22:jt=(o=jt)||s.memoizedState!==null,ra(t,a,s),jt=o;break;default:ra(t,a,s)}}function lg(t,a){if(a.memoizedState===null&&(t=a.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{Ns(t)}catch(s){Ke(a,a.return,s)}}}function cg(t,a){if(a.memoizedState===null&&(t=a.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Ns(t)}catch(s){Ke(a,a.return,s)}}function sx(t){switch(t.tag){case 31:case 13:case 19:var a=t.stateNode;return a===null&&(a=t.stateNode=new ig),a;case 22:return t=t.stateNode,a=t._retryCache,a===null&&(a=t._retryCache=new ig),a;default:throw Error(r(435,t.tag))}}function ll(t,a){var s=sx(t);a.forEach(function(o){if(!s.has(o)){s.add(o);var u=mx.bind(null,t,o);o.then(u,u)}})}function Yt(t,a){var s=a.deletions;if(s!==null)for(var o=0;o<s.length;o++){var u=s[o],p=t,y=a,x=y;e:for(;x!==null;){switch(x.tag){case 27:if(Ma(x.type)){ot=x.stateNode,Qt=!1;break e}break;case 5:ot=x.stateNode,Qt=!1;break e;case 3:case 4:ot=x.stateNode.containerInfo,Qt=!0;break e}x=x.return}if(ot===null)throw Error(r(160));og(p,y,u),ot=null,Qt=!1,p=u.alternate,p!==null&&(p.return=null),u.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)ug(a,t),a=a.sibling}var On=null;function ug(t,a){var s=t.alternate,o=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:Yt(a,t),Xt(t),o&4&&(za(3,t,t.return),Tr(3,t),za(5,t,t.return));break;case 1:Yt(a,t),Xt(t),o&512&&(jt||s===null||Vn(s,s.return)),o&64&&sa&&(t=t.updateQueue,t!==null&&(o=t.callbacks,o!==null&&(s=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=s===null?o:s.concat(o))));break;case 26:var u=On;if(Yt(a,t),Xt(t),o&512&&(jt||s===null||Vn(s,s.return)),o&4){var p=s!==null?s.memoizedState:null;if(o=t.memoizedState,s===null)if(o===null)if(t.stateNode===null){e:{o=t.type,s=t.memoizedProps,u=u.ownerDocument||u;t:switch(o){case"title":p=u.getElementsByTagName("title")[0],(!p||p[ir]||p[Et]||p.namespaceURI==="http://www.w3.org/2000/svg"||p.hasAttribute("itemprop"))&&(p=u.createElement(o),u.head.insertBefore(p,u.querySelector("head > title"))),Mt(p,o,s),p[Et]=t,_t(p),o=p;break e;case"link":var y=uy("link","href",u).get(o+(s.href||""));if(y){for(var x=0;x<y.length;x++)if(p=y[x],p.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&p.getAttribute("rel")===(s.rel==null?null:s.rel)&&p.getAttribute("title")===(s.title==null?null:s.title)&&p.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){y.splice(x,1);break t}}p=u.createElement(o),Mt(p,o,s),u.head.appendChild(p);break;case"meta":if(y=uy("meta","content",u).get(o+(s.content||""))){for(x=0;x<y.length;x++)if(p=y[x],p.getAttribute("content")===(s.content==null?null:""+s.content)&&p.getAttribute("name")===(s.name==null?null:s.name)&&p.getAttribute("property")===(s.property==null?null:s.property)&&p.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&p.getAttribute("charset")===(s.charSet==null?null:s.charSet)){y.splice(x,1);break t}}p=u.createElement(o),Mt(p,o,s),u.head.appendChild(p);break;default:throw Error(r(468,o))}p[Et]=t,_t(p),o=p}t.stateNode=o}else dy(u,t.type,t.stateNode);else t.stateNode=cy(u,o,t.memoizedProps);else p!==o?(p===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):p.count--,o===null?dy(u,t.type,t.stateNode):cy(u,o,t.memoizedProps)):o===null&&t.stateNode!==null&&od(t,t.memoizedProps,s.memoizedProps)}break;case 27:Yt(a,t),Xt(t),o&512&&(jt||s===null||Vn(s,s.return)),s!==null&&o&4&&od(t,t.memoizedProps,s.memoizedProps);break;case 5:if(Yt(a,t),Xt(t),o&512&&(jt||s===null||Vn(s,s.return)),t.flags&32){u=t.stateNode;try{Ki(u,"")}catch(fe){Ke(t,t.return,fe)}}o&4&&t.stateNode!=null&&(u=t.memoizedProps,od(t,u,s!==null?s.memoizedProps:u)),o&1024&&(ud=!0);break;case 6:if(Yt(a,t),Xt(t),o&4){if(t.stateNode===null)throw Error(r(162));o=t.memoizedProps,s=t.stateNode;try{s.nodeValue=o}catch(fe){Ke(t,t.return,fe)}}break;case 3:if(Nl=null,u=On,On=wl(a.containerInfo),Yt(a,t),On=u,Xt(t),o&4&&s!==null&&s.memoizedState.isDehydrated)try{Ns(a.containerInfo)}catch(fe){Ke(t,t.return,fe)}ud&&(ud=!1,dg(t));break;case 4:o=On,On=wl(t.stateNode.containerInfo),Yt(a,t),Xt(t),On=o;break;case 12:Yt(a,t),Xt(t);break;case 31:Yt(a,t),Xt(t),o&4&&(o=t.updateQueue,o!==null&&(t.updateQueue=null,ll(t,o)));break;case 13:Yt(a,t),Xt(t),t.child.flags&8192&&t.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(ul=Lt()),o&4&&(o=t.updateQueue,o!==null&&(t.updateQueue=null,ll(t,o)));break;case 22:u=t.memoizedState!==null;var A=s!==null&&s.memoizedState!==null,L=sa,I=jt;if(sa=L||u,jt=I||A,Yt(a,t),jt=I,sa=L,Xt(t),o&8192)e:for(a=t.stateNode,a._visibility=u?a._visibility&-2:a._visibility|1,u&&(s===null||A||sa||jt||gi(t)),s=null,a=t;;){if(a.tag===5||a.tag===26){if(s===null){A=s=a;try{if(p=A.stateNode,u)y=p.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{x=A.stateNode;var Y=A.memoizedProps.style,q=Y!=null&&Y.hasOwnProperty("display")?Y.display:null;x.style.display=q==null||typeof q=="boolean"?"":(""+q).trim()}}catch(fe){Ke(A,A.return,fe)}}}else if(a.tag===6){if(s===null){A=a;try{A.stateNode.nodeValue=u?"":A.memoizedProps}catch(fe){Ke(A,A.return,fe)}}}else if(a.tag===18){if(s===null){A=a;try{var V=A.stateNode;u?ey(V,!0):ey(A.stateNode,!1)}catch(fe){Ke(A,A.return,fe)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===t)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break e;for(;a.sibling===null;){if(a.return===null||a.return===t)break e;s===a&&(s=null),a=a.return}s===a&&(s=null),a.sibling.return=a.return,a=a.sibling}o&4&&(o=t.updateQueue,o!==null&&(s=o.retryQueue,s!==null&&(o.retryQueue=null,ll(t,s))));break;case 19:Yt(a,t),Xt(t),o&4&&(o=t.updateQueue,o!==null&&(t.updateQueue=null,ll(t,o)));break;case 30:break;case 21:break;default:Yt(a,t),Xt(t)}}function Xt(t){var a=t.flags;if(a&2){try{for(var s,o=t.return;o!==null;){if(ng(o)){s=o;break}o=o.return}if(s==null)throw Error(r(160));switch(s.tag){case 27:var u=s.stateNode,p=ld(t);ol(t,p,u);break;case 5:var y=s.stateNode;s.flags&32&&(Ki(y,""),s.flags&=-33);var x=ld(t);ol(t,x,y);break;case 3:case 4:var A=s.stateNode.containerInfo,L=ld(t);cd(t,L,A);break;default:throw Error(r(161))}}catch(I){Ke(t,t.return,I)}t.flags&=-3}a&4096&&(t.flags&=-4097)}function dg(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var a=t;dg(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),t=t.sibling}}function oa(t,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)sg(t,a.alternate,a),a=a.sibling}function gi(t){for(t=t.child;t!==null;){var a=t;switch(a.tag){case 0:case 11:case 14:case 15:za(4,a,a.return),gi(a);break;case 1:Vn(a,a.return);var s=a.stateNode;typeof s.componentWillUnmount=="function"&&eg(a,a.return,s),gi(a);break;case 27:Ur(a.stateNode);case 26:case 5:Vn(a,a.return),gi(a);break;case 22:a.memoizedState===null&&gi(a);break;case 30:gi(a);break;default:gi(a)}t=t.sibling}}function la(t,a,s){for(s=s&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var o=a.alternate,u=t,p=a,y=p.flags;switch(p.tag){case 0:case 11:case 15:la(u,p,s),Tr(4,p);break;case 1:if(la(u,p,s),o=p,u=o.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(L){Ke(o,o.return,L)}if(o=p,u=o.updateQueue,u!==null){var x=o.stateNode;try{var A=u.shared.hiddenCallbacks;if(A!==null)for(u.shared.hiddenCallbacks=null,u=0;u<A.length;u++)Gm(A[u],x)}catch(L){Ke(o,o.return,L)}}s&&y&64&&Wh(p),Er(p,p.return);break;case 27:ag(p);case 26:case 5:la(u,p,s),s&&o===null&&y&4&&tg(p),Er(p,p.return);break;case 12:la(u,p,s);break;case 31:la(u,p,s),s&&y&4&&lg(u,p);break;case 13:la(u,p,s),s&&y&4&&cg(u,p);break;case 22:p.memoizedState===null&&la(u,p,s),Er(p,p.return);break;case 30:break;default:la(u,p,s)}a=a.sibling}}function dd(t,a){var s=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),t=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(t=a.memoizedState.cachePool.pool),t!==s&&(t!=null&&t.refCount++,s!=null&&yr(s))}function fd(t,a){t=null,a.alternate!==null&&(t=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==t&&(a.refCount++,t!=null&&yr(t))}function Dn(t,a,s,o){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)fg(t,a,s,o),a=a.sibling}function fg(t,a,s,o){var u=a.flags;switch(a.tag){case 0:case 11:case 15:Dn(t,a,s,o),u&2048&&Tr(9,a);break;case 1:Dn(t,a,s,o);break;case 3:Dn(t,a,s,o),u&2048&&(t=null,a.alternate!==null&&(t=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==t&&(a.refCount++,t!=null&&yr(t)));break;case 12:if(u&2048){Dn(t,a,s,o),t=a.stateNode;try{var p=a.memoizedProps,y=p.id,x=p.onPostCommit;typeof x=="function"&&x(y,a.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(A){Ke(a,a.return,A)}}else Dn(t,a,s,o);break;case 31:Dn(t,a,s,o);break;case 13:Dn(t,a,s,o);break;case 23:break;case 22:p=a.stateNode,y=a.alternate,a.memoizedState!==null?p._visibility&2?Dn(t,a,s,o):Or(t,a):p._visibility&2?Dn(t,a,s,o):(p._visibility|=2,ps(t,a,s,o,(a.subtreeFlags&10256)!==0||!1)),u&2048&&dd(y,a);break;case 24:Dn(t,a,s,o),u&2048&&fd(a.alternate,a);break;default:Dn(t,a,s,o)}}function ps(t,a,s,o,u){for(u=u&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var p=t,y=a,x=s,A=o,L=y.flags;switch(y.tag){case 0:case 11:case 15:ps(p,y,x,A,u),Tr(8,y);break;case 23:break;case 22:var I=y.stateNode;y.memoizedState!==null?I._visibility&2?ps(p,y,x,A,u):Or(p,y):(I._visibility|=2,ps(p,y,x,A,u)),u&&L&2048&&dd(y.alternate,y);break;case 24:ps(p,y,x,A,u),u&&L&2048&&fd(y.alternate,y);break;default:ps(p,y,x,A,u)}a=a.sibling}}function Or(t,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var s=t,o=a,u=o.flags;switch(o.tag){case 22:Or(s,o),u&2048&&dd(o.alternate,o);break;case 24:Or(s,o),u&2048&&fd(o.alternate,o);break;default:Or(s,o)}a=a.sibling}}var Dr=8192;function ms(t,a,s){if(t.subtreeFlags&Dr)for(t=t.child;t!==null;)pg(t,a,s),t=t.sibling}function pg(t,a,s){switch(t.tag){case 26:ms(t,a,s),t.flags&Dr&&t.memoizedState!==null&&Zx(s,On,t.memoizedState,t.memoizedProps);break;case 5:ms(t,a,s);break;case 3:case 4:var o=On;On=wl(t.stateNode.containerInfo),ms(t,a,s),On=o;break;case 22:t.memoizedState===null&&(o=t.alternate,o!==null&&o.memoizedState!==null?(o=Dr,Dr=16777216,ms(t,a,s),Dr=o):ms(t,a,s));break;default:ms(t,a,s)}}function mg(t){var a=t.alternate;if(a!==null&&(t=a.child,t!==null)){a.child=null;do a=t.sibling,t.sibling=null,t=a;while(t!==null)}}function Rr(t){var a=t.deletions;if((t.flags&16)!==0){if(a!==null)for(var s=0;s<a.length;s++){var o=a[s];zt=o,gg(o,t)}mg(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)hg(t),t=t.sibling}function hg(t){switch(t.tag){case 0:case 11:case 15:Rr(t),t.flags&2048&&za(9,t,t.return);break;case 3:Rr(t);break;case 12:Rr(t);break;case 22:var a=t.stateNode;t.memoizedState!==null&&a._visibility&2&&(t.return===null||t.return.tag!==13)?(a._visibility&=-3,cl(t)):Rr(t);break;default:Rr(t)}}function cl(t){var a=t.deletions;if((t.flags&16)!==0){if(a!==null)for(var s=0;s<a.length;s++){var o=a[s];zt=o,gg(o,t)}mg(t)}for(t=t.child;t!==null;){switch(a=t,a.tag){case 0:case 11:case 15:za(8,a,a.return),cl(a);break;case 22:s=a.stateNode,s._visibility&2&&(s._visibility&=-3,cl(a));break;default:cl(a)}t=t.sibling}}function gg(t,a){for(;zt!==null;){var s=zt;switch(s.tag){case 0:case 11:case 15:za(8,s,a);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var o=s.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:yr(s.memoizedState.cache)}if(o=s.child,o!==null)o.return=s,zt=o;else e:for(s=t;zt!==null;){o=zt;var u=o.sibling,p=o.return;if(rg(o),o===s){zt=null;break e}if(u!==null){u.return=p,zt=u;break e}zt=p}}}var rx={getCacheForType:function(t){var a=Dt(St),s=a.data.get(t);return s===void 0&&(s=t(),a.data.set(t,s)),s},cacheSignal:function(){return Dt(St).controller.signal}},ox=typeof WeakMap=="function"?WeakMap:Map,Ie=0,We=null,Oe=null,Re=0,Pe=0,rn=null,Ca=!1,hs=!1,pd=!1,ca=0,pt=0,Ta=0,yi=0,md=0,on=0,gs=0,Mr=null,Jt=null,hd=!1,ul=0,yg=0,dl=1/0,fl=null,Ea=null,kt=0,Oa=null,ys=null,ua=0,gd=0,yd=null,bg=null,Br=0,bd=null;function ln(){return(Ie&2)!==0&&Re!==0?Re&-Re:$.T!==null?Nd():Rp()}function vg(){if(on===0)if((Re&536870912)===0||Be){var t=qi;qi<<=1,(qi&3932160)===0&&(qi=262144),on=t}else on=536870912;return t=an.current,t!==null&&(t.flags|=32),on}function Ft(t,a,s){(t===We&&(Pe===2||Pe===9)||t.cancelPendingCommit!==null)&&(bs(t,0),Da(t,Re,on,!1)),Fe(t,s),((Ie&2)===0||t!==We)&&(t===We&&((Ie&2)===0&&(yi|=s),pt===4&&Da(t,Re,on,!1)),Gn(t))}function Sg(t,a,s){if((Ie&6)!==0)throw Error(r(327));var o=!s&&(a&127)===0&&(a&t.expiredLanes)===0||Wa(t,a),u=o?ux(t,a):Sd(t,a,!0),p=o;do{if(u===0){hs&&!o&&Da(t,a,0,!1);break}else{if(s=t.current.alternate,p&&!lx(s)){u=Sd(t,a,!1),p=!1;continue}if(u===2){if(p=a,t.errorRecoveryDisabledLanes&p)var y=0;else y=t.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){a=y;e:{var x=t;u=Mr;var A=x.current.memoizedState.isDehydrated;if(A&&(bs(x,y).flags|=256),y=Sd(x,y,!1),y!==2){if(pd&&!A){x.errorRecoveryDisabledLanes|=p,yi|=p,u=4;break e}p=Jt,Jt=u,p!==null&&(Jt===null?Jt=p:Jt.push.apply(Jt,p))}u=y}if(p=!1,u!==2)continue}}if(u===1){bs(t,0),Da(t,a,0,!0);break}e:{switch(o=t,p=u,p){case 0:case 1:throw Error(r(345));case 4:if((a&4194048)!==a)break;case 6:Da(o,a,on,!Ca);break e;case 2:Jt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((a&62914560)===a&&(u=ul+300-Lt(),10<u)){if(Da(o,a,on,!Ca),Ui(o,0,!0)!==0)break e;ua=a,o.timeoutHandle=Jg(xg.bind(null,o,s,Jt,fl,hd,a,on,yi,gs,Ca,p,"Throttled",-0,0),u);break e}xg(o,s,Jt,fl,hd,a,on,yi,gs,Ca,p,null,-0,0)}}break}while(!0);Gn(t)}function xg(t,a,s,o,u,p,y,x,A,L,I,Y,q,V){if(t.timeoutHandle=-1,Y=a.subtreeFlags,Y&8192||(Y&16785408)===16785408){Y={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Yn},pg(a,p,Y);var fe=(p&62914560)===p?ul-Lt():(p&4194048)===p?yg-Lt():0;if(fe=Px(Y,fe),fe!==null){ua=p,t.cancelPendingCommit=fe(Cg.bind(null,t,a,p,s,o,u,y,x,A,I,Y,null,q,V)),Da(t,p,y,!L);return}}Cg(t,a,p,s,o,u,y,x,A)}function lx(t){for(var a=t;;){var s=a.tag;if((s===0||s===11||s===15)&&a.flags&16384&&(s=a.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var o=0;o<s.length;o++){var u=s[o],p=u.getSnapshot;u=u.value;try{if(!tn(p(),u))return!1}catch{return!1}}if(s=a.child,a.subtreeFlags&16384&&s!==null)s.return=a,a=s;else{if(a===t)break;for(;a.sibling===null;){if(a.return===null||a.return===t)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function Da(t,a,s,o){a&=~md,a&=~yi,t.suspendedLanes|=a,t.pingedLanes&=~a,o&&(t.warmLanes|=a),o=t.expirationTimes;for(var u=a;0<u;){var p=31-mt(u),y=1<<p;o[p]=-1,u&=~y}s!==0&&xo(t,s,a)}function pl(){return(Ie&6)===0?(Lr(0),!1):!0}function vd(){if(Oe!==null){if(Pe===0)var t=Oe.return;else t=Oe,Wn=li=null,Mu(t),ls=null,vr=0,t=Oe;for(;t!==null;)Fh(t.alternate,t),t=t.return;Oe=null}}function bs(t,a){var s=t.timeoutHandle;s!==-1&&(t.timeoutHandle=-1,zx(s)),s=t.cancelPendingCommit,s!==null&&(t.cancelPendingCommit=null,s()),ua=0,vd(),We=t,Oe=s=Jn(t.current,null),Re=a,Pe=0,rn=null,Ca=!1,hs=Wa(t,a),pd=!1,gs=on=md=yi=Ta=pt=0,Jt=Mr=null,hd=!1,(a&8)!==0&&(a|=a&32);var o=t.entangledLanes;if(o!==0)for(t=t.entanglements,o&=a;0<o;){var u=31-mt(o),p=1<<u;a|=t[u],o&=~p}return ca=a,Ro(),s}function wg(t,a){ze=null,$.H=_r,a===os||a===Go?(a=qm(),Pe=3):a===ju?(a=qm(),Pe=4):Pe=a===Ju?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,rn=a,Oe===null&&(pt=1,nl(t,mn(a,t.current)))}function jg(){var t=an.current;return t===null?!0:(Re&4194048)===Re?bn===null:(Re&62914560)===Re||(Re&536870912)!==0?t===bn:!1}function Ng(){var t=$.H;return $.H=_r,t===null?_r:t}function kg(){var t=$.A;return $.A=rx,t}function ml(){pt=4,Ca||(Re&4194048)!==Re&&an.current!==null||(hs=!0),(Ta&134217727)===0&&(yi&134217727)===0||We===null||Da(We,Re,on,!1)}function Sd(t,a,s){var o=Ie;Ie|=2;var u=Ng(),p=kg();(We!==t||Re!==a)&&(fl=null,bs(t,a)),a=!1;var y=pt;e:do try{if(Pe!==0&&Oe!==null){var x=Oe,A=rn;switch(Pe){case 8:vd(),y=6;break e;case 3:case 2:case 9:case 6:an.current===null&&(a=!0);var L=Pe;if(Pe=0,rn=null,vs(t,x,A,L),s&&hs){y=0;break e}break;default:L=Pe,Pe=0,rn=null,vs(t,x,A,L)}}cx(),y=pt;break}catch(I){wg(t,I)}while(!0);return a&&t.shellSuspendCounter++,Wn=li=null,Ie=o,$.H=u,$.A=p,Oe===null&&(We=null,Re=0,Ro()),y}function cx(){for(;Oe!==null;)Ag(Oe)}function ux(t,a){var s=Ie;Ie|=2;var o=Ng(),u=kg();We!==t||Re!==a?(fl=null,dl=Lt()+500,bs(t,a)):hs=Wa(t,a);e:do try{if(Pe!==0&&Oe!==null){a=Oe;var p=rn;t:switch(Pe){case 1:Pe=0,rn=null,vs(t,a,p,1);break;case 2:case 9:if(Bm(p)){Pe=0,rn=null,_g(a);break}a=function(){Pe!==2&&Pe!==9||We!==t||(Pe=7),Gn(t)},p.then(a,a);break e;case 3:Pe=7;break e;case 4:Pe=5;break e;case 7:Bm(p)?(Pe=0,rn=null,_g(a)):(Pe=0,rn=null,vs(t,a,p,7));break;case 5:var y=null;switch(Oe.tag){case 26:y=Oe.memoizedState;case 5:case 27:var x=Oe;if(y?fy(y):x.stateNode.complete){Pe=0,rn=null;var A=x.sibling;if(A!==null)Oe=A;else{var L=x.return;L!==null?(Oe=L,hl(L)):Oe=null}break t}}Pe=0,rn=null,vs(t,a,p,5);break;case 6:Pe=0,rn=null,vs(t,a,p,6);break;case 8:vd(),pt=6;break e;default:throw Error(r(462))}}dx();break}catch(I){wg(t,I)}while(!0);return Wn=li=null,$.H=o,$.A=u,Ie=s,Oe!==null?0:(We=null,Re=0,Ro(),pt)}function dx(){for(;Oe!==null&&!go();)Ag(Oe)}function Ag(t){var a=Xh(t.alternate,t,ca);t.memoizedProps=t.pendingProps,a===null?hl(t):Oe=a}function _g(t){var a=t,s=a.alternate;switch(a.tag){case 15:case 0:a=Hh(s,a,a.pendingProps,a.type,void 0,Re);break;case 11:a=Hh(s,a,a.pendingProps,a.type.render,a.ref,Re);break;case 5:Mu(a);default:Fh(s,a),a=Oe=km(a,ca),a=Xh(s,a,ca)}t.memoizedProps=t.pendingProps,a===null?hl(t):Oe=a}function vs(t,a,s,o){Wn=li=null,Mu(a),ls=null,vr=0;var u=a.return;try{if(WS(t,u,a,s,Re)){pt=1,nl(t,mn(s,t.current)),Oe=null;return}}catch(p){if(u!==null)throw Oe=u,p;pt=1,nl(t,mn(s,t.current)),Oe=null;return}a.flags&32768?(Be||o===1?t=!0:hs||(Re&536870912)!==0?t=!1:(Ca=t=!0,(o===2||o===9||o===3||o===6)&&(o=an.current,o!==null&&o.tag===13&&(o.flags|=16384))),zg(a,t)):hl(a)}function hl(t){var a=t;do{if((a.flags&32768)!==0){zg(a,Ca);return}t=a.return;var s=nx(a.alternate,a,ca);if(s!==null){Oe=s;return}if(a=a.sibling,a!==null){Oe=a;return}Oe=a=t}while(a!==null);pt===0&&(pt=5)}function zg(t,a){do{var s=ax(t.alternate,t);if(s!==null){s.flags&=32767,Oe=s;return}if(s=t.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!a&&(t=t.sibling,t!==null)){Oe=t;return}Oe=t=s}while(t!==null);pt=6,Oe=null}function Cg(t,a,s,o,u,p,y,x,A){t.cancelPendingCommit=null;do gl();while(kt!==0);if((Ie&6)!==0)throw Error(r(327));if(a!==null){if(a===t.current)throw Error(r(177));if(p=a.lanes|a.childLanes,p|=lu,ei(t,s,p,y,x,A),t===We&&(Oe=We=null,Re=0),ys=a,Oa=t,ua=s,gd=p,yd=u,bg=o,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,hx(Mi,function(){return Rg(),null})):(t.callbackNode=null,t.callbackPriority=0),o=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||o){o=$.T,$.T=null,u=F.p,F.p=2,y=Ie,Ie|=4;try{ix(t,a,s)}finally{Ie=y,F.p=u,$.T=o}}kt=1,Tg(),Eg(),Og()}}function Tg(){if(kt===1){kt=0;var t=Oa,a=ys,s=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||s){s=$.T,$.T=null;var o=F.p;F.p=2;var u=Ie;Ie|=4;try{ug(a,t);var p=Od,y=gm(t.containerInfo),x=p.focusedElem,A=p.selectionRange;if(y!==x&&x&&x.ownerDocument&&hm(x.ownerDocument.documentElement,x)){if(A!==null&&au(x)){var L=A.start,I=A.end;if(I===void 0&&(I=L),"selectionStart"in x)x.selectionStart=L,x.selectionEnd=Math.min(I,x.value.length);else{var Y=x.ownerDocument||document,q=Y&&Y.defaultView||window;if(q.getSelection){var V=q.getSelection(),fe=x.textContent.length,we=Math.min(A.start,fe),Je=A.end===void 0?we:Math.min(A.end,fe);!V.extend&&we>Je&&(y=Je,Je=we,we=y);var O=mm(x,we),z=mm(x,Je);if(O&&z&&(V.rangeCount!==1||V.anchorNode!==O.node||V.anchorOffset!==O.offset||V.focusNode!==z.node||V.focusOffset!==z.offset)){var B=Y.createRange();B.setStart(O.node,O.offset),V.removeAllRanges(),we>Je?(V.addRange(B),V.extend(z.node,z.offset)):(B.setEnd(z.node,z.offset),V.addRange(B))}}}}for(Y=[],V=x;V=V.parentNode;)V.nodeType===1&&Y.push({element:V,left:V.scrollLeft,top:V.scrollTop});for(typeof x.focus=="function"&&x.focus(),x=0;x<Y.length;x++){var P=Y[x];P.element.scrollLeft=P.left,P.element.scrollTop=P.top}}zl=!!Ed,Od=Ed=null}finally{Ie=u,F.p=o,$.T=s}}t.current=a,kt=2}}function Eg(){if(kt===2){kt=0;var t=Oa,a=ys,s=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||s){s=$.T,$.T=null;var o=F.p;F.p=2;var u=Ie;Ie|=4;try{sg(t,a.alternate,a)}finally{Ie=u,F.p=o,$.T=s}}kt=3}}function Og(){if(kt===4||kt===3){kt=0,Bc();var t=Oa,a=ys,s=ua,o=bg;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?kt=5:(kt=0,ys=Oa=null,Dg(t,t.pendingLanes));var u=t.pendingLanes;if(u===0&&(Ea=null),Tn(s),a=a.stateNode,qt&&typeof qt.onCommitFiberRoot=="function")try{qt.onCommitFiberRoot(ga,a,void 0,(a.current.flags&128)===128)}catch{}if(o!==null){a=$.T,u=F.p,F.p=2,$.T=null;try{for(var p=t.onRecoverableError,y=0;y<o.length;y++){var x=o[y];p(x.value,{componentStack:x.stack})}}finally{$.T=a,F.p=u}}(ua&3)!==0&&gl(),Gn(t),u=t.pendingLanes,(s&261930)!==0&&(u&42)!==0?t===bd?Br++:(Br=0,bd=t):Br=0,Lr(0)}}function Dg(t,a){(t.pooledCacheLanes&=a)===0&&(a=t.pooledCache,a!=null&&(t.pooledCache=null,yr(a)))}function gl(){return Tg(),Eg(),Og(),Rg()}function Rg(){if(kt!==5)return!1;var t=Oa,a=gd;gd=0;var s=Tn(ua),o=$.T,u=F.p;try{F.p=32>s?32:s,$.T=null,s=yd,yd=null;var p=Oa,y=ua;if(kt=0,ys=Oa=null,ua=0,(Ie&6)!==0)throw Error(r(331));var x=Ie;if(Ie|=4,hg(p.current),fg(p,p.current,y,s),Ie=x,Lr(0,!1),qt&&typeof qt.onPostCommitFiberRoot=="function")try{qt.onPostCommitFiberRoot(ga,p)}catch{}return!0}finally{F.p=u,$.T=o,Dg(t,a)}}function Mg(t,a,s){a=mn(s,a),a=Xu(t.stateNode,a,2),t=ka(t,a,2),t!==null&&(Fe(t,2),Gn(t))}function Ke(t,a,s){if(t.tag===3)Mg(t,t,s);else for(;a!==null;){if(a.tag===3){Mg(a,t,s);break}else if(a.tag===1){var o=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(Ea===null||!Ea.has(o))){t=mn(s,t),s=Bh(2),o=ka(a,s,2),o!==null&&(Lh(s,o,a,t),Fe(o,2),Gn(o));break}}a=a.return}}function xd(t,a,s){var o=t.pingCache;if(o===null){o=t.pingCache=new ox;var u=new Set;o.set(a,u)}else u=o.get(a),u===void 0&&(u=new Set,o.set(a,u));u.has(s)||(pd=!0,u.add(s),t=fx.bind(null,t,a,s),a.then(t,t))}function fx(t,a,s){var o=t.pingCache;o!==null&&o.delete(a),t.pingedLanes|=t.suspendedLanes&s,t.warmLanes&=~s,We===t&&(Re&s)===s&&(pt===4||pt===3&&(Re&62914560)===Re&&300>Lt()-ul?(Ie&2)===0&&bs(t,0):md|=s,gs===Re&&(gs=0)),Gn(t)}function Bg(t,a){a===0&&(a=So()),t=si(t,a),t!==null&&(Fe(t,a),Gn(t))}function px(t){var a=t.memoizedState,s=0;a!==null&&(s=a.retryLane),Bg(t,s)}function mx(t,a){var s=0;switch(t.tag){case 31:case 13:var o=t.stateNode,u=t.memoizedState;u!==null&&(s=u.retryLane);break;case 19:o=t.stateNode;break;case 22:o=t.stateNode._retryCache;break;default:throw Error(r(314))}o!==null&&o.delete(a),Bg(t,s)}function hx(t,a){return Di(t,a)}var yl=null,Ss=null,wd=!1,bl=!1,jd=!1,Ra=0;function Gn(t){t!==Ss&&t.next===null&&(Ss===null?yl=Ss=t:Ss=Ss.next=t),bl=!0,wd||(wd=!0,yx())}function Lr(t,a){if(!jd&&bl){jd=!0;do for(var s=!1,o=yl;o!==null;){if(t!==0){var u=o.pendingLanes;if(u===0)var p=0;else{var y=o.suspendedLanes,x=o.pingedLanes;p=(1<<31-mt(42|t)+1)-1,p&=u&~(y&~x),p=p&201326741?p&201326741|1:p?p|2:0}p!==0&&(s=!0,Ug(o,p))}else p=Re,p=Ui(o,o===We?p:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(p&3)===0||Wa(o,p)||(s=!0,Ug(o,p));o=o.next}while(s);jd=!1}}function gx(){Lg()}function Lg(){bl=wd=!1;var t=0;Ra!==0&&_x()&&(t=Ra);for(var a=Lt(),s=null,o=yl;o!==null;){var u=o.next,p=qg(o,a);p===0?(o.next=null,s===null?yl=u:s.next=u,u===null&&(Ss=s)):(s=o,(t!==0||(p&3)!==0)&&(bl=!0)),o=u}kt!==0&&kt!==5||Lr(t),Ra!==0&&(Ra=0)}function qg(t,a){for(var s=t.suspendedLanes,o=t.pingedLanes,u=t.expirationTimes,p=t.pendingLanes&-62914561;0<p;){var y=31-mt(p),x=1<<y,A=u[y];A===-1?((x&s)===0||(x&o)!==0)&&(u[y]=Kn(x,a)):A<=a&&(t.expiredLanes|=x),p&=~x}if(a=We,s=Re,s=Ui(t,t===a?s:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),o=t.callbackNode,s===0||t===a&&(Pe===2||Pe===9)||t.cancelPendingCommit!==null)return o!==null&&o!==null&&Ri(o),t.callbackNode=null,t.callbackPriority=0;if((s&3)===0||Wa(t,s)){if(a=s&-s,a===t.callbackPriority)return a;switch(o!==null&&Ri(o),Tn(s)){case 2:case 8:s=bo;break;case 32:s=Mi;break;case 268435456:s=Bi;break;default:s=Mi}return o=$g.bind(null,t),s=Di(s,o),t.callbackPriority=a,t.callbackNode=s,a}return o!==null&&o!==null&&Ri(o),t.callbackPriority=2,t.callbackNode=null,2}function $g(t,a){if(kt!==0&&kt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var s=t.callbackNode;if(gl()&&t.callbackNode!==s)return null;var o=Re;return o=Ui(t,t===We?o:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),o===0?null:(Sg(t,o,a),qg(t,Lt()),t.callbackNode!=null&&t.callbackNode===s?$g.bind(null,t):null)}function Ug(t,a){if(gl())return null;Sg(t,a,!0)}function yx(){Cx(function(){(Ie&6)!==0?Di(er,gx):Lg()})}function Nd(){if(Ra===0){var t=ss;t===0&&(t=Li,Li<<=1,(Li&261888)===0&&(Li=256)),Ra=t}return Ra}function Vg(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:Ao(""+t)}function Gg(t,a){var s=a.ownerDocument.createElement("input");return s.name=a.name,s.value=a.value,t.id&&s.setAttribute("form",t.id),a.parentNode.insertBefore(s,a),t=new FormData(t),s.parentNode.removeChild(s),t}function bx(t,a,s,o,u){if(a==="submit"&&s&&s.stateNode===u){var p=Vg((u[Pt]||null).action),y=o.submitter;y&&(a=(a=y[Pt]||null)?Vg(a.formAction):y.getAttribute("formAction"),a!==null&&(p=a,y=null));var x=new To("action","action",null,o,u);t.push({event:x,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(Ra!==0){var A=y?Gg(u,y):new FormData(u);Hu(s,{pending:!0,data:A,method:u.method,action:p},null,A)}}else typeof p=="function"&&(x.preventDefault(),A=y?Gg(u,y):new FormData(u),Hu(s,{pending:!0,data:A,method:u.method,action:p},p,A))},currentTarget:u}]})}}for(var kd=0;kd<ou.length;kd++){var Ad=ou[kd],vx=Ad.toLowerCase(),Sx=Ad[0].toUpperCase()+Ad.slice(1);En(vx,"on"+Sx)}En(vm,"onAnimationEnd"),En(Sm,"onAnimationIteration"),En(xm,"onAnimationStart"),En("dblclick","onDoubleClick"),En("focusin","onFocus"),En("focusout","onBlur"),En(BS,"onTransitionRun"),En(LS,"onTransitionStart"),En(qS,"onTransitionCancel"),En(wm,"onTransitionEnd"),Zi("onMouseEnter",["mouseout","mouseover"]),Zi("onMouseLeave",["mouseout","mouseover"]),Zi("onPointerEnter",["pointerout","pointerover"]),Zi("onPointerLeave",["pointerout","pointerover"]),ti("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ti("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ti("onBeforeInput",["compositionend","keypress","textInput","paste"]),ti("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ti("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ti("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var qr="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(" "),xx=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(qr));function Ig(t,a){a=(a&4)!==0;for(var s=0;s<t.length;s++){var o=t[s],u=o.event;o=o.listeners;e:{var p=void 0;if(a)for(var y=o.length-1;0<=y;y--){var x=o[y],A=x.instance,L=x.currentTarget;if(x=x.listener,A!==p&&u.isPropagationStopped())break e;p=x,u.currentTarget=L;try{p(u)}catch(I){Do(I)}u.currentTarget=null,p=A}else for(y=0;y<o.length;y++){if(x=o[y],A=x.instance,L=x.currentTarget,x=x.listener,A!==p&&u.isPropagationStopped())break e;p=x,u.currentTarget=L;try{p(u)}catch(I){Do(I)}u.currentTarget=null,p=A}}}}function De(t,a){var s=a[$c];s===void 0&&(s=a[$c]=new Set);var o=t+"__bubble";s.has(o)||(Hg(a,t,2,!1),s.add(o))}function _d(t,a,s){var o=0;a&&(o|=4),Hg(s,t,o,a)}var vl="_reactListening"+Math.random().toString(36).slice(2);function zd(t){if(!t[vl]){t[vl]=!0,Lp.forEach(function(s){s!=="selectionchange"&&(xx.has(s)||_d(s,!1,t),_d(s,!0,t))});var a=t.nodeType===9?t:t.ownerDocument;a===null||a[vl]||(a[vl]=!0,_d("selectionchange",!1,a))}}function Hg(t,a,s,o){switch(vy(a)){case 2:var u=Yx;break;case 8:u=Xx;break;default:u=Id}s=u.bind(null,a,s,t),u=void 0,!Qc||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(u=!0),o?u!==void 0?t.addEventListener(a,s,{capture:!0,passive:u}):t.addEventListener(a,s,!0):u!==void 0?t.addEventListener(a,s,{passive:u}):t.addEventListener(a,s,!1)}function Cd(t,a,s,o,u){var p=o;if((a&1)===0&&(a&2)===0&&o!==null)e:for(;;){if(o===null)return;var y=o.tag;if(y===3||y===4){var x=o.stateNode.containerInfo;if(x===u)break;if(y===4)for(y=o.return;y!==null;){var A=y.tag;if((A===3||A===4)&&y.stateNode.containerInfo===u)return;y=y.return}for(;x!==null;){if(y=Gi(x),y===null)return;if(A=y.tag,A===5||A===6||A===26||A===27){o=p=y;continue e}x=x.parentNode}}o=o.return}Yp(function(){var L=p,I=Pc(s),Y=[];e:{var q=jm.get(t);if(q!==void 0){var V=To,fe=t;switch(t){case"keypress":if(zo(s)===0)break e;case"keydown":case"keyup":V=mS;break;case"focusin":fe="focus",V=Fc;break;case"focusout":fe="blur",V=Fc;break;case"beforeblur":case"afterblur":V=Fc;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":V=Fp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":V=nS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":V=yS;break;case vm:case Sm:case xm:V=sS;break;case wm:V=vS;break;case"scroll":case"scrollend":V=eS;break;case"wheel":V=xS;break;case"copy":case"cut":case"paste":V=oS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":V=em;break;case"toggle":case"beforetoggle":V=jS}var we=(a&4)!==0,Je=!we&&(t==="scroll"||t==="scrollend"),O=we?q!==null?q+"Capture":null:q;we=[];for(var z=L,B;z!==null;){var P=z;if(B=P.stateNode,P=P.tag,P!==5&&P!==26&&P!==27||B===null||O===null||(P=rr(z,O),P!=null&&we.push($r(z,P,B))),Je)break;z=z.return}0<we.length&&(q=new V(q,fe,null,s,I),Y.push({event:q,listeners:we}))}}if((a&7)===0){e:{if(q=t==="mouseover"||t==="pointerover",V=t==="mouseout"||t==="pointerout",q&&s!==Zc&&(fe=s.relatedTarget||s.fromElement)&&(Gi(fe)||fe[Vi]))break e;if((V||q)&&(q=I.window===I?I:(q=I.ownerDocument)?q.defaultView||q.parentWindow:window,V?(fe=s.relatedTarget||s.toElement,V=L,fe=fe?Gi(fe):null,fe!==null&&(Je=c(fe),we=fe.tag,fe!==Je||we!==5&&we!==27&&we!==6)&&(fe=null)):(V=null,fe=L),V!==fe)){if(we=Fp,P="onMouseLeave",O="onMouseEnter",z="mouse",(t==="pointerout"||t==="pointerover")&&(we=em,P="onPointerLeave",O="onPointerEnter",z="pointer"),Je=V==null?q:sr(V),B=fe==null?q:sr(fe),q=new we(P,z+"leave",V,s,I),q.target=Je,q.relatedTarget=B,P=null,Gi(I)===L&&(we=new we(O,z+"enter",fe,s,I),we.target=B,we.relatedTarget=Je,P=we),Je=P,V&&fe)t:{for(we=wx,O=V,z=fe,B=0,P=O;P;P=we(P))B++;P=0;for(var Se=z;Se;Se=we(Se))P++;for(;0<B-P;)O=we(O),B--;for(;0<P-B;)z=we(z),P--;for(;B--;){if(O===z||z!==null&&O===z.alternate){we=O;break t}O=we(O),z=we(z)}we=null}else we=null;V!==null&&Zg(Y,q,V,we,!1),fe!==null&&Je!==null&&Zg(Y,Je,fe,we,!0)}}e:{if(q=L?sr(L):window,V=q.nodeName&&q.nodeName.toLowerCase(),V==="select"||V==="input"&&q.type==="file")var Ve=lm;else if(rm(q))if(cm)Ve=DS;else{Ve=ES;var ge=TS}else V=q.nodeName,!V||V.toLowerCase()!=="input"||q.type!=="checkbox"&&q.type!=="radio"?L&&Hc(L.elementType)&&(Ve=lm):Ve=OS;if(Ve&&(Ve=Ve(t,L))){om(Y,Ve,s,I);break e}ge&&ge(t,q,L),t==="focusout"&&L&&q.type==="number"&&L.memoizedProps.value!=null&&Ic(q,"number",q.value)}switch(ge=L?sr(L):window,t){case"focusin":(rm(ge)||ge.contentEditable==="true")&&(Ji=ge,iu=L,mr=null);break;case"focusout":mr=iu=Ji=null;break;case"mousedown":su=!0;break;case"contextmenu":case"mouseup":case"dragend":su=!1,ym(Y,s,I);break;case"selectionchange":if(MS)break;case"keydown":case"keyup":ym(Y,s,I)}var Ce;if(eu)e:{switch(t){case"compositionstart":var Me="onCompositionStart";break e;case"compositionend":Me="onCompositionEnd";break e;case"compositionupdate":Me="onCompositionUpdate";break e}Me=void 0}else Xi?im(t,s)&&(Me="onCompositionEnd"):t==="keydown"&&s.keyCode===229&&(Me="onCompositionStart");Me&&(tm&&s.locale!=="ko"&&(Xi||Me!=="onCompositionStart"?Me==="onCompositionEnd"&&Xi&&(Ce=Xp()):(ba=I,Yc="value"in ba?ba.value:ba.textContent,Xi=!0)),ge=Sl(L,Me),0<ge.length&&(Me=new Wp(Me,t,null,s,I),Y.push({event:Me,listeners:ge}),Ce?Me.data=Ce:(Ce=sm(s),Ce!==null&&(Me.data=Ce)))),(Ce=kS?AS(t,s):_S(t,s))&&(Me=Sl(L,"onBeforeInput"),0<Me.length&&(ge=new Wp("onBeforeInput","beforeinput",null,s,I),Y.push({event:ge,listeners:Me}),ge.data=Ce)),bx(Y,t,L,s,I)}Ig(Y,a)})}function $r(t,a,s){return{instance:t,listener:a,currentTarget:s}}function Sl(t,a){for(var s=a+"Capture",o=[];t!==null;){var u=t,p=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||p===null||(u=rr(t,s),u!=null&&o.unshift($r(t,u,p)),u=rr(t,a),u!=null&&o.push($r(t,u,p))),t.tag===3)return o;t=t.return}return[]}function wx(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function Zg(t,a,s,o,u){for(var p=a._reactName,y=[];s!==null&&s!==o;){var x=s,A=x.alternate,L=x.stateNode;if(x=x.tag,A!==null&&A===o)break;x!==5&&x!==26&&x!==27||L===null||(A=L,u?(L=rr(s,p),L!=null&&y.unshift($r(s,L,A))):u||(L=rr(s,p),L!=null&&y.push($r(s,L,A)))),s=s.return}y.length!==0&&t.push({event:a,listeners:y})}var jx=/\r\n?/g,Nx=/\u0000|\uFFFD/g;function Pg(t){return(typeof t=="string"?t:""+t).replace(jx,`
10
+ `).replace(Nx,"")}function Kg(t,a){return a=Pg(a),Pg(t)===a}function Xe(t,a,s,o,u,p){switch(s){case"children":typeof o=="string"?a==="body"||a==="textarea"&&o===""||Ki(t,o):(typeof o=="number"||typeof o=="bigint")&&a!=="body"&&Ki(t,""+o);break;case"className":No(t,"class",o);break;case"tabIndex":No(t,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":No(t,s,o);break;case"style":Kp(t,o,p);break;case"data":if(a!=="object"){No(t,"data",o);break}case"src":case"href":if(o===""&&(a!=="a"||s!=="href")){t.removeAttribute(s);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){t.removeAttribute(s);break}o=Ao(""+o),t.setAttribute(s,o);break;case"action":case"formAction":if(typeof o=="function"){t.setAttribute(s,"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 p=="function"&&(s==="formAction"?(a!=="input"&&Xe(t,a,"name",u.name,u,null),Xe(t,a,"formEncType",u.formEncType,u,null),Xe(t,a,"formMethod",u.formMethod,u,null),Xe(t,a,"formTarget",u.formTarget,u,null)):(Xe(t,a,"encType",u.encType,u,null),Xe(t,a,"method",u.method,u,null),Xe(t,a,"target",u.target,u,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){t.removeAttribute(s);break}o=Ao(""+o),t.setAttribute(s,o);break;case"onClick":o!=null&&(t.onclick=Yn);break;case"onScroll":o!=null&&De("scroll",t);break;case"onScrollEnd":o!=null&&De("scrollend",t);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(r(61));if(s=o.__html,s!=null){if(u.children!=null)throw Error(r(60));t.innerHTML=s}}break;case"multiple":t.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":t.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){t.removeAttribute("xlink:href");break}s=Ao(""+o),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?t.setAttribute(s,""+o):t.removeAttribute(s);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":o&&typeof o!="function"&&typeof o!="symbol"?t.setAttribute(s,""):t.removeAttribute(s);break;case"capture":case"download":o===!0?t.setAttribute(s,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?t.setAttribute(s,o):t.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?t.setAttribute(s,o):t.removeAttribute(s);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?t.removeAttribute(s):t.setAttribute(s,o);break;case"popover":De("beforetoggle",t),De("toggle",t),jo(t,"popover",o);break;case"xlinkActuate":Qn(t,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":Qn(t,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":Qn(t,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":Qn(t,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":Qn(t,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":Qn(t,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":Qn(t,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":Qn(t,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":Qn(t,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":jo(t,"is",o);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=F1.get(s)||s,jo(t,s,o))}}function Td(t,a,s,o,u,p){switch(s){case"style":Kp(t,o,p);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(r(61));if(s=o.__html,s!=null){if(u.children!=null)throw Error(r(60));t.innerHTML=s}}break;case"children":typeof o=="string"?Ki(t,o):(typeof o=="number"||typeof o=="bigint")&&Ki(t,""+o);break;case"onScroll":o!=null&&De("scroll",t);break;case"onScrollEnd":o!=null&&De("scrollend",t);break;case"onClick":o!=null&&(t.onclick=Yn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!qp.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(u=s.endsWith("Capture"),a=s.slice(2,u?s.length-7:void 0),p=t[Pt]||null,p=p!=null?p[s]:null,typeof p=="function"&&t.removeEventListener(a,p,u),typeof o=="function")){typeof p!="function"&&p!==null&&(s in t?t[s]=null:t.hasAttribute(s)&&t.removeAttribute(s)),t.addEventListener(a,o,u);break e}s in t?t[s]=o:o===!0?t.setAttribute(s,""):jo(t,s,o)}}}function Mt(t,a,s){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":De("error",t),De("load",t);var o=!1,u=!1,p;for(p in s)if(s.hasOwnProperty(p)){var y=s[p];if(y!=null)switch(p){case"src":o=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,a));default:Xe(t,a,p,y,s,null)}}u&&Xe(t,a,"srcSet",s.srcSet,s,null),o&&Xe(t,a,"src",s.src,s,null);return;case"input":De("invalid",t);var x=p=y=u=null,A=null,L=null;for(o in s)if(s.hasOwnProperty(o)){var I=s[o];if(I!=null)switch(o){case"name":u=I;break;case"type":y=I;break;case"checked":A=I;break;case"defaultChecked":L=I;break;case"value":p=I;break;case"defaultValue":x=I;break;case"children":case"dangerouslySetInnerHTML":if(I!=null)throw Error(r(137,a));break;default:Xe(t,a,o,I,s,null)}}Ip(t,p,x,A,L,y,u,!1);return;case"select":De("invalid",t),o=y=p=null;for(u in s)if(s.hasOwnProperty(u)&&(x=s[u],x!=null))switch(u){case"value":p=x;break;case"defaultValue":y=x;break;case"multiple":o=x;default:Xe(t,a,u,x,s,null)}a=p,s=y,t.multiple=!!o,a!=null?Pi(t,!!o,a,!1):s!=null&&Pi(t,!!o,s,!0);return;case"textarea":De("invalid",t),p=u=o=null;for(y in s)if(s.hasOwnProperty(y)&&(x=s[y],x!=null))switch(y){case"value":o=x;break;case"defaultValue":u=x;break;case"children":p=x;break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(r(91));break;default:Xe(t,a,y,x,s,null)}Zp(t,o,u,p);return;case"option":for(A in s)s.hasOwnProperty(A)&&(o=s[A],o!=null)&&(A==="selected"?t.selected=o&&typeof o!="function"&&typeof o!="symbol":Xe(t,a,A,o,s,null));return;case"dialog":De("beforetoggle",t),De("toggle",t),De("cancel",t),De("close",t);break;case"iframe":case"object":De("load",t);break;case"video":case"audio":for(o=0;o<qr.length;o++)De(qr[o],t);break;case"image":De("error",t),De("load",t);break;case"details":De("toggle",t);break;case"embed":case"source":case"link":De("error",t),De("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(L in s)if(s.hasOwnProperty(L)&&(o=s[L],o!=null))switch(L){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,a));default:Xe(t,a,L,o,s,null)}return;default:if(Hc(a)){for(I in s)s.hasOwnProperty(I)&&(o=s[I],o!==void 0&&Td(t,a,I,o,s,void 0));return}}for(x in s)s.hasOwnProperty(x)&&(o=s[x],o!=null&&Xe(t,a,x,o,s,null))}function kx(t,a,s,o){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var u=null,p=null,y=null,x=null,A=null,L=null,I=null;for(V in s){var Y=s[V];if(s.hasOwnProperty(V)&&Y!=null)switch(V){case"checked":break;case"value":break;case"defaultValue":A=Y;default:o.hasOwnProperty(V)||Xe(t,a,V,null,o,Y)}}for(var q in o){var V=o[q];if(Y=s[q],o.hasOwnProperty(q)&&(V!=null||Y!=null))switch(q){case"type":p=V;break;case"name":u=V;break;case"checked":L=V;break;case"defaultChecked":I=V;break;case"value":y=V;break;case"defaultValue":x=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(r(137,a));break;default:V!==Y&&Xe(t,a,q,V,o,Y)}}Gc(t,y,x,A,L,I,p,u);return;case"select":V=y=x=q=null;for(p in s)if(A=s[p],s.hasOwnProperty(p)&&A!=null)switch(p){case"value":break;case"multiple":V=A;default:o.hasOwnProperty(p)||Xe(t,a,p,null,o,A)}for(u in o)if(p=o[u],A=s[u],o.hasOwnProperty(u)&&(p!=null||A!=null))switch(u){case"value":q=p;break;case"defaultValue":x=p;break;case"multiple":y=p;default:p!==A&&Xe(t,a,u,p,o,A)}a=x,s=y,o=V,q!=null?Pi(t,!!s,q,!1):!!o!=!!s&&(a!=null?Pi(t,!!s,a,!0):Pi(t,!!s,s?[]:"",!1));return;case"textarea":V=q=null;for(x in s)if(u=s[x],s.hasOwnProperty(x)&&u!=null&&!o.hasOwnProperty(x))switch(x){case"value":break;case"children":break;default:Xe(t,a,x,null,o,u)}for(y in o)if(u=o[y],p=s[y],o.hasOwnProperty(y)&&(u!=null||p!=null))switch(y){case"value":q=u;break;case"defaultValue":V=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(r(91));break;default:u!==p&&Xe(t,a,y,u,o,p)}Hp(t,q,V);return;case"option":for(var fe in s)q=s[fe],s.hasOwnProperty(fe)&&q!=null&&!o.hasOwnProperty(fe)&&(fe==="selected"?t.selected=!1:Xe(t,a,fe,null,o,q));for(A in o)q=o[A],V=s[A],o.hasOwnProperty(A)&&q!==V&&(q!=null||V!=null)&&(A==="selected"?t.selected=q&&typeof q!="function"&&typeof q!="symbol":Xe(t,a,A,q,o,V));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 we in s)q=s[we],s.hasOwnProperty(we)&&q!=null&&!o.hasOwnProperty(we)&&Xe(t,a,we,null,o,q);for(L in o)if(q=o[L],V=s[L],o.hasOwnProperty(L)&&q!==V&&(q!=null||V!=null))switch(L){case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(r(137,a));break;default:Xe(t,a,L,q,o,V)}return;default:if(Hc(a)){for(var Je in s)q=s[Je],s.hasOwnProperty(Je)&&q!==void 0&&!o.hasOwnProperty(Je)&&Td(t,a,Je,void 0,o,q);for(I in o)q=o[I],V=s[I],!o.hasOwnProperty(I)||q===V||q===void 0&&V===void 0||Td(t,a,I,q,o,V);return}}for(var O in s)q=s[O],s.hasOwnProperty(O)&&q!=null&&!o.hasOwnProperty(O)&&Xe(t,a,O,null,o,q);for(Y in o)q=o[Y],V=s[Y],!o.hasOwnProperty(Y)||q===V||q==null&&V==null||Xe(t,a,Y,q,o,V)}function Qg(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Ax(){if(typeof performance.getEntriesByType=="function"){for(var t=0,a=0,s=performance.getEntriesByType("resource"),o=0;o<s.length;o++){var u=s[o],p=u.transferSize,y=u.initiatorType,x=u.duration;if(p&&x&&Qg(y)){for(y=0,x=u.responseEnd,o+=1;o<s.length;o++){var A=s[o],L=A.startTime;if(L>x)break;var I=A.transferSize,Y=A.initiatorType;I&&Qg(Y)&&(A=A.responseEnd,y+=I*(A<x?1:(x-L)/(A-L)))}if(--o,a+=8*(p+y)/(u.duration/1e3),t++,10<t)break}}if(0<t)return a/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var Ed=null,Od=null;function xl(t){return t.nodeType===9?t:t.ownerDocument}function Yg(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 Xg(t,a){if(t===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&a==="foreignObject"?0:t}function Dd(t,a){return t==="textarea"||t==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var Rd=null;function _x(){var t=window.event;return t&&t.type==="popstate"?t===Rd?!1:(Rd=t,!0):(Rd=null,!1)}var Jg=typeof setTimeout=="function"?setTimeout:void 0,zx=typeof clearTimeout=="function"?clearTimeout:void 0,Fg=typeof Promise=="function"?Promise:void 0,Cx=typeof queueMicrotask=="function"?queueMicrotask:typeof Fg<"u"?function(t){return Fg.resolve(null).then(t).catch(Tx)}:Jg;function Tx(t){setTimeout(function(){throw t})}function Ma(t){return t==="head"}function Wg(t,a){var s=a,o=0;do{var u=s.nextSibling;if(t.removeChild(s),u&&u.nodeType===8)if(s=u.data,s==="/$"||s==="/&"){if(o===0){t.removeChild(u),Ns(a);return}o--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")o++;else if(s==="html")Ur(t.ownerDocument.documentElement);else if(s==="head"){s=t.ownerDocument.head,Ur(s);for(var p=s.firstChild;p;){var y=p.nextSibling,x=p.nodeName;p[ir]||x==="SCRIPT"||x==="STYLE"||x==="LINK"&&p.rel.toLowerCase()==="stylesheet"||s.removeChild(p),p=y}}else s==="body"&&Ur(t.ownerDocument.body);s=u}while(s);Ns(a)}function ey(t,a){var s=t;t=0;do{var o=s.nextSibling;if(s.nodeType===1?a?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(a?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),o&&o.nodeType===8)if(s=o.data,s==="/$"){if(t===0)break;t--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||t++;s=o}while(s)}function Md(t){var a=t.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var s=a;switch(a=a.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":Md(s),Uc(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}t.removeChild(s)}}function Ex(t,a,s,o){for(;t.nodeType===1;){var u=s;if(t.nodeName.toLowerCase()!==a.toLowerCase()){if(!o&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(o){if(!t[ir])switch(a){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(p=t.getAttribute("rel"),p==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(p!==u.rel||t.getAttribute("href")!==(u.href==null||u.href===""?null:u.href)||t.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||t.getAttribute("title")!==(u.title==null?null:u.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(p=t.getAttribute("src"),(p!==(u.src==null?null:u.src)||t.getAttribute("type")!==(u.type==null?null:u.type)||t.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&p&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(a==="input"&&t.type==="hidden"){var p=u.name==null?null:""+u.name;if(u.type==="hidden"&&t.getAttribute("name")===p)return t}else return t;if(t=vn(t.nextSibling),t===null)break}return null}function Ox(t,a,s){if(a==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!s||(t=vn(t.nextSibling),t===null))return null;return t}function ty(t,a){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!a||(t=vn(t.nextSibling),t===null))return null;return t}function Bd(t){return t.data==="$?"||t.data==="$~"}function Ld(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function Dx(t,a){var s=t.ownerDocument;if(t.data==="$~")t._reactRetry=a;else if(t.data!=="$?"||s.readyState!=="loading")a();else{var o=function(){a(),s.removeEventListener("DOMContentLoaded",o)};s.addEventListener("DOMContentLoaded",o),t._reactRetry=o}}function vn(t){for(;t!=null;t=t.nextSibling){var a=t.nodeType;if(a===1||a===3)break;if(a===8){if(a=t.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return t}var qd=null;function ny(t){t=t.nextSibling;for(var a=0;t;){if(t.nodeType===8){var s=t.data;if(s==="/$"||s==="/&"){if(a===0)return vn(t.nextSibling);a--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||a++}t=t.nextSibling}return null}function ay(t){t=t.previousSibling;for(var a=0;t;){if(t.nodeType===8){var s=t.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(a===0)return t;a--}else s!=="/$"&&s!=="/&"||a++}t=t.previousSibling}return null}function iy(t,a,s){switch(a=xl(s),t){case"html":if(t=a.documentElement,!t)throw Error(r(452));return t;case"head":if(t=a.head,!t)throw Error(r(453));return t;case"body":if(t=a.body,!t)throw Error(r(454));return t;default:throw Error(r(451))}}function Ur(t){for(var a=t.attributes;a.length;)t.removeAttributeNode(a[0]);Uc(t)}var Sn=new Map,sy=new Set;function wl(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var da=F.d;F.d={f:Rx,r:Mx,D:Bx,C:Lx,L:qx,m:$x,X:Vx,S:Ux,M:Gx};function Rx(){var t=da.f(),a=pl();return t||a}function Mx(t){var a=Ii(t);a!==null&&a.tag===5&&a.type==="form"?wh(a):da.r(t)}var xs=typeof document>"u"?null:document;function ry(t,a,s){var o=xs;if(o&&typeof a=="string"&&a){var u=fn(a);u='link[rel="'+t+'"][href="'+u+'"]',typeof s=="string"&&(u+='[crossorigin="'+s+'"]'),sy.has(u)||(sy.add(u),t={rel:t,crossOrigin:s,href:a},o.querySelector(u)===null&&(a=o.createElement("link"),Mt(a,"link",t),_t(a),o.head.appendChild(a)))}}function Bx(t){da.D(t),ry("dns-prefetch",t,null)}function Lx(t,a){da.C(t,a),ry("preconnect",t,a)}function qx(t,a,s){da.L(t,a,s);var o=xs;if(o&&t&&a){var u='link[rel="preload"][as="'+fn(a)+'"]';a==="image"&&s&&s.imageSrcSet?(u+='[imagesrcset="'+fn(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(u+='[imagesizes="'+fn(s.imageSizes)+'"]')):u+='[href="'+fn(t)+'"]';var p=u;switch(a){case"style":p=ws(t);break;case"script":p=js(t)}Sn.has(p)||(t=S({rel:"preload",href:a==="image"&&s&&s.imageSrcSet?void 0:t,as:a},s),Sn.set(p,t),o.querySelector(u)!==null||a==="style"&&o.querySelector(Vr(p))||a==="script"&&o.querySelector(Gr(p))||(a=o.createElement("link"),Mt(a,"link",t),_t(a),o.head.appendChild(a)))}}function $x(t,a){da.m(t,a);var s=xs;if(s&&t){var o=a&&typeof a.as=="string"?a.as:"script",u='link[rel="modulepreload"][as="'+fn(o)+'"][href="'+fn(t)+'"]',p=u;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":p=js(t)}if(!Sn.has(p)&&(t=S({rel:"modulepreload",href:t},a),Sn.set(p,t),s.querySelector(u)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(Gr(p)))return}o=s.createElement("link"),Mt(o,"link",t),_t(o),s.head.appendChild(o)}}}function Ux(t,a,s){da.S(t,a,s);var o=xs;if(o&&t){var u=Hi(o).hoistableStyles,p=ws(t);a=a||"default";var y=u.get(p);if(!y){var x={loading:0,preload:null};if(y=o.querySelector(Vr(p)))x.loading=5;else{t=S({rel:"stylesheet",href:t,"data-precedence":a},s),(s=Sn.get(p))&&$d(t,s);var A=y=o.createElement("link");_t(A),Mt(A,"link",t),A._p=new Promise(function(L,I){A.onload=L,A.onerror=I}),A.addEventListener("load",function(){x.loading|=1}),A.addEventListener("error",function(){x.loading|=2}),x.loading|=4,jl(y,a,o)}y={type:"stylesheet",instance:y,count:1,state:x},u.set(p,y)}}}function Vx(t,a){da.X(t,a);var s=xs;if(s&&t){var o=Hi(s).hoistableScripts,u=js(t),p=o.get(u);p||(p=s.querySelector(Gr(u)),p||(t=S({src:t,async:!0},a),(a=Sn.get(u))&&Ud(t,a),p=s.createElement("script"),_t(p),Mt(p,"link",t),s.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},o.set(u,p))}}function Gx(t,a){da.M(t,a);var s=xs;if(s&&t){var o=Hi(s).hoistableScripts,u=js(t),p=o.get(u);p||(p=s.querySelector(Gr(u)),p||(t=S({src:t,async:!0,type:"module"},a),(a=Sn.get(u))&&Ud(t,a),p=s.createElement("script"),_t(p),Mt(p,"link",t),s.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},o.set(u,p))}}function oy(t,a,s,o){var u=(u=ne.current)?wl(u):null;if(!u)throw Error(r(446));switch(t){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(a=ws(s.href),s=Hi(u).hoistableStyles,o=s.get(a),o||(o={type:"style",instance:null,count:0,state:null},s.set(a,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){t=ws(s.href);var p=Hi(u).hoistableStyles,y=p.get(t);if(y||(u=u.ownerDocument||u,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},p.set(t,y),(p=u.querySelector(Vr(t)))&&!p._p&&(y.instance=p,y.state.loading=5),Sn.has(t)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},Sn.set(t,s),p||Ix(u,t,s,y.state))),a&&o===null)throw Error(r(528,""));return y}if(a&&o!==null)throw Error(r(529,""));return null;case"script":return a=s.async,s=s.src,typeof s=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=js(s),s=Hi(u).hoistableScripts,o=s.get(a),o||(o={type:"script",instance:null,count:0,state:null},s.set(a,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,t))}}function ws(t){return'href="'+fn(t)+'"'}function Vr(t){return'link[rel="stylesheet"]['+t+"]"}function ly(t){return S({},t,{"data-precedence":t.precedence,precedence:null})}function Ix(t,a,s,o){t.querySelector('link[rel="preload"][as="style"]['+a+"]")?o.loading=1:(a=t.createElement("link"),o.preload=a,a.addEventListener("load",function(){return o.loading|=1}),a.addEventListener("error",function(){return o.loading|=2}),Mt(a,"link",s),_t(a),t.head.appendChild(a))}function js(t){return'[src="'+fn(t)+'"]'}function Gr(t){return"script[async]"+t}function cy(t,a,s){if(a.count++,a.instance===null)switch(a.type){case"style":var o=t.querySelector('style[data-href~="'+fn(s.href)+'"]');if(o)return a.instance=o,_t(o),o;var u=S({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return o=(t.ownerDocument||t).createElement("style"),_t(o),Mt(o,"style",u),jl(o,s.precedence,t),a.instance=o;case"stylesheet":u=ws(s.href);var p=t.querySelector(Vr(u));if(p)return a.state.loading|=4,a.instance=p,_t(p),p;o=ly(s),(u=Sn.get(u))&&$d(o,u),p=(t.ownerDocument||t).createElement("link"),_t(p);var y=p;return y._p=new Promise(function(x,A){y.onload=x,y.onerror=A}),Mt(p,"link",o),a.state.loading|=4,jl(p,s.precedence,t),a.instance=p;case"script":return p=js(s.src),(u=t.querySelector(Gr(p)))?(a.instance=u,_t(u),u):(o=s,(u=Sn.get(p))&&(o=S({},s),Ud(o,u)),t=t.ownerDocument||t,u=t.createElement("script"),_t(u),Mt(u,"link",o),t.head.appendChild(u),a.instance=u);case"void":return null;default:throw Error(r(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(o=a.instance,a.state.loading|=4,jl(o,s.precedence,t));return a.instance}function jl(t,a,s){for(var o=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=o.length?o[o.length-1]:null,p=u,y=0;y<o.length;y++){var x=o[y];if(x.dataset.precedence===a)p=x;else if(p!==u)break}p?p.parentNode.insertBefore(t,p.nextSibling):(a=s.nodeType===9?s.head:s,a.insertBefore(t,a.firstChild))}function $d(t,a){t.crossOrigin==null&&(t.crossOrigin=a.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=a.referrerPolicy),t.title==null&&(t.title=a.title)}function Ud(t,a){t.crossOrigin==null&&(t.crossOrigin=a.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=a.referrerPolicy),t.integrity==null&&(t.integrity=a.integrity)}var Nl=null;function uy(t,a,s){if(Nl===null){var o=new Map,u=Nl=new Map;u.set(s,o)}else u=Nl,o=u.get(s),o||(o=new Map,u.set(s,o));if(o.has(t))return o;for(o.set(t,null),s=s.getElementsByTagName(t),u=0;u<s.length;u++){var p=s[u];if(!(p[ir]||p[Et]||t==="link"&&p.getAttribute("rel")==="stylesheet")&&p.namespaceURI!=="http://www.w3.org/2000/svg"){var y=p.getAttribute(a)||"";y=t+y;var x=o.get(y);x?x.push(p):o.set(y,[p])}}return o}function dy(t,a,s){t=t.ownerDocument||t,t.head.insertBefore(s,a==="title"?t.querySelector("head > title"):null)}function Hx(t,a,s){if(s===1||a.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;return a.rel==="stylesheet"?(t=a.disabled,typeof a.precedence=="string"&&t==null):!0;case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function fy(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function Zx(t,a,s,o){if(s.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var u=ws(o.href),p=a.querySelector(Vr(u));if(p){a=p._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(t.count++,t=kl.bind(t),a.then(t,t)),s.state.loading|=4,s.instance=p,_t(p);return}p=a.ownerDocument||a,o=ly(o),(u=Sn.get(u))&&$d(o,u),p=p.createElement("link"),_t(p);var y=p;y._p=new Promise(function(x,A){y.onload=x,y.onerror=A}),Mt(p,"link",o),s.instance=p}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(s,a),(a=s.state.preload)&&(s.state.loading&3)===0&&(t.count++,s=kl.bind(t),a.addEventListener("load",s),a.addEventListener("error",s))}}var Vd=0;function Px(t,a){return t.stylesheets&&t.count===0&&_l(t,t.stylesheets),0<t.count||0<t.imgCount?function(s){var o=setTimeout(function(){if(t.stylesheets&&_l(t,t.stylesheets),t.unsuspend){var p=t.unsuspend;t.unsuspend=null,p()}},6e4+a);0<t.imgBytes&&Vd===0&&(Vd=62500*Ax());var u=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&_l(t,t.stylesheets),t.unsuspend)){var p=t.unsuspend;t.unsuspend=null,p()}},(t.imgBytes>Vd?50:800)+a);return t.unsuspend=s,function(){t.unsuspend=null,clearTimeout(o),clearTimeout(u)}}:null}function kl(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)_l(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Al=null;function _l(t,a){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Al=new Map,a.forEach(Kx,t),Al=null,kl.call(t))}function Kx(t,a){if(!(a.state.loading&4)){var s=Al.get(t);if(s)var o=s.get(null);else{s=new Map,Al.set(t,s);for(var u=t.querySelectorAll("link[data-precedence],style[data-precedence]"),p=0;p<u.length;p++){var y=u[p];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(s.set(y.dataset.precedence,y),o=y)}o&&s.set(null,o)}u=a.instance,y=u.getAttribute("data-precedence"),p=s.get(y)||o,p===o&&s.set(null,u),s.set(y,u),this.count++,o=kl.bind(this),u.addEventListener("load",o),u.addEventListener("error",o),p?p.parentNode.insertBefore(u,p.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(u,t.firstChild)),a.state.loading|=4}}var Ir={$$typeof:H,Provider:null,Consumer:null,_currentValue:de,_currentValue2:de,_threadCount:0};function Qx(t,a,s,o,u,p,y,x,A){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=ee(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ee(0),this.hiddenUpdates=ee(null),this.identifierPrefix=o,this.onUncaughtError=u,this.onCaughtError=p,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=A,this.incompleteTransitions=new Map}function py(t,a,s,o,u,p,y,x,A,L,I,Y){return t=new Qx(t,a,s,y,A,L,I,Y,x),a=1,p===!0&&(a|=24),p=nn(3,null,null,a),t.current=p,p.stateNode=t,a=Su(),a.refCount++,t.pooledCache=a,a.refCount++,p.memoizedState={element:o,isDehydrated:s,cache:a},Nu(p),t}function my(t){return t?(t=es,t):es}function hy(t,a,s,o,u,p){u=my(u),o.context===null?o.context=u:o.pendingContext=u,o=Na(a),o.payload={element:s},p=p===void 0?null:p,p!==null&&(o.callback=p),s=ka(t,o,a),s!==null&&(Ft(s,t,a),xr(s,t,a))}function gy(t,a){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var s=t.retryLane;t.retryLane=s!==0&&s<a?s:a}}function Gd(t,a){gy(t,a),(t=t.alternate)&&gy(t,a)}function yy(t){if(t.tag===13||t.tag===31){var a=si(t,67108864);a!==null&&Ft(a,t,67108864),Gd(t,67108864)}}function by(t){if(t.tag===13||t.tag===31){var a=ln();a=ar(a);var s=si(t,a);s!==null&&Ft(s,t,a),Gd(t,a)}}var zl=!0;function Yx(t,a,s,o){var u=$.T;$.T=null;var p=F.p;try{F.p=2,Id(t,a,s,o)}finally{F.p=p,$.T=u}}function Xx(t,a,s,o){var u=$.T;$.T=null;var p=F.p;try{F.p=8,Id(t,a,s,o)}finally{F.p=p,$.T=u}}function Id(t,a,s,o){if(zl){var u=Hd(o);if(u===null)Cd(t,a,o,Cl,s),Sy(t,o);else if(Fx(u,t,a,s,o))o.stopPropagation();else if(Sy(t,o),a&4&&-1<Jx.indexOf(t)){for(;u!==null;){var p=Ii(u);if(p!==null)switch(p.tag){case 3:if(p=p.stateNode,p.current.memoizedState.isDehydrated){var y=Pn(p.pendingLanes);if(y!==0){var x=p;for(x.pendingLanes|=2,x.entangledLanes|=2;y;){var A=1<<31-mt(y);x.entanglements[1]|=A,y&=~A}Gn(p),(Ie&6)===0&&(dl=Lt()+500,Lr(0))}}break;case 31:case 13:x=si(p,2),x!==null&&Ft(x,p,2),pl(),Gd(p,2)}if(p=Hd(o),p===null&&Cd(t,a,o,Cl,s),p===u)break;u=p}u!==null&&o.stopPropagation()}else Cd(t,a,o,null,s)}}function Hd(t){return t=Pc(t),Zd(t)}var Cl=null;function Zd(t){if(Cl=null,t=Gi(t),t!==null){var a=c(t);if(a===null)t=null;else{var s=a.tag;if(s===13){if(t=d(a),t!==null)return t;t=null}else if(s===31){if(t=m(a),t!==null)return t;t=null}else if(s===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;t=null}else a!==t&&(t=null)}}return Cl=t,null}function vy(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(yo()){case er:return 2;case bo:return 8;case Mi:case Lc:return 32;case Bi:return 268435456;default:return 32}default:return 32}}var Pd=!1,Ba=null,La=null,qa=null,Hr=new Map,Zr=new Map,$a=[],Jx="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 Sy(t,a){switch(t){case"focusin":case"focusout":Ba=null;break;case"dragenter":case"dragleave":La=null;break;case"mouseover":case"mouseout":qa=null;break;case"pointerover":case"pointerout":Hr.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":Zr.delete(a.pointerId)}}function Pr(t,a,s,o,u,p){return t===null||t.nativeEvent!==p?(t={blockedOn:a,domEventName:s,eventSystemFlags:o,nativeEvent:p,targetContainers:[u]},a!==null&&(a=Ii(a),a!==null&&yy(a)),t):(t.eventSystemFlags|=o,a=t.targetContainers,u!==null&&a.indexOf(u)===-1&&a.push(u),t)}function Fx(t,a,s,o,u){switch(a){case"focusin":return Ba=Pr(Ba,t,a,s,o,u),!0;case"dragenter":return La=Pr(La,t,a,s,o,u),!0;case"mouseover":return qa=Pr(qa,t,a,s,o,u),!0;case"pointerover":var p=u.pointerId;return Hr.set(p,Pr(Hr.get(p)||null,t,a,s,o,u)),!0;case"gotpointercapture":return p=u.pointerId,Zr.set(p,Pr(Zr.get(p)||null,t,a,s,o,u)),!0}return!1}function xy(t){var a=Gi(t.target);if(a!==null){var s=c(a);if(s!==null){if(a=s.tag,a===13){if(a=d(s),a!==null){t.blockedOn=a,Mp(t.priority,function(){by(s)});return}}else if(a===31){if(a=m(s),a!==null){t.blockedOn=a,Mp(t.priority,function(){by(s)});return}}else if(a===3&&s.stateNode.current.memoizedState.isDehydrated){t.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Tl(t){if(t.blockedOn!==null)return!1;for(var a=t.targetContainers;0<a.length;){var s=Hd(t.nativeEvent);if(s===null){s=t.nativeEvent;var o=new s.constructor(s.type,s);Zc=o,s.target.dispatchEvent(o),Zc=null}else return a=Ii(s),a!==null&&yy(a),t.blockedOn=s,!1;a.shift()}return!0}function wy(t,a,s){Tl(t)&&s.delete(a)}function Wx(){Pd=!1,Ba!==null&&Tl(Ba)&&(Ba=null),La!==null&&Tl(La)&&(La=null),qa!==null&&Tl(qa)&&(qa=null),Hr.forEach(wy),Zr.forEach(wy)}function El(t,a){t.blockedOn===a&&(t.blockedOn=null,Pd||(Pd=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Wx)))}var Ol=null;function jy(t){Ol!==t&&(Ol=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Ol===t&&(Ol=null);for(var a=0;a<t.length;a+=3){var s=t[a],o=t[a+1],u=t[a+2];if(typeof o!="function"){if(Zd(o||s)===null)continue;break}var p=Ii(s);p!==null&&(t.splice(a,3),a-=3,Hu(p,{pending:!0,data:u,method:s.method,action:o},o,u))}}))}function Ns(t){function a(A){return El(A,t)}Ba!==null&&El(Ba,t),La!==null&&El(La,t),qa!==null&&El(qa,t),Hr.forEach(a),Zr.forEach(a);for(var s=0;s<$a.length;s++){var o=$a[s];o.blockedOn===t&&(o.blockedOn=null)}for(;0<$a.length&&(s=$a[0],s.blockedOn===null);)xy(s),s.blockedOn===null&&$a.shift();if(s=(t.ownerDocument||t).$$reactFormReplay,s!=null)for(o=0;o<s.length;o+=3){var u=s[o],p=s[o+1],y=u[Pt]||null;if(typeof p=="function")y||jy(s);else if(y){var x=null;if(p&&p.hasAttribute("formAction")){if(u=p,y=p[Pt]||null)x=y.formAction;else if(Zd(u)!==null)continue}else x=y.action;typeof x=="function"?s[o+1]=x:(s.splice(o,3),o-=3),jy(s)}}}function Ny(){function t(p){p.canIntercept&&p.info==="react-transition"&&p.intercept({handler:function(){return new Promise(function(y){return u=y})},focusReset:"manual",scroll:"manual"})}function a(){u!==null&&(u(),u=null),o||setTimeout(s,20)}function s(){if(!o&&!navigation.transition){var p=navigation.currentEntry;p&&p.url!=null&&navigation.navigate(p.url,{state:p.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,u=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(s,100),function(){o=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),u!==null&&(u(),u=null)}}}function Kd(t){this._internalRoot=t}Dl.prototype.render=Kd.prototype.render=function(t){var a=this._internalRoot;if(a===null)throw Error(r(409));var s=a.current,o=ln();hy(s,o,t,a,null,null)},Dl.prototype.unmount=Kd.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var a=t.containerInfo;hy(t.current,2,null,t,null,null),pl(),a[Vi]=null}};function Dl(t){this._internalRoot=t}Dl.prototype.unstable_scheduleHydration=function(t){if(t){var a=Rp();t={blockedOn:null,target:t,priority:a};for(var s=0;s<$a.length&&a!==0&&a<$a[s].priority;s++);$a.splice(s,0,t),s===0&&xy(t)}};var ky=n.version;if(ky!=="19.2.4")throw Error(r(527,ky,"19.2.4"));F.findDOMNode=function(t){var a=t._reactInternals;if(a===void 0)throw typeof t.render=="function"?Error(r(188)):(t=Object.keys(t).join(","),Error(r(268,t)));return t=b(a),t=t!==null?v(t):null,t=t===null?null:t.stateNode,t};var ew={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:$,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Rl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Rl.isDisabled&&Rl.supportsFiber)try{ga=Rl.inject(ew),qt=Rl}catch{}}return Kr.createRoot=function(t,a){if(!l(t))throw Error(r(299));var s=!1,o="",u=Oh,p=Dh,y=Rh;return a!=null&&(a.unstable_strictMode===!0&&(s=!0),a.identifierPrefix!==void 0&&(o=a.identifierPrefix),a.onUncaughtError!==void 0&&(u=a.onUncaughtError),a.onCaughtError!==void 0&&(p=a.onCaughtError),a.onRecoverableError!==void 0&&(y=a.onRecoverableError)),a=py(t,1,!1,null,null,s,o,null,u,p,y,Ny),t[Vi]=a.current,zd(t),new Kd(a)},Kr.hydrateRoot=function(t,a,s){if(!l(t))throw Error(r(299));var o=!1,u="",p=Oh,y=Dh,x=Rh,A=null;return s!=null&&(s.unstable_strictMode===!0&&(o=!0),s.identifierPrefix!==void 0&&(u=s.identifierPrefix),s.onUncaughtError!==void 0&&(p=s.onUncaughtError),s.onCaughtError!==void 0&&(y=s.onCaughtError),s.onRecoverableError!==void 0&&(x=s.onRecoverableError),s.formState!==void 0&&(A=s.formState)),a=py(t,1,!0,a,s??null,o,u,A,p,y,x,Ny),a.context=my(null),s=a.current,o=ln(),o=ar(o),u=Na(o),u.callback=null,ka(s,u,o),s=o,a.current.lanes=s,Fe(a,s),Gn(a),t[Vi]=a.current,zd(t),new Dl(a)},Kr.version="19.2.4",Kr}var Cy;function vw(){if(Cy)return Qd.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(),Qd.exports=bw(),Qd.exports}var Sw=vw();const xw={bodySerializer:e=>JSON.stringify(e,(n,i)=>typeof i=="bigint"?i.toString():i)},ww=({onRequest:e,onSseError:n,onSseEvent:i,responseTransformer:r,responseValidator:l,sseDefaultRetryDelay:c,sseMaxRetryAttempts:d,sseMaxRetryDelay:m,sseSleepFn:g,url:b,...v})=>{let S;const w=g??(N=>new Promise(T=>setTimeout(T,N)));return{stream:async function*(){let N=c??3e3,T=0;const R=v.signal??new AbortController().signal;for(;!R.aborted;){T++;const G=v.headers instanceof Headers?v.headers:new Headers(v.headers);S!==void 0&&G.set("Last-Event-ID",S);try{const H={redirect:"follow",...v,body:v.serializedBody,headers:G,signal:R};let K=new Request(b,H);e&&(K=await e(b,H));const J=await(v.fetch??globalThis.fetch)(K);if(!J.ok)throw new Error(`SSE failed: ${J.status} ${J.statusText}`);if(!J.body)throw new Error("No body in SSE response");const D=J.body.pipeThrough(new TextDecoderStream).getReader();let M="";const oe=()=>{try{D.cancel()}catch{}};R.addEventListener("abort",oe);try{for(;;){const{done:Ne,value:Ae}=await D.read();if(Ne)break;M+=Ae;const ve=M.split(`
11
11
 
12
12
  `);M=ve.pop()??"";for(const et of ve){const re=et.split(`
13
- `),pe=[];let U;for(const je of re)if(je.startsWith("data:"))pe.push(je.replace(/^data:\s*/,""));else if(je.startsWith("event:"))U=je.replace(/^event:\s*/,"");else if(je.startsWith("id:"))S=je.replace(/^id:\s*/,"");else if(je.startsWith("retry:")){const ie=Number.parseInt(je.replace(/^retry:\s*/,""),10);Number.isNaN(ie)||(N=ie)}let F,de=!1;if(pe.length){const je=pe.join(`
14
- `);try{F=JSON.parse(je),de=!0}catch{F=je}}de&&(l&&await l(F),r&&(F=await r(F))),i?.({data:F,event:U,id:S,retry:N}),pe.length&&(yield F)}}}finally{R.removeEventListener("abort",oe),D.releaseLock()}break}catch(H){if(n?.(H),d!==void 0&&T>=d)break;const K=Math.min(N*2**(T-1),m??3e4);await w(K)}}}()}},jw=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},Nw=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},kw=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},av=({allowReserved:e,explode:n,name:i,style:r,value:l})=>{if(!n){const m=(e?l:l.map(g=>encodeURIComponent(g))).join(Nw(r));switch(r){case"label":return`.${m}`;case"matrix":return`;${i}=${m}`;case"simple":return m;default:return`${i}=${m}`}}const c=jw(r),d=l.map(m=>r==="label"||r==="simple"?e?m:encodeURIComponent(m):fc({allowReserved:e,name:i,value:m})).join(c);return r==="label"||r==="matrix"?c+d:d},fc=({allowReserved:e,name:n,value:i})=>{if(i==null)return"";if(typeof i=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${n}=${e?i:encodeURIComponent(i)}`},iv=({allowReserved:e,explode:n,name:i,style:r,value:l,valueOnly:c})=>{if(l instanceof Date)return c?l.toISOString():`${i}=${l.toISOString()}`;if(r!=="deepObject"&&!n){let g=[];Object.entries(l).forEach(([v,S])=>{g=[...g,v,e?S:encodeURIComponent(S)]});const b=g.join(",");switch(r){case"form":return`${i}=${b}`;case"label":return`.${b}`;case"matrix":return`;${i}=${b}`;default:return b}}const d=kw(r),m=Object.entries(l).map(([g,b])=>fc({allowReserved:e,name:r==="deepObject"?`${i}[${g}]`:g,value:b})).join(d);return r==="label"||r==="matrix"?d+m:m},Aw=/\{[^{}]+\}/g,_w=({path:e,url:n})=>{let i=n;const r=n.match(Aw);if(r)for(const l of r){let c=!1,d=l.substring(1,l.length-1),m="simple";d.endsWith("*")&&(c=!0,d=d.substring(0,d.length-1)),d.startsWith(".")?(d=d.substring(1),m="label"):d.startsWith(";")&&(d=d.substring(1),m="matrix");const g=e[d];if(g==null)continue;if(Array.isArray(g)){i=i.replace(l,av({explode:c,name:d,style:m,value:g}));continue}if(typeof g=="object"){i=i.replace(l,iv({explode:c,name:d,style:m,value:g,valueOnly:!0}));continue}if(m==="matrix"){i=i.replace(l,`;${fc({name:d,value:g})}`);continue}const b=encodeURIComponent(m==="label"?`.${g}`:g);i=i.replace(l,b)}return i},zw=({baseUrl:e,path:n,query:i,querySerializer:r,url:l})=>{const c=l.startsWith("/")?l:`/${l}`;let d=(e??"")+c;n&&(d=_w({path:n,url:d}));let m=i?r(i):"";return m.startsWith("?")&&(m=m.substring(1)),m&&(d+=`?${m}`),d};function Cw(e){const n=e.body!==void 0;if(n&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(n)return e.body}const Tw=async(e,n)=>{const i=typeof n=="function"?await n(e):n;if(i)return e.scheme==="bearer"?`Bearer ${i}`:e.scheme==="basic"?`Basic ${btoa(i)}`:i},sv=({allowReserved:e,array:n,object:i}={})=>l=>{const c=[];if(l&&typeof l=="object")for(const d in l){const m=l[d];if(m!=null)if(Array.isArray(m)){const g=av({allowReserved:e,explode:!0,name:d,style:"form",value:m,...n});g&&c.push(g)}else if(typeof m=="object"){const g=iv({allowReserved:e,explode:!0,name:d,style:"deepObject",value:m,...i});g&&c.push(g)}else{const g=fc({allowReserved:e,name:d,value:m});g&&c.push(g)}}return c.join("&")},Ew=e=>{if(!e)return"stream";const n=e.split(";")[0]?.trim();if(n){if(n.startsWith("application/json")||n.endsWith("+json"))return"json";if(n==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(i=>n.startsWith(i)))return"blob";if(n.startsWith("text/"))return"text"}},Ow=(e,n)=>n?!!(e.headers.has(n)||e.query?.[n]||e.headers.get("Cookie")?.includes(`${n}=`)):!1,Dw=async({security:e,...n})=>{for(const i of e){if(Ow(n,i.name))continue;const r=await Tw(i,n.auth);if(!r)continue;const l=i.name??"Authorization";switch(i.in){case"query":n.query||(n.query={}),n.query[l]=r;break;case"cookie":n.headers.append("Cookie",`${l}=${r}`);break;default:n.headers.set(l,r);break}}},Ty=e=>zw({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:sv(e.querySerializer),url:e.url}),Ey=(e,n)=>{const i={...e,...n};return i.baseUrl?.endsWith("/")&&(i.baseUrl=i.baseUrl.substring(0,i.baseUrl.length-1)),i.headers=rv(e.headers,n.headers),i},Rw=e=>{const n=[];return e.forEach((i,r)=>{n.push([r,i])}),n},rv=(...e)=>{const n=new Headers;for(const i of e){if(!i)continue;const r=i instanceof Headers?Rw(i):Object.entries(i);for(const[l,c]of r)if(c===null)n.delete(l);else if(Array.isArray(c))for(const d of c)n.append(l,d);else c!==void 0&&n.set(l,typeof c=="object"?JSON.stringify(c):c)}return n};class Jd{fns=[];clear(){this.fns=[]}eject(n){const i=this.getInterceptorIndex(n);this.fns[i]&&(this.fns[i]=null)}exists(n){const i=this.getInterceptorIndex(n);return!!this.fns[i]}getInterceptorIndex(n){return typeof n=="number"?this.fns[n]?n:-1:this.fns.indexOf(n)}update(n,i){const r=this.getInterceptorIndex(n);return this.fns[r]?(this.fns[r]=i,n):!1}use(n){return this.fns.push(n),this.fns.length-1}}const Mw=()=>({error:new Jd,request:new Jd,response:new Jd}),Bw=sv({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),Lw={"Content-Type":"application/json"},ov=(e={})=>({...xw,headers:Lw,parseAs:"auto",querySerializer:Bw,...e}),lv=(e={})=>{let n=Ey(ov(),e);const i=()=>({...n}),r=b=>(n=Ey(n,b),i()),l=Mw(),c=async b=>{const v={...n,...b,fetch:b.fetch??n.fetch??globalThis.fetch,headers:rv(n.headers,b.headers),serializedBody:void 0};v.security&&await Dw({...v,security:v.security}),v.requestValidator&&await v.requestValidator(v),v.body!==void 0&&v.bodySerializer&&(v.serializedBody=v.bodySerializer(v.body)),(v.body===void 0||v.serializedBody==="")&&v.headers.delete("Content-Type");const S=Ty(v);return{opts:v,url:S}},d=async b=>{const{opts:v,url:S}=await c(b),w={redirect:"follow",...v,body:Cw(v)};let _=new Request(S,w);for(const X of l.request.fns)X&&(_=await X(_,v));const C=v.fetch;let N=await C(_);for(const X of l.response.fns)X&&(N=await X(N,_,v));const T={request:_,response:N};if(N.ok){const X=(v.parseAs==="auto"?Ew(N.headers.get("Content-Type")):v.parseAs)??"json";if(N.status===204||N.headers.get("Content-Length")==="0"){let D;switch(X){case"arrayBuffer":case"blob":case"text":D=await N[X]();break;case"formData":D=new FormData;break;case"stream":D=N.body;break;default:D={};break}return v.responseStyle==="data"?D:{data:D,...T}}let J;switch(X){case"arrayBuffer":case"blob":case"formData":case"json":case"text":J=await N[X]();break;case"stream":return v.responseStyle==="data"?N.body:{data:N.body,...T}}return X==="json"&&(v.responseValidator&&await v.responseValidator(J),v.responseTransformer&&(J=await v.responseTransformer(J))),v.responseStyle==="data"?J:{data:J,...T}}const R=await N.text();let G;try{G=JSON.parse(R)}catch{}const H=G??R;let K=H;for(const X of l.error.fns)X&&(K=await X(H,N,_,v));if(K=K||{},v.throwOnError)throw K;return v.responseStyle==="data"?void 0:{error:K,...T}},m=b=>v=>d({...v,method:b}),g=b=>async v=>{const{opts:S,url:w}=await c(v);return ww({...S,body:S.body,headers:S.headers,method:b,onRequest:async(_,C)=>{let N=new Request(_,C);for(const T of l.request.fns)T&&(N=await T(N,S));return N},url:w})};return{buildUrl:Ty,connect:m("CONNECT"),delete:m("DELETE"),get:m("GET"),getConfig:i,head:m("HEAD"),interceptors:l,options:m("OPTIONS"),patch:m("PATCH"),post:m("POST"),put:m("PUT"),request:d,setConfig:r,sse:{connect:g("CONNECT"),delete:g("DELETE"),get:g("GET"),head:g("HEAD"),options:g("OPTIONS"),patch:g("PATCH"),post:g("POST"),put:g("PUT"),trace:g("TRACE")},trace:m("TRACE")}},W=lv(ov()),qw=e=>(e.client??W).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}",...e}),cv=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}",...e}),Uw=e=>(e.client??W).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}",...e,headers:{"Content-Type":"application/json",...e.headers}}),$w=e=>(e?.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects",...e}),Vw=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/locations",...e,headers:{"Content-Type":"application/json",...e.headers}}),Gw=e=>(e.client??W).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/locations/{label}",...e}),Iw=e=>(e.client??W).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/locations/default",...e,headers:{"Content-Type":"application/json",...e.headers}}),Hw=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/export",...e}),Zw=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/queries",...e}),Pw=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/queries",...e,headers:{"Content-Type":"application/json",...e.headers}}),Kw=e=>(e.client??W).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/queries",...e,headers:{"Content-Type":"application/json",...e.headers}}),Qw=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/queries/generate",...e,headers:{"Content-Type":"application/json",...e.headers}}),Yw=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/competitors",...e}),Xw=e=>(e.client??W).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/competitors",...e,headers:{"Content-Type":"application/json",...e.headers}}),Jw=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/runs",...e}),Fw=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/runs",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ww=e=>(e?.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/runs",...e}),ej=e=>(e?.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/runs",...e,headers:{"Content-Type":"application/json",...e?.headers}}),uv=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/runs/{id}",...e}),tj=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/apply",...e,headers:{"Content-Type":"application/json",...e.headers}}),nj=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/timeline",...e}),dv=e=>(e?.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/settings",...e}),aj=e=>(e.client??W).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/settings/providers/{name}",...e,headers:{"Content-Type":"application/json",...e.headers}}),ij=e=>(e.client??W).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/settings/google",...e,headers:{"Content-Type":"application/json",...e.headers}}),sj=e=>(e.client??W).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/settings/bing",...e,headers:{"Content-Type":"application/json",...e.headers}}),rj=e=>(e.client??W).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/settings/cdp",...e,headers:{"Content-Type":"application/json",...e.headers}}),oj=e=>(e.client??W).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/schedule",...e}),lj=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/schedule",...e}),cj=e=>(e.client??W).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/schedule",...e,headers:{"Content-Type":"application/json",...e.headers}}),uj=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/notifications",...e}),dj=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/notifications",...e,headers:{"Content-Type":"application/json",...e.headers}}),fj=e=>(e.client??W).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/notifications/{id}",...e}),pj=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/notifications/{id}/test",...e}),mj=e=>(e?.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/cdp/status",...e}),hj=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/connections",...e}),gj=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/connect",...e,headers:{"Content-Type":"application/json",...e.headers}}),yj=e=>(e.client??W).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/connections/{type}",...e}),bj=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/properties",...e}),vj=e=>(e.client??W).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/connections/{type}/property",...e,headers:{"Content-Type":"application/json",...e.headers}}),Sj=e=>(e.client??W).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/connections/{type}/sitemap",...e,headers:{"Content-Type":"application/json",...e.headers}}),xj=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/sync",...e,headers:{"Content-Type":"application/json",...e.headers}}),wj=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/performance",...e}),jj=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/performance/daily",...e}),Nj=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/inspect",...e,headers:{"Content-Type":"application/json",...e.headers}}),kj=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/inspections",...e}),Aj=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/deindexed",...e}),fv=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/coverage",...e}),_j=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/coverage/history",...e}),zj=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/sitemaps",...e}),Cj=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/discover-sitemaps",...e}),Tj=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/inspect-sitemap",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ej=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/indexing/request",...e,headers:{"Content-Type":"application/json",...e.headers}}),Oj=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/connect",...e,headers:{"Content-Type":"application/json",...e.headers}}),Dj=e=>(e.client??W).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/disconnect",...e}),Rj=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/status",...e}),Mj=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/sites",...e}),Bj=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/set-site",...e,headers:{"Content-Type":"application/json",...e.headers}}),pv=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/coverage",...e}),Lj=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/inspections",...e}),qj=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/inspect-url",...e,headers:{"Content-Type":"application/json",...e.headers}}),Uj=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/inspect-sitemap",...e,headers:{"Content-Type":"application/json",...e.headers}}),$j=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/request-indexing",...e,headers:{"Content-Type":"application/json",...e.headers}}),Vj=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/performance",...e}),Gj=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/connect",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ij=e=>(e.client??W).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/disconnect",...e}),Hj=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/status",...e}),Zj=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/sync",...e,headers:{"Content-Type":"application/json",...e.headers}}),Pj=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/traffic",...e}),Kj=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/ai-referral-history",...e}),Qj=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/social-referral-history",...e}),Yj=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/session-history",...e}),Xj=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/insights",...e}),Jj=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/report",...e}),Fj=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/citations/visibility",...e}),Wj=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/content/dismissals",...e,headers:{"Content-Type":"application/json",...e.headers}}),eN=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/overview",...e}),tN=e=>(e?.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/status",...e}),nN=e=>(e?.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/install",...e}),aN=e=>(e?.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/syncs",...e}),iN=e=>(e?.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/syncs",...e,headers:{"Content-Type":"application/json",...e?.headers}}),sN=e=>(e?.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/syncs/latest",...e}),rN=e=>(e?.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/releases",...e}),oN=e=>(e?.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/latest-release",...e}),lN=e=>(e.client??W).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/cache/{release}",...e}),cN=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/backlinks/extract",...e,headers:{"Content-Type":"application/json",...e.headers}}),uN=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/backlinks/summary",...e}),dN=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/backlinks/domains",...e}),fN=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/backlinks/history",...e}),pN=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/connect/cloud-run",...e,headers:{"Content-Type":"application/json",...e.headers}}),mN=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/connect/wordpress",...e,headers:{"Content-Type":"application/json",...e.headers}}),hN=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/connect/vercel",...e,headers:{"Content-Type":"application/json",...e.headers}}),gN=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/sources/{id}/sync",...e,headers:{"Content-Type":"application/json",...e.headers}}),yN=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/sources",...e}),bN=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/status",...e}),vN=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/sources/{id}",...e}),SN=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/events",...e}),xN=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/discover/run",...e,headers:{"Content-Type":"application/json",...e.headers}}),wN=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/discover/sessions",...e}),jN=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/discover/sessions/{id}",...e}),NN=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/discover/sessions/{id}/promote",...e}),kN=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/discover/sessions/{id}/promote",...e,headers:{"Content-Type":"application/json",...e.headers}}),AN=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/agent/providers",...e});function _N(e){const n={baseUrl:e.baseUrl,fetch:e.fetch,headers:{...e.headers??{}}};return lv(n)}class In extends Error{code;statusCode;constructor(n,i,r){super(n),this.name="ApiError",this.code=r??"UNKNOWN",this.statusCode=i}}function zN(){return typeof window<"u"&&window.__CANONRY_CONFIG__?.basePath?window.__CANONRY_CONFIG__.basePath.replace(/\/$/,"")+"/api/v1":"/api/v1"}const mv=zN();function CN(){const e=typeof window<"u"&&window.location?window.location.origin:"";return typeof window<"u"&&window.__CANONRY_CONFIG__?.basePath?e+window.__CANONRY_CONFIG__.basePath.replace(/\/$/,""):e}function TN(){return typeof window<"u"&&window.__CANONRY_CONFIG__?.basePath?window.__CANONRY_CONFIG__.basePath.replace(/\/$/,""):""}function EN(e){return`${TN()}${e}`}function ON(e,n){if(n===404)return"Health endpoint returned 404. Check basePath or reverse-proxy configuration and make sure the dashboard reaches /health instead of an API-prefixed route."}function DN(){return""}function Fd(){return!!DN()}let hv=null;function Oy(e){hv=e}function Bf(){hv?.()}const ae=_N({baseUrl:CN()});ae.interceptors.response.use((e,n)=>((e.status===401||e.status===403)&&!n.url.includes("/api/v1/session")&&Bf(),e));async function ce(e){const n=await e();if(n.error!==void 0&&n.error!==null){const i=n.response.status;let r=`API ${i}: ${n.response.statusText}`,l;if(typeof n.error=="object"&&n.error!==null){const c=n.error.error;if(typeof c=="string")r=c;else if(c&&typeof c=="object"){const d=c;d.message&&(r=d.message),d.code&&(l=d.code)}else{const d=n.error;d.message&&(r=d.message),d.code&&(l=d.code)}}else typeof n.error=="string"&&(r=n.error);throw new In(r,i,l)}if(n.response.status!==204)return n.data}async function Lf(e,n){const i=n?.body!=null,r=await fetch(`${mv}${e}`,{...n,credentials:n?.credentials??"same-origin",headers:{...i?{"Content-Type":"application/json"}:{},...n?.headers}});if(!r.ok){const l=await r.text();let c=`API ${r.status}: ${r.statusText}`,d;if(l)try{const m=JSON.parse(l);typeof m.error=="string"?c=m.error:m.error?.message?(c=m.error.message,d=m.error.code):m.message&&(c=m.message)}catch{c=l}throw(r.status===401||r.status===403)&&!e.startsWith("/session")&&Bf(),new In(c,r.status,d)}if(r.status!==204)return r.json()}function qf(e){return ce(()=>cv({client:ae,path:{name:e}}))}function gR(e){return ce(()=>Jw({client:ae,path:{name:e}}))}function Fl(e){return ce(()=>uv({client:ae,path:{id:e}}))}function RN(e){return ce(()=>Zw({client:ae,path:{name:e}}))}function MN(e){return ce(()=>Yw({client:ae,path:{name:e}}))}function BN(e,n){return ce(()=>nj({client:ae,path:{name:e},query:{location:n}}))}function gv(e,n){return ce(()=>eN({client:ae,path:{name:e},query:{location:n?.location,since:n?.since}}))}function co(e,n){return ce(()=>Uw({client:ae,path:{name:e},body:n}))}function LN(e,n){return ce(()=>Kw({client:ae,path:{name:e},body:{queries:n}}))}function qN(e,n){return ce(()=>Pw({client:ae,path:{name:e},body:{queries:n}}))}function UN(e,n){return ce(()=>Wj({client:ae,path:{name:e},body:n}))}function $N(e,n){return ce(()=>Xw({client:ae,path:{name:e},body:{competitors:n}}))}async function yR(e,n){const i=await qf(e);return co(e,{displayName:i.displayName??i.name,canonicalDomain:i.canonicalDomain,ownedDomains:n,aliases:i.aliases,country:i.country,language:i.language,tags:i.tags,labels:i.labels,providers:i.providers,locations:i.locations,defaultLocation:i.defaultLocation})}async function bR(e,n){const i=await qf(e);return co(e,{displayName:i.displayName??i.name,canonicalDomain:i.canonicalDomain,ownedDomains:i.ownedDomains,aliases:n,country:i.country,language:i.language,tags:i.tags,labels:i.labels,providers:i.providers,locations:i.locations,defaultLocation:i.defaultLocation})}async function vR(e,n){const i=await qf(e);return co(e,{displayName:n.displayName??i.displayName??i.name,canonicalDomain:n.canonicalDomain??i.canonicalDomain,ownedDomains:n.ownedDomains??i.ownedDomains,aliases:n.aliases??i.aliases,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 VN(e,n){const i={};return n?.location&&(i.location=n.location),n?.allLocations&&(i.allLocations=!0),n?.noLocation&&(i.noLocation=!0),ce(()=>Fw({client:ae,path:{name:e},body:i}))}function SR(e,n){return ce(()=>Vw({client:ae,path:{name:e},body:n}))}async function xR(e,n){await ce(()=>Gw({client:ae,path:{name:e,label:n}}))}function wR(e,n){return ce(()=>Iw({client:ae,path:{name:e},body:{label:n}}))}async function jR(e){await ce(()=>qw({client:ae,path:{name:e}}))}function NR(e){return ce(()=>Hw({client:ae,path:{name:e}}))}function kR(){return ce(()=>dv({client:ae}))}function Dy(){return Lf("/session")}function GN(e){return Lf("/session/setup",{method:"POST",body:JSON.stringify({password:e})})}function IN(e){return Lf("/session",{method:"POST",body:JSON.stringify({password:e})})}function HN(e,n){return ce(()=>aj({client:ae,path:{name:e},body:n}))}function AR(e){return ce(()=>ij({client:ae,body:e}))}async function _R(e){try{return await ce(()=>lj({client:ae,path:{name:e}}))}catch(n){if(n instanceof In&&n.statusCode===404)return null;throw n}}function zR(e,n){return ce(()=>cj({client:ae,path:{name:e},body:n}))}async function CR(e){await ce(()=>oj({client:ae,path:{name:e}}))}function TR(e){return ce(()=>uj({client:ae,path:{name:e}}))}function ER(e,n){return ce(()=>dj({client:ae,path:{name:e},body:n}))}async function OR(e,n){await ce(()=>fj({client:ae,path:{name:e,id:n}}))}function DR(e,n){return ce(()=>pj({client:ae,path:{name:e,id:n}}))}function ZN(e,n,i){return ce(()=>Qw({client:ae,path:{name:e},body:{provider:n,count:i}}))}function PN(e){return ce(()=>tj({client:ae,body:e}))}function KN(e){return ce(()=>ej({client:ae,body:e??{}}))}function RR(e,n){return ce(()=>gj({client:ae,path:{name:e},body:{type:n}}))}function MR(e,n){return ce(()=>yj({client:ae,path:{name:e,type:n}}))}function BR(e,n,i){return ce(()=>vj({client:ae,path:{name:e,type:n},body:{propertyId:i}}))}function LR(e,n,i){return ce(()=>Sj({client:ae,path:{name:e,type:n},body:{sitemapUrl:i}}))}function QN(e,n){return ce(()=>xj({client:ae,path:{name:e},body:n??{}}))}function qR(e,n){return ce(()=>Nj({client:ae,path:{name:e},body:{url:n}}))}function YN(e){return ce(()=>fv({client:ae,path:{name:e}}))}function XN(e,n){return ce(()=>Tj({client:ae,path:{name:e},body:n??{}}))}function UR(e){return ce(()=>zj({client:ae,path:{name:e}}))}function JN(e){return ce(()=>Cj({client:ae,path:{name:e}}))}function $R(e,n){return ce(()=>xN({client:ae,path:{name:e},body:n??{}}))}function VR(e,n,i){return ce(()=>kN({client:ae,path:{name:e,id:n},body:i??{}}))}function GR(){return ce(()=>mj({client:ae}))}function IR(e,n){return ce(()=>rj({client:ae,body:{host:e,port:n}}))}function HR(e,n){return ce(()=>Ej({client:ae,path:{name:e},body:n}))}function ZR(e,n){return ce(()=>Oj({client:ae,path:{name:e},body:{apiKey:n}}))}function PR(e){return ce(()=>Dj({client:ae,path:{name:e}}))}function KR(e,n){return ce(()=>Bj({client:ae,path:{name:e},body:{siteUrl:n}}))}function FN(e){return ce(()=>pv({client:ae,path:{name:e}}))}function QR(e,n){return ce(()=>qj({client:ae,path:{name:e},body:{url:n}}))}function YR(e,n){return ce(()=>Uj({client:ae,path:{name:e},body:{}}))}function XR(e,n){return ce(()=>$j({client:ae,path:{name:e},body:n}))}function JR(e){return ce(()=>sj({client:ae,body:{apiKey:e}}))}function WN(e){return e?/filename\s*=\s*"?([^";]+)"?/i.exec(e)?.[1]??null:null}async function FR(e,n="agency"){const i=new URLSearchParams({audience:n}),r=await fetch(`${mv}/projects/${encodeURIComponent(e)}/report.html?${i.toString()}`,{credentials:"same-origin",headers:{}});if(!r.ok)throw new In(`Failed to download report: ${r.status}`,r.status);const l=await r.blob(),c=URL.createObjectURL(l),d=WN(r.headers.get("Content-Disposition"))??`canonry-report-${e}.html`,m=document.createElement("a");m.href=c,m.download=d,document.body.appendChild(m),m.click(),document.body.removeChild(m),URL.revokeObjectURL(c)}function WR(e,n){return ce(()=>Zj({client:ae,path:{name:e},body:{}}))}function eM(e,n){return ce(()=>Gj({client:ae,path:{name:e},body:n}))}function tM(e){return ce(()=>Ij({client:ae,path:{name:e}}))}function nM(e,n){return ce(()=>pN({client:ae,path:{name:e},body:n}))}function aM(e,n){return ce(()=>mN({client:ae,path:{name:e},body:n}))}function iM(e,n){return ce(()=>hN({client:ae,path:{name:e},body:n}))}function sM(e,n,i){return ce(()=>gN({client:ae,path:{name:e,id:n},body:i??{}}))}function ek(e,n){return ce(()=>Xj({client:ae,path:{name:e},query:{runId:n}}))}function tk(e){if(!e||typeof e!="object")return;const n=e;if(!(typeof n.current!="string"||typeof n.latest!="string"||typeof n.url!="string"||typeof n.upgradeCommand!="string"))return{current:n.current,latest:n.latest,url:n.url,upgradeCommand:n.upgradeCommand}}async function nk(e,n){const i=EN(e);try{const r=await fetch(i,{credentials:"same-origin"});if(!r.ok)return{label:n,state:"error",detail:`${n} ${r.status}: ${r.statusText}`,statusCode:r.status,hint:ON(e,r.status)};const l=await r.json(),c=typeof l.version=="string"?l.version:"unknown",d=typeof l.databaseUrlConfigured=="boolean"?l.databaseUrlConfigured:void 0,m=typeof l.lastHeartbeatAt=="string"?l.lastHeartbeatAt:void 0,g=tk(l.updateAvailable),b=[c,d===!1?"database not configured":"database configured",m?`heartbeat ${m}`:void 0].filter(Boolean).join(" · ");return{label:n,state:"ok",detail:b,version:c,databaseConfigured:d,lastHeartbeatAt:m,...g?{updateAvailable:g}:{}}}catch(r){return{label:n,state:"error",detail:r instanceof Error?r.message:"unreachable",hint:e==="/health"?`Request failed while checking ${i}. If this instance is served behind a sub-path, verify the dashboard basePath and reverse-proxy rewrites.`:void 0}}}function rM(){return ce(()=>tN({client:ae}))}function oM(){return ce(()=>nN({client:ae}))}function lM(){return ce(()=>sN({client:ae}))}function cM(){return ce(()=>aN({client:ae}))}function uM(e){return ce(()=>iN({client:ae,body:e?{release:e}:{}}))}function dM(){return ce(()=>rN({client:ae}))}function fM(){return ce(()=>oN({client:ae}))}function pM(e){return ce(()=>lN({client:ae,path:{release:e}}))}function mM(e,n={}){return ce(()=>uN({client:ae,path:{name:e},query:{release:n.release,excludeCrawlers:n.excludeCrawlers?"1":void 0}}))}function hM(e,n={}){return ce(()=>dN({client:ae,path:{name:e},query:{limit:n.limit!==void 0?String(n.limit):void 0,offset:n.offset!==void 0?String(n.offset):void 0,release:n.release,excludeCrawlers:n.excludeCrawlers?"1":void 0}}))}function gM(e){return ce(()=>fN({client:ae,path:{name:e}}))}function yM(e,n){return ce(()=>cN({client:ae,path:{name:e},body:{release:void 0}}))}function xn(e){return(...n)=>{e(...n)}}const ak=6e3,ik=5,sk=180;let Ut=[],rk=0;const ff=new Set,pf=new Map,mf=new Map;function Wl(){const e=[...Ut];for(const n of ff)n(e)}function Uf(e){const n=pf.get(e);n&&(clearTimeout(n),pf.delete(e));const i=mf.get(e);i&&(clearTimeout(i),mf.delete(e))}function yv(e){Uf(e);const n=Ut.length;Ut=Ut.filter(i=>i.id!==e),Ut.length!==n&&Wl()}function Ry(e){Uf(e.id),pf.set(e.id,setTimeout(()=>{hf(e.id)},e.durationMs))}function ok(e,n,i){return typeof e=="string"?{title:e,tone:n,durationMs:i}:e}function un(e,n="negative",i=ak){const r=ok(e,n,i),l={id:String(++rk),title:r.title,detail:r.detail,tone:r.tone??n,durationMs:r.durationMs??i,dedupeKey:r.dedupeKey,cta:r.cta,state:"open"};if(r.dedupeKey){const c=Ut.find(d=>d.dedupeKey===r.dedupeKey);if(c){if((r.dedupeMode??"drop")==="drop")return c.id;const d={...c,title:l.title,detail:l.detail,tone:l.tone,durationMs:l.durationMs,cta:l.cta,state:"open"};return Ut=Ut.map(m=>m.id===c.id?d:m),Wl(),Ry(d),c.id}}return Ut.length>=ik&&yv(Ut[0].id),Ut=[...Ut,l],Wl(),Ry(l),l.id}function hf(e){const n=Ut.find(i=>i.id===e);!n||n.state==="closing"||(Uf(e),Ut=Ut.map(i=>i.id===e?{...i,state:"closing"}:i),Wl(),mf.set(e,setTimeout(()=>{yv(e)},sk)))}function lk(e){return ff.add(e),()=>{ff.delete(e)}}function My(){return Ut}const ck=5*6e4,gf=30*6e4,bM=3e4,vM=6e4,io=3e4,uk=2e3,dk=5e3;function fk(){return new iw({defaultOptions:{queries:{staleTime:ck,retry:1,refetchOnWindowFocus:!1}},mutationCache:new sw({onError:(e,n,i,r)=>{r.meta?.skipGlobalErrorToast||un({title:e instanceof Error?e.message:"An unexpected error occurred",tone:"negative"})}})})}const pk="modulepreload",mk=function(e,n){return new URL(e,n).href},By={},Is=function(n,i,r){let l=Promise.resolve();if(i&&i.length>0){let b=function(v){return Promise.all(v.map(S=>Promise.resolve(S).then(w=>({status:"fulfilled",value:w}),w=>({status:"rejected",reason:w}))))};const d=document.getElementsByTagName("link"),m=document.querySelector("meta[property=csp-nonce]"),g=m?.nonce||m?.getAttribute("nonce");l=b(i.map(v=>{if(v=mk(v,r),v in By)return;By[v]=!0;const S=v.endsWith(".css"),w=S?'[rel="stylesheet"]':"";if(r)for(let C=d.length-1;C>=0;C--){const N=d[C];if(N.href===v&&(!S||N.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${v}"]${w}`))return;const _=document.createElement("link");if(_.rel=S?"stylesheet":pk,S||(_.as="script"),_.crossOrigin="",_.href=v,g&&_.setAttribute("nonce",g),document.head.appendChild(_),S)return new Promise((C,N)=>{_.addEventListener("load",C),_.addEventListener("error",()=>N(new Error(`Unable to preload CSS for ${v}`)))})}))}function c(d){const m=new Event("vite:preloadError",{cancelable:!0});if(m.payload=d,window.dispatchEvent(m),!m.defaultPrevented)throw d}return l.then(d=>{for(const m of d||[])m.status==="rejected"&&c(m.reason);return n().catch(c)})};const hk=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),gk=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,i,r)=>r?r.toUpperCase():i.toLowerCase()),Ly=e=>{const n=gk(e);return n.charAt(0).toUpperCase()+n.slice(1)},bv=(...e)=>e.filter((n,i,r)=>!!n&&n.trim()!==""&&r.indexOf(n)===i).join(" ").trim(),yk=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0};var bk={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 vk=$.forwardRef(({color:e="currentColor",size:n=24,strokeWidth:i=2,absoluteStrokeWidth:r,className:l="",children:c,iconNode:d,...m},g)=>$.createElement("svg",{ref:g,...bk,width:n,height:n,stroke:e,strokeWidth:r?Number(i)*24/Number(n):i,className:bv("lucide",l),...!c&&!yk(m)&&{"aria-hidden":"true"},...m},[...d.map(([b,v])=>$.createElement(b,v)),...Array.isArray(c)?c:[c]]));const at=(e,n)=>{const i=$.forwardRef(({className:r,...l},c)=>$.createElement(vk,{ref:c,iconNode:n,className:bv(`lucide-${hk(Ly(e))}`,`lucide-${e}`,r),...l}));return i.displayName=Ly(e),i};const Sk=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],xk=at("arrow-right",Sk);const wk=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],jk=at("arrow-up",wk);const Nk=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],kk=at("book-open",Nk);const Ak=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],vv=at("check",Ak);const _k=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],zk=at("chevron-down",_k);const Ck=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],$f=at("chevron-right",Ck);const Tk=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Ek=at("copy",Tk);const Ok=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Dk=at("file-text",Ok);const Rk=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]],Mk=at("github",Rk);const Bk=[["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"}]],Lk=at("globe",Bk);const qk=[["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"}]],Uk=at("layout-dashboard",qk);const $k=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],Vk=at("link-2",$k);const Gk=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Ik=at("loader-circle",Gk);const Hk=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],Zk=at("maximize-2",Hk);const Pk=[["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 18h16",key:"19g7jn"}],["path",{d:"M4 6h16",key:"1o0s65"}]],Kk=at("menu",Pk);const Qk=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]],Yk=at("minimize-2",Qk);const Xk=[["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"}]],Jk=at("play",Xk);const Fk=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],qy=at("plus",Fk);const Wk=[["path",{d:"M19.07 4.93A10 10 0 0 0 6.99 3.34",key:"z3du51"}],["path",{d:"M4 6h.01",key:"oypzma"}],["path",{d:"M2.29 9.62A10 10 0 1 0 21.31 8.35",key:"qzzz0"}],["path",{d:"M16.24 7.76A6 6 0 1 0 8.23 16.67",key:"1yjesh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M17.99 11.66A6 6 0 0 1 15.77 16.67",key:"1u2y91"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"m13.41 10.59 5.66-5.66",key:"mhq4k0"}]],e2=at("radar",Wk);const t2=[["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"}]],n2=at("rocket",t2);const a2=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],Sv=at("rotate-ccw",a2);const i2=[["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"}]],s2=at("settings",i2);const r2=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],Uy=at("sparkles",r2);const o2=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],xv=at("triangle-alert",o2);const l2=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],c2=at("wrench",l2);const u2=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Hs=at("x",u2);function Z(e,n,i){function r(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 b=d.prototype,v=Object.keys(b);for(let S=0;S<v.length;S++){const w=v[S];w in m||(m[w]=b[w].bind(m))}}const l=i?.Parent??Object;class c extends l{}Object.defineProperty(c,"name",{value:e});function d(m){var g;const b=i?.Parent?new c:this;r(b,m),(g=b._zod).deferred??(g.deferred=[]);for(const v of b._zod.deferred)v();return b}return Object.defineProperty(d,"init",{value:r}),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 Ds extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class wv extends Error{constructor(n){super(`Encountered unidirectional transform during encode: ${n}`),this.name="ZodEncodeError"}}const jv={};function Za(e){return jv}function Nv(e){const n=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,l])=>n.indexOf(+r)===-1).map(([r,l])=>l)}function yf(e,n){return typeof n=="bigint"?n.toString():n}function pc(e){return{get value(){{const n=e();return Object.defineProperty(this,"value",{value:n}),n}}}}function Vf(e){return e==null}function Gf(e){const n=e.startsWith("^")?1:0,i=e.endsWith("$")?e.length-1:e.length;return e.slice(n,i)}function d2(e,n){const i=(e.toString().split(".")[1]||"").length,r=n.toString();let l=(r.split(".")[1]||"").length;if(l===0&&/\d?e-\d?/.test(r)){const g=r.match(/\d?e-(\d?)/);g?.[1]&&(l=Number.parseInt(g[1]))}const c=i>l?i:l,d=Number.parseInt(e.toFixed(c).replace(".","")),m=Number.parseInt(n.toFixed(c).replace(".",""));return d%m/10**c}const $y=Symbol("evaluating");function He(e,n,i){let r;Object.defineProperty(e,n,{get(){if(r!==$y)return r===void 0&&(r=$y,r=i()),r},set(l){Object.defineProperty(e,n,{value:l})},configurable:!0})}function _i(e,n,i){Object.defineProperty(e,n,{value:i,writable:!0,enumerable:!0,configurable:!0})}function Qa(...e){const n={};for(const i of e){const r=Object.getOwnPropertyDescriptors(i);Object.assign(n,r)}return Object.defineProperties({},n)}function Vy(e){return JSON.stringify(e)}function f2(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const kv="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function so(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const p2=pc(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Ls(e){if(so(e)===!1)return!1;const n=e.constructor;if(n===void 0||typeof n!="function")return!0;const i=n.prototype;return!(so(i)===!1||Object.prototype.hasOwnProperty.call(i,"isPrototypeOf")===!1)}function Av(e){return Ls(e)?{...e}:Array.isArray(e)?[...e]:e}const m2=new Set(["string","number","symbol"]);function qs(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ya(e,n,i){const r=new e._zod.constr(n??e._zod.def);return(!n||i?.parent)&&(r._zod.parent=e),r}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 h2(e){return Object.keys(e).filter(n=>e[n]._zod.optin==="optional"&&e[n]._zod.optout==="optional")}const g2={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 y2(e,n){const i=e._zod.def,r=i.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const c=Qa(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 _i(this,"shape",d),d},checks:[]});return Ya(e,c)}function b2(e,n){const i=e._zod.def,r=i.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const c=Qa(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 _i(this,"shape",d),d},checks:[]});return Ya(e,c)}function v2(e,n){if(!Ls(n))throw new Error("Invalid input to extend: expected a plain object");const i=e._zod.def.checks;if(i&&i.length>0){const c=e._zod.def.shape;for(const d in n)if(Object.getOwnPropertyDescriptor(c,d)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const l=Qa(e._zod.def,{get shape(){const c={...e._zod.def.shape,...n};return _i(this,"shape",c),c}});return Ya(e,l)}function S2(e,n){if(!Ls(n))throw new Error("Invalid input to safeExtend: expected a plain object");const i=Qa(e._zod.def,{get shape(){const r={...e._zod.def.shape,...n};return _i(this,"shape",r),r}});return Ya(e,i)}function x2(e,n){const i=Qa(e._zod.def,{get shape(){const r={...e._zod.def.shape,...n._zod.def.shape};return _i(this,"shape",r),r},get catchall(){return n._zod.def.catchall},checks:[]});return Ya(e,i)}function w2(e,n,i){const l=n._zod.def.checks;if(l&&l.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const d=Qa(n._zod.def,{get shape(){const m=n._zod.def.shape,g={...m};if(i)for(const b in i){if(!(b in m))throw new Error(`Unrecognized key: "${b}"`);i[b]&&(g[b]=e?new e({type:"optional",innerType:m[b]}):m[b])}else for(const b in m)g[b]=e?new e({type:"optional",innerType:m[b]}):m[b];return _i(this,"shape",g),g},checks:[]});return Ya(n,d)}function j2(e,n,i){const r=Qa(n._zod.def,{get shape(){const l=n._zod.def.shape,c={...l};if(i)for(const d in i){if(!(d in c))throw new Error(`Unrecognized key: "${d}"`);i[d]&&(c[d]=new e({type:"nonoptional",innerType:l[d]}))}else for(const d in l)c[d]=new e({type:"nonoptional",innerType:l[d]});return _i(this,"shape",c),c}});return Ya(n,r)}function zs(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 Cs(e,n){return n.map(i=>{var r;return(r=i).path??(r.path=[]),i.path.unshift(e),i})}function Ml(e){return typeof e=="string"?e:e?.message}function Pa(e,n,i){const r={...e,path:e.path??[]};if(!e.message){const l=Ml(e.inst?._zod.def?.error?.(e))??Ml(n?.error?.(e))??Ml(i.customError?.(e))??Ml(i.localeError?.(e))??"Invalid input";r.message=l}return delete r.inst,delete r.continue,n?.reportInput||delete r.input,r}function If(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function ro(...e){const[n,i,r]=e;return typeof n=="string"?{message:n,code:"custom",input:i,inst:r}:{...n}}const _v=(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,yf,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},zv=Z("$ZodError",_v),Cv=Z("$ZodError",_v,{Parent:Error});function N2(e,n=i=>i.message){const i={},r=[];for(const l of e.issues)l.path.length>0?(i[l.path[0]]=i[l.path[0]]||[],i[l.path[0]].push(n(l))):r.push(n(l));return{formErrors:r,fieldErrors:i}}function k2(e,n=i=>i.message){const i={_errors:[]},r=l=>{for(const c of l.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(d=>r({issues:d}));else if(c.code==="invalid_key")r({issues:c.issues});else if(c.code==="invalid_element")r({issues:c.issues});else if(c.path.length===0)i._errors.push(n(c));else{let d=i,m=0;for(;m<c.path.length;){const g=c.path[m];m===c.path.length-1?(d[g]=d[g]||{_errors:[]},d[g]._errors.push(n(c))):d[g]=d[g]||{_errors:[]},d=d[g],m++}}};return r(e),i}const Hf=e=>(n,i,r,l)=>{const c=r?Object.assign(r,{async:!1}):{async:!1},d=n._zod.run({value:i,issues:[]},c);if(d instanceof Promise)throw new Ds;if(d.issues.length){const m=new(l?.Err??e)(d.issues.map(g=>Pa(g,c,Za())));throw kv(m,l?.callee),m}return d.value},Zf=e=>async(n,i,r,l)=>{const c=r?Object.assign(r,{async:!0}):{async:!0};let d=n._zod.run({value:i,issues:[]},c);if(d instanceof Promise&&(d=await d),d.issues.length){const m=new(l?.Err??e)(d.issues.map(g=>Pa(g,c,Za())));throw kv(m,l?.callee),m}return d.value},mc=e=>(n,i,r)=>{const l=r?{...r,async:!1}:{async:!1},c=n._zod.run({value:i,issues:[]},l);if(c instanceof Promise)throw new Ds;return c.issues.length?{success:!1,error:new(e??zv)(c.issues.map(d=>Pa(d,l,Za())))}:{success:!0,data:c.value}},A2=mc(Cv),hc=e=>async(n,i,r)=>{const l=r?Object.assign(r,{async:!0}):{async:!0};let c=n._zod.run({value:i,issues:[]},l);return c instanceof Promise&&(c=await c),c.issues.length?{success:!1,error:new e(c.issues.map(d=>Pa(d,l,Za())))}:{success:!0,data:c.value}},_2=hc(Cv),z2=e=>(n,i,r)=>{const l=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Hf(e)(n,i,l)},C2=e=>(n,i,r)=>Hf(e)(n,i,r),T2=e=>async(n,i,r)=>{const l=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Zf(e)(n,i,l)},E2=e=>async(n,i,r)=>Zf(e)(n,i,r),O2=e=>(n,i,r)=>{const l=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return mc(e)(n,i,l)},D2=e=>(n,i,r)=>mc(e)(n,i,r),R2=e=>async(n,i,r)=>{const l=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return hc(e)(n,i,l)},M2=e=>async(n,i,r)=>hc(e)(n,i,r),B2=/^[cC][^\s-]{8,}$/,L2=/^[0-9a-z]+$/,q2=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,U2=/^[0-9a-vA-V]{20}$/,$2=/^[A-Za-z0-9]{27}$/,V2=/^[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)?)?)$/,I2=/^([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})$/,Gy=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)$/,H2=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Z2="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function P2(){return new RegExp(Z2,"u")}const K2=/^(?:(?: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])$/,Q2=/^(([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}|:))$/,Y2=/^((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])$/,X2=/^(([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])$/,J2=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Tv=/^[A-Za-z0-9_-]*$/,F2=/^\+[1-9]\d{6,14}$/,Ev="(?:(?:\\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])))",W2=new RegExp(`^${Ev}$`);function Ov(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 eA(e){return new RegExp(`^${Ov(e)}$`)}function tA(e){const n=Ov({precision:e.precision}),i=["Z"];e.local&&i.push(""),e.offset&&i.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${n}(?:${i.join("|")})`;return new RegExp(`^${Ev}T(?:${r})$`)}const nA=e=>{const n=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${n}$`)},aA=/^-?\d+$/,Dv=/^-?\d+(?:\.\d+)?$/,iA=/^(?:true|false)$/i,sA=/^[^A-Z]*$/,rA=/^[^a-z]*$/,en=Z("$ZodCheck",(e,n)=>{var i;e._zod??(e._zod={}),e._zod.def=n,(i=e._zod).onattach??(i.onattach=[])}),Rv={number:"number",bigint:"bigint",object:"date"},Mv=Z("$ZodCheckLessThan",(e,n)=>{en.init(e,n);const i=Rv[typeof n.value];e._zod.onattach.push(r=>{const l=r._zod.bag,c=(n.inclusive?l.maximum:l.exclusiveMaximum)??Number.POSITIVE_INFINITY;n.value<c&&(n.inclusive?l.maximum=n.value:l.exclusiveMaximum=n.value)}),e._zod.check=r=>{(n.inclusive?r.value<=n.value:r.value<n.value)||r.issues.push({origin:i,code:"too_big",maximum:typeof n.value=="object"?n.value.getTime():n.value,input:r.value,inclusive:n.inclusive,inst:e,continue:!n.abort})}}),Bv=Z("$ZodCheckGreaterThan",(e,n)=>{en.init(e,n);const i=Rv[typeof n.value];e._zod.onattach.push(r=>{const l=r._zod.bag,c=(n.inclusive?l.minimum:l.exclusiveMinimum)??Number.NEGATIVE_INFINITY;n.value>c&&(n.inclusive?l.minimum=n.value:l.exclusiveMinimum=n.value)}),e._zod.check=r=>{(n.inclusive?r.value>=n.value:r.value>n.value)||r.issues.push({origin:i,code:"too_small",minimum:typeof n.value=="object"?n.value.getTime():n.value,input:r.value,inclusive:n.inclusive,inst:e,continue:!n.abort})}}),oA=Z("$ZodCheckMultipleOf",(e,n)=>{en.init(e,n),e._zod.onattach.push(i=>{var r;(r=i._zod.bag).multipleOf??(r.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):d2(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})}}),lA=Z("$ZodCheckNumberFormat",(e,n)=>{en.init(e,n),n.format=n.format||"float64";const i=n.format?.includes("int"),r=i?"int":"number",[l,c]=g2[n.format];e._zod.onattach.push(d=>{const m=d._zod.bag;m.format=n.format,m.minimum=l,m.maximum=c,i&&(m.pattern=aA)}),e._zod.check=d=>{const m=d.value;if(i){if(!Number.isInteger(m)){d.issues.push({expected:r,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:r,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:r,inclusive:!0,continue:!n.abort});return}}m<l&&d.issues.push({origin:"number",input:m,code:"too_small",minimum:l,inclusive:!0,inst:e,continue:!n.abort}),m>c&&d.issues.push({origin:"number",input:m,code:"too_big",maximum:c,inclusive:!0,inst:e,continue:!n.abort})}}),cA=Z("$ZodCheckMaxLength",(e,n)=>{var i;en.init(e,n),(i=e._zod.def).when??(i.when=r=>{const l=r.value;return!Vf(l)&&l.length!==void 0}),e._zod.onattach.push(r=>{const l=r._zod.bag.maximum??Number.POSITIVE_INFINITY;n.maximum<l&&(r._zod.bag.maximum=n.maximum)}),e._zod.check=r=>{const l=r.value;if(l.length<=n.maximum)return;const d=If(l);r.issues.push({origin:d,code:"too_big",maximum:n.maximum,inclusive:!0,input:l,inst:e,continue:!n.abort})}}),uA=Z("$ZodCheckMinLength",(e,n)=>{var i;en.init(e,n),(i=e._zod.def).when??(i.when=r=>{const l=r.value;return!Vf(l)&&l.length!==void 0}),e._zod.onattach.push(r=>{const l=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;n.minimum>l&&(r._zod.bag.minimum=n.minimum)}),e._zod.check=r=>{const l=r.value;if(l.length>=n.minimum)return;const d=If(l);r.issues.push({origin:d,code:"too_small",minimum:n.minimum,inclusive:!0,input:l,inst:e,continue:!n.abort})}}),dA=Z("$ZodCheckLengthEquals",(e,n)=>{var i;en.init(e,n),(i=e._zod.def).when??(i.when=r=>{const l=r.value;return!Vf(l)&&l.length!==void 0}),e._zod.onattach.push(r=>{const l=r._zod.bag;l.minimum=n.length,l.maximum=n.length,l.length=n.length}),e._zod.check=r=>{const l=r.value,c=l.length;if(c===n.length)return;const d=If(l),m=c>n.length;r.issues.push({origin:d,...m?{code:"too_big",maximum:n.length}:{code:"too_small",minimum:n.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!n.abort})}}),gc=Z("$ZodCheckStringFormat",(e,n)=>{var i,r;en.init(e,n),e._zod.onattach.push(l=>{const c=l._zod.bag;c.format=n.format,n.pattern&&(c.patterns??(c.patterns=new Set),c.patterns.add(n.pattern))}),n.pattern?(i=e._zod).check??(i.check=l=>{n.pattern.lastIndex=0,!n.pattern.test(l.value)&&l.issues.push({origin:"string",code:"invalid_format",format:n.format,input:l.value,...n.pattern?{pattern:n.pattern.toString()}:{},inst:e,continue:!n.abort})}):(r=e._zod).check??(r.check=()=>{})}),fA=Z("$ZodCheckRegex",(e,n)=>{gc.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})}}),pA=Z("$ZodCheckLowerCase",(e,n)=>{n.pattern??(n.pattern=sA),gc.init(e,n)}),mA=Z("$ZodCheckUpperCase",(e,n)=>{n.pattern??(n.pattern=rA),gc.init(e,n)}),hA=Z("$ZodCheckIncludes",(e,n)=>{en.init(e,n);const i=qs(n.includes),r=new RegExp(typeof n.position=="number"?`^.{${n.position}}${i}`:i);n.pattern=r,e._zod.onattach.push(l=>{const c=l._zod.bag;c.patterns??(c.patterns=new Set),c.patterns.add(r)}),e._zod.check=l=>{l.value.includes(n.includes,n.position)||l.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:n.includes,input:l.value,inst:e,continue:!n.abort})}}),gA=Z("$ZodCheckStartsWith",(e,n)=>{en.init(e,n);const i=new RegExp(`^${qs(n.prefix)}.*`);n.pattern??(n.pattern=i),e._zod.onattach.push(r=>{const l=r._zod.bag;l.patterns??(l.patterns=new Set),l.patterns.add(i)}),e._zod.check=r=>{r.value.startsWith(n.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:n.prefix,input:r.value,inst:e,continue:!n.abort})}}),yA=Z("$ZodCheckEndsWith",(e,n)=>{en.init(e,n);const i=new RegExp(`.*${qs(n.suffix)}$`);n.pattern??(n.pattern=i),e._zod.onattach.push(r=>{const l=r._zod.bag;l.patterns??(l.patterns=new Set),l.patterns.add(i)}),e._zod.check=r=>{r.value.endsWith(n.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:n.suffix,input:r.value,inst:e,continue:!n.abort})}}),bA=Z("$ZodCheckOverwrite",(e,n)=>{en.init(e,n),e._zod.check=i=>{i.value=n.tx(i.value)}});class vA{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 r=n.split(`
13
+ `),pe=[];let $;for(const je of re)if(je.startsWith("data:"))pe.push(je.replace(/^data:\s*/,""));else if(je.startsWith("event:"))$=je.replace(/^event:\s*/,"");else if(je.startsWith("id:"))S=je.replace(/^id:\s*/,"");else if(je.startsWith("retry:")){const ie=Number.parseInt(je.replace(/^retry:\s*/,""),10);Number.isNaN(ie)||(N=ie)}let F,de=!1;if(pe.length){const je=pe.join(`
14
+ `);try{F=JSON.parse(je),de=!0}catch{F=je}}de&&(l&&await l(F),r&&(F=await r(F))),i?.({data:F,event:$,id:S,retry:N}),pe.length&&(yield F)}}}finally{R.removeEventListener("abort",oe),D.releaseLock()}break}catch(H){if(n?.(H),d!==void 0&&T>=d)break;const K=Math.min(N*2**(T-1),m??3e4);await w(K)}}}()}},jw=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},Nw=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},kw=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},av=({allowReserved:e,explode:n,name:i,style:r,value:l})=>{if(!n){const m=(e?l:l.map(g=>encodeURIComponent(g))).join(Nw(r));switch(r){case"label":return`.${m}`;case"matrix":return`;${i}=${m}`;case"simple":return m;default:return`${i}=${m}`}}const c=jw(r),d=l.map(m=>r==="label"||r==="simple"?e?m:encodeURIComponent(m):fc({allowReserved:e,name:i,value:m})).join(c);return r==="label"||r==="matrix"?c+d:d},fc=({allowReserved:e,name:n,value:i})=>{if(i==null)return"";if(typeof i=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${n}=${e?i:encodeURIComponent(i)}`},iv=({allowReserved:e,explode:n,name:i,style:r,value:l,valueOnly:c})=>{if(l instanceof Date)return c?l.toISOString():`${i}=${l.toISOString()}`;if(r!=="deepObject"&&!n){let g=[];Object.entries(l).forEach(([v,S])=>{g=[...g,v,e?S:encodeURIComponent(S)]});const b=g.join(",");switch(r){case"form":return`${i}=${b}`;case"label":return`.${b}`;case"matrix":return`;${i}=${b}`;default:return b}}const d=kw(r),m=Object.entries(l).map(([g,b])=>fc({allowReserved:e,name:r==="deepObject"?`${i}[${g}]`:g,value:b})).join(d);return r==="label"||r==="matrix"?d+m:m},Aw=/\{[^{}]+\}/g,_w=({path:e,url:n})=>{let i=n;const r=n.match(Aw);if(r)for(const l of r){let c=!1,d=l.substring(1,l.length-1),m="simple";d.endsWith("*")&&(c=!0,d=d.substring(0,d.length-1)),d.startsWith(".")?(d=d.substring(1),m="label"):d.startsWith(";")&&(d=d.substring(1),m="matrix");const g=e[d];if(g==null)continue;if(Array.isArray(g)){i=i.replace(l,av({explode:c,name:d,style:m,value:g}));continue}if(typeof g=="object"){i=i.replace(l,iv({explode:c,name:d,style:m,value:g,valueOnly:!0}));continue}if(m==="matrix"){i=i.replace(l,`;${fc({name:d,value:g})}`);continue}const b=encodeURIComponent(m==="label"?`.${g}`:g);i=i.replace(l,b)}return i},zw=({baseUrl:e,path:n,query:i,querySerializer:r,url:l})=>{const c=l.startsWith("/")?l:`/${l}`;let d=(e??"")+c;n&&(d=_w({path:n,url:d}));let m=i?r(i):"";return m.startsWith("?")&&(m=m.substring(1)),m&&(d+=`?${m}`),d};function Cw(e){const n=e.body!==void 0;if(n&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(n)return e.body}const Tw=async(e,n)=>{const i=typeof n=="function"?await n(e):n;if(i)return e.scheme==="bearer"?`Bearer ${i}`:e.scheme==="basic"?`Basic ${btoa(i)}`:i},sv=({allowReserved:e,array:n,object:i}={})=>l=>{const c=[];if(l&&typeof l=="object")for(const d in l){const m=l[d];if(m!=null)if(Array.isArray(m)){const g=av({allowReserved:e,explode:!0,name:d,style:"form",value:m,...n});g&&c.push(g)}else if(typeof m=="object"){const g=iv({allowReserved:e,explode:!0,name:d,style:"deepObject",value:m,...i});g&&c.push(g)}else{const g=fc({allowReserved:e,name:d,value:m});g&&c.push(g)}}return c.join("&")},Ew=e=>{if(!e)return"stream";const n=e.split(";")[0]?.trim();if(n){if(n.startsWith("application/json")||n.endsWith("+json"))return"json";if(n==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(i=>n.startsWith(i)))return"blob";if(n.startsWith("text/"))return"text"}},Ow=(e,n)=>n?!!(e.headers.has(n)||e.query?.[n]||e.headers.get("Cookie")?.includes(`${n}=`)):!1,Dw=async({security:e,...n})=>{for(const i of e){if(Ow(n,i.name))continue;const r=await Tw(i,n.auth);if(!r)continue;const l=i.name??"Authorization";switch(i.in){case"query":n.query||(n.query={}),n.query[l]=r;break;case"cookie":n.headers.append("Cookie",`${l}=${r}`);break;default:n.headers.set(l,r);break}}},Ty=e=>zw({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:sv(e.querySerializer),url:e.url}),Ey=(e,n)=>{const i={...e,...n};return i.baseUrl?.endsWith("/")&&(i.baseUrl=i.baseUrl.substring(0,i.baseUrl.length-1)),i.headers=rv(e.headers,n.headers),i},Rw=e=>{const n=[];return e.forEach((i,r)=>{n.push([r,i])}),n},rv=(...e)=>{const n=new Headers;for(const i of e){if(!i)continue;const r=i instanceof Headers?Rw(i):Object.entries(i);for(const[l,c]of r)if(c===null)n.delete(l);else if(Array.isArray(c))for(const d of c)n.append(l,d);else c!==void 0&&n.set(l,typeof c=="object"?JSON.stringify(c):c)}return n};class Jd{fns=[];clear(){this.fns=[]}eject(n){const i=this.getInterceptorIndex(n);this.fns[i]&&(this.fns[i]=null)}exists(n){const i=this.getInterceptorIndex(n);return!!this.fns[i]}getInterceptorIndex(n){return typeof n=="number"?this.fns[n]?n:-1:this.fns.indexOf(n)}update(n,i){const r=this.getInterceptorIndex(n);return this.fns[r]?(this.fns[r]=i,n):!1}use(n){return this.fns.push(n),this.fns.length-1}}const Mw=()=>({error:new Jd,request:new Jd,response:new Jd}),Bw=sv({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),Lw={"Content-Type":"application/json"},ov=(e={})=>({...xw,headers:Lw,parseAs:"auto",querySerializer:Bw,...e}),lv=(e={})=>{let n=Ey(ov(),e);const i=()=>({...n}),r=b=>(n=Ey(n,b),i()),l=Mw(),c=async b=>{const v={...n,...b,fetch:b.fetch??n.fetch??globalThis.fetch,headers:rv(n.headers,b.headers),serializedBody:void 0};v.security&&await Dw({...v,security:v.security}),v.requestValidator&&await v.requestValidator(v),v.body!==void 0&&v.bodySerializer&&(v.serializedBody=v.bodySerializer(v.body)),(v.body===void 0||v.serializedBody==="")&&v.headers.delete("Content-Type");const S=Ty(v);return{opts:v,url:S}},d=async b=>{const{opts:v,url:S}=await c(b),w={redirect:"follow",...v,body:Cw(v)};let _=new Request(S,w);for(const X of l.request.fns)X&&(_=await X(_,v));const C=v.fetch;let N=await C(_);for(const X of l.response.fns)X&&(N=await X(N,_,v));const T={request:_,response:N};if(N.ok){const X=(v.parseAs==="auto"?Ew(N.headers.get("Content-Type")):v.parseAs)??"json";if(N.status===204||N.headers.get("Content-Length")==="0"){let D;switch(X){case"arrayBuffer":case"blob":case"text":D=await N[X]();break;case"formData":D=new FormData;break;case"stream":D=N.body;break;default:D={};break}return v.responseStyle==="data"?D:{data:D,...T}}let J;switch(X){case"arrayBuffer":case"blob":case"formData":case"json":case"text":J=await N[X]();break;case"stream":return v.responseStyle==="data"?N.body:{data:N.body,...T}}return X==="json"&&(v.responseValidator&&await v.responseValidator(J),v.responseTransformer&&(J=await v.responseTransformer(J))),v.responseStyle==="data"?J:{data:J,...T}}const R=await N.text();let G;try{G=JSON.parse(R)}catch{}const H=G??R;let K=H;for(const X of l.error.fns)X&&(K=await X(H,N,_,v));if(K=K||{},v.throwOnError)throw K;return v.responseStyle==="data"?void 0:{error:K,...T}},m=b=>v=>d({...v,method:b}),g=b=>async v=>{const{opts:S,url:w}=await c(v);return ww({...S,body:S.body,headers:S.headers,method:b,onRequest:async(_,C)=>{let N=new Request(_,C);for(const T of l.request.fns)T&&(N=await T(N,S));return N},url:w})};return{buildUrl:Ty,connect:m("CONNECT"),delete:m("DELETE"),get:m("GET"),getConfig:i,head:m("HEAD"),interceptors:l,options:m("OPTIONS"),patch:m("PATCH"),post:m("POST"),put:m("PUT"),request:d,setConfig:r,sse:{connect:g("CONNECT"),delete:g("DELETE"),get:g("GET"),head:g("HEAD"),options:g("OPTIONS"),patch:g("PATCH"),post:g("POST"),put:g("PUT"),trace:g("TRACE")},trace:m("TRACE")}},W=lv(ov()),qw=e=>(e.client??W).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}",...e}),cv=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}",...e}),$w=e=>(e.client??W).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}",...e,headers:{"Content-Type":"application/json",...e.headers}}),Uw=e=>(e?.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects",...e}),Vw=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/locations",...e,headers:{"Content-Type":"application/json",...e.headers}}),Gw=e=>(e.client??W).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/locations/{label}",...e}),Iw=e=>(e.client??W).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/locations/default",...e,headers:{"Content-Type":"application/json",...e.headers}}),Hw=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/export",...e}),Zw=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/queries",...e}),Pw=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/queries",...e,headers:{"Content-Type":"application/json",...e.headers}}),Kw=e=>(e.client??W).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/queries",...e,headers:{"Content-Type":"application/json",...e.headers}}),Qw=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/queries/generate",...e,headers:{"Content-Type":"application/json",...e.headers}}),Yw=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/competitors",...e}),Xw=e=>(e.client??W).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/competitors",...e,headers:{"Content-Type":"application/json",...e.headers}}),Jw=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/runs",...e}),Fw=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/runs",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ww=e=>(e?.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/runs",...e}),ej=e=>(e?.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/runs",...e,headers:{"Content-Type":"application/json",...e?.headers}}),uv=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/runs/{id}",...e}),tj=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/apply",...e,headers:{"Content-Type":"application/json",...e.headers}}),nj=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/timeline",...e}),dv=e=>(e?.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/settings",...e}),aj=e=>(e.client??W).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/settings/providers/{name}",...e,headers:{"Content-Type":"application/json",...e.headers}}),ij=e=>(e.client??W).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/settings/google",...e,headers:{"Content-Type":"application/json",...e.headers}}),sj=e=>(e.client??W).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/settings/bing",...e,headers:{"Content-Type":"application/json",...e.headers}}),rj=e=>(e.client??W).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/settings/cdp",...e,headers:{"Content-Type":"application/json",...e.headers}}),oj=e=>(e.client??W).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/schedule",...e}),lj=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/schedule",...e}),cj=e=>(e.client??W).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/schedule",...e,headers:{"Content-Type":"application/json",...e.headers}}),uj=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/notifications",...e}),dj=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/notifications",...e,headers:{"Content-Type":"application/json",...e.headers}}),fj=e=>(e.client??W).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/notifications/{id}",...e}),pj=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/notifications/{id}/test",...e}),mj=e=>(e?.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/cdp/status",...e}),hj=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/connections",...e}),gj=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/connect",...e,headers:{"Content-Type":"application/json",...e.headers}}),yj=e=>(e.client??W).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/connections/{type}",...e}),bj=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/properties",...e}),vj=e=>(e.client??W).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/connections/{type}/property",...e,headers:{"Content-Type":"application/json",...e.headers}}),Sj=e=>(e.client??W).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/connections/{type}/sitemap",...e,headers:{"Content-Type":"application/json",...e.headers}}),xj=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/sync",...e,headers:{"Content-Type":"application/json",...e.headers}}),wj=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/performance",...e}),jj=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/performance/daily",...e}),Nj=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/inspect",...e,headers:{"Content-Type":"application/json",...e.headers}}),kj=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/inspections",...e}),Aj=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/deindexed",...e}),fv=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/coverage",...e}),_j=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/coverage/history",...e}),zj=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/sitemaps",...e}),Cj=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/discover-sitemaps",...e}),Tj=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/inspect-sitemap",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ej=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/indexing/request",...e,headers:{"Content-Type":"application/json",...e.headers}}),Oj=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/connect",...e,headers:{"Content-Type":"application/json",...e.headers}}),Dj=e=>(e.client??W).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/disconnect",...e}),Rj=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/status",...e}),Mj=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/sites",...e}),Bj=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/set-site",...e,headers:{"Content-Type":"application/json",...e.headers}}),pv=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/coverage",...e}),Lj=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/inspections",...e}),qj=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/inspect-url",...e,headers:{"Content-Type":"application/json",...e.headers}}),$j=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/inspect-sitemap",...e,headers:{"Content-Type":"application/json",...e.headers}}),Uj=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/request-indexing",...e,headers:{"Content-Type":"application/json",...e.headers}}),Vj=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/performance",...e}),Gj=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/connect",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ij=e=>(e.client??W).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/disconnect",...e}),Hj=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/status",...e}),Zj=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/sync",...e,headers:{"Content-Type":"application/json",...e.headers}}),Pj=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/traffic",...e}),Kj=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/ai-referral-history",...e}),Qj=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/social-referral-history",...e}),Yj=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/session-history",...e}),Xj=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/insights",...e}),Jj=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/report",...e}),Fj=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/citations/visibility",...e}),Wj=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/content/dismissals",...e,headers:{"Content-Type":"application/json",...e.headers}}),eN=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/overview",...e}),tN=e=>(e?.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/status",...e}),nN=e=>(e?.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/install",...e}),aN=e=>(e?.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/syncs",...e}),iN=e=>(e?.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/syncs",...e,headers:{"Content-Type":"application/json",...e?.headers}}),sN=e=>(e?.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/syncs/latest",...e}),rN=e=>(e?.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/releases",...e}),oN=e=>(e?.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/latest-release",...e}),lN=e=>(e.client??W).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/cache/{release}",...e}),cN=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/backlinks/extract",...e,headers:{"Content-Type":"application/json",...e.headers}}),uN=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/backlinks/summary",...e}),dN=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/backlinks/domains",...e}),fN=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/backlinks/history",...e}),pN=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/connect/cloud-run",...e,headers:{"Content-Type":"application/json",...e.headers}}),mN=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/connect/wordpress",...e,headers:{"Content-Type":"application/json",...e.headers}}),hN=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/connect/vercel",...e,headers:{"Content-Type":"application/json",...e.headers}}),gN=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/sources/{id}/sync",...e,headers:{"Content-Type":"application/json",...e.headers}}),yN=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/sources",...e}),bN=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/status",...e}),vN=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/sources/{id}",...e}),SN=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/events",...e}),xN=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/discover/run",...e,headers:{"Content-Type":"application/json",...e.headers}}),wN=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/discover/sessions",...e}),jN=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/discover/sessions/{id}",...e}),NN=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/discover/sessions/{id}/promote",...e}),kN=e=>(e.client??W).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/discover/sessions/{id}/promote",...e,headers:{"Content-Type":"application/json",...e.headers}}),AN=e=>(e.client??W).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/agent/providers",...e});function _N(e){const n={baseUrl:e.baseUrl,fetch:e.fetch,headers:{...e.headers??{}}};return lv(n)}class In extends Error{code;statusCode;constructor(n,i,r){super(n),this.name="ApiError",this.code=r??"UNKNOWN",this.statusCode=i}}function zN(){return typeof window<"u"&&window.__CANONRY_CONFIG__?.basePath?window.__CANONRY_CONFIG__.basePath.replace(/\/$/,"")+"/api/v1":"/api/v1"}const mv=zN();function CN(){const e=typeof window<"u"&&window.location?window.location.origin:"";return typeof window<"u"&&window.__CANONRY_CONFIG__?.basePath?e+window.__CANONRY_CONFIG__.basePath.replace(/\/$/,""):e}function TN(){return typeof window<"u"&&window.__CANONRY_CONFIG__?.basePath?window.__CANONRY_CONFIG__.basePath.replace(/\/$/,""):""}function EN(e){return`${TN()}${e}`}function ON(e,n){if(n===404)return"Health endpoint returned 404. Check basePath or reverse-proxy configuration and make sure the dashboard reaches /health instead of an API-prefixed route."}function DN(){return""}function Fd(){return!!DN()}let hv=null;function Oy(e){hv=e}function Bf(){hv?.()}const ae=_N({baseUrl:CN()});ae.interceptors.response.use((e,n)=>((e.status===401||e.status===403)&&!n.url.includes("/api/v1/session")&&Bf(),e));async function ce(e){const n=await e();if(n.error!==void 0&&n.error!==null){const i=n.response.status;let r=`API ${i}: ${n.response.statusText}`,l;if(typeof n.error=="object"&&n.error!==null){const c=n.error.error;if(typeof c=="string")r=c;else if(c&&typeof c=="object"){const d=c;d.message&&(r=d.message),d.code&&(l=d.code)}else{const d=n.error;d.message&&(r=d.message),d.code&&(l=d.code)}}else typeof n.error=="string"&&(r=n.error);throw new In(r,i,l)}if(n.response.status!==204)return n.data}async function Lf(e,n){const i=n?.body!=null,r=await fetch(`${mv}${e}`,{...n,credentials:n?.credentials??"same-origin",headers:{...i?{"Content-Type":"application/json"}:{},...n?.headers}});if(!r.ok){const l=await r.text();let c=`API ${r.status}: ${r.statusText}`,d;if(l)try{const m=JSON.parse(l);typeof m.error=="string"?c=m.error:m.error?.message?(c=m.error.message,d=m.error.code):m.message&&(c=m.message)}catch{c=l}throw(r.status===401||r.status===403)&&!e.startsWith("/session")&&Bf(),new In(c,r.status,d)}if(r.status!==204)return r.json()}function qf(e){return ce(()=>cv({client:ae,path:{name:e}}))}function yR(e){return ce(()=>Jw({client:ae,path:{name:e}}))}function Fl(e){return ce(()=>uv({client:ae,path:{id:e}}))}function RN(e){return ce(()=>Zw({client:ae,path:{name:e}}))}function MN(e){return ce(()=>Yw({client:ae,path:{name:e}}))}function BN(e,n){return ce(()=>nj({client:ae,path:{name:e},query:{location:n}}))}function gv(e,n){return ce(()=>eN({client:ae,path:{name:e},query:{location:n?.location,since:n?.since}}))}function co(e,n){return ce(()=>$w({client:ae,path:{name:e},body:n}))}function LN(e,n){return ce(()=>Kw({client:ae,path:{name:e},body:{queries:n}}))}function qN(e,n){return ce(()=>Pw({client:ae,path:{name:e},body:{queries:n}}))}function $N(e,n){return ce(()=>Wj({client:ae,path:{name:e},body:n}))}function UN(e,n){return ce(()=>Xw({client:ae,path:{name:e},body:{competitors:n}}))}async function bR(e,n){const i=await qf(e);return co(e,{displayName:i.displayName??i.name,canonicalDomain:i.canonicalDomain,ownedDomains:n,aliases:i.aliases,country:i.country,language:i.language,tags:i.tags,labels:i.labels,providers:i.providers,locations:i.locations,defaultLocation:i.defaultLocation})}async function vR(e,n){const i=await qf(e);return co(e,{displayName:i.displayName??i.name,canonicalDomain:i.canonicalDomain,ownedDomains:i.ownedDomains,aliases:n,country:i.country,language:i.language,tags:i.tags,labels:i.labels,providers:i.providers,locations:i.locations,defaultLocation:i.defaultLocation})}async function SR(e,n){const i=await qf(e);return co(e,{displayName:n.displayName??i.displayName??i.name,canonicalDomain:n.canonicalDomain??i.canonicalDomain,ownedDomains:n.ownedDomains??i.ownedDomains,aliases:n.aliases??i.aliases,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 VN(e,n){const i={};return n?.location&&(i.location=n.location),n?.allLocations&&(i.allLocations=!0),n?.noLocation&&(i.noLocation=!0),ce(()=>Fw({client:ae,path:{name:e},body:i}))}function xR(e,n){return ce(()=>Vw({client:ae,path:{name:e},body:n}))}async function wR(e,n){await ce(()=>Gw({client:ae,path:{name:e,label:n}}))}function jR(e,n){return ce(()=>Iw({client:ae,path:{name:e},body:{label:n}}))}async function NR(e){await ce(()=>qw({client:ae,path:{name:e}}))}function kR(e){return ce(()=>Hw({client:ae,path:{name:e}}))}function AR(){return ce(()=>dv({client:ae}))}function Dy(){return Lf("/session")}function GN(e){return Lf("/session/setup",{method:"POST",body:JSON.stringify({password:e})})}function IN(e){return Lf("/session",{method:"POST",body:JSON.stringify({password:e})})}function HN(e,n){return ce(()=>aj({client:ae,path:{name:e},body:n}))}function _R(e){return ce(()=>ij({client:ae,body:e}))}async function zR(e){try{return await ce(()=>lj({client:ae,path:{name:e}}))}catch(n){if(n instanceof In&&n.statusCode===404)return null;throw n}}function CR(e,n){return ce(()=>cj({client:ae,path:{name:e},body:n}))}async function TR(e){await ce(()=>oj({client:ae,path:{name:e}}))}function ER(e){return ce(()=>uj({client:ae,path:{name:e}}))}function OR(e,n){return ce(()=>dj({client:ae,path:{name:e},body:n}))}async function DR(e,n){await ce(()=>fj({client:ae,path:{name:e,id:n}}))}function RR(e,n){return ce(()=>pj({client:ae,path:{name:e,id:n}}))}function ZN(e,n,i){return ce(()=>Qw({client:ae,path:{name:e},body:{provider:n,count:i}}))}function PN(e){return ce(()=>tj({client:ae,body:e}))}function KN(e){return ce(()=>ej({client:ae,body:e??{}}))}function MR(e,n){return ce(()=>gj({client:ae,path:{name:e},body:{type:n}}))}function BR(e,n){return ce(()=>yj({client:ae,path:{name:e,type:n}}))}function LR(e,n,i){return ce(()=>vj({client:ae,path:{name:e,type:n},body:{propertyId:i}}))}function qR(e,n,i){return ce(()=>Sj({client:ae,path:{name:e,type:n},body:{sitemapUrl:i}}))}function QN(e,n){return ce(()=>xj({client:ae,path:{name:e},body:n??{}}))}function $R(e,n){return ce(()=>Nj({client:ae,path:{name:e},body:{url:n}}))}function YN(e){return ce(()=>fv({client:ae,path:{name:e}}))}function XN(e,n){return ce(()=>Tj({client:ae,path:{name:e},body:n??{}}))}function UR(e){return ce(()=>zj({client:ae,path:{name:e}}))}function JN(e){return ce(()=>Cj({client:ae,path:{name:e}}))}function VR(e,n){return ce(()=>xN({client:ae,path:{name:e},body:n??{}}))}function GR(e,n,i){return ce(()=>kN({client:ae,path:{name:e,id:n},body:i??{}}))}function IR(){return ce(()=>mj({client:ae}))}function HR(e,n){return ce(()=>rj({client:ae,body:{host:e,port:n}}))}function ZR(e,n){return ce(()=>Ej({client:ae,path:{name:e},body:n}))}function PR(e,n){return ce(()=>Oj({client:ae,path:{name:e},body:{apiKey:n}}))}function KR(e){return ce(()=>Dj({client:ae,path:{name:e}}))}function QR(e,n){return ce(()=>Bj({client:ae,path:{name:e},body:{siteUrl:n}}))}function FN(e){return ce(()=>pv({client:ae,path:{name:e}}))}function YR(e,n){return ce(()=>qj({client:ae,path:{name:e},body:{url:n}}))}function XR(e,n){return ce(()=>$j({client:ae,path:{name:e},body:{}}))}function JR(e,n){return ce(()=>Uj({client:ae,path:{name:e},body:n}))}function FR(e){return ce(()=>sj({client:ae,body:{apiKey:e}}))}function WN(e){return e?/filename\s*=\s*"?([^";]+)"?/i.exec(e)?.[1]??null:null}async function WR(e,n="agency"){const i=new URLSearchParams({audience:n}),r=await fetch(`${mv}/projects/${encodeURIComponent(e)}/report.html?${i.toString()}`,{credentials:"same-origin",headers:{}});if(!r.ok)throw new In(`Failed to download report: ${r.status}`,r.status);const l=await r.blob(),c=URL.createObjectURL(l),d=WN(r.headers.get("Content-Disposition"))??`canonry-report-${e}.html`,m=document.createElement("a");m.href=c,m.download=d,document.body.appendChild(m),m.click(),document.body.removeChild(m),URL.revokeObjectURL(c)}function eM(e,n){return ce(()=>Zj({client:ae,path:{name:e},body:{}}))}function tM(e,n){return ce(()=>Gj({client:ae,path:{name:e},body:n}))}function nM(e){return ce(()=>Ij({client:ae,path:{name:e}}))}function aM(e,n){return ce(()=>pN({client:ae,path:{name:e},body:n}))}function iM(e,n){return ce(()=>mN({client:ae,path:{name:e},body:n}))}function sM(e,n){return ce(()=>hN({client:ae,path:{name:e},body:n}))}function rM(e,n,i){return ce(()=>gN({client:ae,path:{name:e,id:n},body:i??{}}))}function ek(e,n){return ce(()=>Xj({client:ae,path:{name:e},query:{runId:n}}))}function tk(e){if(!e||typeof e!="object")return;const n=e;if(!(typeof n.current!="string"||typeof n.latest!="string"||typeof n.url!="string"||typeof n.upgradeCommand!="string"))return{current:n.current,latest:n.latest,url:n.url,upgradeCommand:n.upgradeCommand}}async function nk(e,n){const i=EN(e);try{const r=await fetch(i,{credentials:"same-origin"});if(!r.ok)return{label:n,state:"error",detail:`${n} ${r.status}: ${r.statusText}`,statusCode:r.status,hint:ON(e,r.status)};const l=await r.json(),c=typeof l.version=="string"?l.version:"unknown",d=typeof l.databaseUrlConfigured=="boolean"?l.databaseUrlConfigured:void 0,m=typeof l.lastHeartbeatAt=="string"?l.lastHeartbeatAt:void 0,g=tk(l.updateAvailable),b=[c,d===!1?"database not configured":"database configured",m?`heartbeat ${m}`:void 0].filter(Boolean).join(" · ");return{label:n,state:"ok",detail:b,version:c,databaseConfigured:d,lastHeartbeatAt:m,...g?{updateAvailable:g}:{}}}catch(r){return{label:n,state:"error",detail:r instanceof Error?r.message:"unreachable",hint:e==="/health"?`Request failed while checking ${i}. If this instance is served behind a sub-path, verify the dashboard basePath and reverse-proxy rewrites.`:void 0}}}function oM(){return ce(()=>tN({client:ae}))}function lM(){return ce(()=>nN({client:ae}))}function cM(){return ce(()=>sN({client:ae}))}function uM(){return ce(()=>aN({client:ae}))}function dM(e){return ce(()=>iN({client:ae,body:e?{release:e}:{}}))}function fM(){return ce(()=>rN({client:ae}))}function pM(){return ce(()=>oN({client:ae}))}function mM(e){return ce(()=>lN({client:ae,path:{release:e}}))}function hM(e,n={}){return ce(()=>uN({client:ae,path:{name:e},query:{release:n.release,excludeCrawlers:n.excludeCrawlers?"1":void 0}}))}function gM(e,n={}){return ce(()=>dN({client:ae,path:{name:e},query:{limit:n.limit!==void 0?String(n.limit):void 0,offset:n.offset!==void 0?String(n.offset):void 0,release:n.release,excludeCrawlers:n.excludeCrawlers?"1":void 0}}))}function yM(e){return ce(()=>fN({client:ae,path:{name:e}}))}function bM(e,n){return ce(()=>cN({client:ae,path:{name:e},body:{release:void 0}}))}function xn(e){return(...n)=>{e(...n)}}const ak=6e3,ik=5,sk=180;let $t=[],rk=0;const ff=new Set,pf=new Map,mf=new Map;function Wl(){const e=[...$t];for(const n of ff)n(e)}function $f(e){const n=pf.get(e);n&&(clearTimeout(n),pf.delete(e));const i=mf.get(e);i&&(clearTimeout(i),mf.delete(e))}function yv(e){$f(e);const n=$t.length;$t=$t.filter(i=>i.id!==e),$t.length!==n&&Wl()}function Ry(e){$f(e.id),pf.set(e.id,setTimeout(()=>{hf(e.id)},e.durationMs))}function ok(e,n,i){return typeof e=="string"?{title:e,tone:n,durationMs:i}:e}function un(e,n="negative",i=ak){const r=ok(e,n,i),l={id:String(++rk),title:r.title,detail:r.detail,tone:r.tone??n,durationMs:r.durationMs??i,dedupeKey:r.dedupeKey,cta:r.cta,state:"open"};if(r.dedupeKey){const c=$t.find(d=>d.dedupeKey===r.dedupeKey);if(c){if((r.dedupeMode??"drop")==="drop")return c.id;const d={...c,title:l.title,detail:l.detail,tone:l.tone,durationMs:l.durationMs,cta:l.cta,state:"open"};return $t=$t.map(m=>m.id===c.id?d:m),Wl(),Ry(d),c.id}}return $t.length>=ik&&yv($t[0].id),$t=[...$t,l],Wl(),Ry(l),l.id}function hf(e){const n=$t.find(i=>i.id===e);!n||n.state==="closing"||($f(e),$t=$t.map(i=>i.id===e?{...i,state:"closing"}:i),Wl(),mf.set(e,setTimeout(()=>{yv(e)},sk)))}function lk(e){return ff.add(e),()=>{ff.delete(e)}}function My(){return $t}const ck=5*6e4,gf=30*6e4,vM=3e4,SM=6e4,io=3e4,uk=2e3,dk=5e3;function fk(){return new iw({defaultOptions:{queries:{staleTime:ck,retry:1,refetchOnWindowFocus:!1}},mutationCache:new sw({onError:(e,n,i,r)=>{r.meta?.skipGlobalErrorToast||un({title:e instanceof Error?e.message:"An unexpected error occurred",tone:"negative"})}})})}const pk="modulepreload",mk=function(e,n){return new URL(e,n).href},By={},Is=function(n,i,r){let l=Promise.resolve();if(i&&i.length>0){let b=function(v){return Promise.all(v.map(S=>Promise.resolve(S).then(w=>({status:"fulfilled",value:w}),w=>({status:"rejected",reason:w}))))};const d=document.getElementsByTagName("link"),m=document.querySelector("meta[property=csp-nonce]"),g=m?.nonce||m?.getAttribute("nonce");l=b(i.map(v=>{if(v=mk(v,r),v in By)return;By[v]=!0;const S=v.endsWith(".css"),w=S?'[rel="stylesheet"]':"";if(r)for(let C=d.length-1;C>=0;C--){const N=d[C];if(N.href===v&&(!S||N.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${v}"]${w}`))return;const _=document.createElement("link");if(_.rel=S?"stylesheet":pk,S||(_.as="script"),_.crossOrigin="",_.href=v,g&&_.setAttribute("nonce",g),document.head.appendChild(_),S)return new Promise((C,N)=>{_.addEventListener("load",C),_.addEventListener("error",()=>N(new Error(`Unable to preload CSS for ${v}`)))})}))}function c(d){const m=new Event("vite:preloadError",{cancelable:!0});if(m.payload=d,window.dispatchEvent(m),!m.defaultPrevented)throw d}return l.then(d=>{for(const m of d||[])m.status==="rejected"&&c(m.reason);return n().catch(c)})};const hk=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),gk=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,i,r)=>r?r.toUpperCase():i.toLowerCase()),Ly=e=>{const n=gk(e);return n.charAt(0).toUpperCase()+n.slice(1)},bv=(...e)=>e.filter((n,i,r)=>!!n&&n.trim()!==""&&r.indexOf(n)===i).join(" ").trim(),yk=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0};var bk={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 vk=U.forwardRef(({color:e="currentColor",size:n=24,strokeWidth:i=2,absoluteStrokeWidth:r,className:l="",children:c,iconNode:d,...m},g)=>U.createElement("svg",{ref:g,...bk,width:n,height:n,stroke:e,strokeWidth:r?Number(i)*24/Number(n):i,className:bv("lucide",l),...!c&&!yk(m)&&{"aria-hidden":"true"},...m},[...d.map(([b,v])=>U.createElement(b,v)),...Array.isArray(c)?c:[c]]));const at=(e,n)=>{const i=U.forwardRef(({className:r,...l},c)=>U.createElement(vk,{ref:c,iconNode:n,className:bv(`lucide-${hk(Ly(e))}`,`lucide-${e}`,r),...l}));return i.displayName=Ly(e),i};const Sk=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],xk=at("arrow-right",Sk);const wk=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],jk=at("arrow-up",wk);const Nk=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],kk=at("book-open",Nk);const Ak=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],vv=at("check",Ak);const _k=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],zk=at("chevron-down",_k);const Ck=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Uf=at("chevron-right",Ck);const Tk=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Ek=at("copy",Tk);const Ok=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Dk=at("file-text",Ok);const Rk=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]],Mk=at("github",Rk);const Bk=[["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"}]],Lk=at("globe",Bk);const qk=[["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"}]],$k=at("layout-dashboard",qk);const Uk=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],Vk=at("link-2",Uk);const Gk=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Ik=at("loader-circle",Gk);const Hk=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],Zk=at("maximize-2",Hk);const Pk=[["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 18h16",key:"19g7jn"}],["path",{d:"M4 6h16",key:"1o0s65"}]],Kk=at("menu",Pk);const Qk=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]],Yk=at("minimize-2",Qk);const Xk=[["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"}]],Jk=at("play",Xk);const Fk=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],qy=at("plus",Fk);const Wk=[["path",{d:"M19.07 4.93A10 10 0 0 0 6.99 3.34",key:"z3du51"}],["path",{d:"M4 6h.01",key:"oypzma"}],["path",{d:"M2.29 9.62A10 10 0 1 0 21.31 8.35",key:"qzzz0"}],["path",{d:"M16.24 7.76A6 6 0 1 0 8.23 16.67",key:"1yjesh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M17.99 11.66A6 6 0 0 1 15.77 16.67",key:"1u2y91"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"m13.41 10.59 5.66-5.66",key:"mhq4k0"}]],e2=at("radar",Wk);const t2=[["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"}]],n2=at("rocket",t2);const a2=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],Sv=at("rotate-ccw",a2);const i2=[["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"}]],s2=at("settings",i2);const r2=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],$y=at("sparkles",r2);const o2=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],xv=at("triangle-alert",o2);const l2=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],c2=at("wrench",l2);const u2=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Hs=at("x",u2);function Z(e,n,i){function r(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 b=d.prototype,v=Object.keys(b);for(let S=0;S<v.length;S++){const w=v[S];w in m||(m[w]=b[w].bind(m))}}const l=i?.Parent??Object;class c extends l{}Object.defineProperty(c,"name",{value:e});function d(m){var g;const b=i?.Parent?new c:this;r(b,m),(g=b._zod).deferred??(g.deferred=[]);for(const v of b._zod.deferred)v();return b}return Object.defineProperty(d,"init",{value:r}),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 Ds extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class wv extends Error{constructor(n){super(`Encountered unidirectional transform during encode: ${n}`),this.name="ZodEncodeError"}}const jv={};function Za(e){return jv}function Nv(e){const n=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,l])=>n.indexOf(+r)===-1).map(([r,l])=>l)}function yf(e,n){return typeof n=="bigint"?n.toString():n}function pc(e){return{get value(){{const n=e();return Object.defineProperty(this,"value",{value:n}),n}}}}function Vf(e){return e==null}function Gf(e){const n=e.startsWith("^")?1:0,i=e.endsWith("$")?e.length-1:e.length;return e.slice(n,i)}function d2(e,n){const i=(e.toString().split(".")[1]||"").length,r=n.toString();let l=(r.split(".")[1]||"").length;if(l===0&&/\d?e-\d?/.test(r)){const g=r.match(/\d?e-(\d?)/);g?.[1]&&(l=Number.parseInt(g[1]))}const c=i>l?i:l,d=Number.parseInt(e.toFixed(c).replace(".","")),m=Number.parseInt(n.toFixed(c).replace(".",""));return d%m/10**c}const Uy=Symbol("evaluating");function He(e,n,i){let r;Object.defineProperty(e,n,{get(){if(r!==Uy)return r===void 0&&(r=Uy,r=i()),r},set(l){Object.defineProperty(e,n,{value:l})},configurable:!0})}function _i(e,n,i){Object.defineProperty(e,n,{value:i,writable:!0,enumerable:!0,configurable:!0})}function Qa(...e){const n={};for(const i of e){const r=Object.getOwnPropertyDescriptors(i);Object.assign(n,r)}return Object.defineProperties({},n)}function Vy(e){return JSON.stringify(e)}function f2(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const kv="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function so(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const p2=pc(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Ls(e){if(so(e)===!1)return!1;const n=e.constructor;if(n===void 0||typeof n!="function")return!0;const i=n.prototype;return!(so(i)===!1||Object.prototype.hasOwnProperty.call(i,"isPrototypeOf")===!1)}function Av(e){return Ls(e)?{...e}:Array.isArray(e)?[...e]:e}const m2=new Set(["string","number","symbol"]);function qs(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ya(e,n,i){const r=new e._zod.constr(n??e._zod.def);return(!n||i?.parent)&&(r._zod.parent=e),r}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 h2(e){return Object.keys(e).filter(n=>e[n]._zod.optin==="optional"&&e[n]._zod.optout==="optional")}const g2={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 y2(e,n){const i=e._zod.def,r=i.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const c=Qa(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 _i(this,"shape",d),d},checks:[]});return Ya(e,c)}function b2(e,n){const i=e._zod.def,r=i.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const c=Qa(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 _i(this,"shape",d),d},checks:[]});return Ya(e,c)}function v2(e,n){if(!Ls(n))throw new Error("Invalid input to extend: expected a plain object");const i=e._zod.def.checks;if(i&&i.length>0){const c=e._zod.def.shape;for(const d in n)if(Object.getOwnPropertyDescriptor(c,d)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const l=Qa(e._zod.def,{get shape(){const c={...e._zod.def.shape,...n};return _i(this,"shape",c),c}});return Ya(e,l)}function S2(e,n){if(!Ls(n))throw new Error("Invalid input to safeExtend: expected a plain object");const i=Qa(e._zod.def,{get shape(){const r={...e._zod.def.shape,...n};return _i(this,"shape",r),r}});return Ya(e,i)}function x2(e,n){const i=Qa(e._zod.def,{get shape(){const r={...e._zod.def.shape,...n._zod.def.shape};return _i(this,"shape",r),r},get catchall(){return n._zod.def.catchall},checks:[]});return Ya(e,i)}function w2(e,n,i){const l=n._zod.def.checks;if(l&&l.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const d=Qa(n._zod.def,{get shape(){const m=n._zod.def.shape,g={...m};if(i)for(const b in i){if(!(b in m))throw new Error(`Unrecognized key: "${b}"`);i[b]&&(g[b]=e?new e({type:"optional",innerType:m[b]}):m[b])}else for(const b in m)g[b]=e?new e({type:"optional",innerType:m[b]}):m[b];return _i(this,"shape",g),g},checks:[]});return Ya(n,d)}function j2(e,n,i){const r=Qa(n._zod.def,{get shape(){const l=n._zod.def.shape,c={...l};if(i)for(const d in i){if(!(d in c))throw new Error(`Unrecognized key: "${d}"`);i[d]&&(c[d]=new e({type:"nonoptional",innerType:l[d]}))}else for(const d in l)c[d]=new e({type:"nonoptional",innerType:l[d]});return _i(this,"shape",c),c}});return Ya(n,r)}function zs(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 Cs(e,n){return n.map(i=>{var r;return(r=i).path??(r.path=[]),i.path.unshift(e),i})}function Ml(e){return typeof e=="string"?e:e?.message}function Pa(e,n,i){const r={...e,path:e.path??[]};if(!e.message){const l=Ml(e.inst?._zod.def?.error?.(e))??Ml(n?.error?.(e))??Ml(i.customError?.(e))??Ml(i.localeError?.(e))??"Invalid input";r.message=l}return delete r.inst,delete r.continue,n?.reportInput||delete r.input,r}function If(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function ro(...e){const[n,i,r]=e;return typeof n=="string"?{message:n,code:"custom",input:i,inst:r}:{...n}}const _v=(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,yf,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},zv=Z("$ZodError",_v),Cv=Z("$ZodError",_v,{Parent:Error});function N2(e,n=i=>i.message){const i={},r=[];for(const l of e.issues)l.path.length>0?(i[l.path[0]]=i[l.path[0]]||[],i[l.path[0]].push(n(l))):r.push(n(l));return{formErrors:r,fieldErrors:i}}function k2(e,n=i=>i.message){const i={_errors:[]},r=l=>{for(const c of l.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(d=>r({issues:d}));else if(c.code==="invalid_key")r({issues:c.issues});else if(c.code==="invalid_element")r({issues:c.issues});else if(c.path.length===0)i._errors.push(n(c));else{let d=i,m=0;for(;m<c.path.length;){const g=c.path[m];m===c.path.length-1?(d[g]=d[g]||{_errors:[]},d[g]._errors.push(n(c))):d[g]=d[g]||{_errors:[]},d=d[g],m++}}};return r(e),i}const Hf=e=>(n,i,r,l)=>{const c=r?Object.assign(r,{async:!1}):{async:!1},d=n._zod.run({value:i,issues:[]},c);if(d instanceof Promise)throw new Ds;if(d.issues.length){const m=new(l?.Err??e)(d.issues.map(g=>Pa(g,c,Za())));throw kv(m,l?.callee),m}return d.value},Zf=e=>async(n,i,r,l)=>{const c=r?Object.assign(r,{async:!0}):{async:!0};let d=n._zod.run({value:i,issues:[]},c);if(d instanceof Promise&&(d=await d),d.issues.length){const m=new(l?.Err??e)(d.issues.map(g=>Pa(g,c,Za())));throw kv(m,l?.callee),m}return d.value},mc=e=>(n,i,r)=>{const l=r?{...r,async:!1}:{async:!1},c=n._zod.run({value:i,issues:[]},l);if(c instanceof Promise)throw new Ds;return c.issues.length?{success:!1,error:new(e??zv)(c.issues.map(d=>Pa(d,l,Za())))}:{success:!0,data:c.value}},A2=mc(Cv),hc=e=>async(n,i,r)=>{const l=r?Object.assign(r,{async:!0}):{async:!0};let c=n._zod.run({value:i,issues:[]},l);return c instanceof Promise&&(c=await c),c.issues.length?{success:!1,error:new e(c.issues.map(d=>Pa(d,l,Za())))}:{success:!0,data:c.value}},_2=hc(Cv),z2=e=>(n,i,r)=>{const l=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Hf(e)(n,i,l)},C2=e=>(n,i,r)=>Hf(e)(n,i,r),T2=e=>async(n,i,r)=>{const l=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Zf(e)(n,i,l)},E2=e=>async(n,i,r)=>Zf(e)(n,i,r),O2=e=>(n,i,r)=>{const l=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return mc(e)(n,i,l)},D2=e=>(n,i,r)=>mc(e)(n,i,r),R2=e=>async(n,i,r)=>{const l=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return hc(e)(n,i,l)},M2=e=>async(n,i,r)=>hc(e)(n,i,r),B2=/^[cC][^\s-]{8,}$/,L2=/^[0-9a-z]+$/,q2=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,$2=/^[0-9a-vA-V]{20}$/,U2=/^[A-Za-z0-9]{27}$/,V2=/^[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)?)?)$/,I2=/^([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})$/,Gy=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)$/,H2=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Z2="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function P2(){return new RegExp(Z2,"u")}const K2=/^(?:(?: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])$/,Q2=/^(([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}|:))$/,Y2=/^((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])$/,X2=/^(([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])$/,J2=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Tv=/^[A-Za-z0-9_-]*$/,F2=/^\+[1-9]\d{6,14}$/,Ev="(?:(?:\\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])))",W2=new RegExp(`^${Ev}$`);function Ov(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 eA(e){return new RegExp(`^${Ov(e)}$`)}function tA(e){const n=Ov({precision:e.precision}),i=["Z"];e.local&&i.push(""),e.offset&&i.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${n}(?:${i.join("|")})`;return new RegExp(`^${Ev}T(?:${r})$`)}const nA=e=>{const n=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${n}$`)},aA=/^-?\d+$/,Dv=/^-?\d+(?:\.\d+)?$/,iA=/^(?:true|false)$/i,sA=/^[^A-Z]*$/,rA=/^[^a-z]*$/,en=Z("$ZodCheck",(e,n)=>{var i;e._zod??(e._zod={}),e._zod.def=n,(i=e._zod).onattach??(i.onattach=[])}),Rv={number:"number",bigint:"bigint",object:"date"},Mv=Z("$ZodCheckLessThan",(e,n)=>{en.init(e,n);const i=Rv[typeof n.value];e._zod.onattach.push(r=>{const l=r._zod.bag,c=(n.inclusive?l.maximum:l.exclusiveMaximum)??Number.POSITIVE_INFINITY;n.value<c&&(n.inclusive?l.maximum=n.value:l.exclusiveMaximum=n.value)}),e._zod.check=r=>{(n.inclusive?r.value<=n.value:r.value<n.value)||r.issues.push({origin:i,code:"too_big",maximum:typeof n.value=="object"?n.value.getTime():n.value,input:r.value,inclusive:n.inclusive,inst:e,continue:!n.abort})}}),Bv=Z("$ZodCheckGreaterThan",(e,n)=>{en.init(e,n);const i=Rv[typeof n.value];e._zod.onattach.push(r=>{const l=r._zod.bag,c=(n.inclusive?l.minimum:l.exclusiveMinimum)??Number.NEGATIVE_INFINITY;n.value>c&&(n.inclusive?l.minimum=n.value:l.exclusiveMinimum=n.value)}),e._zod.check=r=>{(n.inclusive?r.value>=n.value:r.value>n.value)||r.issues.push({origin:i,code:"too_small",minimum:typeof n.value=="object"?n.value.getTime():n.value,input:r.value,inclusive:n.inclusive,inst:e,continue:!n.abort})}}),oA=Z("$ZodCheckMultipleOf",(e,n)=>{en.init(e,n),e._zod.onattach.push(i=>{var r;(r=i._zod.bag).multipleOf??(r.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):d2(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})}}),lA=Z("$ZodCheckNumberFormat",(e,n)=>{en.init(e,n),n.format=n.format||"float64";const i=n.format?.includes("int"),r=i?"int":"number",[l,c]=g2[n.format];e._zod.onattach.push(d=>{const m=d._zod.bag;m.format=n.format,m.minimum=l,m.maximum=c,i&&(m.pattern=aA)}),e._zod.check=d=>{const m=d.value;if(i){if(!Number.isInteger(m)){d.issues.push({expected:r,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:r,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:r,inclusive:!0,continue:!n.abort});return}}m<l&&d.issues.push({origin:"number",input:m,code:"too_small",minimum:l,inclusive:!0,inst:e,continue:!n.abort}),m>c&&d.issues.push({origin:"number",input:m,code:"too_big",maximum:c,inclusive:!0,inst:e,continue:!n.abort})}}),cA=Z("$ZodCheckMaxLength",(e,n)=>{var i;en.init(e,n),(i=e._zod.def).when??(i.when=r=>{const l=r.value;return!Vf(l)&&l.length!==void 0}),e._zod.onattach.push(r=>{const l=r._zod.bag.maximum??Number.POSITIVE_INFINITY;n.maximum<l&&(r._zod.bag.maximum=n.maximum)}),e._zod.check=r=>{const l=r.value;if(l.length<=n.maximum)return;const d=If(l);r.issues.push({origin:d,code:"too_big",maximum:n.maximum,inclusive:!0,input:l,inst:e,continue:!n.abort})}}),uA=Z("$ZodCheckMinLength",(e,n)=>{var i;en.init(e,n),(i=e._zod.def).when??(i.when=r=>{const l=r.value;return!Vf(l)&&l.length!==void 0}),e._zod.onattach.push(r=>{const l=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;n.minimum>l&&(r._zod.bag.minimum=n.minimum)}),e._zod.check=r=>{const l=r.value;if(l.length>=n.minimum)return;const d=If(l);r.issues.push({origin:d,code:"too_small",minimum:n.minimum,inclusive:!0,input:l,inst:e,continue:!n.abort})}}),dA=Z("$ZodCheckLengthEquals",(e,n)=>{var i;en.init(e,n),(i=e._zod.def).when??(i.when=r=>{const l=r.value;return!Vf(l)&&l.length!==void 0}),e._zod.onattach.push(r=>{const l=r._zod.bag;l.minimum=n.length,l.maximum=n.length,l.length=n.length}),e._zod.check=r=>{const l=r.value,c=l.length;if(c===n.length)return;const d=If(l),m=c>n.length;r.issues.push({origin:d,...m?{code:"too_big",maximum:n.length}:{code:"too_small",minimum:n.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!n.abort})}}),gc=Z("$ZodCheckStringFormat",(e,n)=>{var i,r;en.init(e,n),e._zod.onattach.push(l=>{const c=l._zod.bag;c.format=n.format,n.pattern&&(c.patterns??(c.patterns=new Set),c.patterns.add(n.pattern))}),n.pattern?(i=e._zod).check??(i.check=l=>{n.pattern.lastIndex=0,!n.pattern.test(l.value)&&l.issues.push({origin:"string",code:"invalid_format",format:n.format,input:l.value,...n.pattern?{pattern:n.pattern.toString()}:{},inst:e,continue:!n.abort})}):(r=e._zod).check??(r.check=()=>{})}),fA=Z("$ZodCheckRegex",(e,n)=>{gc.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})}}),pA=Z("$ZodCheckLowerCase",(e,n)=>{n.pattern??(n.pattern=sA),gc.init(e,n)}),mA=Z("$ZodCheckUpperCase",(e,n)=>{n.pattern??(n.pattern=rA),gc.init(e,n)}),hA=Z("$ZodCheckIncludes",(e,n)=>{en.init(e,n);const i=qs(n.includes),r=new RegExp(typeof n.position=="number"?`^.{${n.position}}${i}`:i);n.pattern=r,e._zod.onattach.push(l=>{const c=l._zod.bag;c.patterns??(c.patterns=new Set),c.patterns.add(r)}),e._zod.check=l=>{l.value.includes(n.includes,n.position)||l.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:n.includes,input:l.value,inst:e,continue:!n.abort})}}),gA=Z("$ZodCheckStartsWith",(e,n)=>{en.init(e,n);const i=new RegExp(`^${qs(n.prefix)}.*`);n.pattern??(n.pattern=i),e._zod.onattach.push(r=>{const l=r._zod.bag;l.patterns??(l.patterns=new Set),l.patterns.add(i)}),e._zod.check=r=>{r.value.startsWith(n.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:n.prefix,input:r.value,inst:e,continue:!n.abort})}}),yA=Z("$ZodCheckEndsWith",(e,n)=>{en.init(e,n);const i=new RegExp(`.*${qs(n.suffix)}$`);n.pattern??(n.pattern=i),e._zod.onattach.push(r=>{const l=r._zod.bag;l.patterns??(l.patterns=new Set),l.patterns.add(i)}),e._zod.check=r=>{r.value.endsWith(n.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:n.suffix,input:r.value,inst:e,continue:!n.abort})}}),bA=Z("$ZodCheckOverwrite",(e,n)=>{en.init(e,n),e._zod.check=i=>{i.value=n.tx(i.value)}});class vA{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 r=n.split(`
15
15
  `).filter(d=>d),l=Math.min(...r.map(d=>d.length-d.trimStart().length)),c=r.map(d=>d.slice(l)).map(d=>" ".repeat(this.indent*2)+d);for(const d of c)this.content.push(d)}compile(){const n=Function,i=this?.args,l=[...(this?.content??[""]).map(c=>` ${c}`)];return new n(...i,l.join(`
16
- `))}}const SA={major:4,minor:3,patch:6},ct=Z("$ZodType",(e,n)=>{var i;e??(e={}),e._zod.def=n,e._zod.bag=e._zod.bag||{},e._zod.version=SA;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const l of r)for(const c of l._zod.onattach)c(e);if(r.length===0)(i=e._zod).deferred??(i.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const l=(d,m,g)=>{let b=zs(d),v;for(const S of m){if(S._zod.def.when){if(!S._zod.def.when(d))continue}else if(b)continue;const w=d.issues.length,_=S._zod.check(d);if(_ instanceof Promise&&g?.async===!1)throw new Ds;if(v||_ instanceof Promise)v=(v??Promise.resolve()).then(async()=>{await _,d.issues.length!==w&&(b||(b=zs(d,w)))});else{if(d.issues.length===w)continue;b||(b=zs(d,w))}}return v?v.then(()=>d):d},c=(d,m,g)=>{if(zs(d))return d.aborted=!0,d;const b=l(m,r,g);if(b instanceof Promise){if(g.async===!1)throw new Ds;return b.then(v=>e._zod.parse(v,g))}return e._zod.parse(b,g)};e._zod.run=(d,m)=>{if(m.skipChecks)return e._zod.parse(d,m);if(m.direction==="backward"){const b=e._zod.parse({value:d.value,issues:[]},{...m,skipChecks:!0});return b instanceof Promise?b.then(v=>c(v,d,m)):c(b,d,m)}const g=e._zod.parse(d,m);if(g instanceof Promise){if(m.async===!1)throw new Ds;return g.then(b=>l(b,r,m))}return l(g,r,m)}}He(e,"~standard",()=>({validate:l=>{try{const c=A2(e,l);return c.success?{value:c.data}:{issues:c.error?.issues}}catch{return _2(e,l).then(d=>d.success?{value:d.data}:{issues:d.error?.issues})}},vendor:"zod",version:1}))}),Pf=Z("$ZodString",(e,n)=>{ct.init(e,n),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??nA(e._zod.bag),e._zod.parse=(i,r)=>{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}}),lt=Z("$ZodStringFormat",(e,n)=>{gc.init(e,n),Pf.init(e,n)}),xA=Z("$ZodGUID",(e,n)=>{n.pattern??(n.pattern=I2),lt.init(e,n)}),wA=Z("$ZodUUID",(e,n)=>{if(n.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[n.version];if(r===void 0)throw new Error(`Invalid UUID version: "${n.version}"`);n.pattern??(n.pattern=Gy(r))}else n.pattern??(n.pattern=Gy());lt.init(e,n)}),jA=Z("$ZodEmail",(e,n)=>{n.pattern??(n.pattern=H2),lt.init(e,n)}),NA=Z("$ZodURL",(e,n)=>{lt.init(e,n),e._zod.check=i=>{try{const r=i.value.trim(),l=new URL(r);n.hostname&&(n.hostname.lastIndex=0,n.hostname.test(l.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(l.protocol.endsWith(":")?l.protocol.slice(0,-1):l.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=l.href:i.value=r;return}catch{i.issues.push({code:"invalid_format",format:"url",input:i.value,inst:e,continue:!n.abort})}}}),kA=Z("$ZodEmoji",(e,n)=>{n.pattern??(n.pattern=P2()),lt.init(e,n)}),AA=Z("$ZodNanoID",(e,n)=>{n.pattern??(n.pattern=V2),lt.init(e,n)}),_A=Z("$ZodCUID",(e,n)=>{n.pattern??(n.pattern=B2),lt.init(e,n)}),zA=Z("$ZodCUID2",(e,n)=>{n.pattern??(n.pattern=L2),lt.init(e,n)}),CA=Z("$ZodULID",(e,n)=>{n.pattern??(n.pattern=q2),lt.init(e,n)}),TA=Z("$ZodXID",(e,n)=>{n.pattern??(n.pattern=U2),lt.init(e,n)}),EA=Z("$ZodKSUID",(e,n)=>{n.pattern??(n.pattern=$2),lt.init(e,n)}),OA=Z("$ZodISODateTime",(e,n)=>{n.pattern??(n.pattern=tA(n)),lt.init(e,n)}),DA=Z("$ZodISODate",(e,n)=>{n.pattern??(n.pattern=W2),lt.init(e,n)}),RA=Z("$ZodISOTime",(e,n)=>{n.pattern??(n.pattern=eA(n)),lt.init(e,n)}),MA=Z("$ZodISODuration",(e,n)=>{n.pattern??(n.pattern=G2),lt.init(e,n)}),BA=Z("$ZodIPv4",(e,n)=>{n.pattern??(n.pattern=K2),lt.init(e,n),e._zod.bag.format="ipv4"}),LA=Z("$ZodIPv6",(e,n)=>{n.pattern??(n.pattern=Q2),lt.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})}}}),qA=Z("$ZodCIDRv4",(e,n)=>{n.pattern??(n.pattern=Y2),lt.init(e,n)}),UA=Z("$ZodCIDRv6",(e,n)=>{n.pattern??(n.pattern=X2),lt.init(e,n),e._zod.check=i=>{const r=i.value.split("/");try{if(r.length!==2)throw new Error;const[l,c]=r;if(!c)throw new Error;const d=Number(c);if(`${d}`!==c)throw new Error;if(d<0||d>128)throw new Error;new URL(`http://[${l}]`)}catch{i.issues.push({code:"invalid_format",format:"cidrv6",input:i.value,inst:e,continue:!n.abort})}}});function Lv(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const $A=Z("$ZodBase64",(e,n)=>{n.pattern??(n.pattern=J2),lt.init(e,n),e._zod.bag.contentEncoding="base64",e._zod.check=i=>{Lv(i.value)||i.issues.push({code:"invalid_format",format:"base64",input:i.value,inst:e,continue:!n.abort})}});function VA(e){if(!Tv.test(e))return!1;const n=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),i=n.padEnd(Math.ceil(n.length/4)*4,"=");return Lv(i)}const GA=Z("$ZodBase64URL",(e,n)=>{n.pattern??(n.pattern=Tv),lt.init(e,n),e._zod.bag.contentEncoding="base64url",e._zod.check=i=>{VA(i.value)||i.issues.push({code:"invalid_format",format:"base64url",input:i.value,inst:e,continue:!n.abort})}}),IA=Z("$ZodE164",(e,n)=>{n.pattern??(n.pattern=F2),lt.init(e,n)});function HA(e,n=null){try{const i=e.split(".");if(i.length!==3)return!1;const[r]=i;if(!r)return!1;const l=JSON.parse(atob(r));return!("typ"in l&&l?.typ!=="JWT"||!l.alg||n&&(!("alg"in l)||l.alg!==n))}catch{return!1}}const ZA=Z("$ZodJWT",(e,n)=>{lt.init(e,n),e._zod.check=i=>{HA(i.value,n.alg)||i.issues.push({code:"invalid_format",format:"jwt",input:i.value,inst:e,continue:!n.abort})}}),qv=Z("$ZodNumber",(e,n)=>{ct.init(e,n),e._zod.pattern=e._zod.bag.pattern??Dv,e._zod.parse=(i,r)=>{if(n.coerce)try{i.value=Number(i.value)}catch{}const l=i.value;if(typeof l=="number"&&!Number.isNaN(l)&&Number.isFinite(l))return i;const c=typeof l=="number"?Number.isNaN(l)?"NaN":Number.isFinite(l)?void 0:"Infinity":void 0;return i.issues.push({expected:"number",code:"invalid_type",input:l,inst:e,...c?{received:c}:{}}),i}}),PA=Z("$ZodNumberFormat",(e,n)=>{lA.init(e,n),qv.init(e,n)}),KA=Z("$ZodBoolean",(e,n)=>{ct.init(e,n),e._zod.pattern=iA,e._zod.parse=(i,r)=>{if(n.coerce)try{i.value=!!i.value}catch{}const l=i.value;return typeof l=="boolean"||i.issues.push({expected:"boolean",code:"invalid_type",input:l,inst:e}),i}}),QA=Z("$ZodUnknown",(e,n)=>{ct.init(e,n),e._zod.parse=i=>i}),YA=Z("$ZodNever",(e,n)=>{ct.init(e,n),e._zod.parse=(i,r)=>(i.issues.push({expected:"never",code:"invalid_type",input:i.value,inst:e}),i)});function Iy(e,n,i){e.issues.length&&n.issues.push(...Cs(i,e.issues)),n.value[i]=e.value}const XA=Z("$ZodArray",(e,n)=>{ct.init(e,n),e._zod.parse=(i,r)=>{const l=i.value;if(!Array.isArray(l))return i.issues.push({expected:"array",code:"invalid_type",input:l,inst:e}),i;i.value=Array(l.length);const c=[];for(let d=0;d<l.length;d++){const m=l[d],g=n.element._zod.run({value:m,issues:[]},r);g instanceof Promise?c.push(g.then(b=>Iy(b,i,d))):Iy(g,i,d)}return c.length?Promise.all(c).then(()=>i):i}});function ec(e,n,i,r,l){if(e.issues.length){if(l&&!(i in r))return;n.issues.push(...Cs(i,e.issues))}e.value===void 0?i in r&&(n.value[i]=void 0):n.value[i]=e.value}function Uv(e){const n=Object.keys(e.shape);for(const r of n)if(!e.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);const i=h2(e.shape);return{...e,keys:n,keySet:new Set(n),numKeys:n.length,optionalKeys:new Set(i)}}function $v(e,n,i,r,l,c){const d=[],m=l.keySet,g=l.catchall._zod,b=g.def.type,v=g.optout==="optional";for(const S in n){if(m.has(S))continue;if(b==="never"){d.push(S);continue}const w=g.run({value:n[S],issues:[]},r);w instanceof Promise?e.push(w.then(_=>ec(_,i,S,n,v))):ec(w,i,S,n,v)}return d.length&&i.issues.push({code:"unrecognized_keys",keys:d,input:n,inst:c}),e.length?Promise.all(e).then(()=>i):i}const JA=Z("$ZodObject",(e,n)=>{if(ct.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 r=pc(()=>Uv(n));He(e._zod,"propValues",()=>{const m=n.shape,g={};for(const b in m){const v=m[b]._zod;if(v.values){g[b]??(g[b]=new Set);for(const S of v.values)g[b].add(S)}}return g});const l=so,c=n.catchall;let d;e._zod.parse=(m,g)=>{d??(d=r.value);const b=m.value;if(!l(b))return m.issues.push({expected:"object",code:"invalid_type",input:b,inst:e}),m;m.value={};const v=[],S=d.shape;for(const w of d.keys){const _=S[w],C=_._zod.optout==="optional",N=_._zod.run({value:b[w],issues:[]},g);N instanceof Promise?v.push(N.then(T=>ec(T,m,w,b,C))):ec(N,m,w,b,C)}return c?$v(v,b,m,g,r.value,e):v.length?Promise.all(v).then(()=>m):m}}),FA=Z("$ZodObjectJIT",(e,n)=>{JA.init(e,n);const i=e._zod.parse,r=pc(()=>Uv(n)),l=w=>{const _=new vA(["shape","payload","ctx"]),C=r.value,N=H=>{const K=Vy(H);return`shape[${K}]._zod.run({ value: input[${K}], issues: [] }, ctx)`};_.write("const input = payload.value;");const T=Object.create(null);let R=0;for(const H of C.keys)T[H]=`key_${R++}`;_.write("const newResult = {};");for(const H of C.keys){const K=T[H],X=Vy(H),D=w[H]?._zod?.optout==="optional";_.write(`const ${K} = ${N(H)};`),D?_.write(`
16
+ `))}}const SA={major:4,minor:3,patch:6},ct=Z("$ZodType",(e,n)=>{var i;e??(e={}),e._zod.def=n,e._zod.bag=e._zod.bag||{},e._zod.version=SA;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const l of r)for(const c of l._zod.onattach)c(e);if(r.length===0)(i=e._zod).deferred??(i.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const l=(d,m,g)=>{let b=zs(d),v;for(const S of m){if(S._zod.def.when){if(!S._zod.def.when(d))continue}else if(b)continue;const w=d.issues.length,_=S._zod.check(d);if(_ instanceof Promise&&g?.async===!1)throw new Ds;if(v||_ instanceof Promise)v=(v??Promise.resolve()).then(async()=>{await _,d.issues.length!==w&&(b||(b=zs(d,w)))});else{if(d.issues.length===w)continue;b||(b=zs(d,w))}}return v?v.then(()=>d):d},c=(d,m,g)=>{if(zs(d))return d.aborted=!0,d;const b=l(m,r,g);if(b instanceof Promise){if(g.async===!1)throw new Ds;return b.then(v=>e._zod.parse(v,g))}return e._zod.parse(b,g)};e._zod.run=(d,m)=>{if(m.skipChecks)return e._zod.parse(d,m);if(m.direction==="backward"){const b=e._zod.parse({value:d.value,issues:[]},{...m,skipChecks:!0});return b instanceof Promise?b.then(v=>c(v,d,m)):c(b,d,m)}const g=e._zod.parse(d,m);if(g instanceof Promise){if(m.async===!1)throw new Ds;return g.then(b=>l(b,r,m))}return l(g,r,m)}}He(e,"~standard",()=>({validate:l=>{try{const c=A2(e,l);return c.success?{value:c.data}:{issues:c.error?.issues}}catch{return _2(e,l).then(d=>d.success?{value:d.data}:{issues:d.error?.issues})}},vendor:"zod",version:1}))}),Pf=Z("$ZodString",(e,n)=>{ct.init(e,n),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??nA(e._zod.bag),e._zod.parse=(i,r)=>{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}}),lt=Z("$ZodStringFormat",(e,n)=>{gc.init(e,n),Pf.init(e,n)}),xA=Z("$ZodGUID",(e,n)=>{n.pattern??(n.pattern=I2),lt.init(e,n)}),wA=Z("$ZodUUID",(e,n)=>{if(n.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[n.version];if(r===void 0)throw new Error(`Invalid UUID version: "${n.version}"`);n.pattern??(n.pattern=Gy(r))}else n.pattern??(n.pattern=Gy());lt.init(e,n)}),jA=Z("$ZodEmail",(e,n)=>{n.pattern??(n.pattern=H2),lt.init(e,n)}),NA=Z("$ZodURL",(e,n)=>{lt.init(e,n),e._zod.check=i=>{try{const r=i.value.trim(),l=new URL(r);n.hostname&&(n.hostname.lastIndex=0,n.hostname.test(l.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(l.protocol.endsWith(":")?l.protocol.slice(0,-1):l.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=l.href:i.value=r;return}catch{i.issues.push({code:"invalid_format",format:"url",input:i.value,inst:e,continue:!n.abort})}}}),kA=Z("$ZodEmoji",(e,n)=>{n.pattern??(n.pattern=P2()),lt.init(e,n)}),AA=Z("$ZodNanoID",(e,n)=>{n.pattern??(n.pattern=V2),lt.init(e,n)}),_A=Z("$ZodCUID",(e,n)=>{n.pattern??(n.pattern=B2),lt.init(e,n)}),zA=Z("$ZodCUID2",(e,n)=>{n.pattern??(n.pattern=L2),lt.init(e,n)}),CA=Z("$ZodULID",(e,n)=>{n.pattern??(n.pattern=q2),lt.init(e,n)}),TA=Z("$ZodXID",(e,n)=>{n.pattern??(n.pattern=$2),lt.init(e,n)}),EA=Z("$ZodKSUID",(e,n)=>{n.pattern??(n.pattern=U2),lt.init(e,n)}),OA=Z("$ZodISODateTime",(e,n)=>{n.pattern??(n.pattern=tA(n)),lt.init(e,n)}),DA=Z("$ZodISODate",(e,n)=>{n.pattern??(n.pattern=W2),lt.init(e,n)}),RA=Z("$ZodISOTime",(e,n)=>{n.pattern??(n.pattern=eA(n)),lt.init(e,n)}),MA=Z("$ZodISODuration",(e,n)=>{n.pattern??(n.pattern=G2),lt.init(e,n)}),BA=Z("$ZodIPv4",(e,n)=>{n.pattern??(n.pattern=K2),lt.init(e,n),e._zod.bag.format="ipv4"}),LA=Z("$ZodIPv6",(e,n)=>{n.pattern??(n.pattern=Q2),lt.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})}}}),qA=Z("$ZodCIDRv4",(e,n)=>{n.pattern??(n.pattern=Y2),lt.init(e,n)}),$A=Z("$ZodCIDRv6",(e,n)=>{n.pattern??(n.pattern=X2),lt.init(e,n),e._zod.check=i=>{const r=i.value.split("/");try{if(r.length!==2)throw new Error;const[l,c]=r;if(!c)throw new Error;const d=Number(c);if(`${d}`!==c)throw new Error;if(d<0||d>128)throw new Error;new URL(`http://[${l}]`)}catch{i.issues.push({code:"invalid_format",format:"cidrv6",input:i.value,inst:e,continue:!n.abort})}}});function Lv(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const UA=Z("$ZodBase64",(e,n)=>{n.pattern??(n.pattern=J2),lt.init(e,n),e._zod.bag.contentEncoding="base64",e._zod.check=i=>{Lv(i.value)||i.issues.push({code:"invalid_format",format:"base64",input:i.value,inst:e,continue:!n.abort})}});function VA(e){if(!Tv.test(e))return!1;const n=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),i=n.padEnd(Math.ceil(n.length/4)*4,"=");return Lv(i)}const GA=Z("$ZodBase64URL",(e,n)=>{n.pattern??(n.pattern=Tv),lt.init(e,n),e._zod.bag.contentEncoding="base64url",e._zod.check=i=>{VA(i.value)||i.issues.push({code:"invalid_format",format:"base64url",input:i.value,inst:e,continue:!n.abort})}}),IA=Z("$ZodE164",(e,n)=>{n.pattern??(n.pattern=F2),lt.init(e,n)});function HA(e,n=null){try{const i=e.split(".");if(i.length!==3)return!1;const[r]=i;if(!r)return!1;const l=JSON.parse(atob(r));return!("typ"in l&&l?.typ!=="JWT"||!l.alg||n&&(!("alg"in l)||l.alg!==n))}catch{return!1}}const ZA=Z("$ZodJWT",(e,n)=>{lt.init(e,n),e._zod.check=i=>{HA(i.value,n.alg)||i.issues.push({code:"invalid_format",format:"jwt",input:i.value,inst:e,continue:!n.abort})}}),qv=Z("$ZodNumber",(e,n)=>{ct.init(e,n),e._zod.pattern=e._zod.bag.pattern??Dv,e._zod.parse=(i,r)=>{if(n.coerce)try{i.value=Number(i.value)}catch{}const l=i.value;if(typeof l=="number"&&!Number.isNaN(l)&&Number.isFinite(l))return i;const c=typeof l=="number"?Number.isNaN(l)?"NaN":Number.isFinite(l)?void 0:"Infinity":void 0;return i.issues.push({expected:"number",code:"invalid_type",input:l,inst:e,...c?{received:c}:{}}),i}}),PA=Z("$ZodNumberFormat",(e,n)=>{lA.init(e,n),qv.init(e,n)}),KA=Z("$ZodBoolean",(e,n)=>{ct.init(e,n),e._zod.pattern=iA,e._zod.parse=(i,r)=>{if(n.coerce)try{i.value=!!i.value}catch{}const l=i.value;return typeof l=="boolean"||i.issues.push({expected:"boolean",code:"invalid_type",input:l,inst:e}),i}}),QA=Z("$ZodUnknown",(e,n)=>{ct.init(e,n),e._zod.parse=i=>i}),YA=Z("$ZodNever",(e,n)=>{ct.init(e,n),e._zod.parse=(i,r)=>(i.issues.push({expected:"never",code:"invalid_type",input:i.value,inst:e}),i)});function Iy(e,n,i){e.issues.length&&n.issues.push(...Cs(i,e.issues)),n.value[i]=e.value}const XA=Z("$ZodArray",(e,n)=>{ct.init(e,n),e._zod.parse=(i,r)=>{const l=i.value;if(!Array.isArray(l))return i.issues.push({expected:"array",code:"invalid_type",input:l,inst:e}),i;i.value=Array(l.length);const c=[];for(let d=0;d<l.length;d++){const m=l[d],g=n.element._zod.run({value:m,issues:[]},r);g instanceof Promise?c.push(g.then(b=>Iy(b,i,d))):Iy(g,i,d)}return c.length?Promise.all(c).then(()=>i):i}});function ec(e,n,i,r,l){if(e.issues.length){if(l&&!(i in r))return;n.issues.push(...Cs(i,e.issues))}e.value===void 0?i in r&&(n.value[i]=void 0):n.value[i]=e.value}function $v(e){const n=Object.keys(e.shape);for(const r of n)if(!e.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);const i=h2(e.shape);return{...e,keys:n,keySet:new Set(n),numKeys:n.length,optionalKeys:new Set(i)}}function Uv(e,n,i,r,l,c){const d=[],m=l.keySet,g=l.catchall._zod,b=g.def.type,v=g.optout==="optional";for(const S in n){if(m.has(S))continue;if(b==="never"){d.push(S);continue}const w=g.run({value:n[S],issues:[]},r);w instanceof Promise?e.push(w.then(_=>ec(_,i,S,n,v))):ec(w,i,S,n,v)}return d.length&&i.issues.push({code:"unrecognized_keys",keys:d,input:n,inst:c}),e.length?Promise.all(e).then(()=>i):i}const JA=Z("$ZodObject",(e,n)=>{if(ct.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 r=pc(()=>$v(n));He(e._zod,"propValues",()=>{const m=n.shape,g={};for(const b in m){const v=m[b]._zod;if(v.values){g[b]??(g[b]=new Set);for(const S of v.values)g[b].add(S)}}return g});const l=so,c=n.catchall;let d;e._zod.parse=(m,g)=>{d??(d=r.value);const b=m.value;if(!l(b))return m.issues.push({expected:"object",code:"invalid_type",input:b,inst:e}),m;m.value={};const v=[],S=d.shape;for(const w of d.keys){const _=S[w],C=_._zod.optout==="optional",N=_._zod.run({value:b[w],issues:[]},g);N instanceof Promise?v.push(N.then(T=>ec(T,m,w,b,C))):ec(N,m,w,b,C)}return c?Uv(v,b,m,g,r.value,e):v.length?Promise.all(v).then(()=>m):m}}),FA=Z("$ZodObjectJIT",(e,n)=>{JA.init(e,n);const i=e._zod.parse,r=pc(()=>$v(n)),l=w=>{const _=new vA(["shape","payload","ctx"]),C=r.value,N=H=>{const K=Vy(H);return`shape[${K}]._zod.run({ value: input[${K}], issues: [] }, ctx)`};_.write("const input = payload.value;");const T=Object.create(null);let R=0;for(const H of C.keys)T[H]=`key_${R++}`;_.write("const newResult = {};");for(const H of C.keys){const K=T[H],X=Vy(H),D=w[H]?._zod?.optout==="optional";_.write(`const ${K} = ${N(H)};`),D?_.write(`
17
17
  if (${K}.issues.length) {
18
18
  if (${X} in input) {
19
19
  payload.issues = payload.issues.concat(${K}.issues.map(iss => ({
@@ -47,22 +47,22 @@ Error generating stack: `+o.message+`
47
47
  newResult[${X}] = ${K}.value;
48
48
  }
49
49
 
50
- `)}_.write("payload.value = newResult;"),_.write("return payload;");const G=_.compile();return(H,K)=>G(w,H,K)};let c;const d=so,m=!jv.jitless,b=m&&p2.value,v=n.catchall;let S;e._zod.parse=(w,_)=>{S??(S=r.value);const C=w.value;return d(C)?m&&b&&_?.async===!1&&_.jitless!==!0?(c||(c=l(n.shape)),w=c(w,_),v?$v([],C,w,_,S,e):w):i(w,_):(w.issues.push({expected:"object",code:"invalid_type",input:C,inst:e}),w)}});function Hy(e,n,i,r){for(const c of e)if(c.issues.length===0)return n.value=c.value,n;const l=e.filter(c=>!zs(c));return l.length===1?(n.value=l[0].value,l[0]):(n.issues.push({code:"invalid_union",input:n.value,inst:i,errors:e.map(c=>c.issues.map(d=>Pa(d,r,Za())))}),n)}const Vv=Z("$ZodUnion",(e,n)=>{ct.init(e,n),He(e._zod,"optin",()=>n.options.some(l=>l._zod.optin==="optional")?"optional":void 0),He(e._zod,"optout",()=>n.options.some(l=>l._zod.optout==="optional")?"optional":void 0),He(e._zod,"values",()=>{if(n.options.every(l=>l._zod.values))return new Set(n.options.flatMap(l=>Array.from(l._zod.values)))}),He(e._zod,"pattern",()=>{if(n.options.every(l=>l._zod.pattern)){const l=n.options.map(c=>c._zod.pattern);return new RegExp(`^(${l.map(c=>Gf(c.source)).join("|")})$`)}});const i=n.options.length===1,r=n.options[0]._zod.run;e._zod.parse=(l,c)=>{if(i)return r(l,c);let d=!1;const m=[];for(const g of n.options){const b=g._zod.run({value:l.value,issues:[]},c);if(b instanceof Promise)m.push(b),d=!0;else{if(b.issues.length===0)return b;m.push(b)}}return d?Promise.all(m).then(g=>Hy(g,l,e,c)):Hy(m,l,e,c)}}),WA=Z("$ZodDiscriminatedUnion",(e,n)=>{n.inclusive=!1,Vv.init(e,n);const i=e._zod.parse;He(e._zod,"propValues",()=>{const l={};for(const c of n.options){const d=c._zod.propValues;if(!d||Object.keys(d).length===0)throw new Error(`Invalid discriminated union option at index "${n.options.indexOf(c)}"`);for(const[m,g]of Object.entries(d)){l[m]||(l[m]=new Set);for(const b of g)l[m].add(b)}}return l});const r=pc(()=>{const l=n.options,c=new Map;for(const d of l){const m=d._zod.propValues?.[n.discriminator];if(!m||m.size===0)throw new Error(`Invalid discriminated union option at index "${n.options.indexOf(d)}"`);for(const g of m){if(c.has(g))throw new Error(`Duplicate discriminator value "${String(g)}"`);c.set(g,d)}}return c});e._zod.parse=(l,c)=>{const d=l.value;if(!so(d))return l.issues.push({code:"invalid_type",expected:"object",input:d,inst:e}),l;const m=r.value.get(d?.[n.discriminator]);return m?m._zod.run(l,c):n.unionFallback?i(l,c):(l.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:n.discriminator,input:d,path:[n.discriminator],inst:e}),l)}}),e_=Z("$ZodIntersection",(e,n)=>{ct.init(e,n),e._zod.parse=(i,r)=>{const l=i.value,c=n.left._zod.run({value:l,issues:[]},r),d=n.right._zod.run({value:l,issues:[]},r);return c instanceof Promise||d instanceof Promise?Promise.all([c,d]).then(([g,b])=>Zy(i,g,b)):Zy(i,c,d)}});function bf(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(Ls(e)&&Ls(n)){const i=Object.keys(n),r=Object.keys(e).filter(c=>i.indexOf(c)!==-1),l={...e,...n};for(const c of r){const d=bf(e[c],n[c]);if(!d.valid)return{valid:!1,mergeErrorPath:[c,...d.mergeErrorPath]};l[c]=d.data}return{valid:!0,data:l}}if(Array.isArray(e)&&Array.isArray(n)){if(e.length!==n.length)return{valid:!1,mergeErrorPath:[]};const i=[];for(let r=0;r<e.length;r++){const l=e[r],c=n[r],d=bf(l,c);if(!d.valid)return{valid:!1,mergeErrorPath:[r,...d.mergeErrorPath]};i.push(d.data)}return{valid:!0,data:i}}return{valid:!1,mergeErrorPath:[]}}function Zy(e,n,i){const r=new Map;let l;for(const m of n.issues)if(m.code==="unrecognized_keys"){l??(l=m);for(const g of m.keys)r.has(g)||r.set(g,{}),r.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)r.has(g)||r.set(g,{}),r.get(g).r=!0;else e.issues.push(m);const c=[...r].filter(([,m])=>m.l&&m.r).map(([m])=>m);if(c.length&&l&&e.issues.push({...l,keys:c}),zs(e))return e;const d=bf(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 t_=Z("$ZodRecord",(e,n)=>{ct.init(e,n),e._zod.parse=(i,r)=>{const l=i.value;if(!Ls(l))return i.issues.push({expected:"record",code:"invalid_type",input:l,inst:e}),i;const c=[],d=n.keyType._zod.values;if(d){i.value={};const m=new Set;for(const b of d)if(typeof b=="string"||typeof b=="number"||typeof b=="symbol"){m.add(typeof b=="number"?b.toString():b);const v=n.valueType._zod.run({value:l[b],issues:[]},r);v instanceof Promise?c.push(v.then(S=>{S.issues.length&&i.issues.push(...Cs(b,S.issues)),i.value[b]=S.value})):(v.issues.length&&i.issues.push(...Cs(b,v.issues)),i.value[b]=v.value)}let g;for(const b in l)m.has(b)||(g=g??[],g.push(b));g&&g.length>0&&i.issues.push({code:"unrecognized_keys",input:l,inst:e,keys:g})}else{i.value={};for(const m of Reflect.ownKeys(l)){if(m==="__proto__")continue;let g=n.keyType._zod.run({value:m,issues:[]},r);if(g instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof m=="string"&&Dv.test(m)&&g.issues.length){const S=n.keyType._zod.run({value:Number(m),issues:[]},r);if(S instanceof Promise)throw new Error("Async schemas not supported in object keys currently");S.issues.length===0&&(g=S)}if(g.issues.length){n.mode==="loose"?i.value[m]=l[m]:i.issues.push({code:"invalid_key",origin:"record",issues:g.issues.map(S=>Pa(S,r,Za())),input:m,path:[m],inst:e});continue}const v=n.valueType._zod.run({value:l[m],issues:[]},r);v instanceof Promise?c.push(v.then(S=>{S.issues.length&&i.issues.push(...Cs(m,S.issues)),i.value[g.value]=S.value})):(v.issues.length&&i.issues.push(...Cs(m,v.issues)),i.value[g.value]=v.value)}}return c.length?Promise.all(c).then(()=>i):i}}),n_=Z("$ZodEnum",(e,n)=>{ct.init(e,n);const i=Nv(n.entries),r=new Set(i);e._zod.values=r,e._zod.pattern=new RegExp(`^(${i.filter(l=>m2.has(typeof l)).map(l=>typeof l=="string"?qs(l):l.toString()).join("|")})$`),e._zod.parse=(l,c)=>{const d=l.value;return r.has(d)||l.issues.push({code:"invalid_value",values:i,input:d,inst:e}),l}}),a_=Z("$ZodLiteral",(e,n)=>{if(ct.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(r=>typeof r=="string"?qs(r):r?qs(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,l)=>{const c=r.value;return i.has(c)||r.issues.push({code:"invalid_value",values:n.values,input:c,inst:e}),r}}),i_=Z("$ZodTransform",(e,n)=>{ct.init(e,n),e._zod.parse=(i,r)=>{if(r.direction==="backward")throw new wv(e.constructor.name);const l=n.transform(i.value,i);if(r.async)return(l instanceof Promise?l:Promise.resolve(l)).then(d=>(i.value=d,i));if(l instanceof Promise)throw new Ds;return i.value=l,i}});function Py(e,n){return e.issues.length&&n===void 0?{issues:[],value:void 0}:e}const Gv=Z("$ZodOptional",(e,n)=>{ct.init(e,n),e._zod.optin="optional",e._zod.optout="optional",He(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,void 0]):void 0),He(e._zod,"pattern",()=>{const i=n.innerType._zod.pattern;return i?new RegExp(`^(${Gf(i.source)})?$`):void 0}),e._zod.parse=(i,r)=>{if(n.innerType._zod.optin==="optional"){const l=n.innerType._zod.run(i,r);return l instanceof Promise?l.then(c=>Py(c,i.value)):Py(l,i.value)}return i.value===void 0?i:n.innerType._zod.run(i,r)}}),s_=Z("$ZodExactOptional",(e,n)=>{Gv.init(e,n),He(e._zod,"values",()=>n.innerType._zod.values),He(e._zod,"pattern",()=>n.innerType._zod.pattern),e._zod.parse=(i,r)=>n.innerType._zod.run(i,r)}),r_=Z("$ZodNullable",(e,n)=>{ct.init(e,n),He(e._zod,"optin",()=>n.innerType._zod.optin),He(e._zod,"optout",()=>n.innerType._zod.optout),He(e._zod,"pattern",()=>{const i=n.innerType._zod.pattern;return i?new RegExp(`^(${Gf(i.source)}|null)$`):void 0}),He(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,null]):void 0),e._zod.parse=(i,r)=>i.value===null?i:n.innerType._zod.run(i,r)}),o_=Z("$ZodDefault",(e,n)=>{ct.init(e,n),e._zod.optin="optional",He(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(i,r)=>{if(r.direction==="backward")return n.innerType._zod.run(i,r);if(i.value===void 0)return i.value=n.defaultValue,i;const l=n.innerType._zod.run(i,r);return l instanceof Promise?l.then(c=>Ky(c,n)):Ky(l,n)}});function Ky(e,n){return e.value===void 0&&(e.value=n.defaultValue),e}const l_=Z("$ZodPrefault",(e,n)=>{ct.init(e,n),e._zod.optin="optional",He(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(i,r)=>(r.direction==="backward"||i.value===void 0&&(i.value=n.defaultValue),n.innerType._zod.run(i,r))}),c_=Z("$ZodNonOptional",(e,n)=>{ct.init(e,n),He(e._zod,"values",()=>{const i=n.innerType._zod.values;return i?new Set([...i].filter(r=>r!==void 0)):void 0}),e._zod.parse=(i,r)=>{const l=n.innerType._zod.run(i,r);return l instanceof Promise?l.then(c=>Qy(c,e)):Qy(l,e)}});function Qy(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 u_=Z("$ZodCatch",(e,n)=>{ct.init(e,n),He(e._zod,"optin",()=>n.innerType._zod.optin),He(e._zod,"optout",()=>n.innerType._zod.optout),He(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(i,r)=>{if(r.direction==="backward")return n.innerType._zod.run(i,r);const l=n.innerType._zod.run(i,r);return l instanceof Promise?l.then(c=>(i.value=c.value,c.issues.length&&(i.value=n.catchValue({...i,error:{issues:c.issues.map(d=>Pa(d,r,Za()))},input:i.value}),i.issues=[]),i)):(i.value=l.value,l.issues.length&&(i.value=n.catchValue({...i,error:{issues:l.issues.map(c=>Pa(c,r,Za()))},input:i.value}),i.issues=[]),i)}}),d_=Z("$ZodPipe",(e,n)=>{ct.init(e,n),He(e._zod,"values",()=>n.in._zod.values),He(e._zod,"optin",()=>n.in._zod.optin),He(e._zod,"optout",()=>n.out._zod.optout),He(e._zod,"propValues",()=>n.in._zod.propValues),e._zod.parse=(i,r)=>{if(r.direction==="backward"){const c=n.out._zod.run(i,r);return c instanceof Promise?c.then(d=>Bl(d,n.in,r)):Bl(c,n.in,r)}const l=n.in._zod.run(i,r);return l instanceof Promise?l.then(c=>Bl(c,n.out,r)):Bl(l,n.out,r)}});function Bl(e,n,i){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:e.value,issues:e.issues},i)}const f_=Z("$ZodReadonly",(e,n)=>{ct.init(e,n),He(e._zod,"propValues",()=>n.innerType._zod.propValues),He(e._zod,"values",()=>n.innerType._zod.values),He(e._zod,"optin",()=>n.innerType?._zod?.optin),He(e._zod,"optout",()=>n.innerType?._zod?.optout),e._zod.parse=(i,r)=>{if(r.direction==="backward")return n.innerType._zod.run(i,r);const l=n.innerType._zod.run(i,r);return l instanceof Promise?l.then(Yy):Yy(l)}});function Yy(e){return e.value=Object.freeze(e.value),e}const p_=Z("$ZodCustom",(e,n)=>{en.init(e,n),ct.init(e,n),e._zod.parse=(i,r)=>i,e._zod.check=i=>{const r=i.value,l=n.fn(r);if(l instanceof Promise)return l.then(c=>Xy(c,i,r,e));Xy(l,i,r,e)}});function Xy(e,n,i,r){if(!e){const l={code:"custom",input:i,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(l.params=r._zod.def.params),n.issues.push(ro(l))}}var Jy;class m_{constructor(){this._map=new WeakMap,this._idmap=new Map}add(n,...i){const r=i[0];return this._map.set(n,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.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 r={...this.get(i)??{}};delete r.id;const l={...r,...this._map.get(n)};return Object.keys(l).length?l:void 0}return this._map.get(n)}has(n){return this._map.has(n)}}function h_(){return new m_}(Jy=globalThis).__zod_globalRegistry??(Jy.__zod_globalRegistry=h_());const eo=globalThis.__zod_globalRegistry;function g_(e,n){return new e({type:"string",...be(n)})}function y_(e,n){return new e({type:"string",format:"email",check:"string_format",abort:!1,...be(n)})}function Fy(e,n){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...be(n)})}function b_(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...be(n)})}function v_(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...be(n)})}function S_(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...be(n)})}function x_(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...be(n)})}function w_(e,n){return new e({type:"string",format:"url",check:"string_format",abort:!1,...be(n)})}function j_(e,n){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...be(n)})}function N_(e,n){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...be(n)})}function k_(e,n){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...be(n)})}function A_(e,n){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...be(n)})}function __(e,n){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...be(n)})}function z_(e,n){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...be(n)})}function C_(e,n){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...be(n)})}function T_(e,n){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...be(n)})}function E_(e,n){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...be(n)})}function O_(e,n){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...be(n)})}function D_(e,n){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...be(n)})}function R_(e,n){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...be(n)})}function M_(e,n){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...be(n)})}function B_(e,n){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...be(n)})}function L_(e,n){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...be(n)})}function q_(e,n){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...be(n)})}function U_(e,n){return new e({type:"string",format:"date",check:"string_format",...be(n)})}function $_(e,n){return new e({type:"string",format:"time",check:"string_format",precision:null,...be(n)})}function V_(e,n){return new e({type:"string",format:"duration",check:"string_format",...be(n)})}function G_(e,n){return new e({type:"number",checks:[],...be(n)})}function I_(e,n){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...be(n)})}function H_(e,n){return new e({type:"boolean",...be(n)})}function Z_(e){return new e({type:"unknown"})}function P_(e,n){return new e({type:"never",...be(n)})}function Wy(e,n){return new Mv({check:"less_than",...be(n),value:e,inclusive:!1})}function Wd(e,n){return new Mv({check:"less_than",...be(n),value:e,inclusive:!0})}function eb(e,n){return new Bv({check:"greater_than",...be(n),value:e,inclusive:!1})}function ef(e,n){return new Bv({check:"greater_than",...be(n),value:e,inclusive:!0})}function tb(e,n){return new oA({check:"multiple_of",...be(n),value:e})}function Iv(e,n){return new cA({check:"max_length",...be(n),maximum:e})}function tc(e,n){return new uA({check:"min_length",...be(n),minimum:e})}function Hv(e,n){return new dA({check:"length_equals",...be(n),length:e})}function K_(e,n){return new fA({check:"string_format",format:"regex",...be(n),pattern:e})}function Q_(e){return new pA({check:"string_format",format:"lowercase",...be(e)})}function Y_(e){return new mA({check:"string_format",format:"uppercase",...be(e)})}function X_(e,n){return new hA({check:"string_format",format:"includes",...be(n),includes:e})}function J_(e,n){return new gA({check:"string_format",format:"starts_with",...be(n),prefix:e})}function F_(e,n){return new yA({check:"string_format",format:"ends_with",...be(n),suffix:e})}function Zs(e){return new bA({check:"overwrite",tx:e})}function W_(e){return Zs(n=>n.normalize(e))}function ez(){return Zs(e=>e.trim())}function tz(){return Zs(e=>e.toLowerCase())}function nz(){return Zs(e=>e.toUpperCase())}function az(){return Zs(e=>f2(e))}function iz(e,n,i){return new e({type:"array",element:n,...be(i)})}function sz(e,n,i){return new e({type:"custom",check:"custom",fn:n,...be(i)})}function rz(e){const n=oz(i=>(i.addIssue=r=>{if(typeof r=="string")i.issues.push(ro(r,i.value,n._zod.def));else{const l=r;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),l.input??(l.input=i.value),l.inst??(l.inst=n),l.continue??(l.continue=!n._zod.def.abort),i.issues.push(ro(l))}},e(i.value,i)));return n}function oz(e,n){const i=new en({check:"custom",...be(n)});return i._zod.check=e,i}function Zv(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??eo,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 Nt(e,n,i={path:[],schemaPath:[]}){var r;const l=e._zod.def,c=n.seen.get(e);if(c)return c.count++,i.schemaPath.includes(e)&&(c.cycle=i.path),c.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 v={...i,schemaPath:[...i.schemaPath,e],path:i.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(n,d.schema,v);else{const w=d.schema,_=n.processors[l.type];if(!_)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${l.type}`);_(e,n,w,v)}const S=e._zod.parent;S&&(d.ref||(d.ref=S),Nt(S,n,v),n.seen.get(S).isParent=!0)}const g=n.metadataRegistry.get(e);return g&&Object.assign(d.schema,g),n.io==="input"&&Vt(e)&&(delete d.schema.examples,delete d.schema.default),n.io==="input"&&d.schema._prefault&&((r=d.schema).default??(r.default=d.schema._prefault)),delete d.schema._prefault,n.seen.get(e).schema}function Pv(e,n){const i=e.seen.get(n);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const d of e.seen.entries()){const m=e.metadataRegistry.get(d[0])?.id;if(m){const g=r.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.`);r.set(m,d[0])}}const l=d=>{const m=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const S=e.external.registry.get(d[0])?.id,w=e.external.uri??(C=>C);if(S)return{ref:w(S)};const _=d[1].defId??d[1].schema.id??`schema${e.counter++}`;return d[1].defId=_,{defId:_,ref:`${w("__shared")}#/${m}/${_}`}}if(d[1]===i)return{ref:"#"};const b=`#/${m}/`,v=d[1].schema.id??`__schema${e.counter++}`;return{defId:v,ref:b+v}},c=d=>{if(d[1].schema.$ref)return;const m=d[1],{ref:g,defId:b}=l(d);m.def={...m.schema},b&&(m.defId=b);const v=m.schema;for(const S in v)delete v[S];v.$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>
50
+ `)}_.write("payload.value = newResult;"),_.write("return payload;");const G=_.compile();return(H,K)=>G(w,H,K)};let c;const d=so,m=!jv.jitless,b=m&&p2.value,v=n.catchall;let S;e._zod.parse=(w,_)=>{S??(S=r.value);const C=w.value;return d(C)?m&&b&&_?.async===!1&&_.jitless!==!0?(c||(c=l(n.shape)),w=c(w,_),v?Uv([],C,w,_,S,e):w):i(w,_):(w.issues.push({expected:"object",code:"invalid_type",input:C,inst:e}),w)}});function Hy(e,n,i,r){for(const c of e)if(c.issues.length===0)return n.value=c.value,n;const l=e.filter(c=>!zs(c));return l.length===1?(n.value=l[0].value,l[0]):(n.issues.push({code:"invalid_union",input:n.value,inst:i,errors:e.map(c=>c.issues.map(d=>Pa(d,r,Za())))}),n)}const Vv=Z("$ZodUnion",(e,n)=>{ct.init(e,n),He(e._zod,"optin",()=>n.options.some(l=>l._zod.optin==="optional")?"optional":void 0),He(e._zod,"optout",()=>n.options.some(l=>l._zod.optout==="optional")?"optional":void 0),He(e._zod,"values",()=>{if(n.options.every(l=>l._zod.values))return new Set(n.options.flatMap(l=>Array.from(l._zod.values)))}),He(e._zod,"pattern",()=>{if(n.options.every(l=>l._zod.pattern)){const l=n.options.map(c=>c._zod.pattern);return new RegExp(`^(${l.map(c=>Gf(c.source)).join("|")})$`)}});const i=n.options.length===1,r=n.options[0]._zod.run;e._zod.parse=(l,c)=>{if(i)return r(l,c);let d=!1;const m=[];for(const g of n.options){const b=g._zod.run({value:l.value,issues:[]},c);if(b instanceof Promise)m.push(b),d=!0;else{if(b.issues.length===0)return b;m.push(b)}}return d?Promise.all(m).then(g=>Hy(g,l,e,c)):Hy(m,l,e,c)}}),WA=Z("$ZodDiscriminatedUnion",(e,n)=>{n.inclusive=!1,Vv.init(e,n);const i=e._zod.parse;He(e._zod,"propValues",()=>{const l={};for(const c of n.options){const d=c._zod.propValues;if(!d||Object.keys(d).length===0)throw new Error(`Invalid discriminated union option at index "${n.options.indexOf(c)}"`);for(const[m,g]of Object.entries(d)){l[m]||(l[m]=new Set);for(const b of g)l[m].add(b)}}return l});const r=pc(()=>{const l=n.options,c=new Map;for(const d of l){const m=d._zod.propValues?.[n.discriminator];if(!m||m.size===0)throw new Error(`Invalid discriminated union option at index "${n.options.indexOf(d)}"`);for(const g of m){if(c.has(g))throw new Error(`Duplicate discriminator value "${String(g)}"`);c.set(g,d)}}return c});e._zod.parse=(l,c)=>{const d=l.value;if(!so(d))return l.issues.push({code:"invalid_type",expected:"object",input:d,inst:e}),l;const m=r.value.get(d?.[n.discriminator]);return m?m._zod.run(l,c):n.unionFallback?i(l,c):(l.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:n.discriminator,input:d,path:[n.discriminator],inst:e}),l)}}),e_=Z("$ZodIntersection",(e,n)=>{ct.init(e,n),e._zod.parse=(i,r)=>{const l=i.value,c=n.left._zod.run({value:l,issues:[]},r),d=n.right._zod.run({value:l,issues:[]},r);return c instanceof Promise||d instanceof Promise?Promise.all([c,d]).then(([g,b])=>Zy(i,g,b)):Zy(i,c,d)}});function bf(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(Ls(e)&&Ls(n)){const i=Object.keys(n),r=Object.keys(e).filter(c=>i.indexOf(c)!==-1),l={...e,...n};for(const c of r){const d=bf(e[c],n[c]);if(!d.valid)return{valid:!1,mergeErrorPath:[c,...d.mergeErrorPath]};l[c]=d.data}return{valid:!0,data:l}}if(Array.isArray(e)&&Array.isArray(n)){if(e.length!==n.length)return{valid:!1,mergeErrorPath:[]};const i=[];for(let r=0;r<e.length;r++){const l=e[r],c=n[r],d=bf(l,c);if(!d.valid)return{valid:!1,mergeErrorPath:[r,...d.mergeErrorPath]};i.push(d.data)}return{valid:!0,data:i}}return{valid:!1,mergeErrorPath:[]}}function Zy(e,n,i){const r=new Map;let l;for(const m of n.issues)if(m.code==="unrecognized_keys"){l??(l=m);for(const g of m.keys)r.has(g)||r.set(g,{}),r.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)r.has(g)||r.set(g,{}),r.get(g).r=!0;else e.issues.push(m);const c=[...r].filter(([,m])=>m.l&&m.r).map(([m])=>m);if(c.length&&l&&e.issues.push({...l,keys:c}),zs(e))return e;const d=bf(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 t_=Z("$ZodRecord",(e,n)=>{ct.init(e,n),e._zod.parse=(i,r)=>{const l=i.value;if(!Ls(l))return i.issues.push({expected:"record",code:"invalid_type",input:l,inst:e}),i;const c=[],d=n.keyType._zod.values;if(d){i.value={};const m=new Set;for(const b of d)if(typeof b=="string"||typeof b=="number"||typeof b=="symbol"){m.add(typeof b=="number"?b.toString():b);const v=n.valueType._zod.run({value:l[b],issues:[]},r);v instanceof Promise?c.push(v.then(S=>{S.issues.length&&i.issues.push(...Cs(b,S.issues)),i.value[b]=S.value})):(v.issues.length&&i.issues.push(...Cs(b,v.issues)),i.value[b]=v.value)}let g;for(const b in l)m.has(b)||(g=g??[],g.push(b));g&&g.length>0&&i.issues.push({code:"unrecognized_keys",input:l,inst:e,keys:g})}else{i.value={};for(const m of Reflect.ownKeys(l)){if(m==="__proto__")continue;let g=n.keyType._zod.run({value:m,issues:[]},r);if(g instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof m=="string"&&Dv.test(m)&&g.issues.length){const S=n.keyType._zod.run({value:Number(m),issues:[]},r);if(S instanceof Promise)throw new Error("Async schemas not supported in object keys currently");S.issues.length===0&&(g=S)}if(g.issues.length){n.mode==="loose"?i.value[m]=l[m]:i.issues.push({code:"invalid_key",origin:"record",issues:g.issues.map(S=>Pa(S,r,Za())),input:m,path:[m],inst:e});continue}const v=n.valueType._zod.run({value:l[m],issues:[]},r);v instanceof Promise?c.push(v.then(S=>{S.issues.length&&i.issues.push(...Cs(m,S.issues)),i.value[g.value]=S.value})):(v.issues.length&&i.issues.push(...Cs(m,v.issues)),i.value[g.value]=v.value)}}return c.length?Promise.all(c).then(()=>i):i}}),n_=Z("$ZodEnum",(e,n)=>{ct.init(e,n);const i=Nv(n.entries),r=new Set(i);e._zod.values=r,e._zod.pattern=new RegExp(`^(${i.filter(l=>m2.has(typeof l)).map(l=>typeof l=="string"?qs(l):l.toString()).join("|")})$`),e._zod.parse=(l,c)=>{const d=l.value;return r.has(d)||l.issues.push({code:"invalid_value",values:i,input:d,inst:e}),l}}),a_=Z("$ZodLiteral",(e,n)=>{if(ct.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(r=>typeof r=="string"?qs(r):r?qs(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,l)=>{const c=r.value;return i.has(c)||r.issues.push({code:"invalid_value",values:n.values,input:c,inst:e}),r}}),i_=Z("$ZodTransform",(e,n)=>{ct.init(e,n),e._zod.parse=(i,r)=>{if(r.direction==="backward")throw new wv(e.constructor.name);const l=n.transform(i.value,i);if(r.async)return(l instanceof Promise?l:Promise.resolve(l)).then(d=>(i.value=d,i));if(l instanceof Promise)throw new Ds;return i.value=l,i}});function Py(e,n){return e.issues.length&&n===void 0?{issues:[],value:void 0}:e}const Gv=Z("$ZodOptional",(e,n)=>{ct.init(e,n),e._zod.optin="optional",e._zod.optout="optional",He(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,void 0]):void 0),He(e._zod,"pattern",()=>{const i=n.innerType._zod.pattern;return i?new RegExp(`^(${Gf(i.source)})?$`):void 0}),e._zod.parse=(i,r)=>{if(n.innerType._zod.optin==="optional"){const l=n.innerType._zod.run(i,r);return l instanceof Promise?l.then(c=>Py(c,i.value)):Py(l,i.value)}return i.value===void 0?i:n.innerType._zod.run(i,r)}}),s_=Z("$ZodExactOptional",(e,n)=>{Gv.init(e,n),He(e._zod,"values",()=>n.innerType._zod.values),He(e._zod,"pattern",()=>n.innerType._zod.pattern),e._zod.parse=(i,r)=>n.innerType._zod.run(i,r)}),r_=Z("$ZodNullable",(e,n)=>{ct.init(e,n),He(e._zod,"optin",()=>n.innerType._zod.optin),He(e._zod,"optout",()=>n.innerType._zod.optout),He(e._zod,"pattern",()=>{const i=n.innerType._zod.pattern;return i?new RegExp(`^(${Gf(i.source)}|null)$`):void 0}),He(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,null]):void 0),e._zod.parse=(i,r)=>i.value===null?i:n.innerType._zod.run(i,r)}),o_=Z("$ZodDefault",(e,n)=>{ct.init(e,n),e._zod.optin="optional",He(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(i,r)=>{if(r.direction==="backward")return n.innerType._zod.run(i,r);if(i.value===void 0)return i.value=n.defaultValue,i;const l=n.innerType._zod.run(i,r);return l instanceof Promise?l.then(c=>Ky(c,n)):Ky(l,n)}});function Ky(e,n){return e.value===void 0&&(e.value=n.defaultValue),e}const l_=Z("$ZodPrefault",(e,n)=>{ct.init(e,n),e._zod.optin="optional",He(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(i,r)=>(r.direction==="backward"||i.value===void 0&&(i.value=n.defaultValue),n.innerType._zod.run(i,r))}),c_=Z("$ZodNonOptional",(e,n)=>{ct.init(e,n),He(e._zod,"values",()=>{const i=n.innerType._zod.values;return i?new Set([...i].filter(r=>r!==void 0)):void 0}),e._zod.parse=(i,r)=>{const l=n.innerType._zod.run(i,r);return l instanceof Promise?l.then(c=>Qy(c,e)):Qy(l,e)}});function Qy(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 u_=Z("$ZodCatch",(e,n)=>{ct.init(e,n),He(e._zod,"optin",()=>n.innerType._zod.optin),He(e._zod,"optout",()=>n.innerType._zod.optout),He(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(i,r)=>{if(r.direction==="backward")return n.innerType._zod.run(i,r);const l=n.innerType._zod.run(i,r);return l instanceof Promise?l.then(c=>(i.value=c.value,c.issues.length&&(i.value=n.catchValue({...i,error:{issues:c.issues.map(d=>Pa(d,r,Za()))},input:i.value}),i.issues=[]),i)):(i.value=l.value,l.issues.length&&(i.value=n.catchValue({...i,error:{issues:l.issues.map(c=>Pa(c,r,Za()))},input:i.value}),i.issues=[]),i)}}),d_=Z("$ZodPipe",(e,n)=>{ct.init(e,n),He(e._zod,"values",()=>n.in._zod.values),He(e._zod,"optin",()=>n.in._zod.optin),He(e._zod,"optout",()=>n.out._zod.optout),He(e._zod,"propValues",()=>n.in._zod.propValues),e._zod.parse=(i,r)=>{if(r.direction==="backward"){const c=n.out._zod.run(i,r);return c instanceof Promise?c.then(d=>Bl(d,n.in,r)):Bl(c,n.in,r)}const l=n.in._zod.run(i,r);return l instanceof Promise?l.then(c=>Bl(c,n.out,r)):Bl(l,n.out,r)}});function Bl(e,n,i){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:e.value,issues:e.issues},i)}const f_=Z("$ZodReadonly",(e,n)=>{ct.init(e,n),He(e._zod,"propValues",()=>n.innerType._zod.propValues),He(e._zod,"values",()=>n.innerType._zod.values),He(e._zod,"optin",()=>n.innerType?._zod?.optin),He(e._zod,"optout",()=>n.innerType?._zod?.optout),e._zod.parse=(i,r)=>{if(r.direction==="backward")return n.innerType._zod.run(i,r);const l=n.innerType._zod.run(i,r);return l instanceof Promise?l.then(Yy):Yy(l)}});function Yy(e){return e.value=Object.freeze(e.value),e}const p_=Z("$ZodCustom",(e,n)=>{en.init(e,n),ct.init(e,n),e._zod.parse=(i,r)=>i,e._zod.check=i=>{const r=i.value,l=n.fn(r);if(l instanceof Promise)return l.then(c=>Xy(c,i,r,e));Xy(l,i,r,e)}});function Xy(e,n,i,r){if(!e){const l={code:"custom",input:i,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(l.params=r._zod.def.params),n.issues.push(ro(l))}}var Jy;class m_{constructor(){this._map=new WeakMap,this._idmap=new Map}add(n,...i){const r=i[0];return this._map.set(n,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.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 r={...this.get(i)??{}};delete r.id;const l={...r,...this._map.get(n)};return Object.keys(l).length?l:void 0}return this._map.get(n)}has(n){return this._map.has(n)}}function h_(){return new m_}(Jy=globalThis).__zod_globalRegistry??(Jy.__zod_globalRegistry=h_());const eo=globalThis.__zod_globalRegistry;function g_(e,n){return new e({type:"string",...be(n)})}function y_(e,n){return new e({type:"string",format:"email",check:"string_format",abort:!1,...be(n)})}function Fy(e,n){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...be(n)})}function b_(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...be(n)})}function v_(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...be(n)})}function S_(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...be(n)})}function x_(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...be(n)})}function w_(e,n){return new e({type:"string",format:"url",check:"string_format",abort:!1,...be(n)})}function j_(e,n){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...be(n)})}function N_(e,n){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...be(n)})}function k_(e,n){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...be(n)})}function A_(e,n){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...be(n)})}function __(e,n){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...be(n)})}function z_(e,n){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...be(n)})}function C_(e,n){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...be(n)})}function T_(e,n){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...be(n)})}function E_(e,n){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...be(n)})}function O_(e,n){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...be(n)})}function D_(e,n){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...be(n)})}function R_(e,n){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...be(n)})}function M_(e,n){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...be(n)})}function B_(e,n){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...be(n)})}function L_(e,n){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...be(n)})}function q_(e,n){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...be(n)})}function $_(e,n){return new e({type:"string",format:"date",check:"string_format",...be(n)})}function U_(e,n){return new e({type:"string",format:"time",check:"string_format",precision:null,...be(n)})}function V_(e,n){return new e({type:"string",format:"duration",check:"string_format",...be(n)})}function G_(e,n){return new e({type:"number",checks:[],...be(n)})}function I_(e,n){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...be(n)})}function H_(e,n){return new e({type:"boolean",...be(n)})}function Z_(e){return new e({type:"unknown"})}function P_(e,n){return new e({type:"never",...be(n)})}function Wy(e,n){return new Mv({check:"less_than",...be(n),value:e,inclusive:!1})}function Wd(e,n){return new Mv({check:"less_than",...be(n),value:e,inclusive:!0})}function eb(e,n){return new Bv({check:"greater_than",...be(n),value:e,inclusive:!1})}function ef(e,n){return new Bv({check:"greater_than",...be(n),value:e,inclusive:!0})}function tb(e,n){return new oA({check:"multiple_of",...be(n),value:e})}function Iv(e,n){return new cA({check:"max_length",...be(n),maximum:e})}function tc(e,n){return new uA({check:"min_length",...be(n),minimum:e})}function Hv(e,n){return new dA({check:"length_equals",...be(n),length:e})}function K_(e,n){return new fA({check:"string_format",format:"regex",...be(n),pattern:e})}function Q_(e){return new pA({check:"string_format",format:"lowercase",...be(e)})}function Y_(e){return new mA({check:"string_format",format:"uppercase",...be(e)})}function X_(e,n){return new hA({check:"string_format",format:"includes",...be(n),includes:e})}function J_(e,n){return new gA({check:"string_format",format:"starts_with",...be(n),prefix:e})}function F_(e,n){return new yA({check:"string_format",format:"ends_with",...be(n),suffix:e})}function Zs(e){return new bA({check:"overwrite",tx:e})}function W_(e){return Zs(n=>n.normalize(e))}function ez(){return Zs(e=>e.trim())}function tz(){return Zs(e=>e.toLowerCase())}function nz(){return Zs(e=>e.toUpperCase())}function az(){return Zs(e=>f2(e))}function iz(e,n,i){return new e({type:"array",element:n,...be(i)})}function sz(e,n,i){return new e({type:"custom",check:"custom",fn:n,...be(i)})}function rz(e){const n=oz(i=>(i.addIssue=r=>{if(typeof r=="string")i.issues.push(ro(r,i.value,n._zod.def));else{const l=r;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),l.input??(l.input=i.value),l.inst??(l.inst=n),l.continue??(l.continue=!n._zod.def.abort),i.issues.push(ro(l))}},e(i.value,i)));return n}function oz(e,n){const i=new en({check:"custom",...be(n)});return i._zod.check=e,i}function Zv(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??eo,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 Nt(e,n,i={path:[],schemaPath:[]}){var r;const l=e._zod.def,c=n.seen.get(e);if(c)return c.count++,i.schemaPath.includes(e)&&(c.cycle=i.path),c.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 v={...i,schemaPath:[...i.schemaPath,e],path:i.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(n,d.schema,v);else{const w=d.schema,_=n.processors[l.type];if(!_)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${l.type}`);_(e,n,w,v)}const S=e._zod.parent;S&&(d.ref||(d.ref=S),Nt(S,n,v),n.seen.get(S).isParent=!0)}const g=n.metadataRegistry.get(e);return g&&Object.assign(d.schema,g),n.io==="input"&&Vt(e)&&(delete d.schema.examples,delete d.schema.default),n.io==="input"&&d.schema._prefault&&((r=d.schema).default??(r.default=d.schema._prefault)),delete d.schema._prefault,n.seen.get(e).schema}function Pv(e,n){const i=e.seen.get(n);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const d of e.seen.entries()){const m=e.metadataRegistry.get(d[0])?.id;if(m){const g=r.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.`);r.set(m,d[0])}}const l=d=>{const m=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const S=e.external.registry.get(d[0])?.id,w=e.external.uri??(C=>C);if(S)return{ref:w(S)};const _=d[1].defId??d[1].schema.id??`schema${e.counter++}`;return d[1].defId=_,{defId:_,ref:`${w("__shared")}#/${m}/${_}`}}if(d[1]===i)return{ref:"#"};const b=`#/${m}/`,v=d[1].schema.id??`__schema${e.counter++}`;return{defId:v,ref:b+v}},c=d=>{if(d[1].schema.$ref)return;const m=d[1],{ref:g,defId:b}=l(d);m.def={...m.schema},b&&(m.defId=b);const v=m.schema;for(const S in v)delete v[S];v.$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>
51
51
 
52
- 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]){c(d);continue}if(e.external){const b=e.external.registry.get(d[0])?.id;if(n!==d[0]&&b){c(d);continue}}if(e.metadataRegistry.get(d[0])?.id){c(d);continue}if(m.cycle){c(d);continue}if(m.count>1&&e.reused==="ref"){c(d);continue}}}function Kv(e,n){const i=e.seen.get(n);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=d=>{const m=e.seen.get(d);if(m.ref===null)return;const g=m.def??m.schema,b={...g},v=m.ref;if(m.ref=null,v){r(v);const w=e.seen.get(v),_=w.schema;if(_.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(g.allOf=g.allOf??[],g.allOf.push(_)):Object.assign(g,_),Object.assign(g,b),d._zod.parent===v)for(const N in g)N==="$ref"||N==="allOf"||N in b||delete g[N];if(_.$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]}const S=d._zod.parent;if(S&&S!==v){r(S);const w=e.seen.get(S);if(w?.schema.$ref&&(g.$ref=w.schema.$ref,w.def))for(const _ in g)_==="$ref"||_==="allOf"||_ in w.def&&JSON.stringify(g[_])===JSON.stringify(w.def[_])&&delete g[_]}e.override({zodSchema:d,jsonSchema:g,path:m.path??[]})};for(const d of[...e.seen.entries()].reverse())r(d[0]);const l={};if(e.target==="draft-2020-12"?l.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?l.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?l.$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");l.$id=e.external.uri(d)}Object.assign(l,i.def??i.schema);const c=e.external?.defs??{};for(const d of e.seen.entries()){const m=d[1];m.def&&m.defId&&(c[m.defId]=m.def)}e.external||Object.keys(c).length>0&&(e.target==="draft-2020-12"?l.$defs=c:l.definitions=c);try{const d=JSON.parse(JSON.stringify(l));return Object.defineProperty(d,"~standard",{value:{...n["~standard"],jsonSchema:{input:nc(n,"input",e.processors),output:nc(n,"output",e.processors)}},enumerable:!1,writable:!1}),d}catch{throw new Error("Error converting schema to JSON.")}}function Vt(e,n){const i=n??{seen:new Set};if(i.seen.has(e))return!1;i.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return Vt(r.element,i);if(r.type==="set")return Vt(r.valueType,i);if(r.type==="lazy")return Vt(r.getter(),i);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return Vt(r.innerType,i);if(r.type==="intersection")return Vt(r.left,i)||Vt(r.right,i);if(r.type==="record"||r.type==="map")return Vt(r.keyType,i)||Vt(r.valueType,i);if(r.type==="pipe")return Vt(r.in,i)||Vt(r.out,i);if(r.type==="object"){for(const l in r.shape)if(Vt(r.shape[l],i))return!0;return!1}if(r.type==="union"){for(const l of r.options)if(Vt(l,i))return!0;return!1}if(r.type==="tuple"){for(const l of r.items)if(Vt(l,i))return!0;return!!(r.rest&&Vt(r.rest,i))}return!1}const lz=(e,n={})=>i=>{const r=Zv({...i,processors:n});return Nt(e,r),Pv(r,e),Kv(r,e)},nc=(e,n,i={})=>r=>{const{libraryOptions:l,target:c}=r??{},d=Zv({...l??{},target:c,io:n,processors:i});return Nt(e,d),Pv(d,e),Kv(d,e)},cz={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},uz=(e,n,i,r)=>{const l=i;l.type="string";const{minimum:c,maximum:d,format:m,patterns:g,contentEncoding:b}=e._zod.bag;if(typeof c=="number"&&(l.minLength=c),typeof d=="number"&&(l.maxLength=d),m&&(l.format=cz[m]??m,l.format===""&&delete l.format,m==="time"&&delete l.format),b&&(l.contentEncoding=b),g&&g.size>0){const v=[...g];v.length===1?l.pattern=v[0].source:v.length>1&&(l.allOf=[...v.map(S=>({...n.target==="draft-07"||n.target==="draft-04"||n.target==="openapi-3.0"?{type:"string"}:{},pattern:S.source}))])}},dz=(e,n,i,r)=>{const l=i,{minimum:c,maximum:d,format:m,multipleOf:g,exclusiveMaximum:b,exclusiveMinimum:v}=e._zod.bag;typeof m=="string"&&m.includes("int")?l.type="integer":l.type="number",typeof v=="number"&&(n.target==="draft-04"||n.target==="openapi-3.0"?(l.minimum=v,l.exclusiveMinimum=!0):l.exclusiveMinimum=v),typeof c=="number"&&(l.minimum=c,typeof v=="number"&&n.target!=="draft-04"&&(v>=c?delete l.minimum:delete l.exclusiveMinimum)),typeof b=="number"&&(n.target==="draft-04"||n.target==="openapi-3.0"?(l.maximum=b,l.exclusiveMaximum=!0):l.exclusiveMaximum=b),typeof d=="number"&&(l.maximum=d,typeof b=="number"&&n.target!=="draft-04"&&(b<=d?delete l.maximum:delete l.exclusiveMaximum)),typeof g=="number"&&(l.multipleOf=g)},fz=(e,n,i,r)=>{i.type="boolean"},pz=(e,n,i,r)=>{i.not={}},mz=(e,n,i,r)=>{},hz=(e,n,i,r)=>{const l=e._zod.def,c=Nv(l.entries);c.every(d=>typeof d=="number")&&(i.type="number"),c.every(d=>typeof d=="string")&&(i.type="string"),i.enum=c},gz=(e,n,i,r)=>{const l=e._zod.def,c=[];for(const d of l.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");c.push(Number(d))}else c.push(d);if(c.length!==0)if(c.length===1){const d=c[0];i.type=d===null?"null":typeof d,n.target==="draft-04"||n.target==="openapi-3.0"?i.enum=[d]:i.const=d}else c.every(d=>typeof d=="number")&&(i.type="number"),c.every(d=>typeof d=="string")&&(i.type="string"),c.every(d=>typeof d=="boolean")&&(i.type="boolean"),c.every(d=>d===null)&&(i.type="null"),i.enum=c},yz=(e,n,i,r)=>{if(n.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},bz=(e,n,i,r)=>{if(n.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},vz=(e,n,i,r)=>{const l=i,c=e._zod.def,{minimum:d,maximum:m}=e._zod.bag;typeof d=="number"&&(l.minItems=d),typeof m=="number"&&(l.maxItems=m),l.type="array",l.items=Nt(c.element,n,{...r,path:[...r.path,"items"]})},Sz=(e,n,i,r)=>{const l=i,c=e._zod.def;l.type="object",l.properties={};const d=c.shape;for(const b in d)l.properties[b]=Nt(d[b],n,{...r,path:[...r.path,"properties",b]});const m=new Set(Object.keys(d)),g=new Set([...m].filter(b=>{const v=c.shape[b]._zod;return n.io==="input"?v.optin===void 0:v.optout===void 0}));g.size>0&&(l.required=Array.from(g)),c.catchall?._zod.def.type==="never"?l.additionalProperties=!1:c.catchall?c.catchall&&(l.additionalProperties=Nt(c.catchall,n,{...r,path:[...r.path,"additionalProperties"]})):n.io==="output"&&(l.additionalProperties=!1)},xz=(e,n,i,r)=>{const l=e._zod.def,c=l.inclusive===!1,d=l.options.map((m,g)=>Nt(m,n,{...r,path:[...r.path,c?"oneOf":"anyOf",g]}));c?i.oneOf=d:i.anyOf=d},wz=(e,n,i,r)=>{const l=e._zod.def,c=Nt(l.left,n,{...r,path:[...r.path,"allOf",0]}),d=Nt(l.right,n,{...r,path:[...r.path,"allOf",1]}),m=b=>"allOf"in b&&Object.keys(b).length===1,g=[...m(c)?c.allOf:[c],...m(d)?d.allOf:[d]];i.allOf=g},jz=(e,n,i,r)=>{const l=i,c=e._zod.def;l.type="object";const d=c.keyType,g=d._zod.bag?.patterns;if(c.mode==="loose"&&g&&g.size>0){const v=Nt(c.valueType,n,{...r,path:[...r.path,"patternProperties","*"]});l.patternProperties={};for(const S of g)l.patternProperties[S.source]=v}else(n.target==="draft-07"||n.target==="draft-2020-12")&&(l.propertyNames=Nt(c.keyType,n,{...r,path:[...r.path,"propertyNames"]})),l.additionalProperties=Nt(c.valueType,n,{...r,path:[...r.path,"additionalProperties"]});const b=d._zod.values;if(b){const v=[...b].filter(S=>typeof S=="string"||typeof S=="number");v.length>0&&(l.required=v)}},Nz=(e,n,i,r)=>{const l=e._zod.def,c=Nt(l.innerType,n,r),d=n.seen.get(e);n.target==="openapi-3.0"?(d.ref=l.innerType,i.nullable=!0):i.anyOf=[c,{type:"null"}]},kz=(e,n,i,r)=>{const l=e._zod.def;Nt(l.innerType,n,r);const c=n.seen.get(e);c.ref=l.innerType},Az=(e,n,i,r)=>{const l=e._zod.def;Nt(l.innerType,n,r);const c=n.seen.get(e);c.ref=l.innerType,i.default=JSON.parse(JSON.stringify(l.defaultValue))},_z=(e,n,i,r)=>{const l=e._zod.def;Nt(l.innerType,n,r);const c=n.seen.get(e);c.ref=l.innerType,n.io==="input"&&(i._prefault=JSON.parse(JSON.stringify(l.defaultValue)))},zz=(e,n,i,r)=>{const l=e._zod.def;Nt(l.innerType,n,r);const c=n.seen.get(e);c.ref=l.innerType;let d;try{d=l.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}i.default=d},Cz=(e,n,i,r)=>{const l=e._zod.def,c=n.io==="input"?l.in._zod.def.type==="transform"?l.out:l.in:l.out;Nt(c,n,r);const d=n.seen.get(e);d.ref=c},Tz=(e,n,i,r)=>{const l=e._zod.def;Nt(l.innerType,n,r);const c=n.seen.get(e);c.ref=l.innerType,i.readOnly=!0},Qv=(e,n,i,r)=>{const l=e._zod.def;Nt(l.innerType,n,r);const c=n.seen.get(e);c.ref=l.innerType},Ez=Z("ZodISODateTime",(e,n)=>{OA.init(e,n),dt.init(e,n)});function Oz(e){return q_(Ez,e)}const Dz=Z("ZodISODate",(e,n)=>{DA.init(e,n),dt.init(e,n)});function Rz(e){return U_(Dz,e)}const Mz=Z("ZodISOTime",(e,n)=>{RA.init(e,n),dt.init(e,n)});function Bz(e){return $_(Mz,e)}const Lz=Z("ZodISODuration",(e,n)=>{MA.init(e,n),dt.init(e,n)});function qz(e){return V_(Lz,e)}const Uz=(e,n)=>{zv.init(e,n),e.name="ZodError",Object.defineProperties(e,{format:{value:i=>k2(e,i)},flatten:{value:i=>N2(e,i)},addIssue:{value:i=>{e.issues.push(i),e.message=JSON.stringify(e.issues,yf,2)}},addIssues:{value:i=>{e.issues.push(...i),e.message=JSON.stringify(e.issues,yf,2)}},isEmpty:{get(){return e.issues.length===0}}})},An=Z("ZodError",Uz,{Parent:Error}),$z=Hf(An),Vz=Zf(An),Gz=mc(An),Iz=hc(An),Hz=z2(An),Zz=C2(An),Pz=T2(An),Kz=E2(An),Qz=O2(An),Yz=D2(An),Xz=R2(An),Jz=M2(An),ut=Z("ZodType",(e,n)=>(ct.init(e,n),Object.assign(e["~standard"],{jsonSchema:{input:nc(e,"input"),output:nc(e,"output")}}),e.toJSONSchema=lz(e,{}),e.def=n,e.type=n.type,Object.defineProperty(e,"_def",{value:n}),e.check=(...i)=>e.clone(Qa(n,{checks:[...n.checks??[],...i.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),e.with=e.check,e.clone=(i,r)=>Ya(e,i,r),e.brand=()=>e,e.register=((i,r)=>(i.add(e,r),e)),e.parse=(i,r)=>$z(e,i,r,{callee:e.parse}),e.safeParse=(i,r)=>Gz(e,i,r),e.parseAsync=async(i,r)=>Vz(e,i,r,{callee:e.parseAsync}),e.safeParseAsync=async(i,r)=>Iz(e,i,r),e.spa=e.safeParseAsync,e.encode=(i,r)=>Hz(e,i,r),e.decode=(i,r)=>Zz(e,i,r),e.encodeAsync=async(i,r)=>Pz(e,i,r),e.decodeAsync=async(i,r)=>Kz(e,i,r),e.safeEncode=(i,r)=>Qz(e,i,r),e.safeDecode=(i,r)=>Yz(e,i,r),e.safeEncodeAsync=async(i,r)=>Xz(e,i,r),e.safeDecodeAsync=async(i,r)=>Jz(e,i,r),e.refine=(i,r)=>e.check(HC(i,r)),e.superRefine=i=>e.check(ZC(i)),e.overwrite=i=>e.check(Zs(i)),e.optional=()=>ib(e),e.exactOptional=()=>EC(e),e.nullable=()=>sb(e),e.nullish=()=>ib(sb(e)),e.nonoptional=i=>LC(e,i),e.array=()=>E(e),e.or=i=>Fv([e,i]),e.and=i=>kC(e,i),e.transform=i=>rb(e,CC(i)),e.default=i=>RC(e,i),e.prefault=i=>BC(e,i),e.catch=i=>UC(e,i),e.pipe=i=>rb(e,i),e.readonly=()=>GC(e),e.describe=i=>{const r=e.clone();return eo.add(r,{description:i}),r},Object.defineProperty(e,"description",{get(){return eo.get(e)?.description},configurable:!0}),e.meta=(...i)=>{if(i.length===0)return eo.get(e);const r=e.clone();return eo.add(r,i[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=i=>i(e),e)),Yv=Z("_ZodString",(e,n)=>{Pf.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(r,l,c)=>uz(e,r,l);const i=e._zod.bag;e.format=i.format??null,e.minLength=i.minimum??null,e.maxLength=i.maximum??null,e.regex=(...r)=>e.check(K_(...r)),e.includes=(...r)=>e.check(X_(...r)),e.startsWith=(...r)=>e.check(J_(...r)),e.endsWith=(...r)=>e.check(F_(...r)),e.min=(...r)=>e.check(tc(...r)),e.max=(...r)=>e.check(Iv(...r)),e.length=(...r)=>e.check(Hv(...r)),e.nonempty=(...r)=>e.check(tc(1,...r)),e.lowercase=r=>e.check(Q_(r)),e.uppercase=r=>e.check(Y_(r)),e.trim=()=>e.check(ez()),e.normalize=(...r)=>e.check(W_(...r)),e.toLowerCase=()=>e.check(tz()),e.toUpperCase=()=>e.check(nz()),e.slugify=()=>e.check(az())}),Fz=Z("ZodString",(e,n)=>{Pf.init(e,n),Yv.init(e,n),e.email=i=>e.check(y_(Wz,i)),e.url=i=>e.check(w_(eC,i)),e.jwt=i=>e.check(L_(hC,i)),e.emoji=i=>e.check(j_(tC,i)),e.guid=i=>e.check(Fy(nb,i)),e.uuid=i=>e.check(b_(Ll,i)),e.uuidv4=i=>e.check(v_(Ll,i)),e.uuidv6=i=>e.check(S_(Ll,i)),e.uuidv7=i=>e.check(x_(Ll,i)),e.nanoid=i=>e.check(N_(nC,i)),e.guid=i=>e.check(Fy(nb,i)),e.cuid=i=>e.check(k_(aC,i)),e.cuid2=i=>e.check(A_(iC,i)),e.ulid=i=>e.check(__(sC,i)),e.base64=i=>e.check(R_(fC,i)),e.base64url=i=>e.check(M_(pC,i)),e.xid=i=>e.check(z_(rC,i)),e.ksuid=i=>e.check(C_(oC,i)),e.ipv4=i=>e.check(T_(lC,i)),e.ipv6=i=>e.check(E_(cC,i)),e.cidrv4=i=>e.check(O_(uC,i)),e.cidrv6=i=>e.check(D_(dC,i)),e.e164=i=>e.check(B_(mC,i)),e.datetime=i=>e.check(Oz(i)),e.date=i=>e.check(Rz(i)),e.time=i=>e.check(Bz(i)),e.duration=i=>e.check(qz(i))});function h(e){return g_(Fz,e)}const dt=Z("ZodStringFormat",(e,n)=>{lt.init(e,n),Yv.init(e,n)}),Wz=Z("ZodEmail",(e,n)=>{jA.init(e,n),dt.init(e,n)}),nb=Z("ZodGUID",(e,n)=>{xA.init(e,n),dt.init(e,n)}),Ll=Z("ZodUUID",(e,n)=>{wA.init(e,n),dt.init(e,n)}),eC=Z("ZodURL",(e,n)=>{NA.init(e,n),dt.init(e,n)}),tC=Z("ZodEmoji",(e,n)=>{kA.init(e,n),dt.init(e,n)}),nC=Z("ZodNanoID",(e,n)=>{AA.init(e,n),dt.init(e,n)}),aC=Z("ZodCUID",(e,n)=>{_A.init(e,n),dt.init(e,n)}),iC=Z("ZodCUID2",(e,n)=>{zA.init(e,n),dt.init(e,n)}),sC=Z("ZodULID",(e,n)=>{CA.init(e,n),dt.init(e,n)}),rC=Z("ZodXID",(e,n)=>{TA.init(e,n),dt.init(e,n)}),oC=Z("ZodKSUID",(e,n)=>{EA.init(e,n),dt.init(e,n)}),lC=Z("ZodIPv4",(e,n)=>{BA.init(e,n),dt.init(e,n)}),cC=Z("ZodIPv6",(e,n)=>{LA.init(e,n),dt.init(e,n)}),uC=Z("ZodCIDRv4",(e,n)=>{qA.init(e,n),dt.init(e,n)}),dC=Z("ZodCIDRv6",(e,n)=>{UA.init(e,n),dt.init(e,n)}),fC=Z("ZodBase64",(e,n)=>{$A.init(e,n),dt.init(e,n)}),pC=Z("ZodBase64URL",(e,n)=>{GA.init(e,n),dt.init(e,n)}),mC=Z("ZodE164",(e,n)=>{IA.init(e,n),dt.init(e,n)}),hC=Z("ZodJWT",(e,n)=>{ZA.init(e,n),dt.init(e,n)}),Xv=Z("ZodNumber",(e,n)=>{qv.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(r,l,c)=>dz(e,r,l),e.gt=(r,l)=>e.check(eb(r,l)),e.gte=(r,l)=>e.check(ef(r,l)),e.min=(r,l)=>e.check(ef(r,l)),e.lt=(r,l)=>e.check(Wy(r,l)),e.lte=(r,l)=>e.check(Wd(r,l)),e.max=(r,l)=>e.check(Wd(r,l)),e.int=r=>e.check(ab(r)),e.safe=r=>e.check(ab(r)),e.positive=r=>e.check(eb(0,r)),e.nonnegative=r=>e.check(ef(0,r)),e.negative=r=>e.check(Wy(0,r)),e.nonpositive=r=>e.check(Wd(0,r)),e.multipleOf=(r,l)=>e.check(tb(r,l)),e.step=(r,l)=>e.check(tb(r,l)),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 j(e){return G_(Xv,e)}const gC=Z("ZodNumberFormat",(e,n)=>{PA.init(e,n),Xv.init(e,n)});function ab(e){return I_(gC,e)}const yC=Z("ZodBoolean",(e,n)=>{KA.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(i,r,l)=>fz(e,i,r)});function ye(e){return H_(yC,e)}const bC=Z("ZodUnknown",(e,n)=>{QA.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(i,r,l)=>mz()});function wi(){return Z_(bC)}const vC=Z("ZodNever",(e,n)=>{YA.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(i,r,l)=>pz(e,i,r)});function SC(e){return P_(vC,e)}const xC=Z("ZodArray",(e,n)=>{XA.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(i,r,l)=>vz(e,i,r,l),e.element=n.element,e.min=(i,r)=>e.check(tc(i,r)),e.nonempty=i=>e.check(tc(1,i)),e.max=(i,r)=>e.check(Iv(i,r)),e.length=(i,r)=>e.check(Hv(i,r)),e.unwrap=()=>e.element});function E(e,n){return iz(xC,e,n)}const wC=Z("ZodObject",(e,n)=>{FA.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(i,r,l)=>Sz(e,i,r,l),He(e,"shape",()=>n.shape),e.keyof=()=>se(Object.keys(e._zod.def.shape)),e.catchall=i=>e.clone({...e._zod.def,catchall:i}),e.passthrough=()=>e.clone({...e._zod.def,catchall:wi()}),e.loose=()=>e.clone({...e._zod.def,catchall:wi()}),e.strict=()=>e.clone({...e._zod.def,catchall:SC()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=i=>v2(e,i),e.safeExtend=i=>S2(e,i),e.merge=i=>x2(e,i),e.pick=i=>y2(e,i),e.omit=i=>b2(e,i),e.partial=(...i)=>w2(e0,e,i[0]),e.required=(...i)=>j2(t0,e,i[0])});function k(e,n){const i={type:"object",shape:e??{},...be(n)};return new wC(i)}const Jv=Z("ZodUnion",(e,n)=>{Vv.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(i,r,l)=>xz(e,i,r,l),e.options=n.options});function Fv(e,n){return new Jv({type:"union",options:e,...be(n)})}const jC=Z("ZodDiscriminatedUnion",(e,n)=>{Jv.init(e,n),WA.init(e,n)});function Wv(e,n,i){return new jC({type:"union",options:n,discriminator:e,...be(i)})}const NC=Z("ZodIntersection",(e,n)=>{e_.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(i,r,l)=>wz(e,i,r,l)});function kC(e,n){return new NC({type:"intersection",left:e,right:n})}const AC=Z("ZodRecord",(e,n)=>{t_.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(i,r,l)=>jz(e,i,r,l),e.keyType=n.keyType,e.valueType=n.valueType});function Zn(e,n,i){return new AC({type:"record",keyType:e,valueType:n,...be(i)})}const vf=Z("ZodEnum",(e,n)=>{n_.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(r,l,c)=>hz(e,r,l),e.enum=n.entries,e.options=Object.values(n.entries);const i=new Set(Object.keys(n.entries));e.extract=(r,l)=>{const c={};for(const d of r)if(i.has(d))c[d]=n.entries[d];else throw new Error(`Key ${d} not found in enum`);return new vf({...n,checks:[],...be(l),entries:c})},e.exclude=(r,l)=>{const c={...n.entries};for(const d of r)if(i.has(d))delete c[d];else throw new Error(`Key ${d} not found in enum`);return new vf({...n,checks:[],...be(l),entries:c})}});function se(e,n){const i=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new vf({type:"enum",entries:i,...be(n)})}const _C=Z("ZodLiteral",(e,n)=>{a_.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(i,r,l)=>gz(e,i,r),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 Zt(e,n){return new _C({type:"literal",values:Array.isArray(e)?e:[e],...be(n)})}const zC=Z("ZodTransform",(e,n)=>{i_.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(i,r,l)=>bz(e,i),e._zod.parse=(i,r)=>{if(r.direction==="backward")throw new wv(e.constructor.name);i.addIssue=c=>{if(typeof c=="string")i.issues.push(ro(c,i.value,n));else{const d=c;d.fatal&&(d.continue=!1),d.code??(d.code="custom"),d.input??(d.input=i.value),d.inst??(d.inst=e),i.issues.push(ro(d))}};const l=n.transform(i.value,i);return l instanceof Promise?l.then(c=>(i.value=c,i)):(i.value=l,i)}});function CC(e){return new zC({type:"transform",transform:e})}const e0=Z("ZodOptional",(e,n)=>{Gv.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(i,r,l)=>Qv(e,i,r,l),e.unwrap=()=>e._zod.def.innerType});function ib(e){return new e0({type:"optional",innerType:e})}const TC=Z("ZodExactOptional",(e,n)=>{s_.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(i,r,l)=>Qv(e,i,r,l),e.unwrap=()=>e._zod.def.innerType});function EC(e){return new TC({type:"optional",innerType:e})}const OC=Z("ZodNullable",(e,n)=>{r_.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(i,r,l)=>Nz(e,i,r,l),e.unwrap=()=>e._zod.def.innerType});function sb(e){return new OC({type:"nullable",innerType:e})}const DC=Z("ZodDefault",(e,n)=>{o_.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(i,r,l)=>Az(e,i,r,l),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function RC(e,n){return new DC({type:"default",innerType:e,get defaultValue(){return typeof n=="function"?n():Av(n)}})}const MC=Z("ZodPrefault",(e,n)=>{l_.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(i,r,l)=>_z(e,i,r,l),e.unwrap=()=>e._zod.def.innerType});function BC(e,n){return new MC({type:"prefault",innerType:e,get defaultValue(){return typeof n=="function"?n():Av(n)}})}const t0=Z("ZodNonOptional",(e,n)=>{c_.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(i,r,l)=>kz(e,i,r,l),e.unwrap=()=>e._zod.def.innerType});function LC(e,n){return new t0({type:"nonoptional",innerType:e,...be(n)})}const qC=Z("ZodCatch",(e,n)=>{u_.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(i,r,l)=>zz(e,i,r,l),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function UC(e,n){return new qC({type:"catch",innerType:e,catchValue:typeof n=="function"?n:()=>n})}const $C=Z("ZodPipe",(e,n)=>{d_.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(i,r,l)=>Cz(e,i,r,l),e.in=n.in,e.out=n.out});function rb(e,n){return new $C({type:"pipe",in:e,out:n})}const VC=Z("ZodReadonly",(e,n)=>{f_.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(i,r,l)=>Tz(e,i,r,l),e.unwrap=()=>e._zod.def.innerType});function GC(e){return new VC({type:"readonly",innerType:e})}const IC=Z("ZodCustom",(e,n)=>{p_.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(i,r,l)=>yz(e,i)});function HC(e,n={}){return sz(IC,e,n)}function ZC(e){return rz(e)}const PC=k({maxConcurrency:j().int().positive(),maxRequestsPerMinute:j().int().positive(),maxRequestsPerDay:j().int().positive()}),ha=h().min(1);h().min(1);const Kf=k({label:h().min(1),city:h().min(1),region:h().min(1),country:h().length(2),timezone:h().optional()}),Qf=se(["citation.lost","citation.gained","run.completed","run.failed","insight.critical","insight.high"]);k({id:h(),projectId:h(),channel:Zt("webhook"),url:h().url(),urlDisplay:h(),urlHost:h(),events:E(Qf),enabled:ye().default(!0),source:h().optional(),webhookSecret:h().optional(),createdAt:h(),updatedAt:h()});k({channel:Zt("webhook"),url:h().url(),events:E(Qf).min(1),source:h().optional()});const n0=se(["cli","api","config-file"]);function KC(e){const n=new Set,i=new Set;for(const r of e){if(n.has(r.label)){i.add(r.label);continue}n.add(r.label)}return[...i]}function QC(e,n){return n?e.some(i=>i.label===n):!0}k({displayName:h().min(1),canonicalDomain:h().min(1),ownedDomains:E(h().min(1)).optional(),aliases:E(h()).optional(),country:h().length(2),language:h().min(2),tags:E(h()).optional(),labels:Zn(h(),h()).optional(),providers:E(ha).optional(),locations:E(Kf).optional(),defaultLocation:h().nullable().optional(),autoExtractBacklinks:ye().optional(),configSource:n0.optional()});k({id:h(),name:h(),displayName:h().optional(),canonicalDomain:h(),ownedDomains:E(h()).default([]),aliases:E(h()).default([]),country:h().length(2),language:h().min(2),tags:E(h()).default([]),labels:Zn(h(),h()).default({}),providers:E(h()).default([]),locations:E(Kf).default([]),defaultLocation:h().nullable().optional(),autoExtractBacklinks:ye().default(!1),configSource:n0.default("cli"),configRevision:j().int().positive().default(1),createdAt:h().optional(),updatedAt:h().optional()});k({id:h(),query:h(),createdAt:h()});k({id:h(),keyword:h(),createdAt:h()});k({queries:E(h().trim().min(1)).min(1)});k({keywords:E(h().trim().min(1)).min(1)});k({provider:ha,count:j().int().min(1).max(20).optional()});k({id:h(),domain:h(),createdAt:h()});k({competitors:E(h().trim().min(1)).min(1)});function ac(e){let n=e.trim().toLowerCase();try{n.includes("://")&&(n=new URL(n).hostname.toLowerCase())}catch{}return n.replace(/^www\./,"")}const YC=new Set(["ac.uk","co.id","co.il","co.in","co.jp","co.kr","co.nz","co.th","co.uk","co.za","com.au","com.br","com.cn","com.mx","com.ph","com.sg","com.tr","edu.au","edu.sg","gov.au","gov.uk","me.uk","ne.jp","net.au","net.br","net.cn","net.in","net.tr","or.jp","or.kr","org.au","org.br","org.in","org.nz","org.tr","org.uk","org.za"]);function XC(e){const n=ac(e);if(!n)return"";const i=n.split("/")[0]?.split(":")[0]??"";if(!i)return"";const r=i.split(".").filter(Boolean);if(r.length<2)return"";if(r.length===2)return r.join(".");const l=r.slice(-2).join(".");return YC.has(l)?r.length>=3?r.slice(-3).join("."):"":r.slice(-2).join(".")}function JC(e){const n=XC(e);return n?n.split(".")[0]??"":""}function FC(e){const n=[e.canonicalDomain,...e.ownedDomains??[]],i=new Set,r=[];for(const l of n){const c=l.trim();if(!c)continue;const d=ac(c);i.has(d)||(i.add(d),r.push(c))}return r}const WC=k({name:h().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:Zn(h(),h()).optional().default({})}),eT=k({preset:h().optional(),cron:h().optional(),timezone:h().optional().default("UTC"),providers:E(ha).optional().default([])}).refine(e=>e.preset&&!e.cron||!e.preset&&e.cron,{message:'Exactly one of "preset" or "cron" must be provided'}).optional(),tT=k({channel:Zt("webhook"),url:h().url(),events:E(Qf).min(1)}),nT=k({gsc:k({propertyUrl:h()}).optional(),syncSchedule:k({preset:h().optional(),cron:h().optional()}).optional()}).optional(),ob=E(h().min(1)),aT=k({displayName:h().min(1),canonicalDomain:h().min(1),ownedDomains:E(h().min(1)).optional().default([]),aliases:E(h().min(1)).optional().default([]),country:h().length(2),language:h().min(2),queries:ob.optional(),keywords:ob.optional(),competitors:E(h().min(1)).optional().default([]),providers:E(ha).optional().default([]),locations:E(Kf).optional().default([]),defaultLocation:h().optional(),schedule:eT,notifications:E(tT).optional().default([]),google:nT,autoExtractBacklinks:ye().optional().default(!1)}).superRefine((e,n)=>{e.queries!==void 0&&e.keywords!==void 0&&n.addIssue({code:"custom",message:"Use spec.queries; spec.keywords is accepted only as a legacy alias when spec.queries is omitted",path:["keywords"]});const i=KC(e.locations);i.length>0&&n.addIssue({code:"custom",message:`Duplicate location labels are not allowed: ${i.join(", ")}`,path:["locations"]}),QC(e.locations,e.defaultLocation)||n.addIssue({code:"custom",message:`defaultLocation "${e.defaultLocation}" must match a configured location label`,path:["defaultLocation"]})});k({apiVersion:Zt("canonry/v1"),kind:Zt("Project"),metadata:WC,spec:aT});const iT=se(["gsc","ga4"]);k({id:h(),domain:h(),connectionType:iT,propertyId:h().nullable().optional(),sitemapUrl:h().nullable().optional(),scopes:E(h()).default([]),createdAt:h(),updatedAt:h()});k({date:h(),query:h(),page:h(),country:h().nullable().optional(),device:h().nullable().optional(),clicks:j(),impressions:j(),ctr:j(),position:j()});const sT=k({date:h(),clicks:j(),impressions:j(),ctr:j()});k({totals:k({clicks:j(),impressions:j(),ctr:j(),days:j()}),daily:E(sT)});const Sf=k({id:h(),url:h(),indexingState:h().nullable().optional(),verdict:h().nullable().optional(),coverageState:h().nullable().optional(),pageFetchState:h().nullable().optional(),robotsTxtState:h().nullable().optional(),crawlTime:h().nullable().optional(),lastCrawlResult:h().nullable().optional(),isMobileFriendly:ye().nullable().optional(),richResults:E(h()).default([]),referringUrls:E(h()).default([]),inspectedAt:h()});se(["stable","reindexed","deindexed","still-missing","new"]);const rT=k({url:h(),previousState:h().nullable(),currentState:h().nullable(),transitionDate:h()}),oT=k({reason:h(),count:j(),urls:E(Sf).default([])});k({summary:k({total:j(),indexed:j(),notIndexed:j(),deindexed:j(),percentage:j()}),lastInspectedAt:h().nullable(),lastSyncedAt:h().nullable(),indexed:E(Sf).default([]),notIndexed:E(Sf).default([]),deindexed:E(rT).default([]),reasonGroups:E(oT).default([])});k({url:h(),type:se(["URL_UPDATED","URL_DELETED"]),notifiedAt:h()});const lT=k({url:h(),type:se(["URL_UPDATED","URL_DELETED"]),notifiedAt:h(),status:se(["success","error"]),error:h().optional()});k({summary:k({total:j().int().nonnegative(),succeeded:j().int().nonnegative(),failed:j().int().nonnegative()}),results:E(lT).default([])});k({date:h(),indexed:j(),notIndexed:j(),reasonBreakdown:Zn(h(),j()).default({})});const cT=k({siteUrl:h(),permissionLevel:h()});k({sites:E(cT).default([])});const uT=k({type:h(),submitted:h(),indexed:h()}),dT=k({path:h(),lastSubmitted:h().optional(),isPending:ye().optional(),isSitemapsIndex:ye().optional(),type:h().optional(),lastDownloaded:h().optional(),warnings:h().optional(),errors:h().optional(),contents:E(uT).optional()});k({sitemaps:E(dT).default([])});k({id:h(),domain:h(),siteUrl:h().nullable().optional(),createdAt:h(),updatedAt:h()});const tf=k({id:h(),url:h(),httpCode:j().nullable().optional(),inIndex:ye().nullable().optional(),lastCrawledDate:h().nullable().optional(),inIndexDate:h().nullable().optional(),inspectedAt:h(),documentSize:j().nullable().optional(),anchorCount:j().nullable().optional(),discoveryDate:h().nullable().optional()});k({summary:k({total:j(),indexed:j(),notIndexed:j(),unknown:j().optional(),percentage:j()}),lastInspectedAt:h().nullable(),indexed:E(tf).default([]),notIndexed:E(tf).default([]),unknown:E(tf).default([]).optional()});k({query:h(),impressions:j(),clicks:j(),ctr:j(),averagePosition:j()});k({date:h(),indexed:j(),notIndexed:j(),unknown:j()});const fT=k({url:h(),status:se(["success","error"]),submittedAt:h(),error:h().optional()});k({summary:k({total:j().int().nonnegative(),succeeded:j().int().nonnegative(),failed:j().int().nonnegative()}),results:E(fT).default([])});const a0=k({url:h(),verified:ye()});k({sites:E(a0).default([])});k({connected:ye(),domain:h(),siteUrl:h().nullable(),createdAt:h().nullable(),updatedAt:h().nullable()});k({connected:ye(),domain:h(),siteUrl:h().nullable(),availableSites:E(a0).default([])});k({siteUrl:h()});const pT=k({name:h(),alive:ye(),lastUsed:h().nullable()});k({connected:ye(),endpoint:h(),version:h().optional(),browserVersion:h().optional(),targets:E(pT).default([])});const Ps=se(["live","staging"]);k({projectName:h(),url:h(),stagingUrl:h().optional(),username:h(),defaultEnv:Ps,createdAt:h(),updatedAt:h()});const lb=k({url:h(),reachable:ye(),pageCount:j().nullable().optional(),version:h().nullable().optional(),error:h().nullable().optional(),plugins:E(h()).optional(),authenticatedUser:k({id:j(),slug:h()}).nullable().optional()});k({connected:ye(),projectName:h(),defaultEnv:Ps,live:lb.nullable(),staging:lb.nullable(),adminUrl:h().nullable().optional()});const mT=k({id:j(),slug:h(),title:h(),status:h(),modifiedAt:h().nullable().optional(),link:h().nullable().optional()}),i0=k({title:h().nullable(),description:h().nullable(),noindex:ye().nullable(),writable:ye().default(!1),writeTargets:E(h()).default([])}),hT=k({type:h(),json:Zn(h(),wi())}),gT=mT.extend({env:Ps,content:h(),seo:i0,schemaBlocks:E(hT).default([])}),cb=gT.extend({contentHash:h(),contentSnippet:h()}),s0=k({manualRequired:Zt(!0),targetUrl:h(),adminUrl:h().nullable().optional(),content:h(),nextSteps:E(h()).default([])}),yT=k({slug:h(),severity:se(["high","medium","low"]),code:se(["noindex","missing-seo-title","missing-meta-description","missing-schema","thin-content"]),message:h()});k({slug:h(),title:h(),status:h(),wordCount:j(),seo:i0,schemaPresent:ye(),issues:E(yT).default([])});const bT=k({slug:h(),status:se(["applied","skipped","manual"]),error:h().optional(),manualAssist:s0.optional()});k({env:Ps,strategy:se(["plugin","manual"]),results:E(bT)});const vT=k({slug:h(),status:se(["deployed","stripped","skipped","failed"]),schemasInjected:E(h()).optional(),manualAssist:s0.optional(),error:h().optional()});k({env:Ps,results:E(vT)});const ST=k({slug:h(),title:h(),canonrySchemas:E(h()),thirdPartySchemas:E(h()),hasCanonrySchema:ye()});k({env:Ps,pages:E(ST)});const xT=k({name:h(),status:se(["completed","skipped","failed"]),summary:h().optional(),error:h().optional()});k({projectName:h(),steps:E(xT)});k({slug:h(),live:cb,staging:cb,hasDifferences:ye(),differences:k({title:ye(),slug:ye(),content:ye(),seoTitle:ye(),seoDescription:ye(),noindex:ye(),schema:ye()})});const wT=k({name:h(),displayName:h().optional(),keyUrl:h().optional(),modelHint:h().optional(),model:h().optional(),configured:ye(),quota:PC.optional(),vertexConfigured:ye().optional()}),ub=k({configured:ye()});k({providers:E(wT).default([]),google:ub,bing:ub});const yc=se(["queued","running","completed","partial","failed","cancelled"]),It=yc.enum,r0=se(["answer-visibility","site-audit","gsc-sync","inspect-sitemap","ga-sync","bing-inspect","bing-inspect-sitemap","backlink-extract","traffic-sync","aeo-discover-seed","aeo-discover-probe"]),Ee=r0.enum,o0=se(["manual","scheduled","config-apply","backfill","probe"]),Rs=o0.enum,ji=se(["cited","not-cited"]),ic=ji.enum,sc=se(["visible","not-visible"]);sc.enum;const rc=se(["mentioned","not-mentioned"]);rc.enum;const l0=se(["new","cited","lost","emerging","not-cited"]);l0.enum;const jT=se(["new","mentioned","lost","emerging","not-mentioned"]);jT.enum;const NT=se([Rs.manual,Rs.probe]);k({kind:Zt(Ee["answer-visibility"]).optional(),trigger:NT.optional(),providers:E(ha).optional(),queries:E(h().min(1)).min(1).optional(),location:h().min(1).optional(),allLocations:ye().optional(),noLocation:ye().optional()}).refine(e=>+!!e.location+ +!!e.allLocations+ +!!e.noLocation<=1,{message:'Only one of "location", "allLocations", or "noLocation" may be provided'});const kT=k({message:h(),raw:wi().optional()}),AT=k({message:h().optional(),providers:Zn(h(),kT).optional()}),_T=k({id:h(),projectId:h(),kind:r0,status:yc,trigger:o0.default("manual"),location:h().nullable().optional(),queries:E(h()).nullable().optional(),startedAt:h().nullable().optional(),finishedAt:h().nullable().optional(),error:AT.nullable().optional(),createdAt:h()});function Yf(e){if(e.providers){const n=Object.entries(e.providers);if(n.length===1){const[i,r]=n[0];return`${i}: ${r.message}`}if(n.length>1)return n.map(([i,r])=>`${i}: ${r.message}`).join(" • ")}return e.message??"Run failed."}const c0=k({uri:h(),title:h()}),u0=k({id:h(),runId:h(),queryId:h(),query:h().optional(),provider:ha,citationState:ji,answerMentioned:ye().optional(),visibilityState:sc.optional(),mentionState:rc.optional(),transition:l0.optional(),answerText:h().nullable().optional(),citedDomains:E(h()).default([]),competitorOverlap:E(h()).default([]),recommendedCompetitors:E(h()).default([]),matchedTerms:E(h()).default([]),groundingSources:E(c0).default([]),searchQueries:E(h()).default([]),model:h().nullable().optional(),location:h().nullable().optional(),createdAt:h()});k({snapshots:E(u0),total:j().int().nonnegative()});const zT=k({queryId:h().nullable(),query:h().nullable(),run1State:ji.nullable(),run2State:ji.nullable(),run1AnswerMentioned:ye().nullable(),run2AnswerMentioned:ye().nullable(),run1VisibilityState:sc.nullable(),run2VisibilityState:sc.nullable(),run1MentionState:rc.nullable().optional(),run2MentionState:rc.nullable().optional(),changed:ye(),visibilityChanged:ye()});k({run1:h(),run2:h(),diff:E(zT)});const CT=_T.extend({snapshots:E(u0).optional()});k({totalRuns:j().int().nonnegative(),run:CT.nullable()});k({id:h(),projectId:h().nullable().optional(),actor:h(),action:h(),entityType:h(),entityId:h().nullable().optional(),diff:wi().optional(),createdAt:h()});const TT=se(["yes","no","unknown","not-mentioned"]),db=E(h().min(1));k({companyName:h().min(1),domain:h().min(1),queries:db.optional(),phrases:db.optional(),competitors:E(h().min(1)).optional().default([])}).superRefine((e,n)=>{e.queries!==void 0&&e.phrases!==void 0&&n.addIssue({code:"custom",message:"Use queries; phrases is accepted only as a legacy alias when queries is omitted",path:["phrases"]})});const ET=k({name:h(),count:j().int().nonnegative()}),OT=k({id:h(),name:h(),weight:j(),score:j(),grade:h(),status:se(["pass","partial","fail"]),findings:E(k({type:h(),message:h()})).default([]),recommendations:E(h()).default([])}),DT=k({url:h(),finalUrl:h(),auditedAt:h(),overallScore:j(),overallGrade:h(),summary:h(),factors:E(OT).default([])}),RT=k({industry:h(),summary:h(),services:E(h()).default([]),categoryTerms:E(h()).default([])}),MT=k({provider:h(),displayName:h(),model:h().nullable().optional(),mentioned:ye(),cited:ye(),describedAccurately:TT,accuracyNotes:h().nullable().optional(),incorrectClaims:E(h()).default([]),recommendedCompetitors:E(h()).default([]),citedDomains:E(h()).default([]),groundingSources:E(c0).default([]),searchQueries:E(h()).default([]),answerText:h(),error:h().nullable().optional()}),BT=k({query:h(),providerResults:E(MT).default([])}),LT=k({totalQueries:j().int().nonnegative(),totalProviders:j().int().nonnegative(),totalComparisons:j().int().nonnegative(),mentionCount:j().int().nonnegative(),citationCount:j().int().nonnegative(),topCompetitors:E(ET).default([]),visibilityGap:h(),whatThisMeans:E(h()).default([]),recommendedActions:E(h()).default([])});k({companyName:h(),domain:h(),homepageUrl:h(),generatedAt:h(),queries:E(h()).default([]),competitors:E(h()).default([]),profile:RT,audit:DT,queryResults:E(BT).default([]),summary:LT});const Xf=se(["answer-visibility","traffic-sync"]);Xf.enum;k({id:h(),projectId:h(),kind:Xf,cronExpr:h(),preset:h().nullable().optional(),timezone:h().default("UTC"),enabled:ye().default(!0),providers:E(ha).default([]),sourceId:h().nullable().optional(),lastRunAt:h().nullable().optional(),nextRunAt:h().nullable().optional(),createdAt:h(),updatedAt:h()});k({kind:Xf.optional(),preset:h().optional(),cron:h().optional(),timezone:h().optional().default("UTC"),enabled:ye().optional().default(!0),providers:E(ha).optional().default([]),sourceId:h().optional()}).refine(e=>e.preset&&!e.cron||!e.preset&&e.cron,{message:'Exactly one of "preset" or "cron" must be provided'});const qT=se(["mentioned","cited"]);qT.enum;k({id:h(),projectId:h(),propertyId:h(),clientEmail:h(),connected:ye(),createdAt:h(),updatedAt:h()});k({date:h(),landingPage:h(),sessions:j(),organicSessions:j(),users:j()});const Jf=se(["session","first_user","manual_utm"]),UT=k({source:h(),medium:h(),sessions:j(),users:j(),sourceDimension:Jf}),$T=k({source:h(),medium:h(),sourceDimension:Jf,landingPage:h(),sessions:j(),users:j()}),VT=k({source:h(),medium:h(),sessions:j(),users:j(),channelGroup:h()}),Qr=k({sessions:j(),sharePct:j(),sharePctDisplay:h()}),GT=k({organic:Qr,social:Qr,direct:Qr,ai:Qr,other:Qr});k({totalSessions:j(),totalOrganicSessions:j(),totalDirectSessions:j(),totalUsers:j(),topPages:E(k({landingPage:h(),sessions:j(),organicSessions:j(),directSessions:j(),users:j()})),aiReferrals:E(UT),aiReferralLandingPages:E($T),aiSessionsDeduped:j(),aiUsersDeduped:j(),aiSessionsBySession:j(),aiUsersBySession:j(),socialReferrals:E(VT),socialSessions:j(),socialUsers:j(),channelBreakdown:GT,organicSharePct:j(),aiSharePct:j(),aiSharePctBySession:j(),directSharePct:j(),socialSharePct:j(),organicSharePctDisplay:h(),aiSharePctDisplay:h(),aiSharePctBySessionDisplay:h(),directSharePctDisplay:h(),socialSharePctDisplay:h(),otherSessions:j(),otherSharePct:j(),otherSharePctDisplay:h(),lastSyncedAt:h().nullable()});k({connected:ye(),propertyId:h().nullable(),clientEmail:h().nullable(),authMethod:se(["service-account","oauth"]).nullable(),lastSyncedAt:h().nullable(),createdAt:h().nullable().optional(),updatedAt:h().nullable().optional()});k({synced:ye(),rowCount:j().int().nonnegative(),aiReferralCount:j().int().nonnegative(),socialReferralCount:j().int().nonnegative(),days:j().int().nonnegative(),syncedAt:h(),syncedComponents:E(h()).optional()});k({date:h(),source:h(),medium:h(),landingPage:h(),sessions:j(),users:j(),sourceDimension:Jf});k({date:h(),source:h(),medium:h(),sessions:j(),users:j(),channelGroup:h()});k({date:h(),sessions:j(),organicSessions:j(),users:j()});function oc(e){return e.toLowerCase().replace(/[^a-z0-9]/g,"")}const d0=se(["claude","openai","gemini","zai"]),IT=k({id:d0,label:h(),defaultModel:h(),configured:ye(),keySource:se(["config","env"]).nullable()});k({providers:E(IT).default([]),defaultProvider:d0.nullable()});const HT=se(["aero","user","compaction"]);HT.enum;const f0=128;k({key:h().min(1).max(f0),value:h().min(1)});k({key:h().min(1).max(f0)});const Ff=se(["queued","downloading","querying","ready","failed"]);Ff.enum;k({id:h(),release:h(),status:Ff,phaseDetail:h().nullable().optional(),vertexPath:h().nullable().optional(),edgesPath:h().nullable().optional(),vertexSha256:h().nullable().optional(),edgesSha256:h().nullable().optional(),vertexBytes:j().int().nullable().optional(),edgesBytes:j().int().nullable().optional(),projectsProcessed:j().int().nullable().optional(),domainsDiscovered:j().int().nullable().optional(),downloadStartedAt:h().nullable().optional(),downloadFinishedAt:h().nullable().optional(),queryStartedAt:h().nullable().optional(),queryFinishedAt:h().nullable().optional(),error:h().nullable().optional(),createdAt:h(),updatedAt:h()});const ZT=k({linkingDomain:h(),numHosts:j().int()}),PT=k({projectId:h(),release:h(),targetDomain:h(),totalLinkingDomains:j().int(),totalHosts:j().int(),top10HostsShare:h(),queriedAt:h(),excludedLinkingDomains:j().int().optional(),excludedHosts:j().int().optional()});k({summary:PT.nullable(),total:j().int(),rows:E(ZT)});k({release:h(),totalLinkingDomains:j().int(),totalHosts:j().int(),top10HostsShare:h(),queriedAt:h()});k({duckdbInstalled:ye(),duckdbVersion:h().nullable().optional(),duckdbSpec:h(),pluginDir:h()});k({installed:ye(),version:h(),path:h(),alreadyPresent:ye()});k({release:h(),vertexUrl:h(),edgesUrl:h(),vertexBytes:j().int().nullable(),edgesBytes:j().int().nullable(),lastModified:h().nullable()});k({release:h(),syncStatus:Ff.nullable(),bytes:j().int(),lastUsedAt:h().nullable()});se(["snapshot","insight"]);const KT=k({kind:Zt("snapshot"),id:h(),runId:h(),query:h(),provider:h(),model:h().nullable(),citationState:ji,matchedField:se(["answerText","citedDomains","searchQueries","query"]),snippet:h(),createdAt:h()}),QT=k({kind:Zt("insight"),id:h(),runId:h().nullable(),type:se(["regression","gain","opportunity","first-citation","provider-pickup","persistent-gap","competitor-gained","competitor-lost"]),severity:se(["critical","high","medium","low"]),title:h(),query:h(),provider:h(),matchedField:se(["title","query","recommendation","cause"]),snippet:h(),dismissed:ye(),createdAt:h()}),YT=Wv("kind",[KT,QT]);k({query:h(),totalHits:j().int().nonnegative(),truncated:ye(),hits:E(YT)});const p0=se(["create","expand","refresh","add-schema"]);p0.enum;function SM(e){switch(e){case"create":return"Create";case"expand":return"Expand";case"refresh":return"Refresh";case"add-schema":return"Add schema"}}const m0=se(["gsc","competitor-evidence","both"]);m0.enum;const h0=se(["high","medium","low"]);h0.enum;const XT=se(["blog-post","comparison","listicle","how-to","guide","glossary"]);XT.enum;const g0=se(["proposed","briefed","payload-generated","draft-created","published","validated","dismissed"]);g0.enum;const JT=k({url:h(),gscImpressions:j().nonnegative(),gscClicks:j().nonnegative(),gscAvgPosition:j().nonnegative().nullable(),organicSessions:j().nonnegative()}),FT=k({domain:h(),url:h(),title:h(),citationCount:j().int().nonnegative()}),WT=k({demand:j(),competitor:j(),absence:j(),gapSeverity:j()}),eE=k({actionId:h(),state:g0,lastUpdated:h()}),y0=k({targetRef:h(),query:h(),action:p0,ourBestPage:JT.nullable(),winningCompetitor:FT.nullable(),score:j(),scoreBreakdown:WT,drivers:E(h()),demandSource:m0,actionConfidence:h0,existingAction:eE.nullable()});k({targets:E(y0),contextMetrics:k({totalAiReferralSessions:j().int().nonnegative(),latestRunId:h(),runTimestamp:h()})});const tE=k({targetRef:h(),addressedUrl:h().nullable(),note:h().nullable(),dismissedAt:h()});k({dismissals:E(tE)});k({targetRef:h().min(1),addressedUrl:h().url().optional(),note:h().max(500).optional()});k({targetRef:h(),promptVersion:h(),provider:h(),model:h(),responseText:h(),costMillicents:j().int().nonnegative(),generatedAt:h()});k({provider:h().optional(),model:h().optional(),forceRefresh:ye().optional()});const nE=k({uri:h(),title:h(),domain:h(),isOurDomain:ye(),isCompetitor:ye(),citationCount:j().int().nonnegative(),providers:E(ha)}),b0=k({query:h(),groundingSources:E(nE)});k({sources:E(b0),latestRunId:h()});const v0=k({query:h(),competitorDomains:E(h()),competitorCount:j().int().nonnegative(),missRate:j().min(0).max(1),lastSeenInRunId:h()});k({gaps:E(v0),latestRunId:h()});const S0=se(["ok","warn","fail","skipped"]);S0.enum;const Wf=se(["global","project"]);Wf.enum;const x0=se(["auth","config","providers","integrations","database","schedules","agent"]);x0.enum;const aE=k({id:h(),category:x0,scope:Wf,title:h(),status:S0,code:h().describe('Stable machine-readable code (e.g. "google.token.refresh-failed"). Use this for filtering and remediation logic.'),summary:h(),remediation:h().nullable().optional().describe('Operator-facing next step. Null when status is "ok" or no specific remediation applies.'),details:Zn(h(),wi()).optional().describe("Structured context — principal email, redirect URI, missing scopes, etc. Stable per check id."),durationMs:j().int().nonnegative().describe("How long the check took to execute.")});k({scope:Wf,project:h().nullable().describe('Project name when scope is "project", null otherwise.'),generatedAt:h().describe("ISO-8601 timestamp when this doctor run started."),durationMs:j().int().nonnegative(),summary:k({total:j().int().nonnegative(),ok:j().int().nonnegative(),warn:j().int().nonnegative(),fail:j().int().nonnegative(),skipped:j().int().nonnegative()}),checks:E(aE)});const iE=k({provider:h(),citationState:ji,cited:ye(),mentioned:ye(),runId:h(),runCreatedAt:h()}),sE=k({queryId:h(),query:h(),providers:E(iE),citedCount:j().int().nonnegative(),mentionedCount:j().int().nonnegative(),totalProviders:j().int().nonnegative()}),rE=k({queryId:h(),query:h(),provider:h(),citingCompetitors:E(h()),runId:h(),runCreatedAt:h()}),oE=k({providersConfigured:j().int().nonnegative(),providersCiting:j().int().nonnegative(),providersMentioning:j().int().nonnegative(),totalQueries:j().int().nonnegative(),queriesCitedAndMentioned:j().int().nonnegative(),queriesCitedOnly:j().int().nonnegative(),queriesMentionedOnly:j().int().nonnegative(),queriesInvisible:j().int().nonnegative(),latestRunId:h().nullable(),latestRunAt:h().nullable()});k({summary:oE,byQuery:E(sE),competitorGaps:E(rE),status:se(["ready","no-data"]),reason:se(["no-runs-yet","no-queries"]).optional()});const lE=se(["prompt","request-param","browser-geo","ignored"]),cE=k({label:h(),city:h(),region:h(),country:h(),otherConfiguredLabels:E(h())}),uE=k({provider:h(),treatment:lE,description:h()}),dE=k({generatedAt:h(),project:k({id:h(),name:h(),displayName:h(),canonicalDomain:h(),country:h(),language:h()}),location:cE.nullable(),providerLocationHandling:E(uE),periodStart:h().nullable(),periodEnd:h().nullable()}),fE=k({citationRate:j(),citedQueryCount:j(),totalQueryCount:j(),mentionRate:j(),mentionedQueryCount:j(),trend:se(["up","down","flat","unknown"]),queryCount:j(),competitorCount:j(),providerCount:j(),gsc:k({clicks:j(),impressions:j(),ctr:j(),avgPosition:j(),periodStart:h(),periodEnd:h()}).nullable(),ga:k({sessions:j(),users:j(),periodStart:h(),periodEnd:h()}).nullable(),findings:E(k({title:h(),detail:h(),tone:se(["positive","caution","negative","neutral"])}))}),pE=k({citationState:se(["cited","not-cited","pending"]),answerMentioned:ye().nullable(),model:h().nullable()}),mE=k({queries:E(h()),providers:E(h()),matrix:E(E(pE.nullable())),providerRates:E(k({provider:h(),citedCount:j(),totalCount:j(),citationRate:j()}))}),hE=k({domain:h(),citationCount:j(),totalCount:j(),pressureLabel:se(["High","Moderate","Low","None"]),citedQueries:E(h()),sharePct:j(),theirCitedPages:E(k({url:h(),citedFor:E(h())}))}),gE=k({projectCitationCount:j(),competitors:E(hE)}),yE=k({domain:h(),mentionCount:j(),totalCount:j(),pressureLabel:se(["High","Moderate","Low","None"]),mentionedQueries:E(h()),sharePct:j()}),bE=k({projectMentionCount:j(),totalAnswerSnapshots:j(),competitors:E(yE)}),vE=k({category:h(),label:h(),count:j(),sharePct:j()}),SE=k({categories:E(vE),topDomains:E(k({domain:h(),count:j(),isCompetitor:ye()}))}),xE=k({query:h(),clicks:j(),impressions:j(),ctr:j(),avgPosition:j(),category:se(["brand","lead-gen","industry","other"])}),wE=k({periodStart:h(),periodEnd:h(),totalClicks:j(),totalImpressions:j(),ctr:j(),avgPosition:j(),topQueries:E(xE),categoryBreakdown:E(k({category:se(["brand","lead-gen","industry","other"]),clicks:j(),impressions:j(),sharePct:j()})),trend:E(k({date:h(),clicks:j(),impressions:j()})),trackedButNoGsc:E(h()),gscButNotTracked:E(h())}),jE=k({totalSessions:j(),totalUsers:j(),totalOrganicSessions:j(),periodStart:h(),periodEnd:h(),topLandingPages:E(k({page:h(),sessions:j(),users:j(),organicSessions:j()})),channelBreakdown:E(k({channel:h(),sessions:j(),sharePct:j()}))}),NE=k({totalSessions:j(),organicSessions:j(),paidSessions:j(),channels:E(k({channelGroup:h(),sessions:j(),sharePct:j()})),topCampaigns:E(k({source:h(),medium:h(),sessions:j()}))}),kE=k({totalSessions:j(),totalUsers:j(),bySource:E(k({source:h(),sessions:j(),users:j(),sharePct:j()})),trend:E(k({date:h(),sessions:j()})),topLandingPages:E(k({page:h(),sessions:j(),users:j()}))}),AE=k({windowStart:h(),windowEnd:h(),hasData:ye(),verifiedCrawlerHits:k({current:j(),prior:j(),deltaPct:j().nullable()}),unverifiedCrawlerHits:k({current:j(),prior:j(),deltaPct:j().nullable()}),aiUserFetchHits:k({current:j(),prior:j(),deltaPct:j().nullable()}),referralArrivals:k({current:j(),prior:j(),deltaPct:j().nullable()}),byOperator:E(k({operator:h(),verifiedHits:j(),unverifiedHits:j(),userFetchHits:j(),referralArrivals:j(),deltaPct:j().nullable()})),topCrawledPaths:E(k({path:h(),verifiedHits:j(),distinctOperators:j()})),referralProducts:E(k({product:h(),arrivals:j(),distinctLandingPaths:j()})),dailyTrend:E(k({date:h(),verifiedCrawlerHits:j(),userFetchHits:j(),referralArrivals:j()})),topReferralLandingPaths:E(k({path:h(),arrivals:j(),distinctProducts:j()}))}),_E=k({provider:se(["google","bing"]).nullable(),total:j(),indexed:j(),notIndexed:j(),deindexed:j(),unknown:j(),indexedPct:j()}),zE=k({runId:h(),date:h(),citationRate:j(),citedQueryCount:j(),totalQueryCount:j(),mentionRate:j(),mentionedQueryCount:j(),providerRates:E(k({provider:h(),citationRate:j()}))}),xf=k({id:h(),type:se(["regression","gain","opportunity"]),severity:se(["critical","high","medium","low"]),title:h(),query:h(),provider:h(),recommendation:h().nullable(),createdAt:h(),instanceCount:j()}),CE=k({horizon:se(["immediate","short-term","medium-term"]),title:h(),rationale:h()}),Yr=k({current:j(),prior:j(),deltaAbs:j(),direction:se(["up","down","flat"]),window:j().optional()}),TE=k({provider:h(),current:j(),prior:j(),deltaAbs:j(),direction:se(["up","down","flat"])}),EE=k({enoughHistory:ye(),headline:h(),citationRate:Yr.nullable(),mentionRate:Yr.nullable(),citedQueryCount:Yr.nullable(),gscClicksDelta:Yr.nullable(),aiReferralsDelta:Yr.nullable(),providerMovements:E(TE),wins:E(xf),regressions:E(xf)});se(["agency","client"]);const OE=se(["agency","client","both"]),DE=se(["immediate","short-term","medium-term"]),RE=se(["high","medium","low"]);se(["positive","caution","negative","neutral"]);const ME=se(["content","competitors","provider","search-demand","indexing","location","monitoring"]),ep=k({audience:OE,priority:j(),horizon:DE,category:ME,title:h(),action:h(),why:E(h()),evidence:E(h()),successMetric:h(),confidence:RE,targetRef:h().optional()}),BE=k({headline:h(),overview:h(),actionItems:E(ep),confidenceNotes:E(h())}),LE=k({title:h(),detail:h(),severity:se(["positive","caution","negative","neutral"]),evidence:E(h())}),qE=k({priorities:E(ep),diagnostics:E(LE)});function xM(e){return e.horizon==="immediate"?"negative":e.confidence==="high"?"caution":e.confidence==="low"?"neutral":"caution"}function wM(e){switch(e){case"critical":return"Critical";case"high":return"High";case"medium":return"Medium";case"low":return"Low"}}function jM(e){switch(e){case"immediate":return"Immediate";case"short-term":return"Short term";case"medium-term":return"Medium term"}}function NM(e){switch(e){case"content":return"Content";case"competitors":return"Competitors";case"provider":return"Provider";case"search-demand":return"Search demand";case"indexing":return"Indexing";case"location":return"Location";case"monitoring":return"Monitoring"}}function kM(e){switch(e){case"high":return"High";case"medium":return"Medium";case"low":return"Low"}}k({meta:dE,executiveSummary:fE,citationScorecard:mE,competitorLandscape:gE,mentionLandscape:bE,aiSourceOrigin:SE,gsc:wE.nullable(),ga:jE.nullable(),socialReferrals:NE.nullable(),aiReferrals:kE.nullable(),serverActivity:AE.nullable(),indexingHealth:_E.nullable(),citationsTrend:E(zE),whatsChanged:EE,insights:E(xf),recommendedNextSteps:E(CE),actionPlan:E(ep),clientSummary:BE,agencyDiagnostics:qE,contentOpportunities:E(y0),contentGaps:E(v0),groundingSources:E(b0)});const UE=se(["claude","codex"]);UE.enum;const $E=se(["claude","codex","all"]);$E.enum;const tp=se(["cloud-run","wordpress","cloudflare","vercel","generic-log"]);tp.enum;const VE=se(["raw-request-events","aggregate-request-metrics","request-url","status-code","user-agent","remote-ip","referer","cursor-pull"]);VE.enum;const GE=se(["raw-request","aggregate-bucket"]),IE=GE.enum,HE=se(["observed","provider-aggregated","inferred"]),ZE=HE.enum,PE=k({type:h().nullable(),labels:Zn(h(),h())}),KE=k({sourceType:tp,evidenceKind:Zt(IE["raw-request"]),confidence:Zt(ZE.observed),eventId:h().min(1),observedAt:h().min(1),method:h().nullable(),requestUrl:h().nullable(),host:h().nullable(),path:h().min(1),queryString:h().nullable(),status:j().int().nullable(),userAgent:h().nullable(),remoteIp:h().nullable(),referer:h().nullable(),latencyMs:j().nullable(),requestSizeBytes:j().int().nullable(),responseSizeBytes:j().int().nullable(),providerResource:PE,providerLabels:Zn(h(),h())});k({events:E(KE),rawEntryCount:j().int().nonnegative(),skippedEntryCount:j().int().nonnegative(),nextPageToken:h().optional(),filter:h()});const w0=se(["connected","paused","error","archived"]),AM=w0.enum,j0=se(["oauth","service-account"]);j0.enum;const QE=se(["verified","claimed_unverified","unknown_ai_like"]);QE.enum;k({gcpProjectId:h().min(1),serviceName:h().nullable().optional(),location:h().nullable().optional(),authMode:j0});k({baseUrl:h().url(),username:h().min(1)});const np=se(["production","preview"]);np.enum;k({projectId:h().min(1),teamId:h().min(1),environment:np});const N0=k({id:h(),projectId:h(),sourceType:tp,displayName:h(),status:w0,lastSyncedAt:h().nullable(),lastCursor:h().nullable(),lastError:h().nullable(),archivedAt:h().nullable(),config:Zn(h(),wi()),createdAt:h(),updatedAt:h()});k({gcpProjectId:h().min(1),serviceName:h().min(1).optional(),location:h().min(1).optional(),displayName:h().min(1).optional(),keyJson:h().optional()});k({baseUrl:h().url(),username:h().min(1),applicationPassword:h().min(1),displayName:h().min(1).optional()});k({projectId:h().min(1),teamId:h().min(1),token:h().min(1),environment:np.optional(),displayName:h().min(1).optional()});k({sourceId:h(),runId:h(),syncedAt:h(),pulledEvents:j().int().nonnegative(),crawlerHits:j().int().nonnegative(),aiUserFetchHits:j().int().nonnegative(),aiReferralHits:j().int().nonnegative(),unknownHits:j().int().nonnegative(),crawlerBucketRows:j().int().nonnegative(),aiUserFetchBucketRows:j().int().nonnegative(),aiReferralBucketRows:j().int().nonnegative(),sampleRows:j().int().nonnegative(),windowStart:h(),windowEnd:h()});k({days:j().int().positive().optional()});k({sourceId:h(),runId:h(),status:yc,windowStart:h(),windowEnd:h(),daysRequested:j().int().positive(),daysApplied:j().int().positive()});const YE=k({crawlerHits:j().int().nonnegative(),aiUserFetchHits:j().int().nonnegative(),aiReferralHits:j().int().nonnegative(),sampleCount:j().int().nonnegative()});k({sources:E(N0)});const XE=N0.extend({totals24h:YE,latestRun:k({runId:h(),status:yc,startedAt:h().nullable(),finishedAt:h().nullable(),error:h().nullable()}).nullable()});k({sources:E(XE)});const JE=se(["crawler","ai-user-fetch","ai-referral"]),ap=JE.enum,FE=k({kind:Zt(ap.crawler),sourceId:h(),tsHour:h(),botId:h(),operator:h(),verificationStatus:h(),pathNormalized:h(),status:j().int(),hits:j().int().nonnegative()}),WE=k({kind:Zt(ap["ai-user-fetch"]),sourceId:h(),tsHour:h(),botId:h(),operator:h(),verificationStatus:h(),pathNormalized:h(),status:j().int(),hits:j().int().nonnegative()}),eO=k({kind:Zt(ap["ai-referral"]),sourceId:h(),tsHour:h(),product:h(),operator:h(),sourceDomain:h(),evidenceType:h(),landingPathNormalized:h(),status:j().int(),hits:j().int().nonnegative()}),tO=Wv("kind",[FE,WE,eO]);k({windowStart:h(),windowEnd:h(),totals:k({crawlerHits:j().int().nonnegative(),aiUserFetchHits:j().int().nonnegative(),aiReferralHits:j().int().nonnegative()}),events:E(tO)});const ip=se(["cited","aspirational","wasted-surface"]),fb=ip.enum;fb.cited,fb.aspirational;const sp=se(["direct-competitor","ota-aggregator","editorial-media","other","unknown"]),nO=sp.enum;nO["direct-competitor"];const rp=se(["queued","seeding","probing","completed","failed"]);rp.enum;const k0=k({domain:h().min(1),hits:j().int().positive(),competitorType:sp.default("unknown")}),aO=k({id:h(),sessionId:h(),projectId:h(),query:h(),bucket:ip.nullable().default(null),citationState:ji,citedDomains:E(h()).default([]),createdAt:h()}),iO=k({id:h(),projectId:h(),status:rp,icpDescription:h().nullable().optional(),seedProvider:h().nullable().optional(),seedCountRaw:j().int().nullable().optional(),seedCount:j().int().nullable().optional(),dedupThreshold:j().nullable().optional(),probeCount:j().int().nullable().optional(),citedCount:j().int().nullable().default(null),aspirationalCount:j().int().nullable().default(null),wastedCount:j().int().nullable().default(null),competitorMap:E(k0).default([]),error:h().nullable().optional(),startedAt:h().nullable().optional(),finishedAt:h().nullable().optional(),createdAt:h()});iO.extend({probes:E(aO).default([])});const sO=500;k({icpDescription:h().min(1).optional(),dedupThreshold:j().min(0).max(1).optional(),maxProbes:j().int().positive().max(sO).optional(),locations:E(h().min(1)).optional()});k({buckets:E(ip).min(1).optional(),includeCompetitors:ye().optional(),competitorTypes:E(sp).min(1).optional()});k({sessionId:h(),projectId:h(),status:rp,queriesByBucket:k({cited:E(h()),aspirational:E(h()),"wasted-surface":E(h())}),suggestedCompetitors:E(k0)});k({sessionId:h(),projectId:h(),promoted:k({queries:E(h()),competitors:E(h())}),skipped:k({queries:E(h()),competitors:E(h())})});Fv([Zt("cli"),h().regex(/^discovery:.+$/)]);var rO=(e=>(e.Clicks="clicks",e.Impressions="impressions",e.CTR="ctr",e.Position="position",e))(rO||{});const _M={clicks:"Clicks",impressions:"Impressions",ctr:"CTR",position:"Position"},zM={clicks:"Clicks",impressions:"Impr",ctr:"CTR",position:"Pos"},CM=Yf;function oO(e){const n=[];if(e.message&&n.push(e.message),e.providers)for(const[i,r]of Object.entries(e.providers)){const l=`[${i}] ${r.message}`;r.raw!==void 0?n.push(`${l}
52
+ 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]){c(d);continue}if(e.external){const b=e.external.registry.get(d[0])?.id;if(n!==d[0]&&b){c(d);continue}}if(e.metadataRegistry.get(d[0])?.id){c(d);continue}if(m.cycle){c(d);continue}if(m.count>1&&e.reused==="ref"){c(d);continue}}}function Kv(e,n){const i=e.seen.get(n);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=d=>{const m=e.seen.get(d);if(m.ref===null)return;const g=m.def??m.schema,b={...g},v=m.ref;if(m.ref=null,v){r(v);const w=e.seen.get(v),_=w.schema;if(_.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(g.allOf=g.allOf??[],g.allOf.push(_)):Object.assign(g,_),Object.assign(g,b),d._zod.parent===v)for(const N in g)N==="$ref"||N==="allOf"||N in b||delete g[N];if(_.$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]}const S=d._zod.parent;if(S&&S!==v){r(S);const w=e.seen.get(S);if(w?.schema.$ref&&(g.$ref=w.schema.$ref,w.def))for(const _ in g)_==="$ref"||_==="allOf"||_ in w.def&&JSON.stringify(g[_])===JSON.stringify(w.def[_])&&delete g[_]}e.override({zodSchema:d,jsonSchema:g,path:m.path??[]})};for(const d of[...e.seen.entries()].reverse())r(d[0]);const l={};if(e.target==="draft-2020-12"?l.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?l.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?l.$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");l.$id=e.external.uri(d)}Object.assign(l,i.def??i.schema);const c=e.external?.defs??{};for(const d of e.seen.entries()){const m=d[1];m.def&&m.defId&&(c[m.defId]=m.def)}e.external||Object.keys(c).length>0&&(e.target==="draft-2020-12"?l.$defs=c:l.definitions=c);try{const d=JSON.parse(JSON.stringify(l));return Object.defineProperty(d,"~standard",{value:{...n["~standard"],jsonSchema:{input:nc(n,"input",e.processors),output:nc(n,"output",e.processors)}},enumerable:!1,writable:!1}),d}catch{throw new Error("Error converting schema to JSON.")}}function Vt(e,n){const i=n??{seen:new Set};if(i.seen.has(e))return!1;i.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return Vt(r.element,i);if(r.type==="set")return Vt(r.valueType,i);if(r.type==="lazy")return Vt(r.getter(),i);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return Vt(r.innerType,i);if(r.type==="intersection")return Vt(r.left,i)||Vt(r.right,i);if(r.type==="record"||r.type==="map")return Vt(r.keyType,i)||Vt(r.valueType,i);if(r.type==="pipe")return Vt(r.in,i)||Vt(r.out,i);if(r.type==="object"){for(const l in r.shape)if(Vt(r.shape[l],i))return!0;return!1}if(r.type==="union"){for(const l of r.options)if(Vt(l,i))return!0;return!1}if(r.type==="tuple"){for(const l of r.items)if(Vt(l,i))return!0;return!!(r.rest&&Vt(r.rest,i))}return!1}const lz=(e,n={})=>i=>{const r=Zv({...i,processors:n});return Nt(e,r),Pv(r,e),Kv(r,e)},nc=(e,n,i={})=>r=>{const{libraryOptions:l,target:c}=r??{},d=Zv({...l??{},target:c,io:n,processors:i});return Nt(e,d),Pv(d,e),Kv(d,e)},cz={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},uz=(e,n,i,r)=>{const l=i;l.type="string";const{minimum:c,maximum:d,format:m,patterns:g,contentEncoding:b}=e._zod.bag;if(typeof c=="number"&&(l.minLength=c),typeof d=="number"&&(l.maxLength=d),m&&(l.format=cz[m]??m,l.format===""&&delete l.format,m==="time"&&delete l.format),b&&(l.contentEncoding=b),g&&g.size>0){const v=[...g];v.length===1?l.pattern=v[0].source:v.length>1&&(l.allOf=[...v.map(S=>({...n.target==="draft-07"||n.target==="draft-04"||n.target==="openapi-3.0"?{type:"string"}:{},pattern:S.source}))])}},dz=(e,n,i,r)=>{const l=i,{minimum:c,maximum:d,format:m,multipleOf:g,exclusiveMaximum:b,exclusiveMinimum:v}=e._zod.bag;typeof m=="string"&&m.includes("int")?l.type="integer":l.type="number",typeof v=="number"&&(n.target==="draft-04"||n.target==="openapi-3.0"?(l.minimum=v,l.exclusiveMinimum=!0):l.exclusiveMinimum=v),typeof c=="number"&&(l.minimum=c,typeof v=="number"&&n.target!=="draft-04"&&(v>=c?delete l.minimum:delete l.exclusiveMinimum)),typeof b=="number"&&(n.target==="draft-04"||n.target==="openapi-3.0"?(l.maximum=b,l.exclusiveMaximum=!0):l.exclusiveMaximum=b),typeof d=="number"&&(l.maximum=d,typeof b=="number"&&n.target!=="draft-04"&&(b<=d?delete l.maximum:delete l.exclusiveMaximum)),typeof g=="number"&&(l.multipleOf=g)},fz=(e,n,i,r)=>{i.type="boolean"},pz=(e,n,i,r)=>{i.not={}},mz=(e,n,i,r)=>{},hz=(e,n,i,r)=>{const l=e._zod.def,c=Nv(l.entries);c.every(d=>typeof d=="number")&&(i.type="number"),c.every(d=>typeof d=="string")&&(i.type="string"),i.enum=c},gz=(e,n,i,r)=>{const l=e._zod.def,c=[];for(const d of l.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");c.push(Number(d))}else c.push(d);if(c.length!==0)if(c.length===1){const d=c[0];i.type=d===null?"null":typeof d,n.target==="draft-04"||n.target==="openapi-3.0"?i.enum=[d]:i.const=d}else c.every(d=>typeof d=="number")&&(i.type="number"),c.every(d=>typeof d=="string")&&(i.type="string"),c.every(d=>typeof d=="boolean")&&(i.type="boolean"),c.every(d=>d===null)&&(i.type="null"),i.enum=c},yz=(e,n,i,r)=>{if(n.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},bz=(e,n,i,r)=>{if(n.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},vz=(e,n,i,r)=>{const l=i,c=e._zod.def,{minimum:d,maximum:m}=e._zod.bag;typeof d=="number"&&(l.minItems=d),typeof m=="number"&&(l.maxItems=m),l.type="array",l.items=Nt(c.element,n,{...r,path:[...r.path,"items"]})},Sz=(e,n,i,r)=>{const l=i,c=e._zod.def;l.type="object",l.properties={};const d=c.shape;for(const b in d)l.properties[b]=Nt(d[b],n,{...r,path:[...r.path,"properties",b]});const m=new Set(Object.keys(d)),g=new Set([...m].filter(b=>{const v=c.shape[b]._zod;return n.io==="input"?v.optin===void 0:v.optout===void 0}));g.size>0&&(l.required=Array.from(g)),c.catchall?._zod.def.type==="never"?l.additionalProperties=!1:c.catchall?c.catchall&&(l.additionalProperties=Nt(c.catchall,n,{...r,path:[...r.path,"additionalProperties"]})):n.io==="output"&&(l.additionalProperties=!1)},xz=(e,n,i,r)=>{const l=e._zod.def,c=l.inclusive===!1,d=l.options.map((m,g)=>Nt(m,n,{...r,path:[...r.path,c?"oneOf":"anyOf",g]}));c?i.oneOf=d:i.anyOf=d},wz=(e,n,i,r)=>{const l=e._zod.def,c=Nt(l.left,n,{...r,path:[...r.path,"allOf",0]}),d=Nt(l.right,n,{...r,path:[...r.path,"allOf",1]}),m=b=>"allOf"in b&&Object.keys(b).length===1,g=[...m(c)?c.allOf:[c],...m(d)?d.allOf:[d]];i.allOf=g},jz=(e,n,i,r)=>{const l=i,c=e._zod.def;l.type="object";const d=c.keyType,g=d._zod.bag?.patterns;if(c.mode==="loose"&&g&&g.size>0){const v=Nt(c.valueType,n,{...r,path:[...r.path,"patternProperties","*"]});l.patternProperties={};for(const S of g)l.patternProperties[S.source]=v}else(n.target==="draft-07"||n.target==="draft-2020-12")&&(l.propertyNames=Nt(c.keyType,n,{...r,path:[...r.path,"propertyNames"]})),l.additionalProperties=Nt(c.valueType,n,{...r,path:[...r.path,"additionalProperties"]});const b=d._zod.values;if(b){const v=[...b].filter(S=>typeof S=="string"||typeof S=="number");v.length>0&&(l.required=v)}},Nz=(e,n,i,r)=>{const l=e._zod.def,c=Nt(l.innerType,n,r),d=n.seen.get(e);n.target==="openapi-3.0"?(d.ref=l.innerType,i.nullable=!0):i.anyOf=[c,{type:"null"}]},kz=(e,n,i,r)=>{const l=e._zod.def;Nt(l.innerType,n,r);const c=n.seen.get(e);c.ref=l.innerType},Az=(e,n,i,r)=>{const l=e._zod.def;Nt(l.innerType,n,r);const c=n.seen.get(e);c.ref=l.innerType,i.default=JSON.parse(JSON.stringify(l.defaultValue))},_z=(e,n,i,r)=>{const l=e._zod.def;Nt(l.innerType,n,r);const c=n.seen.get(e);c.ref=l.innerType,n.io==="input"&&(i._prefault=JSON.parse(JSON.stringify(l.defaultValue)))},zz=(e,n,i,r)=>{const l=e._zod.def;Nt(l.innerType,n,r);const c=n.seen.get(e);c.ref=l.innerType;let d;try{d=l.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}i.default=d},Cz=(e,n,i,r)=>{const l=e._zod.def,c=n.io==="input"?l.in._zod.def.type==="transform"?l.out:l.in:l.out;Nt(c,n,r);const d=n.seen.get(e);d.ref=c},Tz=(e,n,i,r)=>{const l=e._zod.def;Nt(l.innerType,n,r);const c=n.seen.get(e);c.ref=l.innerType,i.readOnly=!0},Qv=(e,n,i,r)=>{const l=e._zod.def;Nt(l.innerType,n,r);const c=n.seen.get(e);c.ref=l.innerType},Ez=Z("ZodISODateTime",(e,n)=>{OA.init(e,n),dt.init(e,n)});function Oz(e){return q_(Ez,e)}const Dz=Z("ZodISODate",(e,n)=>{DA.init(e,n),dt.init(e,n)});function Rz(e){return $_(Dz,e)}const Mz=Z("ZodISOTime",(e,n)=>{RA.init(e,n),dt.init(e,n)});function Bz(e){return U_(Mz,e)}const Lz=Z("ZodISODuration",(e,n)=>{MA.init(e,n),dt.init(e,n)});function qz(e){return V_(Lz,e)}const $z=(e,n)=>{zv.init(e,n),e.name="ZodError",Object.defineProperties(e,{format:{value:i=>k2(e,i)},flatten:{value:i=>N2(e,i)},addIssue:{value:i=>{e.issues.push(i),e.message=JSON.stringify(e.issues,yf,2)}},addIssues:{value:i=>{e.issues.push(...i),e.message=JSON.stringify(e.issues,yf,2)}},isEmpty:{get(){return e.issues.length===0}}})},An=Z("ZodError",$z,{Parent:Error}),Uz=Hf(An),Vz=Zf(An),Gz=mc(An),Iz=hc(An),Hz=z2(An),Zz=C2(An),Pz=T2(An),Kz=E2(An),Qz=O2(An),Yz=D2(An),Xz=R2(An),Jz=M2(An),ut=Z("ZodType",(e,n)=>(ct.init(e,n),Object.assign(e["~standard"],{jsonSchema:{input:nc(e,"input"),output:nc(e,"output")}}),e.toJSONSchema=lz(e,{}),e.def=n,e.type=n.type,Object.defineProperty(e,"_def",{value:n}),e.check=(...i)=>e.clone(Qa(n,{checks:[...n.checks??[],...i.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),e.with=e.check,e.clone=(i,r)=>Ya(e,i,r),e.brand=()=>e,e.register=((i,r)=>(i.add(e,r),e)),e.parse=(i,r)=>Uz(e,i,r,{callee:e.parse}),e.safeParse=(i,r)=>Gz(e,i,r),e.parseAsync=async(i,r)=>Vz(e,i,r,{callee:e.parseAsync}),e.safeParseAsync=async(i,r)=>Iz(e,i,r),e.spa=e.safeParseAsync,e.encode=(i,r)=>Hz(e,i,r),e.decode=(i,r)=>Zz(e,i,r),e.encodeAsync=async(i,r)=>Pz(e,i,r),e.decodeAsync=async(i,r)=>Kz(e,i,r),e.safeEncode=(i,r)=>Qz(e,i,r),e.safeDecode=(i,r)=>Yz(e,i,r),e.safeEncodeAsync=async(i,r)=>Xz(e,i,r),e.safeDecodeAsync=async(i,r)=>Jz(e,i,r),e.refine=(i,r)=>e.check(HC(i,r)),e.superRefine=i=>e.check(ZC(i)),e.overwrite=i=>e.check(Zs(i)),e.optional=()=>ib(e),e.exactOptional=()=>EC(e),e.nullable=()=>sb(e),e.nullish=()=>ib(sb(e)),e.nonoptional=i=>LC(e,i),e.array=()=>E(e),e.or=i=>Fv([e,i]),e.and=i=>kC(e,i),e.transform=i=>rb(e,CC(i)),e.default=i=>RC(e,i),e.prefault=i=>BC(e,i),e.catch=i=>$C(e,i),e.pipe=i=>rb(e,i),e.readonly=()=>GC(e),e.describe=i=>{const r=e.clone();return eo.add(r,{description:i}),r},Object.defineProperty(e,"description",{get(){return eo.get(e)?.description},configurable:!0}),e.meta=(...i)=>{if(i.length===0)return eo.get(e);const r=e.clone();return eo.add(r,i[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=i=>i(e),e)),Yv=Z("_ZodString",(e,n)=>{Pf.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(r,l,c)=>uz(e,r,l);const i=e._zod.bag;e.format=i.format??null,e.minLength=i.minimum??null,e.maxLength=i.maximum??null,e.regex=(...r)=>e.check(K_(...r)),e.includes=(...r)=>e.check(X_(...r)),e.startsWith=(...r)=>e.check(J_(...r)),e.endsWith=(...r)=>e.check(F_(...r)),e.min=(...r)=>e.check(tc(...r)),e.max=(...r)=>e.check(Iv(...r)),e.length=(...r)=>e.check(Hv(...r)),e.nonempty=(...r)=>e.check(tc(1,...r)),e.lowercase=r=>e.check(Q_(r)),e.uppercase=r=>e.check(Y_(r)),e.trim=()=>e.check(ez()),e.normalize=(...r)=>e.check(W_(...r)),e.toLowerCase=()=>e.check(tz()),e.toUpperCase=()=>e.check(nz()),e.slugify=()=>e.check(az())}),Fz=Z("ZodString",(e,n)=>{Pf.init(e,n),Yv.init(e,n),e.email=i=>e.check(y_(Wz,i)),e.url=i=>e.check(w_(eC,i)),e.jwt=i=>e.check(L_(hC,i)),e.emoji=i=>e.check(j_(tC,i)),e.guid=i=>e.check(Fy(nb,i)),e.uuid=i=>e.check(b_(Ll,i)),e.uuidv4=i=>e.check(v_(Ll,i)),e.uuidv6=i=>e.check(S_(Ll,i)),e.uuidv7=i=>e.check(x_(Ll,i)),e.nanoid=i=>e.check(N_(nC,i)),e.guid=i=>e.check(Fy(nb,i)),e.cuid=i=>e.check(k_(aC,i)),e.cuid2=i=>e.check(A_(iC,i)),e.ulid=i=>e.check(__(sC,i)),e.base64=i=>e.check(R_(fC,i)),e.base64url=i=>e.check(M_(pC,i)),e.xid=i=>e.check(z_(rC,i)),e.ksuid=i=>e.check(C_(oC,i)),e.ipv4=i=>e.check(T_(lC,i)),e.ipv6=i=>e.check(E_(cC,i)),e.cidrv4=i=>e.check(O_(uC,i)),e.cidrv6=i=>e.check(D_(dC,i)),e.e164=i=>e.check(B_(mC,i)),e.datetime=i=>e.check(Oz(i)),e.date=i=>e.check(Rz(i)),e.time=i=>e.check(Bz(i)),e.duration=i=>e.check(qz(i))});function h(e){return g_(Fz,e)}const dt=Z("ZodStringFormat",(e,n)=>{lt.init(e,n),Yv.init(e,n)}),Wz=Z("ZodEmail",(e,n)=>{jA.init(e,n),dt.init(e,n)}),nb=Z("ZodGUID",(e,n)=>{xA.init(e,n),dt.init(e,n)}),Ll=Z("ZodUUID",(e,n)=>{wA.init(e,n),dt.init(e,n)}),eC=Z("ZodURL",(e,n)=>{NA.init(e,n),dt.init(e,n)}),tC=Z("ZodEmoji",(e,n)=>{kA.init(e,n),dt.init(e,n)}),nC=Z("ZodNanoID",(e,n)=>{AA.init(e,n),dt.init(e,n)}),aC=Z("ZodCUID",(e,n)=>{_A.init(e,n),dt.init(e,n)}),iC=Z("ZodCUID2",(e,n)=>{zA.init(e,n),dt.init(e,n)}),sC=Z("ZodULID",(e,n)=>{CA.init(e,n),dt.init(e,n)}),rC=Z("ZodXID",(e,n)=>{TA.init(e,n),dt.init(e,n)}),oC=Z("ZodKSUID",(e,n)=>{EA.init(e,n),dt.init(e,n)}),lC=Z("ZodIPv4",(e,n)=>{BA.init(e,n),dt.init(e,n)}),cC=Z("ZodIPv6",(e,n)=>{LA.init(e,n),dt.init(e,n)}),uC=Z("ZodCIDRv4",(e,n)=>{qA.init(e,n),dt.init(e,n)}),dC=Z("ZodCIDRv6",(e,n)=>{$A.init(e,n),dt.init(e,n)}),fC=Z("ZodBase64",(e,n)=>{UA.init(e,n),dt.init(e,n)}),pC=Z("ZodBase64URL",(e,n)=>{GA.init(e,n),dt.init(e,n)}),mC=Z("ZodE164",(e,n)=>{IA.init(e,n),dt.init(e,n)}),hC=Z("ZodJWT",(e,n)=>{ZA.init(e,n),dt.init(e,n)}),Xv=Z("ZodNumber",(e,n)=>{qv.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(r,l,c)=>dz(e,r,l),e.gt=(r,l)=>e.check(eb(r,l)),e.gte=(r,l)=>e.check(ef(r,l)),e.min=(r,l)=>e.check(ef(r,l)),e.lt=(r,l)=>e.check(Wy(r,l)),e.lte=(r,l)=>e.check(Wd(r,l)),e.max=(r,l)=>e.check(Wd(r,l)),e.int=r=>e.check(ab(r)),e.safe=r=>e.check(ab(r)),e.positive=r=>e.check(eb(0,r)),e.nonnegative=r=>e.check(ef(0,r)),e.negative=r=>e.check(Wy(0,r)),e.nonpositive=r=>e.check(Wd(0,r)),e.multipleOf=(r,l)=>e.check(tb(r,l)),e.step=(r,l)=>e.check(tb(r,l)),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 j(e){return G_(Xv,e)}const gC=Z("ZodNumberFormat",(e,n)=>{PA.init(e,n),Xv.init(e,n)});function ab(e){return I_(gC,e)}const yC=Z("ZodBoolean",(e,n)=>{KA.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(i,r,l)=>fz(e,i,r)});function ye(e){return H_(yC,e)}const bC=Z("ZodUnknown",(e,n)=>{QA.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(i,r,l)=>mz()});function wi(){return Z_(bC)}const vC=Z("ZodNever",(e,n)=>{YA.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(i,r,l)=>pz(e,i,r)});function SC(e){return P_(vC,e)}const xC=Z("ZodArray",(e,n)=>{XA.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(i,r,l)=>vz(e,i,r,l),e.element=n.element,e.min=(i,r)=>e.check(tc(i,r)),e.nonempty=i=>e.check(tc(1,i)),e.max=(i,r)=>e.check(Iv(i,r)),e.length=(i,r)=>e.check(Hv(i,r)),e.unwrap=()=>e.element});function E(e,n){return iz(xC,e,n)}const wC=Z("ZodObject",(e,n)=>{FA.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(i,r,l)=>Sz(e,i,r,l),He(e,"shape",()=>n.shape),e.keyof=()=>se(Object.keys(e._zod.def.shape)),e.catchall=i=>e.clone({...e._zod.def,catchall:i}),e.passthrough=()=>e.clone({...e._zod.def,catchall:wi()}),e.loose=()=>e.clone({...e._zod.def,catchall:wi()}),e.strict=()=>e.clone({...e._zod.def,catchall:SC()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=i=>v2(e,i),e.safeExtend=i=>S2(e,i),e.merge=i=>x2(e,i),e.pick=i=>y2(e,i),e.omit=i=>b2(e,i),e.partial=(...i)=>w2(e0,e,i[0]),e.required=(...i)=>j2(t0,e,i[0])});function k(e,n){const i={type:"object",shape:e??{},...be(n)};return new wC(i)}const Jv=Z("ZodUnion",(e,n)=>{Vv.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(i,r,l)=>xz(e,i,r,l),e.options=n.options});function Fv(e,n){return new Jv({type:"union",options:e,...be(n)})}const jC=Z("ZodDiscriminatedUnion",(e,n)=>{Jv.init(e,n),WA.init(e,n)});function Wv(e,n,i){return new jC({type:"union",options:n,discriminator:e,...be(i)})}const NC=Z("ZodIntersection",(e,n)=>{e_.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(i,r,l)=>wz(e,i,r,l)});function kC(e,n){return new NC({type:"intersection",left:e,right:n})}const AC=Z("ZodRecord",(e,n)=>{t_.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(i,r,l)=>jz(e,i,r,l),e.keyType=n.keyType,e.valueType=n.valueType});function Zn(e,n,i){return new AC({type:"record",keyType:e,valueType:n,...be(i)})}const vf=Z("ZodEnum",(e,n)=>{n_.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(r,l,c)=>hz(e,r,l),e.enum=n.entries,e.options=Object.values(n.entries);const i=new Set(Object.keys(n.entries));e.extract=(r,l)=>{const c={};for(const d of r)if(i.has(d))c[d]=n.entries[d];else throw new Error(`Key ${d} not found in enum`);return new vf({...n,checks:[],...be(l),entries:c})},e.exclude=(r,l)=>{const c={...n.entries};for(const d of r)if(i.has(d))delete c[d];else throw new Error(`Key ${d} not found in enum`);return new vf({...n,checks:[],...be(l),entries:c})}});function se(e,n){const i=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new vf({type:"enum",entries:i,...be(n)})}const _C=Z("ZodLiteral",(e,n)=>{a_.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(i,r,l)=>gz(e,i,r),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 Zt(e,n){return new _C({type:"literal",values:Array.isArray(e)?e:[e],...be(n)})}const zC=Z("ZodTransform",(e,n)=>{i_.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(i,r,l)=>bz(e,i),e._zod.parse=(i,r)=>{if(r.direction==="backward")throw new wv(e.constructor.name);i.addIssue=c=>{if(typeof c=="string")i.issues.push(ro(c,i.value,n));else{const d=c;d.fatal&&(d.continue=!1),d.code??(d.code="custom"),d.input??(d.input=i.value),d.inst??(d.inst=e),i.issues.push(ro(d))}};const l=n.transform(i.value,i);return l instanceof Promise?l.then(c=>(i.value=c,i)):(i.value=l,i)}});function CC(e){return new zC({type:"transform",transform:e})}const e0=Z("ZodOptional",(e,n)=>{Gv.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(i,r,l)=>Qv(e,i,r,l),e.unwrap=()=>e._zod.def.innerType});function ib(e){return new e0({type:"optional",innerType:e})}const TC=Z("ZodExactOptional",(e,n)=>{s_.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(i,r,l)=>Qv(e,i,r,l),e.unwrap=()=>e._zod.def.innerType});function EC(e){return new TC({type:"optional",innerType:e})}const OC=Z("ZodNullable",(e,n)=>{r_.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(i,r,l)=>Nz(e,i,r,l),e.unwrap=()=>e._zod.def.innerType});function sb(e){return new OC({type:"nullable",innerType:e})}const DC=Z("ZodDefault",(e,n)=>{o_.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(i,r,l)=>Az(e,i,r,l),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function RC(e,n){return new DC({type:"default",innerType:e,get defaultValue(){return typeof n=="function"?n():Av(n)}})}const MC=Z("ZodPrefault",(e,n)=>{l_.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(i,r,l)=>_z(e,i,r,l),e.unwrap=()=>e._zod.def.innerType});function BC(e,n){return new MC({type:"prefault",innerType:e,get defaultValue(){return typeof n=="function"?n():Av(n)}})}const t0=Z("ZodNonOptional",(e,n)=>{c_.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(i,r,l)=>kz(e,i,r,l),e.unwrap=()=>e._zod.def.innerType});function LC(e,n){return new t0({type:"nonoptional",innerType:e,...be(n)})}const qC=Z("ZodCatch",(e,n)=>{u_.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(i,r,l)=>zz(e,i,r,l),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function $C(e,n){return new qC({type:"catch",innerType:e,catchValue:typeof n=="function"?n:()=>n})}const UC=Z("ZodPipe",(e,n)=>{d_.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(i,r,l)=>Cz(e,i,r,l),e.in=n.in,e.out=n.out});function rb(e,n){return new UC({type:"pipe",in:e,out:n})}const VC=Z("ZodReadonly",(e,n)=>{f_.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(i,r,l)=>Tz(e,i,r,l),e.unwrap=()=>e._zod.def.innerType});function GC(e){return new VC({type:"readonly",innerType:e})}const IC=Z("ZodCustom",(e,n)=>{p_.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(i,r,l)=>yz(e,i)});function HC(e,n={}){return sz(IC,e,n)}function ZC(e){return rz(e)}const PC=k({maxConcurrency:j().int().positive(),maxRequestsPerMinute:j().int().positive(),maxRequestsPerDay:j().int().positive()}),ha=h().min(1);h().min(1);const Kf=k({label:h().min(1),city:h().min(1),region:h().min(1),country:h().length(2),timezone:h().optional()}),Qf=se(["citation.lost","citation.gained","run.completed","run.failed","insight.critical","insight.high"]);k({id:h(),projectId:h(),channel:Zt("webhook"),url:h().url(),urlDisplay:h(),urlHost:h(),events:E(Qf),enabled:ye().default(!0),source:h().optional(),webhookSecret:h().optional(),createdAt:h(),updatedAt:h()});k({channel:Zt("webhook"),url:h().url(),events:E(Qf).min(1),source:h().optional()});const n0=se(["cli","api","config-file"]);function KC(e){const n=new Set,i=new Set;for(const r of e){if(n.has(r.label)){i.add(r.label);continue}n.add(r.label)}return[...i]}function QC(e,n){return n?e.some(i=>i.label===n):!0}k({displayName:h().min(1),canonicalDomain:h().min(1),ownedDomains:E(h().min(1)).optional(),aliases:E(h()).optional(),country:h().length(2),language:h().min(2),tags:E(h()).optional(),labels:Zn(h(),h()).optional(),providers:E(ha).optional(),locations:E(Kf).optional(),defaultLocation:h().nullable().optional(),autoExtractBacklinks:ye().optional(),configSource:n0.optional()});k({id:h(),name:h(),displayName:h().optional(),canonicalDomain:h(),ownedDomains:E(h()).default([]),aliases:E(h()).default([]),country:h().length(2),language:h().min(2),tags:E(h()).default([]),labels:Zn(h(),h()).default({}),providers:E(h()).default([]),locations:E(Kf).default([]),defaultLocation:h().nullable().optional(),autoExtractBacklinks:ye().default(!1),configSource:n0.default("cli"),configRevision:j().int().positive().default(1),createdAt:h().optional(),updatedAt:h().optional()});k({id:h(),query:h(),createdAt:h()});k({id:h(),keyword:h(),createdAt:h()});k({queries:E(h().trim().min(1)).min(1)});k({keywords:E(h().trim().min(1)).min(1)});k({provider:ha,count:j().int().min(1).max(20).optional()});k({id:h(),domain:h(),createdAt:h()});k({competitors:E(h().trim().min(1)).min(1)});function ac(e){let n=e.trim().toLowerCase();try{n.includes("://")&&(n=new URL(n).hostname.toLowerCase())}catch{}return n.replace(/^www\./,"")}const YC=new Set(["ac.uk","co.id","co.il","co.in","co.jp","co.kr","co.nz","co.th","co.uk","co.za","com.au","com.br","com.cn","com.mx","com.ph","com.sg","com.tr","edu.au","edu.sg","gov.au","gov.uk","me.uk","ne.jp","net.au","net.br","net.cn","net.in","net.tr","or.jp","or.kr","org.au","org.br","org.in","org.nz","org.tr","org.uk","org.za"]);function XC(e){const n=ac(e);if(!n)return"";const i=n.split("/")[0]?.split(":")[0]??"";if(!i)return"";const r=i.split(".").filter(Boolean);if(r.length<2)return"";if(r.length===2)return r.join(".");const l=r.slice(-2).join(".");return YC.has(l)?r.length>=3?r.slice(-3).join("."):"":r.slice(-2).join(".")}function JC(e){const n=XC(e);return n?n.split(".")[0]??"":""}function FC(e){const n=[e.canonicalDomain,...e.ownedDomains??[]],i=new Set,r=[];for(const l of n){const c=l.trim();if(!c)continue;const d=ac(c);i.has(d)||(i.add(d),r.push(c))}return r}const WC=k({name:h().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:Zn(h(),h()).optional().default({})}),eT=k({preset:h().optional(),cron:h().optional(),timezone:h().optional().default("UTC"),providers:E(ha).optional().default([])}).refine(e=>e.preset&&!e.cron||!e.preset&&e.cron,{message:'Exactly one of "preset" or "cron" must be provided'}).optional(),tT=k({channel:Zt("webhook"),url:h().url(),events:E(Qf).min(1)}),nT=k({gsc:k({propertyUrl:h()}).optional(),syncSchedule:k({preset:h().optional(),cron:h().optional()}).optional()}).optional(),ob=E(h().min(1)),aT=k({displayName:h().min(1),canonicalDomain:h().min(1),ownedDomains:E(h().min(1)).optional().default([]),aliases:E(h().min(1)).optional().default([]),country:h().length(2),language:h().min(2),queries:ob.optional(),keywords:ob.optional(),competitors:E(h().min(1)).optional().default([]),providers:E(ha).optional().default([]),locations:E(Kf).optional().default([]),defaultLocation:h().optional(),schedule:eT,notifications:E(tT).optional().default([]),google:nT,autoExtractBacklinks:ye().optional().default(!1)}).superRefine((e,n)=>{e.queries!==void 0&&e.keywords!==void 0&&n.addIssue({code:"custom",message:"Use spec.queries; spec.keywords is accepted only as a legacy alias when spec.queries is omitted",path:["keywords"]});const i=KC(e.locations);i.length>0&&n.addIssue({code:"custom",message:`Duplicate location labels are not allowed: ${i.join(", ")}`,path:["locations"]}),QC(e.locations,e.defaultLocation)||n.addIssue({code:"custom",message:`defaultLocation "${e.defaultLocation}" must match a configured location label`,path:["defaultLocation"]})});k({apiVersion:Zt("canonry/v1"),kind:Zt("Project"),metadata:WC,spec:aT});const iT=se(["gsc","ga4"]);k({id:h(),domain:h(),connectionType:iT,propertyId:h().nullable().optional(),sitemapUrl:h().nullable().optional(),scopes:E(h()).default([]),createdAt:h(),updatedAt:h()});k({date:h(),query:h(),page:h(),country:h().nullable().optional(),device:h().nullable().optional(),clicks:j(),impressions:j(),ctr:j(),position:j()});const sT=k({date:h(),clicks:j(),impressions:j(),ctr:j()});k({totals:k({clicks:j(),impressions:j(),ctr:j(),days:j()}),daily:E(sT)});const Sf=k({id:h(),url:h(),indexingState:h().nullable().optional(),verdict:h().nullable().optional(),coverageState:h().nullable().optional(),pageFetchState:h().nullable().optional(),robotsTxtState:h().nullable().optional(),crawlTime:h().nullable().optional(),lastCrawlResult:h().nullable().optional(),isMobileFriendly:ye().nullable().optional(),richResults:E(h()).default([]),referringUrls:E(h()).default([]),inspectedAt:h()});se(["stable","reindexed","deindexed","still-missing","new"]);const rT=k({url:h(),previousState:h().nullable(),currentState:h().nullable(),transitionDate:h()}),oT=k({reason:h(),count:j(),urls:E(Sf).default([])});k({summary:k({total:j(),indexed:j(),notIndexed:j(),deindexed:j(),percentage:j()}),lastInspectedAt:h().nullable(),lastSyncedAt:h().nullable(),indexed:E(Sf).default([]),notIndexed:E(Sf).default([]),deindexed:E(rT).default([]),reasonGroups:E(oT).default([])});k({url:h(),type:se(["URL_UPDATED","URL_DELETED"]),notifiedAt:h()});const lT=k({url:h(),type:se(["URL_UPDATED","URL_DELETED"]),notifiedAt:h(),status:se(["success","error"]),error:h().optional()});k({summary:k({total:j().int().nonnegative(),succeeded:j().int().nonnegative(),failed:j().int().nonnegative()}),results:E(lT).default([])});k({date:h(),indexed:j(),notIndexed:j(),reasonBreakdown:Zn(h(),j()).default({})});const cT=k({siteUrl:h(),permissionLevel:h()});k({sites:E(cT).default([])});const uT=k({type:h(),submitted:h(),indexed:h()}),dT=k({path:h(),lastSubmitted:h().optional(),isPending:ye().optional(),isSitemapsIndex:ye().optional(),type:h().optional(),lastDownloaded:h().optional(),warnings:h().optional(),errors:h().optional(),contents:E(uT).optional()});k({sitemaps:E(dT).default([])});k({id:h(),domain:h(),siteUrl:h().nullable().optional(),createdAt:h(),updatedAt:h()});const tf=k({id:h(),url:h(),httpCode:j().nullable().optional(),inIndex:ye().nullable().optional(),lastCrawledDate:h().nullable().optional(),inIndexDate:h().nullable().optional(),inspectedAt:h(),documentSize:j().nullable().optional(),anchorCount:j().nullable().optional(),discoveryDate:h().nullable().optional()});k({summary:k({total:j(),indexed:j(),notIndexed:j(),unknown:j().optional(),percentage:j()}),lastInspectedAt:h().nullable(),indexed:E(tf).default([]),notIndexed:E(tf).default([]),unknown:E(tf).default([]).optional()});k({query:h(),impressions:j(),clicks:j(),ctr:j(),averagePosition:j()});k({date:h(),indexed:j(),notIndexed:j(),unknown:j()});const fT=k({url:h(),status:se(["success","error"]),submittedAt:h(),error:h().optional()});k({summary:k({total:j().int().nonnegative(),succeeded:j().int().nonnegative(),failed:j().int().nonnegative()}),results:E(fT).default([])});const a0=k({url:h(),verified:ye()});k({sites:E(a0).default([])});k({connected:ye(),domain:h(),siteUrl:h().nullable(),createdAt:h().nullable(),updatedAt:h().nullable()});k({connected:ye(),domain:h(),siteUrl:h().nullable(),availableSites:E(a0).default([])});k({siteUrl:h()});const pT=k({name:h(),alive:ye(),lastUsed:h().nullable()});k({connected:ye(),endpoint:h(),version:h().optional(),browserVersion:h().optional(),targets:E(pT).default([])});const Ps=se(["live","staging"]);k({projectName:h(),url:h(),stagingUrl:h().optional(),username:h(),defaultEnv:Ps,createdAt:h(),updatedAt:h()});const lb=k({url:h(),reachable:ye(),pageCount:j().nullable().optional(),version:h().nullable().optional(),error:h().nullable().optional(),plugins:E(h()).optional(),authenticatedUser:k({id:j(),slug:h()}).nullable().optional()});k({connected:ye(),projectName:h(),defaultEnv:Ps,live:lb.nullable(),staging:lb.nullable(),adminUrl:h().nullable().optional()});const mT=k({id:j(),slug:h(),title:h(),status:h(),modifiedAt:h().nullable().optional(),link:h().nullable().optional()}),i0=k({title:h().nullable(),description:h().nullable(),noindex:ye().nullable(),writable:ye().default(!1),writeTargets:E(h()).default([])}),hT=k({type:h(),json:Zn(h(),wi())}),gT=mT.extend({env:Ps,content:h(),seo:i0,schemaBlocks:E(hT).default([])}),cb=gT.extend({contentHash:h(),contentSnippet:h()}),s0=k({manualRequired:Zt(!0),targetUrl:h(),adminUrl:h().nullable().optional(),content:h(),nextSteps:E(h()).default([])}),yT=k({slug:h(),severity:se(["high","medium","low"]),code:se(["noindex","missing-seo-title","missing-meta-description","missing-schema","thin-content"]),message:h()});k({slug:h(),title:h(),status:h(),wordCount:j(),seo:i0,schemaPresent:ye(),issues:E(yT).default([])});const bT=k({slug:h(),status:se(["applied","skipped","manual"]),error:h().optional(),manualAssist:s0.optional()});k({env:Ps,strategy:se(["plugin","manual"]),results:E(bT)});const vT=k({slug:h(),status:se(["deployed","stripped","skipped","failed"]),schemasInjected:E(h()).optional(),manualAssist:s0.optional(),error:h().optional()});k({env:Ps,results:E(vT)});const ST=k({slug:h(),title:h(),canonrySchemas:E(h()),thirdPartySchemas:E(h()),hasCanonrySchema:ye()});k({env:Ps,pages:E(ST)});const xT=k({name:h(),status:se(["completed","skipped","failed"]),summary:h().optional(),error:h().optional()});k({projectName:h(),steps:E(xT)});k({slug:h(),live:cb,staging:cb,hasDifferences:ye(),differences:k({title:ye(),slug:ye(),content:ye(),seoTitle:ye(),seoDescription:ye(),noindex:ye(),schema:ye()})});const wT=k({name:h(),displayName:h().optional(),keyUrl:h().optional(),modelHint:h().optional(),model:h().optional(),configured:ye(),quota:PC.optional(),vertexConfigured:ye().optional()}),ub=k({configured:ye()});k({providers:E(wT).default([]),google:ub,bing:ub});const yc=se(["queued","running","completed","partial","failed","cancelled"]),It=yc.enum,r0=se(["answer-visibility","site-audit","gsc-sync","inspect-sitemap","ga-sync","bing-inspect","bing-inspect-sitemap","backlink-extract","traffic-sync","aeo-discover-seed","aeo-discover-probe"]),Ee=r0.enum,o0=se(["manual","scheduled","config-apply","backfill","probe"]),Rs=o0.enum,ji=se(["cited","not-cited"]),ic=ji.enum,sc=se(["visible","not-visible"]);sc.enum;const rc=se(["mentioned","not-mentioned"]);rc.enum;const l0=se(["new","cited","lost","emerging","not-cited"]);l0.enum;const jT=se(["new","mentioned","lost","emerging","not-mentioned"]);jT.enum;const NT=se([Rs.manual,Rs.probe]);k({kind:Zt(Ee["answer-visibility"]).optional(),trigger:NT.optional(),providers:E(ha).optional(),queries:E(h().min(1)).min(1).optional(),location:h().min(1).optional(),allLocations:ye().optional(),noLocation:ye().optional()}).refine(e=>+!!e.location+ +!!e.allLocations+ +!!e.noLocation<=1,{message:'Only one of "location", "allLocations", or "noLocation" may be provided'});const kT=k({message:h(),raw:wi().optional()}),AT=k({message:h().optional(),providers:Zn(h(),kT).optional()}),_T=k({id:h(),projectId:h(),kind:r0,status:yc,trigger:o0.default("manual"),location:h().nullable().optional(),queries:E(h()).nullable().optional(),startedAt:h().nullable().optional(),finishedAt:h().nullable().optional(),error:AT.nullable().optional(),createdAt:h()});function Yf(e){if(e.providers){const n=Object.entries(e.providers);if(n.length===1){const[i,r]=n[0];return`${i}: ${r.message}`}if(n.length>1)return n.map(([i,r])=>`${i}: ${r.message}`).join(" • ")}return e.message??"Run failed."}const c0=k({uri:h(),title:h()}),u0=k({id:h(),runId:h(),queryId:h(),query:h().optional(),provider:ha,citationState:ji,answerMentioned:ye().optional(),visibilityState:sc.optional(),mentionState:rc.optional(),transition:l0.optional(),answerText:h().nullable().optional(),citedDomains:E(h()).default([]),competitorOverlap:E(h()).default([]),recommendedCompetitors:E(h()).default([]),matchedTerms:E(h()).default([]),groundingSources:E(c0).default([]),searchQueries:E(h()).default([]),model:h().nullable().optional(),location:h().nullable().optional(),createdAt:h()});k({snapshots:E(u0),total:j().int().nonnegative()});const zT=k({queryId:h().nullable(),query:h().nullable(),run1State:ji.nullable(),run2State:ji.nullable(),run1AnswerMentioned:ye().nullable(),run2AnswerMentioned:ye().nullable(),run1VisibilityState:sc.nullable(),run2VisibilityState:sc.nullable(),run1MentionState:rc.nullable().optional(),run2MentionState:rc.nullable().optional(),changed:ye(),visibilityChanged:ye()});k({run1:h(),run2:h(),diff:E(zT)});const CT=_T.extend({snapshots:E(u0).optional()});k({totalRuns:j().int().nonnegative(),run:CT.nullable()});k({id:h(),projectId:h().nullable().optional(),actor:h(),action:h(),entityType:h(),entityId:h().nullable().optional(),diff:wi().optional(),createdAt:h()});const TT=se(["yes","no","unknown","not-mentioned"]),db=E(h().min(1));k({companyName:h().min(1),domain:h().min(1),queries:db.optional(),phrases:db.optional(),competitors:E(h().min(1)).optional().default([])}).superRefine((e,n)=>{e.queries!==void 0&&e.phrases!==void 0&&n.addIssue({code:"custom",message:"Use queries; phrases is accepted only as a legacy alias when queries is omitted",path:["phrases"]})});const ET=k({name:h(),count:j().int().nonnegative()}),OT=k({id:h(),name:h(),weight:j(),score:j(),grade:h(),status:se(["pass","partial","fail"]),findings:E(k({type:h(),message:h()})).default([]),recommendations:E(h()).default([])}),DT=k({url:h(),finalUrl:h(),auditedAt:h(),overallScore:j(),overallGrade:h(),summary:h(),factors:E(OT).default([])}),RT=k({industry:h(),summary:h(),services:E(h()).default([]),categoryTerms:E(h()).default([])}),MT=k({provider:h(),displayName:h(),model:h().nullable().optional(),mentioned:ye(),cited:ye(),describedAccurately:TT,accuracyNotes:h().nullable().optional(),incorrectClaims:E(h()).default([]),recommendedCompetitors:E(h()).default([]),citedDomains:E(h()).default([]),groundingSources:E(c0).default([]),searchQueries:E(h()).default([]),answerText:h(),error:h().nullable().optional()}),BT=k({query:h(),providerResults:E(MT).default([])}),LT=k({totalQueries:j().int().nonnegative(),totalProviders:j().int().nonnegative(),totalComparisons:j().int().nonnegative(),mentionCount:j().int().nonnegative(),citationCount:j().int().nonnegative(),topCompetitors:E(ET).default([]),visibilityGap:h(),whatThisMeans:E(h()).default([]),recommendedActions:E(h()).default([])});k({companyName:h(),domain:h(),homepageUrl:h(),generatedAt:h(),queries:E(h()).default([]),competitors:E(h()).default([]),profile:RT,audit:DT,queryResults:E(BT).default([]),summary:LT});const Xf=se(["answer-visibility","traffic-sync"]);Xf.enum;k({id:h(),projectId:h(),kind:Xf,cronExpr:h(),preset:h().nullable().optional(),timezone:h().default("UTC"),enabled:ye().default(!0),providers:E(ha).default([]),sourceId:h().nullable().optional(),lastRunAt:h().nullable().optional(),nextRunAt:h().nullable().optional(),createdAt:h(),updatedAt:h()});k({kind:Xf.optional(),preset:h().optional(),cron:h().optional(),timezone:h().optional().default("UTC"),enabled:ye().optional().default(!0),providers:E(ha).optional().default([]),sourceId:h().optional()}).refine(e=>e.preset&&!e.cron||!e.preset&&e.cron,{message:'Exactly one of "preset" or "cron" must be provided'});const qT=se(["mentioned","cited"]);qT.enum;k({id:h(),projectId:h(),propertyId:h(),clientEmail:h(),connected:ye(),createdAt:h(),updatedAt:h()});k({date:h(),landingPage:h(),sessions:j(),organicSessions:j(),users:j()});const Jf=se(["session","first_user","manual_utm"]),$T=k({source:h(),medium:h(),sessions:j(),users:j(),sourceDimension:Jf}),UT=k({source:h(),medium:h(),sourceDimension:Jf,landingPage:h(),sessions:j(),users:j()}),VT=k({source:h(),medium:h(),sessions:j(),users:j(),channelGroup:h()}),Qr=k({sessions:j(),sharePct:j(),sharePctDisplay:h()}),GT=k({organic:Qr,social:Qr,direct:Qr,ai:Qr,other:Qr});k({totalSessions:j(),totalOrganicSessions:j(),totalDirectSessions:j(),totalUsers:j(),topPages:E(k({landingPage:h(),sessions:j(),organicSessions:j(),directSessions:j(),users:j()})),aiReferrals:E($T),aiReferralLandingPages:E(UT),aiSessionsDeduped:j(),aiUsersDeduped:j(),aiSessionsBySession:j(),aiUsersBySession:j(),socialReferrals:E(VT),socialSessions:j(),socialUsers:j(),channelBreakdown:GT,organicSharePct:j(),aiSharePct:j(),aiSharePctBySession:j(),directSharePct:j(),socialSharePct:j(),organicSharePctDisplay:h(),aiSharePctDisplay:h(),aiSharePctBySessionDisplay:h(),directSharePctDisplay:h(),socialSharePctDisplay:h(),otherSessions:j(),otherSharePct:j(),otherSharePctDisplay:h(),lastSyncedAt:h().nullable()});k({connected:ye(),propertyId:h().nullable(),clientEmail:h().nullable(),authMethod:se(["service-account","oauth"]).nullable(),lastSyncedAt:h().nullable(),createdAt:h().nullable().optional(),updatedAt:h().nullable().optional()});k({synced:ye(),rowCount:j().int().nonnegative(),aiReferralCount:j().int().nonnegative(),socialReferralCount:j().int().nonnegative(),days:j().int().nonnegative(),syncedAt:h(),syncedComponents:E(h()).optional()});k({date:h(),source:h(),medium:h(),landingPage:h(),sessions:j(),users:j(),sourceDimension:Jf});k({date:h(),source:h(),medium:h(),sessions:j(),users:j(),channelGroup:h()});k({date:h(),sessions:j(),organicSessions:j(),users:j()});function oc(e){return e.toLowerCase().replace(/[^a-z0-9]/g,"")}const d0=se(["claude","openai","gemini","zai"]),IT=k({id:d0,label:h(),defaultModel:h(),configured:ye(),keySource:se(["config","env"]).nullable()});k({providers:E(IT).default([]),defaultProvider:d0.nullable()});const HT=se(["aero","user","compaction"]);HT.enum;const f0=128;k({key:h().min(1).max(f0),value:h().min(1)});k({key:h().min(1).max(f0)});const Ff=se(["queued","downloading","querying","ready","failed"]);Ff.enum;k({id:h(),release:h(),status:Ff,phaseDetail:h().nullable().optional(),vertexPath:h().nullable().optional(),edgesPath:h().nullable().optional(),vertexSha256:h().nullable().optional(),edgesSha256:h().nullable().optional(),vertexBytes:j().int().nullable().optional(),edgesBytes:j().int().nullable().optional(),projectsProcessed:j().int().nullable().optional(),domainsDiscovered:j().int().nullable().optional(),downloadStartedAt:h().nullable().optional(),downloadFinishedAt:h().nullable().optional(),queryStartedAt:h().nullable().optional(),queryFinishedAt:h().nullable().optional(),error:h().nullable().optional(),createdAt:h(),updatedAt:h()});const ZT=k({linkingDomain:h(),numHosts:j().int()}),PT=k({projectId:h(),release:h(),targetDomain:h(),totalLinkingDomains:j().int(),totalHosts:j().int(),top10HostsShare:h(),queriedAt:h(),excludedLinkingDomains:j().int().optional(),excludedHosts:j().int().optional()});k({summary:PT.nullable(),total:j().int(),rows:E(ZT)});k({release:h(),totalLinkingDomains:j().int(),totalHosts:j().int(),top10HostsShare:h(),queriedAt:h()});k({duckdbInstalled:ye(),duckdbVersion:h().nullable().optional(),duckdbSpec:h(),pluginDir:h()});k({installed:ye(),version:h(),path:h(),alreadyPresent:ye()});k({release:h(),vertexUrl:h(),edgesUrl:h(),vertexBytes:j().int().nullable(),edgesBytes:j().int().nullable(),lastModified:h().nullable()});k({release:h(),syncStatus:Ff.nullable(),bytes:j().int(),lastUsedAt:h().nullable()});se(["snapshot","insight"]);const KT=k({kind:Zt("snapshot"),id:h(),runId:h(),query:h(),provider:h(),model:h().nullable(),citationState:ji,matchedField:se(["answerText","citedDomains","searchQueries","query"]),snippet:h(),createdAt:h()}),QT=k({kind:Zt("insight"),id:h(),runId:h().nullable(),type:se(["regression","gain","opportunity","first-citation","provider-pickup","persistent-gap","competitor-gained","competitor-lost"]),severity:se(["critical","high","medium","low"]),title:h(),query:h(),provider:h(),matchedField:se(["title","query","recommendation","cause"]),snippet:h(),dismissed:ye(),createdAt:h()}),YT=Wv("kind",[KT,QT]);k({query:h(),totalHits:j().int().nonnegative(),truncated:ye(),hits:E(YT)});const p0=se(["create","expand","refresh","add-schema"]);p0.enum;function xM(e){switch(e){case"create":return"Create";case"expand":return"Expand";case"refresh":return"Refresh";case"add-schema":return"Add schema"}}const m0=se(["gsc","competitor-evidence","both"]);m0.enum;const h0=se(["high","medium","low"]);h0.enum;const XT=se(["blog-post","comparison","listicle","how-to","guide","glossary"]);XT.enum;const g0=se(["proposed","briefed","payload-generated","draft-created","published","validated","dismissed"]);g0.enum;const JT=k({url:h(),gscImpressions:j().nonnegative(),gscClicks:j().nonnegative(),gscAvgPosition:j().nonnegative().nullable(),organicSessions:j().nonnegative()}),FT=k({domain:h(),url:h(),title:h(),citationCount:j().int().nonnegative()}),WT=k({demand:j(),competitor:j(),absence:j(),gapSeverity:j()}),eE=k({actionId:h(),state:g0,lastUpdated:h()}),y0=k({targetRef:h(),query:h(),action:p0,ourBestPage:JT.nullable(),winningCompetitor:FT.nullable(),score:j(),scoreBreakdown:WT,drivers:E(h()),demandSource:m0,actionConfidence:h0,existingAction:eE.nullable()});k({targets:E(y0),contextMetrics:k({totalAiReferralSessions:j().int().nonnegative(),latestRunId:h(),runTimestamp:h()})});const tE=k({targetRef:h(),addressedUrl:h().nullable(),note:h().nullable(),dismissedAt:h()});k({dismissals:E(tE)});k({targetRef:h().min(1),addressedUrl:h().url().optional(),note:h().max(500).optional()});k({targetRef:h(),promptVersion:h(),provider:h(),model:h(),responseText:h(),costMillicents:j().int().nonnegative(),generatedAt:h()});k({provider:h().optional(),model:h().optional(),forceRefresh:ye().optional()});const nE=k({uri:h(),title:h(),domain:h(),isOurDomain:ye(),isCompetitor:ye(),citationCount:j().int().nonnegative(),providers:E(ha)}),b0=k({query:h(),groundingSources:E(nE)});k({sources:E(b0),latestRunId:h()});const v0=k({query:h(),competitorDomains:E(h()),competitorCount:j().int().nonnegative(),missRate:j().min(0).max(1),lastSeenInRunId:h()});k({gaps:E(v0),latestRunId:h()});const S0=se(["ok","warn","fail","skipped"]);S0.enum;const Wf=se(["global","project"]);Wf.enum;const x0=se(["auth","config","providers","integrations","database","schedules","agent"]);x0.enum;const aE=k({id:h(),category:x0,scope:Wf,title:h(),status:S0,code:h().describe('Stable machine-readable code (e.g. "google.token.refresh-failed"). Use this for filtering and remediation logic.'),summary:h(),remediation:h().nullable().optional().describe('Operator-facing next step. Null when status is "ok" or no specific remediation applies.'),details:Zn(h(),wi()).optional().describe("Structured context — principal email, redirect URI, missing scopes, etc. Stable per check id."),durationMs:j().int().nonnegative().describe("How long the check took to execute.")});k({scope:Wf,project:h().nullable().describe('Project name when scope is "project", null otherwise.'),generatedAt:h().describe("ISO-8601 timestamp when this doctor run started."),durationMs:j().int().nonnegative(),summary:k({total:j().int().nonnegative(),ok:j().int().nonnegative(),warn:j().int().nonnegative(),fail:j().int().nonnegative(),skipped:j().int().nonnegative()}),checks:E(aE)});const iE=k({provider:h(),citationState:ji,cited:ye(),mentioned:ye(),runId:h(),runCreatedAt:h()}),sE=k({queryId:h(),query:h(),providers:E(iE),citedCount:j().int().nonnegative(),mentionedCount:j().int().nonnegative(),totalProviders:j().int().nonnegative()}),rE=k({queryId:h(),query:h(),provider:h(),citingCompetitors:E(h()),runId:h(),runCreatedAt:h()}),oE=k({providersConfigured:j().int().nonnegative(),providersCiting:j().int().nonnegative(),providersMentioning:j().int().nonnegative(),totalQueries:j().int().nonnegative(),queriesCitedAndMentioned:j().int().nonnegative(),queriesCitedOnly:j().int().nonnegative(),queriesMentionedOnly:j().int().nonnegative(),queriesInvisible:j().int().nonnegative(),latestRunId:h().nullable(),latestRunAt:h().nullable()});k({summary:oE,byQuery:E(sE),competitorGaps:E(rE),status:se(["ready","no-data"]),reason:se(["no-runs-yet","no-queries"]).optional()});const lE=se(["prompt","request-param","browser-geo","ignored"]),cE=k({label:h(),city:h(),region:h(),country:h(),otherConfiguredLabels:E(h())}),uE=k({provider:h(),treatment:lE,description:h()}),dE=k({generatedAt:h(),project:k({id:h(),name:h(),displayName:h(),canonicalDomain:h(),country:h(),language:h()}),location:cE.nullable(),providerLocationHandling:E(uE),periodStart:h().nullable(),periodEnd:h().nullable()}),fE=k({citationRate:j(),citedQueryCount:j(),totalQueryCount:j(),mentionRate:j(),mentionedQueryCount:j(),trend:se(["up","down","flat","unknown"]),queryCount:j(),competitorCount:j(),providerCount:j(),gsc:k({clicks:j(),impressions:j(),ctr:j(),avgPosition:j(),periodStart:h(),periodEnd:h()}).nullable(),ga:k({sessions:j(),users:j(),periodStart:h(),periodEnd:h()}).nullable(),findings:E(k({title:h(),detail:h(),tone:se(["positive","caution","negative","neutral"])}))}),pE=k({citationState:se(["cited","not-cited","pending"]),answerMentioned:ye().nullable(),model:h().nullable()}),mE=k({queries:E(h()),providers:E(h()),matrix:E(E(pE.nullable())),providerRates:E(k({provider:h(),citedCount:j(),totalCount:j(),citationRate:j()}))}),hE=k({domain:h(),citationCount:j(),totalCount:j(),pressureLabel:se(["High","Moderate","Low","None"]),citedQueries:E(h()),sharePct:j(),theirCitedPages:E(k({url:h(),citedFor:E(h())}))}),gE=k({projectCitationCount:j(),competitors:E(hE)}),yE=k({domain:h(),mentionCount:j(),totalCount:j(),pressureLabel:se(["High","Moderate","Low","None"]),mentionedQueries:E(h()),sharePct:j()}),bE=k({projectMentionCount:j(),totalAnswerSnapshots:j(),competitors:E(yE)}),vE=k({category:h(),label:h(),count:j(),sharePct:j()}),SE=k({categories:E(vE),topDomains:E(k({domain:h(),count:j(),isCompetitor:ye()}))}),xE=k({query:h(),clicks:j(),impressions:j(),ctr:j(),avgPosition:j(),category:se(["brand","lead-gen","industry","other"])}),wE=k({periodStart:h(),periodEnd:h(),totalClicks:j(),totalImpressions:j(),ctr:j(),avgPosition:j(),topQueries:E(xE),categoryBreakdown:E(k({category:se(["brand","lead-gen","industry","other"]),clicks:j(),impressions:j(),sharePct:j()})),trend:E(k({date:h(),clicks:j(),impressions:j()})),trackedButNoGsc:E(h()),gscButNotTracked:E(h())}),jE=k({totalSessions:j(),totalUsers:j(),totalOrganicSessions:j(),periodStart:h(),periodEnd:h(),topLandingPages:E(k({page:h(),sessions:j(),users:j(),organicSessions:j()})),channelBreakdown:E(k({channel:h(),sessions:j(),sharePct:j()}))}),NE=k({totalSessions:j(),organicSessions:j(),paidSessions:j(),channels:E(k({channelGroup:h(),sessions:j(),sharePct:j()})),topCampaigns:E(k({source:h(),medium:h(),sessions:j()}))}),kE=k({totalSessions:j(),totalUsers:j(),bySource:E(k({source:h(),sessions:j(),users:j(),sharePct:j()})),trend:E(k({date:h(),sessions:j()})),topLandingPages:E(k({page:h(),sessions:j(),users:j()}))}),AE=k({windowStart:h(),windowEnd:h(),hasData:ye(),verifiedCrawlerHits:k({current:j(),prior:j(),deltaPct:j().nullable()}),unverifiedCrawlerHits:k({current:j(),prior:j(),deltaPct:j().nullable()}),aiUserFetchHits:k({current:j(),prior:j(),deltaPct:j().nullable()}),referralArrivals:k({current:j(),prior:j(),deltaPct:j().nullable()}),byOperator:E(k({operator:h(),verifiedHits:j(),unverifiedHits:j(),userFetchHits:j(),referralArrivals:j(),deltaPct:j().nullable()})),topCrawledPaths:E(k({path:h(),verifiedHits:j(),distinctOperators:j()})),referralProducts:E(k({product:h(),arrivals:j(),distinctLandingPaths:j()})),dailyTrend:E(k({date:h(),verifiedCrawlerHits:j(),userFetchHits:j(),referralArrivals:j()})),topReferralLandingPaths:E(k({path:h(),arrivals:j(),distinctProducts:j()}))}),_E=k({provider:se(["google","bing"]).nullable(),total:j(),indexed:j(),notIndexed:j(),deindexed:j(),unknown:j(),indexedPct:j()}),zE=k({runId:h(),date:h(),citationRate:j(),citedQueryCount:j(),totalQueryCount:j(),mentionRate:j(),mentionedQueryCount:j(),providerRates:E(k({provider:h(),citationRate:j()}))}),xf=k({id:h(),type:se(["regression","gain","opportunity"]),severity:se(["critical","high","medium","low"]),title:h(),query:h(),provider:h(),recommendation:h().nullable(),createdAt:h(),instanceCount:j()}),CE=k({horizon:se(["immediate","short-term","medium-term"]),title:h(),rationale:h()}),Yr=k({current:j(),prior:j(),deltaAbs:j(),direction:se(["up","down","flat"]),window:j().optional()}),TE=k({provider:h(),current:j(),prior:j(),deltaAbs:j(),direction:se(["up","down","flat"])}),EE=k({enoughHistory:ye(),headline:h(),citationRate:Yr.nullable(),mentionRate:Yr.nullable(),citedQueryCount:Yr.nullable(),gscClicksDelta:Yr.nullable(),aiReferralsDelta:Yr.nullable(),providerMovements:E(TE),wins:E(xf),regressions:E(xf)});se(["agency","client"]);const OE=se(["agency","client","both"]),DE=se(["immediate","short-term","medium-term"]),RE=se(["high","medium","low"]);se(["positive","caution","negative","neutral"]);const ME=se(["content","competitors","provider","search-demand","indexing","location","monitoring"]),ep=k({audience:OE,priority:j(),horizon:DE,category:ME,title:h(),action:h(),why:E(h()),evidence:E(h()),successMetric:h(),confidence:RE,targetRef:h().optional()}),BE=k({headline:h(),overview:h(),actionItems:E(ep),confidenceNotes:E(h())}),LE=k({title:h(),detail:h(),severity:se(["positive","caution","negative","neutral"]),evidence:E(h())}),qE=k({priorities:E(ep),diagnostics:E(LE)});function wM(e){return e.horizon==="immediate"?"negative":e.confidence==="high"?"caution":e.confidence==="low"?"neutral":"caution"}function jM(e){switch(e){case"critical":return"Critical";case"high":return"High";case"medium":return"Medium";case"low":return"Low"}}function NM(e){switch(e){case"immediate":return"Immediate";case"short-term":return"Short term";case"medium-term":return"Medium term"}}function kM(e){switch(e){case"content":return"Content";case"competitors":return"Competitors";case"provider":return"Provider";case"search-demand":return"Search demand";case"indexing":return"Indexing";case"location":return"Location";case"monitoring":return"Monitoring"}}function AM(e){switch(e){case"high":return"High";case"medium":return"Medium";case"low":return"Low"}}k({meta:dE,executiveSummary:fE,citationScorecard:mE,competitorLandscape:gE,mentionLandscape:bE,aiSourceOrigin:SE,gsc:wE.nullable(),ga:jE.nullable(),socialReferrals:NE.nullable(),aiReferrals:kE.nullable(),serverActivity:AE.nullable(),indexingHealth:_E.nullable(),citationsTrend:E(zE),whatsChanged:EE,insights:E(xf),recommendedNextSteps:E(CE),actionPlan:E(ep),clientSummary:BE,agencyDiagnostics:qE,contentOpportunities:E(y0),contentGaps:E(v0),groundingSources:E(b0)});const $E=se(["claude","codex"]);$E.enum;const UE=se(["claude","codex","all"]);UE.enum;const tp=se(["cloud-run","wordpress","cloudflare","vercel","generic-log"]);tp.enum;const VE=se(["raw-request-events","aggregate-request-metrics","request-url","status-code","user-agent","remote-ip","referer","cursor-pull"]);VE.enum;const GE=se(["raw-request","aggregate-bucket"]),IE=GE.enum,HE=se(["observed","provider-aggregated","inferred"]),ZE=HE.enum,PE=k({type:h().nullable(),labels:Zn(h(),h())}),KE=k({sourceType:tp,evidenceKind:Zt(IE["raw-request"]),confidence:Zt(ZE.observed),eventId:h().min(1),observedAt:h().min(1),method:h().nullable(),requestUrl:h().nullable(),host:h().nullable(),path:h().min(1),queryString:h().nullable(),status:j().int().nullable(),userAgent:h().nullable(),remoteIp:h().nullable(),referer:h().nullable(),latencyMs:j().nullable(),requestSizeBytes:j().int().nullable(),responseSizeBytes:j().int().nullable(),providerResource:PE,providerLabels:Zn(h(),h())});k({events:E(KE),rawEntryCount:j().int().nonnegative(),skippedEntryCount:j().int().nonnegative(),nextPageToken:h().optional(),filter:h()});const w0=se(["connected","paused","error","archived"]),_M=w0.enum,j0=se(["oauth","service-account"]);j0.enum;const QE=se(["verified","claimed_unverified","unknown_ai_like"]);QE.enum;k({gcpProjectId:h().min(1),serviceName:h().nullable().optional(),location:h().nullable().optional(),authMode:j0});k({baseUrl:h().url(),username:h().min(1)});const np=se(["production","preview"]);np.enum;k({projectId:h().min(1),teamId:h().min(1),environment:np});const N0=k({id:h(),projectId:h(),sourceType:tp,displayName:h(),status:w0,lastSyncedAt:h().nullable(),lastCursor:h().nullable(),lastError:h().nullable(),archivedAt:h().nullable(),config:Zn(h(),wi()),createdAt:h(),updatedAt:h()});k({gcpProjectId:h().min(1),serviceName:h().min(1).optional(),location:h().min(1).optional(),displayName:h().min(1).optional(),keyJson:h().optional()});k({baseUrl:h().url(),username:h().min(1),applicationPassword:h().min(1),displayName:h().min(1).optional()});k({projectId:h().min(1),teamId:h().min(1),token:h().min(1),environment:np.optional(),displayName:h().min(1).optional()});k({sourceId:h(),runId:h(),syncedAt:h(),pulledEvents:j().int().nonnegative(),crawlerHits:j().int().nonnegative(),aiUserFetchHits:j().int().nonnegative(),aiReferralHits:j().int().nonnegative(),unknownHits:j().int().nonnegative(),crawlerBucketRows:j().int().nonnegative(),aiUserFetchBucketRows:j().int().nonnegative(),aiReferralBucketRows:j().int().nonnegative(),sampleRows:j().int().nonnegative(),windowStart:h(),windowEnd:h()});k({days:j().int().positive().optional()});k({sourceId:h(),runId:h(),status:yc,windowStart:h(),windowEnd:h(),daysRequested:j().int().positive(),daysApplied:j().int().positive()});const YE=k({crawlerHits:j().int().nonnegative(),aiUserFetchHits:j().int().nonnegative(),aiReferralHits:j().int().nonnegative(),sampleCount:j().int().nonnegative()});k({sources:E(N0)});const XE=N0.extend({totals24h:YE,latestRun:k({runId:h(),status:yc,startedAt:h().nullable(),finishedAt:h().nullable(),error:h().nullable()}).nullable()});k({sources:E(XE)});const JE=se(["crawler","ai-user-fetch","ai-referral"]),ap=JE.enum,FE=k({kind:Zt(ap.crawler),sourceId:h(),tsHour:h(),botId:h(),operator:h(),verificationStatus:h(),pathNormalized:h(),status:j().int(),hits:j().int().nonnegative()}),WE=k({kind:Zt(ap["ai-user-fetch"]),sourceId:h(),tsHour:h(),botId:h(),operator:h(),verificationStatus:h(),pathNormalized:h(),status:j().int(),hits:j().int().nonnegative()}),eO=k({kind:Zt(ap["ai-referral"]),sourceId:h(),tsHour:h(),product:h(),operator:h(),sourceDomain:h(),evidenceType:h(),landingPathNormalized:h(),status:j().int(),hits:j().int().nonnegative()}),tO=Wv("kind",[FE,WE,eO]);k({windowStart:h(),windowEnd:h(),totals:k({crawlerHits:j().int().nonnegative(),aiUserFetchHits:j().int().nonnegative(),aiReferralHits:j().int().nonnegative()}),events:E(tO)});const ip=se(["cited","aspirational","wasted-surface"]),fb=ip.enum;fb.cited,fb.aspirational;const sp=se(["direct-competitor","ota-aggregator","editorial-media","other","unknown"]),nO=sp.enum;nO["direct-competitor"];const rp=se(["queued","seeding","probing","completed","failed"]);rp.enum;const k0=k({domain:h().min(1),hits:j().int().positive(),competitorType:sp.default("unknown")}),aO=k({id:h(),sessionId:h(),projectId:h(),query:h(),bucket:ip.nullable().default(null),citationState:ji,citedDomains:E(h()).default([]),createdAt:h()}),iO=k({id:h(),projectId:h(),status:rp,icpDescription:h().nullable().optional(),seedProvider:h().nullable().optional(),seedCountRaw:j().int().nullable().optional(),seedCount:j().int().nullable().optional(),dedupThreshold:j().nullable().optional(),probeCount:j().int().nullable().optional(),citedCount:j().int().nullable().default(null),aspirationalCount:j().int().nullable().default(null),wastedCount:j().int().nullable().default(null),competitorMap:E(k0).default([]),error:h().nullable().optional(),startedAt:h().nullable().optional(),finishedAt:h().nullable().optional(),createdAt:h()});iO.extend({probes:E(aO).default([])});const sO=500;k({icpDescription:h().min(1).optional(),dedupThreshold:j().min(0).max(1).optional(),maxProbes:j().int().positive().max(sO).optional(),locations:E(h().min(1)).optional()});k({buckets:E(ip).min(1).optional(),includeCompetitors:ye().optional(),competitorTypes:E(sp).min(1).optional()});k({sessionId:h(),projectId:h(),status:rp,queriesByBucket:k({cited:E(h()),aspirational:E(h()),"wasted-surface":E(h())}),suggestedCompetitors:E(k0)});k({sessionId:h(),projectId:h(),promoted:k({queries:E(h()),competitors:E(h())}),skipped:k({queries:E(h()),competitors:E(h())})});Fv([Zt("cli"),h().regex(/^discovery:.+$/)]);var rO=(e=>(e.Clicks="clicks",e.Impressions="impressions",e.CTR="ctr",e.Position="position",e))(rO||{});const zM={clicks:"Clicks",impressions:"Impressions",ctr:"CTR",position:"Position"},CM={clicks:"Clicks",impressions:"Impr",ctr:"CTR",position:"Pos"},TM=Yf;function oO(e){const n=[];if(e.message&&n.push(e.message),e.providers)for(const[i,r]of Object.entries(e.providers)){const l=`[${i}] ${r.message}`;r.raw!==void 0?n.push(`${l}
53
53
 
54
54
  ${JSON.stringify(r.raw,null,2)}`):n.push(l)}return n.length>0?n.join(`
55
55
 
56
- `):"Run failed."}function A0(e){return e.split("-").map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join(" ")}function TM(e){if(!e)return"—";try{return new Date(e).toLocaleString()}catch{return e}}function EM(e){return e===null?"Unknown":e?"Pass":"Fail"}function pb(e){return e===0?"12:00 AM":e<12?`${e}:00 AM`:e===12?"12:00 PM":`${e-12}:00 PM`}function OM(e,n){return e==="twice-daily"?"twice-daily":e.startsWith("weekly@")?`${e}@${n}`:`daily@${n}`}function DM(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 r=e.match(/^(weekly@(?:mon|tue|wed|thu|fri|sat|sun))(?:@(\d+))?$/);return r?{freq:r[1],hour:r[2]?parseInt(r[2]):6,customCron:""}:{freq:"custom",hour:6,customCron:n}}function RM(e,n,i){const r=i==="UTC"?"UTC":i.split("/").pop()?.replace(/_/g," ")??i;if(!e)return`Custom: ${n} · ${r}`;if(e==="twice-daily")return`Twice a day (6am & 6pm) · ${r}`;const l=e.match(/^daily(?:@(\d+))?$/);if(l){const d=l[1]?parseInt(l[1]):6;return`Every day at ${pb(d)} · ${r}`}const c=e.match(/^weekly@(mon|tue|wed|thu|fri|sat|sun)(?:@(\d+))?$/);if(c){const d={mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday",sun:"Sunday"},m=c[2]?parseInt(c[2]):6;return`Every ${d[c[1]]} at ${pb(m)} · ${r}`}return`${e} · ${r}`}const qe=(e,n,i,r)=>{const l={_id:e,baseUrl:n?.baseUrl||(n?.client??W).getConfig().baseUrl};return n?.body&&(l.body=n.body),n?.headers&&(l.headers=n.headers),n?.path&&(l.path=n.path),n?.query&&(l.query=n.query),[l]},lO=e=>qe("getApiV1ProjectsByName",e),cO=e=>Ue({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await cv({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:lO(e)}),Ks=e=>qe("getApiV1Projects",e),op=e=>Ue({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await $w({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:Ks(e)}),lp=e=>qe("getApiV1Runs",e),cp=e=>Ue({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Ww({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:lp(e)}),uO=e=>qe("getApiV1RunsById",e),_0=e=>Ue({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await uv({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:uO(e)}),dO=e=>qe("getApiV1Settings",e),fO=e=>Ue({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await dv({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:dO(e)}),pO=e=>qe("getApiV1ProjectsByNameGoogleConnections",e),MM=e=>Ue({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await hj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:pO(e)}),mO=e=>qe("getApiV1ProjectsByNameGoogleProperties",e),BM=e=>Ue({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await bj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:mO(e)}),hO=e=>qe("getApiV1ProjectsByNameGoogleGscPerformance",e),LM=e=>Ue({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await wj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:hO(e)}),gO=e=>qe("getApiV1ProjectsByNameGoogleGscPerformanceDaily",e),qM=e=>Ue({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await jj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:gO(e)}),yO=e=>qe("getApiV1ProjectsByNameGoogleGscInspections",e),UM=e=>Ue({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await kj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:yO(e)}),bO=e=>qe("getApiV1ProjectsByNameGoogleGscDeindexed",e),$M=e=>Ue({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Aj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:bO(e)}),vO=e=>qe("getApiV1ProjectsByNameGoogleGscCoverage",e),VM=e=>Ue({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await fv({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:vO(e)}),SO=e=>qe("getApiV1ProjectsByNameGoogleGscCoverageHistory",e),GM=e=>Ue({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await _j({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:SO(e)}),IM=e=>qe("getApiV1ProjectsByNameGoogleGscSitemaps",e),xO=e=>qe("getApiV1ProjectsByNameBingStatus",e),HM=e=>Ue({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Rj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:xO(e)}),wO=e=>qe("getApiV1ProjectsByNameBingSites",e),ZM=e=>Ue({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Mj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:wO(e)}),jO=e=>qe("getApiV1ProjectsByNameBingCoverage",e),PM=e=>Ue({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await pv({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:jO(e)}),NO=e=>qe("getApiV1ProjectsByNameBingInspections",e),KM=e=>Ue({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Lj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:NO(e)}),kO=e=>qe("getApiV1ProjectsByNameBingPerformance",e),QM=e=>Ue({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Vj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:kO(e)}),AO=e=>qe("getApiV1ProjectsByNameGaStatus",e),YM=e=>Ue({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Hj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:AO(e)}),_O=e=>qe("getApiV1ProjectsByNameGaTraffic",e),XM=e=>Ue({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Pj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:_O(e)}),zO=e=>qe("getApiV1ProjectsByNameGaAiReferralHistory",e),JM=e=>Ue({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Kj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:zO(e)}),CO=e=>qe("getApiV1ProjectsByNameGaSocialReferralHistory",e),FM=e=>Ue({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Qj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:CO(e)}),TO=e=>qe("getApiV1ProjectsByNameGaSessionHistory",e),WM=e=>Ue({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Yj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:TO(e)}),EO=e=>qe("getApiV1ProjectsByNameReport",e),e6=e=>Ue({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Jj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:EO(e)}),OO=e=>qe("getApiV1ProjectsByNameCitationsVisibility",e),t6=e=>Ue({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Fj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:OO(e)}),DO=e=>qe("getApiV1ProjectsByNameTrafficSources",e),n6=e=>Ue({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await yN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:DO(e)}),RO=e=>qe("getApiV1ProjectsByNameTrafficStatus",e),a6=e=>Ue({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await bN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:RO(e)}),MO=e=>qe("getApiV1ProjectsByNameTrafficSourcesById",e),i6=e=>Ue({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await vN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:MO(e)}),BO=e=>qe("getApiV1ProjectsByNameTrafficEvents",e),s6=e=>Ue({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await SN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:BO(e)}),LO=e=>qe("getApiV1ProjectsByNameDiscoverSessions",e),r6=e=>Ue({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await wN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:LO(e)}),qO=e=>qe("getApiV1ProjectsByNameDiscoverSessionsById",e),o6=e=>Ue({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await jN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:qO(e)}),UO=e=>qe("getApiV1ProjectsByNameDiscoverSessionsByIdPromote",e),l6=e=>Ue({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await NN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:UO(e)}),$O=e=>qe("getApiV1ProjectsByNameAgentProviders",e),VO=e=>Ue({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await AN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:$O(e)});function mb(e){return e.state==="ok"?"positive":e.state==="checking"?"neutral":"negative"}function z0(e){switch(e){case"completed":return"positive";case"partial":return"caution";case"failed":return"negative";case"cancelled":return"caution";case"queued":case"running":return"neutral";default:return"neutral"}}function c6(e){switch(e){case"cited":return"positive";case"emerging":return"caution";case"not-cited":return"caution";case"lost":return"negative";case"pending":return"neutral";default:return"neutral"}}function u6(e){return e==="High"?"negative":e==="Moderate"?"caution":"neutral"}function GO(e){return e.displayName??e.name.charAt(0).toUpperCase()+e.name.slice(1)}function Us(e){const n=[e.detail,e.hint].filter(Boolean);return n.length>0?n.join(`
57
- `):void 0}function IO(e,n,i){return e.map(r=>{if(r.id==="api")return{...r,tone:mb(n.apiStatus),detail:n.apiStatus.state==="ok"?"Healthy":"Needs attention",meta:n.apiStatus.detail};if(r.id==="worker")return{...r,tone:mb(n.workerStatus),detail:n.workerStatus.state==="ok"?"Healthy":"Needs attention",meta:n.workerStatus.detail};const l=i.providerStatuses.filter(g=>g.state==="ready").length,c=i.providerStatuses.length,d=l>0,m=i.providerStatuses.filter(g=>g.state==="ready").map(g=>GO(g)).join(" · ");return{...r,label:"Providers",tone:d?"positive":"caution",detail:`${l} of ${c} configured`,meta:m||"None configured"}})}function HO(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 ZO(e,n,i){const r=HO(n,i),l=structuredClone(e);return l.healthChecks=l.healthChecks.map(c=>{if(c.id==="api")return{...c,detail:n.apiStatus.detail,state:n.apiStatus.state==="ok"?"ready":"attention"};if(c.id==="worker")return{...c,detail:n.workerStatus.detail,state:n.workerStatus.state==="ok"?"ready":"attention"};const d=i.providerStatuses.some(m=>m.state==="ready");return{...c,detail:d?"At least one provider configured.":"No providers configured.",state:d?"ready":"attention"}}),l.launchState.enabled=r===void 0,l.launchState.blockedReason=r,l.launchState.summary=r??"Queue a visibility sweep first, then follow with a site audit to explain movement.",l}const C0="canonry.run-tracker",wf=new Set;let hb=!1,PO=0,bc={runs:{},batches:{}};function KO(){const e=Ni();for(const n of wf)n(e)}function QO(e){if(!e)return{runs:{},batches:{}};try{const n=JSON.parse(e);return{runs:n.runs??{},batches:n.batches??{}}}catch{return{runs:{},batches:{}}}}function YO(){typeof window>"u"||window.sessionStorage.setItem(C0,JSON.stringify(bc))}function T0(){hb||(hb=!0,!(typeof window>"u")&&(bc=QO(window.sessionStorage.getItem(C0))))}function vc(e){bc=e,YO(),KO()}function Ni(){return T0(),bc}function XO(e){return T0(),wf.add(e),()=>{wf.delete(e)}}function E0(e){const n=Ni();vc({...n,runs:{...n.runs,[e.id]:{runId:e.id,projectId:e.projectId,projectLabel:e.projectLabel,kind:e.kind,sourceAction:e.sourceAction,lastAnnouncedStatus:e.lastAnnouncedStatus??"queued"}}})}function gb(e){const n=Ni();if(!n.runs[e])return;const{[e]:i,...r}=n.runs;vc({...n,runs:r})}function JO(e){const n=Ni(),i=`batch_${Date.now()}_${++PO}`;return vc({...n,batches:{...n.batches,[i]:{batchId:i,runIds:e.runIds,queuedCount:e.queuedCount,skippedCount:e.skippedCount}}}),i}function FO(e){const n=Ni();if(!n.batches[e])return;const{[e]:i,...r}=n.batches;vc({...n,batches:r})}function WO(e){return e==="completed"||e==="partial"||e==="failed"||e==="cancelled"}function e4(e,n){let i=0,r=0,l=0,c=0,d=0;for(const m of e){const g=n[m]?.status;g==="completed"?i+=1:g==="partial"?r+=1:g==="failed"?l+=1:g==="cancelled"?c+=1:d+=1}return{completed:i,partial:r,failed:l,cancelled:c,pending:d,finished:d===0}}const yb=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,bb=nv,O0=(e,n)=>i=>{var r;if(n?.variants==null)return bb(e,i?.class,i?.className);const{variants:l,defaultVariants:c}=n,d=Object.keys(l).map(b=>{const v=i?.[b],S=c?.[b];if(v===null)return null;const w=yb(v)||yb(S);return l[b][w]}),m=i&&Object.entries(i).reduce((b,v)=>{let[S,w]=v;return w===void 0||(b[S]=w),b},{}),g=n==null||(r=n.compoundVariants)===null||r===void 0?void 0:r.reduce((b,v)=>{let{class:S,className:w,..._}=v;return Object.entries(_).every(C=>{let[N,T]=C;return Array.isArray(T)?T.includes({...c,...m}[N]):{...c,...m}[N]===T})?[...b,S,w]:b},[]);return bb(e,d,g,i?.class,i?.className)},t4=(e,n)=>{const i=new Array(e.length+n.length);for(let r=0;r<e.length;r++)i[r]=e[r];for(let r=0;r<n.length;r++)i[e.length+r]=n[r];return i},n4=(e,n)=>({classGroupId:e,validator:n}),D0=(e=new Map,n=null,i)=>({nextPart:e,validators:n,classGroupId:i}),lc="-",vb=[],a4="arbitrary..",i4=e=>{const n=r4(e),{conflictingClassGroups:i,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return s4(d);const m=d.split(lc),g=m[0]===""&&m.length>1?1:0;return R0(m,g,n)},getConflictingClassGroupIds:(d,m)=>{if(m){const g=r[d],b=i[d];return g?b?t4(b,g):g:b||vb}return i[d]||vb}}},R0=(e,n,i)=>{if(e.length-n===0)return i.classGroupId;const l=e[n],c=i.nextPart.get(l);if(c){const b=R0(e,n+1,c);if(b)return b}const d=i.validators;if(d===null)return;const m=n===0?e.join(lc):e.slice(n).join(lc),g=d.length;for(let b=0;b<g;b++){const v=d[b];if(v.validator(m))return v.classGroupId}},s4=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const n=e.slice(1,-1),i=n.indexOf(":"),r=n.slice(0,i);return r?a4+r:void 0})(),r4=e=>{const{theme:n,classGroups:i}=e;return o4(i,n)},o4=(e,n)=>{const i=D0();for(const r in e){const l=e[r];up(l,i,r,n)}return i},up=(e,n,i,r)=>{const l=e.length;for(let c=0;c<l;c++){const d=e[c];l4(d,n,i,r)}},l4=(e,n,i,r)=>{if(typeof e=="string"){c4(e,n,i);return}if(typeof e=="function"){u4(e,n,i,r);return}d4(e,n,i,r)},c4=(e,n,i)=>{const r=e===""?n:M0(n,e);r.classGroupId=i},u4=(e,n,i,r)=>{if(f4(e)){up(e(r),n,i,r);return}n.validators===null&&(n.validators=[]),n.validators.push(n4(i,e))},d4=(e,n,i,r)=>{const l=Object.entries(e),c=l.length;for(let d=0;d<c;d++){const[m,g]=l[d];up(g,M0(n,m),i,r)}},M0=(e,n)=>{let i=e;const r=n.split(lc),l=r.length;for(let c=0;c<l;c++){const d=r[c];let m=i.nextPart.get(d);m||(m=D0(),i.nextPart.set(d,m)),i=m}return i},f4=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,p4=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,i=Object.create(null),r=Object.create(null);const l=(c,d)=>{i[c]=d,n++,n>e&&(n=0,r=i,i=Object.create(null))};return{get(c){let d=i[c];if(d!==void 0)return d;if((d=r[c])!==void 0)return l(c,d),d},set(c,d){c in i?i[c]=d:l(c,d)}}},jf="!",Sb=":",m4=[],xb=(e,n,i,r,l)=>({modifiers:e,hasImportantModifier:n,baseClassName:i,maybePostfixModifierPosition:r,isExternal:l}),h4=e=>{const{prefix:n,experimentalParseClassName:i}=e;let r=l=>{const c=[];let d=0,m=0,g=0,b;const v=l.length;for(let N=0;N<v;N++){const T=l[N];if(d===0&&m===0){if(T===Sb){c.push(l.slice(g,N)),g=N+1;continue}if(T==="/"){b=N;continue}}T==="["?d++:T==="]"?d--:T==="("?m++:T===")"&&m--}const S=c.length===0?l:l.slice(g);let w=S,_=!1;S.endsWith(jf)?(w=S.slice(0,-1),_=!0):S.startsWith(jf)&&(w=S.slice(1),_=!0);const C=b&&b>g?b-g:void 0;return xb(c,_,w,C)};if(n){const l=n+Sb,c=r;r=d=>d.startsWith(l)?c(d.slice(l.length)):xb(m4,!1,d,void 0,!0)}if(i){const l=r;r=c=>i({className:c,parseClassName:l})}return r},g4=e=>{const n=new Map;return e.orderSensitiveModifiers.forEach((i,r)=>{n.set(i,1e6+r)}),i=>{const r=[];let l=[];for(let c=0;c<i.length;c++){const d=i[c],m=d[0]==="[",g=n.has(d);m||g?(l.length>0&&(l.sort(),r.push(...l),l=[]),r.push(d)):l.push(d)}return l.length>0&&(l.sort(),r.push(...l)),r}},y4=e=>({cache:p4(e.cacheSize),parseClassName:h4(e),sortModifiers:g4(e),...i4(e)}),b4=/\s+/,v4=(e,n)=>{const{parseClassName:i,getClassGroupId:r,getConflictingClassGroupIds:l,sortModifiers:c}=n,d=[],m=e.trim().split(b4);let g="";for(let b=m.length-1;b>=0;b-=1){const v=m[b],{isExternal:S,modifiers:w,hasImportantModifier:_,baseClassName:C,maybePostfixModifierPosition:N}=i(v);if(S){g=v+(g.length>0?" "+g:g);continue}let T=!!N,R=r(T?C.substring(0,N):C);if(!R){if(!T){g=v+(g.length>0?" "+g:g);continue}if(R=r(C),!R){g=v+(g.length>0?" "+g:g);continue}T=!1}const G=w.length===0?"":w.length===1?w[0]:c(w).join(":"),H=_?G+jf:G,K=H+R;if(d.indexOf(K)>-1)continue;d.push(K);const X=l(R,T);for(let J=0;J<X.length;++J){const D=X[J];d.push(H+D)}g=v+(g.length>0?" "+g:g)}return g},S4=(...e)=>{let n=0,i,r,l="";for(;n<e.length;)(i=e[n++])&&(r=B0(i))&&(l&&(l+=" "),l+=r);return l},B0=e=>{if(typeof e=="string")return e;let n,i="";for(let r=0;r<e.length;r++)e[r]&&(n=B0(e[r]))&&(i&&(i+=" "),i+=n);return i},x4=(e,...n)=>{let i,r,l,c;const d=g=>{const b=n.reduce((v,S)=>S(v),e());return i=y4(b),r=i.cache.get,l=i.cache.set,c=m,m(g)},m=g=>{const b=r(g);if(b)return b;const v=v4(g,i);return l(g,v),v};return c=d,(...g)=>c(S4(...g))},w4=[],At=e=>{const n=i=>i[e]||w4;return n.isThemeGetter=!0,n},L0=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,q0=/^\((?:(\w[\w-]*):)?(.+)\)$/i,j4=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,N4=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,k4=/\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$/,A4=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,_4=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,z4=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Va=e=>j4.test(e),Te=e=>!!e&&!Number.isNaN(Number(e)),Ga=e=>!!e&&Number.isInteger(Number(e)),nf=e=>e.endsWith("%")&&Te(e.slice(0,-1)),fa=e=>N4.test(e),U0=()=>!0,C4=e=>k4.test(e)&&!A4.test(e),dp=()=>!1,T4=e=>_4.test(e),E4=e=>z4.test(e),O4=e=>!me(e)&&!he(e),D4=e=>Xa(e,G0,dp),me=e=>L0.test(e),bi=e=>Xa(e,I0,C4),wb=e=>Xa(e,V4,Te),R4=e=>Xa(e,Z0,U0),M4=e=>Xa(e,H0,dp),jb=e=>Xa(e,$0,dp),B4=e=>Xa(e,V0,E4),ql=e=>Xa(e,P0,T4),he=e=>q0.test(e),Xr=e=>zi(e,I0),L4=e=>zi(e,H0),Nb=e=>zi(e,$0),q4=e=>zi(e,G0),U4=e=>zi(e,V0),Ul=e=>zi(e,P0,!0),$4=e=>zi(e,Z0,!0),Xa=(e,n,i)=>{const r=L0.exec(e);return r?r[1]?n(r[1]):i(r[2]):!1},zi=(e,n,i=!1)=>{const r=q0.exec(e);return r?r[1]?n(r[1]):i:!1},$0=e=>e==="position"||e==="percentage",V0=e=>e==="image"||e==="url",G0=e=>e==="length"||e==="size"||e==="bg-size",I0=e=>e==="length",V4=e=>e==="number",H0=e=>e==="family-name",Z0=e=>e==="number"||e==="weight",P0=e=>e==="shadow",G4=()=>{const e=At("color"),n=At("font"),i=At("text"),r=At("font-weight"),l=At("tracking"),c=At("leading"),d=At("breakpoint"),m=At("container"),g=At("spacing"),b=At("radius"),v=At("shadow"),S=At("inset-shadow"),w=At("text-shadow"),_=At("drop-shadow"),C=At("blur"),N=At("perspective"),T=At("aspect"),R=At("ease"),G=At("animate"),H=()=>["auto","avoid","all","avoid-page","page","left","right","column"],K=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],X=()=>[...K(),he,me],J=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto","contain","none"],M=()=>[he,me,g],oe=()=>[Va,"full","auto",...M()],Ne=()=>[Ga,"none","subgrid",he,me],Ae=()=>["auto",{span:["full",Ga,he,me]},Ga,he,me],ve=()=>[Ga,"auto",he,me],et=()=>["auto","min","max","fr",he,me],re=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],pe=()=>["start","end","center","stretch","center-safe","end-safe"],U=()=>["auto",...M()],F=()=>[Va,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...M()],de=()=>[Va,"screen","full","dvw","lvw","svw","min","max","fit",...M()],je=()=>[Va,"screen","full","lh","dvh","lvh","svh","min","max","fit",...M()],ie=()=>[e,he,me],Qe=()=>[...K(),Nb,jb,{position:[he,me]}],Q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],le=()=>["auto","cover","contain",q4,D4,{size:[he,me]}],te=()=>[nf,Xr,bi],ue=()=>["","none","full",b,he,me],ne=()=>["",Te,Xr,bi],_e=()=>["solid","dashed","dotted","double"],tt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],xe=()=>[Te,nf,Nb,jb],$e=()=>["","none",C,he,me],Ze=()=>["none",Te,he,me],Ct=()=>["none",Te,he,me],zn=()=>[Te,he,me],Tt=()=>[Va,"full",...M()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[fa],breakpoint:[fa],color:[U0],container:[fa],"drop-shadow":[fa],ease:["in","out","in-out"],font:[O4],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[fa],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[fa],shadow:[fa],spacing:["px",Te],text:[fa],"text-shadow":[fa],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Va,me,he,T]}],container:["container"],columns:[{columns:[Te,me,he,m]}],"break-after":[{"break-after":H()}],"break-before":[{"break-before":H()}],"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:X()}],overflow:[{overflow:J()}],"overflow-x":[{"overflow-x":J()}],"overflow-y":[{"overflow-y":J()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:oe()}],"inset-x":[{"inset-x":oe()}],"inset-y":[{"inset-y":oe()}],start:[{"inset-s":oe(),start:oe()}],end:[{"inset-e":oe(),end:oe()}],"inset-bs":[{"inset-bs":oe()}],"inset-be":[{"inset-be":oe()}],top:[{top:oe()}],right:[{right:oe()}],bottom:[{bottom:oe()}],left:[{left:oe()}],visibility:["visible","invisible","collapse"],z:[{z:[Ga,"auto",he,me]}],basis:[{basis:[Va,"full","auto",m,...M()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Te,Va,"auto","initial","none",me]}],grow:[{grow:["",Te,he,me]}],shrink:[{shrink:["",Te,he,me]}],order:[{order:[Ga,"first","last","none",he,me]}],"grid-cols":[{"grid-cols":Ne()}],"col-start-end":[{col:Ae()}],"col-start":[{"col-start":ve()}],"col-end":[{"col-end":ve()}],"grid-rows":[{"grid-rows":Ne()}],"row-start-end":[{row:Ae()}],"row-start":[{"row-start":ve()}],"row-end":[{"row-end":ve()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":et()}],"auto-rows":[{"auto-rows":et()}],gap:[{gap:M()}],"gap-x":[{"gap-x":M()}],"gap-y":[{"gap-y":M()}],"justify-content":[{justify:[...re(),"normal"]}],"justify-items":[{"justify-items":[...pe(),"normal"]}],"justify-self":[{"justify-self":["auto",...pe()]}],"align-content":[{content:["normal",...re()]}],"align-items":[{items:[...pe(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...pe(),{baseline:["","last"]}]}],"place-content":[{"place-content":re()}],"place-items":[{"place-items":[...pe(),"baseline"]}],"place-self":[{"place-self":["auto",...pe()]}],p:[{p:M()}],px:[{px:M()}],py:[{py:M()}],ps:[{ps:M()}],pe:[{pe:M()}],pbs:[{pbs:M()}],pbe:[{pbe:M()}],pt:[{pt:M()}],pr:[{pr:M()}],pb:[{pb:M()}],pl:[{pl:M()}],m:[{m:U()}],mx:[{mx:U()}],my:[{my:U()}],ms:[{ms:U()}],me:[{me:U()}],mbs:[{mbs:U()}],mbe:[{mbe:U()}],mt:[{mt:U()}],mr:[{mr:U()}],mb:[{mb:U()}],ml:[{ml:U()}],"space-x":[{"space-x":M()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":M()}],"space-y-reverse":["space-y-reverse"],size:[{size:F()}],"inline-size":[{inline:["auto",...de()]}],"min-inline-size":[{"min-inline":["auto",...de()]}],"max-inline-size":[{"max-inline":["none",...de()]}],"block-size":[{block:["auto",...je()]}],"min-block-size":[{"min-block":["auto",...je()]}],"max-block-size":[{"max-block":["none",...je()]}],w:[{w:[m,"screen",...F()]}],"min-w":[{"min-w":[m,"screen","none",...F()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[d]},...F()]}],h:[{h:["screen","lh",...F()]}],"min-h":[{"min-h":["screen","lh","none",...F()]}],"max-h":[{"max-h":["screen","lh",...F()]}],"font-size":[{text:["base",i,Xr,bi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,$4,R4]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",nf,me]}],"font-family":[{font:[L4,M4,n]}],"font-features":[{"font-features":[me]}],"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:[l,he,me]}],"line-clamp":[{"line-clamp":[Te,"none",he,wb]}],leading:[{leading:[c,...M()]}],"list-image":[{"list-image":["none",he,me]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",he,me]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:ie()}],"text-color":[{text:ie()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[..._e(),"wavy"]}],"text-decoration-thickness":[{decoration:[Te,"from-font","auto",he,bi]}],"text-decoration-color":[{decoration:ie()}],"underline-offset":[{"underline-offset":[Te,"auto",he,me]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",he,me]}],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",he,me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Qe()}],"bg-repeat":[{bg:Q()}],"bg-size":[{bg:le()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ga,he,me],radial:["",he,me],conic:[Ga,he,me]},U4,B4]}],"bg-color":[{bg:ie()}],"gradient-from-pos":[{from:te()}],"gradient-via-pos":[{via:te()}],"gradient-to-pos":[{to:te()}],"gradient-from":[{from:ie()}],"gradient-via":[{via:ie()}],"gradient-to":[{to:ie()}],rounded:[{rounded:ue()}],"rounded-s":[{"rounded-s":ue()}],"rounded-e":[{"rounded-e":ue()}],"rounded-t":[{"rounded-t":ue()}],"rounded-r":[{"rounded-r":ue()}],"rounded-b":[{"rounded-b":ue()}],"rounded-l":[{"rounded-l":ue()}],"rounded-ss":[{"rounded-ss":ue()}],"rounded-se":[{"rounded-se":ue()}],"rounded-ee":[{"rounded-ee":ue()}],"rounded-es":[{"rounded-es":ue()}],"rounded-tl":[{"rounded-tl":ue()}],"rounded-tr":[{"rounded-tr":ue()}],"rounded-br":[{"rounded-br":ue()}],"rounded-bl":[{"rounded-bl":ue()}],"border-w":[{border:ne()}],"border-w-x":[{"border-x":ne()}],"border-w-y":[{"border-y":ne()}],"border-w-s":[{"border-s":ne()}],"border-w-e":[{"border-e":ne()}],"border-w-bs":[{"border-bs":ne()}],"border-w-be":[{"border-be":ne()}],"border-w-t":[{"border-t":ne()}],"border-w-r":[{"border-r":ne()}],"border-w-b":[{"border-b":ne()}],"border-w-l":[{"border-l":ne()}],"divide-x":[{"divide-x":ne()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ne()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[..._e(),"hidden","none"]}],"divide-style":[{divide:[..._e(),"hidden","none"]}],"border-color":[{border:ie()}],"border-color-x":[{"border-x":ie()}],"border-color-y":[{"border-y":ie()}],"border-color-s":[{"border-s":ie()}],"border-color-e":[{"border-e":ie()}],"border-color-bs":[{"border-bs":ie()}],"border-color-be":[{"border-be":ie()}],"border-color-t":[{"border-t":ie()}],"border-color-r":[{"border-r":ie()}],"border-color-b":[{"border-b":ie()}],"border-color-l":[{"border-l":ie()}],"divide-color":[{divide:ie()}],"outline-style":[{outline:[..._e(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Te,he,me]}],"outline-w":[{outline:["",Te,Xr,bi]}],"outline-color":[{outline:ie()}],shadow:[{shadow:["","none",v,Ul,ql]}],"shadow-color":[{shadow:ie()}],"inset-shadow":[{"inset-shadow":["none",S,Ul,ql]}],"inset-shadow-color":[{"inset-shadow":ie()}],"ring-w":[{ring:ne()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:ie()}],"ring-offset-w":[{"ring-offset":[Te,bi]}],"ring-offset-color":[{"ring-offset":ie()}],"inset-ring-w":[{"inset-ring":ne()}],"inset-ring-color":[{"inset-ring":ie()}],"text-shadow":[{"text-shadow":["none",w,Ul,ql]}],"text-shadow-color":[{"text-shadow":ie()}],opacity:[{opacity:[Te,he,me]}],"mix-blend":[{"mix-blend":[...tt(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":tt()}],"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":xe()}],"mask-image-linear-to-pos":[{"mask-linear-to":xe()}],"mask-image-linear-from-color":[{"mask-linear-from":ie()}],"mask-image-linear-to-color":[{"mask-linear-to":ie()}],"mask-image-t-from-pos":[{"mask-t-from":xe()}],"mask-image-t-to-pos":[{"mask-t-to":xe()}],"mask-image-t-from-color":[{"mask-t-from":ie()}],"mask-image-t-to-color":[{"mask-t-to":ie()}],"mask-image-r-from-pos":[{"mask-r-from":xe()}],"mask-image-r-to-pos":[{"mask-r-to":xe()}],"mask-image-r-from-color":[{"mask-r-from":ie()}],"mask-image-r-to-color":[{"mask-r-to":ie()}],"mask-image-b-from-pos":[{"mask-b-from":xe()}],"mask-image-b-to-pos":[{"mask-b-to":xe()}],"mask-image-b-from-color":[{"mask-b-from":ie()}],"mask-image-b-to-color":[{"mask-b-to":ie()}],"mask-image-l-from-pos":[{"mask-l-from":xe()}],"mask-image-l-to-pos":[{"mask-l-to":xe()}],"mask-image-l-from-color":[{"mask-l-from":ie()}],"mask-image-l-to-color":[{"mask-l-to":ie()}],"mask-image-x-from-pos":[{"mask-x-from":xe()}],"mask-image-x-to-pos":[{"mask-x-to":xe()}],"mask-image-x-from-color":[{"mask-x-from":ie()}],"mask-image-x-to-color":[{"mask-x-to":ie()}],"mask-image-y-from-pos":[{"mask-y-from":xe()}],"mask-image-y-to-pos":[{"mask-y-to":xe()}],"mask-image-y-from-color":[{"mask-y-from":ie()}],"mask-image-y-to-color":[{"mask-y-to":ie()}],"mask-image-radial":[{"mask-radial":[he,me]}],"mask-image-radial-from-pos":[{"mask-radial-from":xe()}],"mask-image-radial-to-pos":[{"mask-radial-to":xe()}],"mask-image-radial-from-color":[{"mask-radial-from":ie()}],"mask-image-radial-to-color":[{"mask-radial-to":ie()}],"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":K()}],"mask-image-conic-pos":[{"mask-conic":[Te]}],"mask-image-conic-from-pos":[{"mask-conic-from":xe()}],"mask-image-conic-to-pos":[{"mask-conic-to":xe()}],"mask-image-conic-from-color":[{"mask-conic-from":ie()}],"mask-image-conic-to-color":[{"mask-conic-to":ie()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Qe()}],"mask-repeat":[{mask:Q()}],"mask-size":[{mask:le()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",he,me]}],filter:[{filter:["","none",he,me]}],blur:[{blur:$e()}],brightness:[{brightness:[Te,he,me]}],contrast:[{contrast:[Te,he,me]}],"drop-shadow":[{"drop-shadow":["","none",_,Ul,ql]}],"drop-shadow-color":[{"drop-shadow":ie()}],grayscale:[{grayscale:["",Te,he,me]}],"hue-rotate":[{"hue-rotate":[Te,he,me]}],invert:[{invert:["",Te,he,me]}],saturate:[{saturate:[Te,he,me]}],sepia:[{sepia:["",Te,he,me]}],"backdrop-filter":[{"backdrop-filter":["","none",he,me]}],"backdrop-blur":[{"backdrop-blur":$e()}],"backdrop-brightness":[{"backdrop-brightness":[Te,he,me]}],"backdrop-contrast":[{"backdrop-contrast":[Te,he,me]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Te,he,me]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Te,he,me]}],"backdrop-invert":[{"backdrop-invert":["",Te,he,me]}],"backdrop-opacity":[{"backdrop-opacity":[Te,he,me]}],"backdrop-saturate":[{"backdrop-saturate":[Te,he,me]}],"backdrop-sepia":[{"backdrop-sepia":["",Te,he,me]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":M()}],"border-spacing-x":[{"border-spacing-x":M()}],"border-spacing-y":[{"border-spacing-y":M()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",he,me]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Te,"initial",he,me]}],ease:[{ease:["linear","initial",R,he,me]}],delay:[{delay:[Te,he,me]}],animate:[{animate:["none",G,he,me]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[N,he,me]}],"perspective-origin":[{"perspective-origin":X()}],rotate:[{rotate:Ze()}],"rotate-x":[{"rotate-x":Ze()}],"rotate-y":[{"rotate-y":Ze()}],"rotate-z":[{"rotate-z":Ze()}],scale:[{scale:Ct()}],"scale-x":[{"scale-x":Ct()}],"scale-y":[{"scale-y":Ct()}],"scale-z":[{"scale-z":Ct()}],"scale-3d":["scale-3d"],skew:[{skew:zn()}],"skew-x":[{"skew-x":zn()}],"skew-y":[{"skew-y":zn()}],transform:[{transform:[he,me,"","none","gpu","cpu"]}],"transform-origin":[{origin:X()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Tt()}],"translate-x":[{"translate-x":Tt()}],"translate-y":[{"translate-y":Tt()}],"translate-z":[{"translate-z":Tt()}],"translate-none":["translate-none"],accent:[{accent:ie()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:ie()}],"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",he,me]}],"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":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mbs":[{"scroll-mbs":M()}],"scroll-mbe":[{"scroll-mbe":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pbs":[{"scroll-pbs":M()}],"scroll-pbe":[{"scroll-pbe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"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",he,me]}],fill:[{fill:["none",...ie()]}],"stroke-w":[{stroke:[Te,Xr,bi,wb]}],stroke:[{stroke:["none",...ie()]}],"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"]}},I4=x4(G4);function _n(...e){return I4(nv(e))}const H4=O0("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"}}),Le=$.forwardRef(({className:e,variant:n,size:i,asChild:r=!1,...l},c)=>{const d=r?mw:"button";return f.jsx(d,{ref:c,className:_n(H4({variant:n,size:i,className:e})),...l})});Le.displayName="Button";const Z4=O0("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 K0({className:e,variant:n,...i}){return f.jsx("div",{className:_n(Z4({variant:n}),e),...i})}const P4=220;function kb({compact:e=!1,version:n,updateAvailable:i,onDismissUpdate:r}){const l=!e&&n&&n!=="unknown",[c,d]=$.useState(!1),m=!e&&i&&r,g=()=>{d(!0),window.setTimeout(()=>{r?.(),d(!1)},P4)};return e?f.jsxs(rt,{to:"/",className:"brand-lockup brand-lockup-compact","aria-label":"Canonry home",children:[f.jsx("img",{className:"brand-icon",src:"./favicon.svg",alt:"","aria-hidden":"true"}),f.jsx("span",{className:"brand-copy",children:f.jsx("span",{className:"brand-mark",children:"Canonry"})})]}):f.jsxs("div",{className:"brand-lockup brand-lockup-wrapper",children:[f.jsx(rt,{to:"/",className:"brand-icon-link","aria-label":"Canonry home",tabIndex:-1,children:f.jsx("img",{className:"brand-icon",src:"./favicon.svg",alt:"","aria-hidden":"true"})}),f.jsxs("div",{className:"brand-copy",children:[f.jsx(rt,{to:"/",className:"brand-mark",children:"Canonry"}),m?f.jsxs("span",{className:`brand-update-bubble ${c?"brand-update-bubble-closing":""}`,role:"status","aria-live":"polite",children:[f.jsxs("a",{className:"brand-update-bubble-link",href:i.url,target:"_blank",rel:"noopener noreferrer",title:`Open release: ${i.upgradeCommand}`,"aria-label":`New version v${i.latest} available — open release page`,children:[f.jsxs("span",{className:"brand-update-bubble-from",children:["v",i.current]}),f.jsx(xk,{className:"brand-update-bubble-arrow size-3","aria-hidden":"true"}),f.jsxs("span",{className:"brand-update-bubble-to",children:["v",i.latest]})]}),f.jsx("button",{type:"button",className:"brand-update-bubble-dismiss",onClick:g,"aria-label":`Dismiss update notification for v${i.latest}`,children:f.jsx(Hs,{className:"size-3","aria-hidden":"true"})})]}):l?f.jsxs("span",{className:"brand-version",children:["v",n]}):null]})]})}function K4({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",perplexity:"border-teal-800/50 bg-teal-950/40 text-teal-300",local:"border-purple-800/50 bg-purple-950/40 text-purple-300"};return f.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 Bn({tone:e,children:n,...i}){const r=e==="positive"?"success":e==="caution"?"warning":e==="negative"?"destructive":"neutral";return f.jsx(K0,{variant:r,...i,children:n})}function fp({status:e}){return f.jsx(Bn,{tone:z0(e),children:A0(e)})}const Q4=tv,Y4=Fb,Q0=$.forwardRef(({className:e,...n},i)=>f.jsx(Df,{ref:i,className:_n("fixed inset-0 z-50 bg-black/70 backdrop-blur-sm",e),...n}));Q0.displayName=Df.displayName;const X4=400,J4=1200,F4=720,Y0=$.forwardRef(({className:e,children:n,...i},r)=>{const[l,c]=$.useState(F4),d=$.useRef(!1),m=$.useRef(0),g=$.useRef(0),b=$.useCallback(w=>{d.current=!0,m.current=w.clientX,g.current=l,w.target.setPointerCapture(w.pointerId),w.preventDefault()},[l]),v=$.useCallback(w=>{if(!d.current)return;const _=m.current-w.clientX,C=Math.min(J4,Math.max(X4,g.current+_));c(C)},[]),S=$.useCallback(()=>{d.current=!1},[]);return f.jsxs(Y4,{children:[f.jsx(Q0,{}),f.jsxs(Rf,{ref:r,className:_n("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(${l}px, 100vw)`},...i,children:[f.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:b,onPointerMove:v,onPointerUp:S}),n,f.jsxs(Wb,{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:[f.jsx(Hs,{className:"size-4"}),f.jsx("span",{className:"sr-only",children:"Close"})]})]})]})});Y0.displayName=Rf.displayName;const W4=({className:e,...n})=>f.jsx("div",{className:_n("flex flex-col gap-1.5 pr-10",e),...n}),X0=$.forwardRef(({className:e,...n},i)=>f.jsx(Mf,{ref:i,className:_n("text-lg font-medium text-zinc-50",e),...n}));X0.displayName=Mf.displayName;const J0=$.forwardRef(({className:e,...n},i)=>f.jsx(ev,{ref:i,className:_n("text-sm text-zinc-500",e),...n}));J0.displayName=ev.displayName;function e3({title:e,subtitle:n,children:i,open:r,onClose:l}){return f.jsx(Q4,{open:r,onOpenChange:c=>c?void 0:l(),children:f.jsxs(Y0,{children:[f.jsxs(W4,{className:"drawer-head",children:[f.jsx("p",{className:"eyebrow eyebrow-soft",children:n}),f.jsx(X0,{id:"drawer-title",children:e}),f.jsx(J0,{className:"sr-only",children:n})]}),f.jsx("div",{className:"drawer-body",children:i})]})})}function $l({text:e}){const[n,i]=$.useState(null),r=$.useRef(null),l=$.useCallback(()=>{if(!r.current)return;const d=r.current.getBoundingClientRect();i({top:d.top,left:d.left+d.width/2})},[]),c=$.useCallback(()=>i(null),[]);return f.jsxs("span",{className:"info-tooltip-wrapper",onMouseEnter:l,onMouseLeave:c,onFocus:l,onBlur:c,children:[f.jsxs("svg",{ref:r,className:"info-tooltip-icon",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[f.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),f.jsx("path",{d:"M8 7v4M8 5.5v0",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),n!==null&&rw.createPortal(f.jsx("span",{role:"tooltip",style:{position:"fixed",top:n.top,left:n.left,transform:"translateX(-50%) translateY(calc(-100% - 8px))",zIndex:9999,pointerEvents:"none",width:"14rem",padding:"0.5rem 0.75rem",fontSize:"11px",fontWeight:400,textTransform:"none",letterSpacing:"normal",lineHeight:"1rem",color:"#d4d4d8",backgroundColor:"#18181b",border:"1px solid rgba(63, 63, 70, 0.6)",borderRadius:"0.5rem",boxShadow:"0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1)"},children:e}),document.body)]})}const t3=/[\s\-_]+/;function n3(e){const n=e.split(t3).filter(Boolean);return n.length===0?null:n.map(i=>i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("[\\s\\-_]*")}function Ab(e,n){const i=a3(n),r=e.split(/(\*\*[^*]+\*\*)/).filter(Boolean).map(b=>b.startsWith("**")&&b.endsWith("**")?{type:"bold",value:b.slice(2,-2)}:{type:"text",value:b}),l=i.flatMap(b=>b.terms).filter(b=>b.trim().length>1);if(l.length===0)return r.map((b,v)=>b.type==="bold"?ks.createElement("strong",{key:`b-${v}`,className:"text-zinc-200 font-semibold"},b.value):b.value).filter(Boolean);const d=[...l].sort((b,v)=>v.length-b.length).map(n3).filter(b=>!!b);if(d.length===0)return r.map((b,v)=>b.type==="bold"?ks.createElement("strong",{key:`b-${v}`,className:"text-zinc-200 font-semibold"},b.value):b.value).filter(Boolean);const m=new RegExp(`(${d.join("|")})`,"gi"),g=new Map;for(const b of i)for(const v of b.terms){const S=oc(v);S&&!g.has(S)&&g.set(S,b.className)}return r.flatMap((b,v)=>b.value.split(m).map((w,_)=>{if(!w)return null;if(_%2===1){const N=g.get(oc(w))??"answer-highlight";return b.type==="bold"?ks.createElement("mark",{key:`hl-${v}-${_}`,className:N},ks.createElement("strong",{className:"text-zinc-200 font-semibold"},w)):ks.createElement("mark",{key:`hl-${v}-${_}`,className:N},w)}return b.type==="bold"?ks.createElement("strong",{key:`b-${v}-${_}`,className:"text-zinc-200 font-semibold"},w):w})).filter(Boolean)}function a3(e){return e.length===0?[]:typeof e[0]=="string"?[{terms:e,className:"answer-highlight"}]:e}function af(e,n){switch(e){case"new":return"First observation";case"emerging":return"First mention";case"lost":return"Lost since last run";default:return n==="mentioned"||n==="visible"?"Mentioned in latest run":n==="pending"?"Awaiting first run":"Not mentioned in latest run"}}function i3({evidence:e,project:n,onClose:i}){const[r,l]=$.useState(!1),[c,d]=$.useState("mentions"),[m,g]=$.useState(-1),[b,v]=$.useState(null),[S,w]=$.useState(!1),[_,C]=$.useState({}),N=FC(n.project),T=new Set(N.map(ac)),R=e.runHistory,G=R.length>1,[H,K]=$.useState(null),X=$.useRef(!1);$.useEffect(()=>{if(X.current||e.answerSnippet&&(e.visibilityState!=null||e.answerMentioned!=null))return;const te=R.at(-1);te&&(X.current=!0,Fl(te.runId).then(ue=>{const ne=ue.snapshots?.find(_e=>_e.query===e.query&&_e.provider===e.provider);ne&&K({citationState:ne.citationState,answerMentioned:ne.answerMentioned,visibilityState:ne.visibilityState,visibilityTransition:te.visibilityTransition,provider:ne.provider,model:ne.model??e.model,answerSnippet:ne.answerText??e.answerSnippet,citedDomains:ne.citedDomains??e.citedDomains,competitorDomains:ne.competitorOverlap??e.competitorDomains,recommendedCompetitors:ne.recommendedCompetitors??e.recommendedCompetitors??[],matchedTerms:ne.matchedTerms??e.matchedTerms??[],groundingSources:ne.groundingSources??e.groundingSources,evidenceUrls:[],changeLabel:e.visibilityChangeLabel??e.changeLabel,summary:e.summary})}).catch(()=>{}))},[e,R]);const J=m>=0&&b!==null,D=J?b:H||{citationState:e.citationState,answerMentioned:e.answerMentioned,visibilityState:e.visibilityState,visibilityTransition:R.at(-1)?.visibilityTransition,provider:e.provider,model:e.model,answerSnippet:e.answerSnippet,citedDomains:e.citedDomains,competitorDomains:e.competitorDomains,recommendedCompetitors:e.recommendedCompetitors??[],matchedTerms:e.matchedTerms??[],groundingSources:e.groundingSources,evidenceUrls:e.evidenceUrls,changeLabel:e.visibilityChangeLabel??e.changeLabel,summary:e.summary},M=D.visibilityState==="pending"||D.citationState==="pending",oe=M?!1:D.visibilityState!=null?D.visibilityState==="visible":D.answerMentioned!=null?D.answerMentioned:D.citationState===ic.cited||D.citationState==="emerging",Ne=D.answerMentioned!=null||D.visibilityState!=null||D.recommendedCompetitors.length>0,Ae=D.citedDomains.length>0||D.groundingSources.length>0||D.evidenceUrls.length>0,ve=n.project.displayName||n.project.name,et=[...N.map(ac),ve,ve.split(" ").slice(0,2).join(" "),...D.matchedTerms].filter(te=>te.trim().length>2),re=[...D.competitorDomains.flatMap(te=>{const ue=JC(te);return ue.length>=4?[ue]:[]}),...D.recommendedCompetitors].filter(te=>te.trim().length>2),pe=[{terms:et,className:"answer-highlight-brand"},...re.length>0?[{terms:re,className:"answer-highlight-competitor"}]:[]],U=M?"pending":D.visibilityTransition==="lost"?"lost":oe?"mentioned":"not-mentioned",F=$.useRef(0),de=$.useCallback(async te=>{const ue=++F.current;if(te===-1||te===R.length-1){g(-1),v(null),l(!1);return}g(te),l(!1);const ne=R[te],_e=`${ne.runId}::${e.query}::${e.provider}`;if(_[_e]){v(_[_e]);return}w(!0);try{const tt=await Fl(ne.runId);if(ue!==F.current)return;const xe=tt.snapshots?.find(Ze=>Ze.query===e.query&&Ze.provider===e.provider)??tt.snapshots?.find(Ze=>Ze.query===e.query),$e=xe?{citationState:xe.citationState,answerMentioned:xe.answerMentioned,visibilityState:xe.visibilityState,visibilityTransition:ne.visibilityTransition,provider:xe.provider,model:xe.model??null,answerSnippet:xe.answerText??"",citedDomains:xe.citedDomains,competitorDomains:xe.competitorOverlap,recommendedCompetitors:xe.recommendedCompetitors??[],matchedTerms:xe.matchedTerms??[],groundingSources:xe.groundingSources,evidenceUrls:[],changeLabel:af(ne.mentionTransition??ne.visibilityTransition,ne.mentionState??ne.visibilityState),summary:""}:{citationState:ne.citationState,answerMentioned:ne.answerMentioned,visibilityState:ne.visibilityState,visibilityTransition:ne.visibilityTransition,provider:e.provider,model:ne.model??null,answerSnippet:"",citedDomains:[],competitorDomains:[],recommendedCompetitors:[],matchedTerms:[],groundingSources:[],evidenceUrls:[],changeLabel:af(ne.mentionTransition??ne.visibilityTransition,ne.mentionState??ne.visibilityState),summary:"Snapshot data not available for this run."};C(Ze=>({...Ze,[_e]:$e})),v($e)}catch{if(ue!==F.current)return;v({citationState:ne.citationState,answerMentioned:ne.answerMentioned,visibilityState:ne.visibilityState,visibilityTransition:ne.visibilityTransition,provider:e.provider,model:ne.model??null,answerSnippet:"",citedDomains:[],competitorDomains:[],recommendedCompetitors:[],matchedTerms:[],groundingSources:[],evidenceUrls:[],changeLabel:af(ne.mentionTransition??ne.visibilityTransition,ne.mentionState??ne.visibilityState),summary:"Failed to load historical run data."})}finally{ue===F.current&&w(!1)}},[R,e.query,e.provider,_]),ie=(J||e.historyScope!=="provider")&&D.model?`${D.provider} (${D.model}) · ${D.changeLabel.toLowerCase()}`:`${D.provider} · ${D.changeLabel.toLowerCase()}`,Qe=!J&&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(" · "):"",Q=oe?{label:"Mentioned in answer",title:"Your brand or domain is mentioned in this answer",meta:ie}:D.visibilityTransition==="lost"?{label:"Mention lost",title:"Your brand no longer appears in this answer",meta:ie}:M?{label:"Pending",title:"Awaiting first run",meta:"No provider data yet"}:{label:"Not mentioned in answer",title:"Your brand or domain was not mentioned in this answer",meta:ie},le=()=>{if(!D.answerSnippet)return null;const te=D.answerSnippet.split(`
58
- `),ue=[];let ne=[],_e=0;const tt=()=>{if(ne.length===0)return;const xe=ne.join(" ").trim();xe&&ue.push(f.jsx("p",{className:ue.length>0?"mt-2.5":"",children:Ab(xe,pe)},_e++)),ne=[]};for(const xe of te){const $e=xe.trim();if(/^[-\u2013\u2014]{3,}$/.test($e)){tt(),ue.push(f.jsx("hr",{className:"border-zinc-800/60 my-3"},_e++));continue}const Ze=$e.match(/^(#{1,3})\s+(\S.*)$/);if(Ze){tt();const Ct=Ze[1].length,zn=Ze[2].replace(/^[\p{Emoji}\p{Emoji_Component}\s]+/u,"").trim()||Ze[2],Tt=Ct===1?"text-[13px] font-semibold text-zinc-100 mt-4 mb-1":Ct===2?"text-xs font-semibold text-zinc-200 mt-3 mb-0.5":"text-xs font-medium text-zinc-300 mt-2";ue.push(f.jsx("p",{className:Tt,children:Ab(zn,pe)},_e++));continue}if($e===""){tt();continue}ne.push($e)}return tt(),ue};return f.jsx(tv,{open:!0,onOpenChange:te=>{te||i()},children:f.jsxs(Fb,{children:[f.jsx(Df,{className:"fixed inset-0 z-50 bg-black/80 backdrop-blur-sm"}),f.jsxs(Rf,{className:"evidence-modal","aria-describedby":void 0,children:[f.jsxs("div",{className:"evidence-modal-header",children:[f.jsxs("div",{className:"min-w-0 flex-1",children:[f.jsxs("p",{className:"eyebrow eyebrow-soft",children:[n.project.name," ","·"," ",D.provider||"All providers"]}),f.jsx(Mf,{className:"text-lg font-semibold text-zinc-50 truncate",children:e.query})]}),f.jsxs(Wb,{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:[f.jsx(Hs,{className:"size-4"}),f.jsx("span",{className:"sr-only",children:"Close"})]})]}),G&&f.jsxs("div",{className:"evidence-modal-timeline",children:[f.jsx("p",{className:"drawer-section-label mb-1.5",children:"Run history"}),f.jsx("div",{className:"flex items-center gap-1 overflow-x-auto pb-1",children:R.map((te,ue)=>{const ne=m===-1&&ue===R.length-1||m===ue,_e=te.visibilityState??(te.answerMentioned?"visible":"not-visible"),tt=te.visibilityTransition??_e,xe=_e==="visible"?"bg-emerald-400":tt==="emerging"?"bg-amber-400":tt==="lost"?"bg-rose-400":"bg-zinc-600",Ze=new Date(te.createdAt).toLocaleDateString(void 0,{month:"short",day:"numeric"}),Ct=!!(te.model&&ue>0&&R[ue-1]?.model&&R[ue-1].model!==te.model);return f.jsxs("button",{type:"button",className:`evidence-run-dot ${ne?"evidence-run-dot--selected":""}`,onClick:()=>{de(ue===R.length-1?-1:ue)},"aria-label":[`Run ${Ze}: ${_e}`,te.model?`model ${te.model}`:null,Ct?"model changed":null].filter(Boolean).join(" — "),"aria-pressed":ne,children:[f.jsx("span",{className:`size-2 rounded-full ${xe} ${Ct?"ring-1 ring-amber-300/80 ring-offset-2 ring-offset-zinc-950":""}`,"aria-hidden":"true"}),f.jsx("span",{className:"text-[10px] text-zinc-500",children:Ze})]},ue)})}),m>=0&&m<R.length&&f.jsxs("p",{className:"text-[11px] text-zinc-500 mt-1",children:["Viewing run from ",new Date(R[m].createdAt).toLocaleString()," ","—"," ",f.jsx("span",{className:"capitalize",children:R[m].visibilityState??(R[m].answerMentioned?"visible":"not-visible")}),f.jsxs("button",{type:"button",className:"text-zinc-400 hover:text-zinc-200 ml-2",onClick:()=>{de(-1)},children:["←"," Back to latest"]})]}),!J&&(e.modelTransitions?.length??0)>0&&f.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:e.modelTransitions.map(te=>f.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:`${te.fromModel??"unknown"} -> ${te.toModel??"unknown"} on ${new Date(te.createdAt).toLocaleDateString()}`},`${te.runId}:${te.toModel??"unknown"}`))})]}),f.jsxs("div",{className:"evidence-modal-body",children:[S&&f.jsxs("div",{className:"md:col-span-2 flex items-center justify-center py-12 text-zinc-500 text-sm",children:["Loading historical run data","…"]}),!S&&f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"evidence-modal-main",children:[f.jsxs("div",{className:`evidence-position-hero evidence-position-hero--${U}`,children:[f.jsx("p",{className:`evidence-position-label evidence-position-label--${U}`,children:Q.label}),f.jsx("p",{className:`evidence-position-title evidence-position-title--${U}`,children:Q.title}),f.jsx("p",{className:"evidence-position-meta",children:Q.meta}),Qe&&f.jsx("p",{className:"mt-1 text-[11px] text-zinc-500",children:Qe})]}),D.answerSnippet&&f.jsxs("div",{children:[f.jsx("p",{className:"drawer-section-label",children:"What the AI said"}),f.jsx("div",{className:`answer-snippet-block ${r?"evidence-answer-expanded":"evidence-answer-collapsed"}`,children:le()}),D.answerSnippet.length>280&&f.jsx("button",{type:"button",className:"mt-1.5 text-xs text-zinc-500 hover:text-zinc-300 transition-colors",onClick:()=>l(!r),children:r?"↑ Collapse":"↓ Show full answer"})]}),!D.answerSnippet&&!S&&f.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"}),!J&&e.relatedTechnicalSignals.length>0&&f.jsxs("div",{children:[f.jsx("p",{className:"drawer-section-label",children:oe?"Why you're visible":"What to fix"}),f.jsx("div",{className:"action-items-list",children:e.relatedTechnicalSignals.map((te,ue)=>f.jsxs("div",{className:"action-item",children:[f.jsx("svg",{className:`action-item-icon ${oe?"text-emerald-400":"text-amber-400"}`,viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:oe?f.jsx("path",{d:"M3 8l3.5 3.5L13 4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}):f.jsxs(f.Fragment,{children:[f.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),f.jsx("path",{d:"M8 5v3.5M8 10.5v0",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}),f.jsx("span",{className:"action-item-text",children:te})]},ue))})]}),D.summary&&f.jsx("p",{className:"text-xs text-zinc-600 border-t border-zinc-800/40 pt-3 mt-1",children:D.summary})]}),f.jsxs("div",{className:"evidence-modal-sidebar",children:[(Ne||Ae)&&f.jsxs("div",{className:"sidebar-tabs",children:[f.jsx("button",{className:`sidebar-tab ${c==="mentions"?"sidebar-tab--active":""}`,onClick:()=>d("mentions"),type:"button",title:"Canonry's answer-level visibility assessment and any company names extracted from the answer text.",children:"Mentions"}),f.jsx("button",{className:`sidebar-tab ${c==="sources"?"sidebar-tab--active":""}`,onClick:()=>d("sources"),type:"button",title:"Grounding links the model used to build the answer. These are supporting sources, not the primary visibility signal.",children:"Sources"})]}),c==="mentions"&&f.jsxs(f.Fragment,{children:[f.jsxs("div",{children:[f.jsxs("div",{className:"drawer-section-label flex items-center",children:[f.jsx("span",{children:"Mention in answer"}),f.jsx($l,{text:"Canonry scans the AI answer for your owned domains and project name. This is independent from grounding or citation sources."})]}),f.jsxs("div",{className:`mention-status mention-status--${oe?"mentioned":"not-mentioned"}`,children:[f.jsx("span",{className:"mention-status-icon",children:M?"…":oe?"✓":"—"}),f.jsx("span",{className:"mention-status-label",children:M?"Pending":oe?"Mentioned":"Not mentioned"})]}),D.matchedTerms.length>0&&f.jsxs("div",{className:"mt-2",children:[f.jsx("p",{className:"text-[10px] uppercase tracking-wide text-zinc-500 mb-1.5",children:"Matched in answer"}),f.jsx("div",{className:"flex flex-wrap gap-1.5",children:D.matchedTerms.map(te=>f.jsx("span",{className:"mention-chip mention-chip--brand",children:te},te))})]}),!M&&!oe&&D.matchedTerms.length===0&&f.jsxs("div",{className:"mt-2",children:[f.jsx("p",{className:"text-[10px] uppercase tracking-wide text-zinc-500 mb-1.5",children:"Searched for"}),f.jsx("div",{className:"flex flex-wrap gap-1.5",children:et.map(te=>f.jsx("span",{className:"mention-chip mention-chip--muted",children:te},te))}),f.jsx("p",{className:"text-[11px] text-zinc-600 mt-1.5",children:"None of these appear in the answer text."})]})]}),(D.recommendedCompetitors.length>0||D.competitorDomains.length>0)&&f.jsxs("div",{children:[f.jsxs("div",{className:"drawer-section-label flex items-center",children:[f.jsx("span",{children:"Competitors in answer"}),f.jsx($l,{text:"Competitors detected in the answer text or cited source links. Includes both tracked competitors and names extracted by Canonry."})]}),f.jsx("div",{className:"flex flex-wrap gap-1.5",children:(()=>{const te=D.competitorDomains.map(_e=>_e.replace(/^www\./,"")),ue=new Set(te.map(_e=>oc(_e.replace(/\.[^.]+$/,""))));return[...D.recommendedCompetitors.filter(_e=>!ue.has(oc(_e))),...te].map(_e=>f.jsx("span",{className:"mention-chip mention-chip--competitor",children:_e},_e))})()})]})]}),c==="sources"&&f.jsxs(f.Fragment,{children:[D.citedDomains.length>0&&f.jsxs("div",{children:[f.jsxs("div",{className:"drawer-section-label flex items-center",children:[f.jsx("span",{children:"Domains from source links"}),f.jsx($l,{text:"These domains were extracted from grounding or citation URLs. They are supporting-source metadata, not proof that the answer text mentioned them."})]}),f.jsx("div",{className:"citation-leaderboard",children:D.citedDomains.map((te,ue)=>{const ne=te.toLowerCase().replace(/^www\./,""),_e=T.has(ne),tt=!_e&&D.competitorDomains.some($e=>$e.toLowerCase().replace(/^www\./,"")===ne),xe=_e?"you":tt?"competitor":"other";return f.jsxs("div",{className:`citation-leaderboard-item citation-leaderboard-item--${xe}`,children:[f.jsxs("span",{className:"citation-leaderboard-rank",children:["#",ue+1]}),f.jsx("span",{className:"citation-leaderboard-domain",children:te}),_e&&f.jsx("span",{className:"citation-leaderboard-tag",children:"You"}),tt&&f.jsx("span",{className:"citation-leaderboard-tag",children:"Competitor"})]},te)})})]}),D.groundingSources.length>0&&f.jsxs("div",{children:[f.jsxs("div",{className:"drawer-section-label flex items-center",children:[f.jsxs("span",{children:["Grounding source links (",D.groundingSources.length,")"]}),f.jsx($l,{text:"Links the model used as grounding or supporting context while producing the answer. These are not the same thing as answer visibility."})]}),f.jsx("ul",{className:"grid gap-0.5",children:D.groundingSources.map((te,ue)=>f.jsx("li",{className:"truncate text-sm",children:f.jsx("a",{href:te.uri,target:"_blank",rel:"noopener noreferrer",className:"text-zinc-400 hover:text-zinc-200 transition-colors",children:te.title||te.uri})},ue))})]}),D.evidenceUrls.length>0&&f.jsxs("div",{children:[f.jsx("p",{className:"drawer-section-label",children:"Evidence URLs"}),f.jsx("ul",{className:"grid gap-1",children:D.evidenceUrls.map(te=>f.jsx("li",{className:"truncate text-sm",children:f.jsx("a",{href:te,target:"_blank",rel:"noopener noreferrer",className:"text-zinc-400 hover:text-zinc-200 transition-colors",children:te})},te))})]}),D.citedDomains.length===0&&D.groundingSources.length===0&&D.evidenceUrls.length===0&&f.jsxs("div",{className:"flex items-center justify-center h-24 text-zinc-600 text-sm",children:["No source data ",J?"for this run":"yet"]})]}),!Ne&&!Ae&&f.jsxs("div",{className:"flex items-center justify-center h-24 text-zinc-600 text-sm",children:["No answer visibility data ",J?"for this run":"yet"]})]})]})]})]})]})})}function Mn(e){const n=new Date("2026-02-20");return e.map((i,r)=>({runId:`run_mock_${r+1}`,citationState:i,createdAt:new Date(n.getTime()+r*2*24*60*60*1e3).toISOString()}))}const sf=[{id:"project_citypoint",name:"Citypoint Dental NYC",canonicalDomain:"citypointdental.com",ownedDomains:[],aliases:[],country:"US",language:"en",tags:["local intent","priority"],labels:{},providers:[],locations:[],defaultLocation:null,autoExtractBacklinks:!1,configSource:"cli",configRevision:1},{id:"project_harbor",name:"Harbor Legal Group",canonicalDomain:"harborlegal.com",ownedDomains:[],aliases:[],country:"US",language:"en",tags:["lead gen"],labels:{},providers:[],locations:[],defaultLocation:null,autoExtractBacklinks:!1,configSource:"cli",configRevision:1},{id:"project_northstar",name:"Northstar Orthopedics",canonicalDomain:"northstarortho.com",ownedDomains:[],aliases:[],country:"US",language:"en",tags:["multi-location"],labels:{},providers:[],locations:[],defaultLocation:null,autoExtractBacklinks:!1,configSource:"cli",configRevision:1}];function Sc(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 s3=Sc({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"}),r3=Sc({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"}),o3=Sc({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"}),l3=Sc({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"}),c3=[{id:"evidence_citypoint_emergency_gemini",query:"emergency dentist brooklyn",provider:"gemini",model:"gemini-2.5-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:Mn(["cited","cited","cited","cited","cited","cited","cited","not-cited","not-cited"])},{id:"evidence_citypoint_emergency_openai",query:"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:Mn(["not-cited","cited","cited","cited","cited","cited","cited"])},{id:"evidence_citypoint_emergency_claude",query:"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:Mn(["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",query:"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:Mn(["not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","cited"])},{id:"evidence_citypoint_invisalign_gemini",query:"best invisalign dentist downtown brooklyn",provider:"gemini",model:"gemini-2.5-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:Mn(["cited","cited","cited","cited","cited","cited","cited","cited"])},{id:"evidence_citypoint_invisalign_claude",query:"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:Mn(["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",query:"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:Mn(["not-cited","not-cited","not-cited","not-cited"])},{id:"evidence_citypoint_children_gemini",query:"pediatric dentist brooklyn heights",provider:"gemini",model:"gemini-2.5-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:Mn(["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",query:"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:Mn(["not-cited","not-cited","not-cited","not-cited","not-cited","cited"])}];sf[0],sf[1],Mn(["cited","cited","cited","cited","cited"]),sf[2],2/7,3/7,Mn(["not-cited","not-cited","not-cited","cited"]);function u3(e,n){return e.runs.find(i=>i.id===n)}function d3(e,n){for(const i of e.projects){const r=i.visibilityEvidence.find(l=>l.id===n);if(r)return{project:i,evidence:r}}}function f3(e,n,i){if(e){const r=e.visibilityEvidence.find(l=>l.id===i);if(r)return{project:e,evidence:r}}if(n)return d3(n,i)}const p3={regression:"negative",gain:"positive",opportunity:"caution","first-citation":"positive","provider-pickup":"positive","persistent-gap":"caution","competitor-gained":"negative","competitor-lost":"neutral"},m3={opportunity:"write","persistent-gap":"write","competitor-gained":"write","competitor-lost":"write",regression:"investigate",gain:"monitor","first-citation":"monitor","provider-pickup":"monitor"},h3={regression:"lost",gain:"emerging",opportunity:"not-cited","first-citation":"emerging","provider-pickup":"emerging","persistent-gap":"not-cited","competitor-gained":"cited","competitor-lost":"not-cited"},g3={regression:"Regression",gain:"Gain",opportunity:"Opportunity","first-citation":"First citation","provider-pickup":"Pickup","persistent-gap":"Gap","competitor-gained":"Competitor","competitor-lost":"Competitor"};function y3(e){return{id:e.id,tone:p3[e.type],title:e.title,detail:e.cause?.details??e.cause?.cause??"",actionLabel:e.recommendation?.action??g3[e.type],actionGroup:m3[e.type],affectedPhrases:[{query:e.query,evidenceId:"",provider:e.provider,citationState:h3[e.type]}]}}function b3(e){return e.filter(n=>!n.dismissed).map(y3)}function F0(e){return{id:e.id,name:e.name,displayName:e.displayName,canonicalDomain:e.canonicalDomain,ownedDomains:e.ownedDomains??[],aliases:e.aliases??[],country:e.country,language:e.language,tags:e.tags,labels:e.labels,providers:e.providers??[],locations:e.locations??[],defaultLocation:e.defaultLocation??null,autoExtractBacklinks:e.autoExtractBacklinks??!1,configSource:e.configSource,configRevision:e.configRevision,createdAt:e.createdAt,updatedAt:e.updatedAt}}function _b(e){try{return new Date(e).toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}catch{return e}}function v3(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 r=Math.floor(i/1e3);if(r<60)return`${r}s`;const l=Math.floor(r/60),c=r%60;return`${l}m ${c}s`}function W0(e){switch(e){case Ee["answer-visibility"]:return"Answer visibility sweep";case Ee["gsc-sync"]:return"GSC sync";case Ee["inspect-sitemap"]:return"Sitemap inspection";case Ee["ga-sync"]:return"GA sync";case Ee["traffic-sync"]:return"Traffic sync";case Ee["bing-inspect"]:return"Bing URL inspection";case Ee["bing-inspect-sitemap"]:return"Bing sitemap inspection";case Ee["site-audit"]:return"Site audit";case Ee["backlink-extract"]:return"Backlink extract";case Ee["aeo-discover-seed"]:return"Discovery (seed phase)";case Ee["aeo-discover-probe"]:return"Discovery (probe phase)"}}function S3(e){return e===Rs.manual?"Manual":e===Rs.scheduled?"Scheduled":e===Rs["config-apply"]?"Config apply":e}function pp(e,n){return{id:e.id,projectId:e.projectId,projectName:n,kind:e.kind,kindLabel:W0(e.kind),status:e.status,trigger:e.trigger??"manual",location:e.location??null,createdAt:e.createdAt,startedAt:e.startedAt?_b(e.startedAt):_b(e.createdAt),duration:v3(e.startedAt??null,e.finishedAt??null),statusDetail:e.error?e1(e.error):x3(e),summary:w3(e),triggerLabel:S3(e.trigger)}}function e1(e){const n=Yf(e);return n.length>200?n.slice(0,200)+"…":n}function x3(e){switch(e.status){case It.queued:return"Waiting for execution slot.";case It.running:return"Provider queries in progress.";case It.completed:return"All queries checked.";case It.partial:return"Run completed with some queries skipped.";case It.failed:return e.error?e1(e.error):"Run failed.";case It.cancelled:return"Run was cancelled.";default:return""}}function w3(e){const n=W0(e.kind);switch(e.status){case It.queued:return`${n} queued`;case It.running:return`${n} in progress`;case It.completed:return`${n} completed`;case It.partial:return`${n} partially completed`;case It.failed:return`${n} failed`;case It.cancelled:return`${n} cancelled`;default:return e.status}}function j3(e,n,i,r){const l=[];let c=0;const d=new Set;if(i.length>0){const m=i.flatMap(C=>C.snapshots??[]),g=new Map;for(const C of m)if(C.query){const N=`${C.query}::${C.provider}::${C.location??""}`;g.set(N,C)}const b=new Set(m.map(C=>C.location??null));b.size===0&&b.add(null);const v=new Set(m.map(C=>C.provider)),S=new Set(n.flatMap(C=>Object.keys(C.providerRuns??{}))),w=[...new Set([...v,...S])].sort(),_=w.length>0?w:["gemini"];for(const C of n){if(C.runs.length===0)continue;d.add(C.query);const N=C.runs.at(-1),T=N?.transition??"not-cited";for(const R of _){const G=[...b].filter(X=>g.has(`${C.query}::${R}::${X??""}`)),H=(C.providerRuns?.[R]?.length??0)>0,K=G.length>0?G:H?[null]:[];for(const X of K){const J=X??"",D=g.get(`${C.query}::${R}::${J}`),M=D?.model??null,oe=M?`${R}:${M}`:null,Ne=C.providerRuns?.[R],Ae=oe?C.modelRuns?.[oe]:void 0,ve=$e=>$e?.filter(Ze=>(Ze.location??null)===X),et=G.length>0?ve(Ne):Ne,re=G.length>0?ve(Ae):Ae,pe=(et?.length?et:null)??(re?.length?re:null),U=et?.length?"provider":re?.length?"model":"query",F=pe?pe.at(-1).transition:T,de=pe?pe.at(-1).visibilityTransition??(pe.at(-1).visibilityState==="visible"?"visible":"not-visible"):N?.visibilityTransition??(N?.visibilityState==="visible"?"visible":"not-visible"),je=pe?.at(-1)?.citationState,ie=pe?.at(-1)?.visibilityState,Qe=D?F==="lost"?"lost":F==="emerging"?"emerging":D.citationState===ic.cited?"cited":"not-cited":je===ic.cited?"cited":"not-cited",Q=D?.visibilityState??(ie==="visible"?"visible":ie==="pending"?"pending":"not-visible"),le=zb(pe||C.runs),te=Cb(pe||C.runs),ue=N3(C,R),ne=(pe??C.runs).map($e=>({runId:$e.runId,citationState:$e.citationState,createdAt:$e.createdAt,model:ue.get($e.runId)??null,answerMentioned:$e.answerMentioned,visibilityState:$e.visibilityState,visibilityTransition:$e.visibilityTransition,mentionState:$e.mentionState,mentionTransition:$e.mentionTransition})),_e=k3(ne),tt=U==="provider"&&_e.length<=1?"model":U,xe=A3(ne);l.push({id:`evidence_${e}_${c++}`,query:C.query,provider:D?.provider??R,model:D?.model??null,location:D?.location??X,citationState:Qe,answerMentioned:D?.answerMentioned,visibilityState:Q,visibilityChangeLabel:Tb(de,te,{positive:"visible",negative:"not visible",first:"first visibility"}),changeLabel:Tb(F,le),answerSnippet:D?.answerText??"",citedDomains:D?.citedDomains??[],evidenceUrls:[],competitorDomains:D?.competitorOverlap??[],recommendedCompetitors:D?.recommendedCompetitors??[],matchedTerms:D?.matchedTerms??[],relatedTechnicalSignals:[],groundingSources:D?.groundingSources??[],summary:_3(Q,de,C.query),runHistory:ne,historyScope:tt,modelsSeen:_e,modelTransitions:xe})}}}}for(const m of r)d.has(m.query)||l.push({id:`evidence_${e}_${c++}`,query:m.query,provider:"",model:null,location:null,citationState:"pending",visibilityState:"pending",visibilityChangeLabel:"Awaiting first run",changeLabel:"Awaiting first run",answerSnippet:"",citedDomains:[],evidenceUrls:[],competitorDomains:[],recommendedCompetitors:[],matchedTerms:[],relatedTechnicalSignals:[],groundingSources:[],summary:`"${m.query}" has been added but no visibility run has been triggered yet.`,runHistory:[],historyScope:"query",modelsSeen:[],modelTransitions:[]});return l}function N3(e,n){const i=new Map,r=`${n}:`;for(const[l,c]of Object.entries(e.modelRuns??{})){if(!l.startsWith(r))continue;const d=l.slice(r.length),m=d==="unknown"?null:d;for(const g of c)i.set(g.runId,m)}return i}function k3(e){const n=new Set;for(const i of e)i.model&&n.add(i.model);return[...n]}function A3(e){const n=[];let i=null;for(const r of e){const l=r.model??null;l!==i&&i!==null&&n.push({runId:r.runId,createdAt:r.createdAt,fromModel:i,toModel:l}),i=l}return n}function zb(e){if(e.length===0)return 0;const n=e[e.length-1].citationState;let i=0;for(let r=e.length-1;r>=0&&e[r].citationState===n;r--)i++;return i}function Cb(e){if(e.length===0)return 0;const n=e[e.length-1].visibilityState??"not-visible";let i=0;for(let r=e.length-1;r>=0&&(e[r].visibilityState??"not-visible")===n;r--)i++;return i}function Tb(e,n,i){const r={positive:i?.positive??"cited",negative:i?.negative??"not cited",first:i?.first??"first citation"};switch(e){case"new":return"First observation";case"cited":case"visible":return n<=1?`${Jr(r.positive)} in latest run`:`${Jr(r.positive)} for ${n} runs`;case"lost":return"Lost since last run";case"emerging":return Jr(r.first);case"not-cited":case"not-visible":return n<=1?`${Jr(r.negative)} in latest run`:`${Jr(r.negative)} across ${n} runs`;default:return e}}function Jr(e){return e.charAt(0).toUpperCase()+e.slice(1)}function _3(e,n,i){switch(n){case"lost":return`Mention was lost for "${i}". Your brand no longer appeared in the latest answer.`;case"emerging":return`Your brand started appearing in AI answers for "${i}".`}switch(e){case"visible":return`Your brand or domain is mentioned in AI answers for "${i}".`;case"pending":return`"${i}" has been added but no run has been triggered yet.`;default:return`Your brand or domain was not mentioned in AI answers for "${i}".`}}function t1(e){const n=F0(e.project),i=j3(n.name,e.timeline,e.latestRunDetails,e.queries),l=[...e.runs].sort((c,d)=>d.createdAt.localeCompare(c.createdAt)).map(c=>pp(c,e.project.displayName||e.project.name));return e.overview?z3(n,e.overview,i,l):C3(n,i,l)}function z3(e,n,i,r){const l=b3(n.topInsights);for(const c of n.attentionItems)c.id.startsWith("insight_")||l.push({id:c.id,tone:c.tone,title:c.title,detail:c.detail,actionLabel:c.actionLabel,actionGroup:"investigate",affectedPhrases:[]});return{project:e,dateRangeLabel:n.dateRangeLabel,contextLabel:n.contextLabel,mentionSummary:n.scores.mention,visibilitySummary:n.scores.visibility,mentionShareSummary:n.scores.mentionShare,queryCounts:{cited:n.queryCounts.citedQueries,total:n.queryCounts.totalQueries},gapQueries:n.scores.gapQueries,mentionGaps:n.scores.mentionGaps,indexCoverage:n.scores.indexCoverage,providerScores:n.providerScores,competitorPressure:n.scores.competitorPressure,runStatus:n.scores.runStatus,movementSummary:n.movementSummary,insights:l,visibilityEvidence:i,competitors:n.competitors.map(c=>({id:c.id,domain:c.domain,citationCount:c.citationCount,totalQueries:c.totalQueries,pressureLabel:c.pressureLabel,citedQueries:c.citedQueries,movement:"",notes:""})),recentRuns:r.slice(0,5),suggestedQueries:n.suggestedQueries}}function C3(e,n,i){const r={label:"",value:"No data",delta:"Loading…",tone:"neutral",description:"",tooltip:"",trend:[]};return{project:e,dateRangeLabel:"All time",contextLabel:`${e.country} / ${e.language.toUpperCase()}`,mentionSummary:{...r,label:"Mention Coverage"},visibilitySummary:{...r,label:"Citation Coverage"},mentionShareSummary:{...r,label:"Mention Share",breakdown:{projectMentionSnapshots:0,competitorMentionSnapshots:0,perCompetitor:[],snapshotsWithAnswerText:0,snapshotsTotal:0}},queryCounts:{cited:0,total:0},gapQueries:{...r,label:"Citation Gaps"},mentionGaps:{...r,label:"Mention Gaps"},indexCoverage:{...r,label:"Index Coverage"},providerScores:[],competitorPressure:{...r,label:"Competitor Pressure"},runStatus:{...r,label:"Run Status"},movementSummary:{gained:0,lost:0,tone:"neutral",hasPreviousRun:!1},insights:[],visibilityEvidence:n,competitors:[],recentRuns:i.slice(0,5),suggestedQueries:{rows:[],totalCandidates:0,skippedAlreadyTracked:0}}}function T3(e){const n=F0(e.project),i=[...e.runs].sort((w,_)=>_.createdAt.localeCompare(w.createdAt)),r=i.find(w=>w.kind===Ee["answer-visibility"])??i[0],l=e.project.displayName||e.project.name,c=r?pp(r,l):E3(e.project.id,l),d=e.overview;if(!d)return{project:n,visibilityScore:0,visibilityDelta:"No data",visibilityTone:"neutral",lastRun:c,insight:"No runs completed yet.",trend:[],competitorPressureLabel:"None"};const m=d.scores.visibility,g=m.progress??0,b=d.queryCounts.citedQueries,v=d.queryCounts.totalQueries,S=d.providers.length;return{project:n,visibilityScore:g,visibilityDelta:v>0?`${b} of ${v} queries`:"No data",visibilityTone:m.tone,providerCoverage:m.providerCoverage,lastRun:c,insight:v>0?`${b} of ${v} queries mentioned across ${S} provider${S===1?"":"s"}.`:"No runs completed yet.",trend:[],competitorPressureLabel:d.scores.competitorPressure.value}}function E3(e,n){return{id:"none",projectId:e,projectName:n,kind:Ee["answer-visibility"],kindLabel:"No runs yet",status:It.queued,trigger:Rs.manual,createdAt:"",startedAt:"",duration:"",statusDetail:"",summary:"No runs yet",triggerLabel:""}}function O3(e,n){const i=[],r=[],l=[];for(const d of e){r.push(t1(d)),l.push(T3(d));const m=[...d.runs].sort((g,b)=>b.createdAt.localeCompare(g.createdAt));for(const g of m)i.push(pp(g,d.project.displayName||d.project.name))}i.sort((d,m)=>m.createdAt.localeCompare(d.createdAt));const c=e.length>0;return{portfolioOverview:{projects:l,attentionItems:c?D3(r):[{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"}),...c?{}:{emptyState:{title:"No projects yet",detail:"Canonry becomes useful after one project, a small query set, and one competitor list are in place.",ctaLabel:"Launch setup",ctaHref:"/setup"}}},projects:r,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"},queryImportState:{mode:"paste",queryCount:0,preview:[]},competitorDraft:{domains:[],notes:"Use the CLI to add competitors."},launchState:{enabled:c,ctaLabel:c?"Trigger run":"Create a project first",summary:c?"Ready to run.":"Create a project first to launch a run."}},settings:{providerStatuses:(n?.providers??[]).map(d=>({name:d.name,displayName:d.displayName,keyUrl:d.keyUrl,modelHint:d.modelHint,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."},bing:{state:n?.bing?.configured?"ready":"needs-config",detail:n?.bing?.configured?"Bing Webmaster Tools API key is configured. Project-level Bing connections can be created from the dashboard.":"Bing Webmaster Tools API key is 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 D3(e){const n=[];for(const i of e){const r=i.visibilityEvidence.filter(c=>c.citationState==="lost");r.length>0&&n.push({id:`attention_${i.project.id}_lost`,tone:"negative",title:`${i.project.displayName||i.project.name} lost citations`,detail:`${r.length} quer${r.length>1?"ies":"y"} lost citation.`,actionLabel:"Open project",href:`/projects/${i.project.id}`});const l=i.recentRuns.filter(c=>c.status===It.running||c.status===It.queued);l.length>0&&n.push({id:`attention_${i.project.id}_active`,tone:"neutral",title:`${i.project.displayName||i.project.name} has active runs`,detail:`${l.length} run${l.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 n1=$.createContext(null);n1.Provider;function uo(){return $.useContext(n1)}function xc(e){const i=uo()?.dashboard??null,r=cn({...op({client:ae}),enabled:!i,refetchInterval:uk}),l=cn({...cp({client:ae,query:{kind:"answer-visibility"}}),enabled:!i,staleTime:io,refetchInterval:C=>C.state.data?.some(R=>R.status==="running"||R.status==="queued")?3e3:io}),c=cn({...fO({client:ae}),enabled:!i}),d=r.data??[],m=l.data??[],g=ow({queries:d.map(C=>{const N=m.filter(G=>G.projectId===C.id),T=N.filter(G=>(G.status==="completed"||G.status==="partial")&&G.kind==="answer-visibility"&&G.trigger!=="probe").sort((G,H)=>H.createdAt.localeCompare(G.createdAt)),R=T.length>0?T[0].id:"no-run";return{queryKey:["project-overview-slim",C.id,R],queryFn:async()=>{const G=await gv(C.name).catch(()=>null);return{project:C,runs:N,queries:[],competitors:[],timeline:[],latestRunDetails:[],previousRunDetails:[],gscCoverage:null,bingCoverage:null,dbInsights:null,overview:G}},enabled:!i&&r.isSuccess&&l.isSuccess,staleTime:gf}})}),b=g.every(C=>C.isSuccess),v=$.useMemo(()=>{if(i)return i;if(!r.data||!l.data||d.length>0&&!b)return null;const C=g.map(N=>N.data?{...N.data,runs:m.filter(T=>T.projectId===N.data.project.id)}:null).filter(N=>N!=null);return O3(C,c.data??null)},[i,r.data,l.data,c.data,b,g,d.length,m]),S=!i&&(r.isError||l.isError),w=!i&&!v&&!S,_=$.useCallback(async()=>{await Promise.all([r.refetch(),l.refetch(),c.refetch()])},[r.refetch,l.refetch,c.refetch]);return{dashboard:v,isLoading:w,isError:S,refetch:_}}function R3(e){const n=uo(),i=$.useMemo(()=>!n||!e?null:n.dashboard.projects.find(C=>C.project.name===e)??null,[n,e]),r=cn({...cO({client:ae,path:{name:e??""}}),enabled:!!e&&!i,staleTime:gf,refetchOnWindowFocus:"always"}),l=cn({...cp({client:ae,query:{kind:"answer-visibility"}}),enabled:!!e,staleTime:io,refetchOnWindowFocus:"always",refetchInterval:C=>C.state.data?.some(R=>R.projectId===r.data?.id&&(R.status==="running"||R.status==="queued"))?3e3:io}),c=r.data??null,d=$.useMemo(()=>c?(l.data??[]).filter(C=>C.projectId===c.id):[],[c,l.data]),{latestRunIds:m,previousRunIds:g,latestRunIdsKey:b}=$.useMemo(()=>{const C=d.filter(H=>(H.status==="completed"||H.status==="partial")&&H.kind==="answer-visibility"&&H.trigger!=="probe").sort((H,K)=>K.createdAt.localeCompare(H.createdAt)),N=C[0]?.createdAt??null,T=N?C.filter(H=>H.createdAt===N).map(H=>H.id):[],R=C.find(H=>H.createdAt!==N)?.createdAt??null,G=R?C.filter(H=>H.createdAt===R).map(H=>H.id):[];return{latestRunIds:T,previousRunIds:G,latestRunIdsKey:[...T].sort().join(",")}},[d]),v=cn({queryKey:["project-dashboard-full",c?.id??null,b||"none"],queryFn:async()=>{if(!c||!e)return null;const[C,N,T,R,G,H,K,X,J]=await Promise.all([RN(e).catch(()=>[]),MN(e).catch(()=>[]),BN(e).catch(()=>[]),m.length?Promise.all(m.map(D=>Fl(D).catch(()=>null))).then(D=>D.filter(M=>M!=null)):Promise.resolve([]),g.length?Promise.all(g.map(D=>Fl(D).catch(()=>null))).then(D=>D.filter(M=>M!=null)):Promise.resolve([]),YN(e).catch(()=>null),FN(e).catch(()=>null),ek(e).catch(()=>null),gv(e).catch(()=>null)]);return{project:c,runs:d,queries:C,competitors:N,timeline:T,latestRunDetails:R,previousRunDetails:G,gscCoverage:H,bingCoverage:K,dbInsights:X,overview:J}},enabled:!!c&&!!e&&l.isSuccess,staleTime:gf,refetchOnWindowFocus:"always",refetchInterval:dk}),S=$.useMemo(()=>v.data?t1({...v.data,runs:d}):i||null,[v.data,d,i]),w=$.useCallback(async()=>{await Promise.all([r.refetch(),l.refetch(),v.refetch()])},[r.refetch,l.refetch,v.refetch]),_=!S&&(r.isLoading||l.isLoading||v.isLoading);return{commandCenter:S,project:c,isLoading:_,isError:r.isError||l.isError||v.isError,refetch:w}}const M3=["health"];async function B3(){const e=await nk("/health","API"),n=e.state==="ok"?{label:"Worker",state:"ok",detail:"In-process job runner"}:{label:"Worker",state:e.state,detail:`Depends on API health check · ${e.detail}`,statusCode:e.statusCode,hint:e.hint?`Worker status is inferred from API health in this deployment mode. ${e.hint}`:"Worker status is inferred from API health in this deployment mode."};return{apiStatus:e,workerStatus:n}}function mp(e,n){return cn({queryKey:M3,queryFn:B3,enabled:e,refetchInterval:15e3,initialData:n})}function L3(e){return cn({..._0({client:ae,path:{id:e??""}}),enabled:!!e,refetchInterval:n=>{const i=n.state.data?.status;return i==="running"||i==="queued"?3e3:!1}})}function hp(){const e=dc(),n=lw({strict:!1}),i=cw({select:g=>g.location.pathname}),r=n.runId??null,l=n.evidenceId??null;return{runId:r,evidenceId:l,openRun:g=>{e({to:i,from:Wt.to,search:b=>({...b,runId:g,evidenceId:void 0})})},openEvidence:g=>{e({to:i,from:Wt.to,search:b=>({...b,evidenceId:g,runId:void 0})})},closeDrawer:()=>{e({to:i,from:Wt.to,search:g=>({...g,runId:void 0,evidenceId:void 0})})}}}const q3={negative:"toast-card-negative",caution:"toast-card-caution",positive:"toast-card-positive",neutral:"toast-card-neutral"};function U3(e){if(e.cta)return`${e.cta.label}: ${e.title}`}function $3(){const e=$.useSyncExternalStore(lk,My,My),n=dc(),{openRun:i}=hp(),r=$.useCallback(c=>{hf(c)},[]),l=$.useCallback(c=>{c.cta&&(c.cta.intent==="open-run-drawer"?i(c.cta.runId):n({to:"/runs"}),hf(c.id))},[n,i]);return e.length===0?null:f.jsx("div",{className:"toast-viewport","aria-label":"Notifications",children:e.map(c=>f.jsxs("section",{role:c.tone==="negative"?"alert":"status","aria-live":c.tone==="negative"?"assertive":"polite","data-state":c.state,className:`toast-card ${q3[c.tone]}`,children:[f.jsxs("div",{className:"toast-copy",children:[f.jsx("p",{className:"toast-title",children:c.title}),c.detail?f.jsx("p",{className:"toast-detail",children:c.detail}):null,c.cta?f.jsx("button",{type:"button",className:"toast-action",onClick:()=>l(c),"aria-label":U3(c),children:c.cta.label}):null]}),f.jsx("button",{type:"button",onClick:()=>r(c.id),className:"toast-dismiss","aria-label":"Dismiss",children:f.jsx(Hs,{className:"size-3.5"})})]},c.id))})}async function gp(e){try{return await e.json()}catch{return{}}}function V3(){return typeof window<"u"&&window.__CANONRY_CONFIG__?.basePath?window.__CANONRY_CONFIG__.basePath.replace(/\/$/,"")+"/api/v1":"/api/v1"}const yp=V3();function bp(e){(e===401||e===403)&&Bf()}async function Eb(e){const n=await fetch(`${yp}/projects/${encodeURIComponent(e)}/agent/transcript`,{credentials:"include"});if(!n.ok){bp(n.status);const i=await gp(n);throw new In(i.error?.message??`transcript fetch failed: ${n.status}`,n.status,i.error?.code)}return await n.json()}async function G3(e){const n=await fetch(`${yp}/projects/${encodeURIComponent(e)}/agent/transcript`,{method:"DELETE",credentials:"include"});if(!n.ok){bp(n.status);const i=await gp(n);throw new In(i.error?.message??`reset failed: ${n.status}`,n.status,i.error?.code)}}async function I3({project:e,prompt:n,provider:i,modelId:r,scope:l,signal:c,onEvent:d}){const m={prompt:n};i&&(m.provider=i),r&&(m.modelId=r),l&&(m.scope=l);const g=await fetch(`${yp}/projects/${encodeURIComponent(e)}/agent/prompt`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(m),signal:c});if(!g.ok||!g.body){bp(g.status);const _=await gp(g);throw new In(_.error?.message??`prompt failed: ${g.status}`,g.status,_.error?.code)}const b=g.body.getReader(),v=new TextDecoder;let S="";const w=()=>{b.cancel().catch(()=>{})};c?.addEventListener("abort",w,{once:!0});try{for(;;){const{value:_,done:C}=await b.read();if(C)break;S+=v.decode(_,{stream:!0});let N=S.indexOf(`
56
+ `):"Run failed."}function A0(e){return e.split("-").map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join(" ")}function EM(e){if(!e)return"—";try{return new Date(e).toLocaleString()}catch{return e}}function OM(e){return e===null?"Unknown":e?"Pass":"Fail"}function pb(e){return e===0?"12:00 AM":e<12?`${e}:00 AM`:e===12?"12:00 PM":`${e-12}:00 PM`}function DM(e,n){return e==="twice-daily"?"twice-daily":e.startsWith("weekly@")?`${e}@${n}`:`daily@${n}`}function RM(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 r=e.match(/^(weekly@(?:mon|tue|wed|thu|fri|sat|sun))(?:@(\d+))?$/);return r?{freq:r[1],hour:r[2]?parseInt(r[2]):6,customCron:""}:{freq:"custom",hour:6,customCron:n}}function MM(e,n,i){const r=i==="UTC"?"UTC":i.split("/").pop()?.replace(/_/g," ")??i;if(!e)return`Custom: ${n} · ${r}`;if(e==="twice-daily")return`Twice a day (6am & 6pm) · ${r}`;const l=e.match(/^daily(?:@(\d+))?$/);if(l){const d=l[1]?parseInt(l[1]):6;return`Every day at ${pb(d)} · ${r}`}const c=e.match(/^weekly@(mon|tue|wed|thu|fri|sat|sun)(?:@(\d+))?$/);if(c){const d={mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday",sun:"Sunday"},m=c[2]?parseInt(c[2]):6;return`Every ${d[c[1]]} at ${pb(m)} · ${r}`}return`${e} · ${r}`}function lO(e,n){return n&&n!==e?`${e} · ${n}`:e}function BM(){const e=Intl.DateTimeFormat().resolvedOptions().timeZone,n=new Intl.DateTimeFormat("en-US",{timeZoneName:"short"}).formatToParts().find(i=>i.type==="timeZoneName")?.value;return lO(e,n)}const qe=(e,n,i,r)=>{const l={_id:e,baseUrl:n?.baseUrl||(n?.client??W).getConfig().baseUrl};return n?.body&&(l.body=n.body),n?.headers&&(l.headers=n.headers),n?.path&&(l.path=n.path),n?.query&&(l.query=n.query),[l]},cO=e=>qe("getApiV1ProjectsByName",e),uO=e=>$e({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await cv({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:cO(e)}),Ks=e=>qe("getApiV1Projects",e),op=e=>$e({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Uw({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:Ks(e)}),lp=e=>qe("getApiV1Runs",e),cp=e=>$e({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Ww({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:lp(e)}),dO=e=>qe("getApiV1RunsById",e),_0=e=>$e({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await uv({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:dO(e)}),fO=e=>qe("getApiV1Settings",e),pO=e=>$e({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await dv({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:fO(e)}),mO=e=>qe("getApiV1ProjectsByNameGoogleConnections",e),LM=e=>$e({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await hj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:mO(e)}),hO=e=>qe("getApiV1ProjectsByNameGoogleProperties",e),qM=e=>$e({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await bj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:hO(e)}),gO=e=>qe("getApiV1ProjectsByNameGoogleGscPerformance",e),$M=e=>$e({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await wj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:gO(e)}),yO=e=>qe("getApiV1ProjectsByNameGoogleGscPerformanceDaily",e),UM=e=>$e({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await jj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:yO(e)}),bO=e=>qe("getApiV1ProjectsByNameGoogleGscInspections",e),VM=e=>$e({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await kj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:bO(e)}),vO=e=>qe("getApiV1ProjectsByNameGoogleGscDeindexed",e),GM=e=>$e({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Aj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:vO(e)}),SO=e=>qe("getApiV1ProjectsByNameGoogleGscCoverage",e),IM=e=>$e({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await fv({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:SO(e)}),xO=e=>qe("getApiV1ProjectsByNameGoogleGscCoverageHistory",e),HM=e=>$e({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await _j({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:xO(e)}),ZM=e=>qe("getApiV1ProjectsByNameGoogleGscSitemaps",e),wO=e=>qe("getApiV1ProjectsByNameBingStatus",e),PM=e=>$e({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Rj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:wO(e)}),jO=e=>qe("getApiV1ProjectsByNameBingSites",e),KM=e=>$e({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Mj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:jO(e)}),NO=e=>qe("getApiV1ProjectsByNameBingCoverage",e),QM=e=>$e({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await pv({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:NO(e)}),kO=e=>qe("getApiV1ProjectsByNameBingInspections",e),YM=e=>$e({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Lj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:kO(e)}),AO=e=>qe("getApiV1ProjectsByNameBingPerformance",e),XM=e=>$e({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Vj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:AO(e)}),_O=e=>qe("getApiV1ProjectsByNameGaStatus",e),JM=e=>$e({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Hj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:_O(e)}),zO=e=>qe("getApiV1ProjectsByNameGaTraffic",e),FM=e=>$e({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Pj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:zO(e)}),CO=e=>qe("getApiV1ProjectsByNameGaAiReferralHistory",e),WM=e=>$e({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Kj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:CO(e)}),TO=e=>qe("getApiV1ProjectsByNameGaSocialReferralHistory",e),e6=e=>$e({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Qj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:TO(e)}),EO=e=>qe("getApiV1ProjectsByNameGaSessionHistory",e),t6=e=>$e({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Yj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:EO(e)}),OO=e=>qe("getApiV1ProjectsByNameReport",e),n6=e=>$e({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Jj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:OO(e)}),DO=e=>qe("getApiV1ProjectsByNameCitationsVisibility",e),a6=e=>$e({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Fj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:DO(e)}),RO=e=>qe("getApiV1ProjectsByNameTrafficSources",e),i6=e=>$e({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await yN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:RO(e)}),MO=e=>qe("getApiV1ProjectsByNameTrafficStatus",e),s6=e=>$e({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await bN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:MO(e)}),BO=e=>qe("getApiV1ProjectsByNameTrafficSourcesById",e),r6=e=>$e({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await vN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:BO(e)}),LO=e=>qe("getApiV1ProjectsByNameTrafficEvents",e),o6=e=>$e({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await SN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:LO(e)}),qO=e=>qe("getApiV1ProjectsByNameDiscoverSessions",e),l6=e=>$e({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await wN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:qO(e)}),$O=e=>qe("getApiV1ProjectsByNameDiscoverSessionsById",e),c6=e=>$e({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await jN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:$O(e)}),UO=e=>qe("getApiV1ProjectsByNameDiscoverSessionsByIdPromote",e),u6=e=>$e({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await NN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:UO(e)}),VO=e=>qe("getApiV1ProjectsByNameAgentProviders",e),GO=e=>$e({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await AN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:VO(e)});function mb(e){return e.state==="ok"?"positive":e.state==="checking"?"neutral":"negative"}function z0(e){switch(e){case"completed":return"positive";case"partial":return"caution";case"failed":return"negative";case"cancelled":return"caution";case"queued":case"running":return"neutral";default:return"neutral"}}function d6(e){switch(e){case"cited":return"positive";case"emerging":return"caution";case"not-cited":return"caution";case"lost":return"negative";case"pending":return"neutral";default:return"neutral"}}function f6(e){return e==="High"?"negative":e==="Moderate"?"caution":"neutral"}function IO(e){return e.displayName??e.name.charAt(0).toUpperCase()+e.name.slice(1)}function $s(e){const n=[e.detail,e.hint].filter(Boolean);return n.length>0?n.join(`
57
+ `):void 0}function HO(e,n,i){return e.map(r=>{if(r.id==="api")return{...r,tone:mb(n.apiStatus),detail:n.apiStatus.state==="ok"?"Healthy":"Needs attention",meta:n.apiStatus.detail};if(r.id==="worker")return{...r,tone:mb(n.workerStatus),detail:n.workerStatus.state==="ok"?"Healthy":"Needs attention",meta:n.workerStatus.detail};const l=i.providerStatuses.filter(g=>g.state==="ready").length,c=i.providerStatuses.length,d=l>0,m=i.providerStatuses.filter(g=>g.state==="ready").map(g=>IO(g)).join(" · ");return{...r,label:"Providers",tone:d?"positive":"caution",detail:`${l} of ${c} configured`,meta:m||"None configured"}})}function ZO(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 PO(e,n,i){const r=ZO(n,i),l=structuredClone(e);return l.healthChecks=l.healthChecks.map(c=>{if(c.id==="api")return{...c,detail:n.apiStatus.detail,state:n.apiStatus.state==="ok"?"ready":"attention"};if(c.id==="worker")return{...c,detail:n.workerStatus.detail,state:n.workerStatus.state==="ok"?"ready":"attention"};const d=i.providerStatuses.some(m=>m.state==="ready");return{...c,detail:d?"At least one provider configured.":"No providers configured.",state:d?"ready":"attention"}}),l.launchState.enabled=r===void 0,l.launchState.blockedReason=r,l.launchState.summary=r??"Queue a visibility sweep first, then follow with a site audit to explain movement.",l}const C0="canonry.run-tracker",wf=new Set;let hb=!1,KO=0,bc={runs:{},batches:{}};function QO(){const e=Ni();for(const n of wf)n(e)}function YO(e){if(!e)return{runs:{},batches:{}};try{const n=JSON.parse(e);return{runs:n.runs??{},batches:n.batches??{}}}catch{return{runs:{},batches:{}}}}function XO(){typeof window>"u"||window.sessionStorage.setItem(C0,JSON.stringify(bc))}function T0(){hb||(hb=!0,!(typeof window>"u")&&(bc=YO(window.sessionStorage.getItem(C0))))}function vc(e){bc=e,XO(),QO()}function Ni(){return T0(),bc}function JO(e){return T0(),wf.add(e),()=>{wf.delete(e)}}function E0(e){const n=Ni();vc({...n,runs:{...n.runs,[e.id]:{runId:e.id,projectId:e.projectId,projectLabel:e.projectLabel,kind:e.kind,sourceAction:e.sourceAction,lastAnnouncedStatus:e.lastAnnouncedStatus??"queued"}}})}function gb(e){const n=Ni();if(!n.runs[e])return;const{[e]:i,...r}=n.runs;vc({...n,runs:r})}function FO(e){const n=Ni(),i=`batch_${Date.now()}_${++KO}`;return vc({...n,batches:{...n.batches,[i]:{batchId:i,runIds:e.runIds,queuedCount:e.queuedCount,skippedCount:e.skippedCount}}}),i}function WO(e){const n=Ni();if(!n.batches[e])return;const{[e]:i,...r}=n.batches;vc({...n,batches:r})}function e4(e){return e==="completed"||e==="partial"||e==="failed"||e==="cancelled"}function t4(e,n){let i=0,r=0,l=0,c=0,d=0;for(const m of e){const g=n[m]?.status;g==="completed"?i+=1:g==="partial"?r+=1:g==="failed"?l+=1:g==="cancelled"?c+=1:d+=1}return{completed:i,partial:r,failed:l,cancelled:c,pending:d,finished:d===0}}const yb=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,bb=nv,O0=(e,n)=>i=>{var r;if(n?.variants==null)return bb(e,i?.class,i?.className);const{variants:l,defaultVariants:c}=n,d=Object.keys(l).map(b=>{const v=i?.[b],S=c?.[b];if(v===null)return null;const w=yb(v)||yb(S);return l[b][w]}),m=i&&Object.entries(i).reduce((b,v)=>{let[S,w]=v;return w===void 0||(b[S]=w),b},{}),g=n==null||(r=n.compoundVariants)===null||r===void 0?void 0:r.reduce((b,v)=>{let{class:S,className:w,..._}=v;return Object.entries(_).every(C=>{let[N,T]=C;return Array.isArray(T)?T.includes({...c,...m}[N]):{...c,...m}[N]===T})?[...b,S,w]:b},[]);return bb(e,d,g,i?.class,i?.className)},n4=(e,n)=>{const i=new Array(e.length+n.length);for(let r=0;r<e.length;r++)i[r]=e[r];for(let r=0;r<n.length;r++)i[e.length+r]=n[r];return i},a4=(e,n)=>({classGroupId:e,validator:n}),D0=(e=new Map,n=null,i)=>({nextPart:e,validators:n,classGroupId:i}),lc="-",vb=[],i4="arbitrary..",s4=e=>{const n=o4(e),{conflictingClassGroups:i,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return r4(d);const m=d.split(lc),g=m[0]===""&&m.length>1?1:0;return R0(m,g,n)},getConflictingClassGroupIds:(d,m)=>{if(m){const g=r[d],b=i[d];return g?b?n4(b,g):g:b||vb}return i[d]||vb}}},R0=(e,n,i)=>{if(e.length-n===0)return i.classGroupId;const l=e[n],c=i.nextPart.get(l);if(c){const b=R0(e,n+1,c);if(b)return b}const d=i.validators;if(d===null)return;const m=n===0?e.join(lc):e.slice(n).join(lc),g=d.length;for(let b=0;b<g;b++){const v=d[b];if(v.validator(m))return v.classGroupId}},r4=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const n=e.slice(1,-1),i=n.indexOf(":"),r=n.slice(0,i);return r?i4+r:void 0})(),o4=e=>{const{theme:n,classGroups:i}=e;return l4(i,n)},l4=(e,n)=>{const i=D0();for(const r in e){const l=e[r];up(l,i,r,n)}return i},up=(e,n,i,r)=>{const l=e.length;for(let c=0;c<l;c++){const d=e[c];c4(d,n,i,r)}},c4=(e,n,i,r)=>{if(typeof e=="string"){u4(e,n,i);return}if(typeof e=="function"){d4(e,n,i,r);return}f4(e,n,i,r)},u4=(e,n,i)=>{const r=e===""?n:M0(n,e);r.classGroupId=i},d4=(e,n,i,r)=>{if(p4(e)){up(e(r),n,i,r);return}n.validators===null&&(n.validators=[]),n.validators.push(a4(i,e))},f4=(e,n,i,r)=>{const l=Object.entries(e),c=l.length;for(let d=0;d<c;d++){const[m,g]=l[d];up(g,M0(n,m),i,r)}},M0=(e,n)=>{let i=e;const r=n.split(lc),l=r.length;for(let c=0;c<l;c++){const d=r[c];let m=i.nextPart.get(d);m||(m=D0(),i.nextPart.set(d,m)),i=m}return i},p4=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,m4=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,i=Object.create(null),r=Object.create(null);const l=(c,d)=>{i[c]=d,n++,n>e&&(n=0,r=i,i=Object.create(null))};return{get(c){let d=i[c];if(d!==void 0)return d;if((d=r[c])!==void 0)return l(c,d),d},set(c,d){c in i?i[c]=d:l(c,d)}}},jf="!",Sb=":",h4=[],xb=(e,n,i,r,l)=>({modifiers:e,hasImportantModifier:n,baseClassName:i,maybePostfixModifierPosition:r,isExternal:l}),g4=e=>{const{prefix:n,experimentalParseClassName:i}=e;let r=l=>{const c=[];let d=0,m=0,g=0,b;const v=l.length;for(let N=0;N<v;N++){const T=l[N];if(d===0&&m===0){if(T===Sb){c.push(l.slice(g,N)),g=N+1;continue}if(T==="/"){b=N;continue}}T==="["?d++:T==="]"?d--:T==="("?m++:T===")"&&m--}const S=c.length===0?l:l.slice(g);let w=S,_=!1;S.endsWith(jf)?(w=S.slice(0,-1),_=!0):S.startsWith(jf)&&(w=S.slice(1),_=!0);const C=b&&b>g?b-g:void 0;return xb(c,_,w,C)};if(n){const l=n+Sb,c=r;r=d=>d.startsWith(l)?c(d.slice(l.length)):xb(h4,!1,d,void 0,!0)}if(i){const l=r;r=c=>i({className:c,parseClassName:l})}return r},y4=e=>{const n=new Map;return e.orderSensitiveModifiers.forEach((i,r)=>{n.set(i,1e6+r)}),i=>{const r=[];let l=[];for(let c=0;c<i.length;c++){const d=i[c],m=d[0]==="[",g=n.has(d);m||g?(l.length>0&&(l.sort(),r.push(...l),l=[]),r.push(d)):l.push(d)}return l.length>0&&(l.sort(),r.push(...l)),r}},b4=e=>({cache:m4(e.cacheSize),parseClassName:g4(e),sortModifiers:y4(e),...s4(e)}),v4=/\s+/,S4=(e,n)=>{const{parseClassName:i,getClassGroupId:r,getConflictingClassGroupIds:l,sortModifiers:c}=n,d=[],m=e.trim().split(v4);let g="";for(let b=m.length-1;b>=0;b-=1){const v=m[b],{isExternal:S,modifiers:w,hasImportantModifier:_,baseClassName:C,maybePostfixModifierPosition:N}=i(v);if(S){g=v+(g.length>0?" "+g:g);continue}let T=!!N,R=r(T?C.substring(0,N):C);if(!R){if(!T){g=v+(g.length>0?" "+g:g);continue}if(R=r(C),!R){g=v+(g.length>0?" "+g:g);continue}T=!1}const G=w.length===0?"":w.length===1?w[0]:c(w).join(":"),H=_?G+jf:G,K=H+R;if(d.indexOf(K)>-1)continue;d.push(K);const X=l(R,T);for(let J=0;J<X.length;++J){const D=X[J];d.push(H+D)}g=v+(g.length>0?" "+g:g)}return g},x4=(...e)=>{let n=0,i,r,l="";for(;n<e.length;)(i=e[n++])&&(r=B0(i))&&(l&&(l+=" "),l+=r);return l},B0=e=>{if(typeof e=="string")return e;let n,i="";for(let r=0;r<e.length;r++)e[r]&&(n=B0(e[r]))&&(i&&(i+=" "),i+=n);return i},w4=(e,...n)=>{let i,r,l,c;const d=g=>{const b=n.reduce((v,S)=>S(v),e());return i=b4(b),r=i.cache.get,l=i.cache.set,c=m,m(g)},m=g=>{const b=r(g);if(b)return b;const v=S4(g,i);return l(g,v),v};return c=d,(...g)=>c(x4(...g))},j4=[],At=e=>{const n=i=>i[e]||j4;return n.isThemeGetter=!0,n},L0=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,q0=/^\((?:(\w[\w-]*):)?(.+)\)$/i,N4=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,k4=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,A4=/\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$/,_4=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,z4=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,C4=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Va=e=>N4.test(e),Te=e=>!!e&&!Number.isNaN(Number(e)),Ga=e=>!!e&&Number.isInteger(Number(e)),nf=e=>e.endsWith("%")&&Te(e.slice(0,-1)),fa=e=>k4.test(e),$0=()=>!0,T4=e=>A4.test(e)&&!_4.test(e),dp=()=>!1,E4=e=>z4.test(e),O4=e=>C4.test(e),D4=e=>!me(e)&&!he(e),R4=e=>Xa(e,G0,dp),me=e=>L0.test(e),bi=e=>Xa(e,I0,T4),wb=e=>Xa(e,G4,Te),M4=e=>Xa(e,Z0,$0),B4=e=>Xa(e,H0,dp),jb=e=>Xa(e,U0,dp),L4=e=>Xa(e,V0,O4),ql=e=>Xa(e,P0,E4),he=e=>q0.test(e),Xr=e=>zi(e,I0),q4=e=>zi(e,H0),Nb=e=>zi(e,U0),$4=e=>zi(e,G0),U4=e=>zi(e,V0),$l=e=>zi(e,P0,!0),V4=e=>zi(e,Z0,!0),Xa=(e,n,i)=>{const r=L0.exec(e);return r?r[1]?n(r[1]):i(r[2]):!1},zi=(e,n,i=!1)=>{const r=q0.exec(e);return r?r[1]?n(r[1]):i:!1},U0=e=>e==="position"||e==="percentage",V0=e=>e==="image"||e==="url",G0=e=>e==="length"||e==="size"||e==="bg-size",I0=e=>e==="length",G4=e=>e==="number",H0=e=>e==="family-name",Z0=e=>e==="number"||e==="weight",P0=e=>e==="shadow",I4=()=>{const e=At("color"),n=At("font"),i=At("text"),r=At("font-weight"),l=At("tracking"),c=At("leading"),d=At("breakpoint"),m=At("container"),g=At("spacing"),b=At("radius"),v=At("shadow"),S=At("inset-shadow"),w=At("text-shadow"),_=At("drop-shadow"),C=At("blur"),N=At("perspective"),T=At("aspect"),R=At("ease"),G=At("animate"),H=()=>["auto","avoid","all","avoid-page","page","left","right","column"],K=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],X=()=>[...K(),he,me],J=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto","contain","none"],M=()=>[he,me,g],oe=()=>[Va,"full","auto",...M()],Ne=()=>[Ga,"none","subgrid",he,me],Ae=()=>["auto",{span:["full",Ga,he,me]},Ga,he,me],ve=()=>[Ga,"auto",he,me],et=()=>["auto","min","max","fr",he,me],re=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],pe=()=>["start","end","center","stretch","center-safe","end-safe"],$=()=>["auto",...M()],F=()=>[Va,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...M()],de=()=>[Va,"screen","full","dvw","lvw","svw","min","max","fit",...M()],je=()=>[Va,"screen","full","lh","dvh","lvh","svh","min","max","fit",...M()],ie=()=>[e,he,me],Qe=()=>[...K(),Nb,jb,{position:[he,me]}],Q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],le=()=>["auto","cover","contain",$4,R4,{size:[he,me]}],te=()=>[nf,Xr,bi],ue=()=>["","none","full",b,he,me],ne=()=>["",Te,Xr,bi],_e=()=>["solid","dashed","dotted","double"],tt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],xe=()=>[Te,nf,Nb,jb],Ue=()=>["","none",C,he,me],Ze=()=>["none",Te,he,me],Ct=()=>["none",Te,he,me],zn=()=>[Te,he,me],Tt=()=>[Va,"full",...M()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[fa],breakpoint:[fa],color:[$0],container:[fa],"drop-shadow":[fa],ease:["in","out","in-out"],font:[D4],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[fa],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[fa],shadow:[fa],spacing:["px",Te],text:[fa],"text-shadow":[fa],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Va,me,he,T]}],container:["container"],columns:[{columns:[Te,me,he,m]}],"break-after":[{"break-after":H()}],"break-before":[{"break-before":H()}],"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:X()}],overflow:[{overflow:J()}],"overflow-x":[{"overflow-x":J()}],"overflow-y":[{"overflow-y":J()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:oe()}],"inset-x":[{"inset-x":oe()}],"inset-y":[{"inset-y":oe()}],start:[{"inset-s":oe(),start:oe()}],end:[{"inset-e":oe(),end:oe()}],"inset-bs":[{"inset-bs":oe()}],"inset-be":[{"inset-be":oe()}],top:[{top:oe()}],right:[{right:oe()}],bottom:[{bottom:oe()}],left:[{left:oe()}],visibility:["visible","invisible","collapse"],z:[{z:[Ga,"auto",he,me]}],basis:[{basis:[Va,"full","auto",m,...M()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Te,Va,"auto","initial","none",me]}],grow:[{grow:["",Te,he,me]}],shrink:[{shrink:["",Te,he,me]}],order:[{order:[Ga,"first","last","none",he,me]}],"grid-cols":[{"grid-cols":Ne()}],"col-start-end":[{col:Ae()}],"col-start":[{"col-start":ve()}],"col-end":[{"col-end":ve()}],"grid-rows":[{"grid-rows":Ne()}],"row-start-end":[{row:Ae()}],"row-start":[{"row-start":ve()}],"row-end":[{"row-end":ve()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":et()}],"auto-rows":[{"auto-rows":et()}],gap:[{gap:M()}],"gap-x":[{"gap-x":M()}],"gap-y":[{"gap-y":M()}],"justify-content":[{justify:[...re(),"normal"]}],"justify-items":[{"justify-items":[...pe(),"normal"]}],"justify-self":[{"justify-self":["auto",...pe()]}],"align-content":[{content:["normal",...re()]}],"align-items":[{items:[...pe(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...pe(),{baseline:["","last"]}]}],"place-content":[{"place-content":re()}],"place-items":[{"place-items":[...pe(),"baseline"]}],"place-self":[{"place-self":["auto",...pe()]}],p:[{p:M()}],px:[{px:M()}],py:[{py:M()}],ps:[{ps:M()}],pe:[{pe:M()}],pbs:[{pbs:M()}],pbe:[{pbe:M()}],pt:[{pt:M()}],pr:[{pr:M()}],pb:[{pb:M()}],pl:[{pl:M()}],m:[{m:$()}],mx:[{mx:$()}],my:[{my:$()}],ms:[{ms:$()}],me:[{me:$()}],mbs:[{mbs:$()}],mbe:[{mbe:$()}],mt:[{mt:$()}],mr:[{mr:$()}],mb:[{mb:$()}],ml:[{ml:$()}],"space-x":[{"space-x":M()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":M()}],"space-y-reverse":["space-y-reverse"],size:[{size:F()}],"inline-size":[{inline:["auto",...de()]}],"min-inline-size":[{"min-inline":["auto",...de()]}],"max-inline-size":[{"max-inline":["none",...de()]}],"block-size":[{block:["auto",...je()]}],"min-block-size":[{"min-block":["auto",...je()]}],"max-block-size":[{"max-block":["none",...je()]}],w:[{w:[m,"screen",...F()]}],"min-w":[{"min-w":[m,"screen","none",...F()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[d]},...F()]}],h:[{h:["screen","lh",...F()]}],"min-h":[{"min-h":["screen","lh","none",...F()]}],"max-h":[{"max-h":["screen","lh",...F()]}],"font-size":[{text:["base",i,Xr,bi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,V4,M4]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",nf,me]}],"font-family":[{font:[q4,B4,n]}],"font-features":[{"font-features":[me]}],"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:[l,he,me]}],"line-clamp":[{"line-clamp":[Te,"none",he,wb]}],leading:[{leading:[c,...M()]}],"list-image":[{"list-image":["none",he,me]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",he,me]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:ie()}],"text-color":[{text:ie()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[..._e(),"wavy"]}],"text-decoration-thickness":[{decoration:[Te,"from-font","auto",he,bi]}],"text-decoration-color":[{decoration:ie()}],"underline-offset":[{"underline-offset":[Te,"auto",he,me]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",he,me]}],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",he,me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Qe()}],"bg-repeat":[{bg:Q()}],"bg-size":[{bg:le()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ga,he,me],radial:["",he,me],conic:[Ga,he,me]},U4,L4]}],"bg-color":[{bg:ie()}],"gradient-from-pos":[{from:te()}],"gradient-via-pos":[{via:te()}],"gradient-to-pos":[{to:te()}],"gradient-from":[{from:ie()}],"gradient-via":[{via:ie()}],"gradient-to":[{to:ie()}],rounded:[{rounded:ue()}],"rounded-s":[{"rounded-s":ue()}],"rounded-e":[{"rounded-e":ue()}],"rounded-t":[{"rounded-t":ue()}],"rounded-r":[{"rounded-r":ue()}],"rounded-b":[{"rounded-b":ue()}],"rounded-l":[{"rounded-l":ue()}],"rounded-ss":[{"rounded-ss":ue()}],"rounded-se":[{"rounded-se":ue()}],"rounded-ee":[{"rounded-ee":ue()}],"rounded-es":[{"rounded-es":ue()}],"rounded-tl":[{"rounded-tl":ue()}],"rounded-tr":[{"rounded-tr":ue()}],"rounded-br":[{"rounded-br":ue()}],"rounded-bl":[{"rounded-bl":ue()}],"border-w":[{border:ne()}],"border-w-x":[{"border-x":ne()}],"border-w-y":[{"border-y":ne()}],"border-w-s":[{"border-s":ne()}],"border-w-e":[{"border-e":ne()}],"border-w-bs":[{"border-bs":ne()}],"border-w-be":[{"border-be":ne()}],"border-w-t":[{"border-t":ne()}],"border-w-r":[{"border-r":ne()}],"border-w-b":[{"border-b":ne()}],"border-w-l":[{"border-l":ne()}],"divide-x":[{"divide-x":ne()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ne()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[..._e(),"hidden","none"]}],"divide-style":[{divide:[..._e(),"hidden","none"]}],"border-color":[{border:ie()}],"border-color-x":[{"border-x":ie()}],"border-color-y":[{"border-y":ie()}],"border-color-s":[{"border-s":ie()}],"border-color-e":[{"border-e":ie()}],"border-color-bs":[{"border-bs":ie()}],"border-color-be":[{"border-be":ie()}],"border-color-t":[{"border-t":ie()}],"border-color-r":[{"border-r":ie()}],"border-color-b":[{"border-b":ie()}],"border-color-l":[{"border-l":ie()}],"divide-color":[{divide:ie()}],"outline-style":[{outline:[..._e(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Te,he,me]}],"outline-w":[{outline:["",Te,Xr,bi]}],"outline-color":[{outline:ie()}],shadow:[{shadow:["","none",v,$l,ql]}],"shadow-color":[{shadow:ie()}],"inset-shadow":[{"inset-shadow":["none",S,$l,ql]}],"inset-shadow-color":[{"inset-shadow":ie()}],"ring-w":[{ring:ne()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:ie()}],"ring-offset-w":[{"ring-offset":[Te,bi]}],"ring-offset-color":[{"ring-offset":ie()}],"inset-ring-w":[{"inset-ring":ne()}],"inset-ring-color":[{"inset-ring":ie()}],"text-shadow":[{"text-shadow":["none",w,$l,ql]}],"text-shadow-color":[{"text-shadow":ie()}],opacity:[{opacity:[Te,he,me]}],"mix-blend":[{"mix-blend":[...tt(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":tt()}],"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":xe()}],"mask-image-linear-to-pos":[{"mask-linear-to":xe()}],"mask-image-linear-from-color":[{"mask-linear-from":ie()}],"mask-image-linear-to-color":[{"mask-linear-to":ie()}],"mask-image-t-from-pos":[{"mask-t-from":xe()}],"mask-image-t-to-pos":[{"mask-t-to":xe()}],"mask-image-t-from-color":[{"mask-t-from":ie()}],"mask-image-t-to-color":[{"mask-t-to":ie()}],"mask-image-r-from-pos":[{"mask-r-from":xe()}],"mask-image-r-to-pos":[{"mask-r-to":xe()}],"mask-image-r-from-color":[{"mask-r-from":ie()}],"mask-image-r-to-color":[{"mask-r-to":ie()}],"mask-image-b-from-pos":[{"mask-b-from":xe()}],"mask-image-b-to-pos":[{"mask-b-to":xe()}],"mask-image-b-from-color":[{"mask-b-from":ie()}],"mask-image-b-to-color":[{"mask-b-to":ie()}],"mask-image-l-from-pos":[{"mask-l-from":xe()}],"mask-image-l-to-pos":[{"mask-l-to":xe()}],"mask-image-l-from-color":[{"mask-l-from":ie()}],"mask-image-l-to-color":[{"mask-l-to":ie()}],"mask-image-x-from-pos":[{"mask-x-from":xe()}],"mask-image-x-to-pos":[{"mask-x-to":xe()}],"mask-image-x-from-color":[{"mask-x-from":ie()}],"mask-image-x-to-color":[{"mask-x-to":ie()}],"mask-image-y-from-pos":[{"mask-y-from":xe()}],"mask-image-y-to-pos":[{"mask-y-to":xe()}],"mask-image-y-from-color":[{"mask-y-from":ie()}],"mask-image-y-to-color":[{"mask-y-to":ie()}],"mask-image-radial":[{"mask-radial":[he,me]}],"mask-image-radial-from-pos":[{"mask-radial-from":xe()}],"mask-image-radial-to-pos":[{"mask-radial-to":xe()}],"mask-image-radial-from-color":[{"mask-radial-from":ie()}],"mask-image-radial-to-color":[{"mask-radial-to":ie()}],"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":K()}],"mask-image-conic-pos":[{"mask-conic":[Te]}],"mask-image-conic-from-pos":[{"mask-conic-from":xe()}],"mask-image-conic-to-pos":[{"mask-conic-to":xe()}],"mask-image-conic-from-color":[{"mask-conic-from":ie()}],"mask-image-conic-to-color":[{"mask-conic-to":ie()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Qe()}],"mask-repeat":[{mask:Q()}],"mask-size":[{mask:le()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",he,me]}],filter:[{filter:["","none",he,me]}],blur:[{blur:Ue()}],brightness:[{brightness:[Te,he,me]}],contrast:[{contrast:[Te,he,me]}],"drop-shadow":[{"drop-shadow":["","none",_,$l,ql]}],"drop-shadow-color":[{"drop-shadow":ie()}],grayscale:[{grayscale:["",Te,he,me]}],"hue-rotate":[{"hue-rotate":[Te,he,me]}],invert:[{invert:["",Te,he,me]}],saturate:[{saturate:[Te,he,me]}],sepia:[{sepia:["",Te,he,me]}],"backdrop-filter":[{"backdrop-filter":["","none",he,me]}],"backdrop-blur":[{"backdrop-blur":Ue()}],"backdrop-brightness":[{"backdrop-brightness":[Te,he,me]}],"backdrop-contrast":[{"backdrop-contrast":[Te,he,me]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Te,he,me]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Te,he,me]}],"backdrop-invert":[{"backdrop-invert":["",Te,he,me]}],"backdrop-opacity":[{"backdrop-opacity":[Te,he,me]}],"backdrop-saturate":[{"backdrop-saturate":[Te,he,me]}],"backdrop-sepia":[{"backdrop-sepia":["",Te,he,me]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":M()}],"border-spacing-x":[{"border-spacing-x":M()}],"border-spacing-y":[{"border-spacing-y":M()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",he,me]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Te,"initial",he,me]}],ease:[{ease:["linear","initial",R,he,me]}],delay:[{delay:[Te,he,me]}],animate:[{animate:["none",G,he,me]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[N,he,me]}],"perspective-origin":[{"perspective-origin":X()}],rotate:[{rotate:Ze()}],"rotate-x":[{"rotate-x":Ze()}],"rotate-y":[{"rotate-y":Ze()}],"rotate-z":[{"rotate-z":Ze()}],scale:[{scale:Ct()}],"scale-x":[{"scale-x":Ct()}],"scale-y":[{"scale-y":Ct()}],"scale-z":[{"scale-z":Ct()}],"scale-3d":["scale-3d"],skew:[{skew:zn()}],"skew-x":[{"skew-x":zn()}],"skew-y":[{"skew-y":zn()}],transform:[{transform:[he,me,"","none","gpu","cpu"]}],"transform-origin":[{origin:X()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Tt()}],"translate-x":[{"translate-x":Tt()}],"translate-y":[{"translate-y":Tt()}],"translate-z":[{"translate-z":Tt()}],"translate-none":["translate-none"],accent:[{accent:ie()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:ie()}],"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",he,me]}],"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":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mbs":[{"scroll-mbs":M()}],"scroll-mbe":[{"scroll-mbe":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pbs":[{"scroll-pbs":M()}],"scroll-pbe":[{"scroll-pbe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"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",he,me]}],fill:[{fill:["none",...ie()]}],"stroke-w":[{stroke:[Te,Xr,bi,wb]}],stroke:[{stroke:["none",...ie()]}],"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"]}},H4=w4(I4);function _n(...e){return H4(nv(e))}const Z4=O0("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"}}),Le=U.forwardRef(({className:e,variant:n,size:i,asChild:r=!1,...l},c)=>{const d=r?mw:"button";return f.jsx(d,{ref:c,className:_n(Z4({variant:n,size:i,className:e})),...l})});Le.displayName="Button";const P4=O0("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 K0({className:e,variant:n,...i}){return f.jsx("div",{className:_n(P4({variant:n}),e),...i})}const K4=220;function kb({compact:e=!1,version:n,updateAvailable:i,onDismissUpdate:r}){const l=!e&&n&&n!=="unknown",[c,d]=U.useState(!1),m=!e&&i&&r,g=()=>{d(!0),window.setTimeout(()=>{r?.(),d(!1)},K4)};return e?f.jsxs(rt,{to:"/",className:"brand-lockup brand-lockup-compact","aria-label":"Canonry home",children:[f.jsx("img",{className:"brand-icon",src:"./favicon.svg",alt:"","aria-hidden":"true"}),f.jsx("span",{className:"brand-copy",children:f.jsx("span",{className:"brand-mark",children:"Canonry"})})]}):f.jsxs("div",{className:"brand-lockup brand-lockup-wrapper",children:[f.jsx(rt,{to:"/",className:"brand-icon-link","aria-label":"Canonry home",tabIndex:-1,children:f.jsx("img",{className:"brand-icon",src:"./favicon.svg",alt:"","aria-hidden":"true"})}),f.jsxs("div",{className:"brand-copy",children:[f.jsx(rt,{to:"/",className:"brand-mark",children:"Canonry"}),m?f.jsxs("span",{className:`brand-update-bubble ${c?"brand-update-bubble-closing":""}`,role:"status","aria-live":"polite",children:[f.jsxs("a",{className:"brand-update-bubble-link",href:i.url,target:"_blank",rel:"noopener noreferrer",title:`Open release: ${i.upgradeCommand}`,"aria-label":`New version v${i.latest} available — open release page`,children:[f.jsxs("span",{className:"brand-update-bubble-from",children:["v",i.current]}),f.jsx(xk,{className:"brand-update-bubble-arrow size-3","aria-hidden":"true"}),f.jsxs("span",{className:"brand-update-bubble-to",children:["v",i.latest]})]}),f.jsx("button",{type:"button",className:"brand-update-bubble-dismiss",onClick:g,"aria-label":`Dismiss update notification for v${i.latest}`,children:f.jsx(Hs,{className:"size-3","aria-hidden":"true"})})]}):l?f.jsxs("span",{className:"brand-version",children:["v",n]}):null]})]})}function Q4({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",perplexity:"border-teal-800/50 bg-teal-950/40 text-teal-300",local:"border-purple-800/50 bg-purple-950/40 text-purple-300"};return f.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 Bn({tone:e,children:n,...i}){const r=e==="positive"?"success":e==="caution"?"warning":e==="negative"?"destructive":"neutral";return f.jsx(K0,{variant:r,...i,children:n})}function fp({status:e}){return f.jsx(Bn,{tone:z0(e),children:A0(e)})}const Y4=tv,X4=Fb,Q0=U.forwardRef(({className:e,...n},i)=>f.jsx(Df,{ref:i,className:_n("fixed inset-0 z-50 bg-black/70 backdrop-blur-sm",e),...n}));Q0.displayName=Df.displayName;const J4=400,F4=1200,W4=720,Y0=U.forwardRef(({className:e,children:n,...i},r)=>{const[l,c]=U.useState(W4),d=U.useRef(!1),m=U.useRef(0),g=U.useRef(0),b=U.useCallback(w=>{d.current=!0,m.current=w.clientX,g.current=l,w.target.setPointerCapture(w.pointerId),w.preventDefault()},[l]),v=U.useCallback(w=>{if(!d.current)return;const _=m.current-w.clientX,C=Math.min(F4,Math.max(J4,g.current+_));c(C)},[]),S=U.useCallback(()=>{d.current=!1},[]);return f.jsxs(X4,{children:[f.jsx(Q0,{}),f.jsxs(Rf,{ref:r,className:_n("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(${l}px, 100vw)`},...i,children:[f.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:b,onPointerMove:v,onPointerUp:S}),n,f.jsxs(Wb,{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:[f.jsx(Hs,{className:"size-4"}),f.jsx("span",{className:"sr-only",children:"Close"})]})]})]})});Y0.displayName=Rf.displayName;const e3=({className:e,...n})=>f.jsx("div",{className:_n("flex flex-col gap-1.5 pr-10",e),...n}),X0=U.forwardRef(({className:e,...n},i)=>f.jsx(Mf,{ref:i,className:_n("text-lg font-medium text-zinc-50",e),...n}));X0.displayName=Mf.displayName;const J0=U.forwardRef(({className:e,...n},i)=>f.jsx(ev,{ref:i,className:_n("text-sm text-zinc-500",e),...n}));J0.displayName=ev.displayName;function t3({title:e,subtitle:n,children:i,open:r,onClose:l}){return f.jsx(Y4,{open:r,onOpenChange:c=>c?void 0:l(),children:f.jsxs(Y0,{children:[f.jsxs(e3,{className:"drawer-head",children:[f.jsx("p",{className:"eyebrow eyebrow-soft",children:n}),f.jsx(X0,{id:"drawer-title",children:e}),f.jsx(J0,{className:"sr-only",children:n})]}),f.jsx("div",{className:"drawer-body",children:i})]})})}function Ul({text:e}){const[n,i]=U.useState(null),r=U.useRef(null),l=U.useCallback(()=>{if(!r.current)return;const d=r.current.getBoundingClientRect();i({top:d.top,left:d.left+d.width/2})},[]),c=U.useCallback(()=>i(null),[]);return f.jsxs("span",{className:"info-tooltip-wrapper",onMouseEnter:l,onMouseLeave:c,onFocus:l,onBlur:c,children:[f.jsxs("svg",{ref:r,className:"info-tooltip-icon",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[f.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),f.jsx("path",{d:"M8 7v4M8 5.5v0",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),n!==null&&rw.createPortal(f.jsx("span",{role:"tooltip",style:{position:"fixed",top:n.top,left:n.left,transform:"translateX(-50%) translateY(calc(-100% - 8px))",zIndex:9999,pointerEvents:"none",width:"14rem",padding:"0.5rem 0.75rem",fontSize:"11px",fontWeight:400,textTransform:"none",letterSpacing:"normal",lineHeight:"1rem",color:"#d4d4d8",backgroundColor:"#18181b",border:"1px solid rgba(63, 63, 70, 0.6)",borderRadius:"0.5rem",boxShadow:"0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1)"},children:e}),document.body)]})}const n3=/[\s\-_]+/;function a3(e){const n=e.split(n3).filter(Boolean);return n.length===0?null:n.map(i=>i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("[\\s\\-_]*")}function Ab(e,n){const i=i3(n),r=e.split(/(\*\*[^*]+\*\*)/).filter(Boolean).map(b=>b.startsWith("**")&&b.endsWith("**")?{type:"bold",value:b.slice(2,-2)}:{type:"text",value:b}),l=i.flatMap(b=>b.terms).filter(b=>b.trim().length>1);if(l.length===0)return r.map((b,v)=>b.type==="bold"?ks.createElement("strong",{key:`b-${v}`,className:"text-zinc-200 font-semibold"},b.value):b.value).filter(Boolean);const d=[...l].sort((b,v)=>v.length-b.length).map(a3).filter(b=>!!b);if(d.length===0)return r.map((b,v)=>b.type==="bold"?ks.createElement("strong",{key:`b-${v}`,className:"text-zinc-200 font-semibold"},b.value):b.value).filter(Boolean);const m=new RegExp(`(${d.join("|")})`,"gi"),g=new Map;for(const b of i)for(const v of b.terms){const S=oc(v);S&&!g.has(S)&&g.set(S,b.className)}return r.flatMap((b,v)=>b.value.split(m).map((w,_)=>{if(!w)return null;if(_%2===1){const N=g.get(oc(w))??"answer-highlight";return b.type==="bold"?ks.createElement("mark",{key:`hl-${v}-${_}`,className:N},ks.createElement("strong",{className:"text-zinc-200 font-semibold"},w)):ks.createElement("mark",{key:`hl-${v}-${_}`,className:N},w)}return b.type==="bold"?ks.createElement("strong",{key:`b-${v}-${_}`,className:"text-zinc-200 font-semibold"},w):w})).filter(Boolean)}function i3(e){return e.length===0?[]:typeof e[0]=="string"?[{terms:e,className:"answer-highlight"}]:e}function af(e,n){switch(e){case"new":return"First observation";case"emerging":return"First mention";case"lost":return"Lost since last run";default:return n==="mentioned"||n==="visible"?"Mentioned in latest run":n==="pending"?"Awaiting first run":"Not mentioned in latest run"}}function s3({evidence:e,project:n,onClose:i}){const[r,l]=U.useState(!1),[c,d]=U.useState("mentions"),[m,g]=U.useState(-1),[b,v]=U.useState(null),[S,w]=U.useState(!1),[_,C]=U.useState({}),N=FC(n.project),T=new Set(N.map(ac)),R=e.runHistory,G=R.length>1,[H,K]=U.useState(null),X=U.useRef(!1);U.useEffect(()=>{if(X.current||e.answerSnippet&&(e.visibilityState!=null||e.answerMentioned!=null))return;const te=R.at(-1);te&&(X.current=!0,Fl(te.runId).then(ue=>{const ne=ue.snapshots?.find(_e=>_e.query===e.query&&_e.provider===e.provider);ne&&K({citationState:ne.citationState,answerMentioned:ne.answerMentioned,visibilityState:ne.visibilityState,visibilityTransition:te.visibilityTransition,provider:ne.provider,model:ne.model??e.model,answerSnippet:ne.answerText??e.answerSnippet,citedDomains:ne.citedDomains??e.citedDomains,competitorDomains:ne.competitorOverlap??e.competitorDomains,recommendedCompetitors:ne.recommendedCompetitors??e.recommendedCompetitors??[],matchedTerms:ne.matchedTerms??e.matchedTerms??[],groundingSources:ne.groundingSources??e.groundingSources,evidenceUrls:[],changeLabel:e.visibilityChangeLabel??e.changeLabel,summary:e.summary})}).catch(()=>{}))},[e,R]);const J=m>=0&&b!==null,D=J?b:H||{citationState:e.citationState,answerMentioned:e.answerMentioned,visibilityState:e.visibilityState,visibilityTransition:R.at(-1)?.visibilityTransition,provider:e.provider,model:e.model,answerSnippet:e.answerSnippet,citedDomains:e.citedDomains,competitorDomains:e.competitorDomains,recommendedCompetitors:e.recommendedCompetitors??[],matchedTerms:e.matchedTerms??[],groundingSources:e.groundingSources,evidenceUrls:e.evidenceUrls,changeLabel:e.visibilityChangeLabel??e.changeLabel,summary:e.summary},M=D.visibilityState==="pending"||D.citationState==="pending",oe=M?!1:D.visibilityState!=null?D.visibilityState==="visible":D.answerMentioned!=null?D.answerMentioned:D.citationState===ic.cited||D.citationState==="emerging",Ne=D.answerMentioned!=null||D.visibilityState!=null||D.recommendedCompetitors.length>0,Ae=D.citedDomains.length>0||D.groundingSources.length>0||D.evidenceUrls.length>0,ve=n.project.displayName||n.project.name,et=[...N.map(ac),ve,ve.split(" ").slice(0,2).join(" "),...D.matchedTerms].filter(te=>te.trim().length>2),re=[...D.competitorDomains.flatMap(te=>{const ue=JC(te);return ue.length>=4?[ue]:[]}),...D.recommendedCompetitors].filter(te=>te.trim().length>2),pe=[{terms:et,className:"answer-highlight-brand"},...re.length>0?[{terms:re,className:"answer-highlight-competitor"}]:[]],$=M?"pending":D.visibilityTransition==="lost"?"lost":oe?"mentioned":"not-mentioned",F=U.useRef(0),de=U.useCallback(async te=>{const ue=++F.current;if(te===-1||te===R.length-1){g(-1),v(null),l(!1);return}g(te),l(!1);const ne=R[te],_e=`${ne.runId}::${e.query}::${e.provider}`;if(_[_e]){v(_[_e]);return}w(!0);try{const tt=await Fl(ne.runId);if(ue!==F.current)return;const xe=tt.snapshots?.find(Ze=>Ze.query===e.query&&Ze.provider===e.provider)??tt.snapshots?.find(Ze=>Ze.query===e.query),Ue=xe?{citationState:xe.citationState,answerMentioned:xe.answerMentioned,visibilityState:xe.visibilityState,visibilityTransition:ne.visibilityTransition,provider:xe.provider,model:xe.model??null,answerSnippet:xe.answerText??"",citedDomains:xe.citedDomains,competitorDomains:xe.competitorOverlap,recommendedCompetitors:xe.recommendedCompetitors??[],matchedTerms:xe.matchedTerms??[],groundingSources:xe.groundingSources,evidenceUrls:[],changeLabel:af(ne.mentionTransition??ne.visibilityTransition,ne.mentionState??ne.visibilityState),summary:""}:{citationState:ne.citationState,answerMentioned:ne.answerMentioned,visibilityState:ne.visibilityState,visibilityTransition:ne.visibilityTransition,provider:e.provider,model:ne.model??null,answerSnippet:"",citedDomains:[],competitorDomains:[],recommendedCompetitors:[],matchedTerms:[],groundingSources:[],evidenceUrls:[],changeLabel:af(ne.mentionTransition??ne.visibilityTransition,ne.mentionState??ne.visibilityState),summary:"Snapshot data not available for this run."};C(Ze=>({...Ze,[_e]:Ue})),v(Ue)}catch{if(ue!==F.current)return;v({citationState:ne.citationState,answerMentioned:ne.answerMentioned,visibilityState:ne.visibilityState,visibilityTransition:ne.visibilityTransition,provider:e.provider,model:ne.model??null,answerSnippet:"",citedDomains:[],competitorDomains:[],recommendedCompetitors:[],matchedTerms:[],groundingSources:[],evidenceUrls:[],changeLabel:af(ne.mentionTransition??ne.visibilityTransition,ne.mentionState??ne.visibilityState),summary:"Failed to load historical run data."})}finally{ue===F.current&&w(!1)}},[R,e.query,e.provider,_]),ie=(J||e.historyScope!=="provider")&&D.model?`${D.provider} (${D.model}) · ${D.changeLabel.toLowerCase()}`:`${D.provider} · ${D.changeLabel.toLowerCase()}`,Qe=!J&&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(" · "):"",Q=oe?{label:"Mentioned in answer",title:"Your brand or domain is mentioned in this answer",meta:ie}:D.visibilityTransition==="lost"?{label:"Mention lost",title:"Your brand no longer appears in this answer",meta:ie}:M?{label:"Pending",title:"Awaiting first run",meta:"No provider data yet"}:{label:"Not mentioned in answer",title:"Your brand or domain was not mentioned in this answer",meta:ie},le=()=>{if(!D.answerSnippet)return null;const te=D.answerSnippet.split(`
58
+ `),ue=[];let ne=[],_e=0;const tt=()=>{if(ne.length===0)return;const xe=ne.join(" ").trim();xe&&ue.push(f.jsx("p",{className:ue.length>0?"mt-2.5":"",children:Ab(xe,pe)},_e++)),ne=[]};for(const xe of te){const Ue=xe.trim();if(/^[-\u2013\u2014]{3,}$/.test(Ue)){tt(),ue.push(f.jsx("hr",{className:"border-zinc-800/60 my-3"},_e++));continue}const Ze=Ue.match(/^(#{1,3})\s+(\S.*)$/);if(Ze){tt();const Ct=Ze[1].length,zn=Ze[2].replace(/^[\p{Emoji}\p{Emoji_Component}\s]+/u,"").trim()||Ze[2],Tt=Ct===1?"text-[13px] font-semibold text-zinc-100 mt-4 mb-1":Ct===2?"text-xs font-semibold text-zinc-200 mt-3 mb-0.5":"text-xs font-medium text-zinc-300 mt-2";ue.push(f.jsx("p",{className:Tt,children:Ab(zn,pe)},_e++));continue}if(Ue===""){tt();continue}ne.push(Ue)}return tt(),ue};return f.jsx(tv,{open:!0,onOpenChange:te=>{te||i()},children:f.jsxs(Fb,{children:[f.jsx(Df,{className:"fixed inset-0 z-50 bg-black/80 backdrop-blur-sm"}),f.jsxs(Rf,{className:"evidence-modal","aria-describedby":void 0,children:[f.jsxs("div",{className:"evidence-modal-header",children:[f.jsxs("div",{className:"min-w-0 flex-1",children:[f.jsxs("p",{className:"eyebrow eyebrow-soft",children:[n.project.name," ","·"," ",D.provider||"All providers"]}),f.jsx(Mf,{className:"text-lg font-semibold text-zinc-50 truncate",children:e.query})]}),f.jsxs(Wb,{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:[f.jsx(Hs,{className:"size-4"}),f.jsx("span",{className:"sr-only",children:"Close"})]})]}),G&&f.jsxs("div",{className:"evidence-modal-timeline",children:[f.jsx("p",{className:"drawer-section-label mb-1.5",children:"Run history"}),f.jsx("div",{className:"flex items-center gap-1 overflow-x-auto pb-1",children:R.map((te,ue)=>{const ne=m===-1&&ue===R.length-1||m===ue,_e=te.visibilityState??(te.answerMentioned?"visible":"not-visible"),tt=te.visibilityTransition??_e,xe=_e==="visible"?"bg-emerald-400":tt==="emerging"?"bg-amber-400":tt==="lost"?"bg-rose-400":"bg-zinc-600",Ze=new Date(te.createdAt).toLocaleDateString(void 0,{month:"short",day:"numeric"}),Ct=!!(te.model&&ue>0&&R[ue-1]?.model&&R[ue-1].model!==te.model);return f.jsxs("button",{type:"button",className:`evidence-run-dot ${ne?"evidence-run-dot--selected":""}`,onClick:()=>{de(ue===R.length-1?-1:ue)},"aria-label":[`Run ${Ze}: ${_e}`,te.model?`model ${te.model}`:null,Ct?"model changed":null].filter(Boolean).join(" — "),"aria-pressed":ne,children:[f.jsx("span",{className:`size-2 rounded-full ${xe} ${Ct?"ring-1 ring-amber-300/80 ring-offset-2 ring-offset-zinc-950":""}`,"aria-hidden":"true"}),f.jsx("span",{className:"text-[10px] text-zinc-500",children:Ze})]},ue)})}),m>=0&&m<R.length&&f.jsxs("p",{className:"text-[11px] text-zinc-500 mt-1",children:["Viewing run from ",new Date(R[m].createdAt).toLocaleString()," ","—"," ",f.jsx("span",{className:"capitalize",children:R[m].visibilityState??(R[m].answerMentioned?"visible":"not-visible")}),f.jsxs("button",{type:"button",className:"text-zinc-400 hover:text-zinc-200 ml-2",onClick:()=>{de(-1)},children:["←"," Back to latest"]})]}),!J&&(e.modelTransitions?.length??0)>0&&f.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:e.modelTransitions.map(te=>f.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:`${te.fromModel??"unknown"} -> ${te.toModel??"unknown"} on ${new Date(te.createdAt).toLocaleDateString()}`},`${te.runId}:${te.toModel??"unknown"}`))})]}),f.jsxs("div",{className:"evidence-modal-body",children:[S&&f.jsxs("div",{className:"md:col-span-2 flex items-center justify-center py-12 text-zinc-500 text-sm",children:["Loading historical run data","…"]}),!S&&f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"evidence-modal-main",children:[f.jsxs("div",{className:`evidence-position-hero evidence-position-hero--${$}`,children:[f.jsx("p",{className:`evidence-position-label evidence-position-label--${$}`,children:Q.label}),f.jsx("p",{className:`evidence-position-title evidence-position-title--${$}`,children:Q.title}),f.jsx("p",{className:"evidence-position-meta",children:Q.meta}),Qe&&f.jsx("p",{className:"mt-1 text-[11px] text-zinc-500",children:Qe})]}),D.answerSnippet&&f.jsxs("div",{children:[f.jsx("p",{className:"drawer-section-label",children:"What the AI said"}),f.jsx("div",{className:`answer-snippet-block ${r?"evidence-answer-expanded":"evidence-answer-collapsed"}`,children:le()}),D.answerSnippet.length>280&&f.jsx("button",{type:"button",className:"mt-1.5 text-xs text-zinc-500 hover:text-zinc-300 transition-colors",onClick:()=>l(!r),children:r?"↑ Collapse":"↓ Show full answer"})]}),!D.answerSnippet&&!S&&f.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"}),!J&&e.relatedTechnicalSignals.length>0&&f.jsxs("div",{children:[f.jsx("p",{className:"drawer-section-label",children:oe?"Why you're visible":"What to fix"}),f.jsx("div",{className:"action-items-list",children:e.relatedTechnicalSignals.map((te,ue)=>f.jsxs("div",{className:"action-item",children:[f.jsx("svg",{className:`action-item-icon ${oe?"text-emerald-400":"text-amber-400"}`,viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:oe?f.jsx("path",{d:"M3 8l3.5 3.5L13 4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}):f.jsxs(f.Fragment,{children:[f.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),f.jsx("path",{d:"M8 5v3.5M8 10.5v0",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}),f.jsx("span",{className:"action-item-text",children:te})]},ue))})]}),D.summary&&f.jsx("p",{className:"text-xs text-zinc-600 border-t border-zinc-800/40 pt-3 mt-1",children:D.summary})]}),f.jsxs("div",{className:"evidence-modal-sidebar",children:[(Ne||Ae)&&f.jsxs("div",{className:"sidebar-tabs",children:[f.jsx("button",{className:`sidebar-tab ${c==="mentions"?"sidebar-tab--active":""}`,onClick:()=>d("mentions"),type:"button",title:"Canonry's answer-level visibility assessment and any company names extracted from the answer text.",children:"Mentions"}),f.jsx("button",{className:`sidebar-tab ${c==="sources"?"sidebar-tab--active":""}`,onClick:()=>d("sources"),type:"button",title:"Grounding links the model used to build the answer. These are supporting sources, not the primary visibility signal.",children:"Sources"})]}),c==="mentions"&&f.jsxs(f.Fragment,{children:[f.jsxs("div",{children:[f.jsxs("div",{className:"drawer-section-label flex items-center",children:[f.jsx("span",{children:"Mention in answer"}),f.jsx(Ul,{text:"Canonry scans the AI answer for your owned domains and project name. This is independent from grounding or citation sources."})]}),f.jsxs("div",{className:`mention-status mention-status--${oe?"mentioned":"not-mentioned"}`,children:[f.jsx("span",{className:"mention-status-icon",children:M?"…":oe?"✓":"—"}),f.jsx("span",{className:"mention-status-label",children:M?"Pending":oe?"Mentioned":"Not mentioned"})]}),D.matchedTerms.length>0&&f.jsxs("div",{className:"mt-2",children:[f.jsx("p",{className:"text-[10px] uppercase tracking-wide text-zinc-500 mb-1.5",children:"Matched in answer"}),f.jsx("div",{className:"flex flex-wrap gap-1.5",children:D.matchedTerms.map(te=>f.jsx("span",{className:"mention-chip mention-chip--brand",children:te},te))})]}),!M&&!oe&&D.matchedTerms.length===0&&f.jsxs("div",{className:"mt-2",children:[f.jsx("p",{className:"text-[10px] uppercase tracking-wide text-zinc-500 mb-1.5",children:"Searched for"}),f.jsx("div",{className:"flex flex-wrap gap-1.5",children:et.map(te=>f.jsx("span",{className:"mention-chip mention-chip--muted",children:te},te))}),f.jsx("p",{className:"text-[11px] text-zinc-600 mt-1.5",children:"None of these appear in the answer text."})]})]}),(D.recommendedCompetitors.length>0||D.competitorDomains.length>0)&&f.jsxs("div",{children:[f.jsxs("div",{className:"drawer-section-label flex items-center",children:[f.jsx("span",{children:"Competitors in answer"}),f.jsx(Ul,{text:"Competitors detected in the answer text or cited source links. Includes both tracked competitors and names extracted by Canonry."})]}),f.jsx("div",{className:"flex flex-wrap gap-1.5",children:(()=>{const te=D.competitorDomains.map(_e=>_e.replace(/^www\./,"")),ue=new Set(te.map(_e=>oc(_e.replace(/\.[^.]+$/,""))));return[...D.recommendedCompetitors.filter(_e=>!ue.has(oc(_e))),...te].map(_e=>f.jsx("span",{className:"mention-chip mention-chip--competitor",children:_e},_e))})()})]})]}),c==="sources"&&f.jsxs(f.Fragment,{children:[D.citedDomains.length>0&&f.jsxs("div",{children:[f.jsxs("div",{className:"drawer-section-label flex items-center",children:[f.jsx("span",{children:"Domains from source links"}),f.jsx(Ul,{text:"These domains were extracted from grounding or citation URLs. They are supporting-source metadata, not proof that the answer text mentioned them."})]}),f.jsx("div",{className:"citation-leaderboard",children:D.citedDomains.map((te,ue)=>{const ne=te.toLowerCase().replace(/^www\./,""),_e=T.has(ne),tt=!_e&&D.competitorDomains.some(Ue=>Ue.toLowerCase().replace(/^www\./,"")===ne),xe=_e?"you":tt?"competitor":"other";return f.jsxs("div",{className:`citation-leaderboard-item citation-leaderboard-item--${xe}`,children:[f.jsxs("span",{className:"citation-leaderboard-rank",children:["#",ue+1]}),f.jsx("span",{className:"citation-leaderboard-domain",children:te}),_e&&f.jsx("span",{className:"citation-leaderboard-tag",children:"You"}),tt&&f.jsx("span",{className:"citation-leaderboard-tag",children:"Competitor"})]},te)})})]}),D.groundingSources.length>0&&f.jsxs("div",{children:[f.jsxs("div",{className:"drawer-section-label flex items-center",children:[f.jsxs("span",{children:["Grounding source links (",D.groundingSources.length,")"]}),f.jsx(Ul,{text:"Links the model used as grounding or supporting context while producing the answer. These are not the same thing as answer visibility."})]}),f.jsx("ul",{className:"grid gap-0.5",children:D.groundingSources.map((te,ue)=>f.jsx("li",{className:"truncate text-sm",children:f.jsx("a",{href:te.uri,target:"_blank",rel:"noopener noreferrer",className:"text-zinc-400 hover:text-zinc-200 transition-colors",children:te.title||te.uri})},ue))})]}),D.evidenceUrls.length>0&&f.jsxs("div",{children:[f.jsx("p",{className:"drawer-section-label",children:"Evidence URLs"}),f.jsx("ul",{className:"grid gap-1",children:D.evidenceUrls.map(te=>f.jsx("li",{className:"truncate text-sm",children:f.jsx("a",{href:te,target:"_blank",rel:"noopener noreferrer",className:"text-zinc-400 hover:text-zinc-200 transition-colors",children:te})},te))})]}),D.citedDomains.length===0&&D.groundingSources.length===0&&D.evidenceUrls.length===0&&f.jsxs("div",{className:"flex items-center justify-center h-24 text-zinc-600 text-sm",children:["No source data ",J?"for this run":"yet"]})]}),!Ne&&!Ae&&f.jsxs("div",{className:"flex items-center justify-center h-24 text-zinc-600 text-sm",children:["No answer visibility data ",J?"for this run":"yet"]})]})]})]})]})]})})}function Mn(e){const n=new Date("2026-02-20");return e.map((i,r)=>({runId:`run_mock_${r+1}`,citationState:i,createdAt:new Date(n.getTime()+r*2*24*60*60*1e3).toISOString()}))}const sf=[{id:"project_citypoint",name:"Citypoint Dental NYC",canonicalDomain:"citypointdental.com",ownedDomains:[],aliases:[],country:"US",language:"en",tags:["local intent","priority"],labels:{},providers:[],locations:[],defaultLocation:null,autoExtractBacklinks:!1,configSource:"cli",configRevision:1},{id:"project_harbor",name:"Harbor Legal Group",canonicalDomain:"harborlegal.com",ownedDomains:[],aliases:[],country:"US",language:"en",tags:["lead gen"],labels:{},providers:[],locations:[],defaultLocation:null,autoExtractBacklinks:!1,configSource:"cli",configRevision:1},{id:"project_northstar",name:"Northstar Orthopedics",canonicalDomain:"northstarortho.com",ownedDomains:[],aliases:[],country:"US",language:"en",tags:["multi-location"],labels:{},providers:[],locations:[],defaultLocation:null,autoExtractBacklinks:!1,configSource:"cli",configRevision:1}];function Sc(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 r3=Sc({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"}),o3=Sc({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"}),l3=Sc({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"}),c3=Sc({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"}),u3=[{id:"evidence_citypoint_emergency_gemini",query:"emergency dentist brooklyn",provider:"gemini",model:"gemini-2.5-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:Mn(["cited","cited","cited","cited","cited","cited","cited","not-cited","not-cited"])},{id:"evidence_citypoint_emergency_openai",query:"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:Mn(["not-cited","cited","cited","cited","cited","cited","cited"])},{id:"evidence_citypoint_emergency_claude",query:"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:Mn(["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",query:"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:Mn(["not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","cited"])},{id:"evidence_citypoint_invisalign_gemini",query:"best invisalign dentist downtown brooklyn",provider:"gemini",model:"gemini-2.5-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:Mn(["cited","cited","cited","cited","cited","cited","cited","cited"])},{id:"evidence_citypoint_invisalign_claude",query:"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:Mn(["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",query:"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:Mn(["not-cited","not-cited","not-cited","not-cited"])},{id:"evidence_citypoint_children_gemini",query:"pediatric dentist brooklyn heights",provider:"gemini",model:"gemini-2.5-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:Mn(["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",query:"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:Mn(["not-cited","not-cited","not-cited","not-cited","not-cited","cited"])}];sf[0],sf[1],Mn(["cited","cited","cited","cited","cited"]),sf[2],2/7,3/7,Mn(["not-cited","not-cited","not-cited","cited"]);function d3(e,n){return e.runs.find(i=>i.id===n)}function f3(e,n){for(const i of e.projects){const r=i.visibilityEvidence.find(l=>l.id===n);if(r)return{project:i,evidence:r}}}function p3(e,n,i){if(e){const r=e.visibilityEvidence.find(l=>l.id===i);if(r)return{project:e,evidence:r}}if(n)return f3(n,i)}const m3={regression:"negative",gain:"positive",opportunity:"caution","first-citation":"positive","provider-pickup":"positive","persistent-gap":"caution","competitor-gained":"negative","competitor-lost":"neutral"},h3={opportunity:"write","persistent-gap":"write","competitor-gained":"write","competitor-lost":"write",regression:"investigate",gain:"monitor","first-citation":"monitor","provider-pickup":"monitor"},g3={regression:"lost",gain:"emerging",opportunity:"not-cited","first-citation":"emerging","provider-pickup":"emerging","persistent-gap":"not-cited","competitor-gained":"cited","competitor-lost":"not-cited"},y3={regression:"Regression",gain:"Gain",opportunity:"Opportunity","first-citation":"First citation","provider-pickup":"Pickup","persistent-gap":"Gap","competitor-gained":"Competitor","competitor-lost":"Competitor"};function b3(e){return{id:e.id,tone:m3[e.type],title:e.title,detail:e.cause?.details??e.cause?.cause??"",actionLabel:e.recommendation?.action??y3[e.type],actionGroup:h3[e.type],affectedPhrases:[{query:e.query,evidenceId:"",provider:e.provider,citationState:g3[e.type]}]}}function v3(e){return e.filter(n=>!n.dismissed).map(b3)}function F0(e){return{id:e.id,name:e.name,displayName:e.displayName,canonicalDomain:e.canonicalDomain,ownedDomains:e.ownedDomains??[],aliases:e.aliases??[],country:e.country,language:e.language,tags:e.tags,labels:e.labels,providers:e.providers??[],locations:e.locations??[],defaultLocation:e.defaultLocation??null,autoExtractBacklinks:e.autoExtractBacklinks??!1,configSource:e.configSource,configRevision:e.configRevision,createdAt:e.createdAt,updatedAt:e.updatedAt}}function _b(e){try{return new Date(e).toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}catch{return e}}function S3(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 r=Math.floor(i/1e3);if(r<60)return`${r}s`;const l=Math.floor(r/60),c=r%60;return`${l}m ${c}s`}function W0(e){switch(e){case Ee["answer-visibility"]:return"Answer visibility sweep";case Ee["gsc-sync"]:return"GSC sync";case Ee["inspect-sitemap"]:return"Sitemap inspection";case Ee["ga-sync"]:return"GA sync";case Ee["traffic-sync"]:return"Traffic sync";case Ee["bing-inspect"]:return"Bing URL inspection";case Ee["bing-inspect-sitemap"]:return"Bing sitemap inspection";case Ee["site-audit"]:return"Site audit";case Ee["backlink-extract"]:return"Backlink extract";case Ee["aeo-discover-seed"]:return"Discovery (seed phase)";case Ee["aeo-discover-probe"]:return"Discovery (probe phase)"}}function x3(e){return e===Rs.manual?"Manual":e===Rs.scheduled?"Scheduled":e===Rs["config-apply"]?"Config apply":e}function pp(e,n){return{id:e.id,projectId:e.projectId,projectName:n,kind:e.kind,kindLabel:W0(e.kind),status:e.status,trigger:e.trigger??"manual",location:e.location??null,createdAt:e.createdAt,startedAt:e.startedAt?_b(e.startedAt):_b(e.createdAt),duration:S3(e.startedAt??null,e.finishedAt??null),statusDetail:e.error?e1(e.error):w3(e),summary:j3(e),triggerLabel:x3(e.trigger)}}function e1(e){const n=Yf(e);return n.length>200?n.slice(0,200)+"…":n}function w3(e){switch(e.status){case It.queued:return"Waiting for execution slot.";case It.running:return"Provider queries in progress.";case It.completed:return"All queries checked.";case It.partial:return"Run completed with some queries skipped.";case It.failed:return e.error?e1(e.error):"Run failed.";case It.cancelled:return"Run was cancelled.";default:return""}}function j3(e){const n=W0(e.kind);switch(e.status){case It.queued:return`${n} queued`;case It.running:return`${n} in progress`;case It.completed:return`${n} completed`;case It.partial:return`${n} partially completed`;case It.failed:return`${n} failed`;case It.cancelled:return`${n} cancelled`;default:return e.status}}function N3(e,n,i,r){const l=[];let c=0;const d=new Set;if(i.length>0){const m=i.flatMap(C=>C.snapshots??[]),g=new Map;for(const C of m)if(C.query){const N=`${C.query}::${C.provider}::${C.location??""}`;g.set(N,C)}const b=new Set(m.map(C=>C.location??null));b.size===0&&b.add(null);const v=new Set(m.map(C=>C.provider)),S=new Set(n.flatMap(C=>Object.keys(C.providerRuns??{}))),w=[...new Set([...v,...S])].sort(),_=w.length>0?w:["gemini"];for(const C of n){if(C.runs.length===0)continue;d.add(C.query);const N=C.runs.at(-1),T=N?.transition??"not-cited";for(const R of _){const G=[...b].filter(X=>g.has(`${C.query}::${R}::${X??""}`)),H=(C.providerRuns?.[R]?.length??0)>0,K=G.length>0?G:H?[null]:[];for(const X of K){const J=X??"",D=g.get(`${C.query}::${R}::${J}`),M=D?.model??null,oe=M?`${R}:${M}`:null,Ne=C.providerRuns?.[R],Ae=oe?C.modelRuns?.[oe]:void 0,ve=Ue=>Ue?.filter(Ze=>(Ze.location??null)===X),et=G.length>0?ve(Ne):Ne,re=G.length>0?ve(Ae):Ae,pe=(et?.length?et:null)??(re?.length?re:null),$=et?.length?"provider":re?.length?"model":"query",F=pe?pe.at(-1).transition:T,de=pe?pe.at(-1).visibilityTransition??(pe.at(-1).visibilityState==="visible"?"visible":"not-visible"):N?.visibilityTransition??(N?.visibilityState==="visible"?"visible":"not-visible"),je=pe?.at(-1)?.citationState,ie=pe?.at(-1)?.visibilityState,Qe=D?F==="lost"?"lost":F==="emerging"?"emerging":D.citationState===ic.cited?"cited":"not-cited":je===ic.cited?"cited":"not-cited",Q=D?.visibilityState??(ie==="visible"?"visible":ie==="pending"?"pending":"not-visible"),le=zb(pe||C.runs),te=Cb(pe||C.runs),ue=k3(C,R),ne=(pe??C.runs).map(Ue=>({runId:Ue.runId,citationState:Ue.citationState,createdAt:Ue.createdAt,model:ue.get(Ue.runId)??null,answerMentioned:Ue.answerMentioned,visibilityState:Ue.visibilityState,visibilityTransition:Ue.visibilityTransition,mentionState:Ue.mentionState,mentionTransition:Ue.mentionTransition})),_e=A3(ne),tt=$==="provider"&&_e.length<=1?"model":$,xe=_3(ne);l.push({id:`evidence_${e}_${c++}`,query:C.query,provider:D?.provider??R,model:D?.model??null,location:D?.location??X,citationState:Qe,answerMentioned:D?.answerMentioned,visibilityState:Q,visibilityChangeLabel:Tb(de,te,{positive:"visible",negative:"not visible",first:"first visibility"}),changeLabel:Tb(F,le),answerSnippet:D?.answerText??"",citedDomains:D?.citedDomains??[],evidenceUrls:[],competitorDomains:D?.competitorOverlap??[],recommendedCompetitors:D?.recommendedCompetitors??[],matchedTerms:D?.matchedTerms??[],relatedTechnicalSignals:[],groundingSources:D?.groundingSources??[],summary:z3(Q,de,C.query),runHistory:ne,historyScope:tt,modelsSeen:_e,modelTransitions:xe})}}}}for(const m of r)d.has(m.query)||l.push({id:`evidence_${e}_${c++}`,query:m.query,provider:"",model:null,location:null,citationState:"pending",visibilityState:"pending",visibilityChangeLabel:"Awaiting first run",changeLabel:"Awaiting first run",answerSnippet:"",citedDomains:[],evidenceUrls:[],competitorDomains:[],recommendedCompetitors:[],matchedTerms:[],relatedTechnicalSignals:[],groundingSources:[],summary:`"${m.query}" has been added but no visibility run has been triggered yet.`,runHistory:[],historyScope:"query",modelsSeen:[],modelTransitions:[]});return l}function k3(e,n){const i=new Map,r=`${n}:`;for(const[l,c]of Object.entries(e.modelRuns??{})){if(!l.startsWith(r))continue;const d=l.slice(r.length),m=d==="unknown"?null:d;for(const g of c)i.set(g.runId,m)}return i}function A3(e){const n=new Set;for(const i of e)i.model&&n.add(i.model);return[...n]}function _3(e){const n=[];let i=null;for(const r of e){const l=r.model??null;l!==i&&i!==null&&n.push({runId:r.runId,createdAt:r.createdAt,fromModel:i,toModel:l}),i=l}return n}function zb(e){if(e.length===0)return 0;const n=e[e.length-1].citationState;let i=0;for(let r=e.length-1;r>=0&&e[r].citationState===n;r--)i++;return i}function Cb(e){if(e.length===0)return 0;const n=e[e.length-1].visibilityState??"not-visible";let i=0;for(let r=e.length-1;r>=0&&(e[r].visibilityState??"not-visible")===n;r--)i++;return i}function Tb(e,n,i){const r={positive:i?.positive??"cited",negative:i?.negative??"not cited",first:i?.first??"first citation"};switch(e){case"new":return"First observation";case"cited":case"visible":return n<=1?`${Jr(r.positive)} in latest run`:`${Jr(r.positive)} for ${n} runs`;case"lost":return"Lost since last run";case"emerging":return Jr(r.first);case"not-cited":case"not-visible":return n<=1?`${Jr(r.negative)} in latest run`:`${Jr(r.negative)} across ${n} runs`;default:return e}}function Jr(e){return e.charAt(0).toUpperCase()+e.slice(1)}function z3(e,n,i){switch(n){case"lost":return`Mention was lost for "${i}". Your brand no longer appeared in the latest answer.`;case"emerging":return`Your brand started appearing in AI answers for "${i}".`}switch(e){case"visible":return`Your brand or domain is mentioned in AI answers for "${i}".`;case"pending":return`"${i}" has been added but no run has been triggered yet.`;default:return`Your brand or domain was not mentioned in AI answers for "${i}".`}}function t1(e){const n=F0(e.project),i=N3(n.name,e.timeline,e.latestRunDetails,e.queries),l=[...e.runs].sort((c,d)=>d.createdAt.localeCompare(c.createdAt)).map(c=>pp(c,e.project.displayName||e.project.name));return e.overview?C3(n,e.overview,i,l):T3(n,i,l)}function C3(e,n,i,r){const l=v3(n.topInsights);for(const c of n.attentionItems)c.id.startsWith("insight_")||l.push({id:c.id,tone:c.tone,title:c.title,detail:c.detail,actionLabel:c.actionLabel,actionGroup:"investigate",affectedPhrases:[]});return{project:e,dateRangeLabel:n.dateRangeLabel,contextLabel:n.contextLabel,mentionSummary:n.scores.mention,visibilitySummary:n.scores.visibility,mentionShareSummary:n.scores.mentionShare,queryCounts:{cited:n.queryCounts.citedQueries,total:n.queryCounts.totalQueries},gapQueries:n.scores.gapQueries,mentionGaps:n.scores.mentionGaps,indexCoverage:n.scores.indexCoverage,providerScores:n.providerScores,competitorPressure:n.scores.competitorPressure,runStatus:n.scores.runStatus,movementSummary:n.movementSummary,insights:l,visibilityEvidence:i,competitors:n.competitors.map(c=>({id:c.id,domain:c.domain,citationCount:c.citationCount,totalQueries:c.totalQueries,pressureLabel:c.pressureLabel,citedQueries:c.citedQueries,movement:"",notes:""})),recentRuns:r.slice(0,5),suggestedQueries:n.suggestedQueries}}function T3(e,n,i){const r={label:"",value:"No data",delta:"Loading…",tone:"neutral",description:"",tooltip:"",trend:[]};return{project:e,dateRangeLabel:"All time",contextLabel:`${e.country} / ${e.language.toUpperCase()}`,mentionSummary:{...r,label:"Mention Coverage"},visibilitySummary:{...r,label:"Citation Coverage"},mentionShareSummary:{...r,label:"Mention Share",breakdown:{projectMentionSnapshots:0,competitorMentionSnapshots:0,perCompetitor:[],snapshotsWithAnswerText:0,snapshotsTotal:0}},queryCounts:{cited:0,total:0},gapQueries:{...r,label:"Citation Gaps"},mentionGaps:{...r,label:"Mention Gaps"},indexCoverage:{...r,label:"Index Coverage"},providerScores:[],competitorPressure:{...r,label:"Competitor Pressure"},runStatus:{...r,label:"Run Status"},movementSummary:{gained:0,lost:0,tone:"neutral",hasPreviousRun:!1},insights:[],visibilityEvidence:n,competitors:[],recentRuns:i.slice(0,5),suggestedQueries:{rows:[],totalCandidates:0,skippedAlreadyTracked:0}}}function E3(e){const n=F0(e.project),i=[...e.runs].sort((w,_)=>_.createdAt.localeCompare(w.createdAt)),r=i.find(w=>w.kind===Ee["answer-visibility"])??i[0],l=e.project.displayName||e.project.name,c=r?pp(r,l):O3(e.project.id,l),d=e.overview;if(!d)return{project:n,visibilityScore:0,visibilityDelta:"No data",visibilityTone:"neutral",lastRun:c,insight:"No runs completed yet.",trend:[],competitorPressureLabel:"None"};const m=d.scores.visibility,g=m.progress??0,b=d.queryCounts.citedQueries,v=d.queryCounts.totalQueries,S=d.providers.length;return{project:n,visibilityScore:g,visibilityDelta:v>0?`${b} of ${v} queries`:"No data",visibilityTone:m.tone,providerCoverage:m.providerCoverage,lastRun:c,insight:v>0?`${b} of ${v} queries mentioned across ${S} provider${S===1?"":"s"}.`:"No runs completed yet.",trend:[],competitorPressureLabel:d.scores.competitorPressure.value}}function O3(e,n){return{id:"none",projectId:e,projectName:n,kind:Ee["answer-visibility"],kindLabel:"No runs yet",status:It.queued,trigger:Rs.manual,createdAt:"",startedAt:"",duration:"",statusDetail:"",summary:"No runs yet",triggerLabel:""}}function D3(e,n){const i=[],r=[],l=[];for(const d of e){r.push(t1(d)),l.push(E3(d));const m=[...d.runs].sort((g,b)=>b.createdAt.localeCompare(g.createdAt));for(const g of m)i.push(pp(g,d.project.displayName||d.project.name))}i.sort((d,m)=>m.createdAt.localeCompare(d.createdAt));const c=e.length>0;return{portfolioOverview:{projects:l,attentionItems:c?R3(r):[{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"}),...c?{}:{emptyState:{title:"No projects yet",detail:"Canonry becomes useful after one project, a small query set, and one competitor list are in place.",ctaLabel:"Launch setup",ctaHref:"/setup"}}},projects:r,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"},queryImportState:{mode:"paste",queryCount:0,preview:[]},competitorDraft:{domains:[],notes:"Use the CLI to add competitors."},launchState:{enabled:c,ctaLabel:c?"Trigger run":"Create a project first",summary:c?"Ready to run.":"Create a project first to launch a run."}},settings:{providerStatuses:(n?.providers??[]).map(d=>({name:d.name,displayName:d.displayName,keyUrl:d.keyUrl,modelHint:d.modelHint,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."},bing:{state:n?.bing?.configured?"ready":"needs-config",detail:n?.bing?.configured?"Bing Webmaster Tools API key is configured. Project-level Bing connections can be created from the dashboard.":"Bing Webmaster Tools API key is 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 R3(e){const n=[];for(const i of e){const r=i.visibilityEvidence.filter(c=>c.citationState==="lost");r.length>0&&n.push({id:`attention_${i.project.id}_lost`,tone:"negative",title:`${i.project.displayName||i.project.name} lost citations`,detail:`${r.length} quer${r.length>1?"ies":"y"} lost citation.`,actionLabel:"Open project",href:`/projects/${i.project.id}`});const l=i.recentRuns.filter(c=>c.status===It.running||c.status===It.queued);l.length>0&&n.push({id:`attention_${i.project.id}_active`,tone:"neutral",title:`${i.project.displayName||i.project.name} has active runs`,detail:`${l.length} run${l.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 n1=U.createContext(null);n1.Provider;function uo(){return U.useContext(n1)}function xc(e){const i=uo()?.dashboard??null,r=cn({...op({client:ae}),enabled:!i,refetchInterval:uk}),l=cn({...cp({client:ae,query:{kind:"answer-visibility"}}),enabled:!i,staleTime:io,refetchInterval:C=>C.state.data?.some(R=>R.status==="running"||R.status==="queued")?3e3:io}),c=cn({...pO({client:ae}),enabled:!i}),d=r.data??[],m=l.data??[],g=ow({queries:d.map(C=>{const N=m.filter(G=>G.projectId===C.id),T=N.filter(G=>(G.status==="completed"||G.status==="partial")&&G.kind==="answer-visibility"&&G.trigger!=="probe").sort((G,H)=>H.createdAt.localeCompare(G.createdAt)),R=T.length>0?T[0].id:"no-run";return{queryKey:["project-overview-slim",C.id,R],queryFn:async()=>{const G=await gv(C.name).catch(()=>null);return{project:C,runs:N,queries:[],competitors:[],timeline:[],latestRunDetails:[],previousRunDetails:[],gscCoverage:null,bingCoverage:null,dbInsights:null,overview:G}},enabled:!i&&r.isSuccess&&l.isSuccess,staleTime:gf}})}),b=g.every(C=>C.isSuccess),v=U.useMemo(()=>{if(i)return i;if(!r.data||!l.data||d.length>0&&!b)return null;const C=g.map(N=>N.data?{...N.data,runs:m.filter(T=>T.projectId===N.data.project.id)}:null).filter(N=>N!=null);return D3(C,c.data??null)},[i,r.data,l.data,c.data,b,g,d.length,m]),S=!i&&(r.isError||l.isError),w=!i&&!v&&!S,_=U.useCallback(async()=>{await Promise.all([r.refetch(),l.refetch(),c.refetch()])},[r.refetch,l.refetch,c.refetch]);return{dashboard:v,isLoading:w,isError:S,refetch:_}}function M3(e){const n=uo(),i=U.useMemo(()=>!n||!e?null:n.dashboard.projects.find(C=>C.project.name===e)??null,[n,e]),r=cn({...uO({client:ae,path:{name:e??""}}),enabled:!!e&&!i,staleTime:gf,refetchOnWindowFocus:"always"}),l=cn({...cp({client:ae,query:{kind:"answer-visibility"}}),enabled:!!e,staleTime:io,refetchOnWindowFocus:"always",refetchInterval:C=>C.state.data?.some(R=>R.projectId===r.data?.id&&(R.status==="running"||R.status==="queued"))?3e3:io}),c=r.data??null,d=U.useMemo(()=>c?(l.data??[]).filter(C=>C.projectId===c.id):[],[c,l.data]),{latestRunIds:m,previousRunIds:g,latestRunIdsKey:b}=U.useMemo(()=>{const C=d.filter(H=>(H.status==="completed"||H.status==="partial")&&H.kind==="answer-visibility"&&H.trigger!=="probe").sort((H,K)=>K.createdAt.localeCompare(H.createdAt)),N=C[0]?.createdAt??null,T=N?C.filter(H=>H.createdAt===N).map(H=>H.id):[],R=C.find(H=>H.createdAt!==N)?.createdAt??null,G=R?C.filter(H=>H.createdAt===R).map(H=>H.id):[];return{latestRunIds:T,previousRunIds:G,latestRunIdsKey:[...T].sort().join(",")}},[d]),v=cn({queryKey:["project-dashboard-full",c?.id??null,b||"none"],queryFn:async()=>{if(!c||!e)return null;const[C,N,T,R,G,H,K,X,J]=await Promise.all([RN(e).catch(()=>[]),MN(e).catch(()=>[]),BN(e).catch(()=>[]),m.length?Promise.all(m.map(D=>Fl(D).catch(()=>null))).then(D=>D.filter(M=>M!=null)):Promise.resolve([]),g.length?Promise.all(g.map(D=>Fl(D).catch(()=>null))).then(D=>D.filter(M=>M!=null)):Promise.resolve([]),YN(e).catch(()=>null),FN(e).catch(()=>null),ek(e).catch(()=>null),gv(e).catch(()=>null)]);return{project:c,runs:d,queries:C,competitors:N,timeline:T,latestRunDetails:R,previousRunDetails:G,gscCoverage:H,bingCoverage:K,dbInsights:X,overview:J}},enabled:!!c&&!!e&&l.isSuccess,staleTime:gf,refetchOnWindowFocus:"always",refetchInterval:dk}),S=U.useMemo(()=>v.data?t1({...v.data,runs:d}):i||null,[v.data,d,i]),w=U.useCallback(async()=>{await Promise.all([r.refetch(),l.refetch(),v.refetch()])},[r.refetch,l.refetch,v.refetch]),_=!S&&(r.isLoading||l.isLoading||v.isLoading);return{commandCenter:S,project:c,isLoading:_,isError:r.isError||l.isError||v.isError,refetch:w}}const B3=["health"];async function L3(){const e=await nk("/health","API"),n=e.state==="ok"?{label:"Worker",state:"ok",detail:"In-process job runner"}:{label:"Worker",state:e.state,detail:`Depends on API health check · ${e.detail}`,statusCode:e.statusCode,hint:e.hint?`Worker status is inferred from API health in this deployment mode. ${e.hint}`:"Worker status is inferred from API health in this deployment mode."};return{apiStatus:e,workerStatus:n}}function mp(e,n){return cn({queryKey:B3,queryFn:L3,enabled:e,refetchInterval:15e3,initialData:n})}function q3(e){return cn({..._0({client:ae,path:{id:e??""}}),enabled:!!e,refetchInterval:n=>{const i=n.state.data?.status;return i==="running"||i==="queued"?3e3:!1}})}function hp(){const e=dc(),n=lw({strict:!1}),i=cw({select:g=>g.location.pathname}),r=n.runId??null,l=n.evidenceId??null;return{runId:r,evidenceId:l,openRun:g=>{e({to:i,from:Wt.to,search:b=>({...b,runId:g,evidenceId:void 0})})},openEvidence:g=>{e({to:i,from:Wt.to,search:b=>({...b,evidenceId:g,runId:void 0})})},closeDrawer:()=>{e({to:i,from:Wt.to,search:g=>({...g,runId:void 0,evidenceId:void 0})})}}}const $3={negative:"toast-card-negative",caution:"toast-card-caution",positive:"toast-card-positive",neutral:"toast-card-neutral"};function U3(e){if(e.cta)return`${e.cta.label}: ${e.title}`}function V3(){const e=U.useSyncExternalStore(lk,My,My),n=dc(),{openRun:i}=hp(),r=U.useCallback(c=>{hf(c)},[]),l=U.useCallback(c=>{c.cta&&(c.cta.intent==="open-run-drawer"?i(c.cta.runId):n({to:"/runs"}),hf(c.id))},[n,i]);return e.length===0?null:f.jsx("div",{className:"toast-viewport","aria-label":"Notifications",children:e.map(c=>f.jsxs("section",{role:c.tone==="negative"?"alert":"status","aria-live":c.tone==="negative"?"assertive":"polite","data-state":c.state,className:`toast-card ${$3[c.tone]}`,children:[f.jsxs("div",{className:"toast-copy",children:[f.jsx("p",{className:"toast-title",children:c.title}),c.detail?f.jsx("p",{className:"toast-detail",children:c.detail}):null,c.cta?f.jsx("button",{type:"button",className:"toast-action",onClick:()=>l(c),"aria-label":U3(c),children:c.cta.label}):null]}),f.jsx("button",{type:"button",onClick:()=>r(c.id),className:"toast-dismiss","aria-label":"Dismiss",children:f.jsx(Hs,{className:"size-3.5"})})]},c.id))})}async function gp(e){try{return await e.json()}catch{return{}}}function G3(){return typeof window<"u"&&window.__CANONRY_CONFIG__?.basePath?window.__CANONRY_CONFIG__.basePath.replace(/\/$/,"")+"/api/v1":"/api/v1"}const yp=G3();function bp(e){(e===401||e===403)&&Bf()}async function Eb(e){const n=await fetch(`${yp}/projects/${encodeURIComponent(e)}/agent/transcript`,{credentials:"include"});if(!n.ok){bp(n.status);const i=await gp(n);throw new In(i.error?.message??`transcript fetch failed: ${n.status}`,n.status,i.error?.code)}return await n.json()}async function I3(e){const n=await fetch(`${yp}/projects/${encodeURIComponent(e)}/agent/transcript`,{method:"DELETE",credentials:"include"});if(!n.ok){bp(n.status);const i=await gp(n);throw new In(i.error?.message??`reset failed: ${n.status}`,n.status,i.error?.code)}}async function H3({project:e,prompt:n,provider:i,modelId:r,scope:l,signal:c,onEvent:d}){const m={prompt:n};i&&(m.provider=i),r&&(m.modelId=r),l&&(m.scope=l);const g=await fetch(`${yp}/projects/${encodeURIComponent(e)}/agent/prompt`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(m),signal:c});if(!g.ok||!g.body){bp(g.status);const _=await gp(g);throw new In(_.error?.message??`prompt failed: ${g.status}`,g.status,_.error?.code)}const b=g.body.getReader(),v=new TextDecoder;let S="";const w=()=>{b.cancel().catch(()=>{})};c?.addEventListener("abort",w,{once:!0});try{for(;;){const{value:_,done:C}=await b.read();if(C)break;S+=v.decode(_,{stream:!0});let N=S.indexOf(`
59
59
 
60
60
  `);for(;N!==-1;){const T=S.slice(0,N);S=S.slice(N+2);for(const R of T.split(`
61
61
  `)){if(!R.startsWith("data:"))continue;const G=R.slice(5).trim();if(G)try{d(JSON.parse(G))}catch{}}N=S.indexOf(`
62
62
 
63
- `)}}}finally{c?.removeEventListener("abort",w);try{b.releaseLock()}catch{}}}function a1(e){return!e||e.role!=="assistant"?"":e.content.filter(n=>n.type==="text").map(n=>n.text).join("")}const H3=[{label:"Status",prompt:"Quick status overview for this project — latest runs, current health, anything unusual."},{label:"Top insights",prompt:"Walk me through the 3 most severe active insights and what to do about each."},{label:"Last failed run",prompt:"If the latest run failed, dig into it and tell me what went wrong plus how to fix it."},{label:"Schedule",prompt:"What is the current sweep schedule, and is it appropriate given recent volatility?"}],Z3=[{command:"/status",label:"Status",hint:"Latest runs, health, anything unusual",prompt:"Quick status overview for this project — latest runs, current health, anything unusual."},{command:"/insights",label:"Top insights",hint:"Walk through the most severe active insights",prompt:"Walk me through the 3 most severe active insights and what to do about each."},{command:"/last-run",label:"Last run",hint:"Summarize the latest sweep",prompt:"Summarize the latest run for this project — provider mix, visibility changes, and anything that moved."},{command:"/last-failed",label:"Last failed run",hint:"Diagnose the most recent failure",prompt:"If the latest run failed, dig into it and tell me what went wrong plus how to fix it."},{command:"/run-sweep",label:"Run sweep now",hint:"Trigger a new visibility sweep",prompt:"Run a new answer-visibility sweep for this project now and tell me when it lands."},{command:"/schedule",label:"Schedule",hint:"Review the sweep schedule",prompt:"What is the current sweep schedule, and is it appropriate given recent volatility?"},{command:"/queries",label:"Queries",hint:"List tracked queries",prompt:"List the tracked queries for this project and flag any that are obvious duplicates or underperformers."},{command:"/competitors",label:"Competitors",hint:"List tracked competitors",prompt:"List this project's tracked competitors and call out which ones are showing up in answer citations."},{command:"/clear",label:"Clear conversation",hint:"Wipe transcript and start fresh",action:"clear"}],Vl=e=>`canonry:aero:provider:${e}`,Ob=e=>`canonry:aero:scope:${e}`;function P3({projectName:e}){const[n,i]=$.useState(!1),[r,l]=$.useState(!1),[c,d]=$.useState([]),[m,g]=$.useState(""),[b,v]=$.useState(!1),[S,w]=$.useState([]),[_,C]=$.useState(""),[N,T]=$.useState(null),[R,G]=$.useState(()=>typeof window>"u"?null:window.localStorage.getItem(Vl(e))??null),[H,K]=$.useState(()=>typeof window>"u"?"read-only":window.localStorage.getItem(Ob(e))==="all"?"all":"read-only"),X=$.useRef(null),J=$.useRef(null),D=$.useRef(null),[M,oe]=$.useState(0),Ne=$.useMemo(()=>{const Q=m.trimStart();if(!Q.startsWith("/"))return[];if(/\s/.test(Q))return[];const le=Q.toLowerCase();return Z3.filter(te=>te.command.startsWith(le)||te.label.toLowerCase().includes(le.slice(1)))},[m]);$.useEffect(()=>{oe(Q=>Ne.length===0?0:Math.min(Q,Ne.length-1))},[Ne.length]);const Ae=cn({...VO({client:ae,path:{name:e}}),enabled:n,staleTime:6e4}),ve=$.useMemo(()=>{const Q=Ae.data?.providers??[];if(R){const te=Q.find(ue=>ue.id===R&&ue.configured);if(te)return te}const le=Ae.data?.defaultProvider;return le?Q.find(te=>te.id===le)??null:null},[R,Ae.data]);$.useEffect(()=>{if(!Ae.data||!R)return;Ae.data.providers.find(le=>le.id===R&&le.configured)||(G(null),window.localStorage.removeItem(Vl(e)))},[Ae.data,R,e]);const et=$.useCallback(Q=>{G(Q),!(typeof window>"u")&&(Q?window.localStorage.setItem(Vl(e),Q):window.localStorage.removeItem(Vl(e)))},[e]),re=$.useCallback(()=>{K(Q=>{const le=Q==="all"?"read-only":"all";return typeof window<"u"&&window.localStorage.setItem(Ob(e),le),le})},[e]);$.useEffect(()=>{if(!n)return;const Q=le=>{le.key==="Escape"&&(r?l(!1):i(!1))};return window.addEventListener("keydown",Q),()=>window.removeEventListener("keydown",Q)},[n,r]),$.useEffect(()=>{if(!n)return;let Q=!1;T(null);const le=()=>{Q||b||Eb(e).then(ne=>{Q||d(ne.messages)}).catch(ne=>{Q||T(ne instanceof Error?ne.message:"Failed to load transcript")})};le();const ue=window.setInterval(le,15e3);return()=>{Q=!0,window.clearInterval(ue)}},[n,e,b]),$.useEffect(()=>()=>{X.current?.abort()},[e]),$.useEffect(()=>{const Q=J.current;Q&&(Q.scrollTop=Q.scrollHeight)},[c,_,S]);async function pe(Q){const le=Q.trim();if(!le||b)return;T(null),g(""),v(!0),C(""),w([]);const te={role:"user",content:le,timestamp:Date.now()};d(ne=>[...ne,te]);const ue=new AbortController;X.current=ue;try{await I3({project:e,prompt:le,provider:R??void 0,scope:H,signal:ue.signal,onEvent:U});const ne=await Eb(e);d(ne.messages)}catch(ne){ne.name!=="AbortError"&&T(ne instanceof Error?ne.message:"Prompt failed")}finally{v(!1),C(""),X.current=null}}function U(Q){switch(Q.type){case"message_update":C(a1(Q.message));break;case"message_end":Q.message.role==="assistant"&&C("");break;case"tool_execution_start":w(le=>[...le,{id:Q.toolCallId,name:Q.toolName,args:Q.args,startedAt:Date.now()}]);break;case"tool_execution_end":w(le=>le.map(te=>te.id===Q.toolCallId?{...te,endedAt:Date.now(),isError:Q.isError,result:Q.result}:te));break;case"error":T(Q.message);break}}async function F(){X.current?.abort();try{await G3(e),d([]),T(null)}catch(Q){T(Q instanceof Error?Q.message:"Reset failed")}}const de=c.length===0,je=n&&r?"pointer-events-auto fixed inset-0 z-40 flex items-stretch justify-center bg-zinc-950/70 p-4 sm:p-8 backdrop-blur-sm":"pointer-events-none fixed inset-x-0 bottom-0 z-40 flex justify-center p-3",ie=r?"pointer-events-auto flex h-full w-full max-w-5xl flex-col overflow-hidden rounded-2xl border border-zinc-800/80 bg-zinc-950/95 shadow-2xl":"pointer-events-auto w-full max-w-3xl",Qe=r?"flex-1 overflow-y-auto px-6 py-5 text-sm text-zinc-200":"max-h-[40vh] min-h-[120px] overflow-y-auto px-4 py-3 text-sm text-zinc-200";return f.jsx("div",{className:je,onClick:Q=>{r&&Q.target===Q.currentTarget&&l(!1)},children:f.jsx("div",{className:ie,children:n?f.jsxs("div",{className:r?"flex h-full flex-col":"flex flex-col overflow-hidden rounded-2xl border border-zinc-800/80 bg-zinc-950/95 shadow-xl backdrop-blur",children:[f.jsxs("div",{className:"flex items-center justify-between gap-2 border-b border-zinc-800/70 px-4 py-2.5",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(Uy,{className:"h-4 w-4 text-emerald-400","aria-hidden":"true"}),f.jsx("span",{className:"text-sm font-medium text-zinc-100",children:"Aero"}),f.jsx("span",{className:"text-[10px] uppercase tracking-wider text-zinc-500",children:b?"working…":e})]}),f.jsxs("div",{className:"flex items-center gap-1",children:[f.jsx(K3,{providers:Ae.data?.providers??[],active:ve,override:R,onPick:et,disabled:b}),f.jsx("button",{type:"button",onClick:xn(F),className:"rounded-md p-1.5 text-zinc-500 transition hover:bg-zinc-800/60 hover:text-zinc-200","aria-label":"Reset conversation",title:"Reset conversation",children:f.jsx(Sv,{className:"h-3.5 w-3.5","aria-hidden":"true"})}),f.jsx("button",{type:"button",onClick:()=>l(Q=>!Q),className:"rounded-md p-1.5 text-zinc-500 transition hover:bg-zinc-800/60 hover:text-zinc-200","aria-label":r?"Collapse":"Expand",title:r?"Collapse":"Expand",children:r?f.jsx(Yk,{className:"h-3.5 w-3.5","aria-hidden":"true"}):f.jsx(Zk,{className:"h-3.5 w-3.5","aria-hidden":"true"})}),f.jsx("button",{type:"button",onClick:()=>{l(!1),i(!1)},className:"rounded-md p-1.5 text-zinc-500 transition hover:bg-zinc-800/60 hover:text-zinc-200","aria-label":"Close Aero",children:f.jsx(Hs,{className:"h-4 w-4","aria-hidden":"true"})})]})]}),f.jsxs("div",{ref:J,className:Qe,children:[N&&f.jsx("div",{className:"mb-2 rounded-md border border-rose-700/40 bg-rose-950/40 px-3 py-2 text-xs text-rose-200",children:N}),de&&!b&&f.jsxs("div",{className:"flex flex-col gap-3 py-2",children:[f.jsxs("p",{className:"text-xs text-zinc-500",children:["Ask anything about ",f.jsx("span",{className:"text-zinc-300",children:e}),", or start with:"]}),f.jsx("div",{className:"flex flex-wrap gap-1.5",children:H3.map(Q=>f.jsx("button",{type:"button",onClick:()=>{pe(Q.prompt)},className:"rounded-full border border-zinc-800 bg-zinc-900/70 px-3 py-1 text-xs text-zinc-300 transition hover:border-zinc-700 hover:bg-zinc-800/70 hover:text-zinc-100",children:Q.label},Q.label))})]}),F3(c,e,R,H),S.length>0&&f.jsx("div",{className:"mt-3 space-y-1.5",children:S.map(Q=>f.jsx(i1,{trail:Q},Q.id))}),b&&_&&f.jsxs("div",{className:"mt-3",children:[f.jsx("div",{className:"mb-0.5 text-[10px] uppercase tracking-wider text-emerald-400",children:"Aero"}),f.jsx(s1,{content:_})]}),b&&!_&&S.every(Q=>Q.endedAt!==void 0)&&f.jsx(nD,{})]}),f.jsx(Q3,{projectName:e,activeProvider:ve,scope:H,onToggleScope:re,disabled:b}),f.jsxs("div",{className:"relative",children:[Ne.length>0&&f.jsx(Y3,{matches:Ne,selectedIndex:M,onHover:oe,onPick:Q=>{g(""),D.current?.focus(),Q.action==="clear"?F():pe(Q.prompt)}}),f.jsxs("form",{className:"flex items-end gap-2 border-t border-zinc-800/70 bg-zinc-950/80 px-3 py-2.5",onSubmit:Q=>{if(Q.preventDefault(),Ne.length>0){const le=Ne[M];g(""),le.action==="clear"?F():pe(le.prompt);return}pe(m)},children:[f.jsx("textarea",{ref:D,value:m,onChange:Q=>g(Q.target.value),onKeyDown:Q=>{if(Ne.length>0){if(Q.key==="ArrowDown"){Q.preventDefault(),oe(le=>(le+1)%Ne.length);return}if(Q.key==="ArrowUp"){Q.preventDefault(),oe(le=>(le-1+Ne.length)%Ne.length);return}if(Q.key==="Tab"){Q.preventDefault();const le=Ne[M];g(`${le.command} `);return}if(Q.key==="Escape"){Q.preventDefault(),g("");return}}if(Q.key==="Enter"&&!Q.shiftKey)if(Q.preventDefault(),Ne.length>0){const le=Ne[M];g(""),le.action==="clear"?F():pe(le.prompt)}else pe(m)},placeholder:"Ask Aero, or / for commands…",disabled:b,rows:r?3:1,className:"flex-1 resize-none bg-transparent text-sm text-zinc-100 placeholder:text-zinc-600 focus:outline-none disabled:opacity-60"}),f.jsx("button",{type:"submit",disabled:b||!m.trim(),className:"inline-flex h-7 w-7 items-center justify-center rounded-md bg-emerald-500 text-zinc-950 transition hover:bg-emerald-400 disabled:opacity-40","aria-label":"Send",children:f.jsx(jk,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]})]})]}):f.jsxs("button",{type:"button",onClick:()=>i(!0),className:"flex w-full items-center justify-between rounded-full border border-zinc-800/80 bg-zinc-950/95 px-4 py-2 text-left text-sm text-zinc-400 shadow-lg backdrop-blur transition hover:border-zinc-700 hover:bg-zinc-900/90 hover:text-zinc-200",children:[f.jsxs("span",{className:"flex items-center gap-2",children:[f.jsx(Uy,{className:"h-4 w-4 text-emerald-400","aria-hidden":"true"}),"Ask Aero about ",e,"…"]}),f.jsx("span",{className:"text-[10px] uppercase tracking-wider text-zinc-600",children:"Enter"})]})})})}function K3({providers:e,active:n,override:i,onPick:r,disabled:l}){const[c,d]=$.useState(!1),m=$.useRef(null);if($.useEffect(()=>{if(!c)return;const v=w=>{m.current?.contains(w.target)||d(!1)},S=w=>{w.key==="Escape"&&d(!1)};return window.addEventListener("mousedown",v),window.addEventListener("keydown",S),()=>{window.removeEventListener("mousedown",v),window.removeEventListener("keydown",S)}},[c]),e.length===0)return null;const g=n?.label.replace(/\s+\(.+\)$/,"")??"No provider",b=n?.defaultModel;return f.jsxs("div",{ref:m,className:"relative",children:[f.jsxs("button",{type:"button",onClick:()=>d(v=>!v),disabled:l,className:"flex items-center gap-1 rounded-md px-1.5 py-1 text-[11px] text-zinc-400 transition hover:bg-zinc-800/60 hover:text-zinc-200 disabled:opacity-50","aria-label":"Switch agent model","aria-haspopup":"listbox","aria-expanded":c,title:n?`${n.label} · ${n.defaultModel}`:"Pick a provider",children:[f.jsx("span",{className:"font-medium text-zinc-200",children:g}),b&&f.jsx("span",{className:"hidden font-mono text-[10px] text-zinc-500 sm:inline",children:b}),f.jsx(zk,{className:"h-3 w-3","aria-hidden":"true"})]}),c&&f.jsxs("div",{role:"listbox",className:"absolute right-0 top-full z-50 mt-1 w-64 overflow-hidden rounded-lg border border-zinc-800 bg-zinc-950 shadow-xl",children:[f.jsx("div",{className:"border-b border-zinc-800/60 px-3 py-2 text-[10px] uppercase tracking-wider text-zinc-500",children:"Aero provider"}),f.jsx("ul",{className:"max-h-72 overflow-y-auto py-1",children:e.map(v=>{const S=n?.id===v.id,w=i===v.id;return f.jsx("li",{children:f.jsxs("button",{type:"button",role:"option","aria-selected":S,disabled:!v.configured,onClick:()=>{v.configured&&(r(w?null:v.id),d(!1))},className:"flex w-full items-start gap-2 px-3 py-2 text-left text-xs transition enabled:hover:bg-zinc-900 disabled:cursor-not-allowed disabled:opacity-50",children:[f.jsx("span",{className:"mt-0.5 flex h-3.5 w-3.5 shrink-0 items-center justify-center",children:S?f.jsx(vv,{className:"h-3 w-3 text-emerald-400","aria-hidden":"true"}):null}),f.jsxs("span",{className:"flex-1",children:[f.jsxs("span",{className:"flex items-center gap-1.5",children:[f.jsx("span",{className:"font-medium text-zinc-100",children:v.label}),w&&f.jsx("span",{className:"rounded-full border border-emerald-800/60 bg-emerald-950/60 px-1.5 text-[9px] uppercase tracking-wider text-emerald-300",children:"Pinned"}),!v.configured&&f.jsx("span",{className:"rounded-full border border-zinc-800 px-1.5 text-[9px] uppercase tracking-wider text-zinc-500",children:"Key missing"})]}),f.jsx("span",{className:"mt-0.5 block font-mono text-[10px] text-zinc-500",children:v.defaultModel}),v.keySource==="env"&&f.jsx("span",{className:"mt-0.5 block text-[10px] text-zinc-600",children:"via env var"}),!v.configured&&f.jsxs("span",{className:"mt-0.5 block text-[10px] text-zinc-600",children:["Add key in config.yaml or export"," ",f.jsx("code",{className:"font-mono text-zinc-400",children:X3(v.id)})]})]})]})},v.id)})}),i&&f.jsx("button",{type:"button",onClick:()=>{r(null),d(!1)},className:"w-full border-t border-zinc-800/60 px-3 py-2 text-left text-[11px] text-zinc-400 transition hover:bg-zinc-900 hover:text-zinc-100",children:"Reset to auto-detected default"})]})]})}function Q3({projectName:e,activeProvider:n,scope:i,onToggleScope:r,disabled:l}){const c=n?.label.replace(/\s+\(.+\)$/,"")??null,d=i==="all";return f.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 border-t border-zinc-800/70 bg-zinc-950/80 px-3 pt-2",children:[f.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-zinc-800 bg-zinc-900/70 px-2 py-0.5 text-[10px] text-zinc-400",children:[f.jsx("span",{className:"text-zinc-600",children:"project"}),f.jsx("span",{className:"font-medium text-zinc-200",children:e})]}),c&&f.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-zinc-800 bg-zinc-900/70 px-2 py-0.5 text-[10px] text-zinc-400",children:[f.jsx("span",{className:"text-zinc-600",children:"model"}),f.jsx("span",{className:"font-medium text-zinc-200",children:c})]}),f.jsxs("button",{type:"button",onClick:r,disabled:l,className:`inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-[10px] transition disabled:opacity-50 ${d?"border-amber-800/60 bg-amber-950/40 text-amber-300 hover:border-amber-700 hover:text-amber-200":"border-zinc-800 bg-zinc-900/70 text-zinc-400 hover:border-zinc-700 hover:text-zinc-200"}`,title:d?"Aero can invoke write tools (run sweep, dismiss insight, etc). Click to restrict.":"Aero is restricted to read-only tools. Click to allow writes.",children:[f.jsx("span",{className:d?"text-amber-500":"text-zinc-600",children:"scope"}),f.jsx("span",{className:"font-medium",children:d?"all tools":"read-only"})]})]})}function Y3({matches:e,selectedIndex:n,onHover:i,onPick:r}){return f.jsxs("div",{className:"absolute inset-x-3 bottom-full mb-2 overflow-hidden rounded-lg border border-zinc-800 bg-zinc-950/98 shadow-2xl",children:[f.jsx("div",{className:"border-b border-zinc-800/60 px-3 py-1.5 text-[10px] uppercase tracking-wider text-zinc-500",children:"Commands"}),f.jsx("ul",{role:"listbox",className:"max-h-72 overflow-y-auto py-1",children:e.map((l,c)=>{const d=c===n;return f.jsx("li",{children:f.jsxs("button",{type:"button",role:"option","aria-selected":d,onMouseEnter:()=>i(c),onClick:()=>r(l),className:`flex w-full items-center gap-3 px-3 py-1.5 text-left text-xs transition ${d?"bg-zinc-900 text-zinc-100":"text-zinc-300 hover:bg-zinc-900/60"}`,children:[f.jsx("span",{className:"font-mono text-[11px] text-emerald-400",children:l.command}),f.jsx("span",{className:"font-medium",children:l.label}),f.jsx("span",{className:"ml-auto text-[10px] text-zinc-500",children:l.hint})]})},l.command)})}),f.jsxs("div",{className:"border-t border-zinc-800/60 px-3 py-1.5 text-[10px] text-zinc-600",children:[f.jsx("span",{className:"mr-3",children:"↑↓ to select"}),f.jsx("span",{className:"mr-3",children:"Enter to run"}),f.jsx("span",{children:"Tab to autocomplete"})]})]})}function X3(e){switch(e){case"claude":return"ANTHROPIC_API_KEY";case"openai":return"OPENAI_API_KEY";case"gemini":return"GOOGLE_API_KEY";case"zai":return"ZAI_API_KEY"}}function J3(e,n){const i=e.timestamp??0;return`${e.role}:${i}:${n}`}function F3(e,n,i,r){const l=[];for(let c=0;c<e.length;c++){const d=e[c],m=J3(d,c);if(d.role==="user"){const g=typeof d.content=="string"?d.content:JSON.stringify(d.content);if(g.startsWith("[system]"))continue;l.push(f.jsx(W3,{text:g,projectName:n,providerOverride:i,scope:r},m));continue}if(d.role==="assistant"){const g=new Map;let b=c+1;for(;b<e.length&&e[b].role==="toolResult";){const w=e[b];g.set(w.toolCallId,w),b++}const v=tD(d,g,d.timestamp??0),S=a1(d);l.push(f.jsxs($.Fragment,{children:[v.length>0&&f.jsx("div",{className:"mt-3 space-y-1.5",children:v.map(w=>f.jsx(i1,{trail:w},w.id))}),S.trim()&&f.jsxs("div",{className:"mt-3",children:[f.jsx("div",{className:"mb-0.5 text-[10px] uppercase tracking-wider text-emerald-400",children:"Aero"}),f.jsx(s1,{content:S})]})]},m)),c=b-1;continue}}return l}function W3({text:e,projectName:n,providerOverride:i,scope:r}){const[l,c]=$.useState(!1),d=$.useMemo(()=>eD(n,e,i,r),[n,e,i,r]);async function m(){try{await navigator.clipboard.writeText(d),c(!0),window.setTimeout(()=>c(!1),1500)}catch{}}return f.jsxs("div",{className:"group relative mt-3 rounded-md bg-zinc-900/60 px-3 py-2 text-zinc-200",children:[f.jsxs("div",{className:"flex items-center justify-between gap-2",children:[f.jsx("div",{className:"text-[10px] uppercase tracking-wider text-zinc-500",children:"You"}),f.jsx("button",{type:"button",onClick:xn(m),className:"inline-flex items-center gap-1 rounded border border-zinc-800/70 bg-zinc-950/60 px-1.5 py-0.5 text-[10px] text-zinc-400 opacity-0 transition hover:border-zinc-700 hover:text-zinc-100 group-hover:opacity-100 focus:opacity-100","aria-label":"Copy as CLI command",title:d,children:l?f.jsxs(f.Fragment,{children:[f.jsx(vv,{className:"h-2.5 w-2.5 text-emerald-400","aria-hidden":"true"}),"Copied"]}):f.jsxs(f.Fragment,{children:[f.jsx(Ek,{className:"h-2.5 w-2.5","aria-hidden":"true"}),"Copy as CLI"]})})]}),f.jsx("div",{className:"whitespace-pre-wrap",children:e})]})}function eD(e,n,i,r){const l=["canonry","agent","ask",Db(e),Db(n)];return i&&l.push("--provider",i),r==="read-only"&&l.push("--scope","read-only"),l.join(" ")}function Db(e){return`'${e.replace(/'/g,"'\\''")}'`}function tD(e,n,i){const r=[];for(const l of e.content){if(l.type!=="toolCall")continue;const c=l,d=n.get(c.id);r.push({id:c.id,name:c.name,args:c.arguments,startedAt:i,endedAt:d?.timestamp,isError:d?.isError,result:d?.content})}return r}function i1({trail:e}){const[n,i]=$.useState(!1),r=e.endedAt===void 0,l=!r&&e.isError===!0,c=e.endedAt!=null?e.endedAt-e.startedAt:null,d=c==null||c<0?null:c<1e3?`${c}ms`:`${(c/1e3).toFixed(1)}s`,m=l?"border-rose-800/50":r?"border-emerald-800/50":"border-zinc-800/70",g=l?"bg-rose-950/20":r?"bg-emerald-950/20":"bg-zinc-900/40";return f.jsxs("div",{className:`rounded-md border ${m} ${g} font-mono`,children:[f.jsxs("button",{type:"button",onClick:()=>i(b=>!b),className:"flex w-full items-center gap-2 px-2.5 py-1.5 text-left","aria-expanded":n,children:[f.jsx("span",{className:"flex h-3.5 w-3.5 shrink-0 items-center justify-center",children:r?f.jsx(Ik,{className:"h-3 w-3 animate-spin text-emerald-400","aria-hidden":"true"}):l?f.jsx(xv,{className:"h-3 w-3 text-rose-400","aria-hidden":"true"}):f.jsx(c2,{className:"h-3 w-3 text-zinc-500","aria-hidden":"true"})}),f.jsx("span",{className:"text-[11px] font-semibold text-zinc-100",children:e.name}),f.jsxs("span",{className:"ml-auto flex items-center gap-2 text-[10px] text-zinc-500",children:[r?f.jsx("span",{className:"text-emerald-400",children:"running…"}):f.jsxs(f.Fragment,{children:[f.jsx("span",{children:l?"failed":"ok"}),d&&f.jsx("span",{children:d})]}),f.jsx($f,{className:`h-3 w-3 transition-transform ${n?"rotate-90":""}`,"aria-hidden":"true"})]})]}),n&&f.jsxs("div",{className:"border-t border-zinc-800/60 px-2.5 py-2 text-[11px] text-zinc-400",children:[f.jsx("div",{className:"mb-1 text-[9px] uppercase tracking-wider text-zinc-600",children:"Args"}),f.jsx("pre",{className:"mb-2 overflow-x-auto whitespace-pre-wrap break-all text-[10px] text-zinc-300",children:Rb(e.args)}),!r&&e.result!==void 0&&f.jsxs(f.Fragment,{children:[f.jsx("div",{className:"mb-1 text-[9px] uppercase tracking-wider text-zinc-600",children:l?"Error":"Result"}),f.jsx("pre",{className:"overflow-x-auto whitespace-pre-wrap break-all text-[10px] text-zinc-300",children:Rb(e.result)})]})]})]})}function Rb(e){try{const n=typeof e=="string"?e:JSON.stringify(e,null,2);return n.length>2e3?`${n.slice(0,2e3)}
64
- … (${n.length-2e3} more chars)`:n}catch{return String(e)}}function s1({content:e}){return f.jsx("div",{className:"aero-markdown text-zinc-100",children:f.jsx(hw,{components:{h1:n=>f.jsx("h1",{...n,className:"mt-3 mb-2 text-base font-semibold text-zinc-50"}),h2:n=>f.jsx("h2",{...n,className:"mt-3 mb-2 text-sm font-semibold text-zinc-50"}),h3:n=>f.jsx("h3",{...n,className:"mt-3 mb-1.5 text-sm font-semibold text-zinc-100"}),h4:n=>f.jsx("h4",{...n,className:"mt-2 mb-1 text-xs font-semibold uppercase tracking-wide text-zinc-300"}),p:n=>f.jsx("p",{...n,className:"mb-2 leading-relaxed"}),ul:n=>f.jsx("ul",{...n,className:"mb-2 ml-4 list-disc space-y-1"}),ol:n=>f.jsx("ol",{...n,className:"mb-2 ml-4 list-decimal space-y-1"}),li:n=>f.jsx("li",{...n,className:"marker:text-zinc-600"}),strong:n=>f.jsx("strong",{...n,className:"font-semibold text-zinc-50"}),em:n=>f.jsx("em",{...n,className:"text-zinc-200"}),code:({children:n,...i})=>f.jsx("code",{...i,className:"rounded bg-zinc-800/70 px-1 py-0.5 font-mono text-[12px] text-emerald-200",children:n}),pre:n=>f.jsx("pre",{...n,className:"mb-2 overflow-x-auto rounded-md border border-zinc-800 bg-zinc-900/70 p-3 font-mono text-xs text-zinc-200"}),a:n=>f.jsx("a",{...n,className:"text-emerald-400 underline decoration-emerald-700 hover:decoration-emerald-400",target:"_blank",rel:"noopener noreferrer"}),table:n=>f.jsx("div",{className:"mb-2 overflow-x-auto",children:f.jsx("table",{...n,className:"w-full border-collapse text-xs"})}),thead:n=>f.jsx("thead",{...n,className:"border-b border-zinc-800"}),th:n=>f.jsx("th",{...n,className:"px-2 py-1 text-left font-semibold text-zinc-300"}),tr:n=>f.jsx("tr",{...n,className:"border-b border-zinc-900"}),td:n=>f.jsx("td",{...n,className:"px-2 py-1 text-zinc-200"}),blockquote:n=>f.jsx("blockquote",{...n,className:"mb-2 border-l-2 border-zinc-700 pl-3 italic text-zinc-400"}),hr:()=>f.jsx("hr",{className:"my-3 border-zinc-800"})},children:e})})}function nD(){return f.jsxs("div",{className:"mt-3 flex items-center gap-2",children:[f.jsx("div",{className:"text-[10px] uppercase tracking-wider text-emerald-400",children:"Aero"}),f.jsxs("div",{className:"flex items-center gap-1","aria-label":"Aero is thinking",children:[f.jsx("span",{className:"aero-dot h-1.5 w-1.5 rounded-full bg-emerald-400/80"}),f.jsx("span",{className:"aero-dot aero-dot-2 h-1.5 w-1.5 rounded-full bg-emerald-400/60"}),f.jsx("span",{className:"aero-dot aero-dot-3 h-1.5 w-1.5 rounded-full bg-emerald-400/40"})]})]})}function aD(){const e=Yb(),n=/^\/projects\/([^/]+)/.exec(e.pathname),i=n?decodeURIComponent(n[1]):null,r=cn({...op({client:ae}),enabled:i!==null,staleTime:6e4});if(!i)return null;const l=r.data??[],c=l.find(d=>d.id===i)??l.find(d=>d.name===i);return c?f.jsx(P3,{projectName:c.name},c.name):null}function Fr(e,n){e.invalidateQueries({predicate:i=>{const r=i.queryKey[0];return typeof r?._id=="string"&&r._id.startsWith(n)}})}function wc(e,n,i){switch(e.invalidateQueries({queryKey:lp({client:ae})}),e.invalidateQueries({queryKey:Ks({client:ae})}),n){case Ee["answer-visibility"]:case Ee["site-audit"]:case Ee["backlink-extract"]:return;case Ee["gsc-sync"]:case Ee["inspect-sitemap"]:Fr(e,"getApiV1ProjectsByNameGoogleGsc");return;case Ee["ga-sync"]:Fr(e,"getApiV1ProjectsByNameGa");return;case Ee["traffic-sync"]:Fr(e,"getApiV1ProjectsByNameGa"),Fr(e,"getApiV1ProjectsByNameTraffic");return;case Ee["bing-inspect"]:case Ee["bing-inspect-sitemap"]:Fr(e,"getApiV1ProjectsByNameBing");return;case Ee["aeo-discover-seed"]:case Ee["aeo-discover-probe"]:return;default:return n}}const Mb=[{label:"GitHub",href:"https://github.com/AINYC/canonry",Icon:Mk},{label:"Docs",href:"https://github.com/AINYC/canonry/tree/main/docs",Icon:kk},{label:"Changelog",href:"https://github.com/AINYC/canonry/releases",Icon:Dk}],Bb=e=>({label:e,state:"checking",detail:"Checking service health"}),iD={apiStatus:Bb("API"),workerStatus:Bb("Worker")};function sD(e){switch(e){case Ee["answer-visibility"]:return"Visibility sweep";case Ee["gsc-sync"]:return"GSC sync";case Ee["inspect-sitemap"]:return"Sitemap inspection";case Ee["ga-sync"]:return"GA sync";case Ee["traffic-sync"]:return"Traffic sync";case Ee["bing-inspect"]:return"Bing URL inspection";case Ee["bing-inspect-sitemap"]:return"Bing sitemap inspection";case Ee["site-audit"]:return"Site audit";case Ee["backlink-extract"]:return"Backlink extract";case Ee["aeo-discover-seed"]:return"Discovery (seed phase)";case Ee["aeo-discover-probe"]:return"Discovery (probe phase)"}}function rD(e){return e==="completed"?"positive":e==="partial"?"caution":"negative"}function oD(e){const n=sD(e.kind);return e.status==="completed"?`${n} completed`:e.status==="partial"?`${n} completed with partial results`:e.status==="cancelled"?`${n} cancelled`:`${n} failed`}function lD(e,n){return e.error?`${n}: ${Yf(e.error)}`:e.location?`${n} · ${e.location}`:n}function cD(e,n,i){if(n)return n;const r=i.find(l=>l.id===e);return r?.displayName||r?.name||e}function uD(e,n){return[e.completed>0?`${e.completed} completed`:null,e.partial>0?`${e.partial} partial`:null,e.failed>0?`${e.failed} failed`:null,e.cancelled>0?`${e.cancelled} cancelled`:null,n>0?`${n} skipped at queue time`:null].filter(Boolean).join(", ")}function dD(e){return e.failed>0||e.cancelled>0?"negative":e.partial>0?"caution":"positive"}function fD(){const e=Ka(),n=$.useSyncExternalStore(XO,Ni,Ni),i=Object.keys(n.runs).length>0||Object.keys(n.batches).length>0,r=cn({...cp({client:ae}),enabled:i,staleTime:io,refetchInterval:3e3}),l=cn({...op({client:ae}),enabled:i}),c=$.useRef({}),d=$.useCallback(()=>{r.refetch()},[r.refetch]);return $.useEffect(()=>{i&&d()},[i,d]),$.useEffect(()=>{if(!i||typeof window>"u")return;const m=()=>{document.visibilityState==="visible"&&d()};return window.addEventListener("focus",d),document.addEventListener("visibilitychange",m),()=>{window.removeEventListener("focus",d),document.removeEventListener("visibilitychange",m)}},[i,d]),$.useEffect(()=>{const m=r.data??[],g=l.data??[],b=Object.fromEntries(m.map(S=>[S.id,S])),v=Object.fromEntries(m.map(S=>[S.id,S.status]));for(const S of Object.values(n.runs)){const w=b[S.runId];if(!w||!WO(w.status)||(c.current[w.id]??S.lastAnnouncedStatus)===w.status)continue;const C=g.find(T=>T.id===w.projectId);if(C&&wc(e,w.kind,C.name),S.sourceAction==="run-all"){gb(w.id);continue}const N=cD(w.projectId,S.projectLabel,g);un({title:oD(w),detail:lD(w,N),tone:rD(w.status),dedupeKey:`run:${w.id}`,dedupeMode:"replace",cta:{label:"View run",intent:"open-run-drawer",runId:w.id}}),gb(w.id)}for(const S of Object.values(n.batches)){const w=e4(S.runIds,b);w.finished&&(un({title:"Run-all batch finished",detail:uD(w,S.skippedCount),tone:dD(w),dedupeKey:`batch:${S.batchId}`,dedupeMode:"replace",cta:{label:"View runs",intent:"go-to-runs"}}),FO(S.batchId))}c.current=v},[l.data,r.data,n,e]),null}function pD(){const e=uo(),{dashboard:n,isLoading:i,refetch:r}=xc(),d=mp(!e,e?.health).data??e?.health??iD,m=Yb(),{runId:g,evidenceId:b,closeDrawer:v}=hp(),[S,w]=$.useState(!1),[_,C]=$.useState(()=>{if(typeof window>"u")return null;try{return window.localStorage.getItem("canonry:dismissedUpdateVersion")}catch{return null}}),[N]=$.useState(()=>typeof window>"u"?null:new URLSearchParams(window.location.search).get("force-update")),T=N?{current:d.apiStatus.version??"0.0.0",latest:N,url:"https://www.npmjs.com/package/@ainyc/canonry",upgradeCommand:"npm install -g @ainyc/canonry"}:d.apiStatus.updateAvailable,R=T&&T.latest!==_,G=()=>{if(T){try{window.localStorage.setItem("canonry:dismissedUpdateVersion",T.latest)}catch{}C(T.latest)}},H=L3(g),K=H.data??null,X=H.isLoading;$.useEffect(()=>{K&&K.status!=="running"&&K.status!=="queued"&&r()},[K?.status,r]),$.useEffect(()=>{w(!1)},[m.pathname]),$.useEffect(()=>{if(typeof window>"u"||!g&&!b)return;const re=pe=>{pe.key==="Escape"&&v()};return window.addEventListener("keydown",re),()=>{window.removeEventListener("keydown",re)}},[g,b,v]);const J=n??e?.dashboard??null,D=m.pathname==="/setup"&&J!==null&&J.portfolioOverview.projects.length===0,M=g&&J?u3(J,g):void 0,oe=$.useMemo(()=>m.pathname.match(/^\/projects\/([^/]+)/)?.[1]??null,[m.pathname]),Ne=$.useMemo(()=>!oe||!J?null:J.projects.find(re=>re.project.id===oe)?.project.name??null,[oe,J]),{commandCenter:Ae}=R3(Ne),ve=$.useMemo(()=>{if(b)return f3(Ae,J,b)},[b,Ae,J]),et=(()=>{const re=m.pathname;if(re==="/")return"Portfolio";if(re==="/projects")return"Projects";if(re==="/runs")return"Runs";if(re==="/settings")return"Settings";if(re==="/setup")return"Setup";if(re==="/backlinks")return"Backlinks";if(re==="/traffic"||re.startsWith("/traffic/"))return"Server traffic";if(re.startsWith("/projects/")){const U=re.split("/").filter(Boolean)[1];if(U&&J){const F=J.projects.find(de=>de.project.id===U);if(F)return F.project.name}return"Project"}return"Not found"})();return f.jsxs("div",{className:`app-shell ${D?"app-shell-focus":""}`,children:[f.jsx("a",{className:"skip-link",href:"#content",children:"Skip to content"}),!D&&f.jsxs("aside",{className:"sidebar","aria-label":"Primary navigation",children:[f.jsx("div",{className:"sidebar-brand",children:f.jsx(kb,{version:d.apiStatus.version,updateAvailable:R?T:null,onDismissUpdate:G})}),f.jsxs("nav",{className:"sidebar-nav",children:[f.jsxs(rt,{to:"/",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!0},children:[f.jsx(Uk,{className:"sidebar-icon"}),f.jsx("span",{children:"Overview"})]}),f.jsxs(rt,{to:"/projects",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!1},children:[f.jsx(Lk,{className:"sidebar-icon"}),f.jsx("span",{children:"Projects"})]}),f.jsxs(rt,{to:"/runs",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!0},children:[f.jsx(Jk,{className:"sidebar-icon"}),f.jsx("span",{children:"Runs"})]}),f.jsxs(rt,{to:"/traffic",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!1},children:[f.jsx(e2,{className:"sidebar-icon"}),f.jsx("span",{children:"Server traffic"})]}),f.jsxs(rt,{to:"/backlinks",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!0},children:[f.jsx(Vk,{className:"sidebar-icon"}),f.jsx("span",{children:"Backlinks"})]}),f.jsxs(rt,{to:"/settings",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!0},children:[f.jsx(s2,{className:"sidebar-icon"}),f.jsx("span",{children:"Settings"})]}),i?f.jsxs(f.Fragment,{children:[f.jsx("p",{className:"sidebar-section-title",children:"Projects"}),[1,2,3].map(re=>f.jsxs("div",{className:"sidebar-skeleton-item",children:[f.jsx("span",{className:"skeleton-circle size-2"}),f.jsx("span",{className:"skeleton-text flex-1",style:{width:`${50+re*15}%`}})]},re))]}):J&&J.projects.length>0?f.jsxs(f.Fragment,{children:[f.jsx("p",{className:"sidebar-section-title",children:"Projects"}),J.projects.map(re=>{const pe=re.visibilitySummary.tone;return f.jsxs(rt,{to:"/projects/$projectId",params:{projectId:re.project.id},className:"sidebar-project",activeProps:{className:"sidebar-project sidebar-project-active"},children:[f.jsx("span",{className:`sidebar-dot sidebar-dot-${pe}`}),f.jsx("span",{children:re.project.displayName||re.project.name})]},re.project.id)})]}):i?null:f.jsxs(f.Fragment,{children:[f.jsx("p",{className:"sidebar-section-title",children:"Resources"}),f.jsxs(rt,{to:"/setup",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!0},children:[f.jsx(n2,{className:"sidebar-icon"}),f.jsx("span",{children:"Setup"})]})]})]}),f.jsx("div",{className:"sidebar-footer",children:Mb.map(({label:re,href:pe,Icon:U})=>f.jsx("a",{className:"sidebar-footer-icon",href:pe,target:"_blank",rel:"noopener noreferrer",title:re,"aria-label":re,children:f.jsx(U,{className:"size-4"})},pe))})]}),f.jsxs("div",{className:"main-area",children:[f.jsxs("header",{className:"topbar",children:[f.jsxs("div",{className:"topbar-left",children:[f.jsx("div",{className:"topbar-brand-mobile",children:f.jsx(kb,{compact:!0})}),f.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[f.jsx(rt,{to:"/",children:"Home"}),f.jsx($f,{className:"breadcrumb-sep size-3"}),f.jsx("span",{className:"breadcrumb-current",children:et})]})]}),f.jsxs("div",{className:"topbar-actions",children:[f.jsxs("div",{className:"health-pill-row",children:[f.jsxs("span",{className:`health-pill health-pill-${d.apiStatus.state}`,title:Us(d.apiStatus),children:["API ",d.apiStatus.state==="ok"?"ok":d.apiStatus.state]}),f.jsxs("span",{className:`health-pill health-pill-${d.workerStatus.state}`,title:Us(d.workerStatus),children:["Worker ",d.workerStatus.state==="ok"?"ok":d.workerStatus.state]})]}),f.jsxs(Le,{className:"nav-toggle",variant:"secondary",size:"icon",type:"button","aria-expanded":S,"aria-controls":"mobile-nav",onClick:()=>w(re=>!re),children:[f.jsx(Kk,{className:"size-4"}),f.jsx("span",{className:"sr-only",children:"Open navigation"})]})]})]}),f.jsxs("div",{id:"mobile-nav",className:`mobile-nav ${S?"mobile-nav-open":""}`,children:[f.jsxs(Le,{className:"mobile-nav-close",variant:"ghost",size:"icon",type:"button",onClick:()=>w(!1),children:[f.jsx(Hs,{className:"size-5"}),f.jsx("span",{className:"sr-only",children:"Close navigation"})]}),f.jsx(rt,{to:"/",className:"mobile-nav-link",activeProps:{className:"mobile-nav-link mobile-nav-link-active"},activeOptions:{exact:!0},children:"Overview"}),f.jsx(rt,{to:"/projects",className:"mobile-nav-link",activeProps:{className:"mobile-nav-link mobile-nav-link-active"},activeOptions:{exact:!1},children:"Projects"}),f.jsx(rt,{to:"/runs",className:"mobile-nav-link",activeProps:{className:"mobile-nav-link mobile-nav-link-active"},activeOptions:{exact:!0},children:"Runs"}),f.jsx(rt,{to:"/traffic",className:"mobile-nav-link",activeProps:{className:"mobile-nav-link mobile-nav-link-active"},activeOptions:{exact:!1},children:"Server traffic"}),f.jsx(rt,{to:"/settings",className:"mobile-nav-link",activeProps:{className:"mobile-nav-link mobile-nav-link-active"},activeOptions:{exact:!0},children:"Settings"}),J&&J.projects.length>0?f.jsxs("div",{className:"mobile-nav-section",children:[f.jsx("p",{className:"mobile-nav-section-title",children:"Projects"}),J.projects.map(re=>f.jsx(rt,{to:"/projects/$projectId",params:{projectId:re.project.id},className:"mobile-nav-link",children:re.project.name},re.project.id))]}):null]}),f.jsx("main",{id:"content",className:"page-shell",children:i&&!e?f.jsxs("div",{className:"page-skeleton",children:[f.jsxs("div",{className:"page-skeleton-header",children:[f.jsx("div",{className:"skeleton-text h-6 w-40"}),f.jsx("div",{className:"skeleton-text-sm w-72"})]}),f.jsx("div",{className:"page-skeleton-grid",children:[1,2,3].map(re=>f.jsxs("div",{className:"page-skeleton-card",children:[f.jsx("div",{className:"skeleton-text w-24"}),f.jsx("div",{className:"skeleton-text w-full"}),f.jsx("div",{className:"skeleton-text-sm w-3/4"})]},re))}),f.jsx("div",{className:"page-skeleton-grid",style:{gridTemplateColumns:"1fr 1fr"},children:[1,2].map(re=>f.jsxs("div",{className:"page-skeleton-card",children:[f.jsx("div",{className:"skeleton-text w-20"}),f.jsx("div",{className:"space-y-2",children:[1,2,3].map(pe=>f.jsx("div",{className:"skeleton-text-sm w-full"},pe))})]},re))})]}):f.jsx(Xb,{})}),f.jsxs("footer",{className:"footer",children:[f.jsxs("span",{className:"footer-brand",children:[f.jsx("span",{children:f.jsx("a",{href:"https://canonry.ai",children:"Canonry"})}),d.apiStatus.version&&d.apiStatus.version!=="unknown"?f.jsxs("span",{className:"footer-version",children:["v",d.apiStatus.version]}):null]}),f.jsx("div",{className:"footer-links",children:Mb.map(({label:re,href:pe,Icon:U})=>f.jsx("a",{href:pe,target:"_blank",rel:"noopener noreferrer",title:re,"aria-label":re,className:"footer-icon",children:f.jsx(U,{className:"size-3.5"})},pe))})]})]}),M?f.jsxs(e3,{open:!0,title:M.summary,subtitle:`${M.projectName} · ${M.kindLabel}`,onClose:v,children:[f.jsxs("div",{className:"flex flex-wrap items-center gap-x-5 gap-y-1 text-sm",children:[f.jsx(fp,{status:M.status}),f.jsx("span",{className:"text-zinc-400",children:M.startedAt}),f.jsx("span",{className:"text-zinc-500",children:M.duration}),f.jsx("span",{className:"text-zinc-600",children:M.triggerLabel})]}),M.status==="failed"&&M.statusDetail&&f.jsx("p",{className:"text-sm text-rose-300/80 mt-2",children:M.statusDetail}),f.jsxs("div",{className:"mt-4",children:[f.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-zinc-500 mb-2",children:"Activity Log"}),X?f.jsx("p",{className:"text-sm text-zinc-500",children:"Loading run details..."}):K?.snapshots&&K.snapshots.length>0?f.jsxs("div",{className:"space-y-2",children:[K.snapshots.map(re=>f.jsxs("div",{className:"rounded-lg border border-zinc-800/60 bg-zinc-900/30 p-3",children:[f.jsxs("div",{className:"flex items-center justify-between gap-2 mb-1",children:[f.jsx("p",{className:"text-sm font-medium text-zinc-200 truncate",children:re.query??"Unknown query"}),f.jsxs("div",{className:"flex items-center gap-1.5",children:[f.jsx(K4,{provider:re.provider}),f.jsx(K0,{variant:re.citationState===ic.cited?"success":"neutral",children:re.citationState})]})]}),re.model&&f.jsx("p",{className:"text-[11px] text-zinc-500 font-mono",children:re.model}),re.citedDomains.length>0&&f.jsxs("p",{className:"text-xs text-zinc-500 mt-1",children:[f.jsx("span",{className:"text-zinc-400",children:"Sources:"})," ",re.citedDomains.join(", ")]}),re.competitorOverlap.length>0&&f.jsxs("p",{className:"text-xs text-rose-400/80 mt-0.5",children:["Competitor cited: ",re.competitorOverlap.join(", ")]}),re.groundingSources&&re.groundingSources.length>0&&f.jsxs("details",{className:"mt-2",children:[f.jsxs("summary",{className:"text-xs text-zinc-500 cursor-pointer hover:text-zinc-400",children:[re.groundingSources.length," grounding source",re.groundingSources.length!==1?"s":""]}),f.jsx("ul",{className:"mt-1 space-y-0.5",children:re.groundingSources.map((pe,U)=>f.jsx("li",{className:"text-xs text-zinc-500 truncate",children:f.jsx("a",{href:pe.uri,target:"_blank",rel:"noopener noreferrer",className:"hover:text-zinc-300",children:pe.title||pe.uri})},U))})]}),re.answerText&&f.jsxs("details",{className:"mt-1",children:[f.jsx("summary",{className:"text-xs text-zinc-500 cursor-pointer hover:text-zinc-400",children:"Answer preview"}),f.jsx("p",{className:"mt-1 text-xs text-zinc-400 leading-relaxed whitespace-pre-wrap",children:re.answerText})]})]},re.id)),K.status==="running"&&f.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-zinc-500",children:[f.jsx("span",{className:"inline-block h-2 w-2 rounded-full bg-amber-500 animate-pulse"}),"Running remaining queries..."]})]}):K&&K.status==="running"?f.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-zinc-500",children:[f.jsx("span",{className:"inline-block h-2 w-2 rounded-full bg-amber-500 animate-pulse"}),"Waiting for first query result..."]}):K&&K.status==="queued"?f.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-zinc-500",children:[f.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?f.jsxs("div",{className:"rounded-lg border border-rose-800/40 bg-rose-950/20 p-3",children:[f.jsx("p",{className:"text-sm font-medium text-rose-300 mb-2",children:"Run failed"}),f.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:oO(K.error)})]}):f.jsx("p",{className:"text-sm text-zinc-500",children:"No snapshot data available."})]})]}):null,ve?f.jsx(i3,{evidence:ve.evidence,project:ve.project,onClose:v}):null,f.jsx(fD,{}),f.jsx($3,{}),f.jsx(aD,{})]})}class mD extends $.Component{state={error:null};static getDerivedStateFromError(n){return{error:n}}componentDidCatch(n,i){console.error("[ErrorBoundary]",n,i.componentStack)}handleReset=()=>{this.setState({error:null})};render(){return this.state.error?f.jsx("div",{className:"page-container",children:f.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 py-20 text-center",children:[f.jsx("div",{className:"rounded-full bg-rose-950/40 p-3",children:f.jsx(xv,{className:"size-6 text-rose-400"})}),f.jsx("h2",{className:"text-lg font-semibold text-zinc-100",children:"Something went wrong"}),f.jsx("p",{className:"text-sm text-zinc-400 max-w-md",children:this.state.error.message||"An unexpected error occurred while rendering this page."}),f.jsxs("div",{className:"flex gap-3 mt-2",children:[f.jsxs(Le,{variant:"secondary",size:"sm",onClick:this.handleReset,children:[f.jsx(Sv,{className:"size-3.5 mr-1.5"}),"Try again"]}),f.jsx(Le,{variant:"secondary",size:"sm",onClick:()=>{const n=window.__CANONRY_CONFIG__?.basePath?.replace(/\/$/,"")??"";window.location.href=n||"/"},children:"Go home"})]})]})}):this.props.children}}const wn=$.forwardRef(({className:e,...n},i)=>f.jsx("div",{ref:i,className:_n("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}));wn.displayName="Card";const Nf=$.forwardRef(({className:e,...n},i)=>f.jsx("div",{ref:i,className:_n("flex flex-col gap-1.5 p-5",e),...n}));Nf.displayName="CardHeader";const kf=$.forwardRef(({className:e,...n},i)=>f.jsx("h3",{ref:i,className:_n("font-medium tracking-tight text-zinc-50",e),...n}));kf.displayName="CardTitle";const Af=$.forwardRef(({className:e,...n},i)=>f.jsx("p",{ref:i,className:_n("text-sm text-zinc-500",e),...n}));Af.displayName="CardDescription";const Ql=$.forwardRef(({className:e,...n},i)=>f.jsx("div",{ref:i,className:_n("p-5 pt-0",e),...n}));Ql.displayName="CardContent";function hD({points:e,tone:n}){const i=$.useId();if(e.length===0)return null;const r=42,l=132,c=5,d=Math.min(...e),g=Math.max(...e)-d||1,b=l-c*2,v=r-c*2,S=e.map((w,_)=>{const C=c+_/Math.max(e.length-1,1)*b,N=c+(1-(w-d)/g)*v;return`${C},${N}`}).join(" ");return f.jsxs("svg",{className:`sparkline sparkline-${n}`,viewBox:`0 0 ${l} ${r}`,"aria-hidden":"true",children:[f.jsx("defs",{children:f.jsx("clipPath",{id:i,children:f.jsx("rect",{x:c,y:c,width:b,height:v,rx:"8"})})}),f.jsx("line",{className:"sparkline-guide",x1:c,x2:l-c,y1:r-c,y2:r-c}),f.jsx("polyline",{clipPath:`url(#${i})`,points:S,vectorEffect:"non-scaling-stroke"})]})}function gD({project:e}){return f.jsxs(rt,{to:"/projects/$projectId",params:{projectId:e.project.id},className:"project-row cursor-pointer",children:[f.jsxs("div",{className:"project-row-primary",children:[f.jsxs("div",{children:[f.jsx("p",{className:"project-name",children:e.project.name}),f.jsx("p",{className:"project-domain",children:e.project.canonicalDomain})]}),f.jsx("p",{className:"project-insight",children:e.insight})]}),f.jsx("div",{className:"project-row-stat",children:f.jsxs("div",{className:"metric-inline-block",children:[f.jsx("p",{className:"metric-inline-label",children:"Answer Visibility"}),f.jsx("p",{className:`metric-inline-value ${e.visibilityTone==="caution"?"text-amber-400":""}`,children:e.visibilityScore}),f.jsx("p",{className:"metric-inline-delta",children:e.visibilityDelta}),e.providerCoverage&&f.jsx("p",{className:"text-[10px] font-medium text-amber-400/80",children:e.providerCoverage})]})}),f.jsx("div",{className:"project-row-stat",children:f.jsxs("div",{className:"metric-inline-block",children:[f.jsx("p",{className:"metric-inline-label",children:"Competitor Pressure"}),f.jsx("p",{className:"metric-inline-value",children:e.competitorPressureLabel}),f.jsxs("p",{className:"metric-inline-delta",children:[e.lastRun.kindLabel," · ",A0(e.lastRun.status)]})]})}),f.jsx("div",{className:"project-row-chart",children:f.jsx(hD,{points:e.trend,tone:z0(e.lastRun.status)})}),f.jsx("span",{className:"project-row-link",children:f.jsx($f,{className:"h-4 w-4 text-zinc-500"})})]})}function yD(){const e=uo(),{dashboard:n,isLoading:i}=xc(),r=n??e?.dashboard;if(!r||i)return f.jsxs("div",{className:"page-skeleton",children:[f.jsxs("div",{className:"page-skeleton-header",children:[f.jsx("div",{className:"skeleton-text h-6 w-32"}),f.jsx("div",{className:"skeleton-text-sm w-64"})]}),f.jsx("div",{className:"space-y-3",children:[1,2,3].map(v=>f.jsxs("div",{className:"rounded-xl border border-zinc-800/60 bg-zinc-900/30 p-4 flex items-center gap-4",children:[f.jsxs("div",{className:"flex-1 space-y-2",children:[f.jsx("div",{className:"skeleton-text w-36"}),f.jsx("div",{className:"skeleton-text-sm w-48"})]}),f.jsx("div",{className:"skeleton-text w-16"}),f.jsx("div",{className:"skeleton-text w-16"}),f.jsx("div",{className:"skeleton h-8 w-20 rounded"})]},v))})]});const l=r.portfolioOverview,m=mp(!e,e?.health).data??e?.health??{apiStatus:{label:"API",state:"checking",detail:"Checking service health"},workerStatus:{label:"Worker",state:"checking",detail:"Checking service health"}},g=IO(l.systemHealth,m,r.settings),{openRun:b}=hp();return f.jsxs("div",{className:"page-container",children:[f.jsxs("div",{className:"page-header",children:[f.jsxs("div",{className:"page-header-left",children:[f.jsx("h1",{className:"page-title",children:"Portfolio"}),f.jsx("p",{className:"page-subtitle",children:"Visibility and execution state across all projects"})]}),f.jsx("div",{className:"page-header-right",children:f.jsx("p",{className:"text-[11px] text-zinc-600",children:l.lastUpdatedAt})})]}),l.projects.length>0?f.jsx("div",{className:"project-list project-list-scrollable",children:l.projects.map(v=>f.jsx(gD,{project:v},v.project.id))}):f.jsxs(wn,{className:"surface-card empty-card",children:[f.jsx("h3",{children:l.emptyState?.title??"No projects yet"}),f.jsx("p",{className:"supporting-copy",children:l.emptyState?.detail}),f.jsx(Le,{size:"sm",asChild:!0,children:f.jsx(rt,{to:l.emptyState?.ctaHref==="/setup"||!l.emptyState?.ctaHref?"/setup":"/",children:l.emptyState?.ctaLabel??"Launch setup"})})]}),f.jsxs("div",{className:"overview-secondary-grid",children:[l.attentionItems.length>0&&f.jsxs("section",{className:"overview-secondary-section",children:[f.jsx("div",{className:"section-head section-head-inline",children:f.jsxs("div",{children:[f.jsx("p",{className:"eyebrow eyebrow-soft",children:"Needs attention"}),f.jsx("h2",{className:"section-title-sm",children:"What changed"})]})}),f.jsx("div",{className:"attention-list attention-list-scrollable",children:l.attentionItems.map(v=>f.jsxs(rt,{to:v.href,className:`attention-item attention-item-${v.tone}`,children:[f.jsxs("div",{children:[f.jsx("p",{className:"attention-title",children:v.title}),f.jsx("p",{className:"attention-detail",children:v.detail})]}),f.jsx("span",{className:"attention-action",children:v.actionLabel})]},v.id))})]}),f.jsxs("section",{className:"overview-secondary-section",children:[f.jsx("div",{className:"section-head section-head-inline",children:f.jsxs("div",{children:[f.jsx("p",{className:"eyebrow eyebrow-soft",children:"Recent runs"}),f.jsx("h2",{className:"section-title-sm",children:"Activity"})]})}),f.jsx("div",{className:"compact-stack compact-stack-scrollable",children:l.recentRuns.length>0?l.recentRuns.map(v=>f.jsxs("button",{className:"compact-run",type:"button",onClick:()=>b(v.id),children:[f.jsxs("div",{children:[f.jsx("p",{className:"compact-run-title",children:v.projectName}),f.jsx("p",{className:"compact-run-detail",children:v.summary})]}),f.jsx(fp,{status:v.status})]},v.id)):f.jsx("p",{className:"supporting-copy",children:"Run history appears here after the first launch."})})]})]}),f.jsxs("section",{className:"page-section",children:[f.jsx("div",{className:"section-head section-head-inline",children:f.jsxs("div",{children:[f.jsx("p",{className:"eyebrow eyebrow-soft",children:"System health"}),f.jsx("h2",{className:"section-title-sm",children:"Infrastructure"})]})}),f.jsx("div",{className:"health-grid",children:g.map(v=>f.jsxs(wn,{className:"surface-card compact-card",children:[f.jsxs("div",{className:"section-head",children:[f.jsxs("div",{children:[f.jsx("p",{className:"eyebrow eyebrow-soft",children:v.label}),f.jsx("h3",{children:v.detail})]}),f.jsx(Bn,{tone:v.tone,title:v.id==="api"?Us(m.apiStatus):v.id==="worker"?Us(m.workerStatus):void 0,children:v.label})]}),f.jsx("p",{className:"supporting-copy",children:v.meta})]},v.id))})]})]})}const vp=Symbol.for("yaml.alias"),_f=Symbol.for("yaml.document"),Ha=Symbol.for("yaml.map"),r1=Symbol.for("yaml.pair"),Hn=Symbol.for("yaml.scalar"),Qs=Symbol.for("yaml.seq"),kn=Symbol.for("yaml.node.type"),Ci=e=>!!e&&typeof e=="object"&&e[kn]===vp,jc=e=>!!e&&typeof e=="object"&&e[kn]===_f,fo=e=>!!e&&typeof e=="object"&&e[kn]===Ha,vt=e=>!!e&&typeof e=="object"&&e[kn]===r1,nt=e=>!!e&&typeof e=="object"&&e[kn]===Hn,po=e=>!!e&&typeof e=="object"&&e[kn]===Qs;function yt(e){if(e&&typeof e=="object")switch(e[kn]){case Ha:case Qs:return!0}return!1}function bt(e){if(e&&typeof e=="object")switch(e[kn]){case vp:case Ha:case Hn:case Qs:return!0}return!1}const o1=e=>(nt(e)||yt(e))&&!!e.anchor,vi=Symbol("break visit"),bD=Symbol("skip children"),no=Symbol("remove node");function Ys(e,n){const i=vD(n);jc(e)?Ts(null,e.contents,i,Object.freeze([e]))===no&&(e.contents=null):Ts(null,e,i,Object.freeze([]))}Ys.BREAK=vi;Ys.SKIP=bD;Ys.REMOVE=no;function Ts(e,n,i,r){const l=SD(e,n,i,r);if(bt(l)||vt(l))return xD(e,r,l),Ts(e,l,i,r);if(typeof l!="symbol"){if(yt(n)){r=Object.freeze(r.concat(n));for(let c=0;c<n.items.length;++c){const d=Ts(c,n.items[c],i,r);if(typeof d=="number")c=d-1;else{if(d===vi)return vi;d===no&&(n.items.splice(c,1),c-=1)}}}else if(vt(n)){r=Object.freeze(r.concat(n));const c=Ts("key",n.key,i,r);if(c===vi)return vi;c===no&&(n.key=null);const d=Ts("value",n.value,i,r);if(d===vi)return vi;d===no&&(n.value=null)}}return l}function vD(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 SD(e,n,i,r){if(typeof i=="function")return i(e,n,r);if(fo(n))return i.Map?.(e,n,r);if(po(n))return i.Seq?.(e,n,r);if(vt(n))return i.Pair?.(e,n,r);if(nt(n))return i.Scalar?.(e,n,r);if(Ci(n))return i.Alias?.(e,n,r)}function xD(e,n,i){const r=n[n.length-1];if(yt(r))r.items[e]=i;else if(vt(r))e==="key"?r.key=i:r.value=i;else if(jc(r))r.contents=i;else{const l=Ci(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${l} parent`)}}const wD={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},jD=e=>e.replace(/[!,[\]{}]/g,n=>wD[n]);class Gt{constructor(n,i){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},Gt.defaultYaml,n),this.tags=Object.assign({},Gt.defaultTags,i)}clone(){const n=new Gt(this.yaml,this.tags);return n.docStart=this.docStart,n}atDocument(){const n=new Gt(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:Gt.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},Gt.defaultTags);break}return n}add(n,i){this.atNextDocument&&(this.yaml={explicit:Gt.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},Gt.defaultTags),this.atNextDocument=!1);const r=n.trim().split(/[ \t]+/),l=r.shift();switch(l){case"%TAG":{if(r.length!==2&&(i(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;const[c,d]=r;return this.tags[c]=d,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return i(0,"%YAML directive should contain exactly one part"),!1;const[c]=r;if(c==="1.1"||c==="1.2")return this.yaml.version=c,!0;{const d=/^\d+\.\d+$/.test(c);return i(6,`Unsupported YAML version ${c}`,d),!1}}default:return i(0,`Unknown directive ${l}`,!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[,r,l]=n.match(/^(.*!)([^!]*)$/s);l||i(`The ${n} tag has no suffix`);const c=this.tags[r];if(c)try{return c+decodeURIComponent(l)}catch(d){return i(String(d)),null}return r==="!"?n:(i(`Could not resolve tag: ${n}`),null)}tagString(n){for(const[i,r]of Object.entries(this.tags))if(n.startsWith(r))return i+jD(n.substring(r.length));return n[0]==="!"?n:`!<${n}>`}toString(n){const i=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags);let l;if(n&&r.length>0&&bt(n.contents)){const c={};Ys(n.contents,(d,m)=>{bt(m)&&m.tag&&(c[m.tag]=!0)}),l=Object.keys(c)}else l=[];for(const[c,d]of r)c==="!!"&&d==="tag:yaml.org,2002:"||(!n||l.some(m=>m.startsWith(d)))&&i.push(`%TAG ${c} ${d}`);return i.join(`
65
- `)}}Gt.defaultYaml={explicit:!1,version:"1.2"};Gt.defaultTags={"!!":"tag:yaml.org,2002:"};function l1(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 c1(e){const n=new Set;return Ys(e,{Value(i,r){r.anchor&&n.add(r.anchor)}}),n}function u1(e,n){for(let i=1;;++i){const r=`${e}${i}`;if(!n.has(r))return r}}function ND(e,n){const i=[],r=new Map;let l=null;return{onAnchor:c=>{i.push(c),l??(l=c1(e));const d=u1(n,l);return l.add(d),d},setAnchors:()=>{for(const c of i){const d=r.get(c);if(typeof d=="object"&&d.anchor&&(nt(d.node)||yt(d.node)))d.node.anchor=d.anchor;else{const m=new Error("Failed to resolve repeated object (this should not happen)");throw m.source=c,m}}},sourceObjects:r}}function Es(e,n,i,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let l=0,c=r.length;l<c;++l){const d=r[l],m=Es(e,r,String(l),d);m===void 0?delete r[l]:m!==d&&(r[l]=m)}else if(r instanceof Map)for(const l of Array.from(r.keys())){const c=r.get(l),d=Es(e,r,l,c);d===void 0?r.delete(l):d!==c&&r.set(l,d)}else if(r instanceof Set)for(const l of Array.from(r)){const c=Es(e,r,l,l);c===void 0?r.delete(l):c!==l&&(r.delete(l),r.add(c))}else for(const[l,c]of Object.entries(r)){const d=Es(e,r,l,c);d===void 0?delete r[l]:d!==c&&(r[l]=d)}return e.call(n,i,r)}function Nn(e,n,i){if(Array.isArray(e))return e.map((r,l)=>Nn(r,String(l),i));if(e&&typeof e.toJSON=="function"){if(!i||!o1(e))return e.toJSON(n,i);const r={aliasCount:0,count:1,res:void 0};i.anchors.set(e,r),i.onCreate=c=>{r.res=c,delete i.onCreate};const l=e.toJSON(n,i);return i.onCreate&&i.onCreate(l),l}return typeof e=="bigint"&&!i?.keep?Number(e):e}class Sp{constructor(n){Object.defineProperty(this,kn,{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:r,onAnchor:l,reviver:c}={}){if(!jc(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 r=="number"?r:100},m=Nn(this,"",d);if(typeof l=="function")for(const{count:g,res:b}of d.anchors.values())l(b,g);return typeof c=="function"?Es(c,{"":m},"",m):m}}class xp extends Sp{constructor(n){super(vp),this.source=n,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(n,i){let r;i?.aliasResolveCache?r=i.aliasResolveCache:(r=[],Ys(n,{Node:(c,d)=>{(Ci(d)||o1(d))&&r.push(d)}}),i&&(i.aliasResolveCache=r));let l;for(const c of r){if(c===this)break;c.anchor===this.source&&(l=c)}return l}toJSON(n,i){if(!i)return{source:this.source};const{anchors:r,doc:l,maxAliasCount:c}=i,d=this.resolve(l,i);if(!d){const g=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(g)}let m=r.get(d);if(m||(Nn(d,null,i),m=r.get(d)),m?.res===void 0){const g="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(g)}if(c>=0&&(m.count+=1,m.aliasCount===0&&(m.aliasCount=Yl(l,d,r)),m.count*m.aliasCount>c)){const g="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(g)}return m.res}toString(n,i,r){const l=`*${this.source}`;if(n){if(l1(this.source),n.options.verifyAliasOrder&&!n.anchors.has(this.source)){const c=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(c)}if(n.implicitKey)return`${l} `}return l}}function Yl(e,n,i){if(Ci(n)){const r=n.resolve(e),l=i&&r&&i.get(r);return l?l.count*l.aliasCount:0}else if(yt(n)){let r=0;for(const l of n.items){const c=Yl(e,l,i);c>r&&(r=c)}return r}else if(vt(n)){const r=Yl(e,n.key,i),l=Yl(e,n.value,i);return Math.max(r,l)}return 1}const d1=e=>!e||typeof e!="function"&&typeof e!="object";class ke extends Sp{constructor(n){super(Hn),this.value=n}toJSON(n,i){return i?.keep?this.value:Nn(this.value,n,i)}toString(){return String(this.value)}}ke.BLOCK_FOLDED="BLOCK_FOLDED";ke.BLOCK_LITERAL="BLOCK_LITERAL";ke.PLAIN="PLAIN";ke.QUOTE_DOUBLE="QUOTE_DOUBLE";ke.QUOTE_SINGLE="QUOTE_SINGLE";const kD="tag:yaml.org,2002:";function AD(e,n,i){if(n){const r=i.filter(c=>c.tag===n),l=r.find(c=>!c.format)??r[0];if(!l)throw new Error(`Tag ${n} not found`);return l}return i.find(r=>r.identify?.(e)&&!r.format)}function oo(e,n,i){if(jc(e)&&(e=e.contents),bt(e))return e;if(vt(e)){const S=i.schema[Ha].createNode?.(i.schema,null,i);return S.items.push(e),S}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:r,onAnchor:l,onTagObj:c,schema:d,sourceObjects:m}=i;let g;if(r&&e&&typeof e=="object"){if(g=m.get(e),g)return g.anchor??(g.anchor=l(e)),new xp(g.anchor);g={anchor:null,node:null},m.set(e,g)}n?.startsWith("!!")&&(n=kD+n.slice(2));let b=AD(e,n,d.tags);if(!b){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){const S=new ke(e);return g&&(g.node=S),S}b=e instanceof Map?d[Ha]:Symbol.iterator in Object(e)?d[Qs]:d[Ha]}c&&(c(b),delete i.onTagObj);const v=b?.createNode?b.createNode(i.schema,e,i):typeof b?.nodeClass?.from=="function"?b.nodeClass.from(i.schema,e,i):new ke(e);return n?v.tag=n:b.default||(v.tag=b.tag),g&&(g.node=v),v}function cc(e,n,i){let r=i;for(let l=n.length-1;l>=0;--l){const c=n[l];if(typeof c=="number"&&Number.isInteger(c)&&c>=0){const d=[];d[c]=r,r=d}else r=new Map([[c,r]])}return oo(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}const to=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done;class f1 extends Sp{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(r=>bt(r)||vt(r)?r.clone(n):r),this.range&&(i.range=this.range.slice()),i}addIn(n,i){if(to(n))this.add(i);else{const[r,...l]=n,c=this.get(r,!0);if(yt(c))c.addIn(l,i);else if(c===void 0&&this.schema)this.set(r,cc(this.schema,l,i));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${l}`)}}deleteIn(n){const[i,...r]=n;if(r.length===0)return this.delete(i);const l=this.get(i,!0);if(yt(l))return l.deleteIn(r);throw new Error(`Expected YAML collection at ${i}. Remaining path: ${r}`)}getIn(n,i){const[r,...l]=n,c=this.get(r,!0);return l.length===0?!i&&nt(c)?c.value:c:yt(c)?c.getIn(l,i):void 0}hasAllNullValues(n){return this.items.every(i=>{if(!vt(i))return!1;const r=i.value;return r==null||n&&nt(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(n){const[i,...r]=n;if(r.length===0)return this.has(i);const l=this.get(i,!0);return yt(l)?l.hasIn(r):!1}setIn(n,i){const[r,...l]=n;if(l.length===0)this.set(r,i);else{const c=this.get(r,!0);if(yt(c))c.setIn(l,i);else if(c===void 0&&this.schema)this.set(r,cc(this.schema,l,i));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${l}`)}}}const _D=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function pa(e,n){return/^\n+$/.test(e)?e.substring(1):n?e.replace(/^(?! *$)/gm,n):e}const Si=(e,n,i)=>e.endsWith(`
63
+ `)}}}finally{c?.removeEventListener("abort",w);try{b.releaseLock()}catch{}}}function a1(e){return!e||e.role!=="assistant"?"":e.content.filter(n=>n.type==="text").map(n=>n.text).join("")}const Z3=[{label:"Status",prompt:"Quick status overview for this project — latest runs, current health, anything unusual."},{label:"Top insights",prompt:"Walk me through the 3 most severe active insights and what to do about each."},{label:"Last failed run",prompt:"If the latest run failed, dig into it and tell me what went wrong plus how to fix it."},{label:"Schedule",prompt:"What is the current sweep schedule, and is it appropriate given recent volatility?"}],P3=[{command:"/status",label:"Status",hint:"Latest runs, health, anything unusual",prompt:"Quick status overview for this project — latest runs, current health, anything unusual."},{command:"/insights",label:"Top insights",hint:"Walk through the most severe active insights",prompt:"Walk me through the 3 most severe active insights and what to do about each."},{command:"/last-run",label:"Last run",hint:"Summarize the latest sweep",prompt:"Summarize the latest run for this project — provider mix, visibility changes, and anything that moved."},{command:"/last-failed",label:"Last failed run",hint:"Diagnose the most recent failure",prompt:"If the latest run failed, dig into it and tell me what went wrong plus how to fix it."},{command:"/run-sweep",label:"Run sweep now",hint:"Trigger a new visibility sweep",prompt:"Run a new answer-visibility sweep for this project now and tell me when it lands."},{command:"/schedule",label:"Schedule",hint:"Review the sweep schedule",prompt:"What is the current sweep schedule, and is it appropriate given recent volatility?"},{command:"/queries",label:"Queries",hint:"List tracked queries",prompt:"List the tracked queries for this project and flag any that are obvious duplicates or underperformers."},{command:"/competitors",label:"Competitors",hint:"List tracked competitors",prompt:"List this project's tracked competitors and call out which ones are showing up in answer citations."},{command:"/clear",label:"Clear conversation",hint:"Wipe transcript and start fresh",action:"clear"}],Vl=e=>`canonry:aero:provider:${e}`,Ob=e=>`canonry:aero:scope:${e}`;function K3({projectName:e}){const[n,i]=U.useState(!1),[r,l]=U.useState(!1),[c,d]=U.useState([]),[m,g]=U.useState(""),[b,v]=U.useState(!1),[S,w]=U.useState([]),[_,C]=U.useState(""),[N,T]=U.useState(null),[R,G]=U.useState(()=>typeof window>"u"?null:window.localStorage.getItem(Vl(e))??null),[H,K]=U.useState(()=>typeof window>"u"?"read-only":window.localStorage.getItem(Ob(e))==="all"?"all":"read-only"),X=U.useRef(null),J=U.useRef(null),D=U.useRef(null),[M,oe]=U.useState(0),Ne=U.useMemo(()=>{const Q=m.trimStart();if(!Q.startsWith("/"))return[];if(/\s/.test(Q))return[];const le=Q.toLowerCase();return P3.filter(te=>te.command.startsWith(le)||te.label.toLowerCase().includes(le.slice(1)))},[m]);U.useEffect(()=>{oe(Q=>Ne.length===0?0:Math.min(Q,Ne.length-1))},[Ne.length]);const Ae=cn({...GO({client:ae,path:{name:e}}),enabled:n,staleTime:6e4}),ve=U.useMemo(()=>{const Q=Ae.data?.providers??[];if(R){const te=Q.find(ue=>ue.id===R&&ue.configured);if(te)return te}const le=Ae.data?.defaultProvider;return le?Q.find(te=>te.id===le)??null:null},[R,Ae.data]);U.useEffect(()=>{if(!Ae.data||!R)return;Ae.data.providers.find(le=>le.id===R&&le.configured)||(G(null),window.localStorage.removeItem(Vl(e)))},[Ae.data,R,e]);const et=U.useCallback(Q=>{G(Q),!(typeof window>"u")&&(Q?window.localStorage.setItem(Vl(e),Q):window.localStorage.removeItem(Vl(e)))},[e]),re=U.useCallback(()=>{K(Q=>{const le=Q==="all"?"read-only":"all";return typeof window<"u"&&window.localStorage.setItem(Ob(e),le),le})},[e]);U.useEffect(()=>{if(!n)return;const Q=le=>{le.key==="Escape"&&(r?l(!1):i(!1))};return window.addEventListener("keydown",Q),()=>window.removeEventListener("keydown",Q)},[n,r]),U.useEffect(()=>{if(!n)return;let Q=!1;T(null);const le=()=>{Q||b||Eb(e).then(ne=>{Q||d(ne.messages)}).catch(ne=>{Q||T(ne instanceof Error?ne.message:"Failed to load transcript")})};le();const ue=window.setInterval(le,15e3);return()=>{Q=!0,window.clearInterval(ue)}},[n,e,b]),U.useEffect(()=>()=>{X.current?.abort()},[e]),U.useEffect(()=>{const Q=J.current;Q&&(Q.scrollTop=Q.scrollHeight)},[c,_,S]);async function pe(Q){const le=Q.trim();if(!le||b)return;T(null),g(""),v(!0),C(""),w([]);const te={role:"user",content:le,timestamp:Date.now()};d(ne=>[...ne,te]);const ue=new AbortController;X.current=ue;try{await H3({project:e,prompt:le,provider:R??void 0,scope:H,signal:ue.signal,onEvent:$});const ne=await Eb(e);d(ne.messages)}catch(ne){ne.name!=="AbortError"&&T(ne instanceof Error?ne.message:"Prompt failed")}finally{v(!1),C(""),X.current=null}}function $(Q){switch(Q.type){case"message_update":C(a1(Q.message));break;case"message_end":Q.message.role==="assistant"&&C("");break;case"tool_execution_start":w(le=>[...le,{id:Q.toolCallId,name:Q.toolName,args:Q.args,startedAt:Date.now()}]);break;case"tool_execution_end":w(le=>le.map(te=>te.id===Q.toolCallId?{...te,endedAt:Date.now(),isError:Q.isError,result:Q.result}:te));break;case"error":T(Q.message);break}}async function F(){X.current?.abort();try{await I3(e),d([]),T(null)}catch(Q){T(Q instanceof Error?Q.message:"Reset failed")}}const de=c.length===0,je=n&&r?"pointer-events-auto fixed inset-0 z-40 flex items-stretch justify-center bg-zinc-950/70 p-4 sm:p-8 backdrop-blur-sm":"pointer-events-none fixed inset-x-0 bottom-0 z-40 flex justify-center p-3",ie=r?"pointer-events-auto flex h-full w-full max-w-5xl flex-col overflow-hidden rounded-2xl border border-zinc-800/80 bg-zinc-950/95 shadow-2xl":"pointer-events-auto w-full max-w-3xl",Qe=r?"flex-1 overflow-y-auto px-6 py-5 text-sm text-zinc-200":"max-h-[40vh] min-h-[120px] overflow-y-auto px-4 py-3 text-sm text-zinc-200";return f.jsx("div",{className:je,onClick:Q=>{r&&Q.target===Q.currentTarget&&l(!1)},children:f.jsx("div",{className:ie,children:n?f.jsxs("div",{className:r?"flex h-full flex-col":"flex flex-col overflow-hidden rounded-2xl border border-zinc-800/80 bg-zinc-950/95 shadow-xl backdrop-blur",children:[f.jsxs("div",{className:"flex items-center justify-between gap-2 border-b border-zinc-800/70 px-4 py-2.5",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx($y,{className:"h-4 w-4 text-emerald-400","aria-hidden":"true"}),f.jsx("span",{className:"text-sm font-medium text-zinc-100",children:"Aero"}),f.jsx("span",{className:"text-[10px] uppercase tracking-wider text-zinc-500",children:b?"working…":e})]}),f.jsxs("div",{className:"flex items-center gap-1",children:[f.jsx(Q3,{providers:Ae.data?.providers??[],active:ve,override:R,onPick:et,disabled:b}),f.jsx("button",{type:"button",onClick:xn(F),className:"rounded-md p-1.5 text-zinc-500 transition hover:bg-zinc-800/60 hover:text-zinc-200","aria-label":"Reset conversation",title:"Reset conversation",children:f.jsx(Sv,{className:"h-3.5 w-3.5","aria-hidden":"true"})}),f.jsx("button",{type:"button",onClick:()=>l(Q=>!Q),className:"rounded-md p-1.5 text-zinc-500 transition hover:bg-zinc-800/60 hover:text-zinc-200","aria-label":r?"Collapse":"Expand",title:r?"Collapse":"Expand",children:r?f.jsx(Yk,{className:"h-3.5 w-3.5","aria-hidden":"true"}):f.jsx(Zk,{className:"h-3.5 w-3.5","aria-hidden":"true"})}),f.jsx("button",{type:"button",onClick:()=>{l(!1),i(!1)},className:"rounded-md p-1.5 text-zinc-500 transition hover:bg-zinc-800/60 hover:text-zinc-200","aria-label":"Close Aero",children:f.jsx(Hs,{className:"h-4 w-4","aria-hidden":"true"})})]})]}),f.jsxs("div",{ref:J,className:Qe,children:[N&&f.jsx("div",{className:"mb-2 rounded-md border border-rose-700/40 bg-rose-950/40 px-3 py-2 text-xs text-rose-200",children:N}),de&&!b&&f.jsxs("div",{className:"flex flex-col gap-3 py-2",children:[f.jsxs("p",{className:"text-xs text-zinc-500",children:["Ask anything about ",f.jsx("span",{className:"text-zinc-300",children:e}),", or start with:"]}),f.jsx("div",{className:"flex flex-wrap gap-1.5",children:Z3.map(Q=>f.jsx("button",{type:"button",onClick:()=>{pe(Q.prompt)},className:"rounded-full border border-zinc-800 bg-zinc-900/70 px-3 py-1 text-xs text-zinc-300 transition hover:border-zinc-700 hover:bg-zinc-800/70 hover:text-zinc-100",children:Q.label},Q.label))})]}),W3(c,e,R,H),S.length>0&&f.jsx("div",{className:"mt-3 space-y-1.5",children:S.map(Q=>f.jsx(i1,{trail:Q},Q.id))}),b&&_&&f.jsxs("div",{className:"mt-3",children:[f.jsx("div",{className:"mb-0.5 text-[10px] uppercase tracking-wider text-emerald-400",children:"Aero"}),f.jsx(s1,{content:_})]}),b&&!_&&S.every(Q=>Q.endedAt!==void 0)&&f.jsx(aD,{})]}),f.jsx(Y3,{projectName:e,activeProvider:ve,scope:H,onToggleScope:re,disabled:b}),f.jsxs("div",{className:"relative",children:[Ne.length>0&&f.jsx(X3,{matches:Ne,selectedIndex:M,onHover:oe,onPick:Q=>{g(""),D.current?.focus(),Q.action==="clear"?F():pe(Q.prompt)}}),f.jsxs("form",{className:"flex items-end gap-2 border-t border-zinc-800/70 bg-zinc-950/80 px-3 py-2.5",onSubmit:Q=>{if(Q.preventDefault(),Ne.length>0){const le=Ne[M];g(""),le.action==="clear"?F():pe(le.prompt);return}pe(m)},children:[f.jsx("textarea",{ref:D,value:m,onChange:Q=>g(Q.target.value),onKeyDown:Q=>{if(Ne.length>0){if(Q.key==="ArrowDown"){Q.preventDefault(),oe(le=>(le+1)%Ne.length);return}if(Q.key==="ArrowUp"){Q.preventDefault(),oe(le=>(le-1+Ne.length)%Ne.length);return}if(Q.key==="Tab"){Q.preventDefault();const le=Ne[M];g(`${le.command} `);return}if(Q.key==="Escape"){Q.preventDefault(),g("");return}}if(Q.key==="Enter"&&!Q.shiftKey)if(Q.preventDefault(),Ne.length>0){const le=Ne[M];g(""),le.action==="clear"?F():pe(le.prompt)}else pe(m)},placeholder:"Ask Aero, or / for commands…",disabled:b,rows:r?3:1,className:"flex-1 resize-none bg-transparent text-sm text-zinc-100 placeholder:text-zinc-600 focus:outline-none disabled:opacity-60"}),f.jsx("button",{type:"submit",disabled:b||!m.trim(),className:"inline-flex h-7 w-7 items-center justify-center rounded-md bg-emerald-500 text-zinc-950 transition hover:bg-emerald-400 disabled:opacity-40","aria-label":"Send",children:f.jsx(jk,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]})]})]}):f.jsxs("button",{type:"button",onClick:()=>i(!0),className:"flex w-full items-center justify-between rounded-full border border-zinc-800/80 bg-zinc-950/95 px-4 py-2 text-left text-sm text-zinc-400 shadow-lg backdrop-blur transition hover:border-zinc-700 hover:bg-zinc-900/90 hover:text-zinc-200",children:[f.jsxs("span",{className:"flex items-center gap-2",children:[f.jsx($y,{className:"h-4 w-4 text-emerald-400","aria-hidden":"true"}),"Ask Aero about ",e,"…"]}),f.jsx("span",{className:"text-[10px] uppercase tracking-wider text-zinc-600",children:"Enter"})]})})})}function Q3({providers:e,active:n,override:i,onPick:r,disabled:l}){const[c,d]=U.useState(!1),m=U.useRef(null);if(U.useEffect(()=>{if(!c)return;const v=w=>{m.current?.contains(w.target)||d(!1)},S=w=>{w.key==="Escape"&&d(!1)};return window.addEventListener("mousedown",v),window.addEventListener("keydown",S),()=>{window.removeEventListener("mousedown",v),window.removeEventListener("keydown",S)}},[c]),e.length===0)return null;const g=n?.label.replace(/\s+\(.+\)$/,"")??"No provider",b=n?.defaultModel;return f.jsxs("div",{ref:m,className:"relative",children:[f.jsxs("button",{type:"button",onClick:()=>d(v=>!v),disabled:l,className:"flex items-center gap-1 rounded-md px-1.5 py-1 text-[11px] text-zinc-400 transition hover:bg-zinc-800/60 hover:text-zinc-200 disabled:opacity-50","aria-label":"Switch agent model","aria-haspopup":"listbox","aria-expanded":c,title:n?`${n.label} · ${n.defaultModel}`:"Pick a provider",children:[f.jsx("span",{className:"font-medium text-zinc-200",children:g}),b&&f.jsx("span",{className:"hidden font-mono text-[10px] text-zinc-500 sm:inline",children:b}),f.jsx(zk,{className:"h-3 w-3","aria-hidden":"true"})]}),c&&f.jsxs("div",{role:"listbox",className:"absolute right-0 top-full z-50 mt-1 w-64 overflow-hidden rounded-lg border border-zinc-800 bg-zinc-950 shadow-xl",children:[f.jsx("div",{className:"border-b border-zinc-800/60 px-3 py-2 text-[10px] uppercase tracking-wider text-zinc-500",children:"Aero provider"}),f.jsx("ul",{className:"max-h-72 overflow-y-auto py-1",children:e.map(v=>{const S=n?.id===v.id,w=i===v.id;return f.jsx("li",{children:f.jsxs("button",{type:"button",role:"option","aria-selected":S,disabled:!v.configured,onClick:()=>{v.configured&&(r(w?null:v.id),d(!1))},className:"flex w-full items-start gap-2 px-3 py-2 text-left text-xs transition enabled:hover:bg-zinc-900 disabled:cursor-not-allowed disabled:opacity-50",children:[f.jsx("span",{className:"mt-0.5 flex h-3.5 w-3.5 shrink-0 items-center justify-center",children:S?f.jsx(vv,{className:"h-3 w-3 text-emerald-400","aria-hidden":"true"}):null}),f.jsxs("span",{className:"flex-1",children:[f.jsxs("span",{className:"flex items-center gap-1.5",children:[f.jsx("span",{className:"font-medium text-zinc-100",children:v.label}),w&&f.jsx("span",{className:"rounded-full border border-emerald-800/60 bg-emerald-950/60 px-1.5 text-[9px] uppercase tracking-wider text-emerald-300",children:"Pinned"}),!v.configured&&f.jsx("span",{className:"rounded-full border border-zinc-800 px-1.5 text-[9px] uppercase tracking-wider text-zinc-500",children:"Key missing"})]}),f.jsx("span",{className:"mt-0.5 block font-mono text-[10px] text-zinc-500",children:v.defaultModel}),v.keySource==="env"&&f.jsx("span",{className:"mt-0.5 block text-[10px] text-zinc-600",children:"via env var"}),!v.configured&&f.jsxs("span",{className:"mt-0.5 block text-[10px] text-zinc-600",children:["Add key in config.yaml or export"," ",f.jsx("code",{className:"font-mono text-zinc-400",children:J3(v.id)})]})]})]})},v.id)})}),i&&f.jsx("button",{type:"button",onClick:()=>{r(null),d(!1)},className:"w-full border-t border-zinc-800/60 px-3 py-2 text-left text-[11px] text-zinc-400 transition hover:bg-zinc-900 hover:text-zinc-100",children:"Reset to auto-detected default"})]})]})}function Y3({projectName:e,activeProvider:n,scope:i,onToggleScope:r,disabled:l}){const c=n?.label.replace(/\s+\(.+\)$/,"")??null,d=i==="all";return f.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 border-t border-zinc-800/70 bg-zinc-950/80 px-3 pt-2",children:[f.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-zinc-800 bg-zinc-900/70 px-2 py-0.5 text-[10px] text-zinc-400",children:[f.jsx("span",{className:"text-zinc-600",children:"project"}),f.jsx("span",{className:"font-medium text-zinc-200",children:e})]}),c&&f.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-zinc-800 bg-zinc-900/70 px-2 py-0.5 text-[10px] text-zinc-400",children:[f.jsx("span",{className:"text-zinc-600",children:"model"}),f.jsx("span",{className:"font-medium text-zinc-200",children:c})]}),f.jsxs("button",{type:"button",onClick:r,disabled:l,className:`inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-[10px] transition disabled:opacity-50 ${d?"border-amber-800/60 bg-amber-950/40 text-amber-300 hover:border-amber-700 hover:text-amber-200":"border-zinc-800 bg-zinc-900/70 text-zinc-400 hover:border-zinc-700 hover:text-zinc-200"}`,title:d?"Aero can invoke write tools (run sweep, dismiss insight, etc). Click to restrict.":"Aero is restricted to read-only tools. Click to allow writes.",children:[f.jsx("span",{className:d?"text-amber-500":"text-zinc-600",children:"scope"}),f.jsx("span",{className:"font-medium",children:d?"all tools":"read-only"})]})]})}function X3({matches:e,selectedIndex:n,onHover:i,onPick:r}){return f.jsxs("div",{className:"absolute inset-x-3 bottom-full mb-2 overflow-hidden rounded-lg border border-zinc-800 bg-zinc-950/98 shadow-2xl",children:[f.jsx("div",{className:"border-b border-zinc-800/60 px-3 py-1.5 text-[10px] uppercase tracking-wider text-zinc-500",children:"Commands"}),f.jsx("ul",{role:"listbox",className:"max-h-72 overflow-y-auto py-1",children:e.map((l,c)=>{const d=c===n;return f.jsx("li",{children:f.jsxs("button",{type:"button",role:"option","aria-selected":d,onMouseEnter:()=>i(c),onClick:()=>r(l),className:`flex w-full items-center gap-3 px-3 py-1.5 text-left text-xs transition ${d?"bg-zinc-900 text-zinc-100":"text-zinc-300 hover:bg-zinc-900/60"}`,children:[f.jsx("span",{className:"font-mono text-[11px] text-emerald-400",children:l.command}),f.jsx("span",{className:"font-medium",children:l.label}),f.jsx("span",{className:"ml-auto text-[10px] text-zinc-500",children:l.hint})]})},l.command)})}),f.jsxs("div",{className:"border-t border-zinc-800/60 px-3 py-1.5 text-[10px] text-zinc-600",children:[f.jsx("span",{className:"mr-3",children:"↑↓ to select"}),f.jsx("span",{className:"mr-3",children:"Enter to run"}),f.jsx("span",{children:"Tab to autocomplete"})]})]})}function J3(e){switch(e){case"claude":return"ANTHROPIC_API_KEY";case"openai":return"OPENAI_API_KEY";case"gemini":return"GOOGLE_API_KEY";case"zai":return"ZAI_API_KEY"}}function F3(e,n){const i=e.timestamp??0;return`${e.role}:${i}:${n}`}function W3(e,n,i,r){const l=[];for(let c=0;c<e.length;c++){const d=e[c],m=F3(d,c);if(d.role==="user"){const g=typeof d.content=="string"?d.content:JSON.stringify(d.content);if(g.startsWith("[system]"))continue;l.push(f.jsx(eD,{text:g,projectName:n,providerOverride:i,scope:r},m));continue}if(d.role==="assistant"){const g=new Map;let b=c+1;for(;b<e.length&&e[b].role==="toolResult";){const w=e[b];g.set(w.toolCallId,w),b++}const v=nD(d,g,d.timestamp??0),S=a1(d);l.push(f.jsxs(U.Fragment,{children:[v.length>0&&f.jsx("div",{className:"mt-3 space-y-1.5",children:v.map(w=>f.jsx(i1,{trail:w},w.id))}),S.trim()&&f.jsxs("div",{className:"mt-3",children:[f.jsx("div",{className:"mb-0.5 text-[10px] uppercase tracking-wider text-emerald-400",children:"Aero"}),f.jsx(s1,{content:S})]})]},m)),c=b-1;continue}}return l}function eD({text:e,projectName:n,providerOverride:i,scope:r}){const[l,c]=U.useState(!1),d=U.useMemo(()=>tD(n,e,i,r),[n,e,i,r]);async function m(){try{await navigator.clipboard.writeText(d),c(!0),window.setTimeout(()=>c(!1),1500)}catch{}}return f.jsxs("div",{className:"group relative mt-3 rounded-md bg-zinc-900/60 px-3 py-2 text-zinc-200",children:[f.jsxs("div",{className:"flex items-center justify-between gap-2",children:[f.jsx("div",{className:"text-[10px] uppercase tracking-wider text-zinc-500",children:"You"}),f.jsx("button",{type:"button",onClick:xn(m),className:"inline-flex items-center gap-1 rounded border border-zinc-800/70 bg-zinc-950/60 px-1.5 py-0.5 text-[10px] text-zinc-400 opacity-0 transition hover:border-zinc-700 hover:text-zinc-100 group-hover:opacity-100 focus:opacity-100","aria-label":"Copy as CLI command",title:d,children:l?f.jsxs(f.Fragment,{children:[f.jsx(vv,{className:"h-2.5 w-2.5 text-emerald-400","aria-hidden":"true"}),"Copied"]}):f.jsxs(f.Fragment,{children:[f.jsx(Ek,{className:"h-2.5 w-2.5","aria-hidden":"true"}),"Copy as CLI"]})})]}),f.jsx("div",{className:"whitespace-pre-wrap",children:e})]})}function tD(e,n,i,r){const l=["canonry","agent","ask",Db(e),Db(n)];return i&&l.push("--provider",i),r==="read-only"&&l.push("--scope","read-only"),l.join(" ")}function Db(e){return`'${e.replace(/'/g,"'\\''")}'`}function nD(e,n,i){const r=[];for(const l of e.content){if(l.type!=="toolCall")continue;const c=l,d=n.get(c.id);r.push({id:c.id,name:c.name,args:c.arguments,startedAt:i,endedAt:d?.timestamp,isError:d?.isError,result:d?.content})}return r}function i1({trail:e}){const[n,i]=U.useState(!1),r=e.endedAt===void 0,l=!r&&e.isError===!0,c=e.endedAt!=null?e.endedAt-e.startedAt:null,d=c==null||c<0?null:c<1e3?`${c}ms`:`${(c/1e3).toFixed(1)}s`,m=l?"border-rose-800/50":r?"border-emerald-800/50":"border-zinc-800/70",g=l?"bg-rose-950/20":r?"bg-emerald-950/20":"bg-zinc-900/40";return f.jsxs("div",{className:`rounded-md border ${m} ${g} font-mono`,children:[f.jsxs("button",{type:"button",onClick:()=>i(b=>!b),className:"flex w-full items-center gap-2 px-2.5 py-1.5 text-left","aria-expanded":n,children:[f.jsx("span",{className:"flex h-3.5 w-3.5 shrink-0 items-center justify-center",children:r?f.jsx(Ik,{className:"h-3 w-3 animate-spin text-emerald-400","aria-hidden":"true"}):l?f.jsx(xv,{className:"h-3 w-3 text-rose-400","aria-hidden":"true"}):f.jsx(c2,{className:"h-3 w-3 text-zinc-500","aria-hidden":"true"})}),f.jsx("span",{className:"text-[11px] font-semibold text-zinc-100",children:e.name}),f.jsxs("span",{className:"ml-auto flex items-center gap-2 text-[10px] text-zinc-500",children:[r?f.jsx("span",{className:"text-emerald-400",children:"running…"}):f.jsxs(f.Fragment,{children:[f.jsx("span",{children:l?"failed":"ok"}),d&&f.jsx("span",{children:d})]}),f.jsx(Uf,{className:`h-3 w-3 transition-transform ${n?"rotate-90":""}`,"aria-hidden":"true"})]})]}),n&&f.jsxs("div",{className:"border-t border-zinc-800/60 px-2.5 py-2 text-[11px] text-zinc-400",children:[f.jsx("div",{className:"mb-1 text-[9px] uppercase tracking-wider text-zinc-600",children:"Args"}),f.jsx("pre",{className:"mb-2 overflow-x-auto whitespace-pre-wrap break-all text-[10px] text-zinc-300",children:Rb(e.args)}),!r&&e.result!==void 0&&f.jsxs(f.Fragment,{children:[f.jsx("div",{className:"mb-1 text-[9px] uppercase tracking-wider text-zinc-600",children:l?"Error":"Result"}),f.jsx("pre",{className:"overflow-x-auto whitespace-pre-wrap break-all text-[10px] text-zinc-300",children:Rb(e.result)})]})]})]})}function Rb(e){try{const n=typeof e=="string"?e:JSON.stringify(e,null,2);return n.length>2e3?`${n.slice(0,2e3)}
64
+ … (${n.length-2e3} more chars)`:n}catch{return String(e)}}function s1({content:e}){return f.jsx("div",{className:"aero-markdown text-zinc-100",children:f.jsx(hw,{components:{h1:n=>f.jsx("h1",{...n,className:"mt-3 mb-2 text-base font-semibold text-zinc-50"}),h2:n=>f.jsx("h2",{...n,className:"mt-3 mb-2 text-sm font-semibold text-zinc-50"}),h3:n=>f.jsx("h3",{...n,className:"mt-3 mb-1.5 text-sm font-semibold text-zinc-100"}),h4:n=>f.jsx("h4",{...n,className:"mt-2 mb-1 text-xs font-semibold uppercase tracking-wide text-zinc-300"}),p:n=>f.jsx("p",{...n,className:"mb-2 leading-relaxed"}),ul:n=>f.jsx("ul",{...n,className:"mb-2 ml-4 list-disc space-y-1"}),ol:n=>f.jsx("ol",{...n,className:"mb-2 ml-4 list-decimal space-y-1"}),li:n=>f.jsx("li",{...n,className:"marker:text-zinc-600"}),strong:n=>f.jsx("strong",{...n,className:"font-semibold text-zinc-50"}),em:n=>f.jsx("em",{...n,className:"text-zinc-200"}),code:({children:n,...i})=>f.jsx("code",{...i,className:"rounded bg-zinc-800/70 px-1 py-0.5 font-mono text-[12px] text-emerald-200",children:n}),pre:n=>f.jsx("pre",{...n,className:"mb-2 overflow-x-auto rounded-md border border-zinc-800 bg-zinc-900/70 p-3 font-mono text-xs text-zinc-200"}),a:n=>f.jsx("a",{...n,className:"text-emerald-400 underline decoration-emerald-700 hover:decoration-emerald-400",target:"_blank",rel:"noopener noreferrer"}),table:n=>f.jsx("div",{className:"mb-2 overflow-x-auto",children:f.jsx("table",{...n,className:"w-full border-collapse text-xs"})}),thead:n=>f.jsx("thead",{...n,className:"border-b border-zinc-800"}),th:n=>f.jsx("th",{...n,className:"px-2 py-1 text-left font-semibold text-zinc-300"}),tr:n=>f.jsx("tr",{...n,className:"border-b border-zinc-900"}),td:n=>f.jsx("td",{...n,className:"px-2 py-1 text-zinc-200"}),blockquote:n=>f.jsx("blockquote",{...n,className:"mb-2 border-l-2 border-zinc-700 pl-3 italic text-zinc-400"}),hr:()=>f.jsx("hr",{className:"my-3 border-zinc-800"})},children:e})})}function aD(){return f.jsxs("div",{className:"mt-3 flex items-center gap-2",children:[f.jsx("div",{className:"text-[10px] uppercase tracking-wider text-emerald-400",children:"Aero"}),f.jsxs("div",{className:"flex items-center gap-1","aria-label":"Aero is thinking",children:[f.jsx("span",{className:"aero-dot h-1.5 w-1.5 rounded-full bg-emerald-400/80"}),f.jsx("span",{className:"aero-dot aero-dot-2 h-1.5 w-1.5 rounded-full bg-emerald-400/60"}),f.jsx("span",{className:"aero-dot aero-dot-3 h-1.5 w-1.5 rounded-full bg-emerald-400/40"})]})]})}function iD(){const e=Yb(),n=/^\/projects\/([^/]+)/.exec(e.pathname),i=n?decodeURIComponent(n[1]):null,r=cn({...op({client:ae}),enabled:i!==null,staleTime:6e4});if(!i)return null;const l=r.data??[],c=l.find(d=>d.id===i)??l.find(d=>d.name===i);return c?f.jsx(K3,{projectName:c.name},c.name):null}function Fr(e,n){e.invalidateQueries({predicate:i=>{const r=i.queryKey[0];return typeof r?._id=="string"&&r._id.startsWith(n)}})}function wc(e,n,i){switch(e.invalidateQueries({queryKey:lp({client:ae})}),e.invalidateQueries({queryKey:Ks({client:ae})}),n){case Ee["answer-visibility"]:case Ee["site-audit"]:case Ee["backlink-extract"]:return;case Ee["gsc-sync"]:case Ee["inspect-sitemap"]:Fr(e,"getApiV1ProjectsByNameGoogleGsc");return;case Ee["ga-sync"]:Fr(e,"getApiV1ProjectsByNameGa");return;case Ee["traffic-sync"]:Fr(e,"getApiV1ProjectsByNameGa"),Fr(e,"getApiV1ProjectsByNameTraffic");return;case Ee["bing-inspect"]:case Ee["bing-inspect-sitemap"]:Fr(e,"getApiV1ProjectsByNameBing");return;case Ee["aeo-discover-seed"]:case Ee["aeo-discover-probe"]:return;default:return n}}const Mb=[{label:"GitHub",href:"https://github.com/AINYC/canonry",Icon:Mk},{label:"Docs",href:"https://github.com/AINYC/canonry/tree/main/docs",Icon:kk},{label:"Changelog",href:"https://github.com/AINYC/canonry/releases",Icon:Dk}],Bb=e=>({label:e,state:"checking",detail:"Checking service health"}),sD={apiStatus:Bb("API"),workerStatus:Bb("Worker")};function rD(e){switch(e){case Ee["answer-visibility"]:return"Visibility sweep";case Ee["gsc-sync"]:return"GSC sync";case Ee["inspect-sitemap"]:return"Sitemap inspection";case Ee["ga-sync"]:return"GA sync";case Ee["traffic-sync"]:return"Traffic sync";case Ee["bing-inspect"]:return"Bing URL inspection";case Ee["bing-inspect-sitemap"]:return"Bing sitemap inspection";case Ee["site-audit"]:return"Site audit";case Ee["backlink-extract"]:return"Backlink extract";case Ee["aeo-discover-seed"]:return"Discovery (seed phase)";case Ee["aeo-discover-probe"]:return"Discovery (probe phase)"}}function oD(e){return e==="completed"?"positive":e==="partial"?"caution":"negative"}function lD(e){const n=rD(e.kind);return e.status==="completed"?`${n} completed`:e.status==="partial"?`${n} completed with partial results`:e.status==="cancelled"?`${n} cancelled`:`${n} failed`}function cD(e,n){return e.error?`${n}: ${Yf(e.error)}`:e.location?`${n} · ${e.location}`:n}function uD(e,n,i){if(n)return n;const r=i.find(l=>l.id===e);return r?.displayName||r?.name||e}function dD(e,n){return[e.completed>0?`${e.completed} completed`:null,e.partial>0?`${e.partial} partial`:null,e.failed>0?`${e.failed} failed`:null,e.cancelled>0?`${e.cancelled} cancelled`:null,n>0?`${n} skipped at queue time`:null].filter(Boolean).join(", ")}function fD(e){return e.failed>0||e.cancelled>0?"negative":e.partial>0?"caution":"positive"}function pD(){const e=Ka(),n=U.useSyncExternalStore(JO,Ni,Ni),i=Object.keys(n.runs).length>0||Object.keys(n.batches).length>0,r=cn({...cp({client:ae}),enabled:i,staleTime:io,refetchInterval:3e3}),l=cn({...op({client:ae}),enabled:i}),c=U.useRef({}),d=U.useCallback(()=>{r.refetch()},[r.refetch]);return U.useEffect(()=>{i&&d()},[i,d]),U.useEffect(()=>{if(!i||typeof window>"u")return;const m=()=>{document.visibilityState==="visible"&&d()};return window.addEventListener("focus",d),document.addEventListener("visibilitychange",m),()=>{window.removeEventListener("focus",d),document.removeEventListener("visibilitychange",m)}},[i,d]),U.useEffect(()=>{const m=r.data??[],g=l.data??[],b=Object.fromEntries(m.map(S=>[S.id,S])),v=Object.fromEntries(m.map(S=>[S.id,S.status]));for(const S of Object.values(n.runs)){const w=b[S.runId];if(!w||!e4(w.status)||(c.current[w.id]??S.lastAnnouncedStatus)===w.status)continue;const C=g.find(T=>T.id===w.projectId);if(C&&wc(e,w.kind,C.name),S.sourceAction==="run-all"){gb(w.id);continue}const N=uD(w.projectId,S.projectLabel,g);un({title:lD(w),detail:cD(w,N),tone:oD(w.status),dedupeKey:`run:${w.id}`,dedupeMode:"replace",cta:{label:"View run",intent:"open-run-drawer",runId:w.id}}),gb(w.id)}for(const S of Object.values(n.batches)){const w=t4(S.runIds,b);w.finished&&(un({title:"Run-all batch finished",detail:dD(w,S.skippedCount),tone:fD(w),dedupeKey:`batch:${S.batchId}`,dedupeMode:"replace",cta:{label:"View runs",intent:"go-to-runs"}}),WO(S.batchId))}c.current=v},[l.data,r.data,n,e]),null}function mD(){const e=uo(),{dashboard:n,isLoading:i,refetch:r}=xc(),d=mp(!e,e?.health).data??e?.health??sD,m=Yb(),{runId:g,evidenceId:b,closeDrawer:v}=hp(),[S,w]=U.useState(!1),[_,C]=U.useState(()=>{if(typeof window>"u")return null;try{return window.localStorage.getItem("canonry:dismissedUpdateVersion")}catch{return null}}),[N]=U.useState(()=>typeof window>"u"?null:new URLSearchParams(window.location.search).get("force-update")),T=N?{current:d.apiStatus.version??"0.0.0",latest:N,url:"https://www.npmjs.com/package/@ainyc/canonry",upgradeCommand:"npm install -g @ainyc/canonry"}:d.apiStatus.updateAvailable,R=T&&T.latest!==_,G=()=>{if(T){try{window.localStorage.setItem("canonry:dismissedUpdateVersion",T.latest)}catch{}C(T.latest)}},H=q3(g),K=H.data??null,X=H.isLoading;U.useEffect(()=>{K&&K.status!=="running"&&K.status!=="queued"&&r()},[K?.status,r]),U.useEffect(()=>{w(!1)},[m.pathname]),U.useEffect(()=>{if(typeof window>"u"||!g&&!b)return;const re=pe=>{pe.key==="Escape"&&v()};return window.addEventListener("keydown",re),()=>{window.removeEventListener("keydown",re)}},[g,b,v]);const J=n??e?.dashboard??null,D=m.pathname==="/setup"&&J!==null&&J.portfolioOverview.projects.length===0,M=g&&J?d3(J,g):void 0,oe=U.useMemo(()=>m.pathname.match(/^\/projects\/([^/]+)/)?.[1]??null,[m.pathname]),Ne=U.useMemo(()=>!oe||!J?null:J.projects.find(re=>re.project.id===oe)?.project.name??null,[oe,J]),{commandCenter:Ae}=M3(Ne),ve=U.useMemo(()=>{if(b)return p3(Ae,J,b)},[b,Ae,J]),et=(()=>{const re=m.pathname;if(re==="/")return"Portfolio";if(re==="/projects")return"Projects";if(re==="/runs")return"Runs";if(re==="/settings")return"Settings";if(re==="/setup")return"Setup";if(re==="/backlinks")return"Backlinks";if(re==="/traffic"||re.startsWith("/traffic/"))return"Server traffic";if(re.startsWith("/projects/")){const $=re.split("/").filter(Boolean)[1];if($&&J){const F=J.projects.find(de=>de.project.id===$);if(F)return F.project.name}return"Project"}return"Not found"})();return f.jsxs("div",{className:`app-shell ${D?"app-shell-focus":""}`,children:[f.jsx("a",{className:"skip-link",href:"#content",children:"Skip to content"}),!D&&f.jsxs("aside",{className:"sidebar","aria-label":"Primary navigation",children:[f.jsx("div",{className:"sidebar-brand",children:f.jsx(kb,{version:d.apiStatus.version,updateAvailable:R?T:null,onDismissUpdate:G})}),f.jsxs("nav",{className:"sidebar-nav",children:[f.jsxs(rt,{to:"/",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!0},children:[f.jsx($k,{className:"sidebar-icon"}),f.jsx("span",{children:"Overview"})]}),f.jsxs(rt,{to:"/projects",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!1},children:[f.jsx(Lk,{className:"sidebar-icon"}),f.jsx("span",{children:"Projects"})]}),f.jsxs(rt,{to:"/runs",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!0},children:[f.jsx(Jk,{className:"sidebar-icon"}),f.jsx("span",{children:"Runs"})]}),f.jsxs(rt,{to:"/traffic",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!1},children:[f.jsx(e2,{className:"sidebar-icon"}),f.jsx("span",{children:"Server traffic"})]}),f.jsxs(rt,{to:"/backlinks",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!0},children:[f.jsx(Vk,{className:"sidebar-icon"}),f.jsx("span",{children:"Backlinks"})]}),f.jsxs(rt,{to:"/settings",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!0},children:[f.jsx(s2,{className:"sidebar-icon"}),f.jsx("span",{children:"Settings"})]}),i?f.jsxs(f.Fragment,{children:[f.jsx("p",{className:"sidebar-section-title",children:"Projects"}),[1,2,3].map(re=>f.jsxs("div",{className:"sidebar-skeleton-item",children:[f.jsx("span",{className:"skeleton-circle size-2"}),f.jsx("span",{className:"skeleton-text flex-1",style:{width:`${50+re*15}%`}})]},re))]}):J&&J.projects.length>0?f.jsxs(f.Fragment,{children:[f.jsx("p",{className:"sidebar-section-title",children:"Projects"}),J.projects.map(re=>{const pe=re.visibilitySummary.tone;return f.jsxs(rt,{to:"/projects/$projectId",params:{projectId:re.project.id},className:"sidebar-project",activeProps:{className:"sidebar-project sidebar-project-active"},children:[f.jsx("span",{className:`sidebar-dot sidebar-dot-${pe}`}),f.jsx("span",{children:re.project.displayName||re.project.name})]},re.project.id)})]}):i?null:f.jsxs(f.Fragment,{children:[f.jsx("p",{className:"sidebar-section-title",children:"Resources"}),f.jsxs(rt,{to:"/setup",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!0},children:[f.jsx(n2,{className:"sidebar-icon"}),f.jsx("span",{children:"Setup"})]})]})]}),f.jsx("div",{className:"sidebar-footer",children:Mb.map(({label:re,href:pe,Icon:$})=>f.jsx("a",{className:"sidebar-footer-icon",href:pe,target:"_blank",rel:"noopener noreferrer",title:re,"aria-label":re,children:f.jsx($,{className:"size-4"})},pe))})]}),f.jsxs("div",{className:"main-area",children:[f.jsxs("header",{className:"topbar",children:[f.jsxs("div",{className:"topbar-left",children:[f.jsx("div",{className:"topbar-brand-mobile",children:f.jsx(kb,{compact:!0})}),f.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[f.jsx(rt,{to:"/",children:"Home"}),f.jsx(Uf,{className:"breadcrumb-sep size-3"}),f.jsx("span",{className:"breadcrumb-current",children:et})]})]}),f.jsxs("div",{className:"topbar-actions",children:[f.jsxs("div",{className:"health-pill-row",children:[f.jsxs("span",{className:`health-pill health-pill-${d.apiStatus.state}`,title:$s(d.apiStatus),children:["API ",d.apiStatus.state==="ok"?"ok":d.apiStatus.state]}),f.jsxs("span",{className:`health-pill health-pill-${d.workerStatus.state}`,title:$s(d.workerStatus),children:["Worker ",d.workerStatus.state==="ok"?"ok":d.workerStatus.state]})]}),f.jsxs(Le,{className:"nav-toggle",variant:"secondary",size:"icon",type:"button","aria-expanded":S,"aria-controls":"mobile-nav",onClick:()=>w(re=>!re),children:[f.jsx(Kk,{className:"size-4"}),f.jsx("span",{className:"sr-only",children:"Open navigation"})]})]})]}),f.jsxs("div",{id:"mobile-nav",className:`mobile-nav ${S?"mobile-nav-open":""}`,children:[f.jsxs(Le,{className:"mobile-nav-close",variant:"ghost",size:"icon",type:"button",onClick:()=>w(!1),children:[f.jsx(Hs,{className:"size-5"}),f.jsx("span",{className:"sr-only",children:"Close navigation"})]}),f.jsx(rt,{to:"/",className:"mobile-nav-link",activeProps:{className:"mobile-nav-link mobile-nav-link-active"},activeOptions:{exact:!0},children:"Overview"}),f.jsx(rt,{to:"/projects",className:"mobile-nav-link",activeProps:{className:"mobile-nav-link mobile-nav-link-active"},activeOptions:{exact:!1},children:"Projects"}),f.jsx(rt,{to:"/runs",className:"mobile-nav-link",activeProps:{className:"mobile-nav-link mobile-nav-link-active"},activeOptions:{exact:!0},children:"Runs"}),f.jsx(rt,{to:"/traffic",className:"mobile-nav-link",activeProps:{className:"mobile-nav-link mobile-nav-link-active"},activeOptions:{exact:!1},children:"Server traffic"}),f.jsx(rt,{to:"/settings",className:"mobile-nav-link",activeProps:{className:"mobile-nav-link mobile-nav-link-active"},activeOptions:{exact:!0},children:"Settings"}),J&&J.projects.length>0?f.jsxs("div",{className:"mobile-nav-section",children:[f.jsx("p",{className:"mobile-nav-section-title",children:"Projects"}),J.projects.map(re=>f.jsx(rt,{to:"/projects/$projectId",params:{projectId:re.project.id},className:"mobile-nav-link",children:re.project.name},re.project.id))]}):null]}),f.jsx("main",{id:"content",className:"page-shell",children:i&&!e?f.jsxs("div",{className:"page-skeleton",children:[f.jsxs("div",{className:"page-skeleton-header",children:[f.jsx("div",{className:"skeleton-text h-6 w-40"}),f.jsx("div",{className:"skeleton-text-sm w-72"})]}),f.jsx("div",{className:"page-skeleton-grid",children:[1,2,3].map(re=>f.jsxs("div",{className:"page-skeleton-card",children:[f.jsx("div",{className:"skeleton-text w-24"}),f.jsx("div",{className:"skeleton-text w-full"}),f.jsx("div",{className:"skeleton-text-sm w-3/4"})]},re))}),f.jsx("div",{className:"page-skeleton-grid",style:{gridTemplateColumns:"1fr 1fr"},children:[1,2].map(re=>f.jsxs("div",{className:"page-skeleton-card",children:[f.jsx("div",{className:"skeleton-text w-20"}),f.jsx("div",{className:"space-y-2",children:[1,2,3].map(pe=>f.jsx("div",{className:"skeleton-text-sm w-full"},pe))})]},re))})]}):f.jsx(Xb,{})}),f.jsxs("footer",{className:"footer",children:[f.jsxs("span",{className:"footer-brand",children:[f.jsx("span",{children:f.jsx("a",{href:"https://canonry.ai",children:"Canonry"})}),d.apiStatus.version&&d.apiStatus.version!=="unknown"?f.jsxs("span",{className:"footer-version",children:["v",d.apiStatus.version]}):null]}),f.jsx("div",{className:"footer-links",children:Mb.map(({label:re,href:pe,Icon:$})=>f.jsx("a",{href:pe,target:"_blank",rel:"noopener noreferrer",title:re,"aria-label":re,className:"footer-icon",children:f.jsx($,{className:"size-3.5"})},pe))})]})]}),M?f.jsxs(t3,{open:!0,title:M.summary,subtitle:`${M.projectName} · ${M.kindLabel}`,onClose:v,children:[f.jsxs("div",{className:"flex flex-wrap items-center gap-x-5 gap-y-1 text-sm",children:[f.jsx(fp,{status:M.status}),f.jsx("span",{className:"text-zinc-400",children:M.startedAt}),f.jsx("span",{className:"text-zinc-500",children:M.duration}),f.jsx("span",{className:"text-zinc-600",children:M.triggerLabel})]}),M.status==="failed"&&M.statusDetail&&f.jsx("p",{className:"text-sm text-rose-300/80 mt-2",children:M.statusDetail}),f.jsxs("div",{className:"mt-4",children:[f.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-zinc-500 mb-2",children:"Activity Log"}),X?f.jsx("p",{className:"text-sm text-zinc-500",children:"Loading run details..."}):K?.snapshots&&K.snapshots.length>0?f.jsxs("div",{className:"space-y-2",children:[K.snapshots.map(re=>f.jsxs("div",{className:"rounded-lg border border-zinc-800/60 bg-zinc-900/30 p-3",children:[f.jsxs("div",{className:"flex items-center justify-between gap-2 mb-1",children:[f.jsx("p",{className:"text-sm font-medium text-zinc-200 truncate",children:re.query??"Unknown query"}),f.jsxs("div",{className:"flex items-center gap-1.5",children:[f.jsx(Q4,{provider:re.provider}),f.jsx(K0,{variant:re.citationState===ic.cited?"success":"neutral",children:re.citationState})]})]}),re.model&&f.jsx("p",{className:"text-[11px] text-zinc-500 font-mono",children:re.model}),re.citedDomains.length>0&&f.jsxs("p",{className:"text-xs text-zinc-500 mt-1",children:[f.jsx("span",{className:"text-zinc-400",children:"Sources:"})," ",re.citedDomains.join(", ")]}),re.competitorOverlap.length>0&&f.jsxs("p",{className:"text-xs text-rose-400/80 mt-0.5",children:["Competitor cited: ",re.competitorOverlap.join(", ")]}),re.groundingSources&&re.groundingSources.length>0&&f.jsxs("details",{className:"mt-2",children:[f.jsxs("summary",{className:"text-xs text-zinc-500 cursor-pointer hover:text-zinc-400",children:[re.groundingSources.length," grounding source",re.groundingSources.length!==1?"s":""]}),f.jsx("ul",{className:"mt-1 space-y-0.5",children:re.groundingSources.map((pe,$)=>f.jsx("li",{className:"text-xs text-zinc-500 truncate",children:f.jsx("a",{href:pe.uri,target:"_blank",rel:"noopener noreferrer",className:"hover:text-zinc-300",children:pe.title||pe.uri})},$))})]}),re.answerText&&f.jsxs("details",{className:"mt-1",children:[f.jsx("summary",{className:"text-xs text-zinc-500 cursor-pointer hover:text-zinc-400",children:"Answer preview"}),f.jsx("p",{className:"mt-1 text-xs text-zinc-400 leading-relaxed whitespace-pre-wrap",children:re.answerText})]})]},re.id)),K.status==="running"&&f.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-zinc-500",children:[f.jsx("span",{className:"inline-block h-2 w-2 rounded-full bg-amber-500 animate-pulse"}),"Running remaining queries..."]})]}):K&&K.status==="running"?f.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-zinc-500",children:[f.jsx("span",{className:"inline-block h-2 w-2 rounded-full bg-amber-500 animate-pulse"}),"Waiting for first query result..."]}):K&&K.status==="queued"?f.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-zinc-500",children:[f.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?f.jsxs("div",{className:"rounded-lg border border-rose-800/40 bg-rose-950/20 p-3",children:[f.jsx("p",{className:"text-sm font-medium text-rose-300 mb-2",children:"Run failed"}),f.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:oO(K.error)})]}):f.jsx("p",{className:"text-sm text-zinc-500",children:"No snapshot data available."})]})]}):null,ve?f.jsx(s3,{evidence:ve.evidence,project:ve.project,onClose:v}):null,f.jsx(pD,{}),f.jsx(V3,{}),f.jsx(iD,{})]})}class hD extends U.Component{state={error:null};static getDerivedStateFromError(n){return{error:n}}componentDidCatch(n,i){console.error("[ErrorBoundary]",n,i.componentStack)}handleReset=()=>{this.setState({error:null})};render(){return this.state.error?f.jsx("div",{className:"page-container",children:f.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 py-20 text-center",children:[f.jsx("div",{className:"rounded-full bg-rose-950/40 p-3",children:f.jsx(xv,{className:"size-6 text-rose-400"})}),f.jsx("h2",{className:"text-lg font-semibold text-zinc-100",children:"Something went wrong"}),f.jsx("p",{className:"text-sm text-zinc-400 max-w-md",children:this.state.error.message||"An unexpected error occurred while rendering this page."}),f.jsxs("div",{className:"flex gap-3 mt-2",children:[f.jsxs(Le,{variant:"secondary",size:"sm",onClick:this.handleReset,children:[f.jsx(Sv,{className:"size-3.5 mr-1.5"}),"Try again"]}),f.jsx(Le,{variant:"secondary",size:"sm",onClick:()=>{const n=window.__CANONRY_CONFIG__?.basePath?.replace(/\/$/,"")??"";window.location.href=n||"/"},children:"Go home"})]})]})}):this.props.children}}const wn=U.forwardRef(({className:e,...n},i)=>f.jsx("div",{ref:i,className:_n("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}));wn.displayName="Card";const Nf=U.forwardRef(({className:e,...n},i)=>f.jsx("div",{ref:i,className:_n("flex flex-col gap-1.5 p-5",e),...n}));Nf.displayName="CardHeader";const kf=U.forwardRef(({className:e,...n},i)=>f.jsx("h3",{ref:i,className:_n("font-medium tracking-tight text-zinc-50",e),...n}));kf.displayName="CardTitle";const Af=U.forwardRef(({className:e,...n},i)=>f.jsx("p",{ref:i,className:_n("text-sm text-zinc-500",e),...n}));Af.displayName="CardDescription";const Ql=U.forwardRef(({className:e,...n},i)=>f.jsx("div",{ref:i,className:_n("p-5 pt-0",e),...n}));Ql.displayName="CardContent";function gD({points:e,tone:n}){const i=U.useId();if(e.length===0)return null;const r=42,l=132,c=5,d=Math.min(...e),g=Math.max(...e)-d||1,b=l-c*2,v=r-c*2,S=e.map((w,_)=>{const C=c+_/Math.max(e.length-1,1)*b,N=c+(1-(w-d)/g)*v;return`${C},${N}`}).join(" ");return f.jsxs("svg",{className:`sparkline sparkline-${n}`,viewBox:`0 0 ${l} ${r}`,"aria-hidden":"true",children:[f.jsx("defs",{children:f.jsx("clipPath",{id:i,children:f.jsx("rect",{x:c,y:c,width:b,height:v,rx:"8"})})}),f.jsx("line",{className:"sparkline-guide",x1:c,x2:l-c,y1:r-c,y2:r-c}),f.jsx("polyline",{clipPath:`url(#${i})`,points:S,vectorEffect:"non-scaling-stroke"})]})}function yD({project:e}){return f.jsxs(rt,{to:"/projects/$projectId",params:{projectId:e.project.id},className:"project-row cursor-pointer",children:[f.jsxs("div",{className:"project-row-primary",children:[f.jsxs("div",{children:[f.jsx("p",{className:"project-name",children:e.project.name}),f.jsx("p",{className:"project-domain",children:e.project.canonicalDomain})]}),f.jsx("p",{className:"project-insight",children:e.insight})]}),f.jsx("div",{className:"project-row-stat",children:f.jsxs("div",{className:"metric-inline-block",children:[f.jsx("p",{className:"metric-inline-label",children:"Answer Visibility"}),f.jsx("p",{className:`metric-inline-value ${e.visibilityTone==="caution"?"text-amber-400":""}`,children:e.visibilityScore}),f.jsx("p",{className:"metric-inline-delta",children:e.visibilityDelta}),e.providerCoverage&&f.jsx("p",{className:"text-[10px] font-medium text-amber-400/80",children:e.providerCoverage})]})}),f.jsx("div",{className:"project-row-stat",children:f.jsxs("div",{className:"metric-inline-block",children:[f.jsx("p",{className:"metric-inline-label",children:"Competitor Pressure"}),f.jsx("p",{className:"metric-inline-value",children:e.competitorPressureLabel}),f.jsxs("p",{className:"metric-inline-delta",children:[e.lastRun.kindLabel," · ",A0(e.lastRun.status)]})]})}),f.jsx("div",{className:"project-row-chart",children:f.jsx(gD,{points:e.trend,tone:z0(e.lastRun.status)})}),f.jsx("span",{className:"project-row-link",children:f.jsx(Uf,{className:"h-4 w-4 text-zinc-500"})})]})}function bD(){const e=uo(),{dashboard:n,isLoading:i}=xc(),r=n??e?.dashboard;if(!r||i)return f.jsxs("div",{className:"page-skeleton",children:[f.jsxs("div",{className:"page-skeleton-header",children:[f.jsx("div",{className:"skeleton-text h-6 w-32"}),f.jsx("div",{className:"skeleton-text-sm w-64"})]}),f.jsx("div",{className:"space-y-3",children:[1,2,3].map(v=>f.jsxs("div",{className:"rounded-xl border border-zinc-800/60 bg-zinc-900/30 p-4 flex items-center gap-4",children:[f.jsxs("div",{className:"flex-1 space-y-2",children:[f.jsx("div",{className:"skeleton-text w-36"}),f.jsx("div",{className:"skeleton-text-sm w-48"})]}),f.jsx("div",{className:"skeleton-text w-16"}),f.jsx("div",{className:"skeleton-text w-16"}),f.jsx("div",{className:"skeleton h-8 w-20 rounded"})]},v))})]});const l=r.portfolioOverview,m=mp(!e,e?.health).data??e?.health??{apiStatus:{label:"API",state:"checking",detail:"Checking service health"},workerStatus:{label:"Worker",state:"checking",detail:"Checking service health"}},g=HO(l.systemHealth,m,r.settings),{openRun:b}=hp();return f.jsxs("div",{className:"page-container",children:[f.jsxs("div",{className:"page-header",children:[f.jsxs("div",{className:"page-header-left",children:[f.jsx("h1",{className:"page-title",children:"Portfolio"}),f.jsx("p",{className:"page-subtitle",children:"Visibility and execution state across all projects"})]}),f.jsx("div",{className:"page-header-right",children:f.jsx("p",{className:"text-[11px] text-zinc-600",children:l.lastUpdatedAt})})]}),l.projects.length>0?f.jsx("div",{className:"project-list project-list-scrollable",children:l.projects.map(v=>f.jsx(yD,{project:v},v.project.id))}):f.jsxs(wn,{className:"surface-card empty-card",children:[f.jsx("h3",{children:l.emptyState?.title??"No projects yet"}),f.jsx("p",{className:"supporting-copy",children:l.emptyState?.detail}),f.jsx(Le,{size:"sm",asChild:!0,children:f.jsx(rt,{to:l.emptyState?.ctaHref==="/setup"||!l.emptyState?.ctaHref?"/setup":"/",children:l.emptyState?.ctaLabel??"Launch setup"})})]}),f.jsxs("div",{className:"overview-secondary-grid",children:[l.attentionItems.length>0&&f.jsxs("section",{className:"overview-secondary-section",children:[f.jsx("div",{className:"section-head section-head-inline",children:f.jsxs("div",{children:[f.jsx("p",{className:"eyebrow eyebrow-soft",children:"Needs attention"}),f.jsx("h2",{className:"section-title-sm",children:"What changed"})]})}),f.jsx("div",{className:"attention-list attention-list-scrollable",children:l.attentionItems.map(v=>f.jsxs(rt,{to:v.href,className:`attention-item attention-item-${v.tone}`,children:[f.jsxs("div",{children:[f.jsx("p",{className:"attention-title",children:v.title}),f.jsx("p",{className:"attention-detail",children:v.detail})]}),f.jsx("span",{className:"attention-action",children:v.actionLabel})]},v.id))})]}),f.jsxs("section",{className:"overview-secondary-section",children:[f.jsx("div",{className:"section-head section-head-inline",children:f.jsxs("div",{children:[f.jsx("p",{className:"eyebrow eyebrow-soft",children:"Recent runs"}),f.jsx("h2",{className:"section-title-sm",children:"Activity"})]})}),f.jsx("div",{className:"compact-stack compact-stack-scrollable",children:l.recentRuns.length>0?l.recentRuns.map(v=>f.jsxs("button",{className:"compact-run",type:"button",onClick:()=>b(v.id),children:[f.jsxs("div",{children:[f.jsx("p",{className:"compact-run-title",children:v.projectName}),f.jsx("p",{className:"compact-run-detail",children:v.summary})]}),f.jsx(fp,{status:v.status})]},v.id)):f.jsx("p",{className:"supporting-copy",children:"Run history appears here after the first launch."})})]})]}),f.jsxs("section",{className:"page-section",children:[f.jsx("div",{className:"section-head section-head-inline",children:f.jsxs("div",{children:[f.jsx("p",{className:"eyebrow eyebrow-soft",children:"System health"}),f.jsx("h2",{className:"section-title-sm",children:"Infrastructure"})]})}),f.jsx("div",{className:"health-grid",children:g.map(v=>f.jsxs(wn,{className:"surface-card compact-card",children:[f.jsxs("div",{className:"section-head",children:[f.jsxs("div",{children:[f.jsx("p",{className:"eyebrow eyebrow-soft",children:v.label}),f.jsx("h3",{children:v.detail})]}),f.jsx(Bn,{tone:v.tone,title:v.id==="api"?$s(m.apiStatus):v.id==="worker"?$s(m.workerStatus):void 0,children:v.label})]}),f.jsx("p",{className:"supporting-copy",children:v.meta})]},v.id))})]})]})}const vp=Symbol.for("yaml.alias"),_f=Symbol.for("yaml.document"),Ha=Symbol.for("yaml.map"),r1=Symbol.for("yaml.pair"),Hn=Symbol.for("yaml.scalar"),Qs=Symbol.for("yaml.seq"),kn=Symbol.for("yaml.node.type"),Ci=e=>!!e&&typeof e=="object"&&e[kn]===vp,jc=e=>!!e&&typeof e=="object"&&e[kn]===_f,fo=e=>!!e&&typeof e=="object"&&e[kn]===Ha,vt=e=>!!e&&typeof e=="object"&&e[kn]===r1,nt=e=>!!e&&typeof e=="object"&&e[kn]===Hn,po=e=>!!e&&typeof e=="object"&&e[kn]===Qs;function yt(e){if(e&&typeof e=="object")switch(e[kn]){case Ha:case Qs:return!0}return!1}function bt(e){if(e&&typeof e=="object")switch(e[kn]){case vp:case Ha:case Hn:case Qs:return!0}return!1}const o1=e=>(nt(e)||yt(e))&&!!e.anchor,vi=Symbol("break visit"),vD=Symbol("skip children"),no=Symbol("remove node");function Ys(e,n){const i=SD(n);jc(e)?Ts(null,e.contents,i,Object.freeze([e]))===no&&(e.contents=null):Ts(null,e,i,Object.freeze([]))}Ys.BREAK=vi;Ys.SKIP=vD;Ys.REMOVE=no;function Ts(e,n,i,r){const l=xD(e,n,i,r);if(bt(l)||vt(l))return wD(e,r,l),Ts(e,l,i,r);if(typeof l!="symbol"){if(yt(n)){r=Object.freeze(r.concat(n));for(let c=0;c<n.items.length;++c){const d=Ts(c,n.items[c],i,r);if(typeof d=="number")c=d-1;else{if(d===vi)return vi;d===no&&(n.items.splice(c,1),c-=1)}}}else if(vt(n)){r=Object.freeze(r.concat(n));const c=Ts("key",n.key,i,r);if(c===vi)return vi;c===no&&(n.key=null);const d=Ts("value",n.value,i,r);if(d===vi)return vi;d===no&&(n.value=null)}}return l}function SD(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 xD(e,n,i,r){if(typeof i=="function")return i(e,n,r);if(fo(n))return i.Map?.(e,n,r);if(po(n))return i.Seq?.(e,n,r);if(vt(n))return i.Pair?.(e,n,r);if(nt(n))return i.Scalar?.(e,n,r);if(Ci(n))return i.Alias?.(e,n,r)}function wD(e,n,i){const r=n[n.length-1];if(yt(r))r.items[e]=i;else if(vt(r))e==="key"?r.key=i:r.value=i;else if(jc(r))r.contents=i;else{const l=Ci(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${l} parent`)}}const jD={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},ND=e=>e.replace(/[!,[\]{}]/g,n=>jD[n]);class Gt{constructor(n,i){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},Gt.defaultYaml,n),this.tags=Object.assign({},Gt.defaultTags,i)}clone(){const n=new Gt(this.yaml,this.tags);return n.docStart=this.docStart,n}atDocument(){const n=new Gt(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:Gt.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},Gt.defaultTags);break}return n}add(n,i){this.atNextDocument&&(this.yaml={explicit:Gt.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},Gt.defaultTags),this.atNextDocument=!1);const r=n.trim().split(/[ \t]+/),l=r.shift();switch(l){case"%TAG":{if(r.length!==2&&(i(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;const[c,d]=r;return this.tags[c]=d,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return i(0,"%YAML directive should contain exactly one part"),!1;const[c]=r;if(c==="1.1"||c==="1.2")return this.yaml.version=c,!0;{const d=/^\d+\.\d+$/.test(c);return i(6,`Unsupported YAML version ${c}`,d),!1}}default:return i(0,`Unknown directive ${l}`,!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[,r,l]=n.match(/^(.*!)([^!]*)$/s);l||i(`The ${n} tag has no suffix`);const c=this.tags[r];if(c)try{return c+decodeURIComponent(l)}catch(d){return i(String(d)),null}return r==="!"?n:(i(`Could not resolve tag: ${n}`),null)}tagString(n){for(const[i,r]of Object.entries(this.tags))if(n.startsWith(r))return i+ND(n.substring(r.length));return n[0]==="!"?n:`!<${n}>`}toString(n){const i=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags);let l;if(n&&r.length>0&&bt(n.contents)){const c={};Ys(n.contents,(d,m)=>{bt(m)&&m.tag&&(c[m.tag]=!0)}),l=Object.keys(c)}else l=[];for(const[c,d]of r)c==="!!"&&d==="tag:yaml.org,2002:"||(!n||l.some(m=>m.startsWith(d)))&&i.push(`%TAG ${c} ${d}`);return i.join(`
65
+ `)}}Gt.defaultYaml={explicit:!1,version:"1.2"};Gt.defaultTags={"!!":"tag:yaml.org,2002:"};function l1(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 c1(e){const n=new Set;return Ys(e,{Value(i,r){r.anchor&&n.add(r.anchor)}}),n}function u1(e,n){for(let i=1;;++i){const r=`${e}${i}`;if(!n.has(r))return r}}function kD(e,n){const i=[],r=new Map;let l=null;return{onAnchor:c=>{i.push(c),l??(l=c1(e));const d=u1(n,l);return l.add(d),d},setAnchors:()=>{for(const c of i){const d=r.get(c);if(typeof d=="object"&&d.anchor&&(nt(d.node)||yt(d.node)))d.node.anchor=d.anchor;else{const m=new Error("Failed to resolve repeated object (this should not happen)");throw m.source=c,m}}},sourceObjects:r}}function Es(e,n,i,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let l=0,c=r.length;l<c;++l){const d=r[l],m=Es(e,r,String(l),d);m===void 0?delete r[l]:m!==d&&(r[l]=m)}else if(r instanceof Map)for(const l of Array.from(r.keys())){const c=r.get(l),d=Es(e,r,l,c);d===void 0?r.delete(l):d!==c&&r.set(l,d)}else if(r instanceof Set)for(const l of Array.from(r)){const c=Es(e,r,l,l);c===void 0?r.delete(l):c!==l&&(r.delete(l),r.add(c))}else for(const[l,c]of Object.entries(r)){const d=Es(e,r,l,c);d===void 0?delete r[l]:d!==c&&(r[l]=d)}return e.call(n,i,r)}function Nn(e,n,i){if(Array.isArray(e))return e.map((r,l)=>Nn(r,String(l),i));if(e&&typeof e.toJSON=="function"){if(!i||!o1(e))return e.toJSON(n,i);const r={aliasCount:0,count:1,res:void 0};i.anchors.set(e,r),i.onCreate=c=>{r.res=c,delete i.onCreate};const l=e.toJSON(n,i);return i.onCreate&&i.onCreate(l),l}return typeof e=="bigint"&&!i?.keep?Number(e):e}class Sp{constructor(n){Object.defineProperty(this,kn,{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:r,onAnchor:l,reviver:c}={}){if(!jc(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 r=="number"?r:100},m=Nn(this,"",d);if(typeof l=="function")for(const{count:g,res:b}of d.anchors.values())l(b,g);return typeof c=="function"?Es(c,{"":m},"",m):m}}class xp extends Sp{constructor(n){super(vp),this.source=n,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(n,i){let r;i?.aliasResolveCache?r=i.aliasResolveCache:(r=[],Ys(n,{Node:(c,d)=>{(Ci(d)||o1(d))&&r.push(d)}}),i&&(i.aliasResolveCache=r));let l;for(const c of r){if(c===this)break;c.anchor===this.source&&(l=c)}return l}toJSON(n,i){if(!i)return{source:this.source};const{anchors:r,doc:l,maxAliasCount:c}=i,d=this.resolve(l,i);if(!d){const g=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(g)}let m=r.get(d);if(m||(Nn(d,null,i),m=r.get(d)),m?.res===void 0){const g="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(g)}if(c>=0&&(m.count+=1,m.aliasCount===0&&(m.aliasCount=Yl(l,d,r)),m.count*m.aliasCount>c)){const g="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(g)}return m.res}toString(n,i,r){const l=`*${this.source}`;if(n){if(l1(this.source),n.options.verifyAliasOrder&&!n.anchors.has(this.source)){const c=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(c)}if(n.implicitKey)return`${l} `}return l}}function Yl(e,n,i){if(Ci(n)){const r=n.resolve(e),l=i&&r&&i.get(r);return l?l.count*l.aliasCount:0}else if(yt(n)){let r=0;for(const l of n.items){const c=Yl(e,l,i);c>r&&(r=c)}return r}else if(vt(n)){const r=Yl(e,n.key,i),l=Yl(e,n.value,i);return Math.max(r,l)}return 1}const d1=e=>!e||typeof e!="function"&&typeof e!="object";class ke extends Sp{constructor(n){super(Hn),this.value=n}toJSON(n,i){return i?.keep?this.value:Nn(this.value,n,i)}toString(){return String(this.value)}}ke.BLOCK_FOLDED="BLOCK_FOLDED";ke.BLOCK_LITERAL="BLOCK_LITERAL";ke.PLAIN="PLAIN";ke.QUOTE_DOUBLE="QUOTE_DOUBLE";ke.QUOTE_SINGLE="QUOTE_SINGLE";const AD="tag:yaml.org,2002:";function _D(e,n,i){if(n){const r=i.filter(c=>c.tag===n),l=r.find(c=>!c.format)??r[0];if(!l)throw new Error(`Tag ${n} not found`);return l}return i.find(r=>r.identify?.(e)&&!r.format)}function oo(e,n,i){if(jc(e)&&(e=e.contents),bt(e))return e;if(vt(e)){const S=i.schema[Ha].createNode?.(i.schema,null,i);return S.items.push(e),S}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:r,onAnchor:l,onTagObj:c,schema:d,sourceObjects:m}=i;let g;if(r&&e&&typeof e=="object"){if(g=m.get(e),g)return g.anchor??(g.anchor=l(e)),new xp(g.anchor);g={anchor:null,node:null},m.set(e,g)}n?.startsWith("!!")&&(n=AD+n.slice(2));let b=_D(e,n,d.tags);if(!b){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){const S=new ke(e);return g&&(g.node=S),S}b=e instanceof Map?d[Ha]:Symbol.iterator in Object(e)?d[Qs]:d[Ha]}c&&(c(b),delete i.onTagObj);const v=b?.createNode?b.createNode(i.schema,e,i):typeof b?.nodeClass?.from=="function"?b.nodeClass.from(i.schema,e,i):new ke(e);return n?v.tag=n:b.default||(v.tag=b.tag),g&&(g.node=v),v}function cc(e,n,i){let r=i;for(let l=n.length-1;l>=0;--l){const c=n[l];if(typeof c=="number"&&Number.isInteger(c)&&c>=0){const d=[];d[c]=r,r=d}else r=new Map([[c,r]])}return oo(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}const to=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done;class f1 extends Sp{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(r=>bt(r)||vt(r)?r.clone(n):r),this.range&&(i.range=this.range.slice()),i}addIn(n,i){if(to(n))this.add(i);else{const[r,...l]=n,c=this.get(r,!0);if(yt(c))c.addIn(l,i);else if(c===void 0&&this.schema)this.set(r,cc(this.schema,l,i));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${l}`)}}deleteIn(n){const[i,...r]=n;if(r.length===0)return this.delete(i);const l=this.get(i,!0);if(yt(l))return l.deleteIn(r);throw new Error(`Expected YAML collection at ${i}. Remaining path: ${r}`)}getIn(n,i){const[r,...l]=n,c=this.get(r,!0);return l.length===0?!i&&nt(c)?c.value:c:yt(c)?c.getIn(l,i):void 0}hasAllNullValues(n){return this.items.every(i=>{if(!vt(i))return!1;const r=i.value;return r==null||n&&nt(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(n){const[i,...r]=n;if(r.length===0)return this.has(i);const l=this.get(i,!0);return yt(l)?l.hasIn(r):!1}setIn(n,i){const[r,...l]=n;if(l.length===0)this.set(r,i);else{const c=this.get(r,!0);if(yt(c))c.setIn(l,i);else if(c===void 0&&this.schema)this.set(r,cc(this.schema,l,i));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${l}`)}}}const zD=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function pa(e,n){return/^\n+$/.test(e)?e.substring(1):n?e.replace(/^(?! *$)/gm,n):e}const Si=(e,n,i)=>e.endsWith(`
66
66
  `)?pa(i,n):i.includes(`
67
67
  `)?`
68
68
  `+pa(i,n):(e.endsWith(" ")?"":" ")+i,p1="flow",zf="block",Xl="quoted";function Nc(e,n,i="flow",{indentAtStart:r,lineWidth:l=80,minContentWidth:c=20,onFold:d,onOverflow:m}={}){if(!l||l<0)return e;l<c&&(c=0);const g=Math.max(1+c,1+l-n.length);if(e.length<=g)return e;const b=[],v={};let S=l-n.length;typeof r=="number"&&(r>l-Math.max(2,c)?b.push(0):S=l-r);let w,_,C=!1,N=-1,T=-1,R=-1;i===zf&&(N=Lb(e,N,n.length),N!==-1&&(S=N+g));for(let H;H=e[N+=1];){if(i===Xl&&H==="\\"){switch(T=N,e[N+1]){case"x":N+=3;break;case"u":N+=5;break;case"U":N+=9;break;default:N+=1}R=N}if(H===`
@@ -71,7 +71,7 @@ ${JSON.stringify(r.raw,null,2)}`):n.push(l)}return n.length>0?n.join(`
71
71
  `&&K!==" "&&(w=N)}if(N>=S)if(w)b.push(w),S=w+g,w=void 0;else if(i===Xl){for(;_===" "||_===" ";)_=H,H=e[N+=1],C=!0;const K=N>R+1?N-2:T-1;if(v[K])return e;b.push(K),v[K]=!0,S=K+g,w=void 0}else C=!0}_=H}if(C&&m&&m(),b.length===0)return e;d&&d();let G=e.slice(0,b[0]);for(let H=0;H<b.length;++H){const K=b[H],X=b[H+1]||e.length;K===0?G=`
72
72
  ${n}${e.slice(0,X)}`:(i===Xl&&v[K]&&(G+=`${e[K]}\\`),G+=`
73
73
  ${n}${e.slice(K+1,X)}`)}return G}function Lb(e,n,i){let r=n,l=n+1,c=e[l];for(;c===" "||c===" ";)if(n<l+i)c=e[++n];else{do c=e[++n];while(c&&c!==`
74
- `);r=n,l=n+1,c=e[l]}return r}const kc=(e,n)=>({indentAtStart:n?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),Ac=e=>/^(%|---|\.\.\.)/m.test(e);function zD(e,n,i){if(!n||n<0)return!1;const r=n-i,l=e.length;if(l<=r)return!1;for(let c=0,d=0;c<l;++c)if(e[c]===`
74
+ `);r=n,l=n+1,c=e[l]}return r}const kc=(e,n)=>({indentAtStart:n?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),Ac=e=>/^(%|---|\.\.\.)/m.test(e);function CD(e,n,i){if(!n||n<0)return!1;const r=n-i,l=e.length;if(l<=r)return!1;for(let c=0,d=0;c<l;++c)if(e[c]===`
75
75
  `){if(c-d>r)return!0;if(d=c+1,l-d<=r)return!1}return!0}function ao(e,n){const i=JSON.stringify(e);if(n.options.doubleQuotedAsJSON)return i;const{implicitKey:r}=n,l=n.options.doubleQuotedMinMultiLineLength,c=n.indent||(Ac(e)?" ":"");let d="",m=0;for(let g=0,b=i[g];b;b=i[++g])if(b===" "&&i[g+1]==="\\"&&i[g+2]==="n"&&(d+=i.slice(m,g)+"\\ ",g+=1,m=g,b="\\"),b==="\\")switch(i[g+1]){case"u":{d+=i.slice(m,g);const v=i.substr(g+2,4);switch(v){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:v.substr(0,2)==="00"?d+="\\x"+v.substr(2):d+=i.substr(g,6)}g+=5,m=g+1}break;case"n":if(r||i[g+2]==='"'||i.length<l)g+=1;else{for(d+=i.slice(m,g)+`
76
76
 
77
77
  `;i[g+2]==="\\"&&i[g+3]==="n"&&i[g+4]!=='"';)d+=`
@@ -80,7 +80,7 @@ ${n}${e.slice(K+1,X)}`)}return G}function Lb(e,n,i){let r=n,l=n+1,c=e[l];for(;c=
80
80
  ${i}`)+"'";return n.implicitKey?r:Nc(r,i,p1,kc(n,!1))}function Os(e,n){const{singleQuote:i}=n.options;let r;if(i===!1)r=ao;else{const l=e.includes('"'),c=e.includes("'");l&&!c?r=Cf:c&&!l?r=ao:r=i?Cf:ao}return r(e,n)}let Tf;try{Tf=new RegExp(`(^|(?<!
81
81
  ))
82
82
  +(?!
83
- |$)`,"g")}catch{Tf=/\n+(?!\n|$)/g}function Jl({comment:e,type:n,value:i},r,l,c){const{blockQuote:d,commentString:m,lineWidth:g}=r.options;if(!d||/\n[\t ]+$/.test(i))return Os(i,r);const b=r.indent||(r.forceBlockIndent||Ac(i)?" ":""),v=d==="literal"?!0:d==="folded"||n===ke.BLOCK_FOLDED?!1:n===ke.BLOCK_LITERAL?!0:!zD(i,g,b.length);if(!i)return v?`|
83
+ |$)`,"g")}catch{Tf=/\n+(?!\n|$)/g}function Jl({comment:e,type:n,value:i},r,l,c){const{blockQuote:d,commentString:m,lineWidth:g}=r.options;if(!d||/\n[\t ]+$/.test(i))return Os(i,r);const b=r.indent||(r.forceBlockIndent||Ac(i)?" ":""),v=d==="literal"?!0:d==="folded"||n===ke.BLOCK_FOLDED?!1:n===ke.BLOCK_LITERAL?!0:!CD(i,g,b.length);if(!i)return v?`|
84
84
  `:`>
85
85
  `;let S,w;for(w=i.length;w>0;--w){const X=i[w-1];if(X!==`
86
86
  `&&X!==" "&&X!==" ")break}let _=i.substring(w);const C=_.indexOf(`
@@ -89,13 +89,13 @@ ${i}`)+"'";return n.implicitKey?r:Nc(r,i,p1,kc(n,!1))}function Os(e,n){const{sin
89
89
  `)R=T;else break}let G=i.substring(0,R<T?R+1:T);G&&(i=i.substring(G.length),G=G.replace(/\n+/g,`$&${b}`));let K=(N?b?"2":"1":"")+S;if(e&&(K+=" "+m(e.replace(/ ?[\r\n]+/g," ")),l&&l()),!v){const X=i.replace(/\n+/g,`
90
90
  $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${b}`);let J=!1;const D=kc(r,!0);d!=="folded"&&n!==ke.BLOCK_FOLDED&&(D.onOverflow=()=>{J=!0});const M=Nc(`${G}${X}${_}`,b,zf,D);if(!J)return`>${K}
91
91
  ${b}${M}`}return i=i.replace(/\n+/g,`$&${b}`),`|${K}
92
- ${b}${G}${i}${_}`}function CD(e,n,i,r){const{type:l,value:c}=e,{actualString:d,implicitKey:m,indent:g,indentStep:b,inFlow:v}=n;if(m&&c.includes(`
92
+ ${b}${G}${i}${_}`}function TD(e,n,i,r){const{type:l,value:c}=e,{actualString:d,implicitKey:m,indent:g,indentStep:b,inFlow:v}=n;if(m&&c.includes(`
93
93
  `)||v&&/[[\]{},]/.test(c))return Os(c,n);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(c))return m||v||!c.includes(`
94
94
  `)?Os(c,n):Jl(e,n,i,r);if(!m&&!v&&l!==ke.PLAIN&&c.includes(`
95
95
  `))return Jl(e,n,i,r);if(Ac(c)){if(g==="")return n.forceBlockIndent=!0,Jl(e,n,i,r);if(m&&g===b)return Os(c,n)}const S=c.replace(/\n+/g,`$&
96
- ${g}`);if(d){const w=N=>N.default&&N.tag!=="tag:yaml.org,2002:str"&&N.test?.test(S),{compat:_,tags:C}=n.doc.schema;if(C.some(w)||_?.some(w))return Os(c,n)}return m?S:Nc(S,g,p1,kc(n,!1))}function wp(e,n,i,r){const{implicitKey:l,inFlow:c}=n,d=typeof e.value=="string"?e:Object.assign({},e,{value:String(e.value)});let{type:m}=e;m!==ke.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(d.value)&&(m=ke.QUOTE_DOUBLE);const g=v=>{switch(v){case ke.BLOCK_FOLDED:case ke.BLOCK_LITERAL:return l||c?Os(d.value,n):Jl(d,n,i,r);case ke.QUOTE_DOUBLE:return ao(d.value,n);case ke.QUOTE_SINGLE:return Cf(d.value,n);case ke.PLAIN:return CD(d,n,i,r);default:return null}};let b=g(m);if(b===null){const{defaultKeyType:v,defaultStringType:S}=n.options,w=l&&v||S;if(b=g(w),b===null)throw new Error(`Unsupported default string type ${w}`)}return b}function m1(e,n){const i=Object.assign({blockQuote:!0,commentString:_D,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 r;switch(i.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:i.flowCollectionPadding?" ":"",indent:"",indentStep:typeof i.indent=="number"?" ".repeat(i.indent):" ",inFlow:r,options:i}}function TD(e,n){if(n.tag){const l=e.filter(c=>c.tag===n.tag);if(l.length>0)return l.find(c=>c.format===n.format)??l[0]}let i,r;if(nt(n)){r=n.value;let l=e.filter(c=>c.identify?.(r));if(l.length>1){const c=l.filter(d=>d.test);c.length>0&&(l=c)}i=l.find(c=>c.format===n.format)??l.find(c=>!c.format)}else r=n,i=e.find(l=>l.nodeClass&&r instanceof l.nodeClass);if(!i){const l=r?.constructor?.name??(r===null?"null":typeof r);throw new Error(`Tag not resolved for ${l} value`)}return i}function ED(e,n,{anchors:i,doc:r}){if(!r.directives)return"";const l=[],c=(nt(e)||yt(e))&&e.anchor;c&&l1(c)&&(i.add(c),l.push(`&${c}`));const d=e.tag??(n.default?null:n.tag);return d&&l.push(r.directives.tagString(d)),l.join(" ")}function $s(e,n,i,r){if(vt(e))return e.toString(n,i,r);if(Ci(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 l;const c=bt(e)?e:n.doc.createNode(e,{onTagObj:g=>l=g});l??(l=TD(n.doc.schema.tags,c));const d=ED(c,l,n);d.length>0&&(n.indentAtStart=(n.indentAtStart??0)+d.length+1);const m=typeof l.stringify=="function"?l.stringify(c,n,i,r):nt(c)?wp(c,n,i,r):c.toString(n,i,r);return d?nt(c)||m[0]==="{"||m[0]==="["?`${d} ${m}`:`${d}
97
- ${n.indent}${m}`:m}function OD({key:e,value:n},i,r,l){const{allNullValues:c,doc:d,indent:m,indentStep:g,options:{commentString:b,indentSeq:v,simpleKeys:S}}=i;let w=bt(e)&&e.comment||null;if(S){if(w)throw new Error("With simple keys, key nodes cannot have comments");if(yt(e)||!bt(e)&&typeof e=="object"){const D="With simple keys, collection cannot be used as a key value";throw new Error(D)}}let _=!S&&(!e||w&&n==null&&!i.inFlow||yt(e)||(nt(e)?e.type===ke.BLOCK_FOLDED||e.type===ke.BLOCK_LITERAL:typeof e=="object"));i=Object.assign({},i,{allNullValues:!1,implicitKey:!_&&(S||!c),indent:m+g});let C=!1,N=!1,T=$s(e,i,()=>C=!0,()=>N=!0);if(!_&&!i.inFlow&&T.length>1024){if(S)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");_=!0}if(i.inFlow){if(c||n==null)return C&&r&&r(),T===""?"?":_?`? ${T}`:T}else if(c&&!S||n==null&&_)return T=`? ${T}`,w&&!C?T+=Si(T,i.indent,b(w)):N&&l&&l(),T;C&&(w=null),_?(w&&(T+=Si(T,i.indent,b(w))),T=`? ${T}
98
- ${m}:`):(T=`${T}:`,w&&(T+=Si(T,i.indent,b(w))));let R,G,H;bt(n)?(R=!!n.spaceBefore,G=n.commentBefore,H=n.comment):(R=!1,G=null,H=null,n&&typeof n=="object"&&(n=d.createNode(n))),i.implicitKey=!1,!_&&!w&&nt(n)&&(i.indentAtStart=T.length+1),N=!1,!v&&g.length>=2&&!i.inFlow&&!_&&po(n)&&!n.flow&&!n.tag&&!n.anchor&&(i.indent=i.indent.substring(2));let K=!1;const X=$s(n,i,()=>K=!0,()=>N=!0);let J=" ";if(w||R||G){if(J=R?`
96
+ ${g}`);if(d){const w=N=>N.default&&N.tag!=="tag:yaml.org,2002:str"&&N.test?.test(S),{compat:_,tags:C}=n.doc.schema;if(C.some(w)||_?.some(w))return Os(c,n)}return m?S:Nc(S,g,p1,kc(n,!1))}function wp(e,n,i,r){const{implicitKey:l,inFlow:c}=n,d=typeof e.value=="string"?e:Object.assign({},e,{value:String(e.value)});let{type:m}=e;m!==ke.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(d.value)&&(m=ke.QUOTE_DOUBLE);const g=v=>{switch(v){case ke.BLOCK_FOLDED:case ke.BLOCK_LITERAL:return l||c?Os(d.value,n):Jl(d,n,i,r);case ke.QUOTE_DOUBLE:return ao(d.value,n);case ke.QUOTE_SINGLE:return Cf(d.value,n);case ke.PLAIN:return TD(d,n,i,r);default:return null}};let b=g(m);if(b===null){const{defaultKeyType:v,defaultStringType:S}=n.options,w=l&&v||S;if(b=g(w),b===null)throw new Error(`Unsupported default string type ${w}`)}return b}function m1(e,n){const i=Object.assign({blockQuote:!0,commentString:zD,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 r;switch(i.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:i.flowCollectionPadding?" ":"",indent:"",indentStep:typeof i.indent=="number"?" ".repeat(i.indent):" ",inFlow:r,options:i}}function ED(e,n){if(n.tag){const l=e.filter(c=>c.tag===n.tag);if(l.length>0)return l.find(c=>c.format===n.format)??l[0]}let i,r;if(nt(n)){r=n.value;let l=e.filter(c=>c.identify?.(r));if(l.length>1){const c=l.filter(d=>d.test);c.length>0&&(l=c)}i=l.find(c=>c.format===n.format)??l.find(c=>!c.format)}else r=n,i=e.find(l=>l.nodeClass&&r instanceof l.nodeClass);if(!i){const l=r?.constructor?.name??(r===null?"null":typeof r);throw new Error(`Tag not resolved for ${l} value`)}return i}function OD(e,n,{anchors:i,doc:r}){if(!r.directives)return"";const l=[],c=(nt(e)||yt(e))&&e.anchor;c&&l1(c)&&(i.add(c),l.push(`&${c}`));const d=e.tag??(n.default?null:n.tag);return d&&l.push(r.directives.tagString(d)),l.join(" ")}function Us(e,n,i,r){if(vt(e))return e.toString(n,i,r);if(Ci(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 l;const c=bt(e)?e:n.doc.createNode(e,{onTagObj:g=>l=g});l??(l=ED(n.doc.schema.tags,c));const d=OD(c,l,n);d.length>0&&(n.indentAtStart=(n.indentAtStart??0)+d.length+1);const m=typeof l.stringify=="function"?l.stringify(c,n,i,r):nt(c)?wp(c,n,i,r):c.toString(n,i,r);return d?nt(c)||m[0]==="{"||m[0]==="["?`${d} ${m}`:`${d}
97
+ ${n.indent}${m}`:m}function DD({key:e,value:n},i,r,l){const{allNullValues:c,doc:d,indent:m,indentStep:g,options:{commentString:b,indentSeq:v,simpleKeys:S}}=i;let w=bt(e)&&e.comment||null;if(S){if(w)throw new Error("With simple keys, key nodes cannot have comments");if(yt(e)||!bt(e)&&typeof e=="object"){const D="With simple keys, collection cannot be used as a key value";throw new Error(D)}}let _=!S&&(!e||w&&n==null&&!i.inFlow||yt(e)||(nt(e)?e.type===ke.BLOCK_FOLDED||e.type===ke.BLOCK_LITERAL:typeof e=="object"));i=Object.assign({},i,{allNullValues:!1,implicitKey:!_&&(S||!c),indent:m+g});let C=!1,N=!1,T=Us(e,i,()=>C=!0,()=>N=!0);if(!_&&!i.inFlow&&T.length>1024){if(S)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");_=!0}if(i.inFlow){if(c||n==null)return C&&r&&r(),T===""?"?":_?`? ${T}`:T}else if(c&&!S||n==null&&_)return T=`? ${T}`,w&&!C?T+=Si(T,i.indent,b(w)):N&&l&&l(),T;C&&(w=null),_?(w&&(T+=Si(T,i.indent,b(w))),T=`? ${T}
98
+ ${m}:`):(T=`${T}:`,w&&(T+=Si(T,i.indent,b(w))));let R,G,H;bt(n)?(R=!!n.spaceBefore,G=n.commentBefore,H=n.comment):(R=!1,G=null,H=null,n&&typeof n=="object"&&(n=d.createNode(n))),i.implicitKey=!1,!_&&!w&&nt(n)&&(i.indentAtStart=T.length+1),N=!1,!v&&g.length>=2&&!i.inFlow&&!_&&po(n)&&!n.flow&&!n.tag&&!n.anchor&&(i.indent=i.indent.substring(2));let K=!1;const X=Us(n,i,()=>K=!0,()=>N=!0);let J=" ";if(w||R||G){if(J=R?`
99
99
  `:"",G){const D=b(G);J+=`
100
100
  ${pa(D,i.indent)}`}X===""&&!i.inFlow?J===`
101
101
  `&&H&&(J=`
@@ -104,32 +104,32 @@ ${pa(D,i.indent)}`}X===""&&!i.inFlow?J===`
104
104
  ${i.indent}`}else if(!_&&yt(n)){const D=X[0],M=X.indexOf(`
105
105
  `),oe=M!==-1,Ne=i.inFlow??n.flow??n.items.length===0;if(oe||!Ne){let Ae=!1;if(oe&&(D==="&"||D==="!")){let ve=X.indexOf(" ");D==="&"&&ve!==-1&&ve<M&&X[ve+1]==="!"&&(ve=X.indexOf(" ",ve+1)),(ve===-1||M<ve)&&(Ae=!0)}Ae||(J=`
106
106
  ${i.indent}`)}}else(X===""||X[0]===`
107
- `)&&(J="");return T+=J+X,i.inFlow?K&&r&&r():H&&!K?T+=Si(T,i.indent,b(H)):N&&l&&l(),T}function DD(e,n){(e==="debug"||e==="warn")&&console.warn(n)}const Gl="<<",ma={identify:e=>e===Gl||typeof e=="symbol"&&e.description===Gl,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new ke(Symbol(Gl)),{addToJSMap:h1}),stringify:()=>Gl},RD=(e,n)=>(ma.identify(n)||nt(n)&&(!n.type||n.type===ke.PLAIN)&&ma.identify(n.value))&&e?.doc.schema.tags.some(i=>i.tag===ma.tag&&i.default);function h1(e,n,i){if(i=e&&Ci(i)?i.resolve(e.doc):i,po(i))for(const r of i.items)rf(e,n,r);else if(Array.isArray(i))for(const r of i)rf(e,n,r);else rf(e,n,i)}function rf(e,n,i){const r=e&&Ci(i)?i.resolve(e.doc):i;if(!fo(r))throw new Error("Merge sources must be maps or map aliases");const l=r.toJSON(null,e,Map);for(const[c,d]of l)n instanceof Map?n.has(c)||n.set(c,d):n instanceof Set?n.add(c):Object.prototype.hasOwnProperty.call(n,c)||Object.defineProperty(n,c,{value:d,writable:!0,enumerable:!0,configurable:!0});return n}function g1(e,n,{key:i,value:r}){if(bt(i)&&i.addToJSMap)i.addToJSMap(e,n,r);else if(RD(e,i))h1(e,n,r);else{const l=Nn(i,"",e);if(n instanceof Map)n.set(l,Nn(r,l,e));else if(n instanceof Set)n.add(l);else{const c=MD(i,l,e),d=Nn(r,c,e);c in n?Object.defineProperty(n,c,{value:d,writable:!0,enumerable:!0,configurable:!0}):n[c]=d}}return n}function MD(e,n,i){if(n===null)return"";if(typeof n!="object")return String(n);if(bt(e)&&i?.doc){const r=m1(i.doc,{});r.anchors=new Set;for(const c of i.anchors.keys())r.anchors.add(c.anchor);r.inFlow=!0,r.inStringifyKey=!0;const l=e.toString(r);if(!i.mapKeyWarned){let c=JSON.stringify(l);c.length>40&&(c=c.substring(0,36)+'..."'),DD(i.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${c}. Set mapAsMap: true to use object keys.`),i.mapKeyWarned=!0}return l}return JSON.stringify(n)}function jp(e,n,i){const r=oo(e,void 0,i),l=oo(n,void 0,i);return new Ht(r,l)}class Ht{constructor(n,i=null){Object.defineProperty(this,kn,{value:r1}),this.key=n,this.value=i}clone(n){let{key:i,value:r}=this;return bt(i)&&(i=i.clone(n)),bt(r)&&(r=r.clone(n)),new Ht(i,r)}toJSON(n,i){const r=i?.mapAsMap?new Map:{};return g1(i,r,this)}toString(n,i,r){return n?.doc?OD(this,n,i,r):JSON.stringify(this)}}function y1(e,n,i){return(n.inFlow??e.flow?LD:BD)(e,n,i)}function BD({comment:e,items:n},i,{blockItemPrefix:r,flowChars:l,itemIndent:c,onChompKeep:d,onComment:m}){const{indent:g,options:{commentString:b}}=i,v=Object.assign({},i,{indent:c,type:null});let S=!1;const w=[];for(let C=0;C<n.length;++C){const N=n[C];let T=null;if(bt(N))!S&&N.spaceBefore&&w.push(""),uc(i,w,N.commentBefore,S),N.comment&&(T=N.comment);else if(vt(N)){const G=bt(N.key)?N.key:null;G&&(!S&&G.spaceBefore&&w.push(""),uc(i,w,G.commentBefore,S))}S=!1;let R=$s(N,v,()=>T=null,()=>S=!0);T&&(R+=Si(R,c,b(T))),S&&T&&(S=!1),w.push(r+R)}let _;if(w.length===0)_=l.start+l.end;else{_=w[0];for(let C=1;C<w.length;++C){const N=w[C];_+=N?`
107
+ `)&&(J="");return T+=J+X,i.inFlow?K&&r&&r():H&&!K?T+=Si(T,i.indent,b(H)):N&&l&&l(),T}function RD(e,n){(e==="debug"||e==="warn")&&console.warn(n)}const Gl="<<",ma={identify:e=>e===Gl||typeof e=="symbol"&&e.description===Gl,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new ke(Symbol(Gl)),{addToJSMap:h1}),stringify:()=>Gl},MD=(e,n)=>(ma.identify(n)||nt(n)&&(!n.type||n.type===ke.PLAIN)&&ma.identify(n.value))&&e?.doc.schema.tags.some(i=>i.tag===ma.tag&&i.default);function h1(e,n,i){if(i=e&&Ci(i)?i.resolve(e.doc):i,po(i))for(const r of i.items)rf(e,n,r);else if(Array.isArray(i))for(const r of i)rf(e,n,r);else rf(e,n,i)}function rf(e,n,i){const r=e&&Ci(i)?i.resolve(e.doc):i;if(!fo(r))throw new Error("Merge sources must be maps or map aliases");const l=r.toJSON(null,e,Map);for(const[c,d]of l)n instanceof Map?n.has(c)||n.set(c,d):n instanceof Set?n.add(c):Object.prototype.hasOwnProperty.call(n,c)||Object.defineProperty(n,c,{value:d,writable:!0,enumerable:!0,configurable:!0});return n}function g1(e,n,{key:i,value:r}){if(bt(i)&&i.addToJSMap)i.addToJSMap(e,n,r);else if(MD(e,i))h1(e,n,r);else{const l=Nn(i,"",e);if(n instanceof Map)n.set(l,Nn(r,l,e));else if(n instanceof Set)n.add(l);else{const c=BD(i,l,e),d=Nn(r,c,e);c in n?Object.defineProperty(n,c,{value:d,writable:!0,enumerable:!0,configurable:!0}):n[c]=d}}return n}function BD(e,n,i){if(n===null)return"";if(typeof n!="object")return String(n);if(bt(e)&&i?.doc){const r=m1(i.doc,{});r.anchors=new Set;for(const c of i.anchors.keys())r.anchors.add(c.anchor);r.inFlow=!0,r.inStringifyKey=!0;const l=e.toString(r);if(!i.mapKeyWarned){let c=JSON.stringify(l);c.length>40&&(c=c.substring(0,36)+'..."'),RD(i.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${c}. Set mapAsMap: true to use object keys.`),i.mapKeyWarned=!0}return l}return JSON.stringify(n)}function jp(e,n,i){const r=oo(e,void 0,i),l=oo(n,void 0,i);return new Ht(r,l)}class Ht{constructor(n,i=null){Object.defineProperty(this,kn,{value:r1}),this.key=n,this.value=i}clone(n){let{key:i,value:r}=this;return bt(i)&&(i=i.clone(n)),bt(r)&&(r=r.clone(n)),new Ht(i,r)}toJSON(n,i){const r=i?.mapAsMap?new Map:{};return g1(i,r,this)}toString(n,i,r){return n?.doc?DD(this,n,i,r):JSON.stringify(this)}}function y1(e,n,i){return(n.inFlow??e.flow?qD:LD)(e,n,i)}function LD({comment:e,items:n},i,{blockItemPrefix:r,flowChars:l,itemIndent:c,onChompKeep:d,onComment:m}){const{indent:g,options:{commentString:b}}=i,v=Object.assign({},i,{indent:c,type:null});let S=!1;const w=[];for(let C=0;C<n.length;++C){const N=n[C];let T=null;if(bt(N))!S&&N.spaceBefore&&w.push(""),uc(i,w,N.commentBefore,S),N.comment&&(T=N.comment);else if(vt(N)){const G=bt(N.key)?N.key:null;G&&(!S&&G.spaceBefore&&w.push(""),uc(i,w,G.commentBefore,S))}S=!1;let R=Us(N,v,()=>T=null,()=>S=!0);T&&(R+=Si(R,c,b(T))),S&&T&&(S=!1),w.push(r+R)}let _;if(w.length===0)_=l.start+l.end;else{_=w[0];for(let C=1;C<w.length;++C){const N=w[C];_+=N?`
108
108
  ${g}${N}`:`
109
109
  `}}return e?(_+=`
110
- `+pa(b(e),g),m&&m()):S&&d&&d(),_}function LD({items:e},n,{flowChars:i,itemIndent:r}){const{indent:l,indentStep:c,flowCollectionPadding:d,options:{commentString:m}}=n;r+=c;const g=Object.assign({},n,{indent:r,inFlow:!0,type:null});let b=!1,v=0;const S=[];for(let C=0;C<e.length;++C){const N=e[C];let T=null;if(bt(N))N.spaceBefore&&S.push(""),uc(n,S,N.commentBefore,!1),N.comment&&(T=N.comment);else if(vt(N)){const G=bt(N.key)?N.key:null;G&&(G.spaceBefore&&S.push(""),uc(n,S,G.commentBefore,!1),G.comment&&(b=!0));const H=bt(N.value)?N.value:null;H?(H.comment&&(T=H.comment),H.commentBefore&&(b=!0)):N.value==null&&G?.comment&&(T=G.comment)}T&&(b=!0);let R=$s(N,g,()=>T=null);C<e.length-1&&(R+=","),T&&(R+=Si(R,r,m(T))),!b&&(S.length>v||R.includes(`
110
+ `+pa(b(e),g),m&&m()):S&&d&&d(),_}function qD({items:e},n,{flowChars:i,itemIndent:r}){const{indent:l,indentStep:c,flowCollectionPadding:d,options:{commentString:m}}=n;r+=c;const g=Object.assign({},n,{indent:r,inFlow:!0,type:null});let b=!1,v=0;const S=[];for(let C=0;C<e.length;++C){const N=e[C];let T=null;if(bt(N))N.spaceBefore&&S.push(""),uc(n,S,N.commentBefore,!1),N.comment&&(T=N.comment);else if(vt(N)){const G=bt(N.key)?N.key:null;G&&(G.spaceBefore&&S.push(""),uc(n,S,G.commentBefore,!1),G.comment&&(b=!0));const H=bt(N.value)?N.value:null;H?(H.comment&&(T=H.comment),H.commentBefore&&(b=!0)):N.value==null&&G?.comment&&(T=G.comment)}T&&(b=!0);let R=Us(N,g,()=>T=null);C<e.length-1&&(R+=","),T&&(R+=Si(R,r,m(T))),!b&&(S.length>v||R.includes(`
111
111
  `))&&(b=!0),S.push(R),v=S.length}const{start:w,end:_}=i;if(S.length===0)return w+_;if(!b){const C=S.reduce((N,T)=>N+T.length+2,2);b=n.options.lineWidth>0&&C>n.options.lineWidth}if(b){let C=w;for(const N of S)C+=N?`
112
112
  ${c}${l}${N}`:`
113
113
  `;return`${C}
114
- ${l}${_}`}else return`${w}${d}${S.join(" ")}${d}${_}`}function uc({indent:e,options:{commentString:n}},i,r,l){if(r&&l&&(r=r.replace(/^\n+/,"")),r){const c=pa(n(r),e);i.push(c.trimStart())}}function xi(e,n){const i=nt(n)?n.value:n;for(const r of e)if(vt(r)&&(r.key===n||r.key===i||nt(r.key)&&r.key.value===i))return r}class jn extends f1{static get tagName(){return"tag:yaml.org,2002:map"}constructor(n){super(Ha,n),this.items=[]}static from(n,i,r){const{keepUndefined:l,replacer:c}=r,d=new this(n),m=(g,b)=>{if(typeof c=="function")b=c.call(i,g,b);else if(Array.isArray(c)&&!c.includes(g))return;(b!==void 0||l)&&d.items.push(jp(g,b,r))};if(i instanceof Map)for(const[g,b]of i)m(g,b);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 r;vt(n)?r=n:!n||typeof n!="object"||!("key"in n)?r=new Ht(n,n?.value):r=new Ht(n.key,n.value);const l=xi(this.items,r.key),c=this.schema?.sortMapEntries;if(l){if(!i)throw new Error(`Key ${r.key} already set`);nt(l.value)&&d1(r.value)?l.value.value=r.value:l.value=r.value}else if(c){const d=this.items.findIndex(m=>c(r,m)<0);d===-1?this.items.push(r):this.items.splice(d,0,r)}else this.items.push(r)}delete(n){const i=xi(this.items,n);return i?this.items.splice(this.items.indexOf(i),1).length>0:!1}get(n,i){const l=xi(this.items,n)?.value;return(!i&&nt(l)?l.value:l)??void 0}has(n){return!!xi(this.items,n)}set(n,i){this.add(new Ht(n,i),!0)}toJSON(n,i,r){const l=r?new r:i?.mapAsMap?new Map:{};i?.onCreate&&i.onCreate(l);for(const c of this.items)g1(i,l,c);return l}toString(n,i,r){if(!n)return JSON.stringify(this);for(const l of this.items)if(!vt(l))throw new Error(`Map items must all be pairs; found ${JSON.stringify(l)} instead`);return!n.allNullValues&&this.hasAllNullValues(!1)&&(n=Object.assign({},n,{allNullValues:!0})),y1(this,n,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:n.indent||"",onChompKeep:r,onComment:i})}}const Xs={collection:"map",default:!0,nodeClass:jn,tag:"tag:yaml.org,2002:map",resolve(e,n){return fo(e)||n("Expected a mapping for this tag"),e},createNode:(e,n,i)=>jn.from(e,n,i)};class ki extends f1{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(n){super(Qs,n),this.items=[]}add(n){this.items.push(n)}delete(n){const i=Il(n);return typeof i!="number"?!1:this.items.splice(i,1).length>0}get(n,i){const r=Il(n);if(typeof r!="number")return;const l=this.items[r];return!i&&nt(l)?l.value:l}has(n){const i=Il(n);return typeof i=="number"&&i<this.items.length}set(n,i){const r=Il(n);if(typeof r!="number")throw new Error(`Expected a valid index, not ${n}.`);const l=this.items[r];nt(l)&&d1(i)?l.value=i:this.items[r]=i}toJSON(n,i){const r=[];i?.onCreate&&i.onCreate(r);let l=0;for(const c of this.items)r.push(Nn(c,String(l++),i));return r}toString(n,i,r){return n?y1(this,n,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(n.indent||"")+" ",onChompKeep:r,onComment:i}):JSON.stringify(this)}static from(n,i,r){const{replacer:l}=r,c=new this(n);if(i&&Symbol.iterator in Object(i)){let d=0;for(let m of i){if(typeof l=="function"){const g=i instanceof Set?m:String(d++);m=l.call(i,g,m)}c.items.push(oo(m,void 0,r))}}return c}}function Il(e){let n=nt(e)?e.value:e;return n&&typeof n=="string"&&(n=Number(n)),typeof n=="number"&&Number.isInteger(n)&&n>=0?n:null}const Js={collection:"seq",default:!0,nodeClass:ki,tag:"tag:yaml.org,2002:seq",resolve(e,n){return po(e)||n("Expected a sequence for this tag"),e},createNode:(e,n,i)=>ki.from(e,n,i)},_c={identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify(e,n,i,r){return n=Object.assign({actualString:!0},n),wp(e,n,i,r)}},zc={identify:e=>e==null,createNode:()=>new ke(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new ke(null),stringify:({source:e},n)=>typeof e=="string"&&zc.test.test(e)?e:n.options.nullStr},Np={identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new ke(e[0]==="t"||e[0]==="T"),stringify({source:e,value:n},i){if(e&&Np.test.test(e)){const r=e[0]==="t"||e[0]==="T";if(n===r)return e}return n?i.options.trueStr:i.options.falseStr}};function Ln({format:e,minFractionDigits:n,tag:i,value:r}){if(typeof r=="bigint")return String(r);const l=typeof r=="number"?r:Number(r);if(!isFinite(l))return isNaN(l)?".nan":l<0?"-.inf":".inf";let c=Object.is(r,-0)?"-0":JSON.stringify(r);if(!e&&n&&(!i||i==="tag:yaml.org,2002:float")&&/^\d/.test(c)){let d=c.indexOf(".");d<0&&(d=c.length,c+=".");let m=n-(c.length-d-1);for(;m-- >0;)c+="0"}return c}const b1={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:Ln},v1={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():Ln(e)}},S1={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 ke(parseFloat(e)),i=e.indexOf(".");return i!==-1&&e[e.length-1]==="0"&&(n.minFractionDigits=e.length-i-1),n},stringify:Ln},Cc=e=>typeof e=="bigint"||Number.isInteger(e),kp=(e,n,i,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(n),i);function x1(e,n,i){const{value:r}=e;return Cc(r)&&r>=0?i+r.toString(n):Ln(e)}const w1={identify:e=>Cc(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,n,i)=>kp(e,2,8,i),stringify:e=>x1(e,8,"0o")},j1={identify:Cc,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,n,i)=>kp(e,0,10,i),stringify:Ln},N1={identify:e=>Cc(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,n,i)=>kp(e,2,16,i),stringify:e=>x1(e,16,"0x")},qD=[Xs,Js,_c,zc,Np,w1,j1,N1,b1,v1,S1];function qb(e){return typeof e=="bigint"||Number.isInteger(e)}const Hl=({value:e})=>JSON.stringify(e),UD=[{identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:Hl},{identify:e=>e==null,createNode:()=>new ke(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Hl},{identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>e==="true",stringify:Hl},{identify:qb,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})=>qb(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:Hl}],$D={default:!0,tag:"",test:/^/,resolve(e,n){return n(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},VD=[Xs,Js].concat(UD,$D),Ap={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,"")),r=new Uint8Array(i.length);for(let l=0;l<i.length;++l)r[l]=i.charCodeAt(l);return r}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},r,l,c){if(!i)return"";const d=i;let m;if(typeof btoa=="function"){let g="";for(let b=0;b<d.length;++b)g+=String.fromCharCode(d[b]);m=btoa(g)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(n??(n=ke.BLOCK_LITERAL),n!==ke.QUOTE_DOUBLE){const g=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),b=Math.ceil(m.length/g),v=new Array(b);for(let S=0,w=0;S<b;++S,w+=g)v[S]=m.substr(w,g);m=v.join(n===ke.BLOCK_LITERAL?`
114
+ ${l}${_}`}else return`${w}${d}${S.join(" ")}${d}${_}`}function uc({indent:e,options:{commentString:n}},i,r,l){if(r&&l&&(r=r.replace(/^\n+/,"")),r){const c=pa(n(r),e);i.push(c.trimStart())}}function xi(e,n){const i=nt(n)?n.value:n;for(const r of e)if(vt(r)&&(r.key===n||r.key===i||nt(r.key)&&r.key.value===i))return r}class jn extends f1{static get tagName(){return"tag:yaml.org,2002:map"}constructor(n){super(Ha,n),this.items=[]}static from(n,i,r){const{keepUndefined:l,replacer:c}=r,d=new this(n),m=(g,b)=>{if(typeof c=="function")b=c.call(i,g,b);else if(Array.isArray(c)&&!c.includes(g))return;(b!==void 0||l)&&d.items.push(jp(g,b,r))};if(i instanceof Map)for(const[g,b]of i)m(g,b);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 r;vt(n)?r=n:!n||typeof n!="object"||!("key"in n)?r=new Ht(n,n?.value):r=new Ht(n.key,n.value);const l=xi(this.items,r.key),c=this.schema?.sortMapEntries;if(l){if(!i)throw new Error(`Key ${r.key} already set`);nt(l.value)&&d1(r.value)?l.value.value=r.value:l.value=r.value}else if(c){const d=this.items.findIndex(m=>c(r,m)<0);d===-1?this.items.push(r):this.items.splice(d,0,r)}else this.items.push(r)}delete(n){const i=xi(this.items,n);return i?this.items.splice(this.items.indexOf(i),1).length>0:!1}get(n,i){const l=xi(this.items,n)?.value;return(!i&&nt(l)?l.value:l)??void 0}has(n){return!!xi(this.items,n)}set(n,i){this.add(new Ht(n,i),!0)}toJSON(n,i,r){const l=r?new r:i?.mapAsMap?new Map:{};i?.onCreate&&i.onCreate(l);for(const c of this.items)g1(i,l,c);return l}toString(n,i,r){if(!n)return JSON.stringify(this);for(const l of this.items)if(!vt(l))throw new Error(`Map items must all be pairs; found ${JSON.stringify(l)} instead`);return!n.allNullValues&&this.hasAllNullValues(!1)&&(n=Object.assign({},n,{allNullValues:!0})),y1(this,n,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:n.indent||"",onChompKeep:r,onComment:i})}}const Xs={collection:"map",default:!0,nodeClass:jn,tag:"tag:yaml.org,2002:map",resolve(e,n){return fo(e)||n("Expected a mapping for this tag"),e},createNode:(e,n,i)=>jn.from(e,n,i)};class ki extends f1{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(n){super(Qs,n),this.items=[]}add(n){this.items.push(n)}delete(n){const i=Il(n);return typeof i!="number"?!1:this.items.splice(i,1).length>0}get(n,i){const r=Il(n);if(typeof r!="number")return;const l=this.items[r];return!i&&nt(l)?l.value:l}has(n){const i=Il(n);return typeof i=="number"&&i<this.items.length}set(n,i){const r=Il(n);if(typeof r!="number")throw new Error(`Expected a valid index, not ${n}.`);const l=this.items[r];nt(l)&&d1(i)?l.value=i:this.items[r]=i}toJSON(n,i){const r=[];i?.onCreate&&i.onCreate(r);let l=0;for(const c of this.items)r.push(Nn(c,String(l++),i));return r}toString(n,i,r){return n?y1(this,n,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(n.indent||"")+" ",onChompKeep:r,onComment:i}):JSON.stringify(this)}static from(n,i,r){const{replacer:l}=r,c=new this(n);if(i&&Symbol.iterator in Object(i)){let d=0;for(let m of i){if(typeof l=="function"){const g=i instanceof Set?m:String(d++);m=l.call(i,g,m)}c.items.push(oo(m,void 0,r))}}return c}}function Il(e){let n=nt(e)?e.value:e;return n&&typeof n=="string"&&(n=Number(n)),typeof n=="number"&&Number.isInteger(n)&&n>=0?n:null}const Js={collection:"seq",default:!0,nodeClass:ki,tag:"tag:yaml.org,2002:seq",resolve(e,n){return po(e)||n("Expected a sequence for this tag"),e},createNode:(e,n,i)=>ki.from(e,n,i)},_c={identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify(e,n,i,r){return n=Object.assign({actualString:!0},n),wp(e,n,i,r)}},zc={identify:e=>e==null,createNode:()=>new ke(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new ke(null),stringify:({source:e},n)=>typeof e=="string"&&zc.test.test(e)?e:n.options.nullStr},Np={identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new ke(e[0]==="t"||e[0]==="T"),stringify({source:e,value:n},i){if(e&&Np.test.test(e)){const r=e[0]==="t"||e[0]==="T";if(n===r)return e}return n?i.options.trueStr:i.options.falseStr}};function Ln({format:e,minFractionDigits:n,tag:i,value:r}){if(typeof r=="bigint")return String(r);const l=typeof r=="number"?r:Number(r);if(!isFinite(l))return isNaN(l)?".nan":l<0?"-.inf":".inf";let c=Object.is(r,-0)?"-0":JSON.stringify(r);if(!e&&n&&(!i||i==="tag:yaml.org,2002:float")&&/^\d/.test(c)){let d=c.indexOf(".");d<0&&(d=c.length,c+=".");let m=n-(c.length-d-1);for(;m-- >0;)c+="0"}return c}const b1={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:Ln},v1={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():Ln(e)}},S1={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 ke(parseFloat(e)),i=e.indexOf(".");return i!==-1&&e[e.length-1]==="0"&&(n.minFractionDigits=e.length-i-1),n},stringify:Ln},Cc=e=>typeof e=="bigint"||Number.isInteger(e),kp=(e,n,i,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(n),i);function x1(e,n,i){const{value:r}=e;return Cc(r)&&r>=0?i+r.toString(n):Ln(e)}const w1={identify:e=>Cc(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,n,i)=>kp(e,2,8,i),stringify:e=>x1(e,8,"0o")},j1={identify:Cc,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,n,i)=>kp(e,0,10,i),stringify:Ln},N1={identify:e=>Cc(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,n,i)=>kp(e,2,16,i),stringify:e=>x1(e,16,"0x")},$D=[Xs,Js,_c,zc,Np,w1,j1,N1,b1,v1,S1];function qb(e){return typeof e=="bigint"||Number.isInteger(e)}const Hl=({value:e})=>JSON.stringify(e),UD=[{identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:Hl},{identify:e=>e==null,createNode:()=>new ke(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Hl},{identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>e==="true",stringify:Hl},{identify:qb,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})=>qb(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:Hl}],VD={default:!0,tag:"",test:/^/,resolve(e,n){return n(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},GD=[Xs,Js].concat(UD,VD),Ap={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,"")),r=new Uint8Array(i.length);for(let l=0;l<i.length;++l)r[l]=i.charCodeAt(l);return r}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},r,l,c){if(!i)return"";const d=i;let m;if(typeof btoa=="function"){let g="";for(let b=0;b<d.length;++b)g+=String.fromCharCode(d[b]);m=btoa(g)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(n??(n=ke.BLOCK_LITERAL),n!==ke.QUOTE_DOUBLE){const g=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),b=Math.ceil(m.length/g),v=new Array(b);for(let S=0,w=0;S<b;++S,w+=g)v[S]=m.substr(w,g);m=v.join(n===ke.BLOCK_LITERAL?`
115
115
  `:" ")}return wp({comment:e,type:n,value:m},r,l,c)}};function k1(e,n){if(po(e))for(let i=0;i<e.items.length;++i){let r=e.items[i];if(!vt(r)){if(fo(r)){r.items.length>1&&n("Each pair must have its own sequence indicator");const l=r.items[0]||new Ht(new ke(null));if(r.commentBefore&&(l.key.commentBefore=l.key.commentBefore?`${r.commentBefore}
116
116
  ${l.key.commentBefore}`:r.commentBefore),r.comment){const c=l.value??l.key;c.comment=c.comment?`${r.comment}
117
- ${c.comment}`:r.comment}r=l}e.items[i]=vt(r)?r:new Ht(r)}}else n("Expected a sequence for this tag");return e}function A1(e,n,i){const{replacer:r}=i,l=new ki(e);l.tag="tag:yaml.org,2002:pairs";let c=0;if(n&&Symbol.iterator in Object(n))for(let d of n){typeof r=="function"&&(d=r.call(n,String(c++),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 b=Object.keys(d);if(b.length===1)m=b[0],g=d[m];else throw new TypeError(`Expected tuple with one key, not ${b.length} keys`)}else m=d;l.items.push(jp(m,g,i))}return l}const _p={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:k1,createNode:A1};class Ms extends ki{constructor(){super(),this.add=jn.prototype.add.bind(this),this.delete=jn.prototype.delete.bind(this),this.get=jn.prototype.get.bind(this),this.has=jn.prototype.has.bind(this),this.set=jn.prototype.set.bind(this),this.tag=Ms.tag}toJSON(n,i){if(!i)return super.toJSON(n);const r=new Map;i?.onCreate&&i.onCreate(r);for(const l of this.items){let c,d;if(vt(l)?(c=Nn(l.key,"",i),d=Nn(l.value,c,i)):c=Nn(l,"",i),r.has(c))throw new Error("Ordered maps must not include duplicate keys");r.set(c,d)}return r}static from(n,i,r){const l=A1(n,i,r),c=new this;return c.items=l.items,c}}Ms.tag="tag:yaml.org,2002:omap";const zp={collection:"seq",identify:e=>e instanceof Map,nodeClass:Ms,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,n){const i=k1(e,n),r=[];for(const{key:l}of i.items)nt(l)&&(r.includes(l.value)?n(`Ordered maps must not include duplicate keys: ${l.value}`):r.push(l.value));return Object.assign(new Ms,i)},createNode:(e,n,i)=>Ms.from(e,n,i)};function _1({value:e,source:n},i){return n&&(e?z1:C1).test.test(n)?n:e?i.options.trueStr:i.options.falseStr}const z1={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 ke(!0),stringify:_1},C1={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 ke(!1),stringify:_1},GD={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:Ln},ID={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():Ln(e)}},HD={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 ke(parseFloat(e.replace(/_/g,""))),i=e.indexOf(".");if(i!==-1){const r=e.substring(i+1).replace(/_/g,"");r[r.length-1]==="0"&&(n.minFractionDigits=r.length)}return n},stringify:Ln},mo=e=>typeof e=="bigint"||Number.isInteger(e);function Tc(e,n,i,{intAsBigInt:r}){const l=e[0];if((l==="-"||l==="+")&&(n+=1),e=e.substring(n).replace(/_/g,""),r){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 l==="-"?BigInt(-1)*d:d}const c=parseInt(e,i);return l==="-"?-1*c:c}function Cp(e,n,i){const{value:r}=e;if(mo(r)){const l=r.toString(n);return r<0?"-"+i+l.substr(1):i+l}return Ln(e)}const ZD={identify:mo,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,n,i)=>Tc(e,2,2,i),stringify:e=>Cp(e,2,"0b")},PD={identify:mo,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,n,i)=>Tc(e,1,8,i),stringify:e=>Cp(e,8,"0")},KD={identify:mo,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,n,i)=>Tc(e,0,10,i),stringify:Ln},QD={identify:mo,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,n,i)=>Tc(e,2,16,i),stringify:e=>Cp(e,16,"0x")};class Bs extends jn{constructor(n){super(n),this.tag=Bs.tag}add(n){let i;vt(n)?i=n:n&&typeof n=="object"&&"key"in n&&"value"in n&&n.value===null?i=new Ht(n.key,null):i=new Ht(n,null),xi(this.items,i.key)||this.items.push(i)}get(n,i){const r=xi(this.items,n);return!i&&vt(r)?nt(r.key)?r.key.value:r.key:r}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 r=xi(this.items,n);r&&!i?this.items.splice(this.items.indexOf(r),1):!r&&i&&this.items.push(new Ht(n))}toJSON(n,i){return super.toJSON(n,i,Set)}toString(n,i,r){if(!n)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},n,{allNullValues:!0}),i,r);throw new Error("Set items must all have null values")}static from(n,i,r){const{replacer:l}=r,c=new this(n);if(i&&Symbol.iterator in Object(i))for(let d of i)typeof l=="function"&&(d=l.call(i,d,d)),c.items.push(jp(d,null,r));return c}}Bs.tag="tag:yaml.org,2002:set";const Tp={collection:"map",identify:e=>e instanceof Set,nodeClass:Bs,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,n,i)=>Bs.from(e,n,i),resolve(e,n){if(fo(e)){if(e.hasAllNullValues(!0))return Object.assign(new Bs,e);n("Set items must all have null values")}else n("Expected a mapping for this tag");return e}};function Ep(e,n){const i=e[0],r=i==="-"||i==="+"?e.substring(1):e,l=d=>n?BigInt(d):Number(d),c=r.replace(/_/g,"").split(":").reduce((d,m)=>d*l(60)+l(m),l(0));return i==="-"?l(-1)*c:c}function T1(e){let{value:n}=e,i=d=>d;if(typeof n=="bigint")i=d=>BigInt(d);else if(isNaN(n)||!isFinite(n))return Ln(e);let r="";n<0&&(r="-",n*=i(-1));const l=i(60),c=[n%l];return n<60?c.unshift(0):(n=(n-c[0])/l,c.unshift(n%l),n>=60&&(n=(n-c[0])/l,c.unshift(n))),r+c.map(d=>String(d).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const E1={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})=>Ep(e,i),stringify:T1},O1={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=>Ep(e,!1),stringify:T1},Ec={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(Ec.test);if(!n)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,i,r,l,c,d,m]=n.map(Number),g=n[7]?Number((n[7]+"00").substr(1,3)):0;let b=Date.UTC(i,r-1,l,c||0,d||0,m||0,g);const v=n[8];if(v&&v!=="Z"){let S=Ep(v,!1);Math.abs(S)<30&&(S*=60),b-=6e4*S}return new Date(b)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""},Ub=[Xs,Js,_c,zc,z1,C1,ZD,PD,KD,QD,GD,ID,HD,Ap,ma,zp,_p,Tp,E1,O1,Ec],$b=new Map([["core",qD],["failsafe",[Xs,Js,_c]],["json",VD],["yaml11",Ub],["yaml-1.1",Ub]]),Vb={binary:Ap,bool:Np,float:S1,floatExp:v1,floatNaN:b1,floatTime:O1,int:j1,intHex:N1,intOct:w1,intTime:E1,map:Xs,merge:ma,null:zc,omap:zp,pairs:_p,seq:Js,set:Tp,timestamp:Ec},YD={"tag:yaml.org,2002:binary":Ap,"tag:yaml.org,2002:merge":ma,"tag:yaml.org,2002:omap":zp,"tag:yaml.org,2002:pairs":_p,"tag:yaml.org,2002:set":Tp,"tag:yaml.org,2002:timestamp":Ec};function of(e,n,i){const r=$b.get(n);if(r&&!e)return i&&!r.includes(ma)?r.concat(ma):r.slice();let l=r;if(!l)if(Array.isArray(e))l=[];else{const c=Array.from($b.keys()).filter(d=>d!=="yaml11").map(d=>JSON.stringify(d)).join(", ");throw new Error(`Unknown schema "${n}"; use one of ${c} or define customTags array`)}if(Array.isArray(e))for(const c of e)l=l.concat(c);else typeof e=="function"&&(l=e(l.slice()));return i&&(l=l.concat(ma)),l.reduce((c,d)=>{const m=typeof d=="string"?Vb[d]:d;if(!m){const g=JSON.stringify(d),b=Object.keys(Vb).map(v=>JSON.stringify(v)).join(", ");throw new Error(`Unknown custom tag ${g}; use one of ${b}`)}return c.includes(m)||c.push(m),c},[])}const XD=(e,n)=>e.key<n.key?-1:e.key>n.key?1:0;class Op{constructor({compat:n,customTags:i,merge:r,resolveKnownTags:l,schema:c,sortMapEntries:d,toStringDefaults:m}){this.compat=Array.isArray(n)?of(n,"compat"):n?of(null,n):null,this.name=typeof c=="string"&&c||"core",this.knownTags=l?YD:{},this.tags=of(i,this.name,r),this.toStringOptions=m??null,Object.defineProperty(this,Ha,{value:Xs}),Object.defineProperty(this,Hn,{value:_c}),Object.defineProperty(this,Qs,{value:Js}),this.sortMapEntries=typeof d=="function"?d:d===!0?XD:null}clone(){const n=Object.create(Op.prototype,Object.getOwnPropertyDescriptors(this));return n.tags=this.tags.slice(),n}}function JD(e,n){const i=[];let r=n.directives===!0;if(n.directives!==!1&&e.directives){const g=e.directives.toString(e);g?(i.push(g),r=!0):e.directives.docStart&&(r=!0)}r&&i.push("---");const l=m1(e,n),{commentString:c}=l.options;if(e.commentBefore){i.length!==1&&i.unshift("");const g=c(e.commentBefore);i.unshift(pa(g,""))}let d=!1,m=null;if(e.contents){if(bt(e.contents)){if(e.contents.spaceBefore&&r&&i.push(""),e.contents.commentBefore){const v=c(e.contents.commentBefore);i.push(pa(v,""))}l.forceBlockIndent=!!e.comment,m=e.contents.comment}const g=m?void 0:()=>d=!0;let b=$s(e.contents,l,()=>m=null,g);m&&(b+=Si(b,"",c(m))),(b[0]==="|"||b[0]===">")&&i[i.length-1]==="---"?i[i.length-1]=`--- ${b}`:i.push(b)}else i.push($s(e.contents,l));if(e.directives?.docEnd)if(e.comment){const g=c(e.comment);g.includes(`
117
+ ${c.comment}`:r.comment}r=l}e.items[i]=vt(r)?r:new Ht(r)}}else n("Expected a sequence for this tag");return e}function A1(e,n,i){const{replacer:r}=i,l=new ki(e);l.tag="tag:yaml.org,2002:pairs";let c=0;if(n&&Symbol.iterator in Object(n))for(let d of n){typeof r=="function"&&(d=r.call(n,String(c++),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 b=Object.keys(d);if(b.length===1)m=b[0],g=d[m];else throw new TypeError(`Expected tuple with one key, not ${b.length} keys`)}else m=d;l.items.push(jp(m,g,i))}return l}const _p={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:k1,createNode:A1};class Ms extends ki{constructor(){super(),this.add=jn.prototype.add.bind(this),this.delete=jn.prototype.delete.bind(this),this.get=jn.prototype.get.bind(this),this.has=jn.prototype.has.bind(this),this.set=jn.prototype.set.bind(this),this.tag=Ms.tag}toJSON(n,i){if(!i)return super.toJSON(n);const r=new Map;i?.onCreate&&i.onCreate(r);for(const l of this.items){let c,d;if(vt(l)?(c=Nn(l.key,"",i),d=Nn(l.value,c,i)):c=Nn(l,"",i),r.has(c))throw new Error("Ordered maps must not include duplicate keys");r.set(c,d)}return r}static from(n,i,r){const l=A1(n,i,r),c=new this;return c.items=l.items,c}}Ms.tag="tag:yaml.org,2002:omap";const zp={collection:"seq",identify:e=>e instanceof Map,nodeClass:Ms,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,n){const i=k1(e,n),r=[];for(const{key:l}of i.items)nt(l)&&(r.includes(l.value)?n(`Ordered maps must not include duplicate keys: ${l.value}`):r.push(l.value));return Object.assign(new Ms,i)},createNode:(e,n,i)=>Ms.from(e,n,i)};function _1({value:e,source:n},i){return n&&(e?z1:C1).test.test(n)?n:e?i.options.trueStr:i.options.falseStr}const z1={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 ke(!0),stringify:_1},C1={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 ke(!1),stringify:_1},ID={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:Ln},HD={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():Ln(e)}},ZD={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 ke(parseFloat(e.replace(/_/g,""))),i=e.indexOf(".");if(i!==-1){const r=e.substring(i+1).replace(/_/g,"");r[r.length-1]==="0"&&(n.minFractionDigits=r.length)}return n},stringify:Ln},mo=e=>typeof e=="bigint"||Number.isInteger(e);function Tc(e,n,i,{intAsBigInt:r}){const l=e[0];if((l==="-"||l==="+")&&(n+=1),e=e.substring(n).replace(/_/g,""),r){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 l==="-"?BigInt(-1)*d:d}const c=parseInt(e,i);return l==="-"?-1*c:c}function Cp(e,n,i){const{value:r}=e;if(mo(r)){const l=r.toString(n);return r<0?"-"+i+l.substr(1):i+l}return Ln(e)}const PD={identify:mo,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,n,i)=>Tc(e,2,2,i),stringify:e=>Cp(e,2,"0b")},KD={identify:mo,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,n,i)=>Tc(e,1,8,i),stringify:e=>Cp(e,8,"0")},QD={identify:mo,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,n,i)=>Tc(e,0,10,i),stringify:Ln},YD={identify:mo,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,n,i)=>Tc(e,2,16,i),stringify:e=>Cp(e,16,"0x")};class Bs extends jn{constructor(n){super(n),this.tag=Bs.tag}add(n){let i;vt(n)?i=n:n&&typeof n=="object"&&"key"in n&&"value"in n&&n.value===null?i=new Ht(n.key,null):i=new Ht(n,null),xi(this.items,i.key)||this.items.push(i)}get(n,i){const r=xi(this.items,n);return!i&&vt(r)?nt(r.key)?r.key.value:r.key:r}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 r=xi(this.items,n);r&&!i?this.items.splice(this.items.indexOf(r),1):!r&&i&&this.items.push(new Ht(n))}toJSON(n,i){return super.toJSON(n,i,Set)}toString(n,i,r){if(!n)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},n,{allNullValues:!0}),i,r);throw new Error("Set items must all have null values")}static from(n,i,r){const{replacer:l}=r,c=new this(n);if(i&&Symbol.iterator in Object(i))for(let d of i)typeof l=="function"&&(d=l.call(i,d,d)),c.items.push(jp(d,null,r));return c}}Bs.tag="tag:yaml.org,2002:set";const Tp={collection:"map",identify:e=>e instanceof Set,nodeClass:Bs,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,n,i)=>Bs.from(e,n,i),resolve(e,n){if(fo(e)){if(e.hasAllNullValues(!0))return Object.assign(new Bs,e);n("Set items must all have null values")}else n("Expected a mapping for this tag");return e}};function Ep(e,n){const i=e[0],r=i==="-"||i==="+"?e.substring(1):e,l=d=>n?BigInt(d):Number(d),c=r.replace(/_/g,"").split(":").reduce((d,m)=>d*l(60)+l(m),l(0));return i==="-"?l(-1)*c:c}function T1(e){let{value:n}=e,i=d=>d;if(typeof n=="bigint")i=d=>BigInt(d);else if(isNaN(n)||!isFinite(n))return Ln(e);let r="";n<0&&(r="-",n*=i(-1));const l=i(60),c=[n%l];return n<60?c.unshift(0):(n=(n-c[0])/l,c.unshift(n%l),n>=60&&(n=(n-c[0])/l,c.unshift(n))),r+c.map(d=>String(d).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const E1={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})=>Ep(e,i),stringify:T1},O1={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=>Ep(e,!1),stringify:T1},Ec={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(Ec.test);if(!n)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,i,r,l,c,d,m]=n.map(Number),g=n[7]?Number((n[7]+"00").substr(1,3)):0;let b=Date.UTC(i,r-1,l,c||0,d||0,m||0,g);const v=n[8];if(v&&v!=="Z"){let S=Ep(v,!1);Math.abs(S)<30&&(S*=60),b-=6e4*S}return new Date(b)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""},$b=[Xs,Js,_c,zc,z1,C1,PD,KD,QD,YD,ID,HD,ZD,Ap,ma,zp,_p,Tp,E1,O1,Ec],Ub=new Map([["core",$D],["failsafe",[Xs,Js,_c]],["json",GD],["yaml11",$b],["yaml-1.1",$b]]),Vb={binary:Ap,bool:Np,float:S1,floatExp:v1,floatNaN:b1,floatTime:O1,int:j1,intHex:N1,intOct:w1,intTime:E1,map:Xs,merge:ma,null:zc,omap:zp,pairs:_p,seq:Js,set:Tp,timestamp:Ec},XD={"tag:yaml.org,2002:binary":Ap,"tag:yaml.org,2002:merge":ma,"tag:yaml.org,2002:omap":zp,"tag:yaml.org,2002:pairs":_p,"tag:yaml.org,2002:set":Tp,"tag:yaml.org,2002:timestamp":Ec};function of(e,n,i){const r=Ub.get(n);if(r&&!e)return i&&!r.includes(ma)?r.concat(ma):r.slice();let l=r;if(!l)if(Array.isArray(e))l=[];else{const c=Array.from(Ub.keys()).filter(d=>d!=="yaml11").map(d=>JSON.stringify(d)).join(", ");throw new Error(`Unknown schema "${n}"; use one of ${c} or define customTags array`)}if(Array.isArray(e))for(const c of e)l=l.concat(c);else typeof e=="function"&&(l=e(l.slice()));return i&&(l=l.concat(ma)),l.reduce((c,d)=>{const m=typeof d=="string"?Vb[d]:d;if(!m){const g=JSON.stringify(d),b=Object.keys(Vb).map(v=>JSON.stringify(v)).join(", ");throw new Error(`Unknown custom tag ${g}; use one of ${b}`)}return c.includes(m)||c.push(m),c},[])}const JD=(e,n)=>e.key<n.key?-1:e.key>n.key?1:0;class Op{constructor({compat:n,customTags:i,merge:r,resolveKnownTags:l,schema:c,sortMapEntries:d,toStringDefaults:m}){this.compat=Array.isArray(n)?of(n,"compat"):n?of(null,n):null,this.name=typeof c=="string"&&c||"core",this.knownTags=l?XD:{},this.tags=of(i,this.name,r),this.toStringOptions=m??null,Object.defineProperty(this,Ha,{value:Xs}),Object.defineProperty(this,Hn,{value:_c}),Object.defineProperty(this,Qs,{value:Js}),this.sortMapEntries=typeof d=="function"?d:d===!0?JD:null}clone(){const n=Object.create(Op.prototype,Object.getOwnPropertyDescriptors(this));return n.tags=this.tags.slice(),n}}function FD(e,n){const i=[];let r=n.directives===!0;if(n.directives!==!1&&e.directives){const g=e.directives.toString(e);g?(i.push(g),r=!0):e.directives.docStart&&(r=!0)}r&&i.push("---");const l=m1(e,n),{commentString:c}=l.options;if(e.commentBefore){i.length!==1&&i.unshift("");const g=c(e.commentBefore);i.unshift(pa(g,""))}let d=!1,m=null;if(e.contents){if(bt(e.contents)){if(e.contents.spaceBefore&&r&&i.push(""),e.contents.commentBefore){const v=c(e.contents.commentBefore);i.push(pa(v,""))}l.forceBlockIndent=!!e.comment,m=e.contents.comment}const g=m?void 0:()=>d=!0;let b=Us(e.contents,l,()=>m=null,g);m&&(b+=Si(b,"",c(m))),(b[0]==="|"||b[0]===">")&&i[i.length-1]==="---"?i[i.length-1]=`--- ${b}`:i.push(b)}else i.push(Us(e.contents,l));if(e.directives?.docEnd)if(e.comment){const g=c(e.comment);g.includes(`
118
118
  `)?(i.push("..."),i.push(pa(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(pa(c(g),"")))}return i.join(`
119
119
  `)+`
120
- `}class Oc{constructor(n,i,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,kn,{value:_f});let l=null;typeof i=="function"||Array.isArray(i)?l=i:r===void 0&&i&&(r=i,i=void 0);const c=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=c;let{version:d}=c;r?._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(d=this.directives.yaml.version)):this.directives=new Gt({version:d}),this.setSchema(d,r),this.contents=n===void 0?null:this.createNode(n,l,r)}clone(){const n=Object.create(Oc.prototype,{[kn]:{value:_f}});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=bt(this.contents)?this.contents.clone(n.schema):this.contents,this.range&&(n.range=this.range.slice()),n}add(n){As(this.contents)&&this.contents.add(n)}addIn(n,i){As(this.contents)&&this.contents.addIn(n,i)}createAlias(n,i){if(!n.anchor){const r=c1(this);n.anchor=!i||r.has(i)?u1(i||"a",r):i}return new xp(n.anchor)}createNode(n,i,r){let l;if(typeof i=="function")n=i.call({"":n},"",n),l=i;else if(Array.isArray(i)){const T=G=>typeof G=="number"||G instanceof String||G instanceof Number,R=i.filter(T).map(String);R.length>0&&(i=i.concat(R)),l=i}else r===void 0&&i&&(r=i,i=void 0);const{aliasDuplicateObjects:c,anchorPrefix:d,flow:m,keepUndefined:g,onTagObj:b,tag:v}=r??{},{onAnchor:S,setAnchors:w,sourceObjects:_}=ND(this,d||"a"),C={aliasDuplicateObjects:c??!0,keepUndefined:g??!1,onAnchor:S,onTagObj:b,replacer:l,schema:this.schema,sourceObjects:_},N=oo(n,v,C);return m&&yt(N)&&(N.flow=!0),w(),N}createPair(n,i,r={}){const l=this.createNode(n,null,r),c=this.createNode(i,null,r);return new Ht(l,c)}delete(n){return As(this.contents)?this.contents.delete(n):!1}deleteIn(n){return to(n)?this.contents==null?!1:(this.contents=null,!0):As(this.contents)?this.contents.deleteIn(n):!1}get(n,i){return yt(this.contents)?this.contents.get(n,i):void 0}getIn(n,i){return to(n)?!i&&nt(this.contents)?this.contents.value:this.contents:yt(this.contents)?this.contents.getIn(n,i):void 0}has(n){return yt(this.contents)?this.contents.has(n):!1}hasIn(n){return to(n)?this.contents!==void 0:yt(this.contents)?this.contents.hasIn(n):!1}set(n,i){this.contents==null?this.contents=cc(this.schema,[n],i):As(this.contents)&&this.contents.set(n,i)}setIn(n,i){to(n)?this.contents=i:this.contents==null?this.contents=cc(this.schema,Array.from(n),i):As(this.contents)&&this.contents.setIn(n,i)}setSchema(n,i={}){typeof n=="number"&&(n=String(n));let r;switch(n){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Gt({version:"1.1"}),r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=n:this.directives=new Gt({version:n}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{const l=JSON.stringify(n);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${l}`)}}if(i.schema instanceof Object)this.schema=i.schema;else if(r)this.schema=new Op(Object.assign(r,i));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:n,jsonArg:i,mapAsMap:r,maxAliasCount:l,onAnchor:c,reviver:d}={}){const m={anchors:new Map,doc:this,keep:!n,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof l=="number"?l:100},g=Nn(this.contents,i??"",m);if(typeof c=="function")for(const{count:b,res:v}of m.anchors.values())c(v,b);return typeof d=="function"?Es(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 JD(this,n)}}function As(e){if(yt(e))return!0;throw new Error("Expected a YAML collection as document contents")}class D1 extends Error{constructor(n,i,r,l){super(),this.name=n,this.code=r,this.message=l,this.pos=i}}class Zl extends D1{constructor(n,i,r){super("YAMLParseError",n,i,r)}}class FD extends D1{constructor(n,i,r){super("YAMLWarning",n,i,r)}}const Gb=(e,n)=>i=>{if(i.pos[0]===-1)return;i.linePos=i.pos.map(m=>n.linePos(m));const{line:r,col:l}=i.linePos[0];i.message+=` at line ${r}, column ${l}`;let c=l-1,d=e.substring(n.lineStarts[r-1],n.lineStarts[r]).replace(/[\n\r]+$/,"");if(c>=60&&d.length>80){const m=Math.min(c-39,d.length-79);d="…"+d.substring(m),c-=m-1}if(d.length>80&&(d=d.substring(0,79)+"…"),r>1&&/^ *$/.test(d.substring(0,c))){let m=e.substring(n.lineStarts[r-2],n.lineStarts[r-1]);m.length>80&&(m=m.substring(0,79)+`…
120
+ `}class Oc{constructor(n,i,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,kn,{value:_f});let l=null;typeof i=="function"||Array.isArray(i)?l=i:r===void 0&&i&&(r=i,i=void 0);const c=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=c;let{version:d}=c;r?._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(d=this.directives.yaml.version)):this.directives=new Gt({version:d}),this.setSchema(d,r),this.contents=n===void 0?null:this.createNode(n,l,r)}clone(){const n=Object.create(Oc.prototype,{[kn]:{value:_f}});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=bt(this.contents)?this.contents.clone(n.schema):this.contents,this.range&&(n.range=this.range.slice()),n}add(n){As(this.contents)&&this.contents.add(n)}addIn(n,i){As(this.contents)&&this.contents.addIn(n,i)}createAlias(n,i){if(!n.anchor){const r=c1(this);n.anchor=!i||r.has(i)?u1(i||"a",r):i}return new xp(n.anchor)}createNode(n,i,r){let l;if(typeof i=="function")n=i.call({"":n},"",n),l=i;else if(Array.isArray(i)){const T=G=>typeof G=="number"||G instanceof String||G instanceof Number,R=i.filter(T).map(String);R.length>0&&(i=i.concat(R)),l=i}else r===void 0&&i&&(r=i,i=void 0);const{aliasDuplicateObjects:c,anchorPrefix:d,flow:m,keepUndefined:g,onTagObj:b,tag:v}=r??{},{onAnchor:S,setAnchors:w,sourceObjects:_}=kD(this,d||"a"),C={aliasDuplicateObjects:c??!0,keepUndefined:g??!1,onAnchor:S,onTagObj:b,replacer:l,schema:this.schema,sourceObjects:_},N=oo(n,v,C);return m&&yt(N)&&(N.flow=!0),w(),N}createPair(n,i,r={}){const l=this.createNode(n,null,r),c=this.createNode(i,null,r);return new Ht(l,c)}delete(n){return As(this.contents)?this.contents.delete(n):!1}deleteIn(n){return to(n)?this.contents==null?!1:(this.contents=null,!0):As(this.contents)?this.contents.deleteIn(n):!1}get(n,i){return yt(this.contents)?this.contents.get(n,i):void 0}getIn(n,i){return to(n)?!i&&nt(this.contents)?this.contents.value:this.contents:yt(this.contents)?this.contents.getIn(n,i):void 0}has(n){return yt(this.contents)?this.contents.has(n):!1}hasIn(n){return to(n)?this.contents!==void 0:yt(this.contents)?this.contents.hasIn(n):!1}set(n,i){this.contents==null?this.contents=cc(this.schema,[n],i):As(this.contents)&&this.contents.set(n,i)}setIn(n,i){to(n)?this.contents=i:this.contents==null?this.contents=cc(this.schema,Array.from(n),i):As(this.contents)&&this.contents.setIn(n,i)}setSchema(n,i={}){typeof n=="number"&&(n=String(n));let r;switch(n){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Gt({version:"1.1"}),r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=n:this.directives=new Gt({version:n}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{const l=JSON.stringify(n);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${l}`)}}if(i.schema instanceof Object)this.schema=i.schema;else if(r)this.schema=new Op(Object.assign(r,i));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:n,jsonArg:i,mapAsMap:r,maxAliasCount:l,onAnchor:c,reviver:d}={}){const m={anchors:new Map,doc:this,keep:!n,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof l=="number"?l:100},g=Nn(this.contents,i??"",m);if(typeof c=="function")for(const{count:b,res:v}of m.anchors.values())c(v,b);return typeof d=="function"?Es(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 FD(this,n)}}function As(e){if(yt(e))return!0;throw new Error("Expected a YAML collection as document contents")}class D1 extends Error{constructor(n,i,r,l){super(),this.name=n,this.code=r,this.message=l,this.pos=i}}class Zl extends D1{constructor(n,i,r){super("YAMLParseError",n,i,r)}}class WD extends D1{constructor(n,i,r){super("YAMLWarning",n,i,r)}}const Gb=(e,n)=>i=>{if(i.pos[0]===-1)return;i.linePos=i.pos.map(m=>n.linePos(m));const{line:r,col:l}=i.linePos[0];i.message+=` at line ${r}, column ${l}`;let c=l-1,d=e.substring(n.lineStarts[r-1],n.lineStarts[r]).replace(/[\n\r]+$/,"");if(c>=60&&d.length>80){const m=Math.min(c-39,d.length-79);d="…"+d.substring(m),c-=m-1}if(d.length>80&&(d=d.substring(0,79)+"…"),r>1&&/^ *$/.test(d.substring(0,c))){let m=e.substring(n.lineStarts[r-2],n.lineStarts[r-1]);m.length>80&&(m=m.substring(0,79)+`…
121
121
  `),d=m+d}if(/[^ ]/.test(d)){let m=1;const g=i.linePos[1];g?.line===r&&g.col>l&&(m=Math.max(1,Math.min(g.col-l,80-c)));const b=" ".repeat(c)+"^".repeat(m);i.message+=`:
122
122
 
123
123
  ${d}
124
124
  ${b}
125
125
  `}};function Vs(e,{flow:n,indicator:i,next:r,offset:l,onError:c,parentIndent:d,startOnNewline:m}){let g=!1,b=m,v=m,S="",w="",_=!1,C=!1,N=null,T=null,R=null,G=null,H=null,K=null,X=null;for(const M of e)switch(C&&(M.type!=="space"&&M.type!=="newline"&&M.type!=="comma"&&c(M.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),C=!1),N&&(b&&M.type!=="comment"&&M.type!=="newline"&&c(N,"TAB_AS_INDENT","Tabs are not allowed as indentation"),N=null),M.type){case"space":!n&&(i!=="doc-start"||r?.type!=="flow-collection")&&M.source.includes(" ")&&(N=M),v=!0;break;case"comment":{v||c(M,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const oe=M.source.substring(1)||" ";S?S+=w+oe:S=oe,w="",b=!1;break}case"newline":b?S?S+=M.source:(!K||i!=="seq-item-ind")&&(g=!0):w+=M.source,b=!0,_=!0,(T||R)&&(G=M),v=!0;break;case"anchor":T&&c(M,"MULTIPLE_ANCHORS","A node can have at most one anchor"),M.source.endsWith(":")&&c(M.offset+M.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),T=M,X??(X=M.offset),b=!1,v=!1,C=!0;break;case"tag":{R&&c(M,"MULTIPLE_TAGS","A node can have at most one tag"),R=M,X??(X=M.offset),b=!1,v=!1,C=!0;break}case i:(T||R)&&c(M,"BAD_PROP_ORDER",`Anchors and tags must be after the ${M.source} indicator`),K&&c(M,"UNEXPECTED_TOKEN",`Unexpected ${M.source} in ${n??"collection"}`),K=M,b=i==="seq-item-ind"||i==="explicit-key-ind",v=!1;break;case"comma":if(n){H&&c(M,"UNEXPECTED_TOKEN",`Unexpected , in ${n}`),H=M,b=!1,v=!1;break}default:c(M,"UNEXPECTED_TOKEN",`Unexpected ${M.type} token`),b=!1,v=!1}const J=e[e.length-1],D=J?J.offset+J.source.length:l;return C&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!=="")&&c(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),N&&(b&&N.indent<=d||r?.type==="block-map"||r?.type==="block-seq")&&c(N,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:H,found:K,spaceBefore:g,comment:S,hasNewline:_,anchor:T,tag:R,newlineAfterProp:G,end:D,start:X??D}}function lo(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes(`
126
- `))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(lo(n.key)||lo(n.value))return!0}return!1;default:return!0}}function Ef(e,n,i){if(n?.type==="flow-collection"){const r=n.end[0];r.indent===e&&(r.source==="]"||r.source==="}")&&lo(n)&&i(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function R1(e,n,i){const{uniqueKeys:r}=e.options;if(r===!1)return!1;const l=typeof r=="function"?r:(c,d)=>c===d||nt(c)&&nt(d)&&c.value===d.value;return n.some(c=>l(c.key,i))}const Ib="All mapping items must start at the same column";function WD({composeNode:e,composeEmptyNode:n},i,r,l,c){const d=c?.nodeClass??jn,m=new d(i.schema);i.atRoot&&(i.atRoot=!1);let g=r.offset,b=null;for(const v of r.items){const{start:S,key:w,sep:_,value:C}=v,N=Vs(S,{indicator:"explicit-key-ind",next:w??_?.[0],offset:g,onError:l,parentIndent:r.indent,startOnNewline:!0}),T=!N.found;if(T){if(w&&(w.type==="block-seq"?l(g,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in w&&w.indent!==r.indent&&l(g,"BAD_INDENT",Ib)),!N.anchor&&!N.tag&&!_){b=N.end,N.comment&&(m.comment?m.comment+=`
126
+ `))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(lo(n.key)||lo(n.value))return!0}return!1;default:return!0}}function Ef(e,n,i){if(n?.type==="flow-collection"){const r=n.end[0];r.indent===e&&(r.source==="]"||r.source==="}")&&lo(n)&&i(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function R1(e,n,i){const{uniqueKeys:r}=e.options;if(r===!1)return!1;const l=typeof r=="function"?r:(c,d)=>c===d||nt(c)&&nt(d)&&c.value===d.value;return n.some(c=>l(c.key,i))}const Ib="All mapping items must start at the same column";function e5({composeNode:e,composeEmptyNode:n},i,r,l,c){const d=c?.nodeClass??jn,m=new d(i.schema);i.atRoot&&(i.atRoot=!1);let g=r.offset,b=null;for(const v of r.items){const{start:S,key:w,sep:_,value:C}=v,N=Vs(S,{indicator:"explicit-key-ind",next:w??_?.[0],offset:g,onError:l,parentIndent:r.indent,startOnNewline:!0}),T=!N.found;if(T){if(w&&(w.type==="block-seq"?l(g,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in w&&w.indent!==r.indent&&l(g,"BAD_INDENT",Ib)),!N.anchor&&!N.tag&&!_){b=N.end,N.comment&&(m.comment?m.comment+=`
127
127
  `+N.comment:m.comment=N.comment);continue}(N.newlineAfterProp||lo(w))&&l(w??S[S.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else N.found?.indent!==r.indent&&l(g,"BAD_INDENT",Ib);i.atKey=!0;const R=N.end,G=w?e(i,w,N,l):n(i,R,S,null,N,l);i.schema.compat&&Ef(r.indent,w,l),i.atKey=!1,R1(i,m.items,G)&&l(R,"DUPLICATE_KEY","Map keys must be unique");const H=Vs(_??[],{indicator:"map-value-ind",next:C,offset:G.range[2],onError:l,parentIndent:r.indent,startOnNewline:!w||w.type==="block-scalar"});if(g=H.end,H.found){T&&(C?.type==="block-map"&&!H.hasNewline&&l(g,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),i.options.strict&&N.start<H.found.offset-1024&&l(G.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const K=C?e(i,C,H,l):n(i,g,_,null,H,l);i.schema.compat&&Ef(r.indent,C,l),g=K.range[2];const X=new Ht(G,K);i.options.keepSourceTokens&&(X.srcToken=v),m.items.push(X)}else{T&&l(G.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),H.comment&&(G.comment?G.comment+=`
128
- `+H.comment:G.comment=H.comment);const K=new Ht(G);i.options.keepSourceTokens&&(K.srcToken=v),m.items.push(K)}}return b&&b<g&&l(b,"IMPOSSIBLE","Map comment with trailing content"),m.range=[r.offset,g,b??g],m}function e5({composeNode:e,composeEmptyNode:n},i,r,l,c){const d=c?.nodeClass??ki,m=new d(i.schema);i.atRoot&&(i.atRoot=!1),i.atKey&&(i.atKey=!1);let g=r.offset,b=null;for(const{start:v,value:S}of r.items){const w=Vs(v,{indicator:"seq-item-ind",next:S,offset:g,onError:l,parentIndent:r.indent,startOnNewline:!0});if(!w.found)if(w.anchor||w.tag||S)S?.type==="block-seq"?l(w.end,"BAD_INDENT","All sequence items must start at the same column"):l(g,"MISSING_CHAR","Sequence item without - indicator");else{b=w.end,w.comment&&(m.comment=w.comment);continue}const _=S?e(i,S,w,l):n(i,w.end,v,null,w,l);i.schema.compat&&Ef(r.indent,S,l),g=_.range[2],m.items.push(_)}return m.range=[r.offset,g,b??g],m}function ho(e,n,i,r){let l="";if(e){let c=!1,d="";for(const m of e){const{source:g,type:b}=m;switch(b){case"space":c=!0;break;case"comment":{i&&!c&&r(m,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const v=g.substring(1)||" ";l?l+=d+v:l=v,d="";break}case"newline":l&&(d+=g),c=!0;break;default:r(m,"UNEXPECTED_TOKEN",`Unexpected ${b} at node end`)}n+=g.length}}return{comment:l,offset:n}}const lf="Block collections are not allowed within flow collections",cf=e=>e&&(e.type==="block-map"||e.type==="block-seq");function t5({composeNode:e,composeEmptyNode:n},i,r,l,c){const d=r.start.source==="{",m=d?"flow map":"flow sequence",g=c?.nodeClass??(d?jn:ki),b=new g(i.schema);b.flow=!0;const v=i.atRoot;v&&(i.atRoot=!1),i.atKey&&(i.atKey=!1);let S=r.offset+r.start.source.length;for(let T=0;T<r.items.length;++T){const R=r.items[T],{start:G,key:H,sep:K,value:X}=R,J=Vs(G,{flow:m,indicator:"explicit-key-ind",next:H??K?.[0],offset:S,onError:l,parentIndent:r.indent,startOnNewline:!1});if(!J.found){if(!J.anchor&&!J.tag&&!K&&!X){T===0&&J.comma?l(J.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${m}`):T<r.items.length-1&&l(J.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${m}`),J.comment&&(b.comment?b.comment+=`
128
+ `+H.comment:G.comment=H.comment);const K=new Ht(G);i.options.keepSourceTokens&&(K.srcToken=v),m.items.push(K)}}return b&&b<g&&l(b,"IMPOSSIBLE","Map comment with trailing content"),m.range=[r.offset,g,b??g],m}function t5({composeNode:e,composeEmptyNode:n},i,r,l,c){const d=c?.nodeClass??ki,m=new d(i.schema);i.atRoot&&(i.atRoot=!1),i.atKey&&(i.atKey=!1);let g=r.offset,b=null;for(const{start:v,value:S}of r.items){const w=Vs(v,{indicator:"seq-item-ind",next:S,offset:g,onError:l,parentIndent:r.indent,startOnNewline:!0});if(!w.found)if(w.anchor||w.tag||S)S?.type==="block-seq"?l(w.end,"BAD_INDENT","All sequence items must start at the same column"):l(g,"MISSING_CHAR","Sequence item without - indicator");else{b=w.end,w.comment&&(m.comment=w.comment);continue}const _=S?e(i,S,w,l):n(i,w.end,v,null,w,l);i.schema.compat&&Ef(r.indent,S,l),g=_.range[2],m.items.push(_)}return m.range=[r.offset,g,b??g],m}function ho(e,n,i,r){let l="";if(e){let c=!1,d="";for(const m of e){const{source:g,type:b}=m;switch(b){case"space":c=!0;break;case"comment":{i&&!c&&r(m,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const v=g.substring(1)||" ";l?l+=d+v:l=v,d="";break}case"newline":l&&(d+=g),c=!0;break;default:r(m,"UNEXPECTED_TOKEN",`Unexpected ${b} at node end`)}n+=g.length}}return{comment:l,offset:n}}const lf="Block collections are not allowed within flow collections",cf=e=>e&&(e.type==="block-map"||e.type==="block-seq");function n5({composeNode:e,composeEmptyNode:n},i,r,l,c){const d=r.start.source==="{",m=d?"flow map":"flow sequence",g=c?.nodeClass??(d?jn:ki),b=new g(i.schema);b.flow=!0;const v=i.atRoot;v&&(i.atRoot=!1),i.atKey&&(i.atKey=!1);let S=r.offset+r.start.source.length;for(let T=0;T<r.items.length;++T){const R=r.items[T],{start:G,key:H,sep:K,value:X}=R,J=Vs(G,{flow:m,indicator:"explicit-key-ind",next:H??K?.[0],offset:S,onError:l,parentIndent:r.indent,startOnNewline:!1});if(!J.found){if(!J.anchor&&!J.tag&&!K&&!X){T===0&&J.comma?l(J.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${m}`):T<r.items.length-1&&l(J.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${m}`),J.comment&&(b.comment?b.comment+=`
129
129
  `+J.comment:b.comment=J.comment),S=J.end;continue}!d&&i.options.strict&&lo(H)&&l(H,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(T===0)J.comma&&l(J.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${m}`);else if(J.comma||l(J.start,"MISSING_CHAR",`Missing , between ${m} items`),J.comment){let D="";e:for(const M of G)switch(M.type){case"comma":case"space":break;case"comment":D=M.source.substring(1);break e;default:break e}if(D){let M=b.items[b.items.length-1];vt(M)&&(M=M.value??M.key),M.comment?M.comment+=`
130
130
  `+D:M.comment=D,J.comment=J.comment.substring(D.length+1)}}if(!d&&!K&&!J.found){const D=X?e(i,X,J,l):n(i,J.end,K,null,J,l);b.items.push(D),S=D.range[2],cf(X)&&l(D.range,"BLOCK_IN_FLOW",lf)}else{i.atKey=!0;const D=J.end,M=H?e(i,H,J,l):n(i,D,G,null,J,l);cf(H)&&l(M.range,"BLOCK_IN_FLOW",lf),i.atKey=!1;const oe=Vs(K??[],{flow:m,indicator:"map-value-ind",next:X,offset:M.range[2],onError:l,parentIndent:r.indent,startOnNewline:!1});if(oe.found){if(!d&&!J.found&&i.options.strict){if(K)for(const ve of K){if(ve===oe.found)break;if(ve.type==="newline"){l(ve,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}J.start<oe.found.offset-1024&&l(oe.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else X&&("source"in X&&X.source?.[0]===":"?l(X,"MISSING_CHAR",`Missing space after : in ${m}`):l(oe.start,"MISSING_CHAR",`Missing , or : between ${m} items`));const Ne=X?e(i,X,oe,l):oe.found?n(i,oe.end,K,null,oe,l):null;Ne?cf(X)&&l(Ne.range,"BLOCK_IN_FLOW",lf):oe.comment&&(M.comment?M.comment+=`
131
131
  `+oe.comment:M.comment=oe.comment);const Ae=new Ht(M,Ne);if(i.options.keepSourceTokens&&(Ae.srcToken=R),d){const ve=b;R1(i,ve.items,M)&&l(D,"DUPLICATE_KEY","Map keys must be unique"),ve.items.push(Ae)}else{const ve=new jn(i.schema);ve.flow=!0,ve.items.push(Ae);const et=(Ne??M).range;ve.range=[M.range[0],et[1],et[2]],b.items.push(ve)}S=Ne?Ne.range[2]:oe.end}}const w=d?"}":"]",[_,...C]=r.end;let N=S;if(_?.source===w)N=_.offset+_.source.length;else{const T=m[0].toUpperCase()+m.substring(1),R=v?`${T} must end with a ${w}`:`${T} in block collection must be sufficiently indented and end with a ${w}`;l(S,v?"MISSING_CHAR":"BAD_INDENT",R),_&&_.source.length!==1&&C.unshift(_)}if(C.length>0){const T=ho(C,N,i.options.strict,l);T.comment&&(b.comment?b.comment+=`
132
- `+T.comment:b.comment=T.comment),b.range=[r.offset,N,T.offset]}else b.range=[r.offset,N,N];return b}function uf(e,n,i,r,l,c){const d=i.type==="block-map"?WD(e,n,i,r,c):i.type==="block-seq"?e5(e,n,i,r,c):t5(e,n,i,r,c),m=d.constructor;return l==="!"||l===m.tagName?(d.tag=m.tagName,d):(l&&(d.tag=l),d)}function n5(e,n,i,r,l){const c=r.tag,d=c?n.directives.tagName(c.source,w=>l(c,"TAG_RESOLVE_FAILED",w)):null;if(i.type==="block-seq"){const{anchor:w,newlineAfterProp:_}=r,C=w&&c?w.offset>c.offset?w:c:w??c;C&&(!_||_.offset<C.offset)&&l(C,"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(!c||!d||d==="!"||d===jn.tagName&&m==="map"||d===ki.tagName&&m==="seq")return uf(e,n,i,l,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?l(c,"BAD_COLLECTION_TYPE",`${w.tag} used for ${m} collection, but expects ${w.collection??"scalar"}`,!0):l(c,"TAG_RESOLVE_FAILED",`Unresolved tag: ${d}`,!0),uf(e,n,i,l,d)}const b=uf(e,n,i,l,d,g),v=g.resolve?.(b,w=>l(c,"TAG_RESOLVE_FAILED",w),n.options)??b,S=bt(v)?v:new ke(v);return S.range=b.range,S.tag=d,g?.format&&(S.format=g.format),S}function a5(e,n,i){const r=n.offset,l=i5(n,e.options.strict,i);if(!l)return{value:"",type:null,comment:"",range:[r,r,r]};const c=l.mode===">"?ke.BLOCK_FOLDED:ke.BLOCK_LITERAL,d=n.source?s5(n.source):[];let m=d.length;for(let N=d.length-1;N>=0;--N){const T=d[N][1];if(T===""||T==="\r")m=N;else break}if(m===0){const N=l.chomp==="+"&&d.length>0?`
132
+ `+T.comment:b.comment=T.comment),b.range=[r.offset,N,T.offset]}else b.range=[r.offset,N,N];return b}function uf(e,n,i,r,l,c){const d=i.type==="block-map"?e5(e,n,i,r,c):i.type==="block-seq"?t5(e,n,i,r,c):n5(e,n,i,r,c),m=d.constructor;return l==="!"||l===m.tagName?(d.tag=m.tagName,d):(l&&(d.tag=l),d)}function a5(e,n,i,r,l){const c=r.tag,d=c?n.directives.tagName(c.source,w=>l(c,"TAG_RESOLVE_FAILED",w)):null;if(i.type==="block-seq"){const{anchor:w,newlineAfterProp:_}=r,C=w&&c?w.offset>c.offset?w:c:w??c;C&&(!_||_.offset<C.offset)&&l(C,"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(!c||!d||d==="!"||d===jn.tagName&&m==="map"||d===ki.tagName&&m==="seq")return uf(e,n,i,l,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?l(c,"BAD_COLLECTION_TYPE",`${w.tag} used for ${m} collection, but expects ${w.collection??"scalar"}`,!0):l(c,"TAG_RESOLVE_FAILED",`Unresolved tag: ${d}`,!0),uf(e,n,i,l,d)}const b=uf(e,n,i,l,d,g),v=g.resolve?.(b,w=>l(c,"TAG_RESOLVE_FAILED",w),n.options)??b,S=bt(v)?v:new ke(v);return S.range=b.range,S.tag=d,g?.format&&(S.format=g.format),S}function i5(e,n,i){const r=n.offset,l=s5(n,e.options.strict,i);if(!l)return{value:"",type:null,comment:"",range:[r,r,r]};const c=l.mode===">"?ke.BLOCK_FOLDED:ke.BLOCK_LITERAL,d=n.source?r5(n.source):[];let m=d.length;for(let N=d.length-1;N>=0;--N){const T=d[N][1];if(T===""||T==="\r")m=N;else break}if(m===0){const N=l.chomp==="+"&&d.length>0?`
133
133
  `.repeat(Math.max(1,d.length-1)):"";let T=r+l.length;return n.source&&(T+=n.source.length),{value:N,type:c,comment:l.comment,range:[r,T,T]}}let g=n.indent+l.indent,b=n.offset+l.length,v=0;for(let N=0;N<m;++N){const[T,R]=d[N];if(R===""||R==="\r")l.indent===0&&T.length>g&&(g=T.length);else{T.length<g&&i(b+T.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),l.indent===0&&(g=T.length),v=N,g===0&&!e.atRoot&&i(b,"BAD_INDENT","Block scalar values in collections must be indented");break}b+=T.length+R.length+1}for(let N=d.length-1;N>=m;--N)d[N][0].length>g&&(m=N+1);let S="",w="",_=!1;for(let N=0;N<v;++N)S+=d[N][0].slice(g)+`
134
134
  `;for(let N=v;N<m;++N){let[T,R]=d[N];b+=T.length+R.length+1;const G=R[R.length-1]==="\r";if(G&&(R=R.slice(0,-1)),R&&T.length<g){const K=`Block scalar lines must not be less indented than their ${l.indent?"explicit indentation indicator":"first line"}`;i(b-R.length-(G?2:1),"BAD_INDENT",K),T=""}c===ke.BLOCK_LITERAL?(S+=w+T.slice(g)+R,w=`
135
135
  `):T.length>g||R[0]===" "?(w===" "?w=`
@@ -144,38 +144,38 @@ ${b}
144
144
  `+d[N][0].slice(g);S[S.length-1]!==`
145
145
  `&&(S+=`
146
146
  `);break;default:S+=`
147
- `}const C=r+l.length+n.source.length;return{value:S,type:c,comment:l.comment,range:[r,C,C]}}function i5({offset:e,props:n},i,r){if(n[0].type!=="block-scalar-header")return r(n[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:l}=n[0],c=l[0];let d=0,m="",g=-1;for(let w=1;w<l.length;++w){const _=l[w];if(!m&&(_==="-"||_==="+"))m=_;else{const C=Number(_);!d&&C?d=C:g===-1&&(g=e+w)}}g!==-1&&r(g,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${l}`);let b=!1,v="",S=l.length;for(let w=1;w<n.length;++w){const _=n[w];switch(_.type){case"space":b=!0;case"newline":S+=_.source.length;break;case"comment":i&&!b&&r(_,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),S+=_.source.length,v=_.source.substring(1);break;case"error":r(_,"UNEXPECTED_TOKEN",_.message),S+=_.source.length;break;default:{const C=`Unexpected token in block scalar header: ${_.type}`;r(_,"UNEXPECTED_TOKEN",C);const N=_.source;N&&typeof N=="string"&&(S+=N.length)}}}return{mode:c,indent:d,chomp:m,comment:v,length:S}}function s5(e){const n=e.split(/\n( *)/),i=n[0],r=i.match(/^( *)/),c=[r?.[1]?[r[1],i.slice(r[1].length)]:["",i]];for(let d=1;d<n.length;d+=2)c.push([n[d],n[d+1]]);return c}function r5(e,n,i){const{offset:r,type:l,source:c,end:d}=e;let m,g;const b=(w,_,C)=>i(r+w,_,C);switch(l){case"scalar":m=ke.PLAIN,g=o5(c,b);break;case"single-quoted-scalar":m=ke.QUOTE_SINGLE,g=l5(c,b);break;case"double-quoted-scalar":m=ke.QUOTE_DOUBLE,g=c5(c,b);break;default:return i(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${l}`),{value:"",type:null,comment:"",range:[r,r+c.length,r+c.length]}}const v=r+c.length,S=ho(d,v,n,i);return{value:g,type:m,comment:S.comment,range:[r,v,S.offset]}}function o5(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}`),M1(e)}function l5(e,n){return(e[e.length-1]!=="'"||e.length===1)&&n(e.length,"MISSING_CHAR","Missing closing 'quote"),M1(e.slice(1,-1)).replace(/''/g,"'")}function M1(e){let n,i;try{n=new RegExp(`(.*?)(?<![ ])[ ]*\r?
147
+ `}const C=r+l.length+n.source.length;return{value:S,type:c,comment:l.comment,range:[r,C,C]}}function s5({offset:e,props:n},i,r){if(n[0].type!=="block-scalar-header")return r(n[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:l}=n[0],c=l[0];let d=0,m="",g=-1;for(let w=1;w<l.length;++w){const _=l[w];if(!m&&(_==="-"||_==="+"))m=_;else{const C=Number(_);!d&&C?d=C:g===-1&&(g=e+w)}}g!==-1&&r(g,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${l}`);let b=!1,v="",S=l.length;for(let w=1;w<n.length;++w){const _=n[w];switch(_.type){case"space":b=!0;case"newline":S+=_.source.length;break;case"comment":i&&!b&&r(_,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),S+=_.source.length,v=_.source.substring(1);break;case"error":r(_,"UNEXPECTED_TOKEN",_.message),S+=_.source.length;break;default:{const C=`Unexpected token in block scalar header: ${_.type}`;r(_,"UNEXPECTED_TOKEN",C);const N=_.source;N&&typeof N=="string"&&(S+=N.length)}}}return{mode:c,indent:d,chomp:m,comment:v,length:S}}function r5(e){const n=e.split(/\n( *)/),i=n[0],r=i.match(/^( *)/),c=[r?.[1]?[r[1],i.slice(r[1].length)]:["",i]];for(let d=1;d<n.length;d+=2)c.push([n[d],n[d+1]]);return c}function o5(e,n,i){const{offset:r,type:l,source:c,end:d}=e;let m,g;const b=(w,_,C)=>i(r+w,_,C);switch(l){case"scalar":m=ke.PLAIN,g=l5(c,b);break;case"single-quoted-scalar":m=ke.QUOTE_SINGLE,g=c5(c,b);break;case"double-quoted-scalar":m=ke.QUOTE_DOUBLE,g=u5(c,b);break;default:return i(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${l}`),{value:"",type:null,comment:"",range:[r,r+c.length,r+c.length]}}const v=r+c.length,S=ho(d,v,n,i);return{value:g,type:m,comment:S.comment,range:[r,v,S.offset]}}function l5(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}`),M1(e)}function c5(e,n){return(e[e.length-1]!=="'"||e.length===1)&&n(e.length,"MISSING_CHAR","Missing closing 'quote"),M1(e.slice(1,-1)).replace(/''/g,"'")}function M1(e){let n,i;try{n=new RegExp(`(.*?)(?<![ ])[ ]*\r?
148
148
  `,"sy"),i=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
149
149
  `,"sy")}catch{n=/(.*?)[ \t]*\r?\n/sy,i=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=n.exec(e);if(!r)return e;let l=r[1],c=" ",d=n.lastIndex;for(i.lastIndex=d;r=i.exec(e);)r[1]===""?c===`
150
150
  `?l+=c:c=`
151
- `:(l+=c+r[1],c=" "),d=i.lastIndex;const m=/[ \t]*(.*)/sy;return m.lastIndex=d,r=m.exec(e),l+c+(r?.[1]??"")}function c5(e,n){let i="";for(let r=1;r<e.length-1;++r){const l=e[r];if(!(l==="\r"&&e[r+1]===`
151
+ `:(l+=c+r[1],c=" "),d=i.lastIndex;const m=/[ \t]*(.*)/sy;return m.lastIndex=d,r=m.exec(e),l+c+(r?.[1]??"")}function u5(e,n){let i="";for(let r=1;r<e.length-1;++r){const l=e[r];if(!(l==="\r"&&e[r+1]===`
152
152
  `))if(l===`
153
- `){const{fold:c,offset:d}=u5(e,r);i+=c,r=d}else if(l==="\\"){let c=e[++r];const d=d5[c];if(d)i+=d;else if(c===`
153
+ `){const{fold:c,offset:d}=d5(e,r);i+=c,r=d}else if(l==="\\"){let c=e[++r];const d=f5[c];if(d)i+=d;else if(c===`
154
154
  `)for(c=e[r+1];c===" "||c===" ";)c=e[++r+1];else if(c==="\r"&&e[r+1]===`
155
- `)for(c=e[++r+1];c===" "||c===" ";)c=e[++r+1];else if(c==="x"||c==="u"||c==="U"){const m={x:2,u:4,U:8}[c];i+=f5(e,r+1,m,n),r+=m}else{const m=e.substr(r-1,2);n(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${m}`),i+=m}}else if(l===" "||l===" "){const c=r;let d=e[r+1];for(;d===" "||d===" ";)d=e[++r+1];d!==`
155
+ `)for(c=e[++r+1];c===" "||c===" ";)c=e[++r+1];else if(c==="x"||c==="u"||c==="U"){const m={x:2,u:4,U:8}[c];i+=p5(e,r+1,m,n),r+=m}else{const m=e.substr(r-1,2);n(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${m}`),i+=m}}else if(l===" "||l===" "){const c=r;let d=e[r+1];for(;d===" "||d===" ";)d=e[++r+1];d!==`
156
156
  `&&!(d==="\r"&&e[r+2]===`
157
- `)&&(i+=r>c?e.slice(c,r+1):l)}else i+=l}return(e[e.length-1]!=='"'||e.length===1)&&n(e.length,"MISSING_CHAR",'Missing closing "quote'),i}function u5(e,n){let i="",r=e[n+1];for(;(r===" "||r===" "||r===`
157
+ `)&&(i+=r>c?e.slice(c,r+1):l)}else i+=l}return(e[e.length-1]!=='"'||e.length===1)&&n(e.length,"MISSING_CHAR",'Missing closing "quote'),i}function d5(e,n){let i="",r=e[n+1];for(;(r===" "||r===" "||r===`
158
158
  `||r==="\r")&&!(r==="\r"&&e[n+2]!==`
159
159
  `);)r===`
160
160
  `&&(i+=`
161
- `),n+=1,r=e[n+1];return i||(i=" "),{fold:i,offset:n}}const d5={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
162
- `,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function f5(e,n,i,r){const l=e.substr(n,i),d=l.length===i&&/^[0-9a-fA-F]+$/.test(l)?parseInt(l,16):NaN;if(isNaN(d)){const m=e.substr(n-2,i+2);return r(n-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${m}`),m}return String.fromCodePoint(d)}function B1(e,n,i,r){const{value:l,type:c,comment:d,range:m}=n.type==="block-scalar"?a5(e,n,r):r5(n,e.options.strict,r),g=i?e.directives.tagName(i.source,S=>r(i,"TAG_RESOLVE_FAILED",S)):null;let b;e.options.stringKeys&&e.atKey?b=e.schema[Hn]:g?b=p5(e.schema,l,g,i,r):n.type==="scalar"?b=m5(e,l,n,r):b=e.schema[Hn];let v;try{const S=b.resolve(l,w=>r(i??n,"TAG_RESOLVE_FAILED",w),e.options);v=nt(S)?S:new ke(S)}catch(S){const w=S instanceof Error?S.message:String(S);r(i??n,"TAG_RESOLVE_FAILED",w),v=new ke(l)}return v.range=m,v.source=l,c&&(v.type=c),g&&(v.tag=g),b.format&&(v.format=b.format),d&&(v.comment=d),v}function p5(e,n,i,r,l){if(i==="!")return e[Hn];const c=[];for(const m of e.tags)if(!m.collection&&m.tag===i)if(m.default&&m.test)c.push(m);else return m;for(const m of c)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):(l(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${i}`,i!=="tag:yaml.org,2002:str"),e[Hn])}function m5({atKey:e,directives:n,schema:i},r,l,c){const d=i.tags.find(m=>(m.default===!0||e&&m.default==="key")&&m.test?.test(r))||i[Hn];if(i.compat){const m=i.compat.find(g=>g.default&&g.test?.test(r))??i[Hn];if(d.tag!==m.tag){const g=n.tagString(d.tag),b=n.tagString(m.tag),v=`Value may be parsed as either ${g} or ${b}`;c(l,"TAG_RESOLVE_FAILED",v,!0)}}return d}function h5(e,n,i){if(n){i??(i=n.length);for(let r=i-1;r>=0;--r){let l=n[r];switch(l.type){case"space":case"comment":case"newline":e-=l.source.length;continue}for(l=n[++r];l?.type==="space";)e+=l.source.length,l=n[++r];break}}return e}const g5={composeNode:L1,composeEmptyNode:Dp};function L1(e,n,i,r){const l=e.atKey,{spaceBefore:c,comment:d,anchor:m,tag:g}=i;let b,v=!0;switch(n.type){case"alias":b=y5(e,n,r),(m||g)&&r(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":b=B1(e,n,g,r),m&&(b.anchor=m.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":b=n5(g5,e,n,i,r),m&&(b.anchor=m.source.substring(1));break;default:{const S=n.type==="error"?n.message:`Unsupported token (type: ${n.type})`;r(n,"UNEXPECTED_TOKEN",S),b=Dp(e,n.offset,void 0,null,i,r),v=!1}}return m&&b.anchor===""&&r(m,"BAD_ALIAS","Anchor cannot be an empty string"),l&&e.options.stringKeys&&(!nt(b)||typeof b.value!="string"||b.tag&&b.tag!=="tag:yaml.org,2002:str")&&r(g??n,"NON_STRING_KEY","With stringKeys, all keys must be strings"),c&&(b.spaceBefore=!0),d&&(n.type==="scalar"&&n.source===""?b.comment=d:b.commentBefore=d),e.options.keepSourceTokens&&v&&(b.srcToken=n),b}function Dp(e,n,i,r,{spaceBefore:l,comment:c,anchor:d,tag:m,end:g},b){const v={type:"scalar",offset:h5(n,i,r),indent:-1,source:""},S=B1(e,v,m,b);return d&&(S.anchor=d.source.substring(1),S.anchor===""&&b(d,"BAD_ALIAS","Anchor cannot be an empty string")),l&&(S.spaceBefore=!0),c&&(S.comment=c,S.range[2]=g),S}function y5({options:e},{offset:n,source:i,end:r},l){const c=new xp(i.substring(1));c.source===""&&l(n,"BAD_ALIAS","Alias cannot be an empty string"),c.source.endsWith(":")&&l(n+i.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const d=n+i.length,m=ho(r,d,e.strict,l);return c.range=[n,d,m.offset],m.comment&&(c.comment=m.comment),c}function b5(e,n,{offset:i,start:r,value:l,end:c},d){const m=Object.assign({_directives:n},e),g=new Oc(void 0,m),b={atKey:!1,atRoot:!0,directives:g.directives,options:g.options,schema:g.schema},v=Vs(r,{indicator:"doc-start",next:l??c?.[0],offset:i,onError:d,parentIndent:0,startOnNewline:!0});v.found&&(g.directives.docStart=!0,l&&(l.type==="block-map"||l.type==="block-seq")&&!v.hasNewline&&d(v.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),g.contents=l?L1(b,l,v,d):Dp(b,v.end,r,null,v,d);const S=g.contents.range[2],w=ho(c,S,!1,d);return w.comment&&(g.comment=w.comment),g.range=[i,S,w.offset],g}function Wr(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 Hb(e){let n="",i=!1,r=!1;for(let l=0;l<e.length;++l){const c=e[l];switch(c[0]){case"#":n+=(n===""?"":r?`
161
+ `),n+=1,r=e[n+1];return i||(i=" "),{fold:i,offset:n}}const f5={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
162
+ `,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function p5(e,n,i,r){const l=e.substr(n,i),d=l.length===i&&/^[0-9a-fA-F]+$/.test(l)?parseInt(l,16):NaN;if(isNaN(d)){const m=e.substr(n-2,i+2);return r(n-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${m}`),m}return String.fromCodePoint(d)}function B1(e,n,i,r){const{value:l,type:c,comment:d,range:m}=n.type==="block-scalar"?i5(e,n,r):o5(n,e.options.strict,r),g=i?e.directives.tagName(i.source,S=>r(i,"TAG_RESOLVE_FAILED",S)):null;let b;e.options.stringKeys&&e.atKey?b=e.schema[Hn]:g?b=m5(e.schema,l,g,i,r):n.type==="scalar"?b=h5(e,l,n,r):b=e.schema[Hn];let v;try{const S=b.resolve(l,w=>r(i??n,"TAG_RESOLVE_FAILED",w),e.options);v=nt(S)?S:new ke(S)}catch(S){const w=S instanceof Error?S.message:String(S);r(i??n,"TAG_RESOLVE_FAILED",w),v=new ke(l)}return v.range=m,v.source=l,c&&(v.type=c),g&&(v.tag=g),b.format&&(v.format=b.format),d&&(v.comment=d),v}function m5(e,n,i,r,l){if(i==="!")return e[Hn];const c=[];for(const m of e.tags)if(!m.collection&&m.tag===i)if(m.default&&m.test)c.push(m);else return m;for(const m of c)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):(l(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${i}`,i!=="tag:yaml.org,2002:str"),e[Hn])}function h5({atKey:e,directives:n,schema:i},r,l,c){const d=i.tags.find(m=>(m.default===!0||e&&m.default==="key")&&m.test?.test(r))||i[Hn];if(i.compat){const m=i.compat.find(g=>g.default&&g.test?.test(r))??i[Hn];if(d.tag!==m.tag){const g=n.tagString(d.tag),b=n.tagString(m.tag),v=`Value may be parsed as either ${g} or ${b}`;c(l,"TAG_RESOLVE_FAILED",v,!0)}}return d}function g5(e,n,i){if(n){i??(i=n.length);for(let r=i-1;r>=0;--r){let l=n[r];switch(l.type){case"space":case"comment":case"newline":e-=l.source.length;continue}for(l=n[++r];l?.type==="space";)e+=l.source.length,l=n[++r];break}}return e}const y5={composeNode:L1,composeEmptyNode:Dp};function L1(e,n,i,r){const l=e.atKey,{spaceBefore:c,comment:d,anchor:m,tag:g}=i;let b,v=!0;switch(n.type){case"alias":b=b5(e,n,r),(m||g)&&r(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":b=B1(e,n,g,r),m&&(b.anchor=m.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":b=a5(y5,e,n,i,r),m&&(b.anchor=m.source.substring(1));break;default:{const S=n.type==="error"?n.message:`Unsupported token (type: ${n.type})`;r(n,"UNEXPECTED_TOKEN",S),b=Dp(e,n.offset,void 0,null,i,r),v=!1}}return m&&b.anchor===""&&r(m,"BAD_ALIAS","Anchor cannot be an empty string"),l&&e.options.stringKeys&&(!nt(b)||typeof b.value!="string"||b.tag&&b.tag!=="tag:yaml.org,2002:str")&&r(g??n,"NON_STRING_KEY","With stringKeys, all keys must be strings"),c&&(b.spaceBefore=!0),d&&(n.type==="scalar"&&n.source===""?b.comment=d:b.commentBefore=d),e.options.keepSourceTokens&&v&&(b.srcToken=n),b}function Dp(e,n,i,r,{spaceBefore:l,comment:c,anchor:d,tag:m,end:g},b){const v={type:"scalar",offset:g5(n,i,r),indent:-1,source:""},S=B1(e,v,m,b);return d&&(S.anchor=d.source.substring(1),S.anchor===""&&b(d,"BAD_ALIAS","Anchor cannot be an empty string")),l&&(S.spaceBefore=!0),c&&(S.comment=c,S.range[2]=g),S}function b5({options:e},{offset:n,source:i,end:r},l){const c=new xp(i.substring(1));c.source===""&&l(n,"BAD_ALIAS","Alias cannot be an empty string"),c.source.endsWith(":")&&l(n+i.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const d=n+i.length,m=ho(r,d,e.strict,l);return c.range=[n,d,m.offset],m.comment&&(c.comment=m.comment),c}function v5(e,n,{offset:i,start:r,value:l,end:c},d){const m=Object.assign({_directives:n},e),g=new Oc(void 0,m),b={atKey:!1,atRoot:!0,directives:g.directives,options:g.options,schema:g.schema},v=Vs(r,{indicator:"doc-start",next:l??c?.[0],offset:i,onError:d,parentIndent:0,startOnNewline:!0});v.found&&(g.directives.docStart=!0,l&&(l.type==="block-map"||l.type==="block-seq")&&!v.hasNewline&&d(v.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),g.contents=l?L1(b,l,v,d):Dp(b,v.end,r,null,v,d);const S=g.contents.range[2],w=ho(c,S,!1,d);return w.comment&&(g.comment=w.comment),g.range=[i,S,w.offset],g}function Wr(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 Hb(e){let n="",i=!1,r=!1;for(let l=0;l<e.length;++l){const c=e[l];switch(c[0]){case"#":n+=(n===""?"":r?`
163
163
 
164
164
  `:`
165
- `)+(c.substring(1)||" "),i=!0,r=!1;break;case"%":e[l+1]?.[0]!=="#"&&(l+=1),i=!1;break;default:i||(r=!0),i=!1}}return{comment:n,afterEmptyLine:r}}class v5{constructor(n={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(i,r,l,c)=>{const d=Wr(i);c?this.warnings.push(new FD(d,r,l)):this.errors.push(new Zl(d,r,l))},this.directives=new Gt({version:n.version||"1.2"}),this.options=n}decorate(n,i){const{comment:r,afterEmptyLine:l}=Hb(this.prelude);if(r){const c=n.contents;if(i)n.comment=n.comment?`${n.comment}
165
+ `)+(c.substring(1)||" "),i=!0,r=!1;break;case"%":e[l+1]?.[0]!=="#"&&(l+=1),i=!1;break;default:i||(r=!0),i=!1}}return{comment:n,afterEmptyLine:r}}class S5{constructor(n={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(i,r,l,c)=>{const d=Wr(i);c?this.warnings.push(new WD(d,r,l)):this.errors.push(new Zl(d,r,l))},this.directives=new Gt({version:n.version||"1.2"}),this.options=n}decorate(n,i){const{comment:r,afterEmptyLine:l}=Hb(this.prelude);if(r){const c=n.contents;if(i)n.comment=n.comment?`${n.comment}
166
166
  ${r}`:r;else if(l||n.directives.docStart||!c)n.commentBefore=r;else if(yt(c)&&!c.flow&&c.items.length>0){let d=c.items[0];vt(d)&&(d=d.key);const m=d.commentBefore;d.commentBefore=m?`${r}
167
167
  ${m}`:r}else{const d=c.commentBefore;c.commentBefore=d?`${r}
168
- ${d}`:r}}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:Hb(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(n,i=!1,r=-1){for(const l of n)yield*this.next(l);yield*this.end(i,r)}*next(n){switch(n.type){case"directive":this.directives.add(n.source,(i,r,l)=>{const c=Wr(n);c[0]+=i,this.onError(c,"BAD_DIRECTIVE",r,l)}),this.prelude.push(n.source),this.atDirectives=!0;break;case"document":{const i=b5(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,r=new Zl(Wr(n),"UNEXPECTED_TOKEN",i);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){const r="Unexpected doc-end without preceding document";this.errors.push(new Zl(Wr(n),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=!0;const i=ho(n.end,n.offset+n.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),i.comment){const r=this.doc.comment;this.doc.comment=r?`${r}
169
- ${i.comment}`:i.comment}this.doc.range[2]=i.offset;break}default:this.errors.push(new Zl(Wr(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 r=Object.assign({_directives:this.directives},this.options),l=new Oc(void 0,r);this.atDirectives&&this.onError(i,"MISSING_CHAR","Missing directives-end indicator line"),l.range=[0,i,i],this.decorate(l,!1),yield l}}}const q1="\uFEFF",U1="",$1="",Of="";function S5(e){switch(e){case q1:return"byte-order-mark";case U1:return"doc-mode";case $1:return"flow-error-end";case Of:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
168
+ ${d}`:r}}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:Hb(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(n,i=!1,r=-1){for(const l of n)yield*this.next(l);yield*this.end(i,r)}*next(n){switch(n.type){case"directive":this.directives.add(n.source,(i,r,l)=>{const c=Wr(n);c[0]+=i,this.onError(c,"BAD_DIRECTIVE",r,l)}),this.prelude.push(n.source),this.atDirectives=!0;break;case"document":{const i=v5(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,r=new Zl(Wr(n),"UNEXPECTED_TOKEN",i);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){const r="Unexpected doc-end without preceding document";this.errors.push(new Zl(Wr(n),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=!0;const i=ho(n.end,n.offset+n.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),i.comment){const r=this.doc.comment;this.doc.comment=r?`${r}
169
+ ${i.comment}`:i.comment}this.doc.range[2]=i.offset;break}default:this.errors.push(new Zl(Wr(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 r=Object.assign({_directives:this.directives},this.options),l=new Oc(void 0,r);this.atDirectives&&this.onError(i,"MISSING_CHAR","Missing directives-end indicator line"),l.range=[0,i,i],this.decorate(l,!1),yield l}}}const q1="\uFEFF",$1="",U1="",Of="";function x5(e){switch(e){case q1:return"byte-order-mark";case $1:return"doc-mode";case U1:return"flow-error-end";case Of:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
170
170
  `:case`\r
171
171
  `: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 Rn(e){switch(e){case void 0:case" ":case`
172
- `:case"\r":case" ":return!0;default:return!1}}const Zb=new Set("0123456789ABCDEFabcdef"),x5=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Pl=new Set(",[]{}"),w5=new Set(` ,[]{}
173
- \r `),df=e=>!e||w5.has(e);class j5{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 r=this.next??"stream";for(;r&&(i||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let n=this.pos,i=this.buffer[n];for(;i===" "||i===" ";)i=this.buffer[++n];return!i||i==="#"||i===`
172
+ `:case"\r":case" ":return!0;default:return!1}}const Zb=new Set("0123456789ABCDEFabcdef"),w5=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Pl=new Set(",[]{}"),j5=new Set(` ,[]{}
173
+ \r `),df=e=>!e||j5.has(e);class N5{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 r=this.next??"stream";for(;r&&(i||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let n=this.pos,i=this.buffer[n];for(;i===" "||i===" ";)i=this.buffer[++n];return!i||i==="#"||i===`
174
174
  `?!0:i==="\r"?this.buffer[n+1]===`
175
175
  `:!1}charAt(n){return this.buffer[this.pos+n]}continueScalar(n){let i=this.buffer[n];if(this.indentNext>0){let r=0;for(;i===" ";)i=this.buffer[++r+n];if(i==="\r"){const l=this.buffer[r+n+1];if(l===`
176
176
  `||!l&&!this.atEnd)return n+r+1}return i===`
177
177
  `||r>=this.indentNext||!i&&!this.atEnd?n+r:-1}if(i==="-"||i==="."){const r=this.buffer.substr(n,3);if((r==="---"||r==="...")&&Rn(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(`
178
- `,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]===q1&&(yield*this.pushCount(1),n=n.substring(1)),n[0]==="%"){let i=n.length,r=n.indexOf("#");for(;r!==-1;){const c=n[r-1];if(c===" "||c===" "){i=r-1;break}else r=n.indexOf("#",r+1)}for(;;){const c=n[i-1];if(c===" "||c===" ")i-=1;else break}const l=(yield*this.pushCount(i))+(yield*this.pushSpaces(!0));return yield*this.pushCount(n.length-l),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 U1,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==="...")&&Rn(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&&!Rn(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===":")&&Rn(i)){const r=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=r,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(df),"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,r=-1;do n=yield*this.pushNewline(),n>0?(i=yield*this.pushSpaces(!1),this.indentValue=r=i):i=0,i+=yield*this.pushSpaces(!0);while(n+i>0);const l=this.getLine();if(l===null)return this.setNext("flow");if((r!==-1&&r<this.indentNext&&l[0]!=="#"||r===0&&(l.startsWith("---")||l.startsWith("..."))&&Rn(l[3]))&&!(r===this.indentNext-1&&this.flowLevel===1&&(l[0]==="]"||l[0]==="}")))return this.flowLevel=0,yield $1,yield*this.parseLineStart();let c=0;for(;l[c]===",";)c+=yield*this.pushCount(1),c+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(c+=yield*this.pushIndicators(),l[c]){case void 0:return"flow";case"#":return yield*this.pushCount(l.length-c),"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(df),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const d=this.charAt(1);if(this.flowKey||Rn(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 c=0;for(;this.buffer[i-1-c]==="\\";)c+=1;if(c%2===0)break;i=this.buffer.indexOf('"',i+1)}const r=this.buffer.substring(0,i);let l=r.indexOf(`
178
+ `,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]===q1&&(yield*this.pushCount(1),n=n.substring(1)),n[0]==="%"){let i=n.length,r=n.indexOf("#");for(;r!==-1;){const c=n[r-1];if(c===" "||c===" "){i=r-1;break}else r=n.indexOf("#",r+1)}for(;;){const c=n[i-1];if(c===" "||c===" ")i-=1;else break}const l=(yield*this.pushCount(i))+(yield*this.pushSpaces(!0));return yield*this.pushCount(n.length-l),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 $1,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==="...")&&Rn(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&&!Rn(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===":")&&Rn(i)){const r=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=r,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(df),"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,r=-1;do n=yield*this.pushNewline(),n>0?(i=yield*this.pushSpaces(!1),this.indentValue=r=i):i=0,i+=yield*this.pushSpaces(!0);while(n+i>0);const l=this.getLine();if(l===null)return this.setNext("flow");if((r!==-1&&r<this.indentNext&&l[0]!=="#"||r===0&&(l.startsWith("---")||l.startsWith("..."))&&Rn(l[3]))&&!(r===this.indentNext-1&&this.flowLevel===1&&(l[0]==="]"||l[0]==="}")))return this.flowLevel=0,yield U1,yield*this.parseLineStart();let c=0;for(;l[c]===",";)c+=yield*this.pushCount(1),c+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(c+=yield*this.pushIndicators(),l[c]){case void 0:return"flow";case"#":return yield*this.pushCount(l.length-c),"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(df),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const d=this.charAt(1);if(this.flowKey||Rn(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 c=0;for(;this.buffer[i-1-c]==="\\";)c+=1;if(c%2===0)break;i=this.buffer.indexOf('"',i+1)}const r=this.buffer.substring(0,i);let l=r.indexOf(`
179
179
  `,this.pos);if(l!==-1){for(;l!==-1;){const c=this.continueScalar(l+1);if(c===-1)break;l=r.indexOf(`
180
180
  `,c)}l!==-1&&(i=l-(r[l-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=>Rn(i)||i==="#")}*parseBlockScalar(){let n=this.pos-1,i=0,r;e:for(let c=this.pos;r=this.buffer[c];++c)switch(r){case" ":i+=1;break;case`
181
181
  `:n=c,i=0;break;case"\r":{const d=this.buffer[c+1];if(!d&&!this.atEnd)return this.setNext("block-scalar");if(d===`
@@ -185,13 +185,13 @@ ${i.comment}`:i.comment}this.doc.range[2]=i.offset;break}default:this.errors.pus
185
185
  `&&c>=this.pos&&c+1+i>m)n=c;else break}while(!0);return yield Of,yield*this.pushToIndex(n+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const n=this.flowLevel>0;let i=this.pos-1,r=this.pos-1,l;for(;l=this.buffer[++r];)if(l===":"){const c=this.buffer[r+1];if(Rn(c)||n&&Pl.has(c))break;i=r}else if(Rn(l)){let c=this.buffer[r+1];if(l==="\r"&&(c===`
186
186
  `?(r+=1,l=`
187
187
  `,c=this.buffer[r+1]):i=r),c==="#"||n&&Pl.has(c))break;if(l===`
188
- `){const d=this.continueScalar(r+1);if(d===-1)break;r=Math.max(r,d-2)}}else{if(n&&Pl.has(l))break;i=r}return!l&&!this.atEnd?this.setNext("plain-scalar"):(yield Of,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 r=this.buffer.slice(this.pos,n);return r?(yield r,this.pos+=r.length,r.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(df))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const n=this.flowLevel>0,i=this.charAt(1);if(Rn(i)||n&&Pl.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(;!Rn(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(x5.has(i))i=this.buffer[++n];else if(i==="%"&&Zb.has(this.buffer[n+1])&&Zb.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===`
188
+ `){const d=this.continueScalar(r+1);if(d===-1)break;r=Math.max(r,d-2)}}else{if(n&&Pl.has(l))break;i=r}return!l&&!this.atEnd?this.setNext("plain-scalar"):(yield Of,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 r=this.buffer.slice(this.pos,n);return r?(yield r,this.pos+=r.length,r.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(df))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const n=this.flowLevel>0,i=this.charAt(1);if(Rn(i)||n&&Pl.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(;!Rn(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(w5.has(i))i=this.buffer[++n];else if(i==="%"&&Zb.has(this.buffer[n+1])&&Zb.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===`
189
189
  `?yield*this.pushCount(1):n==="\r"&&this.charAt(1)===`
190
- `?yield*this.pushCount(2):0}*pushSpaces(n){let i=this.pos-1,r;do r=this.buffer[++i];while(r===" "||n&&r===" ");const l=i-this.pos;return l>0&&(yield this.buffer.substr(this.pos,l),this.pos=i),l}*pushUntil(n){let i=this.pos,r=this.buffer[i];for(;!n(r);)r=this.buffer[++i];return yield*this.pushToIndex(i,!1)}}class N5{constructor(){this.lineStarts=[],this.addNewLine=n=>this.lineStarts.push(n),this.linePos=n=>{let i=0,r=this.lineStarts.length;for(;i<r;){const c=i+r>>1;this.lineStarts[c]<n?i=c+1:r=c}if(this.lineStarts[i]===n)return{line:i+1,col:1};if(i===0)return{line:0,col:n};const l=this.lineStarts[i-1];return{line:i,col:n-l+1}}}}function Ia(e,n){for(let i=0;i<e.length;++i)if(e[i].type===n)return!0;return!1}function Pb(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 V1(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 Kl(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 _s(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 Kb(e){if(e.start.type==="flow-seq-start")for(const n of e.items)n.sep&&!n.value&&!Ia(n.start,"explicit-key-ind")&&!Ia(n.sep,"map-value-ind")&&(n.key&&(n.value=n.key),delete n.key,V1(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 k5{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 j5,this.onNewLine=n}*parse(n,i=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const r of this.lexer.lex(n,i))yield*this.next(r);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=S5(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 r=`Not a YAML token: ${n}`;yield*this.pop({type:"error",offset:this.offset,message:r,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 r=this.peek(1);switch(i.type==="block-scalar"?i.indent="indent"in r?r.indent:0:i.type==="flow-collection"&&r.type==="document"&&(i.indent=0),i.type==="flow-collection"&&Kb(i),r.type){case"document":r.value=i;break;case"block-scalar":r.props.push(i);break;case"block-map":{const l=r.items[r.items.length-1];if(l.value){r.items.push({start:[],key:i,sep:[]}),this.onKeyLine=!0;return}else if(l.sep)l.value=i;else{Object.assign(l,{key:i,sep:[]}),this.onKeyLine=!l.explicitKey;return}break}case"block-seq":{const l=r.items[r.items.length-1];l.value?r.items.push({start:[],value:i}):l.value=i;break}case"flow-collection":{const l=r.items[r.items.length-1];!l||l.value?r.items.push({start:[],key:i,sep:[]}):l.sep?l.value=i:Object.assign(l,{key:i,sep:[]});return}default:yield*this.pop(),yield*this.pop(i)}if((r.type==="document"||r.type==="block-map"||r.type==="block-seq")&&(i.type==="block-map"||i.type==="block-seq")){const l=i.items[i.items.length-1];l&&!l.sep&&!l.value&&l.start.length>0&&Pb(l.start)===-1&&(i.indent===0||l.start.every(c=>c.type!=="comment"||c.indent<i.indent))&&(r.type==="document"?r.end=l.start:r.items.push({start:l.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":{Pb(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=Kl(this.peek(2)),r=_s(i);let l;n.end?(l=n.end,l.push(this.sourceToken),delete n.end):l=[this.sourceToken];const c={type:"block-map",offset:n.offset,indent:n.indent,items:[{start:r,key:n,sep:l}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=c}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(`
190
+ `?yield*this.pushCount(2):0}*pushSpaces(n){let i=this.pos-1,r;do r=this.buffer[++i];while(r===" "||n&&r===" ");const l=i-this.pos;return l>0&&(yield this.buffer.substr(this.pos,l),this.pos=i),l}*pushUntil(n){let i=this.pos,r=this.buffer[i];for(;!n(r);)r=this.buffer[++i];return yield*this.pushToIndex(i,!1)}}class k5{constructor(){this.lineStarts=[],this.addNewLine=n=>this.lineStarts.push(n),this.linePos=n=>{let i=0,r=this.lineStarts.length;for(;i<r;){const c=i+r>>1;this.lineStarts[c]<n?i=c+1:r=c}if(this.lineStarts[i]===n)return{line:i+1,col:1};if(i===0)return{line:0,col:n};const l=this.lineStarts[i-1];return{line:i,col:n-l+1}}}}function Ia(e,n){for(let i=0;i<e.length;++i)if(e[i].type===n)return!0;return!1}function Pb(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 V1(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 Kl(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 _s(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 Kb(e){if(e.start.type==="flow-seq-start")for(const n of e.items)n.sep&&!n.value&&!Ia(n.start,"explicit-key-ind")&&!Ia(n.sep,"map-value-ind")&&(n.key&&(n.value=n.key),delete n.key,V1(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 A5{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 N5,this.onNewLine=n}*parse(n,i=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const r of this.lexer.lex(n,i))yield*this.next(r);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=x5(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 r=`Not a YAML token: ${n}`;yield*this.pop({type:"error",offset:this.offset,message:r,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 r=this.peek(1);switch(i.type==="block-scalar"?i.indent="indent"in r?r.indent:0:i.type==="flow-collection"&&r.type==="document"&&(i.indent=0),i.type==="flow-collection"&&Kb(i),r.type){case"document":r.value=i;break;case"block-scalar":r.props.push(i);break;case"block-map":{const l=r.items[r.items.length-1];if(l.value){r.items.push({start:[],key:i,sep:[]}),this.onKeyLine=!0;return}else if(l.sep)l.value=i;else{Object.assign(l,{key:i,sep:[]}),this.onKeyLine=!l.explicitKey;return}break}case"block-seq":{const l=r.items[r.items.length-1];l.value?r.items.push({start:[],value:i}):l.value=i;break}case"flow-collection":{const l=r.items[r.items.length-1];!l||l.value?r.items.push({start:[],key:i,sep:[]}):l.sep?l.value=i:Object.assign(l,{key:i,sep:[]});return}default:yield*this.pop(),yield*this.pop(i)}if((r.type==="document"||r.type==="block-map"||r.type==="block-seq")&&(i.type==="block-map"||i.type==="block-seq")){const l=i.items[i.items.length-1];l&&!l.sep&&!l.value&&l.start.length>0&&Pb(l.start)===-1&&(i.indent===0||l.start.every(c=>c.type!=="comment"||c.indent<i.indent))&&(r.type==="document"?r.end=l.start:r.items.push({start:l.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":{Pb(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=Kl(this.peek(2)),r=_s(i);let l;n.end?(l=n.end,l.push(this.sourceToken),delete n.end):l=[this.sourceToken];const c={type:"block-map",offset:n.offset,indent:n.indent,items:[{start:r,key:n,sep:l}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=c}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(`
191
191
  `)+1;for(;i!==0;)this.onNewLine(this.offset+i),i=this.source.indexOf(`
192
192
  `,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 r="end"in i.value?i.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.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 l=n.items[n.items.length-2]?.value?.end;if(Array.isArray(l)){Array.prototype.push.apply(l,i.start),l.push(this.sourceToken),n.items.pop();return}}i.start.push(this.sourceToken)}return}if(this.indent>=n.indent){const r=!this.onKeyLine&&this.indent===n.indent,l=r&&(i.sep||i.explicitKey)&&this.type!=="seq-item-ind";let c=[];if(l&&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&&(c=i.sep.splice(d[1]))}switch(this.type){case"anchor":case"tag":l||i.value?(c.push(this.sourceToken),n.items.push({start:c}),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):l||i.value?(c.push(this.sourceToken),n.items.push({start:c,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(Ia(i.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:c,key:null,sep:[this.sourceToken]}]});else if(V1(i.key)&&!Ia(i.sep,"newline")){const d=_s(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 c.length>0?i.sep=i.sep.concat(c,this.sourceToken):i.sep.push(this.sourceToken);else if(Ia(i.start,"newline"))Object.assign(i,{key:null,sep:[this.sourceToken]});else{const d=_s(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||l?n.items.push({start:c,key:null,sep:[this.sourceToken]}):Ia(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);l||i.value?(n.items.push({start:c,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&&!Ia(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 r&&n.items.push({start:c});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 r="end"in i.value?i.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.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 l=n.items[n.items.length-2]?.value?.end;if(Array.isArray(l)){Array.prototype.push.apply(l,i.start),l.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||Ia(i.start,"seq-item-ind")?n.items.push({start:[this.sourceToken]}):i.start.push(this.sourceToken);return}if(this.indent>n.indent){const r=this.startBlockValue(n);if(r){this.stack.push(r);return}}yield*this.pop(),yield*this.step()}*flowCollection(n){const i=n.items[n.items.length-1];if(this.type==="flow-error-end"){let r;do yield*this.pop(),r=this.peek(1);while(r?.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 l=this.flowScalar(this.type);!i||i.value?n.items.push({start:[],key:l,sep:[]}):i.sep?this.stack.push(l):Object.assign(i,{key:l,sep:[]});return}case"flow-map-end":case"flow-seq-end":n.end.push(this.sourceToken);return}const r=this.startBlockValue(n);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{const r=this.peek(2);if(r.type==="block-map"&&(this.type==="map-value-ind"&&r.indent===n.indent||this.type==="newline"&&!r.items[r.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&r.type!=="flow-collection"){const l=Kl(r),c=_s(l);Kb(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:c,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(`
193
193
  `)+1;for(;i!==0;)this.onNewLine(this.offset+i),i=this.source.indexOf(`
194
- `,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=Kl(n),r=_s(i);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const i=Kl(n),r=_s(i);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(n,i){return this.type!=="comment"||this.indent<=i?!1:n.every(r=>r.type==="newline"||r.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 A5(e){const n=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||n&&new N5||null,prettyErrors:n}}function _5(e,n={}){const{lineCounter:i,prettyErrors:r}=A5(n),l=new k5(i?.addNewLine),c=new v5(n),d=Array.from(c.compose(l.parse(e)));if(r&&i)for(const m of d)m.errors.forEach(Gb(e,i)),m.warnings.forEach(Gb(e,i));return d.length>0?d:Object.assign([],{empty:!0},c.streamInfo())}function z5({onApplied:e}){const[n,i]=$.useState(""),[r,l]=$.useState(!1),[c,d]=$.useState([]),[m,g]=$.useState([]),b=async()=>{if(!n.trim())return;l(!0),d([]),g([]);const v=_5(n),S=[],w=[];for(let _=0;_<v.length;_++){const C=v[_];if(C.errors.length>0){S.push(`Document ${_+1}: ${C.errors[0]?.message}`);continue}const N=C.toJSON();if(!(!N||typeof N!="object"))try{const T=await PN(N);w.push(`Applied "${T.displayName||T.name}" (revision ${T.configRevision})`)}catch(T){S.push(`Document ${_+1}: ${T instanceof Error?T.message:String(T)}`)}}d(w),g(S),l(!1),w.length>0&&(un({title:"YAML applied",detail:`Applied ${w.length} document${w.length===1?"":"s"} successfully.`,tone:S.length>0?"caution":"positive",dedupeKey:"yaml:apply",dedupeMode:"replace"}),e())};return f.jsxs("section",{className:"mt-8",children:[f.jsx("div",{className:"page-section-divider"}),f.jsx("div",{className:"section-head mt-6",children:f.jsxs("div",{children:[f.jsx("p",{className:"eyebrow eyebrow-soft",children:"Config as code"}),f.jsx("h2",{className:"text-sm font-medium text-zinc-200",children:"Apply YAML"})]})}),f.jsxs("p",{className:"text-zinc-500 text-sm mb-3",children:["Paste a ",f.jsx("code",{className:"text-zinc-400",children:"canonry.yaml"})," config (multi-document YAML with ",f.jsx("code",{className:"text-zinc-400",children:"---"})," separators supported)."]}),f.jsx("textarea",{className:"setup-input w-full font-mono text-xs",rows:10,placeholder:`apiVersion: canonry/v1
194
+ `,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=Kl(n),r=_s(i);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const i=Kl(n),r=_s(i);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(n,i){return this.type!=="comment"||this.indent<=i?!1:n.every(r=>r.type==="newline"||r.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 _5(e){const n=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||n&&new k5||null,prettyErrors:n}}function z5(e,n={}){const{lineCounter:i,prettyErrors:r}=_5(n),l=new A5(i?.addNewLine),c=new S5(n),d=Array.from(c.compose(l.parse(e)));if(r&&i)for(const m of d)m.errors.forEach(Gb(e,i)),m.warnings.forEach(Gb(e,i));return d.length>0?d:Object.assign([],{empty:!0},c.streamInfo())}function C5({onApplied:e}){const[n,i]=U.useState(""),[r,l]=U.useState(!1),[c,d]=U.useState([]),[m,g]=U.useState([]),b=async()=>{if(!n.trim())return;l(!0),d([]),g([]);const v=z5(n),S=[],w=[];for(let _=0;_<v.length;_++){const C=v[_];if(C.errors.length>0){S.push(`Document ${_+1}: ${C.errors[0]?.message}`);continue}const N=C.toJSON();if(!(!N||typeof N!="object"))try{const T=await PN(N);w.push(`Applied "${T.displayName||T.name}" (revision ${T.configRevision})`)}catch(T){S.push(`Document ${_+1}: ${T instanceof Error?T.message:String(T)}`)}}d(w),g(S),l(!1),w.length>0&&(un({title:"YAML applied",detail:`Applied ${w.length} document${w.length===1?"":"s"} successfully.`,tone:S.length>0?"caution":"positive",dedupeKey:"yaml:apply",dedupeMode:"replace"}),e())};return f.jsxs("section",{className:"mt-8",children:[f.jsx("div",{className:"page-section-divider"}),f.jsx("div",{className:"section-head mt-6",children:f.jsxs("div",{children:[f.jsx("p",{className:"eyebrow eyebrow-soft",children:"Config as code"}),f.jsx("h2",{className:"text-sm font-medium text-zinc-200",children:"Apply YAML"})]})}),f.jsxs("p",{className:"text-zinc-500 text-sm mb-3",children:["Paste a ",f.jsx("code",{className:"text-zinc-400",children:"canonry.yaml"})," config (multi-document YAML with ",f.jsx("code",{className:"text-zinc-400",children:"---"})," separators supported)."]}),f.jsx("textarea",{className:"setup-input w-full font-mono text-xs",rows:10,placeholder:`apiVersion: canonry/v1
195
195
  kind: Project
196
196
  metadata:
197
197
  name: my-project
@@ -199,12 +199,12 @@ spec:
199
199
  canonicalDomain: example.com
200
200
  country: US
201
201
  language: en
202
- queries: []`,value:n,onChange:v=>i(v.target.value)}),c.length>0&&f.jsx("ul",{className:"mt-2 space-y-1",children:c.map((v,S)=>f.jsx("li",{className:"text-emerald-400 text-sm",children:v},S))}),m.length>0&&f.jsx("ul",{className:"mt-2 space-y-1",children:m.map((v,S)=>f.jsx("li",{className:"text-rose-400 text-sm",children:v},S))}),f.jsx("div",{className:"mt-3",children:f.jsx(Le,{type:"button",disabled:!n.trim()||r,onClick:xn(b),children:r?"Applying...":"Apply"})})]})}function C5(){const{dashboard:e,isLoading:n,refetch:i}=xc();if(!e||n)return f.jsxs("div",{className:"page-skeleton",children:[f.jsxs("div",{className:"page-skeleton-header",children:[f.jsx("div",{className:"skeleton-text h-6 w-28"}),f.jsx("div",{className:"skeleton-text-sm w-40"})]}),f.jsxs("div",{className:"rounded-xl border border-zinc-800/60 bg-zinc-900/30 overflow-hidden",children:[f.jsx("div",{className:"p-3 border-b border-zinc-800/60 flex gap-8",children:["Name","Domain","Mentions","Last run","Country"].map(D=>f.jsx("div",{className:"skeleton-text-sm w-16"},D))}),[1,2,3].map(D=>f.jsxs("div",{className:"p-3 border-b border-zinc-800/40 flex gap-8 items-center",children:[f.jsxs("div",{className:"flex-1 space-y-1",children:[f.jsx("div",{className:"skeleton-text w-28"}),f.jsx("div",{className:"skeleton-text-sm w-16"})]}),f.jsx("div",{className:"skeleton-text w-24"}),f.jsx("div",{className:"skeleton h-5 w-14 rounded-full"}),f.jsx("div",{className:"skeleton h-5 w-16 rounded-full"}),f.jsx("div",{className:"skeleton-text-sm w-8"})]},D))]})]});const r=e.projects,l=dc(),[c,d]=$.useState(!1),[m,g]=$.useState(""),[b,v]=$.useState(""),[S,w]=$.useState(""),[_,C]=$.useState("US"),[N,T]=$.useState("en"),[R,G]=$.useState(!1),[H,K]=$.useState(null),X=m.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),J=async()=>{if(!(!X||!S)){G(!0),K(null);try{const D=await co(X,{displayName:b||m,canonicalDomain:S,country:_,language:N});un({title:"Project created",detail:`${D.displayName||D.name} is ready to configure.`,tone:"positive",dedupeKey:`project:create:${D.name}`,dedupeMode:"drop"}),i(),g(""),v(""),w(""),C("US"),T("en"),d(!1),l({to:"/projects/$projectId",params:{projectId:D.id}})}catch(D){K(D instanceof Error?D.message:"Failed to create project")}finally{G(!1)}}};return f.jsxs("div",{className:"page-container",children:[f.jsxs("div",{className:"page-header",children:[f.jsxs("div",{className:"page-header-left",children:[f.jsx("h1",{className:"page-title",children:"Projects"}),f.jsxs("p",{className:"page-subtitle",children:[r.length," project",r.length!==1?"s":""," tracked"]})]}),f.jsx("div",{className:"page-header-right",children:f.jsxs(Le,{type:"button",onClick:()=>d(D=>!D),children:[f.jsx(qy,{className:"size-4 mr-1.5"}),"Add project"]})})]}),c?f.jsxs(wn,{className:"surface-card mb-6",children:[f.jsx("div",{className:"section-head",children:f.jsxs("div",{children:[f.jsx("p",{className:"eyebrow eyebrow-soft",children:"New project"}),f.jsx("h2",{className:"text-sm font-medium text-zinc-200",children:"Create a new monitoring project"})]})}),f.jsxs("div",{className:"compact-stack mt-4",children:[f.jsxs("div",{className:"setup-field-row",children:[f.jsxs("div",{className:"setup-field",children:[f.jsx("label",{className:"setup-label",htmlFor:"new-project-name",children:"Project name"}),f.jsx("input",{id:"new-project-name",className:"setup-input",type:"text",placeholder:"my-project",value:m,onChange:D=>g(D.target.value)}),X&&X!==m?f.jsxs("p",{className:"supporting-copy",children:["Slug: ",X]}):null]}),f.jsxs("div",{className:"setup-field",children:[f.jsx("label",{className:"setup-label",htmlFor:"new-display-name",children:"Display name"}),f.jsx("input",{id:"new-display-name",className:"setup-input",type:"text",placeholder:"My Project",value:b,onChange:D=>v(D.target.value)})]})]}),f.jsxs("div",{className:"setup-field",children:[f.jsx("label",{className:"setup-label",htmlFor:"new-domain",children:"Canonical domain"}),f.jsx("input",{id:"new-domain",className:"setup-input",type:"text",placeholder:"example.com",value:S,onChange:D=>w(D.target.value)})]}),f.jsxs("div",{className:"setup-field-row",children:[f.jsxs("div",{className:"setup-field",children:[f.jsx("label",{className:"setup-label",htmlFor:"new-country",children:"Country"}),f.jsx("input",{id:"new-country",className:"setup-input",type:"text",placeholder:"US",maxLength:2,value:_,onChange:D=>C(D.target.value.toUpperCase())})]}),f.jsxs("div",{className:"setup-field",children:[f.jsx("label",{className:"setup-label",htmlFor:"new-language",children:"Language"}),f.jsx("input",{id:"new-language",className:"setup-input",type:"text",placeholder:"en",maxLength:5,value:N,onChange:D=>T(D.target.value.toLowerCase())})]})]})]}),H?f.jsx("p",{className:"text-rose-400 text-sm mt-3",children:H}):null,f.jsxs("div",{className:"flex items-center gap-3 mt-4",children:[f.jsx(Le,{type:"button",disabled:!X||!S||R,onClick:xn(J),children:R?"Creating...":"Create project"}),f.jsx(Le,{type:"button",variant:"ghost",onClick:()=>d(!1),children:"Cancel"})]})]}):null,r.length>0?f.jsx("div",{className:"data-table-wrapper",children:f.jsxs("table",{className:"data-table",children:[f.jsx("thead",{children:f.jsxs("tr",{children:[f.jsx("th",{children:"Name"}),f.jsx("th",{children:"Domain"}),f.jsx("th",{children:"Mentions"}),f.jsx("th",{children:"Last run"}),f.jsx("th",{className:"text-right",children:"Country"})]})}),f.jsx("tbody",{children:r.map(D=>{const M=D.recentRuns[0];return f.jsxs("tr",{className:"cursor-pointer",onClick:()=>{l({to:"/projects/$projectId",params:{projectId:D.project.id}})},children:[f.jsxs("td",{children:[f.jsx(rt,{to:"/projects/$projectId",params:{projectId:D.project.id},className:"text-zinc-100 font-medium hover:underline",onClick:oe=>oe.stopPropagation(),children:D.project.displayName||D.project.name}),f.jsx("p",{className:"text-[11px] text-zinc-500",children:D.project.name})]}),f.jsx("td",{className:"text-zinc-400",children:D.project.canonicalDomain}),f.jsx("td",{children:f.jsx(Bn,{tone:D.mentionSummary.tone,children:D.mentionSummary.value})}),f.jsx("td",{className:"text-zinc-500 text-sm",children:M?f.jsx(fp,{status:M.status}):f.jsx("span",{className:"text-zinc-600",children:"No runs"})}),f.jsx("td",{className:"text-right text-zinc-500",children:D.project.country})]},D.project.id)})})]})}):c?null:f.jsxs(wn,{className:"surface-card empty-card",children:[f.jsx("h3",{children:"No projects yet"}),f.jsx("p",{className:"supporting-copy",children:"Create your first monitoring project to start tracking AI visibility."}),f.jsxs(Le,{type:"button",onClick:()=>d(!0),children:[f.jsx(qy,{className:"size-4 mr-1.5"}),"Add project"]})]}),f.jsx(z5,{onApplied:()=>{i()}})]})}function G1(e){e.invalidateQueries({queryKey:lp({client:ae})}),e.invalidateQueries({queryKey:Ks({client:ae})})}function T5(e){return e==="gsc-sync"?"GSC sync queued":e==="inspect-sitemap"?"Sitemap inspection queued":"Visibility sweep queued"}function E5(e,n){const i=e??"Project";return n==="gsc-sync"?`${i} will refresh after the sync completes.`:n==="inspect-sitemap"?`${i} will notify you when sitemap inspection finishes.`:`${i} will notify you when the run finishes.`}function Dc(e,n){E0({id:e.id,projectId:e.projectId,kind:e.kind,projectLabel:n.projectLabel,sourceAction:n.sourceAction,lastAnnouncedStatus:"queued"}),un({title:T5(e.kind),detail:E5(n.projectLabel,e.kind),tone:"neutral",dedupeKey:`run:${e.id}`,dedupeMode:"replace"})}function O5(e){const n=e.filter(l=>l.status!=="conflict"),i=e.filter(l=>l.status==="conflict");if(n.length===0){un({title:"No runs queued",detail:i.length>0?`${i.length} project${i.length===1?"":"s"} already had a run in progress.`:"No projects were available to queue.",tone:"caution",durationMs:8e3,dedupeKey:"run-all:conflict",dedupeMode:"replace"});return}for(const l of n)E0({id:l.id,projectId:l.projectId,kind:l.kind,projectLabel:l.projectName,sourceAction:"run-all",lastAnnouncedStatus:"queued"});const r=JO({runIds:n.map(l=>l.id),queuedCount:n.length,skippedCount:i.length});un({title:"Run-all batch queued",detail:i.length>0?`${n.length} project${n.length===1?"":"s"} queued, ${i.length} skipped because a run is already active.`:`${n.length} project${n.length===1?"":"s"} queued.`,tone:i.length>0?"caution":"neutral",dedupeKey:`batch:${r}`,dedupeMode:"replace"})}function Rc(e,n){if(e instanceof In&&e.code==="RUN_IN_PROGRESS"){un({title:"Run already in progress",detail:n?.projectLabel?`${n.projectLabel} already has an active run. Wait for it to finish, then retry.`:"This project already has an active run. Wait for it to finish, then retry.",tone:"caution",durationMs:8e3,dedupeKey:`run-in-progress:${n?.projectKey??"project"}:${n?.sourceAction??"run"}`,dedupeMode:"replace"});return}un({title:e instanceof Error?e.message:"Failed to queue run",tone:"negative"})}function D5(){const e=Ka();return Ai({meta:{skipGlobalErrorToast:!0},mutationFn:({projectName:n,opts:i})=>VN(n,i),onSuccess:(n,i)=>{G1(e),Dc(n,{projectLabel:i.projectLabel??i.projectName,sourceAction:i.sourceAction})},onError:(n,i)=>{Rc(n,{projectKey:i.projectName,projectLabel:i.projectLabel??i.projectName,sourceAction:i.sourceAction})}})}function d6(){const e=Ka();return Ai({meta:{skipGlobalErrorToast:!0},mutationFn:n=>KN(n),onSuccess:n=>{G1(e),O5(n)},onError:n=>{un({title:n instanceof Error?n.message:"Failed to queue runs",tone:"negative"})}})}function f6(){const e=Ka();return Ai({meta:{skipGlobalErrorToast:!0},mutationFn:({projectName:n,opts:i})=>QN(n,i),onSuccess:(n,i)=>{wc(e,Ee["gsc-sync"],i.projectName),Dc(n,{projectLabel:i.projectLabel??i.projectName,sourceAction:"gsc-sync"})},onError:(n,i)=>{Rc(n,{projectKey:i.projectName,projectLabel:i.projectLabel??i.projectName,sourceAction:"gsc-sync"})}})}function p6(){const e=Ka();return Ai({meta:{skipGlobalErrorToast:!0},mutationFn:({projectName:n})=>JN(n),onSuccess:(n,i)=>{wc(e,n.run.kind,i.projectName),Dc(n.run,{projectLabel:i.projectLabel??i.projectName,sourceAction:"discover-sitemaps"})},onError:(n,i)=>{Rc(n,{projectKey:i.projectName,projectLabel:i.projectLabel??i.projectName,sourceAction:"discover-sitemaps"})}})}function m6(){const e=Ka();return Ai({meta:{skipGlobalErrorToast:!0},mutationFn:({projectName:n,opts:i})=>XN(n,i),onSuccess:(n,i)=>{wc(e,Ee["inspect-sitemap"],i.projectName),Dc(n,{projectLabel:i.projectLabel??i.projectName,sourceAction:"inspect-sitemap"})},onError:(n,i)=>{Rc(n,{projectKey:i.projectName,projectLabel:i.projectLabel??i.projectName,sourceAction:"inspect-sitemap"})}})}function I1(e){if(!Array.isArray(e.queryKey)||e.queryKey.length<=1)return!1;const n=e.queryKey[0];return n==="projects"||n==="project-dashboard-full"}function h6(){const e=Ka();return Ai({mutationFn:({projectName:n,queries:i})=>qN(n,i),onSuccess:()=>{e.invalidateQueries({queryKey:Ks({client:ae})}),e.invalidateQueries({predicate:I1})}})}function g6(){const e=Ka();return Ai({mutationFn:({projectName:n,body:i})=>UN(n,i),onSuccess:()=>{e.invalidateQueries({predicate:n=>Array.isArray(n.queryKey)&&typeof n.queryKey[0]=="object"&&n.queryKey[0]!==null&&"_id"in n.queryKey[0]&&typeof n.queryKey[0]._id=="string"&&n.queryKey[0]._id.startsWith("getApiV1ProjectsByName")}),e.invalidateQueries({predicate:I1})}})}const R5=[{label:"System check",description:"Verify your instance is ready"},{label:"Create project",description:"Name, domain, and locale"},{label:"Queries",description:"Add queries to track"},{label:"Competitors",description:"Add competitor domains"},{label:"Launch",description:"Start your first visibility sweep"}];function M5({current:e,labels:n}){return f.jsx("div",{className:"setup-steps",role:"list","aria-label":"Setup progress",children:n.map((i,r)=>{const l=r<e,c=r===e;return f.jsxs("div",{className:`setup-step ${l?"setup-step-done":""} ${c?"setup-step-active":""}`,role:"listitem","aria-current":c?"step":void 0,children:[f.jsx("span",{className:"setup-step-number",children:l?"✓":r+1}),f.jsx("span",{className:"setup-step-label",children:i.label})]},i.label)})})}function B5(){const e=uo(),{dashboard:n,isLoading:i,refetch:r}=xc(),l=n??e?.dashboard;if(!l||i)return f.jsxs("div",{className:"page-skeleton",children:[f.jsxs("div",{className:"page-skeleton-header",children:[f.jsx("div",{className:"skeleton-text h-6 w-24"}),f.jsx("div",{className:"skeleton-text-sm w-80"})]}),f.jsxs("div",{className:"page-skeleton-card",children:[f.jsx("div",{className:"skeleton-text w-32"}),f.jsx("div",{className:"space-y-3 mt-3",children:[1,2,3].map(ee=>f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("div",{className:"space-y-1 flex-1",children:[f.jsx("div",{className:"skeleton-text w-24"}),f.jsx("div",{className:"skeleton-text-sm w-48"})]}),f.jsx("div",{className:"skeleton h-6 w-16 rounded-full"})]},ee))})]})]});const c=l.settings,g=mp(!e,e?.health).data??e?.health??{apiStatus:{label:"API",state:"checking",detail:"Checking service health"},workerStatus:{label:"Worker",state:"checking",detail:"Checking service health"}},b=ZO(l.setup,g,c),v=dc(),[S,w]=$.useState(0),[_,C]=$.useState(""),[N,T]=$.useState(""),[R,G]=$.useState(""),[H,K]=$.useState("US"),[X,J]=$.useState("en"),[D,M]=$.useState(!1),[oe,Ne]=$.useState(null),[Ae,ve]=$.useState(null),[et,re]=$.useState(null),[pe,U]=$.useState(!1),[F,de]=$.useState(""),[je,ie]=$.useState(!1),[Qe,Q]=$.useState(null),[le,te]=$.useState(!1),ue=c.providerStatuses.filter(ee=>ee.state==="ready"),[ne,_e]=$.useState(ue[0]?.name??""),[tt,xe]=$.useState(5),[$e,Ze]=$.useState(!1),[Ct,zn]=$.useState(null),[Tt,Fs]=$.useState(""),[Ei,Mc]=$.useState(!1),[Ws,Oi]=$.useState(null),[Di,Ri]=$.useState(!1),[go,Bc]=$.useState(!1),[Lt,yo]=$.useState(!1),[er,bo]=$.useState(null),Mi=D5(),Lc=cn({..._0({client:ae,path:{id:er??""}}),enabled:!!er,refetchInterval:({state:ee})=>{const Fe=ee.data?.status;return Fe==="completed"||Fe==="partial"||Fe==="failed"||Fe==="cancelled"?!1:2e3},refetchIntervalInBackground:!0}),[Bi,vo]=$.useState(""),[tr,ga]=$.useState(!1),[qt,Cn]=$.useState(null),mt=_.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),qn=F.split(`
202
+ queries: []`,value:n,onChange:v=>i(v.target.value)}),c.length>0&&f.jsx("ul",{className:"mt-2 space-y-1",children:c.map((v,S)=>f.jsx("li",{className:"text-emerald-400 text-sm",children:v},S))}),m.length>0&&f.jsx("ul",{className:"mt-2 space-y-1",children:m.map((v,S)=>f.jsx("li",{className:"text-rose-400 text-sm",children:v},S))}),f.jsx("div",{className:"mt-3",children:f.jsx(Le,{type:"button",disabled:!n.trim()||r,onClick:xn(b),children:r?"Applying...":"Apply"})})]})}function T5(){const{dashboard:e,isLoading:n,refetch:i}=xc();if(!e||n)return f.jsxs("div",{className:"page-skeleton",children:[f.jsxs("div",{className:"page-skeleton-header",children:[f.jsx("div",{className:"skeleton-text h-6 w-28"}),f.jsx("div",{className:"skeleton-text-sm w-40"})]}),f.jsxs("div",{className:"rounded-xl border border-zinc-800/60 bg-zinc-900/30 overflow-hidden",children:[f.jsx("div",{className:"p-3 border-b border-zinc-800/60 flex gap-8",children:["Name","Domain","Mentions","Last run","Country"].map(D=>f.jsx("div",{className:"skeleton-text-sm w-16"},D))}),[1,2,3].map(D=>f.jsxs("div",{className:"p-3 border-b border-zinc-800/40 flex gap-8 items-center",children:[f.jsxs("div",{className:"flex-1 space-y-1",children:[f.jsx("div",{className:"skeleton-text w-28"}),f.jsx("div",{className:"skeleton-text-sm w-16"})]}),f.jsx("div",{className:"skeleton-text w-24"}),f.jsx("div",{className:"skeleton h-5 w-14 rounded-full"}),f.jsx("div",{className:"skeleton h-5 w-16 rounded-full"}),f.jsx("div",{className:"skeleton-text-sm w-8"})]},D))]})]});const r=e.projects,l=dc(),[c,d]=U.useState(!1),[m,g]=U.useState(""),[b,v]=U.useState(""),[S,w]=U.useState(""),[_,C]=U.useState("US"),[N,T]=U.useState("en"),[R,G]=U.useState(!1),[H,K]=U.useState(null),X=m.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),J=async()=>{if(!(!X||!S)){G(!0),K(null);try{const D=await co(X,{displayName:b||m,canonicalDomain:S,country:_,language:N});un({title:"Project created",detail:`${D.displayName||D.name} is ready to configure.`,tone:"positive",dedupeKey:`project:create:${D.name}`,dedupeMode:"drop"}),i(),g(""),v(""),w(""),C("US"),T("en"),d(!1),l({to:"/projects/$projectId",params:{projectId:D.id}})}catch(D){K(D instanceof Error?D.message:"Failed to create project")}finally{G(!1)}}};return f.jsxs("div",{className:"page-container",children:[f.jsxs("div",{className:"page-header",children:[f.jsxs("div",{className:"page-header-left",children:[f.jsx("h1",{className:"page-title",children:"Projects"}),f.jsxs("p",{className:"page-subtitle",children:[r.length," project",r.length!==1?"s":""," tracked"]})]}),f.jsx("div",{className:"page-header-right",children:f.jsxs(Le,{type:"button",onClick:()=>d(D=>!D),children:[f.jsx(qy,{className:"size-4 mr-1.5"}),"Add project"]})})]}),c?f.jsxs(wn,{className:"surface-card mb-6",children:[f.jsx("div",{className:"section-head",children:f.jsxs("div",{children:[f.jsx("p",{className:"eyebrow eyebrow-soft",children:"New project"}),f.jsx("h2",{className:"text-sm font-medium text-zinc-200",children:"Create a new monitoring project"})]})}),f.jsxs("div",{className:"compact-stack mt-4",children:[f.jsxs("div",{className:"setup-field-row",children:[f.jsxs("div",{className:"setup-field",children:[f.jsx("label",{className:"setup-label",htmlFor:"new-project-name",children:"Project name"}),f.jsx("input",{id:"new-project-name",className:"setup-input",type:"text",placeholder:"my-project",value:m,onChange:D=>g(D.target.value)}),X&&X!==m?f.jsxs("p",{className:"supporting-copy",children:["Slug: ",X]}):null]}),f.jsxs("div",{className:"setup-field",children:[f.jsx("label",{className:"setup-label",htmlFor:"new-display-name",children:"Display name"}),f.jsx("input",{id:"new-display-name",className:"setup-input",type:"text",placeholder:"My Project",value:b,onChange:D=>v(D.target.value)})]})]}),f.jsxs("div",{className:"setup-field",children:[f.jsx("label",{className:"setup-label",htmlFor:"new-domain",children:"Canonical domain"}),f.jsx("input",{id:"new-domain",className:"setup-input",type:"text",placeholder:"example.com",value:S,onChange:D=>w(D.target.value)})]}),f.jsxs("div",{className:"setup-field-row",children:[f.jsxs("div",{className:"setup-field",children:[f.jsx("label",{className:"setup-label",htmlFor:"new-country",children:"Country"}),f.jsx("input",{id:"new-country",className:"setup-input",type:"text",placeholder:"US",maxLength:2,value:_,onChange:D=>C(D.target.value.toUpperCase())})]}),f.jsxs("div",{className:"setup-field",children:[f.jsx("label",{className:"setup-label",htmlFor:"new-language",children:"Language"}),f.jsx("input",{id:"new-language",className:"setup-input",type:"text",placeholder:"en",maxLength:5,value:N,onChange:D=>T(D.target.value.toLowerCase())})]})]})]}),H?f.jsx("p",{className:"text-rose-400 text-sm mt-3",children:H}):null,f.jsxs("div",{className:"flex items-center gap-3 mt-4",children:[f.jsx(Le,{type:"button",disabled:!X||!S||R,onClick:xn(J),children:R?"Creating...":"Create project"}),f.jsx(Le,{type:"button",variant:"ghost",onClick:()=>d(!1),children:"Cancel"})]})]}):null,r.length>0?f.jsx("div",{className:"data-table-wrapper",children:f.jsxs("table",{className:"data-table",children:[f.jsx("thead",{children:f.jsxs("tr",{children:[f.jsx("th",{children:"Name"}),f.jsx("th",{children:"Domain"}),f.jsx("th",{children:"Mentions"}),f.jsx("th",{children:"Last run"}),f.jsx("th",{className:"text-right",children:"Country"})]})}),f.jsx("tbody",{children:r.map(D=>{const M=D.recentRuns[0];return f.jsxs("tr",{className:"cursor-pointer",onClick:()=>{l({to:"/projects/$projectId",params:{projectId:D.project.id}})},children:[f.jsxs("td",{children:[f.jsx(rt,{to:"/projects/$projectId",params:{projectId:D.project.id},className:"text-zinc-100 font-medium hover:underline",onClick:oe=>oe.stopPropagation(),children:D.project.displayName||D.project.name}),f.jsx("p",{className:"text-[11px] text-zinc-500",children:D.project.name})]}),f.jsx("td",{className:"text-zinc-400",children:D.project.canonicalDomain}),f.jsx("td",{children:f.jsx(Bn,{tone:D.mentionSummary.tone,children:D.mentionSummary.value})}),f.jsx("td",{className:"text-zinc-500 text-sm",children:M?f.jsx(fp,{status:M.status}):f.jsx("span",{className:"text-zinc-600",children:"No runs"})}),f.jsx("td",{className:"text-right text-zinc-500",children:D.project.country})]},D.project.id)})})]})}):c?null:f.jsxs(wn,{className:"surface-card empty-card",children:[f.jsx("h3",{children:"No projects yet"}),f.jsx("p",{className:"supporting-copy",children:"Create your first monitoring project to start tracking AI visibility."}),f.jsxs(Le,{type:"button",onClick:()=>d(!0),children:[f.jsx(qy,{className:"size-4 mr-1.5"}),"Add project"]})]}),f.jsx(C5,{onApplied:()=>{i()}})]})}function G1(e){e.invalidateQueries({queryKey:lp({client:ae})}),e.invalidateQueries({queryKey:Ks({client:ae})})}function E5(e){return e==="gsc-sync"?"GSC sync queued":e==="inspect-sitemap"?"Sitemap inspection queued":"Visibility sweep queued"}function O5(e,n){const i=e??"Project";return n==="gsc-sync"?`${i} will refresh after the sync completes.`:n==="inspect-sitemap"?`${i} will notify you when sitemap inspection finishes.`:`${i} will notify you when the run finishes.`}function Dc(e,n){E0({id:e.id,projectId:e.projectId,kind:e.kind,projectLabel:n.projectLabel,sourceAction:n.sourceAction,lastAnnouncedStatus:"queued"}),un({title:E5(e.kind),detail:O5(n.projectLabel,e.kind),tone:"neutral",dedupeKey:`run:${e.id}`,dedupeMode:"replace"})}function D5(e){const n=e.filter(l=>l.status!=="conflict"),i=e.filter(l=>l.status==="conflict");if(n.length===0){un({title:"No runs queued",detail:i.length>0?`${i.length} project${i.length===1?"":"s"} already had a run in progress.`:"No projects were available to queue.",tone:"caution",durationMs:8e3,dedupeKey:"run-all:conflict",dedupeMode:"replace"});return}for(const l of n)E0({id:l.id,projectId:l.projectId,kind:l.kind,projectLabel:l.projectName,sourceAction:"run-all",lastAnnouncedStatus:"queued"});const r=FO({runIds:n.map(l=>l.id),queuedCount:n.length,skippedCount:i.length});un({title:"Run-all batch queued",detail:i.length>0?`${n.length} project${n.length===1?"":"s"} queued, ${i.length} skipped because a run is already active.`:`${n.length} project${n.length===1?"":"s"} queued.`,tone:i.length>0?"caution":"neutral",dedupeKey:`batch:${r}`,dedupeMode:"replace"})}function Rc(e,n){if(e instanceof In&&e.code==="RUN_IN_PROGRESS"){un({title:"Run already in progress",detail:n?.projectLabel?`${n.projectLabel} already has an active run. Wait for it to finish, then retry.`:"This project already has an active run. Wait for it to finish, then retry.",tone:"caution",durationMs:8e3,dedupeKey:`run-in-progress:${n?.projectKey??"project"}:${n?.sourceAction??"run"}`,dedupeMode:"replace"});return}un({title:e instanceof Error?e.message:"Failed to queue run",tone:"negative"})}function R5(){const e=Ka();return Ai({meta:{skipGlobalErrorToast:!0},mutationFn:({projectName:n,opts:i})=>VN(n,i),onSuccess:(n,i)=>{G1(e),Dc(n,{projectLabel:i.projectLabel??i.projectName,sourceAction:i.sourceAction})},onError:(n,i)=>{Rc(n,{projectKey:i.projectName,projectLabel:i.projectLabel??i.projectName,sourceAction:i.sourceAction})}})}function p6(){const e=Ka();return Ai({meta:{skipGlobalErrorToast:!0},mutationFn:n=>KN(n),onSuccess:n=>{G1(e),D5(n)},onError:n=>{un({title:n instanceof Error?n.message:"Failed to queue runs",tone:"negative"})}})}function m6(){const e=Ka();return Ai({meta:{skipGlobalErrorToast:!0},mutationFn:({projectName:n,opts:i})=>QN(n,i),onSuccess:(n,i)=>{wc(e,Ee["gsc-sync"],i.projectName),Dc(n,{projectLabel:i.projectLabel??i.projectName,sourceAction:"gsc-sync"})},onError:(n,i)=>{Rc(n,{projectKey:i.projectName,projectLabel:i.projectLabel??i.projectName,sourceAction:"gsc-sync"})}})}function h6(){const e=Ka();return Ai({meta:{skipGlobalErrorToast:!0},mutationFn:({projectName:n})=>JN(n),onSuccess:(n,i)=>{wc(e,n.run.kind,i.projectName),Dc(n.run,{projectLabel:i.projectLabel??i.projectName,sourceAction:"discover-sitemaps"})},onError:(n,i)=>{Rc(n,{projectKey:i.projectName,projectLabel:i.projectLabel??i.projectName,sourceAction:"discover-sitemaps"})}})}function g6(){const e=Ka();return Ai({meta:{skipGlobalErrorToast:!0},mutationFn:({projectName:n,opts:i})=>XN(n,i),onSuccess:(n,i)=>{wc(e,Ee["inspect-sitemap"],i.projectName),Dc(n,{projectLabel:i.projectLabel??i.projectName,sourceAction:"inspect-sitemap"})},onError:(n,i)=>{Rc(n,{projectKey:i.projectName,projectLabel:i.projectLabel??i.projectName,sourceAction:"inspect-sitemap"})}})}function I1(e){if(!Array.isArray(e.queryKey)||e.queryKey.length<=1)return!1;const n=e.queryKey[0];return n==="projects"||n==="project-dashboard-full"}function y6(){const e=Ka();return Ai({mutationFn:({projectName:n,queries:i})=>qN(n,i),onSuccess:()=>{e.invalidateQueries({queryKey:Ks({client:ae})}),e.invalidateQueries({predicate:I1})}})}function b6(){const e=Ka();return Ai({mutationFn:({projectName:n,body:i})=>$N(n,i),onSuccess:()=>{e.invalidateQueries({predicate:n=>Array.isArray(n.queryKey)&&typeof n.queryKey[0]=="object"&&n.queryKey[0]!==null&&"_id"in n.queryKey[0]&&typeof n.queryKey[0]._id=="string"&&n.queryKey[0]._id.startsWith("getApiV1ProjectsByName")}),e.invalidateQueries({predicate:I1})}})}const M5=[{label:"System check",description:"Verify your instance is ready"},{label:"Create project",description:"Name, domain, and locale"},{label:"Queries",description:"Add queries to track"},{label:"Competitors",description:"Add competitor domains"},{label:"Launch",description:"Start your first visibility sweep"}];function B5({current:e,labels:n}){return f.jsx("div",{className:"setup-steps",role:"list","aria-label":"Setup progress",children:n.map((i,r)=>{const l=r<e,c=r===e;return f.jsxs("div",{className:`setup-step ${l?"setup-step-done":""} ${c?"setup-step-active":""}`,role:"listitem","aria-current":c?"step":void 0,children:[f.jsx("span",{className:"setup-step-number",children:l?"✓":r+1}),f.jsx("span",{className:"setup-step-label",children:i.label})]},i.label)})})}function L5(){const e=uo(),{dashboard:n,isLoading:i,refetch:r}=xc(),l=n??e?.dashboard;if(!l||i)return f.jsxs("div",{className:"page-skeleton",children:[f.jsxs("div",{className:"page-skeleton-header",children:[f.jsx("div",{className:"skeleton-text h-6 w-24"}),f.jsx("div",{className:"skeleton-text-sm w-80"})]}),f.jsxs("div",{className:"page-skeleton-card",children:[f.jsx("div",{className:"skeleton-text w-32"}),f.jsx("div",{className:"space-y-3 mt-3",children:[1,2,3].map(ee=>f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("div",{className:"space-y-1 flex-1",children:[f.jsx("div",{className:"skeleton-text w-24"}),f.jsx("div",{className:"skeleton-text-sm w-48"})]}),f.jsx("div",{className:"skeleton h-6 w-16 rounded-full"})]},ee))})]})]});const c=l.settings,g=mp(!e,e?.health).data??e?.health??{apiStatus:{label:"API",state:"checking",detail:"Checking service health"},workerStatus:{label:"Worker",state:"checking",detail:"Checking service health"}},b=PO(l.setup,g,c),v=dc(),[S,w]=U.useState(0),[_,C]=U.useState(""),[N,T]=U.useState(""),[R,G]=U.useState(""),[H,K]=U.useState("US"),[X,J]=U.useState("en"),[D,M]=U.useState(!1),[oe,Ne]=U.useState(null),[Ae,ve]=U.useState(null),[et,re]=U.useState(null),[pe,$]=U.useState(!1),[F,de]=U.useState(""),[je,ie]=U.useState(!1),[Qe,Q]=U.useState(null),[le,te]=U.useState(!1),ue=c.providerStatuses.filter(ee=>ee.state==="ready"),[ne,_e]=U.useState(ue[0]?.name??""),[tt,xe]=U.useState(5),[Ue,Ze]=U.useState(!1),[Ct,zn]=U.useState(null),[Tt,Fs]=U.useState(""),[Ei,Mc]=U.useState(!1),[Ws,Oi]=U.useState(null),[Di,Ri]=U.useState(!1),[go,Bc]=U.useState(!1),[Lt,yo]=U.useState(!1),[er,bo]=U.useState(null),Mi=R5(),Lc=cn({..._0({client:ae,path:{id:er??""}}),enabled:!!er,refetchInterval:({state:ee})=>{const Fe=ee.data?.status;return Fe==="completed"||Fe==="partial"||Fe==="failed"||Fe==="cancelled"?!1:2e3},refetchIntervalInBackground:!0}),[Bi,vo]=U.useState(""),[tr,ga]=U.useState(!1),[qt,Cn]=U.useState(null),mt=_.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),qn=F.split(`
203
203
  `).map(ee=>ee.trim()).filter(Boolean),Fa=Tt.split(`
204
- `).map(ee=>ee.trim()).filter(Boolean),qc=b.healthChecks.some(ee=>ee.id==="api"&&ee.state==="ready"),Li=async()=>{if(!(!mt||!R)){U(!0),re(null);try{const ee=await co(mt,{displayName:N||_,canonicalDomain:R,country:H,language:X,autoExtractBacklinks:D});Ne(mt),ve(ee.id),un({title:"Project created",detail:`${ee.displayName||ee.name} is ready for setup.`,tone:"positive",dedupeKey:`project:create:${ee.name}`,dedupeMode:"drop"}),await r(),w(2)}catch(ee){re(ee instanceof Error?ee.message:"Failed to create project")}finally{U(!1)}}},qi=async()=>{if(!oe)return;const ee=qn;if(ee.length!==0){te(!0),Q(null);try{await LN(oe,ee),ie(!0),await r(),w(3)}catch(Fe){Q(Fe instanceof Error?Fe.message:"Failed to save queries")}finally{te(!1)}}},Ui=async()=>{if(!(!oe||!ne)){Ze(!0),zn(null);try{const ee=await ZN(oe,ne,tt);if(ee.queries.length>0){const Fe=F?F.trimEnd()+`
204
+ `).map(ee=>ee.trim()).filter(Boolean),qc=b.healthChecks.some(ee=>ee.id==="api"&&ee.state==="ready"),Li=async()=>{if(!(!mt||!R)){$(!0),re(null);try{const ee=await co(mt,{displayName:N||_,canonicalDomain:R,country:H,language:X,autoExtractBacklinks:D});Ne(mt),ve(ee.id),un({title:"Project created",detail:`${ee.displayName||ee.name} is ready for setup.`,tone:"positive",dedupeKey:`project:create:${ee.name}`,dedupeMode:"drop"}),await r(),w(2)}catch(ee){re(ee instanceof Error?ee.message:"Failed to create project")}finally{$(!1)}}},qi=async()=>{if(!oe)return;const ee=qn;if(ee.length!==0){te(!0),Q(null);try{await LN(oe,ee),ie(!0),await r(),w(3)}catch(Fe){Q(Fe instanceof Error?Fe.message:"Failed to save queries")}finally{te(!1)}}},$i=async()=>{if(!(!oe||!ne)){Ze(!0),zn(null);try{const ee=await ZN(oe,ne,tt);if(ee.queries.length>0){const Fe=F?F.trimEnd()+`
205
205
  `+ee.queries.join(`
206
206
  `):ee.queries.join(`
207
- `);de(Fe)}}catch(ee){zn(ee instanceof Error?ee.message:"Failed to generate queries")}finally{Ze(!1)}}},Pn=async()=>{if(!oe)return;const ee=Fa;if(ee.length!==0){Ri(!0),Oi(null);try{await $N(oe,ee),Mc(!0),await r(),w(4)}catch(Fe){Oi(Fe instanceof Error?Fe.message:"Failed to save competitors")}finally{Ri(!1)}}},$i=async()=>{const ee=Bi.trim();if(ee){ga(!0),Cn(null);try{await HN("gemini",{apiKey:ee}),un({title:"Gemini configured",detail:"Provider is ready — continuing setup.",tone:"positive",dedupeKey:"setup:gemini:configured",dedupeMode:"drop"}),vo(""),await r()}catch(Fe){Cn(Fe instanceof Error?Fe.message:"Failed to save Gemini key")}finally{ga(!1)}}},Wa=async()=>{if(oe){yo(!0);try{const ee=await Mi.mutateAsync({projectName:oe,projectLabel:N||_||oe,sourceAction:"setup-launch"});bo(ee.id),Bc(!0),await r()}catch{}finally{yo(!1)}}},Kn=()=>w(ee=>Math.max(0,ee-1)),So=(()=>{switch(S){case 0:return f.jsxs(wn,{className:"surface-card step-card",children:[f.jsx("div",{className:"section-head",children:f.jsxs("div",{children:[f.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 1 of 5"}),f.jsx("h2",{children:"System ready"})]})}),f.jsx("p",{className:"supporting-copy",children:"Checking that your Canonry instance is configured and reachable."}),f.jsx("div",{className:"compact-stack",children:b.healthChecks.map(ee=>f.jsxs("div",{className:"health-check-row",children:[f.jsxs("div",{children:[f.jsx("p",{className:"run-row-title",children:ee.label}),f.jsx("p",{className:"supporting-copy",children:ee.detail}),ee.id==="provider"&&ee.state!=="ready"&&f.jsxs("div",{className:"mt-3 rounded-md border border-zinc-800/60 bg-zinc-900/40 p-3 space-y-2",children:[f.jsxs("p",{className:"text-xs text-zinc-400",children:["Paste a Gemini key to enable visibility checks (free at"," ",f.jsx("a",{href:"https://aistudio.google.com/apikey",target:"_blank",rel:"noreferrer",className:"text-emerald-400 hover:text-emerald-300 underline underline-offset-2",children:"aistudio.google.com"}),")."]}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("input",{type:"password",value:Bi,onChange:Fe=>vo(Fe.target.value),placeholder:"AI... (paste here)",className:"flex-1 rounded-md border border-zinc-800 bg-zinc-950 px-2.5 py-1.5 text-sm text-zinc-100 placeholder:text-zinc-600 focus:border-zinc-600 focus:outline-none font-mono",disabled:tr}),f.jsx(Le,{type:"button",size:"sm",disabled:tr||!Bi.trim(),onClick:xn($i),children:tr?"Saving...":"Save"})]}),qt&&f.jsx("p",{className:"text-xs text-rose-400",children:qt}),f.jsxs("p",{className:"text-[11px] text-zinc-600",children:["Other providers (OpenAI, Claude, Perplexity) configurable later via"," ",f.jsx(rt,{to:"/settings",className:"text-zinc-500 hover:text-zinc-300 underline underline-offset-2",children:"/settings"}),"."]})]})]}),f.jsx(Bn,{tone:ee.state==="ready"?"positive":"caution",title:ee.id==="api"?Us(g.apiStatus):ee.id==="worker"?Us(g.workerStatus):ee.detail,children:ee.state==="ready"?"Ready":"Attention"})]},ee.id))}),f.jsxs("div",{className:"setup-nav",children:[f.jsx("span",{}),f.jsx(Le,{type:"button",disabled:!qc,onClick:()=>w(1),children:"Continue"})]})]});case 1:return f.jsxs(wn,{className:"surface-card step-card",children:[f.jsxs("div",{className:"section-head",children:[f.jsxs("div",{children:[f.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 2 of 5"}),f.jsx("h2",{children:"Create project"})]}),oe?f.jsx(Bn,{tone:"positive",children:"Created"}):null]}),oe?f.jsxs("div",{className:"compact-stack",children:[f.jsxs("p",{className:"text-zinc-300",children:["Project ",f.jsx("span",{className:"text-zinc-100 font-medium",children:oe})," created successfully."]}),f.jsxs("div",{className:"setup-nav",children:[f.jsx(Le,{type:"button",variant:"outline",onClick:Kn,children:"Back"}),f.jsx(Le,{type:"button",onClick:()=>w(2),children:"Continue"})]})]}):f.jsxs("div",{className:"compact-stack",children:[f.jsxs("div",{className:"setup-field",children:[f.jsx("label",{className:"setup-label",htmlFor:"project-name",children:"Project name"}),f.jsx("input",{id:"project-name",className:"setup-input",type:"text",placeholder:"my-website",value:_,onChange:ee=>C(ee.target.value)}),mt&&mt!==_?f.jsxs("p",{className:"supporting-copy",children:["Slug: ",mt]}):null]}),f.jsxs("div",{className:"setup-field",children:[f.jsx("label",{className:"setup-label",htmlFor:"display-name",children:"Display name (optional)"}),f.jsx("input",{id:"display-name",className:"setup-input",type:"text",placeholder:"My Website",value:N,onChange:ee=>T(ee.target.value)})]}),f.jsxs("div",{className:"setup-field",children:[f.jsx("label",{className:"setup-label",htmlFor:"domain",children:"Canonical domain"}),f.jsx("input",{id:"domain",className:"setup-input",type:"text",placeholder:"example.com",value:R,onChange:ee=>G(ee.target.value)})]}),f.jsxs("div",{className:"setup-field-row",children:[f.jsxs("div",{className:"setup-field",children:[f.jsx("label",{className:"setup-label",htmlFor:"country",children:"Country"}),f.jsx("input",{id:"country",className:"setup-input",type:"text",placeholder:"US",maxLength:2,value:H,onChange:ee=>K(ee.target.value.toUpperCase())})]}),f.jsxs("div",{className:"setup-field",children:[f.jsx("label",{className:"setup-label",htmlFor:"language",children:"Language"}),f.jsx("input",{id:"language",className:"setup-input",type:"text",placeholder:"en",maxLength:5,value:X,onChange:ee=>J(ee.target.value.toLowerCase())})]})]}),f.jsxs("label",{className:"flex items-start gap-3 rounded-md border border-zinc-800/60 bg-zinc-900/30 p-3 cursor-pointer hover:border-zinc-700",children:[f.jsx("input",{type:"checkbox",className:"mt-0.5 h-4 w-4 rounded border-zinc-700 bg-zinc-950",checked:D,onChange:ee=>M(ee.target.checked)}),f.jsxs("span",{className:"flex-1",children:[f.jsx("span",{className:"block text-sm text-zinc-100",children:"Auto-extract backlinks"}),f.jsxs("span",{className:"block text-xs text-zinc-500 mt-0.5",children:["When a new Common Crawl release syncs, automatically extract backlinks for this project."," ",f.jsx(rt,{to:"/backlinks",className:"text-emerald-400 hover:text-emerald-300 underline underline-offset-2",children:"Manage backlinks"})]})]})]}),et?f.jsx("p",{className:"text-rose-400 text-sm",children:et}):null,f.jsxs("div",{className:"setup-nav",children:[f.jsx(Le,{type:"button",variant:"outline",onClick:Kn,children:"Back"}),f.jsx(Le,{type:"button",disabled:!mt||!R||pe,onClick:xn(Li),children:pe?"Creating...":"Create project"})]})]})]});case 2:return f.jsxs(wn,{className:"surface-card step-card",children:[f.jsxs("div",{className:"section-head",children:[f.jsxs("div",{children:[f.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 3 of 5"}),f.jsx("h2",{children:"Add queries"})]}),je?f.jsxs(Bn,{tone:"positive",children:[qn.length," saved"]}):f.jsxs(Bn,{tone:"neutral",children:[qn.length," quer",qn.length!==1?"ies":"y"]})]}),f.jsx("p",{className:"supporting-copy",children:"Enter the search queries you want to track. One per line."}),je?f.jsxs("div",{className:"compact-stack",children:[f.jsx("ul",{className:"detail-list",children:qn.map(ee=>f.jsx("li",{children:ee},ee))}),f.jsxs("div",{className:"setup-nav",children:[f.jsx(Le,{type:"button",variant:"outline",onClick:Kn,children:"Back"}),f.jsx(Le,{type:"button",onClick:()=>w(3),children:"Continue"})]})]}):f.jsxs("div",{className:"compact-stack",children:[ue.length>0?f.jsxs("div",{className:"compact-stack",children:[f.jsxs("div",{className:"flex items-center gap-2 text-zinc-500 text-xs uppercase tracking-wide",children:[f.jsx("span",{className:"flex-1 border-t border-zinc-800"}),"auto-generate",f.jsx("span",{className:"flex-1 border-t border-zinc-800"})]}),f.jsxs("div",{className:"flex items-end gap-2",children:[f.jsxs("div",{className:"setup-field flex-1",children:[f.jsx("label",{className:"setup-label",htmlFor:"gen-provider",children:"Provider"}),f.jsx("select",{id:"gen-provider",className:"setup-input",value:ne,onChange:ee=>_e(ee.target.value),children:ue.map(ee=>f.jsxs("option",{value:ee.name,children:[ee.displayName??ee.name,ee.model?` (${ee.model})`:""]},ee.name))})]}),f.jsxs("div",{className:"setup-field",children:[f.jsx("label",{className:"setup-label",htmlFor:"gen-count",children:"Count"}),f.jsx("select",{id:"gen-count",className:"setup-input",value:tt,onChange:ee=>xe(Number(ee.target.value)),children:[3,5,10,15,20].map(ee=>f.jsx("option",{value:ee,children:ee},ee))})]}),f.jsx(Le,{type:"button",variant:"outline",disabled:$e||!ne,onClick:xn(Ui),children:$e?"Analyzing site...":"Generate"})]}),Ct?f.jsx("p",{className:"text-rose-400 text-sm",children:Ct}):null]}):null,f.jsxs("div",{className:"flex items-center gap-2 text-zinc-500 text-xs uppercase tracking-wide",children:[f.jsx("span",{className:"flex-1 border-t border-zinc-800"}),"or type manually",f.jsx("span",{className:"flex-1 border-t border-zinc-800"})]}),f.jsxs("div",{className:"setup-field",children:[f.jsx("label",{className:"setup-label",htmlFor:"queries",children:"Queries (one per line)"}),f.jsx("textarea",{id:"queries",className:"setup-textarea",rows:6,placeholder:`emergency dentist brooklyn
207
+ `);de(Fe)}}catch(ee){zn(ee instanceof Error?ee.message:"Failed to generate queries")}finally{Ze(!1)}}},Pn=async()=>{if(!oe)return;const ee=Fa;if(ee.length!==0){Ri(!0),Oi(null);try{await UN(oe,ee),Mc(!0),await r(),w(4)}catch(Fe){Oi(Fe instanceof Error?Fe.message:"Failed to save competitors")}finally{Ri(!1)}}},Ui=async()=>{const ee=Bi.trim();if(ee){ga(!0),Cn(null);try{await HN("gemini",{apiKey:ee}),un({title:"Gemini configured",detail:"Provider is ready — continuing setup.",tone:"positive",dedupeKey:"setup:gemini:configured",dedupeMode:"drop"}),vo(""),await r()}catch(Fe){Cn(Fe instanceof Error?Fe.message:"Failed to save Gemini key")}finally{ga(!1)}}},Wa=async()=>{if(oe){yo(!0);try{const ee=await Mi.mutateAsync({projectName:oe,projectLabel:N||_||oe,sourceAction:"setup-launch"});bo(ee.id),Bc(!0),await r()}catch{}finally{yo(!1)}}},Kn=()=>w(ee=>Math.max(0,ee-1)),So=(()=>{switch(S){case 0:return f.jsxs(wn,{className:"surface-card step-card",children:[f.jsx("div",{className:"section-head",children:f.jsxs("div",{children:[f.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 1 of 5"}),f.jsx("h2",{children:"System ready"})]})}),f.jsx("p",{className:"supporting-copy",children:"Checking that your Canonry instance is configured and reachable."}),f.jsx("div",{className:"compact-stack",children:b.healthChecks.map(ee=>f.jsxs("div",{className:"health-check-row",children:[f.jsxs("div",{children:[f.jsx("p",{className:"run-row-title",children:ee.label}),f.jsx("p",{className:"supporting-copy",children:ee.detail}),ee.id==="provider"&&ee.state!=="ready"&&f.jsxs("div",{className:"mt-3 rounded-md border border-zinc-800/60 bg-zinc-900/40 p-3 space-y-2",children:[f.jsxs("p",{className:"text-xs text-zinc-400",children:["Paste a Gemini key to enable visibility checks (free at"," ",f.jsx("a",{href:"https://aistudio.google.com/apikey",target:"_blank",rel:"noreferrer",className:"text-emerald-400 hover:text-emerald-300 underline underline-offset-2",children:"aistudio.google.com"}),")."]}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("input",{type:"password",value:Bi,onChange:Fe=>vo(Fe.target.value),placeholder:"AI... (paste here)",className:"flex-1 rounded-md border border-zinc-800 bg-zinc-950 px-2.5 py-1.5 text-sm text-zinc-100 placeholder:text-zinc-600 focus:border-zinc-600 focus:outline-none font-mono",disabled:tr}),f.jsx(Le,{type:"button",size:"sm",disabled:tr||!Bi.trim(),onClick:xn(Ui),children:tr?"Saving...":"Save"})]}),qt&&f.jsx("p",{className:"text-xs text-rose-400",children:qt}),f.jsxs("p",{className:"text-[11px] text-zinc-600",children:["Other providers (OpenAI, Claude, Perplexity) configurable later via"," ",f.jsx(rt,{to:"/settings",className:"text-zinc-500 hover:text-zinc-300 underline underline-offset-2",children:"/settings"}),"."]})]})]}),f.jsx(Bn,{tone:ee.state==="ready"?"positive":"caution",title:ee.id==="api"?$s(g.apiStatus):ee.id==="worker"?$s(g.workerStatus):ee.detail,children:ee.state==="ready"?"Ready":"Attention"})]},ee.id))}),f.jsxs("div",{className:"setup-nav",children:[f.jsx("span",{}),f.jsx(Le,{type:"button",disabled:!qc,onClick:()=>w(1),children:"Continue"})]})]});case 1:return f.jsxs(wn,{className:"surface-card step-card",children:[f.jsxs("div",{className:"section-head",children:[f.jsxs("div",{children:[f.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 2 of 5"}),f.jsx("h2",{children:"Create project"})]}),oe?f.jsx(Bn,{tone:"positive",children:"Created"}):null]}),oe?f.jsxs("div",{className:"compact-stack",children:[f.jsxs("p",{className:"text-zinc-300",children:["Project ",f.jsx("span",{className:"text-zinc-100 font-medium",children:oe})," created successfully."]}),f.jsxs("div",{className:"setup-nav",children:[f.jsx(Le,{type:"button",variant:"outline",onClick:Kn,children:"Back"}),f.jsx(Le,{type:"button",onClick:()=>w(2),children:"Continue"})]})]}):f.jsxs("div",{className:"compact-stack",children:[f.jsxs("div",{className:"setup-field",children:[f.jsx("label",{className:"setup-label",htmlFor:"project-name",children:"Project name"}),f.jsx("input",{id:"project-name",className:"setup-input",type:"text",placeholder:"my-website",value:_,onChange:ee=>C(ee.target.value)}),mt&&mt!==_?f.jsxs("p",{className:"supporting-copy",children:["Slug: ",mt]}):null]}),f.jsxs("div",{className:"setup-field",children:[f.jsx("label",{className:"setup-label",htmlFor:"display-name",children:"Display name (optional)"}),f.jsx("input",{id:"display-name",className:"setup-input",type:"text",placeholder:"My Website",value:N,onChange:ee=>T(ee.target.value)})]}),f.jsxs("div",{className:"setup-field",children:[f.jsx("label",{className:"setup-label",htmlFor:"domain",children:"Canonical domain"}),f.jsx("input",{id:"domain",className:"setup-input",type:"text",placeholder:"example.com",value:R,onChange:ee=>G(ee.target.value)})]}),f.jsxs("div",{className:"setup-field-row",children:[f.jsxs("div",{className:"setup-field",children:[f.jsx("label",{className:"setup-label",htmlFor:"country",children:"Country"}),f.jsx("input",{id:"country",className:"setup-input",type:"text",placeholder:"US",maxLength:2,value:H,onChange:ee=>K(ee.target.value.toUpperCase())})]}),f.jsxs("div",{className:"setup-field",children:[f.jsx("label",{className:"setup-label",htmlFor:"language",children:"Language"}),f.jsx("input",{id:"language",className:"setup-input",type:"text",placeholder:"en",maxLength:5,value:X,onChange:ee=>J(ee.target.value.toLowerCase())})]})]}),f.jsxs("label",{className:"flex items-start gap-3 rounded-md border border-zinc-800/60 bg-zinc-900/30 p-3 cursor-pointer hover:border-zinc-700",children:[f.jsx("input",{type:"checkbox",className:"mt-0.5 h-4 w-4 rounded border-zinc-700 bg-zinc-950",checked:D,onChange:ee=>M(ee.target.checked)}),f.jsxs("span",{className:"flex-1",children:[f.jsx("span",{className:"block text-sm text-zinc-100",children:"Auto-extract backlinks"}),f.jsxs("span",{className:"block text-xs text-zinc-500 mt-0.5",children:["When a new Common Crawl release syncs, automatically extract backlinks for this project."," ",f.jsx(rt,{to:"/backlinks",className:"text-emerald-400 hover:text-emerald-300 underline underline-offset-2",children:"Manage backlinks"})]})]})]}),et?f.jsx("p",{className:"text-rose-400 text-sm",children:et}):null,f.jsxs("div",{className:"setup-nav",children:[f.jsx(Le,{type:"button",variant:"outline",onClick:Kn,children:"Back"}),f.jsx(Le,{type:"button",disabled:!mt||!R||pe,onClick:xn(Li),children:pe?"Creating...":"Create project"})]})]})]});case 2:return f.jsxs(wn,{className:"surface-card step-card",children:[f.jsxs("div",{className:"section-head",children:[f.jsxs("div",{children:[f.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 3 of 5"}),f.jsx("h2",{children:"Add queries"})]}),je?f.jsxs(Bn,{tone:"positive",children:[qn.length," saved"]}):f.jsxs(Bn,{tone:"neutral",children:[qn.length," quer",qn.length!==1?"ies":"y"]})]}),f.jsx("p",{className:"supporting-copy",children:"Enter the search queries you want to track. One per line."}),je?f.jsxs("div",{className:"compact-stack",children:[f.jsx("ul",{className:"detail-list",children:qn.map(ee=>f.jsx("li",{children:ee},ee))}),f.jsxs("div",{className:"setup-nav",children:[f.jsx(Le,{type:"button",variant:"outline",onClick:Kn,children:"Back"}),f.jsx(Le,{type:"button",onClick:()=>w(3),children:"Continue"})]})]}):f.jsxs("div",{className:"compact-stack",children:[ue.length>0?f.jsxs("div",{className:"compact-stack",children:[f.jsxs("div",{className:"flex items-center gap-2 text-zinc-500 text-xs uppercase tracking-wide",children:[f.jsx("span",{className:"flex-1 border-t border-zinc-800"}),"auto-generate",f.jsx("span",{className:"flex-1 border-t border-zinc-800"})]}),f.jsxs("div",{className:"flex items-end gap-2",children:[f.jsxs("div",{className:"setup-field flex-1",children:[f.jsx("label",{className:"setup-label",htmlFor:"gen-provider",children:"Provider"}),f.jsx("select",{id:"gen-provider",className:"setup-input",value:ne,onChange:ee=>_e(ee.target.value),children:ue.map(ee=>f.jsxs("option",{value:ee.name,children:[ee.displayName??ee.name,ee.model?` (${ee.model})`:""]},ee.name))})]}),f.jsxs("div",{className:"setup-field",children:[f.jsx("label",{className:"setup-label",htmlFor:"gen-count",children:"Count"}),f.jsx("select",{id:"gen-count",className:"setup-input",value:tt,onChange:ee=>xe(Number(ee.target.value)),children:[3,5,10,15,20].map(ee=>f.jsx("option",{value:ee,children:ee},ee))})]}),f.jsx(Le,{type:"button",variant:"outline",disabled:Ue||!ne,onClick:xn($i),children:Ue?"Analyzing site...":"Generate"})]}),Ct?f.jsx("p",{className:"text-rose-400 text-sm",children:Ct}):null]}):null,f.jsxs("div",{className:"flex items-center gap-2 text-zinc-500 text-xs uppercase tracking-wide",children:[f.jsx("span",{className:"flex-1 border-t border-zinc-800"}),"or type manually",f.jsx("span",{className:"flex-1 border-t border-zinc-800"})]}),f.jsxs("div",{className:"setup-field",children:[f.jsx("label",{className:"setup-label",htmlFor:"queries",children:"Queries (one per line)"}),f.jsx("textarea",{id:"queries",className:"setup-textarea",rows:6,placeholder:`emergency dentist brooklyn
208
208
  best invisalign downtown brooklyn
209
209
  pediatric dentist brooklyn heights`,value:F,onChange:ee=>de(ee.target.value)})]}),Qe?f.jsx("p",{className:"text-rose-400 text-sm",children:Qe}):null,f.jsxs("div",{className:"setup-nav",children:[f.jsx(Le,{type:"button",variant:"outline",onClick:Kn,children:"Back"}),f.jsx(Le,{type:"button",disabled:qn.length===0||le,onClick:xn(qi),children:le?"Saving...":`Save ${qn.length} quer${qn.length!==1?"ies":"y"}`})]})]})]});case 3:return f.jsxs(wn,{className:"surface-card step-card",children:[f.jsxs("div",{className:"section-head",children:[f.jsxs("div",{children:[f.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 4 of 5"}),f.jsx("h2",{children:"Add competitors"})]}),Ei?f.jsx(Bn,{tone:"positive",children:"Saved"}):null]}),f.jsx("p",{className:"supporting-copy",children:"Domains that compete for the same queries. One per line."}),Ei?f.jsxs("div",{className:"compact-stack",children:[f.jsx("ul",{className:"detail-list",children:Fa.map(ee=>f.jsx("li",{children:ee},ee))}),f.jsxs("div",{className:"setup-nav",children:[f.jsx(Le,{type:"button",variant:"outline",onClick:Kn,children:"Back"}),f.jsx(Le,{type:"button",onClick:()=>w(4),children:"Continue"})]})]}):f.jsxs("div",{className:"compact-stack",children:[f.jsxs("div",{className:"setup-field",children:[f.jsx("label",{className:"setup-label",htmlFor:"competitors",children:"Competitor domains (one per line)"}),f.jsx("textarea",{id:"competitors",className:"setup-textarea",rows:4,placeholder:`competitor1.com
210
- competitor2.com`,value:Tt,onChange:ee=>Fs(ee.target.value)})]}),Ws?f.jsx("p",{className:"text-rose-400 text-sm",children:Ws}):null,f.jsxs("div",{className:"setup-nav",children:[f.jsx(Le,{type:"button",variant:"outline",onClick:Kn,children:"Back"}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx(Le,{type:"button",variant:"outline",onClick:()=>w(4),children:"Skip"}),f.jsx(Le,{type:"button",disabled:Fa.length===0||Di,onClick:xn(Pn),children:Di?"Saving...":`Save ${Fa.length} competitor${Fa.length!==1?"s":""}`})]})]})]})]});case 4:{const ee=Lc.data,Fe=ee?.status==="completed"||ee?.status==="partial"||ee?.status==="failed"||ee?.status==="cancelled",ei=ee?.snapshots??[],xo=ei.filter(Tn=>Tn.citationState==="cited").length,wo=ei.filter(Tn=>Tn.answerMentioned===!0).length,nr=new Set(ei.map(Tn=>Tn.query).filter(Tn=>!!Tn)).size,ar=go?Fe&&(ee?.status==="completed"||ee?.status==="partial")?f.jsx(Bn,{tone:"positive",children:"Complete"}):Fe?f.jsx(Bn,{tone:"negative",children:"Failed"}):f.jsx(Bn,{tone:"caution",children:"Running"}):null;return f.jsxs(wn,{className:"surface-card step-card",children:[f.jsxs("div",{className:"section-head",children:[f.jsxs("div",{children:[f.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 5 of 5"}),f.jsx("h2",{children:"Launch first run"})]}),ar]}),go?Fe?ee?.status==="failed"?f.jsxs("div",{className:"compact-stack",children:[f.jsx("p",{className:"text-rose-400",children:"Sweep failed. Inspect the run on the project page for the provider error and retry from there."}),f.jsxs("div",{className:"setup-nav",children:[f.jsx("span",{}),f.jsx(Le,{type:"button",onClick:()=>{v({to:Ae?`/projects/${Ae}`:"/"})},children:"Open project"})]})]}):f.jsxs("div",{className:"compact-stack",children:[f.jsxs("p",{className:"text-zinc-300",children:["Sweep complete. Your first answer-visibility snapshot for"," ",f.jsx("span",{className:"text-zinc-100 font-medium",children:oe}),":"]}),f.jsxs("div",{className:"grid grid-cols-3 gap-2 mt-1",children:[f.jsxs("div",{className:"rounded-md border border-zinc-800/60 bg-zinc-900/30 p-3",children:[f.jsx("p",{className:"text-[10px] uppercase tracking-wide text-zinc-500",children:"Mentioned"}),f.jsxs("p",{className:"text-2xl font-bold tabular-nums text-zinc-50 mt-1",children:[wo,f.jsxs("span",{className:"text-zinc-600 text-lg",children:[" / ",nr]})]}),f.jsx("p",{className:"text-[11px] text-zinc-500 mt-0.5",children:"queries with brand in answer"})]}),f.jsxs("div",{className:"rounded-md border border-zinc-800/60 bg-zinc-900/30 p-3",children:[f.jsx("p",{className:"text-[10px] uppercase tracking-wide text-zinc-500",children:"Cited"}),f.jsxs("p",{className:"text-2xl font-bold tabular-nums text-zinc-50 mt-1",children:[xo,f.jsxs("span",{className:"text-zinc-600 text-lg",children:[" / ",nr]})]}),f.jsx("p",{className:"text-[11px] text-zinc-500 mt-0.5",children:"queries with domain in sources"})]}),f.jsxs("div",{className:"rounded-md border border-zinc-800/60 bg-zinc-900/30 p-3",children:[f.jsx("p",{className:"text-[10px] uppercase tracking-wide text-zinc-500",children:"Snapshots"}),f.jsx("p",{className:"text-2xl font-bold tabular-nums text-zinc-50 mt-1",children:ei.length}),f.jsx("p",{className:"text-[11px] text-zinc-500 mt-0.5",children:"total (query × provider)"})]})]}),f.jsx("p",{className:"text-[11px] text-zinc-500 mt-1",children:"Full evidence, per-provider breakdown, and suggested next queries on the project dashboard."}),f.jsxs("div",{className:"setup-nav",children:[f.jsx("span",{}),f.jsx(Le,{type:"button",onClick:()=>{v({to:Ae?`/projects/${Ae}`:"/"})},children:"Open project dashboard →"})]})]}):f.jsxs("div",{className:"compact-stack",children:[f.jsx("p",{className:"text-zinc-300",children:"Sweep running — typically 30-60s. Polling every 2s…"}),f.jsx("div",{className:"rounded-md border border-zinc-800/60 bg-zinc-900/30 p-3 text-xs text-zinc-500",children:f.jsxs("p",{children:["Status: ",f.jsx("span",{className:"text-zinc-300",children:ee?.status??"queued"})]})}),f.jsxs("div",{className:"setup-nav",children:[f.jsx("span",{}),f.jsx(Le,{type:"button",variant:"outline",onClick:()=>{v({to:Ae?`/projects/${Ae}`:"/"})},children:"Watch on project page"})]})]}):f.jsxs("div",{className:"compact-stack",children:[f.jsxs("p",{className:"supporting-copy",children:["Everything is configured. Launch an answer-visibility sweep to start tracking citations for ",f.jsx("span",{className:"text-zinc-100 font-medium",children:oe}),"."]}),f.jsxs("div",{className:"setup-nav",children:[f.jsx(Le,{type:"button",variant:"outline",onClick:Kn,children:"Back"}),f.jsx(Le,{type:"button",disabled:Lt,onClick:xn(Wa),children:Lt?"Launching...":"Launch visibility sweep"})]})]})]})}default:return null}})();return f.jsxs("div",{className:"page-container",children:[f.jsx("div",{className:"page-header",children:f.jsxs("div",{className:"page-header-left",children:[f.jsx("h1",{className:"page-title",children:"Setup"}),f.jsx("p",{className:"page-subtitle",children:"Create a project, add queries, add competitors, and launch the first run."})]})}),f.jsx(M5,{current:S,labels:R5}),f.jsx("section",{className:"setup-wizard",children:So})]})}function L5(){return f.jsx("div",{className:"page-container",children:f.jsx("section",{className:"page-section",children:f.jsxs(wn,{className:"surface-card empty-card",children:[f.jsx("h1",{children:"Route not found"}),f.jsx("p",{children:"The current path does not map to a dashboard view."}),f.jsx(Le,{asChild:!0,children:f.jsx(rt,{to:"/",children:"Return to overview"})})]})})})}const Ti=Gs(()=>Is(()=>import("./ProjectPage-CM_uQa2L.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8]),import.meta.url),"ProjectPage"),q5=Gs(()=>Is(()=>import("./RunsPage-Dhuj1w72.js"),__vite__mapDeps([9,1,2,7,5,8]),import.meta.url),"RunsPage"),U5=Gs(()=>Is(()=>import("./SettingsPage-B2_vxr4y.js"),__vite__mapDeps([10,1,7,5,8]),import.meta.url),"SettingsPage"),$5=Gs(()=>Is(()=>import("./BacklinksPage-DELb5ok3.js"),__vite__mapDeps([11,1,6,7,5,8]),import.meta.url),"BacklinksPage"),V5=Gs(()=>Is(()=>import("./TrafficPage-BKaiZRIH.js"),__vite__mapDeps([12,1,4,13,7,5,8]),import.meta.url),"TrafficPage"),G5=Gs(()=>Is(()=>import("./TrafficSourceDetailPage-DXIQ4g9S.js"),__vite__mapDeps([14,1,3,4,5,13,7,8]),import.meta.url),"TrafficSourceDetailPage");function I5(){return f.jsx(mD,{children:f.jsx(pD,{})})}const Wt=uw()({component:I5,validateSearch:e=>({runId:typeof e.runId=="string"?e.runId:void 0,evidenceId:typeof e.evidenceId=="string"?e.evidenceId:void 0})}),H5=Bt({getParentRoute:()=>Wt,path:"/",component:yD,beforeLoad:({context:e})=>{const n=e.queryClient.getQueryData(Ks({client:ae}));if(n&&n.length===0)throw Jb({to:"/setup"})}}),Z5=Bt({getParentRoute:()=>Wt,path:"/projects",component:C5}),Ja=Bt({getParentRoute:()=>Wt,path:"/projects/$projectId",component:()=>f.jsx(Xb,{})}),P5=Bt({getParentRoute:()=>Ja,path:"/",component:()=>f.jsx(Ti,{tab:"overview"})}),K5=Bt({getParentRoute:()=>Ja,path:"/search-console",component:()=>f.jsx(Ti,{tab:"search-console"})}),Q5=Bt({getParentRoute:()=>Ja,path:"/discovery",component:()=>f.jsx(Ti,{tab:"discovery"})}),Y5=Bt({getParentRoute:()=>Ja,path:"/report",component:()=>f.jsx(Ti,{tab:"report"})}),X5=Bt({getParentRoute:()=>Ja,path:"/activity",component:()=>f.jsx(Ti,{tab:"activity"})}),J5=Bt({getParentRoute:()=>Ja,path:"/backlinks",component:()=>f.jsx(Ti,{tab:"backlinks"})}),F5=Bt({getParentRoute:()=>Ja,path:"/settings",component:()=>f.jsx(Ti,{tab:"settings"})}),W5=Bt({getParentRoute:()=>Wt,path:"/runs",component:q5}),eR=Bt({getParentRoute:()=>Wt,path:"/settings",component:U5,beforeLoad:({context:e})=>{}}),tR=Bt({getParentRoute:()=>Wt,path:"/setup",component:B5,beforeLoad:({context:e})=>{const n=e.queryClient.getQueryData(Ks({client:ae}));if(n&&n.length>0)throw Jb({to:"/"})}}),nR=Bt({getParentRoute:()=>Wt,path:"/backlinks",component:$5}),aR=Bt({getParentRoute:()=>Wt,path:"/traffic",component:V5}),iR=Bt({getParentRoute:()=>Wt,path:"/traffic/$projectName/$sourceId",component:G5}),sR=Bt({getParentRoute:()=>Wt,path:"*",component:L5}),rR=Wt.addChildren([H5,Z5,Ja.addChildren([P5,K5,Q5,Y5,X5,J5,F5]),W5,eR,tR,nR,aR,iR,sR]);function oR(){return typeof window<"u"&&window.__CANONRY_CONFIG__?.basePath?window.__CANONRY_CONFIG__.basePath:"/"}const Qb=oR(),lR=Qb==="/"?"":Qb.replace(/\/$/,"");function cR(e,n){return dw({routeTree:rR,basepath:lR||"/",context:{queryClient:e},...n?.initialEntries})}const uR=6e4;function dR(){const[e,n]=$.useState(Fd()?"ready":"checking"),[i,r]=$.useState(""),[l,c]=$.useState(""),[d,m]=$.useState(null),[g,b]=$.useState(!1),[v,S]=$.useState(!1),w=$.useRef(null),_=$.useRef(null),C=()=>{if(!w.current){const R=fk();_.current=R,w.current=cR(R)}return{queryClient:_.current,router:w.current}};$.useEffect(()=>{if(Fd())return;let R=!1;return Dy().then(G=>{R||(G.authenticated?n("ready"):n(G.setupRequired?"setup":"login"))}).catch(G=>{R||(m(G instanceof Error?G.message:"Failed to reach the Canonry API"),n("login"))}),()=>{R=!0}},[]),$.useEffect(()=>{if(e!=="ready"||Fd())return;const R=setInterval(()=>{Dy().then(G=>{G.authenticated||(S(!0),n(G.setupRequired?"setup":"login"))}).catch(()=>{})},uR);return Oy(()=>{S(!0),n("login")}),()=>{clearInterval(R),Oy(null)}},[e]);const N=async R=>{if(R.preventDefault(),!i.trim()||i.trim().length<8){m("Password must be at least 8 characters");return}if(i!==l){m("Passwords do not match");return}b(!0),m(null);try{if(!(await GN(i.trim())).authenticated){m("Setup failed");return}r(""),c(""),S(!1),n("ready")}catch(G){m(G instanceof In||G instanceof Error?G.message:"Setup failed")}finally{b(!1)}},T=async R=>{if(R.preventDefault(),!!i.trim()){b(!0),m(null);try{if(!(await IN(i.trim())).authenticated){m("Incorrect password");return}r(""),S(!1),n("ready")}catch(G){m(G instanceof In||G instanceof Error?G.message:"Authentication failed")}finally{b(!1)}}};if(e==="ready"){const{queryClient:R,router:G}=C();return f.jsx(fw,{client:R,children:f.jsx(pw,{router:G})})}return f.jsx("div",{className:"min-h-screen bg-zinc-950 px-4 py-8",children:f.jsx("div",{className:"mx-auto flex min-h-[calc(100vh-4rem)] max-w-md items-center justify-center",children:f.jsx(wn,{className:"surface-card w-full",children:e==="checking"?f.jsx(Ql,{className:"py-8",children:f.jsx("p",{className:"supporting-copy text-center",children:"Connecting to Canonry…"})}):e==="setup"?f.jsxs(f.Fragment,{children:[f.jsxs(Nf,{children:[f.jsx("p",{className:"eyebrow eyebrow-soft",children:"First-time setup"}),f.jsx(kf,{children:"Create a dashboard password"}),f.jsx(Af,{children:"Choose a password to protect the Canonry dashboard. You will use this to sign in on future visits."})]}),f.jsx(Ql,{children:f.jsxs("form",{className:"space-y-4",onSubmit:xn(N),children:[f.jsxs("label",{className:"block space-y-1.5",children:[f.jsx("span",{className:"text-xs font-medium text-zinc-400",children:"Password"}),f.jsx("input",{autoFocus:!0,className:"w-full rounded-md border border-zinc-800 bg-zinc-950 px-3 py-2 text-sm text-zinc-100 outline-none transition focus:border-zinc-600",type:"password",value:i,onChange:R=>r(R.target.value),placeholder:"At least 8 characters"})]}),f.jsxs("label",{className:"block space-y-1.5",children:[f.jsx("span",{className:"text-xs font-medium text-zinc-400",children:"Confirm password"}),f.jsx("input",{className:"w-full rounded-md border border-zinc-800 bg-zinc-950 px-3 py-2 text-sm text-zinc-100 outline-none transition focus:border-zinc-600",type:"password",value:l,onChange:R=>c(R.target.value),placeholder:"Re-enter password"})]}),d?f.jsx("p",{className:"text-sm text-rose-400",children:d}):null,f.jsx(Le,{type:"submit",disabled:g||!i.trim()||!l.trim(),children:g?"Setting up…":"Create password & open dashboard"})]})})]}):f.jsxs(f.Fragment,{children:[f.jsxs(Nf,{children:[f.jsx("p",{className:"eyebrow eyebrow-soft",children:"Dashboard access"}),f.jsx(kf,{children:"Sign in to Canonry"}),f.jsx(Af,{children:"Enter your dashboard password to continue."})]}),f.jsxs(Ql,{children:[v?f.jsx("p",{className:"mb-4 rounded-md border border-amber-500/30 bg-amber-500/10 px-3 py-2 text-sm text-amber-300",children:"Your session expired — please sign in again."}):null,f.jsxs("form",{className:"space-y-4",onSubmit:xn(T),children:[f.jsxs("label",{className:"block space-y-1.5",children:[f.jsx("span",{className:"text-xs font-medium text-zinc-400",children:"Password"}),f.jsx("input",{autoFocus:!0,className:"w-full rounded-md border border-zinc-800 bg-zinc-950 px-3 py-2 text-sm text-zinc-100 outline-none transition focus:border-zinc-600",type:"password",value:i,onChange:R=>r(R.target.value),placeholder:"Dashboard password"})]}),d?f.jsx("p",{className:"text-sm text-rose-400",children:d}):null,f.jsx(Le,{type:"submit",disabled:g||!i.trim(),children:g?"Signing in…":"Open dashboard"})]})]})]})})})})}const H1=document.getElementById("root");if(!H1)throw new Error("Expected #root element for web app bootstrap.");Sw.createRoot(H1).render(f.jsx($.StrictMode,{children:f.jsx(dR,{})}));export{hM as $,kR as A,Le as B,ic as C,MM as D,LM as E,qM as F,vM as G,MR as H,$l as I,RR as J,LR as K,un as L,HR as M,VM as N,GM as O,K4 as P,qR as Q,UM as R,rO as S,Bn as T,$M as U,BM as V,BR as W,UR as X,IM as Y,lM as Z,mM as _,c6 as a,YR as a$,In as a0,gM as a1,gR as a2,Ik as a3,CM as a4,Vk as a5,Jk as a6,Ee as a7,WO as a8,Fl as a9,zR as aA,CR as aB,OM as aC,TR as aD,ER as aE,DR as aF,OR as aG,uo as aH,op as aI,R3 as aJ,D5 as aK,It as aL,BN as aM,jR as aN,yR as aO,bR as aP,NR as aQ,qN as aR,MN as aS,$N as aT,vR as aU,h6 as aV,fO as aW,HM as aX,PM as aY,QN as aZ,KM as a_,yM as aa,gf as ab,t6 as ac,r6 as ad,o6 as ae,l6 as af,$R as ag,Ks as ah,VR as ai,lp as aj,e6 as ak,FR as al,g6 as am,jM as an,xM as ao,NM as ap,kM as aq,SM as ar,wM as as,wR as at,xR as au,SR as av,_R as aw,RM as ax,pb as ay,DM as az,$f as b,QR as b0,QM as b1,ZM as b2,zM as b3,ZR as b4,PR as b5,KR as b6,XR as b7,xc as b8,d6 as b9,ap as bA,Hs as bB,n6 as bC,s6 as bD,sM as bE,aM as bF,iM as bG,nM as bH,a6 as bI,fp as ba,HN as bb,AR as bc,GR as bd,IR as be,mp as bf,JR as bg,Us as bh,mb as bi,rM as bj,cM as bk,dM as bl,fM as bm,xv as bn,oM as bo,uM as bp,pM as bq,Q4 as br,Y0 as bs,W4 as bt,X0 as bu,J0 as bv,Lk as bw,qy as bx,i6 as by,AM as bz,at as c,JC as d,u6 as e,TM as f,wn as g,Ab as h,xn as i,bM as j,YM as k,ae as l,XM as m,JM as n,WM as o,FM as p,WR as q,tM as r,eM as s,A0 as t,hp as u,f6 as v,p6 as w,m6 as x,_M as y,EM as z};
210
+ competitor2.com`,value:Tt,onChange:ee=>Fs(ee.target.value)})]}),Ws?f.jsx("p",{className:"text-rose-400 text-sm",children:Ws}):null,f.jsxs("div",{className:"setup-nav",children:[f.jsx(Le,{type:"button",variant:"outline",onClick:Kn,children:"Back"}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx(Le,{type:"button",variant:"outline",onClick:()=>w(4),children:"Skip"}),f.jsx(Le,{type:"button",disabled:Fa.length===0||Di,onClick:xn(Pn),children:Di?"Saving...":`Save ${Fa.length} competitor${Fa.length!==1?"s":""}`})]})]})]})]});case 4:{const ee=Lc.data,Fe=ee?.status==="completed"||ee?.status==="partial"||ee?.status==="failed"||ee?.status==="cancelled",ei=ee?.snapshots??[],xo=ei.filter(Tn=>Tn.citationState==="cited").length,wo=ei.filter(Tn=>Tn.answerMentioned===!0).length,nr=new Set(ei.map(Tn=>Tn.query).filter(Tn=>!!Tn)).size,ar=go?Fe&&(ee?.status==="completed"||ee?.status==="partial")?f.jsx(Bn,{tone:"positive",children:"Complete"}):Fe?f.jsx(Bn,{tone:"negative",children:"Failed"}):f.jsx(Bn,{tone:"caution",children:"Running"}):null;return f.jsxs(wn,{className:"surface-card step-card",children:[f.jsxs("div",{className:"section-head",children:[f.jsxs("div",{children:[f.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 5 of 5"}),f.jsx("h2",{children:"Launch first run"})]}),ar]}),go?Fe?ee?.status==="failed"?f.jsxs("div",{className:"compact-stack",children:[f.jsx("p",{className:"text-rose-400",children:"Sweep failed. Inspect the run on the project page for the provider error and retry from there."}),f.jsxs("div",{className:"setup-nav",children:[f.jsx("span",{}),f.jsx(Le,{type:"button",onClick:()=>{v({to:Ae?`/projects/${Ae}`:"/"})},children:"Open project"})]})]}):f.jsxs("div",{className:"compact-stack",children:[f.jsxs("p",{className:"text-zinc-300",children:["Sweep complete. Your first answer-visibility snapshot for"," ",f.jsx("span",{className:"text-zinc-100 font-medium",children:oe}),":"]}),f.jsxs("div",{className:"grid grid-cols-3 gap-2 mt-1",children:[f.jsxs("div",{className:"rounded-md border border-zinc-800/60 bg-zinc-900/30 p-3",children:[f.jsx("p",{className:"text-[10px] uppercase tracking-wide text-zinc-500",children:"Mentioned"}),f.jsxs("p",{className:"text-2xl font-bold tabular-nums text-zinc-50 mt-1",children:[wo,f.jsxs("span",{className:"text-zinc-600 text-lg",children:[" / ",nr]})]}),f.jsx("p",{className:"text-[11px] text-zinc-500 mt-0.5",children:"queries with brand in answer"})]}),f.jsxs("div",{className:"rounded-md border border-zinc-800/60 bg-zinc-900/30 p-3",children:[f.jsx("p",{className:"text-[10px] uppercase tracking-wide text-zinc-500",children:"Cited"}),f.jsxs("p",{className:"text-2xl font-bold tabular-nums text-zinc-50 mt-1",children:[xo,f.jsxs("span",{className:"text-zinc-600 text-lg",children:[" / ",nr]})]}),f.jsx("p",{className:"text-[11px] text-zinc-500 mt-0.5",children:"queries with domain in sources"})]}),f.jsxs("div",{className:"rounded-md border border-zinc-800/60 bg-zinc-900/30 p-3",children:[f.jsx("p",{className:"text-[10px] uppercase tracking-wide text-zinc-500",children:"Snapshots"}),f.jsx("p",{className:"text-2xl font-bold tabular-nums text-zinc-50 mt-1",children:ei.length}),f.jsx("p",{className:"text-[11px] text-zinc-500 mt-0.5",children:"total (query × provider)"})]})]}),f.jsx("p",{className:"text-[11px] text-zinc-500 mt-1",children:"Full evidence, per-provider breakdown, and suggested next queries on the project dashboard."}),f.jsxs("div",{className:"setup-nav",children:[f.jsx("span",{}),f.jsx(Le,{type:"button",onClick:()=>{v({to:Ae?`/projects/${Ae}`:"/"})},children:"Open project dashboard →"})]})]}):f.jsxs("div",{className:"compact-stack",children:[f.jsx("p",{className:"text-zinc-300",children:"Sweep running — typically 30-60s. Polling every 2s…"}),f.jsx("div",{className:"rounded-md border border-zinc-800/60 bg-zinc-900/30 p-3 text-xs text-zinc-500",children:f.jsxs("p",{children:["Status: ",f.jsx("span",{className:"text-zinc-300",children:ee?.status??"queued"})]})}),f.jsxs("div",{className:"setup-nav",children:[f.jsx("span",{}),f.jsx(Le,{type:"button",variant:"outline",onClick:()=>{v({to:Ae?`/projects/${Ae}`:"/"})},children:"Watch on project page"})]})]}):f.jsxs("div",{className:"compact-stack",children:[f.jsxs("p",{className:"supporting-copy",children:["Everything is configured. Launch an answer-visibility sweep to start tracking citations for ",f.jsx("span",{className:"text-zinc-100 font-medium",children:oe}),"."]}),f.jsxs("div",{className:"setup-nav",children:[f.jsx(Le,{type:"button",variant:"outline",onClick:Kn,children:"Back"}),f.jsx(Le,{type:"button",disabled:Lt,onClick:xn(Wa),children:Lt?"Launching...":"Launch visibility sweep"})]})]})]})}default:return null}})();return f.jsxs("div",{className:"page-container",children:[f.jsx("div",{className:"page-header",children:f.jsxs("div",{className:"page-header-left",children:[f.jsx("h1",{className:"page-title",children:"Setup"}),f.jsx("p",{className:"page-subtitle",children:"Create a project, add queries, add competitors, and launch the first run."})]})}),f.jsx(B5,{current:S,labels:M5}),f.jsx("section",{className:"setup-wizard",children:So})]})}function q5(){return f.jsx("div",{className:"page-container",children:f.jsx("section",{className:"page-section",children:f.jsxs(wn,{className:"surface-card empty-card",children:[f.jsx("h1",{children:"Route not found"}),f.jsx("p",{children:"The current path does not map to a dashboard view."}),f.jsx(Le,{asChild:!0,children:f.jsx(rt,{to:"/",children:"Return to overview"})})]})})})}const Ti=Gs(()=>Is(()=>import("./ProjectPage-DAtd9Vay.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8]),import.meta.url),"ProjectPage"),$5=Gs(()=>Is(()=>import("./RunsPage-AJnFLtaE.js"),__vite__mapDeps([9,1,2,7,5,8]),import.meta.url),"RunsPage"),U5=Gs(()=>Is(()=>import("./SettingsPage-FT9ZAvFH.js"),__vite__mapDeps([10,1,7,5,8]),import.meta.url),"SettingsPage"),V5=Gs(()=>Is(()=>import("./BacklinksPage-BXFT4pLI.js"),__vite__mapDeps([11,1,6,7,5,8]),import.meta.url),"BacklinksPage"),G5=Gs(()=>Is(()=>import("./TrafficPage-B4A3oO8M.js"),__vite__mapDeps([12,1,4,13,7,5,8]),import.meta.url),"TrafficPage"),I5=Gs(()=>Is(()=>import("./TrafficSourceDetailPage-8NYU1TA6.js"),__vite__mapDeps([14,1,3,4,5,13,7,8]),import.meta.url),"TrafficSourceDetailPage");function H5(){return f.jsx(hD,{children:f.jsx(mD,{})})}const Wt=uw()({component:H5,validateSearch:e=>({runId:typeof e.runId=="string"?e.runId:void 0,evidenceId:typeof e.evidenceId=="string"?e.evidenceId:void 0})}),Z5=Bt({getParentRoute:()=>Wt,path:"/",component:bD,beforeLoad:({context:e})=>{const n=e.queryClient.getQueryData(Ks({client:ae}));if(n&&n.length===0)throw Jb({to:"/setup"})}}),P5=Bt({getParentRoute:()=>Wt,path:"/projects",component:T5}),Ja=Bt({getParentRoute:()=>Wt,path:"/projects/$projectId",component:()=>f.jsx(Xb,{})}),K5=Bt({getParentRoute:()=>Ja,path:"/",component:()=>f.jsx(Ti,{tab:"overview"})}),Q5=Bt({getParentRoute:()=>Ja,path:"/search-console",component:()=>f.jsx(Ti,{tab:"search-console"})}),Y5=Bt({getParentRoute:()=>Ja,path:"/discovery",component:()=>f.jsx(Ti,{tab:"discovery"})}),X5=Bt({getParentRoute:()=>Ja,path:"/report",component:()=>f.jsx(Ti,{tab:"report"})}),J5=Bt({getParentRoute:()=>Ja,path:"/activity",component:()=>f.jsx(Ti,{tab:"activity"})}),F5=Bt({getParentRoute:()=>Ja,path:"/backlinks",component:()=>f.jsx(Ti,{tab:"backlinks"})}),W5=Bt({getParentRoute:()=>Ja,path:"/settings",component:()=>f.jsx(Ti,{tab:"settings"})}),eR=Bt({getParentRoute:()=>Wt,path:"/runs",component:$5}),tR=Bt({getParentRoute:()=>Wt,path:"/settings",component:U5,beforeLoad:({context:e})=>{}}),nR=Bt({getParentRoute:()=>Wt,path:"/setup",component:L5,beforeLoad:({context:e})=>{const n=e.queryClient.getQueryData(Ks({client:ae}));if(n&&n.length>0)throw Jb({to:"/"})}}),aR=Bt({getParentRoute:()=>Wt,path:"/backlinks",component:V5}),iR=Bt({getParentRoute:()=>Wt,path:"/traffic",component:G5}),sR=Bt({getParentRoute:()=>Wt,path:"/traffic/$projectName/$sourceId",component:I5}),rR=Bt({getParentRoute:()=>Wt,path:"*",component:q5}),oR=Wt.addChildren([Z5,P5,Ja.addChildren([K5,Q5,Y5,X5,J5,F5,W5]),eR,tR,nR,aR,iR,sR,rR]);function lR(){return typeof window<"u"&&window.__CANONRY_CONFIG__?.basePath?window.__CANONRY_CONFIG__.basePath:"/"}const Qb=lR(),cR=Qb==="/"?"":Qb.replace(/\/$/,"");function uR(e,n){return dw({routeTree:oR,basepath:cR||"/",context:{queryClient:e},...n?.initialEntries})}const dR=6e4;function fR(){const[e,n]=U.useState(Fd()?"ready":"checking"),[i,r]=U.useState(""),[l,c]=U.useState(""),[d,m]=U.useState(null),[g,b]=U.useState(!1),[v,S]=U.useState(!1),w=U.useRef(null),_=U.useRef(null),C=()=>{if(!w.current){const R=fk();_.current=R,w.current=uR(R)}return{queryClient:_.current,router:w.current}};U.useEffect(()=>{if(Fd())return;let R=!1;return Dy().then(G=>{R||(G.authenticated?n("ready"):n(G.setupRequired?"setup":"login"))}).catch(G=>{R||(m(G instanceof Error?G.message:"Failed to reach the Canonry API"),n("login"))}),()=>{R=!0}},[]),U.useEffect(()=>{if(e!=="ready"||Fd())return;const R=setInterval(()=>{Dy().then(G=>{G.authenticated||(S(!0),n(G.setupRequired?"setup":"login"))}).catch(()=>{})},dR);return Oy(()=>{S(!0),n("login")}),()=>{clearInterval(R),Oy(null)}},[e]);const N=async R=>{if(R.preventDefault(),!i.trim()||i.trim().length<8){m("Password must be at least 8 characters");return}if(i!==l){m("Passwords do not match");return}b(!0),m(null);try{if(!(await GN(i.trim())).authenticated){m("Setup failed");return}r(""),c(""),S(!1),n("ready")}catch(G){m(G instanceof In||G instanceof Error?G.message:"Setup failed")}finally{b(!1)}},T=async R=>{if(R.preventDefault(),!!i.trim()){b(!0),m(null);try{if(!(await IN(i.trim())).authenticated){m("Incorrect password");return}r(""),S(!1),n("ready")}catch(G){m(G instanceof In||G instanceof Error?G.message:"Authentication failed")}finally{b(!1)}}};if(e==="ready"){const{queryClient:R,router:G}=C();return f.jsx(fw,{client:R,children:f.jsx(pw,{router:G})})}return f.jsx("div",{className:"min-h-screen bg-zinc-950 px-4 py-8",children:f.jsx("div",{className:"mx-auto flex min-h-[calc(100vh-4rem)] max-w-md items-center justify-center",children:f.jsx(wn,{className:"surface-card w-full",children:e==="checking"?f.jsx(Ql,{className:"py-8",children:f.jsx("p",{className:"supporting-copy text-center",children:"Connecting to Canonry…"})}):e==="setup"?f.jsxs(f.Fragment,{children:[f.jsxs(Nf,{children:[f.jsx("p",{className:"eyebrow eyebrow-soft",children:"First-time setup"}),f.jsx(kf,{children:"Create a dashboard password"}),f.jsx(Af,{children:"Choose a password to protect the Canonry dashboard. You will use this to sign in on future visits."})]}),f.jsx(Ql,{children:f.jsxs("form",{className:"space-y-4",onSubmit:xn(N),children:[f.jsxs("label",{className:"block space-y-1.5",children:[f.jsx("span",{className:"text-xs font-medium text-zinc-400",children:"Password"}),f.jsx("input",{autoFocus:!0,className:"w-full rounded-md border border-zinc-800 bg-zinc-950 px-3 py-2 text-sm text-zinc-100 outline-none transition focus:border-zinc-600",type:"password",value:i,onChange:R=>r(R.target.value),placeholder:"At least 8 characters"})]}),f.jsxs("label",{className:"block space-y-1.5",children:[f.jsx("span",{className:"text-xs font-medium text-zinc-400",children:"Confirm password"}),f.jsx("input",{className:"w-full rounded-md border border-zinc-800 bg-zinc-950 px-3 py-2 text-sm text-zinc-100 outline-none transition focus:border-zinc-600",type:"password",value:l,onChange:R=>c(R.target.value),placeholder:"Re-enter password"})]}),d?f.jsx("p",{className:"text-sm text-rose-400",children:d}):null,f.jsx(Le,{type:"submit",disabled:g||!i.trim()||!l.trim(),children:g?"Setting up…":"Create password & open dashboard"})]})})]}):f.jsxs(f.Fragment,{children:[f.jsxs(Nf,{children:[f.jsx("p",{className:"eyebrow eyebrow-soft",children:"Dashboard access"}),f.jsx(kf,{children:"Sign in to Canonry"}),f.jsx(Af,{children:"Enter your dashboard password to continue."})]}),f.jsxs(Ql,{children:[v?f.jsx("p",{className:"mb-4 rounded-md border border-amber-500/30 bg-amber-500/10 px-3 py-2 text-sm text-amber-300",children:"Your session expired — please sign in again."}):null,f.jsxs("form",{className:"space-y-4",onSubmit:xn(T),children:[f.jsxs("label",{className:"block space-y-1.5",children:[f.jsx("span",{className:"text-xs font-medium text-zinc-400",children:"Password"}),f.jsx("input",{autoFocus:!0,className:"w-full rounded-md border border-zinc-800 bg-zinc-950 px-3 py-2 text-sm text-zinc-100 outline-none transition focus:border-zinc-600",type:"password",value:i,onChange:R=>r(R.target.value),placeholder:"Dashboard password"})]}),d?f.jsx("p",{className:"text-sm text-rose-400",children:d}):null,f.jsx(Le,{type:"submit",disabled:g||!i.trim(),children:g?"Signing in…":"Open dashboard"})]})]})]})})})})}const H1=document.getElementById("root");if(!H1)throw new Error("Expected #root element for web app bootstrap.");Sw.createRoot(H1).render(f.jsx(U.StrictMode,{children:f.jsx(fR,{})}));export{gM as $,AR as A,Le as B,ic as C,LM as D,$M as E,UM as F,SM as G,BR as H,Ul as I,MR as J,qR as K,un as L,ZR as M,IM as N,HM as O,Q4 as P,$R as Q,VM as R,rO as S,Bn as T,GM as U,qM as V,LR as W,UR as X,ZM as Y,cM as Z,hM as _,d6 as a,XR as a$,In as a0,yM as a1,yR as a2,Ik as a3,TM as a4,Vk as a5,Jk as a6,Ee as a7,e4 as a8,Fl as a9,CR as aA,TR as aB,DM as aC,ER as aD,OR as aE,RR as aF,DR as aG,uo as aH,op as aI,M3 as aJ,R5 as aK,It as aL,BN as aM,NR as aN,bR as aO,vR as aP,kR as aQ,qN as aR,MN as aS,UN as aT,SR as aU,y6 as aV,pO as aW,PM as aX,QM as aY,QN as aZ,YM as a_,bM as aa,gf as ab,a6 as ac,l6 as ad,c6 as ae,u6 as af,VR as ag,Ks as ah,GR as ai,lp as aj,n6 as ak,WR as al,b6 as am,NM as an,wM as ao,kM as ap,AM as aq,xM as ar,jM as as,jR as at,wR as au,xR as av,zR as aw,MM as ax,pb as ay,RM as az,Uf as b,YR as b0,XM as b1,KM as b2,CM as b3,PR as b4,KR as b5,QR as b6,JR as b7,xc as b8,p6 as b9,ap as bA,BM as bB,Hs as bC,i6 as bD,o6 as bE,rM as bF,iM as bG,sM as bH,aM as bI,s6 as bJ,fp as ba,HN as bb,_R as bc,IR as bd,HR as be,mp as bf,FR as bg,$s as bh,mb as bi,oM as bj,uM as bk,fM as bl,pM as bm,xv as bn,lM as bo,dM as bp,mM as bq,Y4 as br,Y0 as bs,e3 as bt,X0 as bu,J0 as bv,Lk as bw,qy as bx,r6 as by,_M as bz,at as c,JC as d,f6 as e,EM as f,wn as g,Ab as h,xn as i,vM as j,JM as k,ae as l,FM as m,WM as n,t6 as o,e6 as p,eM as q,nM as r,tM as s,A0 as t,hp as u,m6 as v,h6 as w,g6 as x,zM as y,OM as z};