@ainyc/canonry 4.112.5 → 4.112.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/assets/BacklinksPage-AYTE7he1.js +1 -0
- package/assets/assets/{ChartPrimitives-CeHtwsJJ.js → ChartPrimitives-J0xH87kk.js} +1 -1
- package/assets/assets/ProjectPage-BcqfsS5X.js +7 -0
- package/assets/assets/{RunRow-CV2qXxPT.js → RunRow-Duz6GoZ0.js} +1 -1
- package/assets/assets/RunsPage-DpocjSZ-.js +1 -0
- package/assets/assets/{SettingsPage-CdpsDKrQ.js → SettingsPage-CboDfSRx.js} +1 -1
- package/assets/assets/TrafficPage-B5c8opWF.js +1 -0
- package/assets/assets/TrafficSourceDetailPage-D9JPwzH-.js +1 -0
- package/assets/assets/{arrow-left-CAIQypB3.js → arrow-left-DMukIffh.js} +1 -1
- package/assets/assets/{extract-error-message-ClFtdJwM.js → extract-error-message-CVln-Uf_.js} +1 -1
- package/assets/assets/{index-BZnlypko.js → index-DNoISJxr.js} +73 -73
- package/assets/assets/index-l-PAIV0A.css +1 -0
- package/assets/assets/{trash-2-bCb6xhDV.js → trash-2-BbhOWhnf.js} +1 -1
- package/assets/index.html +2 -2
- package/dist/{chunk-UOMNYP5T.js → chunk-D5PEINWZ.js} +1 -1
- package/dist/{chunk-VICGMHY2.js → chunk-DBZLOLYT.js} +26 -3
- package/dist/{chunk-KS2M7B5E.js → chunk-FVELOZTK.js} +13 -7
- package/dist/{chunk-6M2ALGJA.js → chunk-K2XOEBSH.js} +1 -1
- package/dist/cli.js +4 -4
- package/dist/index.js +4 -4
- package/dist/{intelligence-service-RGOY43QR.js → intelligence-service-ZPY7NIKR.js} +2 -2
- package/dist/mcp.js +2 -2
- package/package.json +10 -10
- package/assets/assets/BacklinksPage-CvriSR5g.js +0 -1
- package/assets/assets/ProjectPage-DcR0lYs1.js +0 -7
- package/assets/assets/RunsPage-DWW5QQ20.js +0 -1
- package/assets/assets/TrafficPage-BOe2UKFg.js +0 -1
- package/assets/assets/TrafficSourceDetailPage-VmvIxQBH.js +0 -1
- package/assets/assets/index-D_eJOOR1.css +0 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ProjectPage-
|
|
2
|
-
import{c as
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ProjectPage-BcqfsS5X.js","./vendor-tanstack-Be8JdV5M.js","./RunRow-Duz6GoZ0.js","./ChartPrimitives-J0xH87kk.js","./extract-error-message-CVln-Uf_.js","./vendor-recharts-C9EZkgbP.js","./trash-2-BbhOWhnf.js","./vendor-radix-CQ77EO2y.js","./vendor-markdown-6dwjPOKK.js","./RunsPage-DpocjSZ-.js","./SettingsPage-CboDfSRx.js","./BacklinksPage-AYTE7he1.js","./TrafficPage-B5c8opWF.js","./arrow-left-DMukIffh.js","./TrafficSourceDetailPage-D9JPwzH-.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{c as _w,d as Cw,Q as Tw,M as Ew,r as q,q as Te,j as f,L as st,a as Ow,e as ks,u as fn,f as zw,h as fc,k as Dw,l as Rw,m as fv,O as xf,n as Wa,o as Ti,p as Mw,s as Et,t as Hf,v as Ps,x as Bw,y as Lw,z as qw}from"./vendor-tanstack-Be8JdV5M.js";import{S as Uw,O as Qf,P as pv,C as Kf,a as mv,T as Zf,D as hv,R as gv}from"./vendor-radix-CQ77EO2y.js";import{c as yv}from"./vendor-recharts-C9EZkgbP.js";import{M as $w}from"./vendor-markdown-6dwjPOKK.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 tf={exports:{}},Kr={},nf={exports:{}},af={};var Uy;function Vw(){return Uy||(Uy=1,(function(e){function n($,W){var pe=$.length;$.push(W);e:for(;0<pe;){var je=pe-1>>>1,se=$[je];if(0<l(se,W))$[je]=W,$[pe]=se,pe=je;else break e}}function i($){return $.length===0?null:$[0]}function r($){if($.length===0)return null;var W=$[0],pe=$.pop();if(pe!==W){$[0]=pe;e:for(var je=0,se=$.length,Ye=se>>>1;je<Ye;){var F=2*(je+1)-1,ue=$[F],ee=F+1,de=$[ee];if(0>l(ue,pe))ee<se&&0>l(de,ue)?($[je]=de,$[ee]=pe,je=ee):($[je]=ue,$[F]=pe,je=F);else if(ee<se&&0>l(de,pe))$[je]=de,$[ee]=pe,je=ee;else break e}}return W}function l($,W){var pe=$.sortIndex-W.sortIndex;return pe!==0?pe:$.id-W.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,h=d.now();e.unstable_now=function(){return d.now()-h}}var g=[],v=[],S=1,x=null,N=3,_=!1,T=!1,k=!1,O=!1,R=typeof setTimeout=="function"?setTimeout:null,I=typeof clearTimeout=="function"?clearTimeout:null,P=typeof setImmediate<"u"?setImmediate:null;function Z($){for(var W=i(v);W!==null;){if(W.callback===null)r(v);else if(W.startTime<=$)r(v),W.sortIndex=W.expirationTime,n(g,W);else break;W=i(v)}}function X($){if(k=!1,Z($),!T)if(i(g)!==null)T=!0,J||(J=!0,Se());else{var W=i(v);W!==null&&fe(X,W.startTime-$)}}var J=!1,z=-1,M=5,oe=-1;function ke(){return O?!0:!(e.unstable_now()-oe<M)}function ze(){if(O=!1,J){var $=e.unstable_now();oe=$;var W=!0;try{e:{T=!1,k&&(k=!1,I(z),z=-1),_=!0;var pe=N;try{t:{for(Z($),x=i(g);x!==null&&!(x.expirationTime>$&&ke());){var je=x.callback;if(typeof je=="function"){x.callback=null,N=x.priorityLevel;var se=je(x.expirationTime<=$);if($=e.unstable_now(),typeof se=="function"){x.callback=se,Z($),W=!0;break t}x===i(g)&&r(g),Z($)}else r(g);x=i(g)}if(x!==null)W=!0;else{var Ye=i(v);Ye!==null&&fe(X,Ye.startTime-$),W=!1}}break e}finally{x=null,N=pe,_=!1}W=void 0}}finally{W?Se():J=!1}}}var Se;if(typeof P=="function")Se=function(){P(ze)};else if(typeof MessageChannel<"u"){var $e=new MessageChannel,le=$e.port2;$e.port1.onmessage=ze,Se=function(){le.postMessage(null)}}else Se=function(){R(ze,0)};function fe($,W){z=R(function(){$(e.unstable_now())},W)}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 N},e.unstable_next=function($){switch(N){case 1:case 2:case 3:var W=3;break;default:W=N}var pe=N;N=W;try{return $()}finally{N=pe}},e.unstable_requestPaint=function(){O=!0},e.unstable_runWithPriority=function($,W){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var pe=N;N=$;try{return W()}finally{N=pe}},e.unstable_scheduleCallback=function($,W,pe){var je=e.unstable_now();switch(typeof pe=="object"&&pe!==null?(pe=pe.delay,pe=typeof pe=="number"&&0<pe?je+pe:je):pe=je,$){case 1:var se=-1;break;case 2:se=250;break;case 5:se=1073741823;break;case 4:se=1e4;break;default:se=5e3}return se=pe+se,$={id:S++,callback:W,priorityLevel:$,startTime:pe,expirationTime:se,sortIndex:-1},pe>je?($.sortIndex=pe,n(v,$),i(g)===null&&$===i(v)&&(k?(I(z),z=-1):k=!0,fe(X,pe-je))):($.sortIndex=se,n(g,$),T||_||(T=!0,J||(J=!0,Se()))),$},e.unstable_shouldYield=ke,e.unstable_wrapCallback=function($){var W=N;return function(){var pe=N;N=W;try{return $.apply(this,arguments)}finally{N=pe}}}})(af)),af}var $y;function Iw(){return $y||($y=1,nf.exports=Vw()),nf.exports}var Vy;function Pw(){if(Vy)return Kr;Vy=1;var e=Iw(),n=_w(),i=Cw();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 h(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 v(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 m=u.alternate;if(m===null){if(o=u.return,o!==null){s=o;continue}break}if(u.child===m.child){for(m=u.child;m;){if(m===s)return g(u),t;if(m===o)return g(u),a;m=m.sibling}throw Error(r(188))}if(s.return!==o.return)s=u,o=m;else{for(var b=!1,j=u.child;j;){if(j===s){b=!0,s=u,o=m;break}if(j===o){b=!0,o=u,s=m;break}j=j.sibling}if(!b){for(j=m.child;j;){if(j===s){b=!0,s=m,o=u;break}if(j===o){b=!0,o=m,s=u;break}j=j.sibling}if(!b)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 S(t){var a=t.tag;if(a===5||a===26||a===27||a===6)return t;for(t=t.child;t!==null;){if(a=S(t),a!==null)return a;t=t.sibling}return null}var x=Object.assign,N=Symbol.for("react.element"),_=Symbol.for("react.transitional.element"),T=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),I=Symbol.for("react.consumer"),P=Symbol.for("react.context"),Z=Symbol.for("react.forward_ref"),X=Symbol.for("react.suspense"),J=Symbol.for("react.suspense_list"),z=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),oe=Symbol.for("react.activity"),ke=Symbol.for("react.memo_cache_sentinel"),ze=Symbol.iterator;function Se(t){return t===null||typeof t!="object"?null:(t=ze&&t[ze]||t["@@iterator"],typeof t=="function"?t:null)}var $e=Symbol.for("react.client.reference");function le(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===$e?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case k:return"Fragment";case R:return"Profiler";case O:return"StrictMode";case X:return"Suspense";case J:return"SuspenseList";case oe:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case T:return"Portal";case P:return t.displayName||"Context";case I:return(t._context.displayName||"Context")+".Consumer";case Z:var a=t.render;return t=t.displayName,t||(t=a.displayName||a.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case z:return a=t.displayName||null,a!==null?a:le(t.type)||"Memo";case M:a=t._payload,t=t._init;try{return le(t(a))}catch{}}return null}var fe=Array.isArray,$=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,pe={pending:!1,data:null,method:null,action:null},je=[],se=-1;function Ye(t){return{current:t}}function F(t){0>se||(t.current=je[se],je[se]=null,se--)}function ue(t,a){se++,je[se]=t.current,t.current=a}var ee=Ye(null),de=Ye(null),ae=Ye(null),Ne=Ye(null);function tt(t,a){switch(ue(ae,a),ue(de,t),ue(ee,null),a.nodeType){case 9:case 11:t=(t=a.documentElement)&&(t=t.namespaceURI)?ly(t):0;break;default:if(t=a.tagName,a=a.namespaceURI)a=ly(a),t=cy(a,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}F(ee),ue(ee,t)}function xe(){F(ee),F(de),F(ae)}function Ve(t){t.memoizedState!==null&&ue(Ne,t);var a=ee.current,s=cy(a,t.type);a!==s&&(ue(de,t),ue(ee,s))}function Qe(t){de.current===t&&(F(ee),F(de)),Ne.current===t&&(F(Ne),Pr._currentValue=pe)}var Dt,Un;function Rt(t){if(Dt===void 0)try{throw Error()}catch(s){var a=s.stack.trim().match(/\n( *(at )?)/);Dt=a&&a[1]||"",Un=-1<s.stack.indexOf(`
|
|
3
3
|
at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
4
|
`+Dt+t+Un}var er=!1;function Ri(t,a){if(!t||er)return"";er=!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 U=V}Reflect.construct(t,[],Y)}else{try{Y.call()}catch(V){U=V}t.call(Y.prototype)}}else{try{throw Error()}catch(V){U=V}(Y=t())&&typeof Y.catch=="function"&&Y.catch(function(){})}}catch(V){if(V&&U&&typeof V.stack=="string")return[V.stack,U.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 m=o.DetermineComponentFrameRoot(),b=m[0],j=m[1];if(b&&j){var C=b.split(`
|
|
5
5
|
`),L=j.split(`
|
|
6
6
|
`);for(u=o=0;o<C.length&&!C[o].includes("DetermineComponentFrameRoot");)o++;for(;u<L.length&&!L[u].includes("DetermineComponentFrameRoot");)u++;if(o===C.length||u===L.length)for(o=C.length-1,u=L.length-1;1<=o&&0<=u&&C[o]!==L[u];)u--;for(;1<=o&&0<=u;o--,u--)if(C[o]!==L[u]){if(o!==1||u!==1)do if(o--,u--,0>u||C[o]!==L[u]){var G=`
|
|
7
7
|
`+C[o].replace(" at new "," at ");return t.displayName&&G.includes("<anonymous>")&&(G=G.replace("<anonymous>",t.displayName)),G}while(1<=o&&0<=u);break}}}finally{er=!1,Error.prepareStackTrace=s}return(s=t?t.displayName||t.name:"")?Rt(s):""}function go(t,a){switch(t.tag){case 26:case 27:case 5:return Rt(t.type);case 16:return Rt("Lazy");case 13:return t.child!==a&&a!==null?Rt("Suspense Fallback"):Rt("Suspense");case 19:return Rt("SuspenseList");case 0:case 15:return Ri(t.type,!1);case 11:return Ri(t.type.render,!1);case 1:return Ri(t.type,!0);case 31:return Rt("Activity");default:return""}}function tr(t){try{var a="",s=null;do a+=go(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 Mi=Object.prototype.hasOwnProperty,Bi=e.unstable_scheduleCallback,nr=e.unstable_cancelCallback,yo=e.unstable_shouldYield,bo=e.unstable_requestPaint,Vt=e.unstable_now,Uc=e.unstable_getCurrentPriorityLevel,vo=e.unstable_ImmediatePriority,So=e.unstable_UserBlockingPriority,va=e.unstable_NormalPriority,xo=e.unstable_LowPriority,Li=e.unstable_IdlePriority,wo=e.log,jo=e.unstable_setDisableYieldValue,Sa=null,ht=null;function Mt(t){if(typeof wo=="function"&&jo(t),ht&&typeof ht.setStrictMode=="function")try{ht.setStrictMode(Sa,t)}catch{}}var _t=Math.clz32?Math.clz32:Ic,$c=Math.log,Vc=Math.LN2;function Ic(t){return t>>>=0,t===0?32:31-($c(t)/Vc|0)|0}var qi=256,Ui=262144,$i=4194304;function Zn(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 pn(t,a,s){var o=t.pendingLanes;if(o===0)return 0;var u=0,m=t.suspendedLanes,b=t.pingedLanes;t=t.warmLanes;var j=o&134217727;return j!==0?(o=j&~m,o!==0?u=Zn(o):(b&=j,b!==0?u=Zn(b):s||(s=j&~t,s!==0&&(u=Zn(s))))):(j=o&~m,j!==0?u=Zn(j):b!==0?u=Zn(b):s||(s=o&~t,s!==0&&(u=Zn(s)))),u===0?0:a!==0&&a!==u&&(a&m)===0&&(m=u&-u,s=a&-a,m>=s||m===32&&(s&4194048)!==0)?a:u}function ai(t,a){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&a)===0}function ie(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 ot(){var t=$i;return $i<<=1,($i&62914560)===0&&($i=4194304),t}function Yn(t){for(var a=[],s=0;31>s;s++)a.push(t);return a}function ii(t,a){t.pendingLanes|=a,a!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Pc(t,a,s,o,u,m){var b=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 j=t.entanglements,C=t.expirationTimes,L=t.hiddenUpdates;for(s=b&~s;0<s;){var G=31-_t(s),Y=1<<G;j[G]=0,C[G]=-1;var U=L[G];if(U!==null)for(L[G]=null,G=0;G<U.length;G++){var V=U[G];V!==null&&(V.lane&=-536870913)}s&=~Y}o!==0&&ar(t,o,0),m!==0&&u===0&&t.tag!==0&&(t.suspendedLanes|=m&~(b&~a))}function ar(t,a,s){t.pendingLanes|=a,t.suspendedLanes&=~a;var o=31-_t(a);t.entangledLanes|=a,t.entanglements[o]=t.entanglements[o]|1073741824|s&261930}function No(t,a){var s=t.entangledLanes|=a;for(t=t.entanglements;s;){var o=31-_t(s),u=1<<o;u&a|t[o]&a&&(t[o]|=a),s&=~u}}function $n(t,a){var s=a&-a;return s=(s&42)!==0?1:Gc(s),(s&(t.suspendedLanes|a))!==0?0:s}function Gc(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 Hc(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Kp(){var t=W.p;return t!==0?t:(t=window.event,t===void 0?32:zy(t.type))}function Zp(t,a){var s=W.p;try{return W.p=t,a()}finally{W.p=s}}var xa=Math.random().toString(36).slice(2),Bt="__reactFiber$"+xa,Zt="__reactProps$"+xa,Vi="__reactContainer$"+xa,Qc="__reactEvents$"+xa,p1="__reactListeners$"+xa,m1="__reactHandles$"+xa,Yp="__reactResources$"+xa,ir="__reactMarker$"+xa;function Kc(t){delete t[Bt],delete t[Zt],delete t[Qc],delete t[p1],delete t[m1]}function Ii(t){var a=t[Bt];if(a)return a;for(var s=t.parentNode;s;){if(a=s[Vi]||s[Bt]){if(s=a.alternate,a.child!==null||s!==null&&s.child!==null)for(t=gy(t);t!==null;){if(s=t[Bt])return s;t=gy(t)}return a}t=s,s=t.parentNode}return null}function Pi(t){if(t=t[Bt]||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 Gi(t){var a=t[Yp];return a||(a=t[Yp]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function Ot(t){t[ir]=!0}var Xp=new Set,Jp={};function si(t,a){Hi(t,a),Hi(t+"Capture",a)}function Hi(t,a){for(Jp[t]=a,t=0;t<a.length;t++)Xp.add(a[t])}var h1=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]*$"),Fp={},Wp={};function g1(t){return Mi.call(Wp,t)?!0:Mi.call(Fp,t)?!1:h1.test(t)?Wp[t]=!0:(Fp[t]=!0,!1)}function ko(t,a,s){if(g1(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 Ao(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 Xn(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 mn(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function em(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,m=o.set;return Object.defineProperty(t,a,{configurable:!0,get:function(){return u.call(this)},set:function(b){s=""+b,m.call(this,b)}}),Object.defineProperty(t,a,{enumerable:o.enumerable}),{getValue:function(){return s},setValue:function(b){s=""+b},stopTracking:function(){t._valueTracker=null,delete t[a]}}}}function Zc(t){if(!t._valueTracker){var a=em(t)?"checked":"value";t._valueTracker=y1(t,a,""+t[a])}}function tm(t){if(!t)return!1;var a=t._valueTracker;if(!a)return!0;var s=a.getValue(),o="";return t&&(o=em(t)?t.checked?"true":"false":t.value),t=o,t!==s?(a.setValue(t),!0):!1}function _o(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 b1=/[\n"\\]/g;function hn(t){return t.replace(b1,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function Yc(t,a,s,o,u,m,b,j){t.name="",b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?t.type=b:t.removeAttribute("type"),a!=null?b==="number"?(a===0&&t.value===""||t.value!=a)&&(t.value=""+mn(a)):t.value!==""+mn(a)&&(t.value=""+mn(a)):b!=="submit"&&b!=="reset"||t.removeAttribute("value"),a!=null?Xc(t,b,mn(a)):s!=null?Xc(t,b,mn(s)):o!=null&&t.removeAttribute("value"),u==null&&m!=null&&(t.defaultChecked=!!m),u!=null&&(t.checked=u&&typeof u!="function"&&typeof u!="symbol"),j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"?t.name=""+mn(j):t.removeAttribute("name")}function nm(t,a,s,o,u,m,b,j){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(t.type=m),a!=null||s!=null){if(!(m!=="submit"&&m!=="reset"||a!=null)){Zc(t);return}s=s!=null?""+mn(s):"",a=a!=null?""+mn(a):s,j||a===t.value||(t.value=a),t.defaultValue=a}o=o??u,o=typeof o!="function"&&typeof o!="symbol"&&!!o,t.checked=j?t.checked:!!o,t.defaultChecked=!!o,b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(t.name=b),Zc(t)}function Xc(t,a,s){a==="number"&&_o(t.ownerDocument)===t||t.defaultValue===""+s||(t.defaultValue=""+s)}function Qi(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=""+mn(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 am(t,a,s){if(a!=null&&(a=""+mn(a),a!==t.value&&(t.value=a),s==null)){t.defaultValue!==a&&(t.defaultValue=a);return}t.defaultValue=s!=null?""+mn(s):""}function im(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=mn(a),t.defaultValue=s,o=t.textContent,o===s&&o!==""&&o!==null&&(t.value=o),Zc(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 v1=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 sm(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||v1.has(a)?a==="float"?t.cssFloat=s:t[a]=(""+s).trim():t[a]=s+"px"}function rm(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&&sm(t,u,o)}else for(var m in a)a.hasOwnProperty(m)&&sm(t,m,a[m])}function Jc(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 S1=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"]]),x1=/^[\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 Co(t){return x1.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Jn(){}var Fc=null;function Wc(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Zi=null,Yi=null;function om(t){var a=Pi(t);if(a&&(t=a.stateNode)){var s=t[Zt]||null;e:switch(t=a.stateNode,a.type){case"input":if(Yc(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="'+hn(""+a)+'"][type="radio"]'),a=0;a<s.length;a++){var o=s[a];if(o!==t&&o.form===t.form){var u=o[Zt]||null;if(!u)throw Error(r(90));Yc(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&&tm(o)}break e;case"textarea":am(t,s.value,s.defaultValue);break e;case"select":a=s.value,a!=null&&Qi(t,!!s.multiple,a,!1)}}}var eu=!1;function lm(t,a,s){if(eu)return t(a,s);eu=!0;try{var o=t(a);return o}finally{if(eu=!1,(Zi!==null||Yi!==null)&&(hl(),Zi&&(a=Zi,t=Yi,Yi=Zi=null,om(a),t)))for(a=0;a<t.length;a++)om(t[a])}}function rr(t,a){var s=t.stateNode;if(s===null)return null;var o=s[Zt]||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 Fn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),tu=!1;if(Fn)try{var or={};Object.defineProperty(or,"passive",{get:function(){tu=!0}}),window.addEventListener("test",or,or),window.removeEventListener("test",or,or)}catch{tu=!1}var wa=null,nu=null,To=null;function cm(){if(To)return To;var t,a=nu,s=a.length,o,u="value"in wa?wa.value:wa.textContent,m=u.length;for(t=0;t<s&&a[t]===u[t];t++);var b=s-t;for(o=1;o<=b&&a[s-o]===u[m-o];o++);return To=u.slice(t,1<o?1-o:void 0)}function Eo(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 Oo(){return!0}function um(){return!1}function Yt(t){function a(s,o,u,m,b){this._reactName=s,this._targetInst=u,this.type=o,this.nativeEvent=m,this.target=b,this.currentTarget=null;for(var j in t)t.hasOwnProperty(j)&&(s=t[j],this[j]=s?s(m):m[j]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?Oo:um,this.isPropagationStopped=um,this}return x(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=Oo)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=Oo)},persist:function(){},isPersistent:Oo}),a}var ri={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},zo=Yt(ri),lr=x({},ri,{view:0,detail:0}),w1=Yt(lr),au,iu,cr,Do=x({},lr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ru,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"?(au=t.screenX-cr.screenX,iu=t.screenY-cr.screenY):iu=au=0,cr=t),au)},movementY:function(t){return"movementY"in t?t.movementY:iu}}),dm=Yt(Do),j1=x({},Do,{dataTransfer:0}),N1=Yt(j1),k1=x({},lr,{relatedTarget:0}),su=Yt(k1),A1=x({},ri,{animationName:0,elapsedTime:0,pseudoElement:0}),_1=Yt(A1),C1=x({},ri,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),T1=Yt(C1),E1=x({},ri,{data:0}),fm=Yt(E1),O1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},z1={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"},D1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function R1(t){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(t):(t=D1[t])?!!a[t]:!1}function ru(){return R1}var M1=x({},lr,{key:function(t){if(t.key){var a=O1[t.key]||t.key;if(a!=="Unidentified")return a}return t.type==="keypress"?(t=Eo(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?z1[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ru,charCode:function(t){return t.type==="keypress"?Eo(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Eo(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),B1=Yt(M1),L1=x({},Do,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),pm=Yt(L1),q1=x({},lr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ru}),U1=Yt(q1),$1=x({},ri,{propertyName:0,elapsedTime:0,pseudoElement:0}),V1=Yt($1),I1=x({},Do,{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}),P1=Yt(I1),G1=x({},ri,{newState:0,oldState:0}),H1=Yt(G1),Q1=[9,13,27,32],ou=Fn&&"CompositionEvent"in window,ur=null;Fn&&"documentMode"in document&&(ur=document.documentMode);var K1=Fn&&"TextEvent"in window&&!ur,mm=Fn&&(!ou||ur&&8<ur&&11>=ur),hm=" ",gm=!1;function ym(t,a){switch(t){case"keyup":return Q1.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function bm(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Xi=!1;function Z1(t,a){switch(t){case"compositionend":return bm(a);case"keypress":return a.which!==32?null:(gm=!0,hm);case"textInput":return t=a.data,t===hm&&gm?null:t;default:return null}}function Y1(t,a){if(Xi)return t==="compositionend"||!ou&&ym(t,a)?(t=cm(),To=nu=wa=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 mm&&a.locale!=="ko"?null:a.data;default:return null}}var X1={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 vm(t){var a=t&&t.nodeName&&t.nodeName.toLowerCase();return a==="input"?!!X1[t.type]:a==="textarea"}function Sm(t,a,s,o){Zi?Yi?Yi.push(o):Yi=[o]:Zi=o,a=wl(a,"onChange"),0<a.length&&(s=new zo("onChange","change",null,s,o),t.push({event:s,listeners:a}))}var dr=null,fr=null;function J1(t){ny(t,0)}function Ro(t){var a=sr(t);if(tm(a))return t}function xm(t,a){if(t==="change")return a}var wm=!1;if(Fn){var lu;if(Fn){var cu="oninput"in document;if(!cu){var jm=document.createElement("div");jm.setAttribute("oninput","return;"),cu=typeof jm.oninput=="function"}lu=cu}else lu=!1;wm=lu&&(!document.documentMode||9<document.documentMode)}function Nm(){dr&&(dr.detachEvent("onpropertychange",km),fr=dr=null)}function km(t){if(t.propertyName==="value"&&Ro(fr)){var a=[];Sm(a,fr,t,Wc(t)),lm(J1,a)}}function F1(t,a,s){t==="focusin"?(Nm(),dr=a,fr=s,dr.attachEvent("onpropertychange",km)):t==="focusout"&&Nm()}function W1(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Ro(fr)}function ex(t,a){if(t==="click")return Ro(a)}function tx(t,a){if(t==="input"||t==="change")return Ro(a)}function nx(t,a){return t===a&&(t!==0||1/t===1/a)||t!==t&&a!==a}var sn=typeof Object.is=="function"?Object.is:nx;function pr(t,a){if(sn(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(!Mi.call(a,u)||!sn(t[u],a[u]))return!1}return!0}function Am(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function _m(t,a){var s=Am(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=Am(s)}}function Cm(t,a){return t&&a?t===a?!0:t&&t.nodeType===3?!1:a&&a.nodeType===3?Cm(t,a.parentNode):"contains"in t?t.contains(a):t.compareDocumentPosition?!!(t.compareDocumentPosition(a)&16):!1:!1}function Tm(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var a=_o(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=_o(t.document)}return a}function uu(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 ax=Fn&&"documentMode"in document&&11>=document.documentMode,Ji=null,du=null,mr=null,fu=!1;function Em(t,a,s){var o=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;fu||Ji==null||Ji!==_o(o)||(o=Ji,"selectionStart"in o&&uu(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=wl(du,"onSelect"),0<o.length&&(a=new zo("onSelect","select",null,a,s),t.push({event:a,listeners:o}),a.target=Ji)))}function oi(t,a){var s={};return s[t.toLowerCase()]=a.toLowerCase(),s["Webkit"+t]="webkit"+a,s["Moz"+t]="moz"+a,s}var Fi={animationend:oi("Animation","AnimationEnd"),animationiteration:oi("Animation","AnimationIteration"),animationstart:oi("Animation","AnimationStart"),transitionrun:oi("Transition","TransitionRun"),transitionstart:oi("Transition","TransitionStart"),transitioncancel:oi("Transition","TransitionCancel"),transitionend:oi("Transition","TransitionEnd")},pu={},Om={};Fn&&(Om=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 li(t){if(pu[t])return pu[t];if(!Fi[t])return t;var a=Fi[t],s;for(s in a)if(a.hasOwnProperty(s)&&s in Om)return pu[t]=a[s];return t}var zm=li("animationend"),Dm=li("animationiteration"),Rm=li("animationstart"),ix=li("transitionrun"),sx=li("transitionstart"),rx=li("transitioncancel"),Mm=li("transitionend"),Bm=new Map,mu="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(" ");mu.push("scrollEnd");function On(t,a){Bm.set(t,a),si(a,[t])}var Mo=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)},gn=[],Wi=0,hu=0;function Bo(){for(var t=Wi,a=hu=Wi=0;a<t;){var s=gn[a];gn[a++]=null;var o=gn[a];gn[a++]=null;var u=gn[a];gn[a++]=null;var m=gn[a];if(gn[a++]=null,o!==null&&u!==null){var b=o.pending;b===null?u.next=u:(u.next=b.next,b.next=u),o.pending=u}m!==0&&Lm(s,u,m)}}function Lo(t,a,s,o){gn[Wi++]=t,gn[Wi++]=a,gn[Wi++]=s,gn[Wi++]=o,hu|=o,t.lanes|=o,t=t.alternate,t!==null&&(t.lanes|=o)}function gu(t,a,s,o){return Lo(t,a,s,o),qo(t)}function ci(t,a){return Lo(t,null,null,a),qo(t)}function Lm(t,a,s){t.lanes|=s;var o=t.alternate;o!==null&&(o.lanes|=s);for(var u=!1,m=t.return;m!==null;)m.childLanes|=s,o=m.alternate,o!==null&&(o.childLanes|=s),m.tag===22&&(t=m.stateNode,t===null||t._visibility&1||(u=!0)),t=m,m=m.return;return t.tag===3?(m=t.stateNode,u&&a!==null&&(u=31-_t(s),t=m.hiddenUpdates,o=t[u],o===null?t[u]=[a]:o.push(a),a.lane=s|536870912),m):null}function qo(t){if(50<Br)throw Br=0,kd=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 ox(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 rn(t,a,s,o){return new ox(t,a,s,o)}function yu(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Wn(t,a){var s=t.alternate;return s===null?(s=rn(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 qm(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 Uo(t,a,s,o,u,m){var b=0;if(o=t,typeof t=="function")yu(t)&&(b=1);else if(typeof t=="string")b=fw(t,s,ee.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case oe:return t=rn(31,s,a,u),t.elementType=oe,t.lanes=m,t;case k:return ui(s.children,u,m,a);case O:b=8,u|=24;break;case R:return t=rn(12,s,a,u|2),t.elementType=R,t.lanes=m,t;case X:return t=rn(13,s,a,u),t.elementType=X,t.lanes=m,t;case F:return t=rn(19,s,a,u),t.elementType=F,t.lanes=m,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case P:b=10;break e;case I:b=9;break e;case Z:b=11;break e;case z:b=14;break e;case M:b=16,o=null;break e}b=29,s=Error(r(130,t===null?"null":typeof t,"")),o=null}return a=rn(b,s,a,u),a.elementType=t,a.type=o,a.lanes=m,a}function ui(t,a,s,o){return t=rn(7,t,o,a),t.lanes=s,t}function bu(t,a,s){return t=rn(6,t,null,a),t.lanes=s,t}function Um(t){var a=rn(18,null,null,0);return a.stateNode=t,a}function vu(t,a,s){return a=rn(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 yn(t,a){if(typeof t=="object"&&t!==null){var s=$m.get(t);return s!==void 0?s:(a={value:t,source:a,stack:tr(a)},$m.set(t,a),a)}return{value:t,source:a,stack:tr(a)}}var ts=[],ns=0,$o=null,hr=0,bn=[],vn=0,ja=null,Vn=1,In="";function ea(t,a){ts[ns++]=hr,ts[ns++]=$o,$o=t,hr=a}function Vm(t,a,s){bn[vn++]=Vn,bn[vn++]=In,bn[vn++]=ja,ja=t;var o=Vn;t=In;var u=32-_t(o)-1;o&=~(1<<u),s+=1;var m=32-_t(a)+u;if(30<m){var b=u-u%5;m=(o&(1<<b)-1).toString(32),o>>=b,u-=b,Vn=1<<32-_t(a)+u|s<<u|o,In=m+t}else Vn=1<<m|s<<u|o,In=t}function Su(t){t.return!==null&&(ea(t,1),Vm(t,1,0))}function xu(t){for(;t===$o;)$o=ts[--ns],ts[ns]=null,hr=ts[--ns],ts[ns]=null;for(;t===ja;)ja=bn[--vn],bn[vn]=null,In=bn[--vn],bn[vn]=null,Vn=bn[--vn],bn[vn]=null}function Im(t,a){bn[vn++]=Vn,bn[vn++]=In,bn[vn++]=ja,Vn=a.id,In=a.overflow,ja=t}var Lt=null,at=null,qe=!1,Na=null,Sn=!1,wu=Error(r(519));function ka(t){var a=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw gr(yn(a,t)),wu}function Pm(t){var a=t.stateNode,s=t.type,o=t.memoizedProps;switch(a[Bt]=t,a[Zt]=o,s){case"dialog":Me("cancel",a),Me("close",a);break;case"iframe":case"object":case"embed":Me("load",a);break;case"video":case"audio":for(s=0;s<qr.length;s++)Me(qr[s],a);break;case"source":Me("error",a);break;case"img":case"image":case"link":Me("error",a),Me("load",a);break;case"details":Me("toggle",a);break;case"input":Me("invalid",a),nm(a,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":Me("invalid",a);break;case"textarea":Me("invalid",a),im(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||ry(a.textContent,s)?(o.popover!=null&&(Me("beforetoggle",a),Me("toggle",a)),o.onScroll!=null&&Me("scroll",a),o.onScrollEnd!=null&&Me("scrollend",a),o.onClick!=null&&(a.onclick=Jn),a=!0):a=!1,a||ka(t,!0)}function Gm(t){for(Lt=t.return;Lt;)switch(Lt.tag){case 5:case 31:case 13:Sn=!1;return;case 27:case 3:Sn=!0;return;default:Lt=Lt.return}}function as(t){if(t!==Lt)return!1;if(!qe)return Gm(t),qe=!0,!1;var a=t.tag,s;if((s=a!==3&&a!==27)&&((s=a===5)&&(s=t.type,s=!(s!=="form"&&s!=="button")||$d(t.type,t.memoizedProps)),s=!s),s&&at&&ka(t),Gm(t),a===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));at=hy(t)}else if(a===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));at=hy(t)}else a===27?(a=at,Ua(t.type)?(t=Hd,Hd=null,at=t):at=a):at=Lt?wn(t.stateNode.nextSibling):null;return!0}function di(){at=Lt=null,qe=!1}function ju(){var t=Na;return t!==null&&(Wt===null?Wt=t:Wt.push.apply(Wt,t),Na=null),t}function gr(t){Na===null?Na=[t]:Na.push(t)}var Nu=Ye(null),fi=null,ta=null;function Aa(t,a,s){ue(Nu,a._currentValue),a._currentValue=s}function na(t){t._currentValue=Nu.current,J(Nu)}function ku(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 Au(t,a,s,o){var u=t.child;for(u!==null&&(u.return=t);u!==null;){var m=u.dependencies;if(m!==null){var b=u.child;m=m.firstContext;e:for(;m!==null;){var j=m;m=u;for(var C=0;C<a.length;C++)if(j.context===a[C]){m.lanes|=s,j=m.alternate,j!==null&&(j.lanes|=s),ku(m.return,s,t),o||(b=null);break e}m=j.next}}else if(u.tag===18){if(b=u.return,b===null)throw Error(r(341));b.lanes|=s,m=b.alternate,m!==null&&(m.lanes|=s),ku(b,s,t),b=null}else b=u.child;if(b!==null)b.return=u;else for(b=u;b!==null;){if(b===t){b=null;break}if(u=b.sibling,u!==null){u.return=b.return,b=u;break}b=b.return}u=b}}function is(t,a,s,o){t=null;for(var u=a,m=!1;u!==null;){if(!m){if((u.flags&524288)!==0)m=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var b=u.alternate;if(b===null)throw Error(r(387));if(b=b.memoizedProps,b!==null){var j=u.type;sn(u.pendingProps.value,b.value)||(t!==null?t.push(j):t=[j])}}else if(u===Ne.current){if(b=u.alternate,b===null)throw Error(r(387));b.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(t!==null?t.push(Pr):t=[Pr])}u=u.return}t!==null&&Au(a,t,s,o),a.flags|=262144}function Vo(t){for(t=t.firstContext;t!==null;){if(!sn(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function pi(t){fi=t,ta=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function qt(t){return Hm(fi,t)}function Io(t,a){return fi===null&&pi(t),Hm(t,a)}function Hm(t,a){var s=a._currentValue;if(a={context:a,memoizedValue:s,next:null},ta===null){if(t===null)throw Error(r(308));ta=a,t.dependencies={lanes:0,firstContext:a},t.flags|=524288}else ta=ta.next=a;return s}var lx=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()})}},cx=e.unstable_scheduleCallback,ux=e.unstable_NormalPriority,wt={$$typeof:P,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function _u(){return{controller:new lx,data:new Map,refCount:0}}function yr(t){t.refCount--,t.refCount===0&&cx(ux,function(){t.controller.abort()})}var br=null,Cu=0,ss=0,rs=null;function dx(t,a){if(br===null){var s=br=[];Cu=0,ss=Od(),rs={status:"pending",value:void 0,then:function(o){s.push(o)}}}return Cu++,a.then(Qm,Qm),a}function Qm(){if(--Cu===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 fx(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 Km=$.S;$.S=function(t,a){Eg=Vt(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&dx(t,a),Km!==null&&Km(t,a)};var mi=Ye(null);function Tu(){var t=mi.current;return t!==null?t:We.pooledCache}function Po(t,a){a===null?ue(mi,mi.current):ue(mi,a.pool)}function Zm(){var t=Tu();return t===null?null:{parent:wt._currentValue,pool:t}}var os=Error(r(460)),Eu=Error(r(474)),Go=Error(r(542)),Ho={then:function(){}};function Ym(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Xm(t,a,s){switch(s=t[s],s===void 0?t.push(a):s!==a&&(a.then(Jn,Jn),a=s),a.status){case"fulfilled":return a.value;case"rejected":throw t=a.reason,Fm(t),t;default:if(typeof a.status=="string")a.then(Jn,Jn);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,Fm(t),t}throw gi=a,os}}function hi(t){try{var a=t._init;return a(t._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(gi=s,os):s}}var gi=null;function Jm(){if(gi===null)throw Error(r(459));var t=gi;return gi=null,t}function Fm(t){if(t===os||t===Go)throw Error(r(483))}var ls=null,vr=0;function Qo(t){var a=vr;return vr+=1,ls===null&&(ls=[]),Xm(ls,t,a)}function Sr(t,a){a=a.props.ref,t.ref=a!==void 0?a:null}function Ko(t,a){throw a.$$typeof===N?Error(r(525)):(t=Object.prototype.toString.call(a),Error(r(31,t==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":t)))}function Wm(t){function a(D,E){if(t){var B=D.deletions;B===null?(D.deletions=[E],D.flags|=16):B.push(E)}}function s(D,E){if(!t)return null;for(;E!==null;)a(D,E),E=E.sibling;return null}function o(D){for(var E=new Map;D!==null;)D.key!==null?E.set(D.key,D):E.set(D.index,D),D=D.sibling;return E}function u(D,E){return D=Wn(D,E),D.index=0,D.sibling=null,D}function m(D,E,B){return D.index=B,t?(B=D.alternate,B!==null?(B=B.index,B<E?(D.flags|=67108866,E):B):(D.flags|=67108866,E)):(D.flags|=1048576,E)}function b(D){return t&&D.alternate===null&&(D.flags|=67108866),D}function j(D,E,B,K){return E===null||E.tag!==6?(E=bu(B,D.mode,K),E.return=D,E):(E=u(E,B),E.return=D,E)}function C(D,E,B,K){var ve=B.type;return ve===k?G(D,E,B.props.children,K,B.key):E!==null&&(E.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===M&&hi(ve)===E.type)?(E=u(E,B.props),Sr(E,B),E.return=D,E):(E=Uo(B.type,B.key,B.props,null,D.mode,K),Sr(E,B),E.return=D,E)}function L(D,E,B,K){return E===null||E.tag!==4||E.stateNode.containerInfo!==B.containerInfo||E.stateNode.implementation!==B.implementation?(E=vu(B,D.mode,K),E.return=D,E):(E=u(E,B.children||[]),E.return=D,E)}function G(D,E,B,K,ve){return E===null||E.tag!==7?(E=ui(B,D.mode,K,ve),E.return=D,E):(E=u(E,B),E.return=D,E)}function Y(D,E,B){if(typeof E=="string"&&E!==""||typeof E=="number"||typeof E=="bigint")return E=bu(""+E,D.mode,B),E.return=D,E;if(typeof E=="object"&&E!==null){switch(E.$$typeof){case _:return B=Uo(E.type,E.key,E.props,null,D.mode,B),Sr(B,E),B.return=D,B;case T:return E=vu(E,D.mode,B),E.return=D,E;case M:return E=hi(E),Y(D,E,B)}if(pe(E)||Se(E))return E=ui(E,D.mode,B,null),E.return=D,E;if(typeof E.then=="function")return Y(D,Qo(E),B);if(E.$$typeof===P)return Y(D,Io(D,E),B);Ko(D,E)}return null}function U(D,E,B,K){var ve=E!==null?E.key:null;if(typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint")return ve!==null?null:j(D,E,""+B,K);if(typeof B=="object"&&B!==null){switch(B.$$typeof){case _:return B.key===ve?C(D,E,B,K):null;case T:return B.key===ve?L(D,E,B,K):null;case M:return B=hi(B),U(D,E,B,K)}if(pe(B)||Se(B))return ve!==null?null:G(D,E,B,K,null);if(typeof B.then=="function")return U(D,E,Qo(B),K);if(B.$$typeof===P)return U(D,E,Io(D,B),K);Ko(D,B)}return null}function V(D,E,B,K,ve){if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return D=D.get(B)||null,j(E,D,""+K,ve);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case _:return D=D.get(K.key===null?B:K.key)||null,C(E,D,K,ve);case T:return D=D.get(K.key===null?B:K.key)||null,L(E,D,K,ve);case M:return K=hi(K),V(D,E,B,K,ve)}if(pe(K)||Se(K))return D=D.get(B)||null,G(E,D,K,ve,null);if(typeof K.then=="function")return V(D,E,B,Qo(K),ve);if(K.$$typeof===P)return V(D,E,B,Io(E,K),ve);Ko(E,K)}return null}function me(D,E,B,K){for(var ve=null,Ve=null,ye=E,Oe=E=0,Le=null;ye!==null&&Oe<B.length;Oe++){ye.index>Oe?(Le=ye,ye=null):Le=ye.sibling;var Ie=U(D,ye,B[Oe],K);if(Ie===null){ye===null&&(ye=Le);break}t&&ye&&Ie.alternate===null&&a(D,ye),E=m(Ie,E,Oe),Ve===null?ve=Ie:Ve.sibling=Ie,Ve=Ie,ye=Le}if(Oe===B.length)return s(D,ye),qe&&ea(D,Oe),ve;if(ye===null){for(;Oe<B.length;Oe++)ye=Y(D,B[Oe],K),ye!==null&&(E=m(ye,E,Oe),Ve===null?ve=ye:Ve.sibling=ye,Ve=ye);return qe&&ea(D,Oe),ve}for(ye=o(ye);Oe<B.length;Oe++)Le=V(ye,D,Oe,B[Oe],K),Le!==null&&(t&&Le.alternate!==null&&ye.delete(Le.key===null?Oe:Le.key),E=m(Le,E,Oe),Ve===null?ve=Le:Ve.sibling=Le,Ve=Le);return t&&ye.forEach(function(Ga){return a(D,Ga)}),qe&&ea(D,Oe),ve}function we(D,E,B,K){if(B==null)throw Error(r(151));for(var ve=null,Ve=null,ye=E,Oe=E=0,Le=null,Ie=B.next();ye!==null&&!Ie.done;Oe++,Ie=B.next()){ye.index>Oe?(Le=ye,ye=null):Le=ye.sibling;var Ga=U(D,ye,Ie.value,K);if(Ga===null){ye===null&&(ye=Le);break}t&&ye&&Ga.alternate===null&&a(D,ye),E=m(Ga,E,Oe),Ve===null?ve=Ga:Ve.sibling=Ga,Ve=Ga,ye=Le}if(Ie.done)return s(D,ye),qe&&ea(D,Oe),ve;if(ye===null){for(;!Ie.done;Oe++,Ie=B.next())Ie=Y(D,Ie.value,K),Ie!==null&&(E=m(Ie,E,Oe),Ve===null?ve=Ie:Ve.sibling=Ie,Ve=Ie);return qe&&ea(D,Oe),ve}for(ye=o(ye);!Ie.done;Oe++,Ie=B.next())Ie=V(ye,D,Oe,Ie.value,K),Ie!==null&&(t&&Ie.alternate!==null&&ye.delete(Ie.key===null?Oe:Ie.key),E=m(Ie,E,Oe),Ve===null?ve=Ie:Ve.sibling=Ie,Ve=Ie);return t&&ye.forEach(function(jw){return a(D,jw)}),qe&&ea(D,Oe),ve}function Fe(D,E,B,K){if(typeof B=="object"&&B!==null&&B.type===k&&B.key===null&&(B=B.props.children),typeof B=="object"&&B!==null){switch(B.$$typeof){case _:e:{for(var ve=B.key;E!==null;){if(E.key===ve){if(ve=B.type,ve===k){if(E.tag===7){s(D,E.sibling),K=u(E,B.props.children),K.return=D,D=K;break e}}else if(E.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===M&&hi(ve)===E.type){s(D,E.sibling),K=u(E,B.props),Sr(K,B),K.return=D,D=K;break e}s(D,E);break}else a(D,E);E=E.sibling}B.type===k?(K=ui(B.props.children,D.mode,K,B.key),K.return=D,D=K):(K=Uo(B.type,B.key,B.props,null,D.mode,K),Sr(K,B),K.return=D,D=K)}return b(D);case T:e:{for(ve=B.key;E!==null;){if(E.key===ve)if(E.tag===4&&E.stateNode.containerInfo===B.containerInfo&&E.stateNode.implementation===B.implementation){s(D,E.sibling),K=u(E,B.children||[]),K.return=D,D=K;break e}else{s(D,E);break}else a(D,E);E=E.sibling}K=vu(B,D.mode,K),K.return=D,D=K}return b(D);case M:return B=hi(B),Fe(D,E,B,K)}if(pe(B))return me(D,E,B,K);if(Se(B)){if(ve=Se(B),typeof ve!="function")throw Error(r(150));return B=ve.call(B),we(D,E,B,K)}if(typeof B.then=="function")return Fe(D,E,Qo(B),K);if(B.$$typeof===P)return Fe(D,E,Io(D,B),K);Ko(D,B)}return typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint"?(B=""+B,E!==null&&E.tag===6?(s(D,E.sibling),K=u(E,B),K.return=D,D=K):(s(D,E),K=bu(B,D.mode,K),K.return=D,D=K),b(D)):s(D,E)}return function(D,E,B,K){try{vr=0;var ve=Fe(D,E,B,K);return ls=null,ve}catch(ye){if(ye===os||ye===Go)throw ye;var Ve=rn(29,ye,null,D.mode);return Ve.lanes=K,Ve.return=D,Ve}}}var yi=Wm(!0),eh=Wm(!1),_a=!1;function Ou(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function zu(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 Ca(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Ta(t,a,s){var o=t.updateQueue;if(o===null)return null;if(o=o.shared,(Pe&2)!==0){var u=o.pending;return u===null?a.next=a:(a.next=u.next,u.next=a),o.pending=a,a=qo(t),Lm(t,null,s),a}return Lo(t,o,a,s),qo(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,No(t,s)}}function Du(t,a){var s=t.updateQueue,o=t.alternate;if(o!==null&&(o=o.updateQueue,s===o)){var u=null,m=null;if(s=s.firstBaseUpdate,s!==null){do{var b={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};m===null?u=m=b:m=m.next=b,s=s.next}while(s!==null);m===null?u=m=a:m=m.next=a}else u=m=a;s={baseState:o.baseState,firstBaseUpdate:u,lastBaseUpdate:m,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 Ru=!1;function wr(){if(Ru){var t=rs;if(t!==null)throw t}}function jr(t,a,s,o){Ru=!1;var u=t.updateQueue;_a=!1;var m=u.firstBaseUpdate,b=u.lastBaseUpdate,j=u.shared.pending;if(j!==null){u.shared.pending=null;var C=j,L=C.next;C.next=null,b===null?m=L:b.next=L,b=C;var G=t.alternate;G!==null&&(G=G.updateQueue,j=G.lastBaseUpdate,j!==b&&(j===null?G.firstBaseUpdate=L:j.next=L,G.lastBaseUpdate=C))}if(m!==null){var Y=u.baseState;b=0,G=L=C=null,j=m;do{var U=j.lane&-536870913,V=U!==j.lane;if(V?(Be&U)===U:(o&U)===U){U!==0&&U===ss&&(Ru=!0),G!==null&&(G=G.next={lane:0,tag:j.tag,payload:j.payload,callback:null,next:null});e:{var me=t,we=j;U=a;var Fe=s;switch(we.tag){case 1:if(me=we.payload,typeof me=="function"){Y=me.call(Fe,Y,U);break e}Y=me;break e;case 3:me.flags=me.flags&-65537|128;case 0:if(me=we.payload,U=typeof me=="function"?me.call(Fe,Y,U):me,U==null)break e;Y=x({},Y,U);break e;case 2:_a=!0}}U=j.callback,U!==null&&(t.flags|=64,V&&(t.flags|=8192),V=u.callbacks,V===null?u.callbacks=[U]:V.push(U))}else V={lane:U,tag:j.tag,payload:j.payload,callback:j.callback,next:null},G===null?(L=G=V,C=Y):G=G.next=V,b|=U;if(j=j.next,j===null){if(j=u.shared.pending,j===null)break;V=j,j=V.next,V.next=null,u.lastBaseUpdate=V,u.shared.pending=null}}while(!0);G===null&&(C=Y),u.baseState=C,u.firstBaseUpdate=L,u.lastBaseUpdate=G,m===null&&(u.shared.lanes=0),Ra|=b,t.lanes=b,t.memoizedState=Y}}function th(t,a){if(typeof t!="function")throw Error(r(191,t));t.call(a)}function nh(t,a){var s=t.callbacks;if(s!==null)for(t.callbacks=null,t=0;t<s.length;t++)th(s[t],a)}var cs=Ye(null),Zo=Ye(0);function ah(t,a){t=da,ue(Zo,t),ue(cs,a),da=t|a.baseLanes}function Mu(){ue(Zo,da),ue(cs,cs.current)}function Bu(){da=Zo.current,J(cs),J(Zo)}var on=Ye(null),xn=null;function Ea(t){var a=t.alternate;ue(gt,gt.current&1),ue(on,t),xn===null&&(a===null||cs.current!==null||a.memoizedState!==null)&&(xn=t)}function Lu(t){ue(gt,gt.current),ue(on,t),xn===null&&(xn=t)}function ih(t){t.tag===22?(ue(gt,gt.current),ue(on,t),xn===null&&(xn=t)):Oa()}function Oa(){ue(gt,gt.current),ue(on,on.current)}function ln(t){J(on),xn===t&&(xn=null),J(gt)}var gt=Ye(0);function Yo(t){for(var a=t;a!==null;){if(a.tag===13){var s=a.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||Pd(s)||Gd(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 aa=0,Ee=null,Xe=null,jt=null,Xo=!1,us=!1,bi=!1,Jo=0,Nr=0,ds=null,px=0;function pt(){throw Error(r(321))}function qu(t,a){if(a===null)return!1;for(var s=0;s<a.length&&s<t.length;s++)if(!sn(t[s],a[s]))return!1;return!0}function Uu(t,a,s,o,u,m){return aa=m,Ee=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,$.H=t===null||t.memoizedState===null?Vh:ed,bi=!1,m=s(o,u),bi=!1,us&&(m=rh(a,s,o,u)),sh(t),m}function sh(t){$.H=_r;var a=Xe!==null&&Xe.next!==null;if(aa=0,jt=Xe=Ee=null,Xo=!1,Nr=0,ds=null,a)throw Error(r(300));t===null||Nt||(t=t.dependencies,t!==null&&Vo(t)&&(Nt=!0))}function rh(t,a,s,o){Ee=t;var u=0;do{if(us&&(ds=null),Nr=0,us=!1,25<=u)throw Error(r(301));if(u+=1,jt=Xe=null,t.updateQueue!=null){var m=t.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}$.H=Ih,m=a(s,o)}while(us);return m}function mx(){var t=$.H,a=t.useState()[0];return a=typeof a.then=="function"?kr(a):a,t=t.useState()[0],(Xe!==null?Xe.memoizedState:null)!==t&&(Ee.flags|=1024),a}function $u(){var t=Jo!==0;return Jo=0,t}function Vu(t,a,s){a.updateQueue=t.updateQueue,a.flags&=-2053,t.lanes&=~s}function Iu(t){if(Xo){for(t=t.memoizedState;t!==null;){var a=t.queue;a!==null&&(a.pending=null),t=t.next}Xo=!1}aa=0,jt=Xe=Ee=null,us=!1,Nr=Jo=0,ds=null}function Pt(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return jt===null?Ee.memoizedState=jt=t:jt=jt.next=t,jt}function yt(){if(Xe===null){var t=Ee.alternate;t=t!==null?t.memoizedState:null}else t=Xe.next;var a=jt===null?Ee.memoizedState:jt.next;if(a!==null)jt=a,Xe=t;else{if(t===null)throw Ee.alternate===null?Error(r(467)):Error(r(310));Xe=t,t={memoizedState:Xe.memoizedState,baseState:Xe.baseState,baseQueue:Xe.baseQueue,queue:Xe.queue,next:null},jt===null?Ee.memoizedState=jt=t:jt=jt.next=t}return jt}function Fo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function kr(t){var a=Nr;return Nr+=1,ds===null&&(ds=[]),t=Xm(ds,t,a),a=Ee,(jt===null?a.memoizedState:jt.next)===null&&(a=a.alternate,$.H=a===null||a.memoizedState===null?Vh:ed),t}function Wo(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return kr(t);if(t.$$typeof===P)return qt(t)}throw Error(r(438,String(t)))}function Pu(t){var a=null,s=Ee.updateQueue;if(s!==null&&(a=s.memoCache),a==null){var o=Ee.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=Fo(),Ee.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]=ke;return a.index++,s}function ia(t,a){return typeof a=="function"?a(t):a}function el(t){var a=yt();return Gu(a,Xe,t)}function Gu(t,a,s){var o=t.queue;if(o===null)throw Error(r(311));o.lastRenderedReducer=s;var u=t.baseQueue,m=o.pending;if(m!==null){if(u!==null){var b=u.next;u.next=m.next,m.next=b}a.baseQueue=u=m,o.pending=null}if(m=t.baseState,u===null)t.memoizedState=m;else{a=u.next;var j=b=null,C=null,L=a,G=!1;do{var Y=L.lane&-536870913;if(Y!==L.lane?(Be&Y)===Y:(aa&Y)===Y){var U=L.revertLane;if(U===0)C!==null&&(C=C.next={lane:0,revertLane:0,gesture:null,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null}),Y===ss&&(G=!0);else if((aa&U)===U){L=L.next,U===ss&&(G=!0);continue}else Y={lane:0,revertLane:L.revertLane,gesture:null,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},C===null?(j=C=Y,b=m):C=C.next=Y,Ee.lanes|=U,Ra|=U;Y=L.action,bi&&s(m,Y),m=L.hasEagerState?L.eagerState:s(m,Y)}else U={lane:Y,revertLane:L.revertLane,gesture:L.gesture,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},C===null?(j=C=U,b=m):C=C.next=U,Ee.lanes|=Y,Ra|=Y;L=L.next}while(L!==null&&L!==a);if(C===null?b=m:C.next=j,!sn(m,t.memoizedState)&&(Nt=!0,G&&(s=rs,s!==null)))throw s;t.memoizedState=m,t.baseState=b,t.baseQueue=C,o.lastRenderedState=m}return u===null&&(o.lanes=0),[t.memoizedState,o.dispatch]}function Hu(t){var a=yt(),s=a.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=t;var o=s.dispatch,u=s.pending,m=a.memoizedState;if(u!==null){s.pending=null;var b=u=u.next;do m=t(m,b.action),b=b.next;while(b!==u);sn(m,a.memoizedState)||(Nt=!0),a.memoizedState=m,a.baseQueue===null&&(a.baseState=m),s.lastRenderedState=m}return[m,o]}function oh(t,a,s){var o=Ee,u=yt(),m=qe;if(m){if(s===void 0)throw Error(r(407));s=s()}else s=a();var b=!sn((Xe||u).memoizedState,s);if(b&&(u.memoizedState=s,Nt=!0),u=u.queue,Zu(uh.bind(null,o,u,t),[t]),u.getSnapshot!==a||b||jt!==null&&jt.memoizedState.tag&1){if(o.flags|=2048,fs(9,{destroy:void 0},ch.bind(null,o,u,s,a),null),We===null)throw Error(r(349));m||(aa&127)!==0||lh(o,a,s)}return s}function lh(t,a,s){t.flags|=16384,t={getSnapshot:a,value:s},a=Ee.updateQueue,a===null?(a=Fo(),Ee.updateQueue=a,a.stores=[t]):(s=a.stores,s===null?a.stores=[t]:s.push(t))}function ch(t,a,s,o){a.value=s,a.getSnapshot=o,dh(a)&&fh(t)}function uh(t,a,s){return s(function(){dh(a)&&fh(t)})}function dh(t){var a=t.getSnapshot;t=t.value;try{var s=a();return!sn(t,s)}catch{return!0}}function fh(t){var a=ci(t,2);a!==null&&en(a,t,2)}function Qu(t){var a=Pt();if(typeof t=="function"){var s=t;if(t=s(),bi){Mt(!0);try{s()}finally{Mt(!1)}}}return a.memoizedState=a.baseState=t,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ia,lastRenderedState:t},a}function ph(t,a,s,o){return t.baseState=s,Gu(t,Xe,typeof o=="function"?o:ia)}function hx(t,a,s,o,u){if(al(t))throw Error(r(485));if(t=a.action,t!==null){var m={payload:u,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(b){m.listeners.push(b)}};$.T!==null?s(!0):m.isTransition=!1,o(m),s=a.pending,s===null?(m.next=a.pending=m,mh(a,m)):(m.next=s.next,a.pending=s.next=m)}}function mh(t,a){var s=a.action,o=a.payload,u=t.state;if(a.isTransition){var m=$.T,b={};$.T=b;try{var j=s(u,o),C=$.S;C!==null&&C(b,j),hh(t,a,j)}catch(L){Ku(t,a,L)}finally{m!==null&&b.types!==null&&(m.types=b.types),$.T=m}}else try{m=s(u,o),hh(t,a,m)}catch(L){Ku(t,a,L)}}function hh(t,a,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(o){gh(t,a,o)},function(o){return Ku(t,a,o)}):gh(t,a,s)}function gh(t,a,s){a.status="fulfilled",a.value=s,yh(a),t.state=s,a=t.pending,a!==null&&(s=a.next,s===a?t.pending=null:(s=s.next,a.next=s,mh(t,s)))}function Ku(t,a,s){var o=t.pending;if(t.pending=null,o!==null){o=o.next;do a.status="rejected",a.reason=s,yh(a),a=a.next;while(a!==o)}t.action=null}function yh(t){t=t.listeners;for(var a=0;a<t.length;a++)(0,t[a])()}function bh(t,a){return a}function vh(t,a){if(qe){var s=We.formState;if(s!==null){e:{var o=Ee;if(qe){if(at){t:{for(var u=at,m=Sn;u.nodeType!==8;){if(!m){u=null;break t}if(u=wn(u.nextSibling),u===null){u=null;break t}}m=u.data,u=m==="F!"||m==="F"?u:null}if(u){at=wn(u.nextSibling),o=u.data==="F!";break e}}ka(o)}o=!1}o&&(a=s[0])}}return s=Pt(),s.memoizedState=s.baseState=a,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:bh,lastRenderedState:a},s.queue=o,s=qh.bind(null,Ee,o),o.dispatch=s,o=Qu(!1),m=Wu.bind(null,Ee,!1,o.queue),o=Pt(),u={state:a,dispatch:null,action:t,pending:null},o.queue=u,s=hx.bind(null,Ee,u,m,s),u.dispatch=s,o.memoizedState=t,[a,s,!1]}function Sh(t){var a=yt();return xh(a,Xe,t)}function xh(t,a,s){if(a=Gu(t,a,bh)[0],t=el(ia)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var o=kr(a)}catch(b){throw b===os?Go:b}else o=a;a=yt();var u=a.queue,m=u.dispatch;return s!==a.memoizedState&&(Ee.flags|=2048,fs(9,{destroy:void 0},gx.bind(null,u,s),null)),[o,m,t]}function gx(t,a){t.action=a}function wh(t){var a=yt(),s=Xe;if(s!==null)return xh(a,s,t);yt(),a=a.memoizedState,s=yt();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=Ee.updateQueue,a===null&&(a=Fo(),Ee.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 jh(){return yt().memoizedState}function tl(t,a,s,o){var u=Pt();Ee.flags|=t,u.memoizedState=fs(1|a,{destroy:void 0},s,o===void 0?null:o)}function nl(t,a,s,o){var u=yt();o=o===void 0?null:o;var m=u.memoizedState.inst;Xe!==null&&o!==null&&qu(o,Xe.memoizedState.deps)?u.memoizedState=fs(a,m,s,o):(Ee.flags|=t,u.memoizedState=fs(1|a,m,s,o))}function Nh(t,a){tl(8390656,8,t,a)}function Zu(t,a){nl(2048,8,t,a)}function yx(t){Ee.flags|=4;var a=Ee.updateQueue;if(a===null)a=Fo(),Ee.updateQueue=a,a.events=[t];else{var s=a.events;s===null?a.events=[t]:s.push(t)}}function kh(t){var a=yt().memoizedState;return yx({ref:a,nextImpl:t}),function(){if((Pe&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}function Ah(t,a){return nl(4,2,t,a)}function _h(t,a){return nl(4,4,t,a)}function Ch(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 Th(t,a,s){s=s!=null?s.concat([t]):null,nl(4,4,Ch.bind(null,a,t),s)}function Yu(){}function Eh(t,a){var s=yt();a=a===void 0?null:a;var o=s.memoizedState;return a!==null&&qu(a,o[1])?o[0]:(s.memoizedState=[t,a],t)}function Oh(t,a){var s=yt();a=a===void 0?null:a;var o=s.memoizedState;if(a!==null&&qu(a,o[1]))return o[0];if(o=t(),bi){Mt(!0);try{t()}finally{Mt(!1)}}return s.memoizedState=[o,a],o}function Xu(t,a,s){return s===void 0||(aa&1073741824)!==0&&(Be&261930)===0?t.memoizedState=a:(t.memoizedState=s,t=zg(),Ee.lanes|=t,Ra|=t,s)}function zh(t,a,s,o){return sn(s,a)?s:cs.current!==null?(t=Xu(t,s,o),sn(t,a)||(Nt=!0),t):(aa&42)===0||(aa&1073741824)!==0&&(Be&261930)===0?(Nt=!0,t.memoizedState=s):(t=zg(),Ee.lanes|=t,Ra|=t,a)}function Dh(t,a,s,o,u){var m=W.p;W.p=m!==0&&8>m?m:8;var b=$.T,j={};$.T=j,Wu(t,!1,a,s);try{var C=u(),L=$.S;if(L!==null&&L(j,C),C!==null&&typeof C=="object"&&typeof C.then=="function"){var G=fx(C,o);Ar(t,a,G,dn(t))}else Ar(t,a,o,dn(t))}catch(Y){Ar(t,a,{then:function(){},status:"rejected",reason:Y},dn())}finally{W.p=m,b!==null&&j.types!==null&&(b.types=j.types),$.T=b}}function bx(){}function Ju(t,a,s,o){if(t.tag!==5)throw Error(r(476));var u=Rh(t).queue;Dh(t,u,a,fe,s===null?bx:function(){return Mh(t),s(o)})}function Rh(t){var a=t.memoizedState;if(a!==null)return a;a={memoizedState:fe,baseState:fe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ia,lastRenderedState:fe},next:null};var s={};return a.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ia,lastRenderedState:s},next:null},t.memoizedState=a,t=t.alternate,t!==null&&(t.memoizedState=a),a}function Mh(t){var a=Rh(t);a.next===null&&(a=t.alternate.memoizedState),Ar(t,a.next.queue,{},dn())}function Fu(){return qt(Pr)}function Bh(){return yt().memoizedState}function Lh(){return yt().memoizedState}function vx(t){for(var a=t.return;a!==null;){switch(a.tag){case 24:case 3:var s=dn();t=Ca(s);var o=Ta(a,t,s);o!==null&&(en(o,a,s),xr(o,a,s)),a={cache:_u()},t.payload=a;return}a=a.return}}function Sx(t,a,s){var o=dn();s={lane:o,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},al(t)?Uh(a,s):(s=gu(t,a,s,o),s!==null&&(en(s,t,o),$h(s,a,o)))}function qh(t,a,s){var o=dn();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(al(t))Uh(a,u);else{var m=t.alternate;if(t.lanes===0&&(m===null||m.lanes===0)&&(m=a.lastRenderedReducer,m!==null))try{var b=a.lastRenderedState,j=m(b,s);if(u.hasEagerState=!0,u.eagerState=j,sn(j,b))return Lo(t,a,u,0),We===null&&Bo(),!1}catch{}if(s=gu(t,a,u,o),s!==null)return en(s,t,o),$h(s,a,o),!0}return!1}function Wu(t,a,s,o){if(o={lane:2,revertLane:Od(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},al(t)){if(a)throw Error(r(479))}else a=gu(t,s,o,2),a!==null&&en(a,t,2)}function al(t){var a=t.alternate;return t===Ee||a!==null&&a===Ee}function Uh(t,a){us=Xo=!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,No(t,s)}}var _r={readContext:qt,use:Wo,useCallback:pt,useContext:pt,useEffect:pt,useImperativeHandle:pt,useLayoutEffect:pt,useInsertionEffect:pt,useMemo:pt,useReducer:pt,useRef:pt,useState:pt,useDebugValue:pt,useDeferredValue:pt,useTransition:pt,useSyncExternalStore:pt,useId:pt,useHostTransitionStatus:pt,useFormState:pt,useActionState:pt,useOptimistic:pt,useMemoCache:pt,useCacheRefresh:pt};_r.useEffectEvent=pt;var Vh={readContext:qt,use:Wo,useCallback:function(t,a){return Pt().memoizedState=[t,a===void 0?null:a],t},useContext:qt,useEffect:Nh,useImperativeHandle:function(t,a,s){s=s!=null?s.concat([t]):null,tl(4194308,4,Ch.bind(null,a,t),s)},useLayoutEffect:function(t,a){return tl(4194308,4,t,a)},useInsertionEffect:function(t,a){tl(4,2,t,a)},useMemo:function(t,a){var s=Pt();a=a===void 0?null:a;var o=t();if(bi){Mt(!0);try{t()}finally{Mt(!1)}}return s.memoizedState=[o,a],o},useReducer:function(t,a,s){var o=Pt();if(s!==void 0){var u=s(a);if(bi){Mt(!0);try{s(a)}finally{Mt(!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=Sx.bind(null,Ee,t),[o.memoizedState,t]},useRef:function(t){var a=Pt();return t={current:t},a.memoizedState=t},useState:function(t){t=Qu(t);var a=t.queue,s=qh.bind(null,Ee,a);return a.dispatch=s,[t.memoizedState,s]},useDebugValue:Yu,useDeferredValue:function(t,a){var s=Pt();return Xu(s,t,a)},useTransition:function(){var t=Qu(!1);return t=Dh.bind(null,Ee,t.queue,!0,!1),Pt().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,a,s){var o=Ee,u=Pt();if(qe){if(s===void 0)throw Error(r(407));s=s()}else{if(s=a(),We===null)throw Error(r(349));(Be&127)!==0||lh(o,a,s)}u.memoizedState=s;var m={value:s,getSnapshot:a};return u.queue=m,Nh(uh.bind(null,o,m,t),[t]),o.flags|=2048,fs(9,{destroy:void 0},ch.bind(null,o,m,s,a),null),s},useId:function(){var t=Pt(),a=We.identifierPrefix;if(qe){var s=In,o=Vn;s=(o&~(1<<32-_t(o)-1)).toString(32)+s,a="_"+a+"R_"+s,s=Jo++,0<s&&(a+="H"+s.toString(32)),a+="_"}else s=px++,a="_"+a+"r_"+s.toString(32)+"_";return t.memoizedState=a},useHostTransitionStatus:Fu,useFormState:vh,useActionState:vh,useOptimistic:function(t){var a=Pt();a.memoizedState=a.baseState=t;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=s,a=Wu.bind(null,Ee,!0,s),s.dispatch=a,[t,a]},useMemoCache:Pu,useCacheRefresh:function(){return Pt().memoizedState=vx.bind(null,Ee)},useEffectEvent:function(t){var a=Pt(),s={impl:t};return a.memoizedState=s,function(){if((Pe&2)!==0)throw Error(r(440));return s.impl.apply(void 0,arguments)}}},ed={readContext:qt,use:Wo,useCallback:Eh,useContext:qt,useEffect:Zu,useImperativeHandle:Th,useInsertionEffect:Ah,useLayoutEffect:_h,useMemo:Oh,useReducer:el,useRef:jh,useState:function(){return el(ia)},useDebugValue:Yu,useDeferredValue:function(t,a){var s=yt();return zh(s,Xe.memoizedState,t,a)},useTransition:function(){var t=el(ia)[0],a=yt().memoizedState;return[typeof t=="boolean"?t:kr(t),a]},useSyncExternalStore:oh,useId:Bh,useHostTransitionStatus:Fu,useFormState:Sh,useActionState:Sh,useOptimistic:function(t,a){var s=yt();return ph(s,Xe,t,a)},useMemoCache:Pu,useCacheRefresh:Lh};ed.useEffectEvent=kh;var Ih={readContext:qt,use:Wo,useCallback:Eh,useContext:qt,useEffect:Zu,useImperativeHandle:Th,useInsertionEffect:Ah,useLayoutEffect:_h,useMemo:Oh,useReducer:Hu,useRef:jh,useState:function(){return Hu(ia)},useDebugValue:Yu,useDeferredValue:function(t,a){var s=yt();return Xe===null?Xu(s,t,a):zh(s,Xe.memoizedState,t,a)},useTransition:function(){var t=Hu(ia)[0],a=yt().memoizedState;return[typeof t=="boolean"?t:kr(t),a]},useSyncExternalStore:oh,useId:Bh,useHostTransitionStatus:Fu,useFormState:wh,useActionState:wh,useOptimistic:function(t,a){var s=yt();return Xe!==null?ph(s,Xe,t,a):(s.baseState=t,[t,s.queue.dispatch])},useMemoCache:Pu,useCacheRefresh:Lh};Ih.useEffectEvent=kh;function td(t,a,s,o){a=t.memoizedState,s=s(o,a),s=s==null?a:x({},a,s),t.memoizedState=s,t.lanes===0&&(t.updateQueue.baseState=s)}var nd={enqueueSetState:function(t,a,s){t=t._reactInternals;var o=dn(),u=Ca(o);u.payload=a,s!=null&&(u.callback=s),a=Ta(t,u,o),a!==null&&(en(a,t,o),xr(a,t,o))},enqueueReplaceState:function(t,a,s){t=t._reactInternals;var o=dn(),u=Ca(o);u.tag=1,u.payload=a,s!=null&&(u.callback=s),a=Ta(t,u,o),a!==null&&(en(a,t,o),xr(a,t,o))},enqueueForceUpdate:function(t,a){t=t._reactInternals;var s=dn(),o=Ca(s);o.tag=2,a!=null&&(o.callback=a),a=Ta(t,o,s),a!==null&&(en(a,t,s),xr(a,t,s))}};function Ph(t,a,s,o,u,m,b){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(o,m,b):a.prototype&&a.prototype.isPureReactComponent?!pr(s,o)||!pr(u,m):!0}function Gh(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&&nd.enqueueReplaceState(a,a.state,null)}function vi(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=x({},s));for(var u in t)s[u]===void 0&&(s[u]=t[u])}return s}function Hh(t){Mo(t)}function Qh(t){console.error(t)}function Kh(t){Mo(t)}function il(t,a){try{var s=t.onUncaughtError;s(a.value,{componentStack:a.stack})}catch(o){setTimeout(function(){throw o})}}function Zh(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 ad(t,a,s){return s=Ca(s),s.tag=3,s.payload={element:null},s.callback=function(){il(t,a)},s}function Yh(t){return t=Ca(t),t.tag=3,t}function Xh(t,a,s,o){var u=s.type.getDerivedStateFromError;if(typeof u=="function"){var m=o.value;t.payload=function(){return u(m)},t.callback=function(){Zh(a,s,o)}}var b=s.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(t.callback=function(){Zh(a,s,o),typeof u!="function"&&(Ma===null?Ma=new Set([this]):Ma.add(this));var j=o.stack;this.componentDidCatch(o.value,{componentStack:j!==null?j:""})})}function xx(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=on.current,s!==null){switch(s.tag){case 31:case 13:return xn===null?gl():s.alternate===null&&mt===0&&(mt=3),s.flags&=-257,s.flags|=65536,s.lanes=u,o===Ho?s.flags|=16384:(a=s.updateQueue,a===null?s.updateQueue=new Set([o]):a.add(o),Cd(t,o,u)),!1;case 22:return s.flags|=65536,o===Ho?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)),Cd(t,o,u)),!1}throw Error(r(435,s.tag))}return Cd(t,o,u),gl(),!1}if(qe)return a=on.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=u,o!==wu&&(t=Error(r(422),{cause:o}),gr(yn(t,s)))):(o!==wu&&(a=Error(r(423),{cause:o}),gr(yn(a,s))),t=t.current.alternate,t.flags|=65536,u&=-u,t.lanes|=u,o=yn(o,s),u=ad(t.stateNode,o,u),Du(t,u),mt!==4&&(mt=2)),!1;var m=Error(r(520),{cause:o});if(m=yn(m,s),Mr===null?Mr=[m]:Mr.push(m),mt!==4&&(mt=2),a===null)return!0;o=yn(o,s),s=a;do{switch(s.tag){case 3:return s.flags|=65536,t=u&-u,s.lanes|=t,t=ad(s.stateNode,o,t),Du(s,t),!1;case 1:if(a=s.type,m=s.stateNode,(s.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(Ma===null||!Ma.has(m))))return s.flags|=65536,u&=-u,s.lanes|=u,u=Yh(u),Xh(u,t,s,o),Du(s,u),!1}s=s.return}while(s!==null);return!1}var id=Error(r(461)),Nt=!1;function Ut(t,a,s,o){a.child=t===null?eh(a,null,s,o):yi(a,t.child,s,o)}function Jh(t,a,s,o,u){s=s.render;var m=a.ref;if("ref"in o){var b={};for(var j in o)j!=="ref"&&(b[j]=o[j])}else b=o;return pi(a),o=Uu(t,a,s,b,m,u),j=$u(),t!==null&&!Nt?(Vu(t,a,u),sa(t,a,u)):(qe&&j&&Su(a),a.flags|=1,Ut(t,a,o,u),a.child)}function Fh(t,a,s,o,u){if(t===null){var m=s.type;return typeof m=="function"&&!yu(m)&&m.defaultProps===void 0&&s.compare===null?(a.tag=15,a.type=m,Wh(t,a,m,o,u)):(t=Uo(s.type,null,o,a,a.mode,u),t.ref=a.ref,t.return=a,a.child=t)}if(m=t.child,!fd(t,u)){var b=m.memoizedProps;if(s=s.compare,s=s!==null?s:pr,s(b,o)&&t.ref===a.ref)return sa(t,a,u)}return a.flags|=1,t=Wn(m,o),t.ref=a.ref,t.return=a,a.child=t}function Wh(t,a,s,o,u){if(t!==null){var m=t.memoizedProps;if(pr(m,o)&&t.ref===a.ref)if(Nt=!1,a.pendingProps=o=m,fd(t,u))(t.flags&131072)!==0&&(Nt=!0);else return a.lanes=t.lanes,sa(t,a,u)}return sd(t,a,s,o,u)}function eg(t,a,s,o){var u=o.children,m=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(m=m!==null?m.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&~m}else o=0,a.child=null;return tg(t,a,m,s,o)}if((s&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},t!==null&&Po(a,m!==null?m.cachePool:null),m!==null?ah(a,m):Mu(),ih(a);else return o=a.lanes=536870912,tg(t,a,m!==null?m.baseLanes|s:s,s,o)}else m!==null?(Po(a,m.cachePool),ah(a,m),Oa(),a.memoizedState=null):(t!==null&&Po(a,null),Mu(),Oa());return Ut(t,a,u,s),a.child}function Cr(t,a){return t!==null&&t.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function tg(t,a,s,o,u){var m=Tu();return m=m===null?null:{parent:wt._currentValue,pool:m},a.memoizedState={baseLanes:s,cachePool:m},t!==null&&Po(a,null),Mu(),ih(a),t!==null&&is(t,a,o,!0),a.childLanes=u,null}function sl(t,a){return a=ol({mode:a.mode,children:a.children},t.mode),a.ref=t.ref,t.child=a,a.return=t,a}function ng(t,a,s){return yi(a,t.child,null,s),t=sl(a,a.pendingProps),t.flags|=2,ln(a),a.memoizedState=null,t}function wx(t,a,s){var o=a.pendingProps,u=(a.flags&128)!==0;if(a.flags&=-129,t===null){if(qe){if(o.mode==="hidden")return t=sl(a,o),a.lanes=536870912,Cr(null,t);if(Lu(a),(t=at)?(t=my(t,Sn),t=t!==null&&t.data==="&"?t:null,t!==null&&(a.memoizedState={dehydrated:t,treeContext:ja!==null?{id:Vn,overflow:In}:null,retryLane:536870912,hydrationErrors:null},s=Um(t),s.return=a,a.child=s,Lt=a,at=null)):t=null,t===null)throw ka(a);return a.lanes=536870912,null}return sl(a,o)}var m=t.memoizedState;if(m!==null){var b=m.dehydrated;if(Lu(a),u)if(a.flags&256)a.flags&=-257,a=ng(t,a,s);else if(a.memoizedState!==null)a.child=t.child,a.flags|=128,a=null;else throw Error(r(558));else if(Nt||is(t,a,s,!1),u=(s&t.childLanes)!==0,Nt||u){if(o=We,o!==null&&(b=$n(o,s),b!==0&&b!==m.retryLane))throw m.retryLane=b,ci(t,b),en(o,t,b),id;gl(),a=ng(t,a,s)}else t=m.treeContext,at=wn(b.nextSibling),Lt=a,qe=!0,Na=null,Sn=!1,t!==null&&Im(a,t),a=sl(a,o),a.flags|=4096;return a}return t=Wn(t.child,{mode:o.mode,children:o.children}),t.ref=a.ref,a.child=t,t.return=a,t}function rl(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 sd(t,a,s,o,u){return pi(a),s=Uu(t,a,s,o,void 0,u),o=$u(),t!==null&&!Nt?(Vu(t,a,u),sa(t,a,u)):(qe&&o&&Su(a),a.flags|=1,Ut(t,a,s,u),a.child)}function ag(t,a,s,o,u,m){return pi(a),a.updateQueue=null,s=rh(a,o,s,u),sh(t),o=$u(),t!==null&&!Nt?(Vu(t,a,m),sa(t,a,m)):(qe&&o&&Su(a),a.flags|=1,Ut(t,a,s,m),a.child)}function ig(t,a,s,o,u){if(pi(a),a.stateNode===null){var m=es,b=s.contextType;typeof b=="object"&&b!==null&&(m=qt(b)),m=new s(o,m),a.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=nd,a.stateNode=m,m._reactInternals=a,m=a.stateNode,m.props=o,m.state=a.memoizedState,m.refs={},Ou(a),b=s.contextType,m.context=typeof b=="object"&&b!==null?qt(b):es,m.state=a.memoizedState,b=s.getDerivedStateFromProps,typeof b=="function"&&(td(a,s,b,o),m.state=a.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(b=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),b!==m.state&&nd.enqueueReplaceState(m,m.state,null),jr(a,o,m,u),wr(),m.state=a.memoizedState),typeof m.componentDidMount=="function"&&(a.flags|=4194308),o=!0}else if(t===null){m=a.stateNode;var j=a.memoizedProps,C=vi(s,j);m.props=C;var L=m.context,G=s.contextType;b=es,typeof G=="object"&&G!==null&&(b=qt(G));var Y=s.getDerivedStateFromProps;G=typeof Y=="function"||typeof m.getSnapshotBeforeUpdate=="function",j=a.pendingProps!==j,G||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(j||L!==b)&&Gh(a,m,o,b),_a=!1;var U=a.memoizedState;m.state=U,jr(a,o,m,u),wr(),L=a.memoizedState,j||U!==L||_a?(typeof Y=="function"&&(td(a,s,Y,o),L=a.memoizedState),(C=_a||Ph(a,s,C,o,U,L,b))?(G||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(a.flags|=4194308)):(typeof m.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=o,a.memoizedState=L),m.props=o,m.state=L,m.context=b,o=C):(typeof m.componentDidMount=="function"&&(a.flags|=4194308),o=!1)}else{m=a.stateNode,zu(t,a),b=a.memoizedProps,G=vi(s,b),m.props=G,Y=a.pendingProps,U=m.context,L=s.contextType,C=es,typeof L=="object"&&L!==null&&(C=qt(L)),j=s.getDerivedStateFromProps,(L=typeof j=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(b!==Y||U!==C)&&Gh(a,m,o,C),_a=!1,U=a.memoizedState,m.state=U,jr(a,o,m,u),wr();var V=a.memoizedState;b!==Y||U!==V||_a||t!==null&&t.dependencies!==null&&Vo(t.dependencies)?(typeof j=="function"&&(td(a,s,j,o),V=a.memoizedState),(G=_a||Ph(a,s,G,o,U,V,C)||t!==null&&t.dependencies!==null&&Vo(t.dependencies))?(L||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(o,V,C),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(o,V,C)),typeof m.componentDidUpdate=="function"&&(a.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof m.componentDidUpdate!="function"||b===t.memoizedProps&&U===t.memoizedState||(a.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||b===t.memoizedProps&&U===t.memoizedState||(a.flags|=1024),a.memoizedProps=o,a.memoizedState=V),m.props=o,m.state=V,m.context=C,o=G):(typeof m.componentDidUpdate!="function"||b===t.memoizedProps&&U===t.memoizedState||(a.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||b===t.memoizedProps&&U===t.memoizedState||(a.flags|=1024),o=!1)}return m=o,rl(t,a),o=(a.flags&128)!==0,m||o?(m=a.stateNode,s=o&&typeof s.getDerivedStateFromError!="function"?null:m.render(),a.flags|=1,t!==null&&o?(a.child=yi(a,t.child,null,u),a.child=yi(a,null,s,u)):Ut(t,a,s,u),a.memoizedState=m.state,t=a.child):t=sa(t,a,u),t}function sg(t,a,s,o){return di(),a.flags|=256,Ut(t,a,s,o),a.child}var rd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function od(t){return{baseLanes:t,cachePool:Zm()}}function ld(t,a,s){return t=t!==null?t.childLanes&~s:0,a&&(t|=un),t}function rg(t,a,s){var o=a.pendingProps,u=!1,m=(a.flags&128)!==0,b;if((b=m)||(b=t!==null&&t.memoizedState===null?!1:(gt.current&2)!==0),b&&(u=!0,a.flags&=-129),b=(a.flags&32)!==0,a.flags&=-33,t===null){if(qe){if(u?Ea(a):Oa(),(t=at)?(t=my(t,Sn),t=t!==null&&t.data!=="&"?t:null,t!==null&&(a.memoizedState={dehydrated:t,treeContext:ja!==null?{id:Vn,overflow:In}:null,retryLane:536870912,hydrationErrors:null},s=Um(t),s.return=a,a.child=s,Lt=a,at=null)):t=null,t===null)throw ka(a);return Gd(t)?a.lanes=32:a.lanes=536870912,null}var j=o.children;return o=o.fallback,u?(Oa(),u=a.mode,j=ol({mode:"hidden",children:j},u),o=ui(o,u,s,null),j.return=a,o.return=a,j.sibling=o,a.child=j,o=a.child,o.memoizedState=od(s),o.childLanes=ld(t,b,s),a.memoizedState=rd,Cr(null,o)):(Ea(a),cd(a,j))}var C=t.memoizedState;if(C!==null&&(j=C.dehydrated,j!==null)){if(m)a.flags&256?(Ea(a),a.flags&=-257,a=ud(t,a,s)):a.memoizedState!==null?(Oa(),a.child=t.child,a.flags|=128,a=null):(Oa(),j=o.fallback,u=a.mode,o=ol({mode:"visible",children:o.children},u),j=ui(j,u,s,null),j.flags|=2,o.return=a,j.return=a,o.sibling=j,a.child=o,yi(a,t.child,null,s),o=a.child,o.memoizedState=od(s),o.childLanes=ld(t,b,s),a.memoizedState=rd,a=Cr(null,o));else if(Ea(a),Gd(j)){if(b=j.nextSibling&&j.nextSibling.dataset,b)var L=b.dgst;b=L,o=Error(r(419)),o.stack="",o.digest=b,gr({value:o,source:null,stack:null}),a=ud(t,a,s)}else if(Nt||is(t,a,s,!1),b=(s&t.childLanes)!==0,Nt||b){if(b=We,b!==null&&(o=$n(b,s),o!==0&&o!==C.retryLane))throw C.retryLane=o,ci(t,o),en(b,t,o),id;Pd(j)||gl(),a=ud(t,a,s)}else Pd(j)?(a.flags|=192,a.child=t.child,a=null):(t=C.treeContext,at=wn(j.nextSibling),Lt=a,qe=!0,Na=null,Sn=!1,t!==null&&Im(a,t),a=cd(a,o.children),a.flags|=4096);return a}return u?(Oa(),j=o.fallback,u=a.mode,C=t.child,L=C.sibling,o=Wn(C,{mode:"hidden",children:o.children}),o.subtreeFlags=C.subtreeFlags&65011712,L!==null?j=Wn(L,j):(j=ui(j,u,s,null),j.flags|=2),j.return=a,o.return=a,o.sibling=j,a.child=o,Cr(null,o),o=a.child,j=t.child.memoizedState,j===null?j=od(s):(u=j.cachePool,u!==null?(C=wt._currentValue,u=u.parent!==C?{parent:C,pool:C}:u):u=Zm(),j={baseLanes:j.baseLanes|s,cachePool:u}),o.memoizedState=j,o.childLanes=ld(t,b,s),a.memoizedState=rd,Cr(t.child,o)):(Ea(a),s=t.child,t=s.sibling,s=Wn(s,{mode:"visible",children:o.children}),s.return=a,s.sibling=null,t!==null&&(b=a.deletions,b===null?(a.deletions=[t],a.flags|=16):b.push(t)),a.child=s,a.memoizedState=null,s)}function cd(t,a){return a=ol({mode:"visible",children:a},t.mode),a.return=t,t.child=a}function ol(t,a){return t=rn(22,t,null,a),t.lanes=0,t}function ud(t,a,s){return yi(a,t.child,null,s),t=cd(a,a.pendingProps.children),t.flags|=2,a.memoizedState=null,t}function og(t,a,s){t.lanes|=a;var o=t.alternate;o!==null&&(o.lanes|=a),ku(t.return,a,s)}function dd(t,a,s,o,u,m){var b=t.memoizedState;b===null?t.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:o,tail:s,tailMode:u,treeForkCount:m}:(b.isBackwards=a,b.rendering=null,b.renderingStartTime=0,b.last=o,b.tail=s,b.tailMode=u,b.treeForkCount=m)}function lg(t,a,s){var o=a.pendingProps,u=o.revealOrder,m=o.tail;o=o.children;var b=gt.current,j=(b&2)!==0;if(j?(b=b&1|2,a.flags|=128):b&=1,ue(gt,b),Ut(t,a,o,s),o=qe?hr:0,!j&&t!==null&&(t.flags&128)!==0)e:for(t=a.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&og(t,s,a);else if(t.tag===19)og(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&&Yo(t)===null&&(u=s),s=s.sibling;s=u,s===null?(u=a.child,a.child=null):(u=s.sibling,s.sibling=null),dd(a,!1,u,s,m,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&&Yo(t)===null){a.child=u;break}t=u.sibling,u.sibling=s,s=u,u=t}dd(a,!0,s,null,m,o);break;case"together":dd(a,!1,null,null,void 0,o);break;default:a.memoizedState=null}return a.child}function sa(t,a,s){if(t!==null&&(a.dependencies=t.dependencies),Ra|=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=Wn(t,t.pendingProps),a.child=s,s.return=a;t.sibling!==null;)t=t.sibling,s=s.sibling=Wn(t,t.pendingProps),s.return=a;s.sibling=null}return a.child}function fd(t,a){return(t.lanes&a)!==0?!0:(t=t.dependencies,!!(t!==null&&Vo(t)))}function jx(t,a,s){switch(a.tag){case 3:tt(a,a.stateNode.containerInfo),Aa(a,wt,t.memoizedState.cache),di();break;case 27:case 5:$e(a);break;case 4:tt(a,a.stateNode.containerInfo);break;case 10:Aa(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,Lu(a),null;break;case 13:var o=a.memoizedState;if(o!==null)return o.dehydrated!==null?(Ea(a),a.flags|=128,null):(s&a.child.childLanes)!==0?rg(t,a,s):(Ea(a),t=sa(t,a,s),t!==null?t.sibling:null);Ea(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 lg(t,a,s);a.flags|=128}if(u=a.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),ue(gt,gt.current),o)break;return null;case 22:return a.lanes=0,eg(t,a,s,a.pendingProps);case 24:Aa(a,wt,t.memoizedState.cache)}return sa(t,a,s)}function cg(t,a,s){if(t!==null)if(t.memoizedProps!==a.pendingProps)Nt=!0;else{if(!fd(t,s)&&(a.flags&128)===0)return Nt=!1,jx(t,a,s);Nt=(t.flags&131072)!==0}else Nt=!1,qe&&(a.flags&1048576)!==0&&Vm(a,hr,a.index);switch(a.lanes=0,a.tag){case 16:e:{var o=a.pendingProps;if(t=hi(a.elementType),a.type=t,typeof t=="function")yu(t)?(o=vi(t,o),a.tag=1,a=ig(null,a,t,o,s)):(a.tag=0,a=sd(null,a,t,o,s));else{if(t!=null){var u=t.$$typeof;if(u===Z){a.tag=11,a=Jh(null,a,t,o,s);break e}else if(u===z){a.tag=14,a=Fh(null,a,t,o,s);break e}}throw a=le(t)||t,Error(r(306,a,""))}}return a;case 0:return sd(t,a,a.type,a.pendingProps,s);case 1:return o=a.type,u=vi(o,a.pendingProps),ig(t,a,o,u,s);case 3:e:{if(tt(a,a.stateNode.containerInfo),t===null)throw Error(r(387));o=a.pendingProps;var m=a.memoizedState;u=m.element,zu(t,a),jr(a,o,null,s);var b=a.memoizedState;if(o=b.cache,Aa(a,wt,o),o!==m.cache&&Au(a,[wt],s,!0),wr(),o=b.element,m.isDehydrated)if(m={element:o,isDehydrated:!1,cache:b.cache},a.updateQueue.baseState=m,a.memoizedState=m,a.flags&256){a=sg(t,a,o,s);break e}else if(o!==u){u=yn(Error(r(424)),a),gr(u),a=sg(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,at=wn(t.firstChild),Lt=a,qe=!0,Na=null,Sn=!0,s=eh(a,null,o,s),a.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(di(),o===u){a=sa(t,a,s);break e}Ut(t,a,o,s)}a=a.child}return a;case 26:return rl(t,a),t===null?(s=Sy(a.type,null,a.pendingProps,null))?a.memoizedState=s:qe||(s=a.type,t=a.pendingProps,o=jl(ae.current).createElement(s),o[Bt]=a,o[Zt]=t,$t(o,s,t),Ot(o),a.stateNode=o):a.memoizedState=Sy(a.type,t.memoizedProps,a.pendingProps,t.memoizedState),null;case 27:return $e(a),t===null&&qe&&(o=a.stateNode=yy(a.type,a.pendingProps,ae.current),Lt=a,Sn=!0,u=at,Ua(a.type)?(Hd=u,at=wn(o.firstChild)):at=u),Ut(t,a,a.pendingProps.children,s),rl(t,a),t===null&&(a.flags|=4194304),a.child;case 5:return t===null&&qe&&((u=o=at)&&(o=Wx(o,a.type,a.pendingProps,Sn),o!==null?(a.stateNode=o,Lt=a,at=wn(o.firstChild),Sn=!1,u=!0):u=!1),u||ka(a)),$e(a),u=a.type,m=a.pendingProps,b=t!==null?t.memoizedProps:null,o=m.children,$d(u,m)?o=null:b!==null&&$d(u,b)&&(a.flags|=32),a.memoizedState!==null&&(u=Uu(t,a,mx,null,null,s),Pr._currentValue=u),rl(t,a),Ut(t,a,o,s),a.child;case 6:return t===null&&qe&&((t=s=at)&&(s=ew(s,a.pendingProps,Sn),s!==null?(a.stateNode=s,Lt=a,at=null,t=!0):t=!1),t||ka(a)),null;case 13:return rg(t,a,s);case 4:return tt(a,a.stateNode.containerInfo),o=a.pendingProps,t===null?a.child=yi(a,null,o,s):Ut(t,a,o,s),a.child;case 11:return Jh(t,a,a.type,a.pendingProps,s);case 7:return Ut(t,a,a.pendingProps,s),a.child;case 8:return Ut(t,a,a.pendingProps.children,s),a.child;case 12:return Ut(t,a,a.pendingProps.children,s),a.child;case 10:return o=a.pendingProps,Aa(a,a.type,o.value),Ut(t,a,o.children,s),a.child;case 9:return u=a.type._context,o=a.pendingProps.children,pi(a),u=qt(u),o=o(u),a.flags|=1,Ut(t,a,o,s),a.child;case 14:return Fh(t,a,a.type,a.pendingProps,s);case 15:return Wh(t,a,a.type,a.pendingProps,s);case 19:return lg(t,a,s);case 31:return wx(t,a,s);case 22:return eg(t,a,s,a.pendingProps);case 24:return pi(a),o=qt(wt),t===null?(u=Tu(),u===null&&(u=We,m=_u(),u.pooledCache=m,m.refCount++,m!==null&&(u.pooledCacheLanes|=s),u=m),a.memoizedState={parent:o,cache:u},Ou(a),Aa(a,wt,u)):((t.lanes&s)!==0&&(zu(t,a),jr(a,null,null,s),wr()),u=t.memoizedState,m=a.memoizedState,u.parent!==o?(u={parent:o,cache:o},a.memoizedState=u,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=u),Aa(a,wt,o)):(o=m.cache,Aa(a,wt,o),o!==u.cache&&Au(a,[wt],s,!0))),Ut(t,a,a.pendingProps.children,s),a.child;case 29:throw a.pendingProps}throw Error(r(156,a.tag))}function ra(t){t.flags|=4}function pd(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(Bg())t.flags|=8192;else throw gi=Ho,Eu}else t.flags&=-16777217}function ug(t,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!ky(a))if(Bg())t.flags|=8192;else throw gi=Ho,Eu}function ll(t,a){a!==null&&(t.flags|=4),t.flags&16384&&(a=t.tag!==22?ot():536870912,t.lanes|=a,gs|=a)}function Tr(t,a){if(!qe)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 it(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(xu(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return it(a),null;case 1:return it(a),null;case 3:return s=a.stateNode,o=null,t!==null&&(o=t.memoizedState.cache),a.memoizedState.cache!==o&&(a.flags|=2048),na(wt),xe(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(t===null||t.child===null)&&(as(a)?ra(a):t===null||t.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,ju())),it(a),null;case 26:var u=a.type,m=a.memoizedState;return t===null?(ra(a),m!==null?(it(a),ug(a,m)):(it(a),pd(a,u,null,o,s))):m?m!==t.memoizedState?(ra(a),it(a),ug(a,m)):(it(a),a.flags&=-16777217):(t=t.memoizedProps,t!==o&&ra(a),it(a),pd(a,u,t,o,s)),null;case 27:if(Qe(a),s=ae.current,u=a.type,t!==null&&a.stateNode!=null)t.memoizedProps!==o&&ra(a);else{if(!o){if(a.stateNode===null)throw Error(r(166));return it(a),null}t=ee.current,as(a)?Pm(a):(t=yy(u,o,s),a.stateNode=t,ra(a))}return it(a),null;case 5:if(Qe(a),u=a.type,t!==null&&a.stateNode!=null)t.memoizedProps!==o&&ra(a);else{if(!o){if(a.stateNode===null)throw Error(r(166));return it(a),null}if(m=ee.current,as(a))Pm(a);else{var b=jl(ae.current);switch(m){case 1:m=b.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:m=b.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":m=b.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":m=b.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":m=b.createElement("div"),m.innerHTML="<script><\/script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof o.is=="string"?b.createElement("select",{is:o.is}):b.createElement("select"),o.multiple?m.multiple=!0:o.size&&(m.size=o.size);break;default:m=typeof o.is=="string"?b.createElement(u,{is:o.is}):b.createElement(u)}}m[Bt]=a,m[Zt]=o;e:for(b=a.child;b!==null;){if(b.tag===5||b.tag===6)m.appendChild(b.stateNode);else if(b.tag!==4&&b.tag!==27&&b.child!==null){b.child.return=b,b=b.child;continue}if(b===a)break e;for(;b.sibling===null;){if(b.return===null||b.return===a)break e;b=b.return}b.sibling.return=b.return,b=b.sibling}a.stateNode=m;e:switch($t(m,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&&ra(a)}}return it(a),pd(a,a.type,t===null?null:t.memoizedProps,a.pendingProps,s),null;case 6:if(t&&a.stateNode!=null)t.memoizedProps!==o&&ra(a);else{if(typeof o!="string"&&a.stateNode===null)throw Error(r(166));if(t=ae.current,as(a)){if(t=a.stateNode,s=a.memoizedProps,o=null,u=Lt,u!==null)switch(u.tag){case 27:case 5:o=u.memoizedProps}t[Bt]=a,t=!!(t.nodeValue===s||o!==null&&o.suppressHydrationWarning===!0||ry(t.nodeValue,s)),t||ka(a,!0)}else t=jl(t).createTextNode(o),t[Bt]=a,a.stateNode=t}return it(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[Bt]=a}else di(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;it(a),t=!1}else s=ju(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=s),t=!0;if(!t)return a.flags&256?(ln(a),a):(ln(a),null);if((a.flags&128)!==0)throw Error(r(558))}return it(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[Bt]=a}else di(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;it(a),u=!1}else u=ju(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=u),u=!0;if(!u)return a.flags&256?(ln(a),a):(ln(a),null)}return ln(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),m=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(m=o.memoizedState.cachePool.pool),m!==u&&(o.flags|=2048)),s!==t&&s&&(a.child.flags|=8192),ll(a,a.updateQueue),it(a),null);case 4:return xe(),t===null&&Md(a.stateNode.containerInfo),it(a),null;case 10:return na(a.type),it(a),null;case 19:if(J(gt),o=a.memoizedState,o===null)return it(a),null;if(u=(a.flags&128)!==0,m=o.rendering,m===null)if(u)Tr(o,!1);else{if(mt!==0||t!==null&&(t.flags&128)!==0)for(t=a.child;t!==null;){if(m=Yo(t),m!==null){for(a.flags|=128,Tr(o,!1),t=m.updateQueue,a.updateQueue=t,ll(a,t),a.subtreeFlags=0,t=s,s=a.child;s!==null;)qm(s,t),s=s.sibling;return ue(gt,gt.current&1|2),qe&&ea(a,o.treeForkCount),a.child}t=t.sibling}o.tail!==null&&Vt()>pl&&(a.flags|=128,u=!0,Tr(o,!1),a.lanes=4194304)}else{if(!u)if(t=Yo(m),t!==null){if(a.flags|=128,u=!0,t=t.updateQueue,a.updateQueue=t,ll(a,t),Tr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!m.alternate&&!qe)return it(a),null}else 2*Vt()-o.renderingStartTime>pl&&s!==536870912&&(a.flags|=128,u=!0,Tr(o,!1),a.lanes=4194304);o.isBackwards?(m.sibling=a.child,a.child=m):(t=o.last,t!==null?t.sibling=m:a.child=m,o.last=m)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Vt(),t.sibling=null,s=gt.current,ue(gt,u?s&1|2:s&1),qe&&ea(a,o.treeForkCount),t):(it(a),null);case 22:case 23:return ln(a),Bu(),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&&(it(a),a.subtreeFlags&6&&(a.flags|=8192)):it(a),s=a.updateQueue,s!==null&&ll(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&&J(mi),null;case 24:return s=null,t!==null&&(s=t.memoizedState.cache),a.memoizedState.cache!==s&&(a.flags|=2048),na(wt),it(a),null;case 25:return null;case 30:return null}throw Error(r(156,a.tag))}function kx(t,a){switch(xu(a),a.tag){case 1:return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 3:return na(wt),xe(),t=a.flags,(t&65536)!==0&&(t&128)===0?(a.flags=t&-65537|128,a):null;case 26:case 27:case 5:return Qe(a),null;case 31:if(a.memoizedState!==null){if(ln(a),a.alternate===null)throw Error(r(340));di()}return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 13:if(ln(a),t=a.memoizedState,t!==null&&t.dehydrated!==null){if(a.alternate===null)throw Error(r(340));di()}return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 19:return J(gt),null;case 4:return xe(),null;case 10:return na(a.type),null;case 22:case 23:return ln(a),Bu(),t!==null&&J(mi),t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 24:return na(wt),null;case 25:return null;default:return null}}function dg(t,a){switch(xu(a),a.tag){case 3:na(wt),xe();break;case 26:case 27:case 5:Qe(a);break;case 4:xe();break;case 31:a.memoizedState!==null&&ln(a);break;case 13:ln(a);break;case 19:J(gt);break;case 10:na(a.type);break;case 22:case 23:ln(a),Bu(),t!==null&&J(mi);break;case 24:na(wt)}}function Er(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 m=s.create,b=s.inst;o=m(),b.destroy=o}s=s.next}while(s!==u)}}catch(j){Ze(a,a.return,j)}}function za(t,a,s){try{var o=a.updateQueue,u=o!==null?o.lastEffect:null;if(u!==null){var m=u.next;o=m;do{if((o.tag&t)===t){var b=o.inst,j=b.destroy;if(j!==void 0){b.destroy=void 0,u=a;var C=s,L=j;try{L()}catch(G){Ze(u,C,G)}}}o=o.next}while(o!==m)}}catch(G){Ze(a,a.return,G)}}function fg(t){var a=t.updateQueue;if(a!==null){var s=t.stateNode;try{nh(a,s)}catch(o){Ze(t,t.return,o)}}}function pg(t,a,s){s.props=vi(t.type,t.memoizedProps),s.state=t.memoizedState;try{s.componentWillUnmount()}catch(o){Ze(t,a,o)}}function Or(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){Ze(t,a,u)}}function Pn(t,a){var s=t.ref,o=t.refCleanup;if(s!==null)if(typeof o=="function")try{o()}catch(u){Ze(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){Ze(t,a,u)}else s.current=null}function mg(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){Ze(t,t.return,u)}}function md(t,a,s){try{var o=t.stateNode;Kx(o,t.type,s,a),o[Zt]=a}catch(u){Ze(t,t.return,u)}}function hg(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Ua(t.type)||t.tag===4}function hd(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||hg(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&&Ua(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 gd(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=Jn));else if(o!==4&&(o===27&&Ua(t.type)&&(s=t.stateNode,a=null),t=t.child,t!==null))for(gd(t,a,s),t=t.sibling;t!==null;)gd(t,a,s),t=t.sibling}function cl(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&&Ua(t.type)&&(s=t.stateNode),t=t.child,t!==null))for(cl(t,a,s),t=t.sibling;t!==null;)cl(t,a,s),t=t.sibling}function gg(t){var a=t.stateNode,s=t.memoizedProps;try{for(var o=t.type,u=a.attributes;u.length;)a.removeAttributeNode(u[0]);$t(a,o,s),a[Bt]=t,a[Zt]=s}catch(m){Ze(t,t.return,m)}}var oa=!1,kt=!1,yd=!1,yg=typeof WeakSet=="function"?WeakSet:Set,zt=null;function Ax(t,a){if(t=t.containerInfo,qd=El,t=Tm(t),uu(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,m=o.focusNode;o=o.focusOffset;try{s.nodeType,m.nodeType}catch{s=null;break e}var b=0,j=-1,C=-1,L=0,G=0,Y=t,U=null;t:for(;;){for(var V;Y!==s||u!==0&&Y.nodeType!==3||(j=b+u),Y!==m||o!==0&&Y.nodeType!==3||(C=b+o),Y.nodeType===3&&(b+=Y.nodeValue.length),(V=Y.firstChild)!==null;)U=Y,Y=V;for(;;){if(Y===t)break t;if(U===s&&++L===u&&(j=b),U===m&&++G===o&&(C=b),(V=Y.nextSibling)!==null)break;Y=U,U=Y.parentNode}Y=V}s=j===-1||C===-1?null:{start:j,end:C}}else s=null}s=s||{start:0,end:0}}else s=null;for(Ud={focusedElem:t,selectionRange:s},El=!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,m=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&&m!==null){t=void 0,s=a,u=m.memoizedProps,m=m.memoizedState,o=s.stateNode;try{var me=vi(s.type,u);t=o.getSnapshotBeforeUpdate(me,m),o.__reactInternalSnapshotBeforeUpdate=t}catch(we){Ze(s,s.return,we)}}break;case 3:if((t&1024)!==0){if(t=a.stateNode.containerInfo,s=t.nodeType,s===9)Id(t);else if(s===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":Id(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 bg(t,a,s){var o=s.flags;switch(s.tag){case 0:case 11:case 15:ca(t,s),o&4&&Er(5,s);break;case 1:if(ca(t,s),o&4)if(t=s.stateNode,a===null)try{t.componentDidMount()}catch(b){Ze(s,s.return,b)}else{var u=vi(s.type,a.memoizedProps);a=a.memoizedState;try{t.componentDidUpdate(u,a,t.__reactInternalSnapshotBeforeUpdate)}catch(b){Ze(s,s.return,b)}}o&64&&fg(s),o&512&&Or(s,s.return);break;case 3:if(ca(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{nh(t,a)}catch(b){Ze(s,s.return,b)}}break;case 27:a===null&&o&4&&gg(s);case 26:case 5:ca(t,s),a===null&&o&4&&mg(s),o&512&&Or(s,s.return);break;case 12:ca(t,s);break;case 31:ca(t,s),o&4&&xg(t,s);break;case 13:ca(t,s),o&4&&wg(t,s),o&64&&(t=s.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(s=Mx.bind(null,s),tw(t,s))));break;case 22:if(o=s.memoizedState!==null||oa,!o){a=a!==null&&a.memoizedState!==null||kt,u=oa;var m=kt;oa=o,(kt=a)&&!m?ua(t,s,(s.subtreeFlags&8772)!==0):ca(t,s),oa=u,kt=m}break;case 30:break;default:ca(t,s)}}function vg(t){var a=t.alternate;a!==null&&(t.alternate=null,vg(a)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(a=t.stateNode,a!==null&&Kc(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 lt=null,Xt=!1;function la(t,a,s){for(s=s.child;s!==null;)Sg(t,a,s),s=s.sibling}function Sg(t,a,s){if(ht&&typeof ht.onCommitFiberUnmount=="function")try{ht.onCommitFiberUnmount(Sa,s)}catch{}switch(s.tag){case 26:kt||Pn(s,a),la(t,a,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:kt||Pn(s,a);var o=lt,u=Xt;Ua(s.type)&&(lt=s.stateNode,Xt=!1),la(t,a,s),$r(s.stateNode),lt=o,Xt=u;break;case 5:kt||Pn(s,a);case 6:if(o=lt,u=Xt,lt=null,la(t,a,s),lt=o,Xt=u,lt!==null)if(Xt)try{(lt.nodeType===9?lt.body:lt.nodeName==="HTML"?lt.ownerDocument.body:lt).removeChild(s.stateNode)}catch(m){Ze(s,a,m)}else try{lt.removeChild(s.stateNode)}catch(m){Ze(s,a,m)}break;case 18:lt!==null&&(Xt?(t=lt,fy(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,s.stateNode),Ns(t)):fy(lt,s.stateNode));break;case 4:o=lt,u=Xt,lt=s.stateNode.containerInfo,Xt=!0,la(t,a,s),lt=o,Xt=u;break;case 0:case 11:case 14:case 15:za(2,s,a),kt||za(4,s,a),la(t,a,s);break;case 1:kt||(Pn(s,a),o=s.stateNode,typeof o.componentWillUnmount=="function"&&pg(s,a,o)),la(t,a,s);break;case 21:la(t,a,s);break;case 22:kt=(o=kt)||s.memoizedState!==null,la(t,a,s),kt=o;break;default:la(t,a,s)}}function xg(t,a){if(a.memoizedState===null&&(t=a.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{Ns(t)}catch(s){Ze(a,a.return,s)}}}function wg(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){Ze(a,a.return,s)}}function _x(t){switch(t.tag){case 31:case 13:case 19:var a=t.stateNode;return a===null&&(a=t.stateNode=new yg),a;case 22:return t=t.stateNode,a=t._retryCache,a===null&&(a=t._retryCache=new yg),a;default:throw Error(r(435,t.tag))}}function ul(t,a){var s=_x(t);a.forEach(function(o){if(!s.has(o)){s.add(o);var u=Bx.bind(null,t,o);o.then(u,u)}})}function Jt(t,a){var s=a.deletions;if(s!==null)for(var o=0;o<s.length;o++){var u=s[o],m=t,b=a,j=b;e:for(;j!==null;){switch(j.tag){case 27:if(Ua(j.type)){lt=j.stateNode,Xt=!1;break e}break;case 5:lt=j.stateNode,Xt=!1;break e;case 3:case 4:lt=j.stateNode.containerInfo,Xt=!0;break e}j=j.return}if(lt===null)throw Error(r(160));Sg(m,b,u),lt=null,Xt=!1,m=u.alternate,m!==null&&(m.return=null),u.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)jg(a,t),a=a.sibling}var zn=null;function jg(t,a){var s=t.alternate,o=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:Jt(a,t),Ft(t),o&4&&(za(3,t,t.return),Er(3,t),za(5,t,t.return));break;case 1:Jt(a,t),Ft(t),o&512&&(kt||s===null||Pn(s,s.return)),o&64&&oa&&(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=zn;if(Jt(a,t),Ft(t),o&512&&(kt||s===null||Pn(s,s.return)),o&4){var m=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":m=u.getElementsByTagName("title")[0],(!m||m[ir]||m[Bt]||m.namespaceURI==="http://www.w3.org/2000/svg"||m.hasAttribute("itemprop"))&&(m=u.createElement(o),u.head.insertBefore(m,u.querySelector("head > title"))),$t(m,o,s),m[Bt]=t,Ot(m),o=m;break e;case"link":var b=jy("link","href",u).get(o+(s.href||""));if(b){for(var j=0;j<b.length;j++)if(m=b[j],m.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&m.getAttribute("rel")===(s.rel==null?null:s.rel)&&m.getAttribute("title")===(s.title==null?null:s.title)&&m.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){b.splice(j,1);break t}}m=u.createElement(o),$t(m,o,s),u.head.appendChild(m);break;case"meta":if(b=jy("meta","content",u).get(o+(s.content||""))){for(j=0;j<b.length;j++)if(m=b[j],m.getAttribute("content")===(s.content==null?null:""+s.content)&&m.getAttribute("name")===(s.name==null?null:s.name)&&m.getAttribute("property")===(s.property==null?null:s.property)&&m.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&m.getAttribute("charset")===(s.charSet==null?null:s.charSet)){b.splice(j,1);break t}}m=u.createElement(o),$t(m,o,s),u.head.appendChild(m);break;default:throw Error(r(468,o))}m[Bt]=t,Ot(m),o=m}t.stateNode=o}else Ny(u,t.type,t.stateNode);else t.stateNode=wy(u,o,t.memoizedProps);else m!==o?(m===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):m.count--,o===null?Ny(u,t.type,t.stateNode):wy(u,o,t.memoizedProps)):o===null&&t.stateNode!==null&&md(t,t.memoizedProps,s.memoizedProps)}break;case 27:Jt(a,t),Ft(t),o&512&&(kt||s===null||Pn(s,s.return)),s!==null&&o&4&&md(t,t.memoizedProps,s.memoizedProps);break;case 5:if(Jt(a,t),Ft(t),o&512&&(kt||s===null||Pn(s,s.return)),t.flags&32){u=t.stateNode;try{Ki(u,"")}catch(me){Ze(t,t.return,me)}}o&4&&t.stateNode!=null&&(u=t.memoizedProps,md(t,u,s!==null?s.memoizedProps:u)),o&1024&&(yd=!0);break;case 6:if(Jt(a,t),Ft(t),o&4){if(t.stateNode===null)throw Error(r(162));o=t.memoizedProps,s=t.stateNode;try{s.nodeValue=o}catch(me){Ze(t,t.return,me)}}break;case 3:if(Al=null,u=zn,zn=Nl(a.containerInfo),Jt(a,t),zn=u,Ft(t),o&4&&s!==null&&s.memoizedState.isDehydrated)try{Ns(a.containerInfo)}catch(me){Ze(t,t.return,me)}yd&&(yd=!1,Ng(t));break;case 4:o=zn,zn=Nl(t.stateNode.containerInfo),Jt(a,t),Ft(t),zn=o;break;case 12:Jt(a,t),Ft(t);break;case 31:Jt(a,t),Ft(t),o&4&&(o=t.updateQueue,o!==null&&(t.updateQueue=null,ul(t,o)));break;case 13:Jt(a,t),Ft(t),t.child.flags&8192&&t.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(fl=Vt()),o&4&&(o=t.updateQueue,o!==null&&(t.updateQueue=null,ul(t,o)));break;case 22:u=t.memoizedState!==null;var C=s!==null&&s.memoizedState!==null,L=oa,G=kt;if(oa=L||u,kt=G||C,Jt(a,t),kt=G,oa=L,Ft(t),o&8192)e:for(a=t.stateNode,a._visibility=u?a._visibility&-2:a._visibility|1,u&&(s===null||C||oa||kt||Si(t)),s=null,a=t;;){if(a.tag===5||a.tag===26){if(s===null){C=s=a;try{if(m=C.stateNode,u)b=m.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none";else{j=C.stateNode;var Y=C.memoizedProps.style,U=Y!=null&&Y.hasOwnProperty("display")?Y.display:null;j.style.display=U==null||typeof U=="boolean"?"":(""+U).trim()}}catch(me){Ze(C,C.return,me)}}}else if(a.tag===6){if(s===null){C=a;try{C.stateNode.nodeValue=u?"":C.memoizedProps}catch(me){Ze(C,C.return,me)}}}else if(a.tag===18){if(s===null){C=a;try{var V=C.stateNode;u?py(V,!0):py(C.stateNode,!1)}catch(me){Ze(C,C.return,me)}}}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,ul(t,s))));break;case 19:Jt(a,t),Ft(t),o&4&&(o=t.updateQueue,o!==null&&(t.updateQueue=null,ul(t,o)));break;case 30:break;case 21:break;default:Jt(a,t),Ft(t)}}function Ft(t){var a=t.flags;if(a&2){try{for(var s,o=t.return;o!==null;){if(hg(o)){s=o;break}o=o.return}if(s==null)throw Error(r(160));switch(s.tag){case 27:var u=s.stateNode,m=hd(t);cl(t,m,u);break;case 5:var b=s.stateNode;s.flags&32&&(Ki(b,""),s.flags&=-33);var j=hd(t);cl(t,j,b);break;case 3:case 4:var C=s.stateNode.containerInfo,L=hd(t);gd(t,L,C);break;default:throw Error(r(161))}}catch(G){Ze(t,t.return,G)}t.flags&=-3}a&4096&&(t.flags&=-4097)}function Ng(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var a=t;Ng(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),t=t.sibling}}function ca(t,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)bg(t,a.alternate,a),a=a.sibling}function Si(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),Si(a);break;case 1:Pn(a,a.return);var s=a.stateNode;typeof s.componentWillUnmount=="function"&&pg(a,a.return,s),Si(a);break;case 27:$r(a.stateNode);case 26:case 5:Pn(a,a.return),Si(a);break;case 22:a.memoizedState===null&&Si(a);break;case 30:Si(a);break;default:Si(a)}t=t.sibling}}function ua(t,a,s){for(s=s&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var o=a.alternate,u=t,m=a,b=m.flags;switch(m.tag){case 0:case 11:case 15:ua(u,m,s),Er(4,m);break;case 1:if(ua(u,m,s),o=m,u=o.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(L){Ze(o,o.return,L)}if(o=m,u=o.updateQueue,u!==null){var j=o.stateNode;try{var C=u.shared.hiddenCallbacks;if(C!==null)for(u.shared.hiddenCallbacks=null,u=0;u<C.length;u++)th(C[u],j)}catch(L){Ze(o,o.return,L)}}s&&b&64&&fg(m),Or(m,m.return);break;case 27:gg(m);case 26:case 5:ua(u,m,s),s&&o===null&&b&4&&mg(m),Or(m,m.return);break;case 12:ua(u,m,s);break;case 31:ua(u,m,s),s&&b&4&&xg(u,m);break;case 13:ua(u,m,s),s&&b&4&&wg(u,m);break;case 22:m.memoizedState===null&&ua(u,m,s),Or(m,m.return);break;case 30:break;default:ua(u,m,s)}a=a.sibling}}function bd(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 vd(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;)kg(t,a,s,o),a=a.sibling}function kg(t,a,s,o){var u=a.flags;switch(a.tag){case 0:case 11:case 15:Dn(t,a,s,o),u&2048&&Er(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 m=a.memoizedProps,b=m.id,j=m.onPostCommit;typeof j=="function"&&j(b,a.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(C){Ze(a,a.return,C)}}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:m=a.stateNode,b=a.alternate,a.memoizedState!==null?m._visibility&2?Dn(t,a,s,o):zr(t,a):m._visibility&2?Dn(t,a,s,o):(m._visibility|=2,ps(t,a,s,o,(a.subtreeFlags&10256)!==0||!1)),u&2048&&bd(b,a);break;case 24:Dn(t,a,s,o),u&2048&&vd(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 m=t,b=a,j=s,C=o,L=b.flags;switch(b.tag){case 0:case 11:case 15:ps(m,b,j,C,u),Er(8,b);break;case 23:break;case 22:var G=b.stateNode;b.memoizedState!==null?G._visibility&2?ps(m,b,j,C,u):zr(m,b):(G._visibility|=2,ps(m,b,j,C,u)),u&&L&2048&&bd(b.alternate,b);break;case 24:ps(m,b,j,C,u),u&&L&2048&&vd(b.alternate,b);break;default:ps(m,b,j,C,u)}a=a.sibling}}function zr(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:zr(s,o),u&2048&&bd(o.alternate,o);break;case 24:zr(s,o),u&2048&&vd(o.alternate,o);break;default:zr(s,o)}a=a.sibling}}var Dr=8192;function ms(t,a,s){if(t.subtreeFlags&Dr)for(t=t.child;t!==null;)Ag(t,a,s),t=t.sibling}function Ag(t,a,s){switch(t.tag){case 26:ms(t,a,s),t.flags&Dr&&t.memoizedState!==null&&pw(s,zn,t.memoizedState,t.memoizedProps);break;case 5:ms(t,a,s);break;case 3:case 4:var o=zn;zn=Nl(t.stateNode.containerInfo),ms(t,a,s),zn=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 _g(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,Tg(o,t)}_g(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Cg(t),t=t.sibling}function Cg(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,dl(t)):Rr(t);break;default:Rr(t)}}function dl(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,Tg(o,t)}_g(t)}for(t=t.child;t!==null;){switch(a=t,a.tag){case 0:case 11:case 15:za(8,a,a.return),dl(a);break;case 22:s=a.stateNode,s._visibility&2&&(s._visibility&=-3,dl(a));break;default:dl(a)}t=t.sibling}}function Tg(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,m=o.return;if(vg(o),o===s){zt=null;break e}if(u!==null){u.return=m,zt=u;break e}zt=m}}}var Cx={getCacheForType:function(t){var a=qt(wt),s=a.data.get(t);return s===void 0&&(s=t(),a.data.set(t,s)),s},cacheSignal:function(){return qt(wt).controller.signal}},Tx=typeof WeakMap=="function"?WeakMap:Map,Pe=0,We=null,Re=null,Be=0,Ke=0,cn=null,Da=!1,hs=!1,Sd=!1,da=0,mt=0,Ra=0,xi=0,xd=0,un=0,gs=0,Mr=null,Wt=null,wd=!1,fl=0,Eg=0,pl=1/0,ml=null,Ma=null,Ct=0,Ba=null,ys=null,fa=0,jd=0,Nd=null,Og=null,Br=0,kd=null;function dn(){return(Pe&2)!==0&&Be!==0?Be&-Be:$.T!==null?Od():Kp()}function zg(){if(un===0)if((Be&536870912)===0||qe){var t=Ui;Ui<<=1,(Ui&3932160)===0&&(Ui=262144),un=t}else un=536870912;return t=on.current,t!==null&&(t.flags|=32),un}function en(t,a,s){(t===We&&(Ke===2||Ke===9)||t.cancelPendingCommit!==null)&&(bs(t,0),La(t,Be,un,!1)),ii(t,s),((Pe&2)===0||t!==We)&&(t===We&&((Pe&2)===0&&(xi|=s),mt===4&&La(t,Be,un,!1)),Gn(t))}function Dg(t,a,s){if((Pe&6)!==0)throw Error(r(327));var o=!s&&(a&127)===0&&(a&t.expiredLanes)===0||ai(t,a),u=o?zx(t,a):_d(t,a,!0),m=o;do{if(u===0){hs&&!o&&La(t,a,0,!1);break}else{if(s=t.current.alternate,m&&!Ex(s)){u=_d(t,a,!1),m=!1;continue}if(u===2){if(m=a,t.errorRecoveryDisabledLanes&m)var b=0;else b=t.pendingLanes&-536870913,b=b!==0?b:b&536870912?536870912:0;if(b!==0){a=b;e:{var j=t;u=Mr;var C=j.current.memoizedState.isDehydrated;if(C&&(bs(j,b).flags|=256),b=_d(j,b,!1),b!==2){if(Sd&&!C){j.errorRecoveryDisabledLanes|=m,xi|=m,u=4;break e}m=Wt,Wt=u,m!==null&&(Wt===null?Wt=m:Wt.push.apply(Wt,m))}u=b}if(m=!1,u!==2)continue}}if(u===1){bs(t,0),La(t,a,0,!0);break}e:{switch(o=t,m=u,m){case 0:case 1:throw Error(r(345));case 4:if((a&4194048)!==a)break;case 6:La(o,a,un,!Da);break e;case 2:Wt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((a&62914560)===a&&(u=fl+300-Vt(),10<u)){if(La(o,a,un,!Da),pn(o,0,!0)!==0)break e;fa=a,o.timeoutHandle=uy(Rg.bind(null,o,s,Wt,ml,wd,a,un,xi,gs,Da,m,"Throttled",-0,0),u);break e}Rg(o,s,Wt,ml,wd,a,un,xi,gs,Da,m,null,-0,0)}}break}while(!0);Gn(t)}function Rg(t,a,s,o,u,m,b,j,C,L,G,Y,U,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:Jn},Ag(a,m,Y);var me=(m&62914560)===m?fl-Vt():(m&4194048)===m?Eg-Vt():0;if(me=mw(Y,me),me!==null){fa=m,t.cancelPendingCommit=me(Ig.bind(null,t,a,m,s,o,u,b,j,C,G,Y,null,U,V)),La(t,m,b,!L);return}}Ig(t,a,m,s,o,u,b,j,C)}function Ex(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],m=u.getSnapshot;u=u.value;try{if(!sn(m(),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 La(t,a,s,o){a&=~xd,a&=~xi,t.suspendedLanes|=a,t.pingedLanes&=~a,o&&(t.warmLanes|=a),o=t.expirationTimes;for(var u=a;0<u;){var m=31-_t(u),b=1<<m;o[m]=-1,u&=~b}s!==0&&ar(t,s,a)}function hl(){return(Pe&6)===0?(Lr(0),!1):!0}function Ad(){if(Re!==null){if(Ke===0)var t=Re.return;else t=Re,ta=fi=null,Iu(t),ls=null,vr=0,t=Re;for(;t!==null;)dg(t.alternate,t),t=t.return;Re=null}}function bs(t,a){var s=t.timeoutHandle;s!==-1&&(t.timeoutHandle=-1,Xx(s)),s=t.cancelPendingCommit,s!==null&&(t.cancelPendingCommit=null,s()),fa=0,Ad(),We=t,Re=s=Wn(t.current,null),Be=a,Ke=0,cn=null,Da=!1,hs=ai(t,a),Sd=!1,gs=un=xd=xi=Ra=mt=0,Wt=Mr=null,wd=!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-_t(o),m=1<<u;a|=t[u],o&=~m}return da=a,Bo(),s}function Mg(t,a){Ee=null,$.H=_r,a===os||a===Go?(a=Jm(),Ke=3):a===Eu?(a=Jm(),Ke=4):Ke=a===id?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,cn=a,Re===null&&(mt=1,il(t,yn(a,t.current)))}function Bg(){var t=on.current;return t===null?!0:(Be&4194048)===Be?xn===null:(Be&62914560)===Be||(Be&536870912)!==0?t===xn:!1}function Lg(){var t=$.H;return $.H=_r,t===null?_r:t}function qg(){var t=$.A;return $.A=Cx,t}function gl(){mt=4,Da||(Be&4194048)!==Be&&on.current!==null||(hs=!0),(Ra&134217727)===0&&(xi&134217727)===0||We===null||La(We,Be,un,!1)}function _d(t,a,s){var o=Pe;Pe|=2;var u=Lg(),m=qg();(We!==t||Be!==a)&&(ml=null,bs(t,a)),a=!1;var b=mt;e:do try{if(Ke!==0&&Re!==null){var j=Re,C=cn;switch(Ke){case 8:Ad(),b=6;break e;case 3:case 2:case 9:case 6:on.current===null&&(a=!0);var L=Ke;if(Ke=0,cn=null,vs(t,j,C,L),s&&hs){b=0;break e}break;default:L=Ke,Ke=0,cn=null,vs(t,j,C,L)}}Ox(),b=mt;break}catch(G){Mg(t,G)}while(!0);return a&&t.shellSuspendCounter++,ta=fi=null,Pe=o,$.H=u,$.A=m,Re===null&&(We=null,Be=0,Bo()),b}function Ox(){for(;Re!==null;)Ug(Re)}function zx(t,a){var s=Pe;Pe|=2;var o=Lg(),u=qg();We!==t||Be!==a?(ml=null,pl=Vt()+500,bs(t,a)):hs=ai(t,a);e:do try{if(Ke!==0&&Re!==null){a=Re;var m=cn;t:switch(Ke){case 1:Ke=0,cn=null,vs(t,a,m,1);break;case 2:case 9:if(Ym(m)){Ke=0,cn=null,$g(a);break}a=function(){Ke!==2&&Ke!==9||We!==t||(Ke=7),Gn(t)},m.then(a,a);break e;case 3:Ke=7;break e;case 4:Ke=5;break e;case 7:Ym(m)?(Ke=0,cn=null,$g(a)):(Ke=0,cn=null,vs(t,a,m,7));break;case 5:var b=null;switch(Re.tag){case 26:b=Re.memoizedState;case 5:case 27:var j=Re;if(b?ky(b):j.stateNode.complete){Ke=0,cn=null;var C=j.sibling;if(C!==null)Re=C;else{var L=j.return;L!==null?(Re=L,yl(L)):Re=null}break t}}Ke=0,cn=null,vs(t,a,m,5);break;case 6:Ke=0,cn=null,vs(t,a,m,6);break;case 8:Ad(),mt=6;break e;default:throw Error(r(462))}}Dx();break}catch(G){Mg(t,G)}while(!0);return ta=fi=null,$.H=o,$.A=u,Pe=s,Re!==null?0:(We=null,Be=0,Bo(),mt)}function Dx(){for(;Re!==null&&!yo();)Ug(Re)}function Ug(t){var a=cg(t.alternate,t,da);t.memoizedProps=t.pendingProps,a===null?yl(t):Re=a}function $g(t){var a=t,s=a.alternate;switch(a.tag){case 15:case 0:a=ag(s,a,a.pendingProps,a.type,void 0,Be);break;case 11:a=ag(s,a,a.pendingProps,a.type.render,a.ref,Be);break;case 5:Iu(a);default:dg(s,a),a=Re=qm(a,da),a=cg(s,a,da)}t.memoizedProps=t.pendingProps,a===null?yl(t):Re=a}function vs(t,a,s,o){ta=fi=null,Iu(a),ls=null,vr=0;var u=a.return;try{if(xx(t,u,a,s,Be)){mt=1,il(t,yn(s,t.current)),Re=null;return}}catch(m){if(u!==null)throw Re=u,m;mt=1,il(t,yn(s,t.current)),Re=null;return}a.flags&32768?(qe||o===1?t=!0:hs||(Be&536870912)!==0?t=!1:(Da=t=!0,(o===2||o===9||o===3||o===6)&&(o=on.current,o!==null&&o.tag===13&&(o.flags|=16384))),Vg(a,t)):yl(a)}function yl(t){var a=t;do{if((a.flags&32768)!==0){Vg(a,Da);return}t=a.return;var s=Nx(a.alternate,a,da);if(s!==null){Re=s;return}if(a=a.sibling,a!==null){Re=a;return}Re=a=t}while(a!==null);mt===0&&(mt=5)}function Vg(t,a){do{var s=kx(t.alternate,t);if(s!==null){s.flags&=32767,Re=s;return}if(s=t.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!a&&(t=t.sibling,t!==null)){Re=t;return}Re=t=s}while(t!==null);mt=6,Re=null}function Ig(t,a,s,o,u,m,b,j,C){t.cancelPendingCommit=null;do bl();while(Ct!==0);if((Pe&6)!==0)throw Error(r(327));if(a!==null){if(a===t.current)throw Error(r(177));if(m=a.lanes|a.childLanes,m|=hu,Pc(t,s,m,b,j,C),t===We&&(Re=We=null,Be=0),ys=a,Ba=t,fa=s,jd=m,Nd=u,Og=o,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,Lx(va,function(){return Kg(),null})):(t.callbackNode=null,t.callbackPriority=0),o=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||o){o=$.T,$.T=null,u=W.p,W.p=2,b=Pe,Pe|=4;try{Ax(t,a,s)}finally{Pe=b,W.p=u,$.T=o}}Ct=1,Pg(),Gg(),Hg()}}function Pg(){if(Ct===1){Ct=0;var t=Ba,a=ys,s=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||s){s=$.T,$.T=null;var o=W.p;W.p=2;var u=Pe;Pe|=4;try{jg(a,t);var m=Ud,b=Tm(t.containerInfo),j=m.focusedElem,C=m.selectionRange;if(b!==j&&j&&j.ownerDocument&&Cm(j.ownerDocument.documentElement,j)){if(C!==null&&uu(j)){var L=C.start,G=C.end;if(G===void 0&&(G=L),"selectionStart"in j)j.selectionStart=L,j.selectionEnd=Math.min(G,j.value.length);else{var Y=j.ownerDocument||document,U=Y&&Y.defaultView||window;if(U.getSelection){var V=U.getSelection(),me=j.textContent.length,we=Math.min(C.start,me),Fe=C.end===void 0?we:Math.min(C.end,me);!V.extend&&we>Fe&&(b=Fe,Fe=we,we=b);var D=_m(j,we),E=_m(j,Fe);if(D&&E&&(V.rangeCount!==1||V.anchorNode!==D.node||V.anchorOffset!==D.offset||V.focusNode!==E.node||V.focusOffset!==E.offset)){var B=Y.createRange();B.setStart(D.node,D.offset),V.removeAllRanges(),we>Fe?(V.addRange(B),V.extend(E.node,E.offset)):(B.setEnd(E.node,E.offset),V.addRange(B))}}}}for(Y=[],V=j;V=V.parentNode;)V.nodeType===1&&Y.push({element:V,left:V.scrollLeft,top:V.scrollTop});for(typeof j.focus=="function"&&j.focus(),j=0;j<Y.length;j++){var K=Y[j];K.element.scrollLeft=K.left,K.element.scrollTop=K.top}}El=!!qd,Ud=qd=null}finally{Pe=u,W.p=o,$.T=s}}t.current=a,Ct=2}}function Gg(){if(Ct===2){Ct=0;var t=Ba,a=ys,s=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||s){s=$.T,$.T=null;var o=W.p;W.p=2;var u=Pe;Pe|=4;try{bg(t,a.alternate,a)}finally{Pe=u,W.p=o,$.T=s}}Ct=3}}function Hg(){if(Ct===4||Ct===3){Ct=0,bo();var t=Ba,a=ys,s=fa,o=Og;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?Ct=5:(Ct=0,ys=Ba=null,Qg(t,t.pendingLanes));var u=t.pendingLanes;if(u===0&&(Ma=null),Hc(s),a=a.stateNode,ht&&typeof ht.onCommitFiberRoot=="function")try{ht.onCommitFiberRoot(Sa,a,void 0,(a.current.flags&128)===128)}catch{}if(o!==null){a=$.T,u=W.p,W.p=2,$.T=null;try{for(var m=t.onRecoverableError,b=0;b<o.length;b++){var j=o[b];m(j.value,{componentStack:j.stack})}}finally{$.T=a,W.p=u}}(fa&3)!==0&&bl(),Gn(t),u=t.pendingLanes,(s&261930)!==0&&(u&42)!==0?t===kd?Br++:(Br=0,kd=t):Br=0,Lr(0)}}function Qg(t,a){(t.pooledCacheLanes&=a)===0&&(a=t.pooledCache,a!=null&&(t.pooledCache=null,yr(a)))}function bl(){return Pg(),Gg(),Hg(),Kg()}function Kg(){if(Ct!==5)return!1;var t=Ba,a=jd;jd=0;var s=Hc(fa),o=$.T,u=W.p;try{W.p=32>s?32:s,$.T=null,s=Nd,Nd=null;var m=Ba,b=fa;if(Ct=0,ys=Ba=null,fa=0,(Pe&6)!==0)throw Error(r(331));var j=Pe;if(Pe|=4,Cg(m.current),kg(m,m.current,b,s),Pe=j,Lr(0,!1),ht&&typeof ht.onPostCommitFiberRoot=="function")try{ht.onPostCommitFiberRoot(Sa,m)}catch{}return!0}finally{W.p=u,$.T=o,Qg(t,a)}}function Zg(t,a,s){a=yn(s,a),a=ad(t.stateNode,a,2),t=Ta(t,a,2),t!==null&&(ii(t,2),Gn(t))}function Ze(t,a,s){if(t.tag===3)Zg(t,t,s);else for(;a!==null;){if(a.tag===3){Zg(a,t,s);break}else if(a.tag===1){var o=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(Ma===null||!Ma.has(o))){t=yn(s,t),s=Yh(2),o=Ta(a,s,2),o!==null&&(Xh(s,o,a,t),ii(o,2),Gn(o));break}}a=a.return}}function Cd(t,a,s){var o=t.pingCache;if(o===null){o=t.pingCache=new Tx;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)||(Sd=!0,u.add(s),t=Rx.bind(null,t,a,s),a.then(t,t))}function Rx(t,a,s){var o=t.pingCache;o!==null&&o.delete(a),t.pingedLanes|=t.suspendedLanes&s,t.warmLanes&=~s,We===t&&(Be&s)===s&&(mt===4||mt===3&&(Be&62914560)===Be&&300>Vt()-fl?(Pe&2)===0&&bs(t,0):xd|=s,gs===Be&&(gs=0)),Gn(t)}function Yg(t,a){a===0&&(a=ot()),t=ci(t,a),t!==null&&(ii(t,a),Gn(t))}function Mx(t){var a=t.memoizedState,s=0;a!==null&&(s=a.retryLane),Yg(t,s)}function Bx(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),Yg(t,s)}function Lx(t,a){return Bi(t,a)}var vl=null,Ss=null,Td=!1,Sl=!1,Ed=!1,qa=0;function Gn(t){t!==Ss&&t.next===null&&(Ss===null?vl=Ss=t:Ss=Ss.next=t),Sl=!0,Td||(Td=!0,Ux())}function Lr(t,a){if(!Ed&&Sl){Ed=!0;do for(var s=!1,o=vl;o!==null;){if(t!==0){var u=o.pendingLanes;if(u===0)var m=0;else{var b=o.suspendedLanes,j=o.pingedLanes;m=(1<<31-_t(42|t)+1)-1,m&=u&~(b&~j),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(s=!0,Wg(o,m))}else m=Be,m=pn(o,o===We?m:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(m&3)===0||ai(o,m)||(s=!0,Wg(o,m));o=o.next}while(s);Ed=!1}}function qx(){Xg()}function Xg(){Sl=Td=!1;var t=0;qa!==0&&Yx()&&(t=qa);for(var a=Vt(),s=null,o=vl;o!==null;){var u=o.next,m=Jg(o,a);m===0?(o.next=null,s===null?vl=u:s.next=u,u===null&&(Ss=s)):(s=o,(t!==0||(m&3)!==0)&&(Sl=!0)),o=u}Ct!==0&&Ct!==5||Lr(t),qa!==0&&(qa=0)}function Jg(t,a){for(var s=t.suspendedLanes,o=t.pingedLanes,u=t.expirationTimes,m=t.pendingLanes&-62914561;0<m;){var b=31-_t(m),j=1<<b,C=u[b];C===-1?((j&s)===0||(j&o)!==0)&&(u[b]=ie(j,a)):C<=a&&(t.expiredLanes|=j),m&=~j}if(a=We,s=Be,s=pn(t,t===a?s:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),o=t.callbackNode,s===0||t===a&&(Ke===2||Ke===9)||t.cancelPendingCommit!==null)return o!==null&&o!==null&&nr(o),t.callbackNode=null,t.callbackPriority=0;if((s&3)===0||ai(t,s)){if(a=s&-s,a===t.callbackPriority)return a;switch(o!==null&&nr(o),Hc(s)){case 2:case 8:s=So;break;case 32:s=va;break;case 268435456:s=Li;break;default:s=va}return o=Fg.bind(null,t),s=Bi(s,o),t.callbackPriority=a,t.callbackNode=s,a}return o!==null&&o!==null&&nr(o),t.callbackPriority=2,t.callbackNode=null,2}function Fg(t,a){if(Ct!==0&&Ct!==5)return t.callbackNode=null,t.callbackPriority=0,null;var s=t.callbackNode;if(bl()&&t.callbackNode!==s)return null;var o=Be;return o=pn(t,t===We?o:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),o===0?null:(Dg(t,o,a),Jg(t,Vt()),t.callbackNode!=null&&t.callbackNode===s?Fg.bind(null,t):null)}function Wg(t,a){if(bl())return null;Dg(t,a,!0)}function Ux(){Jx(function(){(Pe&6)!==0?Bi(vo,qx):Xg()})}function Od(){if(qa===0){var t=ss;t===0&&(t=qi,qi<<=1,(qi&261888)===0&&(qi=256)),qa=t}return qa}function ey(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:Co(""+t)}function ty(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 $x(t,a,s,o,u){if(a==="submit"&&s&&s.stateNode===u){var m=ey((u[Zt]||null).action),b=o.submitter;b&&(a=(a=b[Zt]||null)?ey(a.formAction):b.getAttribute("formAction"),a!==null&&(m=a,b=null));var j=new zo("action","action",null,o,u);t.push({event:j,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(qa!==0){var C=b?ty(u,b):new FormData(u);Ju(s,{pending:!0,data:C,method:u.method,action:m},null,C)}}else typeof m=="function"&&(j.preventDefault(),C=b?ty(u,b):new FormData(u),Ju(s,{pending:!0,data:C,method:u.method,action:m},m,C))},currentTarget:u}]})}}for(var zd=0;zd<mu.length;zd++){var Dd=mu[zd],Vx=Dd.toLowerCase(),Ix=Dd[0].toUpperCase()+Dd.slice(1);On(Vx,"on"+Ix)}On(zm,"onAnimationEnd"),On(Dm,"onAnimationIteration"),On(Rm,"onAnimationStart"),On("dblclick","onDoubleClick"),On("focusin","onFocus"),On("focusout","onBlur"),On(ix,"onTransitionRun"),On(sx,"onTransitionStart"),On(rx,"onTransitionCancel"),On(Mm,"onTransitionEnd"),Hi("onMouseEnter",["mouseout","mouseover"]),Hi("onMouseLeave",["mouseout","mouseover"]),Hi("onPointerEnter",["pointerout","pointerover"]),Hi("onPointerLeave",["pointerout","pointerover"]),si("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),si("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),si("onBeforeInput",["compositionend","keypress","textInput","paste"]),si("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),si("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),si("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(" "),Px=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(qr));function ny(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 m=void 0;if(a)for(var b=o.length-1;0<=b;b--){var j=o[b],C=j.instance,L=j.currentTarget;if(j=j.listener,C!==m&&u.isPropagationStopped())break e;m=j,u.currentTarget=L;try{m(u)}catch(G){Mo(G)}u.currentTarget=null,m=C}else for(b=0;b<o.length;b++){if(j=o[b],C=j.instance,L=j.currentTarget,j=j.listener,C!==m&&u.isPropagationStopped())break e;m=j,u.currentTarget=L;try{m(u)}catch(G){Mo(G)}u.currentTarget=null,m=C}}}}function Me(t,a){var s=a[Qc];s===void 0&&(s=a[Qc]=new Set);var o=t+"__bubble";s.has(o)||(ay(a,t,2,!1),s.add(o))}function Rd(t,a,s){var o=0;a&&(o|=4),ay(s,t,o,a)}var xl="_reactListening"+Math.random().toString(36).slice(2);function Md(t){if(!t[xl]){t[xl]=!0,Xp.forEach(function(s){s!=="selectionchange"&&(Px.has(s)||Rd(s,!1,t),Rd(s,!0,t))});var a=t.nodeType===9?t:t.ownerDocument;a===null||a[xl]||(a[xl]=!0,Rd("selectionchange",!1,a))}}function ay(t,a,s,o){switch(zy(a)){case 2:var u=yw;break;case 8:u=bw;break;default:u=Xd}s=u.bind(null,a,s,t),u=void 0,!tu||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 Bd(t,a,s,o,u){var m=o;if((a&1)===0&&(a&2)===0&&o!==null)e:for(;;){if(o===null)return;var b=o.tag;if(b===3||b===4){var j=o.stateNode.containerInfo;if(j===u)break;if(b===4)for(b=o.return;b!==null;){var C=b.tag;if((C===3||C===4)&&b.stateNode.containerInfo===u)return;b=b.return}for(;j!==null;){if(b=Ii(j),b===null)return;if(C=b.tag,C===5||C===6||C===26||C===27){o=m=b;continue e}j=j.parentNode}}o=o.return}lm(function(){var L=m,G=Wc(s),Y=[];e:{var U=Bm.get(t);if(U!==void 0){var V=zo,me=t;switch(t){case"keypress":if(Eo(s)===0)break e;case"keydown":case"keyup":V=B1;break;case"focusin":me="focus",V=su;break;case"focusout":me="blur",V=su;break;case"beforeblur":case"afterblur":V=su;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=dm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":V=N1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":V=U1;break;case zm:case Dm:case Rm:V=_1;break;case Mm:V=V1;break;case"scroll":case"scrollend":V=w1;break;case"wheel":V=P1;break;case"copy":case"cut":case"paste":V=T1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":V=pm;break;case"toggle":case"beforetoggle":V=H1}var we=(a&4)!==0,Fe=!we&&(t==="scroll"||t==="scrollend"),D=we?U!==null?U+"Capture":null:U;we=[];for(var E=L,B;E!==null;){var K=E;if(B=K.stateNode,K=K.tag,K!==5&&K!==26&&K!==27||B===null||D===null||(K=rr(E,D),K!=null&&we.push(Ur(E,K,B))),Fe)break;E=E.return}0<we.length&&(U=new V(U,me,null,s,G),Y.push({event:U,listeners:we}))}}if((a&7)===0){e:{if(U=t==="mouseover"||t==="pointerover",V=t==="mouseout"||t==="pointerout",U&&s!==Fc&&(me=s.relatedTarget||s.fromElement)&&(Ii(me)||me[Vi]))break e;if((V||U)&&(U=G.window===G?G:(U=G.ownerDocument)?U.defaultView||U.parentWindow:window,V?(me=s.relatedTarget||s.toElement,V=L,me=me?Ii(me):null,me!==null&&(Fe=c(me),we=me.tag,me!==Fe||we!==5&&we!==27&&we!==6)&&(me=null)):(V=null,me=L),V!==me)){if(we=dm,K="onMouseLeave",D="onMouseEnter",E="mouse",(t==="pointerout"||t==="pointerover")&&(we=pm,K="onPointerLeave",D="onPointerEnter",E="pointer"),Fe=V==null?U:sr(V),B=me==null?U:sr(me),U=new we(K,E+"leave",V,s,G),U.target=Fe,U.relatedTarget=B,K=null,Ii(G)===L&&(we=new we(D,E+"enter",me,s,G),we.target=B,we.relatedTarget=Fe,K=we),Fe=K,V&&me)t:{for(we=Gx,D=V,E=me,B=0,K=D;K;K=we(K))B++;K=0;for(var ve=E;ve;ve=we(ve))K++;for(;0<B-K;)D=we(D),B--;for(;0<K-B;)E=we(E),K--;for(;B--;){if(D===E||E!==null&&D===E.alternate){we=D;break t}D=we(D),E=we(E)}we=null}else we=null;V!==null&&iy(Y,U,V,we,!1),me!==null&&Fe!==null&&iy(Y,Fe,me,we,!0)}}e:{if(U=L?sr(L):window,V=U.nodeName&&U.nodeName.toLowerCase(),V==="select"||V==="input"&&U.type==="file")var Ve=xm;else if(vm(U))if(wm)Ve=tx;else{Ve=W1;var ye=F1}else V=U.nodeName,!V||V.toLowerCase()!=="input"||U.type!=="checkbox"&&U.type!=="radio"?L&&Jc(L.elementType)&&(Ve=xm):Ve=ex;if(Ve&&(Ve=Ve(t,L))){Sm(Y,Ve,s,G);break e}ye&&ye(t,U,L),t==="focusout"&&L&&U.type==="number"&&L.memoizedProps.value!=null&&Xc(U,"number",U.value)}switch(ye=L?sr(L):window,t){case"focusin":(vm(ye)||ye.contentEditable==="true")&&(Ji=ye,du=L,mr=null);break;case"focusout":mr=du=Ji=null;break;case"mousedown":fu=!0;break;case"contextmenu":case"mouseup":case"dragend":fu=!1,Em(Y,s,G);break;case"selectionchange":if(ax)break;case"keydown":case"keyup":Em(Y,s,G)}var Oe;if(ou)e:{switch(t){case"compositionstart":var Le="onCompositionStart";break e;case"compositionend":Le="onCompositionEnd";break e;case"compositionupdate":Le="onCompositionUpdate";break e}Le=void 0}else Xi?ym(t,s)&&(Le="onCompositionEnd"):t==="keydown"&&s.keyCode===229&&(Le="onCompositionStart");Le&&(mm&&s.locale!=="ko"&&(Xi||Le!=="onCompositionStart"?Le==="onCompositionEnd"&&Xi&&(Oe=cm()):(wa=G,nu="value"in wa?wa.value:wa.textContent,Xi=!0)),ye=wl(L,Le),0<ye.length&&(Le=new fm(Le,t,null,s,G),Y.push({event:Le,listeners:ye}),Oe?Le.data=Oe:(Oe=bm(s),Oe!==null&&(Le.data=Oe)))),(Oe=K1?Z1(t,s):Y1(t,s))&&(Le=wl(L,"onBeforeInput"),0<Le.length&&(ye=new fm("onBeforeInput","beforeinput",null,s,G),Y.push({event:ye,listeners:Le}),ye.data=Oe)),$x(Y,t,L,s,G)}ny(Y,a)})}function Ur(t,a,s){return{instance:t,listener:a,currentTarget:s}}function wl(t,a){for(var s=a+"Capture",o=[];t!==null;){var u=t,m=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||m===null||(u=rr(t,s),u!=null&&o.unshift(Ur(t,u,m)),u=rr(t,a),u!=null&&o.push(Ur(t,u,m))),t.tag===3)return o;t=t.return}return[]}function Gx(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function iy(t,a,s,o,u){for(var m=a._reactName,b=[];s!==null&&s!==o;){var j=s,C=j.alternate,L=j.stateNode;if(j=j.tag,C!==null&&C===o)break;j!==5&&j!==26&&j!==27||L===null||(C=L,u?(L=rr(s,m),L!=null&&b.unshift(Ur(s,L,C))):u||(L=rr(s,m),L!=null&&b.push(Ur(s,L,C)))),s=s.return}b.length!==0&&t.push({event:a,listeners:b})}var Hx=/\r\n?/g,Qx=/\u0000|\uFFFD/g;function sy(t){return(typeof t=="string"?t:""+t).replace(Hx,`
|
|
10
|
-
`).replace(Qx,"")}function ry(t,a){return a=sy(a),sy(t)===a}function Je(t,a,s,o,u,m){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":Ao(t,"class",o);break;case"tabIndex":Ao(t,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":Ao(t,s,o);break;case"style":rm(t,o,m);break;case"data":if(a!=="object"){Ao(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=Co(""+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 m=="function"&&(s==="formAction"?(a!=="input"&&Je(t,a,"name",u.name,u,null),Je(t,a,"formEncType",u.formEncType,u,null),Je(t,a,"formMethod",u.formMethod,u,null),Je(t,a,"formTarget",u.formTarget,u,null)):(Je(t,a,"encType",u.encType,u,null),Je(t,a,"method",u.method,u,null),Je(t,a,"target",u.target,u,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){t.removeAttribute(s);break}o=Co(""+o),t.setAttribute(s,o);break;case"onClick":o!=null&&(t.onclick=Jn);break;case"onScroll":o!=null&&Me("scroll",t);break;case"onScrollEnd":o!=null&&Me("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=Co(""+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":Me("beforetoggle",t),Me("toggle",t),ko(t,"popover",o);break;case"xlinkActuate":Xn(t,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":Xn(t,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":Xn(t,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":Xn(t,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":Xn(t,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":Xn(t,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":Xn(t,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":Xn(t,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":Xn(t,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":ko(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=S1.get(s)||s,ko(t,s,o))}}function Ld(t,a,s,o,u,m){switch(s){case"style":rm(t,o,m);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&&Me("scroll",t);break;case"onScrollEnd":o!=null&&Me("scrollend",t);break;case"onClick":o!=null&&(t.onclick=Jn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Jp.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(u=s.endsWith("Capture"),a=s.slice(2,u?s.length-7:void 0),m=t[Zt]||null,m=m!=null?m[s]:null,typeof m=="function"&&t.removeEventListener(a,m,u),typeof o=="function")){typeof m!="function"&&m!==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,""):ko(t,s,o)}}}function $t(t,a,s){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Me("error",t),Me("load",t);var o=!1,u=!1,m;for(m in s)if(s.hasOwnProperty(m)){var b=s[m];if(b!=null)switch(m){case"src":o=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,a));default:Je(t,a,m,b,s,null)}}u&&Je(t,a,"srcSet",s.srcSet,s,null),o&&Je(t,a,"src",s.src,s,null);return;case"input":Me("invalid",t);var j=m=b=u=null,C=null,L=null;for(o in s)if(s.hasOwnProperty(o)){var G=s[o];if(G!=null)switch(o){case"name":u=G;break;case"type":b=G;break;case"checked":C=G;break;case"defaultChecked":L=G;break;case"value":m=G;break;case"defaultValue":j=G;break;case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(r(137,a));break;default:Je(t,a,o,G,s,null)}}nm(t,m,j,C,L,b,u,!1);return;case"select":Me("invalid",t),o=b=m=null;for(u in s)if(s.hasOwnProperty(u)&&(j=s[u],j!=null))switch(u){case"value":m=j;break;case"defaultValue":b=j;break;case"multiple":o=j;default:Je(t,a,u,j,s,null)}a=m,s=b,t.multiple=!!o,a!=null?Qi(t,!!o,a,!1):s!=null&&Qi(t,!!o,s,!0);return;case"textarea":Me("invalid",t),m=u=o=null;for(b in s)if(s.hasOwnProperty(b)&&(j=s[b],j!=null))switch(b){case"value":o=j;break;case"defaultValue":u=j;break;case"children":m=j;break;case"dangerouslySetInnerHTML":if(j!=null)throw Error(r(91));break;default:Je(t,a,b,j,s,null)}im(t,o,u,m);return;case"option":for(C in s)s.hasOwnProperty(C)&&(o=s[C],o!=null)&&(C==="selected"?t.selected=o&&typeof o!="function"&&typeof o!="symbol":Je(t,a,C,o,s,null));return;case"dialog":Me("beforetoggle",t),Me("toggle",t),Me("cancel",t),Me("close",t);break;case"iframe":case"object":Me("load",t);break;case"video":case"audio":for(o=0;o<qr.length;o++)Me(qr[o],t);break;case"image":Me("error",t),Me("load",t);break;case"details":Me("toggle",t);break;case"embed":case"source":case"link":Me("error",t),Me("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:Je(t,a,L,o,s,null)}return;default:if(Jc(a)){for(G in s)s.hasOwnProperty(G)&&(o=s[G],o!==void 0&&Ld(t,a,G,o,s,void 0));return}}for(j in s)s.hasOwnProperty(j)&&(o=s[j],o!=null&&Je(t,a,j,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,m=null,b=null,j=null,C=null,L=null,G=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":C=Y;default:o.hasOwnProperty(V)||Je(t,a,V,null,o,Y)}}for(var U in o){var V=o[U];if(Y=s[U],o.hasOwnProperty(U)&&(V!=null||Y!=null))switch(U){case"type":m=V;break;case"name":u=V;break;case"checked":L=V;break;case"defaultChecked":G=V;break;case"value":b=V;break;case"defaultValue":j=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(r(137,a));break;default:V!==Y&&Je(t,a,U,V,o,Y)}}Yc(t,b,j,C,L,G,m,u);return;case"select":V=b=j=U=null;for(m in s)if(C=s[m],s.hasOwnProperty(m)&&C!=null)switch(m){case"value":break;case"multiple":V=C;default:o.hasOwnProperty(m)||Je(t,a,m,null,o,C)}for(u in o)if(m=o[u],C=s[u],o.hasOwnProperty(u)&&(m!=null||C!=null))switch(u){case"value":U=m;break;case"defaultValue":j=m;break;case"multiple":b=m;default:m!==C&&Je(t,a,u,m,o,C)}a=j,s=b,o=V,U!=null?Qi(t,!!s,U,!1):!!o!=!!s&&(a!=null?Qi(t,!!s,a,!0):Qi(t,!!s,s?[]:"",!1));return;case"textarea":V=U=null;for(j in s)if(u=s[j],s.hasOwnProperty(j)&&u!=null&&!o.hasOwnProperty(j))switch(j){case"value":break;case"children":break;default:Je(t,a,j,null,o,u)}for(b in o)if(u=o[b],m=s[b],o.hasOwnProperty(b)&&(u!=null||m!=null))switch(b){case"value":U=u;break;case"defaultValue":V=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(r(91));break;default:u!==m&&Je(t,a,b,u,o,m)}am(t,U,V);return;case"option":for(var me in s)U=s[me],s.hasOwnProperty(me)&&U!=null&&!o.hasOwnProperty(me)&&(me==="selected"?t.selected=!1:Je(t,a,me,null,o,U));for(C in o)U=o[C],V=s[C],o.hasOwnProperty(C)&&U!==V&&(U!=null||V!=null)&&(C==="selected"?t.selected=U&&typeof U!="function"&&typeof U!="symbol":Je(t,a,C,U,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)U=s[we],s.hasOwnProperty(we)&&U!=null&&!o.hasOwnProperty(we)&&Je(t,a,we,null,o,U);for(L in o)if(U=o[L],V=s[L],o.hasOwnProperty(L)&&U!==V&&(U!=null||V!=null))switch(L){case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(r(137,a));break;default:Je(t,a,L,U,o,V)}return;default:if(Jc(a)){for(var Fe in s)U=s[Fe],s.hasOwnProperty(Fe)&&U!==void 0&&!o.hasOwnProperty(Fe)&&Ld(t,a,Fe,void 0,o,U);for(G in o)U=o[G],V=s[G],!o.hasOwnProperty(G)||U===V||U===void 0&&V===void 0||Ld(t,a,G,U,o,V);return}}for(var D in s)U=s[D],s.hasOwnProperty(D)&&U!=null&&!o.hasOwnProperty(D)&&Je(t,a,D,null,o,U);for(Y in o)U=o[Y],V=s[Y],!o.hasOwnProperty(Y)||U===V||U==null&&V==null||Je(t,a,Y,U,o,V)}function oy(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Zx(){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],m=u.transferSize,b=u.initiatorType,j=u.duration;if(m&&j&&oy(b)){for(b=0,j=u.responseEnd,o+=1;o<s.length;o++){var C=s[o],L=C.startTime;if(L>j)break;var G=C.transferSize,Y=C.initiatorType;G&&oy(Y)&&(C=C.responseEnd,b+=G*(C<j?1:(j-L)/(C-L)))}if(--o,a+=8*(m+b)/(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 qd=null,Ud=null;function jl(t){return t.nodeType===9?t:t.ownerDocument}function ly(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 cy(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 $d(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 Vd=null;function Yx(){var t=window.event;return t&&t.type==="popstate"?t===Vd?!1:(Vd=t,!0):(Vd=null,!1)}var uy=typeof setTimeout=="function"?setTimeout:void 0,Xx=typeof clearTimeout=="function"?clearTimeout:void 0,dy=typeof Promise=="function"?Promise:void 0,Jx=typeof queueMicrotask=="function"?queueMicrotask:typeof dy<"u"?function(t){return dy.resolve(null).then(t).catch(Fx)}:uy;function Fx(t){setTimeout(function(){throw t})}function Ua(t){return t==="head"}function fy(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 m=s.firstChild;m;){var b=m.nextSibling,j=m.nodeName;m[ir]||j==="SCRIPT"||j==="STYLE"||j==="LINK"&&m.rel.toLowerCase()==="stylesheet"||s.removeChild(m),m=b}}else s==="body"&&$r(t.ownerDocument.body);s=u}while(s);Ns(a)}function py(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 Id(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":Id(s),Kc(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}t.removeChild(s)}}function Wx(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(m=t.getAttribute("rel"),m==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(m!==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(m=t.getAttribute("src"),(m!==(u.src==null?null:u.src)||t.getAttribute("type")!==(u.type==null?null:u.type)||t.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&m&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(a==="input"&&t.type==="hidden"){var m=u.name==null?null:""+u.name;if(u.type==="hidden"&&t.getAttribute("name")===m)return t}else return t;if(t=wn(t.nextSibling),t===null)break}return null}function ew(t,a,s){if(a==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!s||(t=wn(t.nextSibling),t===null))return null;return t}function my(t,a){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!a||(t=wn(t.nextSibling),t===null))return null;return t}function Pd(t){return t.data==="$?"||t.data==="$~"}function Gd(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function tw(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 wn(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 Hd=null;function hy(t){t=t.nextSibling;for(var a=0;t;){if(t.nodeType===8){var s=t.data;if(s==="/$"||s==="/&"){if(a===0)return wn(t.nextSibling);a--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||a++}t=t.nextSibling}return null}function gy(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 yy(t,a,s){switch(a=jl(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]);Kc(t)}var jn=new Map,by=new Set;function Nl(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var pa=W.d;W.d={f:nw,r:aw,D:iw,C:sw,L:rw,m:ow,X:cw,S:lw,M:uw};function nw(){var t=pa.f(),a=hl();return t||a}function aw(t){var a=Pi(t);a!==null&&a.tag===5&&a.type==="form"?Mh(a):pa.r(t)}var xs=typeof document>"u"?null:document;function vy(t,a,s){var o=xs;if(o&&typeof a=="string"&&a){var u=hn(a);u='link[rel="'+t+'"][href="'+u+'"]',typeof s=="string"&&(u+='[crossorigin="'+s+'"]'),by.has(u)||(by.add(u),t={rel:t,crossOrigin:s,href:a},o.querySelector(u)===null&&(a=o.createElement("link"),$t(a,"link",t),Ot(a),o.head.appendChild(a)))}}function iw(t){pa.D(t),vy("dns-prefetch",t,null)}function sw(t,a){pa.C(t,a),vy("preconnect",t,a)}function rw(t,a,s){pa.L(t,a,s);var o=xs;if(o&&t&&a){var u='link[rel="preload"][as="'+hn(a)+'"]';a==="image"&&s&&s.imageSrcSet?(u+='[imagesrcset="'+hn(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(u+='[imagesizes="'+hn(s.imageSizes)+'"]')):u+='[href="'+hn(t)+'"]';var m=u;switch(a){case"style":m=ws(t);break;case"script":m=js(t)}jn.has(m)||(t=x({rel:"preload",href:a==="image"&&s&&s.imageSrcSet?void 0:t,as:a},s),jn.set(m,t),o.querySelector(u)!==null||a==="style"&&o.querySelector(Vr(m))||a==="script"&&o.querySelector(Ir(m))||(a=o.createElement("link"),$t(a,"link",t),Ot(a),o.head.appendChild(a)))}}function ow(t,a){pa.m(t,a);var s=xs;if(s&&t){var o=a&&typeof a.as=="string"?a.as:"script",u='link[rel="modulepreload"][as="'+hn(o)+'"][href="'+hn(t)+'"]',m=u;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=js(t)}if(!jn.has(m)&&(t=x({rel:"modulepreload",href:t},a),jn.set(m,t),s.querySelector(u)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(Ir(m)))return}o=s.createElement("link"),$t(o,"link",t),Ot(o),s.head.appendChild(o)}}}function lw(t,a,s){pa.S(t,a,s);var o=xs;if(o&&t){var u=Gi(o).hoistableStyles,m=ws(t);a=a||"default";var b=u.get(m);if(!b){var j={loading:0,preload:null};if(b=o.querySelector(Vr(m)))j.loading=5;else{t=x({rel:"stylesheet",href:t,"data-precedence":a},s),(s=jn.get(m))&&Qd(t,s);var C=b=o.createElement("link");Ot(C),$t(C,"link",t),C._p=new Promise(function(L,G){C.onload=L,C.onerror=G}),C.addEventListener("load",function(){j.loading|=1}),C.addEventListener("error",function(){j.loading|=2}),j.loading|=4,kl(b,a,o)}b={type:"stylesheet",instance:b,count:1,state:j},u.set(m,b)}}}function cw(t,a){pa.X(t,a);var s=xs;if(s&&t){var o=Gi(s).hoistableScripts,u=js(t),m=o.get(u);m||(m=s.querySelector(Ir(u)),m||(t=x({src:t,async:!0},a),(a=jn.get(u))&&Kd(t,a),m=s.createElement("script"),Ot(m),$t(m,"link",t),s.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},o.set(u,m))}}function uw(t,a){pa.M(t,a);var s=xs;if(s&&t){var o=Gi(s).hoistableScripts,u=js(t),m=o.get(u);m||(m=s.querySelector(Ir(u)),m||(t=x({src:t,async:!0,type:"module"},a),(a=jn.get(u))&&Kd(t,a),m=s.createElement("script"),Ot(m),$t(m,"link",t),s.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},o.set(u,m))}}function Sy(t,a,s,o){var u=(u=ae.current)?Nl(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=Gi(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 m=Gi(u).hoistableStyles,b=m.get(t);if(b||(u=u.ownerDocument||u,b={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(t,b),(m=u.querySelector(Vr(t)))&&!m._p&&(b.instance=m,b.state.loading=5),jn.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},jn.set(t,s),m||dw(u,t,s,b.state))),a&&o===null)throw Error(r(528,""));return b}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=Gi(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="'+hn(t)+'"'}function Vr(t){return'link[rel="stylesheet"]['+t+"]"}function xy(t){return x({},t,{"data-precedence":t.precedence,precedence:null})}function dw(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}),$t(a,"link",s),Ot(a),t.head.appendChild(a))}function js(t){return'[src="'+hn(t)+'"]'}function Ir(t){return"script[async]"+t}function wy(t,a,s){if(a.count++,a.instance===null)switch(a.type){case"style":var o=t.querySelector('style[data-href~="'+hn(s.href)+'"]');if(o)return a.instance=o,Ot(o),o;var u=x({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return o=(t.ownerDocument||t).createElement("style"),Ot(o),$t(o,"style",u),kl(o,s.precedence,t),a.instance=o;case"stylesheet":u=ws(s.href);var m=t.querySelector(Vr(u));if(m)return a.state.loading|=4,a.instance=m,Ot(m),m;o=xy(s),(u=jn.get(u))&&Qd(o,u),m=(t.ownerDocument||t).createElement("link"),Ot(m);var b=m;return b._p=new Promise(function(j,C){b.onload=j,b.onerror=C}),$t(m,"link",o),a.state.loading|=4,kl(m,s.precedence,t),a.instance=m;case"script":return m=js(s.src),(u=t.querySelector(Ir(m)))?(a.instance=u,Ot(u),u):(o=s,(u=jn.get(m))&&(o=x({},s),Kd(o,u)),t=t.ownerDocument||t,u=t.createElement("script"),Ot(u),$t(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,kl(o,s.precedence,t));return a.instance}function kl(t,a,s){for(var o=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=o.length?o[o.length-1]:null,m=u,b=0;b<o.length;b++){var j=o[b];if(j.dataset.precedence===a)m=j;else if(m!==u)break}m?m.parentNode.insertBefore(t,m.nextSibling):(a=s.nodeType===9?s.head:s,a.insertBefore(t,a.firstChild))}function Qd(t,a){t.crossOrigin==null&&(t.crossOrigin=a.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=a.referrerPolicy),t.title==null&&(t.title=a.title)}function Kd(t,a){t.crossOrigin==null&&(t.crossOrigin=a.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=a.referrerPolicy),t.integrity==null&&(t.integrity=a.integrity)}var Al=null;function jy(t,a,s){if(Al===null){var o=new Map,u=Al=new Map;u.set(s,o)}else u=Al,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 m=s[u];if(!(m[ir]||m[Bt]||t==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var b=m.getAttribute(a)||"";b=t+b;var j=o.get(b);j?j.push(m):o.set(b,[m])}}return o}function Ny(t,a,s){t=t.ownerDocument||t,t.head.insertBefore(s,a==="title"?t.querySelector("head > title"):null)}function fw(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 ky(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function pw(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),m=a.querySelector(Vr(u));if(m){a=m._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(t.count++,t=_l.bind(t),a.then(t,t)),s.state.loading|=4,s.instance=m,Ot(m);return}m=a.ownerDocument||a,o=xy(o),(u=jn.get(u))&&Qd(o,u),m=m.createElement("link"),Ot(m);var b=m;b._p=new Promise(function(j,C){b.onload=j,b.onerror=C}),$t(m,"link",o),s.instance=m}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(s,a),(a=s.state.preload)&&(s.state.loading&3)===0&&(t.count++,s=_l.bind(t),a.addEventListener("load",s),a.addEventListener("error",s))}}var Zd=0;function mw(t,a){return t.stylesheets&&t.count===0&&Tl(t,t.stylesheets),0<t.count||0<t.imgCount?function(s){var o=setTimeout(function(){if(t.stylesheets&&Tl(t,t.stylesheets),t.unsuspend){var m=t.unsuspend;t.unsuspend=null,m()}},6e4+a);0<t.imgBytes&&Zd===0&&(Zd=62500*Zx());var u=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&Tl(t,t.stylesheets),t.unsuspend)){var m=t.unsuspend;t.unsuspend=null,m()}},(t.imgBytes>Zd?50:800)+a);return t.unsuspend=s,function(){t.unsuspend=null,clearTimeout(o),clearTimeout(u)}}:null}function _l(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Tl(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Cl=null;function Tl(t,a){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Cl=new Map,a.forEach(hw,t),Cl=null,_l.call(t))}function hw(t,a){if(!(a.state.loading&4)){var s=Cl.get(t);if(s)var o=s.get(null);else{s=new Map,Cl.set(t,s);for(var u=t.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<u.length;m++){var b=u[m];(b.nodeName==="LINK"||b.getAttribute("media")!=="not all")&&(s.set(b.dataset.precedence,b),o=b)}o&&s.set(null,o)}u=a.instance,b=u.getAttribute("data-precedence"),m=s.get(b)||o,m===o&&s.set(null,u),s.set(b,u),this.count++,o=_l.bind(this),u.addEventListener("load",o),u.addEventListener("error",o),m?m.parentNode.insertBefore(u,m.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(u,t.firstChild)),a.state.loading|=4}}var Pr={$$typeof:P,Provider:null,Consumer:null,_currentValue:fe,_currentValue2:fe,_threadCount:0};function gw(t,a,s,o,u,m,b,j,C){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=Yn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Yn(0),this.hiddenUpdates=Yn(null),this.identifierPrefix=o,this.onUncaughtError=u,this.onCaughtError=m,this.onRecoverableError=b,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=C,this.incompleteTransitions=new Map}function Ay(t,a,s,o,u,m,b,j,C,L,G,Y){return t=new gw(t,a,s,b,C,L,G,Y,j),a=1,m===!0&&(a|=24),m=rn(3,null,null,a),t.current=m,m.stateNode=t,a=_u(),a.refCount++,t.pooledCache=a,a.refCount++,m.memoizedState={element:o,isDehydrated:s,cache:a},Ou(m),t}function _y(t){return t?(t=es,t):es}function Cy(t,a,s,o,u,m){u=_y(u),o.context===null?o.context=u:o.pendingContext=u,o=Ca(a),o.payload={element:s},m=m===void 0?null:m,m!==null&&(o.callback=m),s=Ta(t,o,a),s!==null&&(en(s,t,a),xr(s,t,a))}function Ty(t,a){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var s=t.retryLane;t.retryLane=s!==0&&s<a?s:a}}function Yd(t,a){Ty(t,a),(t=t.alternate)&&Ty(t,a)}function Ey(t){if(t.tag===13||t.tag===31){var a=ci(t,67108864);a!==null&&en(a,t,67108864),Yd(t,67108864)}}function Oy(t){if(t.tag===13||t.tag===31){var a=dn();a=Gc(a);var s=ci(t,a);s!==null&&en(s,t,a),Yd(t,a)}}var El=!0;function yw(t,a,s,o){var u=$.T;$.T=null;var m=W.p;try{W.p=2,Xd(t,a,s,o)}finally{W.p=m,$.T=u}}function bw(t,a,s,o){var u=$.T;$.T=null;var m=W.p;try{W.p=8,Xd(t,a,s,o)}finally{W.p=m,$.T=u}}function Xd(t,a,s,o){if(El){var u=Jd(o);if(u===null)Bd(t,a,o,Ol,s),Dy(t,o);else if(Sw(u,t,a,s,o))o.stopPropagation();else if(Dy(t,o),a&4&&-1<vw.indexOf(t)){for(;u!==null;){var m=Pi(u);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var b=Zn(m.pendingLanes);if(b!==0){var j=m;for(j.pendingLanes|=2,j.entangledLanes|=2;b;){var C=1<<31-_t(b);j.entanglements[1]|=C,b&=~C}Gn(m),(Pe&6)===0&&(pl=Vt()+500,Lr(0))}}break;case 31:case 13:j=ci(m,2),j!==null&&en(j,m,2),hl(),Yd(m,2)}if(m=Jd(o),m===null&&Bd(t,a,o,Ol,s),m===u)break;u=m}u!==null&&o.stopPropagation()}else Bd(t,a,o,null,s)}}function Jd(t){return t=Wc(t),Fd(t)}var Ol=null;function Fd(t){if(Ol=null,t=Ii(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=h(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 Ol=t,null}function zy(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(Uc()){case vo:return 2;case So:return 8;case va:case xo:return 32;case Li:return 268435456;default:return 32}default:return 32}}var Wd=!1,$a=null,Va=null,Ia=null,Gr=new Map,Hr=new Map,Pa=[],vw="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 Dy(t,a){switch(t){case"focusin":case"focusout":$a=null;break;case"dragenter":case"dragleave":Va=null;break;case"mouseover":case"mouseout":Ia=null;break;case"pointerover":case"pointerout":Gr.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":Hr.delete(a.pointerId)}}function Qr(t,a,s,o,u,m){return t===null||t.nativeEvent!==m?(t={blockedOn:a,domEventName:s,eventSystemFlags:o,nativeEvent:m,targetContainers:[u]},a!==null&&(a=Pi(a),a!==null&&Ey(a)),t):(t.eventSystemFlags|=o,a=t.targetContainers,u!==null&&a.indexOf(u)===-1&&a.push(u),t)}function Sw(t,a,s,o,u){switch(a){case"focusin":return $a=Qr($a,t,a,s,o,u),!0;case"dragenter":return Va=Qr(Va,t,a,s,o,u),!0;case"mouseover":return Ia=Qr(Ia,t,a,s,o,u),!0;case"pointerover":var m=u.pointerId;return Gr.set(m,Qr(Gr.get(m)||null,t,a,s,o,u)),!0;case"gotpointercapture":return m=u.pointerId,Hr.set(m,Qr(Hr.get(m)||null,t,a,s,o,u)),!0}return!1}function Ry(t){var a=Ii(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,Zp(t.priority,function(){Oy(s)});return}}else if(a===31){if(a=h(s),a!==null){t.blockedOn=a,Zp(t.priority,function(){Oy(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 zl(t){if(t.blockedOn!==null)return!1;for(var a=t.targetContainers;0<a.length;){var s=Jd(t.nativeEvent);if(s===null){s=t.nativeEvent;var o=new s.constructor(s.type,s);Fc=o,s.target.dispatchEvent(o),Fc=null}else return a=Pi(s),a!==null&&Ey(a),t.blockedOn=s,!1;a.shift()}return!0}function My(t,a,s){zl(t)&&s.delete(a)}function xw(){Wd=!1,$a!==null&&zl($a)&&($a=null),Va!==null&&zl(Va)&&(Va=null),Ia!==null&&zl(Ia)&&(Ia=null),Gr.forEach(My),Hr.forEach(My)}function Dl(t,a){t.blockedOn===a&&(t.blockedOn=null,Wd||(Wd=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,xw)))}var Rl=null;function By(t){Rl!==t&&(Rl=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Rl===t&&(Rl=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(Fd(o||s)===null)continue;break}var m=Pi(s);m!==null&&(t.splice(a,3),a-=3,Ju(m,{pending:!0,data:u,method:s.method,action:o},o,u))}}))}function Ns(t){function a(C){return Dl(C,t)}$a!==null&&Dl($a,t),Va!==null&&Dl(Va,t),Ia!==null&&Dl(Ia,t),Gr.forEach(a),Hr.forEach(a);for(var s=0;s<Pa.length;s++){var o=Pa[s];o.blockedOn===t&&(o.blockedOn=null)}for(;0<Pa.length&&(s=Pa[0],s.blockedOn===null);)Ry(s),s.blockedOn===null&&Pa.shift();if(s=(t.ownerDocument||t).$$reactFormReplay,s!=null)for(o=0;o<s.length;o+=3){var u=s[o],m=s[o+1],b=u[Zt]||null;if(typeof m=="function")b||By(s);else if(b){var j=null;if(m&&m.hasAttribute("formAction")){if(u=m,b=m[Zt]||null)j=b.formAction;else if(Fd(u)!==null)continue}else j=b.action;typeof j=="function"?s[o+1]=j:(s.splice(o,3),o-=3),By(s)}}}function Ly(){function t(m){m.canIntercept&&m.info==="react-transition"&&m.intercept({handler:function(){return new Promise(function(b){return u=b})},focusReset:"manual",scroll:"manual"})}function a(){u!==null&&(u(),u=null),o||setTimeout(s,20)}function s(){if(!o&&!navigation.transition){var m=navigation.currentEntry;m&&m.url!=null&&navigation.navigate(m.url,{state:m.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 ef(t){this._internalRoot=t}Ml.prototype.render=ef.prototype.render=function(t){var a=this._internalRoot;if(a===null)throw Error(r(409));var s=a.current,o=dn();Cy(s,o,t,a,null,null)},Ml.prototype.unmount=ef.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var a=t.containerInfo;Cy(t.current,2,null,t,null,null),hl(),a[Vi]=null}};function Ml(t){this._internalRoot=t}Ml.prototype.unstable_scheduleHydration=function(t){if(t){var a=Kp();t={blockedOn:null,target:t,priority:a};for(var s=0;s<Pa.length&&a!==0&&a<Pa[s].priority;s++);Pa.splice(s,0,t),s===0&&Ry(t)}};var qy=n.version;if(qy!=="19.2.4")throw Error(r(527,qy,"19.2.4"));W.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=v(a),t=t!==null?S(t):null,t=t===null?null:t.stateNode,t};var ww={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:$,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Bl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Bl.isDisabled&&Bl.supportsFiber)try{Sa=Bl.inject(ww),ht=Bl}catch{}}return Kr.createRoot=function(t,a){if(!l(t))throw Error(r(299));var s=!1,o="",u=Hh,m=Qh,b=Kh;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&&(m=a.onCaughtError),a.onRecoverableError!==void 0&&(b=a.onRecoverableError)),a=Ay(t,1,!1,null,null,s,o,null,u,m,b,Ly),t[Vi]=a.current,Md(t),new ef(a)},Kr.hydrateRoot=function(t,a,s){if(!l(t))throw Error(r(299));var o=!1,u="",m=Hh,b=Qh,j=Kh,C=null;return s!=null&&(s.unstable_strictMode===!0&&(o=!0),s.identifierPrefix!==void 0&&(u=s.identifierPrefix),s.onUncaughtError!==void 0&&(m=s.onUncaughtError),s.onCaughtError!==void 0&&(b=s.onCaughtError),s.onRecoverableError!==void 0&&(j=s.onRecoverableError),s.formState!==void 0&&(C=s.formState)),a=Ay(t,1,!0,a,s??null,o,u,C,m,b,j,Ly),a.context=_y(null),s=a.current,o=dn(),o=Gc(o),u=Ca(o),u.callback=null,Ta(s,u,o),s=o,a.current.lanes=s,ii(a,s),Gn(a),t[Vi]=a.current,Md(t),new Ml(a)},Kr.version="19.2.4",Kr}var Iy;function Vw(){if(Iy)return tf.exports;Iy=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(),tf.exports=$w(),tf.exports}var Iw=Vw();const Pw={bodySerializer:e=>JSON.stringify(e,(n,i)=>typeof i=="bigint"?i.toString():i)},Gw=({onRequest:e,onSseError:n,onSseEvent:i,responseTransformer:r,responseValidator:l,sseDefaultRetryDelay:c,sseMaxRetryAttempts:d,sseMaxRetryDelay:h,sseSleepFn:g,url:v,...S})=>{let x;const N=g??(k=>new Promise(O=>setTimeout(O,k)));return{stream:async function*(){let k=c??3e3,O=0;const R=S.signal??new AbortController().signal;for(;!R.aborted;){O++;const I=S.headers instanceof Headers?S.headers:new Headers(S.headers);x!==void 0&&I.set("Last-Event-ID",x);try{const P={redirect:"follow",...S,body:S.serializedBody,headers:I,signal:R};let Z=new Request(v,P);e&&(Z=await e(v,P));const F=await(S.fetch??globalThis.fetch)(Z);if(!F.ok)throw new Error(`SSE failed: ${F.status} ${F.statusText}`);if(!F.body)throw new Error("No body in SSE response");const z=F.body.pipeThrough(new TextDecoderStream).getReader();let M="";const oe=()=>{try{z.cancel()}catch{}};R.addEventListener("abort",oe);try{for(;;){const{done:ke,value:ze}=await z.read();if(ke)break;M+=ze;const Se=M.split(`
|
|
9
|
+
`+o.stack}}var Mi=Object.prototype.hasOwnProperty,Bi=e.unstable_scheduleCallback,nr=e.unstable_cancelCallback,yo=e.unstable_shouldYield,bo=e.unstable_requestPaint,Vt=e.unstable_now,Uc=e.unstable_getCurrentPriorityLevel,vo=e.unstable_ImmediatePriority,So=e.unstable_UserBlockingPriority,va=e.unstable_NormalPriority,xo=e.unstable_LowPriority,Li=e.unstable_IdlePriority,wo=e.log,jo=e.unstable_setDisableYieldValue,Sa=null,ht=null;function Mt(t){if(typeof wo=="function"&&jo(t),ht&&typeof ht.setStrictMode=="function")try{ht.setStrictMode(Sa,t)}catch{}}var _t=Math.clz32?Math.clz32:Ic,$c=Math.log,Vc=Math.LN2;function Ic(t){return t>>>=0,t===0?32:31-($c(t)/Vc|0)|0}var qi=256,Ui=262144,$i=4194304;function Zn(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 pn(t,a,s){var o=t.pendingLanes;if(o===0)return 0;var u=0,m=t.suspendedLanes,b=t.pingedLanes;t=t.warmLanes;var j=o&134217727;return j!==0?(o=j&~m,o!==0?u=Zn(o):(b&=j,b!==0?u=Zn(b):s||(s=j&~t,s!==0&&(u=Zn(s))))):(j=o&~m,j!==0?u=Zn(j):b!==0?u=Zn(b):s||(s=o&~t,s!==0&&(u=Zn(s)))),u===0?0:a!==0&&a!==u&&(a&m)===0&&(m=u&-u,s=a&-a,m>=s||m===32&&(s&4194048)!==0)?a:u}function ai(t,a){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&a)===0}function ie(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 ot(){var t=$i;return $i<<=1,($i&62914560)===0&&($i=4194304),t}function Yn(t){for(var a=[],s=0;31>s;s++)a.push(t);return a}function ii(t,a){t.pendingLanes|=a,a!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Pc(t,a,s,o,u,m){var b=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 j=t.entanglements,C=t.expirationTimes,L=t.hiddenUpdates;for(s=b&~s;0<s;){var G=31-_t(s),Y=1<<G;j[G]=0,C[G]=-1;var U=L[G];if(U!==null)for(L[G]=null,G=0;G<U.length;G++){var V=U[G];V!==null&&(V.lane&=-536870913)}s&=~Y}o!==0&&ar(t,o,0),m!==0&&u===0&&t.tag!==0&&(t.suspendedLanes|=m&~(b&~a))}function ar(t,a,s){t.pendingLanes|=a,t.suspendedLanes&=~a;var o=31-_t(a);t.entangledLanes|=a,t.entanglements[o]=t.entanglements[o]|1073741824|s&261930}function No(t,a){var s=t.entangledLanes|=a;for(t=t.entanglements;s;){var o=31-_t(s),u=1<<o;u&a|t[o]&a&&(t[o]|=a),s&=~u}}function $n(t,a){var s=a&-a;return s=(s&42)!==0?1:Gc(s),(s&(t.suspendedLanes|a))!==0?0:s}function Gc(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 Hc(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Kp(){var t=W.p;return t!==0?t:(t=window.event,t===void 0?32:zy(t.type))}function Zp(t,a){var s=W.p;try{return W.p=t,a()}finally{W.p=s}}var xa=Math.random().toString(36).slice(2),Bt="__reactFiber$"+xa,Zt="__reactProps$"+xa,Vi="__reactContainer$"+xa,Qc="__reactEvents$"+xa,g1="__reactListeners$"+xa,y1="__reactHandles$"+xa,Yp="__reactResources$"+xa,ir="__reactMarker$"+xa;function Kc(t){delete t[Bt],delete t[Zt],delete t[Qc],delete t[g1],delete t[y1]}function Ii(t){var a=t[Bt];if(a)return a;for(var s=t.parentNode;s;){if(a=s[Vi]||s[Bt]){if(s=a.alternate,a.child!==null||s!==null&&s.child!==null)for(t=gy(t);t!==null;){if(s=t[Bt])return s;t=gy(t)}return a}t=s,s=t.parentNode}return null}function Pi(t){if(t=t[Bt]||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 Gi(t){var a=t[Yp];return a||(a=t[Yp]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function Ot(t){t[ir]=!0}var Xp=new Set,Fp={};function si(t,a){Hi(t,a),Hi(t+"Capture",a)}function Hi(t,a){for(Fp[t]=a,t=0;t<a.length;t++)Xp.add(a[t])}var b1=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]*$"),Jp={},Wp={};function v1(t){return Mi.call(Wp,t)?!0:Mi.call(Jp,t)?!1:b1.test(t)?Wp[t]=!0:(Jp[t]=!0,!1)}function ko(t,a,s){if(v1(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 Ao(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 Xn(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 mn(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function em(t){var a=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function S1(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,m=o.set;return Object.defineProperty(t,a,{configurable:!0,get:function(){return u.call(this)},set:function(b){s=""+b,m.call(this,b)}}),Object.defineProperty(t,a,{enumerable:o.enumerable}),{getValue:function(){return s},setValue:function(b){s=""+b},stopTracking:function(){t._valueTracker=null,delete t[a]}}}}function Zc(t){if(!t._valueTracker){var a=em(t)?"checked":"value";t._valueTracker=S1(t,a,""+t[a])}}function tm(t){if(!t)return!1;var a=t._valueTracker;if(!a)return!0;var s=a.getValue(),o="";return t&&(o=em(t)?t.checked?"true":"false":t.value),t=o,t!==s?(a.setValue(t),!0):!1}function _o(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 hn(t){return t.replace(x1,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function Yc(t,a,s,o,u,m,b,j){t.name="",b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?t.type=b:t.removeAttribute("type"),a!=null?b==="number"?(a===0&&t.value===""||t.value!=a)&&(t.value=""+mn(a)):t.value!==""+mn(a)&&(t.value=""+mn(a)):b!=="submit"&&b!=="reset"||t.removeAttribute("value"),a!=null?Xc(t,b,mn(a)):s!=null?Xc(t,b,mn(s)):o!=null&&t.removeAttribute("value"),u==null&&m!=null&&(t.defaultChecked=!!m),u!=null&&(t.checked=u&&typeof u!="function"&&typeof u!="symbol"),j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"?t.name=""+mn(j):t.removeAttribute("name")}function nm(t,a,s,o,u,m,b,j){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(t.type=m),a!=null||s!=null){if(!(m!=="submit"&&m!=="reset"||a!=null)){Zc(t);return}s=s!=null?""+mn(s):"",a=a!=null?""+mn(a):s,j||a===t.value||(t.value=a),t.defaultValue=a}o=o??u,o=typeof o!="function"&&typeof o!="symbol"&&!!o,t.checked=j?t.checked:!!o,t.defaultChecked=!!o,b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(t.name=b),Zc(t)}function Xc(t,a,s){a==="number"&&_o(t.ownerDocument)===t||t.defaultValue===""+s||(t.defaultValue=""+s)}function Qi(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=""+mn(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 am(t,a,s){if(a!=null&&(a=""+mn(a),a!==t.value&&(t.value=a),s==null)){t.defaultValue!==a&&(t.defaultValue=a);return}t.defaultValue=s!=null?""+mn(s):""}function im(t,a,s,o){if(a==null){if(o!=null){if(s!=null)throw Error(r(92));if(fe(o)){if(1<o.length)throw Error(r(93));o=o[0]}s=o}s==null&&(s=""),a=s}s=mn(a),t.defaultValue=s,o=t.textContent,o===s&&o!==""&&o!==null&&(t.value=o),Zc(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 w1=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 sm(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||w1.has(a)?a==="float"?t.cssFloat=s:t[a]=(""+s).trim():t[a]=s+"px"}function rm(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&&sm(t,u,o)}else for(var m in a)a.hasOwnProperty(m)&&sm(t,m,a[m])}function Fc(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 j1=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"]]),N1=/^[\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 Co(t){return N1.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Fn(){}var Jc=null;function Wc(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Zi=null,Yi=null;function om(t){var a=Pi(t);if(a&&(t=a.stateNode)){var s=t[Zt]||null;e:switch(t=a.stateNode,a.type){case"input":if(Yc(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="'+hn(""+a)+'"][type="radio"]'),a=0;a<s.length;a++){var o=s[a];if(o!==t&&o.form===t.form){var u=o[Zt]||null;if(!u)throw Error(r(90));Yc(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&&tm(o)}break e;case"textarea":am(t,s.value,s.defaultValue);break e;case"select":a=s.value,a!=null&&Qi(t,!!s.multiple,a,!1)}}}var eu=!1;function lm(t,a,s){if(eu)return t(a,s);eu=!0;try{var o=t(a);return o}finally{if(eu=!1,(Zi!==null||Yi!==null)&&(hl(),Zi&&(a=Zi,t=Yi,Yi=Zi=null,om(a),t)))for(a=0;a<t.length;a++)om(t[a])}}function rr(t,a){var s=t.stateNode;if(s===null)return null;var o=s[Zt]||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 Jn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),tu=!1;if(Jn)try{var or={};Object.defineProperty(or,"passive",{get:function(){tu=!0}}),window.addEventListener("test",or,or),window.removeEventListener("test",or,or)}catch{tu=!1}var wa=null,nu=null,To=null;function cm(){if(To)return To;var t,a=nu,s=a.length,o,u="value"in wa?wa.value:wa.textContent,m=u.length;for(t=0;t<s&&a[t]===u[t];t++);var b=s-t;for(o=1;o<=b&&a[s-o]===u[m-o];o++);return To=u.slice(t,1<o?1-o:void 0)}function Eo(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 Oo(){return!0}function um(){return!1}function Yt(t){function a(s,o,u,m,b){this._reactName=s,this._targetInst=u,this.type=o,this.nativeEvent=m,this.target=b,this.currentTarget=null;for(var j in t)t.hasOwnProperty(j)&&(s=t[j],this[j]=s?s(m):m[j]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?Oo:um,this.isPropagationStopped=um,this}return x(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=Oo)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=Oo)},persist:function(){},isPersistent:Oo}),a}var ri={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},zo=Yt(ri),lr=x({},ri,{view:0,detail:0}),k1=Yt(lr),au,iu,cr,Do=x({},lr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ru,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"?(au=t.screenX-cr.screenX,iu=t.screenY-cr.screenY):iu=au=0,cr=t),au)},movementY:function(t){return"movementY"in t?t.movementY:iu}}),dm=Yt(Do),A1=x({},Do,{dataTransfer:0}),_1=Yt(A1),C1=x({},lr,{relatedTarget:0}),su=Yt(C1),T1=x({},ri,{animationName:0,elapsedTime:0,pseudoElement:0}),E1=Yt(T1),O1=x({},ri,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),z1=Yt(O1),D1=x({},ri,{data:0}),fm=Yt(D1),R1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},M1={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"},B1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function L1(t){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(t):(t=B1[t])?!!a[t]:!1}function ru(){return L1}var q1=x({},lr,{key:function(t){if(t.key){var a=R1[t.key]||t.key;if(a!=="Unidentified")return a}return t.type==="keypress"?(t=Eo(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?M1[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ru,charCode:function(t){return t.type==="keypress"?Eo(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Eo(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),U1=Yt(q1),$1=x({},Do,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),pm=Yt($1),V1=x({},lr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ru}),I1=Yt(V1),P1=x({},ri,{propertyName:0,elapsedTime:0,pseudoElement:0}),G1=Yt(P1),H1=x({},Do,{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}),Q1=Yt(H1),K1=x({},ri,{newState:0,oldState:0}),Z1=Yt(K1),Y1=[9,13,27,32],ou=Jn&&"CompositionEvent"in window,ur=null;Jn&&"documentMode"in document&&(ur=document.documentMode);var X1=Jn&&"TextEvent"in window&&!ur,mm=Jn&&(!ou||ur&&8<ur&&11>=ur),hm=" ",gm=!1;function ym(t,a){switch(t){case"keyup":return Y1.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function bm(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Xi=!1;function F1(t,a){switch(t){case"compositionend":return bm(a);case"keypress":return a.which!==32?null:(gm=!0,hm);case"textInput":return t=a.data,t===hm&&gm?null:t;default:return null}}function J1(t,a){if(Xi)return t==="compositionend"||!ou&&ym(t,a)?(t=cm(),To=nu=wa=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 mm&&a.locale!=="ko"?null:a.data;default:return null}}var W1={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 vm(t){var a=t&&t.nodeName&&t.nodeName.toLowerCase();return a==="input"?!!W1[t.type]:a==="textarea"}function Sm(t,a,s,o){Zi?Yi?Yi.push(o):Yi=[o]:Zi=o,a=wl(a,"onChange"),0<a.length&&(s=new zo("onChange","change",null,s,o),t.push({event:s,listeners:a}))}var dr=null,fr=null;function ex(t){ny(t,0)}function Ro(t){var a=sr(t);if(tm(a))return t}function xm(t,a){if(t==="change")return a}var wm=!1;if(Jn){var lu;if(Jn){var cu="oninput"in document;if(!cu){var jm=document.createElement("div");jm.setAttribute("oninput","return;"),cu=typeof jm.oninput=="function"}lu=cu}else lu=!1;wm=lu&&(!document.documentMode||9<document.documentMode)}function Nm(){dr&&(dr.detachEvent("onpropertychange",km),fr=dr=null)}function km(t){if(t.propertyName==="value"&&Ro(fr)){var a=[];Sm(a,fr,t,Wc(t)),lm(ex,a)}}function tx(t,a,s){t==="focusin"?(Nm(),dr=a,fr=s,dr.attachEvent("onpropertychange",km)):t==="focusout"&&Nm()}function nx(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Ro(fr)}function ax(t,a){if(t==="click")return Ro(a)}function ix(t,a){if(t==="input"||t==="change")return Ro(a)}function sx(t,a){return t===a&&(t!==0||1/t===1/a)||t!==t&&a!==a}var sn=typeof Object.is=="function"?Object.is:sx;function pr(t,a){if(sn(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(!Mi.call(a,u)||!sn(t[u],a[u]))return!1}return!0}function Am(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function _m(t,a){var s=Am(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=Am(s)}}function Cm(t,a){return t&&a?t===a?!0:t&&t.nodeType===3?!1:a&&a.nodeType===3?Cm(t,a.parentNode):"contains"in t?t.contains(a):t.compareDocumentPosition?!!(t.compareDocumentPosition(a)&16):!1:!1}function Tm(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var a=_o(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=_o(t.document)}return a}function uu(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 rx=Jn&&"documentMode"in document&&11>=document.documentMode,Fi=null,du=null,mr=null,fu=!1;function Em(t,a,s){var o=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;fu||Fi==null||Fi!==_o(o)||(o=Fi,"selectionStart"in o&&uu(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=wl(du,"onSelect"),0<o.length&&(a=new zo("onSelect","select",null,a,s),t.push({event:a,listeners:o}),a.target=Fi)))}function oi(t,a){var s={};return s[t.toLowerCase()]=a.toLowerCase(),s["Webkit"+t]="webkit"+a,s["Moz"+t]="moz"+a,s}var Ji={animationend:oi("Animation","AnimationEnd"),animationiteration:oi("Animation","AnimationIteration"),animationstart:oi("Animation","AnimationStart"),transitionrun:oi("Transition","TransitionRun"),transitionstart:oi("Transition","TransitionStart"),transitioncancel:oi("Transition","TransitionCancel"),transitionend:oi("Transition","TransitionEnd")},pu={},Om={};Jn&&(Om=document.createElement("div").style,"AnimationEvent"in window||(delete Ji.animationend.animation,delete Ji.animationiteration.animation,delete Ji.animationstart.animation),"TransitionEvent"in window||delete Ji.transitionend.transition);function li(t){if(pu[t])return pu[t];if(!Ji[t])return t;var a=Ji[t],s;for(s in a)if(a.hasOwnProperty(s)&&s in Om)return pu[t]=a[s];return t}var zm=li("animationend"),Dm=li("animationiteration"),Rm=li("animationstart"),ox=li("transitionrun"),lx=li("transitionstart"),cx=li("transitioncancel"),Mm=li("transitionend"),Bm=new Map,mu="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(" ");mu.push("scrollEnd");function On(t,a){Bm.set(t,a),si(a,[t])}var Mo=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)},gn=[],Wi=0,hu=0;function Bo(){for(var t=Wi,a=hu=Wi=0;a<t;){var s=gn[a];gn[a++]=null;var o=gn[a];gn[a++]=null;var u=gn[a];gn[a++]=null;var m=gn[a];if(gn[a++]=null,o!==null&&u!==null){var b=o.pending;b===null?u.next=u:(u.next=b.next,b.next=u),o.pending=u}m!==0&&Lm(s,u,m)}}function Lo(t,a,s,o){gn[Wi++]=t,gn[Wi++]=a,gn[Wi++]=s,gn[Wi++]=o,hu|=o,t.lanes|=o,t=t.alternate,t!==null&&(t.lanes|=o)}function gu(t,a,s,o){return Lo(t,a,s,o),qo(t)}function ci(t,a){return Lo(t,null,null,a),qo(t)}function Lm(t,a,s){t.lanes|=s;var o=t.alternate;o!==null&&(o.lanes|=s);for(var u=!1,m=t.return;m!==null;)m.childLanes|=s,o=m.alternate,o!==null&&(o.childLanes|=s),m.tag===22&&(t=m.stateNode,t===null||t._visibility&1||(u=!0)),t=m,m=m.return;return t.tag===3?(m=t.stateNode,u&&a!==null&&(u=31-_t(s),t=m.hiddenUpdates,o=t[u],o===null?t[u]=[a]:o.push(a),a.lane=s|536870912),m):null}function qo(t){if(50<Br)throw Br=0,kd=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 ux(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 rn(t,a,s,o){return new ux(t,a,s,o)}function yu(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Wn(t,a){var s=t.alternate;return s===null?(s=rn(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 qm(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 Uo(t,a,s,o,u,m){var b=0;if(o=t,typeof t=="function")yu(t)&&(b=1);else if(typeof t=="string")b=hw(t,s,ee.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case oe:return t=rn(31,s,a,u),t.elementType=oe,t.lanes=m,t;case k:return ui(s.children,u,m,a);case O:b=8,u|=24;break;case R:return t=rn(12,s,a,u|2),t.elementType=R,t.lanes=m,t;case X:return t=rn(13,s,a,u),t.elementType=X,t.lanes=m,t;case J:return t=rn(19,s,a,u),t.elementType=J,t.lanes=m,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case P:b=10;break e;case I:b=9;break e;case Z:b=11;break e;case z:b=14;break e;case M:b=16,o=null;break e}b=29,s=Error(r(130,t===null?"null":typeof t,"")),o=null}return a=rn(b,s,a,u),a.elementType=t,a.type=o,a.lanes=m,a}function ui(t,a,s,o){return t=rn(7,t,o,a),t.lanes=s,t}function bu(t,a,s){return t=rn(6,t,null,a),t.lanes=s,t}function Um(t){var a=rn(18,null,null,0);return a.stateNode=t,a}function vu(t,a,s){return a=rn(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 yn(t,a){if(typeof t=="object"&&t!==null){var s=$m.get(t);return s!==void 0?s:(a={value:t,source:a,stack:tr(a)},$m.set(t,a),a)}return{value:t,source:a,stack:tr(a)}}var ts=[],ns=0,$o=null,hr=0,bn=[],vn=0,ja=null,Vn=1,In="";function ea(t,a){ts[ns++]=hr,ts[ns++]=$o,$o=t,hr=a}function Vm(t,a,s){bn[vn++]=Vn,bn[vn++]=In,bn[vn++]=ja,ja=t;var o=Vn;t=In;var u=32-_t(o)-1;o&=~(1<<u),s+=1;var m=32-_t(a)+u;if(30<m){var b=u-u%5;m=(o&(1<<b)-1).toString(32),o>>=b,u-=b,Vn=1<<32-_t(a)+u|s<<u|o,In=m+t}else Vn=1<<m|s<<u|o,In=t}function Su(t){t.return!==null&&(ea(t,1),Vm(t,1,0))}function xu(t){for(;t===$o;)$o=ts[--ns],ts[ns]=null,hr=ts[--ns],ts[ns]=null;for(;t===ja;)ja=bn[--vn],bn[vn]=null,In=bn[--vn],bn[vn]=null,Vn=bn[--vn],bn[vn]=null}function Im(t,a){bn[vn++]=Vn,bn[vn++]=In,bn[vn++]=ja,Vn=a.id,In=a.overflow,ja=t}var Lt=null,at=null,qe=!1,Na=null,Sn=!1,wu=Error(r(519));function ka(t){var a=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw gr(yn(a,t)),wu}function Pm(t){var a=t.stateNode,s=t.type,o=t.memoizedProps;switch(a[Bt]=t,a[Zt]=o,s){case"dialog":Me("cancel",a),Me("close",a);break;case"iframe":case"object":case"embed":Me("load",a);break;case"video":case"audio":for(s=0;s<qr.length;s++)Me(qr[s],a);break;case"source":Me("error",a);break;case"img":case"image":case"link":Me("error",a),Me("load",a);break;case"details":Me("toggle",a);break;case"input":Me("invalid",a),nm(a,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":Me("invalid",a);break;case"textarea":Me("invalid",a),im(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||ry(a.textContent,s)?(o.popover!=null&&(Me("beforetoggle",a),Me("toggle",a)),o.onScroll!=null&&Me("scroll",a),o.onScrollEnd!=null&&Me("scrollend",a),o.onClick!=null&&(a.onclick=Fn),a=!0):a=!1,a||ka(t,!0)}function Gm(t){for(Lt=t.return;Lt;)switch(Lt.tag){case 5:case 31:case 13:Sn=!1;return;case 27:case 3:Sn=!0;return;default:Lt=Lt.return}}function as(t){if(t!==Lt)return!1;if(!qe)return Gm(t),qe=!0,!1;var a=t.tag,s;if((s=a!==3&&a!==27)&&((s=a===5)&&(s=t.type,s=!(s!=="form"&&s!=="button")||$d(t.type,t.memoizedProps)),s=!s),s&&at&&ka(t),Gm(t),a===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));at=hy(t)}else if(a===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));at=hy(t)}else a===27?(a=at,Ua(t.type)?(t=Hd,Hd=null,at=t):at=a):at=Lt?wn(t.stateNode.nextSibling):null;return!0}function di(){at=Lt=null,qe=!1}function ju(){var t=Na;return t!==null&&(Wt===null?Wt=t:Wt.push.apply(Wt,t),Na=null),t}function gr(t){Na===null?Na=[t]:Na.push(t)}var Nu=Ye(null),fi=null,ta=null;function Aa(t,a,s){ue(Nu,a._currentValue),a._currentValue=s}function na(t){t._currentValue=Nu.current,F(Nu)}function ku(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 Au(t,a,s,o){var u=t.child;for(u!==null&&(u.return=t);u!==null;){var m=u.dependencies;if(m!==null){var b=u.child;m=m.firstContext;e:for(;m!==null;){var j=m;m=u;for(var C=0;C<a.length;C++)if(j.context===a[C]){m.lanes|=s,j=m.alternate,j!==null&&(j.lanes|=s),ku(m.return,s,t),o||(b=null);break e}m=j.next}}else if(u.tag===18){if(b=u.return,b===null)throw Error(r(341));b.lanes|=s,m=b.alternate,m!==null&&(m.lanes|=s),ku(b,s,t),b=null}else b=u.child;if(b!==null)b.return=u;else for(b=u;b!==null;){if(b===t){b=null;break}if(u=b.sibling,u!==null){u.return=b.return,b=u;break}b=b.return}u=b}}function is(t,a,s,o){t=null;for(var u=a,m=!1;u!==null;){if(!m){if((u.flags&524288)!==0)m=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var b=u.alternate;if(b===null)throw Error(r(387));if(b=b.memoizedProps,b!==null){var j=u.type;sn(u.pendingProps.value,b.value)||(t!==null?t.push(j):t=[j])}}else if(u===Ne.current){if(b=u.alternate,b===null)throw Error(r(387));b.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(t!==null?t.push(Pr):t=[Pr])}u=u.return}t!==null&&Au(a,t,s,o),a.flags|=262144}function Vo(t){for(t=t.firstContext;t!==null;){if(!sn(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function pi(t){fi=t,ta=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function qt(t){return Hm(fi,t)}function Io(t,a){return fi===null&&pi(t),Hm(t,a)}function Hm(t,a){var s=a._currentValue;if(a={context:a,memoizedValue:s,next:null},ta===null){if(t===null)throw Error(r(308));ta=a,t.dependencies={lanes:0,firstContext:a},t.flags|=524288}else ta=ta.next=a;return s}var dx=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()})}},fx=e.unstable_scheduleCallback,px=e.unstable_NormalPriority,wt={$$typeof:P,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function _u(){return{controller:new dx,data:new Map,refCount:0}}function yr(t){t.refCount--,t.refCount===0&&fx(px,function(){t.controller.abort()})}var br=null,Cu=0,ss=0,rs=null;function mx(t,a){if(br===null){var s=br=[];Cu=0,ss=Od(),rs={status:"pending",value:void 0,then:function(o){s.push(o)}}}return Cu++,a.then(Qm,Qm),a}function Qm(){if(--Cu===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 hx(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 Km=$.S;$.S=function(t,a){Eg=Vt(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&mx(t,a),Km!==null&&Km(t,a)};var mi=Ye(null);function Tu(){var t=mi.current;return t!==null?t:We.pooledCache}function Po(t,a){a===null?ue(mi,mi.current):ue(mi,a.pool)}function Zm(){var t=Tu();return t===null?null:{parent:wt._currentValue,pool:t}}var os=Error(r(460)),Eu=Error(r(474)),Go=Error(r(542)),Ho={then:function(){}};function Ym(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Xm(t,a,s){switch(s=t[s],s===void 0?t.push(a):s!==a&&(a.then(Fn,Fn),a=s),a.status){case"fulfilled":return a.value;case"rejected":throw t=a.reason,Jm(t),t;default:if(typeof a.status=="string")a.then(Fn,Fn);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,Jm(t),t}throw gi=a,os}}function hi(t){try{var a=t._init;return a(t._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(gi=s,os):s}}var gi=null;function Fm(){if(gi===null)throw Error(r(459));var t=gi;return gi=null,t}function Jm(t){if(t===os||t===Go)throw Error(r(483))}var ls=null,vr=0;function Qo(t){var a=vr;return vr+=1,ls===null&&(ls=[]),Xm(ls,t,a)}function Sr(t,a){a=a.props.ref,t.ref=a!==void 0?a:null}function Ko(t,a){throw a.$$typeof===N?Error(r(525)):(t=Object.prototype.toString.call(a),Error(r(31,t==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":t)))}function Wm(t){function a(D,E){if(t){var B=D.deletions;B===null?(D.deletions=[E],D.flags|=16):B.push(E)}}function s(D,E){if(!t)return null;for(;E!==null;)a(D,E),E=E.sibling;return null}function o(D){for(var E=new Map;D!==null;)D.key!==null?E.set(D.key,D):E.set(D.index,D),D=D.sibling;return E}function u(D,E){return D=Wn(D,E),D.index=0,D.sibling=null,D}function m(D,E,B){return D.index=B,t?(B=D.alternate,B!==null?(B=B.index,B<E?(D.flags|=67108866,E):B):(D.flags|=67108866,E)):(D.flags|=1048576,E)}function b(D){return t&&D.alternate===null&&(D.flags|=67108866),D}function j(D,E,B,K){return E===null||E.tag!==6?(E=bu(B,D.mode,K),E.return=D,E):(E=u(E,B),E.return=D,E)}function C(D,E,B,K){var ve=B.type;return ve===k?G(D,E,B.props.children,K,B.key):E!==null&&(E.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===M&&hi(ve)===E.type)?(E=u(E,B.props),Sr(E,B),E.return=D,E):(E=Uo(B.type,B.key,B.props,null,D.mode,K),Sr(E,B),E.return=D,E)}function L(D,E,B,K){return E===null||E.tag!==4||E.stateNode.containerInfo!==B.containerInfo||E.stateNode.implementation!==B.implementation?(E=vu(B,D.mode,K),E.return=D,E):(E=u(E,B.children||[]),E.return=D,E)}function G(D,E,B,K,ve){return E===null||E.tag!==7?(E=ui(B,D.mode,K,ve),E.return=D,E):(E=u(E,B),E.return=D,E)}function Y(D,E,B){if(typeof E=="string"&&E!==""||typeof E=="number"||typeof E=="bigint")return E=bu(""+E,D.mode,B),E.return=D,E;if(typeof E=="object"&&E!==null){switch(E.$$typeof){case _:return B=Uo(E.type,E.key,E.props,null,D.mode,B),Sr(B,E),B.return=D,B;case T:return E=vu(E,D.mode,B),E.return=D,E;case M:return E=hi(E),Y(D,E,B)}if(fe(E)||Se(E))return E=ui(E,D.mode,B,null),E.return=D,E;if(typeof E.then=="function")return Y(D,Qo(E),B);if(E.$$typeof===P)return Y(D,Io(D,E),B);Ko(D,E)}return null}function U(D,E,B,K){var ve=E!==null?E.key:null;if(typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint")return ve!==null?null:j(D,E,""+B,K);if(typeof B=="object"&&B!==null){switch(B.$$typeof){case _:return B.key===ve?C(D,E,B,K):null;case T:return B.key===ve?L(D,E,B,K):null;case M:return B=hi(B),U(D,E,B,K)}if(fe(B)||Se(B))return ve!==null?null:G(D,E,B,K,null);if(typeof B.then=="function")return U(D,E,Qo(B),K);if(B.$$typeof===P)return U(D,E,Io(D,B),K);Ko(D,B)}return null}function V(D,E,B,K,ve){if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return D=D.get(B)||null,j(E,D,""+K,ve);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case _:return D=D.get(K.key===null?B:K.key)||null,C(E,D,K,ve);case T:return D=D.get(K.key===null?B:K.key)||null,L(E,D,K,ve);case M:return K=hi(K),V(D,E,B,K,ve)}if(fe(K)||Se(K))return D=D.get(B)||null,G(E,D,K,ve,null);if(typeof K.then=="function")return V(D,E,B,Qo(K),ve);if(K.$$typeof===P)return V(D,E,B,Io(E,K),ve);Ko(E,K)}return null}function me(D,E,B,K){for(var ve=null,Ie=null,ye=E,Oe=E=0,Le=null;ye!==null&&Oe<B.length;Oe++){ye.index>Oe?(Le=ye,ye=null):Le=ye.sibling;var Pe=U(D,ye,B[Oe],K);if(Pe===null){ye===null&&(ye=Le);break}t&&ye&&Pe.alternate===null&&a(D,ye),E=m(Pe,E,Oe),Ie===null?ve=Pe:Ie.sibling=Pe,Ie=Pe,ye=Le}if(Oe===B.length)return s(D,ye),qe&&ea(D,Oe),ve;if(ye===null){for(;Oe<B.length;Oe++)ye=Y(D,B[Oe],K),ye!==null&&(E=m(ye,E,Oe),Ie===null?ve=ye:Ie.sibling=ye,Ie=ye);return qe&&ea(D,Oe),ve}for(ye=o(ye);Oe<B.length;Oe++)Le=V(ye,D,Oe,B[Oe],K),Le!==null&&(t&&Le.alternate!==null&&ye.delete(Le.key===null?Oe:Le.key),E=m(Le,E,Oe),Ie===null?ve=Le:Ie.sibling=Le,Ie=Le);return t&&ye.forEach(function(Ga){return a(D,Ga)}),qe&&ea(D,Oe),ve}function we(D,E,B,K){if(B==null)throw Error(r(151));for(var ve=null,Ie=null,ye=E,Oe=E=0,Le=null,Pe=B.next();ye!==null&&!Pe.done;Oe++,Pe=B.next()){ye.index>Oe?(Le=ye,ye=null):Le=ye.sibling;var Ga=U(D,ye,Pe.value,K);if(Ga===null){ye===null&&(ye=Le);break}t&&ye&&Ga.alternate===null&&a(D,ye),E=m(Ga,E,Oe),Ie===null?ve=Ga:Ie.sibling=Ga,Ie=Ga,ye=Le}if(Pe.done)return s(D,ye),qe&&ea(D,Oe),ve;if(ye===null){for(;!Pe.done;Oe++,Pe=B.next())Pe=Y(D,Pe.value,K),Pe!==null&&(E=m(Pe,E,Oe),Ie===null?ve=Pe:Ie.sibling=Pe,Ie=Pe);return qe&&ea(D,Oe),ve}for(ye=o(ye);!Pe.done;Oe++,Pe=B.next())Pe=V(ye,D,Oe,Pe.value,K),Pe!==null&&(t&&Pe.alternate!==null&&ye.delete(Pe.key===null?Oe:Pe.key),E=m(Pe,E,Oe),Ie===null?ve=Pe:Ie.sibling=Pe,Ie=Pe);return t&&ye.forEach(function(Aw){return a(D,Aw)}),qe&&ea(D,Oe),ve}function Je(D,E,B,K){if(typeof B=="object"&&B!==null&&B.type===k&&B.key===null&&(B=B.props.children),typeof B=="object"&&B!==null){switch(B.$$typeof){case _:e:{for(var ve=B.key;E!==null;){if(E.key===ve){if(ve=B.type,ve===k){if(E.tag===7){s(D,E.sibling),K=u(E,B.props.children),K.return=D,D=K;break e}}else if(E.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===M&&hi(ve)===E.type){s(D,E.sibling),K=u(E,B.props),Sr(K,B),K.return=D,D=K;break e}s(D,E);break}else a(D,E);E=E.sibling}B.type===k?(K=ui(B.props.children,D.mode,K,B.key),K.return=D,D=K):(K=Uo(B.type,B.key,B.props,null,D.mode,K),Sr(K,B),K.return=D,D=K)}return b(D);case T:e:{for(ve=B.key;E!==null;){if(E.key===ve)if(E.tag===4&&E.stateNode.containerInfo===B.containerInfo&&E.stateNode.implementation===B.implementation){s(D,E.sibling),K=u(E,B.children||[]),K.return=D,D=K;break e}else{s(D,E);break}else a(D,E);E=E.sibling}K=vu(B,D.mode,K),K.return=D,D=K}return b(D);case M:return B=hi(B),Je(D,E,B,K)}if(fe(B))return me(D,E,B,K);if(Se(B)){if(ve=Se(B),typeof ve!="function")throw Error(r(150));return B=ve.call(B),we(D,E,B,K)}if(typeof B.then=="function")return Je(D,E,Qo(B),K);if(B.$$typeof===P)return Je(D,E,Io(D,B),K);Ko(D,B)}return typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint"?(B=""+B,E!==null&&E.tag===6?(s(D,E.sibling),K=u(E,B),K.return=D,D=K):(s(D,E),K=bu(B,D.mode,K),K.return=D,D=K),b(D)):s(D,E)}return function(D,E,B,K){try{vr=0;var ve=Je(D,E,B,K);return ls=null,ve}catch(ye){if(ye===os||ye===Go)throw ye;var Ie=rn(29,ye,null,D.mode);return Ie.lanes=K,Ie.return=D,Ie}}}var yi=Wm(!0),eh=Wm(!1),_a=!1;function Ou(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function zu(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 Ca(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Ta(t,a,s){var o=t.updateQueue;if(o===null)return null;if(o=o.shared,(Ge&2)!==0){var u=o.pending;return u===null?a.next=a:(a.next=u.next,u.next=a),o.pending=a,a=qo(t),Lm(t,null,s),a}return Lo(t,o,a,s),qo(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,No(t,s)}}function Du(t,a){var s=t.updateQueue,o=t.alternate;if(o!==null&&(o=o.updateQueue,s===o)){var u=null,m=null;if(s=s.firstBaseUpdate,s!==null){do{var b={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};m===null?u=m=b:m=m.next=b,s=s.next}while(s!==null);m===null?u=m=a:m=m.next=a}else u=m=a;s={baseState:o.baseState,firstBaseUpdate:u,lastBaseUpdate:m,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 Ru=!1;function wr(){if(Ru){var t=rs;if(t!==null)throw t}}function jr(t,a,s,o){Ru=!1;var u=t.updateQueue;_a=!1;var m=u.firstBaseUpdate,b=u.lastBaseUpdate,j=u.shared.pending;if(j!==null){u.shared.pending=null;var C=j,L=C.next;C.next=null,b===null?m=L:b.next=L,b=C;var G=t.alternate;G!==null&&(G=G.updateQueue,j=G.lastBaseUpdate,j!==b&&(j===null?G.firstBaseUpdate=L:j.next=L,G.lastBaseUpdate=C))}if(m!==null){var Y=u.baseState;b=0,G=L=C=null,j=m;do{var U=j.lane&-536870913,V=U!==j.lane;if(V?(Be&U)===U:(o&U)===U){U!==0&&U===ss&&(Ru=!0),G!==null&&(G=G.next={lane:0,tag:j.tag,payload:j.payload,callback:null,next:null});e:{var me=t,we=j;U=a;var Je=s;switch(we.tag){case 1:if(me=we.payload,typeof me=="function"){Y=me.call(Je,Y,U);break e}Y=me;break e;case 3:me.flags=me.flags&-65537|128;case 0:if(me=we.payload,U=typeof me=="function"?me.call(Je,Y,U):me,U==null)break e;Y=x({},Y,U);break e;case 2:_a=!0}}U=j.callback,U!==null&&(t.flags|=64,V&&(t.flags|=8192),V=u.callbacks,V===null?u.callbacks=[U]:V.push(U))}else V={lane:U,tag:j.tag,payload:j.payload,callback:j.callback,next:null},G===null?(L=G=V,C=Y):G=G.next=V,b|=U;if(j=j.next,j===null){if(j=u.shared.pending,j===null)break;V=j,j=V.next,V.next=null,u.lastBaseUpdate=V,u.shared.pending=null}}while(!0);G===null&&(C=Y),u.baseState=C,u.firstBaseUpdate=L,u.lastBaseUpdate=G,m===null&&(u.shared.lanes=0),Ra|=b,t.lanes=b,t.memoizedState=Y}}function th(t,a){if(typeof t!="function")throw Error(r(191,t));t.call(a)}function nh(t,a){var s=t.callbacks;if(s!==null)for(t.callbacks=null,t=0;t<s.length;t++)th(s[t],a)}var cs=Ye(null),Zo=Ye(0);function ah(t,a){t=da,ue(Zo,t),ue(cs,a),da=t|a.baseLanes}function Mu(){ue(Zo,da),ue(cs,cs.current)}function Bu(){da=Zo.current,F(cs),F(Zo)}var on=Ye(null),xn=null;function Ea(t){var a=t.alternate;ue(gt,gt.current&1),ue(on,t),xn===null&&(a===null||cs.current!==null||a.memoizedState!==null)&&(xn=t)}function Lu(t){ue(gt,gt.current),ue(on,t),xn===null&&(xn=t)}function ih(t){t.tag===22?(ue(gt,gt.current),ue(on,t),xn===null&&(xn=t)):Oa()}function Oa(){ue(gt,gt.current),ue(on,on.current)}function ln(t){F(on),xn===t&&(xn=null),F(gt)}var gt=Ye(0);function Yo(t){for(var a=t;a!==null;){if(a.tag===13){var s=a.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||Pd(s)||Gd(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 aa=0,Ee=null,Xe=null,jt=null,Xo=!1,us=!1,bi=!1,Fo=0,Nr=0,ds=null,gx=0;function pt(){throw Error(r(321))}function qu(t,a){if(a===null)return!1;for(var s=0;s<a.length&&s<t.length;s++)if(!sn(t[s],a[s]))return!1;return!0}function Uu(t,a,s,o,u,m){return aa=m,Ee=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,$.H=t===null||t.memoizedState===null?Vh:ed,bi=!1,m=s(o,u),bi=!1,us&&(m=rh(a,s,o,u)),sh(t),m}function sh(t){$.H=_r;var a=Xe!==null&&Xe.next!==null;if(aa=0,jt=Xe=Ee=null,Xo=!1,Nr=0,ds=null,a)throw Error(r(300));t===null||Nt||(t=t.dependencies,t!==null&&Vo(t)&&(Nt=!0))}function rh(t,a,s,o){Ee=t;var u=0;do{if(us&&(ds=null),Nr=0,us=!1,25<=u)throw Error(r(301));if(u+=1,jt=Xe=null,t.updateQueue!=null){var m=t.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}$.H=Ih,m=a(s,o)}while(us);return m}function yx(){var t=$.H,a=t.useState()[0];return a=typeof a.then=="function"?kr(a):a,t=t.useState()[0],(Xe!==null?Xe.memoizedState:null)!==t&&(Ee.flags|=1024),a}function $u(){var t=Fo!==0;return Fo=0,t}function Vu(t,a,s){a.updateQueue=t.updateQueue,a.flags&=-2053,t.lanes&=~s}function Iu(t){if(Xo){for(t=t.memoizedState;t!==null;){var a=t.queue;a!==null&&(a.pending=null),t=t.next}Xo=!1}aa=0,jt=Xe=Ee=null,us=!1,Nr=Fo=0,ds=null}function Pt(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return jt===null?Ee.memoizedState=jt=t:jt=jt.next=t,jt}function yt(){if(Xe===null){var t=Ee.alternate;t=t!==null?t.memoizedState:null}else t=Xe.next;var a=jt===null?Ee.memoizedState:jt.next;if(a!==null)jt=a,Xe=t;else{if(t===null)throw Ee.alternate===null?Error(r(467)):Error(r(310));Xe=t,t={memoizedState:Xe.memoizedState,baseState:Xe.baseState,baseQueue:Xe.baseQueue,queue:Xe.queue,next:null},jt===null?Ee.memoizedState=jt=t:jt=jt.next=t}return jt}function Jo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function kr(t){var a=Nr;return Nr+=1,ds===null&&(ds=[]),t=Xm(ds,t,a),a=Ee,(jt===null?a.memoizedState:jt.next)===null&&(a=a.alternate,$.H=a===null||a.memoizedState===null?Vh:ed),t}function Wo(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return kr(t);if(t.$$typeof===P)return qt(t)}throw Error(r(438,String(t)))}function Pu(t){var a=null,s=Ee.updateQueue;if(s!==null&&(a=s.memoCache),a==null){var o=Ee.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=Jo(),Ee.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]=ke;return a.index++,s}function ia(t,a){return typeof a=="function"?a(t):a}function el(t){var a=yt();return Gu(a,Xe,t)}function Gu(t,a,s){var o=t.queue;if(o===null)throw Error(r(311));o.lastRenderedReducer=s;var u=t.baseQueue,m=o.pending;if(m!==null){if(u!==null){var b=u.next;u.next=m.next,m.next=b}a.baseQueue=u=m,o.pending=null}if(m=t.baseState,u===null)t.memoizedState=m;else{a=u.next;var j=b=null,C=null,L=a,G=!1;do{var Y=L.lane&-536870913;if(Y!==L.lane?(Be&Y)===Y:(aa&Y)===Y){var U=L.revertLane;if(U===0)C!==null&&(C=C.next={lane:0,revertLane:0,gesture:null,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null}),Y===ss&&(G=!0);else if((aa&U)===U){L=L.next,U===ss&&(G=!0);continue}else Y={lane:0,revertLane:L.revertLane,gesture:null,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},C===null?(j=C=Y,b=m):C=C.next=Y,Ee.lanes|=U,Ra|=U;Y=L.action,bi&&s(m,Y),m=L.hasEagerState?L.eagerState:s(m,Y)}else U={lane:Y,revertLane:L.revertLane,gesture:L.gesture,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},C===null?(j=C=U,b=m):C=C.next=U,Ee.lanes|=Y,Ra|=Y;L=L.next}while(L!==null&&L!==a);if(C===null?b=m:C.next=j,!sn(m,t.memoizedState)&&(Nt=!0,G&&(s=rs,s!==null)))throw s;t.memoizedState=m,t.baseState=b,t.baseQueue=C,o.lastRenderedState=m}return u===null&&(o.lanes=0),[t.memoizedState,o.dispatch]}function Hu(t){var a=yt(),s=a.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=t;var o=s.dispatch,u=s.pending,m=a.memoizedState;if(u!==null){s.pending=null;var b=u=u.next;do m=t(m,b.action),b=b.next;while(b!==u);sn(m,a.memoizedState)||(Nt=!0),a.memoizedState=m,a.baseQueue===null&&(a.baseState=m),s.lastRenderedState=m}return[m,o]}function oh(t,a,s){var o=Ee,u=yt(),m=qe;if(m){if(s===void 0)throw Error(r(407));s=s()}else s=a();var b=!sn((Xe||u).memoizedState,s);if(b&&(u.memoizedState=s,Nt=!0),u=u.queue,Zu(uh.bind(null,o,u,t),[t]),u.getSnapshot!==a||b||jt!==null&&jt.memoizedState.tag&1){if(o.flags|=2048,fs(9,{destroy:void 0},ch.bind(null,o,u,s,a),null),We===null)throw Error(r(349));m||(aa&127)!==0||lh(o,a,s)}return s}function lh(t,a,s){t.flags|=16384,t={getSnapshot:a,value:s},a=Ee.updateQueue,a===null?(a=Jo(),Ee.updateQueue=a,a.stores=[t]):(s=a.stores,s===null?a.stores=[t]:s.push(t))}function ch(t,a,s,o){a.value=s,a.getSnapshot=o,dh(a)&&fh(t)}function uh(t,a,s){return s(function(){dh(a)&&fh(t)})}function dh(t){var a=t.getSnapshot;t=t.value;try{var s=a();return!sn(t,s)}catch{return!0}}function fh(t){var a=ci(t,2);a!==null&&en(a,t,2)}function Qu(t){var a=Pt();if(typeof t=="function"){var s=t;if(t=s(),bi){Mt(!0);try{s()}finally{Mt(!1)}}}return a.memoizedState=a.baseState=t,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ia,lastRenderedState:t},a}function ph(t,a,s,o){return t.baseState=s,Gu(t,Xe,typeof o=="function"?o:ia)}function bx(t,a,s,o,u){if(al(t))throw Error(r(485));if(t=a.action,t!==null){var m={payload:u,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(b){m.listeners.push(b)}};$.T!==null?s(!0):m.isTransition=!1,o(m),s=a.pending,s===null?(m.next=a.pending=m,mh(a,m)):(m.next=s.next,a.pending=s.next=m)}}function mh(t,a){var s=a.action,o=a.payload,u=t.state;if(a.isTransition){var m=$.T,b={};$.T=b;try{var j=s(u,o),C=$.S;C!==null&&C(b,j),hh(t,a,j)}catch(L){Ku(t,a,L)}finally{m!==null&&b.types!==null&&(m.types=b.types),$.T=m}}else try{m=s(u,o),hh(t,a,m)}catch(L){Ku(t,a,L)}}function hh(t,a,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(o){gh(t,a,o)},function(o){return Ku(t,a,o)}):gh(t,a,s)}function gh(t,a,s){a.status="fulfilled",a.value=s,yh(a),t.state=s,a=t.pending,a!==null&&(s=a.next,s===a?t.pending=null:(s=s.next,a.next=s,mh(t,s)))}function Ku(t,a,s){var o=t.pending;if(t.pending=null,o!==null){o=o.next;do a.status="rejected",a.reason=s,yh(a),a=a.next;while(a!==o)}t.action=null}function yh(t){t=t.listeners;for(var a=0;a<t.length;a++)(0,t[a])()}function bh(t,a){return a}function vh(t,a){if(qe){var s=We.formState;if(s!==null){e:{var o=Ee;if(qe){if(at){t:{for(var u=at,m=Sn;u.nodeType!==8;){if(!m){u=null;break t}if(u=wn(u.nextSibling),u===null){u=null;break t}}m=u.data,u=m==="F!"||m==="F"?u:null}if(u){at=wn(u.nextSibling),o=u.data==="F!";break e}}ka(o)}o=!1}o&&(a=s[0])}}return s=Pt(),s.memoizedState=s.baseState=a,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:bh,lastRenderedState:a},s.queue=o,s=qh.bind(null,Ee,o),o.dispatch=s,o=Qu(!1),m=Wu.bind(null,Ee,!1,o.queue),o=Pt(),u={state:a,dispatch:null,action:t,pending:null},o.queue=u,s=bx.bind(null,Ee,u,m,s),u.dispatch=s,o.memoizedState=t,[a,s,!1]}function Sh(t){var a=yt();return xh(a,Xe,t)}function xh(t,a,s){if(a=Gu(t,a,bh)[0],t=el(ia)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var o=kr(a)}catch(b){throw b===os?Go:b}else o=a;a=yt();var u=a.queue,m=u.dispatch;return s!==a.memoizedState&&(Ee.flags|=2048,fs(9,{destroy:void 0},vx.bind(null,u,s),null)),[o,m,t]}function vx(t,a){t.action=a}function wh(t){var a=yt(),s=Xe;if(s!==null)return xh(a,s,t);yt(),a=a.memoizedState,s=yt();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=Ee.updateQueue,a===null&&(a=Jo(),Ee.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 jh(){return yt().memoizedState}function tl(t,a,s,o){var u=Pt();Ee.flags|=t,u.memoizedState=fs(1|a,{destroy:void 0},s,o===void 0?null:o)}function nl(t,a,s,o){var u=yt();o=o===void 0?null:o;var m=u.memoizedState.inst;Xe!==null&&o!==null&&qu(o,Xe.memoizedState.deps)?u.memoizedState=fs(a,m,s,o):(Ee.flags|=t,u.memoizedState=fs(1|a,m,s,o))}function Nh(t,a){tl(8390656,8,t,a)}function Zu(t,a){nl(2048,8,t,a)}function Sx(t){Ee.flags|=4;var a=Ee.updateQueue;if(a===null)a=Jo(),Ee.updateQueue=a,a.events=[t];else{var s=a.events;s===null?a.events=[t]:s.push(t)}}function kh(t){var a=yt().memoizedState;return Sx({ref:a,nextImpl:t}),function(){if((Ge&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}function Ah(t,a){return nl(4,2,t,a)}function _h(t,a){return nl(4,4,t,a)}function Ch(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 Th(t,a,s){s=s!=null?s.concat([t]):null,nl(4,4,Ch.bind(null,a,t),s)}function Yu(){}function Eh(t,a){var s=yt();a=a===void 0?null:a;var o=s.memoizedState;return a!==null&&qu(a,o[1])?o[0]:(s.memoizedState=[t,a],t)}function Oh(t,a){var s=yt();a=a===void 0?null:a;var o=s.memoizedState;if(a!==null&&qu(a,o[1]))return o[0];if(o=t(),bi){Mt(!0);try{t()}finally{Mt(!1)}}return s.memoizedState=[o,a],o}function Xu(t,a,s){return s===void 0||(aa&1073741824)!==0&&(Be&261930)===0?t.memoizedState=a:(t.memoizedState=s,t=zg(),Ee.lanes|=t,Ra|=t,s)}function zh(t,a,s,o){return sn(s,a)?s:cs.current!==null?(t=Xu(t,s,o),sn(t,a)||(Nt=!0),t):(aa&42)===0||(aa&1073741824)!==0&&(Be&261930)===0?(Nt=!0,t.memoizedState=s):(t=zg(),Ee.lanes|=t,Ra|=t,a)}function Dh(t,a,s,o,u){var m=W.p;W.p=m!==0&&8>m?m:8;var b=$.T,j={};$.T=j,Wu(t,!1,a,s);try{var C=u(),L=$.S;if(L!==null&&L(j,C),C!==null&&typeof C=="object"&&typeof C.then=="function"){var G=hx(C,o);Ar(t,a,G,dn(t))}else Ar(t,a,o,dn(t))}catch(Y){Ar(t,a,{then:function(){},status:"rejected",reason:Y},dn())}finally{W.p=m,b!==null&&j.types!==null&&(b.types=j.types),$.T=b}}function xx(){}function Fu(t,a,s,o){if(t.tag!==5)throw Error(r(476));var u=Rh(t).queue;Dh(t,u,a,pe,s===null?xx:function(){return Mh(t),s(o)})}function Rh(t){var a=t.memoizedState;if(a!==null)return a;a={memoizedState:pe,baseState:pe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ia,lastRenderedState:pe},next:null};var s={};return a.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ia,lastRenderedState:s},next:null},t.memoizedState=a,t=t.alternate,t!==null&&(t.memoizedState=a),a}function Mh(t){var a=Rh(t);a.next===null&&(a=t.alternate.memoizedState),Ar(t,a.next.queue,{},dn())}function Ju(){return qt(Pr)}function Bh(){return yt().memoizedState}function Lh(){return yt().memoizedState}function wx(t){for(var a=t.return;a!==null;){switch(a.tag){case 24:case 3:var s=dn();t=Ca(s);var o=Ta(a,t,s);o!==null&&(en(o,a,s),xr(o,a,s)),a={cache:_u()},t.payload=a;return}a=a.return}}function jx(t,a,s){var o=dn();s={lane:o,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},al(t)?Uh(a,s):(s=gu(t,a,s,o),s!==null&&(en(s,t,o),$h(s,a,o)))}function qh(t,a,s){var o=dn();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(al(t))Uh(a,u);else{var m=t.alternate;if(t.lanes===0&&(m===null||m.lanes===0)&&(m=a.lastRenderedReducer,m!==null))try{var b=a.lastRenderedState,j=m(b,s);if(u.hasEagerState=!0,u.eagerState=j,sn(j,b))return Lo(t,a,u,0),We===null&&Bo(),!1}catch{}if(s=gu(t,a,u,o),s!==null)return en(s,t,o),$h(s,a,o),!0}return!1}function Wu(t,a,s,o){if(o={lane:2,revertLane:Od(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},al(t)){if(a)throw Error(r(479))}else a=gu(t,s,o,2),a!==null&&en(a,t,2)}function al(t){var a=t.alternate;return t===Ee||a!==null&&a===Ee}function Uh(t,a){us=Xo=!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,No(t,s)}}var _r={readContext:qt,use:Wo,useCallback:pt,useContext:pt,useEffect:pt,useImperativeHandle:pt,useLayoutEffect:pt,useInsertionEffect:pt,useMemo:pt,useReducer:pt,useRef:pt,useState:pt,useDebugValue:pt,useDeferredValue:pt,useTransition:pt,useSyncExternalStore:pt,useId:pt,useHostTransitionStatus:pt,useFormState:pt,useActionState:pt,useOptimistic:pt,useMemoCache:pt,useCacheRefresh:pt};_r.useEffectEvent=pt;var Vh={readContext:qt,use:Wo,useCallback:function(t,a){return Pt().memoizedState=[t,a===void 0?null:a],t},useContext:qt,useEffect:Nh,useImperativeHandle:function(t,a,s){s=s!=null?s.concat([t]):null,tl(4194308,4,Ch.bind(null,a,t),s)},useLayoutEffect:function(t,a){return tl(4194308,4,t,a)},useInsertionEffect:function(t,a){tl(4,2,t,a)},useMemo:function(t,a){var s=Pt();a=a===void 0?null:a;var o=t();if(bi){Mt(!0);try{t()}finally{Mt(!1)}}return s.memoizedState=[o,a],o},useReducer:function(t,a,s){var o=Pt();if(s!==void 0){var u=s(a);if(bi){Mt(!0);try{s(a)}finally{Mt(!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=jx.bind(null,Ee,t),[o.memoizedState,t]},useRef:function(t){var a=Pt();return t={current:t},a.memoizedState=t},useState:function(t){t=Qu(t);var a=t.queue,s=qh.bind(null,Ee,a);return a.dispatch=s,[t.memoizedState,s]},useDebugValue:Yu,useDeferredValue:function(t,a){var s=Pt();return Xu(s,t,a)},useTransition:function(){var t=Qu(!1);return t=Dh.bind(null,Ee,t.queue,!0,!1),Pt().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,a,s){var o=Ee,u=Pt();if(qe){if(s===void 0)throw Error(r(407));s=s()}else{if(s=a(),We===null)throw Error(r(349));(Be&127)!==0||lh(o,a,s)}u.memoizedState=s;var m={value:s,getSnapshot:a};return u.queue=m,Nh(uh.bind(null,o,m,t),[t]),o.flags|=2048,fs(9,{destroy:void 0},ch.bind(null,o,m,s,a),null),s},useId:function(){var t=Pt(),a=We.identifierPrefix;if(qe){var s=In,o=Vn;s=(o&~(1<<32-_t(o)-1)).toString(32)+s,a="_"+a+"R_"+s,s=Fo++,0<s&&(a+="H"+s.toString(32)),a+="_"}else s=gx++,a="_"+a+"r_"+s.toString(32)+"_";return t.memoizedState=a},useHostTransitionStatus:Ju,useFormState:vh,useActionState:vh,useOptimistic:function(t){var a=Pt();a.memoizedState=a.baseState=t;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=s,a=Wu.bind(null,Ee,!0,s),s.dispatch=a,[t,a]},useMemoCache:Pu,useCacheRefresh:function(){return Pt().memoizedState=wx.bind(null,Ee)},useEffectEvent:function(t){var a=Pt(),s={impl:t};return a.memoizedState=s,function(){if((Ge&2)!==0)throw Error(r(440));return s.impl.apply(void 0,arguments)}}},ed={readContext:qt,use:Wo,useCallback:Eh,useContext:qt,useEffect:Zu,useImperativeHandle:Th,useInsertionEffect:Ah,useLayoutEffect:_h,useMemo:Oh,useReducer:el,useRef:jh,useState:function(){return el(ia)},useDebugValue:Yu,useDeferredValue:function(t,a){var s=yt();return zh(s,Xe.memoizedState,t,a)},useTransition:function(){var t=el(ia)[0],a=yt().memoizedState;return[typeof t=="boolean"?t:kr(t),a]},useSyncExternalStore:oh,useId:Bh,useHostTransitionStatus:Ju,useFormState:Sh,useActionState:Sh,useOptimistic:function(t,a){var s=yt();return ph(s,Xe,t,a)},useMemoCache:Pu,useCacheRefresh:Lh};ed.useEffectEvent=kh;var Ih={readContext:qt,use:Wo,useCallback:Eh,useContext:qt,useEffect:Zu,useImperativeHandle:Th,useInsertionEffect:Ah,useLayoutEffect:_h,useMemo:Oh,useReducer:Hu,useRef:jh,useState:function(){return Hu(ia)},useDebugValue:Yu,useDeferredValue:function(t,a){var s=yt();return Xe===null?Xu(s,t,a):zh(s,Xe.memoizedState,t,a)},useTransition:function(){var t=Hu(ia)[0],a=yt().memoizedState;return[typeof t=="boolean"?t:kr(t),a]},useSyncExternalStore:oh,useId:Bh,useHostTransitionStatus:Ju,useFormState:wh,useActionState:wh,useOptimistic:function(t,a){var s=yt();return Xe!==null?ph(s,Xe,t,a):(s.baseState=t,[t,s.queue.dispatch])},useMemoCache:Pu,useCacheRefresh:Lh};Ih.useEffectEvent=kh;function td(t,a,s,o){a=t.memoizedState,s=s(o,a),s=s==null?a:x({},a,s),t.memoizedState=s,t.lanes===0&&(t.updateQueue.baseState=s)}var nd={enqueueSetState:function(t,a,s){t=t._reactInternals;var o=dn(),u=Ca(o);u.payload=a,s!=null&&(u.callback=s),a=Ta(t,u,o),a!==null&&(en(a,t,o),xr(a,t,o))},enqueueReplaceState:function(t,a,s){t=t._reactInternals;var o=dn(),u=Ca(o);u.tag=1,u.payload=a,s!=null&&(u.callback=s),a=Ta(t,u,o),a!==null&&(en(a,t,o),xr(a,t,o))},enqueueForceUpdate:function(t,a){t=t._reactInternals;var s=dn(),o=Ca(s);o.tag=2,a!=null&&(o.callback=a),a=Ta(t,o,s),a!==null&&(en(a,t,s),xr(a,t,s))}};function Ph(t,a,s,o,u,m,b){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(o,m,b):a.prototype&&a.prototype.isPureReactComponent?!pr(s,o)||!pr(u,m):!0}function Gh(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&&nd.enqueueReplaceState(a,a.state,null)}function vi(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=x({},s));for(var u in t)s[u]===void 0&&(s[u]=t[u])}return s}function Hh(t){Mo(t)}function Qh(t){console.error(t)}function Kh(t){Mo(t)}function il(t,a){try{var s=t.onUncaughtError;s(a.value,{componentStack:a.stack})}catch(o){setTimeout(function(){throw o})}}function Zh(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 ad(t,a,s){return s=Ca(s),s.tag=3,s.payload={element:null},s.callback=function(){il(t,a)},s}function Yh(t){return t=Ca(t),t.tag=3,t}function Xh(t,a,s,o){var u=s.type.getDerivedStateFromError;if(typeof u=="function"){var m=o.value;t.payload=function(){return u(m)},t.callback=function(){Zh(a,s,o)}}var b=s.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(t.callback=function(){Zh(a,s,o),typeof u!="function"&&(Ma===null?Ma=new Set([this]):Ma.add(this));var j=o.stack;this.componentDidCatch(o.value,{componentStack:j!==null?j:""})})}function Nx(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=on.current,s!==null){switch(s.tag){case 31:case 13:return xn===null?gl():s.alternate===null&&mt===0&&(mt=3),s.flags&=-257,s.flags|=65536,s.lanes=u,o===Ho?s.flags|=16384:(a=s.updateQueue,a===null?s.updateQueue=new Set([o]):a.add(o),Cd(t,o,u)),!1;case 22:return s.flags|=65536,o===Ho?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)),Cd(t,o,u)),!1}throw Error(r(435,s.tag))}return Cd(t,o,u),gl(),!1}if(qe)return a=on.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=u,o!==wu&&(t=Error(r(422),{cause:o}),gr(yn(t,s)))):(o!==wu&&(a=Error(r(423),{cause:o}),gr(yn(a,s))),t=t.current.alternate,t.flags|=65536,u&=-u,t.lanes|=u,o=yn(o,s),u=ad(t.stateNode,o,u),Du(t,u),mt!==4&&(mt=2)),!1;var m=Error(r(520),{cause:o});if(m=yn(m,s),Mr===null?Mr=[m]:Mr.push(m),mt!==4&&(mt=2),a===null)return!0;o=yn(o,s),s=a;do{switch(s.tag){case 3:return s.flags|=65536,t=u&-u,s.lanes|=t,t=ad(s.stateNode,o,t),Du(s,t),!1;case 1:if(a=s.type,m=s.stateNode,(s.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(Ma===null||!Ma.has(m))))return s.flags|=65536,u&=-u,s.lanes|=u,u=Yh(u),Xh(u,t,s,o),Du(s,u),!1}s=s.return}while(s!==null);return!1}var id=Error(r(461)),Nt=!1;function Ut(t,a,s,o){a.child=t===null?eh(a,null,s,o):yi(a,t.child,s,o)}function Fh(t,a,s,o,u){s=s.render;var m=a.ref;if("ref"in o){var b={};for(var j in o)j!=="ref"&&(b[j]=o[j])}else b=o;return pi(a),o=Uu(t,a,s,b,m,u),j=$u(),t!==null&&!Nt?(Vu(t,a,u),sa(t,a,u)):(qe&&j&&Su(a),a.flags|=1,Ut(t,a,o,u),a.child)}function Jh(t,a,s,o,u){if(t===null){var m=s.type;return typeof m=="function"&&!yu(m)&&m.defaultProps===void 0&&s.compare===null?(a.tag=15,a.type=m,Wh(t,a,m,o,u)):(t=Uo(s.type,null,o,a,a.mode,u),t.ref=a.ref,t.return=a,a.child=t)}if(m=t.child,!fd(t,u)){var b=m.memoizedProps;if(s=s.compare,s=s!==null?s:pr,s(b,o)&&t.ref===a.ref)return sa(t,a,u)}return a.flags|=1,t=Wn(m,o),t.ref=a.ref,t.return=a,a.child=t}function Wh(t,a,s,o,u){if(t!==null){var m=t.memoizedProps;if(pr(m,o)&&t.ref===a.ref)if(Nt=!1,a.pendingProps=o=m,fd(t,u))(t.flags&131072)!==0&&(Nt=!0);else return a.lanes=t.lanes,sa(t,a,u)}return sd(t,a,s,o,u)}function eg(t,a,s,o){var u=o.children,m=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(m=m!==null?m.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&~m}else o=0,a.child=null;return tg(t,a,m,s,o)}if((s&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},t!==null&&Po(a,m!==null?m.cachePool:null),m!==null?ah(a,m):Mu(),ih(a);else return o=a.lanes=536870912,tg(t,a,m!==null?m.baseLanes|s:s,s,o)}else m!==null?(Po(a,m.cachePool),ah(a,m),Oa(),a.memoizedState=null):(t!==null&&Po(a,null),Mu(),Oa());return Ut(t,a,u,s),a.child}function Cr(t,a){return t!==null&&t.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function tg(t,a,s,o,u){var m=Tu();return m=m===null?null:{parent:wt._currentValue,pool:m},a.memoizedState={baseLanes:s,cachePool:m},t!==null&&Po(a,null),Mu(),ih(a),t!==null&&is(t,a,o,!0),a.childLanes=u,null}function sl(t,a){return a=ol({mode:a.mode,children:a.children},t.mode),a.ref=t.ref,t.child=a,a.return=t,a}function ng(t,a,s){return yi(a,t.child,null,s),t=sl(a,a.pendingProps),t.flags|=2,ln(a),a.memoizedState=null,t}function kx(t,a,s){var o=a.pendingProps,u=(a.flags&128)!==0;if(a.flags&=-129,t===null){if(qe){if(o.mode==="hidden")return t=sl(a,o),a.lanes=536870912,Cr(null,t);if(Lu(a),(t=at)?(t=my(t,Sn),t=t!==null&&t.data==="&"?t:null,t!==null&&(a.memoizedState={dehydrated:t,treeContext:ja!==null?{id:Vn,overflow:In}:null,retryLane:536870912,hydrationErrors:null},s=Um(t),s.return=a,a.child=s,Lt=a,at=null)):t=null,t===null)throw ka(a);return a.lanes=536870912,null}return sl(a,o)}var m=t.memoizedState;if(m!==null){var b=m.dehydrated;if(Lu(a),u)if(a.flags&256)a.flags&=-257,a=ng(t,a,s);else if(a.memoizedState!==null)a.child=t.child,a.flags|=128,a=null;else throw Error(r(558));else if(Nt||is(t,a,s,!1),u=(s&t.childLanes)!==0,Nt||u){if(o=We,o!==null&&(b=$n(o,s),b!==0&&b!==m.retryLane))throw m.retryLane=b,ci(t,b),en(o,t,b),id;gl(),a=ng(t,a,s)}else t=m.treeContext,at=wn(b.nextSibling),Lt=a,qe=!0,Na=null,Sn=!1,t!==null&&Im(a,t),a=sl(a,o),a.flags|=4096;return a}return t=Wn(t.child,{mode:o.mode,children:o.children}),t.ref=a.ref,a.child=t,t.return=a,t}function rl(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 sd(t,a,s,o,u){return pi(a),s=Uu(t,a,s,o,void 0,u),o=$u(),t!==null&&!Nt?(Vu(t,a,u),sa(t,a,u)):(qe&&o&&Su(a),a.flags|=1,Ut(t,a,s,u),a.child)}function ag(t,a,s,o,u,m){return pi(a),a.updateQueue=null,s=rh(a,o,s,u),sh(t),o=$u(),t!==null&&!Nt?(Vu(t,a,m),sa(t,a,m)):(qe&&o&&Su(a),a.flags|=1,Ut(t,a,s,m),a.child)}function ig(t,a,s,o,u){if(pi(a),a.stateNode===null){var m=es,b=s.contextType;typeof b=="object"&&b!==null&&(m=qt(b)),m=new s(o,m),a.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=nd,a.stateNode=m,m._reactInternals=a,m=a.stateNode,m.props=o,m.state=a.memoizedState,m.refs={},Ou(a),b=s.contextType,m.context=typeof b=="object"&&b!==null?qt(b):es,m.state=a.memoizedState,b=s.getDerivedStateFromProps,typeof b=="function"&&(td(a,s,b,o),m.state=a.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(b=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),b!==m.state&&nd.enqueueReplaceState(m,m.state,null),jr(a,o,m,u),wr(),m.state=a.memoizedState),typeof m.componentDidMount=="function"&&(a.flags|=4194308),o=!0}else if(t===null){m=a.stateNode;var j=a.memoizedProps,C=vi(s,j);m.props=C;var L=m.context,G=s.contextType;b=es,typeof G=="object"&&G!==null&&(b=qt(G));var Y=s.getDerivedStateFromProps;G=typeof Y=="function"||typeof m.getSnapshotBeforeUpdate=="function",j=a.pendingProps!==j,G||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(j||L!==b)&&Gh(a,m,o,b),_a=!1;var U=a.memoizedState;m.state=U,jr(a,o,m,u),wr(),L=a.memoizedState,j||U!==L||_a?(typeof Y=="function"&&(td(a,s,Y,o),L=a.memoizedState),(C=_a||Ph(a,s,C,o,U,L,b))?(G||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(a.flags|=4194308)):(typeof m.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=o,a.memoizedState=L),m.props=o,m.state=L,m.context=b,o=C):(typeof m.componentDidMount=="function"&&(a.flags|=4194308),o=!1)}else{m=a.stateNode,zu(t,a),b=a.memoizedProps,G=vi(s,b),m.props=G,Y=a.pendingProps,U=m.context,L=s.contextType,C=es,typeof L=="object"&&L!==null&&(C=qt(L)),j=s.getDerivedStateFromProps,(L=typeof j=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(b!==Y||U!==C)&&Gh(a,m,o,C),_a=!1,U=a.memoizedState,m.state=U,jr(a,o,m,u),wr();var V=a.memoizedState;b!==Y||U!==V||_a||t!==null&&t.dependencies!==null&&Vo(t.dependencies)?(typeof j=="function"&&(td(a,s,j,o),V=a.memoizedState),(G=_a||Ph(a,s,G,o,U,V,C)||t!==null&&t.dependencies!==null&&Vo(t.dependencies))?(L||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(o,V,C),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(o,V,C)),typeof m.componentDidUpdate=="function"&&(a.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof m.componentDidUpdate!="function"||b===t.memoizedProps&&U===t.memoizedState||(a.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||b===t.memoizedProps&&U===t.memoizedState||(a.flags|=1024),a.memoizedProps=o,a.memoizedState=V),m.props=o,m.state=V,m.context=C,o=G):(typeof m.componentDidUpdate!="function"||b===t.memoizedProps&&U===t.memoizedState||(a.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||b===t.memoizedProps&&U===t.memoizedState||(a.flags|=1024),o=!1)}return m=o,rl(t,a),o=(a.flags&128)!==0,m||o?(m=a.stateNode,s=o&&typeof s.getDerivedStateFromError!="function"?null:m.render(),a.flags|=1,t!==null&&o?(a.child=yi(a,t.child,null,u),a.child=yi(a,null,s,u)):Ut(t,a,s,u),a.memoizedState=m.state,t=a.child):t=sa(t,a,u),t}function sg(t,a,s,o){return di(),a.flags|=256,Ut(t,a,s,o),a.child}var rd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function od(t){return{baseLanes:t,cachePool:Zm()}}function ld(t,a,s){return t=t!==null?t.childLanes&~s:0,a&&(t|=un),t}function rg(t,a,s){var o=a.pendingProps,u=!1,m=(a.flags&128)!==0,b;if((b=m)||(b=t!==null&&t.memoizedState===null?!1:(gt.current&2)!==0),b&&(u=!0,a.flags&=-129),b=(a.flags&32)!==0,a.flags&=-33,t===null){if(qe){if(u?Ea(a):Oa(),(t=at)?(t=my(t,Sn),t=t!==null&&t.data!=="&"?t:null,t!==null&&(a.memoizedState={dehydrated:t,treeContext:ja!==null?{id:Vn,overflow:In}:null,retryLane:536870912,hydrationErrors:null},s=Um(t),s.return=a,a.child=s,Lt=a,at=null)):t=null,t===null)throw ka(a);return Gd(t)?a.lanes=32:a.lanes=536870912,null}var j=o.children;return o=o.fallback,u?(Oa(),u=a.mode,j=ol({mode:"hidden",children:j},u),o=ui(o,u,s,null),j.return=a,o.return=a,j.sibling=o,a.child=j,o=a.child,o.memoizedState=od(s),o.childLanes=ld(t,b,s),a.memoizedState=rd,Cr(null,o)):(Ea(a),cd(a,j))}var C=t.memoizedState;if(C!==null&&(j=C.dehydrated,j!==null)){if(m)a.flags&256?(Ea(a),a.flags&=-257,a=ud(t,a,s)):a.memoizedState!==null?(Oa(),a.child=t.child,a.flags|=128,a=null):(Oa(),j=o.fallback,u=a.mode,o=ol({mode:"visible",children:o.children},u),j=ui(j,u,s,null),j.flags|=2,o.return=a,j.return=a,o.sibling=j,a.child=o,yi(a,t.child,null,s),o=a.child,o.memoizedState=od(s),o.childLanes=ld(t,b,s),a.memoizedState=rd,a=Cr(null,o));else if(Ea(a),Gd(j)){if(b=j.nextSibling&&j.nextSibling.dataset,b)var L=b.dgst;b=L,o=Error(r(419)),o.stack="",o.digest=b,gr({value:o,source:null,stack:null}),a=ud(t,a,s)}else if(Nt||is(t,a,s,!1),b=(s&t.childLanes)!==0,Nt||b){if(b=We,b!==null&&(o=$n(b,s),o!==0&&o!==C.retryLane))throw C.retryLane=o,ci(t,o),en(b,t,o),id;Pd(j)||gl(),a=ud(t,a,s)}else Pd(j)?(a.flags|=192,a.child=t.child,a=null):(t=C.treeContext,at=wn(j.nextSibling),Lt=a,qe=!0,Na=null,Sn=!1,t!==null&&Im(a,t),a=cd(a,o.children),a.flags|=4096);return a}return u?(Oa(),j=o.fallback,u=a.mode,C=t.child,L=C.sibling,o=Wn(C,{mode:"hidden",children:o.children}),o.subtreeFlags=C.subtreeFlags&65011712,L!==null?j=Wn(L,j):(j=ui(j,u,s,null),j.flags|=2),j.return=a,o.return=a,o.sibling=j,a.child=o,Cr(null,o),o=a.child,j=t.child.memoizedState,j===null?j=od(s):(u=j.cachePool,u!==null?(C=wt._currentValue,u=u.parent!==C?{parent:C,pool:C}:u):u=Zm(),j={baseLanes:j.baseLanes|s,cachePool:u}),o.memoizedState=j,o.childLanes=ld(t,b,s),a.memoizedState=rd,Cr(t.child,o)):(Ea(a),s=t.child,t=s.sibling,s=Wn(s,{mode:"visible",children:o.children}),s.return=a,s.sibling=null,t!==null&&(b=a.deletions,b===null?(a.deletions=[t],a.flags|=16):b.push(t)),a.child=s,a.memoizedState=null,s)}function cd(t,a){return a=ol({mode:"visible",children:a},t.mode),a.return=t,t.child=a}function ol(t,a){return t=rn(22,t,null,a),t.lanes=0,t}function ud(t,a,s){return yi(a,t.child,null,s),t=cd(a,a.pendingProps.children),t.flags|=2,a.memoizedState=null,t}function og(t,a,s){t.lanes|=a;var o=t.alternate;o!==null&&(o.lanes|=a),ku(t.return,a,s)}function dd(t,a,s,o,u,m){var b=t.memoizedState;b===null?t.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:o,tail:s,tailMode:u,treeForkCount:m}:(b.isBackwards=a,b.rendering=null,b.renderingStartTime=0,b.last=o,b.tail=s,b.tailMode=u,b.treeForkCount=m)}function lg(t,a,s){var o=a.pendingProps,u=o.revealOrder,m=o.tail;o=o.children;var b=gt.current,j=(b&2)!==0;if(j?(b=b&1|2,a.flags|=128):b&=1,ue(gt,b),Ut(t,a,o,s),o=qe?hr:0,!j&&t!==null&&(t.flags&128)!==0)e:for(t=a.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&og(t,s,a);else if(t.tag===19)og(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&&Yo(t)===null&&(u=s),s=s.sibling;s=u,s===null?(u=a.child,a.child=null):(u=s.sibling,s.sibling=null),dd(a,!1,u,s,m,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&&Yo(t)===null){a.child=u;break}t=u.sibling,u.sibling=s,s=u,u=t}dd(a,!0,s,null,m,o);break;case"together":dd(a,!1,null,null,void 0,o);break;default:a.memoizedState=null}return a.child}function sa(t,a,s){if(t!==null&&(a.dependencies=t.dependencies),Ra|=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=Wn(t,t.pendingProps),a.child=s,s.return=a;t.sibling!==null;)t=t.sibling,s=s.sibling=Wn(t,t.pendingProps),s.return=a;s.sibling=null}return a.child}function fd(t,a){return(t.lanes&a)!==0?!0:(t=t.dependencies,!!(t!==null&&Vo(t)))}function Ax(t,a,s){switch(a.tag){case 3:tt(a,a.stateNode.containerInfo),Aa(a,wt,t.memoizedState.cache),di();break;case 27:case 5:Ve(a);break;case 4:tt(a,a.stateNode.containerInfo);break;case 10:Aa(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,Lu(a),null;break;case 13:var o=a.memoizedState;if(o!==null)return o.dehydrated!==null?(Ea(a),a.flags|=128,null):(s&a.child.childLanes)!==0?rg(t,a,s):(Ea(a),t=sa(t,a,s),t!==null?t.sibling:null);Ea(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 lg(t,a,s);a.flags|=128}if(u=a.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),ue(gt,gt.current),o)break;return null;case 22:return a.lanes=0,eg(t,a,s,a.pendingProps);case 24:Aa(a,wt,t.memoizedState.cache)}return sa(t,a,s)}function cg(t,a,s){if(t!==null)if(t.memoizedProps!==a.pendingProps)Nt=!0;else{if(!fd(t,s)&&(a.flags&128)===0)return Nt=!1,Ax(t,a,s);Nt=(t.flags&131072)!==0}else Nt=!1,qe&&(a.flags&1048576)!==0&&Vm(a,hr,a.index);switch(a.lanes=0,a.tag){case 16:e:{var o=a.pendingProps;if(t=hi(a.elementType),a.type=t,typeof t=="function")yu(t)?(o=vi(t,o),a.tag=1,a=ig(null,a,t,o,s)):(a.tag=0,a=sd(null,a,t,o,s));else{if(t!=null){var u=t.$$typeof;if(u===Z){a.tag=11,a=Fh(null,a,t,o,s);break e}else if(u===z){a.tag=14,a=Jh(null,a,t,o,s);break e}}throw a=le(t)||t,Error(r(306,a,""))}}return a;case 0:return sd(t,a,a.type,a.pendingProps,s);case 1:return o=a.type,u=vi(o,a.pendingProps),ig(t,a,o,u,s);case 3:e:{if(tt(a,a.stateNode.containerInfo),t===null)throw Error(r(387));o=a.pendingProps;var m=a.memoizedState;u=m.element,zu(t,a),jr(a,o,null,s);var b=a.memoizedState;if(o=b.cache,Aa(a,wt,o),o!==m.cache&&Au(a,[wt],s,!0),wr(),o=b.element,m.isDehydrated)if(m={element:o,isDehydrated:!1,cache:b.cache},a.updateQueue.baseState=m,a.memoizedState=m,a.flags&256){a=sg(t,a,o,s);break e}else if(o!==u){u=yn(Error(r(424)),a),gr(u),a=sg(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,at=wn(t.firstChild),Lt=a,qe=!0,Na=null,Sn=!0,s=eh(a,null,o,s),a.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(di(),o===u){a=sa(t,a,s);break e}Ut(t,a,o,s)}a=a.child}return a;case 26:return rl(t,a),t===null?(s=Sy(a.type,null,a.pendingProps,null))?a.memoizedState=s:qe||(s=a.type,t=a.pendingProps,o=jl(ae.current).createElement(s),o[Bt]=a,o[Zt]=t,$t(o,s,t),Ot(o),a.stateNode=o):a.memoizedState=Sy(a.type,t.memoizedProps,a.pendingProps,t.memoizedState),null;case 27:return Ve(a),t===null&&qe&&(o=a.stateNode=yy(a.type,a.pendingProps,ae.current),Lt=a,Sn=!0,u=at,Ua(a.type)?(Hd=u,at=wn(o.firstChild)):at=u),Ut(t,a,a.pendingProps.children,s),rl(t,a),t===null&&(a.flags|=4194304),a.child;case 5:return t===null&&qe&&((u=o=at)&&(o=nw(o,a.type,a.pendingProps,Sn),o!==null?(a.stateNode=o,Lt=a,at=wn(o.firstChild),Sn=!1,u=!0):u=!1),u||ka(a)),Ve(a),u=a.type,m=a.pendingProps,b=t!==null?t.memoizedProps:null,o=m.children,$d(u,m)?o=null:b!==null&&$d(u,b)&&(a.flags|=32),a.memoizedState!==null&&(u=Uu(t,a,yx,null,null,s),Pr._currentValue=u),rl(t,a),Ut(t,a,o,s),a.child;case 6:return t===null&&qe&&((t=s=at)&&(s=aw(s,a.pendingProps,Sn),s!==null?(a.stateNode=s,Lt=a,at=null,t=!0):t=!1),t||ka(a)),null;case 13:return rg(t,a,s);case 4:return tt(a,a.stateNode.containerInfo),o=a.pendingProps,t===null?a.child=yi(a,null,o,s):Ut(t,a,o,s),a.child;case 11:return Fh(t,a,a.type,a.pendingProps,s);case 7:return Ut(t,a,a.pendingProps,s),a.child;case 8:return Ut(t,a,a.pendingProps.children,s),a.child;case 12:return Ut(t,a,a.pendingProps.children,s),a.child;case 10:return o=a.pendingProps,Aa(a,a.type,o.value),Ut(t,a,o.children,s),a.child;case 9:return u=a.type._context,o=a.pendingProps.children,pi(a),u=qt(u),o=o(u),a.flags|=1,Ut(t,a,o,s),a.child;case 14:return Jh(t,a,a.type,a.pendingProps,s);case 15:return Wh(t,a,a.type,a.pendingProps,s);case 19:return lg(t,a,s);case 31:return kx(t,a,s);case 22:return eg(t,a,s,a.pendingProps);case 24:return pi(a),o=qt(wt),t===null?(u=Tu(),u===null&&(u=We,m=_u(),u.pooledCache=m,m.refCount++,m!==null&&(u.pooledCacheLanes|=s),u=m),a.memoizedState={parent:o,cache:u},Ou(a),Aa(a,wt,u)):((t.lanes&s)!==0&&(zu(t,a),jr(a,null,null,s),wr()),u=t.memoizedState,m=a.memoizedState,u.parent!==o?(u={parent:o,cache:o},a.memoizedState=u,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=u),Aa(a,wt,o)):(o=m.cache,Aa(a,wt,o),o!==u.cache&&Au(a,[wt],s,!0))),Ut(t,a,a.pendingProps.children,s),a.child;case 29:throw a.pendingProps}throw Error(r(156,a.tag))}function ra(t){t.flags|=4}function pd(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(Bg())t.flags|=8192;else throw gi=Ho,Eu}else t.flags&=-16777217}function ug(t,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!ky(a))if(Bg())t.flags|=8192;else throw gi=Ho,Eu}function ll(t,a){a!==null&&(t.flags|=4),t.flags&16384&&(a=t.tag!==22?ot():536870912,t.lanes|=a,gs|=a)}function Tr(t,a){if(!qe)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 it(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 _x(t,a,s){var o=a.pendingProps;switch(xu(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return it(a),null;case 1:return it(a),null;case 3:return s=a.stateNode,o=null,t!==null&&(o=t.memoizedState.cache),a.memoizedState.cache!==o&&(a.flags|=2048),na(wt),xe(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(t===null||t.child===null)&&(as(a)?ra(a):t===null||t.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,ju())),it(a),null;case 26:var u=a.type,m=a.memoizedState;return t===null?(ra(a),m!==null?(it(a),ug(a,m)):(it(a),pd(a,u,null,o,s))):m?m!==t.memoizedState?(ra(a),it(a),ug(a,m)):(it(a),a.flags&=-16777217):(t=t.memoizedProps,t!==o&&ra(a),it(a),pd(a,u,t,o,s)),null;case 27:if(Qe(a),s=ae.current,u=a.type,t!==null&&a.stateNode!=null)t.memoizedProps!==o&&ra(a);else{if(!o){if(a.stateNode===null)throw Error(r(166));return it(a),null}t=ee.current,as(a)?Pm(a):(t=yy(u,o,s),a.stateNode=t,ra(a))}return it(a),null;case 5:if(Qe(a),u=a.type,t!==null&&a.stateNode!=null)t.memoizedProps!==o&&ra(a);else{if(!o){if(a.stateNode===null)throw Error(r(166));return it(a),null}if(m=ee.current,as(a))Pm(a);else{var b=jl(ae.current);switch(m){case 1:m=b.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:m=b.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":m=b.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":m=b.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":m=b.createElement("div"),m.innerHTML="<script><\/script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof o.is=="string"?b.createElement("select",{is:o.is}):b.createElement("select"),o.multiple?m.multiple=!0:o.size&&(m.size=o.size);break;default:m=typeof o.is=="string"?b.createElement(u,{is:o.is}):b.createElement(u)}}m[Bt]=a,m[Zt]=o;e:for(b=a.child;b!==null;){if(b.tag===5||b.tag===6)m.appendChild(b.stateNode);else if(b.tag!==4&&b.tag!==27&&b.child!==null){b.child.return=b,b=b.child;continue}if(b===a)break e;for(;b.sibling===null;){if(b.return===null||b.return===a)break e;b=b.return}b.sibling.return=b.return,b=b.sibling}a.stateNode=m;e:switch($t(m,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&&ra(a)}}return it(a),pd(a,a.type,t===null?null:t.memoizedProps,a.pendingProps,s),null;case 6:if(t&&a.stateNode!=null)t.memoizedProps!==o&&ra(a);else{if(typeof o!="string"&&a.stateNode===null)throw Error(r(166));if(t=ae.current,as(a)){if(t=a.stateNode,s=a.memoizedProps,o=null,u=Lt,u!==null)switch(u.tag){case 27:case 5:o=u.memoizedProps}t[Bt]=a,t=!!(t.nodeValue===s||o!==null&&o.suppressHydrationWarning===!0||ry(t.nodeValue,s)),t||ka(a,!0)}else t=jl(t).createTextNode(o),t[Bt]=a,a.stateNode=t}return it(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[Bt]=a}else di(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;it(a),t=!1}else s=ju(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=s),t=!0;if(!t)return a.flags&256?(ln(a),a):(ln(a),null);if((a.flags&128)!==0)throw Error(r(558))}return it(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[Bt]=a}else di(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;it(a),u=!1}else u=ju(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=u),u=!0;if(!u)return a.flags&256?(ln(a),a):(ln(a),null)}return ln(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),m=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(m=o.memoizedState.cachePool.pool),m!==u&&(o.flags|=2048)),s!==t&&s&&(a.child.flags|=8192),ll(a,a.updateQueue),it(a),null);case 4:return xe(),t===null&&Md(a.stateNode.containerInfo),it(a),null;case 10:return na(a.type),it(a),null;case 19:if(F(gt),o=a.memoizedState,o===null)return it(a),null;if(u=(a.flags&128)!==0,m=o.rendering,m===null)if(u)Tr(o,!1);else{if(mt!==0||t!==null&&(t.flags&128)!==0)for(t=a.child;t!==null;){if(m=Yo(t),m!==null){for(a.flags|=128,Tr(o,!1),t=m.updateQueue,a.updateQueue=t,ll(a,t),a.subtreeFlags=0,t=s,s=a.child;s!==null;)qm(s,t),s=s.sibling;return ue(gt,gt.current&1|2),qe&&ea(a,o.treeForkCount),a.child}t=t.sibling}o.tail!==null&&Vt()>pl&&(a.flags|=128,u=!0,Tr(o,!1),a.lanes=4194304)}else{if(!u)if(t=Yo(m),t!==null){if(a.flags|=128,u=!0,t=t.updateQueue,a.updateQueue=t,ll(a,t),Tr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!m.alternate&&!qe)return it(a),null}else 2*Vt()-o.renderingStartTime>pl&&s!==536870912&&(a.flags|=128,u=!0,Tr(o,!1),a.lanes=4194304);o.isBackwards?(m.sibling=a.child,a.child=m):(t=o.last,t!==null?t.sibling=m:a.child=m,o.last=m)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Vt(),t.sibling=null,s=gt.current,ue(gt,u?s&1|2:s&1),qe&&ea(a,o.treeForkCount),t):(it(a),null);case 22:case 23:return ln(a),Bu(),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&&(it(a),a.subtreeFlags&6&&(a.flags|=8192)):it(a),s=a.updateQueue,s!==null&&ll(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&&F(mi),null;case 24:return s=null,t!==null&&(s=t.memoizedState.cache),a.memoizedState.cache!==s&&(a.flags|=2048),na(wt),it(a),null;case 25:return null;case 30:return null}throw Error(r(156,a.tag))}function Cx(t,a){switch(xu(a),a.tag){case 1:return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 3:return na(wt),xe(),t=a.flags,(t&65536)!==0&&(t&128)===0?(a.flags=t&-65537|128,a):null;case 26:case 27:case 5:return Qe(a),null;case 31:if(a.memoizedState!==null){if(ln(a),a.alternate===null)throw Error(r(340));di()}return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 13:if(ln(a),t=a.memoizedState,t!==null&&t.dehydrated!==null){if(a.alternate===null)throw Error(r(340));di()}return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 19:return F(gt),null;case 4:return xe(),null;case 10:return na(a.type),null;case 22:case 23:return ln(a),Bu(),t!==null&&F(mi),t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 24:return na(wt),null;case 25:return null;default:return null}}function dg(t,a){switch(xu(a),a.tag){case 3:na(wt),xe();break;case 26:case 27:case 5:Qe(a);break;case 4:xe();break;case 31:a.memoizedState!==null&&ln(a);break;case 13:ln(a);break;case 19:F(gt);break;case 10:na(a.type);break;case 22:case 23:ln(a),Bu(),t!==null&&F(mi);break;case 24:na(wt)}}function Er(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 m=s.create,b=s.inst;o=m(),b.destroy=o}s=s.next}while(s!==u)}}catch(j){Ze(a,a.return,j)}}function za(t,a,s){try{var o=a.updateQueue,u=o!==null?o.lastEffect:null;if(u!==null){var m=u.next;o=m;do{if((o.tag&t)===t){var b=o.inst,j=b.destroy;if(j!==void 0){b.destroy=void 0,u=a;var C=s,L=j;try{L()}catch(G){Ze(u,C,G)}}}o=o.next}while(o!==m)}}catch(G){Ze(a,a.return,G)}}function fg(t){var a=t.updateQueue;if(a!==null){var s=t.stateNode;try{nh(a,s)}catch(o){Ze(t,t.return,o)}}}function pg(t,a,s){s.props=vi(t.type,t.memoizedProps),s.state=t.memoizedState;try{s.componentWillUnmount()}catch(o){Ze(t,a,o)}}function Or(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){Ze(t,a,u)}}function Pn(t,a){var s=t.ref,o=t.refCleanup;if(s!==null)if(typeof o=="function")try{o()}catch(u){Ze(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){Ze(t,a,u)}else s.current=null}function mg(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){Ze(t,t.return,u)}}function md(t,a,s){try{var o=t.stateNode;Xx(o,t.type,s,a),o[Zt]=a}catch(u){Ze(t,t.return,u)}}function hg(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Ua(t.type)||t.tag===4}function hd(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||hg(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&&Ua(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 gd(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=Fn));else if(o!==4&&(o===27&&Ua(t.type)&&(s=t.stateNode,a=null),t=t.child,t!==null))for(gd(t,a,s),t=t.sibling;t!==null;)gd(t,a,s),t=t.sibling}function cl(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&&Ua(t.type)&&(s=t.stateNode),t=t.child,t!==null))for(cl(t,a,s),t=t.sibling;t!==null;)cl(t,a,s),t=t.sibling}function gg(t){var a=t.stateNode,s=t.memoizedProps;try{for(var o=t.type,u=a.attributes;u.length;)a.removeAttributeNode(u[0]);$t(a,o,s),a[Bt]=t,a[Zt]=s}catch(m){Ze(t,t.return,m)}}var oa=!1,kt=!1,yd=!1,yg=typeof WeakSet=="function"?WeakSet:Set,zt=null;function Tx(t,a){if(t=t.containerInfo,qd=El,t=Tm(t),uu(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,m=o.focusNode;o=o.focusOffset;try{s.nodeType,m.nodeType}catch{s=null;break e}var b=0,j=-1,C=-1,L=0,G=0,Y=t,U=null;t:for(;;){for(var V;Y!==s||u!==0&&Y.nodeType!==3||(j=b+u),Y!==m||o!==0&&Y.nodeType!==3||(C=b+o),Y.nodeType===3&&(b+=Y.nodeValue.length),(V=Y.firstChild)!==null;)U=Y,Y=V;for(;;){if(Y===t)break t;if(U===s&&++L===u&&(j=b),U===m&&++G===o&&(C=b),(V=Y.nextSibling)!==null)break;Y=U,U=Y.parentNode}Y=V}s=j===-1||C===-1?null:{start:j,end:C}}else s=null}s=s||{start:0,end:0}}else s=null;for(Ud={focusedElem:t,selectionRange:s},El=!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,m=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&&m!==null){t=void 0,s=a,u=m.memoizedProps,m=m.memoizedState,o=s.stateNode;try{var me=vi(s.type,u);t=o.getSnapshotBeforeUpdate(me,m),o.__reactInternalSnapshotBeforeUpdate=t}catch(we){Ze(s,s.return,we)}}break;case 3:if((t&1024)!==0){if(t=a.stateNode.containerInfo,s=t.nodeType,s===9)Id(t);else if(s===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":Id(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 bg(t,a,s){var o=s.flags;switch(s.tag){case 0:case 11:case 15:ca(t,s),o&4&&Er(5,s);break;case 1:if(ca(t,s),o&4)if(t=s.stateNode,a===null)try{t.componentDidMount()}catch(b){Ze(s,s.return,b)}else{var u=vi(s.type,a.memoizedProps);a=a.memoizedState;try{t.componentDidUpdate(u,a,t.__reactInternalSnapshotBeforeUpdate)}catch(b){Ze(s,s.return,b)}}o&64&&fg(s),o&512&&Or(s,s.return);break;case 3:if(ca(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{nh(t,a)}catch(b){Ze(s,s.return,b)}}break;case 27:a===null&&o&4&&gg(s);case 26:case 5:ca(t,s),a===null&&o&4&&mg(s),o&512&&Or(s,s.return);break;case 12:ca(t,s);break;case 31:ca(t,s),o&4&&xg(t,s);break;case 13:ca(t,s),o&4&&wg(t,s),o&64&&(t=s.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(s=qx.bind(null,s),iw(t,s))));break;case 22:if(o=s.memoizedState!==null||oa,!o){a=a!==null&&a.memoizedState!==null||kt,u=oa;var m=kt;oa=o,(kt=a)&&!m?ua(t,s,(s.subtreeFlags&8772)!==0):ca(t,s),oa=u,kt=m}break;case 30:break;default:ca(t,s)}}function vg(t){var a=t.alternate;a!==null&&(t.alternate=null,vg(a)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(a=t.stateNode,a!==null&&Kc(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 lt=null,Xt=!1;function la(t,a,s){for(s=s.child;s!==null;)Sg(t,a,s),s=s.sibling}function Sg(t,a,s){if(ht&&typeof ht.onCommitFiberUnmount=="function")try{ht.onCommitFiberUnmount(Sa,s)}catch{}switch(s.tag){case 26:kt||Pn(s,a),la(t,a,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:kt||Pn(s,a);var o=lt,u=Xt;Ua(s.type)&&(lt=s.stateNode,Xt=!1),la(t,a,s),$r(s.stateNode),lt=o,Xt=u;break;case 5:kt||Pn(s,a);case 6:if(o=lt,u=Xt,lt=null,la(t,a,s),lt=o,Xt=u,lt!==null)if(Xt)try{(lt.nodeType===9?lt.body:lt.nodeName==="HTML"?lt.ownerDocument.body:lt).removeChild(s.stateNode)}catch(m){Ze(s,a,m)}else try{lt.removeChild(s.stateNode)}catch(m){Ze(s,a,m)}break;case 18:lt!==null&&(Xt?(t=lt,fy(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,s.stateNode),Ns(t)):fy(lt,s.stateNode));break;case 4:o=lt,u=Xt,lt=s.stateNode.containerInfo,Xt=!0,la(t,a,s),lt=o,Xt=u;break;case 0:case 11:case 14:case 15:za(2,s,a),kt||za(4,s,a),la(t,a,s);break;case 1:kt||(Pn(s,a),o=s.stateNode,typeof o.componentWillUnmount=="function"&&pg(s,a,o)),la(t,a,s);break;case 21:la(t,a,s);break;case 22:kt=(o=kt)||s.memoizedState!==null,la(t,a,s),kt=o;break;default:la(t,a,s)}}function xg(t,a){if(a.memoizedState===null&&(t=a.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{Ns(t)}catch(s){Ze(a,a.return,s)}}}function wg(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){Ze(a,a.return,s)}}function Ex(t){switch(t.tag){case 31:case 13:case 19:var a=t.stateNode;return a===null&&(a=t.stateNode=new yg),a;case 22:return t=t.stateNode,a=t._retryCache,a===null&&(a=t._retryCache=new yg),a;default:throw Error(r(435,t.tag))}}function ul(t,a){var s=Ex(t);a.forEach(function(o){if(!s.has(o)){s.add(o);var u=Ux.bind(null,t,o);o.then(u,u)}})}function Ft(t,a){var s=a.deletions;if(s!==null)for(var o=0;o<s.length;o++){var u=s[o],m=t,b=a,j=b;e:for(;j!==null;){switch(j.tag){case 27:if(Ua(j.type)){lt=j.stateNode,Xt=!1;break e}break;case 5:lt=j.stateNode,Xt=!1;break e;case 3:case 4:lt=j.stateNode.containerInfo,Xt=!0;break e}j=j.return}if(lt===null)throw Error(r(160));Sg(m,b,u),lt=null,Xt=!1,m=u.alternate,m!==null&&(m.return=null),u.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)jg(a,t),a=a.sibling}var zn=null;function jg(t,a){var s=t.alternate,o=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:Ft(a,t),Jt(t),o&4&&(za(3,t,t.return),Er(3,t),za(5,t,t.return));break;case 1:Ft(a,t),Jt(t),o&512&&(kt||s===null||Pn(s,s.return)),o&64&&oa&&(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=zn;if(Ft(a,t),Jt(t),o&512&&(kt||s===null||Pn(s,s.return)),o&4){var m=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":m=u.getElementsByTagName("title")[0],(!m||m[ir]||m[Bt]||m.namespaceURI==="http://www.w3.org/2000/svg"||m.hasAttribute("itemprop"))&&(m=u.createElement(o),u.head.insertBefore(m,u.querySelector("head > title"))),$t(m,o,s),m[Bt]=t,Ot(m),o=m;break e;case"link":var b=jy("link","href",u).get(o+(s.href||""));if(b){for(var j=0;j<b.length;j++)if(m=b[j],m.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&m.getAttribute("rel")===(s.rel==null?null:s.rel)&&m.getAttribute("title")===(s.title==null?null:s.title)&&m.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){b.splice(j,1);break t}}m=u.createElement(o),$t(m,o,s),u.head.appendChild(m);break;case"meta":if(b=jy("meta","content",u).get(o+(s.content||""))){for(j=0;j<b.length;j++)if(m=b[j],m.getAttribute("content")===(s.content==null?null:""+s.content)&&m.getAttribute("name")===(s.name==null?null:s.name)&&m.getAttribute("property")===(s.property==null?null:s.property)&&m.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&m.getAttribute("charset")===(s.charSet==null?null:s.charSet)){b.splice(j,1);break t}}m=u.createElement(o),$t(m,o,s),u.head.appendChild(m);break;default:throw Error(r(468,o))}m[Bt]=t,Ot(m),o=m}t.stateNode=o}else Ny(u,t.type,t.stateNode);else t.stateNode=wy(u,o,t.memoizedProps);else m!==o?(m===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):m.count--,o===null?Ny(u,t.type,t.stateNode):wy(u,o,t.memoizedProps)):o===null&&t.stateNode!==null&&md(t,t.memoizedProps,s.memoizedProps)}break;case 27:Ft(a,t),Jt(t),o&512&&(kt||s===null||Pn(s,s.return)),s!==null&&o&4&&md(t,t.memoizedProps,s.memoizedProps);break;case 5:if(Ft(a,t),Jt(t),o&512&&(kt||s===null||Pn(s,s.return)),t.flags&32){u=t.stateNode;try{Ki(u,"")}catch(me){Ze(t,t.return,me)}}o&4&&t.stateNode!=null&&(u=t.memoizedProps,md(t,u,s!==null?s.memoizedProps:u)),o&1024&&(yd=!0);break;case 6:if(Ft(a,t),Jt(t),o&4){if(t.stateNode===null)throw Error(r(162));o=t.memoizedProps,s=t.stateNode;try{s.nodeValue=o}catch(me){Ze(t,t.return,me)}}break;case 3:if(Al=null,u=zn,zn=Nl(a.containerInfo),Ft(a,t),zn=u,Jt(t),o&4&&s!==null&&s.memoizedState.isDehydrated)try{Ns(a.containerInfo)}catch(me){Ze(t,t.return,me)}yd&&(yd=!1,Ng(t));break;case 4:o=zn,zn=Nl(t.stateNode.containerInfo),Ft(a,t),Jt(t),zn=o;break;case 12:Ft(a,t),Jt(t);break;case 31:Ft(a,t),Jt(t),o&4&&(o=t.updateQueue,o!==null&&(t.updateQueue=null,ul(t,o)));break;case 13:Ft(a,t),Jt(t),t.child.flags&8192&&t.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(fl=Vt()),o&4&&(o=t.updateQueue,o!==null&&(t.updateQueue=null,ul(t,o)));break;case 22:u=t.memoizedState!==null;var C=s!==null&&s.memoizedState!==null,L=oa,G=kt;if(oa=L||u,kt=G||C,Ft(a,t),kt=G,oa=L,Jt(t),o&8192)e:for(a=t.stateNode,a._visibility=u?a._visibility&-2:a._visibility|1,u&&(s===null||C||oa||kt||Si(t)),s=null,a=t;;){if(a.tag===5||a.tag===26){if(s===null){C=s=a;try{if(m=C.stateNode,u)b=m.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none";else{j=C.stateNode;var Y=C.memoizedProps.style,U=Y!=null&&Y.hasOwnProperty("display")?Y.display:null;j.style.display=U==null||typeof U=="boolean"?"":(""+U).trim()}}catch(me){Ze(C,C.return,me)}}}else if(a.tag===6){if(s===null){C=a;try{C.stateNode.nodeValue=u?"":C.memoizedProps}catch(me){Ze(C,C.return,me)}}}else if(a.tag===18){if(s===null){C=a;try{var V=C.stateNode;u?py(V,!0):py(C.stateNode,!1)}catch(me){Ze(C,C.return,me)}}}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,ul(t,s))));break;case 19:Ft(a,t),Jt(t),o&4&&(o=t.updateQueue,o!==null&&(t.updateQueue=null,ul(t,o)));break;case 30:break;case 21:break;default:Ft(a,t),Jt(t)}}function Jt(t){var a=t.flags;if(a&2){try{for(var s,o=t.return;o!==null;){if(hg(o)){s=o;break}o=o.return}if(s==null)throw Error(r(160));switch(s.tag){case 27:var u=s.stateNode,m=hd(t);cl(t,m,u);break;case 5:var b=s.stateNode;s.flags&32&&(Ki(b,""),s.flags&=-33);var j=hd(t);cl(t,j,b);break;case 3:case 4:var C=s.stateNode.containerInfo,L=hd(t);gd(t,L,C);break;default:throw Error(r(161))}}catch(G){Ze(t,t.return,G)}t.flags&=-3}a&4096&&(t.flags&=-4097)}function Ng(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var a=t;Ng(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),t=t.sibling}}function ca(t,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)bg(t,a.alternate,a),a=a.sibling}function Si(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),Si(a);break;case 1:Pn(a,a.return);var s=a.stateNode;typeof s.componentWillUnmount=="function"&&pg(a,a.return,s),Si(a);break;case 27:$r(a.stateNode);case 26:case 5:Pn(a,a.return),Si(a);break;case 22:a.memoizedState===null&&Si(a);break;case 30:Si(a);break;default:Si(a)}t=t.sibling}}function ua(t,a,s){for(s=s&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var o=a.alternate,u=t,m=a,b=m.flags;switch(m.tag){case 0:case 11:case 15:ua(u,m,s),Er(4,m);break;case 1:if(ua(u,m,s),o=m,u=o.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(L){Ze(o,o.return,L)}if(o=m,u=o.updateQueue,u!==null){var j=o.stateNode;try{var C=u.shared.hiddenCallbacks;if(C!==null)for(u.shared.hiddenCallbacks=null,u=0;u<C.length;u++)th(C[u],j)}catch(L){Ze(o,o.return,L)}}s&&b&64&&fg(m),Or(m,m.return);break;case 27:gg(m);case 26:case 5:ua(u,m,s),s&&o===null&&b&4&&mg(m),Or(m,m.return);break;case 12:ua(u,m,s);break;case 31:ua(u,m,s),s&&b&4&&xg(u,m);break;case 13:ua(u,m,s),s&&b&4&&wg(u,m);break;case 22:m.memoizedState===null&&ua(u,m,s),Or(m,m.return);break;case 30:break;default:ua(u,m,s)}a=a.sibling}}function bd(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 vd(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;)kg(t,a,s,o),a=a.sibling}function kg(t,a,s,o){var u=a.flags;switch(a.tag){case 0:case 11:case 15:Dn(t,a,s,o),u&2048&&Er(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 m=a.memoizedProps,b=m.id,j=m.onPostCommit;typeof j=="function"&&j(b,a.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(C){Ze(a,a.return,C)}}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:m=a.stateNode,b=a.alternate,a.memoizedState!==null?m._visibility&2?Dn(t,a,s,o):zr(t,a):m._visibility&2?Dn(t,a,s,o):(m._visibility|=2,ps(t,a,s,o,(a.subtreeFlags&10256)!==0||!1)),u&2048&&bd(b,a);break;case 24:Dn(t,a,s,o),u&2048&&vd(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 m=t,b=a,j=s,C=o,L=b.flags;switch(b.tag){case 0:case 11:case 15:ps(m,b,j,C,u),Er(8,b);break;case 23:break;case 22:var G=b.stateNode;b.memoizedState!==null?G._visibility&2?ps(m,b,j,C,u):zr(m,b):(G._visibility|=2,ps(m,b,j,C,u)),u&&L&2048&&bd(b.alternate,b);break;case 24:ps(m,b,j,C,u),u&&L&2048&&vd(b.alternate,b);break;default:ps(m,b,j,C,u)}a=a.sibling}}function zr(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:zr(s,o),u&2048&&bd(o.alternate,o);break;case 24:zr(s,o),u&2048&&vd(o.alternate,o);break;default:zr(s,o)}a=a.sibling}}var Dr=8192;function ms(t,a,s){if(t.subtreeFlags&Dr)for(t=t.child;t!==null;)Ag(t,a,s),t=t.sibling}function Ag(t,a,s){switch(t.tag){case 26:ms(t,a,s),t.flags&Dr&&t.memoizedState!==null&&gw(s,zn,t.memoizedState,t.memoizedProps);break;case 5:ms(t,a,s);break;case 3:case 4:var o=zn;zn=Nl(t.stateNode.containerInfo),ms(t,a,s),zn=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 _g(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,Tg(o,t)}_g(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Cg(t),t=t.sibling}function Cg(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,dl(t)):Rr(t);break;default:Rr(t)}}function dl(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,Tg(o,t)}_g(t)}for(t=t.child;t!==null;){switch(a=t,a.tag){case 0:case 11:case 15:za(8,a,a.return),dl(a);break;case 22:s=a.stateNode,s._visibility&2&&(s._visibility&=-3,dl(a));break;default:dl(a)}t=t.sibling}}function Tg(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,m=o.return;if(vg(o),o===s){zt=null;break e}if(u!==null){u.return=m,zt=u;break e}zt=m}}}var Ox={getCacheForType:function(t){var a=qt(wt),s=a.data.get(t);return s===void 0&&(s=t(),a.data.set(t,s)),s},cacheSignal:function(){return qt(wt).controller.signal}},zx=typeof WeakMap=="function"?WeakMap:Map,Ge=0,We=null,Re=null,Be=0,Ke=0,cn=null,Da=!1,hs=!1,Sd=!1,da=0,mt=0,Ra=0,xi=0,xd=0,un=0,gs=0,Mr=null,Wt=null,wd=!1,fl=0,Eg=0,pl=1/0,ml=null,Ma=null,Ct=0,Ba=null,ys=null,fa=0,jd=0,Nd=null,Og=null,Br=0,kd=null;function dn(){return(Ge&2)!==0&&Be!==0?Be&-Be:$.T!==null?Od():Kp()}function zg(){if(un===0)if((Be&536870912)===0||qe){var t=Ui;Ui<<=1,(Ui&3932160)===0&&(Ui=262144),un=t}else un=536870912;return t=on.current,t!==null&&(t.flags|=32),un}function en(t,a,s){(t===We&&(Ke===2||Ke===9)||t.cancelPendingCommit!==null)&&(bs(t,0),La(t,Be,un,!1)),ii(t,s),((Ge&2)===0||t!==We)&&(t===We&&((Ge&2)===0&&(xi|=s),mt===4&&La(t,Be,un,!1)),Gn(t))}function Dg(t,a,s){if((Ge&6)!==0)throw Error(r(327));var o=!s&&(a&127)===0&&(a&t.expiredLanes)===0||ai(t,a),u=o?Mx(t,a):_d(t,a,!0),m=o;do{if(u===0){hs&&!o&&La(t,a,0,!1);break}else{if(s=t.current.alternate,m&&!Dx(s)){u=_d(t,a,!1),m=!1;continue}if(u===2){if(m=a,t.errorRecoveryDisabledLanes&m)var b=0;else b=t.pendingLanes&-536870913,b=b!==0?b:b&536870912?536870912:0;if(b!==0){a=b;e:{var j=t;u=Mr;var C=j.current.memoizedState.isDehydrated;if(C&&(bs(j,b).flags|=256),b=_d(j,b,!1),b!==2){if(Sd&&!C){j.errorRecoveryDisabledLanes|=m,xi|=m,u=4;break e}m=Wt,Wt=u,m!==null&&(Wt===null?Wt=m:Wt.push.apply(Wt,m))}u=b}if(m=!1,u!==2)continue}}if(u===1){bs(t,0),La(t,a,0,!0);break}e:{switch(o=t,m=u,m){case 0:case 1:throw Error(r(345));case 4:if((a&4194048)!==a)break;case 6:La(o,a,un,!Da);break e;case 2:Wt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((a&62914560)===a&&(u=fl+300-Vt(),10<u)){if(La(o,a,un,!Da),pn(o,0,!0)!==0)break e;fa=a,o.timeoutHandle=uy(Rg.bind(null,o,s,Wt,ml,wd,a,un,xi,gs,Da,m,"Throttled",-0,0),u);break e}Rg(o,s,Wt,ml,wd,a,un,xi,gs,Da,m,null,-0,0)}}break}while(!0);Gn(t)}function Rg(t,a,s,o,u,m,b,j,C,L,G,Y,U,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:Fn},Ag(a,m,Y);var me=(m&62914560)===m?fl-Vt():(m&4194048)===m?Eg-Vt():0;if(me=yw(Y,me),me!==null){fa=m,t.cancelPendingCommit=me(Ig.bind(null,t,a,m,s,o,u,b,j,C,G,Y,null,U,V)),La(t,m,b,!L);return}}Ig(t,a,m,s,o,u,b,j,C)}function Dx(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],m=u.getSnapshot;u=u.value;try{if(!sn(m(),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 La(t,a,s,o){a&=~xd,a&=~xi,t.suspendedLanes|=a,t.pingedLanes&=~a,o&&(t.warmLanes|=a),o=t.expirationTimes;for(var u=a;0<u;){var m=31-_t(u),b=1<<m;o[m]=-1,u&=~b}s!==0&&ar(t,s,a)}function hl(){return(Ge&6)===0?(Lr(0),!1):!0}function Ad(){if(Re!==null){if(Ke===0)var t=Re.return;else t=Re,ta=fi=null,Iu(t),ls=null,vr=0,t=Re;for(;t!==null;)dg(t.alternate,t),t=t.return;Re=null}}function bs(t,a){var s=t.timeoutHandle;s!==-1&&(t.timeoutHandle=-1,Wx(s)),s=t.cancelPendingCommit,s!==null&&(t.cancelPendingCommit=null,s()),fa=0,Ad(),We=t,Re=s=Wn(t.current,null),Be=a,Ke=0,cn=null,Da=!1,hs=ai(t,a),Sd=!1,gs=un=xd=xi=Ra=mt=0,Wt=Mr=null,wd=!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-_t(o),m=1<<u;a|=t[u],o&=~m}return da=a,Bo(),s}function Mg(t,a){Ee=null,$.H=_r,a===os||a===Go?(a=Fm(),Ke=3):a===Eu?(a=Fm(),Ke=4):Ke=a===id?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,cn=a,Re===null&&(mt=1,il(t,yn(a,t.current)))}function Bg(){var t=on.current;return t===null?!0:(Be&4194048)===Be?xn===null:(Be&62914560)===Be||(Be&536870912)!==0?t===xn:!1}function Lg(){var t=$.H;return $.H=_r,t===null?_r:t}function qg(){var t=$.A;return $.A=Ox,t}function gl(){mt=4,Da||(Be&4194048)!==Be&&on.current!==null||(hs=!0),(Ra&134217727)===0&&(xi&134217727)===0||We===null||La(We,Be,un,!1)}function _d(t,a,s){var o=Ge;Ge|=2;var u=Lg(),m=qg();(We!==t||Be!==a)&&(ml=null,bs(t,a)),a=!1;var b=mt;e:do try{if(Ke!==0&&Re!==null){var j=Re,C=cn;switch(Ke){case 8:Ad(),b=6;break e;case 3:case 2:case 9:case 6:on.current===null&&(a=!0);var L=Ke;if(Ke=0,cn=null,vs(t,j,C,L),s&&hs){b=0;break e}break;default:L=Ke,Ke=0,cn=null,vs(t,j,C,L)}}Rx(),b=mt;break}catch(G){Mg(t,G)}while(!0);return a&&t.shellSuspendCounter++,ta=fi=null,Ge=o,$.H=u,$.A=m,Re===null&&(We=null,Be=0,Bo()),b}function Rx(){for(;Re!==null;)Ug(Re)}function Mx(t,a){var s=Ge;Ge|=2;var o=Lg(),u=qg();We!==t||Be!==a?(ml=null,pl=Vt()+500,bs(t,a)):hs=ai(t,a);e:do try{if(Ke!==0&&Re!==null){a=Re;var m=cn;t:switch(Ke){case 1:Ke=0,cn=null,vs(t,a,m,1);break;case 2:case 9:if(Ym(m)){Ke=0,cn=null,$g(a);break}a=function(){Ke!==2&&Ke!==9||We!==t||(Ke=7),Gn(t)},m.then(a,a);break e;case 3:Ke=7;break e;case 4:Ke=5;break e;case 7:Ym(m)?(Ke=0,cn=null,$g(a)):(Ke=0,cn=null,vs(t,a,m,7));break;case 5:var b=null;switch(Re.tag){case 26:b=Re.memoizedState;case 5:case 27:var j=Re;if(b?ky(b):j.stateNode.complete){Ke=0,cn=null;var C=j.sibling;if(C!==null)Re=C;else{var L=j.return;L!==null?(Re=L,yl(L)):Re=null}break t}}Ke=0,cn=null,vs(t,a,m,5);break;case 6:Ke=0,cn=null,vs(t,a,m,6);break;case 8:Ad(),mt=6;break e;default:throw Error(r(462))}}Bx();break}catch(G){Mg(t,G)}while(!0);return ta=fi=null,$.H=o,$.A=u,Ge=s,Re!==null?0:(We=null,Be=0,Bo(),mt)}function Bx(){for(;Re!==null&&!yo();)Ug(Re)}function Ug(t){var a=cg(t.alternate,t,da);t.memoizedProps=t.pendingProps,a===null?yl(t):Re=a}function $g(t){var a=t,s=a.alternate;switch(a.tag){case 15:case 0:a=ag(s,a,a.pendingProps,a.type,void 0,Be);break;case 11:a=ag(s,a,a.pendingProps,a.type.render,a.ref,Be);break;case 5:Iu(a);default:dg(s,a),a=Re=qm(a,da),a=cg(s,a,da)}t.memoizedProps=t.pendingProps,a===null?yl(t):Re=a}function vs(t,a,s,o){ta=fi=null,Iu(a),ls=null,vr=0;var u=a.return;try{if(Nx(t,u,a,s,Be)){mt=1,il(t,yn(s,t.current)),Re=null;return}}catch(m){if(u!==null)throw Re=u,m;mt=1,il(t,yn(s,t.current)),Re=null;return}a.flags&32768?(qe||o===1?t=!0:hs||(Be&536870912)!==0?t=!1:(Da=t=!0,(o===2||o===9||o===3||o===6)&&(o=on.current,o!==null&&o.tag===13&&(o.flags|=16384))),Vg(a,t)):yl(a)}function yl(t){var a=t;do{if((a.flags&32768)!==0){Vg(a,Da);return}t=a.return;var s=_x(a.alternate,a,da);if(s!==null){Re=s;return}if(a=a.sibling,a!==null){Re=a;return}Re=a=t}while(a!==null);mt===0&&(mt=5)}function Vg(t,a){do{var s=Cx(t.alternate,t);if(s!==null){s.flags&=32767,Re=s;return}if(s=t.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!a&&(t=t.sibling,t!==null)){Re=t;return}Re=t=s}while(t!==null);mt=6,Re=null}function Ig(t,a,s,o,u,m,b,j,C){t.cancelPendingCommit=null;do bl();while(Ct!==0);if((Ge&6)!==0)throw Error(r(327));if(a!==null){if(a===t.current)throw Error(r(177));if(m=a.lanes|a.childLanes,m|=hu,Pc(t,s,m,b,j,C),t===We&&(Re=We=null,Be=0),ys=a,Ba=t,fa=s,jd=m,Nd=u,Og=o,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,$x(va,function(){return Kg(),null})):(t.callbackNode=null,t.callbackPriority=0),o=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||o){o=$.T,$.T=null,u=W.p,W.p=2,b=Ge,Ge|=4;try{Tx(t,a,s)}finally{Ge=b,W.p=u,$.T=o}}Ct=1,Pg(),Gg(),Hg()}}function Pg(){if(Ct===1){Ct=0;var t=Ba,a=ys,s=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||s){s=$.T,$.T=null;var o=W.p;W.p=2;var u=Ge;Ge|=4;try{jg(a,t);var m=Ud,b=Tm(t.containerInfo),j=m.focusedElem,C=m.selectionRange;if(b!==j&&j&&j.ownerDocument&&Cm(j.ownerDocument.documentElement,j)){if(C!==null&&uu(j)){var L=C.start,G=C.end;if(G===void 0&&(G=L),"selectionStart"in j)j.selectionStart=L,j.selectionEnd=Math.min(G,j.value.length);else{var Y=j.ownerDocument||document,U=Y&&Y.defaultView||window;if(U.getSelection){var V=U.getSelection(),me=j.textContent.length,we=Math.min(C.start,me),Je=C.end===void 0?we:Math.min(C.end,me);!V.extend&&we>Je&&(b=Je,Je=we,we=b);var D=_m(j,we),E=_m(j,Je);if(D&&E&&(V.rangeCount!==1||V.anchorNode!==D.node||V.anchorOffset!==D.offset||V.focusNode!==E.node||V.focusOffset!==E.offset)){var B=Y.createRange();B.setStart(D.node,D.offset),V.removeAllRanges(),we>Je?(V.addRange(B),V.extend(E.node,E.offset)):(B.setEnd(E.node,E.offset),V.addRange(B))}}}}for(Y=[],V=j;V=V.parentNode;)V.nodeType===1&&Y.push({element:V,left:V.scrollLeft,top:V.scrollTop});for(typeof j.focus=="function"&&j.focus(),j=0;j<Y.length;j++){var K=Y[j];K.element.scrollLeft=K.left,K.element.scrollTop=K.top}}El=!!qd,Ud=qd=null}finally{Ge=u,W.p=o,$.T=s}}t.current=a,Ct=2}}function Gg(){if(Ct===2){Ct=0;var t=Ba,a=ys,s=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||s){s=$.T,$.T=null;var o=W.p;W.p=2;var u=Ge;Ge|=4;try{bg(t,a.alternate,a)}finally{Ge=u,W.p=o,$.T=s}}Ct=3}}function Hg(){if(Ct===4||Ct===3){Ct=0,bo();var t=Ba,a=ys,s=fa,o=Og;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?Ct=5:(Ct=0,ys=Ba=null,Qg(t,t.pendingLanes));var u=t.pendingLanes;if(u===0&&(Ma=null),Hc(s),a=a.stateNode,ht&&typeof ht.onCommitFiberRoot=="function")try{ht.onCommitFiberRoot(Sa,a,void 0,(a.current.flags&128)===128)}catch{}if(o!==null){a=$.T,u=W.p,W.p=2,$.T=null;try{for(var m=t.onRecoverableError,b=0;b<o.length;b++){var j=o[b];m(j.value,{componentStack:j.stack})}}finally{$.T=a,W.p=u}}(fa&3)!==0&&bl(),Gn(t),u=t.pendingLanes,(s&261930)!==0&&(u&42)!==0?t===kd?Br++:(Br=0,kd=t):Br=0,Lr(0)}}function Qg(t,a){(t.pooledCacheLanes&=a)===0&&(a=t.pooledCache,a!=null&&(t.pooledCache=null,yr(a)))}function bl(){return Pg(),Gg(),Hg(),Kg()}function Kg(){if(Ct!==5)return!1;var t=Ba,a=jd;jd=0;var s=Hc(fa),o=$.T,u=W.p;try{W.p=32>s?32:s,$.T=null,s=Nd,Nd=null;var m=Ba,b=fa;if(Ct=0,ys=Ba=null,fa=0,(Ge&6)!==0)throw Error(r(331));var j=Ge;if(Ge|=4,Cg(m.current),kg(m,m.current,b,s),Ge=j,Lr(0,!1),ht&&typeof ht.onPostCommitFiberRoot=="function")try{ht.onPostCommitFiberRoot(Sa,m)}catch{}return!0}finally{W.p=u,$.T=o,Qg(t,a)}}function Zg(t,a,s){a=yn(s,a),a=ad(t.stateNode,a,2),t=Ta(t,a,2),t!==null&&(ii(t,2),Gn(t))}function Ze(t,a,s){if(t.tag===3)Zg(t,t,s);else for(;a!==null;){if(a.tag===3){Zg(a,t,s);break}else if(a.tag===1){var o=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(Ma===null||!Ma.has(o))){t=yn(s,t),s=Yh(2),o=Ta(a,s,2),o!==null&&(Xh(s,o,a,t),ii(o,2),Gn(o));break}}a=a.return}}function Cd(t,a,s){var o=t.pingCache;if(o===null){o=t.pingCache=new zx;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)||(Sd=!0,u.add(s),t=Lx.bind(null,t,a,s),a.then(t,t))}function Lx(t,a,s){var o=t.pingCache;o!==null&&o.delete(a),t.pingedLanes|=t.suspendedLanes&s,t.warmLanes&=~s,We===t&&(Be&s)===s&&(mt===4||mt===3&&(Be&62914560)===Be&&300>Vt()-fl?(Ge&2)===0&&bs(t,0):xd|=s,gs===Be&&(gs=0)),Gn(t)}function Yg(t,a){a===0&&(a=ot()),t=ci(t,a),t!==null&&(ii(t,a),Gn(t))}function qx(t){var a=t.memoizedState,s=0;a!==null&&(s=a.retryLane),Yg(t,s)}function Ux(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),Yg(t,s)}function $x(t,a){return Bi(t,a)}var vl=null,Ss=null,Td=!1,Sl=!1,Ed=!1,qa=0;function Gn(t){t!==Ss&&t.next===null&&(Ss===null?vl=Ss=t:Ss=Ss.next=t),Sl=!0,Td||(Td=!0,Ix())}function Lr(t,a){if(!Ed&&Sl){Ed=!0;do for(var s=!1,o=vl;o!==null;){if(t!==0){var u=o.pendingLanes;if(u===0)var m=0;else{var b=o.suspendedLanes,j=o.pingedLanes;m=(1<<31-_t(42|t)+1)-1,m&=u&~(b&~j),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(s=!0,Wg(o,m))}else m=Be,m=pn(o,o===We?m:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(m&3)===0||ai(o,m)||(s=!0,Wg(o,m));o=o.next}while(s);Ed=!1}}function Vx(){Xg()}function Xg(){Sl=Td=!1;var t=0;qa!==0&&Jx()&&(t=qa);for(var a=Vt(),s=null,o=vl;o!==null;){var u=o.next,m=Fg(o,a);m===0?(o.next=null,s===null?vl=u:s.next=u,u===null&&(Ss=s)):(s=o,(t!==0||(m&3)!==0)&&(Sl=!0)),o=u}Ct!==0&&Ct!==5||Lr(t),qa!==0&&(qa=0)}function Fg(t,a){for(var s=t.suspendedLanes,o=t.pingedLanes,u=t.expirationTimes,m=t.pendingLanes&-62914561;0<m;){var b=31-_t(m),j=1<<b,C=u[b];C===-1?((j&s)===0||(j&o)!==0)&&(u[b]=ie(j,a)):C<=a&&(t.expiredLanes|=j),m&=~j}if(a=We,s=Be,s=pn(t,t===a?s:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),o=t.callbackNode,s===0||t===a&&(Ke===2||Ke===9)||t.cancelPendingCommit!==null)return o!==null&&o!==null&&nr(o),t.callbackNode=null,t.callbackPriority=0;if((s&3)===0||ai(t,s)){if(a=s&-s,a===t.callbackPriority)return a;switch(o!==null&&nr(o),Hc(s)){case 2:case 8:s=So;break;case 32:s=va;break;case 268435456:s=Li;break;default:s=va}return o=Jg.bind(null,t),s=Bi(s,o),t.callbackPriority=a,t.callbackNode=s,a}return o!==null&&o!==null&&nr(o),t.callbackPriority=2,t.callbackNode=null,2}function Jg(t,a){if(Ct!==0&&Ct!==5)return t.callbackNode=null,t.callbackPriority=0,null;var s=t.callbackNode;if(bl()&&t.callbackNode!==s)return null;var o=Be;return o=pn(t,t===We?o:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),o===0?null:(Dg(t,o,a),Fg(t,Vt()),t.callbackNode!=null&&t.callbackNode===s?Jg.bind(null,t):null)}function Wg(t,a){if(bl())return null;Dg(t,a,!0)}function Ix(){ew(function(){(Ge&6)!==0?Bi(vo,Vx):Xg()})}function Od(){if(qa===0){var t=ss;t===0&&(t=qi,qi<<=1,(qi&261888)===0&&(qi=256)),qa=t}return qa}function ey(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:Co(""+t)}function ty(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 Px(t,a,s,o,u){if(a==="submit"&&s&&s.stateNode===u){var m=ey((u[Zt]||null).action),b=o.submitter;b&&(a=(a=b[Zt]||null)?ey(a.formAction):b.getAttribute("formAction"),a!==null&&(m=a,b=null));var j=new zo("action","action",null,o,u);t.push({event:j,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(qa!==0){var C=b?ty(u,b):new FormData(u);Fu(s,{pending:!0,data:C,method:u.method,action:m},null,C)}}else typeof m=="function"&&(j.preventDefault(),C=b?ty(u,b):new FormData(u),Fu(s,{pending:!0,data:C,method:u.method,action:m},m,C))},currentTarget:u}]})}}for(var zd=0;zd<mu.length;zd++){var Dd=mu[zd],Gx=Dd.toLowerCase(),Hx=Dd[0].toUpperCase()+Dd.slice(1);On(Gx,"on"+Hx)}On(zm,"onAnimationEnd"),On(Dm,"onAnimationIteration"),On(Rm,"onAnimationStart"),On("dblclick","onDoubleClick"),On("focusin","onFocus"),On("focusout","onBlur"),On(ox,"onTransitionRun"),On(lx,"onTransitionStart"),On(cx,"onTransitionCancel"),On(Mm,"onTransitionEnd"),Hi("onMouseEnter",["mouseout","mouseover"]),Hi("onMouseLeave",["mouseout","mouseover"]),Hi("onPointerEnter",["pointerout","pointerover"]),Hi("onPointerLeave",["pointerout","pointerover"]),si("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),si("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),si("onBeforeInput",["compositionend","keypress","textInput","paste"]),si("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),si("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),si("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(" "),Qx=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(qr));function ny(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 m=void 0;if(a)for(var b=o.length-1;0<=b;b--){var j=o[b],C=j.instance,L=j.currentTarget;if(j=j.listener,C!==m&&u.isPropagationStopped())break e;m=j,u.currentTarget=L;try{m(u)}catch(G){Mo(G)}u.currentTarget=null,m=C}else for(b=0;b<o.length;b++){if(j=o[b],C=j.instance,L=j.currentTarget,j=j.listener,C!==m&&u.isPropagationStopped())break e;m=j,u.currentTarget=L;try{m(u)}catch(G){Mo(G)}u.currentTarget=null,m=C}}}}function Me(t,a){var s=a[Qc];s===void 0&&(s=a[Qc]=new Set);var o=t+"__bubble";s.has(o)||(ay(a,t,2,!1),s.add(o))}function Rd(t,a,s){var o=0;a&&(o|=4),ay(s,t,o,a)}var xl="_reactListening"+Math.random().toString(36).slice(2);function Md(t){if(!t[xl]){t[xl]=!0,Xp.forEach(function(s){s!=="selectionchange"&&(Qx.has(s)||Rd(s,!1,t),Rd(s,!0,t))});var a=t.nodeType===9?t:t.ownerDocument;a===null||a[xl]||(a[xl]=!0,Rd("selectionchange",!1,a))}}function ay(t,a,s,o){switch(zy(a)){case 2:var u=Sw;break;case 8:u=xw;break;default:u=Xd}s=u.bind(null,a,s,t),u=void 0,!tu||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 Bd(t,a,s,o,u){var m=o;if((a&1)===0&&(a&2)===0&&o!==null)e:for(;;){if(o===null)return;var b=o.tag;if(b===3||b===4){var j=o.stateNode.containerInfo;if(j===u)break;if(b===4)for(b=o.return;b!==null;){var C=b.tag;if((C===3||C===4)&&b.stateNode.containerInfo===u)return;b=b.return}for(;j!==null;){if(b=Ii(j),b===null)return;if(C=b.tag,C===5||C===6||C===26||C===27){o=m=b;continue e}j=j.parentNode}}o=o.return}lm(function(){var L=m,G=Wc(s),Y=[];e:{var U=Bm.get(t);if(U!==void 0){var V=zo,me=t;switch(t){case"keypress":if(Eo(s)===0)break e;case"keydown":case"keyup":V=U1;break;case"focusin":me="focus",V=su;break;case"focusout":me="blur",V=su;break;case"beforeblur":case"afterblur":V=su;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=dm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":V=_1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":V=I1;break;case zm:case Dm:case Rm:V=E1;break;case Mm:V=G1;break;case"scroll":case"scrollend":V=k1;break;case"wheel":V=Q1;break;case"copy":case"cut":case"paste":V=z1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":V=pm;break;case"toggle":case"beforetoggle":V=Z1}var we=(a&4)!==0,Je=!we&&(t==="scroll"||t==="scrollend"),D=we?U!==null?U+"Capture":null:U;we=[];for(var E=L,B;E!==null;){var K=E;if(B=K.stateNode,K=K.tag,K!==5&&K!==26&&K!==27||B===null||D===null||(K=rr(E,D),K!=null&&we.push(Ur(E,K,B))),Je)break;E=E.return}0<we.length&&(U=new V(U,me,null,s,G),Y.push({event:U,listeners:we}))}}if((a&7)===0){e:{if(U=t==="mouseover"||t==="pointerover",V=t==="mouseout"||t==="pointerout",U&&s!==Jc&&(me=s.relatedTarget||s.fromElement)&&(Ii(me)||me[Vi]))break e;if((V||U)&&(U=G.window===G?G:(U=G.ownerDocument)?U.defaultView||U.parentWindow:window,V?(me=s.relatedTarget||s.toElement,V=L,me=me?Ii(me):null,me!==null&&(Je=c(me),we=me.tag,me!==Je||we!==5&&we!==27&&we!==6)&&(me=null)):(V=null,me=L),V!==me)){if(we=dm,K="onMouseLeave",D="onMouseEnter",E="mouse",(t==="pointerout"||t==="pointerover")&&(we=pm,K="onPointerLeave",D="onPointerEnter",E="pointer"),Je=V==null?U:sr(V),B=me==null?U:sr(me),U=new we(K,E+"leave",V,s,G),U.target=Je,U.relatedTarget=B,K=null,Ii(G)===L&&(we=new we(D,E+"enter",me,s,G),we.target=B,we.relatedTarget=Je,K=we),Je=K,V&&me)t:{for(we=Kx,D=V,E=me,B=0,K=D;K;K=we(K))B++;K=0;for(var ve=E;ve;ve=we(ve))K++;for(;0<B-K;)D=we(D),B--;for(;0<K-B;)E=we(E),K--;for(;B--;){if(D===E||E!==null&&D===E.alternate){we=D;break t}D=we(D),E=we(E)}we=null}else we=null;V!==null&&iy(Y,U,V,we,!1),me!==null&&Je!==null&&iy(Y,Je,me,we,!0)}}e:{if(U=L?sr(L):window,V=U.nodeName&&U.nodeName.toLowerCase(),V==="select"||V==="input"&&U.type==="file")var Ie=xm;else if(vm(U))if(wm)Ie=ix;else{Ie=nx;var ye=tx}else V=U.nodeName,!V||V.toLowerCase()!=="input"||U.type!=="checkbox"&&U.type!=="radio"?L&&Fc(L.elementType)&&(Ie=xm):Ie=ax;if(Ie&&(Ie=Ie(t,L))){Sm(Y,Ie,s,G);break e}ye&&ye(t,U,L),t==="focusout"&&L&&U.type==="number"&&L.memoizedProps.value!=null&&Xc(U,"number",U.value)}switch(ye=L?sr(L):window,t){case"focusin":(vm(ye)||ye.contentEditable==="true")&&(Fi=ye,du=L,mr=null);break;case"focusout":mr=du=Fi=null;break;case"mousedown":fu=!0;break;case"contextmenu":case"mouseup":case"dragend":fu=!1,Em(Y,s,G);break;case"selectionchange":if(rx)break;case"keydown":case"keyup":Em(Y,s,G)}var Oe;if(ou)e:{switch(t){case"compositionstart":var Le="onCompositionStart";break e;case"compositionend":Le="onCompositionEnd";break e;case"compositionupdate":Le="onCompositionUpdate";break e}Le=void 0}else Xi?ym(t,s)&&(Le="onCompositionEnd"):t==="keydown"&&s.keyCode===229&&(Le="onCompositionStart");Le&&(mm&&s.locale!=="ko"&&(Xi||Le!=="onCompositionStart"?Le==="onCompositionEnd"&&Xi&&(Oe=cm()):(wa=G,nu="value"in wa?wa.value:wa.textContent,Xi=!0)),ye=wl(L,Le),0<ye.length&&(Le=new fm(Le,t,null,s,G),Y.push({event:Le,listeners:ye}),Oe?Le.data=Oe:(Oe=bm(s),Oe!==null&&(Le.data=Oe)))),(Oe=X1?F1(t,s):J1(t,s))&&(Le=wl(L,"onBeforeInput"),0<Le.length&&(ye=new fm("onBeforeInput","beforeinput",null,s,G),Y.push({event:ye,listeners:Le}),ye.data=Oe)),Px(Y,t,L,s,G)}ny(Y,a)})}function Ur(t,a,s){return{instance:t,listener:a,currentTarget:s}}function wl(t,a){for(var s=a+"Capture",o=[];t!==null;){var u=t,m=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||m===null||(u=rr(t,s),u!=null&&o.unshift(Ur(t,u,m)),u=rr(t,a),u!=null&&o.push(Ur(t,u,m))),t.tag===3)return o;t=t.return}return[]}function Kx(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function iy(t,a,s,o,u){for(var m=a._reactName,b=[];s!==null&&s!==o;){var j=s,C=j.alternate,L=j.stateNode;if(j=j.tag,C!==null&&C===o)break;j!==5&&j!==26&&j!==27||L===null||(C=L,u?(L=rr(s,m),L!=null&&b.unshift(Ur(s,L,C))):u||(L=rr(s,m),L!=null&&b.push(Ur(s,L,C)))),s=s.return}b.length!==0&&t.push({event:a,listeners:b})}var Zx=/\r\n?/g,Yx=/\u0000|\uFFFD/g;function sy(t){return(typeof t=="string"?t:""+t).replace(Zx,`
|
|
10
|
+
`).replace(Yx,"")}function ry(t,a){return a=sy(a),sy(t)===a}function Fe(t,a,s,o,u,m){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":Ao(t,"class",o);break;case"tabIndex":Ao(t,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":Ao(t,s,o);break;case"style":rm(t,o,m);break;case"data":if(a!=="object"){Ao(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=Co(""+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 m=="function"&&(s==="formAction"?(a!=="input"&&Fe(t,a,"name",u.name,u,null),Fe(t,a,"formEncType",u.formEncType,u,null),Fe(t,a,"formMethod",u.formMethod,u,null),Fe(t,a,"formTarget",u.formTarget,u,null)):(Fe(t,a,"encType",u.encType,u,null),Fe(t,a,"method",u.method,u,null),Fe(t,a,"target",u.target,u,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){t.removeAttribute(s);break}o=Co(""+o),t.setAttribute(s,o);break;case"onClick":o!=null&&(t.onclick=Fn);break;case"onScroll":o!=null&&Me("scroll",t);break;case"onScrollEnd":o!=null&&Me("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=Co(""+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":Me("beforetoggle",t),Me("toggle",t),ko(t,"popover",o);break;case"xlinkActuate":Xn(t,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":Xn(t,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":Xn(t,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":Xn(t,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":Xn(t,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":Xn(t,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":Xn(t,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":Xn(t,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":Xn(t,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":ko(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=j1.get(s)||s,ko(t,s,o))}}function Ld(t,a,s,o,u,m){switch(s){case"style":rm(t,o,m);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&&Me("scroll",t);break;case"onScrollEnd":o!=null&&Me("scrollend",t);break;case"onClick":o!=null&&(t.onclick=Fn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Fp.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(u=s.endsWith("Capture"),a=s.slice(2,u?s.length-7:void 0),m=t[Zt]||null,m=m!=null?m[s]:null,typeof m=="function"&&t.removeEventListener(a,m,u),typeof o=="function")){typeof m!="function"&&m!==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,""):ko(t,s,o)}}}function $t(t,a,s){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Me("error",t),Me("load",t);var o=!1,u=!1,m;for(m in s)if(s.hasOwnProperty(m)){var b=s[m];if(b!=null)switch(m){case"src":o=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,a));default:Fe(t,a,m,b,s,null)}}u&&Fe(t,a,"srcSet",s.srcSet,s,null),o&&Fe(t,a,"src",s.src,s,null);return;case"input":Me("invalid",t);var j=m=b=u=null,C=null,L=null;for(o in s)if(s.hasOwnProperty(o)){var G=s[o];if(G!=null)switch(o){case"name":u=G;break;case"type":b=G;break;case"checked":C=G;break;case"defaultChecked":L=G;break;case"value":m=G;break;case"defaultValue":j=G;break;case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(r(137,a));break;default:Fe(t,a,o,G,s,null)}}nm(t,m,j,C,L,b,u,!1);return;case"select":Me("invalid",t),o=b=m=null;for(u in s)if(s.hasOwnProperty(u)&&(j=s[u],j!=null))switch(u){case"value":m=j;break;case"defaultValue":b=j;break;case"multiple":o=j;default:Fe(t,a,u,j,s,null)}a=m,s=b,t.multiple=!!o,a!=null?Qi(t,!!o,a,!1):s!=null&&Qi(t,!!o,s,!0);return;case"textarea":Me("invalid",t),m=u=o=null;for(b in s)if(s.hasOwnProperty(b)&&(j=s[b],j!=null))switch(b){case"value":o=j;break;case"defaultValue":u=j;break;case"children":m=j;break;case"dangerouslySetInnerHTML":if(j!=null)throw Error(r(91));break;default:Fe(t,a,b,j,s,null)}im(t,o,u,m);return;case"option":for(C in s)s.hasOwnProperty(C)&&(o=s[C],o!=null)&&(C==="selected"?t.selected=o&&typeof o!="function"&&typeof o!="symbol":Fe(t,a,C,o,s,null));return;case"dialog":Me("beforetoggle",t),Me("toggle",t),Me("cancel",t),Me("close",t);break;case"iframe":case"object":Me("load",t);break;case"video":case"audio":for(o=0;o<qr.length;o++)Me(qr[o],t);break;case"image":Me("error",t),Me("load",t);break;case"details":Me("toggle",t);break;case"embed":case"source":case"link":Me("error",t),Me("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:Fe(t,a,L,o,s,null)}return;default:if(Fc(a)){for(G in s)s.hasOwnProperty(G)&&(o=s[G],o!==void 0&&Ld(t,a,G,o,s,void 0));return}}for(j in s)s.hasOwnProperty(j)&&(o=s[j],o!=null&&Fe(t,a,j,o,s,null))}function Xx(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,m=null,b=null,j=null,C=null,L=null,G=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":C=Y;default:o.hasOwnProperty(V)||Fe(t,a,V,null,o,Y)}}for(var U in o){var V=o[U];if(Y=s[U],o.hasOwnProperty(U)&&(V!=null||Y!=null))switch(U){case"type":m=V;break;case"name":u=V;break;case"checked":L=V;break;case"defaultChecked":G=V;break;case"value":b=V;break;case"defaultValue":j=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(r(137,a));break;default:V!==Y&&Fe(t,a,U,V,o,Y)}}Yc(t,b,j,C,L,G,m,u);return;case"select":V=b=j=U=null;for(m in s)if(C=s[m],s.hasOwnProperty(m)&&C!=null)switch(m){case"value":break;case"multiple":V=C;default:o.hasOwnProperty(m)||Fe(t,a,m,null,o,C)}for(u in o)if(m=o[u],C=s[u],o.hasOwnProperty(u)&&(m!=null||C!=null))switch(u){case"value":U=m;break;case"defaultValue":j=m;break;case"multiple":b=m;default:m!==C&&Fe(t,a,u,m,o,C)}a=j,s=b,o=V,U!=null?Qi(t,!!s,U,!1):!!o!=!!s&&(a!=null?Qi(t,!!s,a,!0):Qi(t,!!s,s?[]:"",!1));return;case"textarea":V=U=null;for(j in s)if(u=s[j],s.hasOwnProperty(j)&&u!=null&&!o.hasOwnProperty(j))switch(j){case"value":break;case"children":break;default:Fe(t,a,j,null,o,u)}for(b in o)if(u=o[b],m=s[b],o.hasOwnProperty(b)&&(u!=null||m!=null))switch(b){case"value":U=u;break;case"defaultValue":V=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(r(91));break;default:u!==m&&Fe(t,a,b,u,o,m)}am(t,U,V);return;case"option":for(var me in s)U=s[me],s.hasOwnProperty(me)&&U!=null&&!o.hasOwnProperty(me)&&(me==="selected"?t.selected=!1:Fe(t,a,me,null,o,U));for(C in o)U=o[C],V=s[C],o.hasOwnProperty(C)&&U!==V&&(U!=null||V!=null)&&(C==="selected"?t.selected=U&&typeof U!="function"&&typeof U!="symbol":Fe(t,a,C,U,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)U=s[we],s.hasOwnProperty(we)&&U!=null&&!o.hasOwnProperty(we)&&Fe(t,a,we,null,o,U);for(L in o)if(U=o[L],V=s[L],o.hasOwnProperty(L)&&U!==V&&(U!=null||V!=null))switch(L){case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(r(137,a));break;default:Fe(t,a,L,U,o,V)}return;default:if(Fc(a)){for(var Je in s)U=s[Je],s.hasOwnProperty(Je)&&U!==void 0&&!o.hasOwnProperty(Je)&&Ld(t,a,Je,void 0,o,U);for(G in o)U=o[G],V=s[G],!o.hasOwnProperty(G)||U===V||U===void 0&&V===void 0||Ld(t,a,G,U,o,V);return}}for(var D in s)U=s[D],s.hasOwnProperty(D)&&U!=null&&!o.hasOwnProperty(D)&&Fe(t,a,D,null,o,U);for(Y in o)U=o[Y],V=s[Y],!o.hasOwnProperty(Y)||U===V||U==null&&V==null||Fe(t,a,Y,U,o,V)}function oy(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Fx(){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],m=u.transferSize,b=u.initiatorType,j=u.duration;if(m&&j&&oy(b)){for(b=0,j=u.responseEnd,o+=1;o<s.length;o++){var C=s[o],L=C.startTime;if(L>j)break;var G=C.transferSize,Y=C.initiatorType;G&&oy(Y)&&(C=C.responseEnd,b+=G*(C<j?1:(j-L)/(C-L)))}if(--o,a+=8*(m+b)/(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 qd=null,Ud=null;function jl(t){return t.nodeType===9?t:t.ownerDocument}function ly(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 cy(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 $d(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 Vd=null;function Jx(){var t=window.event;return t&&t.type==="popstate"?t===Vd?!1:(Vd=t,!0):(Vd=null,!1)}var uy=typeof setTimeout=="function"?setTimeout:void 0,Wx=typeof clearTimeout=="function"?clearTimeout:void 0,dy=typeof Promise=="function"?Promise:void 0,ew=typeof queueMicrotask=="function"?queueMicrotask:typeof dy<"u"?function(t){return dy.resolve(null).then(t).catch(tw)}:uy;function tw(t){setTimeout(function(){throw t})}function Ua(t){return t==="head"}function fy(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 m=s.firstChild;m;){var b=m.nextSibling,j=m.nodeName;m[ir]||j==="SCRIPT"||j==="STYLE"||j==="LINK"&&m.rel.toLowerCase()==="stylesheet"||s.removeChild(m),m=b}}else s==="body"&&$r(t.ownerDocument.body);s=u}while(s);Ns(a)}function py(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 Id(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":Id(s),Kc(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}t.removeChild(s)}}function nw(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(m=t.getAttribute("rel"),m==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(m!==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(m=t.getAttribute("src"),(m!==(u.src==null?null:u.src)||t.getAttribute("type")!==(u.type==null?null:u.type)||t.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&m&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(a==="input"&&t.type==="hidden"){var m=u.name==null?null:""+u.name;if(u.type==="hidden"&&t.getAttribute("name")===m)return t}else return t;if(t=wn(t.nextSibling),t===null)break}return null}function aw(t,a,s){if(a==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!s||(t=wn(t.nextSibling),t===null))return null;return t}function my(t,a){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!a||(t=wn(t.nextSibling),t===null))return null;return t}function Pd(t){return t.data==="$?"||t.data==="$~"}function Gd(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function iw(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 wn(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 Hd=null;function hy(t){t=t.nextSibling;for(var a=0;t;){if(t.nodeType===8){var s=t.data;if(s==="/$"||s==="/&"){if(a===0)return wn(t.nextSibling);a--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||a++}t=t.nextSibling}return null}function gy(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 yy(t,a,s){switch(a=jl(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]);Kc(t)}var jn=new Map,by=new Set;function Nl(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var pa=W.d;W.d={f:sw,r:rw,D:ow,C:lw,L:cw,m:uw,X:fw,S:dw,M:pw};function sw(){var t=pa.f(),a=hl();return t||a}function rw(t){var a=Pi(t);a!==null&&a.tag===5&&a.type==="form"?Mh(a):pa.r(t)}var xs=typeof document>"u"?null:document;function vy(t,a,s){var o=xs;if(o&&typeof a=="string"&&a){var u=hn(a);u='link[rel="'+t+'"][href="'+u+'"]',typeof s=="string"&&(u+='[crossorigin="'+s+'"]'),by.has(u)||(by.add(u),t={rel:t,crossOrigin:s,href:a},o.querySelector(u)===null&&(a=o.createElement("link"),$t(a,"link",t),Ot(a),o.head.appendChild(a)))}}function ow(t){pa.D(t),vy("dns-prefetch",t,null)}function lw(t,a){pa.C(t,a),vy("preconnect",t,a)}function cw(t,a,s){pa.L(t,a,s);var o=xs;if(o&&t&&a){var u='link[rel="preload"][as="'+hn(a)+'"]';a==="image"&&s&&s.imageSrcSet?(u+='[imagesrcset="'+hn(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(u+='[imagesizes="'+hn(s.imageSizes)+'"]')):u+='[href="'+hn(t)+'"]';var m=u;switch(a){case"style":m=ws(t);break;case"script":m=js(t)}jn.has(m)||(t=x({rel:"preload",href:a==="image"&&s&&s.imageSrcSet?void 0:t,as:a},s),jn.set(m,t),o.querySelector(u)!==null||a==="style"&&o.querySelector(Vr(m))||a==="script"&&o.querySelector(Ir(m))||(a=o.createElement("link"),$t(a,"link",t),Ot(a),o.head.appendChild(a)))}}function uw(t,a){pa.m(t,a);var s=xs;if(s&&t){var o=a&&typeof a.as=="string"?a.as:"script",u='link[rel="modulepreload"][as="'+hn(o)+'"][href="'+hn(t)+'"]',m=u;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=js(t)}if(!jn.has(m)&&(t=x({rel:"modulepreload",href:t},a),jn.set(m,t),s.querySelector(u)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(Ir(m)))return}o=s.createElement("link"),$t(o,"link",t),Ot(o),s.head.appendChild(o)}}}function dw(t,a,s){pa.S(t,a,s);var o=xs;if(o&&t){var u=Gi(o).hoistableStyles,m=ws(t);a=a||"default";var b=u.get(m);if(!b){var j={loading:0,preload:null};if(b=o.querySelector(Vr(m)))j.loading=5;else{t=x({rel:"stylesheet",href:t,"data-precedence":a},s),(s=jn.get(m))&&Qd(t,s);var C=b=o.createElement("link");Ot(C),$t(C,"link",t),C._p=new Promise(function(L,G){C.onload=L,C.onerror=G}),C.addEventListener("load",function(){j.loading|=1}),C.addEventListener("error",function(){j.loading|=2}),j.loading|=4,kl(b,a,o)}b={type:"stylesheet",instance:b,count:1,state:j},u.set(m,b)}}}function fw(t,a){pa.X(t,a);var s=xs;if(s&&t){var o=Gi(s).hoistableScripts,u=js(t),m=o.get(u);m||(m=s.querySelector(Ir(u)),m||(t=x({src:t,async:!0},a),(a=jn.get(u))&&Kd(t,a),m=s.createElement("script"),Ot(m),$t(m,"link",t),s.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},o.set(u,m))}}function pw(t,a){pa.M(t,a);var s=xs;if(s&&t){var o=Gi(s).hoistableScripts,u=js(t),m=o.get(u);m||(m=s.querySelector(Ir(u)),m||(t=x({src:t,async:!0,type:"module"},a),(a=jn.get(u))&&Kd(t,a),m=s.createElement("script"),Ot(m),$t(m,"link",t),s.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},o.set(u,m))}}function Sy(t,a,s,o){var u=(u=ae.current)?Nl(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=Gi(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 m=Gi(u).hoistableStyles,b=m.get(t);if(b||(u=u.ownerDocument||u,b={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(t,b),(m=u.querySelector(Vr(t)))&&!m._p&&(b.instance=m,b.state.loading=5),jn.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},jn.set(t,s),m||mw(u,t,s,b.state))),a&&o===null)throw Error(r(528,""));return b}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=Gi(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="'+hn(t)+'"'}function Vr(t){return'link[rel="stylesheet"]['+t+"]"}function xy(t){return x({},t,{"data-precedence":t.precedence,precedence:null})}function mw(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}),$t(a,"link",s),Ot(a),t.head.appendChild(a))}function js(t){return'[src="'+hn(t)+'"]'}function Ir(t){return"script[async]"+t}function wy(t,a,s){if(a.count++,a.instance===null)switch(a.type){case"style":var o=t.querySelector('style[data-href~="'+hn(s.href)+'"]');if(o)return a.instance=o,Ot(o),o;var u=x({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return o=(t.ownerDocument||t).createElement("style"),Ot(o),$t(o,"style",u),kl(o,s.precedence,t),a.instance=o;case"stylesheet":u=ws(s.href);var m=t.querySelector(Vr(u));if(m)return a.state.loading|=4,a.instance=m,Ot(m),m;o=xy(s),(u=jn.get(u))&&Qd(o,u),m=(t.ownerDocument||t).createElement("link"),Ot(m);var b=m;return b._p=new Promise(function(j,C){b.onload=j,b.onerror=C}),$t(m,"link",o),a.state.loading|=4,kl(m,s.precedence,t),a.instance=m;case"script":return m=js(s.src),(u=t.querySelector(Ir(m)))?(a.instance=u,Ot(u),u):(o=s,(u=jn.get(m))&&(o=x({},s),Kd(o,u)),t=t.ownerDocument||t,u=t.createElement("script"),Ot(u),$t(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,kl(o,s.precedence,t));return a.instance}function kl(t,a,s){for(var o=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=o.length?o[o.length-1]:null,m=u,b=0;b<o.length;b++){var j=o[b];if(j.dataset.precedence===a)m=j;else if(m!==u)break}m?m.parentNode.insertBefore(t,m.nextSibling):(a=s.nodeType===9?s.head:s,a.insertBefore(t,a.firstChild))}function Qd(t,a){t.crossOrigin==null&&(t.crossOrigin=a.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=a.referrerPolicy),t.title==null&&(t.title=a.title)}function Kd(t,a){t.crossOrigin==null&&(t.crossOrigin=a.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=a.referrerPolicy),t.integrity==null&&(t.integrity=a.integrity)}var Al=null;function jy(t,a,s){if(Al===null){var o=new Map,u=Al=new Map;u.set(s,o)}else u=Al,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 m=s[u];if(!(m[ir]||m[Bt]||t==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var b=m.getAttribute(a)||"";b=t+b;var j=o.get(b);j?j.push(m):o.set(b,[m])}}return o}function Ny(t,a,s){t=t.ownerDocument||t,t.head.insertBefore(s,a==="title"?t.querySelector("head > title"):null)}function hw(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 ky(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function gw(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),m=a.querySelector(Vr(u));if(m){a=m._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(t.count++,t=_l.bind(t),a.then(t,t)),s.state.loading|=4,s.instance=m,Ot(m);return}m=a.ownerDocument||a,o=xy(o),(u=jn.get(u))&&Qd(o,u),m=m.createElement("link"),Ot(m);var b=m;b._p=new Promise(function(j,C){b.onload=j,b.onerror=C}),$t(m,"link",o),s.instance=m}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(s,a),(a=s.state.preload)&&(s.state.loading&3)===0&&(t.count++,s=_l.bind(t),a.addEventListener("load",s),a.addEventListener("error",s))}}var Zd=0;function yw(t,a){return t.stylesheets&&t.count===0&&Tl(t,t.stylesheets),0<t.count||0<t.imgCount?function(s){var o=setTimeout(function(){if(t.stylesheets&&Tl(t,t.stylesheets),t.unsuspend){var m=t.unsuspend;t.unsuspend=null,m()}},6e4+a);0<t.imgBytes&&Zd===0&&(Zd=62500*Fx());var u=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&Tl(t,t.stylesheets),t.unsuspend)){var m=t.unsuspend;t.unsuspend=null,m()}},(t.imgBytes>Zd?50:800)+a);return t.unsuspend=s,function(){t.unsuspend=null,clearTimeout(o),clearTimeout(u)}}:null}function _l(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Tl(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Cl=null;function Tl(t,a){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Cl=new Map,a.forEach(bw,t),Cl=null,_l.call(t))}function bw(t,a){if(!(a.state.loading&4)){var s=Cl.get(t);if(s)var o=s.get(null);else{s=new Map,Cl.set(t,s);for(var u=t.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<u.length;m++){var b=u[m];(b.nodeName==="LINK"||b.getAttribute("media")!=="not all")&&(s.set(b.dataset.precedence,b),o=b)}o&&s.set(null,o)}u=a.instance,b=u.getAttribute("data-precedence"),m=s.get(b)||o,m===o&&s.set(null,u),s.set(b,u),this.count++,o=_l.bind(this),u.addEventListener("load",o),u.addEventListener("error",o),m?m.parentNode.insertBefore(u,m.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(u,t.firstChild)),a.state.loading|=4}}var Pr={$$typeof:P,Provider:null,Consumer:null,_currentValue:pe,_currentValue2:pe,_threadCount:0};function vw(t,a,s,o,u,m,b,j,C){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=Yn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Yn(0),this.hiddenUpdates=Yn(null),this.identifierPrefix=o,this.onUncaughtError=u,this.onCaughtError=m,this.onRecoverableError=b,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=C,this.incompleteTransitions=new Map}function Ay(t,a,s,o,u,m,b,j,C,L,G,Y){return t=new vw(t,a,s,b,C,L,G,Y,j),a=1,m===!0&&(a|=24),m=rn(3,null,null,a),t.current=m,m.stateNode=t,a=_u(),a.refCount++,t.pooledCache=a,a.refCount++,m.memoizedState={element:o,isDehydrated:s,cache:a},Ou(m),t}function _y(t){return t?(t=es,t):es}function Cy(t,a,s,o,u,m){u=_y(u),o.context===null?o.context=u:o.pendingContext=u,o=Ca(a),o.payload={element:s},m=m===void 0?null:m,m!==null&&(o.callback=m),s=Ta(t,o,a),s!==null&&(en(s,t,a),xr(s,t,a))}function Ty(t,a){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var s=t.retryLane;t.retryLane=s!==0&&s<a?s:a}}function Yd(t,a){Ty(t,a),(t=t.alternate)&&Ty(t,a)}function Ey(t){if(t.tag===13||t.tag===31){var a=ci(t,67108864);a!==null&&en(a,t,67108864),Yd(t,67108864)}}function Oy(t){if(t.tag===13||t.tag===31){var a=dn();a=Gc(a);var s=ci(t,a);s!==null&&en(s,t,a),Yd(t,a)}}var El=!0;function Sw(t,a,s,o){var u=$.T;$.T=null;var m=W.p;try{W.p=2,Xd(t,a,s,o)}finally{W.p=m,$.T=u}}function xw(t,a,s,o){var u=$.T;$.T=null;var m=W.p;try{W.p=8,Xd(t,a,s,o)}finally{W.p=m,$.T=u}}function Xd(t,a,s,o){if(El){var u=Fd(o);if(u===null)Bd(t,a,o,Ol,s),Dy(t,o);else if(jw(u,t,a,s,o))o.stopPropagation();else if(Dy(t,o),a&4&&-1<ww.indexOf(t)){for(;u!==null;){var m=Pi(u);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var b=Zn(m.pendingLanes);if(b!==0){var j=m;for(j.pendingLanes|=2,j.entangledLanes|=2;b;){var C=1<<31-_t(b);j.entanglements[1]|=C,b&=~C}Gn(m),(Ge&6)===0&&(pl=Vt()+500,Lr(0))}}break;case 31:case 13:j=ci(m,2),j!==null&&en(j,m,2),hl(),Yd(m,2)}if(m=Fd(o),m===null&&Bd(t,a,o,Ol,s),m===u)break;u=m}u!==null&&o.stopPropagation()}else Bd(t,a,o,null,s)}}function Fd(t){return t=Wc(t),Jd(t)}var Ol=null;function Jd(t){if(Ol=null,t=Ii(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=h(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 Ol=t,null}function zy(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(Uc()){case vo:return 2;case So:return 8;case va:case xo:return 32;case Li:return 268435456;default:return 32}default:return 32}}var Wd=!1,$a=null,Va=null,Ia=null,Gr=new Map,Hr=new Map,Pa=[],ww="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 Dy(t,a){switch(t){case"focusin":case"focusout":$a=null;break;case"dragenter":case"dragleave":Va=null;break;case"mouseover":case"mouseout":Ia=null;break;case"pointerover":case"pointerout":Gr.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":Hr.delete(a.pointerId)}}function Qr(t,a,s,o,u,m){return t===null||t.nativeEvent!==m?(t={blockedOn:a,domEventName:s,eventSystemFlags:o,nativeEvent:m,targetContainers:[u]},a!==null&&(a=Pi(a),a!==null&&Ey(a)),t):(t.eventSystemFlags|=o,a=t.targetContainers,u!==null&&a.indexOf(u)===-1&&a.push(u),t)}function jw(t,a,s,o,u){switch(a){case"focusin":return $a=Qr($a,t,a,s,o,u),!0;case"dragenter":return Va=Qr(Va,t,a,s,o,u),!0;case"mouseover":return Ia=Qr(Ia,t,a,s,o,u),!0;case"pointerover":var m=u.pointerId;return Gr.set(m,Qr(Gr.get(m)||null,t,a,s,o,u)),!0;case"gotpointercapture":return m=u.pointerId,Hr.set(m,Qr(Hr.get(m)||null,t,a,s,o,u)),!0}return!1}function Ry(t){var a=Ii(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,Zp(t.priority,function(){Oy(s)});return}}else if(a===31){if(a=h(s),a!==null){t.blockedOn=a,Zp(t.priority,function(){Oy(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 zl(t){if(t.blockedOn!==null)return!1;for(var a=t.targetContainers;0<a.length;){var s=Fd(t.nativeEvent);if(s===null){s=t.nativeEvent;var o=new s.constructor(s.type,s);Jc=o,s.target.dispatchEvent(o),Jc=null}else return a=Pi(s),a!==null&&Ey(a),t.blockedOn=s,!1;a.shift()}return!0}function My(t,a,s){zl(t)&&s.delete(a)}function Nw(){Wd=!1,$a!==null&&zl($a)&&($a=null),Va!==null&&zl(Va)&&(Va=null),Ia!==null&&zl(Ia)&&(Ia=null),Gr.forEach(My),Hr.forEach(My)}function Dl(t,a){t.blockedOn===a&&(t.blockedOn=null,Wd||(Wd=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Nw)))}var Rl=null;function By(t){Rl!==t&&(Rl=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Rl===t&&(Rl=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(Jd(o||s)===null)continue;break}var m=Pi(s);m!==null&&(t.splice(a,3),a-=3,Fu(m,{pending:!0,data:u,method:s.method,action:o},o,u))}}))}function Ns(t){function a(C){return Dl(C,t)}$a!==null&&Dl($a,t),Va!==null&&Dl(Va,t),Ia!==null&&Dl(Ia,t),Gr.forEach(a),Hr.forEach(a);for(var s=0;s<Pa.length;s++){var o=Pa[s];o.blockedOn===t&&(o.blockedOn=null)}for(;0<Pa.length&&(s=Pa[0],s.blockedOn===null);)Ry(s),s.blockedOn===null&&Pa.shift();if(s=(t.ownerDocument||t).$$reactFormReplay,s!=null)for(o=0;o<s.length;o+=3){var u=s[o],m=s[o+1],b=u[Zt]||null;if(typeof m=="function")b||By(s);else if(b){var j=null;if(m&&m.hasAttribute("formAction")){if(u=m,b=m[Zt]||null)j=b.formAction;else if(Jd(u)!==null)continue}else j=b.action;typeof j=="function"?s[o+1]=j:(s.splice(o,3),o-=3),By(s)}}}function Ly(){function t(m){m.canIntercept&&m.info==="react-transition"&&m.intercept({handler:function(){return new Promise(function(b){return u=b})},focusReset:"manual",scroll:"manual"})}function a(){u!==null&&(u(),u=null),o||setTimeout(s,20)}function s(){if(!o&&!navigation.transition){var m=navigation.currentEntry;m&&m.url!=null&&navigation.navigate(m.url,{state:m.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 ef(t){this._internalRoot=t}Ml.prototype.render=ef.prototype.render=function(t){var a=this._internalRoot;if(a===null)throw Error(r(409));var s=a.current,o=dn();Cy(s,o,t,a,null,null)},Ml.prototype.unmount=ef.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var a=t.containerInfo;Cy(t.current,2,null,t,null,null),hl(),a[Vi]=null}};function Ml(t){this._internalRoot=t}Ml.prototype.unstable_scheduleHydration=function(t){if(t){var a=Kp();t={blockedOn:null,target:t,priority:a};for(var s=0;s<Pa.length&&a!==0&&a<Pa[s].priority;s++);Pa.splice(s,0,t),s===0&&Ry(t)}};var qy=n.version;if(qy!=="19.2.4")throw Error(r(527,qy,"19.2.4"));W.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=v(a),t=t!==null?S(t):null,t=t===null?null:t.stateNode,t};var kw={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:$,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Bl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Bl.isDisabled&&Bl.supportsFiber)try{Sa=Bl.inject(kw),ht=Bl}catch{}}return Kr.createRoot=function(t,a){if(!l(t))throw Error(r(299));var s=!1,o="",u=Hh,m=Qh,b=Kh;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&&(m=a.onCaughtError),a.onRecoverableError!==void 0&&(b=a.onRecoverableError)),a=Ay(t,1,!1,null,null,s,o,null,u,m,b,Ly),t[Vi]=a.current,Md(t),new ef(a)},Kr.hydrateRoot=function(t,a,s){if(!l(t))throw Error(r(299));var o=!1,u="",m=Hh,b=Qh,j=Kh,C=null;return s!=null&&(s.unstable_strictMode===!0&&(o=!0),s.identifierPrefix!==void 0&&(u=s.identifierPrefix),s.onUncaughtError!==void 0&&(m=s.onUncaughtError),s.onCaughtError!==void 0&&(b=s.onCaughtError),s.onRecoverableError!==void 0&&(j=s.onRecoverableError),s.formState!==void 0&&(C=s.formState)),a=Ay(t,1,!0,a,s??null,o,u,C,m,b,j,Ly),a.context=_y(null),s=a.current,o=dn(),o=Gc(o),u=Ca(o),u.callback=null,Ta(s,u,o),s=o,a.current.lanes=s,ii(a,s),Gn(a),t[Vi]=a.current,Md(t),new Ml(a)},Kr.version="19.2.4",Kr}var Iy;function Gw(){if(Iy)return tf.exports;Iy=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(),tf.exports=Pw(),tf.exports}var Hw=Gw();const Qw={bodySerializer:e=>JSON.stringify(e,(n,i)=>typeof i=="bigint"?i.toString():i)},Kw=({onRequest:e,onSseError:n,onSseEvent:i,responseTransformer:r,responseValidator:l,sseDefaultRetryDelay:c,sseMaxRetryAttempts:d,sseMaxRetryDelay:h,sseSleepFn:g,url:v,...S})=>{let x;const N=g??(k=>new Promise(O=>setTimeout(O,k)));return{stream:async function*(){let k=c??3e3,O=0;const R=S.signal??new AbortController().signal;for(;!R.aborted;){O++;const I=S.headers instanceof Headers?S.headers:new Headers(S.headers);x!==void 0&&I.set("Last-Event-ID",x);try{const P={redirect:"follow",...S,body:S.serializedBody,headers:I,signal:R};let Z=new Request(v,P);e&&(Z=await e(v,P));const J=await(S.fetch??globalThis.fetch)(Z);if(!J.ok)throw new Error(`SSE failed: ${J.status} ${J.statusText}`);if(!J.body)throw new Error("No body in SSE response");const z=J.body.pipeThrough(new TextDecoderStream).getReader();let M="";const oe=()=>{try{z.cancel()}catch{}};R.addEventListener("abort",oe);try{for(;;){const{done:ke,value:ze}=await z.read();if(ke)break;M+=ze;const Se=M.split(`
|
|
11
11
|
|
|
12
|
-
`);M=Se.pop()??"";for(const
|
|
13
|
-
`),
|
|
14
|
-
`);try{W=JSON.parse(je),fe=!0}catch{W=je}}fe&&(l&&await l(W),r&&(W=await r(W))),i?.({data:W,event:$,id:x,retry:k}),pe.length&&(yield W)}}}finally{R.removeEventListener("abort",oe),z.releaseLock()}break}catch(P){if(n?.(P),d!==void 0&&O>=d)break;const Z=Math.min(k*2**(O-1),h??3e4);await N(Z)}}}()}},Hw=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},Qw=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"&"}},yv=({allowReserved:e,explode:n,name:i,style:r,value:l})=>{if(!n){const h=(e?l:l.map(g=>encodeURIComponent(g))).join(Qw(r));switch(r){case"label":return`.${h}`;case"matrix":return`;${i}=${h}`;case"simple":return h;default:return`${i}=${h}`}}const c=Hw(r),d=l.map(h=>r==="label"||r==="simple"?e?h:encodeURIComponent(h):pc({allowReserved:e,name:i,value:h})).join(c);return r==="label"||r==="matrix"?c+d:d},pc=({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)}`},bv=({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(([S,x])=>{g=[...g,S,e?x:encodeURIComponent(x)]});const v=g.join(",");switch(r){case"form":return`${i}=${v}`;case"label":return`.${v}`;case"matrix":return`;${i}=${v}`;default:return v}}const d=Kw(r),h=Object.entries(l).map(([g,v])=>pc({allowReserved:e,name:r==="deepObject"?`${i}[${g}]`:g,value:v})).join(d);return r==="label"||r==="matrix"?d+h:h},Zw=/\{[^{}]+\}/g,Yw=({path:e,url:n})=>{let i=n;const r=n.match(Zw);if(r)for(const l of r){let c=!1,d=l.substring(1,l.length-1),h="simple";d.endsWith("*")&&(c=!0,d=d.substring(0,d.length-1)),d.startsWith(".")?(d=d.substring(1),h="label"):d.startsWith(";")&&(d=d.substring(1),h="matrix");const g=e[d];if(g==null)continue;if(Array.isArray(g)){i=i.replace(l,yv({explode:c,name:d,style:h,value:g}));continue}if(typeof g=="object"){i=i.replace(l,bv({explode:c,name:d,style:h,value:g,valueOnly:!0}));continue}if(h==="matrix"){i=i.replace(l,`;${pc({name:d,value:g})}`);continue}const v=encodeURIComponent(h==="label"?`.${g}`:g);i=i.replace(l,v)}return i},Xw=({baseUrl:e,path:n,query:i,querySerializer:r,url:l})=>{const c=l.startsWith("/")?l:`/${l}`;let d=(e??"")+c;n&&(d=Yw({path:n,url:d}));let h=i?r(i):"";return h.startsWith("?")&&(h=h.substring(1)),h&&(d+=`?${h}`),d};function Jw(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 Fw=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},vv=({allowReserved:e,array:n,object:i}={})=>l=>{const c=[];if(l&&typeof l=="object")for(const d in l){const h=l[d];if(h!=null)if(Array.isArray(h)){const g=yv({allowReserved:e,explode:!0,name:d,style:"form",value:h,...n});g&&c.push(g)}else if(typeof h=="object"){const g=bv({allowReserved:e,explode:!0,name:d,style:"deepObject",value:h,...i});g&&c.push(g)}else{const g=pc({allowReserved:e,name:d,value:h});g&&c.push(g)}}return c.join("&")},Ww=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"}},ej=(e,n)=>n?!!(e.headers.has(n)||e.query?.[n]||e.headers.get("Cookie")?.includes(`${n}=`)):!1,tj=async({security:e,...n})=>{for(const i of e){if(ej(n,i.name))continue;const r=await Fw(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}}},Py=e=>Xw({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:vv(e.querySerializer),url:e.url}),Gy=(e,n)=>{const i={...e,...n};return i.baseUrl?.endsWith("/")&&(i.baseUrl=i.baseUrl.substring(0,i.baseUrl.length-1)),i.headers=Sv(e.headers,n.headers),i},nj=e=>{const n=[];return e.forEach((i,r)=>{n.push([r,i])}),n},Sv=(...e)=>{const n=new Headers;for(const i of e){if(!i)continue;const r=i instanceof Headers?nj(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 sf{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 aj=()=>({error:new sf,request:new sf,response:new sf}),ij=vv({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),sj={"Content-Type":"application/json"},xv=(e={})=>({...Pw,headers:sj,parseAs:"auto",querySerializer:ij,...e}),wv=(e={})=>{let n=Gy(xv(),e);const i=()=>({...n}),r=v=>(n=Gy(n,v),i()),l=aj(),c=async v=>{const S={...n,...v,fetch:v.fetch??n.fetch??globalThis.fetch,headers:Sv(n.headers,v.headers),serializedBody:void 0};S.security&&await tj({...S,security:S.security}),S.requestValidator&&await S.requestValidator(S),S.body!==void 0&&S.bodySerializer&&(S.serializedBody=S.bodySerializer(S.body)),(S.body===void 0||S.serializedBody==="")&&S.headers.delete("Content-Type");const x=Py(S);return{opts:S,url:x}},d=async v=>{const{opts:S,url:x}=await c(v),N={redirect:"follow",...S,body:Jw(S)};let _=new Request(x,N);for(const X of l.request.fns)X&&(_=await X(_,S));const T=S.fetch;let k=await T(_);for(const X of l.response.fns)X&&(k=await X(k,_,S));const O={request:_,response:k};if(k.ok){const X=(S.parseAs==="auto"?Ww(k.headers.get("Content-Type")):S.parseAs)??"json";if(k.status===204||k.headers.get("Content-Length")==="0"){let z;switch(X){case"arrayBuffer":case"blob":case"text":z=await k[X]();break;case"formData":z=new FormData;break;case"stream":z=k.body;break;default:z={};break}return S.responseStyle==="data"?z:{data:z,...O}}let F;switch(X){case"arrayBuffer":case"blob":case"formData":case"json":case"text":F=await k[X]();break;case"stream":return S.responseStyle==="data"?k.body:{data:k.body,...O}}return X==="json"&&(S.responseValidator&&await S.responseValidator(F),S.responseTransformer&&(F=await S.responseTransformer(F))),S.responseStyle==="data"?F:{data:F,...O}}const R=await k.text();let I;try{I=JSON.parse(R)}catch{}const P=I??R;let Z=P;for(const X of l.error.fns)X&&(Z=await X(P,k,_,S));if(Z=Z||{},S.throwOnError)throw Z;return S.responseStyle==="data"?void 0:{error:Z,...O}},h=v=>S=>d({...S,method:v}),g=v=>async S=>{const{opts:x,url:N}=await c(S);return Gw({...x,body:x.body,headers:x.headers,method:v,onRequest:async(_,T)=>{let k=new Request(_,T);for(const O of l.request.fns)O&&(k=await O(k,x));return k},url:N})};return{buildUrl:Py,connect:h("CONNECT"),delete:h("DELETE"),get:h("GET"),getConfig:i,head:h("HEAD"),interceptors:l,options:h("OPTIONS"),patch:h("PATCH"),post:h("POST"),put:h("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:h("TRACE")}},H=wv(xv()),rj=e=>(e.client??H).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}",...e}),jv=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}",...e}),oj=e=>(e.client??H).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}",...e,headers:{"Content-Type":"application/json",...e.headers}}),lj=e=>(e?.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects",...e}),cj=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/locations",...e,headers:{"Content-Type":"application/json",...e.headers}}),uj=e=>(e.client??H).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/locations/{label}",...e}),dj=e=>(e.client??H).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/locations/default",...e,headers:{"Content-Type":"application/json",...e.headers}}),fj=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/export",...e}),pj=e=>(e.client??H).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/queries",...e,headers:{"Content-Type":"application/json",...e.headers}}),mj=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/queries",...e}),hj=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/queries",...e,headers:{"Content-Type":"application/json",...e.headers}}),gj=e=>(e.client??H).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/queries",...e,headers:{"Content-Type":"application/json",...e.headers}}),yj=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/queries/generate",...e,headers:{"Content-Type":"application/json",...e.headers}}),bj=e=>(e.client??H).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/competitors",...e,headers:{"Content-Type":"application/json",...e.headers}}),vj=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/competitors",...e}),Sj=e=>(e.client??H).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/competitors",...e,headers:{"Content-Type":"application/json",...e.headers}}),Nv=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/runs",...e}),xj=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/runs",...e,headers:{"Content-Type":"application/json",...e.headers}}),wj=e=>(e?.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/runs",...e}),jj=e=>(e?.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/runs",...e,headers:{"Content-Type":"application/json",...e?.headers}}),kv=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/runs/{id}",...e}),Nj=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/apply",...e,headers:{"Content-Type":"application/json",...e.headers}}),kj=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/timeline",...e}),Aj=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/analytics/metrics",...e}),Av=e=>(e?.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/settings",...e}),_j=e=>(e.client??H).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/settings/providers/{name}",...e,headers:{"Content-Type":"application/json",...e.headers}}),Cj=e=>(e.client??H).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/settings/google",...e,headers:{"Content-Type":"application/json",...e.headers}}),Tj=e=>(e.client??H).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/settings/bing",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ej=e=>(e.client??H).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/settings/cdp",...e,headers:{"Content-Type":"application/json",...e.headers}}),Oj=e=>(e.client??H).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/schedule",...e}),zj=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/schedule",...e}),Dj=e=>(e.client??H).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/schedule",...e,headers:{"Content-Type":"application/json",...e.headers}}),Rj=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/notifications",...e}),Mj=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/notifications",...e,headers:{"Content-Type":"application/json",...e.headers}}),Bj=e=>(e.client??H).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/notifications/{id}",...e}),Lj=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/notifications/{id}/test",...e}),qj=e=>(e?.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/cdp/status",...e}),Uj=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/connections",...e}),$j=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/connect",...e,headers:{"Content-Type":"application/json",...e.headers}}),Vj=e=>(e.client??H).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/connections/{type}",...e}),Ij=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/properties",...e}),Pj=e=>(e.client??H).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/connections/{type}/property",...e,headers:{"Content-Type":"application/json",...e.headers}}),Gj=e=>(e.client??H).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/connections/{type}/sitemap",...e,headers:{"Content-Type":"application/json",...e.headers}}),Hj=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/sync",...e,headers:{"Content-Type":"application/json",...e.headers}}),Qj=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/performance",...e}),Kj=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/performance/daily",...e}),Zj=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/inspect",...e,headers:{"Content-Type":"application/json",...e.headers}}),Yj=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/inspections",...e}),Xj=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/deindexed",...e}),_v=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/coverage",...e}),Jj=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/coverage/history",...e}),Fj=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/sitemaps",...e}),Wj=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/discover-sitemaps",...e}),eN=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/inspect-sitemap",...e,headers:{"Content-Type":"application/json",...e.headers}}),tN=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/indexing/request",...e,headers:{"Content-Type":"application/json",...e.headers}}),nN=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/locations",...e}),aN=e=>(e.client??H).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/locations/{locationName}/selection",...e,headers:{"Content-Type":"application/json",...e.headers}}),iN=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/sync",...e,headers:{"Content-Type":"application/json",...e.headers}}),sN=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/keywords",...e}),rN=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/place-actions",...e}),oN=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/lodging",...e}),lN=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/places",...e}),cN=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/summary",...e}),uN=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/connect",...e,headers:{"Content-Type":"application/json",...e.headers}}),dN=e=>(e.client??H).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/disconnect",...e}),fN=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/status",...e}),pN=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/sites",...e}),mN=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/set-site",...e,headers:{"Content-Type":"application/json",...e.headers}}),Cv=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/coverage",...e}),hN=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/inspections",...e}),gN=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/inspect-url",...e,headers:{"Content-Type":"application/json",...e.headers}}),yN=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/inspect-sitemap",...e,headers:{"Content-Type":"application/json",...e.headers}}),bN=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/request-indexing",...e,headers:{"Content-Type":"application/json",...e.headers}}),vN=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/performance",...e}),SN=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/connect",...e,headers:{"Content-Type":"application/json",...e.headers}}),xN=e=>(e.client??H).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/disconnect",...e}),wN=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/status",...e}),jN=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/sync",...e,headers:{"Content-Type":"application/json",...e.headers}}),NN=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/traffic",...e}),kN=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/ai-referral-history",...e}),AN=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/social-referral-history",...e}),_N=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/session-history",...e}),CN=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/insights",...e}),TN=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/report",...e}),EN=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/citations/visibility",...e}),ON=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/content/dismissals",...e,headers:{"Content-Type":"application/json",...e.headers}}),zN=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/overview",...e}),DN=e=>(e?.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/status",...e}),RN=e=>(e?.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/install",...e}),MN=e=>(e?.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/syncs",...e}),BN=e=>(e?.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/syncs",...e,headers:{"Content-Type":"application/json",...e?.headers}}),LN=e=>(e?.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/syncs/latest",...e}),qN=e=>(e?.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/releases",...e}),UN=e=>(e?.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/latest-release",...e}),$N=e=>(e.client??H).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/cache/{release}",...e}),VN=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/backlinks/extract",...e,headers:{"Content-Type":"application/json",...e.headers}}),IN=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/backlinks/summary",...e}),PN=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/backlinks/domains",...e}),GN=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/backlinks/history",...e}),HN=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/backlinks/sources",...e}),QN=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/backlinks/bing-sync",...e}),KN=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/connect/cloud-run",...e,headers:{"Content-Type":"application/json",...e.headers}}),ZN=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/connect/wordpress",...e,headers:{"Content-Type":"application/json",...e.headers}}),YN=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/connect/vercel",...e,headers:{"Content-Type":"application/json",...e.headers}}),XN=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/sources/{id}/sync",...e,headers:{"Content-Type":"application/json",...e.headers}}),JN=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/sources/{id}/backfill",...e,headers:{"Content-Type":"application/json",...e.headers}}),FN=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/sources",...e}),WN=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/status",...e}),ek=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/sources/{id}",...e}),tk=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/events",...e}),nk=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/discover/run",...e,headers:{"Content-Type":"application/json",...e.headers}}),ak=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/discover/sessions",...e}),ik=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/discover/sessions/{id}",...e}),sk=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/discover/sessions/{id}/promote",...e}),rk=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/discover/sessions/{id}/promote",...e,headers:{"Content-Type":"application/json",...e.headers}}),ok=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo",...e}),lk=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/pages",...e}),ck=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/trend",...e}),uk=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/runs",...e,headers:{"Content-Type":"application/json",...e.headers}}),dk=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/agent/providers",...e});function fk(e){const n={baseUrl:e.baseUrl,fetch:e.fetch,headers:{...e.headers??{}}};return wv(n)}class Hn extends Error{code;statusCode;details;constructor(n,i,r,l){super(n),this.name="ApiError",this.code=r??"UNKNOWN",this.statusCode=i,this.details=l}}function pk(){if(typeof window>"u")return null;const e=window.__CANONRY_CONFIG__?.embed;return e?.enabled?e:null}function mk(){return typeof window<"u"&&window.__CANONRY_CONFIG__?.basePath?window.__CANONRY_CONFIG__.basePath.replace(/\/$/,"")+"/api/v1":"/api/v1"}const Tv=mk();function hk(){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 gk(){return typeof window<"u"&&window.__CANONRY_CONFIG__?.basePath?window.__CANONRY_CONFIG__.basePath.replace(/\/$/,""):""}function yk(e){return`${gk()}${e}`}function bk(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 vk(){return""}function rf(){return!!vk()}let Ev=null;function Hy(e){Ev=e}function Yf(){Ev?.()}const te=fk({baseUrl:hk()});te.interceptors.response.use((e,n)=>(e.status===401&&!n.url.includes("/api/v1/session")&&Yf(),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,c;if(typeof n.error=="object"&&n.error!==null){const d=n.error.error;if(typeof d=="string")r=d;else if(d&&typeof d=="object"){const h=d;h.message&&(r=h.message),h.code&&(l=h.code),h.details&&(c=h.details)}else{const h=n.error;h.message&&(r=h.message),h.code&&(l=h.code),h.details&&(c=h.details)}}else typeof n.error=="string"&&(r=n.error);throw new Hn(r,i,l,c)}if(n.response.status!==204)return n.data}async function Xf(e,n){const i=n?.body!=null,r=await fetch(`${Tv}${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,h;if(l)try{const g=JSON.parse(l);typeof g.error=="string"?c=g.error:g.error?.message?(c=g.error.message,d=g.error.code,h=g.error.details):g.message&&(c=g.message)}catch{c=l}throw r.status===401&&!e.startsWith("/session")&&Yf(),new Hn(c,r.status,d,h)}if(r.status!==204)return r.json()}function Jf(e){return ce(()=>jv({client:te,path:{name:e}}))}function NL(e){return ce(()=>Nv({client:te,path:{name:e}}))}function Wl(e){return ce(()=>kv({client:te,path:{id:e}}))}function Sk(e){return ce(()=>mj({client:te,path:{name:e}}))}function xk(e){return ce(()=>vj({client:te,path:{name:e}}))}function wk(e,n){return ce(()=>kj({client:te,path:{name:e},query:{location:n}}))}function Ov(e,n){return ce(()=>zN({client:te,path:{name:e},query:{location:n?.location,since:n?.since}}))}function co(e,n){return ce(()=>oj({client:te,path:{name:e},body:n}))}function jk(e,n){return ce(()=>gj({client:te,path:{name:e},body:{queries:n}}))}function Nk(e,n){return ce(()=>hj({client:te,path:{name:e},body:{queries:n}}))}function kL(e,n){return ce(()=>pj({client:te,path:{name:e},body:{queries:n}}))}function kk(e,n){return ce(()=>ON({client:te,path:{name:e},body:n}))}function Ak(e,n){return ce(()=>Sj({client:te,path:{name:e},body:{competitors:n}}))}function AL(e,n){return ce(()=>bj({client:te,path:{name:e},body:{competitors:n}}))}async function _L(e,n){const i=await Jf(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 CL(e,n){const i=await Jf(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 TL(e,n){const i=await Jf(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 _k(e,n){const i={};return n?.location&&(i.location=n.location),n?.allLocations&&(i.allLocations=!0),n?.noLocation&&(i.noLocation=!0),ce(()=>xj({client:te,path:{name:e},body:i}))}function EL(e,n){return ce(()=>cj({client:te,path:{name:e},body:n}))}async function OL(e,n){await ce(()=>uj({client:te,path:{name:e,label:n}}))}function zL(e,n){return ce(()=>dj({client:te,path:{name:e},body:{label:n}}))}async function DL(e){await ce(()=>rj({client:te,path:{name:e}}))}function RL(e){return ce(()=>fj({client:te,path:{name:e}}))}function ML(){return ce(()=>Av({client:te}))}function Qy(){return Xf("/session")}function Ck(e){return Xf("/session/setup",{method:"POST",body:JSON.stringify({password:e})})}function Tk(e){return Xf("/session",{method:"POST",body:JSON.stringify({password:e})})}function Ek(e,n){return ce(()=>_j({client:te,path:{name:e},body:n}))}function BL(e){return ce(()=>Cj({client:te,body:e}))}async function LL(e){try{return await ce(()=>zj({client:te,path:{name:e}}))}catch(n){if(n instanceof Hn&&n.statusCode===404)return null;throw n}}function qL(e,n){return ce(()=>Dj({client:te,path:{name:e},body:n}))}async function UL(e){await ce(()=>Oj({client:te,path:{name:e}}))}function $L(e){return ce(()=>Rj({client:te,path:{name:e}}))}function VL(e,n){return ce(()=>Mj({client:te,path:{name:e},body:n}))}async function IL(e,n){await ce(()=>Bj({client:te,path:{name:e,id:n}}))}function PL(e,n){return ce(()=>Lj({client:te,path:{name:e,id:n}}))}function Ok(e,n,i){return ce(()=>yj({client:te,path:{name:e},body:{provider:n,count:i}}))}function zk(e){return ce(()=>Nj({client:te,body:e}))}function Dk(e){return ce(()=>jj({client:te,body:e??{}}))}function GL(e,n){return ce(()=>$j({client:te,path:{name:e},body:{type:n}}))}function HL(e,n){return ce(()=>Vj({client:te,path:{name:e,type:n}}))}function QL(e,n,i){return ce(()=>Pj({client:te,path:{name:e,type:n},body:{propertyId:i}}))}function KL(e,n,i){return ce(()=>Gj({client:te,path:{name:e,type:n},body:{sitemapUrl:i}}))}function Rk(e,n){return ce(()=>Hj({client:te,path:{name:e},body:n??{}}))}function ZL(e,n){const i={};return n&&n!=="all"&&(i.window=n),ce(()=>Aj({client:te,path:{name:e},query:i}))}function YL(e,n){return ce(()=>Zj({client:te,path:{name:e},body:{url:n}}))}function Mk(e){return ce(()=>_v({client:te,path:{name:e}}))}function Bk(e,n){return ce(()=>eN({client:te,path:{name:e},body:n??{}}))}function XL(e){return ce(()=>Fj({client:te,path:{name:e}}))}function Lk(e){return ce(()=>Wj({client:te,path:{name:e}}))}function JL(e,n){return ce(()=>uk({client:te,path:{name:e},body:{}}))}function FL(e,n){return ce(()=>nk({client:te,path:{name:e},body:n??{}}))}function WL(e,n,i){return ce(()=>rk({client:te,path:{name:e,id:n},body:i??{}}))}function e5(){return ce(()=>qj({client:te}))}function t5(e,n){return ce(()=>Ej({client:te,body:{host:e,port:n}}))}function n5(e,n){return ce(()=>tN({client:te,path:{name:e},body:n}))}function a5(e,n){return ce(()=>uN({client:te,path:{name:e},body:{apiKey:n}}))}function i5(e){return ce(()=>dN({client:te,path:{name:e}}))}function s5(e,n){return ce(()=>mN({client:te,path:{name:e},body:{siteUrl:n}}))}function qk(e){return ce(()=>Cv({client:te,path:{name:e}}))}function r5(e,n){return ce(()=>gN({client:te,path:{name:e},body:{url:n}}))}function o5(e,n){return ce(()=>yN({client:te,path:{name:e},body:{}}))}function l5(e,n){return ce(()=>bN({client:te,path:{name:e},body:n}))}function c5(e){return ce(()=>Tj({client:te,body:{apiKey:e}}))}function Uk(e){return e?/filename\s*=\s*"?([^";]+)"?/i.exec(e)?.[1]??null:null}async function u5(e,n="agency",i){const r=new URLSearchParams({audience:n});i!==void 0&&r.set("period",String(i));const l=await fetch(`${Tv}/projects/${encodeURIComponent(e)}/report.html?${r.toString()}`,{credentials:"same-origin",headers:{}});if(!l.ok)throw new Hn(`Failed to download report: ${l.status}`,l.status);const c=await l.blob(),d=URL.createObjectURL(c),h=Uk(l.headers.get("Content-Disposition"))??`canonry-report-${e}.html`,g=document.createElement("a");g.href=d,g.download=h,document.body.appendChild(g),g.click(),document.body.removeChild(g),URL.revokeObjectURL(d)}function d5(e,n){return ce(()=>jN({client:te,path:{name:e},body:{}}))}function f5(e,n){return ce(()=>SN({client:te,path:{name:e},body:n}))}function p5(e){return ce(()=>xN({client:te,path:{name:e}}))}function m5(e,n){return ce(()=>KN({client:te,path:{name:e},body:n}))}function h5(e,n){return ce(()=>ZN({client:te,path:{name:e},body:n}))}function g5(e,n){return ce(()=>YN({client:te,path:{name:e},body:n}))}function y5(e,n,i){return ce(()=>XN({client:te,path:{name:e,id:n},body:i??{}}))}function b5(e,n,i){return ce(()=>JN({client:te,path:{name:e,id:n},body:{}}))}function $k(e,n){return ce(()=>CN({client:te,path:{name:e},query:{runId:n}}))}function Vk(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 Ik(e,n){const i=yk(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:bk(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,h=typeof l.lastHeartbeatAt=="string"?l.lastHeartbeatAt:void 0,g=Vk(l.updateAvailable),v=[c,d===!1?"database not configured":"database configured",h?`heartbeat ${h}`:void 0].filter(Boolean).join(" · ");return{label:n,state:"ok",detail:v,version:c,databaseConfigured:d,lastHeartbeatAt:h,...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 v5(){return ce(()=>DN({client:te}))}function S5(){return ce(()=>RN({client:te}))}function x5(){return ce(()=>LN({client:te}))}function w5(){return ce(()=>MN({client:te}))}function j5(e){return ce(()=>BN({client:te,body:e?{release:e}:{}}))}function N5(){return ce(()=>qN({client:te}))}function k5(){return ce(()=>UN({client:te}))}function A5(e){return ce(()=>$N({client:te,path:{release:e}}))}function _5(e,n={}){return ce(()=>IN({client:te,path:{name:e},query:{release:n.release,excludeCrawlers:n.excludeCrawlers?"1":void 0,source:n.source}}))}function C5(e,n={}){return ce(()=>PN({client:te,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,source:n.source}}))}function T5(e,n={}){return ce(()=>GN({client:te,path:{name:e},query:{source:n.source}}))}function E5(e,n={}){return ce(()=>HN({client:te,path:{name:e},query:{excludeCrawlers:n.excludeCrawlers?"1":void 0}}))}function O5(e,n){return ce(()=>VN({client:te,path:{name:e},body:{release:void 0}}))}function z5(e){return ce(()=>QN({client:te,path:{name:e}}))}function Nn(e){return(...n)=>{e(...n)}}const Pk=6e3,Gk=5,Hk=180;let It=[],Qk=0;const wf=new Set,jf=new Map,Nf=new Map;function ec(){const e=[...It];for(const n of wf)n(e)}function Ff(e){const n=jf.get(e);n&&(clearTimeout(n),jf.delete(e));const i=Nf.get(e);i&&(clearTimeout(i),Nf.delete(e))}function zv(e){Ff(e);const n=It.length;It=It.filter(i=>i.id!==e),It.length!==n&&ec()}function Ky(e){Ff(e.id),jf.set(e.id,setTimeout(()=>{kf(e.id)},e.durationMs))}function Kk(e,n,i){return typeof e=="string"?{title:e,tone:n,durationMs:i}:e}function tn(e,n="negative",i=Pk){const r=Kk(e,n,i),l={id:String(++Qk),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=It.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 It=It.map(h=>h.id===c.id?d:h),ec(),Ky(d),c.id}}return It.length>=Gk&&zv(It[0].id),It=[...It,l],ec(),Ky(l),l.id}function kf(e){const n=It.find(i=>i.id===e);!n||n.state==="closing"||(Ff(e),It=It.map(i=>i.id===e?{...i,state:"closing"}:i),ec(),Nf.set(e,setTimeout(()=>{zv(e)},Hk)))}function Zk(e){return wf.add(e),()=>{wf.delete(e)}}function Zy(){return It}const Yk=5*6e4,Af=30*6e4,D5=3e4,R5=6e4,ao=3e4,Xk=2e3,Jk=5e3;function Fk(){return new Aw({defaultOptions:{queries:{staleTime:Yk,retry:1,refetchOnWindowFocus:!1}},mutationCache:new _w({onError:(e,n,i,r)=>{r.meta?.skipGlobalErrorToast||tn({title:e instanceof Error?e.message:"An unexpected error occurred",tone:"negative"})}})})}const Wk="modulepreload",eA=function(e,n){return new URL(e,n).href},Yy={},Gs=function(n,i,r){let l=Promise.resolve();if(i&&i.length>0){let v=function(S){return Promise.all(S.map(x=>Promise.resolve(x).then(N=>({status:"fulfilled",value:N}),N=>({status:"rejected",reason:N}))))};const d=document.getElementsByTagName("link"),h=document.querySelector("meta[property=csp-nonce]"),g=h?.nonce||h?.getAttribute("nonce");l=v(i.map(S=>{if(S=eA(S,r),S in Yy)return;Yy[S]=!0;const x=S.endsWith(".css"),N=x?'[rel="stylesheet"]':"";if(r)for(let T=d.length-1;T>=0;T--){const k=d[T];if(k.href===S&&(!x||k.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${S}"]${N}`))return;const _=document.createElement("link");if(_.rel=x?"stylesheet":Wk,x||(_.as="script"),_.crossOrigin="",_.href=S,g&&_.setAttribute("nonce",g),document.head.appendChild(_),x)return new Promise((T,k)=>{_.addEventListener("load",T),_.addEventListener("error",()=>k(new Error(`Unable to preload CSS for ${S}`)))})}))}function c(d){const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=d,window.dispatchEvent(h),!h.defaultPrevented)throw d}return l.then(d=>{for(const h of d||[])h.status==="rejected"&&c(h.reason);return n().catch(c)})};const tA=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),nA=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,i,r)=>r?r.toUpperCase():i.toLowerCase()),Xy=e=>{const n=nA(e);return n.charAt(0).toUpperCase()+n.slice(1)},Dv=(...e)=>e.filter((n,i,r)=>!!n&&n.trim()!==""&&r.indexOf(n)===i).join(" ").trim(),aA=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0};var iA={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 sA=q.forwardRef(({color:e="currentColor",size:n=24,strokeWidth:i=2,absoluteStrokeWidth:r,className:l="",children:c,iconNode:d,...h},g)=>q.createElement("svg",{ref:g,...iA,width:n,height:n,stroke:e,strokeWidth:r?Number(i)*24/Number(n):i,className:Dv("lucide",l),...!c&&!aA(h)&&{"aria-hidden":"true"},...h},[...d.map(([v,S])=>q.createElement(v,S)),...Array.isArray(c)?c:[c]]));const et=(e,n)=>{const i=q.forwardRef(({className:r,...l},c)=>q.createElement(sA,{ref:c,iconNode:n,className:Dv(`lucide-${tA(Xy(e))}`,`lucide-${e}`,r),...l}));return i.displayName=Xy(e),i};const rA=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],oA=et("arrow-right",rA);const lA=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],cA=et("arrow-up",lA);const uA=[["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"}]],dA=et("book-open",uA);const fA=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Rv=et("check",fA);const pA=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],mA=et("chevron-down",pA);const hA=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Wf=et("chevron-right",hA);const gA=[["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"}]],yA=et("copy",gA);const bA=[["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"}]],vA=et("file-text",bA);const SA=[["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"}]],xA=et("github",SA);const wA=[["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"}]],jA=et("globe",wA);const NA=[["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"}]],kA=et("layout-dashboard",NA);const AA=[["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"}]],_A=et("link-2",AA);const CA=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],TA=et("loader-circle",CA);const EA=[["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"}]],OA=et("maximize-2",EA);const zA=[["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 18h16",key:"19g7jn"}],["path",{d:"M4 6h16",key:"1o0s65"}]],DA=et("menu",zA);const RA=[["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"}]],MA=et("minimize-2",RA);const BA=[["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"}]],LA=et("play",BA);const qA=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Jy=et("plus",qA);const UA=[["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"}]],$A=et("radar",UA);const VA=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],Fy=et("radio",VA);const IA=[["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"}]],PA=et("rocket",IA);const GA=[["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"}]],Mv=et("rotate-ccw",GA);const HA=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],QA=et("search",HA);const KA=[["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"}]],ZA=et("settings",KA);const YA=[["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"}]],Bv=et("triangle-alert",YA);const XA=[["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"}]],JA=et("wrench",XA);const FA=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Hs=et("x",FA);function Q(e,n,i){function r(h,g){if(h._zod||Object.defineProperty(h,"_zod",{value:{def:g,constr:d,traits:new Set},enumerable:!1}),h._zod.traits.has(e))return;h._zod.traits.add(e),n(h,g);const v=d.prototype,S=Object.keys(v);for(let x=0;x<S.length;x++){const N=S[x];N in h||(h[N]=v[N].bind(h))}}const l=i?.Parent??Object;class c extends l{}Object.defineProperty(c,"name",{value:e});function d(h){var g;const v=i?.Parent?new c:this;r(v,h),(g=v._zod).deferred??(g.deferred=[]);for(const S of v._zod.deferred)S();return v}return Object.defineProperty(d,"init",{value:r}),Object.defineProperty(d,Symbol.hasInstance,{value:h=>i?.Parent&&h instanceof i.Parent?!0:h?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}class Rs extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Lv extends Error{constructor(n){super(`Encountered unidirectional transform during encode: ${n}`),this.name="ZodEncodeError"}}const qv={};function Ja(e){return qv}function Uv(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 _f(e,n){return typeof n=="bigint"?n.toString():n}function mc(e){return{get value(){{const n=e();return Object.defineProperty(this,"value",{value:n}),n}}}}function ep(e){return e==null}function tp(e){const n=e.startsWith("^")?1:0,i=e.endsWith("$")?e.length-1:e.length;return e.slice(n,i)}function WA(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(".","")),h=Number.parseInt(n.toFixed(c).replace(".",""));return d%h/10**c}const Wy=Symbol("evaluating");function Ge(e,n,i){let r;Object.defineProperty(e,n,{get(){if(r!==Wy)return r===void 0&&(r=Wy,r=i()),r},set(l){Object.defineProperty(e,n,{value:l})},configurable:!0})}function Ei(e,n,i){Object.defineProperty(e,n,{value:i,writable:!0,enumerable:!0,configurable:!0})}function ei(...e){const n={};for(const i of e){const r=Object.getOwnPropertyDescriptors(i);Object.assign(n,r)}return Object.defineProperties({},n)}function eb(e){return JSON.stringify(e)}function e_(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const $v="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function io(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const t_=mc(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function qs(e){if(io(e)===!1)return!1;const n=e.constructor;if(n===void 0||typeof n!="function")return!0;const i=n.prototype;return!(io(i)===!1||Object.prototype.hasOwnProperty.call(i,"isPrototypeOf")===!1)}function Vv(e){return qs(e)?{...e}:Array.isArray(e)?[...e]:e}const n_=new Set(["string","number","symbol"]);function Us(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ti(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 a_(e){return Object.keys(e).filter(n=>e[n]._zod.optin==="optional"&&e[n]._zod.optout==="optional")}const i_={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 s_(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=ei(e._zod.def,{get shape(){const d={};for(const h in n){if(!(h in i.shape))throw new Error(`Unrecognized key: "${h}"`);n[h]&&(d[h]=i.shape[h])}return Ei(this,"shape",d),d},checks:[]});return ti(e,c)}function r_(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=ei(e._zod.def,{get shape(){const d={...e._zod.def.shape};for(const h in n){if(!(h in i.shape))throw new Error(`Unrecognized key: "${h}"`);n[h]&&delete d[h]}return Ei(this,"shape",d),d},checks:[]});return ti(e,c)}function o_(e,n){if(!qs(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=ei(e._zod.def,{get shape(){const c={...e._zod.def.shape,...n};return Ei(this,"shape",c),c}});return ti(e,l)}function l_(e,n){if(!qs(n))throw new Error("Invalid input to safeExtend: expected a plain object");const i=ei(e._zod.def,{get shape(){const r={...e._zod.def.shape,...n};return Ei(this,"shape",r),r}});return ti(e,i)}function c_(e,n){const i=ei(e._zod.def,{get shape(){const r={...e._zod.def.shape,...n._zod.def.shape};return Ei(this,"shape",r),r},get catchall(){return n._zod.def.catchall},checks:[]});return ti(e,i)}function u_(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=ei(n._zod.def,{get shape(){const h=n._zod.def.shape,g={...h};if(i)for(const v in i){if(!(v in h))throw new Error(`Unrecognized key: "${v}"`);i[v]&&(g[v]=e?new e({type:"optional",innerType:h[v]}):h[v])}else for(const v in h)g[v]=e?new e({type:"optional",innerType:h[v]}):h[v];return Ei(this,"shape",g),g},checks:[]});return ti(n,d)}function d_(e,n,i){const r=ei(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 Ei(this,"shape",c),c}});return ti(n,r)}function Ts(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 Es(e,n){return n.map(i=>{var r;return(r=i).path??(r.path=[]),i.path.unshift(e),i})}function Ll(e){return typeof e=="string"?e:e?.message}function Fa(e,n,i){const r={...e,path:e.path??[]};if(!e.message){const l=Ll(e.inst?._zod.def?.error?.(e))??Ll(n?.error?.(e))??Ll(i.customError?.(e))??Ll(i.localeError?.(e))??"Invalid input";r.message=l}return delete r.inst,delete r.continue,n?.reportInput||delete r.input,r}function np(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function so(...e){const[n,i,r]=e;return typeof n=="string"?{message:n,code:"custom",input:i,inst:r}:{...n}}const Iv=(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,_f,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Pv=Q("$ZodError",Iv),Gv=Q("$ZodError",Iv,{Parent:Error});function f_(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 p_(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,h=0;for(;h<c.path.length;){const g=c.path[h];h===c.path.length-1?(d[g]=d[g]||{_errors:[]},d[g]._errors.push(n(c))):d[g]=d[g]||{_errors:[]},d=d[g],h++}}};return r(e),i}const ap=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 Rs;if(d.issues.length){const h=new(l?.Err??e)(d.issues.map(g=>Fa(g,c,Ja())));throw $v(h,l?.callee),h}return d.value},ip=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 h=new(l?.Err??e)(d.issues.map(g=>Fa(g,c,Ja())));throw $v(h,l?.callee),h}return d.value},hc=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 Rs;return c.issues.length?{success:!1,error:new(e??Pv)(c.issues.map(d=>Fa(d,l,Ja())))}:{success:!0,data:c.value}},m_=hc(Gv),gc=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=>Fa(d,l,Ja())))}:{success:!0,data:c.value}},h_=gc(Gv),g_=e=>(n,i,r)=>{const l=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return ap(e)(n,i,l)},y_=e=>(n,i,r)=>ap(e)(n,i,r),b_=e=>async(n,i,r)=>{const l=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return ip(e)(n,i,l)},v_=e=>async(n,i,r)=>ip(e)(n,i,r),S_=e=>(n,i,r)=>{const l=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return hc(e)(n,i,l)},x_=e=>(n,i,r)=>hc(e)(n,i,r),w_=e=>async(n,i,r)=>{const l=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return gc(e)(n,i,l)},j_=e=>async(n,i,r)=>gc(e)(n,i,r),N_=/^[cC][^\s-]{8,}$/,k_=/^[0-9a-z]+$/,A_=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,__=/^[0-9a-vA-V]{20}$/,C_=/^[A-Za-z0-9]{27}$/,T_=/^[a-zA-Z0-9_-]{21}$/,E_=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,O_=/^([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})$/,tb=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)$/,z_=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,D_="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function R_(){return new RegExp(D_,"u")}const M_=/^(?:(?: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])$/,B_=/^(([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}|:))$/,L_=/^((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])$/,q_=/^(([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])$/,U_=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Hv=/^[A-Za-z0-9_-]*$/,$_=/^\+[1-9]\d{6,14}$/,Qv="(?:(?:\\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])))",V_=new RegExp(`^${Qv}$`);function Kv(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 I_(e){return new RegExp(`^${Kv(e)}$`)}function P_(e){const n=Kv({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(`^${Qv}T(?:${r})$`)}const G_=e=>{const n=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${n}$`)},H_=/^-?\d+$/,Zv=/^-?\d+(?:\.\d+)?$/,Q_=/^(?:true|false)$/i,K_=/^[^A-Z]*$/,Z_=/^[^a-z]*$/,an=Q("$ZodCheck",(e,n)=>{var i;e._zod??(e._zod={}),e._zod.def=n,(i=e._zod).onattach??(i.onattach=[])}),Yv={number:"number",bigint:"bigint",object:"date"},Xv=Q("$ZodCheckLessThan",(e,n)=>{an.init(e,n);const i=Yv[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})}}),Jv=Q("$ZodCheckGreaterThan",(e,n)=>{an.init(e,n);const i=Yv[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})}}),Y_=Q("$ZodCheckMultipleOf",(e,n)=>{an.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):WA(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})}}),X_=Q("$ZodCheckNumberFormat",(e,n)=>{an.init(e,n),n.format=n.format||"float64";const i=n.format?.includes("int"),r=i?"int":"number",[l,c]=i_[n.format];e._zod.onattach.push(d=>{const h=d._zod.bag;h.format=n.format,h.minimum=l,h.maximum=c,i&&(h.pattern=H_)}),e._zod.check=d=>{const h=d.value;if(i){if(!Number.isInteger(h)){d.issues.push({expected:r,format:n.format,code:"invalid_type",continue:!1,input:h,inst:e});return}if(!Number.isSafeInteger(h)){h>0?d.issues.push({input:h,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:h,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}}h<l&&d.issues.push({origin:"number",input:h,code:"too_small",minimum:l,inclusive:!0,inst:e,continue:!n.abort}),h>c&&d.issues.push({origin:"number",input:h,code:"too_big",maximum:c,inclusive:!0,inst:e,continue:!n.abort})}}),J_=Q("$ZodCheckMaxLength",(e,n)=>{var i;an.init(e,n),(i=e._zod.def).when??(i.when=r=>{const l=r.value;return!ep(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=np(l);r.issues.push({origin:d,code:"too_big",maximum:n.maximum,inclusive:!0,input:l,inst:e,continue:!n.abort})}}),F_=Q("$ZodCheckMinLength",(e,n)=>{var i;an.init(e,n),(i=e._zod.def).when??(i.when=r=>{const l=r.value;return!ep(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=np(l);r.issues.push({origin:d,code:"too_small",minimum:n.minimum,inclusive:!0,input:l,inst:e,continue:!n.abort})}}),W_=Q("$ZodCheckLengthEquals",(e,n)=>{var i;an.init(e,n),(i=e._zod.def).when??(i.when=r=>{const l=r.value;return!ep(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=np(l),h=c>n.length;r.issues.push({origin:d,...h?{code:"too_big",maximum:n.length}:{code:"too_small",minimum:n.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!n.abort})}}),yc=Q("$ZodCheckStringFormat",(e,n)=>{var i,r;an.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=()=>{})}),e2=Q("$ZodCheckRegex",(e,n)=>{yc.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})}}),t2=Q("$ZodCheckLowerCase",(e,n)=>{n.pattern??(n.pattern=K_),yc.init(e,n)}),n2=Q("$ZodCheckUpperCase",(e,n)=>{n.pattern??(n.pattern=Z_),yc.init(e,n)}),a2=Q("$ZodCheckIncludes",(e,n)=>{an.init(e,n);const i=Us(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})}}),i2=Q("$ZodCheckStartsWith",(e,n)=>{an.init(e,n);const i=new RegExp(`^${Us(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})}}),s2=Q("$ZodCheckEndsWith",(e,n)=>{an.init(e,n);const i=new RegExp(`.*${Us(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})}}),r2=Q("$ZodCheckOverwrite",(e,n)=>{an.init(e,n),e._zod.check=i=>{i.value=n.tx(i.value)}});class o2{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(`
|
|
12
|
+
`);M=Se.pop()??"";for(const $e of Se){const le=$e.split(`
|
|
13
|
+
`),fe=[];let $;for(const je of le)if(je.startsWith("data:"))fe.push(je.replace(/^data:\s*/,""));else if(je.startsWith("event:"))$=je.replace(/^event:\s*/,"");else if(je.startsWith("id:"))x=je.replace(/^id:\s*/,"");else if(je.startsWith("retry:")){const se=Number.parseInt(je.replace(/^retry:\s*/,""),10);Number.isNaN(se)||(k=se)}let W,pe=!1;if(fe.length){const je=fe.join(`
|
|
14
|
+
`);try{W=JSON.parse(je),pe=!0}catch{W=je}}pe&&(l&&await l(W),r&&(W=await r(W))),i?.({data:W,event:$,id:x,retry:k}),fe.length&&(yield W)}}}finally{R.removeEventListener("abort",oe),z.releaseLock()}break}catch(P){if(n?.(P),d!==void 0&&O>=d)break;const Z=Math.min(k*2**(O-1),h??3e4);await N(Z)}}}()}},Zw=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},Yw=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},Xw=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},bv=({allowReserved:e,explode:n,name:i,style:r,value:l})=>{if(!n){const h=(e?l:l.map(g=>encodeURIComponent(g))).join(Yw(r));switch(r){case"label":return`.${h}`;case"matrix":return`;${i}=${h}`;case"simple":return h;default:return`${i}=${h}`}}const c=Zw(r),d=l.map(h=>r==="label"||r==="simple"?e?h:encodeURIComponent(h):pc({allowReserved:e,name:i,value:h})).join(c);return r==="label"||r==="matrix"?c+d:d},pc=({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)}`},vv=({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(([S,x])=>{g=[...g,S,e?x:encodeURIComponent(x)]});const v=g.join(",");switch(r){case"form":return`${i}=${v}`;case"label":return`.${v}`;case"matrix":return`;${i}=${v}`;default:return v}}const d=Xw(r),h=Object.entries(l).map(([g,v])=>pc({allowReserved:e,name:r==="deepObject"?`${i}[${g}]`:g,value:v})).join(d);return r==="label"||r==="matrix"?d+h:h},Fw=/\{[^{}]+\}/g,Jw=({path:e,url:n})=>{let i=n;const r=n.match(Fw);if(r)for(const l of r){let c=!1,d=l.substring(1,l.length-1),h="simple";d.endsWith("*")&&(c=!0,d=d.substring(0,d.length-1)),d.startsWith(".")?(d=d.substring(1),h="label"):d.startsWith(";")&&(d=d.substring(1),h="matrix");const g=e[d];if(g==null)continue;if(Array.isArray(g)){i=i.replace(l,bv({explode:c,name:d,style:h,value:g}));continue}if(typeof g=="object"){i=i.replace(l,vv({explode:c,name:d,style:h,value:g,valueOnly:!0}));continue}if(h==="matrix"){i=i.replace(l,`;${pc({name:d,value:g})}`);continue}const v=encodeURIComponent(h==="label"?`.${g}`:g);i=i.replace(l,v)}return i},Ww=({baseUrl:e,path:n,query:i,querySerializer:r,url:l})=>{const c=l.startsWith("/")?l:`/${l}`;let d=(e??"")+c;n&&(d=Jw({path:n,url:d}));let h=i?r(i):"";return h.startsWith("?")&&(h=h.substring(1)),h&&(d+=`?${h}`),d};function ej(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 tj=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 h=l[d];if(h!=null)if(Array.isArray(h)){const g=bv({allowReserved:e,explode:!0,name:d,style:"form",value:h,...n});g&&c.push(g)}else if(typeof h=="object"){const g=vv({allowReserved:e,explode:!0,name:d,style:"deepObject",value:h,...i});g&&c.push(g)}else{const g=pc({allowReserved:e,name:d,value:h});g&&c.push(g)}}return c.join("&")},nj=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"}},aj=(e,n)=>n?!!(e.headers.has(n)||e.query?.[n]||e.headers.get("Cookie")?.includes(`${n}=`)):!1,ij=async({security:e,...n})=>{for(const i of e){if(aj(n,i.name))continue;const r=await tj(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}}},Py=e=>Ww({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:Sv(e.querySerializer),url:e.url}),Gy=(e,n)=>{const i={...e,...n};return i.baseUrl?.endsWith("/")&&(i.baseUrl=i.baseUrl.substring(0,i.baseUrl.length-1)),i.headers=xv(e.headers,n.headers),i},sj=e=>{const n=[];return e.forEach((i,r)=>{n.push([r,i])}),n},xv=(...e)=>{const n=new Headers;for(const i of e){if(!i)continue;const r=i instanceof Headers?sj(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 sf{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 rj=()=>({error:new sf,request:new sf,response:new sf}),oj=Sv({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),lj={"Content-Type":"application/json"},wv=(e={})=>({...Qw,headers:lj,parseAs:"auto",querySerializer:oj,...e}),jv=(e={})=>{let n=Gy(wv(),e);const i=()=>({...n}),r=v=>(n=Gy(n,v),i()),l=rj(),c=async v=>{const S={...n,...v,fetch:v.fetch??n.fetch??globalThis.fetch,headers:xv(n.headers,v.headers),serializedBody:void 0};S.security&&await ij({...S,security:S.security}),S.requestValidator&&await S.requestValidator(S),S.body!==void 0&&S.bodySerializer&&(S.serializedBody=S.bodySerializer(S.body)),(S.body===void 0||S.serializedBody==="")&&S.headers.delete("Content-Type");const x=Py(S);return{opts:S,url:x}},d=async v=>{const{opts:S,url:x}=await c(v),N={redirect:"follow",...S,body:ej(S)};let _=new Request(x,N);for(const X of l.request.fns)X&&(_=await X(_,S));const T=S.fetch;let k=await T(_);for(const X of l.response.fns)X&&(k=await X(k,_,S));const O={request:_,response:k};if(k.ok){const X=(S.parseAs==="auto"?nj(k.headers.get("Content-Type")):S.parseAs)??"json";if(k.status===204||k.headers.get("Content-Length")==="0"){let z;switch(X){case"arrayBuffer":case"blob":case"text":z=await k[X]();break;case"formData":z=new FormData;break;case"stream":z=k.body;break;default:z={};break}return S.responseStyle==="data"?z:{data:z,...O}}let J;switch(X){case"arrayBuffer":case"blob":case"formData":case"json":case"text":J=await k[X]();break;case"stream":return S.responseStyle==="data"?k.body:{data:k.body,...O}}return X==="json"&&(S.responseValidator&&await S.responseValidator(J),S.responseTransformer&&(J=await S.responseTransformer(J))),S.responseStyle==="data"?J:{data:J,...O}}const R=await k.text();let I;try{I=JSON.parse(R)}catch{}const P=I??R;let Z=P;for(const X of l.error.fns)X&&(Z=await X(P,k,_,S));if(Z=Z||{},S.throwOnError)throw Z;return S.responseStyle==="data"?void 0:{error:Z,...O}},h=v=>S=>d({...S,method:v}),g=v=>async S=>{const{opts:x,url:N}=await c(S);return Kw({...x,body:x.body,headers:x.headers,method:v,onRequest:async(_,T)=>{let k=new Request(_,T);for(const O of l.request.fns)O&&(k=await O(k,x));return k},url:N})};return{buildUrl:Py,connect:h("CONNECT"),delete:h("DELETE"),get:h("GET"),getConfig:i,head:h("HEAD"),interceptors:l,options:h("OPTIONS"),patch:h("PATCH"),post:h("POST"),put:h("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:h("TRACE")}},H=jv(wv()),cj=e=>(e.client??H).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}",...e}),Nv=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}",...e}),uj=e=>(e.client??H).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}",...e,headers:{"Content-Type":"application/json",...e.headers}}),dj=e=>(e?.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects",...e}),fj=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/locations",...e,headers:{"Content-Type":"application/json",...e.headers}}),pj=e=>(e.client??H).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/locations/{label}",...e}),mj=e=>(e.client??H).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/locations/default",...e,headers:{"Content-Type":"application/json",...e.headers}}),hj=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/export",...e}),gj=e=>(e.client??H).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/queries",...e,headers:{"Content-Type":"application/json",...e.headers}}),yj=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/queries",...e}),bj=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/queries",...e,headers:{"Content-Type":"application/json",...e.headers}}),vj=e=>(e.client??H).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/queries",...e,headers:{"Content-Type":"application/json",...e.headers}}),Sj=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/queries/generate",...e,headers:{"Content-Type":"application/json",...e.headers}}),xj=e=>(e.client??H).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/competitors",...e,headers:{"Content-Type":"application/json",...e.headers}}),wj=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/competitors",...e}),jj=e=>(e.client??H).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/competitors",...e,headers:{"Content-Type":"application/json",...e.headers}}),kv=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/runs",...e}),Nj=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/runs",...e,headers:{"Content-Type":"application/json",...e.headers}}),kj=e=>(e?.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/runs",...e}),Aj=e=>(e?.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/runs",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Av=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/runs/{id}",...e}),_j=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/apply",...e,headers:{"Content-Type":"application/json",...e.headers}}),Cj=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/timeline",...e}),Tj=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/analytics/metrics",...e}),_v=e=>(e?.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/settings",...e}),Ej=e=>(e.client??H).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/settings/providers/{name}",...e,headers:{"Content-Type":"application/json",...e.headers}}),Oj=e=>(e.client??H).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/settings/google",...e,headers:{"Content-Type":"application/json",...e.headers}}),zj=e=>(e.client??H).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/settings/bing",...e,headers:{"Content-Type":"application/json",...e.headers}}),Dj=e=>(e.client??H).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/settings/cdp",...e,headers:{"Content-Type":"application/json",...e.headers}}),Rj=e=>(e.client??H).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/schedule",...e}),Mj=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/schedule",...e}),Bj=e=>(e.client??H).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/schedule",...e,headers:{"Content-Type":"application/json",...e.headers}}),Lj=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/notifications",...e}),qj=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/notifications",...e,headers:{"Content-Type":"application/json",...e.headers}}),Uj=e=>(e.client??H).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/notifications/{id}",...e}),$j=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/notifications/{id}/test",...e}),Vj=e=>(e?.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/cdp/status",...e}),Ij=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/connections",...e}),Pj=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/connect",...e,headers:{"Content-Type":"application/json",...e.headers}}),Gj=e=>(e.client??H).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/connections/{type}",...e}),Hj=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/properties",...e}),Qj=e=>(e.client??H).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/connections/{type}/property",...e,headers:{"Content-Type":"application/json",...e.headers}}),Kj=e=>(e.client??H).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/connections/{type}/sitemap",...e,headers:{"Content-Type":"application/json",...e.headers}}),Zj=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/sync",...e,headers:{"Content-Type":"application/json",...e.headers}}),Yj=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/performance",...e}),Xj=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/performance/daily",...e}),Fj=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/inspect",...e,headers:{"Content-Type":"application/json",...e.headers}}),Jj=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/inspections",...e}),Wj=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/deindexed",...e}),Cv=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/coverage",...e}),eN=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/coverage/history",...e}),tN=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/sitemaps",...e}),nN=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/discover-sitemaps",...e}),aN=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/inspect-sitemap",...e,headers:{"Content-Type":"application/json",...e.headers}}),iN=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/indexing/request",...e,headers:{"Content-Type":"application/json",...e.headers}}),sN=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/locations",...e}),rN=e=>(e.client??H).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/locations/{locationName}/selection",...e,headers:{"Content-Type":"application/json",...e.headers}}),oN=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/sync",...e,headers:{"Content-Type":"application/json",...e.headers}}),lN=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/keywords",...e}),cN=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/place-actions",...e}),uN=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/lodging",...e}),dN=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/places",...e}),fN=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/summary",...e}),pN=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/connect",...e,headers:{"Content-Type":"application/json",...e.headers}}),mN=e=>(e.client??H).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/disconnect",...e}),hN=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/status",...e}),gN=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/sites",...e}),yN=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/set-site",...e,headers:{"Content-Type":"application/json",...e.headers}}),Tv=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/coverage",...e}),bN=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/inspections",...e}),vN=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/inspect-url",...e,headers:{"Content-Type":"application/json",...e.headers}}),SN=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/inspect-sitemap",...e,headers:{"Content-Type":"application/json",...e.headers}}),xN=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/request-indexing",...e,headers:{"Content-Type":"application/json",...e.headers}}),wN=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/performance",...e}),jN=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/connect",...e,headers:{"Content-Type":"application/json",...e.headers}}),NN=e=>(e.client??H).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/disconnect",...e}),kN=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/status",...e}),AN=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/sync",...e,headers:{"Content-Type":"application/json",...e.headers}}),_N=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/traffic",...e}),CN=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/ai-referral-history",...e}),TN=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/social-referral-history",...e}),EN=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/session-history",...e}),ON=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/insights",...e}),zN=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/report",...e}),DN=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/citations/visibility",...e}),RN=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/content/dismissals",...e,headers:{"Content-Type":"application/json",...e.headers}}),MN=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/overview",...e}),BN=e=>(e?.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/status",...e}),LN=e=>(e?.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/install",...e}),qN=e=>(e?.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/syncs",...e}),UN=e=>(e?.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/syncs",...e,headers:{"Content-Type":"application/json",...e?.headers}}),$N=e=>(e?.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/syncs/latest",...e}),VN=e=>(e?.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/releases",...e}),IN=e=>(e?.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/latest-release",...e}),PN=e=>(e.client??H).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/cache/{release}",...e}),GN=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/backlinks/extract",...e,headers:{"Content-Type":"application/json",...e.headers}}),HN=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/backlinks/summary",...e}),QN=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/backlinks/domains",...e}),KN=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/backlinks/history",...e}),ZN=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/backlinks/sources",...e}),YN=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/backlinks/bing-sync",...e}),XN=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/connect/cloud-run",...e,headers:{"Content-Type":"application/json",...e.headers}}),FN=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/connect/wordpress",...e,headers:{"Content-Type":"application/json",...e.headers}}),JN=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/connect/vercel",...e,headers:{"Content-Type":"application/json",...e.headers}}),WN=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/sources/{id}/sync",...e,headers:{"Content-Type":"application/json",...e.headers}}),ek=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/sources/{id}/backfill",...e,headers:{"Content-Type":"application/json",...e.headers}}),tk=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/sources",...e}),nk=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/status",...e}),ak=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/sources/{id}",...e}),ik=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/events",...e}),sk=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/discover/run",...e,headers:{"Content-Type":"application/json",...e.headers}}),rk=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/discover/sessions",...e}),ok=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/discover/sessions/{id}",...e}),lk=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/discover/sessions/{id}/promote",...e}),ck=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/discover/sessions/{id}/promote",...e,headers:{"Content-Type":"application/json",...e.headers}}),uk=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo",...e}),dk=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/pages",...e}),fk=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/trend",...e}),pk=e=>(e.client??H).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/runs",...e,headers:{"Content-Type":"application/json",...e.headers}}),mk=e=>(e.client??H).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/agent/providers",...e});function hk(e){const n={baseUrl:e.baseUrl,fetch:e.fetch,headers:{...e.headers??{}}};return jv(n)}class Hn extends Error{code;statusCode;details;constructor(n,i,r,l){super(n),this.name="ApiError",this.code=r??"UNKNOWN",this.statusCode=i,this.details=l}}function Ev(){if(typeof window>"u")return null;const e=window.__CANONRY_CONFIG__?.embed;return e?.enabled?e:null}function gk(){return Ev()!==null}function yk(){return typeof window<"u"&&window.__CANONRY_CONFIG__?.basePath?window.__CANONRY_CONFIG__.basePath.replace(/\/$/,"")+"/api/v1":"/api/v1"}const Ov=yk();function bk(){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 vk(){return typeof window<"u"&&window.__CANONRY_CONFIG__?.basePath?window.__CANONRY_CONFIG__.basePath.replace(/\/$/,""):""}function Sk(e){return`${vk()}${e}`}function xk(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 wk(){return""}function rf(){return!!wk()}let zv=null;function Hy(e){zv=e}function Yf(){zv?.()}const te=hk({baseUrl:bk()});te.interceptors.response.use((e,n)=>(e.status===401&&!n.url.includes("/api/v1/session")&&Yf(),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,c;if(typeof n.error=="object"&&n.error!==null){const d=n.error.error;if(typeof d=="string")r=d;else if(d&&typeof d=="object"){const h=d;h.message&&(r=h.message),h.code&&(l=h.code),h.details&&(c=h.details)}else{const h=n.error;h.message&&(r=h.message),h.code&&(l=h.code),h.details&&(c=h.details)}}else typeof n.error=="string"&&(r=n.error);throw new Hn(r,i,l,c)}if(n.response.status!==204)return n.data}async function Xf(e,n){const i=n?.body!=null,r=await fetch(`${Ov}${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,h;if(l)try{const g=JSON.parse(l);typeof g.error=="string"?c=g.error:g.error?.message?(c=g.error.message,d=g.error.code,h=g.error.details):g.message&&(c=g.message)}catch{c=l}throw r.status===401&&!e.startsWith("/session")&&Yf(),new Hn(c,r.status,d,h)}if(r.status!==204)return r.json()}function Ff(e){return ce(()=>Nv({client:te,path:{name:e}}))}function TL(e){return ce(()=>kv({client:te,path:{name:e}}))}function Wl(e){return ce(()=>Av({client:te,path:{id:e}}))}function jk(e){return ce(()=>yj({client:te,path:{name:e}}))}function Nk(e){return ce(()=>wj({client:te,path:{name:e}}))}function kk(e,n){return ce(()=>Cj({client:te,path:{name:e},query:{location:n}}))}function Dv(e,n){return ce(()=>MN({client:te,path:{name:e},query:{location:n?.location,since:n?.since}}))}function co(e,n){return ce(()=>uj({client:te,path:{name:e},body:n}))}function Ak(e,n){return ce(()=>vj({client:te,path:{name:e},body:{queries:n}}))}function _k(e,n){return ce(()=>bj({client:te,path:{name:e},body:{queries:n}}))}function EL(e,n){return ce(()=>gj({client:te,path:{name:e},body:{queries:n}}))}function Ck(e,n){return ce(()=>RN({client:te,path:{name:e},body:n}))}function Tk(e,n){return ce(()=>jj({client:te,path:{name:e},body:{competitors:n}}))}function OL(e,n){return ce(()=>xj({client:te,path:{name:e},body:{competitors:n}}))}async function zL(e,n){const i=await Ff(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 DL(e,n){const i=await Ff(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 RL(e,n){const i=await Ff(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 Ek(e,n){const i={};return n?.location&&(i.location=n.location),n?.allLocations&&(i.allLocations=!0),n?.noLocation&&(i.noLocation=!0),ce(()=>Nj({client:te,path:{name:e},body:i}))}function ML(e,n){return ce(()=>fj({client:te,path:{name:e},body:n}))}async function BL(e,n){await ce(()=>pj({client:te,path:{name:e,label:n}}))}function LL(e,n){return ce(()=>mj({client:te,path:{name:e},body:{label:n}}))}async function qL(e){await ce(()=>cj({client:te,path:{name:e}}))}function UL(e){return ce(()=>hj({client:te,path:{name:e}}))}function $L(){return ce(()=>_v({client:te}))}function Qy(){return Xf("/session")}function Ok(e){return Xf("/session/setup",{method:"POST",body:JSON.stringify({password:e})})}function zk(e){return Xf("/session",{method:"POST",body:JSON.stringify({password:e})})}function Dk(e,n){return ce(()=>Ej({client:te,path:{name:e},body:n}))}function VL(e){return ce(()=>Oj({client:te,body:e}))}async function IL(e){try{return await ce(()=>Mj({client:te,path:{name:e}}))}catch(n){if(n instanceof Hn&&n.statusCode===404)return null;throw n}}function PL(e,n){return ce(()=>Bj({client:te,path:{name:e},body:n}))}async function GL(e){await ce(()=>Rj({client:te,path:{name:e}}))}function HL(e){return ce(()=>Lj({client:te,path:{name:e}}))}function QL(e,n){return ce(()=>qj({client:te,path:{name:e},body:n}))}async function KL(e,n){await ce(()=>Uj({client:te,path:{name:e,id:n}}))}function ZL(e,n){return ce(()=>$j({client:te,path:{name:e,id:n}}))}function Rk(e,n,i){return ce(()=>Sj({client:te,path:{name:e},body:{provider:n,count:i}}))}function Mk(e){return ce(()=>_j({client:te,body:e}))}function Bk(e){return ce(()=>Aj({client:te,body:e??{}}))}function YL(e,n){return ce(()=>Pj({client:te,path:{name:e},body:{type:n}}))}function XL(e,n){return ce(()=>Gj({client:te,path:{name:e,type:n}}))}function FL(e,n,i){return ce(()=>Qj({client:te,path:{name:e,type:n},body:{propertyId:i}}))}function JL(e,n,i){return ce(()=>Kj({client:te,path:{name:e,type:n},body:{sitemapUrl:i}}))}function Lk(e,n){return ce(()=>Zj({client:te,path:{name:e},body:n??{}}))}function WL(e,n){const i={};return n&&n!=="all"&&(i.window=n),ce(()=>Tj({client:te,path:{name:e},query:i}))}function e5(e,n){return ce(()=>Fj({client:te,path:{name:e},body:{url:n}}))}function qk(e){return ce(()=>Cv({client:te,path:{name:e}}))}function Uk(e,n){return ce(()=>aN({client:te,path:{name:e},body:n??{}}))}function t5(e){return ce(()=>tN({client:te,path:{name:e}}))}function $k(e){return ce(()=>nN({client:te,path:{name:e}}))}function n5(e,n){return ce(()=>pk({client:te,path:{name:e},body:{}}))}function a5(e,n){return ce(()=>sk({client:te,path:{name:e},body:n??{}}))}function i5(e,n,i){return ce(()=>ck({client:te,path:{name:e,id:n},body:i??{}}))}function s5(){return ce(()=>Vj({client:te}))}function r5(e,n){return ce(()=>Dj({client:te,body:{host:e,port:n}}))}function o5(e,n){return ce(()=>iN({client:te,path:{name:e},body:n}))}function l5(e,n){return ce(()=>pN({client:te,path:{name:e},body:{apiKey:n}}))}function c5(e){return ce(()=>mN({client:te,path:{name:e}}))}function u5(e,n){return ce(()=>yN({client:te,path:{name:e},body:{siteUrl:n}}))}function Vk(e){return ce(()=>Tv({client:te,path:{name:e}}))}function d5(e,n){return ce(()=>vN({client:te,path:{name:e},body:{url:n}}))}function f5(e,n){return ce(()=>SN({client:te,path:{name:e},body:{}}))}function p5(e,n){return ce(()=>xN({client:te,path:{name:e},body:n}))}function m5(e){return ce(()=>zj({client:te,body:{apiKey:e}}))}function Ik(e){return e?/filename\s*=\s*"?([^";]+)"?/i.exec(e)?.[1]??null:null}async function h5(e,n="agency",i){const r=new URLSearchParams({audience:n});i!==void 0&&r.set("period",String(i));const l=await fetch(`${Ov}/projects/${encodeURIComponent(e)}/report.html?${r.toString()}`,{credentials:"same-origin",headers:{}});if(!l.ok)throw new Hn(`Failed to download report: ${l.status}`,l.status);const c=await l.blob(),d=URL.createObjectURL(c),h=Ik(l.headers.get("Content-Disposition"))??`canonry-report-${e}.html`,g=document.createElement("a");g.href=d,g.download=h,document.body.appendChild(g),g.click(),document.body.removeChild(g),URL.revokeObjectURL(d)}function g5(e,n){return ce(()=>AN({client:te,path:{name:e},body:{}}))}function y5(e,n){return ce(()=>jN({client:te,path:{name:e},body:n}))}function b5(e){return ce(()=>NN({client:te,path:{name:e}}))}function v5(e,n){return ce(()=>XN({client:te,path:{name:e},body:n}))}function S5(e,n){return ce(()=>FN({client:te,path:{name:e},body:n}))}function x5(e,n){return ce(()=>JN({client:te,path:{name:e},body:n}))}function w5(e,n,i){return ce(()=>WN({client:te,path:{name:e,id:n},body:i??{}}))}function j5(e,n,i){return ce(()=>ek({client:te,path:{name:e,id:n},body:{}}))}function Pk(e,n){return ce(()=>ON({client:te,path:{name:e},query:{runId:n}}))}function Gk(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 Hk(e,n){const i=Sk(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:xk(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,h=typeof l.lastHeartbeatAt=="string"?l.lastHeartbeatAt:void 0,g=Gk(l.updateAvailable),v=[c,d===!1?"database not configured":"database configured",h?`heartbeat ${h}`:void 0].filter(Boolean).join(" · ");return{label:n,state:"ok",detail:v,version:c,databaseConfigured:d,lastHeartbeatAt:h,...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 N5(){return ce(()=>BN({client:te}))}function k5(){return ce(()=>LN({client:te}))}function A5(){return ce(()=>$N({client:te}))}function _5(){return ce(()=>qN({client:te}))}function C5(e){return ce(()=>UN({client:te,body:e?{release:e}:{}}))}function T5(){return ce(()=>VN({client:te}))}function E5(){return ce(()=>IN({client:te}))}function O5(e){return ce(()=>PN({client:te,path:{release:e}}))}function z5(e,n={}){return ce(()=>HN({client:te,path:{name:e},query:{release:n.release,excludeCrawlers:n.excludeCrawlers?"1":void 0,source:n.source}}))}function D5(e,n={}){return ce(()=>QN({client:te,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,source:n.source}}))}function R5(e,n={}){return ce(()=>KN({client:te,path:{name:e},query:{source:n.source}}))}function M5(e,n={}){return ce(()=>ZN({client:te,path:{name:e},query:{excludeCrawlers:n.excludeCrawlers?"1":void 0}}))}function B5(e,n){return ce(()=>GN({client:te,path:{name:e},body:{release:void 0}}))}function L5(e){return ce(()=>YN({client:te,path:{name:e}}))}function Nn(e){return(...n)=>{e(...n)}}const Qk=6e3,Kk=5,Zk=180;let It=[],Yk=0;const wf=new Set,jf=new Map,Nf=new Map;function ec(){const e=[...It];for(const n of wf)n(e)}function Jf(e){const n=jf.get(e);n&&(clearTimeout(n),jf.delete(e));const i=Nf.get(e);i&&(clearTimeout(i),Nf.delete(e))}function Rv(e){Jf(e);const n=It.length;It=It.filter(i=>i.id!==e),It.length!==n&&ec()}function Ky(e){Jf(e.id),jf.set(e.id,setTimeout(()=>{kf(e.id)},e.durationMs))}function Xk(e,n,i){return typeof e=="string"?{title:e,tone:n,durationMs:i}:e}function tn(e,n="negative",i=Qk){const r=Xk(e,n,i),l={id:String(++Yk),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=It.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 It=It.map(h=>h.id===c.id?d:h),ec(),Ky(d),c.id}}return It.length>=Kk&&Rv(It[0].id),It=[...It,l],ec(),Ky(l),l.id}function kf(e){const n=It.find(i=>i.id===e);!n||n.state==="closing"||(Jf(e),It=It.map(i=>i.id===e?{...i,state:"closing"}:i),ec(),Nf.set(e,setTimeout(()=>{Rv(e)},Zk)))}function Fk(e){return wf.add(e),()=>{wf.delete(e)}}function Zy(){return It}const Jk=5*6e4,Af=30*6e4,q5=3e4,U5=6e4,ao=3e4,Wk=2e3,eA=5e3;function tA(){return new Tw({defaultOptions:{queries:{staleTime:Jk,retry:1,refetchOnWindowFocus:!1}},mutationCache:new Ew({onError:(e,n,i,r)=>{r.meta?.skipGlobalErrorToast||tn({title:e instanceof Error?e.message:"An unexpected error occurred",tone:"negative"})}})})}const nA="modulepreload",aA=function(e,n){return new URL(e,n).href},Yy={},Gs=function(n,i,r){let l=Promise.resolve();if(i&&i.length>0){let v=function(S){return Promise.all(S.map(x=>Promise.resolve(x).then(N=>({status:"fulfilled",value:N}),N=>({status:"rejected",reason:N}))))};const d=document.getElementsByTagName("link"),h=document.querySelector("meta[property=csp-nonce]"),g=h?.nonce||h?.getAttribute("nonce");l=v(i.map(S=>{if(S=aA(S,r),S in Yy)return;Yy[S]=!0;const x=S.endsWith(".css"),N=x?'[rel="stylesheet"]':"";if(r)for(let T=d.length-1;T>=0;T--){const k=d[T];if(k.href===S&&(!x||k.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${S}"]${N}`))return;const _=document.createElement("link");if(_.rel=x?"stylesheet":nA,x||(_.as="script"),_.crossOrigin="",_.href=S,g&&_.setAttribute("nonce",g),document.head.appendChild(_),x)return new Promise((T,k)=>{_.addEventListener("load",T),_.addEventListener("error",()=>k(new Error(`Unable to preload CSS for ${S}`)))})}))}function c(d){const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=d,window.dispatchEvent(h),!h.defaultPrevented)throw d}return l.then(d=>{for(const h of d||[])h.status==="rejected"&&c(h.reason);return n().catch(c)})};const iA=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),sA=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,i,r)=>r?r.toUpperCase():i.toLowerCase()),Xy=e=>{const n=sA(e);return n.charAt(0).toUpperCase()+n.slice(1)},Mv=(...e)=>e.filter((n,i,r)=>!!n&&n.trim()!==""&&r.indexOf(n)===i).join(" ").trim(),rA=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0};var oA={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 lA=q.forwardRef(({color:e="currentColor",size:n=24,strokeWidth:i=2,absoluteStrokeWidth:r,className:l="",children:c,iconNode:d,...h},g)=>q.createElement("svg",{ref:g,...oA,width:n,height:n,stroke:e,strokeWidth:r?Number(i)*24/Number(n):i,className:Mv("lucide",l),...!c&&!rA(h)&&{"aria-hidden":"true"},...h},[...d.map(([v,S])=>q.createElement(v,S)),...Array.isArray(c)?c:[c]]));const et=(e,n)=>{const i=q.forwardRef(({className:r,...l},c)=>q.createElement(lA,{ref:c,iconNode:n,className:Mv(`lucide-${iA(Xy(e))}`,`lucide-${e}`,r),...l}));return i.displayName=Xy(e),i};const cA=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],uA=et("arrow-right",cA);const dA=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],fA=et("arrow-up",dA);const pA=[["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"}]],mA=et("book-open",pA);const hA=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Bv=et("check",hA);const gA=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],yA=et("chevron-down",gA);const bA=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Wf=et("chevron-right",bA);const vA=[["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"}]],SA=et("copy",vA);const xA=[["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"}]],wA=et("file-text",xA);const jA=[["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"}]],NA=et("github",jA);const kA=[["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"}]],AA=et("globe",kA);const _A=[["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"}]],CA=et("layout-dashboard",_A);const TA=[["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"}]],EA=et("link-2",TA);const OA=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],zA=et("loader-circle",OA);const DA=[["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"}]],RA=et("maximize-2",DA);const MA=[["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 18h16",key:"19g7jn"}],["path",{d:"M4 6h16",key:"1o0s65"}]],BA=et("menu",MA);const LA=[["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"}]],qA=et("minimize-2",LA);const UA=[["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"}]],$A=et("play",UA);const VA=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Fy=et("plus",VA);const IA=[["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"}]],PA=et("radar",IA);const GA=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],Jy=et("radio",GA);const HA=[["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"}]],QA=et("rocket",HA);const KA=[["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"}]],Lv=et("rotate-ccw",KA);const ZA=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],YA=et("search",ZA);const XA=[["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"}]],FA=et("settings",XA);const JA=[["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"}]],qv=et("triangle-alert",JA);const WA=[["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"}]],e_=et("wrench",WA);const t_=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Hs=et("x",t_);function Q(e,n,i){function r(h,g){if(h._zod||Object.defineProperty(h,"_zod",{value:{def:g,constr:d,traits:new Set},enumerable:!1}),h._zod.traits.has(e))return;h._zod.traits.add(e),n(h,g);const v=d.prototype,S=Object.keys(v);for(let x=0;x<S.length;x++){const N=S[x];N in h||(h[N]=v[N].bind(h))}}const l=i?.Parent??Object;class c extends l{}Object.defineProperty(c,"name",{value:e});function d(h){var g;const v=i?.Parent?new c:this;r(v,h),(g=v._zod).deferred??(g.deferred=[]);for(const S of v._zod.deferred)S();return v}return Object.defineProperty(d,"init",{value:r}),Object.defineProperty(d,Symbol.hasInstance,{value:h=>i?.Parent&&h instanceof i.Parent?!0:h?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}class Rs extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Uv extends Error{constructor(n){super(`Encountered unidirectional transform during encode: ${n}`),this.name="ZodEncodeError"}}const $v={};function Fa(e){return $v}function Vv(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 _f(e,n){return typeof n=="bigint"?n.toString():n}function mc(e){return{get value(){{const n=e();return Object.defineProperty(this,"value",{value:n}),n}}}}function ep(e){return e==null}function tp(e){const n=e.startsWith("^")?1:0,i=e.endsWith("$")?e.length-1:e.length;return e.slice(n,i)}function n_(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(".","")),h=Number.parseInt(n.toFixed(c).replace(".",""));return d%h/10**c}const Wy=Symbol("evaluating");function He(e,n,i){let r;Object.defineProperty(e,n,{get(){if(r!==Wy)return r===void 0&&(r=Wy,r=i()),r},set(l){Object.defineProperty(e,n,{value:l})},configurable:!0})}function Ei(e,n,i){Object.defineProperty(e,n,{value:i,writable:!0,enumerable:!0,configurable:!0})}function ei(...e){const n={};for(const i of e){const r=Object.getOwnPropertyDescriptors(i);Object.assign(n,r)}return Object.defineProperties({},n)}function eb(e){return JSON.stringify(e)}function a_(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Iv="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function io(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const i_=mc(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function qs(e){if(io(e)===!1)return!1;const n=e.constructor;if(n===void 0||typeof n!="function")return!0;const i=n.prototype;return!(io(i)===!1||Object.prototype.hasOwnProperty.call(i,"isPrototypeOf")===!1)}function Pv(e){return qs(e)?{...e}:Array.isArray(e)?[...e]:e}const s_=new Set(["string","number","symbol"]);function Us(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ti(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 r_(e){return Object.keys(e).filter(n=>e[n]._zod.optin==="optional"&&e[n]._zod.optout==="optional")}const o_={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 l_(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=ei(e._zod.def,{get shape(){const d={};for(const h in n){if(!(h in i.shape))throw new Error(`Unrecognized key: "${h}"`);n[h]&&(d[h]=i.shape[h])}return Ei(this,"shape",d),d},checks:[]});return ti(e,c)}function c_(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=ei(e._zod.def,{get shape(){const d={...e._zod.def.shape};for(const h in n){if(!(h in i.shape))throw new Error(`Unrecognized key: "${h}"`);n[h]&&delete d[h]}return Ei(this,"shape",d),d},checks:[]});return ti(e,c)}function u_(e,n){if(!qs(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=ei(e._zod.def,{get shape(){const c={...e._zod.def.shape,...n};return Ei(this,"shape",c),c}});return ti(e,l)}function d_(e,n){if(!qs(n))throw new Error("Invalid input to safeExtend: expected a plain object");const i=ei(e._zod.def,{get shape(){const r={...e._zod.def.shape,...n};return Ei(this,"shape",r),r}});return ti(e,i)}function f_(e,n){const i=ei(e._zod.def,{get shape(){const r={...e._zod.def.shape,...n._zod.def.shape};return Ei(this,"shape",r),r},get catchall(){return n._zod.def.catchall},checks:[]});return ti(e,i)}function p_(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=ei(n._zod.def,{get shape(){const h=n._zod.def.shape,g={...h};if(i)for(const v in i){if(!(v in h))throw new Error(`Unrecognized key: "${v}"`);i[v]&&(g[v]=e?new e({type:"optional",innerType:h[v]}):h[v])}else for(const v in h)g[v]=e?new e({type:"optional",innerType:h[v]}):h[v];return Ei(this,"shape",g),g},checks:[]});return ti(n,d)}function m_(e,n,i){const r=ei(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 Ei(this,"shape",c),c}});return ti(n,r)}function Ts(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 Es(e,n){return n.map(i=>{var r;return(r=i).path??(r.path=[]),i.path.unshift(e),i})}function Ll(e){return typeof e=="string"?e:e?.message}function Ja(e,n,i){const r={...e,path:e.path??[]};if(!e.message){const l=Ll(e.inst?._zod.def?.error?.(e))??Ll(n?.error?.(e))??Ll(i.customError?.(e))??Ll(i.localeError?.(e))??"Invalid input";r.message=l}return delete r.inst,delete r.continue,n?.reportInput||delete r.input,r}function np(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function so(...e){const[n,i,r]=e;return typeof n=="string"?{message:n,code:"custom",input:i,inst:r}:{...n}}const Gv=(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,_f,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Hv=Q("$ZodError",Gv),Qv=Q("$ZodError",Gv,{Parent:Error});function h_(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 g_(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,h=0;for(;h<c.path.length;){const g=c.path[h];h===c.path.length-1?(d[g]=d[g]||{_errors:[]},d[g]._errors.push(n(c))):d[g]=d[g]||{_errors:[]},d=d[g],h++}}};return r(e),i}const ap=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 Rs;if(d.issues.length){const h=new(l?.Err??e)(d.issues.map(g=>Ja(g,c,Fa())));throw Iv(h,l?.callee),h}return d.value},ip=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 h=new(l?.Err??e)(d.issues.map(g=>Ja(g,c,Fa())));throw Iv(h,l?.callee),h}return d.value},hc=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 Rs;return c.issues.length?{success:!1,error:new(e??Hv)(c.issues.map(d=>Ja(d,l,Fa())))}:{success:!0,data:c.value}},y_=hc(Qv),gc=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=>Ja(d,l,Fa())))}:{success:!0,data:c.value}},b_=gc(Qv),v_=e=>(n,i,r)=>{const l=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return ap(e)(n,i,l)},S_=e=>(n,i,r)=>ap(e)(n,i,r),x_=e=>async(n,i,r)=>{const l=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return ip(e)(n,i,l)},w_=e=>async(n,i,r)=>ip(e)(n,i,r),j_=e=>(n,i,r)=>{const l=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return hc(e)(n,i,l)},N_=e=>(n,i,r)=>hc(e)(n,i,r),k_=e=>async(n,i,r)=>{const l=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return gc(e)(n,i,l)},A_=e=>async(n,i,r)=>gc(e)(n,i,r),__=/^[cC][^\s-]{8,}$/,C_=/^[0-9a-z]+$/,T_=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,E_=/^[0-9a-vA-V]{20}$/,O_=/^[A-Za-z0-9]{27}$/,z_=/^[a-zA-Z0-9_-]{21}$/,D_=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,R_=/^([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})$/,tb=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)$/,M_=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,B_="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function L_(){return new RegExp(B_,"u")}const q_=/^(?:(?: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])$/,U_=/^(([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}|:))$/,$_=/^((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])$/,V_=/^(([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])$/,I_=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Kv=/^[A-Za-z0-9_-]*$/,P_=/^\+[1-9]\d{6,14}$/,Zv="(?:(?:\\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])))",G_=new RegExp(`^${Zv}$`);function Yv(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 H_(e){return new RegExp(`^${Yv(e)}$`)}function Q_(e){const n=Yv({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(`^${Zv}T(?:${r})$`)}const K_=e=>{const n=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${n}$`)},Z_=/^-?\d+$/,Xv=/^-?\d+(?:\.\d+)?$/,Y_=/^(?:true|false)$/i,X_=/^[^A-Z]*$/,F_=/^[^a-z]*$/,an=Q("$ZodCheck",(e,n)=>{var i;e._zod??(e._zod={}),e._zod.def=n,(i=e._zod).onattach??(i.onattach=[])}),Fv={number:"number",bigint:"bigint",object:"date"},Jv=Q("$ZodCheckLessThan",(e,n)=>{an.init(e,n);const i=Fv[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})}}),Wv=Q("$ZodCheckGreaterThan",(e,n)=>{an.init(e,n);const i=Fv[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})}}),J_=Q("$ZodCheckMultipleOf",(e,n)=>{an.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):n_(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})}}),W_=Q("$ZodCheckNumberFormat",(e,n)=>{an.init(e,n),n.format=n.format||"float64";const i=n.format?.includes("int"),r=i?"int":"number",[l,c]=o_[n.format];e._zod.onattach.push(d=>{const h=d._zod.bag;h.format=n.format,h.minimum=l,h.maximum=c,i&&(h.pattern=Z_)}),e._zod.check=d=>{const h=d.value;if(i){if(!Number.isInteger(h)){d.issues.push({expected:r,format:n.format,code:"invalid_type",continue:!1,input:h,inst:e});return}if(!Number.isSafeInteger(h)){h>0?d.issues.push({input:h,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:h,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}}h<l&&d.issues.push({origin:"number",input:h,code:"too_small",minimum:l,inclusive:!0,inst:e,continue:!n.abort}),h>c&&d.issues.push({origin:"number",input:h,code:"too_big",maximum:c,inclusive:!0,inst:e,continue:!n.abort})}}),e2=Q("$ZodCheckMaxLength",(e,n)=>{var i;an.init(e,n),(i=e._zod.def).when??(i.when=r=>{const l=r.value;return!ep(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=np(l);r.issues.push({origin:d,code:"too_big",maximum:n.maximum,inclusive:!0,input:l,inst:e,continue:!n.abort})}}),t2=Q("$ZodCheckMinLength",(e,n)=>{var i;an.init(e,n),(i=e._zod.def).when??(i.when=r=>{const l=r.value;return!ep(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=np(l);r.issues.push({origin:d,code:"too_small",minimum:n.minimum,inclusive:!0,input:l,inst:e,continue:!n.abort})}}),n2=Q("$ZodCheckLengthEquals",(e,n)=>{var i;an.init(e,n),(i=e._zod.def).when??(i.when=r=>{const l=r.value;return!ep(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=np(l),h=c>n.length;r.issues.push({origin:d,...h?{code:"too_big",maximum:n.length}:{code:"too_small",minimum:n.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!n.abort})}}),yc=Q("$ZodCheckStringFormat",(e,n)=>{var i,r;an.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=()=>{})}),a2=Q("$ZodCheckRegex",(e,n)=>{yc.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})}}),i2=Q("$ZodCheckLowerCase",(e,n)=>{n.pattern??(n.pattern=X_),yc.init(e,n)}),s2=Q("$ZodCheckUpperCase",(e,n)=>{n.pattern??(n.pattern=F_),yc.init(e,n)}),r2=Q("$ZodCheckIncludes",(e,n)=>{an.init(e,n);const i=Us(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})}}),o2=Q("$ZodCheckStartsWith",(e,n)=>{an.init(e,n);const i=new RegExp(`^${Us(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})}}),l2=Q("$ZodCheckEndsWith",(e,n)=>{an.init(e,n);const i=new RegExp(`.*${Us(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})}}),c2=Q("$ZodCheckOverwrite",(e,n)=>{an.init(e,n),e._zod.check=i=>{i.value=n.tx(i.value)}});class u2{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
|
|
16
|
+
`))}}const d2={major:4,minor:3,patch:6},ut=Q("$ZodType",(e,n)=>{var i;e??(e={}),e._zod.def=n,e._zod.bag=e._zod.bag||{},e._zod.version=d2;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,h,g)=>{let v=Ts(d),S;for(const x of h){if(x._zod.def.when){if(!x._zod.def.when(d))continue}else if(v)continue;const N=d.issues.length,_=x._zod.check(d);if(_ instanceof Promise&&g?.async===!1)throw new Rs;if(S||_ instanceof Promise)S=(S??Promise.resolve()).then(async()=>{await _,d.issues.length!==N&&(v||(v=Ts(d,N)))});else{if(d.issues.length===N)continue;v||(v=Ts(d,N))}}return S?S.then(()=>d):d},c=(d,h,g)=>{if(Ts(d))return d.aborted=!0,d;const v=l(h,r,g);if(v instanceof Promise){if(g.async===!1)throw new Rs;return v.then(S=>e._zod.parse(S,g))}return e._zod.parse(v,g)};e._zod.run=(d,h)=>{if(h.skipChecks)return e._zod.parse(d,h);if(h.direction==="backward"){const v=e._zod.parse({value:d.value,issues:[]},{...h,skipChecks:!0});return v instanceof Promise?v.then(S=>c(S,d,h)):c(v,d,h)}const g=e._zod.parse(d,h);if(g instanceof Promise){if(h.async===!1)throw new Rs;return g.then(v=>l(v,r,h))}return l(g,r,h)}}He(e,"~standard",()=>({validate:l=>{try{const c=y_(e,l);return c.success?{value:c.data}:{issues:c.error?.issues}}catch{return b_(e,l).then(d=>d.success?{value:d.data}:{issues:d.error?.issues})}},vendor:"zod",version:1}))}),sp=Q("$ZodString",(e,n)=>{ut.init(e,n),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??K_(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}}),ct=Q("$ZodStringFormat",(e,n)=>{yc.init(e,n),sp.init(e,n)}),f2=Q("$ZodGUID",(e,n)=>{n.pattern??(n.pattern=R_),ct.init(e,n)}),p2=Q("$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=tb(r))}else n.pattern??(n.pattern=tb());ct.init(e,n)}),m2=Q("$ZodEmail",(e,n)=>{n.pattern??(n.pattern=M_),ct.init(e,n)}),h2=Q("$ZodURL",(e,n)=>{ct.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})}}}),g2=Q("$ZodEmoji",(e,n)=>{n.pattern??(n.pattern=L_()),ct.init(e,n)}),y2=Q("$ZodNanoID",(e,n)=>{n.pattern??(n.pattern=z_),ct.init(e,n)}),b2=Q("$ZodCUID",(e,n)=>{n.pattern??(n.pattern=__),ct.init(e,n)}),v2=Q("$ZodCUID2",(e,n)=>{n.pattern??(n.pattern=C_),ct.init(e,n)}),S2=Q("$ZodULID",(e,n)=>{n.pattern??(n.pattern=T_),ct.init(e,n)}),x2=Q("$ZodXID",(e,n)=>{n.pattern??(n.pattern=E_),ct.init(e,n)}),w2=Q("$ZodKSUID",(e,n)=>{n.pattern??(n.pattern=O_),ct.init(e,n)}),j2=Q("$ZodISODateTime",(e,n)=>{n.pattern??(n.pattern=Q_(n)),ct.init(e,n)}),N2=Q("$ZodISODate",(e,n)=>{n.pattern??(n.pattern=G_),ct.init(e,n)}),k2=Q("$ZodISOTime",(e,n)=>{n.pattern??(n.pattern=H_(n)),ct.init(e,n)}),A2=Q("$ZodISODuration",(e,n)=>{n.pattern??(n.pattern=D_),ct.init(e,n)}),_2=Q("$ZodIPv4",(e,n)=>{n.pattern??(n.pattern=q_),ct.init(e,n),e._zod.bag.format="ipv4"}),C2=Q("$ZodIPv6",(e,n)=>{n.pattern??(n.pattern=U_),ct.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})}}}),T2=Q("$ZodCIDRv4",(e,n)=>{n.pattern??(n.pattern=$_),ct.init(e,n)}),E2=Q("$ZodCIDRv6",(e,n)=>{n.pattern??(n.pattern=V_),ct.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 e0(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const O2=Q("$ZodBase64",(e,n)=>{n.pattern??(n.pattern=I_),ct.init(e,n),e._zod.bag.contentEncoding="base64",e._zod.check=i=>{e0(i.value)||i.issues.push({code:"invalid_format",format:"base64",input:i.value,inst:e,continue:!n.abort})}});function z2(e){if(!Kv.test(e))return!1;const n=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),i=n.padEnd(Math.ceil(n.length/4)*4,"=");return e0(i)}const D2=Q("$ZodBase64URL",(e,n)=>{n.pattern??(n.pattern=Kv),ct.init(e,n),e._zod.bag.contentEncoding="base64url",e._zod.check=i=>{z2(i.value)||i.issues.push({code:"invalid_format",format:"base64url",input:i.value,inst:e,continue:!n.abort})}}),R2=Q("$ZodE164",(e,n)=>{n.pattern??(n.pattern=P_),ct.init(e,n)});function M2(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 B2=Q("$ZodJWT",(e,n)=>{ct.init(e,n),e._zod.check=i=>{M2(i.value,n.alg)||i.issues.push({code:"invalid_format",format:"jwt",input:i.value,inst:e,continue:!n.abort})}}),t0=Q("$ZodNumber",(e,n)=>{ut.init(e,n),e._zod.pattern=e._zod.bag.pattern??Xv,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}}),L2=Q("$ZodNumberFormat",(e,n)=>{W_.init(e,n),t0.init(e,n)}),q2=Q("$ZodBoolean",(e,n)=>{ut.init(e,n),e._zod.pattern=Y_,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}}),U2=Q("$ZodUnknown",(e,n)=>{ut.init(e,n),e._zod.parse=i=>i}),$2=Q("$ZodNever",(e,n)=>{ut.init(e,n),e._zod.parse=(i,r)=>(i.issues.push({expected:"never",code:"invalid_type",input:i.value,inst:e}),i)});function nb(e,n,i){e.issues.length&&n.issues.push(...Es(i,e.issues)),n.value[i]=e.value}const V2=Q("$ZodArray",(e,n)=>{ut.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 h=l[d],g=n.element._zod.run({value:h,issues:[]},r);g instanceof Promise?c.push(g.then(v=>nb(v,i,d))):nb(g,i,d)}return c.length?Promise.all(c).then(()=>i):i}});function tc(e,n,i,r,l){if(e.issues.length){if(l&&!(i in r))return;n.issues.push(...Es(i,e.issues))}e.value===void 0?i in r&&(n.value[i]=void 0):n.value[i]=e.value}function n0(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=r_(e.shape);return{...e,keys:n,keySet:new Set(n),numKeys:n.length,optionalKeys:new Set(i)}}function a0(e,n,i,r,l,c){const d=[],h=l.keySet,g=l.catchall._zod,v=g.def.type,S=g.optout==="optional";for(const x in n){if(h.has(x))continue;if(v==="never"){d.push(x);continue}const N=g.run({value:n[x],issues:[]},r);N instanceof Promise?e.push(N.then(_=>tc(_,i,x,n,S))):tc(N,i,x,n,S)}return d.length&&i.issues.push({code:"unrecognized_keys",keys:d,input:n,inst:c}),e.length?Promise.all(e).then(()=>i):i}const I2=Q("$ZodObject",(e,n)=>{if(ut.init(e,n),!Object.getOwnPropertyDescriptor(n,"shape")?.get){const h=n.shape;Object.defineProperty(n,"shape",{get:()=>{const g={...h};return Object.defineProperty(n,"shape",{value:g}),g}})}const r=mc(()=>n0(n));He(e._zod,"propValues",()=>{const h=n.shape,g={};for(const v in h){const S=h[v]._zod;if(S.values){g[v]??(g[v]=new Set);for(const x of S.values)g[v].add(x)}}return g});const l=io,c=n.catchall;let d;e._zod.parse=(h,g)=>{d??(d=r.value);const v=h.value;if(!l(v))return h.issues.push({expected:"object",code:"invalid_type",input:v,inst:e}),h;h.value={};const S=[],x=d.shape;for(const N of d.keys){const _=x[N],T=_._zod.optout==="optional",k=_._zod.run({value:v[N],issues:[]},g);k instanceof Promise?S.push(k.then(O=>tc(O,h,N,v,T))):tc(k,h,N,v,T)}return c?a0(S,v,h,g,r.value,e):S.length?Promise.all(S).then(()=>h):h}}),P2=Q("$ZodObjectJIT",(e,n)=>{I2.init(e,n);const i=e._zod.parse,r=mc(()=>n0(n)),l=N=>{const _=new u2(["shape","payload","ctx"]),T=r.value,k=P=>{const Z=eb(P);return`shape[${Z}]._zod.run({ value: input[${Z}], issues: [] }, ctx)`};_.write("const input = payload.value;");const O=Object.create(null);let R=0;for(const P of T.keys)O[P]=`key_${R++}`;_.write("const newResult = {};");for(const P of T.keys){const Z=O[P],X=eb(P),z=N[P]?._zod?.optout==="optional";_.write(`const ${Z} = ${k(P)};`),z?_.write(`
|
|
17
17
|
if (${Z}.issues.length) {
|
|
18
18
|
if (${X} in input) {
|
|
19
19
|
payload.issues = payload.issues.concat(${Z}.issues.map(iss => ({
|
|
@@ -47,89 +47,89 @@ Error generating stack: `+o.message+`
|
|
|
47
47
|
newResult[${X}] = ${Z}.value;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
`)}_.write("payload.value = newResult;"),_.write("return payload;");const I=_.compile();return(P,Z)=>I(N,P,Z)};let c;const d=io,h=!qv.jitless,v=h&&t_.value,S=n.catchall;let x;e._zod.parse=(N,_)=>{x??(x=r.value);const T=N.value;return d(T)?h&&v&&_?.async===!1&&_.jitless!==!0?(c||(c=l(n.shape)),N=c(N,_),S?t0([],T,N,_,x,e):N):i(N,_):(N.issues.push({expected:"object",code:"invalid_type",input:T,inst:e}),N)}});function ab(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=>!Ts(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=>Fa(d,r,Ja())))}),n)}const n0=Q("$ZodUnion",(e,n)=>{ut.init(e,n),Ge(e._zod,"optin",()=>n.options.some(l=>l._zod.optin==="optional")?"optional":void 0),Ge(e._zod,"optout",()=>n.options.some(l=>l._zod.optout==="optional")?"optional":void 0),Ge(e._zod,"values",()=>{if(n.options.every(l=>l._zod.values))return new Set(n.options.flatMap(l=>Array.from(l._zod.values)))}),Ge(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=>tp(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 h=[];for(const g of n.options){const v=g._zod.run({value:l.value,issues:[]},c);if(v instanceof Promise)h.push(v),d=!0;else{if(v.issues.length===0)return v;h.push(v)}}return d?Promise.all(h).then(g=>ab(g,l,e,c)):ab(h,l,e,c)}}),V2=Q("$ZodDiscriminatedUnion",(e,n)=>{n.inclusive=!1,n0.init(e,n);const i=e._zod.parse;Ge(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[h,g]of Object.entries(d)){l[h]||(l[h]=new Set);for(const v of g)l[h].add(v)}}return l});const r=mc(()=>{const l=n.options,c=new Map;for(const d of l){const h=d._zod.propValues?.[n.discriminator];if(!h||h.size===0)throw new Error(`Invalid discriminated union option at index "${n.options.indexOf(d)}"`);for(const g of h){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(!io(d))return l.issues.push({code:"invalid_type",expected:"object",input:d,inst:e}),l;const h=r.value.get(d?.[n.discriminator]);return h?h._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)}}),I2=Q("$ZodIntersection",(e,n)=>{ut.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,v])=>ib(i,g,v)):ib(i,c,d)}});function Cf(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(qs(e)&&qs(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=Cf(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=Cf(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 ib(e,n,i){const r=new Map;let l;for(const h of n.issues)if(h.code==="unrecognized_keys"){l??(l=h);for(const g of h.keys)r.has(g)||r.set(g,{}),r.get(g).l=!0}else e.issues.push(h);for(const h of i.issues)if(h.code==="unrecognized_keys")for(const g of h.keys)r.has(g)||r.set(g,{}),r.get(g).r=!0;else e.issues.push(h);const c=[...r].filter(([,h])=>h.l&&h.r).map(([h])=>h);if(c.length&&l&&e.issues.push({...l,keys:c}),Ts(e))return e;const d=Cf(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 P2=Q("$ZodRecord",(e,n)=>{ut.init(e,n),e._zod.parse=(i,r)=>{const l=i.value;if(!qs(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 h=new Set;for(const v of d)if(typeof v=="string"||typeof v=="number"||typeof v=="symbol"){h.add(typeof v=="number"?v.toString():v);const S=n.valueType._zod.run({value:l[v],issues:[]},r);S instanceof Promise?c.push(S.then(x=>{x.issues.length&&i.issues.push(...Es(v,x.issues)),i.value[v]=x.value})):(S.issues.length&&i.issues.push(...Es(v,S.issues)),i.value[v]=S.value)}let g;for(const v in l)h.has(v)||(g=g??[],g.push(v));g&&g.length>0&&i.issues.push({code:"unrecognized_keys",input:l,inst:e,keys:g})}else{i.value={};for(const h of Reflect.ownKeys(l)){if(h==="__proto__")continue;let g=n.keyType._zod.run({value:h,issues:[]},r);if(g instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof h=="string"&&Zv.test(h)&&g.issues.length){const x=n.keyType._zod.run({value:Number(h),issues:[]},r);if(x instanceof Promise)throw new Error("Async schemas not supported in object keys currently");x.issues.length===0&&(g=x)}if(g.issues.length){n.mode==="loose"?i.value[h]=l[h]:i.issues.push({code:"invalid_key",origin:"record",issues:g.issues.map(x=>Fa(x,r,Ja())),input:h,path:[h],inst:e});continue}const S=n.valueType._zod.run({value:l[h],issues:[]},r);S instanceof Promise?c.push(S.then(x=>{x.issues.length&&i.issues.push(...Es(h,x.issues)),i.value[g.value]=x.value})):(S.issues.length&&i.issues.push(...Es(h,S.issues)),i.value[g.value]=S.value)}}return c.length?Promise.all(c).then(()=>i):i}}),G2=Q("$ZodEnum",(e,n)=>{ut.init(e,n);const i=Uv(n.entries),r=new Set(i);e._zod.values=r,e._zod.pattern=new RegExp(`^(${i.filter(l=>n_.has(typeof l)).map(l=>typeof l=="string"?Us(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}}),H2=Q("$ZodLiteral",(e,n)=>{if(ut.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"?Us(r):r?Us(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}}),Q2=Q("$ZodTransform",(e,n)=>{ut.init(e,n),e._zod.parse=(i,r)=>{if(r.direction==="backward")throw new Lv(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 Rs;return i.value=l,i}});function sb(e,n){return e.issues.length&&n===void 0?{issues:[],value:void 0}:e}const a0=Q("$ZodOptional",(e,n)=>{ut.init(e,n),e._zod.optin="optional",e._zod.optout="optional",Ge(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,void 0]):void 0),Ge(e._zod,"pattern",()=>{const i=n.innerType._zod.pattern;return i?new RegExp(`^(${tp(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=>sb(c,i.value)):sb(l,i.value)}return i.value===void 0?i:n.innerType._zod.run(i,r)}}),K2=Q("$ZodExactOptional",(e,n)=>{a0.init(e,n),Ge(e._zod,"values",()=>n.innerType._zod.values),Ge(e._zod,"pattern",()=>n.innerType._zod.pattern),e._zod.parse=(i,r)=>n.innerType._zod.run(i,r)}),Z2=Q("$ZodNullable",(e,n)=>{ut.init(e,n),Ge(e._zod,"optin",()=>n.innerType._zod.optin),Ge(e._zod,"optout",()=>n.innerType._zod.optout),Ge(e._zod,"pattern",()=>{const i=n.innerType._zod.pattern;return i?new RegExp(`^(${tp(i.source)}|null)$`):void 0}),Ge(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)}),Y2=Q("$ZodDefault",(e,n)=>{ut.init(e,n),e._zod.optin="optional",Ge(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=>rb(c,n)):rb(l,n)}});function rb(e,n){return e.value===void 0&&(e.value=n.defaultValue),e}const X2=Q("$ZodPrefault",(e,n)=>{ut.init(e,n),e._zod.optin="optional",Ge(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))}),J2=Q("$ZodNonOptional",(e,n)=>{ut.init(e,n),Ge(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=>ob(c,e)):ob(l,e)}});function ob(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 F2=Q("$ZodCatch",(e,n)=>{ut.init(e,n),Ge(e._zod,"optin",()=>n.innerType._zod.optin),Ge(e._zod,"optout",()=>n.innerType._zod.optout),Ge(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=>Fa(d,r,Ja()))},input:i.value}),i.issues=[]),i)):(i.value=l.value,l.issues.length&&(i.value=n.catchValue({...i,error:{issues:l.issues.map(c=>Fa(c,r,Ja()))},input:i.value}),i.issues=[]),i)}}),W2=Q("$ZodPipe",(e,n)=>{ut.init(e,n),Ge(e._zod,"values",()=>n.in._zod.values),Ge(e._zod,"optin",()=>n.in._zod.optin),Ge(e._zod,"optout",()=>n.out._zod.optout),Ge(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=>ql(d,n.in,r)):ql(c,n.in,r)}const l=n.in._zod.run(i,r);return l instanceof Promise?l.then(c=>ql(c,n.out,r)):ql(l,n.out,r)}});function ql(e,n,i){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:e.value,issues:e.issues},i)}const eC=Q("$ZodReadonly",(e,n)=>{ut.init(e,n),Ge(e._zod,"propValues",()=>n.innerType._zod.propValues),Ge(e._zod,"values",()=>n.innerType._zod.values),Ge(e._zod,"optin",()=>n.innerType?._zod?.optin),Ge(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(lb):lb(l)}});function lb(e){return e.value=Object.freeze(e.value),e}const tC=Q("$ZodCustom",(e,n)=>{an.init(e,n),ut.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=>cb(c,i,r,e));cb(l,i,r,e)}});function cb(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(so(l))}}var ub;class nC{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 aC(){return new nC}(ub=globalThis).__zod_globalRegistry??(ub.__zod_globalRegistry=aC());const Wr=globalThis.__zod_globalRegistry;function iC(e,n){return new e({type:"string",...be(n)})}function sC(e,n){return new e({type:"string",format:"email",check:"string_format",abort:!1,...be(n)})}function db(e,n){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...be(n)})}function rC(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...be(n)})}function oC(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...be(n)})}function lC(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...be(n)})}function cC(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...be(n)})}function uC(e,n){return new e({type:"string",format:"url",check:"string_format",abort:!1,...be(n)})}function dC(e,n){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...be(n)})}function fC(e,n){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...be(n)})}function pC(e,n){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...be(n)})}function mC(e,n){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...be(n)})}function hC(e,n){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...be(n)})}function gC(e,n){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...be(n)})}function yC(e,n){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...be(n)})}function bC(e,n){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...be(n)})}function vC(e,n){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...be(n)})}function SC(e,n){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...be(n)})}function xC(e,n){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...be(n)})}function wC(e,n){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...be(n)})}function jC(e,n){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...be(n)})}function NC(e,n){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...be(n)})}function kC(e,n){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...be(n)})}function AC(e,n){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...be(n)})}function _C(e,n){return new e({type:"string",format:"date",check:"string_format",...be(n)})}function CC(e,n){return new e({type:"string",format:"time",check:"string_format",precision:null,...be(n)})}function TC(e,n){return new e({type:"string",format:"duration",check:"string_format",...be(n)})}function EC(e,n){return new e({type:"number",checks:[],...be(n)})}function OC(e,n){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...be(n)})}function zC(e,n){return new e({type:"boolean",...be(n)})}function DC(e){return new e({type:"unknown"})}function RC(e,n){return new e({type:"never",...be(n)})}function fb(e,n){return new Xv({check:"less_than",...be(n),value:e,inclusive:!1})}function of(e,n){return new Xv({check:"less_than",...be(n),value:e,inclusive:!0})}function pb(e,n){return new Jv({check:"greater_than",...be(n),value:e,inclusive:!1})}function lf(e,n){return new Jv({check:"greater_than",...be(n),value:e,inclusive:!0})}function mb(e,n){return new Y_({check:"multiple_of",...be(n),value:e})}function i0(e,n){return new J_({check:"max_length",...be(n),maximum:e})}function nc(e,n){return new F_({check:"min_length",...be(n),minimum:e})}function s0(e,n){return new W_({check:"length_equals",...be(n),length:e})}function MC(e,n){return new e2({check:"string_format",format:"regex",...be(n),pattern:e})}function BC(e){return new t2({check:"string_format",format:"lowercase",...be(e)})}function LC(e){return new n2({check:"string_format",format:"uppercase",...be(e)})}function qC(e,n){return new a2({check:"string_format",format:"includes",...be(n),includes:e})}function UC(e,n){return new i2({check:"string_format",format:"starts_with",...be(n),prefix:e})}function $C(e,n){return new s2({check:"string_format",format:"ends_with",...be(n),suffix:e})}function Qs(e){return new r2({check:"overwrite",tx:e})}function VC(e){return Qs(n=>n.normalize(e))}function IC(){return Qs(e=>e.trim())}function PC(){return Qs(e=>e.toLowerCase())}function GC(){return Qs(e=>e.toUpperCase())}function HC(){return Qs(e=>e_(e))}function QC(e,n,i){return new e({type:"array",element:n,...be(i)})}function KC(e,n,i){return new e({type:"custom",check:"custom",fn:n,...be(i)})}function ZC(e){const n=YC(i=>(i.addIssue=r=>{if(typeof r=="string")i.issues.push(so(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(so(l))}},e(i.value,i)));return n}function YC(e,n){const i=new an({check:"custom",...be(n)});return i._zod.check=e,i}function r0(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??Wr,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 At(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 h=e._zod.toJSONSchema?.();if(h)d.schema=h;else{const S={...i,schemaPath:[...i.schemaPath,e],path:i.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(n,d.schema,S);else{const N=d.schema,_=n.processors[l.type];if(!_)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${l.type}`);_(e,n,N,S)}const x=e._zod.parent;x&&(d.ref||(d.ref=x),At(x,n,S),n.seen.get(x).isParent=!0)}const g=n.metadataRegistry.get(e);return g&&Object.assign(d.schema,g),n.io==="input"&&Gt(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 o0(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 h=e.metadataRegistry.get(d[0])?.id;if(h){const g=r.get(h);if(g&&g!==d[0])throw new Error(`Duplicate schema id "${h}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(h,d[0])}}const l=d=>{const h=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const x=e.external.registry.get(d[0])?.id,N=e.external.uri??(T=>T);if(x)return{ref:N(x)};const _=d[1].defId??d[1].schema.id??`schema${e.counter++}`;return d[1].defId=_,{defId:_,ref:`${N("__shared")}#/${h}/${_}`}}if(d[1]===i)return{ref:"#"};const v=`#/${h}/`,S=d[1].schema.id??`__schema${e.counter++}`;return{defId:S,ref:v+S}},c=d=>{if(d[1].schema.$ref)return;const h=d[1],{ref:g,defId:v}=l(d);h.def={...h.schema},v&&(h.defId=v);const S=h.schema;for(const x in S)delete S[x];S.$ref=g};if(e.cycles==="throw")for(const d of e.seen.entries()){const h=d[1];if(h.cycle)throw new Error(`Cycle detected: #/${h.cycle?.join("/")}/<root>
|
|
50
|
+
`)}_.write("payload.value = newResult;"),_.write("return payload;");const I=_.compile();return(P,Z)=>I(N,P,Z)};let c;const d=io,h=!$v.jitless,v=h&&i_.value,S=n.catchall;let x;e._zod.parse=(N,_)=>{x??(x=r.value);const T=N.value;return d(T)?h&&v&&_?.async===!1&&_.jitless!==!0?(c||(c=l(n.shape)),N=c(N,_),S?a0([],T,N,_,x,e):N):i(N,_):(N.issues.push({expected:"object",code:"invalid_type",input:T,inst:e}),N)}});function ab(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=>!Ts(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=>Ja(d,r,Fa())))}),n)}const i0=Q("$ZodUnion",(e,n)=>{ut.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=>tp(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 h=[];for(const g of n.options){const v=g._zod.run({value:l.value,issues:[]},c);if(v instanceof Promise)h.push(v),d=!0;else{if(v.issues.length===0)return v;h.push(v)}}return d?Promise.all(h).then(g=>ab(g,l,e,c)):ab(h,l,e,c)}}),G2=Q("$ZodDiscriminatedUnion",(e,n)=>{n.inclusive=!1,i0.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[h,g]of Object.entries(d)){l[h]||(l[h]=new Set);for(const v of g)l[h].add(v)}}return l});const r=mc(()=>{const l=n.options,c=new Map;for(const d of l){const h=d._zod.propValues?.[n.discriminator];if(!h||h.size===0)throw new Error(`Invalid discriminated union option at index "${n.options.indexOf(d)}"`);for(const g of h){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(!io(d))return l.issues.push({code:"invalid_type",expected:"object",input:d,inst:e}),l;const h=r.value.get(d?.[n.discriminator]);return h?h._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)}}),H2=Q("$ZodIntersection",(e,n)=>{ut.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,v])=>ib(i,g,v)):ib(i,c,d)}});function Cf(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(qs(e)&&qs(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=Cf(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=Cf(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 ib(e,n,i){const r=new Map;let l;for(const h of n.issues)if(h.code==="unrecognized_keys"){l??(l=h);for(const g of h.keys)r.has(g)||r.set(g,{}),r.get(g).l=!0}else e.issues.push(h);for(const h of i.issues)if(h.code==="unrecognized_keys")for(const g of h.keys)r.has(g)||r.set(g,{}),r.get(g).r=!0;else e.issues.push(h);const c=[...r].filter(([,h])=>h.l&&h.r).map(([h])=>h);if(c.length&&l&&e.issues.push({...l,keys:c}),Ts(e))return e;const d=Cf(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 Q2=Q("$ZodRecord",(e,n)=>{ut.init(e,n),e._zod.parse=(i,r)=>{const l=i.value;if(!qs(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 h=new Set;for(const v of d)if(typeof v=="string"||typeof v=="number"||typeof v=="symbol"){h.add(typeof v=="number"?v.toString():v);const S=n.valueType._zod.run({value:l[v],issues:[]},r);S instanceof Promise?c.push(S.then(x=>{x.issues.length&&i.issues.push(...Es(v,x.issues)),i.value[v]=x.value})):(S.issues.length&&i.issues.push(...Es(v,S.issues)),i.value[v]=S.value)}let g;for(const v in l)h.has(v)||(g=g??[],g.push(v));g&&g.length>0&&i.issues.push({code:"unrecognized_keys",input:l,inst:e,keys:g})}else{i.value={};for(const h of Reflect.ownKeys(l)){if(h==="__proto__")continue;let g=n.keyType._zod.run({value:h,issues:[]},r);if(g instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof h=="string"&&Xv.test(h)&&g.issues.length){const x=n.keyType._zod.run({value:Number(h),issues:[]},r);if(x instanceof Promise)throw new Error("Async schemas not supported in object keys currently");x.issues.length===0&&(g=x)}if(g.issues.length){n.mode==="loose"?i.value[h]=l[h]:i.issues.push({code:"invalid_key",origin:"record",issues:g.issues.map(x=>Ja(x,r,Fa())),input:h,path:[h],inst:e});continue}const S=n.valueType._zod.run({value:l[h],issues:[]},r);S instanceof Promise?c.push(S.then(x=>{x.issues.length&&i.issues.push(...Es(h,x.issues)),i.value[g.value]=x.value})):(S.issues.length&&i.issues.push(...Es(h,S.issues)),i.value[g.value]=S.value)}}return c.length?Promise.all(c).then(()=>i):i}}),K2=Q("$ZodEnum",(e,n)=>{ut.init(e,n);const i=Vv(n.entries),r=new Set(i);e._zod.values=r,e._zod.pattern=new RegExp(`^(${i.filter(l=>s_.has(typeof l)).map(l=>typeof l=="string"?Us(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}}),Z2=Q("$ZodLiteral",(e,n)=>{if(ut.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"?Us(r):r?Us(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}}),Y2=Q("$ZodTransform",(e,n)=>{ut.init(e,n),e._zod.parse=(i,r)=>{if(r.direction==="backward")throw new Uv(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 Rs;return i.value=l,i}});function sb(e,n){return e.issues.length&&n===void 0?{issues:[],value:void 0}:e}const s0=Q("$ZodOptional",(e,n)=>{ut.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(`^(${tp(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=>sb(c,i.value)):sb(l,i.value)}return i.value===void 0?i:n.innerType._zod.run(i,r)}}),X2=Q("$ZodExactOptional",(e,n)=>{s0.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)}),F2=Q("$ZodNullable",(e,n)=>{ut.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(`^(${tp(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)}),J2=Q("$ZodDefault",(e,n)=>{ut.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=>rb(c,n)):rb(l,n)}});function rb(e,n){return e.value===void 0&&(e.value=n.defaultValue),e}const W2=Q("$ZodPrefault",(e,n)=>{ut.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))}),eC=Q("$ZodNonOptional",(e,n)=>{ut.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=>ob(c,e)):ob(l,e)}});function ob(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 tC=Q("$ZodCatch",(e,n)=>{ut.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=>Ja(d,r,Fa()))},input:i.value}),i.issues=[]),i)):(i.value=l.value,l.issues.length&&(i.value=n.catchValue({...i,error:{issues:l.issues.map(c=>Ja(c,r,Fa()))},input:i.value}),i.issues=[]),i)}}),nC=Q("$ZodPipe",(e,n)=>{ut.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=>ql(d,n.in,r)):ql(c,n.in,r)}const l=n.in._zod.run(i,r);return l instanceof Promise?l.then(c=>ql(c,n.out,r)):ql(l,n.out,r)}});function ql(e,n,i){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:e.value,issues:e.issues},i)}const aC=Q("$ZodReadonly",(e,n)=>{ut.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(lb):lb(l)}});function lb(e){return e.value=Object.freeze(e.value),e}const iC=Q("$ZodCustom",(e,n)=>{an.init(e,n),ut.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=>cb(c,i,r,e));cb(l,i,r,e)}});function cb(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(so(l))}}var ub;class sC{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 rC(){return new sC}(ub=globalThis).__zod_globalRegistry??(ub.__zod_globalRegistry=rC());const Wr=globalThis.__zod_globalRegistry;function oC(e,n){return new e({type:"string",...be(n)})}function lC(e,n){return new e({type:"string",format:"email",check:"string_format",abort:!1,...be(n)})}function db(e,n){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...be(n)})}function cC(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...be(n)})}function uC(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...be(n)})}function dC(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...be(n)})}function fC(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...be(n)})}function pC(e,n){return new e({type:"string",format:"url",check:"string_format",abort:!1,...be(n)})}function mC(e,n){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...be(n)})}function hC(e,n){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...be(n)})}function gC(e,n){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...be(n)})}function yC(e,n){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...be(n)})}function bC(e,n){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...be(n)})}function vC(e,n){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...be(n)})}function SC(e,n){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...be(n)})}function xC(e,n){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...be(n)})}function wC(e,n){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...be(n)})}function jC(e,n){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...be(n)})}function NC(e,n){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...be(n)})}function kC(e,n){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...be(n)})}function AC(e,n){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...be(n)})}function _C(e,n){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...be(n)})}function CC(e,n){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...be(n)})}function TC(e,n){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...be(n)})}function EC(e,n){return new e({type:"string",format:"date",check:"string_format",...be(n)})}function OC(e,n){return new e({type:"string",format:"time",check:"string_format",precision:null,...be(n)})}function zC(e,n){return new e({type:"string",format:"duration",check:"string_format",...be(n)})}function DC(e,n){return new e({type:"number",checks:[],...be(n)})}function RC(e,n){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...be(n)})}function MC(e,n){return new e({type:"boolean",...be(n)})}function BC(e){return new e({type:"unknown"})}function LC(e,n){return new e({type:"never",...be(n)})}function fb(e,n){return new Jv({check:"less_than",...be(n),value:e,inclusive:!1})}function of(e,n){return new Jv({check:"less_than",...be(n),value:e,inclusive:!0})}function pb(e,n){return new Wv({check:"greater_than",...be(n),value:e,inclusive:!1})}function lf(e,n){return new Wv({check:"greater_than",...be(n),value:e,inclusive:!0})}function mb(e,n){return new J_({check:"multiple_of",...be(n),value:e})}function r0(e,n){return new e2({check:"max_length",...be(n),maximum:e})}function nc(e,n){return new t2({check:"min_length",...be(n),minimum:e})}function o0(e,n){return new n2({check:"length_equals",...be(n),length:e})}function qC(e,n){return new a2({check:"string_format",format:"regex",...be(n),pattern:e})}function UC(e){return new i2({check:"string_format",format:"lowercase",...be(e)})}function $C(e){return new s2({check:"string_format",format:"uppercase",...be(e)})}function VC(e,n){return new r2({check:"string_format",format:"includes",...be(n),includes:e})}function IC(e,n){return new o2({check:"string_format",format:"starts_with",...be(n),prefix:e})}function PC(e,n){return new l2({check:"string_format",format:"ends_with",...be(n),suffix:e})}function Qs(e){return new c2({check:"overwrite",tx:e})}function GC(e){return Qs(n=>n.normalize(e))}function HC(){return Qs(e=>e.trim())}function QC(){return Qs(e=>e.toLowerCase())}function KC(){return Qs(e=>e.toUpperCase())}function ZC(){return Qs(e=>a_(e))}function YC(e,n,i){return new e({type:"array",element:n,...be(i)})}function XC(e,n,i){return new e({type:"custom",check:"custom",fn:n,...be(i)})}function FC(e){const n=JC(i=>(i.addIssue=r=>{if(typeof r=="string")i.issues.push(so(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(so(l))}},e(i.value,i)));return n}function JC(e,n){const i=new an({check:"custom",...be(n)});return i._zod.check=e,i}function l0(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??Wr,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 At(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 h=e._zod.toJSONSchema?.();if(h)d.schema=h;else{const S={...i,schemaPath:[...i.schemaPath,e],path:i.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(n,d.schema,S);else{const N=d.schema,_=n.processors[l.type];if(!_)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${l.type}`);_(e,n,N,S)}const x=e._zod.parent;x&&(d.ref||(d.ref=x),At(x,n,S),n.seen.get(x).isParent=!0)}const g=n.metadataRegistry.get(e);return g&&Object.assign(d.schema,g),n.io==="input"&&Gt(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 c0(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 h=e.metadataRegistry.get(d[0])?.id;if(h){const g=r.get(h);if(g&&g!==d[0])throw new Error(`Duplicate schema id "${h}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(h,d[0])}}const l=d=>{const h=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const x=e.external.registry.get(d[0])?.id,N=e.external.uri??(T=>T);if(x)return{ref:N(x)};const _=d[1].defId??d[1].schema.id??`schema${e.counter++}`;return d[1].defId=_,{defId:_,ref:`${N("__shared")}#/${h}/${_}`}}if(d[1]===i)return{ref:"#"};const v=`#/${h}/`,S=d[1].schema.id??`__schema${e.counter++}`;return{defId:S,ref:v+S}},c=d=>{if(d[1].schema.$ref)return;const h=d[1],{ref:g,defId:v}=l(d);h.def={...h.schema},v&&(h.defId=v);const S=h.schema;for(const x in S)delete S[x];S.$ref=g};if(e.cycles==="throw")for(const d of e.seen.entries()){const h=d[1];if(h.cycle)throw new Error(`Cycle detected: #/${h.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 h=d[1];if(n===d[0]){c(d);continue}if(e.external){const v=e.external.registry.get(d[0])?.id;if(n!==d[0]&&v){c(d);continue}}if(e.metadataRegistry.get(d[0])?.id){c(d);continue}if(h.cycle){c(d);continue}if(h.count>1&&e.reused==="ref"){c(d);continue}}}function l0(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 h=e.seen.get(d);if(h.ref===null)return;const g=h.def??h.schema,v={...g},S=h.ref;if(h.ref=null,S){r(S);const N=e.seen.get(S),_=N.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,v),d._zod.parent===S)for(const k in g)k==="$ref"||k==="allOf"||k in v||delete g[k];if(_.$ref&&N.def)for(const k in g)k==="$ref"||k==="allOf"||k in N.def&&JSON.stringify(g[k])===JSON.stringify(N.def[k])&&delete g[k]}const x=d._zod.parent;if(x&&x!==S){r(x);const N=e.seen.get(x);if(N?.schema.$ref&&(g.$ref=N.schema.$ref,N.def))for(const _ in g)_==="$ref"||_==="allOf"||_ in N.def&&JSON.stringify(g[_])===JSON.stringify(N.def[_])&&delete g[_]}e.override({zodSchema:d,jsonSchema:g,path:h.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 h=d[1];h.def&&h.defId&&(c[h.defId]=h.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:ac(n,"input",e.processors),output:ac(n,"output",e.processors)}},enumerable:!1,writable:!1}),d}catch{throw new Error("Error converting schema to JSON.")}}function Gt(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 Gt(r.element,i);if(r.type==="set")return Gt(r.valueType,i);if(r.type==="lazy")return Gt(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 Gt(r.innerType,i);if(r.type==="intersection")return Gt(r.left,i)||Gt(r.right,i);if(r.type==="record"||r.type==="map")return Gt(r.keyType,i)||Gt(r.valueType,i);if(r.type==="pipe")return Gt(r.in,i)||Gt(r.out,i);if(r.type==="object"){for(const l in r.shape)if(Gt(r.shape[l],i))return!0;return!1}if(r.type==="union"){for(const l of r.options)if(Gt(l,i))return!0;return!1}if(r.type==="tuple"){for(const l of r.items)if(Gt(l,i))return!0;return!!(r.rest&&Gt(r.rest,i))}return!1}const XC=(e,n={})=>i=>{const r=r0({...i,processors:n});return At(e,r),o0(r,e),l0(r,e)},ac=(e,n,i={})=>r=>{const{libraryOptions:l,target:c}=r??{},d=r0({...l??{},target:c,io:n,processors:i});return At(e,d),o0(d,e),l0(d,e)},JC={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},FC=(e,n,i,r)=>{const l=i;l.type="string";const{minimum:c,maximum:d,format:h,patterns:g,contentEncoding:v}=e._zod.bag;if(typeof c=="number"&&(l.minLength=c),typeof d=="number"&&(l.maxLength=d),h&&(l.format=JC[h]??h,l.format===""&&delete l.format,h==="time"&&delete l.format),v&&(l.contentEncoding=v),g&&g.size>0){const S=[...g];S.length===1?l.pattern=S[0].source:S.length>1&&(l.allOf=[...S.map(x=>({...n.target==="draft-07"||n.target==="draft-04"||n.target==="openapi-3.0"?{type:"string"}:{},pattern:x.source}))])}},WC=(e,n,i,r)=>{const l=i,{minimum:c,maximum:d,format:h,multipleOf:g,exclusiveMaximum:v,exclusiveMinimum:S}=e._zod.bag;typeof h=="string"&&h.includes("int")?l.type="integer":l.type="number",typeof S=="number"&&(n.target==="draft-04"||n.target==="openapi-3.0"?(l.minimum=S,l.exclusiveMinimum=!0):l.exclusiveMinimum=S),typeof c=="number"&&(l.minimum=c,typeof S=="number"&&n.target!=="draft-04"&&(S>=c?delete l.minimum:delete l.exclusiveMinimum)),typeof v=="number"&&(n.target==="draft-04"||n.target==="openapi-3.0"?(l.maximum=v,l.exclusiveMaximum=!0):l.exclusiveMaximum=v),typeof d=="number"&&(l.maximum=d,typeof v=="number"&&n.target!=="draft-04"&&(v<=d?delete l.maximum:delete l.exclusiveMaximum)),typeof g=="number"&&(l.multipleOf=g)},eT=(e,n,i,r)=>{i.type="boolean"},tT=(e,n,i,r)=>{i.not={}},nT=(e,n,i,r)=>{},aT=(e,n,i,r)=>{const l=e._zod.def,c=Uv(l.entries);c.every(d=>typeof d=="number")&&(i.type="number"),c.every(d=>typeof d=="string")&&(i.type="string"),i.enum=c},iT=(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},sT=(e,n,i,r)=>{if(n.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},rT=(e,n,i,r)=>{if(n.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},oT=(e,n,i,r)=>{const l=i,c=e._zod.def,{minimum:d,maximum:h}=e._zod.bag;typeof d=="number"&&(l.minItems=d),typeof h=="number"&&(l.maxItems=h),l.type="array",l.items=At(c.element,n,{...r,path:[...r.path,"items"]})},lT=(e,n,i,r)=>{const l=i,c=e._zod.def;l.type="object",l.properties={};const d=c.shape;for(const v in d)l.properties[v]=At(d[v],n,{...r,path:[...r.path,"properties",v]});const h=new Set(Object.keys(d)),g=new Set([...h].filter(v=>{const S=c.shape[v]._zod;return n.io==="input"?S.optin===void 0:S.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=At(c.catchall,n,{...r,path:[...r.path,"additionalProperties"]})):n.io==="output"&&(l.additionalProperties=!1)},cT=(e,n,i,r)=>{const l=e._zod.def,c=l.inclusive===!1,d=l.options.map((h,g)=>At(h,n,{...r,path:[...r.path,c?"oneOf":"anyOf",g]}));c?i.oneOf=d:i.anyOf=d},uT=(e,n,i,r)=>{const l=e._zod.def,c=At(l.left,n,{...r,path:[...r.path,"allOf",0]}),d=At(l.right,n,{...r,path:[...r.path,"allOf",1]}),h=v=>"allOf"in v&&Object.keys(v).length===1,g=[...h(c)?c.allOf:[c],...h(d)?d.allOf:[d]];i.allOf=g},dT=(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 S=At(c.valueType,n,{...r,path:[...r.path,"patternProperties","*"]});l.patternProperties={};for(const x of g)l.patternProperties[x.source]=S}else(n.target==="draft-07"||n.target==="draft-2020-12")&&(l.propertyNames=At(c.keyType,n,{...r,path:[...r.path,"propertyNames"]})),l.additionalProperties=At(c.valueType,n,{...r,path:[...r.path,"additionalProperties"]});const v=d._zod.values;if(v){const S=[...v].filter(x=>typeof x=="string"||typeof x=="number");S.length>0&&(l.required=S)}},fT=(e,n,i,r)=>{const l=e._zod.def,c=At(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"}]},pT=(e,n,i,r)=>{const l=e._zod.def;At(l.innerType,n,r);const c=n.seen.get(e);c.ref=l.innerType},mT=(e,n,i,r)=>{const l=e._zod.def;At(l.innerType,n,r);const c=n.seen.get(e);c.ref=l.innerType,i.default=JSON.parse(JSON.stringify(l.defaultValue))},hT=(e,n,i,r)=>{const l=e._zod.def;At(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)))},gT=(e,n,i,r)=>{const l=e._zod.def;At(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},yT=(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;At(c,n,r);const d=n.seen.get(e);d.ref=c},bT=(e,n,i,r)=>{const l=e._zod.def;At(l.innerType,n,r);const c=n.seen.get(e);c.ref=l.innerType,i.readOnly=!0},c0=(e,n,i,r)=>{const l=e._zod.def;At(l.innerType,n,r);const c=n.seen.get(e);c.ref=l.innerType},vT=Q("ZodISODateTime",(e,n)=>{S2.init(e,n),ft.init(e,n)});function ST(e){return AC(vT,e)}const xT=Q("ZodISODate",(e,n)=>{x2.init(e,n),ft.init(e,n)});function wT(e){return _C(xT,e)}const jT=Q("ZodISOTime",(e,n)=>{w2.init(e,n),ft.init(e,n)});function NT(e){return CC(jT,e)}const kT=Q("ZodISODuration",(e,n)=>{j2.init(e,n),ft.init(e,n)});function AT(e){return TC(kT,e)}const _T=(e,n)=>{Pv.init(e,n),e.name="ZodError",Object.defineProperties(e,{format:{value:i=>p_(e,i)},flatten:{value:i=>f_(e,i)},addIssue:{value:i=>{e.issues.push(i),e.message=JSON.stringify(e.issues,_f,2)}},addIssues:{value:i=>{e.issues.push(...i),e.message=JSON.stringify(e.issues,_f,2)}},isEmpty:{get(){return e.issues.length===0}}})},Tn=Q("ZodError",_T,{Parent:Error}),CT=ap(Tn),TT=ip(Tn),ET=hc(Tn),OT=gc(Tn),zT=g_(Tn),DT=y_(Tn),RT=b_(Tn),MT=v_(Tn),BT=S_(Tn),LT=x_(Tn),qT=w_(Tn),UT=j_(Tn),dt=Q("ZodType",(e,n)=>(ut.init(e,n),Object.assign(e["~standard"],{jsonSchema:{input:ac(e,"input"),output:ac(e,"output")}}),e.toJSONSchema=XC(e,{}),e.def=n,e.type=n.type,Object.defineProperty(e,"_def",{value:n}),e.check=(...i)=>e.clone(ei(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)=>ti(e,i,r),e.brand=()=>e,e.register=((i,r)=>(i.add(e,r),e)),e.parse=(i,r)=>CT(e,i,r,{callee:e.parse}),e.safeParse=(i,r)=>ET(e,i,r),e.parseAsync=async(i,r)=>TT(e,i,r,{callee:e.parseAsync}),e.safeParseAsync=async(i,r)=>OT(e,i,r),e.spa=e.safeParseAsync,e.encode=(i,r)=>zT(e,i,r),e.decode=(i,r)=>DT(e,i,r),e.encodeAsync=async(i,r)=>RT(e,i,r),e.decodeAsync=async(i,r)=>MT(e,i,r),e.safeEncode=(i,r)=>BT(e,i,r),e.safeDecode=(i,r)=>LT(e,i,r),e.safeEncodeAsync=async(i,r)=>qT(e,i,r),e.safeDecodeAsync=async(i,r)=>UT(e,i,r),e.refine=(i,r)=>e.check(zE(i,r)),e.superRefine=i=>e.check(DE(i)),e.overwrite=i=>e.check(Qs(i)),e.optional=()=>yb(e),e.exactOptional=()=>vE(e),e.nullable=()=>bb(e),e.nullish=()=>yb(bb(e)),e.nonoptional=i=>kE(e,i),e.array=()=>A(e),e.or=i=>bc([e,i]),e.and=i=>pE(e,i),e.transform=i=>vb(e,yE(i)),e.default=i=>wE(e,i),e.prefault=i=>NE(e,i),e.catch=i=>_E(e,i),e.pipe=i=>vb(e,i),e.readonly=()=>EE(e),e.describe=i=>{const r=e.clone();return Wr.add(r,{description:i}),r},Object.defineProperty(e,"description",{get(){return Wr.get(e)?.description},configurable:!0}),e.meta=(...i)=>{if(i.length===0)return Wr.get(e);const r=e.clone();return Wr.add(r,i[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=i=>i(e),e)),u0=Q("_ZodString",(e,n)=>{sp.init(e,n),dt.init(e,n),e._zod.processJSONSchema=(r,l,c)=>FC(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(MC(...r)),e.includes=(...r)=>e.check(qC(...r)),e.startsWith=(...r)=>e.check(UC(...r)),e.endsWith=(...r)=>e.check($C(...r)),e.min=(...r)=>e.check(nc(...r)),e.max=(...r)=>e.check(i0(...r)),e.length=(...r)=>e.check(s0(...r)),e.nonempty=(...r)=>e.check(nc(1,...r)),e.lowercase=r=>e.check(BC(r)),e.uppercase=r=>e.check(LC(r)),e.trim=()=>e.check(IC()),e.normalize=(...r)=>e.check(VC(...r)),e.toLowerCase=()=>e.check(PC()),e.toUpperCase=()=>e.check(GC()),e.slugify=()=>e.check(HC())}),$T=Q("ZodString",(e,n)=>{sp.init(e,n),u0.init(e,n),e.email=i=>e.check(sC(VT,i)),e.url=i=>e.check(uC(IT,i)),e.jwt=i=>e.check(kC(aE,i)),e.emoji=i=>e.check(dC(PT,i)),e.guid=i=>e.check(db(hb,i)),e.uuid=i=>e.check(rC(Ul,i)),e.uuidv4=i=>e.check(oC(Ul,i)),e.uuidv6=i=>e.check(lC(Ul,i)),e.uuidv7=i=>e.check(cC(Ul,i)),e.nanoid=i=>e.check(fC(GT,i)),e.guid=i=>e.check(db(hb,i)),e.cuid=i=>e.check(pC(HT,i)),e.cuid2=i=>e.check(mC(QT,i)),e.ulid=i=>e.check(hC(KT,i)),e.base64=i=>e.check(wC(eE,i)),e.base64url=i=>e.check(jC(tE,i)),e.xid=i=>e.check(gC(ZT,i)),e.ksuid=i=>e.check(yC(YT,i)),e.ipv4=i=>e.check(bC(XT,i)),e.ipv6=i=>e.check(vC(JT,i)),e.cidrv4=i=>e.check(SC(FT,i)),e.cidrv6=i=>e.check(xC(WT,i)),e.e164=i=>e.check(NC(nE,i)),e.datetime=i=>e.check(ST(i)),e.date=i=>e.check(wT(i)),e.time=i=>e.check(NT(i)),e.duration=i=>e.check(AT(i))});function p(e){return iC($T,e)}const ft=Q("ZodStringFormat",(e,n)=>{ct.init(e,n),u0.init(e,n)}),VT=Q("ZodEmail",(e,n)=>{d2.init(e,n),ft.init(e,n)}),hb=Q("ZodGUID",(e,n)=>{c2.init(e,n),ft.init(e,n)}),Ul=Q("ZodUUID",(e,n)=>{u2.init(e,n),ft.init(e,n)}),IT=Q("ZodURL",(e,n)=>{f2.init(e,n),ft.init(e,n)}),PT=Q("ZodEmoji",(e,n)=>{p2.init(e,n),ft.init(e,n)}),GT=Q("ZodNanoID",(e,n)=>{m2.init(e,n),ft.init(e,n)}),HT=Q("ZodCUID",(e,n)=>{h2.init(e,n),ft.init(e,n)}),QT=Q("ZodCUID2",(e,n)=>{g2.init(e,n),ft.init(e,n)}),KT=Q("ZodULID",(e,n)=>{y2.init(e,n),ft.init(e,n)}),ZT=Q("ZodXID",(e,n)=>{b2.init(e,n),ft.init(e,n)}),YT=Q("ZodKSUID",(e,n)=>{v2.init(e,n),ft.init(e,n)}),XT=Q("ZodIPv4",(e,n)=>{N2.init(e,n),ft.init(e,n)}),JT=Q("ZodIPv6",(e,n)=>{k2.init(e,n),ft.init(e,n)}),FT=Q("ZodCIDRv4",(e,n)=>{A2.init(e,n),ft.init(e,n)}),WT=Q("ZodCIDRv6",(e,n)=>{_2.init(e,n),ft.init(e,n)}),eE=Q("ZodBase64",(e,n)=>{C2.init(e,n),ft.init(e,n)}),tE=Q("ZodBase64URL",(e,n)=>{E2.init(e,n),ft.init(e,n)}),nE=Q("ZodE164",(e,n)=>{O2.init(e,n),ft.init(e,n)}),aE=Q("ZodJWT",(e,n)=>{D2.init(e,n),ft.init(e,n)}),d0=Q("ZodNumber",(e,n)=>{Wv.init(e,n),dt.init(e,n),e._zod.processJSONSchema=(r,l,c)=>WC(e,r,l),e.gt=(r,l)=>e.check(pb(r,l)),e.gte=(r,l)=>e.check(lf(r,l)),e.min=(r,l)=>e.check(lf(r,l)),e.lt=(r,l)=>e.check(fb(r,l)),e.lte=(r,l)=>e.check(of(r,l)),e.max=(r,l)=>e.check(of(r,l)),e.int=r=>e.check(gb(r)),e.safe=r=>e.check(gb(r)),e.positive=r=>e.check(pb(0,r)),e.nonnegative=r=>e.check(lf(0,r)),e.negative=r=>e.check(fb(0,r)),e.nonpositive=r=>e.check(of(0,r)),e.multipleOf=(r,l)=>e.check(mb(r,l)),e.step=(r,l)=>e.check(mb(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 y(e){return EC(d0,e)}const iE=Q("ZodNumberFormat",(e,n)=>{R2.init(e,n),d0.init(e,n)});function gb(e){return OC(iE,e)}const sE=Q("ZodBoolean",(e,n)=>{M2.init(e,n),dt.init(e,n),e._zod.processJSONSchema=(i,r,l)=>eT(e,i,r)});function re(e){return zC(sE,e)}const rE=Q("ZodUnknown",(e,n)=>{B2.init(e,n),dt.init(e,n),e._zod.processJSONSchema=(i,r,l)=>nT()});function Ln(){return DC(rE)}const oE=Q("ZodNever",(e,n)=>{L2.init(e,n),dt.init(e,n),e._zod.processJSONSchema=(i,r,l)=>tT(e,i,r)});function lE(e){return RC(oE,e)}const cE=Q("ZodArray",(e,n)=>{q2.init(e,n),dt.init(e,n),e._zod.processJSONSchema=(i,r,l)=>oT(e,i,r,l),e.element=n.element,e.min=(i,r)=>e.check(nc(i,r)),e.nonempty=i=>e.check(nc(1,i)),e.max=(i,r)=>e.check(i0(i,r)),e.length=(i,r)=>e.check(s0(i,r)),e.unwrap=()=>e.element});function A(e,n){return QC(cE,e,n)}const uE=Q("ZodObject",(e,n)=>{$2.init(e,n),dt.init(e,n),e._zod.processJSONSchema=(i,r,l)=>lT(e,i,r,l),Ge(e,"shape",()=>n.shape),e.keyof=()=>ne(Object.keys(e._zod.def.shape)),e.catchall=i=>e.clone({...e._zod.def,catchall:i}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Ln()}),e.loose=()=>e.clone({...e._zod.def,catchall:Ln()}),e.strict=()=>e.clone({...e._zod.def,catchall:lE()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=i=>o_(e,i),e.safeExtend=i=>l_(e,i),e.merge=i=>c_(e,i),e.pick=i=>s_(e,i),e.omit=i=>r_(e,i),e.partial=(...i)=>u_(m0,e,i[0]),e.required=(...i)=>d_(h0,e,i[0])});function w(e,n){const i={type:"object",shape:e??{},...be(n)};return new uE(i)}const f0=Q("ZodUnion",(e,n)=>{n0.init(e,n),dt.init(e,n),e._zod.processJSONSchema=(i,r,l)=>cT(e,i,r,l),e.options=n.options});function bc(e,n){return new f0({type:"union",options:e,...be(n)})}const dE=Q("ZodDiscriminatedUnion",(e,n)=>{f0.init(e,n),V2.init(e,n)});function p0(e,n,i){return new dE({type:"union",options:n,discriminator:e,...be(i)})}const fE=Q("ZodIntersection",(e,n)=>{I2.init(e,n),dt.init(e,n),e._zod.processJSONSchema=(i,r,l)=>uT(e,i,r,l)});function pE(e,n){return new fE({type:"intersection",left:e,right:n})}const mE=Q("ZodRecord",(e,n)=>{P2.init(e,n),dt.init(e,n),e._zod.processJSONSchema=(i,r,l)=>dT(e,i,r,l),e.keyType=n.keyType,e.valueType=n.valueType});function rt(e,n,i){return new mE({type:"record",keyType:e,valueType:n,...be(i)})}const Tf=Q("ZodEnum",(e,n)=>{G2.init(e,n),dt.init(e,n),e._zod.processJSONSchema=(r,l,c)=>aT(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 Tf({...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 Tf({...n,checks:[],...be(l),entries:c})}});function ne(e,n){const i=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Tf({type:"enum",entries:i,...be(n)})}const hE=Q("ZodLiteral",(e,n)=>{H2.init(e,n),dt.init(e,n),e._zod.processJSONSchema=(i,r,l)=>iT(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 vt(e,n){return new hE({type:"literal",values:Array.isArray(e)?e:[e],...be(n)})}const gE=Q("ZodTransform",(e,n)=>{Q2.init(e,n),dt.init(e,n),e._zod.processJSONSchema=(i,r,l)=>rT(e,i),e._zod.parse=(i,r)=>{if(r.direction==="backward")throw new Lv(e.constructor.name);i.addIssue=c=>{if(typeof c=="string")i.issues.push(so(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(so(d))}};const l=n.transform(i.value,i);return l instanceof Promise?l.then(c=>(i.value=c,i)):(i.value=l,i)}});function yE(e){return new gE({type:"transform",transform:e})}const m0=Q("ZodOptional",(e,n)=>{a0.init(e,n),dt.init(e,n),e._zod.processJSONSchema=(i,r,l)=>c0(e,i,r,l),e.unwrap=()=>e._zod.def.innerType});function yb(e){return new m0({type:"optional",innerType:e})}const bE=Q("ZodExactOptional",(e,n)=>{K2.init(e,n),dt.init(e,n),e._zod.processJSONSchema=(i,r,l)=>c0(e,i,r,l),e.unwrap=()=>e._zod.def.innerType});function vE(e){return new bE({type:"optional",innerType:e})}const SE=Q("ZodNullable",(e,n)=>{Z2.init(e,n),dt.init(e,n),e._zod.processJSONSchema=(i,r,l)=>fT(e,i,r,l),e.unwrap=()=>e._zod.def.innerType});function bb(e){return new SE({type:"nullable",innerType:e})}const xE=Q("ZodDefault",(e,n)=>{Y2.init(e,n),dt.init(e,n),e._zod.processJSONSchema=(i,r,l)=>mT(e,i,r,l),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function wE(e,n){return new xE({type:"default",innerType:e,get defaultValue(){return typeof n=="function"?n():Vv(n)}})}const jE=Q("ZodPrefault",(e,n)=>{X2.init(e,n),dt.init(e,n),e._zod.processJSONSchema=(i,r,l)=>hT(e,i,r,l),e.unwrap=()=>e._zod.def.innerType});function NE(e,n){return new jE({type:"prefault",innerType:e,get defaultValue(){return typeof n=="function"?n():Vv(n)}})}const h0=Q("ZodNonOptional",(e,n)=>{J2.init(e,n),dt.init(e,n),e._zod.processJSONSchema=(i,r,l)=>pT(e,i,r,l),e.unwrap=()=>e._zod.def.innerType});function kE(e,n){return new h0({type:"nonoptional",innerType:e,...be(n)})}const AE=Q("ZodCatch",(e,n)=>{F2.init(e,n),dt.init(e,n),e._zod.processJSONSchema=(i,r,l)=>gT(e,i,r,l),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function _E(e,n){return new AE({type:"catch",innerType:e,catchValue:typeof n=="function"?n:()=>n})}const CE=Q("ZodPipe",(e,n)=>{W2.init(e,n),dt.init(e,n),e._zod.processJSONSchema=(i,r,l)=>yT(e,i,r,l),e.in=n.in,e.out=n.out});function vb(e,n){return new CE({type:"pipe",in:e,out:n})}const TE=Q("ZodReadonly",(e,n)=>{eC.init(e,n),dt.init(e,n),e._zod.processJSONSchema=(i,r,l)=>bT(e,i,r,l),e.unwrap=()=>e._zod.def.innerType});function EE(e){return new TE({type:"readonly",innerType:e})}const OE=Q("ZodCustom",(e,n)=>{tC.init(e,n),dt.init(e,n),e._zod.processJSONSchema=(i,r,l)=>sT(e,i)});function zE(e,n={}){return KC(OE,e,n)}function DE(e){return ZC(e)}const g0=w({id:p(),name:p(),keyPrefix:p(),scopes:A(p()),projectId:p().nullable(),readOnly:re(),createdAt:p(),lastUsedAt:p().nullable(),revokedAt:p().nullable()});w({keys:A(g0)});w({name:p().min(1).max(100),scopes:A(p()).min(1).optional(),projectId:p().optional()});g0.extend({key:p()});const RE=w({maxConcurrency:y().int().positive(),maxRequestsPerMinute:y().int().positive(),maxRequestsPerDay:y().int().positive()}),ya=p().min(1);p().min(1);const vc=w({label:p().min(1),city:p().min(1),region:p().min(1),country:p().length(2),timezone:p().optional()}),rp=ne(["citation.lost","citation.gained","run.completed","run.failed","insight.critical","insight.high"]);w({id:p(),projectId:p(),channel:vt("webhook"),url:p().url(),urlDisplay:p(),urlHost:p(),events:A(rp),enabled:re().default(!0),source:p().optional(),webhookSecret:p().optional(),createdAt:p(),updatedAt:p()});w({channel:vt("webhook"),url:p().url(),events:A(rp).min(1),source:p().optional()});const y0=ne(["cli","api","config-file"]);function ME(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 BE(e,n){return n?e.some(i=>i.label===n):!0}w({displayName:p().min(1),canonicalDomain:p().min(1),ownedDomains:A(p().min(1)).optional(),aliases:A(p()).optional(),country:p().length(2),language:p().min(2),tags:A(p()).optional(),labels:rt(p(),p()).optional(),providers:A(ya).optional(),locations:A(vc).optional(),defaultLocation:p().nullable().optional(),autoExtractBacklinks:re().optional(),configSource:y0.optional()});const LE=w({id:p(),name:p(),displayName:p().optional(),canonicalDomain:p(),ownedDomains:A(p()).default([]),aliases:A(p()).default([]),country:p().length(2),language:p().min(2),tags:A(p()).default([]),labels:rt(p(),p()).default({}),providers:A(p()).default([]),locations:A(vc).default([]),defaultLocation:p().nullable().optional(),autoExtractBacklinks:re().default(!1),configSource:y0.default("cli"),configRevision:y().int().positive().default(1),createdAt:p().optional(),updatedAt:p().optional()});w({id:p(),query:p(),createdAt:p()});w({id:p(),keyword:p(),createdAt:p()});w({queries:A(p().trim().min(1)).min(1)});w({keywords:A(p().trim().min(1)).min(1)});w({provider:ya,count:y().int().min(1).max(20).optional()});w({id:p(),domain:p(),createdAt:p()});w({competitors:A(p().trim().min(1)).min(1)});function ic(e){let n=e.trim().toLowerCase();try{n.includes("://")&&(n=new URL(n).hostname.toLowerCase())}catch{}return n.replace(/^www\./,"")}const qE=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 UE(e){const n=ic(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 qE.has(l)?r.length>=3?r.slice(-3).join("."):"":r.slice(-2).join(".")}function $E(e){const n=UE(e);return n?n.split(".")[0]??"":""}function VE(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=ic(c);i.has(d)||(i.add(d),r.push(c))}return r}const IE=w({name:p().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:rt(p(),p()).optional().default({})}),PE=w({preset:p().optional(),cron:p().optional(),timezone:p().optional().default("UTC"),providers:A(ya).optional().default([])}).refine(e=>e.preset&&!e.cron||!e.preset&&e.cron,{message:'Exactly one of "preset" or "cron" must be provided'}).optional(),GE=w({channel:vt("webhook"),url:p().url(),events:A(rp).min(1)}),HE=w({gsc:w({propertyUrl:p()}).optional(),syncSchedule:w({preset:p().optional(),cron:p().optional()}).optional()}).optional(),Sb=A(p().min(1)),QE=w({displayName:p().min(1),canonicalDomain:p().min(1),ownedDomains:A(p().min(1)).optional().default([]),aliases:A(p().min(1)).optional().default([]),country:p().length(2),language:p().min(2),queries:Sb.optional(),keywords:Sb.optional(),competitors:A(p().min(1)).optional().default([]),providers:A(ya).optional().default([]),locations:A(vc).optional().default([]),defaultLocation:p().optional(),schedule:PE,notifications:A(GE).optional().default([]),google:HE,autoExtractBacklinks:re().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=ME(e.locations);i.length>0&&n.addIssue({code:"custom",message:`Duplicate location labels are not allowed: ${i.join(", ")}`,path:["locations"]}),BE(e.locations,e.defaultLocation)||n.addIssue({code:"custom",message:`defaultLocation "${e.defaultLocation}" must match a configured location label`,path:["defaultLocation"]})});w({apiVersion:vt("canonry/v1"),kind:vt("Project"),metadata:IE,spec:QE});const KE=ne(["gsc","ga4","gbp"]);w({id:p(),domain:p(),connectionType:KE,propertyId:p().nullable().optional(),sitemapUrl:p().nullable().optional(),scopes:A(p()).default([]),createdAt:p(),updatedAt:p()});w({date:p(),query:p(),page:p(),country:p().nullable().optional(),device:p().nullable().optional(),clicks:y(),impressions:y(),ctr:y(),position:y()});const ZE=w({date:p(),clicks:y(),impressions:y(),ctr:y()});w({totals:w({clicks:y(),impressions:y(),ctr:y(),days:y()}),daily:A(ZE)});const Ef=w({id:p(),url:p(),indexingState:p().nullable().optional(),verdict:p().nullable().optional(),coverageState:p().nullable().optional(),pageFetchState:p().nullable().optional(),robotsTxtState:p().nullable().optional(),crawlTime:p().nullable().optional(),lastCrawlResult:p().nullable().optional(),isMobileFriendly:re().nullable().optional(),richResults:A(p()).default([]),referringUrls:A(p()).default([]),inspectedAt:p()});ne(["stable","reindexed","deindexed","still-missing","new"]);const YE=w({url:p(),previousState:p().nullable(),currentState:p().nullable(),transitionDate:p()}),XE=w({reason:p(),count:y(),urls:A(Ef).default([])});w({summary:w({total:y(),indexed:y(),notIndexed:y(),deindexed:y(),percentage:y()}),lastInspectedAt:p().nullable(),lastSyncedAt:p().nullable(),indexed:A(Ef).default([]),notIndexed:A(Ef).default([]),deindexed:A(YE).default([]),reasonGroups:A(XE).default([])});w({url:p(),type:ne(["URL_UPDATED","URL_DELETED"]),notifiedAt:p()});const JE=w({url:p(),type:ne(["URL_UPDATED","URL_DELETED"]),notifiedAt:p(),status:ne(["success","error"]),error:p().optional()});w({summary:w({total:y().int().nonnegative(),succeeded:y().int().nonnegative(),failed:y().int().nonnegative()}),results:A(JE).default([])});w({date:p(),indexed:y(),notIndexed:y(),reasonBreakdown:rt(p(),y()).default({})});const FE=w({siteUrl:p(),permissionLevel:p()});w({sites:A(FE).default([])});const WE=w({type:p(),submitted:p(),indexed:p()}),eO=w({path:p(),lastSubmitted:p().optional(),isPending:re().optional(),isSitemapsIndex:re().optional(),type:p().optional(),lastDownloaded:p().optional(),warnings:p().optional(),errors:p().optional(),contents:A(WE).optional()});w({sitemaps:A(eO).default([])});const tO=w({name:p(),accountName:p().nullable(),type:p().nullable(),role:p().nullable()});w({accounts:A(tO),total:y().int().nonnegative()});const nO=w({id:p(),projectId:p(),accountName:p(),locationName:p(),displayName:p(),primaryCategoryDisplayName:p().nullable(),storefrontAddress:p().nullable(),websiteUri:p().nullable(),placeId:p().nullable(),mapsUri:p().nullable(),additionalCategories:A(p()),description:p().nullable(),serviceArea:rt(p(),Ln()).nullable(),regularHours:rt(p(),Ln()).nullable(),primaryPhone:p().nullable(),openStatus:p().nullable(),openingDate:p().nullable(),selected:re(),syncedAt:p().nullable(),createdAt:p(),updatedAt:p()});w({locations:A(nO),totalDiscovered:y().int().nonnegative(),totalSelected:y().int().nonnegative()});w({selectAllNew:re().default(!0),accountName:p().optional(),switchAccount:re().default(!1)});w({selected:re()});w({locationNames:A(p()).optional(),daysOfMetrics:y().int().positive().max(540).optional(),monthsOfKeywords:y().int().positive().max(18).optional()});w({runId:p(),status:p()});const aO=w({locationName:p(),date:p(),metric:p(),value:y().int()});w({metrics:A(aO),total:y().int().nonnegative()});const iO=w({locationName:p(),periodStart:p(),periodEnd:p(),keyword:p(),valueCount:y().int().nullable(),valueThreshold:y().int().nullable()});w({keywords:A(iO),total:y().int().nonnegative(),thresholdedPct:y().int().min(0).max(100)});const sO=w({locationName:p(),placeActionLinkName:p(),placeActionType:p(),uri:p().nullable(),isPreferred:re(),providerType:p().nullable()});w({placeActions:A(sO),total:y().int().nonnegative()});const rO=w({locationName:p(),populatedGroupCount:y().int().nonnegative(),syncedAt:p(),attributes:rt(p(),Ln())});w({lodging:A(rO),total:y().int().nonnegative()});const oO=w({name:p(),valueType:p(),values:A(bc([re(),p()])),unsetValues:A(p()),uris:A(p())}),lO=w({locationName:p(),attributeCount:y().int().nonnegative(),syncedAt:p(),attributes:A(oO)});w({attributes:A(lO),total:y().int().nonnegative()});const cO=w({locationName:p(),placeId:p(),tier:p(),amenities:A(p()),syncedAt:p(),place:rt(p(),Ln())});w({places:A(cO),total:y().int().nonnegative()});w({scope:w({locationName:p().nullable(),locationCount:y().int().nonnegative()}),performance:w({totals:rt(p(),y()),recent7d:rt(p(),y()),prior7d:rt(p(),y()),deltaPct:rt(p(),y().nullable())}),freshness:w({dataThroughDate:p().nullable(),latestStoredDate:p().nullable(),pendingDays:y().int().nonnegative()}),timeseries:A(w({date:p(),pending:re(),metrics:rt(p(),y())})),keywords:w({total:y().int().nonnegative(),thresholdedCount:y().int().nonnegative(),thresholdedPct:y().int().min(0).max(100)}),placeActions:w({total:y().int().nonnegative(),hasReservationCta:re(),hasBookingCta:re(),hasDirectMerchantCta:re()}),lodging:w({lodgingLocationCount:y().int().nonnegative(),populatedLodgingCount:y().int().nonnegative(),emptyLodgingCount:y().int().nonnegative()}),profileCompleteness:w({locationCount:y().int().nonnegative(),withSecondaryCategories:y().int().nonnegative(),secondaryCategoryTotal:y().int().nonnegative(),withDescription:y().int().nonnegative(),withServiceArea:y().int().nonnegative(),withHours:y().int().nonnegative(),withPrimaryPhone:y().int().nonnegative(),permanentlyClosed:y().int().nonnegative(),temporarilyClosed:y().int().nonnegative()})});const uO={BUSINESS_DIRECTION_REQUESTS:"Direction requests",WEBSITE_CLICKS:"Website clicks",CALL_CLICKS:"Call clicks",BUSINESS_BOOKINGS:"Bookings",BUSINESS_CONVERSATIONS:"Conversations",BUSINESS_FOOD_ORDERS:"Food orders",BUSINESS_FOOD_MENU_CLICKS:"Food menu clicks",BUSINESS_IMPRESSIONS_DESKTOP_SEARCH:"Search impressions (desktop)",BUSINESS_IMPRESSIONS_MOBILE_SEARCH:"Search impressions (mobile)",BUSINESS_IMPRESSIONS_DESKTOP_MAPS:"Maps impressions (desktop)",BUSINESS_IMPRESSIONS_MOBILE_MAPS:"Maps impressions (mobile)"};function dO(e){const n=e.replace(/^BUSINESS_/,"").split("_").filter(Boolean).map(r=>r.toLowerCase());if(n.length===0)return e;const i=n.join(" ");return i.charAt(0).toUpperCase()+i.slice(1)}function M5(e){return uO[e]??dO(e)}const fO=["BUSINESS_DIRECTION_REQUESTS","WEBSITE_CLICKS","CALL_CLICKS"],pO=["BUSINESS_IMPRESSIONS_DESKTOP_SEARCH","BUSINESS_IMPRESSIONS_MOBILE_SEARCH","BUSINESS_IMPRESSIONS_DESKTOP_MAPS","BUSINESS_IMPRESSIONS_MOBILE_MAPS"];function B5(e){return fO.includes(e)?"conversion":pO.includes(e)?"reach":"other"}w({id:p(),domain:p(),siteUrl:p().nullable().optional(),createdAt:p(),updatedAt:p()});const cf=w({id:p(),url:p(),httpCode:y().nullable().optional(),inIndex:re().nullable().optional(),lastCrawledDate:p().nullable().optional(),inIndexDate:p().nullable().optional(),inspectedAt:p(),documentSize:y().nullable().optional(),anchorCount:y().nullable().optional(),discoveryDate:p().nullable().optional()});w({summary:w({total:y(),indexed:y(),notIndexed:y(),unknown:y().optional(),percentage:y()}),lastInspectedAt:p().nullable(),indexed:A(cf).default([]),notIndexed:A(cf).default([]),unknown:A(cf).default([]).optional()});w({query:p(),impressions:y(),clicks:y(),ctr:y(),averagePosition:y()});w({date:p(),indexed:y(),notIndexed:y(),unknown:y()});const mO=w({url:p(),status:ne(["success","error"]),submittedAt:p(),error:p().optional()});w({summary:w({total:y().int().nonnegative(),succeeded:y().int().nonnegative(),failed:y().int().nonnegative()}),results:A(mO).default([])});const b0=w({url:p(),verified:re()});w({sites:A(b0).default([])});w({connected:re(),domain:p(),siteUrl:p().nullable(),createdAt:p().nullable(),updatedAt:p().nullable()});w({connected:re(),domain:p(),siteUrl:p().nullable(),availableSites:A(b0).default([])});w({siteUrl:p()});const hO=w({name:p(),alive:re(),lastUsed:p().nullable()});w({connected:re(),endpoint:p(),version:p().optional(),browserVersion:p().optional(),targets:A(hO).default([])});const Ks=ne(["live","staging"]);w({projectName:p(),url:p(),stagingUrl:p().optional(),username:p(),defaultEnv:Ks,createdAt:p(),updatedAt:p()});const xb=w({url:p(),reachable:re(),pageCount:y().nullable().optional(),version:p().nullable().optional(),error:p().nullable().optional(),plugins:A(p()).optional(),authenticatedUser:w({id:y(),slug:p()}).nullable().optional()});w({connected:re(),projectName:p(),defaultEnv:Ks,live:xb.nullable(),staging:xb.nullable(),adminUrl:p().nullable().optional()});const gO=w({id:y(),slug:p(),title:p(),status:p(),modifiedAt:p().nullable().optional(),link:p().nullable().optional()}),v0=w({title:p().nullable(),description:p().nullable(),noindex:re().nullable(),writable:re().default(!1),writeTargets:A(p()).default([])}),yO=w({type:p(),json:rt(p(),Ln())}),bO=gO.extend({env:Ks,content:p(),seo:v0,schemaBlocks:A(yO).default([])}),wb=bO.extend({contentHash:p(),contentSnippet:p()}),S0=w({manualRequired:vt(!0),targetUrl:p(),adminUrl:p().nullable().optional(),content:p(),nextSteps:A(p()).default([])}),vO=w({slug:p(),severity:ne(["high","medium","low"]),code:ne(["noindex","missing-seo-title","missing-meta-description","missing-schema","thin-content"]),message:p()});w({slug:p(),title:p(),status:p(),wordCount:y(),seo:v0,schemaPresent:re(),issues:A(vO).default([])});const SO=w({slug:p(),status:ne(["applied","skipped","manual"]),error:p().optional(),manualAssist:S0.optional()});w({env:Ks,strategy:ne(["plugin","manual"]),results:A(SO)});const xO=w({slug:p(),status:ne(["deployed","stripped","skipped","failed"]),schemasInjected:A(p()).optional(),manualAssist:S0.optional(),error:p().optional()});w({env:Ks,results:A(xO)});const wO=w({slug:p(),title:p(),canonrySchemas:A(p()),thirdPartySchemas:A(p()),hasCanonrySchema:re()});w({env:Ks,pages:A(wO)});const jO=w({name:p(),status:ne(["completed","skipped","failed"]),summary:p().optional(),error:p().optional()});w({projectName:p(),steps:A(jO)});w({slug:p(),live:wb,staging:wb,hasDifferences:re(),differences:w({title:re(),slug:re(),content:re(),seoTitle:re(),seoDescription:re(),noindex:re(),schema:re()})});const NO=w({name:p(),displayName:p().optional(),keyUrl:p().optional(),modelHint:p().optional(),model:p().optional(),defaultModel:p().optional(),configured:re(),quota:RE.optional(),vertexConfigured:re().optional()}),jb=w({configured:re()});w({providers:A(NO).default([]),google:jb,bing:jb});const Zs=ne(["queued","running","completed","partial","failed","cancelled"]),Qt=Zs.enum,x0=ne(["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","gbp-sync","ads-sync"]),Ae=x0.enum,w0=ne(["manual","scheduled","config-apply","backfill","probe"]),Ms=w0.enum,Ai=ne(["cited","not-cited"]),sc=Ai.enum,rc=ne(["visible","not-visible"]);rc.enum;const oc=ne(["mentioned","not-mentioned"]);oc.enum;const j0=ne(["new","cited","lost","emerging","not-cited"]);j0.enum;const kO=ne(["new","mentioned","lost","emerging","not-mentioned"]);kO.enum;const AO=ne([Ms.manual,Ms.probe]);w({kind:vt(Ae["answer-visibility"]).optional(),trigger:AO.optional(),providers:A(ya).optional(),queries:A(p().min(1)).min(1).optional(),location:p().min(1).optional(),allLocations:re().optional(),noLocation:re().optional()}).refine(e=>+!!e.location+ +!!e.allLocations+ +!!e.noLocation<=1,{message:'Only one of "location", "allLocations", or "noLocation" may be provided'});const _O=w({message:p(),raw:Ln().optional()}),CO=w({message:p().optional(),providers:rt(p(),_O).optional()}),TO=w({id:p(),projectId:p(),kind:x0,status:Zs,trigger:w0.default("manual"),location:p().nullable().optional(),queries:A(p()).nullable().optional(),startedAt:p().nullable().optional(),finishedAt:p().nullable().optional(),error:CO.nullable().optional(),createdAt:p()});function op(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 N0=w({uri:p(),title:p()}),k0=w({id:p(),runId:p(),queryId:p(),query:p().optional(),provider:ya,citationState:Ai,answerMentioned:re().optional(),visibilityState:rc.optional(),mentionState:oc.optional(),transition:j0.optional(),answerText:p().nullable().optional(),citedDomains:A(p()).default([]),competitorOverlap:A(p()).default([]),recommendedCompetitors:A(p()).default([]),matchedTerms:A(p()).default([]),groundingSources:A(N0).default([]),searchQueries:A(p()).default([]),model:p().nullable().optional(),location:p().nullable().optional(),createdAt:p()});w({snapshots:A(k0),total:y().int().nonnegative()});const EO=w({queryId:p().nullable(),query:p().nullable(),run1State:Ai.nullable(),run2State:Ai.nullable(),run1AnswerMentioned:re().nullable(),run2AnswerMentioned:re().nullable(),run1VisibilityState:rc.nullable(),run2VisibilityState:rc.nullable(),run1MentionState:oc.nullable().optional(),run2MentionState:oc.nullable().optional(),changed:re(),visibilityChanged:re()});w({run1:p(),run2:p(),diff:A(EO)});const OO=TO.extend({snapshots:A(k0).optional()}),zO=w({totalRuns:y().int().nonnegative(),run:OO.nullable()});w({id:p(),projectId:p().nullable().optional(),actor:p(),action:p(),entityType:p(),entityId:p().nullable().optional(),diff:Ln().optional(),createdAt:p()});const DO=ne(["yes","no","unknown","not-mentioned"]),Nb=A(p().min(1));w({companyName:p().min(1),domain:p().min(1),queries:Nb.optional(),phrases:Nb.optional(),competitors:A(p().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 RO=w({name:p(),count:y().int().nonnegative()}),MO=w({id:p(),name:p(),weight:y(),score:y(),findings:A(w({type:p(),message:p()})).default([]),recommendations:A(p()).default([])}),BO=w({url:p(),finalUrl:p(),auditedAt:p(),overallScore:y(),summary:p(),factors:A(MO).default([])}),LO=w({industry:p(),summary:p(),services:A(p()).default([]),categoryTerms:A(p()).default([])}),qO=w({provider:p(),displayName:p(),model:p().nullable().optional(),mentioned:re(),cited:re(),describedAccurately:DO,accuracyNotes:p().nullable().optional(),incorrectClaims:A(p()).default([]),recommendedCompetitors:A(p()).default([]),citedDomains:A(p()).default([]),groundingSources:A(N0).default([]),searchQueries:A(p()).default([]),answerText:p(),error:p().nullable().optional()}),UO=w({query:p(),providerResults:A(qO).default([])}),$O=w({totalQueries:y().int().nonnegative(),totalProviders:y().int().nonnegative(),totalComparisons:y().int().nonnegative(),mentionCount:y().int().nonnegative(),citationCount:y().int().nonnegative(),topCompetitors:A(RO).default([]),visibilityGap:p(),whatThisMeans:A(p()).default([]),recommendedActions:A(p()).default([])});w({companyName:p(),domain:p(),homepageUrl:p(),generatedAt:p(),queries:A(p()).default([]),competitors:A(p()).default([]),profile:LO,audit:BO,queryResults:A(UO).default([]),summary:$O});const A0=ne(["pass","partial","fail"]);A0.enum;const _0=ne(["up","down","flat"]);_0.enum;const VO=w({id:p(),name:p(),weight:y(),avgScore:y(),status:A0,pagesPassing:y().int().nonnegative(),pagesPartial:y().int().nonnegative(),pagesFailing:y().int().nonnegative()}),IO=w({factorId:p(),factorName:p(),avgScore:y(),affectedPages:y().int().nonnegative(),totalPages:y().int().nonnegative(),affectedPct:y().int().nonnegative(),topRecommendations:A(p()).default([])});w({project:p(),hasData:re(),runId:p().nullable(),runStatus:Zs.nullable(),sitemapUrl:p().nullable(),auditedAt:p().nullable(),aggregateScore:y(),pagesDiscovered:y().int().nonnegative(),pagesAudited:y().int().nonnegative(),pagesSkipped:y().int().nonnegative(),pagesErrored:y().int().nonnegative(),deltaScore:y().nullable(),trend:_0.nullable(),previousScore:y().nullable(),previousAuditedAt:p().nullable(),factors:A(VO).default([]),crossCuttingIssues:A(IO).default([]),prioritizedFixes:A(p()).default([])});const PO=w({id:p(),name:p(),weight:y(),score:y()}),GO=w({url:p(),overallScore:y(),status:ne(["success","error"]),error:p().nullable().optional(),factors:A(PO).default([])});w({project:p(),runId:p().nullable(),auditedAt:p().nullable(),total:y().int().nonnegative(),pages:A(GO).default([])});const HO=w({runId:p(),auditedAt:p(),aggregateScore:y(),pagesAudited:y().int().nonnegative()});w({project:p(),points:A(HO).default([])});w({sitemapUrl:p().url().optional(),limit:y().int().positive().max(2e3).optional()});w({runId:p(),status:Zs});const lp=ne(["answer-visibility","traffic-sync","gbp-sync","data-refresh","backlinks-sync","site-audit","ads-sync"]);lp.enum;w({id:p(),projectId:p(),kind:lp,cronExpr:p(),preset:p().nullable().optional(),timezone:p().default("UTC"),enabled:re().default(!0),providers:A(ya).default([]),sourceId:p().nullable().optional(),lastRunAt:p().nullable().optional(),nextRunAt:p().nullable().optional(),createdAt:p(),updatedAt:p()});w({kind:lp.optional(),preset:p().optional(),cron:p().optional(),timezone:p().optional().default("UTC"),enabled:re().optional().default(!0),providers:A(ya).optional().default([]),sourceId:p().optional()}).refine(e=>e.preset&&!e.cron||!e.preset&&e.cron,{message:'Exactly one of "preset" or "cron" must be provided'});const cp=ne(["competitor","directory","social","forum","news","reference","blog","ecommerce","video","academic","other"]);cp.enum;const up=ne(["cited","aspirational","wasted-surface"]),kb=up.enum;kb.cited,kb.aspirational;const Sc=ne(["direct-competitor","ota-aggregator","editorial-media","other","unknown"]),QO=Sc.enum;QO["direct-competitor"];const xc=ne(["queued","seeding","probing","completed","failed"]);xc.enum;const C0=w({domain:p().min(1),hits:y().int().positive(),competitorType:Sc.default("unknown")}),KO=w({id:p(),sessionId:p(),projectId:p(),query:p(),bucket:up.nullable().default(null),citationState:Ai,citedDomains:A(p()).default([]),answerMentioned:re().nullable().default(null),createdAt:p()}),ZO=w({id:p(),projectId:p(),status:xc,icpDescription:p().nullable().optional(),seedProvider:p().nullable().optional(),seedCountRaw:y().int().nullable().optional(),seedCount:y().int().nullable().optional(),seedFromAnswerCount:y().int().nullable().optional(),seedFromGroundingCount:y().int().nullable().optional(),seedBrandFilteredCount:y().int().nullable().optional(),buyerDescription:p().nullable().optional(),locations:A(vc).nullable().optional(),seedRawCandidates:A(p()).nullable().optional(),dedupClusterMinSims:A(y()).nullable().optional(),dedupBandPairFraction:y().nullable().optional(),dedupPairsTotal:y().int().nullable().optional(),seedProviders:A(p()).nullable().optional(),seedProviderCounts:rt(p(),y().int()).nullable().optional(),canonicalCount:y().int().nullable().optional(),dedupThreshold:y().nullable().optional(),probeCount:y().int().nullable().optional(),citedCount:y().int().nullable().default(null),aspirationalCount:y().int().nullable().default(null),wastedCount:y().int().nullable().default(null),competitorMap:A(C0).default([]),warning:p().nullable().optional(),error:p().nullable().optional(),startedAt:p().nullable().optional(),finishedAt:p().nullable().optional(),createdAt:p()});ZO.extend({probes:A(KO).default([])});const YO=500,XO=8,JO=["gemini","openai"],FO=ne(JO);w({icpDescription:p().min(1).optional(),buyerDescription:p().min(1).optional(),seedProviders:A(FO).min(1).transform(e=>[...new Set(e)].sort()).optional(),dedupThreshold:y().min(0).max(1).optional(),maxProbes:y().int().positive().max(YO).optional(),probeConcurrency:y().int().min(1).max(XO).optional(),locations:A(p().min(1)).optional()});w({buckets:A(up).min(1).optional(),includeCompetitors:re().optional(),competitorTypes:A(Sc).min(1).optional()});w({sessionId:p(),projectId:p(),status:xc,queriesByBucket:w({cited:A(p()),aspirational:A(p()),"wasted-surface":A(p())}),suggestedCompetitors:A(C0)});w({sessionId:p(),projectId:p(),promoted:w({queries:A(p()),competitors:A(p())}),skipped:w({queries:A(p()),competitors:A(p())})});bc([vt("cli"),p().regex(/^discovery:.+$/)]);const WO=w({query:p().min(1),probeHits:y().int().positive()}),ez=w({rawCandidates:y().int().nonnegative(),admitted:y().int().nonnegative(),rejected:w({belowFloor:y().int().nonnegative(),length:y().int().nonnegative(),navigational:y().int().nonnegative(),duplicate:y().int().nonnegative(),offAnchor:y().int().nonnegative(),semanticDuplicate:y().int().nonnegative()})});w({sessionId:p(),projectId:p(),provider:p(),status:xc,minProbeHits:y().int().positive(),anchorApplied:re(),semanticNoveltyApplied:re(),candidates:A(WO),stats:ez});const dp=ne(["own","direct-competitor","ota-aggregator","editorial-media","other"]);dp.enum;const T0=ne(["7d","30d","90d","all"]),Ab=ne(["improving","declining","stable"]),tz=ne(["mentioned","cited"]);tz.enum;const Of=w({citationRate:y(),cited:y().int(),total:y().int(),mentionRate:y(),mentionedCount:y().int()}),nz=w({rate:y().nullable(),projectMentionSnapshots:y().int().nonnegative(),competitorMentionSnapshots:y().int().nonnegative()}),az=w({startDate:p(),endDate:p(),citationRate:y(),cited:y().int(),total:y().int(),queryCount:y().int(),mentionRate:y(),mentionedCount:y().int(),mentionShare:nz,byProvider:rt(p(),Of)}),iz=w({date:p(),delta:y().int(),label:p()});w({window:T0,buckets:A(az),overall:Of,byProvider:rt(p(),Of),trend:Ab,mentionTrend:Ab,queryChanges:A(iz)});const _b=w({category:cp,label:p(),count:y().int(),percentage:y(),topDomains:A(w({domain:p(),count:y().int()}))}),sz=w({domain:p(),count:y().int(),percentage:y(),category:cp,label:p(),surfaceClass:dp}),rz=w({surfaceClass:dp,label:p(),count:y().int(),percentage:y(),domainCount:y().int()}),Cb=w({totalCitedSlots:y().int(),domainTotal:y().int(),entries:A(sz),truncatedDomainCount:y().int(),truncatedCitedSlots:y().int(),bySurfaceClass:A(rz)});w({overall:A(_b),byQuery:rt(p(),A(_b)),ranked:Cb,byProvider:rt(p(),Cb),runId:p(),window:T0,limit:y().int().nullable()});const fp=w({total:y().int(),checked:y().int(),mentioned:y().int(),cited:y().int(),mentionRate:y().nullable(),citedRate:y().nullable()}),E0=fp.extend({provider:p(),firstObserved:p(),lastObserved:p()}),oz=fp.extend({queryId:p().nullable(),query:p(),firstObserved:p(),lastObserved:p(),providers:A(E0).optional()}),lz=w({since:p().nullable(),until:p().nullable(),lastRuns:y().int().nullable(),runCount:y().int()}),cz=ne(["provider"]),uz=w({domain:p(),mentions:y().int()}),dz=w({percent:y().nullable(),projectMentions:y().int(),competitorMentions:y().int(),snapshotsWithAnswerText:y().int(),perCompetitor:A(uz)});w({project:p(),groupBy:cz.optional(),window:lz,totals:fp,byProvider:A(E0).optional(),queries:A(oz),shareOfVoice:dz.optional()});w({id:p(),projectId:p(),propertyId:p(),clientEmail:p(),connected:re(),createdAt:p(),updatedAt:p()});w({date:p(),landingPage:p(),sessions:y(),organicSessions:y(),users:y()});const pp=ne(["session","first_user","manual_utm"]),fz=w({source:p(),medium:p(),sessions:y(),users:y(),sourceDimension:pp}),pz=w({source:p(),medium:p(),sourceDimension:pp,landingPage:p(),sessions:y(),users:y()}),mz=w({source:p(),medium:p(),sessions:y(),users:y(),channelGroup:p()}),Zr=w({sessions:y(),sharePct:y(),sharePctDisplay:p()}),hz=w({organic:Zr,social:Zr,direct:Zr,ai:Zr,other:Zr});w({totalSessions:y(),totalOrganicSessions:y(),totalDirectSessions:y(),totalUsers:y(),topPages:A(w({landingPage:p(),sessions:y(),organicSessions:y(),directSessions:y(),users:y()})),aiReferrals:A(fz),aiReferralLandingPages:A(pz),aiSessionsDeduped:y(),aiUsersDeduped:y(),aiSessionsBySession:y(),aiUsersBySession:y(),socialReferrals:A(mz),socialSessions:y(),socialUsers:y(),channelBreakdown:hz,organicSharePct:y(),aiSharePct:y(),aiSharePctBySession:y(),directSharePct:y(),socialSharePct:y(),organicSharePctDisplay:p(),aiSharePctDisplay:p(),aiSharePctBySessionDisplay:p(),directSharePctDisplay:p(),socialSharePctDisplay:p(),otherSessions:y(),otherSharePct:y(),otherSharePctDisplay:p(),lastSyncedAt:p().nullable()});w({connected:re(),propertyId:p().nullable(),clientEmail:p().nullable(),authMethod:ne(["service-account","oauth"]).nullable(),lastSyncedAt:p().nullable(),createdAt:p().nullable().optional(),updatedAt:p().nullable().optional()});w({synced:re(),rowCount:y().int().nonnegative(),aiReferralCount:y().int().nonnegative(),socialReferralCount:y().int().nonnegative(),days:y().int().nonnegative(),syncedAt:p(),syncedComponents:A(p()).optional()});w({date:p(),source:p(),medium:p(),landingPage:p(),sessions:y(),users:y(),sourceDimension:pp});w({date:p(),source:p(),medium:p(),sessions:y(),users:y(),channelGroup:p()});w({date:p(),sessions:y(),organicSessions:y(),users:y()});function lc(e){return e.toLowerCase().replace(/[^a-z0-9]/g,"")}const O0=ne(["claude","openai","gemini","zai","deepinfra"]),gz=w({id:O0,label:p(),defaultModel:p(),configured:re(),keySource:ne(["config","env"]).nullable()});w({providers:A(gz).default([]),defaultProvider:O0.nullable()});const yz=ne(["aero","user","compaction"]);yz.enum;const z0=128;w({key:p().min(1).max(z0),value:p().min(1)});w({key:p().min(1).max(z0)});const Ys=ne(["commoncrawl","bing-webmaster"]);Ys.enum;const mp=ne(["queued","downloading","querying","ready","failed"]);mp.enum;w({id:p(),release:p(),status:mp,phaseDetail:p().nullable().optional(),vertexPath:p().nullable().optional(),edgesPath:p().nullable().optional(),vertexSha256:p().nullable().optional(),edgesSha256:p().nullable().optional(),vertexBytes:y().int().nullable().optional(),edgesBytes:y().int().nullable().optional(),projectsProcessed:y().int().nullable().optional(),domainsDiscovered:y().int().nullable().optional(),downloadStartedAt:p().nullable().optional(),downloadFinishedAt:p().nullable().optional(),queryStartedAt:p().nullable().optional(),queryFinishedAt:p().nullable().optional(),error:p().nullable().optional(),createdAt:p(),updatedAt:p()});const bz=w({linkingDomain:p(),numHosts:y().int(),source:Ys}),vz=w({projectId:p(),release:p(),targetDomain:p(),totalLinkingDomains:y().int(),totalHosts:y().int(),top10HostsShare:p(),queriedAt:p(),source:Ys,excludedLinkingDomains:y().int().optional(),excludedHosts:y().int().optional()});w({source:Ys,summary:vz.nullable(),total:y().int(),rows:A(bz)});w({release:p(),totalLinkingDomains:y().int(),totalHosts:y().int(),top10HostsShare:p(),queriedAt:p(),source:Ys});const Sz=w({source:Ys,connected:re(),hasData:re(),latestRelease:p().nullable(),totalLinkingDomains:y().int(),lastSyncedAt:p().nullable()});w({projectId:p(),targetDomain:p(),sources:A(Sz),anyConnected:re(),anyData:re()});w({duckdbInstalled:re(),duckdbVersion:p().nullable().optional(),duckdbSpec:p(),pluginDir:p()});w({installed:re(),version:p(),path:p(),alreadyPresent:re()});w({release:p(),vertexUrl:p(),edgesUrl:p(),vertexBytes:y().int().nullable(),edgesBytes:y().int().nullable(),lastModified:p().nullable()});w({release:p(),syncStatus:mp.nullable(),bytes:y().int(),lastUsedAt:p().nullable()});const hp=ne(["positive","caution","negative","neutral"]),Za=w({label:p(),value:p(),delta:p(),tone:hp,description:p(),tooltip:p().optional(),trend:A(y()),progress:y().optional(),providerCoverage:p().optional()}),xz=Za.extend({breakdown:w({projectMentionSnapshots:y().int().nonnegative(),competitorMentionSnapshots:y().int().nonnegative(),perCompetitor:A(w({domain:p(),mentionSnapshots:y().int().nonnegative(),shareOfCompetitiveTotal:y()})),snapshotsWithAnswerText:y().int().nonnegative(),snapshotsTotal:y().int().nonnegative()})}),uf=w({gained:y().int().nonnegative(),lost:y().int().nonnegative(),tone:hp,hasPreviousRun:re(),gainedQueries:A(p()).optional(),lostQueries:A(p()).optional()}),wz=w({hasPreviousRun:re(),comparable:re(),querySetChanged:re(),previousRunAt:p().nullable(),currentQueryCount:y().int().nonnegative(),previousQueryCount:y().int().nonnegative(),comparableQueryCount:y().int().nonnegative(),addedQueryCount:y().int().nonnegative(),removedQueryCount:y().int().nonnegative(),addedQueries:A(p()),removedQueries:A(p())}),jz=w({id:p(),projectId:p(),runId:p().nullable(),type:ne(["regression","gain","opportunity","first-citation","provider-pickup","persistent-gap","competitor-gained","competitor-lost","gbp-lodging-gap","gbp-listing-discrepancy","gbp-cta-gap","gbp-description-missing","gbp-metric-drop","gbp-keyword-drop"]),severity:ne(["critical","high","medium","low"]),title:p(),query:p(),provider:p(),recommendation:w({action:p(),target:p().optional(),reason:p()}).optional(),cause:w({cause:p(),competitorDomain:p().optional(),details:p().optional()}).optional(),dismissed:re(),createdAt:p()}),Nz=w({id:p(),projectId:p(),runId:p().nullable(),overallCitedRate:y(),overallMentionRate:y(),totalPairs:y().int().nonnegative(),citedPairs:y().int().nonnegative(),mentionedPairs:y().int().nonnegative(),providerBreakdown:rt(p(),w({citedRate:y(),mentionRate:y(),cited:y().int().nonnegative(),mentioned:y().int().nonnegative(),total:y().int().nonnegative()})),createdAt:p(),status:ne(["ready","no-data"]),reason:vt("no-runs-yet").optional()});w({project:LE,latestRun:zO,health:Nz.nullable(),topInsights:A(jz),queryCounts:w({totalQueries:y().int().nonnegative(),citedQueries:y().int().nonnegative(),notCitedQueries:y().int().nonnegative(),citedRate:y(),mentionedQueries:y().int().nonnegative(),notMentionedQueries:y().int().nonnegative(),mentionRate:y()}),providers:A(w({provider:p(),citedRate:y(),cited:y().int().nonnegative(),total:y().int().nonnegative()})),transitions:w({since:p().nullable(),gained:y().int().nonnegative(),lost:y().int().nonnegative(),emerging:y().int().nonnegative()}),scores:w({mention:Za,visibility:Za,mentionShare:xz,gapQueries:Za,mentionGaps:Za,indexCoverage:Za,competitorPressure:Za,runStatus:Za}),movementSummary:uf,citationMovement:uf,mentionMovement:uf,movementComparison:wz,competitors:A(w({id:p(),domain:p(),citationCount:y().int().nonnegative(),totalQueries:y().int().nonnegative(),pressureLabel:ne(["None","Low","Moderate","High"]),citedQueries:A(p())})),providerScores:A(w({provider:p(),model:p().nullable(),score:y(),cited:y().int().nonnegative(),total:y().int().nonnegative(),trend:A(y()).optional()})),attentionItems:A(w({id:p(),tone:hp,title:p(),detail:p(),actionLabel:p(),href:p()})),runHistory:A(w({runId:p(),createdAt:p(),citedCount:y().int().nonnegative(),totalCount:y().int().nonnegative(),citationRate:y(),mentionedCount:y().int().nonnegative(),mentionRate:y(),status:p()})),suggestedQueries:w({rows:A(w({query:p(),impressions:y(),clicks:y(),avgPosition:y(),reason:p()})),totalCandidates:y().int().nonnegative(),skippedAlreadyTracked:y().int().nonnegative()}),dateRangeLabel:p(),contextLabel:p()});ne(["snapshot","insight"]);const kz=w({kind:vt("snapshot"),id:p(),runId:p(),query:p(),provider:p(),model:p().nullable(),citationState:Ai,matchedField:ne(["answerText","citedDomains","searchQueries","query"]),snippet:p(),createdAt:p()}),Az=w({kind:vt("insight"),id:p(),runId:p().nullable(),type:ne(["regression","gain","opportunity","first-citation","provider-pickup","persistent-gap","competitor-gained","competitor-lost","gbp-lodging-gap","gbp-listing-discrepancy","gbp-cta-gap","gbp-description-missing","gbp-metric-drop","gbp-keyword-drop"]),severity:ne(["critical","high","medium","low"]),title:p(),query:p(),provider:p(),matchedField:ne(["title","query","recommendation","cause"]),snippet:p(),dismissed:re(),createdAt:p()}),_z=p0("kind",[kz,Az]);w({query:p(),totalHits:y().int().nonnegative(),truncated:re(),hits:A(_z)});const D0=ne(["create","expand","refresh","add-schema"]);D0.enum;function L5(e){switch(e){case"create":return"Create";case"expand":return"Expand";case"refresh":return"Refresh";case"add-schema":return"Add schema"}}const R0=ne(["gsc","competitor-evidence","both"]);R0.enum;const M0=ne(["high","medium","low"]);M0.enum;const Cz=ne(["blog-post","comparison","listicle","how-to","guide","glossary"]);Cz.enum;const B0=ne(["proposed","briefed","payload-generated","draft-created","published","validated","dismissed"]);B0.enum;const gp=ne(["ownable","ceded"]);gp.enum;const Tz=w({url:p(),gscImpressions:y().nonnegative(),gscClicks:y().nonnegative(),gscAvgPosition:y().nonnegative().nullable(),organicSessions:y().nonnegative()}),Ez=w({domain:p(),url:p(),title:p(),citationCount:y().int().nonnegative()}),Oz=w({demand:y(),competitor:y(),absence:y(),gapSeverity:y()}),zz=w({actionId:p(),state:B0,lastUpdated:p()}),L0=w({targetRef:p(),query:p(),action:D0,ourBestPage:Tz.nullable(),winningCompetitor:Ez.nullable(),score:y(),scoreBreakdown:Oz,drivers:A(p()),demandSource:R0,actionConfidence:M0,existingAction:zz.nullable(),winnabilityClass:gp,winnability:y().min(0).max(1).nullable()});w({targets:A(L0),contextMetrics:w({totalAiReferralSessions:y().int().nonnegative(),latestRunId:p(),runTimestamp:p()})});const Dz=w({targetRef:p(),addressedUrl:p().nullable(),note:p().nullable(),dismissedAt:p()});w({dismissals:A(Dz)});w({targetRef:p().min(1),addressedUrl:p().url().optional(),note:p().max(500).optional()});w({targetRef:p(),promptVersion:p(),provider:p(),model:p(),responseText:p(),costMillicents:y().int().nonnegative(),generatedAt:p()});w({provider:p().optional(),model:p().optional(),forceRefresh:re().optional()});const Rz=w({targetQuery:p().trim().min(1),winnabilityClass:gp,angle:p().trim().min(1),whyWinnable:p().trim().min(1),schemaHookup:p().trim().min(1),controllableSurfaceRationale:p().trim().min(1)});w({targetRef:p(),promptVersion:p(),provider:p(),model:p(),brief:Rz,costMillicents:y().int().nonnegative(),generatedAt:p()});const Mz=w({domain:p(),competitorType:Sc,hits:y().int().nonnegative(),updatedAt:p()});w({classifications:A(Mz)});const Bz=w({uri:p(),title:p(),domain:p(),isOurDomain:re(),isCompetitor:re(),citationCount:y().int().nonnegative(),providers:A(ya)}),q0=w({query:p(),groundingSources:A(Bz)});w({sources:A(q0),latestRunId:p()});const U0=w({query:p(),competitorDomains:A(p()),competitorCount:y().int().nonnegative(),missRate:y().min(0).max(1),lastSeenInRunId:p()});w({gaps:A(U0),latestRunId:p()});const $0=ne(["ok","warn","fail","skipped"]);$0.enum;const yp=ne(["global","project"]);yp.enum;const V0=ne(["auth","config","providers","integrations","database","schedules","agent"]);V0.enum;const Lz=w({id:p(),category:V0,scope:yp,title:p(),status:$0,code:p().describe('Stable machine-readable code (e.g. "google.token.refresh-failed"). Use this for filtering and remediation logic.'),summary:p(),remediation:p().nullable().optional().describe('Operator-facing next step. Null when status is "ok" or no specific remediation applies.'),details:rt(p(),Ln()).optional().describe("Structured context — principal email, redirect URI, missing scopes, etc. Stable per check id."),durationMs:y().int().nonnegative().describe("How long the check took to execute.")});w({scope:yp,project:p().nullable().describe('Project name when scope is "project", null otherwise.'),generatedAt:p().describe("ISO-8601 timestamp when this doctor run started."),durationMs:y().int().nonnegative(),summary:w({total:y().int().nonnegative(),ok:y().int().nonnegative(),warn:y().int().nonnegative(),fail:y().int().nonnegative(),skipped:y().int().nonnegative()}),checks:A(Lz)});const qz=w({provider:p(),citationState:Ai,cited:re(),mentioned:re(),runId:p(),runCreatedAt:p()}),Uz=w({queryId:p(),query:p(),providers:A(qz),citedCount:y().int().nonnegative(),mentionedCount:y().int().nonnegative(),totalProviders:y().int().nonnegative()}),$z=w({queryId:p(),query:p(),provider:p(),citingCompetitors:A(p()),runId:p(),runCreatedAt:p()}),Vz=w({providersConfigured:y().int().nonnegative(),providersCiting:y().int().nonnegative(),providersMentioning:y().int().nonnegative(),totalQueries:y().int().nonnegative(),queriesCitedAndMentioned:y().int().nonnegative(),queriesCitedOnly:y().int().nonnegative(),queriesMentionedOnly:y().int().nonnegative(),queriesInvisible:y().int().nonnegative(),latestRunId:p().nullable(),latestRunAt:p().nullable()});w({summary:Vz,byQuery:A(Uz),competitorGaps:A($z),status:ne(["ready","no-data"]),reason:ne(["no-runs-yet","no-queries"]).optional()});const q5=[7,14,30,90],U5=30;bc([vt(7),vt(14),vt(30),vt(90)]).describe("Report window in days (7, 14, 30, or 90). Defaults to 30 when omitted.");const Iz=ne(["prompt","request-param","browser-geo","ignored"]),Pz=w({label:p(),city:p(),region:p(),country:p(),otherConfiguredLabels:A(p())}),Gz=w({provider:p(),treatment:Iz,description:p()}),Hz=w({generatedAt:p(),project:w({id:p(),name:p(),displayName:p(),canonicalDomain:p(),country:p(),language:p()}),location:Pz.nullable(),providerLocationHandling:A(Gz),periodStart:p().nullable(),periodEnd:p().nullable(),periodDays:y().int().positive()}),Qz=w({citationRate:y(),citedQueryCount:y(),totalQueryCount:y(),mentionRate:y(),mentionedQueryCount:y(),trend:ne(["up","down","flat","unknown"]),queryCount:y(),competitorCount:y(),providerCount:y(),gsc:w({clicks:y(),impressions:y(),ctr:y(),avgPosition:y(),periodStart:p(),periodEnd:p()}).nullable(),ga:w({sessions:y(),users:y(),periodStart:p(),periodEnd:p()}).nullable(),findings:A(w({title:p(),detail:p(),tone:ne(["positive","caution","negative","neutral"])}))}),Kz=w({citationState:ne(["cited","not-cited","pending"]),answerMentioned:re().nullable(),model:p().nullable()}),Zz=w({queries:A(p()),providers:A(p()),matrix:A(A(Kz.nullable())),providerRates:A(w({provider:p(),citedCount:y(),mentionedCount:y(),totalCount:y(),citationRate:y(),mentionRate:y()}))}),Yz=w({domain:p(),citationCount:y(),totalCount:y(),pressureLabel:ne(["High","Moderate","Low","None"]),citedQueries:A(p()),sharePct:y(),theirCitedPages:A(w({url:p(),citedFor:A(p())}))}),Xz=w({projectCitationCount:y(),competitors:A(Yz)}),Jz=w({domain:p(),mentionCount:y(),totalCount:y(),pressureLabel:ne(["High","Moderate","Low","None"]),mentionedQueries:A(p()),sharePct:y()}),Fz=w({projectMentionCount:y(),totalAnswerSnapshots:y(),competitors:A(Jz)}),Wz=w({category:p(),label:p(),count:y(),sharePct:y()}),eD=w({categories:A(Wz),topDomains:A(w({domain:p(),count:y(),isCompetitor:re()}))}),tD=w({query:p(),clicks:y(),impressions:y(),ctr:y(),avgPosition:y(),category:ne(["brand","lead-gen","industry","other"])}),nD=w({periodStart:p(),periodEnd:p(),totalClicks:y(),totalImpressions:y(),ctr:y(),avgPosition:y(),topQueries:A(tD),categoryBreakdown:A(w({category:ne(["brand","lead-gen","industry","other"]),clicks:y(),impressions:y(),sharePct:y()})),trend:A(w({date:p(),clicks:y(),impressions:y()})),trackedButNoGsc:A(p()),gscButNotTracked:A(p())}),aD=w({totalSessions:y(),totalUsers:y(),totalOrganicSessions:y(),periodStart:p(),periodEnd:p(),topLandingPages:A(w({page:p(),sessions:y(),users:y(),organicSessions:y()})),channelBreakdown:A(w({channel:p(),sessions:y(),sharePct:y()}))}),iD=w({totalSessions:y(),organicSessions:y(),paidSessions:y(),channels:A(w({channelGroup:p(),sessions:y(),sharePct:y()})),topCampaigns:A(w({source:p(),medium:p(),sessions:y()}))}),sD=w({totalSessions:y(),totalUsers:y(),bySource:A(w({source:p(),sessions:y(),users:y(),sharePct:y()})),trend:A(w({date:p(),sessions:y()})),topLandingPages:A(w({page:p(),sessions:y(),users:y()}))}),rD=w({windowStart:p(),windowEnd:p(),hasData:re(),verifiedCrawlerHits:w({current:y(),prior:y(),deltaPct:y().nullable()}),unverifiedCrawlerHits:w({current:y(),prior:y(),deltaPct:y().nullable()}),aiUserFetchHits:w({current:y(),prior:y(),deltaPct:y().nullable()}),referralArrivals:w({current:y(),prior:y(),deltaPct:y().nullable()}),byOperator:A(w({operator:p(),verifiedHits:y(),unverifiedHits:y(),userFetchHits:y(),referralArrivals:y(),deltaPct:y().nullable()})),topCrawledPaths:A(w({path:p(),verifiedHits:y(),distinctOperators:y()})),referralProducts:A(w({product:p(),arrivals:y(),distinctLandingPaths:y()})),dailyTrend:A(w({date:p(),verifiedCrawlerHits:y(),userFetchHits:y(),referralArrivals:y()})),topReferralLandingPaths:A(w({path:p(),arrivals:y(),distinctProducts:y()}))}),oD=w({provider:ne(["google","bing"]).nullable(),total:y(),indexed:y(),notIndexed:y(),deindexed:y(),unknown:y(),indexedPct:y()}),lD=w({runId:p(),date:p(),citationRate:y(),citedQueryCount:y(),totalQueryCount:y(),mentionRate:y(),mentionedQueryCount:y(),providerRates:A(w({provider:p(),citationRate:y(),mentionRate:y()}))}),zf=w({id:p(),type:ne(["regression","gain","opportunity"]),severity:ne(["critical","high","medium","low"]),title:p(),query:p(),provider:p(),recommendation:p().nullable(),createdAt:p(),instanceCount:y()}),cD=w({horizon:ne(["immediate","short-term","medium-term"]),title:p(),rationale:p()}),As=w({current:y(),prior:y(),deltaAbs:y(),deltaPct:y().nullable(),direction:ne(["up","down","flat"]),window:y().optional()}),uD=w({provider:p(),current:y(),prior:y(),deltaAbs:y(),direction:ne(["up","down","flat"])}),dD=w({enoughHistory:re(),headline:p(),citationRate:As.nullable(),mentionRate:As.nullable(),citedQueryCount:As.nullable(),mentionedQueryCount:As.nullable(),gscClicksDelta:As.nullable(),aiReferralsDelta:As.nullable(),comparisonWindowDays:y().int().positive(),providerMovements:A(uD),wins:A(zf),regressions:A(zf)});ne(["agency","client"]);const fD=ne(["agency","client","both"]),pD=ne(["immediate","short-term","medium-term"]),mD=ne(["high","medium","low"]);ne(["positive","caution","negative","neutral"]);const hD=ne(["content","competitors","provider","search-demand","indexing","location","monitoring"]),bp=w({audience:fD,priority:y(),horizon:pD,category:hD,title:p(),action:p(),why:A(p()),evidence:A(p()),successMetric:p(),confidence:mD,targetRef:p().optional()}),gD=w({headline:p(),overview:p(),actionItems:A(bp),confidenceNotes:A(p())}),yD=w({title:p(),detail:p(),severity:ne(["positive","caution","negative","neutral"]),evidence:A(p())}),bD=w({priorities:A(bp),diagnostics:A(yD)});function $5(e){return e.horizon==="immediate"?"negative":e.confidence==="high"?"caution":e.confidence==="low"?"neutral":"caution"}function V5(e){switch(e){case"critical":return"Critical";case"high":return"High";case"medium":return"Medium";case"low":return"Low"}}function I5(e){switch(e){case"immediate":return"Immediate";case"short-term":return"Short term";case"medium-term":return"Medium term"}}function P5(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 G5(e){switch(e){case"high":return"High";case"medium":return"Medium";case"low":return"Low"}}w({meta:Hz,executiveSummary:Qz,citationScorecard:Zz,competitorLandscape:Xz,mentionLandscape:Fz,aiSourceOrigin:eD,gsc:nD.nullable(),ga:aD.nullable(),socialReferrals:iD.nullable(),aiReferrals:sD.nullable(),serverActivity:rD.nullable(),indexingHealth:oD.nullable(),citationsTrend:A(lD),whatsChanged:dD,insights:A(zf),recommendedNextSteps:A(cD),actionPlan:A(bp),clientSummary:gD,agencyDiagnostics:bD,contentOpportunities:A(L0),contentGaps:A(U0),groundingSources:A(q0)});const vD=ne(["claude","codex"]);vD.enum;const SD=ne(["claude","codex","all"]);SD.enum;const I0=w({content:y().int().nonnegative(),sitemap:y().int().nonnegative(),robots:y().int().nonnegative(),asset:y().int().nonnegative(),other:y().int().nonnegative()}),xD=ne(["content","sitemap","robots","asset","other"]),vp=ne(["cloud-run","wordpress","cloudflare","vercel","generic-log"]);vp.enum;const wD=ne(["raw-request-events","aggregate-request-metrics","request-url","status-code","user-agent","remote-ip","referer","cursor-pull"]);wD.enum;const jD=ne(["raw-request","aggregate-bucket"]),ND=jD.enum,kD=ne(["observed","provider-aggregated","inferred"]),AD=kD.enum,_D=w({type:p().nullable(),labels:rt(p(),p())}),CD=w({sourceType:vp,evidenceKind:vt(ND["raw-request"]),confidence:vt(AD.observed),eventId:p().min(1),observedAt:p().min(1),method:p().nullable(),requestUrl:p().nullable(),host:p().nullable(),path:p().min(1),queryString:p().nullable(),status:y().int().nullable(),userAgent:p().nullable(),remoteIp:p().nullable(),referer:p().nullable(),latencyMs:y().nullable(),requestSizeBytes:y().int().nullable(),responseSizeBytes:y().int().nullable(),providerResource:_D,providerLabels:rt(p(),p())});w({events:A(CD),rawEntryCount:y().int().nonnegative(),skippedEntryCount:y().int().nonnegative(),nextPageToken:p().optional(),filter:p()});const P0=ne(["connected","paused","error","archived"]),H5=P0.enum,G0=ne(["oauth","service-account"]);G0.enum;const TD=ne(["verified","claimed_unverified","unknown_ai_like"]),Q5=TD.enum;w({gcpProjectId:p().min(1),serviceName:p().nullable().optional(),location:p().nullable().optional(),authMode:G0});w({baseUrl:p().url(),username:p().min(1)});const Sp=ne(["production","preview"]);Sp.enum;w({projectId:p().min(1),teamId:p().min(1),environment:Sp});const H0=w({id:p(),projectId:p(),sourceType:vp,displayName:p(),status:P0,lastSyncedAt:p().nullable(),lastCursor:p().nullable(),lastError:p().nullable(),archivedAt:p().nullable(),config:rt(p(),Ln()),createdAt:p(),updatedAt:p()});w({gcpProjectId:p().min(1),serviceName:p().min(1).optional(),location:p().min(1).optional(),displayName:p().min(1).optional(),keyJson:p().optional()});w({baseUrl:p().url(),username:p().min(1),applicationPassword:p().min(1),displayName:p().min(1).optional()});w({projectId:p().min(1),teamId:p().min(1),token:p().min(1),environment:Sp.optional(),displayName:p().min(1).optional()});w({sourceId:p(),runId:p(),syncedAt:p(),pulledEvents:y().int().nonnegative(),selfTrafficExcluded:y().int().nonnegative(),crawlerHits:y().int().nonnegative(),aiUserFetchHits:y().int().nonnegative(),aiReferralHits:y().int().nonnegative(),unknownHits:y().int().nonnegative(),crawlerBucketRows:y().int().nonnegative(),aiUserFetchBucketRows:y().int().nonnegative(),aiReferralBucketRows:y().int().nonnegative(),sampleRows:y().int().nonnegative(),windowStart:p(),windowEnd:p()});w({days:y().int().positive().optional()});w({advanceToNow:vt(!0)});w({sourceId:p(),runId:p(),status:Zs,windowStart:p(),windowEnd:p(),daysRequested:y().int().positive(),daysApplied:y().int().positive()});const ED=w({crawlerHits:y().int().nonnegative(),crawlerContentHits:y().int().nonnegative(),crawlerInfraHits:y().int().nonnegative(),crawlerSegments:I0,aiUserFetchHits:y().int().nonnegative(),aiReferralHits:y().int().nonnegative(),sampleCount:y().int().nonnegative()});w({sources:A(H0)});const OD=H0.extend({totals24h:ED,latestRun:w({runId:p(),status:Zs,startedAt:p().nullable(),finishedAt:p().nullable(),error:p().nullable()}).nullable()});w({sources:A(OD)});const zD=ne(["crawler","ai-user-fetch","ai-referral"]),xp=zD.enum,DD=w({kind:vt(xp.crawler),sourceId:p(),tsHour:p(),botId:p(),operator:p(),verificationStatus:p(),pathNormalized:p(),pathClass:xD,status:y().int(),hits:y().int().nonnegative()}),RD=w({kind:vt(xp["ai-user-fetch"]),sourceId:p(),tsHour:p(),botId:p(),operator:p(),verificationStatus:p(),pathNormalized:p(),status:y().int(),hits:y().int().nonnegative()}),MD=w({kind:vt(xp["ai-referral"]),sourceId:p(),tsHour:p(),product:p(),operator:p(),sourceDomain:p(),evidenceType:p(),landingPathNormalized:p(),status:y().int(),hits:y().int().nonnegative()}),BD=p0("kind",[DD,RD,MD]);w({windowStart:p(),windowEnd:p(),totals:w({crawlerHits:y().int().nonnegative(),crawlerContentHits:y().int().nonnegative(),crawlerInfraHits:y().int().nonnegative(),crawlerSegments:I0,aiUserFetchHits:y().int().nonnegative(),aiReferralHits:y().int().nonnegative()}),events:A(BD)});w({apiKey:p().min(1)});w({connected:re(),adAccountId:p().nullable().optional(),displayName:p().nullable().optional(),currencyCode:p().nullable().optional(),timezone:p().nullable().optional(),status:p().nullable().optional(),lastSyncedAt:p().nullable().optional(),conversionTrackingConfigured:re().optional()});w({disconnected:re()});w({runId:p(),status:p()});const LD=w({type:p().nullable().optional(),title:p().nullable().optional(),body:p().nullable().optional(),targetUrl:p().nullable().optional()}),qD=w({id:p(),adGroupId:p(),name:p(),status:p(),reviewStatus:p().nullable().optional(),creative:LD.nullable().optional()}),UD=w({id:p(),campaignId:p(),name:p(),status:p(),billingEventType:p().nullable().optional(),maxBidMicros:y().int().nullable().optional(),contextHints:A(p()).default([]),ads:A(qD).default([])}),$D=w({id:p(),name:p(),status:p(),biddingType:p().nullable().optional(),dailySpendLimitMicros:y().int().nullable().optional(),lifetimeSpendLimitMicros:y().int().nullable().optional(),adGroups:A(UD).default([])});w({campaigns:A($D)});const Q0=ne(["campaign","ad_group"]);Q0.enum;const VD=w({level:Q0,entityId:p(),date:p(),impressions:y().int(),clicks:y().int(),spendMicros:y().int(),conversions:y().int(),ctr:y().nullable(),cpcMicros:y().int().nullable()});w({rows:A(VD),currencyCode:p().nullable().optional()});const ID=w({impressions:y().int(),clicks:y().int(),spendMicros:y().int(),conversions:y().int(),ctr:y().nullable(),cpcMicros:y().int().nullable()});w({connected:re(),displayName:p().nullable().optional(),currencyCode:p().nullable().optional(),lastSyncedAt:p().nullable().optional(),campaignCount:y().int(),adGroupCount:y().int(),adCount:y().int(),window:w({from:p().nullable(),to:p().nullable()}),totals:ID});var PD=(e=>(e.Clicks="clicks",e.Impressions="impressions",e.CTR="ctr",e.Position="position",e))(PD||{});const K5={clicks:"Clicks",impressions:"Impressions",ctr:"CTR",position:"Position"},Z5={clicks:"Clicks",impressions:"Impr",ctr:"CTR",position:"Pos"},Y5=op;function GD(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 h=d[1];if(n===d[0]){c(d);continue}if(e.external){const v=e.external.registry.get(d[0])?.id;if(n!==d[0]&&v){c(d);continue}}if(e.metadataRegistry.get(d[0])?.id){c(d);continue}if(h.cycle){c(d);continue}if(h.count>1&&e.reused==="ref"){c(d);continue}}}function u0(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 h=e.seen.get(d);if(h.ref===null)return;const g=h.def??h.schema,v={...g},S=h.ref;if(h.ref=null,S){r(S);const N=e.seen.get(S),_=N.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,v),d._zod.parent===S)for(const k in g)k==="$ref"||k==="allOf"||k in v||delete g[k];if(_.$ref&&N.def)for(const k in g)k==="$ref"||k==="allOf"||k in N.def&&JSON.stringify(g[k])===JSON.stringify(N.def[k])&&delete g[k]}const x=d._zod.parent;if(x&&x!==S){r(x);const N=e.seen.get(x);if(N?.schema.$ref&&(g.$ref=N.schema.$ref,N.def))for(const _ in g)_==="$ref"||_==="allOf"||_ in N.def&&JSON.stringify(g[_])===JSON.stringify(N.def[_])&&delete g[_]}e.override({zodSchema:d,jsonSchema:g,path:h.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 h=d[1];h.def&&h.defId&&(c[h.defId]=h.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:ac(n,"input",e.processors),output:ac(n,"output",e.processors)}},enumerable:!1,writable:!1}),d}catch{throw new Error("Error converting schema to JSON.")}}function Gt(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 Gt(r.element,i);if(r.type==="set")return Gt(r.valueType,i);if(r.type==="lazy")return Gt(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 Gt(r.innerType,i);if(r.type==="intersection")return Gt(r.left,i)||Gt(r.right,i);if(r.type==="record"||r.type==="map")return Gt(r.keyType,i)||Gt(r.valueType,i);if(r.type==="pipe")return Gt(r.in,i)||Gt(r.out,i);if(r.type==="object"){for(const l in r.shape)if(Gt(r.shape[l],i))return!0;return!1}if(r.type==="union"){for(const l of r.options)if(Gt(l,i))return!0;return!1}if(r.type==="tuple"){for(const l of r.items)if(Gt(l,i))return!0;return!!(r.rest&&Gt(r.rest,i))}return!1}const WC=(e,n={})=>i=>{const r=l0({...i,processors:n});return At(e,r),c0(r,e),u0(r,e)},ac=(e,n,i={})=>r=>{const{libraryOptions:l,target:c}=r??{},d=l0({...l??{},target:c,io:n,processors:i});return At(e,d),c0(d,e),u0(d,e)},eT={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},tT=(e,n,i,r)=>{const l=i;l.type="string";const{minimum:c,maximum:d,format:h,patterns:g,contentEncoding:v}=e._zod.bag;if(typeof c=="number"&&(l.minLength=c),typeof d=="number"&&(l.maxLength=d),h&&(l.format=eT[h]??h,l.format===""&&delete l.format,h==="time"&&delete l.format),v&&(l.contentEncoding=v),g&&g.size>0){const S=[...g];S.length===1?l.pattern=S[0].source:S.length>1&&(l.allOf=[...S.map(x=>({...n.target==="draft-07"||n.target==="draft-04"||n.target==="openapi-3.0"?{type:"string"}:{},pattern:x.source}))])}},nT=(e,n,i,r)=>{const l=i,{minimum:c,maximum:d,format:h,multipleOf:g,exclusiveMaximum:v,exclusiveMinimum:S}=e._zod.bag;typeof h=="string"&&h.includes("int")?l.type="integer":l.type="number",typeof S=="number"&&(n.target==="draft-04"||n.target==="openapi-3.0"?(l.minimum=S,l.exclusiveMinimum=!0):l.exclusiveMinimum=S),typeof c=="number"&&(l.minimum=c,typeof S=="number"&&n.target!=="draft-04"&&(S>=c?delete l.minimum:delete l.exclusiveMinimum)),typeof v=="number"&&(n.target==="draft-04"||n.target==="openapi-3.0"?(l.maximum=v,l.exclusiveMaximum=!0):l.exclusiveMaximum=v),typeof d=="number"&&(l.maximum=d,typeof v=="number"&&n.target!=="draft-04"&&(v<=d?delete l.maximum:delete l.exclusiveMaximum)),typeof g=="number"&&(l.multipleOf=g)},aT=(e,n,i,r)=>{i.type="boolean"},iT=(e,n,i,r)=>{i.not={}},sT=(e,n,i,r)=>{},rT=(e,n,i,r)=>{const l=e._zod.def,c=Vv(l.entries);c.every(d=>typeof d=="number")&&(i.type="number"),c.every(d=>typeof d=="string")&&(i.type="string"),i.enum=c},oT=(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},lT=(e,n,i,r)=>{if(n.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},cT=(e,n,i,r)=>{if(n.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},uT=(e,n,i,r)=>{const l=i,c=e._zod.def,{minimum:d,maximum:h}=e._zod.bag;typeof d=="number"&&(l.minItems=d),typeof h=="number"&&(l.maxItems=h),l.type="array",l.items=At(c.element,n,{...r,path:[...r.path,"items"]})},dT=(e,n,i,r)=>{const l=i,c=e._zod.def;l.type="object",l.properties={};const d=c.shape;for(const v in d)l.properties[v]=At(d[v],n,{...r,path:[...r.path,"properties",v]});const h=new Set(Object.keys(d)),g=new Set([...h].filter(v=>{const S=c.shape[v]._zod;return n.io==="input"?S.optin===void 0:S.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=At(c.catchall,n,{...r,path:[...r.path,"additionalProperties"]})):n.io==="output"&&(l.additionalProperties=!1)},fT=(e,n,i,r)=>{const l=e._zod.def,c=l.inclusive===!1,d=l.options.map((h,g)=>At(h,n,{...r,path:[...r.path,c?"oneOf":"anyOf",g]}));c?i.oneOf=d:i.anyOf=d},pT=(e,n,i,r)=>{const l=e._zod.def,c=At(l.left,n,{...r,path:[...r.path,"allOf",0]}),d=At(l.right,n,{...r,path:[...r.path,"allOf",1]}),h=v=>"allOf"in v&&Object.keys(v).length===1,g=[...h(c)?c.allOf:[c],...h(d)?d.allOf:[d]];i.allOf=g},mT=(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 S=At(c.valueType,n,{...r,path:[...r.path,"patternProperties","*"]});l.patternProperties={};for(const x of g)l.patternProperties[x.source]=S}else(n.target==="draft-07"||n.target==="draft-2020-12")&&(l.propertyNames=At(c.keyType,n,{...r,path:[...r.path,"propertyNames"]})),l.additionalProperties=At(c.valueType,n,{...r,path:[...r.path,"additionalProperties"]});const v=d._zod.values;if(v){const S=[...v].filter(x=>typeof x=="string"||typeof x=="number");S.length>0&&(l.required=S)}},hT=(e,n,i,r)=>{const l=e._zod.def,c=At(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"}]},gT=(e,n,i,r)=>{const l=e._zod.def;At(l.innerType,n,r);const c=n.seen.get(e);c.ref=l.innerType},yT=(e,n,i,r)=>{const l=e._zod.def;At(l.innerType,n,r);const c=n.seen.get(e);c.ref=l.innerType,i.default=JSON.parse(JSON.stringify(l.defaultValue))},bT=(e,n,i,r)=>{const l=e._zod.def;At(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)))},vT=(e,n,i,r)=>{const l=e._zod.def;At(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},ST=(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;At(c,n,r);const d=n.seen.get(e);d.ref=c},xT=(e,n,i,r)=>{const l=e._zod.def;At(l.innerType,n,r);const c=n.seen.get(e);c.ref=l.innerType,i.readOnly=!0},d0=(e,n,i,r)=>{const l=e._zod.def;At(l.innerType,n,r);const c=n.seen.get(e);c.ref=l.innerType},wT=Q("ZodISODateTime",(e,n)=>{j2.init(e,n),ft.init(e,n)});function jT(e){return TC(wT,e)}const NT=Q("ZodISODate",(e,n)=>{N2.init(e,n),ft.init(e,n)});function kT(e){return EC(NT,e)}const AT=Q("ZodISOTime",(e,n)=>{k2.init(e,n),ft.init(e,n)});function _T(e){return OC(AT,e)}const CT=Q("ZodISODuration",(e,n)=>{A2.init(e,n),ft.init(e,n)});function TT(e){return zC(CT,e)}const ET=(e,n)=>{Hv.init(e,n),e.name="ZodError",Object.defineProperties(e,{format:{value:i=>g_(e,i)},flatten:{value:i=>h_(e,i)},addIssue:{value:i=>{e.issues.push(i),e.message=JSON.stringify(e.issues,_f,2)}},addIssues:{value:i=>{e.issues.push(...i),e.message=JSON.stringify(e.issues,_f,2)}},isEmpty:{get(){return e.issues.length===0}}})},Tn=Q("ZodError",ET,{Parent:Error}),OT=ap(Tn),zT=ip(Tn),DT=hc(Tn),RT=gc(Tn),MT=v_(Tn),BT=S_(Tn),LT=x_(Tn),qT=w_(Tn),UT=j_(Tn),$T=N_(Tn),VT=k_(Tn),IT=A_(Tn),dt=Q("ZodType",(e,n)=>(ut.init(e,n),Object.assign(e["~standard"],{jsonSchema:{input:ac(e,"input"),output:ac(e,"output")}}),e.toJSONSchema=WC(e,{}),e.def=n,e.type=n.type,Object.defineProperty(e,"_def",{value:n}),e.check=(...i)=>e.clone(ei(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)=>ti(e,i,r),e.brand=()=>e,e.register=((i,r)=>(i.add(e,r),e)),e.parse=(i,r)=>OT(e,i,r,{callee:e.parse}),e.safeParse=(i,r)=>DT(e,i,r),e.parseAsync=async(i,r)=>zT(e,i,r,{callee:e.parseAsync}),e.safeParseAsync=async(i,r)=>RT(e,i,r),e.spa=e.safeParseAsync,e.encode=(i,r)=>MT(e,i,r),e.decode=(i,r)=>BT(e,i,r),e.encodeAsync=async(i,r)=>LT(e,i,r),e.decodeAsync=async(i,r)=>qT(e,i,r),e.safeEncode=(i,r)=>UT(e,i,r),e.safeDecode=(i,r)=>$T(e,i,r),e.safeEncodeAsync=async(i,r)=>VT(e,i,r),e.safeDecodeAsync=async(i,r)=>IT(e,i,r),e.refine=(i,r)=>e.check(ME(i,r)),e.superRefine=i=>e.check(BE(i)),e.overwrite=i=>e.check(Qs(i)),e.optional=()=>yb(e),e.exactOptional=()=>wE(e),e.nullable=()=>bb(e),e.nullish=()=>yb(bb(e)),e.nonoptional=i=>CE(e,i),e.array=()=>A(e),e.or=i=>bc([e,i]),e.and=i=>gE(e,i),e.transform=i=>vb(e,SE(i)),e.default=i=>kE(e,i),e.prefault=i=>_E(e,i),e.catch=i=>EE(e,i),e.pipe=i=>vb(e,i),e.readonly=()=>DE(e),e.describe=i=>{const r=e.clone();return Wr.add(r,{description:i}),r},Object.defineProperty(e,"description",{get(){return Wr.get(e)?.description},configurable:!0}),e.meta=(...i)=>{if(i.length===0)return Wr.get(e);const r=e.clone();return Wr.add(r,i[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=i=>i(e),e)),f0=Q("_ZodString",(e,n)=>{sp.init(e,n),dt.init(e,n),e._zod.processJSONSchema=(r,l,c)=>tT(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(qC(...r)),e.includes=(...r)=>e.check(VC(...r)),e.startsWith=(...r)=>e.check(IC(...r)),e.endsWith=(...r)=>e.check(PC(...r)),e.min=(...r)=>e.check(nc(...r)),e.max=(...r)=>e.check(r0(...r)),e.length=(...r)=>e.check(o0(...r)),e.nonempty=(...r)=>e.check(nc(1,...r)),e.lowercase=r=>e.check(UC(r)),e.uppercase=r=>e.check($C(r)),e.trim=()=>e.check(HC()),e.normalize=(...r)=>e.check(GC(...r)),e.toLowerCase=()=>e.check(QC()),e.toUpperCase=()=>e.check(KC()),e.slugify=()=>e.check(ZC())}),PT=Q("ZodString",(e,n)=>{sp.init(e,n),f0.init(e,n),e.email=i=>e.check(lC(GT,i)),e.url=i=>e.check(pC(HT,i)),e.jwt=i=>e.check(CC(rE,i)),e.emoji=i=>e.check(mC(QT,i)),e.guid=i=>e.check(db(hb,i)),e.uuid=i=>e.check(cC(Ul,i)),e.uuidv4=i=>e.check(uC(Ul,i)),e.uuidv6=i=>e.check(dC(Ul,i)),e.uuidv7=i=>e.check(fC(Ul,i)),e.nanoid=i=>e.check(hC(KT,i)),e.guid=i=>e.check(db(hb,i)),e.cuid=i=>e.check(gC(ZT,i)),e.cuid2=i=>e.check(yC(YT,i)),e.ulid=i=>e.check(bC(XT,i)),e.base64=i=>e.check(kC(aE,i)),e.base64url=i=>e.check(AC(iE,i)),e.xid=i=>e.check(vC(FT,i)),e.ksuid=i=>e.check(SC(JT,i)),e.ipv4=i=>e.check(xC(WT,i)),e.ipv6=i=>e.check(wC(eE,i)),e.cidrv4=i=>e.check(jC(tE,i)),e.cidrv6=i=>e.check(NC(nE,i)),e.e164=i=>e.check(_C(sE,i)),e.datetime=i=>e.check(jT(i)),e.date=i=>e.check(kT(i)),e.time=i=>e.check(_T(i)),e.duration=i=>e.check(TT(i))});function p(e){return oC(PT,e)}const ft=Q("ZodStringFormat",(e,n)=>{ct.init(e,n),f0.init(e,n)}),GT=Q("ZodEmail",(e,n)=>{m2.init(e,n),ft.init(e,n)}),hb=Q("ZodGUID",(e,n)=>{f2.init(e,n),ft.init(e,n)}),Ul=Q("ZodUUID",(e,n)=>{p2.init(e,n),ft.init(e,n)}),HT=Q("ZodURL",(e,n)=>{h2.init(e,n),ft.init(e,n)}),QT=Q("ZodEmoji",(e,n)=>{g2.init(e,n),ft.init(e,n)}),KT=Q("ZodNanoID",(e,n)=>{y2.init(e,n),ft.init(e,n)}),ZT=Q("ZodCUID",(e,n)=>{b2.init(e,n),ft.init(e,n)}),YT=Q("ZodCUID2",(e,n)=>{v2.init(e,n),ft.init(e,n)}),XT=Q("ZodULID",(e,n)=>{S2.init(e,n),ft.init(e,n)}),FT=Q("ZodXID",(e,n)=>{x2.init(e,n),ft.init(e,n)}),JT=Q("ZodKSUID",(e,n)=>{w2.init(e,n),ft.init(e,n)}),WT=Q("ZodIPv4",(e,n)=>{_2.init(e,n),ft.init(e,n)}),eE=Q("ZodIPv6",(e,n)=>{C2.init(e,n),ft.init(e,n)}),tE=Q("ZodCIDRv4",(e,n)=>{T2.init(e,n),ft.init(e,n)}),nE=Q("ZodCIDRv6",(e,n)=>{E2.init(e,n),ft.init(e,n)}),aE=Q("ZodBase64",(e,n)=>{O2.init(e,n),ft.init(e,n)}),iE=Q("ZodBase64URL",(e,n)=>{D2.init(e,n),ft.init(e,n)}),sE=Q("ZodE164",(e,n)=>{R2.init(e,n),ft.init(e,n)}),rE=Q("ZodJWT",(e,n)=>{B2.init(e,n),ft.init(e,n)}),p0=Q("ZodNumber",(e,n)=>{t0.init(e,n),dt.init(e,n),e._zod.processJSONSchema=(r,l,c)=>nT(e,r,l),e.gt=(r,l)=>e.check(pb(r,l)),e.gte=(r,l)=>e.check(lf(r,l)),e.min=(r,l)=>e.check(lf(r,l)),e.lt=(r,l)=>e.check(fb(r,l)),e.lte=(r,l)=>e.check(of(r,l)),e.max=(r,l)=>e.check(of(r,l)),e.int=r=>e.check(gb(r)),e.safe=r=>e.check(gb(r)),e.positive=r=>e.check(pb(0,r)),e.nonnegative=r=>e.check(lf(0,r)),e.negative=r=>e.check(fb(0,r)),e.nonpositive=r=>e.check(of(0,r)),e.multipleOf=(r,l)=>e.check(mb(r,l)),e.step=(r,l)=>e.check(mb(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 y(e){return DC(p0,e)}const oE=Q("ZodNumberFormat",(e,n)=>{L2.init(e,n),p0.init(e,n)});function gb(e){return RC(oE,e)}const lE=Q("ZodBoolean",(e,n)=>{q2.init(e,n),dt.init(e,n),e._zod.processJSONSchema=(i,r,l)=>aT(e,i,r)});function re(e){return MC(lE,e)}const cE=Q("ZodUnknown",(e,n)=>{U2.init(e,n),dt.init(e,n),e._zod.processJSONSchema=(i,r,l)=>sT()});function Ln(){return BC(cE)}const uE=Q("ZodNever",(e,n)=>{$2.init(e,n),dt.init(e,n),e._zod.processJSONSchema=(i,r,l)=>iT(e,i,r)});function dE(e){return LC(uE,e)}const fE=Q("ZodArray",(e,n)=>{V2.init(e,n),dt.init(e,n),e._zod.processJSONSchema=(i,r,l)=>uT(e,i,r,l),e.element=n.element,e.min=(i,r)=>e.check(nc(i,r)),e.nonempty=i=>e.check(nc(1,i)),e.max=(i,r)=>e.check(r0(i,r)),e.length=(i,r)=>e.check(o0(i,r)),e.unwrap=()=>e.element});function A(e,n){return YC(fE,e,n)}const pE=Q("ZodObject",(e,n)=>{P2.init(e,n),dt.init(e,n),e._zod.processJSONSchema=(i,r,l)=>dT(e,i,r,l),He(e,"shape",()=>n.shape),e.keyof=()=>ne(Object.keys(e._zod.def.shape)),e.catchall=i=>e.clone({...e._zod.def,catchall:i}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Ln()}),e.loose=()=>e.clone({...e._zod.def,catchall:Ln()}),e.strict=()=>e.clone({...e._zod.def,catchall:dE()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=i=>u_(e,i),e.safeExtend=i=>d_(e,i),e.merge=i=>f_(e,i),e.pick=i=>l_(e,i),e.omit=i=>c_(e,i),e.partial=(...i)=>p_(g0,e,i[0]),e.required=(...i)=>m_(y0,e,i[0])});function w(e,n){const i={type:"object",shape:e??{},...be(n)};return new pE(i)}const m0=Q("ZodUnion",(e,n)=>{i0.init(e,n),dt.init(e,n),e._zod.processJSONSchema=(i,r,l)=>fT(e,i,r,l),e.options=n.options});function bc(e,n){return new m0({type:"union",options:e,...be(n)})}const mE=Q("ZodDiscriminatedUnion",(e,n)=>{m0.init(e,n),G2.init(e,n)});function h0(e,n,i){return new mE({type:"union",options:n,discriminator:e,...be(i)})}const hE=Q("ZodIntersection",(e,n)=>{H2.init(e,n),dt.init(e,n),e._zod.processJSONSchema=(i,r,l)=>pT(e,i,r,l)});function gE(e,n){return new hE({type:"intersection",left:e,right:n})}const yE=Q("ZodRecord",(e,n)=>{Q2.init(e,n),dt.init(e,n),e._zod.processJSONSchema=(i,r,l)=>mT(e,i,r,l),e.keyType=n.keyType,e.valueType=n.valueType});function rt(e,n,i){return new yE({type:"record",keyType:e,valueType:n,...be(i)})}const Tf=Q("ZodEnum",(e,n)=>{K2.init(e,n),dt.init(e,n),e._zod.processJSONSchema=(r,l,c)=>rT(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 Tf({...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 Tf({...n,checks:[],...be(l),entries:c})}});function ne(e,n){const i=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Tf({type:"enum",entries:i,...be(n)})}const bE=Q("ZodLiteral",(e,n)=>{Z2.init(e,n),dt.init(e,n),e._zod.processJSONSchema=(i,r,l)=>oT(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 vt(e,n){return new bE({type:"literal",values:Array.isArray(e)?e:[e],...be(n)})}const vE=Q("ZodTransform",(e,n)=>{Y2.init(e,n),dt.init(e,n),e._zod.processJSONSchema=(i,r,l)=>cT(e,i),e._zod.parse=(i,r)=>{if(r.direction==="backward")throw new Uv(e.constructor.name);i.addIssue=c=>{if(typeof c=="string")i.issues.push(so(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(so(d))}};const l=n.transform(i.value,i);return l instanceof Promise?l.then(c=>(i.value=c,i)):(i.value=l,i)}});function SE(e){return new vE({type:"transform",transform:e})}const g0=Q("ZodOptional",(e,n)=>{s0.init(e,n),dt.init(e,n),e._zod.processJSONSchema=(i,r,l)=>d0(e,i,r,l),e.unwrap=()=>e._zod.def.innerType});function yb(e){return new g0({type:"optional",innerType:e})}const xE=Q("ZodExactOptional",(e,n)=>{X2.init(e,n),dt.init(e,n),e._zod.processJSONSchema=(i,r,l)=>d0(e,i,r,l),e.unwrap=()=>e._zod.def.innerType});function wE(e){return new xE({type:"optional",innerType:e})}const jE=Q("ZodNullable",(e,n)=>{F2.init(e,n),dt.init(e,n),e._zod.processJSONSchema=(i,r,l)=>hT(e,i,r,l),e.unwrap=()=>e._zod.def.innerType});function bb(e){return new jE({type:"nullable",innerType:e})}const NE=Q("ZodDefault",(e,n)=>{J2.init(e,n),dt.init(e,n),e._zod.processJSONSchema=(i,r,l)=>yT(e,i,r,l),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function kE(e,n){return new NE({type:"default",innerType:e,get defaultValue(){return typeof n=="function"?n():Pv(n)}})}const AE=Q("ZodPrefault",(e,n)=>{W2.init(e,n),dt.init(e,n),e._zod.processJSONSchema=(i,r,l)=>bT(e,i,r,l),e.unwrap=()=>e._zod.def.innerType});function _E(e,n){return new AE({type:"prefault",innerType:e,get defaultValue(){return typeof n=="function"?n():Pv(n)}})}const y0=Q("ZodNonOptional",(e,n)=>{eC.init(e,n),dt.init(e,n),e._zod.processJSONSchema=(i,r,l)=>gT(e,i,r,l),e.unwrap=()=>e._zod.def.innerType});function CE(e,n){return new y0({type:"nonoptional",innerType:e,...be(n)})}const TE=Q("ZodCatch",(e,n)=>{tC.init(e,n),dt.init(e,n),e._zod.processJSONSchema=(i,r,l)=>vT(e,i,r,l),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function EE(e,n){return new TE({type:"catch",innerType:e,catchValue:typeof n=="function"?n:()=>n})}const OE=Q("ZodPipe",(e,n)=>{nC.init(e,n),dt.init(e,n),e._zod.processJSONSchema=(i,r,l)=>ST(e,i,r,l),e.in=n.in,e.out=n.out});function vb(e,n){return new OE({type:"pipe",in:e,out:n})}const zE=Q("ZodReadonly",(e,n)=>{aC.init(e,n),dt.init(e,n),e._zod.processJSONSchema=(i,r,l)=>xT(e,i,r,l),e.unwrap=()=>e._zod.def.innerType});function DE(e){return new zE({type:"readonly",innerType:e})}const RE=Q("ZodCustom",(e,n)=>{iC.init(e,n),dt.init(e,n),e._zod.processJSONSchema=(i,r,l)=>lT(e,i)});function ME(e,n={}){return XC(RE,e,n)}function BE(e){return FC(e)}const b0=w({id:p(),name:p(),keyPrefix:p(),scopes:A(p()),projectId:p().nullable(),readOnly:re(),createdAt:p(),lastUsedAt:p().nullable(),revokedAt:p().nullable()});w({keys:A(b0)});w({name:p().min(1).max(100),scopes:A(p()).min(1).optional(),projectId:p().optional()});b0.extend({key:p()});const LE=w({maxConcurrency:y().int().positive(),maxRequestsPerMinute:y().int().positive(),maxRequestsPerDay:y().int().positive()}),ya=p().min(1);p().min(1);const vc=w({label:p().min(1),city:p().min(1),region:p().min(1),country:p().length(2),timezone:p().optional()}),rp=ne(["citation.lost","citation.gained","run.completed","run.failed","insight.critical","insight.high"]);w({id:p(),projectId:p(),channel:vt("webhook"),url:p().url(),urlDisplay:p(),urlHost:p(),events:A(rp),enabled:re().default(!0),source:p().optional(),webhookSecret:p().optional(),createdAt:p(),updatedAt:p()});w({channel:vt("webhook"),url:p().url(),events:A(rp).min(1),source:p().optional()});const v0=ne(["cli","api","config-file"]);function qE(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 UE(e,n){return n?e.some(i=>i.label===n):!0}w({displayName:p().min(1),canonicalDomain:p().min(1),ownedDomains:A(p().min(1)).optional(),aliases:A(p()).optional(),country:p().length(2),language:p().min(2),tags:A(p()).optional(),labels:rt(p(),p()).optional(),providers:A(ya).optional(),locations:A(vc).optional(),defaultLocation:p().nullable().optional(),autoExtractBacklinks:re().optional(),configSource:v0.optional()});const $E=w({id:p(),name:p(),displayName:p().optional(),canonicalDomain:p(),ownedDomains:A(p()).default([]),aliases:A(p()).default([]),country:p().length(2),language:p().min(2),tags:A(p()).default([]),labels:rt(p(),p()).default({}),providers:A(p()).default([]),locations:A(vc).default([]),defaultLocation:p().nullable().optional(),autoExtractBacklinks:re().default(!1),configSource:v0.default("cli"),configRevision:y().int().positive().default(1),createdAt:p().optional(),updatedAt:p().optional()});w({id:p(),query:p(),createdAt:p()});w({id:p(),keyword:p(),createdAt:p()});w({queries:A(p().trim().min(1)).min(1)});w({keywords:A(p().trim().min(1)).min(1)});w({provider:ya,count:y().int().min(1).max(20).optional()});w({id:p(),domain:p(),createdAt:p()});w({competitors:A(p().trim().min(1)).min(1)});function ic(e){let n=e.trim().toLowerCase();try{n.includes("://")&&(n=new URL(n).hostname.toLowerCase())}catch{}return n.replace(/^www\./,"")}const VE=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 IE(e){const n=ic(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 VE.has(l)?r.length>=3?r.slice(-3).join("."):"":r.slice(-2).join(".")}function PE(e){const n=IE(e);return n?n.split(".")[0]??"":""}function GE(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=ic(c);i.has(d)||(i.add(d),r.push(c))}return r}const HE=w({name:p().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:rt(p(),p()).optional().default({})}),QE=w({preset:p().optional(),cron:p().optional(),timezone:p().optional().default("UTC"),providers:A(ya).optional().default([])}).refine(e=>e.preset&&!e.cron||!e.preset&&e.cron,{message:'Exactly one of "preset" or "cron" must be provided'}).optional(),KE=w({channel:vt("webhook"),url:p().url(),events:A(rp).min(1)}),ZE=w({gsc:w({propertyUrl:p()}).optional(),syncSchedule:w({preset:p().optional(),cron:p().optional()}).optional()}).optional(),Sb=A(p().min(1)),YE=w({displayName:p().min(1),canonicalDomain:p().min(1),ownedDomains:A(p().min(1)).optional().default([]),aliases:A(p().min(1)).optional().default([]),country:p().length(2),language:p().min(2),queries:Sb.optional(),keywords:Sb.optional(),competitors:A(p().min(1)).optional().default([]),providers:A(ya).optional().default([]),locations:A(vc).optional().default([]),defaultLocation:p().optional(),schedule:QE,notifications:A(KE).optional().default([]),google:ZE,autoExtractBacklinks:re().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=qE(e.locations);i.length>0&&n.addIssue({code:"custom",message:`Duplicate location labels are not allowed: ${i.join(", ")}`,path:["locations"]}),UE(e.locations,e.defaultLocation)||n.addIssue({code:"custom",message:`defaultLocation "${e.defaultLocation}" must match a configured location label`,path:["defaultLocation"]})});w({apiVersion:vt("canonry/v1"),kind:vt("Project"),metadata:HE,spec:YE});const XE=ne(["gsc","ga4","gbp"]);w({id:p(),domain:p(),connectionType:XE,propertyId:p().nullable().optional(),sitemapUrl:p().nullable().optional(),scopes:A(p()).default([]),createdAt:p(),updatedAt:p()});w({date:p(),query:p(),page:p(),country:p().nullable().optional(),device:p().nullable().optional(),clicks:y(),impressions:y(),ctr:y(),position:y()});const FE=w({date:p(),clicks:y(),impressions:y(),ctr:y()});w({totals:w({clicks:y(),impressions:y(),ctr:y(),days:y()}),daily:A(FE)});const Ef=w({id:p(),url:p(),indexingState:p().nullable().optional(),verdict:p().nullable().optional(),coverageState:p().nullable().optional(),pageFetchState:p().nullable().optional(),robotsTxtState:p().nullable().optional(),crawlTime:p().nullable().optional(),lastCrawlResult:p().nullable().optional(),isMobileFriendly:re().nullable().optional(),richResults:A(p()).default([]),referringUrls:A(p()).default([]),inspectedAt:p()});ne(["stable","reindexed","deindexed","still-missing","new"]);const JE=w({url:p(),previousState:p().nullable(),currentState:p().nullable(),transitionDate:p()}),WE=w({reason:p(),count:y(),urls:A(Ef).default([])});w({summary:w({total:y(),indexed:y(),notIndexed:y(),deindexed:y(),percentage:y()}),lastInspectedAt:p().nullable(),lastSyncedAt:p().nullable(),indexed:A(Ef).default([]),notIndexed:A(Ef).default([]),deindexed:A(JE).default([]),reasonGroups:A(WE).default([])});w({url:p(),type:ne(["URL_UPDATED","URL_DELETED"]),notifiedAt:p()});const eO=w({url:p(),type:ne(["URL_UPDATED","URL_DELETED"]),notifiedAt:p(),status:ne(["success","error"]),error:p().optional()});w({summary:w({total:y().int().nonnegative(),succeeded:y().int().nonnegative(),failed:y().int().nonnegative()}),results:A(eO).default([])});w({date:p(),indexed:y(),notIndexed:y(),reasonBreakdown:rt(p(),y()).default({})});const tO=w({siteUrl:p(),permissionLevel:p()});w({sites:A(tO).default([])});const nO=w({type:p(),submitted:p(),indexed:p()}),aO=w({path:p(),lastSubmitted:p().optional(),isPending:re().optional(),isSitemapsIndex:re().optional(),type:p().optional(),lastDownloaded:p().optional(),warnings:p().optional(),errors:p().optional(),contents:A(nO).optional()});w({sitemaps:A(aO).default([])});const iO=w({name:p(),accountName:p().nullable(),type:p().nullable(),role:p().nullable()});w({accounts:A(iO),total:y().int().nonnegative()});const sO=w({id:p(),projectId:p(),accountName:p(),locationName:p(),displayName:p(),primaryCategoryDisplayName:p().nullable(),storefrontAddress:p().nullable(),websiteUri:p().nullable(),placeId:p().nullable(),mapsUri:p().nullable(),additionalCategories:A(p()),description:p().nullable(),serviceArea:rt(p(),Ln()).nullable(),regularHours:rt(p(),Ln()).nullable(),primaryPhone:p().nullable(),openStatus:p().nullable(),openingDate:p().nullable(),selected:re(),syncedAt:p().nullable(),createdAt:p(),updatedAt:p()});w({locations:A(sO),totalDiscovered:y().int().nonnegative(),totalSelected:y().int().nonnegative()});w({selectAllNew:re().default(!0),accountName:p().optional(),switchAccount:re().default(!1)});w({selected:re()});w({locationNames:A(p()).optional(),daysOfMetrics:y().int().positive().max(540).optional(),monthsOfKeywords:y().int().positive().max(18).optional()});w({runId:p(),status:p()});const rO=w({locationName:p(),date:p(),metric:p(),value:y().int()});w({metrics:A(rO),total:y().int().nonnegative()});const oO=w({locationName:p(),periodStart:p(),periodEnd:p(),keyword:p(),valueCount:y().int().nullable(),valueThreshold:y().int().nullable()});w({keywords:A(oO),total:y().int().nonnegative(),thresholdedPct:y().int().min(0).max(100)});const lO=w({locationName:p(),placeActionLinkName:p(),placeActionType:p(),uri:p().nullable(),isPreferred:re(),providerType:p().nullable()});w({placeActions:A(lO),total:y().int().nonnegative()});const cO=w({locationName:p(),populatedGroupCount:y().int().nonnegative(),syncedAt:p(),attributes:rt(p(),Ln())});w({lodging:A(cO),total:y().int().nonnegative()});const uO=w({name:p(),valueType:p(),values:A(bc([re(),p()])),unsetValues:A(p()),uris:A(p())}),dO=w({locationName:p(),attributeCount:y().int().nonnegative(),syncedAt:p(),attributes:A(uO)});w({attributes:A(dO),total:y().int().nonnegative()});const fO=w({locationName:p(),placeId:p(),tier:p(),amenities:A(p()),syncedAt:p(),place:rt(p(),Ln())});w({places:A(fO),total:y().int().nonnegative()});w({scope:w({locationName:p().nullable(),locationCount:y().int().nonnegative()}),performance:w({totals:rt(p(),y()),recent7d:rt(p(),y()),prior7d:rt(p(),y()),deltaPct:rt(p(),y().nullable())}),freshness:w({dataThroughDate:p().nullable(),latestStoredDate:p().nullable(),pendingDays:y().int().nonnegative()}),timeseries:A(w({date:p(),pending:re(),metrics:rt(p(),y())})),keywords:w({total:y().int().nonnegative(),thresholdedCount:y().int().nonnegative(),thresholdedPct:y().int().min(0).max(100)}),placeActions:w({total:y().int().nonnegative(),hasReservationCta:re(),hasBookingCta:re(),hasDirectMerchantCta:re()}),lodging:w({lodgingLocationCount:y().int().nonnegative(),populatedLodgingCount:y().int().nonnegative(),emptyLodgingCount:y().int().nonnegative()}),profileCompleteness:w({locationCount:y().int().nonnegative(),withSecondaryCategories:y().int().nonnegative(),secondaryCategoryTotal:y().int().nonnegative(),withDescription:y().int().nonnegative(),withServiceArea:y().int().nonnegative(),withHours:y().int().nonnegative(),withPrimaryPhone:y().int().nonnegative(),permanentlyClosed:y().int().nonnegative(),temporarilyClosed:y().int().nonnegative()})});const pO={BUSINESS_DIRECTION_REQUESTS:"Direction requests",WEBSITE_CLICKS:"Website clicks",CALL_CLICKS:"Call clicks",BUSINESS_BOOKINGS:"Bookings",BUSINESS_CONVERSATIONS:"Conversations",BUSINESS_FOOD_ORDERS:"Food orders",BUSINESS_FOOD_MENU_CLICKS:"Food menu clicks",BUSINESS_IMPRESSIONS_DESKTOP_SEARCH:"Search impressions (desktop)",BUSINESS_IMPRESSIONS_MOBILE_SEARCH:"Search impressions (mobile)",BUSINESS_IMPRESSIONS_DESKTOP_MAPS:"Maps impressions (desktop)",BUSINESS_IMPRESSIONS_MOBILE_MAPS:"Maps impressions (mobile)"};function mO(e){const n=e.replace(/^BUSINESS_/,"").split("_").filter(Boolean).map(r=>r.toLowerCase());if(n.length===0)return e;const i=n.join(" ");return i.charAt(0).toUpperCase()+i.slice(1)}function $5(e){return pO[e]??mO(e)}const hO=["BUSINESS_DIRECTION_REQUESTS","WEBSITE_CLICKS","CALL_CLICKS"],gO=["BUSINESS_IMPRESSIONS_DESKTOP_SEARCH","BUSINESS_IMPRESSIONS_MOBILE_SEARCH","BUSINESS_IMPRESSIONS_DESKTOP_MAPS","BUSINESS_IMPRESSIONS_MOBILE_MAPS"];function V5(e){return hO.includes(e)?"conversion":gO.includes(e)?"reach":"other"}w({id:p(),domain:p(),siteUrl:p().nullable().optional(),createdAt:p(),updatedAt:p()});const cf=w({id:p(),url:p(),httpCode:y().nullable().optional(),inIndex:re().nullable().optional(),lastCrawledDate:p().nullable().optional(),inIndexDate:p().nullable().optional(),inspectedAt:p(),documentSize:y().nullable().optional(),anchorCount:y().nullable().optional(),discoveryDate:p().nullable().optional()});w({summary:w({total:y(),indexed:y(),notIndexed:y(),unknown:y().optional(),percentage:y()}),lastInspectedAt:p().nullable(),indexed:A(cf).default([]),notIndexed:A(cf).default([]),unknown:A(cf).default([]).optional()});w({query:p(),impressions:y(),clicks:y(),ctr:y(),averagePosition:y()});w({date:p(),indexed:y(),notIndexed:y(),unknown:y()});const yO=w({url:p(),status:ne(["success","error"]),submittedAt:p(),error:p().optional()});w({summary:w({total:y().int().nonnegative(),succeeded:y().int().nonnegative(),failed:y().int().nonnegative()}),results:A(yO).default([])});const S0=w({url:p(),verified:re()});w({sites:A(S0).default([])});w({connected:re(),domain:p(),siteUrl:p().nullable(),createdAt:p().nullable(),updatedAt:p().nullable()});w({connected:re(),domain:p(),siteUrl:p().nullable(),availableSites:A(S0).default([])});w({siteUrl:p()});const bO=w({name:p(),alive:re(),lastUsed:p().nullable()});w({connected:re(),endpoint:p(),version:p().optional(),browserVersion:p().optional(),targets:A(bO).default([])});const Ks=ne(["live","staging"]);w({projectName:p(),url:p(),stagingUrl:p().optional(),username:p(),defaultEnv:Ks,createdAt:p(),updatedAt:p()});const xb=w({url:p(),reachable:re(),pageCount:y().nullable().optional(),version:p().nullable().optional(),error:p().nullable().optional(),plugins:A(p()).optional(),authenticatedUser:w({id:y(),slug:p()}).nullable().optional()});w({connected:re(),projectName:p(),defaultEnv:Ks,live:xb.nullable(),staging:xb.nullable(),adminUrl:p().nullable().optional()});const vO=w({id:y(),slug:p(),title:p(),status:p(),modifiedAt:p().nullable().optional(),link:p().nullable().optional()}),x0=w({title:p().nullable(),description:p().nullable(),noindex:re().nullable(),writable:re().default(!1),writeTargets:A(p()).default([])}),SO=w({type:p(),json:rt(p(),Ln())}),xO=vO.extend({env:Ks,content:p(),seo:x0,schemaBlocks:A(SO).default([])}),wb=xO.extend({contentHash:p(),contentSnippet:p()}),w0=w({manualRequired:vt(!0),targetUrl:p(),adminUrl:p().nullable().optional(),content:p(),nextSteps:A(p()).default([])}),wO=w({slug:p(),severity:ne(["high","medium","low"]),code:ne(["noindex","missing-seo-title","missing-meta-description","missing-schema","thin-content"]),message:p()});w({slug:p(),title:p(),status:p(),wordCount:y(),seo:x0,schemaPresent:re(),issues:A(wO).default([])});const jO=w({slug:p(),status:ne(["applied","skipped","manual"]),error:p().optional(),manualAssist:w0.optional()});w({env:Ks,strategy:ne(["plugin","manual"]),results:A(jO)});const NO=w({slug:p(),status:ne(["deployed","stripped","skipped","failed"]),schemasInjected:A(p()).optional(),manualAssist:w0.optional(),error:p().optional()});w({env:Ks,results:A(NO)});const kO=w({slug:p(),title:p(),canonrySchemas:A(p()),thirdPartySchemas:A(p()),hasCanonrySchema:re()});w({env:Ks,pages:A(kO)});const AO=w({name:p(),status:ne(["completed","skipped","failed"]),summary:p().optional(),error:p().optional()});w({projectName:p(),steps:A(AO)});w({slug:p(),live:wb,staging:wb,hasDifferences:re(),differences:w({title:re(),slug:re(),content:re(),seoTitle:re(),seoDescription:re(),noindex:re(),schema:re()})});const _O=w({name:p(),displayName:p().optional(),keyUrl:p().optional(),modelHint:p().optional(),model:p().optional(),defaultModel:p().optional(),configured:re(),quota:LE.optional(),vertexConfigured:re().optional()}),jb=w({configured:re()});w({providers:A(_O).default([]),google:jb,bing:jb});const Zs=ne(["queued","running","completed","partial","failed","cancelled"]),Qt=Zs.enum,j0=ne(["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","gbp-sync","ads-sync"]),Ae=j0.enum,N0=ne(["manual","scheduled","config-apply","backfill","probe"]),Ms=N0.enum,Ai=ne(["cited","not-cited"]),sc=Ai.enum,rc=ne(["visible","not-visible"]);rc.enum;const oc=ne(["mentioned","not-mentioned"]);oc.enum;const k0=ne(["new","cited","lost","emerging","not-cited"]);k0.enum;const CO=ne(["new","mentioned","lost","emerging","not-mentioned"]);CO.enum;const TO=ne([Ms.manual,Ms.probe]);w({kind:vt(Ae["answer-visibility"]).optional(),trigger:TO.optional(),providers:A(ya).optional(),queries:A(p().min(1)).min(1).optional(),location:p().min(1).optional(),allLocations:re().optional(),noLocation:re().optional()}).refine(e=>+!!e.location+ +!!e.allLocations+ +!!e.noLocation<=1,{message:'Only one of "location", "allLocations", or "noLocation" may be provided'});const EO=w({message:p(),raw:Ln().optional()}),OO=w({message:p().optional(),providers:rt(p(),EO).optional()}),zO=w({id:p(),projectId:p(),kind:j0,status:Zs,trigger:N0.default("manual"),location:p().nullable().optional(),queries:A(p()).nullable().optional(),startedAt:p().nullable().optional(),finishedAt:p().nullable().optional(),error:OO.nullable().optional(),createdAt:p()});function op(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 A0=w({uri:p(),title:p()}),_0=w({id:p(),runId:p(),queryId:p(),query:p().optional(),provider:ya,citationState:Ai,answerMentioned:re().optional(),visibilityState:rc.optional(),mentionState:oc.optional(),transition:k0.optional(),answerText:p().nullable().optional(),citedDomains:A(p()).default([]),competitorOverlap:A(p()).default([]),recommendedCompetitors:A(p()).default([]),matchedTerms:A(p()).default([]),groundingSources:A(A0).default([]),searchQueries:A(p()).default([]),model:p().nullable().optional(),location:p().nullable().optional(),createdAt:p()});w({snapshots:A(_0),total:y().int().nonnegative()});const DO=w({queryId:p().nullable(),query:p().nullable(),run1State:Ai.nullable(),run2State:Ai.nullable(),run1AnswerMentioned:re().nullable(),run2AnswerMentioned:re().nullable(),run1VisibilityState:rc.nullable(),run2VisibilityState:rc.nullable(),run1MentionState:oc.nullable().optional(),run2MentionState:oc.nullable().optional(),changed:re(),visibilityChanged:re()});w({run1:p(),run2:p(),diff:A(DO)});const RO=zO.extend({snapshots:A(_0).optional()}),MO=w({totalRuns:y().int().nonnegative(),run:RO.nullable()});w({id:p(),projectId:p().nullable().optional(),actor:p(),action:p(),entityType:p(),entityId:p().nullable().optional(),diff:Ln().optional(),createdAt:p()});const BO=ne(["yes","no","unknown","not-mentioned"]),Nb=A(p().min(1));w({companyName:p().min(1),domain:p().min(1),queries:Nb.optional(),phrases:Nb.optional(),competitors:A(p().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 LO=w({name:p(),count:y().int().nonnegative()}),qO=w({id:p(),name:p(),weight:y(),score:y(),findings:A(w({type:p(),message:p()})).default([]),recommendations:A(p()).default([])}),UO=w({url:p(),finalUrl:p(),auditedAt:p(),overallScore:y(),summary:p(),factors:A(qO).default([])}),$O=w({industry:p(),summary:p(),services:A(p()).default([]),categoryTerms:A(p()).default([])}),VO=w({provider:p(),displayName:p(),model:p().nullable().optional(),mentioned:re(),cited:re(),describedAccurately:BO,accuracyNotes:p().nullable().optional(),incorrectClaims:A(p()).default([]),recommendedCompetitors:A(p()).default([]),citedDomains:A(p()).default([]),groundingSources:A(A0).default([]),searchQueries:A(p()).default([]),answerText:p(),error:p().nullable().optional()}),IO=w({query:p(),providerResults:A(VO).default([])}),PO=w({totalQueries:y().int().nonnegative(),totalProviders:y().int().nonnegative(),totalComparisons:y().int().nonnegative(),mentionCount:y().int().nonnegative(),citationCount:y().int().nonnegative(),topCompetitors:A(LO).default([]),visibilityGap:p(),whatThisMeans:A(p()).default([]),recommendedActions:A(p()).default([])});w({companyName:p(),domain:p(),homepageUrl:p(),generatedAt:p(),queries:A(p()).default([]),competitors:A(p()).default([]),profile:$O,audit:UO,queryResults:A(IO).default([]),summary:PO});const C0=ne(["pass","partial","fail"]);C0.enum;const T0=ne(["up","down","flat"]);T0.enum;const GO=w({id:p(),name:p(),weight:y(),avgScore:y(),status:C0,pagesPassing:y().int().nonnegative(),pagesPartial:y().int().nonnegative(),pagesFailing:y().int().nonnegative()}),HO=w({factorId:p(),factorName:p(),avgScore:y(),affectedPages:y().int().nonnegative(),totalPages:y().int().nonnegative(),affectedPct:y().int().nonnegative(),topRecommendations:A(p()).default([])});w({project:p(),hasData:re(),runId:p().nullable(),runStatus:Zs.nullable(),sitemapUrl:p().nullable(),auditedAt:p().nullable(),aggregateScore:y(),pagesDiscovered:y().int().nonnegative(),pagesAudited:y().int().nonnegative(),pagesSkipped:y().int().nonnegative(),pagesErrored:y().int().nonnegative(),deltaScore:y().nullable(),trend:T0.nullable(),previousScore:y().nullable(),previousAuditedAt:p().nullable(),factors:A(GO).default([]),crossCuttingIssues:A(HO).default([]),prioritizedFixes:A(p()).default([])});const QO=w({id:p(),name:p(),weight:y(),score:y()}),KO=w({url:p(),overallScore:y(),status:ne(["success","error"]),error:p().nullable().optional(),factors:A(QO).default([])});w({project:p(),runId:p().nullable(),auditedAt:p().nullable(),total:y().int().nonnegative(),pages:A(KO).default([])});const ZO=w({runId:p(),auditedAt:p(),aggregateScore:y(),pagesAudited:y().int().nonnegative()});w({project:p(),points:A(ZO).default([])});w({sitemapUrl:p().url().optional(),limit:y().int().positive().max(2e3).optional()});w({runId:p(),status:Zs});const lp=ne(["answer-visibility","traffic-sync","gbp-sync","data-refresh","backlinks-sync","site-audit","ads-sync"]);lp.enum;w({id:p(),projectId:p(),kind:lp,cronExpr:p(),preset:p().nullable().optional(),timezone:p().default("UTC"),enabled:re().default(!0),providers:A(ya).default([]),sourceId:p().nullable().optional(),lastRunAt:p().nullable().optional(),nextRunAt:p().nullable().optional(),createdAt:p(),updatedAt:p()});w({kind:lp.optional(),preset:p().optional(),cron:p().optional(),timezone:p().optional().default("UTC"),enabled:re().optional().default(!0),providers:A(ya).optional().default([]),sourceId:p().optional()}).refine(e=>e.preset&&!e.cron||!e.preset&&e.cron,{message:'Exactly one of "preset" or "cron" must be provided'});const cp=ne(["competitor","directory","social","forum","news","reference","blog","ecommerce","video","academic","other"]);cp.enum;const up=ne(["cited","aspirational","wasted-surface"]),kb=up.enum;kb.cited,kb.aspirational;const Sc=ne(["direct-competitor","ota-aggregator","editorial-media","other","unknown"]),YO=Sc.enum;YO["direct-competitor"];const xc=ne(["queued","seeding","probing","completed","failed"]);xc.enum;const E0=w({domain:p().min(1),hits:y().int().positive(),competitorType:Sc.default("unknown")}),XO=w({id:p(),sessionId:p(),projectId:p(),query:p(),bucket:up.nullable().default(null),citationState:Ai,citedDomains:A(p()).default([]),answerMentioned:re().nullable().default(null),createdAt:p()}),FO=w({id:p(),projectId:p(),status:xc,icpDescription:p().nullable().optional(),seedProvider:p().nullable().optional(),seedCountRaw:y().int().nullable().optional(),seedCount:y().int().nullable().optional(),seedFromAnswerCount:y().int().nullable().optional(),seedFromGroundingCount:y().int().nullable().optional(),seedBrandFilteredCount:y().int().nullable().optional(),buyerDescription:p().nullable().optional(),locations:A(vc).nullable().optional(),seedRawCandidates:A(p()).nullable().optional(),dedupClusterMinSims:A(y()).nullable().optional(),dedupBandPairFraction:y().nullable().optional(),dedupPairsTotal:y().int().nullable().optional(),seedProviders:A(p()).nullable().optional(),seedProviderCounts:rt(p(),y().int()).nullable().optional(),canonicalCount:y().int().nullable().optional(),dedupThreshold:y().nullable().optional(),probeCount:y().int().nullable().optional(),citedCount:y().int().nullable().default(null),aspirationalCount:y().int().nullable().default(null),wastedCount:y().int().nullable().default(null),competitorMap:A(E0).default([]),warning:p().nullable().optional(),error:p().nullable().optional(),startedAt:p().nullable().optional(),finishedAt:p().nullable().optional(),createdAt:p()});FO.extend({probes:A(XO).default([])});const JO=500,WO=8,ez=["gemini","openai"],tz=ne(ez);w({icpDescription:p().min(1).optional(),buyerDescription:p().min(1).optional(),seedProviders:A(tz).min(1).transform(e=>[...new Set(e)].sort()).optional(),dedupThreshold:y().min(0).max(1).optional(),maxProbes:y().int().positive().max(JO).optional(),probeConcurrency:y().int().min(1).max(WO).optional(),locations:A(p().min(1)).optional()});w({buckets:A(up).min(1).optional(),includeCompetitors:re().optional(),competitorTypes:A(Sc).min(1).optional()});w({sessionId:p(),projectId:p(),status:xc,queriesByBucket:w({cited:A(p()),aspirational:A(p()),"wasted-surface":A(p())}),suggestedCompetitors:A(E0)});w({sessionId:p(),projectId:p(),promoted:w({queries:A(p()),competitors:A(p())}),skipped:w({queries:A(p()),competitors:A(p())})});bc([vt("cli"),p().regex(/^discovery:.+$/)]);const nz=w({query:p().min(1),probeHits:y().int().positive()}),az=w({rawCandidates:y().int().nonnegative(),admitted:y().int().nonnegative(),rejected:w({belowFloor:y().int().nonnegative(),length:y().int().nonnegative(),navigational:y().int().nonnegative(),duplicate:y().int().nonnegative(),offAnchor:y().int().nonnegative(),semanticDuplicate:y().int().nonnegative()})});w({sessionId:p(),projectId:p(),provider:p(),status:xc,minProbeHits:y().int().positive(),anchorApplied:re(),semanticNoveltyApplied:re(),candidates:A(nz),stats:az});const dp=ne(["own","direct-competitor","ota-aggregator","editorial-media","other"]);dp.enum;const O0=ne(["7d","30d","90d","all"]),Ab=ne(["improving","declining","stable"]),iz=ne(["mentioned","cited"]);iz.enum;const Of=w({citationRate:y(),cited:y().int(),total:y().int(),mentionRate:y(),mentionedCount:y().int()}),sz=w({rate:y().nullable(),projectMentionSnapshots:y().int().nonnegative(),competitorMentionSnapshots:y().int().nonnegative()}),rz=w({startDate:p(),endDate:p(),citationRate:y(),cited:y().int(),total:y().int(),queryCount:y().int(),mentionRate:y(),mentionedCount:y().int(),mentionShare:sz,byProvider:rt(p(),Of)}),oz=w({date:p(),delta:y().int(),label:p()});w({window:O0,buckets:A(rz),overall:Of,byProvider:rt(p(),Of),trend:Ab,mentionTrend:Ab,queryChanges:A(oz)});const _b=w({category:cp,label:p(),count:y().int(),percentage:y(),topDomains:A(w({domain:p(),count:y().int()}))}),lz=w({domain:p(),count:y().int(),percentage:y(),category:cp,label:p(),surfaceClass:dp}),cz=w({surfaceClass:dp,label:p(),count:y().int(),percentage:y(),domainCount:y().int()}),Cb=w({totalCitedSlots:y().int(),domainTotal:y().int(),entries:A(lz),truncatedDomainCount:y().int(),truncatedCitedSlots:y().int(),bySurfaceClass:A(cz)});w({overall:A(_b),byQuery:rt(p(),A(_b)),ranked:Cb,byProvider:rt(p(),Cb),runId:p(),window:O0,limit:y().int().nullable()});const fp=w({total:y().int(),checked:y().int(),mentioned:y().int(),cited:y().int(),mentionRate:y().nullable(),citedRate:y().nullable()}),z0=fp.extend({provider:p(),firstObserved:p(),lastObserved:p()}),uz=fp.extend({queryId:p().nullable(),query:p(),firstObserved:p(),lastObserved:p(),providers:A(z0).optional()}),dz=w({since:p().nullable(),until:p().nullable(),lastRuns:y().int().nullable(),runCount:y().int()}),fz=ne(["provider"]),pz=w({domain:p(),mentions:y().int()}),mz=w({percent:y().nullable(),projectMentions:y().int(),competitorMentions:y().int(),snapshotsWithAnswerText:y().int(),perCompetitor:A(pz)});w({project:p(),groupBy:fz.optional(),window:dz,totals:fp,byProvider:A(z0).optional(),queries:A(uz),shareOfVoice:mz.optional()});w({id:p(),projectId:p(),propertyId:p(),clientEmail:p(),connected:re(),createdAt:p(),updatedAt:p()});w({date:p(),landingPage:p(),sessions:y(),organicSessions:y(),users:y()});const pp=ne(["session","first_user","manual_utm"]),hz=w({source:p(),medium:p(),sessions:y(),users:y(),sourceDimension:pp}),gz=w({source:p(),medium:p(),sourceDimension:pp,landingPage:p(),sessions:y(),users:y()}),yz=w({source:p(),medium:p(),sessions:y(),users:y(),channelGroup:p()}),Zr=w({sessions:y(),sharePct:y(),sharePctDisplay:p()}),bz=w({organic:Zr,social:Zr,direct:Zr,ai:Zr,other:Zr});w({totalSessions:y(),totalOrganicSessions:y(),totalDirectSessions:y(),totalUsers:y(),topPages:A(w({landingPage:p(),sessions:y(),organicSessions:y(),directSessions:y(),users:y()})),aiReferrals:A(hz),aiReferralLandingPages:A(gz),aiSessionsDeduped:y(),aiUsersDeduped:y(),aiSessionsBySession:y(),aiUsersBySession:y(),socialReferrals:A(yz),socialSessions:y(),socialUsers:y(),channelBreakdown:bz,organicSharePct:y(),aiSharePct:y(),aiSharePctBySession:y(),directSharePct:y(),socialSharePct:y(),organicSharePctDisplay:p(),aiSharePctDisplay:p(),aiSharePctBySessionDisplay:p(),directSharePctDisplay:p(),socialSharePctDisplay:p(),otherSessions:y(),otherSharePct:y(),otherSharePctDisplay:p(),lastSyncedAt:p().nullable()});w({connected:re(),propertyId:p().nullable(),clientEmail:p().nullable(),authMethod:ne(["service-account","oauth"]).nullable(),lastSyncedAt:p().nullable(),createdAt:p().nullable().optional(),updatedAt:p().nullable().optional()});w({synced:re(),rowCount:y().int().nonnegative(),aiReferralCount:y().int().nonnegative(),socialReferralCount:y().int().nonnegative(),days:y().int().nonnegative(),syncedAt:p(),syncedComponents:A(p()).optional()});w({date:p(),source:p(),medium:p(),landingPage:p(),sessions:y(),users:y(),sourceDimension:pp});w({date:p(),source:p(),medium:p(),sessions:y(),users:y(),channelGroup:p()});w({date:p(),sessions:y(),organicSessions:y(),users:y()});function lc(e){return e.toLowerCase().replace(/[^a-z0-9]/g,"")}const D0=ne(["claude","openai","gemini","zai","deepinfra"]),vz=w({id:D0,label:p(),defaultModel:p(),configured:re(),keySource:ne(["config","env"]).nullable()});w({providers:A(vz).default([]),defaultProvider:D0.nullable()});const Sz=ne(["aero","user","compaction"]);Sz.enum;const R0=128;w({key:p().min(1).max(R0),value:p().min(1)});w({key:p().min(1).max(R0)});const Ys=ne(["commoncrawl","bing-webmaster"]);Ys.enum;const mp=ne(["queued","downloading","querying","ready","failed"]);mp.enum;w({id:p(),release:p(),status:mp,phaseDetail:p().nullable().optional(),vertexPath:p().nullable().optional(),edgesPath:p().nullable().optional(),vertexSha256:p().nullable().optional(),edgesSha256:p().nullable().optional(),vertexBytes:y().int().nullable().optional(),edgesBytes:y().int().nullable().optional(),projectsProcessed:y().int().nullable().optional(),domainsDiscovered:y().int().nullable().optional(),downloadStartedAt:p().nullable().optional(),downloadFinishedAt:p().nullable().optional(),queryStartedAt:p().nullable().optional(),queryFinishedAt:p().nullable().optional(),error:p().nullable().optional(),createdAt:p(),updatedAt:p()});const xz=w({linkingDomain:p(),numHosts:y().int(),source:Ys}),wz=w({projectId:p(),release:p(),targetDomain:p(),totalLinkingDomains:y().int(),totalHosts:y().int(),top10HostsShare:p(),queriedAt:p(),source:Ys,excludedLinkingDomains:y().int().optional(),excludedHosts:y().int().optional()});w({source:Ys,summary:wz.nullable(),total:y().int(),rows:A(xz)});w({release:p(),totalLinkingDomains:y().int(),totalHosts:y().int(),top10HostsShare:p(),queriedAt:p(),source:Ys});const jz=w({source:Ys,connected:re(),hasData:re(),latestRelease:p().nullable(),totalLinkingDomains:y().int(),lastSyncedAt:p().nullable()});w({projectId:p(),targetDomain:p(),sources:A(jz),anyConnected:re(),anyData:re()});w({duckdbInstalled:re(),duckdbVersion:p().nullable().optional(),duckdbSpec:p(),pluginDir:p()});w({installed:re(),version:p(),path:p(),alreadyPresent:re()});w({release:p(),vertexUrl:p(),edgesUrl:p(),vertexBytes:y().int().nullable(),edgesBytes:y().int().nullable(),lastModified:p().nullable()});w({release:p(),syncStatus:mp.nullable(),bytes:y().int(),lastUsedAt:p().nullable()});const hp=ne(["positive","caution","negative","neutral"]),Za=w({label:p(),value:p(),delta:p(),tone:hp,description:p(),tooltip:p().optional(),trend:A(y()),progress:y().optional(),providerCoverage:p().optional()}),Nz=Za.extend({breakdown:w({projectMentionSnapshots:y().int().nonnegative(),competitorMentionSnapshots:y().int().nonnegative(),perCompetitor:A(w({domain:p(),mentionSnapshots:y().int().nonnegative(),shareOfCompetitiveTotal:y()})),snapshotsWithAnswerText:y().int().nonnegative(),snapshotsTotal:y().int().nonnegative()})}),uf=w({gained:y().int().nonnegative(),lost:y().int().nonnegative(),tone:hp,hasPreviousRun:re(),gainedQueries:A(p()).optional(),lostQueries:A(p()).optional()}),kz=w({hasPreviousRun:re(),comparable:re(),querySetChanged:re(),previousRunAt:p().nullable(),currentQueryCount:y().int().nonnegative(),previousQueryCount:y().int().nonnegative(),comparableQueryCount:y().int().nonnegative(),addedQueryCount:y().int().nonnegative(),removedQueryCount:y().int().nonnegative(),addedQueries:A(p()),removedQueries:A(p())}),Az=w({id:p(),projectId:p(),runId:p().nullable(),type:ne(["regression","gain","opportunity","first-citation","provider-pickup","persistent-gap","competitor-gained","competitor-lost","gbp-lodging-gap","gbp-listing-discrepancy","gbp-cta-gap","gbp-description-missing","gbp-metric-drop","gbp-keyword-drop"]),severity:ne(["critical","high","medium","low"]),title:p(),query:p(),provider:p(),recommendation:w({action:p(),target:p().optional(),reason:p()}).optional(),cause:w({cause:p(),competitorDomain:p().optional(),details:p().optional()}).optional(),dismissed:re(),createdAt:p()}),_z=w({id:p(),projectId:p(),runId:p().nullable(),overallCitedRate:y(),overallMentionRate:y(),totalPairs:y().int().nonnegative(),citedPairs:y().int().nonnegative(),mentionedPairs:y().int().nonnegative(),providerBreakdown:rt(p(),w({citedRate:y(),mentionRate:y(),cited:y().int().nonnegative(),mentioned:y().int().nonnegative(),total:y().int().nonnegative()})),createdAt:p(),status:ne(["ready","no-data"]),reason:vt("no-runs-yet").optional()});w({project:$E,latestRun:MO,health:_z.nullable(),topInsights:A(Az),queryCounts:w({totalQueries:y().int().nonnegative(),citedQueries:y().int().nonnegative(),notCitedQueries:y().int().nonnegative(),citedRate:y(),mentionedQueries:y().int().nonnegative(),notMentionedQueries:y().int().nonnegative(),mentionRate:y()}),providers:A(w({provider:p(),citedRate:y(),cited:y().int().nonnegative(),total:y().int().nonnegative()})),transitions:w({since:p().nullable(),gained:y().int().nonnegative(),lost:y().int().nonnegative(),emerging:y().int().nonnegative()}),scores:w({mention:Za,visibility:Za,mentionShare:Nz,gapQueries:Za,mentionGaps:Za,indexCoverage:Za,competitorPressure:Za,runStatus:Za}),movementSummary:uf,citationMovement:uf,mentionMovement:uf,movementComparison:kz,competitors:A(w({id:p(),domain:p(),citationCount:y().int().nonnegative(),totalQueries:y().int().nonnegative(),pressureLabel:ne(["None","Low","Moderate","High"]),citedQueries:A(p())})),providerScores:A(w({provider:p(),model:p().nullable(),score:y(),cited:y().int().nonnegative(),total:y().int().nonnegative(),trend:A(y()).optional()})),attentionItems:A(w({id:p(),tone:hp,title:p(),detail:p(),actionLabel:p(),href:p()})),runHistory:A(w({runId:p(),createdAt:p(),citedCount:y().int().nonnegative(),totalCount:y().int().nonnegative(),citationRate:y(),mentionedCount:y().int().nonnegative(),mentionRate:y(),status:p()})),suggestedQueries:w({rows:A(w({query:p(),impressions:y(),clicks:y(),avgPosition:y(),reason:p()})),totalCandidates:y().int().nonnegative(),skippedAlreadyTracked:y().int().nonnegative()}),dateRangeLabel:p(),contextLabel:p()});ne(["snapshot","insight"]);const Cz=w({kind:vt("snapshot"),id:p(),runId:p(),query:p(),provider:p(),model:p().nullable(),citationState:Ai,matchedField:ne(["answerText","citedDomains","searchQueries","query"]),snippet:p(),createdAt:p()}),Tz=w({kind:vt("insight"),id:p(),runId:p().nullable(),type:ne(["regression","gain","opportunity","first-citation","provider-pickup","persistent-gap","competitor-gained","competitor-lost","gbp-lodging-gap","gbp-listing-discrepancy","gbp-cta-gap","gbp-description-missing","gbp-metric-drop","gbp-keyword-drop"]),severity:ne(["critical","high","medium","low"]),title:p(),query:p(),provider:p(),matchedField:ne(["title","query","recommendation","cause"]),snippet:p(),dismissed:re(),createdAt:p()}),Ez=h0("kind",[Cz,Tz]);w({query:p(),totalHits:y().int().nonnegative(),truncated:re(),hits:A(Ez)});const M0=ne(["create","expand","refresh","add-schema"]);M0.enum;function I5(e){switch(e){case"create":return"Create";case"expand":return"Expand";case"refresh":return"Refresh";case"add-schema":return"Add schema"}}const B0=ne(["gsc","competitor-evidence","both"]);B0.enum;const L0=ne(["high","medium","low"]);L0.enum;const Oz=ne(["blog-post","comparison","listicle","how-to","guide","glossary"]);Oz.enum;const q0=ne(["proposed","briefed","payload-generated","draft-created","published","validated","dismissed"]);q0.enum;const gp=ne(["ownable","ceded"]);gp.enum;const zz=w({url:p(),gscImpressions:y().nonnegative(),gscClicks:y().nonnegative(),gscAvgPosition:y().nonnegative().nullable(),organicSessions:y().nonnegative()}),Dz=w({domain:p(),url:p(),title:p(),citationCount:y().int().nonnegative()}),Rz=w({demand:y(),competitor:y(),absence:y(),gapSeverity:y()}),Mz=w({actionId:p(),state:q0,lastUpdated:p()}),U0=w({targetRef:p(),query:p(),action:M0,ourBestPage:zz.nullable(),winningCompetitor:Dz.nullable(),score:y(),scoreBreakdown:Rz,drivers:A(p()),demandSource:B0,actionConfidence:L0,existingAction:Mz.nullable(),winnabilityClass:gp,winnability:y().min(0).max(1).nullable()});w({targets:A(U0),contextMetrics:w({totalAiReferralSessions:y().int().nonnegative(),latestRunId:p(),runTimestamp:p()})});const Bz=w({targetRef:p(),addressedUrl:p().nullable(),note:p().nullable(),dismissedAt:p()});w({dismissals:A(Bz)});w({targetRef:p().min(1),addressedUrl:p().url().optional(),note:p().max(500).optional()});w({targetRef:p(),promptVersion:p(),provider:p(),model:p(),responseText:p(),costMillicents:y().int().nonnegative(),generatedAt:p()});w({provider:p().optional(),model:p().optional(),forceRefresh:re().optional()});const Lz=w({targetQuery:p().trim().min(1),winnabilityClass:gp,angle:p().trim().min(1),whyWinnable:p().trim().min(1),schemaHookup:p().trim().min(1),controllableSurfaceRationale:p().trim().min(1)});w({targetRef:p(),promptVersion:p(),provider:p(),model:p(),brief:Lz,costMillicents:y().int().nonnegative(),generatedAt:p()});const qz=w({domain:p(),competitorType:Sc,hits:y().int().nonnegative(),updatedAt:p()});w({classifications:A(qz)});const Uz=w({uri:p(),title:p(),domain:p(),isOurDomain:re(),isCompetitor:re(),citationCount:y().int().nonnegative(),providers:A(ya)}),$0=w({query:p(),groundingSources:A(Uz)});w({sources:A($0),latestRunId:p()});const V0=w({query:p(),competitorDomains:A(p()),competitorCount:y().int().nonnegative(),missRate:y().min(0).max(1),lastSeenInRunId:p()});w({gaps:A(V0),latestRunId:p()});const I0=ne(["ok","warn","fail","skipped"]);I0.enum;const yp=ne(["global","project"]);yp.enum;const P0=ne(["auth","config","providers","integrations","database","schedules","agent"]);P0.enum;const $z=w({id:p(),category:P0,scope:yp,title:p(),status:I0,code:p().describe('Stable machine-readable code (e.g. "google.token.refresh-failed"). Use this for filtering and remediation logic.'),summary:p(),remediation:p().nullable().optional().describe('Operator-facing next step. Null when status is "ok" or no specific remediation applies.'),details:rt(p(),Ln()).optional().describe("Structured context — principal email, redirect URI, missing scopes, etc. Stable per check id."),durationMs:y().int().nonnegative().describe("How long the check took to execute.")});w({scope:yp,project:p().nullable().describe('Project name when scope is "project", null otherwise.'),generatedAt:p().describe("ISO-8601 timestamp when this doctor run started."),durationMs:y().int().nonnegative(),summary:w({total:y().int().nonnegative(),ok:y().int().nonnegative(),warn:y().int().nonnegative(),fail:y().int().nonnegative(),skipped:y().int().nonnegative()}),checks:A($z)});const Vz=w({provider:p(),citationState:Ai,cited:re(),mentioned:re(),runId:p(),runCreatedAt:p()}),Iz=w({queryId:p(),query:p(),providers:A(Vz),citedCount:y().int().nonnegative(),mentionedCount:y().int().nonnegative(),totalProviders:y().int().nonnegative()}),Pz=w({queryId:p(),query:p(),provider:p(),citingCompetitors:A(p()),runId:p(),runCreatedAt:p()}),Gz=w({providersConfigured:y().int().nonnegative(),providersCiting:y().int().nonnegative(),providersMentioning:y().int().nonnegative(),totalQueries:y().int().nonnegative(),queriesCitedAndMentioned:y().int().nonnegative(),queriesCitedOnly:y().int().nonnegative(),queriesMentionedOnly:y().int().nonnegative(),queriesInvisible:y().int().nonnegative(),latestRunId:p().nullable(),latestRunAt:p().nullable()});w({summary:Gz,byQuery:A(Iz),competitorGaps:A(Pz),status:ne(["ready","no-data"]),reason:ne(["no-runs-yet","no-queries"]).optional()});const P5=[7,14,30,90],G5=30;bc([vt(7),vt(14),vt(30),vt(90)]).describe("Report window in days (7, 14, 30, or 90). Defaults to 30 when omitted.");const Hz=ne(["prompt","request-param","browser-geo","ignored"]),Qz=w({label:p(),city:p(),region:p(),country:p(),otherConfiguredLabels:A(p())}),Kz=w({provider:p(),treatment:Hz,description:p()}),Zz=w({generatedAt:p(),project:w({id:p(),name:p(),displayName:p(),canonicalDomain:p(),country:p(),language:p()}),location:Qz.nullable(),providerLocationHandling:A(Kz),periodStart:p().nullable(),periodEnd:p().nullable(),periodDays:y().int().positive()}),Yz=w({citationRate:y(),citedQueryCount:y(),totalQueryCount:y(),mentionRate:y(),mentionedQueryCount:y(),trend:ne(["up","down","flat","unknown"]),queryCount:y(),competitorCount:y(),providerCount:y(),gsc:w({clicks:y(),impressions:y(),ctr:y(),avgPosition:y(),periodStart:p(),periodEnd:p()}).nullable(),ga:w({sessions:y(),users:y(),periodStart:p(),periodEnd:p()}).nullable(),findings:A(w({title:p(),detail:p(),tone:ne(["positive","caution","negative","neutral"])}))}),Xz=w({citationState:ne(["cited","not-cited","pending"]),answerMentioned:re().nullable(),model:p().nullable()}),Fz=w({queries:A(p()),providers:A(p()),matrix:A(A(Xz.nullable())),providerRates:A(w({provider:p(),citedCount:y(),mentionedCount:y(),totalCount:y(),citationRate:y(),mentionRate:y()}))}),Jz=w({domain:p(),citationCount:y(),totalCount:y(),pressureLabel:ne(["High","Moderate","Low","None"]),citedQueries:A(p()),sharePct:y(),theirCitedPages:A(w({url:p(),citedFor:A(p())}))}),Wz=w({projectCitationCount:y(),competitors:A(Jz)}),eD=w({domain:p(),mentionCount:y(),totalCount:y(),pressureLabel:ne(["High","Moderate","Low","None"]),mentionedQueries:A(p()),sharePct:y()}),tD=w({projectMentionCount:y(),totalAnswerSnapshots:y(),competitors:A(eD)}),nD=w({category:p(),label:p(),count:y(),sharePct:y()}),aD=w({categories:A(nD),topDomains:A(w({domain:p(),count:y(),isCompetitor:re()}))}),iD=w({query:p(),clicks:y(),impressions:y(),ctr:y(),avgPosition:y(),category:ne(["brand","lead-gen","industry","other"])}),sD=w({periodStart:p(),periodEnd:p(),totalClicks:y(),totalImpressions:y(),ctr:y(),avgPosition:y(),topQueries:A(iD),categoryBreakdown:A(w({category:ne(["brand","lead-gen","industry","other"]),clicks:y(),impressions:y(),sharePct:y()})),trend:A(w({date:p(),clicks:y(),impressions:y()})),trackedButNoGsc:A(p()),gscButNotTracked:A(p())}),rD=w({totalSessions:y(),totalUsers:y(),totalOrganicSessions:y(),periodStart:p(),periodEnd:p(),topLandingPages:A(w({page:p(),sessions:y(),users:y(),organicSessions:y()})),channelBreakdown:A(w({channel:p(),sessions:y(),sharePct:y()}))}),oD=w({totalSessions:y(),organicSessions:y(),paidSessions:y(),channels:A(w({channelGroup:p(),sessions:y(),sharePct:y()})),topCampaigns:A(w({source:p(),medium:p(),sessions:y()}))}),lD=w({totalSessions:y(),totalUsers:y(),bySource:A(w({source:p(),sessions:y(),users:y(),sharePct:y()})),trend:A(w({date:p(),sessions:y()})),topLandingPages:A(w({page:p(),sessions:y(),users:y()}))}),cD=w({windowStart:p(),windowEnd:p(),hasData:re(),verifiedCrawlerHits:w({current:y(),prior:y(),deltaPct:y().nullable()}),unverifiedCrawlerHits:w({current:y(),prior:y(),deltaPct:y().nullable()}),aiUserFetchHits:w({current:y(),prior:y(),deltaPct:y().nullable()}),referralArrivals:w({current:y(),prior:y(),deltaPct:y().nullable()}),byOperator:A(w({operator:p(),verifiedHits:y(),unverifiedHits:y(),userFetchHits:y(),referralArrivals:y(),deltaPct:y().nullable()})),topCrawledPaths:A(w({path:p(),verifiedHits:y(),distinctOperators:y()})),referralProducts:A(w({product:p(),arrivals:y(),distinctLandingPaths:y()})),dailyTrend:A(w({date:p(),verifiedCrawlerHits:y(),userFetchHits:y(),referralArrivals:y()})),topReferralLandingPaths:A(w({path:p(),arrivals:y(),distinctProducts:y()}))}),uD=w({provider:ne(["google","bing"]).nullable(),total:y(),indexed:y(),notIndexed:y(),deindexed:y(),unknown:y(),indexedPct:y()}),dD=w({runId:p(),date:p(),citationRate:y(),citedQueryCount:y(),totalQueryCount:y(),mentionRate:y(),mentionedQueryCount:y(),providerRates:A(w({provider:p(),citationRate:y(),mentionRate:y()}))}),zf=w({id:p(),type:ne(["regression","gain","opportunity"]),severity:ne(["critical","high","medium","low"]),title:p(),query:p(),provider:p(),recommendation:p().nullable(),createdAt:p(),instanceCount:y()}),fD=w({horizon:ne(["immediate","short-term","medium-term"]),title:p(),rationale:p()}),As=w({current:y(),prior:y(),deltaAbs:y(),deltaPct:y().nullable(),direction:ne(["up","down","flat"]),window:y().optional()}),pD=w({provider:p(),current:y(),prior:y(),deltaAbs:y(),direction:ne(["up","down","flat"])}),mD=w({enoughHistory:re(),headline:p(),citationRate:As.nullable(),mentionRate:As.nullable(),citedQueryCount:As.nullable(),mentionedQueryCount:As.nullable(),gscClicksDelta:As.nullable(),aiReferralsDelta:As.nullable(),comparisonWindowDays:y().int().positive(),providerMovements:A(pD),wins:A(zf),regressions:A(zf)});ne(["agency","client"]);const hD=ne(["agency","client","both"]),gD=ne(["immediate","short-term","medium-term"]),yD=ne(["high","medium","low"]);ne(["positive","caution","negative","neutral"]);const bD=ne(["content","competitors","provider","search-demand","indexing","location","monitoring"]),bp=w({audience:hD,priority:y(),horizon:gD,category:bD,title:p(),action:p(),why:A(p()),evidence:A(p()),successMetric:p(),confidence:yD,targetRef:p().optional()}),vD=w({headline:p(),overview:p(),actionItems:A(bp),confidenceNotes:A(p())}),SD=w({title:p(),detail:p(),severity:ne(["positive","caution","negative","neutral"]),evidence:A(p())}),xD=w({priorities:A(bp),diagnostics:A(SD)});function H5(e){return e.horizon==="immediate"?"negative":e.confidence==="high"?"caution":e.confidence==="low"?"neutral":"caution"}function Q5(e){switch(e){case"critical":return"Critical";case"high":return"High";case"medium":return"Medium";case"low":return"Low"}}function K5(e){switch(e){case"immediate":return"Immediate";case"short-term":return"Short term";case"medium-term":return"Medium term"}}function Z5(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 Y5(e){switch(e){case"high":return"High";case"medium":return"Medium";case"low":return"Low"}}w({meta:Zz,executiveSummary:Yz,citationScorecard:Fz,competitorLandscape:Wz,mentionLandscape:tD,aiSourceOrigin:aD,gsc:sD.nullable(),ga:rD.nullable(),socialReferrals:oD.nullable(),aiReferrals:lD.nullable(),serverActivity:cD.nullable(),indexingHealth:uD.nullable(),citationsTrend:A(dD),whatsChanged:mD,insights:A(zf),recommendedNextSteps:A(fD),actionPlan:A(bp),clientSummary:vD,agencyDiagnostics:xD,contentOpportunities:A(U0),contentGaps:A(V0),groundingSources:A($0)});const wD=ne(["claude","codex"]);wD.enum;const jD=ne(["claude","codex","all"]);jD.enum;const G0=w({content:y().int().nonnegative(),sitemap:y().int().nonnegative(),robots:y().int().nonnegative(),asset:y().int().nonnegative(),other:y().int().nonnegative()}),ND=ne(["content","sitemap","robots","asset","other"]),vp=ne(["cloud-run","wordpress","cloudflare","vercel","generic-log"]);vp.enum;const kD=ne(["raw-request-events","aggregate-request-metrics","request-url","status-code","user-agent","remote-ip","referer","cursor-pull"]);kD.enum;const AD=ne(["raw-request","aggregate-bucket"]),_D=AD.enum,CD=ne(["observed","provider-aggregated","inferred"]),TD=CD.enum,ED=w({type:p().nullable(),labels:rt(p(),p())}),OD=w({sourceType:vp,evidenceKind:vt(_D["raw-request"]),confidence:vt(TD.observed),eventId:p().min(1),observedAt:p().min(1),method:p().nullable(),requestUrl:p().nullable(),host:p().nullable(),path:p().min(1),queryString:p().nullable(),status:y().int().nullable(),userAgent:p().nullable(),remoteIp:p().nullable(),referer:p().nullable(),latencyMs:y().nullable(),requestSizeBytes:y().int().nullable(),responseSizeBytes:y().int().nullable(),providerResource:ED,providerLabels:rt(p(),p())});w({events:A(OD),rawEntryCount:y().int().nonnegative(),skippedEntryCount:y().int().nonnegative(),nextPageToken:p().optional(),filter:p()});const H0=ne(["connected","paused","error","archived"]),X5=H0.enum,Q0=ne(["oauth","service-account"]);Q0.enum;const zD=ne(["verified","claimed_unverified","unknown_ai_like"]),F5=zD.enum;w({gcpProjectId:p().min(1),serviceName:p().nullable().optional(),location:p().nullable().optional(),authMode:Q0});w({baseUrl:p().url(),username:p().min(1)});const Sp=ne(["production","preview"]);Sp.enum;w({projectId:p().min(1),teamId:p().min(1),environment:Sp});const K0=w({id:p(),projectId:p(),sourceType:vp,displayName:p(),status:H0,lastSyncedAt:p().nullable(),lastCursor:p().nullable(),lastError:p().nullable(),archivedAt:p().nullable(),config:rt(p(),Ln()),createdAt:p(),updatedAt:p()});w({gcpProjectId:p().min(1),serviceName:p().min(1).optional(),location:p().min(1).optional(),displayName:p().min(1).optional(),keyJson:p().optional()});w({baseUrl:p().url(),username:p().min(1),applicationPassword:p().min(1),displayName:p().min(1).optional()});w({projectId:p().min(1),teamId:p().min(1),token:p().min(1),environment:Sp.optional(),displayName:p().min(1).optional()});w({sourceId:p(),runId:p(),syncedAt:p(),pulledEvents:y().int().nonnegative(),selfTrafficExcluded:y().int().nonnegative(),crawlerHits:y().int().nonnegative(),aiUserFetchHits:y().int().nonnegative(),aiReferralHits:y().int().nonnegative(),unknownHits:y().int().nonnegative(),crawlerBucketRows:y().int().nonnegative(),aiUserFetchBucketRows:y().int().nonnegative(),aiReferralBucketRows:y().int().nonnegative(),sampleRows:y().int().nonnegative(),windowStart:p(),windowEnd:p()});w({days:y().int().positive().optional()});w({advanceToNow:vt(!0)});w({sourceId:p(),runId:p(),status:Zs,windowStart:p(),windowEnd:p(),daysRequested:y().int().positive(),daysApplied:y().int().positive()});const DD=w({crawlerHits:y().int().nonnegative(),crawlerContentHits:y().int().nonnegative(),crawlerInfraHits:y().int().nonnegative(),crawlerSegments:G0,aiUserFetchHits:y().int().nonnegative(),aiReferralHits:y().int().nonnegative(),sampleCount:y().int().nonnegative()});w({sources:A(K0)});const RD=K0.extend({totals24h:DD,latestRun:w({runId:p(),status:Zs,startedAt:p().nullable(),finishedAt:p().nullable(),error:p().nullable()}).nullable()});w({sources:A(RD)});const MD=ne(["crawler","ai-user-fetch","ai-referral"]),xp=MD.enum,BD=w({kind:vt(xp.crawler),sourceId:p(),tsHour:p(),botId:p(),operator:p(),verificationStatus:p(),pathNormalized:p(),pathClass:ND,status:y().int(),hits:y().int().nonnegative()}),LD=w({kind:vt(xp["ai-user-fetch"]),sourceId:p(),tsHour:p(),botId:p(),operator:p(),verificationStatus:p(),pathNormalized:p(),status:y().int(),hits:y().int().nonnegative()}),qD=w({kind:vt(xp["ai-referral"]),sourceId:p(),tsHour:p(),product:p(),operator:p(),sourceDomain:p(),evidenceType:p(),landingPathNormalized:p(),status:y().int(),hits:y().int().nonnegative()}),UD=h0("kind",[BD,LD,qD]);w({windowStart:p(),windowEnd:p(),totals:w({crawlerHits:y().int().nonnegative(),crawlerContentHits:y().int().nonnegative(),crawlerInfraHits:y().int().nonnegative(),crawlerSegments:G0,aiUserFetchHits:y().int().nonnegative(),aiReferralHits:y().int().nonnegative()}),events:A(UD)});w({apiKey:p().min(1)});w({connected:re(),adAccountId:p().nullable().optional(),displayName:p().nullable().optional(),currencyCode:p().nullable().optional(),timezone:p().nullable().optional(),status:p().nullable().optional(),lastSyncedAt:p().nullable().optional(),conversionTrackingConfigured:re().optional()});w({disconnected:re()});w({runId:p(),status:p()});const $D=w({type:p().nullable().optional(),title:p().nullable().optional(),body:p().nullable().optional(),targetUrl:p().nullable().optional()}),VD=w({id:p(),adGroupId:p(),name:p(),status:p(),reviewStatus:p().nullable().optional(),creative:$D.nullable().optional()}),ID=w({id:p(),campaignId:p(),name:p(),status:p(),billingEventType:p().nullable().optional(),maxBidMicros:y().int().nullable().optional(),contextHints:A(p()).default([]),ads:A(VD).default([])}),PD=w({id:p(),name:p(),status:p(),biddingType:p().nullable().optional(),dailySpendLimitMicros:y().int().nullable().optional(),lifetimeSpendLimitMicros:y().int().nullable().optional(),adGroups:A(ID).default([])});w({campaigns:A(PD)});const Z0=ne(["campaign","ad_group"]);Z0.enum;const GD=w({level:Z0,entityId:p(),date:p(),impressions:y().int(),clicks:y().int(),spendMicros:y().int(),conversions:y().int(),ctr:y().nullable(),cpcMicros:y().int().nullable()});w({rows:A(GD),currencyCode:p().nullable().optional()});const HD=w({impressions:y().int(),clicks:y().int(),spendMicros:y().int(),conversions:y().int(),ctr:y().nullable(),cpcMicros:y().int().nullable()});w({connected:re(),displayName:p().nullable().optional(),currencyCode:p().nullable().optional(),lastSyncedAt:p().nullable().optional(),campaignCount:y().int(),adGroupCount:y().int(),adCount:y().int(),window:w({from:p().nullable(),to:p().nullable()}),totals:HD});var QD=(e=>(e.Clicks="clicks",e.Impressions="impressions",e.CTR="ctr",e.Position="position",e))(QD||{});const J5={clicks:"Clicks",impressions:"Impressions",ctr:"CTR",position:"Position"},W5={clicks:"Clicks",impressions:"Impr",ctr:"CTR",position:"Pos"},e6=op;function KD(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 HD(e){return e.split("-").map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join(" ")}function X5(e){if(!e)return"—";try{return new Date(e).toLocaleString()}catch{return e}}function J5(e){return e===null?"Unknown":e?"Pass":"Fail"}function Tb(e){return e===0?"12:00 AM":e<12?`${e}:00 AM`:e===12?"12:00 PM":`${e-12}:00 PM`}function F5(e,n){return e==="twice-daily"?"twice-daily":e.startsWith("weekly@")?`${e}@${n}`:`daily@${n}`}function W5(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 e6(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 ${Tb(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"},h=c[2]?parseInt(c[2]):6;return`Every ${d[c[1]]} at ${Tb(h)} · ${r}`}return`${e} · ${r}`}function QD(e,n){return n&&n!==e?`${e} · ${n}`:e}function t6(){const e=Intl.DateTimeFormat().resolvedOptions().timeZone,n=new Intl.DateTimeFormat("en-US",{timeZoneName:"short"}).formatToParts().find(i=>i.type==="timeZoneName")?.value;return QD(e,n)}function KD(e){const n=e.replace(/\/+$/,"")||"/";return n==="/"?"overview":n==="/projects"?"projects":n.startsWith("/projects/")?"project":n==="/runs"?"runs":n==="/traffic"||n.startsWith("/traffic/")?"traffic":n==="/backlinks"?"backlinks":n==="/settings"?"settings":n==="/setup"?"setup":"other"}function ZD(e,n){return!n||n.includes(e)}function n6(e,n){return ZD(e,n)||!n||n.length===0?e:n.includes("overview")?"overview":n[0]}const YD={bg:"--canonry-embed-bg",fg:"--canonry-embed-fg"},XD=/^(?:#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})|rgba?\([0-9.,%\s/]+\)|hsla?\([0-9.,%\s/a-z]+\))$/i;function JD(e){if(!e)return{};const n={};for(const[i,r]of Object.entries(e)){const l=YD[i];if(!l||typeof r!="string")continue;const c=r.trim();XD.test(c)&&(n[l]=c)}return n}const _e=(e,n,i,r)=>{const l={_id:e,baseUrl:n?.baseUrl||(n?.client??H).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]},FD=e=>_e("getApiV1ProjectsByName",e),WD=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await jv({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:FD(e)}),Oi=e=>_e("getApiV1Projects",e),wc=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await lj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:Oi(e)}),e4=e=>_e("getApiV1ProjectsByNameRuns",e),t4=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Nv({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:e4(e)}),wp=e=>_e("getApiV1Runs",e),K0=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await wj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:wp(e)}),n4=e=>_e("getApiV1RunsById",e),Z0=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await kv({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:n4(e)}),a4=e=>_e("getApiV1Settings",e),i4=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Av({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:a4(e)}),s4=e=>_e("getApiV1ProjectsByNameGoogleConnections",e),a6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Uj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:s4(e)}),r4=e=>_e("getApiV1ProjectsByNameGoogleProperties",e),i6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Ij({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:r4(e)}),o4=e=>_e("getApiV1ProjectsByNameGoogleGscPerformance",e),s6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Qj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:o4(e)}),l4=e=>_e("getApiV1ProjectsByNameGoogleGscPerformanceDaily",e),r6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Kj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:l4(e)}),c4=e=>_e("getApiV1ProjectsByNameGoogleGscInspections",e),o6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Yj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:c4(e)}),u4=e=>_e("getApiV1ProjectsByNameGoogleGscDeindexed",e),l6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Xj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:u4(e)}),d4=e=>_e("getApiV1ProjectsByNameGoogleGscCoverage",e),c6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await _v({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:d4(e)}),f4=e=>_e("getApiV1ProjectsByNameGoogleGscCoverageHistory",e),u6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Jj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:f4(e)}),d6=e=>_e("getApiV1ProjectsByNameGoogleGscSitemaps",e),p4=e=>_e("getApiV1ProjectsByNameGbpLocations",e),f6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await nN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:p4(e)}),p6=e=>({mutationFn:async i=>{const{data:r}=await aN({...e,...i,throwOnError:!0});return r}}),m6=e=>({mutationFn:async i=>{const{data:r}=await iN({...e,...i,throwOnError:!0});return r}}),m4=e=>_e("getApiV1ProjectsByNameGbpKeywords",e),h6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await sN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:m4(e)}),h4=e=>_e("getApiV1ProjectsByNameGbpPlaceActions",e),g6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await rN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:h4(e)}),g4=e=>_e("getApiV1ProjectsByNameGbpLodging",e),y6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await oN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:g4(e)}),y4=e=>_e("getApiV1ProjectsByNameGbpPlaces",e),b6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await lN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:y4(e)}),b4=e=>_e("getApiV1ProjectsByNameGbpSummary",e),v6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await cN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:b4(e)}),v4=e=>_e("getApiV1ProjectsByNameBingStatus",e),S6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await fN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:v4(e)}),S4=e=>_e("getApiV1ProjectsByNameBingSites",e),x6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await pN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:S4(e)}),x4=e=>_e("getApiV1ProjectsByNameBingCoverage",e),w6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Cv({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:x4(e)}),w4=e=>_e("getApiV1ProjectsByNameBingInspections",e),j6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await hN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:w4(e)}),j4=e=>_e("getApiV1ProjectsByNameBingPerformance",e),N6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await vN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:j4(e)}),N4=e=>_e("getApiV1ProjectsByNameGaStatus",e),k6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await wN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:N4(e)}),k4=e=>_e("getApiV1ProjectsByNameGaTraffic",e),A6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await NN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:k4(e)}),A4=e=>_e("getApiV1ProjectsByNameGaAiReferralHistory",e),_6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await kN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:A4(e)}),_4=e=>_e("getApiV1ProjectsByNameGaSocialReferralHistory",e),C6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await AN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:_4(e)}),C4=e=>_e("getApiV1ProjectsByNameGaSessionHistory",e),T6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await _N({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:C4(e)}),T4=e=>_e("getApiV1ProjectsByNameReport",e),E6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await TN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:T4(e)}),E4=e=>_e("getApiV1ProjectsByNameCitationsVisibility",e),O6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await EN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:E4(e)}),O4=e=>_e("getApiV1ProjectsByNameTrafficSources",e),z6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await FN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:O4(e)}),z4=e=>_e("getApiV1ProjectsByNameTrafficStatus",e),D6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await WN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:z4(e)}),D4=e=>_e("getApiV1ProjectsByNameTrafficSourcesById",e),R6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await ek({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:D4(e)}),R4=e=>_e("getApiV1ProjectsByNameTrafficEvents",e),M6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await tk({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:R4(e)}),M4=e=>_e("getApiV1ProjectsByNameDiscoverSessions",e),B6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await ak({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:M4(e)}),B4=e=>_e("getApiV1ProjectsByNameDiscoverSessionsById",e),L6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await ik({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:B4(e)}),L4=e=>_e("getApiV1ProjectsByNameDiscoverSessionsByIdPromote",e),q6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await sk({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:L4(e)}),q4=e=>_e("getApiV1ProjectsByNameTechnicalAeo",e),U6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await ok({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:q4(e)}),U4=e=>_e("getApiV1ProjectsByNameTechnicalAeoPages",e),$6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await lk({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:U4(e)}),$4=e=>_e("getApiV1ProjectsByNameTechnicalAeoTrend",e),V6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await ck({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:$4(e)}),V4=e=>_e("getApiV1ProjectsByNameAgentProviders",e),I4=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await dk({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:V4(e)});function Eb(e){return e.state==="ok"?"positive":e.state==="checking"?"neutral":"negative"}function Y0(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 I6(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 P6(e){return e==="High"?"negative":e==="Moderate"?"caution":"neutral"}const G6={positive:"text-positive-400",caution:"text-caution-400",negative:"text-negative-400",neutral:"text-secondary"};function P4(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 G4(e,n,i){return e.map(r=>{if(r.id==="api")return{...r,tone:Eb(n.apiStatus),detail:n.apiStatus.state==="ok"?"Healthy":"Needs attention",meta:n.apiStatus.detail};if(r.id==="worker")return{...r,tone:Eb(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,h=i.providerStatuses.filter(g=>g.state==="ready").map(g=>P4(g)).join(" · ");return{...r,label:"Providers",tone:d?"positive":"caution",detail:`${l} of ${c} configured`,meta:h||"None configured"}})}function H4(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 Q4(e,n,i){const r=H4(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(h=>h.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 X0="canonry.run-tracker",Df=new Set;let Ob=!1,K4=0,jc={runs:{},batches:{}};function Z4(){const e=_i();for(const n of Df)n(e)}function Y4(e){if(!e)return{runs:{},batches:{}};try{const n=JSON.parse(e);return{runs:n.runs??{},batches:n.batches??{}}}catch{return{runs:{},batches:{}}}}function X4(){typeof window>"u"||window.sessionStorage.setItem(X0,JSON.stringify(jc))}function J0(){Ob||(Ob=!0,!(typeof window>"u")&&(jc=Y4(window.sessionStorage.getItem(X0))))}function Nc(e){jc=e,X4(),Z4()}function _i(){return J0(),jc}function J4(e){return J0(),Df.add(e),()=>{Df.delete(e)}}function F0(e){const n=_i();Nc({...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",trackedAt:e.trackedAt??Date.now()}}})}function df(e){const n=_i();if(!n.runs[e])return;const{[e]:i,...r}=n.runs;Nc({...n,runs:r})}function F4(e){const n=_i(),i=`batch_${Date.now()}_${++K4}`;return Nc({...n,batches:{...n.batches,[i]:{batchId:i,runIds:e.runIds,queuedCount:e.queuedCount,skippedCount:e.skippedCount}}}),i}function W4(e){const n=_i();if(!n.batches[e])return;const{[e]:i,...r}=n.batches;Nc({...n,batches:r})}function eR(e){return e==="completed"||e==="partial"||e==="failed"||e==="cancelled"}const tR=10*6e4;function nR(e,n,i,r){return e.filter(l=>!n.has(l.runId)&&i-(l.trackedAt??0)>=r)}function aR(e,n){let i=0,r=0,l=0,c=0,d=0;for(const h of e){const g=n[h]?.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 zb=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Db=gv,W0=(e,n)=>i=>{var r;if(n?.variants==null)return Db(e,i?.class,i?.className);const{variants:l,defaultVariants:c}=n,d=Object.keys(l).map(v=>{const S=i?.[v],x=c?.[v];if(S===null)return null;const N=zb(S)||zb(x);return l[v][N]}),h=i&&Object.entries(i).reduce((v,S)=>{let[x,N]=S;return N===void 0||(v[x]=N),v},{}),g=n==null||(r=n.compoundVariants)===null||r===void 0?void 0:r.reduce((v,S)=>{let{class:x,className:N,..._}=S;return Object.entries(_).every(T=>{let[k,O]=T;return Array.isArray(O)?O.includes({...c,...h}[k]):{...c,...h}[k]===O})?[...v,x,N]:v},[]);return Db(e,d,g,i?.class,i?.className)},iR=(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},sR=(e,n)=>({classGroupId:e,validator:n}),eS=(e=new Map,n=null,i)=>({nextPart:e,validators:n,classGroupId:i}),cc="-",Rb=[],rR="arbitrary..",oR=e=>{const n=cR(e),{conflictingClassGroups:i,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return lR(d);const h=d.split(cc),g=h[0]===""&&h.length>1?1:0;return tS(h,g,n)},getConflictingClassGroupIds:(d,h)=>{if(h){const g=r[d],v=i[d];return g?v?iR(v,g):g:v||Rb}return i[d]||Rb}}},tS=(e,n,i)=>{if(e.length-n===0)return i.classGroupId;const l=e[n],c=i.nextPart.get(l);if(c){const v=tS(e,n+1,c);if(v)return v}const d=i.validators;if(d===null)return;const h=n===0?e.join(cc):e.slice(n).join(cc),g=d.length;for(let v=0;v<g;v++){const S=d[v];if(S.validator(h))return S.classGroupId}},lR=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?rR+r:void 0})(),cR=e=>{const{theme:n,classGroups:i}=e;return uR(i,n)},uR=(e,n)=>{const i=eS();for(const r in e){const l=e[r];jp(l,i,r,n)}return i},jp=(e,n,i,r)=>{const l=e.length;for(let c=0;c<l;c++){const d=e[c];dR(d,n,i,r)}},dR=(e,n,i,r)=>{if(typeof e=="string"){fR(e,n,i);return}if(typeof e=="function"){pR(e,n,i,r);return}mR(e,n,i,r)},fR=(e,n,i)=>{const r=e===""?n:nS(n,e);r.classGroupId=i},pR=(e,n,i,r)=>{if(hR(e)){jp(e(r),n,i,r);return}n.validators===null&&(n.validators=[]),n.validators.push(sR(i,e))},mR=(e,n,i,r)=>{const l=Object.entries(e),c=l.length;for(let d=0;d<c;d++){const[h,g]=l[d];jp(g,nS(n,h),i,r)}},nS=(e,n)=>{let i=e;const r=n.split(cc),l=r.length;for(let c=0;c<l;c++){const d=r[c];let h=i.nextPart.get(d);h||(h=eS(),i.nextPart.set(d,h)),i=h}return i},hR=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,gR=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)}}},Rf="!",Mb=":",yR=[],Bb=(e,n,i,r,l)=>({modifiers:e,hasImportantModifier:n,baseClassName:i,maybePostfixModifierPosition:r,isExternal:l}),bR=e=>{const{prefix:n,experimentalParseClassName:i}=e;let r=l=>{const c=[];let d=0,h=0,g=0,v;const S=l.length;for(let k=0;k<S;k++){const O=l[k];if(d===0&&h===0){if(O===Mb){c.push(l.slice(g,k)),g=k+1;continue}if(O==="/"){v=k;continue}}O==="["?d++:O==="]"?d--:O==="("?h++:O===")"&&h--}const x=c.length===0?l:l.slice(g);let N=x,_=!1;x.endsWith(Rf)?(N=x.slice(0,-1),_=!0):x.startsWith(Rf)&&(N=x.slice(1),_=!0);const T=v&&v>g?v-g:void 0;return Bb(c,_,N,T)};if(n){const l=n+Mb,c=r;r=d=>d.startsWith(l)?c(d.slice(l.length)):Bb(yR,!1,d,void 0,!0)}if(i){const l=r;r=c=>i({className:c,parseClassName:l})}return r},vR=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],h=d[0]==="[",g=n.has(d);h||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}},SR=e=>({cache:gR(e.cacheSize),parseClassName:bR(e),sortModifiers:vR(e),...oR(e)}),xR=/\s+/,wR=(e,n)=>{const{parseClassName:i,getClassGroupId:r,getConflictingClassGroupIds:l,sortModifiers:c}=n,d=[],h=e.trim().split(xR);let g="";for(let v=h.length-1;v>=0;v-=1){const S=h[v],{isExternal:x,modifiers:N,hasImportantModifier:_,baseClassName:T,maybePostfixModifierPosition:k}=i(S);if(x){g=S+(g.length>0?" "+g:g);continue}let O=!!k,R=r(O?T.substring(0,k):T);if(!R){if(!O){g=S+(g.length>0?" "+g:g);continue}if(R=r(T),!R){g=S+(g.length>0?" "+g:g);continue}O=!1}const I=N.length===0?"":N.length===1?N[0]:c(N).join(":"),P=_?I+Rf:I,Z=P+R;if(d.indexOf(Z)>-1)continue;d.push(Z);const X=l(R,O);for(let F=0;F<X.length;++F){const z=X[F];d.push(P+z)}g=S+(g.length>0?" "+g:g)}return g},jR=(...e)=>{let n=0,i,r,l="";for(;n<e.length;)(i=e[n++])&&(r=aS(i))&&(l&&(l+=" "),l+=r);return l},aS=e=>{if(typeof e=="string")return e;let n,i="";for(let r=0;r<e.length;r++)e[r]&&(n=aS(e[r]))&&(i&&(i+=" "),i+=n);return i},NR=(e,...n)=>{let i,r,l,c;const d=g=>{const v=n.reduce((S,x)=>x(S),e());return i=SR(v),r=i.cache.get,l=i.cache.set,c=h,h(g)},h=g=>{const v=r(g);if(v)return v;const S=wR(g,i);return l(g,S),S};return c=d,(...g)=>c(jR(...g))},kR=[],Tt=e=>{const n=i=>i[e]||kR;return n.isThemeGetter=!0,n},iS=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,sS=/^\((?:(\w[\w-]*):)?(.+)\)$/i,AR=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,_R=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,CR=/\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$/,TR=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ER=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,OR=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ha=e=>AR.test(e),De=e=>!!e&&!Number.isNaN(Number(e)),Qa=e=>!!e&&Number.isInteger(Number(e)),ff=e=>e.endsWith("%")&&De(e.slice(0,-1)),ma=e=>_R.test(e),rS=()=>!0,zR=e=>CR.test(e)&&!TR.test(e),Np=()=>!1,DR=e=>ER.test(e),RR=e=>OR.test(e),MR=e=>!he(e)&&!ge(e),BR=e=>ni(e,cS,Np),he=e=>iS.test(e),wi=e=>ni(e,uS,zR),Lb=e=>ni(e,GR,De),LR=e=>ni(e,fS,rS),qR=e=>ni(e,dS,Np),qb=e=>ni(e,oS,Np),UR=e=>ni(e,lS,RR),$l=e=>ni(e,pS,DR),ge=e=>sS.test(e),Yr=e=>zi(e,uS),$R=e=>zi(e,dS),Ub=e=>zi(e,oS),VR=e=>zi(e,cS),IR=e=>zi(e,lS),Vl=e=>zi(e,pS,!0),PR=e=>zi(e,fS,!0),ni=(e,n,i)=>{const r=iS.exec(e);return r?r[1]?n(r[1]):i(r[2]):!1},zi=(e,n,i=!1)=>{const r=sS.exec(e);return r?r[1]?n(r[1]):i:!1},oS=e=>e==="position"||e==="percentage",lS=e=>e==="image"||e==="url",cS=e=>e==="length"||e==="size"||e==="bg-size",uS=e=>e==="length",GR=e=>e==="number",dS=e=>e==="family-name",fS=e=>e==="number"||e==="weight",pS=e=>e==="shadow",HR=()=>{const e=Tt("color"),n=Tt("font"),i=Tt("text"),r=Tt("font-weight"),l=Tt("tracking"),c=Tt("leading"),d=Tt("breakpoint"),h=Tt("container"),g=Tt("spacing"),v=Tt("radius"),S=Tt("shadow"),x=Tt("inset-shadow"),N=Tt("text-shadow"),_=Tt("drop-shadow"),T=Tt("blur"),k=Tt("perspective"),O=Tt("aspect"),R=Tt("ease"),I=Tt("animate"),P=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Z=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],X=()=>[...Z(),ge,he],F=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto","contain","none"],M=()=>[ge,he,g],oe=()=>[Ha,"full","auto",...M()],ke=()=>[Qa,"none","subgrid",ge,he],ze=()=>["auto",{span:["full",Qa,ge,he]},Qa,ge,he],Se=()=>[Qa,"auto",ge,he],He=()=>["auto","min","max","fr",ge,he],le=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],pe=()=>["start","end","center","stretch","center-safe","end-safe"],$=()=>["auto",...M()],W=()=>[Ha,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...M()],fe=()=>[Ha,"screen","full","dvw","lvw","svw","min","max","fit",...M()],je=()=>[Ha,"screen","full","lh","dvh","lvh","svh","min","max","fit",...M()],se=()=>[e,ge,he],Ye=()=>[...Z(),Ub,qb,{position:[ge,he]}],J=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ue=()=>["auto","cover","contain",VR,BR,{size:[ge,he]}],ee=()=>[ff,Yr,wi],de=()=>["","none","full",v,ge,he],ae=()=>["",De,Yr,wi],Ne=()=>["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=()=>[De,ff,Ub,qb],$e=()=>["","none",T,ge,he],Qe=()=>["none",De,ge,he],Dt=()=>["none",De,ge,he],Un=()=>[De,ge,he],Rt=()=>[Ha,"full",...M()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ma],breakpoint:[ma],color:[rS],container:[ma],"drop-shadow":[ma],ease:["in","out","in-out"],font:[MR],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ma],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ma],shadow:[ma],spacing:["px",De],text:[ma],"text-shadow":[ma],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ha,he,ge,O]}],container:["container"],columns:[{columns:[De,he,ge,h]}],"break-after":[{"break-after":P()}],"break-before":[{"break-before":P()}],"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:F()}],"overflow-x":[{"overflow-x":F()}],"overflow-y":[{"overflow-y":F()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],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:[Qa,"auto",ge,he]}],basis:[{basis:[Ha,"full","auto",h,...M()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[De,Ha,"auto","initial","none",he]}],grow:[{grow:["",De,ge,he]}],shrink:[{shrink:["",De,ge,he]}],order:[{order:[Qa,"first","last","none",ge,he]}],"grid-cols":[{"grid-cols":ke()}],"col-start-end":[{col:ze()}],"col-start":[{"col-start":Se()}],"col-end":[{"col-end":Se()}],"grid-rows":[{"grid-rows":ke()}],"row-start-end":[{row:ze()}],"row-start":[{"row-start":Se()}],"row-end":[{"row-end":Se()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":He()}],"auto-rows":[{"auto-rows":He()}],gap:[{gap:M()}],"gap-x":[{"gap-x":M()}],"gap-y":[{"gap-y":M()}],"justify-content":[{justify:[...le(),"normal"]}],"justify-items":[{"justify-items":[...pe(),"normal"]}],"justify-self":[{"justify-self":["auto",...pe()]}],"align-content":[{content:["normal",...le()]}],"align-items":[{items:[...pe(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...pe(),{baseline:["","last"]}]}],"place-content":[{"place-content":le()}],"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:W()}],"inline-size":[{inline:["auto",...fe()]}],"min-inline-size":[{"min-inline":["auto",...fe()]}],"max-inline-size":[{"max-inline":["none",...fe()]}],"block-size":[{block:["auto",...je()]}],"min-block-size":[{"min-block":["auto",...je()]}],"max-block-size":[{"max-block":["none",...je()]}],w:[{w:[h,"screen",...W()]}],"min-w":[{"min-w":[h,"screen","none",...W()]}],"max-w":[{"max-w":[h,"screen","none","prose",{screen:[d]},...W()]}],h:[{h:["screen","lh",...W()]}],"min-h":[{"min-h":["screen","lh","none",...W()]}],"max-h":[{"max-h":["screen","lh",...W()]}],"font-size":[{text:["base",i,Yr,wi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,PR,LR]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ff,he]}],"font-family":[{font:[$R,qR,n]}],"font-features":[{"font-features":[he]}],"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,ge,he]}],"line-clamp":[{"line-clamp":[De,"none",ge,Lb]}],leading:[{leading:[c,...M()]}],"list-image":[{"list-image":["none",ge,he]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ge,he]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:se()}],"text-color":[{text:se()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ne(),"wavy"]}],"text-decoration-thickness":[{decoration:[De,"from-font","auto",ge,wi]}],"text-decoration-color":[{decoration:se()}],"underline-offset":[{"underline-offset":[De,"auto",ge,he]}],"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",ge,he]}],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",ge,he]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Ye()}],"bg-repeat":[{bg:J()}],"bg-size":[{bg:ue()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Qa,ge,he],radial:["",ge,he],conic:[Qa,ge,he]},IR,UR]}],"bg-color":[{bg:se()}],"gradient-from-pos":[{from:ee()}],"gradient-via-pos":[{via:ee()}],"gradient-to-pos":[{to:ee()}],"gradient-from":[{from:se()}],"gradient-via":[{via:se()}],"gradient-to":[{to:se()}],rounded:[{rounded:de()}],"rounded-s":[{"rounded-s":de()}],"rounded-e":[{"rounded-e":de()}],"rounded-t":[{"rounded-t":de()}],"rounded-r":[{"rounded-r":de()}],"rounded-b":[{"rounded-b":de()}],"rounded-l":[{"rounded-l":de()}],"rounded-ss":[{"rounded-ss":de()}],"rounded-se":[{"rounded-se":de()}],"rounded-ee":[{"rounded-ee":de()}],"rounded-es":[{"rounded-es":de()}],"rounded-tl":[{"rounded-tl":de()}],"rounded-tr":[{"rounded-tr":de()}],"rounded-br":[{"rounded-br":de()}],"rounded-bl":[{"rounded-bl":de()}],"border-w":[{border:ae()}],"border-w-x":[{"border-x":ae()}],"border-w-y":[{"border-y":ae()}],"border-w-s":[{"border-s":ae()}],"border-w-e":[{"border-e":ae()}],"border-w-bs":[{"border-bs":ae()}],"border-w-be":[{"border-be":ae()}],"border-w-t":[{"border-t":ae()}],"border-w-r":[{"border-r":ae()}],"border-w-b":[{"border-b":ae()}],"border-w-l":[{"border-l":ae()}],"divide-x":[{"divide-x":ae()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ae()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ne(),"hidden","none"]}],"divide-style":[{divide:[...Ne(),"hidden","none"]}],"border-color":[{border:se()}],"border-color-x":[{"border-x":se()}],"border-color-y":[{"border-y":se()}],"border-color-s":[{"border-s":se()}],"border-color-e":[{"border-e":se()}],"border-color-bs":[{"border-bs":se()}],"border-color-be":[{"border-be":se()}],"border-color-t":[{"border-t":se()}],"border-color-r":[{"border-r":se()}],"border-color-b":[{"border-b":se()}],"border-color-l":[{"border-l":se()}],"divide-color":[{divide:se()}],"outline-style":[{outline:[...Ne(),"none","hidden"]}],"outline-offset":[{"outline-offset":[De,ge,he]}],"outline-w":[{outline:["",De,Yr,wi]}],"outline-color":[{outline:se()}],shadow:[{shadow:["","none",S,Vl,$l]}],"shadow-color":[{shadow:se()}],"inset-shadow":[{"inset-shadow":["none",x,Vl,$l]}],"inset-shadow-color":[{"inset-shadow":se()}],"ring-w":[{ring:ae()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:se()}],"ring-offset-w":[{"ring-offset":[De,wi]}],"ring-offset-color":[{"ring-offset":se()}],"inset-ring-w":[{"inset-ring":ae()}],"inset-ring-color":[{"inset-ring":se()}],"text-shadow":[{"text-shadow":["none",N,Vl,$l]}],"text-shadow-color":[{"text-shadow":se()}],opacity:[{opacity:[De,ge,he]}],"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":[De]}],"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":se()}],"mask-image-linear-to-color":[{"mask-linear-to":se()}],"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":se()}],"mask-image-t-to-color":[{"mask-t-to":se()}],"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":se()}],"mask-image-r-to-color":[{"mask-r-to":se()}],"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":se()}],"mask-image-b-to-color":[{"mask-b-to":se()}],"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":se()}],"mask-image-l-to-color":[{"mask-l-to":se()}],"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":se()}],"mask-image-x-to-color":[{"mask-x-to":se()}],"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":se()}],"mask-image-y-to-color":[{"mask-y-to":se()}],"mask-image-radial":[{"mask-radial":[ge,he]}],"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":se()}],"mask-image-radial-to-color":[{"mask-radial-to":se()}],"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":Z()}],"mask-image-conic-pos":[{"mask-conic":[De]}],"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":se()}],"mask-image-conic-to-color":[{"mask-conic-to":se()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Ye()}],"mask-repeat":[{mask:J()}],"mask-size":[{mask:ue()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ge,he]}],filter:[{filter:["","none",ge,he]}],blur:[{blur:$e()}],brightness:[{brightness:[De,ge,he]}],contrast:[{contrast:[De,ge,he]}],"drop-shadow":[{"drop-shadow":["","none",_,Vl,$l]}],"drop-shadow-color":[{"drop-shadow":se()}],grayscale:[{grayscale:["",De,ge,he]}],"hue-rotate":[{"hue-rotate":[De,ge,he]}],invert:[{invert:["",De,ge,he]}],saturate:[{saturate:[De,ge,he]}],sepia:[{sepia:["",De,ge,he]}],"backdrop-filter":[{"backdrop-filter":["","none",ge,he]}],"backdrop-blur":[{"backdrop-blur":$e()}],"backdrop-brightness":[{"backdrop-brightness":[De,ge,he]}],"backdrop-contrast":[{"backdrop-contrast":[De,ge,he]}],"backdrop-grayscale":[{"backdrop-grayscale":["",De,ge,he]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[De,ge,he]}],"backdrop-invert":[{"backdrop-invert":["",De,ge,he]}],"backdrop-opacity":[{"backdrop-opacity":[De,ge,he]}],"backdrop-saturate":[{"backdrop-saturate":[De,ge,he]}],"backdrop-sepia":[{"backdrop-sepia":["",De,ge,he]}],"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",ge,he]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[De,"initial",ge,he]}],ease:[{ease:["linear","initial",R,ge,he]}],delay:[{delay:[De,ge,he]}],animate:[{animate:["none",I,ge,he]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,ge,he]}],"perspective-origin":[{"perspective-origin":X()}],rotate:[{rotate:Qe()}],"rotate-x":[{"rotate-x":Qe()}],"rotate-y":[{"rotate-y":Qe()}],"rotate-z":[{"rotate-z":Qe()}],scale:[{scale:Dt()}],"scale-x":[{"scale-x":Dt()}],"scale-y":[{"scale-y":Dt()}],"scale-z":[{"scale-z":Dt()}],"scale-3d":["scale-3d"],skew:[{skew:Un()}],"skew-x":[{"skew-x":Un()}],"skew-y":[{"skew-y":Un()}],transform:[{transform:[ge,he,"","none","gpu","cpu"]}],"transform-origin":[{origin:X()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Rt()}],"translate-x":[{"translate-x":Rt()}],"translate-y":[{"translate-y":Rt()}],"translate-z":[{"translate-z":Rt()}],"translate-none":["translate-none"],accent:[{accent:se()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:se()}],"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",ge,he]}],"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",ge,he]}],fill:[{fill:["none",...se()]}],"stroke-w":[{stroke:[De,Yr,wi,Lb]}],stroke:[{stroke:["none",...se()]}],"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"]}},QR=NR(HR);function En(...e){return QR(gv(e))}const KR=W0("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-mono-400 focus-visible:ring-offset-2 focus-visible:ring-offset-overlay-scrim disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-accent text-on-inverse hover:bg-mono-200",secondary:"border border-base bg-bg text-heading hover:bg-bg-elevated",ghost:"text-secondary hover:bg-bg-elevated hover:text-primary",outline:"border border-base bg-transparent text-heading hover:bg-bg-elevated",destructive:"bg-negative-600 text-on-emphasis hover:bg-negative-700"},size:{default:"h-10 px-4 md:h-9",sm:"h-9 px-3 text-xs md:h-8",icon:"size-10 md:size-9"}},defaultVariants:{variant:"default",size:"default"}}),Ue=q.forwardRef(({className:e,variant:n,size:i,asChild:r=!1,...l},c)=>{const d=r?Bw:"button";return f.jsx(d,{ref:c,className:En(KR({variant:n,size:i,className:e})),...l})});Ue.displayName="Button";const ZR=W0("inline-flex items-center rounded-md border px-2 py-0.5 text-[11px] font-medium tracking-wide",{variants:{variant:{neutral:"border-base bg-bg text-neutral",success:"border-positive bg-positive-soft text-positive",warning:"border-caution-500/25 bg-caution-soft text-caution",destructive:"border-negative bg-negative-soft text-negative"}},defaultVariants:{variant:"neutral"}});function mS({className:e,variant:n,...i}){return f.jsx("div",{className:En(ZR({variant:n}),e),...i})}const YR=220;function $b({compact:e=!1,version:n,updateAvailable:i,onDismissUpdate:r}){const l=!e&&n&&n!=="unknown",[c,d]=q.useState(!1),h=!e&&i&&r,g=()=>{d(!0),window.setTimeout(()=>{r?.(),d(!1)},YR)};return e?f.jsxs(st,{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(st,{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(st,{to:"/",className:"brand-mark",children:"Canonry"}),h?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(oA,{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 XR({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(mS,{variant:r,...i,children:n})}function kp({status:e}){return f.jsx(Bn,{tone:Y0(e),children:HD(e)})}const JR=hv,FR=fv,hS=q.forwardRef(({className:e,...n},i)=>f.jsx(Qf,{ref:i,className:En("fixed inset-0 z-50 bg-overlay-scrim/70 backdrop-blur-sm",e),...n}));hS.displayName=Qf.displayName;const WR=400,e3=1200,t3=720,gS=q.forwardRef(({className:e,children:n,...i},r)=>{const[l,c]=q.useState(t3),d=q.useRef(!1),h=q.useRef(0),g=q.useRef(0),v=q.useCallback(N=>{d.current=!0,h.current=N.clientX,g.current=l,N.target.setPointerCapture(N.pointerId),N.preventDefault()},[l]),S=q.useCallback(N=>{if(!d.current)return;const _=h.current-N.clientX,T=Math.min(e3,Math.max(WR,g.current+_));c(T)},[]),x=q.useCallback(()=>{d.current=!1},[]);return f.jsxs(FR,{children:[f.jsx(hS,{}),f.jsxs(Kf,{ref:r,className:En("fixed z-50 flex flex-col bg-bg 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-base",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-mono-700/50 active:bg-mono-600/50 transition-colors max-md:hidden",onPointerDown:v,onPointerMove:S,onPointerUp:x}),n,f.jsxs(pv,{className:"absolute right-4 top-4 inline-flex size-8 items-center justify-center rounded-md text-muted transition hover:bg-bg-elevated hover:text-heading focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-mono-400",children:[f.jsx(Hs,{className:"size-4"}),f.jsx("span",{className:"sr-only",children:"Close"})]})]})]})});gS.displayName=Kf.displayName;const n3=({className:e,...n})=>f.jsx("div",{className:En("flex flex-col gap-1.5 pr-10",e),...n}),yS=q.forwardRef(({className:e,...n},i)=>f.jsx(Zf,{ref:i,className:En("text-lg font-medium text-primary",e),...n}));yS.displayName=Zf.displayName;const bS=q.forwardRef(({className:e,...n},i)=>f.jsx(mv,{ref:i,className:En("text-sm text-muted",e),...n}));bS.displayName=mv.displayName;function a3({title:e,subtitle:n,children:i,open:r,onClose:l}){return f.jsx(JR,{open:r,onOpenChange:c=>c?void 0:l(),children:f.jsxs(gS,{children:[f.jsxs(n3,{className:"drawer-head",children:[f.jsx("p",{className:"eyebrow eyebrow-soft",children:n}),f.jsx(yS,{id:"drawer-title",children:e}),f.jsx(bS,{className:"sr-only",children:n})]}),f.jsx("div",{className:"drawer-body",children:i})]})})}function Xr({text:e}){const[n,i]=q.useState(null),r=q.useRef(null),l=q.useCallback(()=>{if(!r.current)return;const h=r.current.getBoundingClientRect();i({top:h.top,left:h.left+h.width/2})},[]),c=q.useCallback(()=>i(null),[]),d=q.useCallback(()=>{n===null?l():c()},[n,l,c]);return f.jsxs("span",{className:"info-tooltip-wrapper",onMouseEnter:l,onMouseLeave:c,children:[f.jsx("button",{ref:r,type:"button",className:"info-tooltip-trigger","aria-label":e,"aria-expanded":n!==null,onFocus:l,onBlur:c,onClick:d,onKeyDown:h=>{h.key==="Escape"&&c()},children:f.jsxs("svg",{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&&Cw.createPortal(f.jsx("span",{"aria-hidden":"true",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:"var(--color-neutral-text)",backgroundColor:"var(--color-bg-elevated)",border:"1px solid color-mix(in oklab, var(--color-border-strong) 60%, transparent)",borderRadius:"0.5rem",boxShadow:"0 10px 15px -3px var(--color-shadow-tooltip), 0 4px 6px -4px var(--color-shadow-tooltip)"},children:e}),document.body)]})}const i3=/[\s\-_]+/;function s3(e){const n=e.split(i3).filter(Boolean);return n.length===0?null:n.map(i=>i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("[\\s\\-_]*")}function Vb(e,n){const i=r3(n),r=e.split(/(\*\*[^*]+\*\*)/).filter(Boolean).map(v=>v.startsWith("**")&&v.endsWith("**")?{type:"bold",value:v.slice(2,-2)}:{type:"text",value:v}),l=i.flatMap(v=>v.terms).filter(v=>v.trim().length>1);if(l.length===0)return r.map((v,S)=>v.type==="bold"?ks.createElement("strong",{key:`b-${S}`,className:"text-strong font-semibold"},v.value):v.value).filter(Boolean);const d=[...l].sort((v,S)=>S.length-v.length).map(s3).filter(v=>!!v);if(d.length===0)return r.map((v,S)=>v.type==="bold"?ks.createElement("strong",{key:`b-${S}`,className:"text-strong font-semibold"},v.value):v.value).filter(Boolean);const h=new RegExp(`(${d.join("|")})`,"gi"),g=new Map;for(const v of i)for(const S of v.terms){const x=lc(S);x&&!g.has(x)&&g.set(x,v.className)}return r.flatMap((v,S)=>v.value.split(h).map((N,_)=>{if(!N)return null;if(_%2===1){const k=g.get(lc(N))??"answer-highlight";return v.type==="bold"?ks.createElement("mark",{key:`hl-${S}-${_}`,className:k},ks.createElement("strong",{className:"text-strong font-semibold"},N)):ks.createElement("mark",{key:`hl-${S}-${_}`,className:k},N)}return v.type==="bold"?ks.createElement("strong",{key:`b-${S}-${_}`,className:"text-strong font-semibold"},N):N})).filter(Boolean)}function r3(e){return e.length===0?[]:typeof e[0]=="string"?[{terms:e,className:"answer-highlight"}]:e}function Mf(e){const n=(e??"").trim();return n&&(n.startsWith("/")||/^https?:\/\//i.test(n)||/^mailto:/i.test(n))?n:null}function pf(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 o3({evidence:e,project:n,onClose:i}){const[r,l]=q.useState(!1),[c,d]=q.useState("mentions"),[h,g]=q.useState(-1),[v,S]=q.useState(null),[x,N]=q.useState(!1),[_,T]=q.useState({}),k=VE(n.project),O=new Set(k.map(ic)),R=e.runHistory,I=R.length>1,[P,Z]=q.useState(null),X=q.useRef(!1);q.useEffect(()=>{if(X.current||e.answerSnippet&&(e.visibilityState!=null||e.answerMentioned!=null))return;const ee=R.at(-1);ee&&(X.current=!0,Wl(ee.runId).then(de=>{const ae=de.snapshots?.find(Ne=>Ne.query===e.query&&Ne.provider===e.provider);ae&&Z({citationState:ae.citationState,answerMentioned:ae.answerMentioned,visibilityState:ae.visibilityState,visibilityTransition:ee.visibilityTransition,provider:ae.provider,model:ae.model??e.model,answerSnippet:ae.answerText??e.answerSnippet,citedDomains:ae.citedDomains??e.citedDomains,competitorDomains:ae.competitorOverlap??e.competitorDomains,recommendedCompetitors:ae.recommendedCompetitors??e.recommendedCompetitors??[],matchedTerms:ae.matchedTerms??e.matchedTerms??[],groundingSources:ae.groundingSources??e.groundingSources,searchQueries:ae.searchQueries,evidenceUrls:[],changeLabel:e.visibilityChangeLabel??e.changeLabel,summary:e.summary})}).catch(()=>{}))},[e,R]);const F=h>=0&&v!==null,z=F?v:P||{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,searchQueries:e.searchQueries??[],evidenceUrls:e.evidenceUrls,changeLabel:e.visibilityChangeLabel??e.changeLabel,summary:e.summary},M=z.visibilityState==="pending"||z.citationState==="pending",oe=M?!1:z.visibilityState!=null?z.visibilityState==="visible":z.answerMentioned!=null?z.answerMentioned:z.citationState===sc.cited||z.citationState==="emerging",ke=z.answerMentioned!=null||z.visibilityState!=null||z.recommendedCompetitors.length>0,ze=z.citedDomains.length>0||z.groundingSources.length>0||z.evidenceUrls.length>0,Se=n.project.displayName||n.project.name,He=[...k.map(ic),Se,Se.split(" ").slice(0,2).join(" "),...z.matchedTerms].filter(ee=>ee.trim().length>2),le=[...z.competitorDomains.flatMap(ee=>{const de=$E(ee);return de.length>=4?[de]:[]}),...z.recommendedCompetitors].filter(ee=>ee.trim().length>2),pe=[{terms:He,className:"answer-highlight-brand"},...le.length>0?[{terms:le,className:"answer-highlight-competitor"}]:[]],$=M?"pending":z.visibilityTransition==="lost"?"lost":oe?"mentioned":"not-mentioned",W=q.useRef(0),fe=q.useCallback(async ee=>{const de=++W.current;if(ee===-1||ee===R.length-1){g(-1),S(null),l(!1);return}g(ee),l(!1);const ae=R[ee],Ne=`${ae.runId}::${e.query}::${e.provider}`;if(_[Ne]){S(_[Ne]);return}N(!0);try{const tt=await Wl(ae.runId);if(de!==W.current)return;const xe=tt.snapshots?.find(Qe=>Qe.query===e.query&&Qe.provider===e.provider)??tt.snapshots?.find(Qe=>Qe.query===e.query),$e=xe?{citationState:xe.citationState,answerMentioned:xe.answerMentioned,visibilityState:xe.visibilityState,visibilityTransition:ae.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,searchQueries:xe.searchQueries,evidenceUrls:[],changeLabel:pf(ae.mentionTransition??ae.visibilityTransition,ae.mentionState??ae.visibilityState),summary:""}:{citationState:ae.citationState,answerMentioned:ae.answerMentioned,visibilityState:ae.visibilityState,visibilityTransition:ae.visibilityTransition,provider:e.provider,model:ae.model??null,answerSnippet:"",citedDomains:[],competitorDomains:[],recommendedCompetitors:[],matchedTerms:[],groundingSources:[],searchQueries:[],evidenceUrls:[],changeLabel:pf(ae.mentionTransition??ae.visibilityTransition,ae.mentionState??ae.visibilityState),summary:"Snapshot data not available for this run."};T(Qe=>({...Qe,[Ne]:$e})),S($e)}catch{if(de!==W.current)return;S({citationState:ae.citationState,answerMentioned:ae.answerMentioned,visibilityState:ae.visibilityState,visibilityTransition:ae.visibilityTransition,provider:e.provider,model:ae.model??null,answerSnippet:"",citedDomains:[],competitorDomains:[],recommendedCompetitors:[],matchedTerms:[],groundingSources:[],searchQueries:[],evidenceUrls:[],changeLabel:pf(ae.mentionTransition??ae.visibilityTransition,ae.mentionState??ae.visibilityState),summary:"Failed to load historical run data."})}finally{de===W.current&&N(!1)}},[R,e.query,e.provider,_]),se=(F||e.historyScope!=="provider")&&z.model?`${z.provider} (${z.model}) · ${z.changeLabel.toLowerCase()}`:`${z.provider} · ${z.changeLabel.toLowerCase()}`,Ye=!F&&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(" · "):"",J=oe?{label:"Mentioned in answer",title:"Your brand or domain is mentioned in this answer",meta:se}:z.visibilityTransition==="lost"?{label:"Mention lost",title:"Your brand no longer appears in this answer",meta:se}: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:se},ue=()=>{if(!z.answerSnippet)return null;const ee=z.answerSnippet.split(`
|
|
58
|
-
`),de=[];let ae=[],Ne=0;const tt=()=>{if(ae.length===0)return;const xe=ae.join(" ").trim();xe&&de.push(f.jsx("p",{className:de.length>0?"mt-2.5":"",children:Vb(xe,pe)},Ne++)),ae=[]};for(const xe of ee){const $e=xe.trim();if(/^[-\u2013\u2014]{3,}$/.test($e)){tt(),de.push(f.jsx("hr",{className:"border-default my-3"},Ne++));continue}const Qe=$e.match(/^(#{1,3})\s+(\S.*)$/);if(Qe){tt();const Dt=Qe[1].length,Un=Qe[2].replace(/^[\p{Emoji}\p{Emoji_Component}\s]+/u,"").trim()||Qe[2],Rt=Dt===1?"text-[13px] font-semibold text-heading mt-4 mb-1":Dt===2?"text-xs font-semibold text-strong mt-3 mb-0.5":"text-xs font-medium text-neutral mt-2";de.push(f.jsx("p",{className:Rt,children:Vb(Un,pe)},Ne++));continue}if($e===""){tt();continue}ae.push($e)}return tt(),de};return f.jsx(hv,{open:!0,onOpenChange:ee=>{ee||i()},children:f.jsxs(fv,{children:[f.jsx(Qf,{className:"fixed inset-0 z-50 bg-overlay-scrim/80 backdrop-blur-sm"}),f.jsxs(Kf,{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," ","·"," ",z.provider||"All providers"]}),f.jsx(Zf,{className:"text-lg font-semibold text-primary truncate",children:e.query})]}),f.jsxs(pv,{className:"inline-flex size-8 items-center justify-center rounded-md text-muted transition hover:bg-mono-800 hover:text-heading focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-mono-400 shrink-0",children:[f.jsx(Hs,{className:"size-4"}),f.jsx("span",{className:"sr-only",children:"Close"})]})]}),I&&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((ee,de)=>{const ae=h===-1&&de===R.length-1||h===de,Ne=ee.visibilityState??(ee.answerMentioned?"visible":"not-visible"),tt=ee.visibilityTransition??Ne,xe=Ne==="visible"?"bg-positive-400":tt==="emerging"?"bg-caution-400":tt==="lost"?"bg-negative-400":"bg-mono-600",Qe=new Date(ee.createdAt).toLocaleDateString(void 0,{month:"short",day:"numeric"}),Dt=!!(ee.model&&de>0&&R[de-1]?.model&&R[de-1].model!==ee.model);return f.jsxs("button",{type:"button",className:`evidence-run-dot ${ae?"evidence-run-dot--selected":""}`,onClick:()=>{fe(de===R.length-1?-1:de)},"aria-label":[`Run ${Qe}: ${Ne}`,ee.model?`model ${ee.model}`:null,Dt?"model changed":null].filter(Boolean).join(" — "),"aria-pressed":ae,children:[f.jsx("span",{className:`size-2 rounded-full ${xe} ${Dt?"ring-1 ring-caution-300/80 ring-offset-2 ring-offset-bg":""}`,"aria-hidden":"true"}),f.jsx("span",{className:"text-[10px] text-muted",children:Qe})]},de)})}),h>=0&&h<R.length&&f.jsxs("p",{className:"text-[11px] text-muted mt-1",children:["Viewing run from ",new Date(R[h].createdAt).toLocaleString()," ","—"," ",f.jsx("span",{className:"capitalize",children:R[h].visibilityState??(R[h].answerMentioned?"visible":"not-visible")}),f.jsxs("button",{type:"button",className:"text-secondary hover:text-strong ml-2",onClick:()=>{fe(-1)},children:["←"," Back to latest"]})]}),!F&&(e.modelTransitions?.length??0)>0&&f.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:e.modelTransitions.map(ee=>f.jsx("span",{className:"inline-flex items-center rounded-full border border-caution-400/30 bg-caution-400/10 px-2 py-1 text-[10px] text-caution-100",children:`${ee.fromModel??"unknown"} -> ${ee.toModel??"unknown"} on ${new Date(ee.createdAt).toLocaleDateString()}`},`${ee.runId}:${ee.toModel??"unknown"}`))})]}),f.jsxs("div",{className:"evidence-modal-body",children:[x&&f.jsxs("div",{className:"md:col-span-2 flex items-center justify-center py-12 text-muted text-sm",children:["Loading historical run data","…"]}),!x&&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:J.label}),f.jsx("p",{className:`evidence-position-title evidence-position-title--${$}`,children:J.title}),f.jsx("p",{className:"evidence-position-meta",children:J.meta}),Ye&&f.jsx("p",{className:"mt-1 text-[11px] text-muted",children:Ye})]}),z.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:ue()}),z.answerSnippet.length>280&&f.jsx("button",{type:"button",className:"mt-1.5 text-xs text-muted hover:text-neutral transition-colors",onClick:()=>l(!r),children:r?"↑ Collapse":"↓ Show full answer"})]}),!z.answerSnippet&&!x&&f.jsx("div",{className:"rounded-lg border border-subtle bg-surface-subtle px-4 py-8 text-center text-faint text-sm",children:"No answer text recorded for this run"}),z.searchQueries.length>0&&f.jsxs("div",{children:[f.jsxs("div",{className:"drawer-section-label flex items-center",children:[f.jsx("span",{children:"Web searches the model ran"}),f.jsx(Xr,{text:"The search queries this AI model issued while researching your prompt. They reveal how the model reformulated the question — the phrasings worth optimizing your content for. Distinct from grounding sources (what it found) and citations (what it linked)."})]}),f.jsx("ul",{className:"grid gap-1",children:z.searchQueries.map((ee,de)=>f.jsxs("li",{className:"flex items-start gap-2 text-sm text-neutral",children:[f.jsx(QA,{className:"size-3.5 mt-0.5 shrink-0 text-faint","aria-hidden":"true"}),f.jsx("span",{className:"break-words",children:ee})]},`${de}-${ee}`))})]}),!F&&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((ee,de)=>f.jsxs("div",{className:"action-item",children:[f.jsx("svg",{className:`action-item-icon ${oe?"text-positive-400":"text-caution-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:ee})]},de))})]}),z.summary&&f.jsx("p",{className:"text-xs text-faint border-t border-subtle pt-3 mt-1",children:z.summary})]}),f.jsxs("div",{className:"evidence-modal-sidebar",children:[(ke||ze)&&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(Xr,{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"})]}),z.matchedTerms.length>0&&f.jsxs("div",{className:"mt-2",children:[f.jsx("p",{className:"text-[10px] uppercase tracking-wide text-muted mb-1.5",children:"Matched in answer"}),f.jsx("div",{className:"flex flex-wrap gap-1.5",children:z.matchedTerms.map(ee=>f.jsx("span",{className:"mention-chip mention-chip--brand",children:ee},ee))})]}),!M&&!oe&&z.matchedTerms.length===0&&f.jsxs("div",{className:"mt-2",children:[f.jsx("p",{className:"text-[10px] uppercase tracking-wide text-muted mb-1.5",children:"Searched for"}),f.jsx("div",{className:"flex flex-wrap gap-1.5",children:He.map(ee=>f.jsx("span",{className:"mention-chip mention-chip--muted",children:ee},ee))}),f.jsx("p",{className:"text-[11px] text-faint mt-1.5",children:"None of these appear in the answer text."})]})]}),(z.recommendedCompetitors.length>0||z.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(Xr,{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 ee=z.competitorDomains.map(Ne=>Ne.replace(/^www\./,"")),de=new Set(ee.map(Ne=>lc(Ne.replace(/\.[^.]+$/,""))));return[...z.recommendedCompetitors.filter(Ne=>!de.has(lc(Ne))),...ee].map(Ne=>f.jsx("span",{className:"mention-chip mention-chip--competitor",children:Ne},Ne))})()})]})]}),c==="sources"&&f.jsxs(f.Fragment,{children:[z.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(Xr,{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:z.citedDomains.map((ee,de)=>{const ae=ee.toLowerCase().replace(/^www\./,""),Ne=O.has(ae),tt=!Ne&&z.competitorDomains.some($e=>$e.toLowerCase().replace(/^www\./,"")===ae),xe=Ne?"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:["#",de+1]}),f.jsx("span",{className:"citation-leaderboard-domain",children:ee}),Ne&&f.jsx("span",{className:"citation-leaderboard-tag",children:"You"}),tt&&f.jsx("span",{className:"citation-leaderboard-tag",children:"Competitor"})]},ee)})})]}),z.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 (",z.groundingSources.length,")"]}),f.jsx(Xr,{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:z.groundingSources.map((ee,de)=>{const ae=Mf(ee.uri),Ne=ee.title||ee.uri;return f.jsx("li",{className:"truncate text-sm",children:ae?f.jsx("a",{href:ae,target:"_blank",rel:"noopener noreferrer",className:"text-secondary hover:text-strong transition-colors",children:Ne}):f.jsx("span",{className:"text-secondary",children:Ne})},de)})})]}),z.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:z.evidenceUrls.map(ee=>{const de=Mf(ee);return f.jsx("li",{className:"truncate text-sm",children:de?f.jsx("a",{href:de,target:"_blank",rel:"noopener noreferrer",className:"text-secondary hover:text-strong transition-colors",children:ee}):f.jsx("span",{className:"text-secondary",children:ee})},ee)})})]}),z.citedDomains.length===0&&z.groundingSources.length===0&&z.evidenceUrls.length===0&&f.jsxs("div",{className:"flex items-center justify-center h-24 text-faint text-sm",children:["No source data ",F?"for this run":"yet"]})]}),!ke&&!ze&&f.jsxs("div",{className:"flex items-center justify-center h-24 text-faint text-sm",children:["No answer visibility data ",F?"for this run":"yet"]})]})]})]})]})]})})}function l3(e){const n=e.match(/^\/projects\/([^/]+)/);if(!n)return null;try{return decodeURIComponent(n[1])}catch{return n[1]}}function c3(e,n){return e?n?.projects.find(r=>r.project.name===e||r.project.id===e)?.project.name??e:null}function u3(e,n){return c3(l3(e),n)}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 mf=[{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 kc(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 d3=kc({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"}),f3=kc({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"}),p3=kc({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"}),m3=kc({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"}),h3=[{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"])}];mf[0],Math.round(1/9*100),Math.round(2/9*100),mf[1],Mn(["cited","cited","cited","cited","cited"]),mf[2],Math.round(2/7*100),Math.round(3/7*100),Mn(["not-cited","not-cited","not-cited","cited"]);function g3(e,n){return e.runs.find(i=>i.id===n)}function y3(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 b3(e,n,i){if(e){const r=e.visibilityEvidence.find(l=>l.id===i);if(r)return{project:e,evidence:r}}if(n)return y3(n,i)}const v3={regression:"negative",gain:"positive",opportunity:"caution","first-citation":"positive","provider-pickup":"positive","persistent-gap":"caution","competitor-gained":"negative","competitor-lost":"neutral","gbp-lodging-gap":"negative","gbp-listing-discrepancy":"negative","gbp-cta-gap":"caution","gbp-description-missing":"caution","gbp-metric-drop":"negative","gbp-keyword-drop":"negative"},S3={opportunity:"write","persistent-gap":"write","competitor-gained":"write","competitor-lost":"write",regression:"investigate",gain:"monitor","first-citation":"monitor","provider-pickup":"monitor","gbp-lodging-gap":"write","gbp-listing-discrepancy":"write","gbp-cta-gap":"write","gbp-description-missing":"write","gbp-metric-drop":"investigate","gbp-keyword-drop":"investigate"},x3={regression:"lost",gain:"emerging",opportunity:"not-cited","first-citation":"emerging","provider-pickup":"emerging","persistent-gap":"not-cited","competitor-gained":"cited","competitor-lost":"not-cited","gbp-lodging-gap":"not-cited","gbp-listing-discrepancy":"not-cited","gbp-cta-gap":"not-cited","gbp-description-missing":"not-cited","gbp-metric-drop":"lost","gbp-keyword-drop":"lost"},w3={regression:"Regression",gain:"Gain",opportunity:"Opportunity","first-citation":"First citation","provider-pickup":"Pickup","persistent-gap":"Gap","competitor-gained":"Competitor","competitor-lost":"Competitor","gbp-lodging-gap":"Lodging gap","gbp-listing-discrepancy":"Listing gap","gbp-cta-gap":"Booking CTA","gbp-description-missing":"Description gap","gbp-metric-drop":"Metric drop","gbp-keyword-drop":"Keyword drop"};function j3(e){return{id:e.id,tone:v3[e.type],title:e.title,detail:e.cause?.details??e.cause?.cause??"",actionLabel:e.recommendation?.action??w3[e.type],actionGroup:S3[e.type],affectedPhrases:[{query:e.query,evidenceId:"",provider:e.provider,citationState:x3[e.type]}]}}function N3(e){return e.filter(n=>!n.dismissed).map(j3)}function vS(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 Ib(e){try{return new Date(e).toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}catch{return e}}function k3(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 SS(e){switch(e){case Ae["answer-visibility"]:return"Answer visibility sweep";case Ae["gsc-sync"]:return"GSC sync";case Ae["inspect-sitemap"]:return"Sitemap inspection";case Ae["ga-sync"]:return"GA sync";case Ae["traffic-sync"]:return"Traffic sync";case Ae["bing-inspect"]:return"Bing URL inspection";case Ae["bing-inspect-sitemap"]:return"Bing sitemap inspection";case Ae["site-audit"]:return"Site audit";case Ae["backlink-extract"]:return"Backlink extract";case Ae["aeo-discover-seed"]:return"Discovery (seed phase)";case Ae["aeo-discover-probe"]:return"Discovery (probe phase)";case Ae["gbp-sync"]:return"Business Profile sync";case Ae["ads-sync"]:return"ChatGPT ads sync"}}function A3(e){return e===Ms.manual?"Manual":e===Ms.scheduled?"Scheduled":e===Ms["config-apply"]?"Config apply":e}function Ap(e,n){return{id:e.id,projectId:e.projectId,projectName:n,kind:e.kind,kindLabel:SS(e.kind),status:e.status,trigger:e.trigger??"manual",location:e.location??null,createdAt:e.createdAt,startedAt:e.startedAt?Ib(e.startedAt):Ib(e.createdAt),duration:k3(e.startedAt??null,e.finishedAt??null),statusDetail:e.error?xS(e.error):_3(e),summary:C3(e),triggerLabel:A3(e.trigger)}}function xS(e){const n=op(e);return n.length>200?n.slice(0,200)+"…":n}function _3(e){switch(e.status){case Qt.queued:return"Waiting for execution slot.";case Qt.running:return"Provider queries in progress.";case Qt.completed:return"All queries checked.";case Qt.partial:return"Run completed with some queries skipped.";case Qt.failed:return e.error?xS(e.error):"Run failed.";case Qt.cancelled:return"Run was cancelled.";default:return""}}function C3(e){const n=SS(e.kind);switch(e.status){case Qt.queued:return`${n} queued`;case Qt.running:return`${n} in progress`;case Qt.completed:return`${n} completed`;case Qt.partial:return`${n} partially completed`;case Qt.failed:return`${n} failed`;case Qt.cancelled:return`${n} cancelled`;default:return e.status}}function T3(e,n,i,r){const l=[];let c=0;const d=new Set;if(i.length>0){const h=i.flatMap(T=>T.snapshots??[]),g=new Map;for(const T of h)if(T.query){const k=`${T.query}::${T.provider}::${T.location??""}`;g.set(k,T)}const v=new Set(h.map(T=>T.location??null));v.size===0&&v.add(null);const S=new Set(h.map(T=>T.provider)),x=new Set(n.flatMap(T=>Object.keys(T.providerRuns??{}))),N=[...new Set([...S,...x])].sort(),_=N.length>0?N:["gemini"];for(const T of n){if(T.runs.length===0)continue;d.add(T.query);const k=T.runs.at(-1),O=k?.transition??"not-cited";for(const R of _){const I=[...v].filter(X=>g.has(`${T.query}::${R}::${X??""}`)),P=(T.providerRuns?.[R]?.length??0)>0,Z=I.length>0?I:P?[null]:[];for(const X of Z){const F=X??"",z=g.get(`${T.query}::${R}::${F}`),M=z?.model??null,oe=M?`${R}:${M}`:null,ke=T.providerRuns?.[R],ze=oe?T.modelRuns?.[oe]:void 0,Se=$e=>$e?.filter(Qe=>(Qe.location??null)===X),He=I.length>0?Se(ke):ke,le=I.length>0?Se(ze):ze,pe=(He?.length?He:null)??(le?.length?le:null),$=He?.length?"provider":le?.length?"model":"query",W=pe?pe.at(-1).transition:O,fe=pe?pe.at(-1).visibilityTransition??(pe.at(-1).visibilityState==="visible"?"visible":"not-visible"):k?.visibilityTransition??(k?.visibilityState==="visible"?"visible":"not-visible"),je=pe?.at(-1)?.citationState,se=pe?.at(-1)?.visibilityState,Ye=z?W==="lost"?"lost":W==="emerging"?"emerging":z.citationState===sc.cited?"cited":"not-cited":je===sc.cited?"cited":"not-cited",J=z?.visibilityState??(se==="visible"?"visible":se==="pending"?"pending":"not-visible"),ue=Pb(pe||T.runs),ee=Gb(pe||T.runs),de=E3(T,R),ae=(pe??T.runs).map($e=>({runId:$e.runId,citationState:$e.citationState,createdAt:$e.createdAt,model:de.get($e.runId)??null,answerMentioned:$e.answerMentioned,visibilityState:$e.visibilityState,visibilityTransition:$e.visibilityTransition,mentionState:$e.mentionState,mentionTransition:$e.mentionTransition})),Ne=O3(ae),tt=$==="provider"&&Ne.length<=1?"model":$,xe=z3(ae);l.push({id:`evidence_${e}_${c++}`,query:T.query,provider:z?.provider??R,model:z?.model??null,location:z?.location??X,citationState:Ye,answerMentioned:z?.answerMentioned,visibilityState:J,visibilityChangeLabel:Hb(fe,ee,{positive:"visible",negative:"not visible",first:"first visibility"}),changeLabel:Hb(W,ue),answerSnippet:z?.answerText??"",citedDomains:z?.citedDomains??[],evidenceUrls:[],competitorDomains:z?.competitorOverlap??[],recommendedCompetitors:z?.recommendedCompetitors??[],matchedTerms:z?.matchedTerms??[],relatedTechnicalSignals:[],groundingSources:z?.groundingSources??[],searchQueries:z?.searchQueries??[],summary:D3(J,fe,T.query),runHistory:ae,historyScope:tt,modelsSeen:Ne,modelTransitions:xe})}}}}for(const h of r)d.has(h.query)||l.push({id:`evidence_${e}_${c++}`,query:h.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:[],searchQueries:[],summary:`"${h.query}" has been added but no visibility run has been triggered yet.`,runHistory:[],historyScope:"query",modelsSeen:[],modelTransitions:[]});return l}function E3(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),h=d==="unknown"?null:d;for(const g of c)i.set(g.runId,h)}return i}function O3(e){const n=new Set;for(const i of e)i.model&&n.add(i.model);return[...n]}function z3(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 Pb(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 Gb(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 Hb(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 D3(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 wS(e){const n=vS(e.project),i=T3(n.name,e.timeline,e.latestRunDetails,e.queries),l=[...e.runs].sort((c,d)=>d.createdAt.localeCompare(c.createdAt)).map(c=>Ap(c,e.project.displayName||e.project.name));return e.overview?R3(n,e.overview,i,l):M3(n,i,l)}function R3(e,n,i,r){const l=N3(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,citationMovement:n.citationMovement,mentionMovement:n.mentionMovement,movementComparison:n.movementComparison,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 M3(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"},citationMovement:{gained:0,lost:0,tone:"neutral",hasPreviousRun:!1},mentionMovement:{gained:0,lost:0,tone:"neutral",hasPreviousRun:!1},movementComparison:{hasPreviousRun:!1,comparable:!1,querySetChanged:!1,previousRunAt:null,currentQueryCount:0,previousQueryCount:0,comparableQueryCount:0,addedQueryCount:0,removedQueryCount:0,addedQueries:[],removedQueries:[]},insights:[],visibilityEvidence:n,competitors:[],recentRuns:i.slice(0,5),suggestedQueries:{rows:[],totalCandidates:0,skippedAlreadyTracked:0}}}function B3(e){const n=vS(e.project),i=[...e.runs].sort((N,_)=>_.createdAt.localeCompare(N.createdAt)),r=i.find(N=>N.kind===Ae["answer-visibility"])??i[0]??e.overview?.latestRun?.run??void 0,l=e.project.displayName||e.project.name,c=r?Ap(r,l):L3(e.project.id,l),d=e.overview;if(!d)return{project:n,mentionScore:0,mentionDelta:"No data",mentionTone:"neutral",lastRun:c,insight:"No runs completed yet.",trend:[],competitorPressureLabel:"None"};const h=d.scores.mention,g=h.progress??0,v=d.queryCounts.mentionedQueries,S=d.queryCounts.totalQueries,x=d.providers.length;return{project:n,mentionScore:g,mentionDelta:S>0?`${v} of ${S} queries`:"No data",mentionTone:h.tone,providerCoverage:h.providerCoverage,lastRun:c,insight:S>0?`${v} of ${S} queries mentioned across ${x} provider${x===1?"":"s"}.`:"No runs completed yet.",trend:h.trend??[],competitorPressureLabel:d.scores.competitorPressure.value}}function L3(e,n){return{id:"none",projectId:e,projectName:n,kind:Ae["answer-visibility"],kindLabel:"No runs yet",status:Qt.queued,trigger:Ms.manual,createdAt:"",startedAt:"",duration:"",statusDetail:"",summary:"No runs yet",triggerLabel:""}}function q3(e,n){const i=[],r=[],l=[];for(const d of e){r.push(wS(d)),l.push(B3(d));const h=[...d.runs].sort((g,v)=>v.createdAt.localeCompare(g.createdAt));for(const g of h)i.push(Ap(g,d.project.displayName||d.project.name))}i.sort((d,h)=>h.createdAt.localeCompare(d.createdAt));const c=e.length>0;return{portfolioOverview:{projects:l,attentionItems:c?U3(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,defaultModel:d.defaultModel,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 U3(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/${encodeURIComponent(i.project.name)}`});const l=i.recentRuns.filter(c=>c.status===Qt.running||c.status===Qt.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."}),n}const jS=q.createContext(null);jS.Provider;function uo(){return q.useContext(jS)}function Ac(e){const i=uo()?.dashboard??null,r=fn({...wc({client:te}),enabled:!i,refetchInterval:Xk}),l=fn({...K0({client:te,query:{kind:"answer-visibility"}}),enabled:!i,staleTime:ao,refetchInterval:T=>T.state.data?.some(R=>R.status==="running"||R.status==="queued")?3e3:ao}),c=fn({...i4({client:te}),enabled:!i}),d=r.data??[],h=l.data??[],g=Tw({queries:d.map(T=>{const k=h.filter(I=>I.projectId===T.id),O=k.filter(I=>(I.status==="completed"||I.status==="partial")&&I.kind==="answer-visibility"&&I.trigger!=="probe").sort((I,P)=>P.createdAt.localeCompare(I.createdAt)),R=O.length>0?O[0].id:"no-run";return{queryKey:["project-overview-slim",T.id,R],queryFn:async()=>{const I=await Ov(T.name).catch(()=>null);return{project:T,runs:k,queries:[],competitors:[],timeline:[],latestRunDetails:[],previousRunDetails:[],gscCoverage:null,bingCoverage:null,dbInsights:null,overview:I}},enabled:!i&&r.isSuccess&&l.isSuccess,staleTime:Af}})}),v=g.every(T=>T.isSuccess),S=q.useMemo(()=>{if(i)return i;if(!r.data||!l.data||d.length>0&&!v)return null;const T=g.map(k=>k.data?{...k.data,runs:h.filter(O=>O.projectId===k.data.project.id)}:null).filter(k=>k!=null);return q3(T,c.data??null)},[i,r.data,l.data,c.data,v,g,d.length,h]),x=!i&&(r.isError||l.isError),N=!i&&!S&&!x,_=q.useCallback(async()=>{await Promise.all([r.refetch(),l.refetch(),c.refetch()])},[r.refetch,l.refetch,c.refetch]);return{dashboard:S,isLoading:N,isError:x,refetch:_}}function $3(e){const n=uo(),i=q.useMemo(()=>!n||!e?null:n.dashboard.projects.find(T=>T.project.name===e)??null,[n,e]),r=fn({...WD({client:te,path:{name:e??""}}),enabled:!!e&&!i,staleTime:Af,refetchOnWindowFocus:"always"}),l=fn({...t4({client:te,path:{name:e??""},query:{kind:"answer-visibility"}}),enabled:!!e,staleTime:ao,refetchOnWindowFocus:"always",refetchInterval:T=>T.state.data?.some(R=>R.projectId===r.data?.id&&(R.status==="running"||R.status==="queued"))?3e3:ao}),c=r.data??null,d=q.useMemo(()=>c?(l.data??[]).filter(T=>T.projectId===c.id):[],[c,l.data]),{latestRunIds:h,previousRunIds:g,latestRunIdsKey:v}=q.useMemo(()=>{const T=d.filter(P=>(P.status==="completed"||P.status==="partial")&&P.kind==="answer-visibility"&&P.trigger!=="probe").sort((P,Z)=>Z.createdAt.localeCompare(P.createdAt)),k=T[0]?.createdAt??null,O=k?T.filter(P=>P.createdAt===k).map(P=>P.id):[],R=T.find(P=>P.createdAt!==k)?.createdAt??null,I=R?T.filter(P=>P.createdAt===R).map(P=>P.id):[];return{latestRunIds:O,previousRunIds:I,latestRunIdsKey:[...O].sort().join(",")}},[d]),S=fn({queryKey:["project-dashboard-full",c?.id??null,v||"none"],queryFn:async()=>{if(!c||!e)return null;const[T,k,O,R,I,P,Z,X,F]=await Promise.all([Sk(e).catch(()=>[]),xk(e).catch(()=>[]),wk(e).catch(()=>[]),h.length?Promise.all(h.map(z=>Wl(z).catch(()=>null))).then(z=>z.filter(M=>M!=null)):Promise.resolve([]),g.length?Promise.all(g.map(z=>Wl(z).catch(()=>null))).then(z=>z.filter(M=>M!=null)):Promise.resolve([]),Mk(e).catch(()=>null),qk(e).catch(()=>null),$k(e).catch(()=>null),Ov(e).catch(()=>null)]);return{project:c,runs:d,queries:T,competitors:k,timeline:O,latestRunDetails:R,previousRunDetails:I,gscCoverage:P,bingCoverage:Z,dbInsights:X,overview:F}},enabled:!!c&&!!e&&l.isSuccess,staleTime:Af,refetchOnWindowFocus:"always",refetchInterval:Jk}),x=q.useMemo(()=>S.data?wS({...S.data,runs:d}):i||null,[S.data,d,i]),N=q.useCallback(async()=>{await Promise.all([r.refetch(),l.refetch(),S.refetch()])},[r.refetch,l.refetch,S.refetch]),_=!x&&(r.isLoading||l.isLoading||S.isLoading);return{commandCenter:x,project:c,isLoading:_,isError:r.isError||l.isError||S.isError,refetch:N}}const V3=["health"];async function I3(){const e=await Ik("/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 _p(e,n){return fn({queryKey:V3,queryFn:I3,enabled:e,refetchInterval:15e3,initialData:n})}function P3(e){return fn({...Z0({client:te,path:{id:e??""}}),enabled:!!e,refetchInterval:n=>{const i=n.state.data?.status;return i==="running"||i==="queued"?3e3:!1}})}function Cp(){const e=fc(),n=Ew({strict:!1}),i=Ow({select:g=>g.location.pathname}),r=n.runId??null,l=n.evidenceId??null;return{runId:r,evidenceId:l,openRun:g=>{e({to:i,from:nn.to,search:v=>({...v,runId:g,evidenceId:void 0})})},openEvidence:g=>{e({to:i,from:nn.to,search:v=>({...v,evidenceId:g,runId:void 0})})},closeDrawer:()=>{e({to:i,from:nn.to,search:g=>({...g,runId:void 0,evidenceId:void 0})})}}}const G3={negative:"toast-card-negative",caution:"toast-card-caution",positive:"toast-card-positive",neutral:"toast-card-neutral"};function H3(e){if(e.cta)return`${e.cta.label}: ${e.title}`}function Q3(){const e=q.useSyncExternalStore(Zk,Zy,Zy),n=fc(),{openRun:i}=Cp(),r=q.useCallback(c=>{kf(c)},[]),l=q.useCallback(c=>{c.cta&&(c.cta.intent==="open-run-drawer"?i(c.cta.runId):n({to:"/runs"}),kf(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 ${G3[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":H3(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))})}function K3(e,n={}){const{threshold:i=80}=n,r=q.useRef(null),l=q.useRef({scrollHeight:0,wasAtEnd:!0});function c(g){return g.scrollHeight-g.scrollTop-g.clientHeight}function d(){const g=r.current;return g?c(g)<=i:!0}function h(){const g=r.current;g&&(g.scrollTop=g.scrollHeight,l.current.wasAtEnd=!0,l.current.scrollHeight=g.scrollHeight)}return q.useEffect(()=>{const g=r.current;if(!g)return;const v=()=>{l.current.wasAtEnd=c(g)<=i};return g.addEventListener("scroll",v,{passive:!0}),()=>g.removeEventListener("scroll",v)},[i]),q.useLayoutEffect(()=>{const g=r.current;if(!g)return;const v=g.scrollHeight;v>l.current.scrollHeight&&l.current.wasAtEnd&&(g.scrollTop=v),l.current.scrollHeight=v},e),q.useEffect(()=>{const g=r.current;if(!g||typeof ResizeObserver>"u")return;const v=new ResizeObserver(()=>{const S=g.scrollHeight;S>l.current.scrollHeight&&l.current.wasAtEnd&&(g.scrollTop=S),l.current.scrollHeight=S});return v.observe(g),g.firstElementChild&&v.observe(g.firstElementChild),()=>v.disconnect()},[]),{ref:r,scrollToEnd:h,isAtEnd:d}}async function Tp(e){try{return await e.json()}catch{return{}}}function Z3(){return typeof window<"u"&&window.__CANONRY_CONFIG__?.basePath?window.__CANONRY_CONFIG__.basePath.replace(/\/$/,"")+"/api/v1":"/api/v1"}const Ep=Z3();function Op(e){e===401&&Yf()}async function Qb(e){const n=await fetch(`${Ep}/projects/${encodeURIComponent(e)}/agent/transcript`,{credentials:"include"});if(!n.ok){Op(n.status);const i=await Tp(n);throw new Hn(i.error?.message??`transcript fetch failed: ${n.status}`,n.status,i.error?.code)}return await n.json()}async function Y3(e){const n=await fetch(`${Ep}/projects/${encodeURIComponent(e)}/agent/transcript`,{method:"DELETE",credentials:"include"});if(!n.ok){Op(n.status);const i=await Tp(n);throw new Hn(i.error?.message??`reset failed: ${n.status}`,n.status,i.error?.code)}}async function X3({project:e,prompt:n,provider:i,modelId:r,scope:l,profile:c,signal:d,onEvent:h}){const g={prompt:n};i&&(g.provider=i),r&&(g.modelId=r),l&&(g.scope=l),c&&(g.profile=c);const v=await fetch(`${Ep}/projects/${encodeURIComponent(e)}/agent/prompt`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(g),signal:d});if(!v.ok||!v.body){Op(v.status);const T=await Tp(v);throw new Hn(T.error?.message??`prompt failed: ${v.status}`,v.status,T.error?.code)}const S=v.body.getReader(),x=new TextDecoder;let N="";const _=()=>{S.cancel().catch(()=>{})};d?.addEventListener("abort",_,{once:!0});try{for(;;){const{value:T,done:k}=await S.read();if(k)break;N+=x.decode(T,{stream:!0});let O=N.indexOf(`
|
|
56
|
+
`):"Run failed."}function ZD(e){return e.split("-").map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join(" ")}function t6(e){if(!e)return"—";try{return new Date(e).toLocaleString()}catch{return e}}function n6(e){return e===null?"Unknown":e?"Pass":"Fail"}function Tb(e){return e===0?"12:00 AM":e<12?`${e}:00 AM`:e===12?"12:00 PM":`${e-12}:00 PM`}function a6(e,n){return e==="twice-daily"?"twice-daily":e.startsWith("weekly@")?`${e}@${n}`:`daily@${n}`}function i6(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 s6(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 ${Tb(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"},h=c[2]?parseInt(c[2]):6;return`Every ${d[c[1]]} at ${Tb(h)} · ${r}`}return`${e} · ${r}`}function YD(e,n){return n&&n!==e?`${e} · ${n}`:e}function r6(){const e=Intl.DateTimeFormat().resolvedOptions().timeZone,n=new Intl.DateTimeFormat("en-US",{timeZoneName:"short"}).formatToParts().find(i=>i.type==="timeZoneName")?.value;return YD(e,n)}function XD(e){const n=e.replace(/\/+$/,"")||"/";return n==="/"?"overview":n==="/projects"?"projects":n.startsWith("/projects/")?"project":n==="/runs"?"runs":n==="/traffic"||n.startsWith("/traffic/")?"traffic":n==="/backlinks"?"backlinks":n==="/settings"?"settings":n==="/setup"?"setup":"other"}function FD(e,n){return!n||n.includes(e)}function o6(e,n){return FD(e,n)||!n||n.length===0?e:n.includes("overview")?"overview":n[0]}const Eb={bg:"--canonry-embed-bg",fg:"--canonry-embed-fg",accent:"--color-link"},JD=/^(?:#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})|rgba?\([0-9.,%\s/]+\)|hsla?\([0-9.,%\s/a-z]+\))$/i,WD=/^[a-z0-9][a-z0-9 -]{0,48}$/i;function Y0(e){const n=e?.font?.trim();return n&&WD.test(n)?n:void 0}function e4(e){const n=e?.mode?.trim();return n==="light"||n==="dark"?n:void 0}function t4(e){if(!e)return{};const n={};for(const[r,l]of Object.entries(e)){const c=Object.hasOwn(Eb,r)?Eb[r]:void 0;if(!c||typeof l!="string")continue;const d=l.trim();JD.test(d)&&(n[c]=d)}const i=Y0(e);return i&&(n["--font-sans"]=`"${i}", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif`),n}function n4(e){const n=Y0(e);if(n)return`https://fonts.googleapis.com/css2?family=${n.replace(/ /g,"+")}:wght@400;500;600;700&display=swap`}const _e=(e,n,i,r)=>{const l={_id:e,baseUrl:n?.baseUrl||(n?.client??H).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]},a4=e=>_e("getApiV1ProjectsByName",e),i4=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Nv({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:a4(e)}),Oi=e=>_e("getApiV1Projects",e),wc=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await dj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:Oi(e)}),s4=e=>_e("getApiV1ProjectsByNameRuns",e),r4=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await kv({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:s4(e)}),wp=e=>_e("getApiV1Runs",e),X0=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await kj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:wp(e)}),o4=e=>_e("getApiV1RunsById",e),F0=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Av({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:o4(e)}),l4=e=>_e("getApiV1Settings",e),c4=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await _v({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:l4(e)}),u4=e=>_e("getApiV1ProjectsByNameGoogleConnections",e),l6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Ij({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:u4(e)}),d4=e=>_e("getApiV1ProjectsByNameGoogleProperties",e),c6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Hj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:d4(e)}),f4=e=>_e("getApiV1ProjectsByNameGoogleGscPerformance",e),u6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Yj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:f4(e)}),p4=e=>_e("getApiV1ProjectsByNameGoogleGscPerformanceDaily",e),d6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Xj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:p4(e)}),m4=e=>_e("getApiV1ProjectsByNameGoogleGscInspections",e),f6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Jj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:m4(e)}),h4=e=>_e("getApiV1ProjectsByNameGoogleGscDeindexed",e),p6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Wj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:h4(e)}),g4=e=>_e("getApiV1ProjectsByNameGoogleGscCoverage",e),m6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Cv({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:g4(e)}),y4=e=>_e("getApiV1ProjectsByNameGoogleGscCoverageHistory",e),h6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await eN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:y4(e)}),g6=e=>_e("getApiV1ProjectsByNameGoogleGscSitemaps",e),b4=e=>_e("getApiV1ProjectsByNameGbpLocations",e),y6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await sN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:b4(e)}),b6=e=>({mutationFn:async i=>{const{data:r}=await rN({...e,...i,throwOnError:!0});return r}}),v6=e=>({mutationFn:async i=>{const{data:r}=await oN({...e,...i,throwOnError:!0});return r}}),v4=e=>_e("getApiV1ProjectsByNameGbpKeywords",e),S6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await lN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:v4(e)}),S4=e=>_e("getApiV1ProjectsByNameGbpPlaceActions",e),x6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await cN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:S4(e)}),x4=e=>_e("getApiV1ProjectsByNameGbpLodging",e),w6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await uN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:x4(e)}),w4=e=>_e("getApiV1ProjectsByNameGbpPlaces",e),j6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await dN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:w4(e)}),j4=e=>_e("getApiV1ProjectsByNameGbpSummary",e),N6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await fN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:j4(e)}),N4=e=>_e("getApiV1ProjectsByNameBingStatus",e),k6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await hN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:N4(e)}),k4=e=>_e("getApiV1ProjectsByNameBingSites",e),A6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await gN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:k4(e)}),A4=e=>_e("getApiV1ProjectsByNameBingCoverage",e),_6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Tv({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:A4(e)}),_4=e=>_e("getApiV1ProjectsByNameBingInspections",e),C6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await bN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:_4(e)}),C4=e=>_e("getApiV1ProjectsByNameBingPerformance",e),T6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await wN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:C4(e)}),T4=e=>_e("getApiV1ProjectsByNameGaStatus",e),E6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await kN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:T4(e)}),E4=e=>_e("getApiV1ProjectsByNameGaTraffic",e),O6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await _N({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:E4(e)}),O4=e=>_e("getApiV1ProjectsByNameGaAiReferralHistory",e),z6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await CN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:O4(e)}),z4=e=>_e("getApiV1ProjectsByNameGaSocialReferralHistory",e),D6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await TN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:z4(e)}),D4=e=>_e("getApiV1ProjectsByNameGaSessionHistory",e),R6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await EN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:D4(e)}),R4=e=>_e("getApiV1ProjectsByNameReport",e),M6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await zN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:R4(e)}),M4=e=>_e("getApiV1ProjectsByNameCitationsVisibility",e),B6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await DN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:M4(e)}),B4=e=>_e("getApiV1ProjectsByNameTrafficSources",e),L6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await tk({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:B4(e)}),L4=e=>_e("getApiV1ProjectsByNameTrafficStatus",e),q6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await nk({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:L4(e)}),q4=e=>_e("getApiV1ProjectsByNameTrafficSourcesById",e),U6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await ak({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:q4(e)}),U4=e=>_e("getApiV1ProjectsByNameTrafficEvents",e),$6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await ik({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:U4(e)}),$4=e=>_e("getApiV1ProjectsByNameDiscoverSessions",e),V6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await rk({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:$4(e)}),V4=e=>_e("getApiV1ProjectsByNameDiscoverSessionsById",e),I6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await ok({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:V4(e)}),I4=e=>_e("getApiV1ProjectsByNameDiscoverSessionsByIdPromote",e),P6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await lk({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:I4(e)}),P4=e=>_e("getApiV1ProjectsByNameTechnicalAeo",e),G6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await uk({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:P4(e)}),G4=e=>_e("getApiV1ProjectsByNameTechnicalAeoPages",e),H6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await dk({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:G4(e)}),H4=e=>_e("getApiV1ProjectsByNameTechnicalAeoTrend",e),Q6=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await fk({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:H4(e)}),Q4=e=>_e("getApiV1ProjectsByNameAgentProviders",e),K4=e=>Te({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await mk({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:Q4(e)});function Ob(e){return e.state==="ok"?"positive":e.state==="checking"?"neutral":"negative"}function J0(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 K6(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 Z6(e){return e==="High"?"negative":e==="Moderate"?"caution":"neutral"}const Y6={positive:"text-positive-400",caution:"text-caution-400",negative:"text-negative-400",neutral:"text-secondary"};function Z4(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 Y4(e,n,i){return e.map(r=>{if(r.id==="api")return{...r,tone:Ob(n.apiStatus),detail:n.apiStatus.state==="ok"?"Healthy":"Needs attention",meta:n.apiStatus.detail};if(r.id==="worker")return{...r,tone:Ob(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,h=i.providerStatuses.filter(g=>g.state==="ready").map(g=>Z4(g)).join(" · ");return{...r,label:"Providers",tone:d?"positive":"caution",detail:`${l} of ${c} configured`,meta:h||"None configured"}})}function X4(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 F4(e,n,i){const r=X4(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(h=>h.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 W0="canonry.run-tracker",Df=new Set;let zb=!1,J4=0,jc={runs:{},batches:{}};function W4(){const e=_i();for(const n of Df)n(e)}function eR(e){if(!e)return{runs:{},batches:{}};try{const n=JSON.parse(e);return{runs:n.runs??{},batches:n.batches??{}}}catch{return{runs:{},batches:{}}}}function tR(){typeof window>"u"||window.sessionStorage.setItem(W0,JSON.stringify(jc))}function eS(){zb||(zb=!0,!(typeof window>"u")&&(jc=eR(window.sessionStorage.getItem(W0))))}function Nc(e){jc=e,tR(),W4()}function _i(){return eS(),jc}function nR(e){return eS(),Df.add(e),()=>{Df.delete(e)}}function tS(e){const n=_i();Nc({...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",trackedAt:e.trackedAt??Date.now()}}})}function df(e){const n=_i();if(!n.runs[e])return;const{[e]:i,...r}=n.runs;Nc({...n,runs:r})}function aR(e){const n=_i(),i=`batch_${Date.now()}_${++J4}`;return Nc({...n,batches:{...n.batches,[i]:{batchId:i,runIds:e.runIds,queuedCount:e.queuedCount,skippedCount:e.skippedCount}}}),i}function iR(e){const n=_i();if(!n.batches[e])return;const{[e]:i,...r}=n.batches;Nc({...n,batches:r})}function sR(e){return e==="completed"||e==="partial"||e==="failed"||e==="cancelled"}const rR=10*6e4;function oR(e,n,i,r){return e.filter(l=>!n.has(l.runId)&&i-(l.trackedAt??0)>=r)}function lR(e,n){let i=0,r=0,l=0,c=0,d=0;for(const h of e){const g=n[h]?.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 Db=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Rb=yv,nS=(e,n)=>i=>{var r;if(n?.variants==null)return Rb(e,i?.class,i?.className);const{variants:l,defaultVariants:c}=n,d=Object.keys(l).map(v=>{const S=i?.[v],x=c?.[v];if(S===null)return null;const N=Db(S)||Db(x);return l[v][N]}),h=i&&Object.entries(i).reduce((v,S)=>{let[x,N]=S;return N===void 0||(v[x]=N),v},{}),g=n==null||(r=n.compoundVariants)===null||r===void 0?void 0:r.reduce((v,S)=>{let{class:x,className:N,..._}=S;return Object.entries(_).every(T=>{let[k,O]=T;return Array.isArray(O)?O.includes({...c,...h}[k]):{...c,...h}[k]===O})?[...v,x,N]:v},[]);return Rb(e,d,g,i?.class,i?.className)},cR=(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},uR=(e,n)=>({classGroupId:e,validator:n}),aS=(e=new Map,n=null,i)=>({nextPart:e,validators:n,classGroupId:i}),cc="-",Mb=[],dR="arbitrary..",fR=e=>{const n=mR(e),{conflictingClassGroups:i,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return pR(d);const h=d.split(cc),g=h[0]===""&&h.length>1?1:0;return iS(h,g,n)},getConflictingClassGroupIds:(d,h)=>{if(h){const g=r[d],v=i[d];return g?v?cR(v,g):g:v||Mb}return i[d]||Mb}}},iS=(e,n,i)=>{if(e.length-n===0)return i.classGroupId;const l=e[n],c=i.nextPart.get(l);if(c){const v=iS(e,n+1,c);if(v)return v}const d=i.validators;if(d===null)return;const h=n===0?e.join(cc):e.slice(n).join(cc),g=d.length;for(let v=0;v<g;v++){const S=d[v];if(S.validator(h))return S.classGroupId}},pR=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?dR+r:void 0})(),mR=e=>{const{theme:n,classGroups:i}=e;return hR(i,n)},hR=(e,n)=>{const i=aS();for(const r in e){const l=e[r];jp(l,i,r,n)}return i},jp=(e,n,i,r)=>{const l=e.length;for(let c=0;c<l;c++){const d=e[c];gR(d,n,i,r)}},gR=(e,n,i,r)=>{if(typeof e=="string"){yR(e,n,i);return}if(typeof e=="function"){bR(e,n,i,r);return}vR(e,n,i,r)},yR=(e,n,i)=>{const r=e===""?n:sS(n,e);r.classGroupId=i},bR=(e,n,i,r)=>{if(SR(e)){jp(e(r),n,i,r);return}n.validators===null&&(n.validators=[]),n.validators.push(uR(i,e))},vR=(e,n,i,r)=>{const l=Object.entries(e),c=l.length;for(let d=0;d<c;d++){const[h,g]=l[d];jp(g,sS(n,h),i,r)}},sS=(e,n)=>{let i=e;const r=n.split(cc),l=r.length;for(let c=0;c<l;c++){const d=r[c];let h=i.nextPart.get(d);h||(h=aS(),i.nextPart.set(d,h)),i=h}return i},SR=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,xR=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)}}},Rf="!",Bb=":",wR=[],Lb=(e,n,i,r,l)=>({modifiers:e,hasImportantModifier:n,baseClassName:i,maybePostfixModifierPosition:r,isExternal:l}),jR=e=>{const{prefix:n,experimentalParseClassName:i}=e;let r=l=>{const c=[];let d=0,h=0,g=0,v;const S=l.length;for(let k=0;k<S;k++){const O=l[k];if(d===0&&h===0){if(O===Bb){c.push(l.slice(g,k)),g=k+1;continue}if(O==="/"){v=k;continue}}O==="["?d++:O==="]"?d--:O==="("?h++:O===")"&&h--}const x=c.length===0?l:l.slice(g);let N=x,_=!1;x.endsWith(Rf)?(N=x.slice(0,-1),_=!0):x.startsWith(Rf)&&(N=x.slice(1),_=!0);const T=v&&v>g?v-g:void 0;return Lb(c,_,N,T)};if(n){const l=n+Bb,c=r;r=d=>d.startsWith(l)?c(d.slice(l.length)):Lb(wR,!1,d,void 0,!0)}if(i){const l=r;r=c=>i({className:c,parseClassName:l})}return r},NR=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],h=d[0]==="[",g=n.has(d);h||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}},kR=e=>({cache:xR(e.cacheSize),parseClassName:jR(e),sortModifiers:NR(e),...fR(e)}),AR=/\s+/,_R=(e,n)=>{const{parseClassName:i,getClassGroupId:r,getConflictingClassGroupIds:l,sortModifiers:c}=n,d=[],h=e.trim().split(AR);let g="";for(let v=h.length-1;v>=0;v-=1){const S=h[v],{isExternal:x,modifiers:N,hasImportantModifier:_,baseClassName:T,maybePostfixModifierPosition:k}=i(S);if(x){g=S+(g.length>0?" "+g:g);continue}let O=!!k,R=r(O?T.substring(0,k):T);if(!R){if(!O){g=S+(g.length>0?" "+g:g);continue}if(R=r(T),!R){g=S+(g.length>0?" "+g:g);continue}O=!1}const I=N.length===0?"":N.length===1?N[0]:c(N).join(":"),P=_?I+Rf:I,Z=P+R;if(d.indexOf(Z)>-1)continue;d.push(Z);const X=l(R,O);for(let J=0;J<X.length;++J){const z=X[J];d.push(P+z)}g=S+(g.length>0?" "+g:g)}return g},CR=(...e)=>{let n=0,i,r,l="";for(;n<e.length;)(i=e[n++])&&(r=rS(i))&&(l&&(l+=" "),l+=r);return l},rS=e=>{if(typeof e=="string")return e;let n,i="";for(let r=0;r<e.length;r++)e[r]&&(n=rS(e[r]))&&(i&&(i+=" "),i+=n);return i},TR=(e,...n)=>{let i,r,l,c;const d=g=>{const v=n.reduce((S,x)=>x(S),e());return i=kR(v),r=i.cache.get,l=i.cache.set,c=h,h(g)},h=g=>{const v=r(g);if(v)return v;const S=_R(g,i);return l(g,S),S};return c=d,(...g)=>c(CR(...g))},ER=[],Tt=e=>{const n=i=>i[e]||ER;return n.isThemeGetter=!0,n},oS=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,lS=/^\((?:(\w[\w-]*):)?(.+)\)$/i,OR=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,zR=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,DR=/\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$/,RR=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,MR=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,BR=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ha=e=>OR.test(e),De=e=>!!e&&!Number.isNaN(Number(e)),Qa=e=>!!e&&Number.isInteger(Number(e)),ff=e=>e.endsWith("%")&&De(e.slice(0,-1)),ma=e=>zR.test(e),cS=()=>!0,LR=e=>DR.test(e)&&!RR.test(e),Np=()=>!1,qR=e=>MR.test(e),UR=e=>BR.test(e),$R=e=>!he(e)&&!ge(e),VR=e=>ni(e,fS,Np),he=e=>oS.test(e),wi=e=>ni(e,pS,LR),qb=e=>ni(e,YR,De),IR=e=>ni(e,hS,cS),PR=e=>ni(e,mS,Np),Ub=e=>ni(e,uS,Np),GR=e=>ni(e,dS,UR),$l=e=>ni(e,gS,qR),ge=e=>lS.test(e),Yr=e=>zi(e,pS),HR=e=>zi(e,mS),$b=e=>zi(e,uS),QR=e=>zi(e,fS),KR=e=>zi(e,dS),Vl=e=>zi(e,gS,!0),ZR=e=>zi(e,hS,!0),ni=(e,n,i)=>{const r=oS.exec(e);return r?r[1]?n(r[1]):i(r[2]):!1},zi=(e,n,i=!1)=>{const r=lS.exec(e);return r?r[1]?n(r[1]):i:!1},uS=e=>e==="position"||e==="percentage",dS=e=>e==="image"||e==="url",fS=e=>e==="length"||e==="size"||e==="bg-size",pS=e=>e==="length",YR=e=>e==="number",mS=e=>e==="family-name",hS=e=>e==="number"||e==="weight",gS=e=>e==="shadow",XR=()=>{const e=Tt("color"),n=Tt("font"),i=Tt("text"),r=Tt("font-weight"),l=Tt("tracking"),c=Tt("leading"),d=Tt("breakpoint"),h=Tt("container"),g=Tt("spacing"),v=Tt("radius"),S=Tt("shadow"),x=Tt("inset-shadow"),N=Tt("text-shadow"),_=Tt("drop-shadow"),T=Tt("blur"),k=Tt("perspective"),O=Tt("aspect"),R=Tt("ease"),I=Tt("animate"),P=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Z=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],X=()=>[...Z(),ge,he],J=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto","contain","none"],M=()=>[ge,he,g],oe=()=>[Ha,"full","auto",...M()],ke=()=>[Qa,"none","subgrid",ge,he],ze=()=>["auto",{span:["full",Qa,ge,he]},Qa,ge,he],Se=()=>[Qa,"auto",ge,he],$e=()=>["auto","min","max","fr",ge,he],le=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],fe=()=>["start","end","center","stretch","center-safe","end-safe"],$=()=>["auto",...M()],W=()=>[Ha,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...M()],pe=()=>[Ha,"screen","full","dvw","lvw","svw","min","max","fit",...M()],je=()=>[Ha,"screen","full","lh","dvh","lvh","svh","min","max","fit",...M()],se=()=>[e,ge,he],Ye=()=>[...Z(),$b,Ub,{position:[ge,he]}],F=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ue=()=>["auto","cover","contain",QR,VR,{size:[ge,he]}],ee=()=>[ff,Yr,wi],de=()=>["","none","full",v,ge,he],ae=()=>["",De,Yr,wi],Ne=()=>["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=()=>[De,ff,$b,Ub],Ve=()=>["","none",T,ge,he],Qe=()=>["none",De,ge,he],Dt=()=>["none",De,ge,he],Un=()=>[De,ge,he],Rt=()=>[Ha,"full",...M()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ma],breakpoint:[ma],color:[cS],container:[ma],"drop-shadow":[ma],ease:["in","out","in-out"],font:[$R],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ma],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ma],shadow:[ma],spacing:["px",De],text:[ma],"text-shadow":[ma],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ha,he,ge,O]}],container:["container"],columns:[{columns:[De,he,ge,h]}],"break-after":[{"break-after":P()}],"break-before":[{"break-before":P()}],"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:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],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:[Qa,"auto",ge,he]}],basis:[{basis:[Ha,"full","auto",h,...M()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[De,Ha,"auto","initial","none",he]}],grow:[{grow:["",De,ge,he]}],shrink:[{shrink:["",De,ge,he]}],order:[{order:[Qa,"first","last","none",ge,he]}],"grid-cols":[{"grid-cols":ke()}],"col-start-end":[{col:ze()}],"col-start":[{"col-start":Se()}],"col-end":[{"col-end":Se()}],"grid-rows":[{"grid-rows":ke()}],"row-start-end":[{row:ze()}],"row-start":[{"row-start":Se()}],"row-end":[{"row-end":Se()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":$e()}],"auto-rows":[{"auto-rows":$e()}],gap:[{gap:M()}],"gap-x":[{"gap-x":M()}],"gap-y":[{"gap-y":M()}],"justify-content":[{justify:[...le(),"normal"]}],"justify-items":[{"justify-items":[...fe(),"normal"]}],"justify-self":[{"justify-self":["auto",...fe()]}],"align-content":[{content:["normal",...le()]}],"align-items":[{items:[...fe(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...fe(),{baseline:["","last"]}]}],"place-content":[{"place-content":le()}],"place-items":[{"place-items":[...fe(),"baseline"]}],"place-self":[{"place-self":["auto",...fe()]}],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:W()}],"inline-size":[{inline:["auto",...pe()]}],"min-inline-size":[{"min-inline":["auto",...pe()]}],"max-inline-size":[{"max-inline":["none",...pe()]}],"block-size":[{block:["auto",...je()]}],"min-block-size":[{"min-block":["auto",...je()]}],"max-block-size":[{"max-block":["none",...je()]}],w:[{w:[h,"screen",...W()]}],"min-w":[{"min-w":[h,"screen","none",...W()]}],"max-w":[{"max-w":[h,"screen","none","prose",{screen:[d]},...W()]}],h:[{h:["screen","lh",...W()]}],"min-h":[{"min-h":["screen","lh","none",...W()]}],"max-h":[{"max-h":["screen","lh",...W()]}],"font-size":[{text:["base",i,Yr,wi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ZR,IR]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ff,he]}],"font-family":[{font:[HR,PR,n]}],"font-features":[{"font-features":[he]}],"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,ge,he]}],"line-clamp":[{"line-clamp":[De,"none",ge,qb]}],leading:[{leading:[c,...M()]}],"list-image":[{"list-image":["none",ge,he]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ge,he]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:se()}],"text-color":[{text:se()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ne(),"wavy"]}],"text-decoration-thickness":[{decoration:[De,"from-font","auto",ge,wi]}],"text-decoration-color":[{decoration:se()}],"underline-offset":[{"underline-offset":[De,"auto",ge,he]}],"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",ge,he]}],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",ge,he]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Ye()}],"bg-repeat":[{bg:F()}],"bg-size":[{bg:ue()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Qa,ge,he],radial:["",ge,he],conic:[Qa,ge,he]},KR,GR]}],"bg-color":[{bg:se()}],"gradient-from-pos":[{from:ee()}],"gradient-via-pos":[{via:ee()}],"gradient-to-pos":[{to:ee()}],"gradient-from":[{from:se()}],"gradient-via":[{via:se()}],"gradient-to":[{to:se()}],rounded:[{rounded:de()}],"rounded-s":[{"rounded-s":de()}],"rounded-e":[{"rounded-e":de()}],"rounded-t":[{"rounded-t":de()}],"rounded-r":[{"rounded-r":de()}],"rounded-b":[{"rounded-b":de()}],"rounded-l":[{"rounded-l":de()}],"rounded-ss":[{"rounded-ss":de()}],"rounded-se":[{"rounded-se":de()}],"rounded-ee":[{"rounded-ee":de()}],"rounded-es":[{"rounded-es":de()}],"rounded-tl":[{"rounded-tl":de()}],"rounded-tr":[{"rounded-tr":de()}],"rounded-br":[{"rounded-br":de()}],"rounded-bl":[{"rounded-bl":de()}],"border-w":[{border:ae()}],"border-w-x":[{"border-x":ae()}],"border-w-y":[{"border-y":ae()}],"border-w-s":[{"border-s":ae()}],"border-w-e":[{"border-e":ae()}],"border-w-bs":[{"border-bs":ae()}],"border-w-be":[{"border-be":ae()}],"border-w-t":[{"border-t":ae()}],"border-w-r":[{"border-r":ae()}],"border-w-b":[{"border-b":ae()}],"border-w-l":[{"border-l":ae()}],"divide-x":[{"divide-x":ae()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ae()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ne(),"hidden","none"]}],"divide-style":[{divide:[...Ne(),"hidden","none"]}],"border-color":[{border:se()}],"border-color-x":[{"border-x":se()}],"border-color-y":[{"border-y":se()}],"border-color-s":[{"border-s":se()}],"border-color-e":[{"border-e":se()}],"border-color-bs":[{"border-bs":se()}],"border-color-be":[{"border-be":se()}],"border-color-t":[{"border-t":se()}],"border-color-r":[{"border-r":se()}],"border-color-b":[{"border-b":se()}],"border-color-l":[{"border-l":se()}],"divide-color":[{divide:se()}],"outline-style":[{outline:[...Ne(),"none","hidden"]}],"outline-offset":[{"outline-offset":[De,ge,he]}],"outline-w":[{outline:["",De,Yr,wi]}],"outline-color":[{outline:se()}],shadow:[{shadow:["","none",S,Vl,$l]}],"shadow-color":[{shadow:se()}],"inset-shadow":[{"inset-shadow":["none",x,Vl,$l]}],"inset-shadow-color":[{"inset-shadow":se()}],"ring-w":[{ring:ae()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:se()}],"ring-offset-w":[{"ring-offset":[De,wi]}],"ring-offset-color":[{"ring-offset":se()}],"inset-ring-w":[{"inset-ring":ae()}],"inset-ring-color":[{"inset-ring":se()}],"text-shadow":[{"text-shadow":["none",N,Vl,$l]}],"text-shadow-color":[{"text-shadow":se()}],opacity:[{opacity:[De,ge,he]}],"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":[De]}],"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":se()}],"mask-image-linear-to-color":[{"mask-linear-to":se()}],"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":se()}],"mask-image-t-to-color":[{"mask-t-to":se()}],"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":se()}],"mask-image-r-to-color":[{"mask-r-to":se()}],"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":se()}],"mask-image-b-to-color":[{"mask-b-to":se()}],"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":se()}],"mask-image-l-to-color":[{"mask-l-to":se()}],"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":se()}],"mask-image-x-to-color":[{"mask-x-to":se()}],"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":se()}],"mask-image-y-to-color":[{"mask-y-to":se()}],"mask-image-radial":[{"mask-radial":[ge,he]}],"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":se()}],"mask-image-radial-to-color":[{"mask-radial-to":se()}],"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":Z()}],"mask-image-conic-pos":[{"mask-conic":[De]}],"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":se()}],"mask-image-conic-to-color":[{"mask-conic-to":se()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Ye()}],"mask-repeat":[{mask:F()}],"mask-size":[{mask:ue()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ge,he]}],filter:[{filter:["","none",ge,he]}],blur:[{blur:Ve()}],brightness:[{brightness:[De,ge,he]}],contrast:[{contrast:[De,ge,he]}],"drop-shadow":[{"drop-shadow":["","none",_,Vl,$l]}],"drop-shadow-color":[{"drop-shadow":se()}],grayscale:[{grayscale:["",De,ge,he]}],"hue-rotate":[{"hue-rotate":[De,ge,he]}],invert:[{invert:["",De,ge,he]}],saturate:[{saturate:[De,ge,he]}],sepia:[{sepia:["",De,ge,he]}],"backdrop-filter":[{"backdrop-filter":["","none",ge,he]}],"backdrop-blur":[{"backdrop-blur":Ve()}],"backdrop-brightness":[{"backdrop-brightness":[De,ge,he]}],"backdrop-contrast":[{"backdrop-contrast":[De,ge,he]}],"backdrop-grayscale":[{"backdrop-grayscale":["",De,ge,he]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[De,ge,he]}],"backdrop-invert":[{"backdrop-invert":["",De,ge,he]}],"backdrop-opacity":[{"backdrop-opacity":[De,ge,he]}],"backdrop-saturate":[{"backdrop-saturate":[De,ge,he]}],"backdrop-sepia":[{"backdrop-sepia":["",De,ge,he]}],"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",ge,he]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[De,"initial",ge,he]}],ease:[{ease:["linear","initial",R,ge,he]}],delay:[{delay:[De,ge,he]}],animate:[{animate:["none",I,ge,he]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,ge,he]}],"perspective-origin":[{"perspective-origin":X()}],rotate:[{rotate:Qe()}],"rotate-x":[{"rotate-x":Qe()}],"rotate-y":[{"rotate-y":Qe()}],"rotate-z":[{"rotate-z":Qe()}],scale:[{scale:Dt()}],"scale-x":[{"scale-x":Dt()}],"scale-y":[{"scale-y":Dt()}],"scale-z":[{"scale-z":Dt()}],"scale-3d":["scale-3d"],skew:[{skew:Un()}],"skew-x":[{"skew-x":Un()}],"skew-y":[{"skew-y":Un()}],transform:[{transform:[ge,he,"","none","gpu","cpu"]}],"transform-origin":[{origin:X()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Rt()}],"translate-x":[{"translate-x":Rt()}],"translate-y":[{"translate-y":Rt()}],"translate-z":[{"translate-z":Rt()}],"translate-none":["translate-none"],accent:[{accent:se()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:se()}],"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",ge,he]}],"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",ge,he]}],fill:[{fill:["none",...se()]}],"stroke-w":[{stroke:[De,Yr,wi,qb]}],stroke:[{stroke:["none",...se()]}],"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"]}},FR=TR(XR);function En(...e){return FR(yv(e))}const JR=nS("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-mono-400 focus-visible:ring-offset-2 focus-visible:ring-offset-overlay-scrim disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-accent text-on-inverse hover:bg-mono-200",secondary:"border border-base bg-bg text-heading hover:bg-bg-elevated",ghost:"text-secondary hover:bg-bg-elevated hover:text-primary",outline:"border border-base bg-transparent text-heading hover:bg-bg-elevated",destructive:"bg-negative-600 text-on-emphasis hover:bg-negative-700"},size:{default:"h-10 px-4 md:h-9",sm:"h-9 px-3 text-xs md:h-8",icon:"size-10 md:size-9"}},defaultVariants:{variant:"default",size:"default"}}),Ue=q.forwardRef(({className:e,variant:n,size:i,asChild:r=!1,...l},c)=>{const d=r?Uw:"button";return f.jsx(d,{ref:c,className:En(JR({variant:n,size:i,className:e})),...l})});Ue.displayName="Button";const WR=nS("inline-flex items-center rounded-md border px-2 py-0.5 text-[11px] font-medium tracking-wide",{variants:{variant:{neutral:"border-base bg-bg text-neutral",success:"border-positive bg-positive-soft text-positive",warning:"border-caution-500/25 bg-caution-soft text-caution",destructive:"border-negative bg-negative-soft text-negative"}},defaultVariants:{variant:"neutral"}});function yS({className:e,variant:n,...i}){return f.jsx("div",{className:En(WR({variant:n}),e),...i})}const e3=220;function Vb({compact:e=!1,version:n,updateAvailable:i,onDismissUpdate:r}){const l=!e&&n&&n!=="unknown",[c,d]=q.useState(!1),h=!e&&i&&r,g=()=>{d(!0),window.setTimeout(()=>{r?.(),d(!1)},e3)};return e?f.jsxs(st,{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(st,{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(st,{to:"/",className:"brand-mark",children:"Canonry"}),h?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(uA,{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 t3({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"},r=Object.hasOwn(n,e)?`provider-badge--${e} ${n[e]}`:"border-zinc-700 bg-zinc-800 text-zinc-300";return f.jsx("span",{className:`provider-badge inline-flex items-center rounded-full border px-2 py-0.5 text-[10px] font-medium uppercase tracking-wide ${r}`,children:e})}function Bn({tone:e,children:n,...i}){const r=e==="positive"?"success":e==="caution"?"warning":e==="negative"?"destructive":"neutral";return f.jsx(yS,{variant:r,...i,children:n})}function kp({status:e}){return f.jsx(Bn,{tone:J0(e),children:ZD(e)})}const n3=gv,a3=pv,bS=q.forwardRef(({className:e,...n},i)=>f.jsx(Qf,{ref:i,className:En("fixed inset-0 z-50 bg-overlay-scrim/70 backdrop-blur-sm",e),...n}));bS.displayName=Qf.displayName;const i3=400,s3=1200,r3=720,vS=q.forwardRef(({className:e,children:n,...i},r)=>{const[l,c]=q.useState(r3),d=q.useRef(!1),h=q.useRef(0),g=q.useRef(0),v=q.useCallback(N=>{d.current=!0,h.current=N.clientX,g.current=l,N.target.setPointerCapture(N.pointerId),N.preventDefault()},[l]),S=q.useCallback(N=>{if(!d.current)return;const _=h.current-N.clientX,T=Math.min(s3,Math.max(i3,g.current+_));c(T)},[]),x=q.useCallback(()=>{d.current=!1},[]);return f.jsxs(a3,{children:[f.jsx(bS,{}),f.jsxs(Kf,{ref:r,className:En("fixed z-50 flex flex-col bg-bg 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-base",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-mono-700/50 active:bg-mono-600/50 transition-colors max-md:hidden",onPointerDown:v,onPointerMove:S,onPointerUp:x}),n,f.jsxs(mv,{className:"absolute right-4 top-4 inline-flex size-8 items-center justify-center rounded-md text-muted transition hover:bg-bg-elevated hover:text-heading focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-mono-400",children:[f.jsx(Hs,{className:"size-4"}),f.jsx("span",{className:"sr-only",children:"Close"})]})]})]})});vS.displayName=Kf.displayName;const o3=({className:e,...n})=>f.jsx("div",{className:En("flex flex-col gap-1.5 pr-10",e),...n}),SS=q.forwardRef(({className:e,...n},i)=>f.jsx(Zf,{ref:i,className:En("text-lg font-medium text-primary",e),...n}));SS.displayName=Zf.displayName;const xS=q.forwardRef(({className:e,...n},i)=>f.jsx(hv,{ref:i,className:En("text-sm text-muted",e),...n}));xS.displayName=hv.displayName;function l3({title:e,subtitle:n,children:i,open:r,onClose:l}){return f.jsx(n3,{open:r,onOpenChange:c=>c?void 0:l(),children:f.jsxs(vS,{children:[f.jsxs(o3,{className:"drawer-head",children:[f.jsx("p",{className:"eyebrow eyebrow-soft",children:n}),f.jsx(SS,{id:"drawer-title",children:e}),f.jsx(xS,{className:"sr-only",children:n})]}),f.jsx("div",{className:"drawer-body",children:i})]})})}function Xr({text:e}){const[n,i]=q.useState(null),r=q.useRef(null),l=q.useCallback(()=>{if(!r.current)return;const h=r.current.getBoundingClientRect();i({top:h.top,left:h.left+h.width/2})},[]),c=q.useCallback(()=>i(null),[]),d=q.useCallback(()=>{n===null?l():c()},[n,l,c]);return f.jsxs("span",{className:"info-tooltip-wrapper",onMouseEnter:l,onMouseLeave:c,children:[f.jsx("button",{ref:r,type:"button",className:"info-tooltip-trigger","aria-label":e,"aria-expanded":n!==null,onFocus:l,onBlur:c,onClick:d,onKeyDown:h=>{h.key==="Escape"&&c()},children:f.jsxs("svg",{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&&Ow.createPortal(f.jsx("span",{"aria-hidden":"true",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:"var(--color-neutral-text)",backgroundColor:"var(--color-bg-elevated)",border:"1px solid color-mix(in oklab, var(--color-border-strong) 60%, transparent)",borderRadius:"0.5rem",boxShadow:"0 10px 15px -3px var(--color-shadow-tooltip), 0 4px 6px -4px var(--color-shadow-tooltip)"},children:e}),document.body)]})}const c3=/[\s\-_]+/;function u3(e){const n=e.split(c3).filter(Boolean);return n.length===0?null:n.map(i=>i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("[\\s\\-_]*")}function Ib(e,n){const i=d3(n),r=e.split(/(\*\*[^*]+\*\*)/).filter(Boolean).map(v=>v.startsWith("**")&&v.endsWith("**")?{type:"bold",value:v.slice(2,-2)}:{type:"text",value:v}),l=i.flatMap(v=>v.terms).filter(v=>v.trim().length>1);if(l.length===0)return r.map((v,S)=>v.type==="bold"?ks.createElement("strong",{key:`b-${S}`,className:"text-strong font-semibold"},v.value):v.value).filter(Boolean);const d=[...l].sort((v,S)=>S.length-v.length).map(u3).filter(v=>!!v);if(d.length===0)return r.map((v,S)=>v.type==="bold"?ks.createElement("strong",{key:`b-${S}`,className:"text-strong font-semibold"},v.value):v.value).filter(Boolean);const h=new RegExp(`(${d.join("|")})`,"gi"),g=new Map;for(const v of i)for(const S of v.terms){const x=lc(S);x&&!g.has(x)&&g.set(x,v.className)}return r.flatMap((v,S)=>v.value.split(h).map((N,_)=>{if(!N)return null;if(_%2===1){const k=g.get(lc(N))??"answer-highlight";return v.type==="bold"?ks.createElement("mark",{key:`hl-${S}-${_}`,className:k},ks.createElement("strong",{className:"text-strong font-semibold"},N)):ks.createElement("mark",{key:`hl-${S}-${_}`,className:k},N)}return v.type==="bold"?ks.createElement("strong",{key:`b-${S}-${_}`,className:"text-strong font-semibold"},N):N})).filter(Boolean)}function d3(e){return e.length===0?[]:typeof e[0]=="string"?[{terms:e,className:"answer-highlight"}]:e}function Mf(e){const n=(e??"").trim();return n&&(n.startsWith("/")||/^https?:\/\//i.test(n)||/^mailto:/i.test(n))?n:null}function pf(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 f3({evidence:e,project:n,onClose:i}){const[r,l]=q.useState(!1),[c,d]=q.useState("mentions"),[h,g]=q.useState(-1),[v,S]=q.useState(null),[x,N]=q.useState(!1),[_,T]=q.useState({}),k=GE(n.project),O=new Set(k.map(ic)),R=e.runHistory,I=R.length>1,[P,Z]=q.useState(null),X=q.useRef(!1);q.useEffect(()=>{if(X.current||e.answerSnippet&&(e.visibilityState!=null||e.answerMentioned!=null))return;const ee=R.at(-1);ee&&(X.current=!0,Wl(ee.runId).then(de=>{const ae=de.snapshots?.find(Ne=>Ne.query===e.query&&Ne.provider===e.provider);ae&&Z({citationState:ae.citationState,answerMentioned:ae.answerMentioned,visibilityState:ae.visibilityState,visibilityTransition:ee.visibilityTransition,provider:ae.provider,model:ae.model??e.model,answerSnippet:ae.answerText??e.answerSnippet,citedDomains:ae.citedDomains??e.citedDomains,competitorDomains:ae.competitorOverlap??e.competitorDomains,recommendedCompetitors:ae.recommendedCompetitors??e.recommendedCompetitors??[],matchedTerms:ae.matchedTerms??e.matchedTerms??[],groundingSources:ae.groundingSources??e.groundingSources,searchQueries:ae.searchQueries,evidenceUrls:[],changeLabel:e.visibilityChangeLabel??e.changeLabel,summary:e.summary})}).catch(()=>{}))},[e,R]);const J=h>=0&&v!==null,z=J?v:P||{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,searchQueries:e.searchQueries??[],evidenceUrls:e.evidenceUrls,changeLabel:e.visibilityChangeLabel??e.changeLabel,summary:e.summary},M=z.visibilityState==="pending"||z.citationState==="pending",oe=M?!1:z.visibilityState!=null?z.visibilityState==="visible":z.answerMentioned!=null?z.answerMentioned:z.citationState===sc.cited||z.citationState==="emerging",ke=z.answerMentioned!=null||z.visibilityState!=null||z.recommendedCompetitors.length>0,ze=z.citedDomains.length>0||z.groundingSources.length>0||z.evidenceUrls.length>0,Se=n.project.displayName||n.project.name,$e=[...k.map(ic),Se,Se.split(" ").slice(0,2).join(" "),...z.matchedTerms].filter(ee=>ee.trim().length>2),le=[...z.competitorDomains.flatMap(ee=>{const de=PE(ee);return de.length>=4?[de]:[]}),...z.recommendedCompetitors].filter(ee=>ee.trim().length>2),fe=[{terms:$e,className:"answer-highlight-brand"},...le.length>0?[{terms:le,className:"answer-highlight-competitor"}]:[]],$=M?"pending":z.visibilityTransition==="lost"?"lost":oe?"mentioned":"not-mentioned",W=q.useRef(0),pe=q.useCallback(async ee=>{const de=++W.current;if(ee===-1||ee===R.length-1){g(-1),S(null),l(!1);return}g(ee),l(!1);const ae=R[ee],Ne=`${ae.runId}::${e.query}::${e.provider}`;if(_[Ne]){S(_[Ne]);return}N(!0);try{const tt=await Wl(ae.runId);if(de!==W.current)return;const xe=tt.snapshots?.find(Qe=>Qe.query===e.query&&Qe.provider===e.provider)??tt.snapshots?.find(Qe=>Qe.query===e.query),Ve=xe?{citationState:xe.citationState,answerMentioned:xe.answerMentioned,visibilityState:xe.visibilityState,visibilityTransition:ae.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,searchQueries:xe.searchQueries,evidenceUrls:[],changeLabel:pf(ae.mentionTransition??ae.visibilityTransition,ae.mentionState??ae.visibilityState),summary:""}:{citationState:ae.citationState,answerMentioned:ae.answerMentioned,visibilityState:ae.visibilityState,visibilityTransition:ae.visibilityTransition,provider:e.provider,model:ae.model??null,answerSnippet:"",citedDomains:[],competitorDomains:[],recommendedCompetitors:[],matchedTerms:[],groundingSources:[],searchQueries:[],evidenceUrls:[],changeLabel:pf(ae.mentionTransition??ae.visibilityTransition,ae.mentionState??ae.visibilityState),summary:"Snapshot data not available for this run."};T(Qe=>({...Qe,[Ne]:Ve})),S(Ve)}catch{if(de!==W.current)return;S({citationState:ae.citationState,answerMentioned:ae.answerMentioned,visibilityState:ae.visibilityState,visibilityTransition:ae.visibilityTransition,provider:e.provider,model:ae.model??null,answerSnippet:"",citedDomains:[],competitorDomains:[],recommendedCompetitors:[],matchedTerms:[],groundingSources:[],searchQueries:[],evidenceUrls:[],changeLabel:pf(ae.mentionTransition??ae.visibilityTransition,ae.mentionState??ae.visibilityState),summary:"Failed to load historical run data."})}finally{de===W.current&&N(!1)}},[R,e.query,e.provider,_]),se=(J||e.historyScope!=="provider")&&z.model?`${z.provider} (${z.model}) · ${z.changeLabel.toLowerCase()}`:`${z.provider} · ${z.changeLabel.toLowerCase()}`,Ye=!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(" · "):"",F=oe?{label:"Mentioned in answer",title:"Your brand or domain is mentioned in this answer",meta:se}:z.visibilityTransition==="lost"?{label:"Mention lost",title:"Your brand no longer appears in this answer",meta:se}: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:se},ue=()=>{if(!z.answerSnippet)return null;const ee=z.answerSnippet.split(`
|
|
58
|
+
`),de=[];let ae=[],Ne=0;const tt=()=>{if(ae.length===0)return;const xe=ae.join(" ").trim();xe&&de.push(f.jsx("p",{className:de.length>0?"mt-2.5":"",children:Ib(xe,fe)},Ne++)),ae=[]};for(const xe of ee){const Ve=xe.trim();if(/^[-\u2013\u2014]{3,}$/.test(Ve)){tt(),de.push(f.jsx("hr",{className:"border-default my-3"},Ne++));continue}const Qe=Ve.match(/^(#{1,3})\s+(\S.*)$/);if(Qe){tt();const Dt=Qe[1].length,Un=Qe[2].replace(/^[\p{Emoji}\p{Emoji_Component}\s]+/u,"").trim()||Qe[2],Rt=Dt===1?"text-[13px] font-semibold text-heading mt-4 mb-1":Dt===2?"text-xs font-semibold text-strong mt-3 mb-0.5":"text-xs font-medium text-neutral mt-2";de.push(f.jsx("p",{className:Rt,children:Ib(Un,fe)},Ne++));continue}if(Ve===""){tt();continue}ae.push(Ve)}return tt(),de};return f.jsx(gv,{open:!0,onOpenChange:ee=>{ee||i()},children:f.jsxs(pv,{children:[f.jsx(Qf,{className:"fixed inset-0 z-50 bg-overlay-scrim/80 backdrop-blur-sm"}),f.jsxs(Kf,{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," ","·"," ",z.provider||"All providers"]}),f.jsx(Zf,{className:"text-lg font-semibold text-primary truncate",children:e.query})]}),f.jsxs(mv,{className:"inline-flex size-8 items-center justify-center rounded-md text-muted transition hover:bg-mono-800 hover:text-heading focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-mono-400 shrink-0",children:[f.jsx(Hs,{className:"size-4"}),f.jsx("span",{className:"sr-only",children:"Close"})]})]}),I&&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((ee,de)=>{const ae=h===-1&&de===R.length-1||h===de,Ne=ee.visibilityState??(ee.answerMentioned?"visible":"not-visible"),tt=ee.visibilityTransition??Ne,xe=Ne==="visible"?"bg-positive-400":tt==="emerging"?"bg-caution-400":tt==="lost"?"bg-negative-400":"bg-mono-600",Qe=new Date(ee.createdAt).toLocaleDateString(void 0,{month:"short",day:"numeric"}),Dt=!!(ee.model&&de>0&&R[de-1]?.model&&R[de-1].model!==ee.model);return f.jsxs("button",{type:"button",className:`evidence-run-dot ${ae?"evidence-run-dot--selected":""}`,onClick:()=>{pe(de===R.length-1?-1:de)},"aria-label":[`Run ${Qe}: ${Ne}`,ee.model?`model ${ee.model}`:null,Dt?"model changed":null].filter(Boolean).join(" — "),"aria-pressed":ae,children:[f.jsx("span",{className:`size-2 rounded-full ${xe} ${Dt?"ring-1 ring-caution-300/80 ring-offset-2 ring-offset-bg":""}`,"aria-hidden":"true"}),f.jsx("span",{className:"text-[10px] text-muted",children:Qe})]},de)})}),h>=0&&h<R.length&&f.jsxs("p",{className:"text-[11px] text-muted mt-1",children:["Viewing run from ",new Date(R[h].createdAt).toLocaleString()," ","—"," ",f.jsx("span",{className:"capitalize",children:R[h].visibilityState??(R[h].answerMentioned?"visible":"not-visible")}),f.jsxs("button",{type:"button",className:"text-secondary hover:text-strong ml-2",onClick:()=>{pe(-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(ee=>f.jsx("span",{className:"inline-flex items-center rounded-full border border-caution-400/30 bg-caution-400/10 px-2 py-1 text-[10px] text-caution-100",children:`${ee.fromModel??"unknown"} -> ${ee.toModel??"unknown"} on ${new Date(ee.createdAt).toLocaleDateString()}`},`${ee.runId}:${ee.toModel??"unknown"}`))})]}),f.jsxs("div",{className:"evidence-modal-body",children:[x&&f.jsxs("div",{className:"md:col-span-2 flex items-center justify-center py-12 text-muted text-sm",children:["Loading historical run data","…"]}),!x&&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:F.label}),f.jsx("p",{className:`evidence-position-title evidence-position-title--${$}`,children:F.title}),f.jsx("p",{className:"evidence-position-meta",children:F.meta}),Ye&&f.jsx("p",{className:"mt-1 text-[11px] text-muted",children:Ye})]}),z.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:ue()}),z.answerSnippet.length>280&&f.jsx("button",{type:"button",className:"mt-1.5 text-xs text-muted hover:text-neutral transition-colors",onClick:()=>l(!r),children:r?"↑ Collapse":"↓ Show full answer"})]}),!z.answerSnippet&&!x&&f.jsx("div",{className:"rounded-lg border border-subtle bg-surface-subtle px-4 py-8 text-center text-faint text-sm",children:"No answer text recorded for this run"}),z.searchQueries.length>0&&f.jsxs("div",{children:[f.jsxs("div",{className:"drawer-section-label flex items-center",children:[f.jsx("span",{children:"Web searches the model ran"}),f.jsx(Xr,{text:"The search queries this AI model issued while researching your prompt. They reveal how the model reformulated the question — the phrasings worth optimizing your content for. Distinct from grounding sources (what it found) and citations (what it linked)."})]}),f.jsx("ul",{className:"grid gap-1",children:z.searchQueries.map((ee,de)=>f.jsxs("li",{className:"flex items-start gap-2 text-sm text-neutral",children:[f.jsx(YA,{className:"size-3.5 mt-0.5 shrink-0 text-faint","aria-hidden":"true"}),f.jsx("span",{className:"break-words",children:ee})]},`${de}-${ee}`))})]}),!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((ee,de)=>f.jsxs("div",{className:"action-item",children:[f.jsx("svg",{className:`action-item-icon ${oe?"text-positive-400":"text-caution-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:ee})]},de))})]}),z.summary&&f.jsx("p",{className:"text-xs text-faint border-t border-subtle pt-3 mt-1",children:z.summary})]}),f.jsxs("div",{className:"evidence-modal-sidebar",children:[(ke||ze)&&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(Xr,{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"})]}),z.matchedTerms.length>0&&f.jsxs("div",{className:"mt-2",children:[f.jsx("p",{className:"text-[10px] uppercase tracking-wide text-muted mb-1.5",children:"Matched in answer"}),f.jsx("div",{className:"flex flex-wrap gap-1.5",children:z.matchedTerms.map(ee=>f.jsx("span",{className:"mention-chip mention-chip--brand",children:ee},ee))})]}),!M&&!oe&&z.matchedTerms.length===0&&f.jsxs("div",{className:"mt-2",children:[f.jsx("p",{className:"text-[10px] uppercase tracking-wide text-muted mb-1.5",children:"Searched for"}),f.jsx("div",{className:"flex flex-wrap gap-1.5",children:$e.map(ee=>f.jsx("span",{className:"mention-chip mention-chip--muted",children:ee},ee))}),f.jsx("p",{className:"text-[11px] text-faint mt-1.5",children:"None of these appear in the answer text."})]})]}),(z.recommendedCompetitors.length>0||z.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(Xr,{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 ee=z.competitorDomains.map(Ne=>Ne.replace(/^www\./,"")),de=new Set(ee.map(Ne=>lc(Ne.replace(/\.[^.]+$/,""))));return[...z.recommendedCompetitors.filter(Ne=>!de.has(lc(Ne))),...ee].map(Ne=>f.jsx("span",{className:"mention-chip mention-chip--competitor",children:Ne},Ne))})()})]})]}),c==="sources"&&f.jsxs(f.Fragment,{children:[z.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(Xr,{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:z.citedDomains.map((ee,de)=>{const ae=ee.toLowerCase().replace(/^www\./,""),Ne=O.has(ae),tt=!Ne&&z.competitorDomains.some(Ve=>Ve.toLowerCase().replace(/^www\./,"")===ae),xe=Ne?"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:["#",de+1]}),f.jsx("span",{className:"citation-leaderboard-domain",children:ee}),Ne&&f.jsx("span",{className:"citation-leaderboard-tag",children:"You"}),tt&&f.jsx("span",{className:"citation-leaderboard-tag",children:"Competitor"})]},ee)})})]}),z.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 (",z.groundingSources.length,")"]}),f.jsx(Xr,{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:z.groundingSources.map((ee,de)=>{const ae=Mf(ee.uri),Ne=ee.title||ee.uri;return f.jsx("li",{className:"truncate text-sm",children:ae?f.jsx("a",{href:ae,target:"_blank",rel:"noopener noreferrer",className:"text-secondary hover:text-strong transition-colors",children:Ne}):f.jsx("span",{className:"text-secondary",children:Ne})},de)})})]}),z.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:z.evidenceUrls.map(ee=>{const de=Mf(ee);return f.jsx("li",{className:"truncate text-sm",children:de?f.jsx("a",{href:de,target:"_blank",rel:"noopener noreferrer",className:"text-secondary hover:text-strong transition-colors",children:ee}):f.jsx("span",{className:"text-secondary",children:ee})},ee)})})]}),z.citedDomains.length===0&&z.groundingSources.length===0&&z.evidenceUrls.length===0&&f.jsxs("div",{className:"flex items-center justify-center h-24 text-faint text-sm",children:["No source data ",J?"for this run":"yet"]})]}),!ke&&!ze&&f.jsxs("div",{className:"flex items-center justify-center h-24 text-faint text-sm",children:["No answer visibility data ",J?"for this run":"yet"]})]})]})]})]})]})})}function p3(e){const n=e.match(/^\/projects\/([^/]+)/);if(!n)return null;try{return decodeURIComponent(n[1])}catch{return n[1]}}function m3(e,n){return e?n?.projects.find(r=>r.project.name===e||r.project.id===e)?.project.name??e:null}function h3(e,n){return m3(p3(e),n)}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 mf=[{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 kc(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 g3=kc({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"}),y3=kc({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"}),b3=kc({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"}),v3=kc({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"}),S3=[{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"])}];mf[0],Math.round(1/9*100),Math.round(2/9*100),mf[1],Mn(["cited","cited","cited","cited","cited"]),mf[2],Math.round(2/7*100),Math.round(3/7*100),Mn(["not-cited","not-cited","not-cited","cited"]);function x3(e,n){return e.runs.find(i=>i.id===n)}function w3(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 j3(e,n,i){if(e){const r=e.visibilityEvidence.find(l=>l.id===i);if(r)return{project:e,evidence:r}}if(n)return w3(n,i)}const N3={regression:"negative",gain:"positive",opportunity:"caution","first-citation":"positive","provider-pickup":"positive","persistent-gap":"caution","competitor-gained":"negative","competitor-lost":"neutral","gbp-lodging-gap":"negative","gbp-listing-discrepancy":"negative","gbp-cta-gap":"caution","gbp-description-missing":"caution","gbp-metric-drop":"negative","gbp-keyword-drop":"negative"},k3={opportunity:"write","persistent-gap":"write","competitor-gained":"write","competitor-lost":"write",regression:"investigate",gain:"monitor","first-citation":"monitor","provider-pickup":"monitor","gbp-lodging-gap":"write","gbp-listing-discrepancy":"write","gbp-cta-gap":"write","gbp-description-missing":"write","gbp-metric-drop":"investigate","gbp-keyword-drop":"investigate"},A3={regression:"lost",gain:"emerging",opportunity:"not-cited","first-citation":"emerging","provider-pickup":"emerging","persistent-gap":"not-cited","competitor-gained":"cited","competitor-lost":"not-cited","gbp-lodging-gap":"not-cited","gbp-listing-discrepancy":"not-cited","gbp-cta-gap":"not-cited","gbp-description-missing":"not-cited","gbp-metric-drop":"lost","gbp-keyword-drop":"lost"},_3={regression:"Regression",gain:"Gain",opportunity:"Opportunity","first-citation":"First citation","provider-pickup":"Pickup","persistent-gap":"Gap","competitor-gained":"Competitor","competitor-lost":"Competitor","gbp-lodging-gap":"Lodging gap","gbp-listing-discrepancy":"Listing gap","gbp-cta-gap":"Booking CTA","gbp-description-missing":"Description gap","gbp-metric-drop":"Metric drop","gbp-keyword-drop":"Keyword drop"};function C3(e){return{id:e.id,tone:N3[e.type],title:e.title,detail:e.cause?.details??e.cause?.cause??"",actionLabel:e.recommendation?.action??_3[e.type],actionGroup:k3[e.type],affectedPhrases:[{query:e.query,evidenceId:"",provider:e.provider,citationState:A3[e.type]}]}}function T3(e){return e.filter(n=>!n.dismissed).map(C3)}function wS(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 Pb(e){try{return new Date(e).toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}catch{return e}}function E3(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 jS(e){switch(e){case Ae["answer-visibility"]:return"Answer visibility sweep";case Ae["gsc-sync"]:return"GSC sync";case Ae["inspect-sitemap"]:return"Sitemap inspection";case Ae["ga-sync"]:return"GA sync";case Ae["traffic-sync"]:return"Traffic sync";case Ae["bing-inspect"]:return"Bing URL inspection";case Ae["bing-inspect-sitemap"]:return"Bing sitemap inspection";case Ae["site-audit"]:return"Site audit";case Ae["backlink-extract"]:return"Backlink extract";case Ae["aeo-discover-seed"]:return"Discovery (seed phase)";case Ae["aeo-discover-probe"]:return"Discovery (probe phase)";case Ae["gbp-sync"]:return"Business Profile sync";case Ae["ads-sync"]:return"ChatGPT ads sync"}}function O3(e){return e===Ms.manual?"Manual":e===Ms.scheduled?"Scheduled":e===Ms["config-apply"]?"Config apply":e}function Ap(e,n){return{id:e.id,projectId:e.projectId,projectName:n,kind:e.kind,kindLabel:jS(e.kind),status:e.status,trigger:e.trigger??"manual",location:e.location??null,createdAt:e.createdAt,startedAt:e.startedAt?Pb(e.startedAt):Pb(e.createdAt),duration:E3(e.startedAt??null,e.finishedAt??null),statusDetail:e.error?NS(e.error):z3(e),summary:D3(e),triggerLabel:O3(e.trigger)}}function NS(e){const n=op(e);return n.length>200?n.slice(0,200)+"…":n}function z3(e){switch(e.status){case Qt.queued:return"Waiting for execution slot.";case Qt.running:return"Provider queries in progress.";case Qt.completed:return"All queries checked.";case Qt.partial:return"Run completed with some queries skipped.";case Qt.failed:return e.error?NS(e.error):"Run failed.";case Qt.cancelled:return"Run was cancelled.";default:return""}}function D3(e){const n=jS(e.kind);switch(e.status){case Qt.queued:return`${n} queued`;case Qt.running:return`${n} in progress`;case Qt.completed:return`${n} completed`;case Qt.partial:return`${n} partially completed`;case Qt.failed:return`${n} failed`;case Qt.cancelled:return`${n} cancelled`;default:return e.status}}function R3(e,n,i,r){const l=[];let c=0;const d=new Set;if(i.length>0){const h=i.flatMap(T=>T.snapshots??[]),g=new Map;for(const T of h)if(T.query){const k=`${T.query}::${T.provider}::${T.location??""}`;g.set(k,T)}const v=new Set(h.map(T=>T.location??null));v.size===0&&v.add(null);const S=new Set(h.map(T=>T.provider)),x=new Set(n.flatMap(T=>Object.keys(T.providerRuns??{}))),N=[...new Set([...S,...x])].sort(),_=N.length>0?N:["gemini"];for(const T of n){if(T.runs.length===0)continue;d.add(T.query);const k=T.runs.at(-1),O=k?.transition??"not-cited";for(const R of _){const I=[...v].filter(X=>g.has(`${T.query}::${R}::${X??""}`)),P=(T.providerRuns?.[R]?.length??0)>0,Z=I.length>0?I:P?[null]:[];for(const X of Z){const J=X??"",z=g.get(`${T.query}::${R}::${J}`),M=z?.model??null,oe=M?`${R}:${M}`:null,ke=T.providerRuns?.[R],ze=oe?T.modelRuns?.[oe]:void 0,Se=Ve=>Ve?.filter(Qe=>(Qe.location??null)===X),$e=I.length>0?Se(ke):ke,le=I.length>0?Se(ze):ze,fe=($e?.length?$e:null)??(le?.length?le:null),$=$e?.length?"provider":le?.length?"model":"query",W=fe?fe.at(-1).transition:O,pe=fe?fe.at(-1).visibilityTransition??(fe.at(-1).visibilityState==="visible"?"visible":"not-visible"):k?.visibilityTransition??(k?.visibilityState==="visible"?"visible":"not-visible"),je=fe?.at(-1)?.citationState,se=fe?.at(-1)?.visibilityState,Ye=z?W==="lost"?"lost":W==="emerging"?"emerging":z.citationState===sc.cited?"cited":"not-cited":je===sc.cited?"cited":"not-cited",F=z?.visibilityState??(se==="visible"?"visible":se==="pending"?"pending":"not-visible"),ue=Gb(fe||T.runs),ee=Hb(fe||T.runs),de=M3(T,R),ae=(fe??T.runs).map(Ve=>({runId:Ve.runId,citationState:Ve.citationState,createdAt:Ve.createdAt,model:de.get(Ve.runId)??null,answerMentioned:Ve.answerMentioned,visibilityState:Ve.visibilityState,visibilityTransition:Ve.visibilityTransition,mentionState:Ve.mentionState,mentionTransition:Ve.mentionTransition})),Ne=B3(ae),tt=$==="provider"&&Ne.length<=1?"model":$,xe=L3(ae);l.push({id:`evidence_${e}_${c++}`,query:T.query,provider:z?.provider??R,model:z?.model??null,location:z?.location??X,citationState:Ye,answerMentioned:z?.answerMentioned,visibilityState:F,visibilityChangeLabel:Qb(pe,ee,{positive:"visible",negative:"not visible",first:"first visibility"}),changeLabel:Qb(W,ue),answerSnippet:z?.answerText??"",citedDomains:z?.citedDomains??[],evidenceUrls:[],competitorDomains:z?.competitorOverlap??[],recommendedCompetitors:z?.recommendedCompetitors??[],matchedTerms:z?.matchedTerms??[],relatedTechnicalSignals:[],groundingSources:z?.groundingSources??[],searchQueries:z?.searchQueries??[],summary:q3(F,pe,T.query),runHistory:ae,historyScope:tt,modelsSeen:Ne,modelTransitions:xe})}}}}for(const h of r)d.has(h.query)||l.push({id:`evidence_${e}_${c++}`,query:h.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:[],searchQueries:[],summary:`"${h.query}" has been added but no visibility run has been triggered yet.`,runHistory:[],historyScope:"query",modelsSeen:[],modelTransitions:[]});return l}function M3(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),h=d==="unknown"?null:d;for(const g of c)i.set(g.runId,h)}return i}function B3(e){const n=new Set;for(const i of e)i.model&&n.add(i.model);return[...n]}function L3(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 Gb(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 Hb(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 Qb(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?`${Fr(r.positive)} in latest run`:`${Fr(r.positive)} for ${n} runs`;case"lost":return"Lost since last run";case"emerging":return Fr(r.first);case"not-cited":case"not-visible":return n<=1?`${Fr(r.negative)} in latest run`:`${Fr(r.negative)} across ${n} runs`;default:return e}}function Fr(e){return e.charAt(0).toUpperCase()+e.slice(1)}function q3(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 kS(e){const n=wS(e.project),i=R3(n.name,e.timeline,e.latestRunDetails,e.queries),l=[...e.runs].sort((c,d)=>d.createdAt.localeCompare(c.createdAt)).map(c=>Ap(c,e.project.displayName||e.project.name));return e.overview?U3(n,e.overview,i,l):$3(n,i,l)}function U3(e,n,i,r){const l=T3(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,citationMovement:n.citationMovement,mentionMovement:n.mentionMovement,movementComparison:n.movementComparison,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 $3(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"},citationMovement:{gained:0,lost:0,tone:"neutral",hasPreviousRun:!1},mentionMovement:{gained:0,lost:0,tone:"neutral",hasPreviousRun:!1},movementComparison:{hasPreviousRun:!1,comparable:!1,querySetChanged:!1,previousRunAt:null,currentQueryCount:0,previousQueryCount:0,comparableQueryCount:0,addedQueryCount:0,removedQueryCount:0,addedQueries:[],removedQueries:[]},insights:[],visibilityEvidence:n,competitors:[],recentRuns:i.slice(0,5),suggestedQueries:{rows:[],totalCandidates:0,skippedAlreadyTracked:0}}}function V3(e){const n=wS(e.project),i=[...e.runs].sort((N,_)=>_.createdAt.localeCompare(N.createdAt)),r=i.find(N=>N.kind===Ae["answer-visibility"])??i[0]??e.overview?.latestRun?.run??void 0,l=e.project.displayName||e.project.name,c=r?Ap(r,l):I3(e.project.id,l),d=e.overview;if(!d)return{project:n,mentionScore:0,mentionDelta:"No data",mentionTone:"neutral",lastRun:c,insight:"No runs completed yet.",trend:[],competitorPressureLabel:"None"};const h=d.scores.mention,g=h.progress??0,v=d.queryCounts.mentionedQueries,S=d.queryCounts.totalQueries,x=d.providers.length;return{project:n,mentionScore:g,mentionDelta:S>0?`${v} of ${S} queries`:"No data",mentionTone:h.tone,providerCoverage:h.providerCoverage,lastRun:c,insight:S>0?`${v} of ${S} queries mentioned across ${x} provider${x===1?"":"s"}.`:"No runs completed yet.",trend:h.trend??[],competitorPressureLabel:d.scores.competitorPressure.value}}function I3(e,n){return{id:"none",projectId:e,projectName:n,kind:Ae["answer-visibility"],kindLabel:"No runs yet",status:Qt.queued,trigger:Ms.manual,createdAt:"",startedAt:"",duration:"",statusDetail:"",summary:"No runs yet",triggerLabel:""}}function P3(e,n){const i=[],r=[],l=[];for(const d of e){r.push(kS(d)),l.push(V3(d));const h=[...d.runs].sort((g,v)=>v.createdAt.localeCompare(g.createdAt));for(const g of h)i.push(Ap(g,d.project.displayName||d.project.name))}i.sort((d,h)=>h.createdAt.localeCompare(d.createdAt));const c=e.length>0;return{portfolioOverview:{projects:l,attentionItems:c?G3(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,defaultModel:d.defaultModel,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 G3(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/${encodeURIComponent(i.project.name)}`});const l=i.recentRuns.filter(c=>c.status===Qt.running||c.status===Qt.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."}),n}const AS=q.createContext(null);AS.Provider;function uo(){return q.useContext(AS)}function Ac(e){const i=uo()?.dashboard??null,r=fn({...wc({client:te}),enabled:!i,refetchInterval:Wk}),l=fn({...X0({client:te,query:{kind:"answer-visibility"}}),enabled:!i,staleTime:ao,refetchInterval:T=>T.state.data?.some(R=>R.status==="running"||R.status==="queued")?3e3:ao}),c=fn({...c4({client:te}),enabled:!i}),d=r.data??[],h=l.data??[],g=zw({queries:d.map(T=>{const k=h.filter(I=>I.projectId===T.id),O=k.filter(I=>(I.status==="completed"||I.status==="partial")&&I.kind==="answer-visibility"&&I.trigger!=="probe").sort((I,P)=>P.createdAt.localeCompare(I.createdAt)),R=O.length>0?O[0].id:"no-run";return{queryKey:["project-overview-slim",T.id,R],queryFn:async()=>{const I=await Dv(T.name).catch(()=>null);return{project:T,runs:k,queries:[],competitors:[],timeline:[],latestRunDetails:[],previousRunDetails:[],gscCoverage:null,bingCoverage:null,dbInsights:null,overview:I}},enabled:!i&&r.isSuccess&&l.isSuccess,staleTime:Af}})}),v=g.every(T=>T.isSuccess),S=q.useMemo(()=>{if(i)return i;if(!r.data||!l.data||d.length>0&&!v)return null;const T=g.map(k=>k.data?{...k.data,runs:h.filter(O=>O.projectId===k.data.project.id)}:null).filter(k=>k!=null);return P3(T,c.data??null)},[i,r.data,l.data,c.data,v,g,d.length,h]),x=!i&&(r.isError||l.isError),N=!i&&!S&&!x,_=q.useCallback(async()=>{await Promise.all([r.refetch(),l.refetch(),c.refetch()])},[r.refetch,l.refetch,c.refetch]);return{dashboard:S,isLoading:N,isError:x,refetch:_}}function H3(e){const n=uo(),i=q.useMemo(()=>!n||!e?null:n.dashboard.projects.find(T=>T.project.name===e)??null,[n,e]),r=fn({...i4({client:te,path:{name:e??""}}),enabled:!!e&&!i,staleTime:Af,refetchOnWindowFocus:"always"}),l=fn({...r4({client:te,path:{name:e??""},query:{kind:"answer-visibility"}}),enabled:!!e,staleTime:ao,refetchOnWindowFocus:"always",refetchInterval:T=>T.state.data?.some(R=>R.projectId===r.data?.id&&(R.status==="running"||R.status==="queued"))?3e3:ao}),c=r.data??null,d=q.useMemo(()=>c?(l.data??[]).filter(T=>T.projectId===c.id):[],[c,l.data]),{latestRunIds:h,previousRunIds:g,latestRunIdsKey:v}=q.useMemo(()=>{const T=d.filter(P=>(P.status==="completed"||P.status==="partial")&&P.kind==="answer-visibility"&&P.trigger!=="probe").sort((P,Z)=>Z.createdAt.localeCompare(P.createdAt)),k=T[0]?.createdAt??null,O=k?T.filter(P=>P.createdAt===k).map(P=>P.id):[],R=T.find(P=>P.createdAt!==k)?.createdAt??null,I=R?T.filter(P=>P.createdAt===R).map(P=>P.id):[];return{latestRunIds:O,previousRunIds:I,latestRunIdsKey:[...O].sort().join(",")}},[d]),S=fn({queryKey:["project-dashboard-full",c?.id??null,v||"none"],queryFn:async()=>{if(!c||!e)return null;const[T,k,O,R,I,P,Z,X,J]=await Promise.all([jk(e).catch(()=>[]),Nk(e).catch(()=>[]),kk(e).catch(()=>[]),h.length?Promise.all(h.map(z=>Wl(z).catch(()=>null))).then(z=>z.filter(M=>M!=null)):Promise.resolve([]),g.length?Promise.all(g.map(z=>Wl(z).catch(()=>null))).then(z=>z.filter(M=>M!=null)):Promise.resolve([]),qk(e).catch(()=>null),Vk(e).catch(()=>null),Pk(e).catch(()=>null),Dv(e).catch(()=>null)]);return{project:c,runs:d,queries:T,competitors:k,timeline:O,latestRunDetails:R,previousRunDetails:I,gscCoverage:P,bingCoverage:Z,dbInsights:X,overview:J}},enabled:!!c&&!!e&&l.isSuccess,staleTime:Af,refetchOnWindowFocus:"always",refetchInterval:eA}),x=q.useMemo(()=>S.data?kS({...S.data,runs:d}):i||null,[S.data,d,i]),N=q.useCallback(async()=>{await Promise.all([r.refetch(),l.refetch(),S.refetch()])},[r.refetch,l.refetch,S.refetch]),_=!x&&(r.isLoading||l.isLoading||S.isLoading);return{commandCenter:x,project:c,isLoading:_,isError:r.isError||l.isError||S.isError,refetch:N}}const Q3=["health"];async function K3(){const e=await Hk("/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 _p(e,n){return fn({queryKey:Q3,queryFn:K3,enabled:e,refetchInterval:15e3,initialData:n})}function Z3(e){return fn({...F0({client:te,path:{id:e??""}}),enabled:!!e,refetchInterval:n=>{const i=n.state.data?.status;return i==="running"||i==="queued"?3e3:!1}})}function Cp(){const e=fc(),n=Dw({strict:!1}),i=Rw({select:g=>g.location.pathname}),r=n.runId??null,l=n.evidenceId??null;return{runId:r,evidenceId:l,openRun:g=>{e({to:i,from:nn.to,search:v=>({...v,runId:g,evidenceId:void 0})})},openEvidence:g=>{e({to:i,from:nn.to,search:v=>({...v,evidenceId:g,runId:void 0})})},closeDrawer:()=>{e({to:i,from:nn.to,search:g=>({...g,runId:void 0,evidenceId:void 0})})}}}const Y3={negative:"toast-card-negative",caution:"toast-card-caution",positive:"toast-card-positive",neutral:"toast-card-neutral"};function X3(e){if(e.cta)return`${e.cta.label}: ${e.title}`}function F3(){const e=q.useSyncExternalStore(Fk,Zy,Zy),n=fc(),{openRun:i}=Cp(),r=q.useCallback(c=>{kf(c)},[]),l=q.useCallback(c=>{c.cta&&(c.cta.intent==="open-run-drawer"?i(c.cta.runId):n({to:"/runs"}),kf(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 ${Y3[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":X3(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))})}function J3(e,n={}){const{threshold:i=80}=n,r=q.useRef(null),l=q.useRef({scrollHeight:0,wasAtEnd:!0});function c(g){return g.scrollHeight-g.scrollTop-g.clientHeight}function d(){const g=r.current;return g?c(g)<=i:!0}function h(){const g=r.current;g&&(g.scrollTop=g.scrollHeight,l.current.wasAtEnd=!0,l.current.scrollHeight=g.scrollHeight)}return q.useEffect(()=>{const g=r.current;if(!g)return;const v=()=>{l.current.wasAtEnd=c(g)<=i};return g.addEventListener("scroll",v,{passive:!0}),()=>g.removeEventListener("scroll",v)},[i]),q.useLayoutEffect(()=>{const g=r.current;if(!g)return;const v=g.scrollHeight;v>l.current.scrollHeight&&l.current.wasAtEnd&&(g.scrollTop=v),l.current.scrollHeight=v},e),q.useEffect(()=>{const g=r.current;if(!g||typeof ResizeObserver>"u")return;const v=new ResizeObserver(()=>{const S=g.scrollHeight;S>l.current.scrollHeight&&l.current.wasAtEnd&&(g.scrollTop=S),l.current.scrollHeight=S});return v.observe(g),g.firstElementChild&&v.observe(g.firstElementChild),()=>v.disconnect()},[]),{ref:r,scrollToEnd:h,isAtEnd:d}}async function Tp(e){try{return await e.json()}catch{return{}}}function W3(){return typeof window<"u"&&window.__CANONRY_CONFIG__?.basePath?window.__CANONRY_CONFIG__.basePath.replace(/\/$/,"")+"/api/v1":"/api/v1"}const Ep=W3();function Op(e){e===401&&Yf()}async function Kb(e){const n=await fetch(`${Ep}/projects/${encodeURIComponent(e)}/agent/transcript`,{credentials:"include"});if(!n.ok){Op(n.status);const i=await Tp(n);throw new Hn(i.error?.message??`transcript fetch failed: ${n.status}`,n.status,i.error?.code)}return await n.json()}async function eM(e){const n=await fetch(`${Ep}/projects/${encodeURIComponent(e)}/agent/transcript`,{method:"DELETE",credentials:"include"});if(!n.ok){Op(n.status);const i=await Tp(n);throw new Hn(i.error?.message??`reset failed: ${n.status}`,n.status,i.error?.code)}}async function tM({project:e,prompt:n,provider:i,modelId:r,scope:l,profile:c,signal:d,onEvent:h}){const g={prompt:n};i&&(g.provider=i),r&&(g.modelId=r),l&&(g.scope=l),c&&(g.profile=c);const v=await fetch(`${Ep}/projects/${encodeURIComponent(e)}/agent/prompt`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(g),signal:d});if(!v.ok||!v.body){Op(v.status);const T=await Tp(v);throw new Hn(T.error?.message??`prompt failed: ${v.status}`,v.status,T.error?.code)}const S=v.body.getReader(),x=new TextDecoder;let N="";const _=()=>{S.cancel().catch(()=>{})};d?.addEventListener("abort",_,{once:!0});try{for(;;){const{value:T,done:k}=await S.read();if(k)break;N+=x.decode(T,{stream:!0});let O=N.indexOf(`
|
|
59
59
|
|
|
60
60
|
`);for(;O!==-1;){const R=N.slice(0,O);N=N.slice(O+2);for(const I of R.split(`
|
|
61
61
|
`)){if(!I.startsWith("data:"))continue;const P=I.slice(5).trim();if(P)try{h(JSON.parse(P))}catch{}}O=N.indexOf(`
|
|
62
62
|
|
|
63
|
-
`)}}}finally{d?.removeEventListener("abort",_);try{S.releaseLock()}catch{}}}function NS(e){return!e||e.role!=="assistant"?"":e.content.filter(n=>n.type==="text").map(n=>n.text).join("")}const J3=[{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?"}],F3=[{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"}],Il=e=>`canonry:aero:provider:${e}`,Kb=e=>`canonry:aero:scope:${e}`;function W3({projectName:e}){const[n,i]=q.useState(!1),[r,l]=q.useState(!1),[c,d]=q.useState([]),[h,g]=q.useState(""),[v,S]=q.useState(!1),[x,N]=q.useState([]),[_,T]=q.useState(""),[k,O]=q.useState(null),[R,I]=q.useState(()=>typeof window>"u"?null:window.localStorage.getItem(Il(e))??null),[P,Z]=q.useState(()=>typeof window>"u"?"read-only":window.localStorage.getItem(Kb(e))==="all"?"all":"read-only"),X=q.useRef(null),{ref:F}=K3([c,_,x]),z=q.useRef(null),[M,oe]=q.useState(0),ke=q.useMemo(()=>{const J=h.trimStart();if(!J.startsWith("/"))return[];if(/\s/.test(J))return[];const ue=J.toLowerCase();return F3.filter(ee=>ee.command.startsWith(ue)||ee.label.toLowerCase().includes(ue.slice(1)))},[h]);q.useEffect(()=>{oe(J=>ke.length===0?0:Math.min(J,ke.length-1))},[ke.length]);const ze=fn({...I4({client:te,path:{name:e}}),enabled:n,staleTime:6e4}),Se=q.useMemo(()=>{const J=ze.data?.providers??[];if(R){const ee=J.find(de=>de.id===R&&de.configured);if(ee)return ee}const ue=ze.data?.defaultProvider;return ue?J.find(ee=>ee.id===ue)??null:null},[R,ze.data]);q.useEffect(()=>{if(!ze.data||!R)return;ze.data.providers.find(ue=>ue.id===R&&ue.configured)||(I(null),window.localStorage.removeItem(Il(e)))},[ze.data,R,e]);const He=q.useCallback(J=>{I(J),!(typeof window>"u")&&(J?window.localStorage.setItem(Il(e),J):window.localStorage.removeItem(Il(e)))},[e]),le=q.useCallback(()=>{Z(J=>{const ue=J==="all"?"read-only":"all";return typeof window<"u"&&window.localStorage.setItem(Kb(e),ue),ue})},[e]);q.useEffect(()=>{if(!n)return;const J=ue=>{ue.key==="Escape"&&(r?l(!1):i(!1))};return window.addEventListener("keydown",J),()=>window.removeEventListener("keydown",J)},[n,r]),q.useEffect(()=>{if(!n)return;let J=!1;O(null);const ue=()=>{J||v||Qb(e).then(ae=>{J||d(ae.messages)}).catch(ae=>{J||O(ae instanceof Error?ae.message:"Failed to load transcript")})};ue();const de=window.setInterval(ue,15e3);return()=>{J=!0,window.clearInterval(de)}},[n,e,v]),q.useEffect(()=>()=>{X.current?.abort()},[e]);async function pe(J){const ue=J.trim();if(!ue||v)return;O(null),g(""),S(!0),T(""),N([]);const ee={role:"user",content:ue,timestamp:Date.now()};d(ae=>[...ae,ee]);const de=new AbortController;X.current=de;try{await X3({project:e,prompt:ue,provider:R??void 0,scope:P,signal:de.signal,onEvent:$});const ae=await Qb(e);d(ae.messages)}catch(ae){ae.name!=="AbortError"&&O(ae instanceof Error?ae.message:"Prompt failed")}finally{S(!1),T(""),X.current=null}}function $(J){switch(J.type){case"message_update":T(NS(J.message));break;case"message_end":J.message.role==="assistant"&&T("");break;case"tool_execution_start":N(ue=>[...ue,{id:J.toolCallId,name:J.toolName,args:J.args,startedAt:Date.now()}]);break;case"tool_execution_end":N(ue=>ue.map(ee=>ee.id===J.toolCallId?{...ee,endedAt:Date.now(),isError:J.isError,result:J.result}:ee));break;case"error":O(J.message);break}}async function W(){X.current?.abort();try{await Y3(e),d([]),O(null)}catch(J){O(J instanceof Error?J.message:"Reset failed")}}const fe=c.length===0,je=n&&r?"pointer-events-auto fixed inset-0 z-40 flex items-stretch justify-center bg-bg/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",se=r?"pointer-events-auto flex h-full w-full max-w-5xl flex-col overflow-hidden rounded-2xl border border-mono-800/80 bg-bg/95 shadow-2xl":"pointer-events-auto w-full max-w-3xl",Ye=r?"flex-1 overflow-y-auto px-6 py-5 text-sm text-strong":"max-h-[40vh] min-h-[120px] overflow-y-auto px-4 py-3 text-sm text-strong";return f.jsx("div",{className:je,onClick:J=>{r&&J.target===J.currentTarget&&l(!1)},children:f.jsx("div",{className:se,children:n?f.jsxs("div",{className:r?"flex h-full flex-col":"flex flex-col overflow-hidden rounded-2xl border border-mono-800/80 bg-bg/95 shadow-xl backdrop-blur",children:[f.jsxs("div",{className:"flex items-center justify-between gap-2 border-b border-mono-800/70 px-4 py-2.5",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(Fy,{className:"h-4 w-4 text-positive-400","aria-hidden":"true"}),f.jsx("span",{className:"text-sm font-medium text-heading",children:"Aero"}),f.jsx("span",{className:"text-[10px] uppercase tracking-wider text-muted",children:v?"working…":e})]}),f.jsxs("div",{className:"flex items-center gap-1",children:[f.jsx(eM,{providers:ze.data?.providers??[],active:Se,override:R,onPick:He,disabled:v}),f.jsx("button",{type:"button",onClick:Nn(W),className:"rounded-md p-1.5 text-muted transition hover:bg-surface-inset hover:text-strong","aria-label":"Reset conversation",title:"Reset conversation",children:f.jsx(Mv,{className:"h-3.5 w-3.5","aria-hidden":"true"})}),f.jsx("button",{type:"button",onClick:()=>l(J=>!J),className:"rounded-md p-1.5 text-muted transition hover:bg-surface-inset hover:text-strong","aria-label":r?"Collapse":"Expand",title:r?"Collapse":"Expand",children:r?f.jsx(MA,{className:"h-3.5 w-3.5","aria-hidden":"true"}):f.jsx(OA,{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-muted transition hover:bg-surface-inset hover:text-strong","aria-label":"Close Aero",children:f.jsx(Hs,{className:"h-4 w-4","aria-hidden":"true"})})]})]}),f.jsxs("div",{ref:F,className:Ye,children:[k&&f.jsx("div",{className:"mb-2 rounded-md border border-negative-700/40 bg-negative-950/40 px-3 py-2 text-xs text-negative-200",children:k}),fe&&!v&&f.jsxs("div",{className:"flex flex-col gap-3 py-2",children:[f.jsxs("p",{className:"text-xs text-muted",children:["Ask anything about ",f.jsx("span",{className:"text-neutral",children:e}),", or start with:"]}),f.jsx("div",{className:"flex flex-wrap gap-1.5",children:J3.map(J=>f.jsx("button",{type:"button",onClick:()=>{pe(J.prompt)},className:"rounded-full border border-base bg-bg-elevated/70 px-3 py-1 text-xs text-neutral transition hover:border-strong hover:bg-mono-800/70 hover:text-heading",children:J.label},J.label))})]}),sM(c,e,R,P),x.length>0&&f.jsx("div",{className:"mt-3 space-y-1.5",children:x.map(J=>f.jsx(kS,{trail:J},J.id))}),v&&_&&f.jsxs("div",{className:"mt-3",children:[f.jsx("div",{className:"mb-0.5 text-[10px] uppercase tracking-wider text-positive-400",children:"Aero"}),f.jsx(AS,{content:_})]}),v&&!_&&x.every(J=>J.endedAt!==void 0)&&f.jsx(cM,{})]}),f.jsx(tM,{projectName:e,activeProvider:Se,scope:P,onToggleScope:le,disabled:v}),f.jsxs("div",{className:"relative",children:[ke.length>0&&f.jsx(nM,{matches:ke,selectedIndex:M,onHover:oe,onPick:J=>{g(""),z.current?.focus(),J.action==="clear"?W():pe(J.prompt)}}),f.jsxs("form",{className:"flex items-end gap-2 border-t border-mono-800/70 bg-bg/80 px-3 py-2.5",onSubmit:J=>{if(J.preventDefault(),ke.length>0){const ue=ke[M];g(""),ue.action==="clear"?W():pe(ue.prompt);return}pe(h)},children:[f.jsx("textarea",{ref:z,value:h,onChange:J=>g(J.target.value),onKeyDown:J=>{if(ke.length>0){if(J.key==="ArrowDown"){J.preventDefault(),oe(ue=>(ue+1)%ke.length);return}if(J.key==="ArrowUp"){J.preventDefault(),oe(ue=>(ue-1+ke.length)%ke.length);return}if(J.key==="Tab"){J.preventDefault();const ue=ke[M];g(`${ue.command} `);return}if(J.key==="Escape"){J.preventDefault(),g("");return}}if(J.key==="Enter"&&!J.shiftKey)if(J.preventDefault(),ke.length>0){const ue=ke[M];g(""),ue.action==="clear"?W():pe(ue.prompt)}else pe(h)},placeholder:"Ask Aero, or / for commands…",disabled:v,rows:r?3:1,className:"flex-1 resize-none bg-transparent text-sm text-heading placeholder:text-mono-600 focus:outline-none disabled:opacity-60"}),f.jsx("button",{type:"submit",disabled:v||!h.trim(),className:"inline-flex h-7 w-7 items-center justify-center rounded-md bg-positive-500 text-accent-fg transition hover:bg-positive-400 disabled:opacity-40","aria-label":"Send",children:f.jsx(cA,{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-mono-800/80 bg-bg/95 px-4 py-2 text-left text-sm text-secondary shadow-lg backdrop-blur transition hover:border-strong hover:bg-bg-elevated/90 hover:text-strong",children:[f.jsxs("span",{className:"flex items-center gap-2",children:[f.jsx(Fy,{className:"h-4 w-4 text-positive-400","aria-hidden":"true"}),"Ask Aero about ",e,"…"]}),f.jsx("span",{className:"text-[10px] uppercase tracking-wider text-faint",children:"Enter"})]})})})}function eM({providers:e,active:n,override:i,onPick:r,disabled:l}){const[c,d]=q.useState(!1),h=q.useRef(null);if(q.useEffect(()=>{if(!c)return;const S=N=>{h.current?.contains(N.target)||d(!1)},x=N=>{N.key==="Escape"&&d(!1)};return window.addEventListener("mousedown",S),window.addEventListener("keydown",x),()=>{window.removeEventListener("mousedown",S),window.removeEventListener("keydown",x)}},[c]),e.length===0)return null;const g=n?.label.replace(/\s+\(.+\)$/,"")??"No provider",v=n?.defaultModel;return f.jsxs("div",{ref:h,className:"relative",children:[f.jsxs("button",{type:"button",onClick:()=>d(S=>!S),disabled:l,className:"flex items-center gap-1 rounded-md px-1.5 py-1 text-[11px] text-secondary transition hover:bg-surface-inset hover:text-strong 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-strong",children:g}),v&&f.jsx("span",{className:"hidden font-mono text-[10px] text-muted sm:inline",children:v}),f.jsx(mA,{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-base bg-bg shadow-xl",children:[f.jsx("div",{className:"border-b border-default px-3 py-2 text-[10px] uppercase tracking-wider text-muted",children:"Aero provider"}),f.jsx("ul",{className:"max-h-72 overflow-y-auto py-1",children:e.map(S=>{const x=n?.id===S.id,N=i===S.id;return f.jsx("li",{children:f.jsxs("button",{type:"button",role:"option","aria-selected":x,disabled:!S.configured,onClick:()=>{S.configured&&(r(N?null:S.id),d(!1))},className:"flex w-full items-start gap-2 px-3 py-2 text-left text-xs transition enabled:hover:bg-bg-elevated 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:x?f.jsx(Rv,{className:"h-3 w-3 text-positive-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-heading",children:S.label}),N&&f.jsx("span",{className:"rounded-full border border-positive-800/60 bg-positive-950/60 px-1.5 text-[9px] uppercase tracking-wider text-positive",children:"Pinned"}),!S.configured&&f.jsx("span",{className:"rounded-full border border-base px-1.5 text-[9px] uppercase tracking-wider text-muted",children:"Key missing"})]}),f.jsx("span",{className:"mt-0.5 block font-mono text-[10px] text-muted",children:S.defaultModel}),S.keySource==="env"&&f.jsx("span",{className:"mt-0.5 block text-[10px] text-faint",children:"via env var"}),!S.configured&&f.jsxs("span",{className:"mt-0.5 block text-[10px] text-faint",children:["Add key in config.yaml or export"," ",f.jsx("code",{className:"font-mono text-secondary",children:aM(S.id)})]})]})]})},S.id)})}),i&&f.jsx("button",{type:"button",onClick:()=>{r(null),d(!1)},className:"w-full border-t border-default px-3 py-2 text-left text-[11px] text-secondary transition hover:bg-bg-elevated hover:text-heading",children:"Reset to auto-detected default"})]})]})}function tM({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-mono-800/70 bg-bg/80 px-3 pt-2",children:[f.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-base bg-bg-elevated/70 px-2 py-0.5 text-[10px] text-secondary",children:[f.jsx("span",{className:"text-faint",children:"project"}),f.jsx("span",{className:"font-medium text-strong",children:e})]}),c&&f.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-base bg-bg-elevated/70 px-2 py-0.5 text-[10px] text-secondary",children:[f.jsx("span",{className:"text-faint",children:"model"}),f.jsx("span",{className:"font-medium text-strong",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-caution-800/60 bg-caution-950/40 text-caution hover:border-caution-700 hover:text-caution-200":"border-base bg-bg-elevated/70 text-secondary hover:border-strong hover:text-strong"}`,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-caution-500":"text-faint",children:"scope"}),f.jsx("span",{className:"font-medium",children:d?"all tools":"read-only"})]})]})}function nM({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-base bg-bg/98 shadow-2xl",children:[f.jsx("div",{className:"border-b border-default px-3 py-1.5 text-[10px] uppercase tracking-wider text-muted",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-bg-elevated text-heading":"text-neutral hover:bg-bg-elevated/60"}`,children:[f.jsx("span",{className:"font-mono text-[11px] text-positive-400",children:l.command}),f.jsx("span",{className:"font-medium",children:l.label}),f.jsx("span",{className:"ml-auto text-[10px] text-muted",children:l.hint})]})},l.command)})}),f.jsxs("div",{className:"border-t border-default px-3 py-1.5 text-[10px] text-faint",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 aM(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";case"deepinfra":return"DEEPINFRA_TOKEN"}}function iM(e,n){const i=e.timestamp??0;return`${e.role}:${i}:${n}`}function sM(e,n,i,r){const l=[];for(let c=0;c<e.length;c++){const d=e[c],h=iM(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(rM,{text:g,projectName:n,providerOverride:i,scope:r},h));continue}if(d.role==="assistant"){const g=new Map;let v=c+1;for(;v<e.length&&e[v].role==="toolResult";){const N=e[v];g.set(N.toolCallId,N),v++}const S=lM(d,g,d.timestamp??0),x=NS(d);l.push(f.jsxs(q.Fragment,{children:[S.length>0&&f.jsx("div",{className:"mt-3 space-y-1.5",children:S.map(N=>f.jsx(kS,{trail:N},N.id))}),x.trim()&&f.jsxs("div",{className:"mt-3",children:[f.jsx("div",{className:"mb-0.5 text-[10px] uppercase tracking-wider text-positive-400",children:"Aero"}),f.jsx(AS,{content:x})]})]},h)),c=v-1;continue}}return l}function rM({text:e,projectName:n,providerOverride:i,scope:r}){const[l,c]=q.useState(!1),d=q.useMemo(()=>oM(n,e,i,r),[n,e,i,r]);async function h(){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-bg-elevated/60 px-3 py-2 text-strong",children:[f.jsxs("div",{className:"flex items-center justify-between gap-2",children:[f.jsx("div",{className:"text-[10px] uppercase tracking-wider text-muted",children:"You"}),f.jsx("button",{type:"button",onClick:Nn(h),className:"inline-flex items-center gap-1 rounded border border-mono-800/70 bg-bg/60 px-1.5 py-0.5 text-[10px] text-secondary opacity-0 transition hover:border-strong hover:text-heading group-hover:opacity-100 focus:opacity-100","aria-label":"Copy as CLI command",title:d,children:l?f.jsxs(f.Fragment,{children:[f.jsx(Rv,{className:"h-2.5 w-2.5 text-positive-400","aria-hidden":"true"}),"Copied"]}):f.jsxs(f.Fragment,{children:[f.jsx(yA,{className:"h-2.5 w-2.5","aria-hidden":"true"}),"Copy as CLI"]})})]}),f.jsx("div",{className:"whitespace-pre-wrap",children:e})]})}function oM(e,n,i,r){const l=["canonry","agent","ask",Zb(e),Zb(n)];return i&&l.push("--provider",i),r==="read-only"&&l.push("--scope","read-only"),l.join(" ")}function Zb(e){return`'${e.replace(/'/g,"'\\''")}'`}function lM(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 kS({trail:e}){const[n,i]=q.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`,h=l?"border-negative-800/50":r?"border-positive-800/50":"border-mono-800/70",g=l?"bg-negative-950/20":r?"bg-positive-950/20":"bg-surface-hover";return f.jsxs("div",{className:`rounded-md border ${h} ${g} font-mono`,children:[f.jsxs("button",{type:"button",onClick:()=>i(v=>!v),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(TA,{className:"h-3 w-3 animate-spin text-positive-400","aria-hidden":"true"}):l?f.jsx(Bv,{className:"h-3 w-3 text-negative-400","aria-hidden":"true"}):f.jsx(JA,{className:"h-3 w-3 text-muted","aria-hidden":"true"})}),f.jsx("span",{className:"text-[11px] font-semibold text-heading",children:e.name}),f.jsxs("span",{className:"ml-auto flex items-center gap-2 text-[10px] text-muted",children:[r?f.jsx("span",{className:"text-positive-400",children:"running…"}):f.jsxs(f.Fragment,{children:[f.jsx("span",{children:l?"failed":"ok"}),d&&f.jsx("span",{children:d})]}),f.jsx(Wf,{className:`h-3 w-3 transition-transform ${n?"rotate-90":""}`,"aria-hidden":"true"})]})]}),n&&f.jsxs("div",{className:"border-t border-default px-2.5 py-2 text-[11px] text-secondary",children:[f.jsx("div",{className:"mb-1 text-[9px] uppercase tracking-wider text-faint",children:"Args"}),f.jsx("pre",{className:"mb-2 overflow-x-auto whitespace-pre-wrap break-all text-[10px] text-neutral",children:Yb(e.args)}),!r&&e.result!==void 0&&f.jsxs(f.Fragment,{children:[f.jsx("div",{className:"mb-1 text-[9px] uppercase tracking-wider text-faint",children:l?"Error":"Result"}),f.jsx("pre",{className:"overflow-x-auto whitespace-pre-wrap break-all text-[10px] text-neutral",children:Yb(e.result)})]})]})]})}function Yb(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 AS({content:e}){return f.jsx("div",{className:"aero-markdown text-heading",children:f.jsx(Lw,{components:{h1:n=>f.jsx("h1",{...n,className:"mt-3 mb-2 text-base font-semibold text-primary"}),h2:n=>f.jsx("h2",{...n,className:"mt-3 mb-2 text-sm font-semibold text-primary"}),h3:n=>f.jsx("h3",{...n,className:"mt-3 mb-1.5 text-sm font-semibold text-heading"}),h4:n=>f.jsx("h4",{...n,className:"mt-2 mb-1 text-xs font-semibold uppercase tracking-wide text-neutral"}),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-mono-600"}),strong:n=>f.jsx("strong",{...n,className:"font-semibold text-primary"}),em:n=>f.jsx("em",{...n,className:"text-strong"}),code:({children:n,...i})=>f.jsx("code",{...i,className:"rounded bg-mono-800/70 px-1 py-0.5 font-mono text-[12px] text-positive-200",children:n}),pre:n=>f.jsx("pre",{...n,className:"mb-2 overflow-x-auto rounded-md border border-base bg-bg-elevated/70 p-3 font-mono text-xs text-strong"}),a:n=>f.jsx("a",{...n,className:"text-positive-400 underline decoration-positive-700 hover:decoration-positive-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-base"}),th:n=>f.jsx("th",{...n,className:"px-2 py-1 text-left font-semibold text-neutral"}),tr:n=>f.jsx("tr",{...n,className:"border-b border-mono-900"}),td:n=>f.jsx("td",{...n,className:"px-2 py-1 text-strong"}),blockquote:n=>f.jsx("blockquote",{...n,className:"mb-2 border-l-2 border-strong pl-3 italic text-secondary"}),hr:()=>f.jsx("hr",{className:"my-3 border-base"})},children:e})})}function cM(){return f.jsxs("div",{className:"mt-3 flex items-center gap-2",children:[f.jsx("div",{className:"text-[10px] uppercase tracking-wider text-positive-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-positive-400/80"}),f.jsx("span",{className:"aero-dot aero-dot-2 h-1.5 w-1.5 rounded-full bg-positive-400/60"}),f.jsx("span",{className:"aero-dot aero-dot-3 h-1.5 w-1.5 rounded-full bg-positive-400/40"})]})]})}function uM(){const e=dv(),n=/^\/projects\/([^/]+)/.exec(e.pathname),i=n?decodeURIComponent(n[1]):null,r=fn({...wc({client:te}),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(W3,{projectName:c.name},c.name):null}function Ka(e,n){e.invalidateQueries({predicate:i=>{const r=i.queryKey[0];return typeof r?._id=="string"&&r._id.startsWith(n)}})}function ro(e,n,i){switch(e.invalidateQueries({queryKey:wp({client:te})}),e.invalidateQueries({queryKey:Oi({client:te})}),Ka(e,"getApiV1ProjectsByNameRuns"),n){case Ae["answer-visibility"]:case Ae["site-audit"]:case Ae["backlink-extract"]:return;case Ae["gsc-sync"]:case Ae["inspect-sitemap"]:Ka(e,"getApiV1ProjectsByNameGoogleGsc");return;case Ae["ga-sync"]:Ka(e,"getApiV1ProjectsByNameGa");return;case Ae["traffic-sync"]:Ka(e,"getApiV1ProjectsByNameGa"),Ka(e,"getApiV1ProjectsByNameTraffic");return;case Ae["bing-inspect"]:case Ae["bing-inspect-sitemap"]:Ka(e,"getApiV1ProjectsByNameBing");return;case Ae["aeo-discover-seed"]:case Ae["aeo-discover-probe"]:return;case Ae["gbp-sync"]:Ka(e,"getApiV1ProjectsByNameGbp");return;case Ae["ads-sync"]:Ka(e,"getApiV1ProjectsByNameAds");return;default:return n}}const Xb=[{label:"GitHub",href:"https://github.com/Canonry/canonry",Icon:xA},{label:"Docs",href:"https://github.com/Canonry/canonry/tree/main/docs",Icon:dA},{label:"Changelog",href:"https://github.com/Canonry/canonry/releases",Icon:vA}],Jb=e=>({label:e,state:"checking",detail:"Checking service health"}),dM={apiStatus:Jb("API"),workerStatus:Jb("Worker")};function _S(e){switch(e){case Ae["answer-visibility"]:return"Visibility sweep";case Ae["gsc-sync"]:return"GSC sync";case Ae["inspect-sitemap"]:return"Sitemap inspection";case Ae["ga-sync"]:return"GA sync";case Ae["traffic-sync"]:return"Traffic sync";case Ae["bing-inspect"]:return"Bing URL inspection";case Ae["bing-inspect-sitemap"]:return"Bing sitemap inspection";case Ae["site-audit"]:return"Site audit";case Ae["backlink-extract"]:return"Backlink extract";case Ae["aeo-discover-seed"]:return"Discovery (seed phase)";case Ae["aeo-discover-probe"]:return"Discovery (probe phase)";case Ae["gbp-sync"]:return"Business Profile sync";case Ae["ads-sync"]:return"ChatGPT ads sync"}}function fM(e){return e==="completed"?"positive":e==="partial"?"caution":"negative"}function pM(e){const n=_S(e.kind);return e.status==="completed"?`${n} completed`:e.status==="partial"?`${n} completed with partial results`:e.status==="cancelled"?`${n} cancelled`:`${n} failed`}function mM(e,n){return e.error?`${n}: ${op(e.error)}`:e.location?`${n} · ${e.location}`:n}function Fb(e,n,i){if(n)return n;const r=i.find(l=>l.id===e);return r?.displayName||r?.name||e}function hM(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 gM(e){return e.failed>0||e.cancelled>0?"negative":e.partial>0?"caution":"positive"}function yM(){const e=Wa(),n=q.useSyncExternalStore(J4,_i,_i),i=Object.keys(n.runs).length>0||Object.keys(n.batches).length>0,r=fn({...K0({client:te}),enabled:i,staleTime:ao,refetchInterval:3e3}),l=fn({...wc({client:te}),enabled:i}),c=q.useRef({}),d=q.useCallback(()=>{r.refetch()},[r.refetch]);return q.useEffect(()=>{i&&d()},[i,d]),q.useEffect(()=>{if(!i||typeof window>"u")return;const h=()=>{document.visibilityState==="visible"&&d()};return window.addEventListener("focus",d),document.addEventListener("visibilitychange",h),()=>{window.removeEventListener("focus",d),document.removeEventListener("visibilitychange",h)}},[i,d]),q.useEffect(()=>{const h=r.data??[],g=l.data??[],v=Object.fromEntries(h.map(x=>[x.id,x])),S=Object.fromEntries(h.map(x=>[x.id,x.status]));for(const x of Object.values(n.runs)){const N=v[x.runId];if(!N||!eR(N.status)||(c.current[N.id]??x.lastAnnouncedStatus)===N.status)continue;const T=g.find(O=>O.id===N.projectId);if(T&&ro(e,N.kind,T.name),x.sourceAction==="run-all"){df(N.id);continue}const k=Fb(N.projectId,x.projectLabel,g);tn({title:pM(N),detail:mM(N,k),tone:fM(N.status),dedupeKey:`run:${N.id}`,dedupeMode:"replace",cta:{label:"View run",intent:"open-run-drawer",runId:N.id}}),df(N.id)}if(r.data!==void 0){const x=new Set(h.map(_=>_.id)),N=nR(Object.values(n.runs),x,Date.now(),tR);for(const _ of N){const T=g.find(k=>k.id===_.projectId);T&&ro(e,_.kind,T.name),_.sourceAction!=="run-all"&&tn({title:`${_S(_.kind)} status unavailable`,detail:Fb(_.projectId,_.projectLabel,g),tone:"neutral",dedupeKey:`run-stale:${_.runId}`,dedupeMode:"replace"}),df(_.runId)}}for(const x of Object.values(n.batches)){const N=aR(x.runIds,v);N.finished&&(tn({title:"Run-all batch finished",detail:hM(N,x.skippedCount),tone:gM(N),dedupeKey:`batch:${x.batchId}`,dedupeMode:"replace",cta:{label:"View runs",intent:"go-to-runs"}}),W4(x.batchId))}c.current=S},[l.data,r.data,n,e]),null}function bM(){const e=uo(),{dashboard:n,isLoading:i,refetch:r}=Ac(),d=_p(!e,e?.health).data??e?.health??dM,h=dv(),{runId:g,evidenceId:v,closeDrawer:S}=Cp(),[x,N]=q.useState(!1),[_,T]=q.useState(()=>{if(typeof window>"u")return null;try{return window.localStorage.getItem("canonry:dismissedUpdateVersion")}catch{return null}}),[k]=q.useState(()=>typeof window>"u"?null:new URLSearchParams(window.location.search).get("force-update")),O=k?{current:d.apiStatus.version??"0.0.0",latest:k,url:"https://www.npmjs.com/package/@canonry/canonry",upgradeCommand:"npm install -g @canonry/canonry"}:d.apiStatus.updateAvailable,R=O&&O.latest!==_,I=()=>{if(O){try{window.localStorage.setItem("canonry:dismissedUpdateVersion",O.latest)}catch{}T(O.latest)}},P=P3(g),Z=P.data??null,X=P.isLoading;q.useEffect(()=>{Z&&Z.status!=="running"&&Z.status!=="queued"&&r()},[Z?.status,r]),q.useEffect(()=>{N(!1)},[h.pathname]),q.useEffect(()=>{if(typeof window>"u"||!g&&!v)return;const le=pe=>{pe.key==="Escape"&&S()};return window.addEventListener("keydown",le),()=>{window.removeEventListener("keydown",le)}},[g,v,S]);const F=n??e?.dashboard??null,z=h.pathname==="/setup"&&F!==null&&F.portfolioOverview.projects.length===0,M=g&&F?g3(F,g):void 0,oe=q.useMemo(()=>u3(h.pathname,F),[h.pathname,F]),{commandCenter:ke}=$3(oe),ze=q.useMemo(()=>{if(v)return b3(ke,F,v)},[v,ke,F]),Se=(()=>{const le=h.pathname;if(le==="/")return"Portfolio";if(le==="/projects")return"Projects";if(le==="/runs")return"Runs";if(le==="/settings")return"Settings";if(le==="/setup")return"Setup";if(le==="/backlinks")return"Backlinks";if(le==="/traffic"||le.startsWith("/traffic/"))return"Server traffic";if(le.startsWith("/projects/")){const $=le.split("/").filter(Boolean)[1];if($&&F){const W=F.projects.find(fe=>fe.project.id===$);if(W)return W.project.name}return"Project"}return"Not found"})(),He=q.useMemo(()=>pk(),[]);if(He){const le=!He.views||He.views.includes(KD(h.pathname));return f.jsxs("div",{className:"app-shell app-shell-embed",style:JD(He.theme),children:[f.jsx("a",{className:"skip-link",href:"#content",children:"Skip to content"}),f.jsx("main",{id:"content",className:"page-shell",children:le?f.jsx(xf,{}):f.jsx("div",{className:"embed-view-unavailable",role:"status",children:"This view is not available in embed mode."})})]})}return f.jsxs("div",{className:`app-shell ${z?"app-shell-focus":""}`,children:[f.jsx("a",{className:"skip-link",href:"#content",children:"Skip to content"}),!z&&f.jsxs("aside",{className:"sidebar","aria-label":"Primary navigation",children:[f.jsx("div",{className:"sidebar-brand",children:f.jsx($b,{version:d.apiStatus.version,updateAvailable:R?O:null,onDismissUpdate:I})}),f.jsxs("nav",{className:"sidebar-nav",children:[f.jsxs(st,{to:"/",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!0},children:[f.jsx(kA,{className:"sidebar-icon"}),f.jsx("span",{children:"Overview"})]}),f.jsxs(st,{to:"/projects",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!1},children:[f.jsx(jA,{className:"sidebar-icon"}),f.jsx("span",{children:"Projects"})]}),f.jsxs(st,{to:"/runs",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!0},children:[f.jsx(LA,{className:"sidebar-icon"}),f.jsx("span",{children:"Runs"})]}),f.jsxs(st,{to:"/traffic",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!1},children:[f.jsx($A,{className:"sidebar-icon"}),f.jsx("span",{children:"Server traffic"})]}),f.jsxs(st,{to:"/backlinks",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!0},children:[f.jsx(_A,{className:"sidebar-icon"}),f.jsx("span",{children:"Backlinks"})]}),f.jsxs(st,{to:"/settings",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!0},children:[f.jsx(ZA,{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(le=>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+le*15}%`}})]},le))]}):F&&F.projects.length>0?f.jsxs(f.Fragment,{children:[f.jsx("p",{className:"sidebar-section-title",children:"Projects"}),F.projects.map(le=>{const pe=le.visibilitySummary.tone;return f.jsxs(st,{to:"/projects/$projectName",params:{projectName:le.project.name},className:"sidebar-project",activeProps:{className:"sidebar-project sidebar-project-active"},children:[f.jsx("span",{className:`sidebar-dot sidebar-dot-${pe}`}),f.jsx("span",{children:le.project.displayName||le.project.name})]},le.project.id)})]}):i?null:f.jsxs(f.Fragment,{children:[f.jsx("p",{className:"sidebar-section-title",children:"Resources"}),f.jsxs(st,{to:"/setup",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!0},children:[f.jsx(PA,{className:"sidebar-icon"}),f.jsx("span",{children:"Setup"})]})]})]}),f.jsx("div",{className:"sidebar-footer",children:Xb.map(({label:le,href:pe,Icon:$})=>f.jsx("a",{className:"sidebar-footer-icon",href:pe,target:"_blank",rel:"noopener noreferrer",title:le,"aria-label":le,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($b,{compact:!0})}),f.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[f.jsx(st,{to:"/",children:"Home"}),f.jsx(Wf,{className:"breadcrumb-sep size-3"}),f.jsx("span",{className:"breadcrumb-current",children:Se})]})]}),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(Ue,{className:"nav-toggle",variant:"secondary",size:"icon",type:"button","aria-expanded":x,"aria-controls":"mobile-nav",onClick:()=>N(le=>!le),children:[f.jsx(DA,{className:"size-4"}),f.jsx("span",{className:"sr-only",children:"Open navigation"})]})]})]}),f.jsxs("div",{id:"mobile-nav",className:`mobile-nav ${x?"mobile-nav-open":""}`,children:[f.jsxs(Ue,{className:"mobile-nav-close",variant:"ghost",size:"icon",type:"button",onClick:()=>N(!1),children:[f.jsx(Hs,{className:"size-5"}),f.jsx("span",{className:"sr-only",children:"Close navigation"})]}),f.jsx(st,{to:"/",className:"mobile-nav-link",activeProps:{className:"mobile-nav-link mobile-nav-link-active"},activeOptions:{exact:!0},children:"Overview"}),f.jsx(st,{to:"/projects",className:"mobile-nav-link",activeProps:{className:"mobile-nav-link mobile-nav-link-active"},activeOptions:{exact:!1},children:"Projects"}),f.jsx(st,{to:"/runs",className:"mobile-nav-link",activeProps:{className:"mobile-nav-link mobile-nav-link-active"},activeOptions:{exact:!0},children:"Runs"}),f.jsx(st,{to:"/traffic",className:"mobile-nav-link",activeProps:{className:"mobile-nav-link mobile-nav-link-active"},activeOptions:{exact:!1},children:"Server traffic"}),f.jsx(st,{to:"/settings",className:"mobile-nav-link",activeProps:{className:"mobile-nav-link mobile-nav-link-active"},activeOptions:{exact:!0},children:"Settings"}),F&&F.projects.length>0?f.jsxs("div",{className:"mobile-nav-section",children:[f.jsx("p",{className:"mobile-nav-section-title",children:"Projects"}),F.projects.map(le=>f.jsx(st,{to:"/projects/$projectName",params:{projectName:le.project.name},className:"mobile-nav-link",children:le.project.name},le.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(le=>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"})]},le))}),f.jsx("div",{className:"page-skeleton-grid",style:{gridTemplateColumns:"1fr 1fr"},children:[1,2].map(le=>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))})]},le))})]}):f.jsx(xf,{})}),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:Xb.map(({label:le,href:pe,Icon:$})=>f.jsx("a",{href:pe,target:"_blank",rel:"noopener noreferrer",title:le,"aria-label":le,className:"footer-icon",children:f.jsx($,{className:"size-3.5"})},pe))})]})]}),M?f.jsxs(a3,{open:!0,title:M.summary,subtitle:`${M.projectName} · ${M.kindLabel}`,onClose:S,children:[f.jsxs("div",{className:"flex flex-wrap items-center gap-x-5 gap-y-1 text-sm",children:[f.jsx(kp,{status:M.status}),f.jsx("span",{className:"text-secondary",children:M.startedAt}),f.jsx("span",{className:"text-muted",children:M.duration}),f.jsx("span",{className:"text-faint",children:M.triggerLabel})]}),M.status==="failed"&&M.statusDetail&&f.jsx("p",{className:"text-sm text-negative/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-muted mb-2",children:"Activity Log"}),X?f.jsx("p",{className:"text-sm text-muted",children:"Loading run details..."}):Z?.snapshots&&Z.snapshots.length>0?f.jsxs("div",{className:"space-y-2",children:[Z.snapshots.map(le=>f.jsxs("div",{className:"rounded-lg border border-default bg-surface 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-strong truncate",children:le.query??"Unknown query"}),f.jsxs("div",{className:"flex items-center gap-1.5",children:[f.jsx(XR,{provider:le.provider}),f.jsx(mS,{variant:le.citationState===sc.cited?"success":"neutral",children:le.citationState})]})]}),le.model&&f.jsx("p",{className:"text-[11px] text-muted font-mono",children:le.model}),le.citedDomains.length>0&&f.jsxs("p",{className:"text-xs text-muted mt-1",children:[f.jsx("span",{className:"text-secondary",children:"Sources:"})," ",le.citedDomains.join(", ")]}),le.competitorOverlap.length>0&&f.jsxs("p",{className:"text-xs text-negative-400/80 mt-0.5",children:["Competitor cited: ",le.competitorOverlap.join(", ")]}),le.groundingSources&&le.groundingSources.length>0&&f.jsxs("details",{className:"mt-2",children:[f.jsxs("summary",{className:"text-xs text-muted cursor-pointer hover:text-secondary",children:[le.groundingSources.length," grounding source",le.groundingSources.length!==1?"s":""]}),f.jsx("ul",{className:"mt-1 space-y-0.5",children:le.groundingSources.map((pe,$)=>{const W=Mf(pe.uri),fe=pe.title||pe.uri;return f.jsx("li",{className:"text-xs text-muted truncate",children:W?f.jsx("a",{href:W,target:"_blank",rel:"noopener noreferrer",className:"hover:text-neutral",children:fe}):f.jsx("span",{children:fe})},$)})})]}),le.answerText&&f.jsxs("details",{className:"mt-1",children:[f.jsx("summary",{className:"text-xs text-muted cursor-pointer hover:text-secondary",children:"Answer preview"}),f.jsx("p",{className:"mt-1 text-xs text-secondary leading-relaxed whitespace-pre-wrap",children:le.answerText})]})]},le.id)),Z.status==="running"&&f.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-muted",children:[f.jsx("span",{className:"inline-block h-2 w-2 rounded-full bg-caution-500 animate-pulse"}),"Running remaining queries..."]})]}):Z&&Z.status==="running"?f.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-muted",children:[f.jsx("span",{className:"inline-block h-2 w-2 rounded-full bg-caution-500 animate-pulse"}),"Waiting for first query result..."]}):Z&&Z.status==="queued"?f.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-muted",children:[f.jsx("span",{className:"inline-block h-2 w-2 rounded-full bg-mono-500 animate-pulse"}),"Run queued, waiting for execution slot..."]}):Z&&Z.error?f.jsxs("div",{className:"rounded-lg border border-negative-800/40 bg-negative-950/20 p-3",children:[f.jsx("p",{className:"text-sm font-medium text-negative mb-2",children:"Run failed"}),f.jsx("pre",{className:"text-xs text-negative/80 whitespace-pre-wrap break-words max-h-48 overflow-y-auto font-mono leading-5",children:GD(Z.error)})]}):f.jsx("p",{className:"text-sm text-muted",children:"No snapshot data available."})]})]}):null,ze?f.jsx(o3,{evidence:ze.evidence,project:ze.project,onClose:S}):null,f.jsx(yM,{}),f.jsx(Q3,{}),f.jsx(uM,{})]})}class vM extends q.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-negative-950/40 p-3",children:f.jsx(Bv,{className:"size-6 text-negative-400"})}),f.jsx("h2",{className:"text-lg font-semibold text-heading",children:"Something went wrong"}),f.jsx("p",{className:"text-sm text-secondary 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(Ue,{variant:"secondary",size:"sm",onClick:this.handleReset,children:[f.jsx(Mv,{className:"size-3.5 mr-1.5"}),"Try again"]}),f.jsx(Ue,{variant:"secondary",size:"sm",onClick:()=>{const n=window.__CANONRY_CONFIG__?.basePath?.replace(/\/$/,"")??"";window.location.href=n||"/"},children:"Go home"})]})]})}):this.props.children}}const kn=q.forwardRef(({className:e,...n},i)=>f.jsx("div",{ref:i,className:En("rounded-xl border border-base bg-bg/75 shadow-[0_0_0_1px_var(--color-shadow-hairline)]",e),...n}));kn.displayName="Card";const Bf=q.forwardRef(({className:e,...n},i)=>f.jsx("div",{ref:i,className:En("flex flex-col gap-1.5 p-5",e),...n}));Bf.displayName="CardHeader";const Lf=q.forwardRef(({className:e,...n},i)=>f.jsx("h3",{ref:i,className:En("font-medium tracking-tight text-primary",e),...n}));Lf.displayName="CardTitle";const qf=q.forwardRef(({className:e,...n},i)=>f.jsx("p",{ref:i,className:En("text-sm text-muted",e),...n}));qf.displayName="CardDescription";const Yl=q.forwardRef(({className:e,...n},i)=>f.jsx("div",{ref:i,className:En("p-5 pt-0",e),...n}));Yl.displayName="CardContent";function SM({points:e,tone:n}){const i=q.useId();if(e.length===0)return null;const r=42,l=132,c=5,d=Math.min(...e),g=Math.max(...e)-d||1,v=l-c*2,S=r-c*2,x=e.map((N,_)=>{const T=c+_/Math.max(e.length-1,1)*v,k=c+(1-(N-d)/g)*S;return`${T},${k}`}).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:v,height:S,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:x,vectorEffect:"non-scaling-stroke"})]})}function xM({project:e}){return f.jsxs(st,{to:"/projects/$projectName",params:{projectName:e.project.name},className:"project-row cursor-pointer",children:[f.jsx("div",{className:"project-row-chart",children:f.jsx(SM,{points:e.trend,tone:Y0(e.lastRun.status)})}),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:"Mentioned"}),f.jsx("p",{className:`metric-inline-value ${e.mentionTone==="caution"?"text-caution-400":""}`,children:e.mentionScore}),f.jsx("p",{className:"metric-inline-delta",children:e.mentionDelta}),e.providerCoverage&&f.jsx("p",{className:"text-[10px] font-medium text-caution-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.jsx("span",{className:"project-row-link",children:f.jsx(Wf,{className:"h-4 w-4 text-muted"})})]})}function wM(){const e=uo(),{dashboard:n,isLoading:i}=Ac(),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(S=>f.jsxs("div",{className:"rounded-xl border border-default bg-surface 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"})]},S))})]});const l=r.portfolioOverview,h=_p(!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=G4(l.systemHealth,h,r.settings),{openRun:v}=Cp();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-faint",children:l.lastUpdatedAt})})]}),l.projects.length>0?f.jsx("div",{className:"project-list project-list-scrollable",children:l.projects.map(S=>f.jsx(xM,{project:S},S.project.id))}):f.jsxs(kn,{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(Ue,{size:"sm",asChild:!0,children:f.jsx(st,{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(S=>S.href?f.jsxs(st,{to:S.href,className:`attention-item attention-item-${S.tone}`,children:[f.jsxs("div",{children:[f.jsx("p",{className:"attention-title",children:S.title}),f.jsx("p",{className:"attention-detail",children:S.detail})]}),S.actionLabel&&f.jsx("span",{className:"attention-action",children:S.actionLabel})]},S.id):f.jsxs("div",{className:`attention-item attention-item-static attention-item-${S.tone}`,children:[f.jsxs("div",{children:[f.jsx("p",{className:"attention-title",children:S.title}),f.jsx("p",{className:"attention-detail",children:S.detail})]}),S.actionLabel&&f.jsx("span",{className:"attention-action",children:S.actionLabel})]},S.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(S=>f.jsxs("button",{className:"compact-run",type:"button",onClick:()=>v(S.id),children:[f.jsxs("div",{children:[f.jsx("p",{className:"compact-run-title",children:S.projectName}),f.jsx("p",{className:"compact-run-detail",children:S.summary})]}),f.jsx(kp,{status:S.status})]},S.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(S=>f.jsxs(kn,{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:S.label}),f.jsx("h3",{children:S.detail})]}),f.jsx(Bn,{tone:S.tone,title:S.id==="api"?$s(h.apiStatus):S.id==="worker"?$s(h.workerStatus):void 0,children:S.label})]}),f.jsx("p",{className:"supporting-copy",children:S.meta})]},S.id))})]})]})}const zp=Symbol.for("yaml.alias"),Uf=Symbol.for("yaml.document"),Xa=Symbol.for("yaml.map"),CS=Symbol.for("yaml.pair"),Qn=Symbol.for("yaml.scalar"),Xs=Symbol.for("yaml.seq"),Cn=Symbol.for("yaml.node.type"),Di=e=>!!e&&typeof e=="object"&&e[Cn]===zp,_c=e=>!!e&&typeof e=="object"&&e[Cn]===Uf,fo=e=>!!e&&typeof e=="object"&&e[Cn]===Xa,xt=e=>!!e&&typeof e=="object"&&e[Cn]===CS,nt=e=>!!e&&typeof e=="object"&&e[Cn]===Qn,po=e=>!!e&&typeof e=="object"&&e[Cn]===Xs;function bt(e){if(e&&typeof e=="object")switch(e[Cn]){case Xa:case Xs:return!0}return!1}function St(e){if(e&&typeof e=="object")switch(e[Cn]){case zp:case Xa:case Qn:case Xs:return!0}return!1}const TS=e=>(nt(e)||bt(e))&&!!e.anchor,ji=Symbol("break visit"),jM=Symbol("skip children"),to=Symbol("remove node");function Js(e,n){const i=NM(n);_c(e)?Os(null,e.contents,i,Object.freeze([e]))===to&&(e.contents=null):Os(null,e,i,Object.freeze([]))}Js.BREAK=ji;Js.SKIP=jM;Js.REMOVE=to;function Os(e,n,i,r){const l=kM(e,n,i,r);if(St(l)||xt(l))return AM(e,r,l),Os(e,l,i,r);if(typeof l!="symbol"){if(bt(n)){r=Object.freeze(r.concat(n));for(let c=0;c<n.items.length;++c){const d=Os(c,n.items[c],i,r);if(typeof d=="number")c=d-1;else{if(d===ji)return ji;d===to&&(n.items.splice(c,1),c-=1)}}}else if(xt(n)){r=Object.freeze(r.concat(n));const c=Os("key",n.key,i,r);if(c===ji)return ji;c===to&&(n.key=null);const d=Os("value",n.value,i,r);if(d===ji)return ji;d===to&&(n.value=null)}}return l}function NM(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 kM(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(xt(n))return i.Pair?.(e,n,r);if(nt(n))return i.Scalar?.(e,n,r);if(Di(n))return i.Alias?.(e,n,r)}function AM(e,n,i){const r=n[n.length-1];if(bt(r))r.items[e]=i;else if(xt(r))e==="key"?r.key=i:r.value=i;else if(_c(r))r.contents=i;else{const l=Di(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${l} parent`)}}const _M={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},CM=e=>e.replace(/[!,[\]{}]/g,n=>_M[n]);class Ht{constructor(n,i){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},Ht.defaultYaml,n),this.tags=Object.assign({},Ht.defaultTags,i)}clone(){const n=new Ht(this.yaml,this.tags);return n.docStart=this.docStart,n}atDocument(){const n=new Ht(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:Ht.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},Ht.defaultTags);break}return n}add(n,i){this.atNextDocument&&(this.yaml={explicit:Ht.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},Ht.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+CM(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&&St(n.contents)){const c={};Js(n.contents,(d,h)=>{St(h)&&h.tag&&(c[h.tag]=!0)}),l=Object.keys(c)}else l=[];for(const[c,d]of r)c==="!!"&&d==="tag:yaml.org,2002:"||(!n||l.some(h=>h.startsWith(d)))&&i.push(`%TAG ${c} ${d}`);return i.join(`
|
|
65
|
-
`)}}Ht.defaultYaml={explicit:!1,version:"1.2"};Ht.defaultTags={"!!":"tag:yaml.org,2002:"};function
|
|
63
|
+
`)}}}finally{d?.removeEventListener("abort",_);try{S.releaseLock()}catch{}}}function _S(e){return!e||e.role!=="assistant"?"":e.content.filter(n=>n.type==="text").map(n=>n.text).join("")}const nM=[{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?"}],aM=[{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"}],Il=e=>`canonry:aero:provider:${e}`,Zb=e=>`canonry:aero:scope:${e}`;function iM({projectName:e}){const[n,i]=q.useState(!1),[r,l]=q.useState(!1),[c,d]=q.useState([]),[h,g]=q.useState(""),[v,S]=q.useState(!1),[x,N]=q.useState([]),[_,T]=q.useState(""),[k,O]=q.useState(null),[R,I]=q.useState(()=>typeof window>"u"?null:window.localStorage.getItem(Il(e))??null),[P,Z]=q.useState(()=>typeof window>"u"?"read-only":window.localStorage.getItem(Zb(e))==="all"?"all":"read-only"),X=q.useRef(null),{ref:J}=J3([c,_,x]),z=q.useRef(null),[M,oe]=q.useState(0),ke=q.useMemo(()=>{const F=h.trimStart();if(!F.startsWith("/"))return[];if(/\s/.test(F))return[];const ue=F.toLowerCase();return aM.filter(ee=>ee.command.startsWith(ue)||ee.label.toLowerCase().includes(ue.slice(1)))},[h]);q.useEffect(()=>{oe(F=>ke.length===0?0:Math.min(F,ke.length-1))},[ke.length]);const ze=fn({...K4({client:te,path:{name:e}}),enabled:n,staleTime:6e4}),Se=q.useMemo(()=>{const F=ze.data?.providers??[];if(R){const ee=F.find(de=>de.id===R&&de.configured);if(ee)return ee}const ue=ze.data?.defaultProvider;return ue?F.find(ee=>ee.id===ue)??null:null},[R,ze.data]);q.useEffect(()=>{if(!ze.data||!R)return;ze.data.providers.find(ue=>ue.id===R&&ue.configured)||(I(null),window.localStorage.removeItem(Il(e)))},[ze.data,R,e]);const $e=q.useCallback(F=>{I(F),!(typeof window>"u")&&(F?window.localStorage.setItem(Il(e),F):window.localStorage.removeItem(Il(e)))},[e]),le=q.useCallback(()=>{Z(F=>{const ue=F==="all"?"read-only":"all";return typeof window<"u"&&window.localStorage.setItem(Zb(e),ue),ue})},[e]);q.useEffect(()=>{if(!n)return;const F=ue=>{ue.key==="Escape"&&(r?l(!1):i(!1))};return window.addEventListener("keydown",F),()=>window.removeEventListener("keydown",F)},[n,r]),q.useEffect(()=>{if(!n)return;let F=!1;O(null);const ue=()=>{F||v||Kb(e).then(ae=>{F||d(ae.messages)}).catch(ae=>{F||O(ae instanceof Error?ae.message:"Failed to load transcript")})};ue();const de=window.setInterval(ue,15e3);return()=>{F=!0,window.clearInterval(de)}},[n,e,v]),q.useEffect(()=>()=>{X.current?.abort()},[e]);async function fe(F){const ue=F.trim();if(!ue||v)return;O(null),g(""),S(!0),T(""),N([]);const ee={role:"user",content:ue,timestamp:Date.now()};d(ae=>[...ae,ee]);const de=new AbortController;X.current=de;try{await tM({project:e,prompt:ue,provider:R??void 0,scope:P,signal:de.signal,onEvent:$});const ae=await Kb(e);d(ae.messages)}catch(ae){ae.name!=="AbortError"&&O(ae instanceof Error?ae.message:"Prompt failed")}finally{S(!1),T(""),X.current=null}}function $(F){switch(F.type){case"message_update":T(_S(F.message));break;case"message_end":F.message.role==="assistant"&&T("");break;case"tool_execution_start":N(ue=>[...ue,{id:F.toolCallId,name:F.toolName,args:F.args,startedAt:Date.now()}]);break;case"tool_execution_end":N(ue=>ue.map(ee=>ee.id===F.toolCallId?{...ee,endedAt:Date.now(),isError:F.isError,result:F.result}:ee));break;case"error":O(F.message);break}}async function W(){X.current?.abort();try{await eM(e),d([]),O(null)}catch(F){O(F instanceof Error?F.message:"Reset failed")}}const pe=c.length===0,je=n&&r?"pointer-events-auto fixed inset-0 z-40 flex items-stretch justify-center bg-bg/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",se=r?"pointer-events-auto flex h-full w-full max-w-5xl flex-col overflow-hidden rounded-2xl border border-mono-800/80 bg-bg/95 shadow-2xl":"pointer-events-auto w-full max-w-3xl",Ye=r?"flex-1 overflow-y-auto px-6 py-5 text-sm text-strong":"max-h-[40vh] min-h-[120px] overflow-y-auto px-4 py-3 text-sm text-strong";return f.jsx("div",{className:je,onClick:F=>{r&&F.target===F.currentTarget&&l(!1)},children:f.jsx("div",{className:se,children:n?f.jsxs("div",{className:r?"flex h-full flex-col":"flex flex-col overflow-hidden rounded-2xl border border-mono-800/80 bg-bg/95 shadow-xl backdrop-blur",children:[f.jsxs("div",{className:"flex items-center justify-between gap-2 border-b border-mono-800/70 px-4 py-2.5",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(Jy,{className:"h-4 w-4 text-positive-400","aria-hidden":"true"}),f.jsx("span",{className:"text-sm font-medium text-heading",children:"Aero"}),f.jsx("span",{className:"text-[10px] uppercase tracking-wider text-muted",children:v?"working…":e})]}),f.jsxs("div",{className:"flex items-center gap-1",children:[f.jsx(sM,{providers:ze.data?.providers??[],active:Se,override:R,onPick:$e,disabled:v}),f.jsx("button",{type:"button",onClick:Nn(W),className:"rounded-md p-1.5 text-muted transition hover:bg-surface-inset hover:text-strong","aria-label":"Reset conversation",title:"Reset conversation",children:f.jsx(Lv,{className:"h-3.5 w-3.5","aria-hidden":"true"})}),f.jsx("button",{type:"button",onClick:()=>l(F=>!F),className:"rounded-md p-1.5 text-muted transition hover:bg-surface-inset hover:text-strong","aria-label":r?"Collapse":"Expand",title:r?"Collapse":"Expand",children:r?f.jsx(qA,{className:"h-3.5 w-3.5","aria-hidden":"true"}):f.jsx(RA,{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-muted transition hover:bg-surface-inset hover:text-strong","aria-label":"Close Aero",children:f.jsx(Hs,{className:"h-4 w-4","aria-hidden":"true"})})]})]}),f.jsxs("div",{ref:J,className:Ye,children:[k&&f.jsx("div",{className:"mb-2 rounded-md border border-negative-700/40 bg-negative-950/40 px-3 py-2 text-xs text-negative-200",children:k}),pe&&!v&&f.jsxs("div",{className:"flex flex-col gap-3 py-2",children:[f.jsxs("p",{className:"text-xs text-muted",children:["Ask anything about ",f.jsx("span",{className:"text-neutral",children:e}),", or start with:"]}),f.jsx("div",{className:"flex flex-wrap gap-1.5",children:nM.map(F=>f.jsx("button",{type:"button",onClick:()=>{fe(F.prompt)},className:"rounded-full border border-base bg-bg-elevated/70 px-3 py-1 text-xs text-neutral transition hover:border-strong hover:bg-mono-800/70 hover:text-heading",children:F.label},F.label))})]}),uM(c,e,R,P),x.length>0&&f.jsx("div",{className:"mt-3 space-y-1.5",children:x.map(F=>f.jsx(CS,{trail:F},F.id))}),v&&_&&f.jsxs("div",{className:"mt-3",children:[f.jsx("div",{className:"mb-0.5 text-[10px] uppercase tracking-wider text-positive-400",children:"Aero"}),f.jsx(TS,{content:_})]}),v&&!_&&x.every(F=>F.endedAt!==void 0)&&f.jsx(mM,{})]}),f.jsx(rM,{projectName:e,activeProvider:Se,scope:P,onToggleScope:le,disabled:v}),f.jsxs("div",{className:"relative",children:[ke.length>0&&f.jsx(oM,{matches:ke,selectedIndex:M,onHover:oe,onPick:F=>{g(""),z.current?.focus(),F.action==="clear"?W():fe(F.prompt)}}),f.jsxs("form",{className:"flex items-end gap-2 border-t border-mono-800/70 bg-bg/80 px-3 py-2.5",onSubmit:F=>{if(F.preventDefault(),ke.length>0){const ue=ke[M];g(""),ue.action==="clear"?W():fe(ue.prompt);return}fe(h)},children:[f.jsx("textarea",{ref:z,value:h,onChange:F=>g(F.target.value),onKeyDown:F=>{if(ke.length>0){if(F.key==="ArrowDown"){F.preventDefault(),oe(ue=>(ue+1)%ke.length);return}if(F.key==="ArrowUp"){F.preventDefault(),oe(ue=>(ue-1+ke.length)%ke.length);return}if(F.key==="Tab"){F.preventDefault();const ue=ke[M];g(`${ue.command} `);return}if(F.key==="Escape"){F.preventDefault(),g("");return}}if(F.key==="Enter"&&!F.shiftKey)if(F.preventDefault(),ke.length>0){const ue=ke[M];g(""),ue.action==="clear"?W():fe(ue.prompt)}else fe(h)},placeholder:"Ask Aero, or / for commands…",disabled:v,rows:r?3:1,className:"flex-1 resize-none bg-transparent text-sm text-heading placeholder:text-mono-600 focus:outline-none disabled:opacity-60"}),f.jsx("button",{type:"submit",disabled:v||!h.trim(),className:"inline-flex h-7 w-7 items-center justify-center rounded-md bg-positive-500 text-accent-fg transition hover:bg-positive-400 disabled:opacity-40","aria-label":"Send",children:f.jsx(fA,{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-mono-800/80 bg-bg/95 px-4 py-2 text-left text-sm text-secondary shadow-lg backdrop-blur transition hover:border-strong hover:bg-bg-elevated/90 hover:text-strong",children:[f.jsxs("span",{className:"flex items-center gap-2",children:[f.jsx(Jy,{className:"h-4 w-4 text-positive-400","aria-hidden":"true"}),"Ask Aero about ",e,"…"]}),f.jsx("span",{className:"text-[10px] uppercase tracking-wider text-faint",children:"Enter"})]})})})}function sM({providers:e,active:n,override:i,onPick:r,disabled:l}){const[c,d]=q.useState(!1),h=q.useRef(null);if(q.useEffect(()=>{if(!c)return;const S=N=>{h.current?.contains(N.target)||d(!1)},x=N=>{N.key==="Escape"&&d(!1)};return window.addEventListener("mousedown",S),window.addEventListener("keydown",x),()=>{window.removeEventListener("mousedown",S),window.removeEventListener("keydown",x)}},[c]),e.length===0)return null;const g=n?.label.replace(/\s+\(.+\)$/,"")??"No provider",v=n?.defaultModel;return f.jsxs("div",{ref:h,className:"relative",children:[f.jsxs("button",{type:"button",onClick:()=>d(S=>!S),disabled:l,className:"flex items-center gap-1 rounded-md px-1.5 py-1 text-[11px] text-secondary transition hover:bg-surface-inset hover:text-strong 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-strong",children:g}),v&&f.jsx("span",{className:"hidden font-mono text-[10px] text-muted sm:inline",children:v}),f.jsx(yA,{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-base bg-bg shadow-xl",children:[f.jsx("div",{className:"border-b border-default px-3 py-2 text-[10px] uppercase tracking-wider text-muted",children:"Aero provider"}),f.jsx("ul",{className:"max-h-72 overflow-y-auto py-1",children:e.map(S=>{const x=n?.id===S.id,N=i===S.id;return f.jsx("li",{children:f.jsxs("button",{type:"button",role:"option","aria-selected":x,disabled:!S.configured,onClick:()=>{S.configured&&(r(N?null:S.id),d(!1))},className:"flex w-full items-start gap-2 px-3 py-2 text-left text-xs transition enabled:hover:bg-bg-elevated 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:x?f.jsx(Bv,{className:"h-3 w-3 text-positive-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-heading",children:S.label}),N&&f.jsx("span",{className:"rounded-full border border-positive-800/60 bg-positive-950/60 px-1.5 text-[9px] uppercase tracking-wider text-positive",children:"Pinned"}),!S.configured&&f.jsx("span",{className:"rounded-full border border-base px-1.5 text-[9px] uppercase tracking-wider text-muted",children:"Key missing"})]}),f.jsx("span",{className:"mt-0.5 block font-mono text-[10px] text-muted",children:S.defaultModel}),S.keySource==="env"&&f.jsx("span",{className:"mt-0.5 block text-[10px] text-faint",children:"via env var"}),!S.configured&&f.jsxs("span",{className:"mt-0.5 block text-[10px] text-faint",children:["Add key in config.yaml or export"," ",f.jsx("code",{className:"font-mono text-secondary",children:lM(S.id)})]})]})]})},S.id)})}),i&&f.jsx("button",{type:"button",onClick:()=>{r(null),d(!1)},className:"w-full border-t border-default px-3 py-2 text-left text-[11px] text-secondary transition hover:bg-bg-elevated hover:text-heading",children:"Reset to auto-detected default"})]})]})}function rM({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-mono-800/70 bg-bg/80 px-3 pt-2",children:[f.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-base bg-bg-elevated/70 px-2 py-0.5 text-[10px] text-secondary",children:[f.jsx("span",{className:"text-faint",children:"project"}),f.jsx("span",{className:"font-medium text-strong",children:e})]}),c&&f.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-base bg-bg-elevated/70 px-2 py-0.5 text-[10px] text-secondary",children:[f.jsx("span",{className:"text-faint",children:"model"}),f.jsx("span",{className:"font-medium text-strong",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-caution-800/60 bg-caution-950/40 text-caution hover:border-caution-700 hover:text-caution-200":"border-base bg-bg-elevated/70 text-secondary hover:border-strong hover:text-strong"}`,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-caution-500":"text-faint",children:"scope"}),f.jsx("span",{className:"font-medium",children:d?"all tools":"read-only"})]})]})}function oM({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-base bg-bg/98 shadow-2xl",children:[f.jsx("div",{className:"border-b border-default px-3 py-1.5 text-[10px] uppercase tracking-wider text-muted",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-bg-elevated text-heading":"text-neutral hover:bg-bg-elevated/60"}`,children:[f.jsx("span",{className:"font-mono text-[11px] text-positive-400",children:l.command}),f.jsx("span",{className:"font-medium",children:l.label}),f.jsx("span",{className:"ml-auto text-[10px] text-muted",children:l.hint})]})},l.command)})}),f.jsxs("div",{className:"border-t border-default px-3 py-1.5 text-[10px] text-faint",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 lM(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";case"deepinfra":return"DEEPINFRA_TOKEN"}}function cM(e,n){const i=e.timestamp??0;return`${e.role}:${i}:${n}`}function uM(e,n,i,r){const l=[];for(let c=0;c<e.length;c++){const d=e[c],h=cM(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(dM,{text:g,projectName:n,providerOverride:i,scope:r},h));continue}if(d.role==="assistant"){const g=new Map;let v=c+1;for(;v<e.length&&e[v].role==="toolResult";){const N=e[v];g.set(N.toolCallId,N),v++}const S=pM(d,g,d.timestamp??0),x=_S(d);l.push(f.jsxs(q.Fragment,{children:[S.length>0&&f.jsx("div",{className:"mt-3 space-y-1.5",children:S.map(N=>f.jsx(CS,{trail:N},N.id))}),x.trim()&&f.jsxs("div",{className:"mt-3",children:[f.jsx("div",{className:"mb-0.5 text-[10px] uppercase tracking-wider text-positive-400",children:"Aero"}),f.jsx(TS,{content:x})]})]},h)),c=v-1;continue}}return l}function dM({text:e,projectName:n,providerOverride:i,scope:r}){const[l,c]=q.useState(!1),d=q.useMemo(()=>fM(n,e,i,r),[n,e,i,r]);async function h(){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-bg-elevated/60 px-3 py-2 text-strong",children:[f.jsxs("div",{className:"flex items-center justify-between gap-2",children:[f.jsx("div",{className:"text-[10px] uppercase tracking-wider text-muted",children:"You"}),f.jsx("button",{type:"button",onClick:Nn(h),className:"inline-flex items-center gap-1 rounded border border-mono-800/70 bg-bg/60 px-1.5 py-0.5 text-[10px] text-secondary opacity-0 transition hover:border-strong hover:text-heading group-hover:opacity-100 focus:opacity-100","aria-label":"Copy as CLI command",title:d,children:l?f.jsxs(f.Fragment,{children:[f.jsx(Bv,{className:"h-2.5 w-2.5 text-positive-400","aria-hidden":"true"}),"Copied"]}):f.jsxs(f.Fragment,{children:[f.jsx(SA,{className:"h-2.5 w-2.5","aria-hidden":"true"}),"Copy as CLI"]})})]}),f.jsx("div",{className:"whitespace-pre-wrap",children:e})]})}function fM(e,n,i,r){const l=["canonry","agent","ask",Yb(e),Yb(n)];return i&&l.push("--provider",i),r==="read-only"&&l.push("--scope","read-only"),l.join(" ")}function Yb(e){return`'${e.replace(/'/g,"'\\''")}'`}function pM(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 CS({trail:e}){const[n,i]=q.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`,h=l?"border-negative-800/50":r?"border-positive-800/50":"border-mono-800/70",g=l?"bg-negative-950/20":r?"bg-positive-950/20":"bg-surface-hover";return f.jsxs("div",{className:`rounded-md border ${h} ${g} font-mono`,children:[f.jsxs("button",{type:"button",onClick:()=>i(v=>!v),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(zA,{className:"h-3 w-3 animate-spin text-positive-400","aria-hidden":"true"}):l?f.jsx(qv,{className:"h-3 w-3 text-negative-400","aria-hidden":"true"}):f.jsx(e_,{className:"h-3 w-3 text-muted","aria-hidden":"true"})}),f.jsx("span",{className:"text-[11px] font-semibold text-heading",children:e.name}),f.jsxs("span",{className:"ml-auto flex items-center gap-2 text-[10px] text-muted",children:[r?f.jsx("span",{className:"text-positive-400",children:"running…"}):f.jsxs(f.Fragment,{children:[f.jsx("span",{children:l?"failed":"ok"}),d&&f.jsx("span",{children:d})]}),f.jsx(Wf,{className:`h-3 w-3 transition-transform ${n?"rotate-90":""}`,"aria-hidden":"true"})]})]}),n&&f.jsxs("div",{className:"border-t border-default px-2.5 py-2 text-[11px] text-secondary",children:[f.jsx("div",{className:"mb-1 text-[9px] uppercase tracking-wider text-faint",children:"Args"}),f.jsx("pre",{className:"mb-2 overflow-x-auto whitespace-pre-wrap break-all text-[10px] text-neutral",children:Xb(e.args)}),!r&&e.result!==void 0&&f.jsxs(f.Fragment,{children:[f.jsx("div",{className:"mb-1 text-[9px] uppercase tracking-wider text-faint",children:l?"Error":"Result"}),f.jsx("pre",{className:"overflow-x-auto whitespace-pre-wrap break-all text-[10px] text-neutral",children:Xb(e.result)})]})]})]})}function Xb(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 TS({content:e}){return f.jsx("div",{className:"aero-markdown text-heading",children:f.jsx($w,{components:{h1:n=>f.jsx("h1",{...n,className:"mt-3 mb-2 text-base font-semibold text-primary"}),h2:n=>f.jsx("h2",{...n,className:"mt-3 mb-2 text-sm font-semibold text-primary"}),h3:n=>f.jsx("h3",{...n,className:"mt-3 mb-1.5 text-sm font-semibold text-heading"}),h4:n=>f.jsx("h4",{...n,className:"mt-2 mb-1 text-xs font-semibold uppercase tracking-wide text-neutral"}),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-mono-600"}),strong:n=>f.jsx("strong",{...n,className:"font-semibold text-primary"}),em:n=>f.jsx("em",{...n,className:"text-strong"}),code:({children:n,...i})=>f.jsx("code",{...i,className:"rounded bg-mono-800/70 px-1 py-0.5 font-mono text-[12px] text-positive-200",children:n}),pre:n=>f.jsx("pre",{...n,className:"mb-2 overflow-x-auto rounded-md border border-base bg-bg-elevated/70 p-3 font-mono text-xs text-strong"}),a:n=>f.jsx("a",{...n,className:"text-positive-400 underline decoration-positive-700 hover:decoration-positive-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-base"}),th:n=>f.jsx("th",{...n,className:"px-2 py-1 text-left font-semibold text-neutral"}),tr:n=>f.jsx("tr",{...n,className:"border-b border-mono-900"}),td:n=>f.jsx("td",{...n,className:"px-2 py-1 text-strong"}),blockquote:n=>f.jsx("blockquote",{...n,className:"mb-2 border-l-2 border-strong pl-3 italic text-secondary"}),hr:()=>f.jsx("hr",{className:"my-3 border-base"})},children:e})})}function mM(){return f.jsxs("div",{className:"mt-3 flex items-center gap-2",children:[f.jsx("div",{className:"text-[10px] uppercase tracking-wider text-positive-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-positive-400/80"}),f.jsx("span",{className:"aero-dot aero-dot-2 h-1.5 w-1.5 rounded-full bg-positive-400/60"}),f.jsx("span",{className:"aero-dot aero-dot-3 h-1.5 w-1.5 rounded-full bg-positive-400/40"})]})]})}function hM(){const e=fv(),n=/^\/projects\/([^/]+)/.exec(e.pathname),i=n?decodeURIComponent(n[1]):null,r=fn({...wc({client:te}),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(iM,{projectName:c.name},c.name):null}function Ka(e,n){e.invalidateQueries({predicate:i=>{const r=i.queryKey[0];return typeof r?._id=="string"&&r._id.startsWith(n)}})}function ro(e,n,i){switch(e.invalidateQueries({queryKey:wp({client:te})}),e.invalidateQueries({queryKey:Oi({client:te})}),Ka(e,"getApiV1ProjectsByNameRuns"),n){case Ae["answer-visibility"]:case Ae["site-audit"]:case Ae["backlink-extract"]:return;case Ae["gsc-sync"]:case Ae["inspect-sitemap"]:Ka(e,"getApiV1ProjectsByNameGoogleGsc");return;case Ae["ga-sync"]:Ka(e,"getApiV1ProjectsByNameGa");return;case Ae["traffic-sync"]:Ka(e,"getApiV1ProjectsByNameGa"),Ka(e,"getApiV1ProjectsByNameTraffic");return;case Ae["bing-inspect"]:case Ae["bing-inspect-sitemap"]:Ka(e,"getApiV1ProjectsByNameBing");return;case Ae["aeo-discover-seed"]:case Ae["aeo-discover-probe"]:return;case Ae["gbp-sync"]:Ka(e,"getApiV1ProjectsByNameGbp");return;case Ae["ads-sync"]:Ka(e,"getApiV1ProjectsByNameAds");return;default:return n}}const Fb=[{label:"GitHub",href:"https://github.com/Canonry/canonry",Icon:NA},{label:"Docs",href:"https://github.com/Canonry/canonry/tree/main/docs",Icon:mA},{label:"Changelog",href:"https://github.com/Canonry/canonry/releases",Icon:wA}],Jb=e=>({label:e,state:"checking",detail:"Checking service health"}),gM={apiStatus:Jb("API"),workerStatus:Jb("Worker")};function ES(e){switch(e){case Ae["answer-visibility"]:return"Visibility sweep";case Ae["gsc-sync"]:return"GSC sync";case Ae["inspect-sitemap"]:return"Sitemap inspection";case Ae["ga-sync"]:return"GA sync";case Ae["traffic-sync"]:return"Traffic sync";case Ae["bing-inspect"]:return"Bing URL inspection";case Ae["bing-inspect-sitemap"]:return"Bing sitemap inspection";case Ae["site-audit"]:return"Site audit";case Ae["backlink-extract"]:return"Backlink extract";case Ae["aeo-discover-seed"]:return"Discovery (seed phase)";case Ae["aeo-discover-probe"]:return"Discovery (probe phase)";case Ae["gbp-sync"]:return"Business Profile sync";case Ae["ads-sync"]:return"ChatGPT ads sync"}}function yM(e){return e==="completed"?"positive":e==="partial"?"caution":"negative"}function bM(e){const n=ES(e.kind);return e.status==="completed"?`${n} completed`:e.status==="partial"?`${n} completed with partial results`:e.status==="cancelled"?`${n} cancelled`:`${n} failed`}function vM(e,n){return e.error?`${n}: ${op(e.error)}`:e.location?`${n} · ${e.location}`:n}function Wb(e,n,i){if(n)return n;const r=i.find(l=>l.id===e);return r?.displayName||r?.name||e}function SM(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 xM(e){return e.failed>0||e.cancelled>0?"negative":e.partial>0?"caution":"positive"}function wM(){const e=Wa(),n=q.useSyncExternalStore(nR,_i,_i),i=Object.keys(n.runs).length>0||Object.keys(n.batches).length>0,r=fn({...X0({client:te}),enabled:i,staleTime:ao,refetchInterval:3e3}),l=fn({...wc({client:te}),enabled:i}),c=q.useRef({}),d=q.useCallback(()=>{r.refetch()},[r.refetch]);return q.useEffect(()=>{i&&d()},[i,d]),q.useEffect(()=>{if(!i||typeof window>"u")return;const h=()=>{document.visibilityState==="visible"&&d()};return window.addEventListener("focus",d),document.addEventListener("visibilitychange",h),()=>{window.removeEventListener("focus",d),document.removeEventListener("visibilitychange",h)}},[i,d]),q.useEffect(()=>{const h=r.data??[],g=l.data??[],v=Object.fromEntries(h.map(x=>[x.id,x])),S=Object.fromEntries(h.map(x=>[x.id,x.status]));for(const x of Object.values(n.runs)){const N=v[x.runId];if(!N||!sR(N.status)||(c.current[N.id]??x.lastAnnouncedStatus)===N.status)continue;const T=g.find(O=>O.id===N.projectId);if(T&&ro(e,N.kind,T.name),x.sourceAction==="run-all"){df(N.id);continue}const k=Wb(N.projectId,x.projectLabel,g);tn({title:bM(N),detail:vM(N,k),tone:yM(N.status),dedupeKey:`run:${N.id}`,dedupeMode:"replace",cta:{label:"View run",intent:"open-run-drawer",runId:N.id}}),df(N.id)}if(r.data!==void 0){const x=new Set(h.map(_=>_.id)),N=oR(Object.values(n.runs),x,Date.now(),rR);for(const _ of N){const T=g.find(k=>k.id===_.projectId);T&&ro(e,_.kind,T.name),_.sourceAction!=="run-all"&&tn({title:`${ES(_.kind)} status unavailable`,detail:Wb(_.projectId,_.projectLabel,g),tone:"neutral",dedupeKey:`run-stale:${_.runId}`,dedupeMode:"replace"}),df(_.runId)}}for(const x of Object.values(n.batches)){const N=lR(x.runIds,v);N.finished&&(tn({title:"Run-all batch finished",detail:SM(N,x.skippedCount),tone:xM(N),dedupeKey:`batch:${x.batchId}`,dedupeMode:"replace",cta:{label:"View runs",intent:"go-to-runs"}}),iR(x.batchId))}c.current=S},[l.data,r.data,n,e]),null}function jM(){const e=uo(),{dashboard:n,isLoading:i,refetch:r}=Ac(),d=_p(!e,e?.health).data??e?.health??gM,h=fv(),{runId:g,evidenceId:v,closeDrawer:S}=Cp(),[x,N]=q.useState(!1),[_,T]=q.useState(()=>{if(typeof window>"u")return null;try{return window.localStorage.getItem("canonry:dismissedUpdateVersion")}catch{return null}}),[k]=q.useState(()=>typeof window>"u"?null:new URLSearchParams(window.location.search).get("force-update")),O=k?{current:d.apiStatus.version??"0.0.0",latest:k,url:"https://www.npmjs.com/package/@canonry/canonry",upgradeCommand:"npm install -g @canonry/canonry"}:d.apiStatus.updateAvailable,R=O&&O.latest!==_,I=()=>{if(O){try{window.localStorage.setItem("canonry:dismissedUpdateVersion",O.latest)}catch{}T(O.latest)}},P=Z3(g),Z=P.data??null,X=P.isLoading;q.useEffect(()=>{Z&&Z.status!=="running"&&Z.status!=="queued"&&r()},[Z?.status,r]),q.useEffect(()=>{N(!1)},[h.pathname]),q.useEffect(()=>{if(typeof window>"u"||!g&&!v)return;const le=fe=>{fe.key==="Escape"&&S()};return window.addEventListener("keydown",le),()=>{window.removeEventListener("keydown",le)}},[g,v,S]);const J=n??e?.dashboard??null,z=h.pathname==="/setup"&&J!==null&&J.portfolioOverview.projects.length===0,M=g&&J?x3(J,g):void 0,oe=q.useMemo(()=>h3(h.pathname,J),[h.pathname,J]),{commandCenter:ke}=H3(oe),ze=q.useMemo(()=>{if(v)return j3(ke,J,v)},[v,ke,J]),Se=(()=>{const le=h.pathname;if(le==="/")return"Portfolio";if(le==="/projects")return"Projects";if(le==="/runs")return"Runs";if(le==="/settings")return"Settings";if(le==="/setup")return"Setup";if(le==="/backlinks")return"Backlinks";if(le==="/traffic"||le.startsWith("/traffic/"))return"Server traffic";if(le.startsWith("/projects/")){const $=le.split("/").filter(Boolean)[1];if($&&J){const W=J.projects.find(pe=>pe.project.id===$);if(W)return W.project.name}return"Project"}return"Not found"})(),$e=q.useMemo(()=>Ev(),[]);if(q.useEffect(()=>{const le=n4($e?.theme);if(!le)return;const fe=document.createElement("link");return fe.rel="stylesheet",fe.href=le,document.head.appendChild(fe),()=>{document.head.removeChild(fe)}},[$e]),$e){const le=!$e.views||$e.views.includes(XD(h.pathname));return f.jsxs("div",{className:"app-shell app-shell-embed","data-theme":e4($e.theme),style:t4($e.theme),children:[f.jsx("a",{className:"skip-link",href:"#content",children:"Skip to content"}),f.jsx("main",{id:"content",className:"page-shell",children:le?f.jsx(xf,{}):f.jsx("div",{className:"embed-view-unavailable",role:"status",children:"This view is not available in embed mode."})})]})}return f.jsxs("div",{className:`app-shell ${z?"app-shell-focus":""}`,children:[f.jsx("a",{className:"skip-link",href:"#content",children:"Skip to content"}),!z&&f.jsxs("aside",{className:"sidebar","aria-label":"Primary navigation",children:[f.jsx("div",{className:"sidebar-brand",children:f.jsx(Vb,{version:d.apiStatus.version,updateAvailable:R?O:null,onDismissUpdate:I})}),f.jsxs("nav",{className:"sidebar-nav",children:[f.jsxs(st,{to:"/",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!0},children:[f.jsx(CA,{className:"sidebar-icon"}),f.jsx("span",{children:"Overview"})]}),f.jsxs(st,{to:"/projects",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!1},children:[f.jsx(AA,{className:"sidebar-icon"}),f.jsx("span",{children:"Projects"})]}),f.jsxs(st,{to:"/runs",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!0},children:[f.jsx($A,{className:"sidebar-icon"}),f.jsx("span",{children:"Runs"})]}),f.jsxs(st,{to:"/traffic",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!1},children:[f.jsx(PA,{className:"sidebar-icon"}),f.jsx("span",{children:"Server traffic"})]}),f.jsxs(st,{to:"/backlinks",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!0},children:[f.jsx(EA,{className:"sidebar-icon"}),f.jsx("span",{children:"Backlinks"})]}),f.jsxs(st,{to:"/settings",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!0},children:[f.jsx(FA,{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(le=>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+le*15}%`}})]},le))]}):J&&J.projects.length>0?f.jsxs(f.Fragment,{children:[f.jsx("p",{className:"sidebar-section-title",children:"Projects"}),J.projects.map(le=>{const fe=le.visibilitySummary.tone;return f.jsxs(st,{to:"/projects/$projectName",params:{projectName:le.project.name},className:"sidebar-project",activeProps:{className:"sidebar-project sidebar-project-active"},children:[f.jsx("span",{className:`sidebar-dot sidebar-dot-${fe}`}),f.jsx("span",{children:le.project.displayName||le.project.name})]},le.project.id)})]}):i?null:f.jsxs(f.Fragment,{children:[f.jsx("p",{className:"sidebar-section-title",children:"Resources"}),f.jsxs(st,{to:"/setup",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!0},children:[f.jsx(QA,{className:"sidebar-icon"}),f.jsx("span",{children:"Setup"})]})]})]}),f.jsx("div",{className:"sidebar-footer",children:Fb.map(({label:le,href:fe,Icon:$})=>f.jsx("a",{className:"sidebar-footer-icon",href:fe,target:"_blank",rel:"noopener noreferrer",title:le,"aria-label":le,children:f.jsx($,{className:"size-4"})},fe))})]}),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(Vb,{compact:!0})}),f.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[f.jsx(st,{to:"/",children:"Home"}),f.jsx(Wf,{className:"breadcrumb-sep size-3"}),f.jsx("span",{className:"breadcrumb-current",children:Se})]})]}),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(Ue,{className:"nav-toggle",variant:"secondary",size:"icon",type:"button","aria-expanded":x,"aria-controls":"mobile-nav",onClick:()=>N(le=>!le),children:[f.jsx(BA,{className:"size-4"}),f.jsx("span",{className:"sr-only",children:"Open navigation"})]})]})]}),f.jsxs("div",{id:"mobile-nav",className:`mobile-nav ${x?"mobile-nav-open":""}`,children:[f.jsxs(Ue,{className:"mobile-nav-close",variant:"ghost",size:"icon",type:"button",onClick:()=>N(!1),children:[f.jsx(Hs,{className:"size-5"}),f.jsx("span",{className:"sr-only",children:"Close navigation"})]}),f.jsx(st,{to:"/",className:"mobile-nav-link",activeProps:{className:"mobile-nav-link mobile-nav-link-active"},activeOptions:{exact:!0},children:"Overview"}),f.jsx(st,{to:"/projects",className:"mobile-nav-link",activeProps:{className:"mobile-nav-link mobile-nav-link-active"},activeOptions:{exact:!1},children:"Projects"}),f.jsx(st,{to:"/runs",className:"mobile-nav-link",activeProps:{className:"mobile-nav-link mobile-nav-link-active"},activeOptions:{exact:!0},children:"Runs"}),f.jsx(st,{to:"/traffic",className:"mobile-nav-link",activeProps:{className:"mobile-nav-link mobile-nav-link-active"},activeOptions:{exact:!1},children:"Server traffic"}),f.jsx(st,{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(le=>f.jsx(st,{to:"/projects/$projectName",params:{projectName:le.project.name},className:"mobile-nav-link",children:le.project.name},le.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(le=>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"})]},le))}),f.jsx("div",{className:"page-skeleton-grid",style:{gridTemplateColumns:"1fr 1fr"},children:[1,2].map(le=>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(fe=>f.jsx("div",{className:"skeleton-text-sm w-full"},fe))})]},le))})]}):f.jsx(xf,{})}),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:Fb.map(({label:le,href:fe,Icon:$})=>f.jsx("a",{href:fe,target:"_blank",rel:"noopener noreferrer",title:le,"aria-label":le,className:"footer-icon",children:f.jsx($,{className:"size-3.5"})},fe))})]})]}),M?f.jsxs(l3,{open:!0,title:M.summary,subtitle:`${M.projectName} · ${M.kindLabel}`,onClose:S,children:[f.jsxs("div",{className:"flex flex-wrap items-center gap-x-5 gap-y-1 text-sm",children:[f.jsx(kp,{status:M.status}),f.jsx("span",{className:"text-secondary",children:M.startedAt}),f.jsx("span",{className:"text-muted",children:M.duration}),f.jsx("span",{className:"text-faint",children:M.triggerLabel})]}),M.status==="failed"&&M.statusDetail&&f.jsx("p",{className:"text-sm text-negative/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-muted mb-2",children:"Activity Log"}),X?f.jsx("p",{className:"text-sm text-muted",children:"Loading run details..."}):Z?.snapshots&&Z.snapshots.length>0?f.jsxs("div",{className:"space-y-2",children:[Z.snapshots.map(le=>f.jsxs("div",{className:"rounded-lg border border-default bg-surface 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-strong truncate",children:le.query??"Unknown query"}),f.jsxs("div",{className:"flex items-center gap-1.5",children:[f.jsx(t3,{provider:le.provider}),f.jsx(yS,{variant:le.citationState===sc.cited?"success":"neutral",children:le.citationState})]})]}),le.model&&f.jsx("p",{className:"text-[11px] text-muted font-mono",children:le.model}),le.citedDomains.length>0&&f.jsxs("p",{className:"text-xs text-muted mt-1",children:[f.jsx("span",{className:"text-secondary",children:"Sources:"})," ",le.citedDomains.join(", ")]}),le.competitorOverlap.length>0&&f.jsxs("p",{className:"text-xs text-negative-400/80 mt-0.5",children:["Competitor cited: ",le.competitorOverlap.join(", ")]}),le.groundingSources&&le.groundingSources.length>0&&f.jsxs("details",{className:"mt-2",children:[f.jsxs("summary",{className:"text-xs text-muted cursor-pointer hover:text-secondary",children:[le.groundingSources.length," grounding source",le.groundingSources.length!==1?"s":""]}),f.jsx("ul",{className:"mt-1 space-y-0.5",children:le.groundingSources.map((fe,$)=>{const W=Mf(fe.uri),pe=fe.title||fe.uri;return f.jsx("li",{className:"text-xs text-muted truncate",children:W?f.jsx("a",{href:W,target:"_blank",rel:"noopener noreferrer",className:"hover:text-neutral",children:pe}):f.jsx("span",{children:pe})},$)})})]}),le.answerText&&f.jsxs("details",{className:"mt-1",children:[f.jsx("summary",{className:"text-xs text-muted cursor-pointer hover:text-secondary",children:"Answer preview"}),f.jsx("p",{className:"mt-1 text-xs text-secondary leading-relaxed whitespace-pre-wrap",children:le.answerText})]})]},le.id)),Z.status==="running"&&f.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-muted",children:[f.jsx("span",{className:"inline-block h-2 w-2 rounded-full bg-caution-500 animate-pulse"}),"Running remaining queries..."]})]}):Z&&Z.status==="running"?f.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-muted",children:[f.jsx("span",{className:"inline-block h-2 w-2 rounded-full bg-caution-500 animate-pulse"}),"Waiting for first query result..."]}):Z&&Z.status==="queued"?f.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-muted",children:[f.jsx("span",{className:"inline-block h-2 w-2 rounded-full bg-mono-500 animate-pulse"}),"Run queued, waiting for execution slot..."]}):Z&&Z.error?f.jsxs("div",{className:"rounded-lg border border-negative-800/40 bg-negative-950/20 p-3",children:[f.jsx("p",{className:"text-sm font-medium text-negative mb-2",children:"Run failed"}),f.jsx("pre",{className:"text-xs text-negative/80 whitespace-pre-wrap break-words max-h-48 overflow-y-auto font-mono leading-5",children:KD(Z.error)})]}):f.jsx("p",{className:"text-sm text-muted",children:"No snapshot data available."})]})]}):null,ze?f.jsx(f3,{evidence:ze.evidence,project:ze.project,onClose:S}):null,f.jsx(wM,{}),f.jsx(F3,{}),f.jsx(hM,{})]})}class NM extends q.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-negative-950/40 p-3",children:f.jsx(qv,{className:"size-6 text-negative-400"})}),f.jsx("h2",{className:"text-lg font-semibold text-heading",children:"Something went wrong"}),f.jsx("p",{className:"text-sm text-secondary 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(Ue,{variant:"secondary",size:"sm",onClick:this.handleReset,children:[f.jsx(Lv,{className:"size-3.5 mr-1.5"}),"Try again"]}),f.jsx(Ue,{variant:"secondary",size:"sm",onClick:()=>{const n=window.__CANONRY_CONFIG__?.basePath?.replace(/\/$/,"")??"";window.location.href=n||"/"},children:"Go home"})]})]})}):this.props.children}}const kn=q.forwardRef(({className:e,...n},i)=>f.jsx("div",{ref:i,className:En("rounded-xl border border-base bg-bg/75 shadow-[0_0_0_1px_var(--color-shadow-hairline)]",e),...n}));kn.displayName="Card";const Bf=q.forwardRef(({className:e,...n},i)=>f.jsx("div",{ref:i,className:En("flex flex-col gap-1.5 p-5",e),...n}));Bf.displayName="CardHeader";const Lf=q.forwardRef(({className:e,...n},i)=>f.jsx("h3",{ref:i,className:En("font-medium tracking-tight text-primary",e),...n}));Lf.displayName="CardTitle";const qf=q.forwardRef(({className:e,...n},i)=>f.jsx("p",{ref:i,className:En("text-sm text-muted",e),...n}));qf.displayName="CardDescription";const Yl=q.forwardRef(({className:e,...n},i)=>f.jsx("div",{ref:i,className:En("p-5 pt-0",e),...n}));Yl.displayName="CardContent";function kM({points:e,tone:n}){const i=q.useId();if(e.length===0)return null;const r=42,l=132,c=5,d=Math.min(...e),g=Math.max(...e)-d||1,v=l-c*2,S=r-c*2,x=e.map((N,_)=>{const T=c+_/Math.max(e.length-1,1)*v,k=c+(1-(N-d)/g)*S;return`${T},${k}`}).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:v,height:S,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:x,vectorEffect:"non-scaling-stroke"})]})}function AM({project:e}){return f.jsxs(st,{to:"/projects/$projectName",params:{projectName:e.project.name},className:"project-row cursor-pointer",children:[f.jsx("div",{className:"project-row-chart",children:f.jsx(kM,{points:e.trend,tone:J0(e.lastRun.status)})}),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:"Mentioned"}),f.jsx("p",{className:`metric-inline-value ${e.mentionTone==="caution"?"text-caution-400":""}`,children:e.mentionScore}),f.jsx("p",{className:"metric-inline-delta",children:e.mentionDelta}),e.providerCoverage&&f.jsx("p",{className:"text-[10px] font-medium text-caution-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.jsx("span",{className:"project-row-link",children:f.jsx(Wf,{className:"h-4 w-4 text-muted"})})]})}function _M(){const e=uo(),{dashboard:n,isLoading:i}=Ac(),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(S=>f.jsxs("div",{className:"rounded-xl border border-default bg-surface 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"})]},S))})]});const l=r.portfolioOverview,h=_p(!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=Y4(l.systemHealth,h,r.settings),{openRun:v}=Cp();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-faint",children:l.lastUpdatedAt})})]}),l.projects.length>0?f.jsx("div",{className:"project-list project-list-scrollable",children:l.projects.map(S=>f.jsx(AM,{project:S},S.project.id))}):f.jsxs(kn,{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(Ue,{size:"sm",asChild:!0,children:f.jsx(st,{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(S=>S.href?f.jsxs(st,{to:S.href,className:`attention-item attention-item-${S.tone}`,children:[f.jsxs("div",{children:[f.jsx("p",{className:"attention-title",children:S.title}),f.jsx("p",{className:"attention-detail",children:S.detail})]}),S.actionLabel&&f.jsx("span",{className:"attention-action",children:S.actionLabel})]},S.id):f.jsxs("div",{className:`attention-item attention-item-static attention-item-${S.tone}`,children:[f.jsxs("div",{children:[f.jsx("p",{className:"attention-title",children:S.title}),f.jsx("p",{className:"attention-detail",children:S.detail})]}),S.actionLabel&&f.jsx("span",{className:"attention-action",children:S.actionLabel})]},S.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(S=>f.jsxs("button",{className:"compact-run",type:"button",onClick:()=>v(S.id),children:[f.jsxs("div",{children:[f.jsx("p",{className:"compact-run-title",children:S.projectName}),f.jsx("p",{className:"compact-run-detail",children:S.summary})]}),f.jsx(kp,{status:S.status})]},S.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(S=>f.jsxs(kn,{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:S.label}),f.jsx("h3",{children:S.detail})]}),f.jsx(Bn,{tone:S.tone,title:S.id==="api"?$s(h.apiStatus):S.id==="worker"?$s(h.workerStatus):void 0,children:S.label})]}),f.jsx("p",{className:"supporting-copy",children:S.meta})]},S.id))})]})]})}const zp=Symbol.for("yaml.alias"),Uf=Symbol.for("yaml.document"),Xa=Symbol.for("yaml.map"),OS=Symbol.for("yaml.pair"),Qn=Symbol.for("yaml.scalar"),Xs=Symbol.for("yaml.seq"),Cn=Symbol.for("yaml.node.type"),Di=e=>!!e&&typeof e=="object"&&e[Cn]===zp,_c=e=>!!e&&typeof e=="object"&&e[Cn]===Uf,fo=e=>!!e&&typeof e=="object"&&e[Cn]===Xa,xt=e=>!!e&&typeof e=="object"&&e[Cn]===OS,nt=e=>!!e&&typeof e=="object"&&e[Cn]===Qn,po=e=>!!e&&typeof e=="object"&&e[Cn]===Xs;function bt(e){if(e&&typeof e=="object")switch(e[Cn]){case Xa:case Xs:return!0}return!1}function St(e){if(e&&typeof e=="object")switch(e[Cn]){case zp:case Xa:case Qn:case Xs:return!0}return!1}const zS=e=>(nt(e)||bt(e))&&!!e.anchor,ji=Symbol("break visit"),CM=Symbol("skip children"),to=Symbol("remove node");function Fs(e,n){const i=TM(n);_c(e)?Os(null,e.contents,i,Object.freeze([e]))===to&&(e.contents=null):Os(null,e,i,Object.freeze([]))}Fs.BREAK=ji;Fs.SKIP=CM;Fs.REMOVE=to;function Os(e,n,i,r){const l=EM(e,n,i,r);if(St(l)||xt(l))return OM(e,r,l),Os(e,l,i,r);if(typeof l!="symbol"){if(bt(n)){r=Object.freeze(r.concat(n));for(let c=0;c<n.items.length;++c){const d=Os(c,n.items[c],i,r);if(typeof d=="number")c=d-1;else{if(d===ji)return ji;d===to&&(n.items.splice(c,1),c-=1)}}}else if(xt(n)){r=Object.freeze(r.concat(n));const c=Os("key",n.key,i,r);if(c===ji)return ji;c===to&&(n.key=null);const d=Os("value",n.value,i,r);if(d===ji)return ji;d===to&&(n.value=null)}}return l}function TM(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 EM(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(xt(n))return i.Pair?.(e,n,r);if(nt(n))return i.Scalar?.(e,n,r);if(Di(n))return i.Alias?.(e,n,r)}function OM(e,n,i){const r=n[n.length-1];if(bt(r))r.items[e]=i;else if(xt(r))e==="key"?r.key=i:r.value=i;else if(_c(r))r.contents=i;else{const l=Di(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${l} parent`)}}const zM={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},DM=e=>e.replace(/[!,[\]{}]/g,n=>zM[n]);class Ht{constructor(n,i){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},Ht.defaultYaml,n),this.tags=Object.assign({},Ht.defaultTags,i)}clone(){const n=new Ht(this.yaml,this.tags);return n.docStart=this.docStart,n}atDocument(){const n=new Ht(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:Ht.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},Ht.defaultTags);break}return n}add(n,i){this.atNextDocument&&(this.yaml={explicit:Ht.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},Ht.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+DM(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&&St(n.contents)){const c={};Fs(n.contents,(d,h)=>{St(h)&&h.tag&&(c[h.tag]=!0)}),l=Object.keys(c)}else l=[];for(const[c,d]of r)c==="!!"&&d==="tag:yaml.org,2002:"||(!n||l.some(h=>h.startsWith(d)))&&i.push(`%TAG ${c} ${d}`);return i.join(`
|
|
65
|
+
`)}}Ht.defaultYaml={explicit:!1,version:"1.2"};Ht.defaultTags={"!!":"tag:yaml.org,2002:"};function DS(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 RS(e){const n=new Set;return Fs(e,{Value(i,r){r.anchor&&n.add(r.anchor)}}),n}function MS(e,n){for(let i=1;;++i){const r=`${e}${i}`;if(!n.has(r))return r}}function RM(e,n){const i=[],r=new Map;let l=null;return{onAnchor:c=>{i.push(c),l??(l=RS(e));const d=MS(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)||bt(d.node)))d.node.anchor=d.anchor;else{const h=new Error("Failed to resolve repeated object (this should not happen)");throw h.source=c,h}}},sourceObjects:r}}function zs(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],h=zs(e,r,String(l),d);h===void 0?delete r[l]:h!==d&&(r[l]=h)}else if(r instanceof Map)for(const l of Array.from(r.keys())){const c=r.get(l),d=zs(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=zs(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=zs(e,r,l,c);d===void 0?delete r[l]:d!==c&&(r[l]=d)}return e.call(n,i,r)}function _n(e,n,i){if(Array.isArray(e))return e.map((r,l)=>_n(r,String(l),i));if(e&&typeof e.toJSON=="function"){if(!i||!zS(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 Dp{constructor(n){Object.defineProperty(this,Cn,{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(!_c(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},h=_n(this,"",d);if(typeof l=="function")for(const{count:g,res:v}of d.anchors.values())l(v,g);return typeof c=="function"?zs(c,{"":h},"",h):h}}class Rp extends Dp{constructor(n){super(zp),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=[],Fs(n,{Node:(c,d)=>{(Di(d)||zS(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 h=r.get(d);if(h||(_n(d,null,i),h=r.get(d)),h?.res===void 0){const g="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(g)}if(c>=0&&(h.count+=1,h.aliasCount===0&&(h.aliasCount=Xl(l,d,r)),h.count*h.aliasCount>c)){const g="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(g)}return h.res}toString(n,i,r){const l=`*${this.source}`;if(n){if(DS(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 Xl(e,n,i){if(Di(n)){const r=n.resolve(e),l=i&&r&&i.get(r);return l?l.count*l.aliasCount:0}else if(bt(n)){let r=0;for(const l of n.items){const c=Xl(e,l,i);c>r&&(r=c)}return r}else if(xt(n)){const r=Xl(e,n.key,i),l=Xl(e,n.value,i);return Math.max(r,l)}return 1}const BS=e=>!e||typeof e!="function"&&typeof e!="object";class Ce extends Dp{constructor(n){super(Qn),this.value=n}toJSON(n,i){return i?.keep?this.value:_n(this.value,n,i)}toString(){return String(this.value)}}Ce.BLOCK_FOLDED="BLOCK_FOLDED";Ce.BLOCK_LITERAL="BLOCK_LITERAL";Ce.PLAIN="PLAIN";Ce.QUOTE_DOUBLE="QUOTE_DOUBLE";Ce.QUOTE_SINGLE="QUOTE_SINGLE";const MM="tag:yaml.org,2002:";function BM(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(_c(e)&&(e=e.contents),St(e))return e;if(xt(e)){const x=i.schema[Xa].createNode?.(i.schema,null,i);return x.items.push(e),x}(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:h}=i;let g;if(r&&e&&typeof e=="object"){if(g=h.get(e),g)return g.anchor??(g.anchor=l(e)),new Rp(g.anchor);g={anchor:null,node:null},h.set(e,g)}n?.startsWith("!!")&&(n=MM+n.slice(2));let v=BM(e,n,d.tags);if(!v){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){const x=new Ce(e);return g&&(g.node=x),x}v=e instanceof Map?d[Xa]:Symbol.iterator in Object(e)?d[Xs]:d[Xa]}c&&(c(v),delete i.onTagObj);const S=v?.createNode?v.createNode(i.schema,e,i):typeof v?.nodeClass?.from=="function"?v.nodeClass.from(i.schema,e,i):new Ce(e);return n?S.tag=n:v.default||(S.tag=v.tag),g&&(g.node=S),S}function uc(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 eo=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done;class LS extends Dp{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=>St(r)||xt(r)?r.clone(n):r),this.range&&(i.range=this.range.slice()),i}addIn(n,i){if(eo(n))this.add(i);else{const[r,...l]=n,c=this.get(r,!0);if(bt(c))c.addIn(l,i);else if(c===void 0&&this.schema)this.set(r,uc(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(bt(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:bt(c)?c.getIn(l,i):void 0}hasAllNullValues(n){return this.items.every(i=>{if(!xt(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 bt(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(bt(c))c.setIn(l,i);else if(c===void 0&&this.schema)this.set(r,uc(this.schema,l,i));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${l}`)}}}const LM=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function ha(e,n){return/^\n+$/.test(e)?e.substring(1):n?e.replace(/^(?! *$)/gm,n):e}const Ni=(e,n,i)=>e.endsWith(`
|
|
66
66
|
`)?ha(i,n):i.includes(`
|
|
67
67
|
`)?`
|
|
68
|
-
`+ha(i,n):(e.endsWith(" ")?"":" ")+i,
|
|
69
|
-
`)i===$f&&(k=
|
|
68
|
+
`+ha(i,n):(e.endsWith(" ")?"":" ")+i,qS="flow",$f="block",Fl="quoted";function Cc(e,n,i="flow",{indentAtStart:r,lineWidth:l=80,minContentWidth:c=20,onFold:d,onOverflow:h}={}){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 v=[],S={};let x=l-n.length;typeof r=="number"&&(r>l-Math.max(2,c)?v.push(0):x=l-r);let N,_,T=!1,k=-1,O=-1,R=-1;i===$f&&(k=ev(e,k,n.length),k!==-1&&(x=k+g));for(let P;P=e[k+=1];){if(i===Fl&&P==="\\"){switch(O=k,e[k+1]){case"x":k+=3;break;case"u":k+=5;break;case"U":k+=9;break;default:k+=1}R=k}if(P===`
|
|
69
|
+
`)i===$f&&(k=ev(e,k,n.length)),x=k+n.length+g,N=void 0;else{if(P===" "&&_&&_!==" "&&_!==`
|
|
70
70
|
`&&_!==" "){const Z=e[k+1];Z&&Z!==" "&&Z!==`
|
|
71
|
-
`&&Z!==" "&&(N=k)}if(k>=x)if(N)v.push(N),x=N+g,N=void 0;else if(i===
|
|
72
|
-
${n}${e.slice(0,X)}`:(i===
|
|
73
|
-
${n}${e.slice(Z+1,X)}`)}return I}function
|
|
74
|
-
`);r=n,l=n+1,c=e[l]}return r}const Tc=(e,n)=>({indentAtStart:n?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),Ec=e=>/^(%|---|\.\.\.)/m.test(e);function
|
|
71
|
+
`&&Z!==" "&&(N=k)}if(k>=x)if(N)v.push(N),x=N+g,N=void 0;else if(i===Fl){for(;_===" "||_===" ";)_=P,P=e[k+=1],T=!0;const Z=k>R+1?k-2:O-1;if(S[Z])return e;v.push(Z),S[Z]=!0,x=Z+g,N=void 0}else T=!0}_=P}if(T&&h&&h(),v.length===0)return e;d&&d();let I=e.slice(0,v[0]);for(let P=0;P<v.length;++P){const Z=v[P],X=v[P+1]||e.length;Z===0?I=`
|
|
72
|
+
${n}${e.slice(0,X)}`:(i===Fl&&S[Z]&&(I+=`${e[Z]}\\`),I+=`
|
|
73
|
+
${n}${e.slice(Z+1,X)}`)}return I}function ev(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 Tc=(e,n)=>({indentAtStart:n?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),Ec=e=>/^(%|---|\.\.\.)/m.test(e);function qM(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 no(e,n){const i=JSON.stringify(e);if(n.options.doubleQuotedAsJSON)return i;const{implicitKey:r}=n,l=n.options.doubleQuotedMinMultiLineLength,c=n.indent||(Ec(e)?" ":"");let d="",h=0;for(let g=0,v=i[g];v;v=i[++g])if(v===" "&&i[g+1]==="\\"&&i[g+2]==="n"&&(d+=i.slice(h,g)+"\\ ",g+=1,h=g,v="\\"),v==="\\")switch(i[g+1]){case"u":{d+=i.slice(h,g);const S=i.substr(g+2,4);switch(S){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:S.substr(0,2)==="00"?d+="\\x"+S.substr(2):d+=i.substr(g,6)}g+=5,h=g+1}break;case"n":if(r||i[g+2]==='"'||i.length<l)g+=1;else{for(d+=i.slice(h,g)+`
|
|
76
76
|
|
|
77
77
|
`;i[g+2]==="\\"&&i[g+3]==="n"&&i[g+4]!=='"';)d+=`
|
|
78
|
-
`,g+=2;d+=c,i[g+2]===" "&&(d+="\\"),g+=1,h=g+1}break;default:g+=1}return d=h?d+i.slice(h):i,r?d:Cc(d,c,
|
|
78
|
+
`,g+=2;d+=c,i[g+2]===" "&&(d+="\\"),g+=1,h=g+1}break;default:g+=1}return d=h?d+i.slice(h):i,r?d:Cc(d,c,Fl,Tc(n,!1))}function Vf(e,n){if(n.options.singleQuote===!1||n.implicitKey&&e.includes(`
|
|
79
79
|
`)||/[ \t]\n|\n[ \t]/.test(e))return no(e,n);const i=n.indent||(Ec(e)?" ":""),r="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
80
|
-
${i}`)+"'";return n.implicitKey?r:Cc(r,i,
|
|
80
|
+
${i}`)+"'";return n.implicitKey?r:Cc(r,i,qS,Tc(n,!1))}function Ds(e,n){const{singleQuote:i}=n.options;let r;if(i===!1)r=no;else{const l=e.includes('"'),c=e.includes("'");l&&!c?r=Vf:c&&!l?r=no:r=i?Vf:no}return r(e,n)}let If;try{If=new RegExp(`(^|(?<!
|
|
81
81
|
))
|
|
82
82
|
+(?!
|
|
83
|
-
|$)`,"g")}catch{If=/\n+(?!\n|$)/g}function
|
|
83
|
+
|$)`,"g")}catch{If=/\n+(?!\n|$)/g}function Jl({comment:e,type:n,value:i},r,l,c){const{blockQuote:d,commentString:h,lineWidth:g}=r.options;if(!d||/\n[\t ]+$/.test(i))return Ds(i,r);const v=r.indent||(r.forceBlockIndent||Ec(i)?" ":""),S=d==="literal"?!0:d==="folded"||n===Ce.BLOCK_FOLDED?!1:n===Ce.BLOCK_LITERAL?!0:!qM(i,g,v.length);if(!i)return S?`|
|
|
84
84
|
`:`>
|
|
85
85
|
`;let x,N;for(N=i.length;N>0;--N){const X=i[N-1];if(X!==`
|
|
86
86
|
`&&X!==" "&&X!==" ")break}let _=i.substring(N);const T=_.indexOf(`
|
|
87
87
|
`);T===-1?x="-":i===_||T!==_.length-1?(x="+",c&&c()):x="",_&&(i=i.slice(0,-_.length),_[_.length-1]===`
|
|
88
88
|
`&&(_=_.slice(0,-1)),_=_.replace(If,`$&${v}`));let k=!1,O,R=-1;for(O=0;O<i.length;++O){const X=i[O];if(X===" ")k=!0;else if(X===`
|
|
89
89
|
`)R=O;else break}let I=i.substring(0,R<O?R+1:O);I&&(i=i.substring(I.length),I=I.replace(/\n+/g,`$&${v}`));let Z=(k?v?"2":"1":"")+x;if(e&&(Z+=" "+h(e.replace(/ ?[\r\n]+/g," ")),l&&l()),!S){const X=i.replace(/\n+/g,`
|
|
90
|
-
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${v}`);let
|
|
90
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${v}`);let J=!1;const z=Tc(r,!0);d!=="folded"&&n!==Ce.BLOCK_FOLDED&&(z.onOverflow=()=>{J=!0});const M=Cc(`${I}${X}${_}`,v,$f,z);if(!J)return`>${Z}
|
|
91
91
|
${v}${M}`}return i=i.replace(/\n+/g,`$&${v}`),`|${Z}
|
|
92
|
-
${v}${I}${i}${_}`}function
|
|
92
|
+
${v}${I}${i}${_}`}function UM(e,n,i,r){const{type:l,value:c}=e,{actualString:d,implicitKey:h,indent:g,indentStep:v,inFlow:S}=n;if(h&&c.includes(`
|
|
93
93
|
`)||S&&/[[\]{},]/.test(c))return Ds(c,n);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(c))return h||S||!c.includes(`
|
|
94
|
-
`)?Ds(c,n):
|
|
95
|
-
`))return
|
|
96
|
-
${g}`);if(d){const N=k=>k.default&&k.tag!=="tag:yaml.org,2002:str"&&k.test?.test(x),{compat:_,tags:T}=n.doc.schema;if(T.some(N)||_?.some(N))return Ds(c,n)}return h?x:Cc(x,g,
|
|
97
|
-
${n.indent}${h}`:h}function
|
|
98
|
-
${h}:`):(O=`${O}:`,N&&(O+=Ni(O,i.indent,v(N))));let R,I,P;St(n)?(R=!!n.spaceBefore,I=n.commentBefore,P=n.comment):(R=!1,I=null,P=null,n&&typeof n=="object"&&(n=d.createNode(n))),i.implicitKey=!1,!_&&!N&&nt(n)&&(i.indentAtStart=O.length+1),k=!1,!S&&g.length>=2&&!i.inFlow&&!_&&po(n)&&!n.flow&&!n.tag&&!n.anchor&&(i.indent=i.indent.substring(2));let Z=!1;const X=Vs(n,i,()=>Z=!0,()=>k=!0);let
|
|
99
|
-
`:"",I){const z=v(I);
|
|
100
|
-
${ha(z,i.indent)}`}X===""&&!i.inFlow?
|
|
101
|
-
`&&P&&(
|
|
94
|
+
`)?Ds(c,n):Jl(e,n,i,r);if(!h&&!S&&l!==Ce.PLAIN&&c.includes(`
|
|
95
|
+
`))return Jl(e,n,i,r);if(Ec(c)){if(g==="")return n.forceBlockIndent=!0,Jl(e,n,i,r);if(h&&g===v)return Ds(c,n)}const x=c.replace(/\n+/g,`$&
|
|
96
|
+
${g}`);if(d){const N=k=>k.default&&k.tag!=="tag:yaml.org,2002:str"&&k.test?.test(x),{compat:_,tags:T}=n.doc.schema;if(T.some(N)||_?.some(N))return Ds(c,n)}return h?x:Cc(x,g,qS,Tc(n,!1))}function Mp(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:h}=e;h!==Ce.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(d.value)&&(h=Ce.QUOTE_DOUBLE);const g=S=>{switch(S){case Ce.BLOCK_FOLDED:case Ce.BLOCK_LITERAL:return l||c?Ds(d.value,n):Jl(d,n,i,r);case Ce.QUOTE_DOUBLE:return no(d.value,n);case Ce.QUOTE_SINGLE:return Vf(d.value,n);case Ce.PLAIN:return UM(d,n,i,r);default:return null}};let v=g(h);if(v===null){const{defaultKeyType:S,defaultStringType:x}=n.options,N=l&&S||x;if(v=g(N),v===null)throw new Error(`Unsupported default string type ${N}`)}return v}function US(e,n){const i=Object.assign({blockQuote:!0,commentString:LM,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 $M(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 VM(e,n,{anchors:i,doc:r}){if(!r.directives)return"";const l=[],c=(nt(e)||bt(e))&&e.anchor;c&&DS(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 Vs(e,n,i,r){if(xt(e))return e.toString(n,i,r);if(Di(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=St(e)?e:n.doc.createNode(e,{onTagObj:g=>l=g});l??(l=$M(n.doc.schema.tags,c));const d=VM(c,l,n);d.length>0&&(n.indentAtStart=(n.indentAtStart??0)+d.length+1);const h=typeof l.stringify=="function"?l.stringify(c,n,i,r):nt(c)?Mp(c,n,i,r):c.toString(n,i,r);return d?nt(c)||h[0]==="{"||h[0]==="["?`${d} ${h}`:`${d}
|
|
97
|
+
${n.indent}${h}`:h}function IM({key:e,value:n},i,r,l){const{allNullValues:c,doc:d,indent:h,indentStep:g,options:{commentString:v,indentSeq:S,simpleKeys:x}}=i;let N=St(e)&&e.comment||null;if(x){if(N)throw new Error("With simple keys, key nodes cannot have comments");if(bt(e)||!St(e)&&typeof e=="object"){const z="With simple keys, collection cannot be used as a key value";throw new Error(z)}}let _=!x&&(!e||N&&n==null&&!i.inFlow||bt(e)||(nt(e)?e.type===Ce.BLOCK_FOLDED||e.type===Ce.BLOCK_LITERAL:typeof e=="object"));i=Object.assign({},i,{allNullValues:!1,implicitKey:!_&&(x||!c),indent:h+g});let T=!1,k=!1,O=Vs(e,i,()=>T=!0,()=>k=!0);if(!_&&!i.inFlow&&O.length>1024){if(x)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 T&&r&&r(),O===""?"?":_?`? ${O}`:O}else if(c&&!x||n==null&&_)return O=`? ${O}`,N&&!T?O+=Ni(O,i.indent,v(N)):k&&l&&l(),O;T&&(N=null),_?(N&&(O+=Ni(O,i.indent,v(N))),O=`? ${O}
|
|
98
|
+
${h}:`):(O=`${O}:`,N&&(O+=Ni(O,i.indent,v(N))));let R,I,P;St(n)?(R=!!n.spaceBefore,I=n.commentBefore,P=n.comment):(R=!1,I=null,P=null,n&&typeof n=="object"&&(n=d.createNode(n))),i.implicitKey=!1,!_&&!N&&nt(n)&&(i.indentAtStart=O.length+1),k=!1,!S&&g.length>=2&&!i.inFlow&&!_&&po(n)&&!n.flow&&!n.tag&&!n.anchor&&(i.indent=i.indent.substring(2));let Z=!1;const X=Vs(n,i,()=>Z=!0,()=>k=!0);let J=" ";if(N||R||I){if(J=R?`
|
|
99
|
+
`:"",I){const z=v(I);J+=`
|
|
100
|
+
${ha(z,i.indent)}`}X===""&&!i.inFlow?J===`
|
|
101
|
+
`&&P&&(J=`
|
|
102
102
|
|
|
103
|
-
`):
|
|
103
|
+
`):J+=`
|
|
104
104
|
${i.indent}`}else if(!_&&bt(n)){const z=X[0],M=X.indexOf(`
|
|
105
|
-
`),oe=M!==-1,ke=i.inFlow??n.flow??n.items.length===0;if(oe||!ke){let ze=!1;if(oe&&(z==="&"||z==="!")){let Se=X.indexOf(" ");z==="&"&&Se!==-1&&Se<M&&X[Se+1]==="!"&&(Se=X.indexOf(" ",Se+1)),(Se===-1||M<Se)&&(ze=!0)}ze||(
|
|
105
|
+
`),oe=M!==-1,ke=i.inFlow??n.flow??n.items.length===0;if(oe||!ke){let ze=!1;if(oe&&(z==="&"||z==="!")){let Se=X.indexOf(" ");z==="&"&&Se!==-1&&Se<M&&X[Se+1]==="!"&&(Se=X.indexOf(" ",Se+1)),(Se===-1||M<Se)&&(ze=!0)}ze||(J=`
|
|
106
106
|
${i.indent}`)}}else(X===""||X[0]===`
|
|
107
|
-
`)&&(
|
|
107
|
+
`)&&(J="");return O+=J+X,i.inFlow?Z&&r&&r():P&&!Z?O+=Ni(O,i.indent,v(P)):k&&l&&l(),O}function PM(e,n){(e==="debug"||e==="warn")&&console.warn(n)}const Pl="<<",ga={identify:e=>e===Pl||typeof e=="symbol"&&e.description===Pl,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new Ce(Symbol(Pl)),{addToJSMap:$S}),stringify:()=>Pl},GM=(e,n)=>(ga.identify(n)||nt(n)&&(!n.type||n.type===Ce.PLAIN)&&ga.identify(n.value))&&e?.doc.schema.tags.some(i=>i.tag===ga.tag&&i.default);function $S(e,n,i){if(i=e&&Di(i)?i.resolve(e.doc):i,po(i))for(const r of i.items)hf(e,n,r);else if(Array.isArray(i))for(const r of i)hf(e,n,r);else hf(e,n,i)}function hf(e,n,i){const r=e&&Di(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 VS(e,n,{key:i,value:r}){if(St(i)&&i.addToJSMap)i.addToJSMap(e,n,r);else if(GM(e,i))$S(e,n,r);else{const l=_n(i,"",e);if(n instanceof Map)n.set(l,_n(r,l,e));else if(n instanceof Set)n.add(l);else{const c=HM(i,l,e),d=_n(r,c,e);c in n?Object.defineProperty(n,c,{value:d,writable:!0,enumerable:!0,configurable:!0}):n[c]=d}}return n}function HM(e,n,i){if(n===null)return"";if(typeof n!="object")return String(n);if(St(e)&&i?.doc){const r=US(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)+'..."'),PM(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 Bp(e,n,i){const r=oo(e,void 0,i),l=oo(n,void 0,i);return new Kt(r,l)}class Kt{constructor(n,i=null){Object.defineProperty(this,Cn,{value:OS}),this.key=n,this.value=i}clone(n){let{key:i,value:r}=this;return St(i)&&(i=i.clone(n)),St(r)&&(r=r.clone(n)),new Kt(i,r)}toJSON(n,i){const r=i?.mapAsMap?new Map:{};return VS(i,r,this)}toString(n,i,r){return n?.doc?IM(this,n,i,r):JSON.stringify(this)}}function IS(e,n,i){return(n.inFlow??e.flow?KM:QM)(e,n,i)}function QM({comment:e,items:n},i,{blockItemPrefix:r,flowChars:l,itemIndent:c,onChompKeep:d,onComment:h}){const{indent:g,options:{commentString:v}}=i,S=Object.assign({},i,{indent:c,type:null});let x=!1;const N=[];for(let T=0;T<n.length;++T){const k=n[T];let O=null;if(St(k))!x&&k.spaceBefore&&N.push(""),dc(i,N,k.commentBefore,x),k.comment&&(O=k.comment);else if(xt(k)){const I=St(k.key)?k.key:null;I&&(!x&&I.spaceBefore&&N.push(""),dc(i,N,I.commentBefore,x))}x=!1;let R=Vs(k,S,()=>O=null,()=>x=!0);O&&(R+=Ni(R,c,v(O))),x&&O&&(x=!1),N.push(r+R)}let _;if(N.length===0)_=l.start+l.end;else{_=N[0];for(let T=1;T<N.length;++T){const k=N[T];_+=k?`
|
|
108
108
|
${g}${k}`:`
|
|
109
109
|
`}}return e?(_+=`
|
|
110
|
-
`+ha(v(e),g),h&&h()):x&&d&&d(),_}function
|
|
110
|
+
`+ha(v(e),g),h&&h()):x&&d&&d(),_}function KM({items:e},n,{flowChars:i,itemIndent:r}){const{indent:l,indentStep:c,flowCollectionPadding:d,options:{commentString:h}}=n;r+=c;const g=Object.assign({},n,{indent:r,inFlow:!0,type:null});let v=!1,S=0;const x=[];for(let T=0;T<e.length;++T){const k=e[T];let O=null;if(St(k))k.spaceBefore&&x.push(""),dc(n,x,k.commentBefore,!1),k.comment&&(O=k.comment);else if(xt(k)){const I=St(k.key)?k.key:null;I&&(I.spaceBefore&&x.push(""),dc(n,x,I.commentBefore,!1),I.comment&&(v=!0));const P=St(k.value)?k.value:null;P?(P.comment&&(O=P.comment),P.commentBefore&&(v=!0)):k.value==null&&I?.comment&&(O=I.comment)}O&&(v=!0);let R=Vs(k,g,()=>O=null);T<e.length-1&&(R+=","),O&&(R+=Ni(R,r,h(O))),!v&&(x.length>S||R.includes(`
|
|
111
111
|
`))&&(v=!0),x.push(R),S=x.length}const{start:N,end:_}=i;if(x.length===0)return N+_;if(!v){const T=x.reduce((k,O)=>k+O.length+2,2);v=n.options.lineWidth>0&&T>n.options.lineWidth}if(v){let T=N;for(const k of x)T+=k?`
|
|
112
112
|
${c}${l}${k}`:`
|
|
113
113
|
`;return`${T}
|
|
114
|
-
${l}${_}`}else return`${N}${d}${x.join(" ")}${d}${_}`}function dc({indent:e,options:{commentString:n}},i,r,l){if(r&&l&&(r=r.replace(/^\n+/,"")),r){const c=ha(n(r),e);i.push(c.trimStart())}}function ki(e,n){const i=nt(n)?n.value:n;for(const r of e)if(xt(r)&&(r.key===n||r.key===i||nt(r.key)&&r.key.value===i))return r}class An extends
|
|
115
|
-
`:" ")}return Mp({comment:e,type:n,value:h},r,l,c)}};function
|
|
114
|
+
${l}${_}`}else return`${N}${d}${x.join(" ")}${d}${_}`}function dc({indent:e,options:{commentString:n}},i,r,l){if(r&&l&&(r=r.replace(/^\n+/,"")),r){const c=ha(n(r),e);i.push(c.trimStart())}}function ki(e,n){const i=nt(n)?n.value:n;for(const r of e)if(xt(r)&&(r.key===n||r.key===i||nt(r.key)&&r.key.value===i))return r}class An extends LS{static get tagName(){return"tag:yaml.org,2002:map"}constructor(n){super(Xa,n),this.items=[]}static from(n,i,r){const{keepUndefined:l,replacer:c}=r,d=new this(n),h=(g,v)=>{if(typeof c=="function")v=c.call(i,g,v);else if(Array.isArray(c)&&!c.includes(g))return;(v!==void 0||l)&&d.items.push(Bp(g,v,r))};if(i instanceof Map)for(const[g,v]of i)h(g,v);else if(i&&typeof i=="object")for(const g of Object.keys(i))h(g,i[g]);return typeof n.sortMapEntries=="function"&&d.items.sort(n.sortMapEntries),d}add(n,i){let r;xt(n)?r=n:!n||typeof n!="object"||!("key"in n)?r=new Kt(n,n?.value):r=new Kt(n.key,n.value);const l=ki(this.items,r.key),c=this.schema?.sortMapEntries;if(l){if(!i)throw new Error(`Key ${r.key} already set`);nt(l.value)&&BS(r.value)?l.value.value=r.value:l.value=r.value}else if(c){const d=this.items.findIndex(h=>c(r,h)<0);d===-1?this.items.push(r):this.items.splice(d,0,r)}else this.items.push(r)}delete(n){const i=ki(this.items,n);return i?this.items.splice(this.items.indexOf(i),1).length>0:!1}get(n,i){const l=ki(this.items,n)?.value;return(!i&&nt(l)?l.value:l)??void 0}has(n){return!!ki(this.items,n)}set(n,i){this.add(new Kt(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)VS(i,l,c);return l}toString(n,i,r){if(!n)return JSON.stringify(this);for(const l of this.items)if(!xt(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})),IS(this,n,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:n.indent||"",onChompKeep:r,onComment:i})}}const Js={collection:"map",default:!0,nodeClass:An,tag:"tag:yaml.org,2002:map",resolve(e,n){return fo(e)||n("Expected a mapping for this tag"),e},createNode:(e,n,i)=>An.from(e,n,i)};class Ci extends LS{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(n){super(Xs,n),this.items=[]}add(n){this.items.push(n)}delete(n){const i=Gl(n);return typeof i!="number"?!1:this.items.splice(i,1).length>0}get(n,i){const r=Gl(n);if(typeof r!="number")return;const l=this.items[r];return!i&&nt(l)?l.value:l}has(n){const i=Gl(n);return typeof i=="number"&&i<this.items.length}set(n,i){const r=Gl(n);if(typeof r!="number")throw new Error(`Expected a valid index, not ${n}.`);const l=this.items[r];nt(l)&&BS(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(_n(c,String(l++),i));return r}toString(n,i,r){return n?IS(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 h of i){if(typeof l=="function"){const g=i instanceof Set?h:String(d++);h=l.call(i,g,h)}c.items.push(oo(h,void 0,r))}}return c}}function Gl(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 Ws={collection:"seq",default:!0,nodeClass:Ci,tag:"tag:yaml.org,2002:seq",resolve(e,n){return po(e)||n("Expected a sequence for this tag"),e},createNode:(e,n,i)=>Ci.from(e,n,i)},Oc={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),Mp(e,n,i,r)}},zc={identify:e=>e==null,createNode:()=>new Ce(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Ce(null),stringify:({source:e},n)=>typeof e=="string"&&zc.test.test(e)?e:n.options.nullStr},Lp={identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new Ce(e[0]==="t"||e[0]==="T"),stringify({source:e,value:n},i){if(e&&Lp.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 qn({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 h=n-(c.length-d-1);for(;h-- >0;)c+="0"}return c}const PS={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:qn},GS={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():qn(e)}},HS={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 Ce(parseFloat(e)),i=e.indexOf(".");return i!==-1&&e[e.length-1]==="0"&&(n.minFractionDigits=e.length-i-1),n},stringify:qn},Dc=e=>typeof e=="bigint"||Number.isInteger(e),qp=(e,n,i,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(n),i);function QS(e,n,i){const{value:r}=e;return Dc(r)&&r>=0?i+r.toString(n):qn(e)}const KS={identify:e=>Dc(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,n,i)=>qp(e,2,8,i),stringify:e=>QS(e,8,"0o")},ZS={identify:Dc,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,n,i)=>qp(e,0,10,i),stringify:qn},YS={identify:e=>Dc(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,n,i)=>qp(e,2,16,i),stringify:e=>QS(e,16,"0x")},ZM=[Js,Ws,Oc,zc,Lp,KS,ZS,YS,PS,GS,HS];function tv(e){return typeof e=="bigint"||Number.isInteger(e)}const Hl=({value:e})=>JSON.stringify(e),YM=[{identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:Hl},{identify:e=>e==null,createNode:()=>new Ce(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:tv,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})=>tv(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}],XM={default:!0,tag:"",test:/^/,resolve(e,n){return n(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},FM=[Js,Ws].concat(YM,XM),Up={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 h;if(typeof btoa=="function"){let g="";for(let v=0;v<d.length;++v)g+=String.fromCharCode(d[v]);h=btoa(g)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(n??(n=Ce.BLOCK_LITERAL),n!==Ce.QUOTE_DOUBLE){const g=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),v=Math.ceil(h.length/g),S=new Array(v);for(let x=0,N=0;x<v;++x,N+=g)S[x]=h.substr(N,g);h=S.join(n===Ce.BLOCK_LITERAL?`
|
|
115
|
+
`:" ")}return Mp({comment:e,type:n,value:h},r,l,c)}};function XS(e,n){if(po(e))for(let i=0;i<e.items.length;++i){let r=e.items[i];if(!xt(r)){if(fo(r)){r.items.length>1&&n("Each pair must have its own sequence indicator");const l=r.items[0]||new Kt(new Ce(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]=xt(r)?r:new Kt(r)}}else n("Expected a sequence for this tag");return e}function
|
|
117
|
+
${c.comment}`:r.comment}r=l}e.items[i]=xt(r)?r:new Kt(r)}}else n("Expected a sequence for this tag");return e}function FS(e,n,i){const{replacer:r}=i,l=new Ci(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 h,g;if(Array.isArray(d))if(d.length===2)h=d[0],g=d[1];else throw new TypeError(`Expected [key, value] tuple: ${d}`);else if(d&&d instanceof Object){const v=Object.keys(d);if(v.length===1)h=v[0],g=d[h];else throw new TypeError(`Expected tuple with one key, not ${v.length} keys`)}else h=d;l.items.push(Bp(h,g,i))}return l}const $p={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:XS,createNode:FS};class Bs extends Ci{constructor(){super(),this.add=An.prototype.add.bind(this),this.delete=An.prototype.delete.bind(this),this.get=An.prototype.get.bind(this),this.has=An.prototype.has.bind(this),this.set=An.prototype.set.bind(this),this.tag=Bs.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(xt(l)?(c=_n(l.key,"",i),d=_n(l.value,c,i)):c=_n(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=FS(n,i,r),c=new this;return c.items=l.items,c}}Bs.tag="tag:yaml.org,2002:omap";const Vp={collection:"seq",identify:e=>e instanceof Map,nodeClass:Bs,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,n){const i=XS(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 Bs,i)},createNode:(e,n,i)=>Bs.from(e,n,i)};function JS({value:e,source:n},i){return n&&(e?WS:e1).test.test(n)?n:e?i.options.trueStr:i.options.falseStr}const WS={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 Ce(!0),stringify:JS},e1={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 Ce(!1),stringify:JS},JM={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:qn},WM={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():qn(e)}},eB={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 Ce(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:qn},mo=e=>typeof e=="bigint"||Number.isInteger(e);function Rc(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 Ip(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 qn(e)}const tB={identify:mo,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,n,i)=>Rc(e,2,2,i),stringify:e=>Ip(e,2,"0b")},nB={identify:mo,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,n,i)=>Rc(e,1,8,i),stringify:e=>Ip(e,8,"0")},aB={identify:mo,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,n,i)=>Rc(e,0,10,i),stringify:qn},iB={identify:mo,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,n,i)=>Rc(e,2,16,i),stringify:e=>Ip(e,16,"0x")};class Ls extends An{constructor(n){super(n),this.tag=Ls.tag}add(n){let i;xt(n)?i=n:n&&typeof n=="object"&&"key"in n&&"value"in n&&n.value===null?i=new Kt(n.key,null):i=new Kt(n,null),ki(this.items,i.key)||this.items.push(i)}get(n,i){const r=ki(this.items,n);return!i&&xt(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=ki(this.items,n);r&&!i?this.items.splice(this.items.indexOf(r),1):!r&&i&&this.items.push(new Kt(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(Bp(d,null,r));return c}}Ls.tag="tag:yaml.org,2002:set";const Pp={collection:"map",identify:e=>e instanceof Set,nodeClass:Ls,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,n,i)=>Ls.from(e,n,i),resolve(e,n){if(fo(e)){if(e.hasAllNullValues(!0))return Object.assign(new Ls,e);n("Set items must all have null values")}else n("Expected a mapping for this tag");return e}};function Gp(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,h)=>d*l(60)+l(h),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 qn(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 n1={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})=>Gp(e,i),stringify:t1},a1={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=>Gp(e,!1),stringify:t1},Mc={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(Mc.test);if(!n)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,i,r,l,c,d,h]=n.map(Number),g=n[7]?Number((n[7]+"00").substr(1,3)):0;let v=Date.UTC(i,r-1,l,c||0,d||0,h||0,g);const S=n[8];if(S&&S!=="Z"){let x=Gp(S,!1);Math.abs(x)<30&&(x*=60),v-=6e4*x}return new Date(v)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""},nv=[Js,Ws,Oc,zc,WS,e1,tB,nB,aB,iB,JM,WM,eB,Up,ga,Vp,$p,Pp,n1,a1,Mc],av=new Map([["core",ZM],["failsafe",[Js,Ws,Oc]],["json",FM],["yaml11",nv],["yaml-1.1",nv]]),iv={binary:Up,bool:Lp,float:HS,floatExp:GS,floatNaN:PS,floatTime:a1,int:ZS,intHex:YS,intOct:KS,intTime:n1,map:Js,merge:ga,null:zc,omap:Vp,pairs:$p,seq:Ws,set:Pp,timestamp:Mc},sB={"tag:yaml.org,2002:binary":Up,"tag:yaml.org,2002:merge":ga,"tag:yaml.org,2002:omap":Vp,"tag:yaml.org,2002:pairs":$p,"tag:yaml.org,2002:set":Pp,"tag:yaml.org,2002:timestamp":Mc};function gf(e,n,i){const r=av.get(n);if(r&&!e)return i&&!r.includes(ga)?r.concat(ga):r.slice();let l=r;if(!l)if(Array.isArray(e))l=[];else{const c=Array.from(av.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(ga)),l.reduce((c,d)=>{const h=typeof d=="string"?iv[d]:d;if(!h){const g=JSON.stringify(d),v=Object.keys(iv).map(S=>JSON.stringify(S)).join(", ");throw new Error(`Unknown custom tag ${g}; use one of ${v}`)}return c.includes(h)||c.push(h),c},[])}const rB=(e,n)=>e.key<n.key?-1:e.key>n.key?1:0;class Hp{constructor({compat:n,customTags:i,merge:r,resolveKnownTags:l,schema:c,sortMapEntries:d,toStringDefaults:h}){this.compat=Array.isArray(n)?gf(n,"compat"):n?gf(null,n):null,this.name=typeof c=="string"&&c||"core",this.knownTags=l?sB:{},this.tags=gf(i,this.name,r),this.toStringOptions=h??null,Object.defineProperty(this,Xa,{value:Js}),Object.defineProperty(this,Qn,{value:Oc}),Object.defineProperty(this,Xs,{value:Ws}),this.sortMapEntries=typeof d=="function"?d:d===!0?rB:null}clone(){const n=Object.create(Hp.prototype,Object.getOwnPropertyDescriptors(this));return n.tags=this.tags.slice(),n}}function oB(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=US(e,n),{commentString:c}=l.options;if(e.commentBefore){i.length!==1&&i.unshift("");const g=c(e.commentBefore);i.unshift(ha(g,""))}let d=!1,h=null;if(e.contents){if(St(e.contents)){if(e.contents.spaceBefore&&r&&i.push(""),e.contents.commentBefore){const S=c(e.contents.commentBefore);i.push(ha(S,""))}l.forceBlockIndent=!!e.comment,h=e.contents.comment}const g=h?void 0:()=>d=!0;let v=Vs(e.contents,l,()=>h=null,g);h&&(v+=Ni(v,"",c(h))),(v[0]==="|"||v[0]===">")&&i[i.length-1]==="---"?i[i.length-1]=`--- ${v}`:i.push(v)}else i.push(Vs(e.contents,l));if(e.directives?.docEnd)if(e.comment){const g=c(e.comment);g.includes(`
|
|
118
118
|
`)?(i.push("..."),i.push(ha(g,""))):i.push(`... ${g}`)}else i.push("...");else{let g=e.comment;g&&d&&(g=g.replace(/^\n+/,"")),g&&((!d||h)&&i[i.length-1]!==""&&i.push(""),i.push(ha(c(g),"")))}return i.join(`
|
|
119
119
|
`)+`
|
|
120
|
-
`}class Bc{constructor(n,i,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Cn,{value:Uf});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 Ht({version:d}),this.setSchema(d,r),this.contents=n===void 0?null:this.createNode(n,l,r)}clone(){const n=Object.create(Bc.prototype,{[Cn]:{value:Uf}});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=St(this.contents)?this.contents.clone(n.schema):this.contents,this.range&&(n.range=this.range.slice()),n}add(n){_s(this.contents)&&this.contents.add(n)}addIn(n,i){_s(this.contents)&&this.contents.addIn(n,i)}createAlias(n,i){if(!n.anchor){const r=
|
|
120
|
+
`}class Bc{constructor(n,i,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Cn,{value:Uf});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 Ht({version:d}),this.setSchema(d,r),this.contents=n===void 0?null:this.createNode(n,l,r)}clone(){const n=Object.create(Bc.prototype,{[Cn]:{value:Uf}});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=St(this.contents)?this.contents.clone(n.schema):this.contents,this.range&&(n.range=this.range.slice()),n}add(n){_s(this.contents)&&this.contents.add(n)}addIn(n,i){_s(this.contents)&&this.contents.addIn(n,i)}createAlias(n,i){if(!n.anchor){const r=RS(this);n.anchor=!i||r.has(i)?MS(i||"a",r):i}return new Rp(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 O=I=>typeof I=="number"||I instanceof String||I instanceof Number,R=i.filter(O).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:h,keepUndefined:g,onTagObj:v,tag:S}=r??{},{onAnchor:x,setAnchors:N,sourceObjects:_}=RM(this,d||"a"),T={aliasDuplicateObjects:c??!0,keepUndefined:g??!1,onAnchor:x,onTagObj:v,replacer:l,schema:this.schema,sourceObjects:_},k=oo(n,S,T);return h&&bt(k)&&(k.flow=!0),N(),k}createPair(n,i,r={}){const l=this.createNode(n,null,r),c=this.createNode(i,null,r);return new Kt(l,c)}delete(n){return _s(this.contents)?this.contents.delete(n):!1}deleteIn(n){return eo(n)?this.contents==null?!1:(this.contents=null,!0):_s(this.contents)?this.contents.deleteIn(n):!1}get(n,i){return bt(this.contents)?this.contents.get(n,i):void 0}getIn(n,i){return eo(n)?!i&&nt(this.contents)?this.contents.value:this.contents:bt(this.contents)?this.contents.getIn(n,i):void 0}has(n){return bt(this.contents)?this.contents.has(n):!1}hasIn(n){return eo(n)?this.contents!==void 0:bt(this.contents)?this.contents.hasIn(n):!1}set(n,i){this.contents==null?this.contents=uc(this.schema,[n],i):_s(this.contents)&&this.contents.set(n,i)}setIn(n,i){eo(n)?this.contents=i:this.contents==null?this.contents=uc(this.schema,Array.from(n),i):_s(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 Ht({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 Ht({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 Hp(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 h={anchors:new Map,doc:this,keep:!n,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof l=="number"?l:100},g=_n(this.contents,i??"",h);if(typeof c=="function")for(const{count:v,res:S}of h.anchors.values())c(S,v);return typeof d=="function"?zs(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 oB(this,n)}}function _s(e){if(bt(e))return!0;throw new Error("Expected a YAML collection as document contents")}class i1 extends Error{constructor(n,i,r,l){super(),this.name=n,this.code=r,this.message=l,this.pos=i}}class Ql extends i1{constructor(n,i,r){super("YAMLParseError",n,i,r)}}class lB extends i1{constructor(n,i,r){super("YAMLWarning",n,i,r)}}const sv=(e,n)=>i=>{if(i.pos[0]===-1)return;i.linePos=i.pos.map(h=>n.linePos(h));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 h=Math.min(c-39,d.length-79);d="…"+d.substring(h),c-=h-1}if(d.length>80&&(d=d.substring(0,79)+"…"),r>1&&/^ *$/.test(d.substring(0,c))){let h=e.substring(n.lineStarts[r-2],n.lineStarts[r-1]);h.length>80&&(h=h.substring(0,79)+`…
|
|
121
121
|
`),d=h+d}if(/[^ ]/.test(d)){let h=1;const g=i.linePos[1];g?.line===r&&g.col>l&&(h=Math.max(1,Math.min(g.col-l,80-c)));const v=" ".repeat(c)+"^".repeat(h);i.message+=`:
|
|
122
122
|
|
|
123
123
|
${d}
|
|
124
124
|
${v}
|
|
125
|
-
`}};function Is(e,{flow:n,indicator:i,next:r,offset:l,onError:c,parentIndent:d,startOnNewline:h}){let g=!1,v=h,S=h,x="",N="",_=!1,T=!1,k=null,O=null,R=null,I=null,P=null,Z=null,X=null;for(const M of e)switch(T&&(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"),T=!1),k&&(v&&M.type!=="comment"&&M.type!=="newline"&&c(k,"TAB_AS_INDENT","Tabs are not allowed as indentation"),k=null),M.type){case"space":!n&&(i!=="doc-start"||r?.type!=="flow-collection")&&M.source.includes(" ")&&(k=M),S=!0;break;case"comment":{S||c(M,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const oe=M.source.substring(1)||" ";x?x+=N+oe:x=oe,N="",v=!1;break}case"newline":v?x?x+=M.source:(!Z||i!=="seq-item-ind")&&(g=!0):N+=M.source,v=!0,_=!0,(O||R)&&(I=M),S=!0;break;case"anchor":O&&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),O=M,X??(X=M.offset),v=!1,S=!1,T=!0;break;case"tag":{R&&c(M,"MULTIPLE_TAGS","A node can have at most one tag"),R=M,X??(X=M.offset),v=!1,S=!1,T=!0;break}case i:(O||R)&&c(M,"BAD_PROP_ORDER",`Anchors and tags must be after the ${M.source} indicator`),Z&&c(M,"UNEXPECTED_TOKEN",`Unexpected ${M.source} in ${n??"collection"}`),Z=M,v=i==="seq-item-ind"||i==="explicit-key-ind",S=!1;break;case"comma":if(n){P&&c(M,"UNEXPECTED_TOKEN",`Unexpected , in ${n}`),P=M,v=!1,S=!1;break}default:c(M,"UNEXPECTED_TOKEN",`Unexpected ${M.type} token`),v=!1,S=!1}const
|
|
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 Pf(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
|
|
127
|
-
`+k.comment:h.comment=k.comment);continue}(k.newlineAfterProp||lo(N))&&l(N??x[x.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else k.found?.indent!==r.indent&&l(g,"BAD_INDENT",
|
|
128
|
-
`+P.comment:I.comment=P.comment);const Z=new Kt(I);i.options.keepSourceTokens&&(Z.srcToken=S),h.items.push(Z)}}return v&&v<g&&l(v,"IMPOSSIBLE","Map comment with trailing content"),h.range=[r.offset,g,v??g],h}function
|
|
129
|
-
`+
|
|
130
|
-
`+z:M.comment=z,
|
|
131
|
-
`+oe.comment:M.comment=oe.comment);const ze=new Kt(M,ke);if(i.options.keepSourceTokens&&(ze.srcToken=R),d){const Se=v;
|
|
132
|
-
`+O.comment:v.comment=O.comment),v.range=[r.offset,k,O.offset]}else v.range=[r.offset,k,k];return v}function vf(e,n,i,r,l,c){const d=i.type==="block-map"?
|
|
125
|
+
`}};function Is(e,{flow:n,indicator:i,next:r,offset:l,onError:c,parentIndent:d,startOnNewline:h}){let g=!1,v=h,S=h,x="",N="",_=!1,T=!1,k=null,O=null,R=null,I=null,P=null,Z=null,X=null;for(const M of e)switch(T&&(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"),T=!1),k&&(v&&M.type!=="comment"&&M.type!=="newline"&&c(k,"TAB_AS_INDENT","Tabs are not allowed as indentation"),k=null),M.type){case"space":!n&&(i!=="doc-start"||r?.type!=="flow-collection")&&M.source.includes(" ")&&(k=M),S=!0;break;case"comment":{S||c(M,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const oe=M.source.substring(1)||" ";x?x+=N+oe:x=oe,N="",v=!1;break}case"newline":v?x?x+=M.source:(!Z||i!=="seq-item-ind")&&(g=!0):N+=M.source,v=!0,_=!0,(O||R)&&(I=M),S=!0;break;case"anchor":O&&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),O=M,X??(X=M.offset),v=!1,S=!1,T=!0;break;case"tag":{R&&c(M,"MULTIPLE_TAGS","A node can have at most one tag"),R=M,X??(X=M.offset),v=!1,S=!1,T=!0;break}case i:(O||R)&&c(M,"BAD_PROP_ORDER",`Anchors and tags must be after the ${M.source} indicator`),Z&&c(M,"UNEXPECTED_TOKEN",`Unexpected ${M.source} in ${n??"collection"}`),Z=M,v=i==="seq-item-ind"||i==="explicit-key-ind",S=!1;break;case"comma":if(n){P&&c(M,"UNEXPECTED_TOKEN",`Unexpected , in ${n}`),P=M,v=!1,S=!1;break}default:c(M,"UNEXPECTED_TOKEN",`Unexpected ${M.type} token`),v=!1,S=!1}const J=e[e.length-1],z=J?J.offset+J.source.length:l;return T&&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"),k&&(v&&k.indent<=d||r?.type==="block-map"||r?.type==="block-seq")&&c(k,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:P,found:Z,spaceBefore:g,comment:x,hasNewline:_,anchor:O,tag:R,newlineAfterProp:I,end:z,start:X??z}}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 Pf(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 s1(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 rv="All mapping items must start at the same column";function cB({composeNode:e,composeEmptyNode:n},i,r,l,c){const d=c?.nodeClass??An,h=new d(i.schema);i.atRoot&&(i.atRoot=!1);let g=r.offset,v=null;for(const S of r.items){const{start:x,key:N,sep:_,value:T}=S,k=Is(x,{indicator:"explicit-key-ind",next:N??_?.[0],offset:g,onError:l,parentIndent:r.indent,startOnNewline:!0}),O=!k.found;if(O){if(N&&(N.type==="block-seq"?l(g,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in N&&N.indent!==r.indent&&l(g,"BAD_INDENT",rv)),!k.anchor&&!k.tag&&!_){v=k.end,k.comment&&(h.comment?h.comment+=`
|
|
127
|
+
`+k.comment:h.comment=k.comment);continue}(k.newlineAfterProp||lo(N))&&l(N??x[x.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else k.found?.indent!==r.indent&&l(g,"BAD_INDENT",rv);i.atKey=!0;const R=k.end,I=N?e(i,N,k,l):n(i,R,x,null,k,l);i.schema.compat&&Pf(r.indent,N,l),i.atKey=!1,s1(i,h.items,I)&&l(R,"DUPLICATE_KEY","Map keys must be unique");const P=Is(_??[],{indicator:"map-value-ind",next:T,offset:I.range[2],onError:l,parentIndent:r.indent,startOnNewline:!N||N.type==="block-scalar"});if(g=P.end,P.found){O&&(T?.type==="block-map"&&!P.hasNewline&&l(g,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),i.options.strict&&k.start<P.found.offset-1024&&l(I.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const Z=T?e(i,T,P,l):n(i,g,_,null,P,l);i.schema.compat&&Pf(r.indent,T,l),g=Z.range[2];const X=new Kt(I,Z);i.options.keepSourceTokens&&(X.srcToken=S),h.items.push(X)}else{O&&l(I.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),P.comment&&(I.comment?I.comment+=`
|
|
128
|
+
`+P.comment:I.comment=P.comment);const Z=new Kt(I);i.options.keepSourceTokens&&(Z.srcToken=S),h.items.push(Z)}}return v&&v<g&&l(v,"IMPOSSIBLE","Map comment with trailing content"),h.range=[r.offset,g,v??g],h}function uB({composeNode:e,composeEmptyNode:n},i,r,l,c){const d=c?.nodeClass??Ci,h=new d(i.schema);i.atRoot&&(i.atRoot=!1),i.atKey&&(i.atKey=!1);let g=r.offset,v=null;for(const{start:S,value:x}of r.items){const N=Is(S,{indicator:"seq-item-ind",next:x,offset:g,onError:l,parentIndent:r.indent,startOnNewline:!0});if(!N.found)if(N.anchor||N.tag||x)x?.type==="block-seq"?l(N.end,"BAD_INDENT","All sequence items must start at the same column"):l(g,"MISSING_CHAR","Sequence item without - indicator");else{v=N.end,N.comment&&(h.comment=N.comment);continue}const _=x?e(i,x,N,l):n(i,N.end,S,null,N,l);i.schema.compat&&Pf(r.indent,x,l),g=_.range[2],h.items.push(_)}return h.range=[r.offset,g,v??g],h}function ho(e,n,i,r){let l="";if(e){let c=!1,d="";for(const h of e){const{source:g,type:v}=h;switch(v){case"space":c=!0;break;case"comment":{i&&!c&&r(h,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const S=g.substring(1)||" ";l?l+=d+S:l=S,d="";break}case"newline":l&&(d+=g),c=!0;break;default:r(h,"UNEXPECTED_TOKEN",`Unexpected ${v} at node end`)}n+=g.length}}return{comment:l,offset:n}}const yf="Block collections are not allowed within flow collections",bf=e=>e&&(e.type==="block-map"||e.type==="block-seq");function dB({composeNode:e,composeEmptyNode:n},i,r,l,c){const d=r.start.source==="{",h=d?"flow map":"flow sequence",g=c?.nodeClass??(d?An:Ci),v=new g(i.schema);v.flow=!0;const S=i.atRoot;S&&(i.atRoot=!1),i.atKey&&(i.atKey=!1);let x=r.offset+r.start.source.length;for(let O=0;O<r.items.length;++O){const R=r.items[O],{start:I,key:P,sep:Z,value:X}=R,J=Is(I,{flow:h,indicator:"explicit-key-ind",next:P??Z?.[0],offset:x,onError:l,parentIndent:r.indent,startOnNewline:!1});if(!J.found){if(!J.anchor&&!J.tag&&!Z&&!X){O===0&&J.comma?l(J.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${h}`):O<r.items.length-1&&l(J.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${h}`),J.comment&&(v.comment?v.comment+=`
|
|
129
|
+
`+J.comment:v.comment=J.comment),x=J.end;continue}!d&&i.options.strict&&lo(P)&&l(P,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(O===0)J.comma&&l(J.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${h}`);else if(J.comma||l(J.start,"MISSING_CHAR",`Missing , between ${h} items`),J.comment){let z="";e:for(const M of I)switch(M.type){case"comma":case"space":break;case"comment":z=M.source.substring(1);break e;default:break e}if(z){let M=v.items[v.items.length-1];xt(M)&&(M=M.value??M.key),M.comment?M.comment+=`
|
|
130
|
+
`+z:M.comment=z,J.comment=J.comment.substring(z.length+1)}}if(!d&&!Z&&!J.found){const z=X?e(i,X,J,l):n(i,J.end,Z,null,J,l);v.items.push(z),x=z.range[2],bf(X)&&l(z.range,"BLOCK_IN_FLOW",yf)}else{i.atKey=!0;const z=J.end,M=P?e(i,P,J,l):n(i,z,I,null,J,l);bf(P)&&l(M.range,"BLOCK_IN_FLOW",yf),i.atKey=!1;const oe=Is(Z??[],{flow:h,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(Z)for(const Se of Z){if(Se===oe.found)break;if(Se.type==="newline"){l(Se,"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 ${h}`):l(oe.start,"MISSING_CHAR",`Missing , or : between ${h} items`));const ke=X?e(i,X,oe,l):oe.found?n(i,oe.end,Z,null,oe,l):null;ke?bf(X)&&l(ke.range,"BLOCK_IN_FLOW",yf):oe.comment&&(M.comment?M.comment+=`
|
|
131
|
+
`+oe.comment:M.comment=oe.comment);const ze=new Kt(M,ke);if(i.options.keepSourceTokens&&(ze.srcToken=R),d){const Se=v;s1(i,Se.items,M)&&l(z,"DUPLICATE_KEY","Map keys must be unique"),Se.items.push(ze)}else{const Se=new An(i.schema);Se.flow=!0,Se.items.push(ze);const $e=(ke??M).range;Se.range=[M.range[0],$e[1],$e[2]],v.items.push(Se)}x=ke?ke.range[2]:oe.end}}const N=d?"}":"]",[_,...T]=r.end;let k=x;if(_?.source===N)k=_.offset+_.source.length;else{const O=h[0].toUpperCase()+h.substring(1),R=S?`${O} must end with a ${N}`:`${O} in block collection must be sufficiently indented and end with a ${N}`;l(x,S?"MISSING_CHAR":"BAD_INDENT",R),_&&_.source.length!==1&&T.unshift(_)}if(T.length>0){const O=ho(T,k,i.options.strict,l);O.comment&&(v.comment?v.comment+=`
|
|
132
|
+
`+O.comment:v.comment=O.comment),v.range=[r.offset,k,O.offset]}else v.range=[r.offset,k,k];return v}function vf(e,n,i,r,l,c){const d=i.type==="block-map"?cB(e,n,i,r,c):i.type==="block-seq"?uB(e,n,i,r,c):dB(e,n,i,r,c),h=d.constructor;return l==="!"||l===h.tagName?(d.tag=h.tagName,d):(l&&(d.tag=l),d)}function fB(e,n,i,r,l){const c=r.tag,d=c?n.directives.tagName(c.source,N=>l(c,"TAG_RESOLVE_FAILED",N)):null;if(i.type==="block-seq"){const{anchor:N,newlineAfterProp:_}=r,T=N&&c?N.offset>c.offset?N:c:N??c;T&&(!_||_.offset<T.offset)&&l(T,"MISSING_CHAR","Missing newline after block sequence props")}const h=i.type==="block-map"?"map":i.type==="block-seq"?"seq":i.start.source==="{"?"map":"seq";if(!c||!d||d==="!"||d===An.tagName&&h==="map"||d===Ci.tagName&&h==="seq")return vf(e,n,i,l,d);let g=n.schema.tags.find(N=>N.tag===d&&N.collection===h);if(!g){const N=n.schema.knownTags[d];if(N?.collection===h)n.schema.tags.push(Object.assign({},N,{default:!1})),g=N;else return N?l(c,"BAD_COLLECTION_TYPE",`${N.tag} used for ${h} collection, but expects ${N.collection??"scalar"}`,!0):l(c,"TAG_RESOLVE_FAILED",`Unresolved tag: ${d}`,!0),vf(e,n,i,l,d)}const v=vf(e,n,i,l,d,g),S=g.resolve?.(v,N=>l(c,"TAG_RESOLVE_FAILED",N),n.options)??v,x=St(S)?S:new Ce(S);return x.range=v.range,x.tag=d,g?.format&&(x.format=g.format),x}function pB(e,n,i){const r=n.offset,l=mB(n,e.options.strict,i);if(!l)return{value:"",type:null,comment:"",range:[r,r,r]};const c=l.mode===">"?Ce.BLOCK_FOLDED:Ce.BLOCK_LITERAL,d=n.source?hB(n.source):[];let h=d.length;for(let k=d.length-1;k>=0;--k){const O=d[k][1];if(O===""||O==="\r")h=k;else break}if(h===0){const k=l.chomp==="+"&&d.length>0?`
|
|
133
133
|
`.repeat(Math.max(1,d.length-1)):"";let O=r+l.length;return n.source&&(O+=n.source.length),{value:k,type:c,comment:l.comment,range:[r,O,O]}}let g=n.indent+l.indent,v=n.offset+l.length,S=0;for(let k=0;k<h;++k){const[O,R]=d[k];if(R===""||R==="\r")l.indent===0&&O.length>g&&(g=O.length);else{O.length<g&&i(v+O.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),l.indent===0&&(g=O.length),S=k,g===0&&!e.atRoot&&i(v,"BAD_INDENT","Block scalar values in collections must be indented");break}v+=O.length+R.length+1}for(let k=d.length-1;k>=h;--k)d[k][0].length>g&&(h=k+1);let x="",N="",_=!1;for(let k=0;k<S;++k)x+=d[k][0].slice(g)+`
|
|
134
134
|
`;for(let k=S;k<h;++k){let[O,R]=d[k];v+=O.length+R.length+1;const I=R[R.length-1]==="\r";if(I&&(R=R.slice(0,-1)),R&&O.length<g){const Z=`Block scalar lines must not be less indented than their ${l.indent?"explicit indentation indicator":"first line"}`;i(v-R.length-(I?2:1),"BAD_INDENT",Z),O=""}c===Ce.BLOCK_LITERAL?(x+=N+O.slice(g)+R,N=`
|
|
135
135
|
`):O.length>g||R[0]===" "?(N===" "?N=`
|
|
@@ -144,38 +144,38 @@ ${v}
|
|
|
144
144
|
`+d[k][0].slice(g);x[x.length-1]!==`
|
|
145
145
|
`&&(x+=`
|
|
146
146
|
`);break;default:x+=`
|
|
147
|
-
`}const T=r+l.length+n.source.length;return{value:x,type:c,comment:l.comment,range:[r,T,T]}}function
|
|
147
|
+
`}const T=r+l.length+n.source.length;return{value:x,type:c,comment:l.comment,range:[r,T,T]}}function mB({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,h="",g=-1;for(let N=1;N<l.length;++N){const _=l[N];if(!h&&(_==="-"||_==="+"))h=_;else{const T=Number(_);!d&&T?d=T:g===-1&&(g=e+N)}}g!==-1&&r(g,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${l}`);let v=!1,S="",x=l.length;for(let N=1;N<n.length;++N){const _=n[N];switch(_.type){case"space":v=!0;case"newline":x+=_.source.length;break;case"comment":i&&!v&&r(_,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),x+=_.source.length,S=_.source.substring(1);break;case"error":r(_,"UNEXPECTED_TOKEN",_.message),x+=_.source.length;break;default:{const T=`Unexpected token in block scalar header: ${_.type}`;r(_,"UNEXPECTED_TOKEN",T);const k=_.source;k&&typeof k=="string"&&(x+=k.length)}}}return{mode:c,indent:d,chomp:h,comment:S,length:x}}function hB(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 gB(e,n,i){const{offset:r,type:l,source:c,end:d}=e;let h,g;const v=(N,_,T)=>i(r+N,_,T);switch(l){case"scalar":h=Ce.PLAIN,g=yB(c,v);break;case"single-quoted-scalar":h=Ce.QUOTE_SINGLE,g=bB(c,v);break;case"double-quoted-scalar":h=Ce.QUOTE_DOUBLE,g=vB(c,v);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 S=r+c.length,x=ho(d,S,n,i);return{value:g,type:h,comment:x.comment,range:[r,S,x.offset]}}function yB(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}`),r1(e)}function bB(e,n){return(e[e.length-1]!=="'"||e.length===1)&&n(e.length,"MISSING_CHAR","Missing closing 'quote"),r1(e.slice(1,-1)).replace(/''/g,"'")}function r1(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 h=/[ \t]*(.*)/sy;return h.lastIndex=d,r=h.exec(e),l+c+(r?.[1]??"")}function
|
|
151
|
+
`:(l+=c+r[1],c=" "),d=i.lastIndex;const h=/[ \t]*(.*)/sy;return h.lastIndex=d,r=h.exec(e),l+c+(r?.[1]??"")}function vB(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}=
|
|
153
|
+
`){const{fold:c,offset:d}=SB(e,r);i+=c,r=d}else if(l==="\\"){let c=e[++r];const d=xB[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 h={x:2,u:4,U:8}[c];i+=
|
|
155
|
+
`)for(c=e[++r+1];c===" "||c===" ";)c=e[++r+1];else if(c==="x"||c==="u"||c==="U"){const h={x:2,u:4,U:8}[c];i+=wB(e,r+1,h,n),r+=h}else{const h=e.substr(r-1,2);n(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${h}`),i+=h}}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
|
|
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 SB(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
|
|
162
|
-
`,r:"\r",t:" ",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function
|
|
161
|
+
`),n+=1,r=e[n+1];return i||(i=" "),{fold:i,offset:n}}const xB={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
|
162
|
+
`,r:"\r",t:" ",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function wB(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 h=e.substr(n-2,i+2);return r(n-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${h}`),h}return String.fromCodePoint(d)}function o1(e,n,i,r){const{value:l,type:c,comment:d,range:h}=n.type==="block-scalar"?pB(e,n,r):gB(n,e.options.strict,r),g=i?e.directives.tagName(i.source,x=>r(i,"TAG_RESOLVE_FAILED",x)):null;let v;e.options.stringKeys&&e.atKey?v=e.schema[Qn]:g?v=jB(e.schema,l,g,i,r):n.type==="scalar"?v=NB(e,l,n,r):v=e.schema[Qn];let S;try{const x=v.resolve(l,N=>r(i??n,"TAG_RESOLVE_FAILED",N),e.options);S=nt(x)?x:new Ce(x)}catch(x){const N=x instanceof Error?x.message:String(x);r(i??n,"TAG_RESOLVE_FAILED",N),S=new Ce(l)}return S.range=h,S.source=l,c&&(S.type=c),g&&(S.tag=g),v.format&&(S.format=v.format),d&&(S.comment=d),S}function jB(e,n,i,r,l){if(i==="!")return e[Qn];const c=[];for(const h of e.tags)if(!h.collection&&h.tag===i)if(h.default&&h.test)c.push(h);else return h;for(const h of c)if(h.test?.test(n))return h;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[Qn])}function NB({atKey:e,directives:n,schema:i},r,l,c){const d=i.tags.find(h=>(h.default===!0||e&&h.default==="key")&&h.test?.test(r))||i[Qn];if(i.compat){const h=i.compat.find(g=>g.default&&g.test?.test(r))??i[Qn];if(d.tag!==h.tag){const g=n.tagString(d.tag),v=n.tagString(h.tag),S=`Value may be parsed as either ${g} or ${v}`;c(l,"TAG_RESOLVE_FAILED",S,!0)}}return d}function kB(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 AB={composeNode:l1,composeEmptyNode:Qp};function l1(e,n,i,r){const l=e.atKey,{spaceBefore:c,comment:d,anchor:h,tag:g}=i;let v,S=!0;switch(n.type){case"alias":v=_B(e,n,r),(h||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":v=o1(e,n,g,r),h&&(v.anchor=h.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":v=fB(AB,e,n,i,r),h&&(v.anchor=h.source.substring(1));break;default:{const x=n.type==="error"?n.message:`Unsupported token (type: ${n.type})`;r(n,"UNEXPECTED_TOKEN",x),v=Qp(e,n.offset,void 0,null,i,r),S=!1}}return h&&v.anchor===""&&r(h,"BAD_ALIAS","Anchor cannot be an empty string"),l&&e.options.stringKeys&&(!nt(v)||typeof v.value!="string"||v.tag&&v.tag!=="tag:yaml.org,2002:str")&&r(g??n,"NON_STRING_KEY","With stringKeys, all keys must be strings"),c&&(v.spaceBefore=!0),d&&(n.type==="scalar"&&n.source===""?v.comment=d:v.commentBefore=d),e.options.keepSourceTokens&&S&&(v.srcToken=n),v}function Qp(e,n,i,r,{spaceBefore:l,comment:c,anchor:d,tag:h,end:g},v){const S={type:"scalar",offset:kB(n,i,r),indent:-1,source:""},x=o1(e,S,h,v);return d&&(x.anchor=d.source.substring(1),x.anchor===""&&v(d,"BAD_ALIAS","Anchor cannot be an empty string")),l&&(x.spaceBefore=!0),c&&(x.comment=c,x.range[2]=g),x}function _B({options:e},{offset:n,source:i,end:r},l){const c=new Rp(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,h=ho(r,d,e.strict,l);return c.range=[n,d,h.offset],h.comment&&(c.comment=h.comment),c}function CB(e,n,{offset:i,start:r,value:l,end:c},d){const h=Object.assign({_directives:n},e),g=new Bc(void 0,h),v={atKey:!1,atRoot:!0,directives:g.directives,options:g.options,schema:g.schema},S=Is(r,{indicator:"doc-start",next:l??c?.[0],offset:i,onError:d,parentIndent:0,startOnNewline:!0});S.found&&(g.directives.docStart=!0,l&&(l.type==="block-map"||l.type==="block-seq")&&!S.hasNewline&&d(S.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),g.contents=l?l1(v,l,S,d):Qp(v,S.end,r,null,S,d);const x=g.contents.range[2],N=ho(c,x,!1,d);return N.comment&&(g.comment=N.comment),g.range=[i,x,N.offset],g}function Jr(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 ov(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
|
|
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 TB{constructor(n={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(i,r,l,c)=>{const d=Jr(i);c?this.warnings.push(new lB(d,r,l)):this.errors.push(new Ql(d,r,l))},this.directives=new Ht({version:n.version||"1.2"}),this.options=n}decorate(n,i){const{comment:r,afterEmptyLine:l}=ov(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(bt(c)&&!c.flow&&c.items.length>0){let d=c.items[0];xt(d)&&(d=d.key);const h=d.commentBefore;d.commentBefore=h?`${r}
|
|
167
167
|
${h}`: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:
|
|
169
|
-
${i.comment}`:i.comment}this.doc.range[2]=i.offset;break}default:this.errors.push(new Ql(
|
|
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:ov(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=Jr(n);c[0]+=i,this.onError(c,"BAD_DIRECTIVE",r,l)}),this.prelude.push(n.source),this.atDirectives=!0;break;case"document":{const i=CB(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 Ql(Jr(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 Ql(Jr(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 Ql(Jr(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 Bc(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 c1="\uFEFF",u1="",d1="",Gf="";function EB(e){switch(e){case c1:return"byte-order-mark";case u1:return"doc-mode";case d1:return"flow-error-end";case Gf: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
|
|
173
|
-
\r `),Sf=e=>!e||
|
|
172
|
+
`:case"\r":case" ":return!0;default:return!1}}const lv=new Set("0123456789ABCDEFabcdef"),OB=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Kl=new Set(",[]{}"),zB=new Set(` ,[]{}
|
|
173
|
+
\r `),Sf=e=>!e||zB.has(e);class DB{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]===
|
|
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]===c1&&(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(Sf),"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 d1,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(Sf),"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>h)n=c;else break}while(!0);return yield Gf,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&&Kl.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&&Kl.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&&Kl.has(l))break;i=r}return!l&&!this.atEnd?this.setNext("plain-scalar"):(yield Gf,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(Sf))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const n=this.flowLevel>0,i=this.charAt(1);if(Rn(i)||n&&Kl.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(
|
|
188
|
+
`){const d=this.continueScalar(r+1);if(d===-1)break;r=Math.max(r,d-2)}}else{if(n&&Kl.has(l))break;i=r}return!l&&!this.atEnd?this.setNext("plain-scalar"):(yield Gf,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(Sf))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const n=this.flowLevel>0,i=this.charAt(1);if(Rn(i)||n&&Kl.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(OB.has(i))i=this.buffer[++n];else if(i==="%"&&lv.has(this.buffer[n+1])&&lv.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
|
|
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 RB{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 Ya(e,n){for(let i=0;i<e.length;++i)if(e[i].type===n)return!0;return!1}function cv(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 f1(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 Zl(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 Cs(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 uv(e){if(e.start.type==="flow-seq-start")for(const n of e.items)n.sep&&!n.value&&!Ya(n.start,"explicit-key-ind")&&!Ya(n.sep,"map-value-ind")&&(n.key&&(n.value=n.key),delete n.key,f1(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 MB{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 DB,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=EB(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"&&uv(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&&cv(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":{cv(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=Zl(this.peek(2)),r=Cs(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
|
-
`,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 h=0;h<i.sep.length;++h){const g=i.sep[h];switch(g.type){case"newline":d.push(h);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(Ya(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(
|
|
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 h=0;h<i.sep.length;++h){const g=i.sep[h];switch(g.type){case"newline":d.push(h);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(Ya(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(f1(i.key)&&!Ya(i.sep,"newline")){const d=Cs(i.start),h=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:h,sep:g}]})}else c.length>0?i.sep=i.sep.concat(c,this.sourceToken):i.sep.push(this.sourceToken);else if(Ya(i.start,"newline"))Object.assign(i,{key:null,sep:[this.sourceToken]});else{const d=Cs(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]}):Ya(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&&!Ya(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||Ya(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=Zl(r),c=Cs(l);uv(n);const d=n.end.splice(1,n.end.length);d.push(this.sourceToken);const h={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]=h}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=Zl(n),r=Cs(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=Zl(n),r=Cs(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
|
|
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=Zl(n),r=Cs(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=Zl(n),r=Cs(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 BB(e){const n=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||n&&new RB||null,prettyErrors:n}}function LB(e,n={}){const{lineCounter:i,prettyErrors:r}=BB(n),l=new MB(i?.addNewLine),c=new TB(n),d=Array.from(c.compose(l.parse(e)));if(r&&i)for(const h of d)h.errors.forEach(sv(e,i)),h.warnings.forEach(sv(e,i));return d.length>0?d:Object.assign([],{empty:!0},c.streamInfo())}function qB({onApplied:e}){const[n,i]=q.useState(""),[r,l]=q.useState(!1),[c,d]=q.useState([]),[h,g]=q.useState([]);if(gk())return null;const v=async()=>{if(!n.trim())return;l(!0),d([]),g([]);const S=LB(n),x=[],N=[];for(let _=0;_<S.length;_++){const T=S[_];if(T.errors.length>0){x.push(`Document ${_+1}: ${T.errors[0]?.message}`);continue}const k=T.toJSON();if(!(!k||typeof k!="object"))try{const O=await Mk(k);N.push(`Applied "${O.displayName||O.name}" (revision ${O.configRevision})`)}catch(O){x.push(`Document ${_+1}: ${O instanceof Error?O.message:String(O)}`)}}d(N),g(x),l(!1),N.length>0&&(tn({title:"YAML applied",detail:`Applied ${N.length} document${N.length===1?"":"s"} successfully.`,tone:x.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-strong",children:"Apply YAML"})]})}),f.jsxs("p",{className:"text-muted text-sm mb-3",children:["Paste a ",f.jsx("code",{className:"text-secondary",children:"canonry.yaml"})," config (multi-document YAML with ",f.jsx("code",{className:"text-secondary",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:S=>i(S.target.value)}),c.length>0&&f.jsx("ul",{className:"mt-2 space-y-1",children:c.map((S,x)=>f.jsx("li",{className:"text-positive-400 text-sm",children:S},x))}),h.length>0&&f.jsx("ul",{className:"mt-2 space-y-1",children:h.map((S,x)=>f.jsx("li",{className:"text-negative-400 text-sm",children:S},x))}),f.jsx("div",{className:"mt-3",children:f.jsx(Ue,{type:"button",disabled:!n.trim()||r,onClick:Nn(v),children:r?"Applying...":"Apply"})})]})}function RB(){const{dashboard:e,isLoading:n,refetch:i}=Ac();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-default bg-surface overflow-hidden",children:[f.jsx("div",{className:"p-3 border-b border-default flex gap-8",children:["Name","Domain","Mentions","Last run","Country"].map(z=>f.jsx("div",{className:"skeleton-text-sm w-16"},z))}),[1,2,3].map(z=>f.jsxs("div",{className:"p-3 border-b border-subtle 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"})]},z))]})]});const r=e.projects,l=fc(),[c,d]=q.useState(!1),[h,g]=q.useState(""),[v,S]=q.useState(""),[x,N]=q.useState(""),[_,T]=q.useState("US"),[k,O]=q.useState("en"),[R,I]=q.useState(!1),[P,Z]=q.useState(null),X=h.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),F=async()=>{if(!(!X||!x)){I(!0),Z(null);try{const z=await co(X,{displayName:v||h,canonicalDomain:x,country:_,language:k});tn({title:"Project created",detail:`${z.displayName||z.name} is ready to configure.`,tone:"positive",dedupeKey:`project:create:${z.name}`,dedupeMode:"drop"}),i(),g(""),S(""),N(""),T("US"),O("en"),d(!1),l({to:"/projects/$projectName",params:{projectName:z.name}})}catch(z){Z(z instanceof Error?z.message:"Failed to create project")}finally{I(!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(Ue,{type:"button",onClick:()=>d(z=>!z),children:[f.jsx(Jy,{className:"size-4 mr-1.5"}),"Add project"]})})]}),c?f.jsxs(kn,{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-strong",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:h,onChange:z=>g(z.target.value)}),X&&X!==h?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:v,onChange:z=>S(z.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:x,onChange:z=>N(z.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:z=>T(z.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:k,onChange:z=>O(z.target.value.toLowerCase())})]})]})]}),P?f.jsx("p",{className:"text-negative-400 text-sm mt-3",children:P}):null,f.jsxs("div",{className:"flex items-center gap-3 mt-4",children:[f.jsx(Ue,{type:"button",disabled:!X||!x||R,onClick:Nn(F),children:R?"Creating...":"Create project"}),f.jsx(Ue,{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(z=>{const M=z.recentRuns[0];return f.jsxs("tr",{className:"cursor-pointer",onClick:()=>{l({to:"/projects/$projectName",params:{projectName:z.project.name}})},children:[f.jsxs("td",{children:[f.jsx(st,{to:"/projects/$projectName",params:{projectName:z.project.name},className:"text-heading font-medium hover:underline",onClick:oe=>oe.stopPropagation(),children:z.project.displayName||z.project.name}),f.jsx("p",{className:"text-[11px] text-muted",children:z.project.name})]}),f.jsx("td",{className:"text-secondary",children:z.project.canonicalDomain}),f.jsx("td",{children:f.jsx(Bn,{tone:z.mentionSummary.tone,children:z.mentionSummary.value})}),f.jsx("td",{className:"text-muted text-sm",children:M?f.jsx(kp,{status:M.status}):f.jsx("span",{className:"text-faint",children:"No runs"})}),f.jsx("td",{className:"text-right text-muted",children:z.project.country})]},z.project.id)})})]})}):c?null:f.jsxs(kn,{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(Ue,{type:"button",onClick:()=>d(!0),children:[f.jsx(Jy,{className:"size-4 mr-1.5"}),"Add project"]})]}),f.jsx(DB,{onApplied:()=>{i()}})]})}function u1(e){e.invalidateQueries({queryKey:wp({client:te})}),e.invalidateQueries({queryKey:Oi({client:te})})}function MB(e){return e==="gsc-sync"?"GSC sync queued":e==="inspect-sitemap"?"Sitemap inspection queued":"Visibility sweep queued"}function BB(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 Lc(e,n){F0({id:e.id,projectId:e.projectId,kind:e.kind,projectLabel:n.projectLabel,sourceAction:n.sourceAction,lastAnnouncedStatus:"queued"}),tn({title:MB(e.kind),detail:BB(n.projectLabel,e.kind),tone:"neutral",dedupeKey:`run:${e.id}`,dedupeMode:"replace"})}function LB(e){const n=e.filter(l=>l.status!=="conflict"),i=e.filter(l=>l.status==="conflict");if(n.length===0){tn({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)F0({id:l.id,projectId:l.projectId,kind:l.kind,projectLabel:l.projectName,sourceAction:"run-all",lastAnnouncedStatus:"queued"});const r=F4({runIds:n.map(l=>l.id),queuedCount:n.length,skippedCount:i.length});tn({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 qc(e,n){if(e instanceof Hn&&e.code==="RUN_IN_PROGRESS"){tn({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}tn({title:e instanceof Error?e.message:"Failed to queue run",tone:"negative"})}function qB(){const e=Wa();return Ti({meta:{skipGlobalErrorToast:!0},mutationFn:({projectName:n,opts:i})=>_k(n,i),onSuccess:(n,i)=>{u1(e),Lc(n,{projectLabel:i.projectLabel??i.projectName,sourceAction:i.sourceAction})},onError:(n,i)=>{qc(n,{projectKey:i.projectName,projectLabel:i.projectLabel??i.projectName,sourceAction:i.sourceAction})}})}function H6(){const e=Wa();return Ti({meta:{skipGlobalErrorToast:!0},mutationFn:n=>Dk(n),onSuccess:n=>{u1(e),LB(n)},onError:n=>{tn({title:n instanceof Error?n.message:"Failed to queue runs",tone:"negative"})}})}function Q6(){const e=Wa();return Ti({meta:{skipGlobalErrorToast:!0},mutationFn:({projectName:n,opts:i})=>Rk(n,i),onSuccess:(n,i)=>{ro(e,Ae["gsc-sync"],i.projectName),Lc(n,{projectLabel:i.projectLabel??i.projectName,sourceAction:"gsc-sync"})},onError:(n,i)=>{qc(n,{projectKey:i.projectName,projectLabel:i.projectLabel??i.projectName,sourceAction:"gsc-sync"})}})}function K6(){const e=Wa();return Ti({meta:{skipGlobalErrorToast:!0},mutationFn:({projectName:n})=>Lk(n),onSuccess:(n,i)=>{ro(e,n.run.kind,i.projectName),Lc(n.run,{projectLabel:i.projectLabel??i.projectName,sourceAction:"discover-sitemaps"})},onError:(n,i)=>{qc(n,{projectKey:i.projectName,projectLabel:i.projectLabel??i.projectName,sourceAction:"discover-sitemaps"})}})}function Z6(){const e=Wa();return Ti({meta:{skipGlobalErrorToast:!0},mutationFn:({projectName:n,opts:i})=>Bk(n,i),onSuccess:(n,i)=>{ro(e,Ae["inspect-sitemap"],i.projectName),Lc(n,{projectLabel:i.projectLabel??i.projectName,sourceAction:"inspect-sitemap"})},onError:(n,i)=>{qc(n,{projectKey:i.projectName,projectLabel:i.projectLabel??i.projectName,sourceAction:"inspect-sitemap"})}})}function d1(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=Wa();return Ti({mutationFn:({projectName:n,queries:i})=>Nk(n,i),onSuccess:()=>{e.invalidateQueries({queryKey:Oi({client:te})}),e.invalidateQueries({predicate:d1})}})}function X6(){const e=Wa();return Ti({mutationFn:({projectName:n,body:i})=>kk(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:d1})}})}const UB=[{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 $B({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 VB(){const e=uo(),{dashboard:n,isLoading:i,refetch:r}=Ac(),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(ie=>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"})]},ie))})]})]});const c=l.settings,g=_p(!e,e?.health).data??e?.health??{apiStatus:{label:"API",state:"checking",detail:"Checking service health"},workerStatus:{label:"Worker",state:"checking",detail:"Checking service health"}},v=Q4(l.setup,g,c),S=fc(),[x,N]=q.useState(0),[_,T]=q.useState(""),[k,O]=q.useState(""),[R,I]=q.useState(""),[P,Z]=q.useState("US"),[X,F]=q.useState("en"),[z,M]=q.useState(!1),[oe,ke]=q.useState(null),[ze,Se]=q.useState(null),[He,le]=q.useState(!1),[pe,$]=q.useState(""),[W,fe]=q.useState(!1),[je,se]=q.useState(null),[Ye,J]=q.useState(!1),ue=c.providerStatuses.filter(ie=>ie.state==="ready"),[ee,de]=q.useState(ue[0]?.name??""),[ae,Ne]=q.useState(5),[tt,xe]=q.useState(!1),[$e,Qe]=q.useState(null),[Dt,Un]=q.useState(""),[Rt,er]=q.useState(!1),[Ri,go]=q.useState(null),[tr,Mi]=q.useState(!1),[Bi,nr]=q.useState(!1),[yo,bo]=q.useState(!1),[Vt,Uc]=q.useState(null),vo=qB(),So=fn({...Z0({client:te,path:{id:Vt??""}}),enabled:!!Vt,refetchInterval:({state:ie})=>{const ot=ie.data?.status;return ot==="completed"||ot==="partial"||ot==="failed"||ot==="cancelled"?!1:2e3},refetchIntervalInBackground:!0}),[va,xo]=q.useState(""),[Li,wo]=q.useState(!1),[jo,Sa]=q.useState(null),ht=_.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),Mt=pe.split(`
|
|
202
|
+
queries: []`,value:n,onChange:S=>i(S.target.value)}),c.length>0&&f.jsx("ul",{className:"mt-2 space-y-1",children:c.map((S,x)=>f.jsx("li",{className:"text-positive-400 text-sm",children:S},x))}),h.length>0&&f.jsx("ul",{className:"mt-2 space-y-1",children:h.map((S,x)=>f.jsx("li",{className:"text-negative-400 text-sm",children:S},x))}),f.jsx("div",{className:"mt-3",children:f.jsx(Ue,{type:"button",disabled:!n.trim()||r,onClick:Nn(v),children:r?"Applying...":"Apply"})})]})}function UB(){const{dashboard:e,isLoading:n,refetch:i}=Ac();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-default bg-surface overflow-hidden",children:[f.jsx("div",{className:"p-3 border-b border-default flex gap-8",children:["Name","Domain","Mentions","Last run","Country"].map(z=>f.jsx("div",{className:"skeleton-text-sm w-16"},z))}),[1,2,3].map(z=>f.jsxs("div",{className:"p-3 border-b border-subtle 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"})]},z))]})]});const r=e.projects,l=fc(),[c,d]=q.useState(!1),[h,g]=q.useState(""),[v,S]=q.useState(""),[x,N]=q.useState(""),[_,T]=q.useState("US"),[k,O]=q.useState("en"),[R,I]=q.useState(!1),[P,Z]=q.useState(null),X=h.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),J=async()=>{if(!(!X||!x)){I(!0),Z(null);try{const z=await co(X,{displayName:v||h,canonicalDomain:x,country:_,language:k});tn({title:"Project created",detail:`${z.displayName||z.name} is ready to configure.`,tone:"positive",dedupeKey:`project:create:${z.name}`,dedupeMode:"drop"}),i(),g(""),S(""),N(""),T("US"),O("en"),d(!1),l({to:"/projects/$projectName",params:{projectName:z.name}})}catch(z){Z(z instanceof Error?z.message:"Failed to create project")}finally{I(!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(Ue,{type:"button",onClick:()=>d(z=>!z),children:[f.jsx(Fy,{className:"size-4 mr-1.5"}),"Add project"]})})]}),c?f.jsxs(kn,{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-strong",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:h,onChange:z=>g(z.target.value)}),X&&X!==h?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:v,onChange:z=>S(z.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:x,onChange:z=>N(z.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:z=>T(z.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:k,onChange:z=>O(z.target.value.toLowerCase())})]})]})]}),P?f.jsx("p",{className:"text-negative-400 text-sm mt-3",children:P}):null,f.jsxs("div",{className:"flex items-center gap-3 mt-4",children:[f.jsx(Ue,{type:"button",disabled:!X||!x||R,onClick:Nn(J),children:R?"Creating...":"Create project"}),f.jsx(Ue,{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(z=>{const M=z.recentRuns[0];return f.jsxs("tr",{className:"cursor-pointer",onClick:()=>{l({to:"/projects/$projectName",params:{projectName:z.project.name}})},children:[f.jsxs("td",{children:[f.jsx(st,{to:"/projects/$projectName",params:{projectName:z.project.name},className:"text-heading font-medium hover:underline",onClick:oe=>oe.stopPropagation(),children:z.project.displayName||z.project.name}),f.jsx("p",{className:"text-[11px] text-muted",children:z.project.name})]}),f.jsx("td",{className:"text-secondary",children:z.project.canonicalDomain}),f.jsx("td",{children:f.jsx(Bn,{tone:z.mentionSummary.tone,children:z.mentionSummary.value})}),f.jsx("td",{className:"text-muted text-sm",children:M?f.jsx(kp,{status:M.status}):f.jsx("span",{className:"text-faint",children:"No runs"})}),f.jsx("td",{className:"text-right text-muted",children:z.project.country})]},z.project.id)})})]})}):c?null:f.jsxs(kn,{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(Ue,{type:"button",onClick:()=>d(!0),children:[f.jsx(Fy,{className:"size-4 mr-1.5"}),"Add project"]})]}),f.jsx(qB,{onApplied:()=>{i()}})]})}function p1(e){e.invalidateQueries({queryKey:wp({client:te})}),e.invalidateQueries({queryKey:Oi({client:te})})}function $B(e){return e==="gsc-sync"?"GSC sync queued":e==="inspect-sitemap"?"Sitemap inspection queued":"Visibility sweep queued"}function VB(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 Lc(e,n){tS({id:e.id,projectId:e.projectId,kind:e.kind,projectLabel:n.projectLabel,sourceAction:n.sourceAction,lastAnnouncedStatus:"queued"}),tn({title:$B(e.kind),detail:VB(n.projectLabel,e.kind),tone:"neutral",dedupeKey:`run:${e.id}`,dedupeMode:"replace"})}function IB(e){const n=e.filter(l=>l.status!=="conflict"),i=e.filter(l=>l.status==="conflict");if(n.length===0){tn({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)tS({id:l.id,projectId:l.projectId,kind:l.kind,projectLabel:l.projectName,sourceAction:"run-all",lastAnnouncedStatus:"queued"});const r=aR({runIds:n.map(l=>l.id),queuedCount:n.length,skippedCount:i.length});tn({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 qc(e,n){if(e instanceof Hn&&e.code==="RUN_IN_PROGRESS"){tn({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}tn({title:e instanceof Error?e.message:"Failed to queue run",tone:"negative"})}function PB(){const e=Wa();return Ti({meta:{skipGlobalErrorToast:!0},mutationFn:({projectName:n,opts:i})=>Ek(n,i),onSuccess:(n,i)=>{p1(e),Lc(n,{projectLabel:i.projectLabel??i.projectName,sourceAction:i.sourceAction})},onError:(n,i)=>{qc(n,{projectKey:i.projectName,projectLabel:i.projectLabel??i.projectName,sourceAction:i.sourceAction})}})}function X6(){const e=Wa();return Ti({meta:{skipGlobalErrorToast:!0},mutationFn:n=>Bk(n),onSuccess:n=>{p1(e),IB(n)},onError:n=>{tn({title:n instanceof Error?n.message:"Failed to queue runs",tone:"negative"})}})}function F6(){const e=Wa();return Ti({meta:{skipGlobalErrorToast:!0},mutationFn:({projectName:n,opts:i})=>Lk(n,i),onSuccess:(n,i)=>{ro(e,Ae["gsc-sync"],i.projectName),Lc(n,{projectLabel:i.projectLabel??i.projectName,sourceAction:"gsc-sync"})},onError:(n,i)=>{qc(n,{projectKey:i.projectName,projectLabel:i.projectLabel??i.projectName,sourceAction:"gsc-sync"})}})}function J6(){const e=Wa();return Ti({meta:{skipGlobalErrorToast:!0},mutationFn:({projectName:n})=>$k(n),onSuccess:(n,i)=>{ro(e,n.run.kind,i.projectName),Lc(n.run,{projectLabel:i.projectLabel??i.projectName,sourceAction:"discover-sitemaps"})},onError:(n,i)=>{qc(n,{projectKey:i.projectName,projectLabel:i.projectLabel??i.projectName,sourceAction:"discover-sitemaps"})}})}function W6(){const e=Wa();return Ti({meta:{skipGlobalErrorToast:!0},mutationFn:({projectName:n,opts:i})=>Uk(n,i),onSuccess:(n,i)=>{ro(e,Ae["inspect-sitemap"],i.projectName),Lc(n,{projectLabel:i.projectLabel??i.projectName,sourceAction:"inspect-sitemap"})},onError:(n,i)=>{qc(n,{projectKey:i.projectName,projectLabel:i.projectLabel??i.projectName,sourceAction:"inspect-sitemap"})}})}function m1(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 eq(){const e=Wa();return Ti({mutationFn:({projectName:n,queries:i})=>_k(n,i),onSuccess:()=>{e.invalidateQueries({queryKey:Oi({client:te})}),e.invalidateQueries({predicate:m1})}})}function tq(){const e=Wa();return Ti({mutationFn:({projectName:n,body:i})=>Ck(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:m1})}})}const GB=[{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 HB({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 QB(){const e=uo(),{dashboard:n,isLoading:i,refetch:r}=Ac(),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(ie=>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"})]},ie))})]})]});const c=l.settings,g=_p(!e,e?.health).data??e?.health??{apiStatus:{label:"API",state:"checking",detail:"Checking service health"},workerStatus:{label:"Worker",state:"checking",detail:"Checking service health"}},v=F4(l.setup,g,c),S=fc(),[x,N]=q.useState(0),[_,T]=q.useState(""),[k,O]=q.useState(""),[R,I]=q.useState(""),[P,Z]=q.useState("US"),[X,J]=q.useState("en"),[z,M]=q.useState(!1),[oe,ke]=q.useState(null),[ze,Se]=q.useState(null),[$e,le]=q.useState(!1),[fe,$]=q.useState(""),[W,pe]=q.useState(!1),[je,se]=q.useState(null),[Ye,F]=q.useState(!1),ue=c.providerStatuses.filter(ie=>ie.state==="ready"),[ee,de]=q.useState(ue[0]?.name??""),[ae,Ne]=q.useState(5),[tt,xe]=q.useState(!1),[Ve,Qe]=q.useState(null),[Dt,Un]=q.useState(""),[Rt,er]=q.useState(!1),[Ri,go]=q.useState(null),[tr,Mi]=q.useState(!1),[Bi,nr]=q.useState(!1),[yo,bo]=q.useState(!1),[Vt,Uc]=q.useState(null),vo=PB(),So=fn({...F0({client:te,path:{id:Vt??""}}),enabled:!!Vt,refetchInterval:({state:ie})=>{const ot=ie.data?.status;return ot==="completed"||ot==="partial"||ot==="failed"||ot==="cancelled"?!1:2e3},refetchIntervalInBackground:!0}),[va,xo]=q.useState(""),[Li,wo]=q.useState(!1),[jo,Sa]=q.useState(null),ht=_.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),Mt=fe.split(`
|
|
203
203
|
`).map(ie=>ie.trim()).filter(Boolean),_t=Dt.split(`
|
|
204
|
-
`).map(ie=>ie.trim()).filter(Boolean),$c=v.healthChecks.some(ie=>ie.id==="api"&&ie.state==="ready"),Vc=async()=>{if(!(!ht||!R)){le(!0),Se(null);try{const ie=await co(ht,{displayName:k||_,canonicalDomain:R,country:P,language:X,autoExtractBacklinks:z});ke(ht),tn({title:"Project created",detail:`${ie.displayName||ie.name} is ready for setup.`,tone:"positive",dedupeKey:`project:create:${ie.name}`,dedupeMode:"drop"}),await r(),N(2)}catch(ie){Se(ie instanceof Error?ie.message:"Failed to create project")}finally{le(!1)}}},Ic=async()=>{if(!oe)return;const ie=Mt;if(ie.length!==0){
|
|
204
|
+
`).map(ie=>ie.trim()).filter(Boolean),$c=v.healthChecks.some(ie=>ie.id==="api"&&ie.state==="ready"),Vc=async()=>{if(!(!ht||!R)){le(!0),Se(null);try{const ie=await co(ht,{displayName:k||_,canonicalDomain:R,country:P,language:X,autoExtractBacklinks:z});ke(ht),tn({title:"Project created",detail:`${ie.displayName||ie.name} is ready for setup.`,tone:"positive",dedupeKey:`project:create:${ie.name}`,dedupeMode:"drop"}),await r(),N(2)}catch(ie){Se(ie instanceof Error?ie.message:"Failed to create project")}finally{le(!1)}}},Ic=async()=>{if(!oe)return;const ie=Mt;if(ie.length!==0){F(!0),se(null);try{await Ak(oe,ie),pe(!0),await r(),N(3)}catch(ot){se(ot instanceof Error?ot.message:"Failed to save queries")}finally{F(!1)}}},qi=async()=>{if(!(!oe||!ee)){xe(!0),Qe(null);try{const ie=await Rk(oe,ee,ae);if(ie.queries.length>0){const ot=fe?fe.trimEnd()+`
|
|
205
205
|
`+ie.queries.join(`
|
|
206
206
|
`):ie.queries.join(`
|
|
207
|
-
`);$(ot)}}catch(ie){Qe(ie instanceof Error?ie.message:"Failed to generate queries")}finally{xe(!1)}}},Ui=async()=>{if(!oe)return;const ie=_t;if(ie.length!==0){Mi(!0),go(null);try{await
|
|
207
|
+
`);$(ot)}}catch(ie){Qe(ie instanceof Error?ie.message:"Failed to generate queries")}finally{xe(!1)}}},Ui=async()=>{if(!oe)return;const ie=_t;if(ie.length!==0){Mi(!0),go(null);try{await Tk(oe,ie),er(!0),await r(),N(4)}catch(ot){go(ot instanceof Error?ot.message:"Failed to save competitors")}finally{Mi(!1)}}},$i=async()=>{const ie=va.trim();if(ie){wo(!0),Sa(null);try{await Dk("gemini",{apiKey:ie}),tn({title:"Gemini configured",detail:"Provider is ready — continuing setup.",tone:"positive",dedupeKey:"setup:gemini:configured",dedupeMode:"drop"}),xo(""),await r()}catch(ot){Sa(ot instanceof Error?ot.message:"Failed to save Gemini key")}finally{wo(!1)}}},Zn=async()=>{if(oe){bo(!0);try{const ie=await vo.mutateAsync({projectName:oe,projectLabel:k||_||oe,sourceAction:"setup-launch"});Uc(ie.id),nr(!0),await r()}catch{}finally{bo(!1)}}},pn=()=>N(ie=>Math.max(0,ie-1)),ai=(()=>{switch(x){case 0:return f.jsxs(kn,{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:v.healthChecks.map(ie=>f.jsxs("div",{className:"health-check-row",children:[f.jsxs("div",{children:[f.jsx("p",{className:"run-row-title",children:ie.label}),f.jsx("p",{className:"supporting-copy",children:ie.detail}),ie.id==="provider"&&ie.state!=="ready"&&f.jsxs("div",{className:"mt-3 rounded-md border border-default bg-bg-elevated/40 p-3 space-y-2",children:[f.jsxs("p",{className:"text-xs text-secondary",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-positive-400 hover:text-positive underline underline-offset-2",children:"aistudio.google.com"}),")."]}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("input",{type:"password",value:va,onChange:ot=>xo(ot.target.value),placeholder:"AI... (paste here)",className:"flex-1 rounded-md border border-base bg-bg px-2.5 py-1.5 text-sm text-heading placeholder:text-faint focus:border-mono-600 focus:outline-none font-mono",disabled:Li}),f.jsx(Ue,{type:"button",size:"sm",disabled:Li||!va.trim(),onClick:Nn($i),children:Li?"Saving...":"Save"})]}),jo&&f.jsx("p",{className:"text-xs text-negative-400",children:jo}),f.jsxs("p",{className:"text-[11px] text-faint",children:["Other providers (OpenAI, Claude, Perplexity) configurable later via"," ",f.jsx(st,{to:"/settings",className:"text-muted hover:text-neutral underline underline-offset-2",children:"/settings"}),"."]})]})]}),f.jsx(Bn,{tone:ie.state==="ready"?"positive":"caution",title:ie.id==="api"?$s(g.apiStatus):ie.id==="worker"?$s(g.workerStatus):ie.detail,children:ie.state==="ready"?"Ready":"Attention"})]},ie.id))}),f.jsxs("div",{className:"setup-nav",children:[f.jsx("span",{}),f.jsx(Ue,{type:"button",disabled:!$c,onClick:()=>N(1),children:"Continue"})]})]});case 1:return f.jsxs(kn,{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-neutral",children:["Project ",f.jsx("span",{className:"text-heading font-medium",children:oe})," created successfully."]}),f.jsxs("div",{className:"setup-nav",children:[f.jsx(Ue,{type:"button",variant:"outline",onClick:pn,children:"Back"}),f.jsx(Ue,{type:"button",onClick:()=>N(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:ie=>T(ie.target.value)}),ht&&ht!==_?f.jsxs("p",{className:"supporting-copy",children:["Slug: ",ht]}):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:k,onChange:ie=>O(ie.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:ie=>I(ie.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:P,onChange:ie=>Z(ie.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:ie=>J(ie.target.value.toLowerCase())})]})]}),f.jsxs("label",{className:"flex items-start gap-3 rounded-md border border-default bg-surface p-3 cursor-pointer hover:border-strong",children:[f.jsx("input",{type:"checkbox",className:"mt-0.5 h-4 w-4 rounded border-strong bg-bg",checked:z,onChange:ie=>M(ie.target.checked)}),f.jsxs("span",{className:"flex-1",children:[f.jsx("span",{className:"block text-sm text-heading",children:"Auto-extract backlinks"}),f.jsxs("span",{className:"block text-xs text-muted mt-0.5",children:["When a new Common Crawl release syncs, automatically extract backlinks for this project."," ",f.jsx(st,{to:"/backlinks",className:"text-positive-400 hover:text-positive underline underline-offset-2",children:"Manage backlinks"})]})]})]}),ze?f.jsx("p",{className:"text-negative-400 text-sm",children:ze}):null,f.jsxs("div",{className:"setup-nav",children:[f.jsx(Ue,{type:"button",variant:"outline",onClick:pn,children:"Back"}),f.jsx(Ue,{type:"button",disabled:!ht||!R||$e,onClick:Nn(Vc),children:$e?"Creating...":"Create project"})]})]})]});case 2:return f.jsxs(kn,{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"})]}),W?f.jsxs(Bn,{tone:"positive",children:[Mt.length," saved"]}):f.jsxs(Bn,{tone:"neutral",children:[Mt.length," quer",Mt.length!==1?"ies":"y"]})]}),f.jsx("p",{className:"supporting-copy",children:"Enter the search queries you want to track. One per line."}),W?f.jsxs("div",{className:"compact-stack",children:[f.jsx("ul",{className:"detail-list",children:Mt.map(ie=>f.jsx("li",{children:ie},ie))}),f.jsxs("div",{className:"setup-nav",children:[f.jsx(Ue,{type:"button",variant:"outline",onClick:pn,children:"Back"}),f.jsx(Ue,{type:"button",onClick:()=>N(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-muted text-xs uppercase tracking-wide",children:[f.jsx("span",{className:"flex-1 border-t border-base"}),"auto-generate",f.jsx("span",{className:"flex-1 border-t border-base"})]}),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:ee,onChange:ie=>de(ie.target.value),children:ue.map(ie=>f.jsxs("option",{value:ie.name,children:[ie.displayName??ie.name,ie.model?` (${ie.model})`:""]},ie.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:ae,onChange:ie=>Ne(Number(ie.target.value)),children:[3,5,10,15,20].map(ie=>f.jsx("option",{value:ie,children:ie},ie))})]}),f.jsx(Ue,{type:"button",variant:"outline",disabled:tt||!ee,onClick:Nn(qi),children:tt?"Analyzing site...":"Generate"})]}),Ve?f.jsx("p",{className:"text-negative-400 text-sm",children:Ve}):null]}):null,f.jsxs("div",{className:"flex items-center gap-2 text-muted text-xs uppercase tracking-wide",children:[f.jsx("span",{className:"flex-1 border-t border-base"}),"or type manually",f.jsx("span",{className:"flex-1 border-t border-base"})]}),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
|
-
pediatric dentist brooklyn heights`,value:
|
|
210
|
-
competitor2.com`,value:Dt,onChange:ie=>Un(ie.target.value)})]}),Ri?f.jsx("p",{className:"text-negative-400 text-sm",children:Ri}):null,f.jsxs("div",{className:"setup-nav",children:[f.jsx(Ue,{type:"button",variant:"outline",onClick:pn,children:"Back"}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx(Ue,{type:"button",variant:"outline",onClick:()=>N(4),children:"Skip"}),f.jsx(Ue,{type:"button",disabled:_t.length===0||tr,onClick:Nn(Ui),children:tr?"Saving...":`Save ${_t.length} competitor${_t.length!==1?"s":""}`})]})]})]})]});case 4:{const ie=So.data,ot=ie?.status==="completed"||ie?.status==="partial"||ie?.status==="failed"||ie?.status==="cancelled",Yn=ie?.snapshots??[],ii=Yn.filter($n=>$n.citationState==="cited").length,Pc=Yn.filter($n=>$n.answerMentioned===!0).length,ar=new Set(Yn.map($n=>$n.query).filter($n=>!!$n)).size,No=Bi?ot&&(ie?.status==="completed"||ie?.status==="partial")?f.jsx(Bn,{tone:"positive",children:"Complete"}):ot?f.jsx(Bn,{tone:"negative",children:"Failed"}):f.jsx(Bn,{tone:"caution",children:"Running"}):null;return f.jsxs(kn,{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"})]}),No]}),Bi?ot?ie?.status==="failed"?f.jsxs("div",{className:"compact-stack",children:[f.jsx("p",{className:"text-negative-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(Ue,{type:"button",onClick:()=>{S({to:oe?`/projects/${encodeURIComponent(oe)}`:"/"})},children:"Open project"})]})]}):f.jsxs("div",{className:"compact-stack",children:[f.jsxs("p",{className:"text-neutral",children:["Sweep complete. Your first answer-visibility snapshot for"," ",f.jsx("span",{className:"text-heading 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-default bg-surface p-3",children:[f.jsx("p",{className:"text-[10px] uppercase tracking-wide text-muted",children:"Mentioned"}),f.jsxs("p",{className:"text-2xl font-bold tabular-nums text-primary mt-1",children:[Pc,f.jsxs("span",{className:"text-faint text-lg",children:[" / ",ar]})]}),f.jsx("p",{className:"text-[11px] text-muted mt-0.5",children:"queries with brand in answer"})]}),f.jsxs("div",{className:"rounded-md border border-default bg-surface p-3",children:[f.jsx("p",{className:"text-[10px] uppercase tracking-wide text-muted",children:"Cited"}),f.jsxs("p",{className:"text-2xl font-bold tabular-nums text-primary mt-1",children:[ii,f.jsxs("span",{className:"text-faint text-lg",children:[" / ",ar]})]}),f.jsx("p",{className:"text-[11px] text-muted mt-0.5",children:"queries with domain in sources"})]}),f.jsxs("div",{className:"rounded-md border border-default bg-surface p-3",children:[f.jsx("p",{className:"text-[10px] uppercase tracking-wide text-muted",children:"Snapshots"}),f.jsx("p",{className:"text-2xl font-bold tabular-nums text-primary mt-1",children:Yn.length}),f.jsx("p",{className:"text-[11px] text-muted mt-0.5",children:"total (query × provider)"})]})]}),f.jsx("p",{className:"text-[11px] text-muted 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(Ue,{type:"button",onClick:()=>{S({to:oe?`/projects/${encodeURIComponent(oe)}`:"/"})},children:"Open project dashboard →"})]})]}):f.jsxs("div",{className:"compact-stack",children:[f.jsx("p",{className:"text-neutral",children:"Sweep running — typically 30-60s. Polling every 2s…"}),f.jsx("div",{className:"rounded-md border border-default bg-surface p-3 text-xs text-muted",children:f.jsxs("p",{children:["Status: ",f.jsx("span",{className:"text-neutral",children:ie?.status??"queued"})]})}),f.jsxs("div",{className:"setup-nav",children:[f.jsx("span",{}),f.jsx(Ue,{type:"button",variant:"outline",onClick:()=>{S({to:oe?`/projects/${encodeURIComponent(oe)}`:"/"})},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-heading font-medium",children:oe}),"."]}),f.jsxs("div",{className:"setup-nav",children:[f.jsx(Ue,{type:"button",variant:"outline",onClick:pn,children:"Back"}),f.jsx(Ue,{type:"button",disabled:yo,onClick:Nn(Zn),children:yo?"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($B,{current:x,labels:UB}),f.jsx("section",{className:"setup-wizard",children:ai})]})}function IB(){return f.jsx("div",{className:"page-container",children:f.jsx("section",{className:"page-section",children:f.jsxs(kn,{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(Ue,{asChild:!0,children:f.jsx(st,{to:"/",children:"Return to overview"})})]})})})}const ba=Ps(()=>Gs(()=>import("./ProjectPage-DcR0lYs1.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8]),import.meta.url),"ProjectPage"),PB=Ps(()=>Gs(()=>import("./RunsPage-DWW5QQ20.js"),__vite__mapDeps([9,1,2,7,5,8]),import.meta.url),"RunsPage"),GB=Ps(()=>Gs(()=>import("./SettingsPage-CdpsDKrQ.js"),__vite__mapDeps([10,1,7,5,8]),import.meta.url),"SettingsPage"),HB=Ps(()=>Gs(()=>import("./BacklinksPage-CvriSR5g.js"),__vite__mapDeps([11,1,6,7,5,8]),import.meta.url),"BacklinksPage"),QB=Ps(()=>Gs(()=>import("./TrafficPage-BOe2UKFg.js"),__vite__mapDeps([12,1,4,13,7,5,8]),import.meta.url),"TrafficPage"),KB=Ps(()=>Gs(()=>import("./TrafficSourceDetailPage-VmvIxQBH.js"),__vite__mapDeps([14,1,4,3,5,13,7,8]),import.meta.url),"TrafficSourceDetailPage");function ZB(){return f.jsx(vM,{children:f.jsx(bM,{})})}const nn=zw()({component:ZB,validateSearch:e=>({runId:typeof e.runId=="string"?e.runId:void 0,evidenceId:typeof e.evidenceId=="string"?e.evidenceId:void 0})}),YB=Et({getParentRoute:()=>nn,path:"/",component:wM,beforeLoad:({context:e})=>{const n=e.queryClient.getQueryData(Oi({client:te}));if(n&&n.length===0)throw Hf({to:"/setup"})}}),XB=Et({getParentRoute:()=>nn,path:"/projects",component:RB}),JB=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,Kn=Et({getParentRoute:()=>nn,path:"/projects/$projectName",component:()=>f.jsx(xf,{}),beforeLoad:async({context:e,params:n,location:i})=>{const r=n.projectName;if(!JB.test(r))return;let l=e.queryClient.getQueryData(Oi({client:te}));if(!l)try{l=await e.queryClient.ensureQueryData(wc({client:te}))}catch{return}const c=l.find(d=>d.id===r);if(c)throw Hf({to:i.pathname.replace(`/projects/${r}`,`/projects/${encodeURIComponent(c.name)}`),replace:!0})}}),FB=Et({getParentRoute:()=>Kn,path:"/",component:()=>f.jsx(ba,{tab:"overview"})}),WB=Et({getParentRoute:()=>Kn,path:"/search-console",component:()=>f.jsx(ba,{tab:"search-console"})}),eL=Et({getParentRoute:()=>Kn,path:"/local",component:()=>f.jsx(ba,{tab:"local"})}),tL=Et({getParentRoute:()=>Kn,path:"/discovery",component:()=>f.jsx(ba,{tab:"discovery"})}),nL=Et({getParentRoute:()=>Kn,path:"/report",component:()=>f.jsx(ba,{tab:"report"})}),aL=Et({getParentRoute:()=>Kn,path:"/activity",component:()=>f.jsx(ba,{tab:"activity"})}),iL=Et({getParentRoute:()=>Kn,path:"/backlinks",component:()=>f.jsx(ba,{tab:"backlinks"})}),sL=Et({getParentRoute:()=>Kn,path:"/technical-aeo",component:()=>f.jsx(ba,{tab:"technical-aeo"})}),rL=Et({getParentRoute:()=>Kn,path:"/settings",component:()=>f.jsx(ba,{tab:"settings"})}),oL=Et({getParentRoute:()=>nn,path:"/runs",component:PB}),lL=Et({getParentRoute:()=>nn,path:"/settings",component:GB,beforeLoad:({context:e})=>{}}),cL=Et({getParentRoute:()=>nn,path:"/setup",component:VB,beforeLoad:({context:e})=>{const n=e.queryClient.getQueryData(Oi({client:te}));if(n&&n.length>0)throw Hf({to:"/"})}}),uL=Et({getParentRoute:()=>nn,path:"/backlinks",component:HB}),dL=Et({getParentRoute:()=>nn,path:"/traffic",component:QB}),fL=Et({getParentRoute:()=>nn,path:"/traffic/$projectName/$sourceId",component:KB}),pL=Et({getParentRoute:()=>nn,path:"*",component:IB}),mL=nn.addChildren([YB,XB,Kn.addChildren([FB,WB,eL,tL,nL,aL,iL,sL,rL]),oL,lL,cL,uL,dL,fL,pL]);function hL(){return typeof window<"u"&&window.__CANONRY_CONFIG__?.basePath?window.__CANONRY_CONFIG__.basePath:"/"}const uv=hL(),gL=uv==="/"?"":uv.replace(/\/$/,"");function yL(e,n){return Dw({routeTree:mL,basepath:gL||"/",context:{queryClient:e},...n?.initialEntries})}const bL=6e4;function vL(){const[e,n]=q.useState(rf()?"ready":"checking"),[i,r]=q.useState(""),[l,c]=q.useState(""),[d,h]=q.useState(null),[g,v]=q.useState(!1),[S,x]=q.useState(!1),N=q.useRef(null),_=q.useRef(null),T=()=>{if(!N.current){const R=Fk();_.current=R,N.current=yL(R)}return{queryClient:_.current,router:N.current}};q.useEffect(()=>{if(rf())return;let R=!1;return Qy().then(I=>{R||(I.authenticated?n("ready"):n(I.setupRequired?"setup":"login"))}).catch(I=>{R||(h(I instanceof Error?I.message:"Failed to reach the Canonry API"),n("login"))}),()=>{R=!0}},[]),q.useEffect(()=>{if(e!=="ready"||rf())return;const R=setInterval(()=>{Qy().then(I=>{I.authenticated||(x(!0),n(I.setupRequired?"setup":"login"))}).catch(()=>{})},bL);return Hy(()=>{x(!0),n("login")}),()=>{clearInterval(R),Hy(null)}},[e]);const k=async R=>{if(R.preventDefault(),!i.trim()||i.trim().length<8){h("Password must be at least 8 characters");return}if(i!==l){h("Passwords do not match");return}v(!0),h(null);try{if(!(await Ck(i.trim())).authenticated){h("Setup failed");return}r(""),c(""),x(!1),n("ready")}catch(I){h(I instanceof Hn||I instanceof Error?I.message:"Setup failed")}finally{v(!1)}},O=async R=>{if(R.preventDefault(),!!i.trim()){v(!0),h(null);try{if(!(await Tk(i.trim())).authenticated){h("Incorrect password");return}r(""),x(!1),n("ready")}catch(I){h(I instanceof Hn||I instanceof Error?I.message:"Authentication failed")}finally{v(!1)}}};if(e==="ready"){const{queryClient:R,router:I}=T();return f.jsx(Rw,{client:R,children:f.jsx(Mw,{router:I})})}return f.jsx("div",{className:"min-h-screen bg-bg 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(kn,{className:"surface-card w-full",children:e==="checking"?f.jsx(Yl,{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(Bf,{children:[f.jsx("p",{className:"eyebrow eyebrow-soft",children:"First-time setup"}),f.jsx(Lf,{children:"Create a dashboard password"}),f.jsx(qf,{children:"Choose a password to protect the Canonry dashboard. You will use this to sign in on future visits."})]}),f.jsx(Yl,{children:f.jsxs("form",{className:"space-y-4",onSubmit:Nn(k),children:[f.jsxs("label",{className:"block space-y-1.5",children:[f.jsx("span",{className:"text-xs font-medium text-secondary",children:"Password"}),f.jsx("input",{autoFocus:!0,className:"w-full rounded-md border border-base bg-bg px-3 py-2 text-sm text-heading outline-none transition focus:border-mono-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-secondary",children:"Confirm password"}),f.jsx("input",{className:"w-full rounded-md border border-base bg-bg px-3 py-2 text-sm text-heading outline-none transition focus:border-mono-600",type:"password",value:l,onChange:R=>c(R.target.value),placeholder:"Re-enter password"})]}),d?f.jsx("p",{className:"text-sm text-negative-400",children:d}):null,f.jsx(Ue,{type:"submit",disabled:g||!i.trim()||!l.trim(),children:g?"Setting up…":"Create password & open dashboard"})]})})]}):f.jsxs(f.Fragment,{children:[f.jsxs(Bf,{children:[f.jsx("p",{className:"eyebrow eyebrow-soft",children:"Dashboard access"}),f.jsx(Lf,{children:"Sign in to Canonry"}),f.jsx(qf,{children:"Enter your dashboard password to continue."})]}),f.jsxs(Yl,{children:[S?f.jsx("p",{className:"mb-4 rounded-md border border-caution bg-caution-soft px-3 py-2 text-sm text-caution",children:"Your session expired — please sign in again."}):null,f.jsxs("form",{className:"space-y-4",onSubmit:Nn(O),children:[f.jsxs("label",{className:"block space-y-1.5",children:[f.jsx("span",{className:"text-xs font-medium text-secondary",children:"Password"}),f.jsx("input",{autoFocus:!0,className:"w-full rounded-md border border-base bg-bg px-3 py-2 text-sm text-heading outline-none transition focus:border-mono-600",type:"password",value:i,onChange:R=>r(R.target.value),placeholder:"Dashboard password"})]}),d?f.jsx("p",{className:"text-sm text-negative-400",children:d}):null,f.jsx(Ue,{type:"submit",disabled:g||!i.trim(),children:g?"Signing in…":"Open dashboard"})]})]})]})})})})}const f1=document.getElementById("root");if(!f1)throw new Error("Expected #root element for web app bootstrap.");Iw.createRoot(f1).render(f.jsx(q.StrictMode,{children:f.jsx(vL,{})}));export{v6 as $,J5 as A,Ue as B,sc as C,ML as D,a6 as E,s6 as F,R5 as G,r6 as H,Xr as I,HL as J,GL as K,KL as L,tn as M,n5 as N,c6 as O,XR as P,u6 as Q,YL as R,PD as S,Bn as T,o6 as U,l6 as V,i6 as W,QL as X,XL as Y,d6 as Z,f6 as _,I6 as a,LL as a$,h6 as a0,y6 as a1,g6 as a2,b6 as a3,$k as a4,F0 as a5,Ae as a6,m6 as a7,J4 as a8,_i as a9,FL as aA,Oi as aB,WL as aC,wp as aD,U6 as aE,V6 as aF,$6 as aG,JL as aH,mA as aI,Bv as aJ,q4 as aK,$4 as aL,U4 as aM,U5 as aN,E6 as aO,q5 as aP,u5 as aQ,X6 as aR,I5 as aS,$5 as aT,P5 as aU,G5 as aV,L5 as aW,V5 as aX,zL as aY,OL as aZ,EL as a_,p6 as aa,fO as ab,pO as ac,B5 as ad,M5 as ae,E5 as af,x5 as ag,_5 as ah,C5 as ai,Hn as aj,T5 as ak,NL as al,TA as am,Y5 as an,_A as ao,LA as ap,eR as aq,Wl as ar,z5 as as,O5 as at,Af as au,O6 as av,ZL as aw,B6 as ax,L6 as ay,q6 as az,Wf as b,JR as b$,e6 as b0,Tb as b1,W5 as b2,qL as b3,UL as b4,F5 as b5,$L as b6,VL as b7,PL as b8,IL as b9,o5 as bA,r5 as bB,N6 as bC,x6 as bD,Z5 as bE,a5 as bF,i5 as bG,s5 as bH,l5 as bI,Ac as bJ,H6 as bK,kp as bL,Ek as bM,BL as bN,e5 as bO,t5 as bP,_p as bQ,c5 as bR,$s as bS,Eb as bT,v5 as bU,w5 as bV,N5 as bW,k5 as bX,S5 as bY,j5 as bZ,A5 as b_,uo as ba,wc as bb,$3 as bc,pk as bd,n6 as be,qB as bf,Qt as bg,wk as bh,ZD as bi,DL as bj,_L as bk,CL as bl,RL as bm,G6 as bn,xk as bo,Ak as bp,AL as bq,kL as br,Nk as bs,TL as bt,Y6 as bu,i4 as bv,S6 as bw,w6 as bx,Rk as by,j6 as bz,et as c,gS as c0,n3 as c1,yS as c2,bS as c3,jA as c4,b5 as c5,Jy as c6,R6 as c7,H5 as c8,Q5 as c9,xp as ca,t6 as cb,Hs as cc,z6 as cd,M6 as ce,y5 as cf,h5 as cg,g5 as ch,m5 as ci,D6 as cj,$E as d,P6 as e,X5 as f,kn as g,Vb as h,Nn as i,D5 as j,k6 as k,te as l,A6 as m,_6 as n,T6 as o,C6 as p,d5 as q,p5 as r,f5 as s,HD as t,Cp as u,Q6 as v,K6 as w,Z6 as x,Mf as y,K5 as z};
|
|
209
|
+
pediatric dentist brooklyn heights`,value:fe,onChange:ie=>$(ie.target.value)})]}),je?f.jsx("p",{className:"text-negative-400 text-sm",children:je}):null,f.jsxs("div",{className:"setup-nav",children:[f.jsx(Ue,{type:"button",variant:"outline",onClick:pn,children:"Back"}),f.jsx(Ue,{type:"button",disabled:Mt.length===0||Ye,onClick:Nn(Ic),children:Ye?"Saving...":`Save ${Mt.length} quer${Mt.length!==1?"ies":"y"}`})]})]})]});case 3:return f.jsxs(kn,{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"})]}),Rt?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."}),Rt?f.jsxs("div",{className:"compact-stack",children:[f.jsx("ul",{className:"detail-list",children:_t.map(ie=>f.jsx("li",{children:ie},ie))}),f.jsxs("div",{className:"setup-nav",children:[f.jsx(Ue,{type:"button",variant:"outline",onClick:pn,children:"Back"}),f.jsx(Ue,{type:"button",onClick:()=>N(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:Dt,onChange:ie=>Un(ie.target.value)})]}),Ri?f.jsx("p",{className:"text-negative-400 text-sm",children:Ri}):null,f.jsxs("div",{className:"setup-nav",children:[f.jsx(Ue,{type:"button",variant:"outline",onClick:pn,children:"Back"}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx(Ue,{type:"button",variant:"outline",onClick:()=>N(4),children:"Skip"}),f.jsx(Ue,{type:"button",disabled:_t.length===0||tr,onClick:Nn(Ui),children:tr?"Saving...":`Save ${_t.length} competitor${_t.length!==1?"s":""}`})]})]})]})]});case 4:{const ie=So.data,ot=ie?.status==="completed"||ie?.status==="partial"||ie?.status==="failed"||ie?.status==="cancelled",Yn=ie?.snapshots??[],ii=Yn.filter($n=>$n.citationState==="cited").length,Pc=Yn.filter($n=>$n.answerMentioned===!0).length,ar=new Set(Yn.map($n=>$n.query).filter($n=>!!$n)).size,No=Bi?ot&&(ie?.status==="completed"||ie?.status==="partial")?f.jsx(Bn,{tone:"positive",children:"Complete"}):ot?f.jsx(Bn,{tone:"negative",children:"Failed"}):f.jsx(Bn,{tone:"caution",children:"Running"}):null;return f.jsxs(kn,{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"})]}),No]}),Bi?ot?ie?.status==="failed"?f.jsxs("div",{className:"compact-stack",children:[f.jsx("p",{className:"text-negative-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(Ue,{type:"button",onClick:()=>{S({to:oe?`/projects/${encodeURIComponent(oe)}`:"/"})},children:"Open project"})]})]}):f.jsxs("div",{className:"compact-stack",children:[f.jsxs("p",{className:"text-neutral",children:["Sweep complete. Your first answer-visibility snapshot for"," ",f.jsx("span",{className:"text-heading 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-default bg-surface p-3",children:[f.jsx("p",{className:"text-[10px] uppercase tracking-wide text-muted",children:"Mentioned"}),f.jsxs("p",{className:"text-2xl font-bold tabular-nums text-primary mt-1",children:[Pc,f.jsxs("span",{className:"text-faint text-lg",children:[" / ",ar]})]}),f.jsx("p",{className:"text-[11px] text-muted mt-0.5",children:"queries with brand in answer"})]}),f.jsxs("div",{className:"rounded-md border border-default bg-surface p-3",children:[f.jsx("p",{className:"text-[10px] uppercase tracking-wide text-muted",children:"Cited"}),f.jsxs("p",{className:"text-2xl font-bold tabular-nums text-primary mt-1",children:[ii,f.jsxs("span",{className:"text-faint text-lg",children:[" / ",ar]})]}),f.jsx("p",{className:"text-[11px] text-muted mt-0.5",children:"queries with domain in sources"})]}),f.jsxs("div",{className:"rounded-md border border-default bg-surface p-3",children:[f.jsx("p",{className:"text-[10px] uppercase tracking-wide text-muted",children:"Snapshots"}),f.jsx("p",{className:"text-2xl font-bold tabular-nums text-primary mt-1",children:Yn.length}),f.jsx("p",{className:"text-[11px] text-muted mt-0.5",children:"total (query × provider)"})]})]}),f.jsx("p",{className:"text-[11px] text-muted 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(Ue,{type:"button",onClick:()=>{S({to:oe?`/projects/${encodeURIComponent(oe)}`:"/"})},children:"Open project dashboard →"})]})]}):f.jsxs("div",{className:"compact-stack",children:[f.jsx("p",{className:"text-neutral",children:"Sweep running — typically 30-60s. Polling every 2s…"}),f.jsx("div",{className:"rounded-md border border-default bg-surface p-3 text-xs text-muted",children:f.jsxs("p",{children:["Status: ",f.jsx("span",{className:"text-neutral",children:ie?.status??"queued"})]})}),f.jsxs("div",{className:"setup-nav",children:[f.jsx("span",{}),f.jsx(Ue,{type:"button",variant:"outline",onClick:()=>{S({to:oe?`/projects/${encodeURIComponent(oe)}`:"/"})},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-heading font-medium",children:oe}),"."]}),f.jsxs("div",{className:"setup-nav",children:[f.jsx(Ue,{type:"button",variant:"outline",onClick:pn,children:"Back"}),f.jsx(Ue,{type:"button",disabled:yo,onClick:Nn(Zn),children:yo?"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(HB,{current:x,labels:GB}),f.jsx("section",{className:"setup-wizard",children:ai})]})}function KB(){return f.jsx("div",{className:"page-container",children:f.jsx("section",{className:"page-section",children:f.jsxs(kn,{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(Ue,{asChild:!0,children:f.jsx(st,{to:"/",children:"Return to overview"})})]})})})}const ba=Ps(()=>Gs(()=>import("./ProjectPage-BcqfsS5X.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8]),import.meta.url),"ProjectPage"),ZB=Ps(()=>Gs(()=>import("./RunsPage-DpocjSZ-.js"),__vite__mapDeps([9,1,2,7,5,8]),import.meta.url),"RunsPage"),YB=Ps(()=>Gs(()=>import("./SettingsPage-CboDfSRx.js"),__vite__mapDeps([10,1,7,5,8]),import.meta.url),"SettingsPage"),XB=Ps(()=>Gs(()=>import("./BacklinksPage-AYTE7he1.js"),__vite__mapDeps([11,1,6,7,5,8]),import.meta.url),"BacklinksPage"),FB=Ps(()=>Gs(()=>import("./TrafficPage-B5c8opWF.js"),__vite__mapDeps([12,1,4,13,7,5,8]),import.meta.url),"TrafficPage"),JB=Ps(()=>Gs(()=>import("./TrafficSourceDetailPage-D9JPwzH-.js"),__vite__mapDeps([14,1,4,3,5,13,7,8]),import.meta.url),"TrafficSourceDetailPage");function WB(){return f.jsx(NM,{children:f.jsx(jM,{})})}const nn=Mw()({component:WB,validateSearch:e=>({runId:typeof e.runId=="string"?e.runId:void 0,evidenceId:typeof e.evidenceId=="string"?e.evidenceId:void 0})}),eL=Et({getParentRoute:()=>nn,path:"/",component:_M,beforeLoad:({context:e})=>{const n=e.queryClient.getQueryData(Oi({client:te}));if(n&&n.length===0)throw Hf({to:"/setup"})}}),tL=Et({getParentRoute:()=>nn,path:"/projects",component:UB}),nL=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,Kn=Et({getParentRoute:()=>nn,path:"/projects/$projectName",component:()=>f.jsx(xf,{}),beforeLoad:async({context:e,params:n,location:i})=>{const r=n.projectName;if(!nL.test(r))return;let l=e.queryClient.getQueryData(Oi({client:te}));if(!l)try{l=await e.queryClient.ensureQueryData(wc({client:te}))}catch{return}const c=l.find(d=>d.id===r);if(c)throw Hf({to:i.pathname.replace(`/projects/${r}`,`/projects/${encodeURIComponent(c.name)}`),replace:!0})}}),aL=Et({getParentRoute:()=>Kn,path:"/",component:()=>f.jsx(ba,{tab:"overview"})}),iL=Et({getParentRoute:()=>Kn,path:"/search-console",component:()=>f.jsx(ba,{tab:"search-console"})}),sL=Et({getParentRoute:()=>Kn,path:"/local",component:()=>f.jsx(ba,{tab:"local"})}),rL=Et({getParentRoute:()=>Kn,path:"/discovery",component:()=>f.jsx(ba,{tab:"discovery"})}),oL=Et({getParentRoute:()=>Kn,path:"/report",component:()=>f.jsx(ba,{tab:"report"})}),lL=Et({getParentRoute:()=>Kn,path:"/activity",component:()=>f.jsx(ba,{tab:"activity"})}),cL=Et({getParentRoute:()=>Kn,path:"/backlinks",component:()=>f.jsx(ba,{tab:"backlinks"})}),uL=Et({getParentRoute:()=>Kn,path:"/technical-aeo",component:()=>f.jsx(ba,{tab:"technical-aeo"})}),dL=Et({getParentRoute:()=>Kn,path:"/settings",component:()=>f.jsx(ba,{tab:"settings"})}),fL=Et({getParentRoute:()=>nn,path:"/runs",component:ZB}),pL=Et({getParentRoute:()=>nn,path:"/settings",component:YB,beforeLoad:({context:e})=>{}}),mL=Et({getParentRoute:()=>nn,path:"/setup",component:QB,beforeLoad:({context:e})=>{const n=e.queryClient.getQueryData(Oi({client:te}));if(n&&n.length>0)throw Hf({to:"/"})}}),hL=Et({getParentRoute:()=>nn,path:"/backlinks",component:XB}),gL=Et({getParentRoute:()=>nn,path:"/traffic",component:FB}),yL=Et({getParentRoute:()=>nn,path:"/traffic/$projectName/$sourceId",component:JB}),bL=Et({getParentRoute:()=>nn,path:"*",component:KB}),vL=nn.addChildren([eL,tL,Kn.addChildren([aL,iL,sL,rL,oL,lL,cL,uL,dL]),fL,pL,mL,hL,gL,yL,bL]);function SL(){return typeof window<"u"&&window.__CANONRY_CONFIG__?.basePath?window.__CANONRY_CONFIG__.basePath:"/"}const dv=SL(),xL=dv==="/"?"":dv.replace(/\/$/,"");function wL(e,n){return Bw({routeTree:vL,basepath:xL||"/",context:{queryClient:e},...n?.initialEntries})}const jL=6e4;function NL(){const[e,n]=q.useState(rf()?"ready":"checking"),[i,r]=q.useState(""),[l,c]=q.useState(""),[d,h]=q.useState(null),[g,v]=q.useState(!1),[S,x]=q.useState(!1),N=q.useRef(null),_=q.useRef(null),T=()=>{if(!N.current){const R=tA();_.current=R,N.current=wL(R)}return{queryClient:_.current,router:N.current}};q.useEffect(()=>{if(rf())return;let R=!1;return Qy().then(I=>{R||(I.authenticated?n("ready"):n(I.setupRequired?"setup":"login"))}).catch(I=>{R||(h(I instanceof Error?I.message:"Failed to reach the Canonry API"),n("login"))}),()=>{R=!0}},[]),q.useEffect(()=>{if(e!=="ready"||rf())return;const R=setInterval(()=>{Qy().then(I=>{I.authenticated||(x(!0),n(I.setupRequired?"setup":"login"))}).catch(()=>{})},jL);return Hy(()=>{x(!0),n("login")}),()=>{clearInterval(R),Hy(null)}},[e]);const k=async R=>{if(R.preventDefault(),!i.trim()||i.trim().length<8){h("Password must be at least 8 characters");return}if(i!==l){h("Passwords do not match");return}v(!0),h(null);try{if(!(await Ok(i.trim())).authenticated){h("Setup failed");return}r(""),c(""),x(!1),n("ready")}catch(I){h(I instanceof Hn||I instanceof Error?I.message:"Setup failed")}finally{v(!1)}},O=async R=>{if(R.preventDefault(),!!i.trim()){v(!0),h(null);try{if(!(await zk(i.trim())).authenticated){h("Incorrect password");return}r(""),x(!1),n("ready")}catch(I){h(I instanceof Hn||I instanceof Error?I.message:"Authentication failed")}finally{v(!1)}}};if(e==="ready"){const{queryClient:R,router:I}=T();return f.jsx(Lw,{client:R,children:f.jsx(qw,{router:I})})}return f.jsx("div",{className:"min-h-screen bg-bg 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(kn,{className:"surface-card w-full",children:e==="checking"?f.jsx(Yl,{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(Bf,{children:[f.jsx("p",{className:"eyebrow eyebrow-soft",children:"First-time setup"}),f.jsx(Lf,{children:"Create a dashboard password"}),f.jsx(qf,{children:"Choose a password to protect the Canonry dashboard. You will use this to sign in on future visits."})]}),f.jsx(Yl,{children:f.jsxs("form",{className:"space-y-4",onSubmit:Nn(k),children:[f.jsxs("label",{className:"block space-y-1.5",children:[f.jsx("span",{className:"text-xs font-medium text-secondary",children:"Password"}),f.jsx("input",{autoFocus:!0,className:"w-full rounded-md border border-base bg-bg px-3 py-2 text-sm text-heading outline-none transition focus:border-mono-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-secondary",children:"Confirm password"}),f.jsx("input",{className:"w-full rounded-md border border-base bg-bg px-3 py-2 text-sm text-heading outline-none transition focus:border-mono-600",type:"password",value:l,onChange:R=>c(R.target.value),placeholder:"Re-enter password"})]}),d?f.jsx("p",{className:"text-sm text-negative-400",children:d}):null,f.jsx(Ue,{type:"submit",disabled:g||!i.trim()||!l.trim(),children:g?"Setting up…":"Create password & open dashboard"})]})})]}):f.jsxs(f.Fragment,{children:[f.jsxs(Bf,{children:[f.jsx("p",{className:"eyebrow eyebrow-soft",children:"Dashboard access"}),f.jsx(Lf,{children:"Sign in to Canonry"}),f.jsx(qf,{children:"Enter your dashboard password to continue."})]}),f.jsxs(Yl,{children:[S?f.jsx("p",{className:"mb-4 rounded-md border border-caution bg-caution-soft px-3 py-2 text-sm text-caution",children:"Your session expired — please sign in again."}):null,f.jsxs("form",{className:"space-y-4",onSubmit:Nn(O),children:[f.jsxs("label",{className:"block space-y-1.5",children:[f.jsx("span",{className:"text-xs font-medium text-secondary",children:"Password"}),f.jsx("input",{autoFocus:!0,className:"w-full rounded-md border border-base bg-bg px-3 py-2 text-sm text-heading outline-none transition focus:border-mono-600",type:"password",value:i,onChange:R=>r(R.target.value),placeholder:"Dashboard password"})]}),d?f.jsx("p",{className:"text-sm text-negative-400",children:d}):null,f.jsx(Ue,{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.");Hw.createRoot(h1).render(f.jsx(q.StrictMode,{children:f.jsx(NL,{})}));export{y6 as $,J5 as A,Ue as B,sc as C,n6 as D,$L as E,l6 as F,U5 as G,u6 as H,Xr as I,d6 as J,XL as K,YL as L,JL as M,tn as N,o5 as O,t3 as P,m6 as Q,h6 as R,QD as S,Bn as T,e5 as U,f6 as V,p6 as W,c6 as X,FL as Y,t5 as Z,g6 as _,K6 as a,ML as a$,N6 as a0,S6 as a1,w6 as a2,x6 as a3,j6 as a4,Pk as a5,tS as a6,Ae as a7,v6 as a8,nR as a9,P6 as aA,a5 as aB,Oi as aC,i5 as aD,wp as aE,G6 as aF,Q6 as aG,H6 as aH,n5 as aI,yA as aJ,qv as aK,P4 as aL,H4 as aM,G4 as aN,G5 as aO,M6 as aP,P5 as aQ,h5 as aR,tq as aS,K5 as aT,H5 as aU,Z5 as aV,Y5 as aW,I5 as aX,Q5 as aY,LL as aZ,BL as a_,_i as aa,b6 as ab,hO as ac,gO as ad,V5 as ae,$5 as af,M5 as ag,A5 as ah,z5 as ai,D5 as aj,Hn as ak,R5 as al,TL as am,zA as an,e6 as ao,EA as ap,$A as aq,sR as ar,Wl as as,L5 as at,B5 as au,Af as av,B6 as aw,WL as ax,V6 as ay,I6 as az,Wf as b,O5 as b$,IL as b0,s6 as b1,Tb as b2,i6 as b3,PL as b4,GL as b5,a6 as b6,HL as b7,QL as b8,ZL as b9,C6 as bA,f5 as bB,d5 as bC,T6 as bD,A6 as bE,W5 as bF,l5 as bG,c5 as bH,u5 as bI,p5 as bJ,Ac as bK,X6 as bL,kp as bM,Dk as bN,VL as bO,s5 as bP,r5 as bQ,_p as bR,m5 as bS,$s as bT,Ob as bU,N5 as bV,_5 as bW,T5 as bX,E5 as bY,k5 as bZ,C5 as b_,KL as ba,uo as bb,wc as bc,H3 as bd,Ev as be,o6 as bf,PB as bg,Qt as bh,kk as bi,FD as bj,qL as bk,zL as bl,DL as bm,UL as bn,Y6 as bo,Nk as bp,Tk as bq,OL as br,EL as bs,_k as bt,RL as bu,eq as bv,c4 as bw,k6 as bx,_6 as by,Lk as bz,et as c,n3 as c0,vS as c1,o3 as c2,SS as c3,xS as c4,AA as c5,j5 as c6,Fy as c7,U6 as c8,X5 as c9,F5 as ca,xp as cb,r6 as cc,Hs as cd,L6 as ce,$6 as cf,w5 as cg,S5 as ch,x5 as ci,v5 as cj,q6 as ck,PE as d,Z6 as e,t6 as f,kn as g,Ib as h,gk as i,Nn as j,q5 as k,E6 as l,te as m,O6 as n,z6 as o,R6 as p,D6 as q,g5 as r,b5 as s,ZD as t,Cp as u,y5 as v,F6 as w,J6 as x,W6 as y,Mf as z};
|