@asrunjs/asrun 0.13.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/skills/exploring-cases/SKILL.md +26 -11
- package/.claude/skills/exploring-cases/references/handoff-card.js +81 -7
- package/.claude/skills/exploring-cases/references/open-questions.md +2 -2
- package/.claude/skills/exploring-cases/references/readiness.md +6 -0
- package/.claude/skills/exploring-cases/references/user-handoff.md +60 -27
- package/AGENTS.md +3 -2
- package/README.md +1 -1
- package/dist/lib/desktop-notify.d.ts +38 -0
- package/dist/lib/desktop-notify.js +158 -0
- package/dist/lib/paths.d.ts +9 -2
- package/dist/lib/paths.js +32 -5
- package/dist/lib/pdf.js +23 -3
- package/dist/scripts/check-cases.js +3 -3
- package/dist/scripts/cli.js +9 -2
- package/dist/scripts/doctor.js +39 -1
- package/dist/scripts/notify-test.d.ts +1 -0
- package/dist/scripts/notify-test.js +48 -0
- package/dist/ui/server/actions.js +4 -2
- package/dist/ui/server/ai-stream.d.ts +7 -1
- package/dist/ui/server/ai-stream.js +26 -7
- package/dist/ui/server/jobs.d.ts +10 -0
- package/dist/ui/server/jobs.js +41 -1
- package/dist/ui/shared/ai-commands.js +4 -2
- package/dist/ui/shared/types.d.ts +2 -0
- package/docs/agents/case-format.md +2 -1
- package/docs/ai-workflow.md +11 -7
- package/docs/cases.md +5 -5
- package/docs/commands.md +20 -1
- package/docs/install.md +1 -1
- package/docs/troubleshooting.md +17 -0
- package/docs/web-ui.md +7 -4
- package/package.json +2 -2
- package/templates/.claude/commands/explore-case.md +3 -2
- package/templates/package.json +1 -1
- package/ui/dist/assets/{dist-C46EmZuI.js → dist-BlFnpAOk.js} +1 -1
- package/ui/dist/assets/{dist-DrFzCwMc.js → dist-BwXTr_k4.js} +1 -1
- package/ui/dist/assets/{dist-DGzg2gyA.js → dist-BzDmxZ9V.js} +1 -1
- package/ui/dist/assets/{dist-_0g6iC9K.js → dist-C1uAVsF-.js} +1 -1
- package/ui/dist/assets/{dist-DMiOs9Qj.js → dist-CjFzi6xl.js} +1 -1
- package/ui/dist/assets/{dist-D9GmSkjm.js → dist-D7YBl9nc.js} +1 -1
- package/ui/dist/assets/{dist-BB2cF3XN.js → dist-DxeJFPaO.js} +1 -1
- package/ui/dist/assets/{dist-P9roUi1O.js → dist-DxlXH2E-.js} +1 -1
- package/ui/dist/assets/{dist-Dy45nXf8.js → dist-fpvlcqX7.js} +1 -1
- package/ui/dist/assets/{dist-Db_XhDui.js → dist-jGvx4PBr.js} +1 -1
- package/ui/dist/assets/{index-BN4ucmmn.js → index-Djsj43vv.js} +11 -11
- package/ui/dist/index.html +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dist-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dist-DxlXH2E-.js","assets/dist-Dr9crbBz.js","assets/dist-Bw5-uxs9.js","assets/dist-BwXTr_k4.js","assets/dist-DDJNvivM.js","assets/dist-BlFnpAOk.js","assets/dist-BzulKuec.js","assets/dist-fpvlcqX7.js","assets/dist-D7YBl9nc.js","assets/dist-CjFzi6xl.js","assets/dist-DxeJFPaO.js","assets/dist-CgIQYY1o.js","assets/dist-BzDmxZ9V.js","assets/dist-DF3F_I8N.js","assets/dist-Dlorc3Sx.js","assets/dockerfile-DJkHQgkl.js","assets/simple-mode-DXiLM1-G.js","assets/factor-LKH5gN8L.js","assets/nsis-viPvXFiq.js","assets/pug-BqCHZ5xT.js","assets/javascript-lS2r2ifg.js","assets/dist-C1uAVsF-.js","assets/dist-jGvx4PBr.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
import{$ as e,A as t,At as n,B as r,Bt as i,C as a,Ct as o,D as s,Dt as c,E as l,Et as u,F as d,Ft as f,G as p,H as m,I as h,It as g,J as _,K as v,L as y,Lt as b,M as x,Mt as S,N as C,Nt as w,O as T,Ot as E,P as D,Pt as O,Q as k,R as A,Rt as j,S as M,St as N,T as P,Tt as ee,U as F,V as I,Vt as L,W as te,X as R,Y as z,Z as B,_ as ne,_t as re,a as ie,at as ae,b as oe,bt as V,c as se,ct as H,d as ce,dt as le,et as U,f as ue,ft as de,g as fe,gt as pe,h as me,ht as he,i as ge,it as _e,j as ve,jt as ye,k as be,kt as xe,l as W,lt as Se,m as Ce,mt as we,n as Te,nt as Ee,o as De,ot as Oe,p as ke,pt as Ae,q as je,r as Me,rt as Ne,s as Pe,st as Fe,t as Ie,tt as Le,u as Re,ut as ze,v as Be,vt as Ve,w as He,wt as G,x as Ue,xt as We,y as Ge,yt as Ke,z as K,zt as qe}from"./dist-Dr9crbBz.js";var Je=Object.create,Ye=Object.defineProperty,Xe=Object.getOwnPropertyDescriptor,Ze=Object.getOwnPropertyNames,Qe=Object.getPrototypeOf,$e=Object.prototype.hasOwnProperty,et=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),tt=(e,t)=>{let n={};for(var r in e)Ye(n,r,{get:e[r],enumerable:!0});return t||Ye(n,Symbol.toStringTag,{value:`Module`}),n},nt=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=Ze(t),a=0,o=i.length,s;a<o;a++)s=i[a],!$e.call(e,s)&&s!==n&&Ye(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=Xe(t,s))||r.enumerable});return e},rt=(e,t,n)=>(n=e==null?{}:Je(Qe(e)),nt(t||!e||!e.__esModule||!$e.call(e,`default`)?Ye(n,`default`,{value:e,enumerable:!0}):n,e));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var it=et((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function O(e,t){return D(e.type,t,e.props)}function k(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function A(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var j=/\/+/g;function M(e,t){return typeof e==`object`&&e&&e.key!=null?A(``+e.key):t.toString(36)}function N(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function P(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,P(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+M(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(j,`$&/`)+`/`),P(o,r,i,``,function(e){return e})):o!=null&&(k(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(j,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+M(a,u),c+=P(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+M(a,u++),c+=P(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return P(N(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function ee(e,t,n){if(e==null)return e;var r=[],i=0;return P(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function F(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var I=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)};function L(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,I)}catch(e){I(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function te(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else L(te.bind(null,e))}var R={map:ee,forEach:function(e,t,n){ee(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ee(e,function(){t++}),t},toArray:function(e){return ee(e,function(e){return e})||[]},only:function(e){if(!k(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=R,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=te,e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!E.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return D(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)E.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return D(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=k,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:F}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=L,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.1`})),at=et(((e,t)=>{t.exports=it()})),ot=et((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),st=et(((e,t)=>{t.exports=ot()})),ct=et((e=>{var t=at();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`),o=Symbol.for(`react.recoverable`),s=Symbol.for(`react.optimistic_key`);function c(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===s?s:``+r,children:e,containerInfo:t,implementation:n}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.browser=function(e){return{$$typeof:o,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return c(e,t,null,r)},e.flushSync=function(e){var t=l.T,n=i.p;try{if(l.T=null,i.p=2,e)return e()}finally{l.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=u(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=u(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return l.H.useFormState(e,t,n)},e.useFormStatus=function(){return l.H.useHostTransitionStatus()},e.version=`19.3.1`})),lt=et(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=ct()})),ut=et((e=>{var t=st(),n=at(),r=lt();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}function f(e,t,n,r,i,a){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,i,a)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&f(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function p(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function m(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),e.tag!==3&&e.tag!==5&&e.tag!==27);)e=e.return;return t}function h(e){var t=[null,null],n=p(e);return n===null||g(t,e,n.child,{foundSelf:!1}),t}function g(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&g(e,t,n.child,r))return!0;n=n.sibling}return!1}function _(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(i(559))}}var v=null,y=null;function b(e,t,n){return e===n||e===t&&(v=e,!0)}function x(e,t,n){return e===n?(y=e,!1):e===t&&(y!==null&&(v=e),!0)}function S(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function C(e,t,n){for(var r=0,i=e;i;i=n(i))r++;i=0;for(var a=t;a;a=n(a))i++;for(;0<r-i;)e=n(e),r--;for(;0<i-r;)t=n(t),i--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var w=Object.assign,T=Symbol.for(`react.element`),E=Symbol.for(`react.transitional.element`),D=Symbol.for(`react.portal`),O=Symbol.for(`react.fragment`),k=Symbol.for(`react.strict_mode`),A=Symbol.for(`react.profiler`),j=Symbol.for(`react.consumer`),M=Symbol.for(`react.context`),N=Symbol.for(`react.forward_ref`),P=Symbol.for(`react.suspense`),ee=Symbol.for(`react.suspense_list`),F=Symbol.for(`react.memo`),I=Symbol.for(`react.lazy`),L=Symbol.for(`react.activity`),te=Symbol.for(`react.legacy_hidden`),R=Symbol.for(`react.memo_cache_sentinel`),z=Symbol.for(`react.view_transition`),B=Symbol.for(`react.recoverable`),ne=Symbol.iterator;function re(e){return typeof e!=`object`||!e?null:(e=ne&&e[ne]||e[`@@iterator`],typeof e==`function`?e:null)}var ie=Symbol.for(`react.client.reference`);function ae(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===ie?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case O:return`Fragment`;case A:return`Profiler`;case k:return`StrictMode`;case P:return`Suspense`;case ee:return`SuspenseList`;case L:return`Activity`;case z:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case D:return`Portal`;case M:return e.displayName||`Context`;case j:return(e._context.displayName||`Context`)+`.Consumer`;case N:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case F:return t=e.displayName||null,t===null?ae(e.type)||`Memo`:t;case I:t=e._payload,e=e._init;try{return ae(e(t))}catch{}}return null}var oe=Array.isArray,V=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H={pending:!1,data:null,method:null,action:null},ce=[],le=-1;function U(e){return{current:e}}function ue(e){0>le||(e.current=ce[le],ce[le]=null,le--)}function de(e,t){le++,ce[le]=e.current,e.current=t}var fe=U(null),pe=U(null),me=U(null),he=U(null);function ge(e,t){switch(de(me,t),de(pe,e),de(fe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?mp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=mp(t),e=hp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ue(fe),de(fe,e)}function _e(){ue(fe),ue(pe),ue(me)}function ve(e){var t=e.memoizedState;t!==null&&(dh._currentValue=t.memoizedState,de(he,e)),t=fe.current;var n=hp(t,e.type);t!==n&&(de(pe,e),de(fe,n))}function ye(e){pe.current===e&&(ue(fe),ue(pe)),he.current===e&&(ue(he),dh._currentValue=H)}var be,xe;function W(e){if(be===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);be=t&&t[1]||``,xe=-1<e.stack.indexOf(`
|
|
3
3
|
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
4
|
`+be+e+xe}var Se=!1;function Ce(e,t){if(!e||Se)return``;Se=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}n=!1;try{var i=Object.getOwnPropertyDescriptor(e.prototype,`props`);Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),n=!0,new e}finally{n&&(i===void 0?delete e.prototype.props:Object.defineProperty(e.prototype,"props",i))}}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
@@ -7,7 +7,7 @@ import{$ as e,A as t,At as n,B as r,Bt as i,C as a,Ct as o,D as s,Dt as c,E as l
|
|
|
7
7
|
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Se=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?W(n):``}function we(e,t){switch(e.tag){case 26:case 27:case 5:return W(e.type);case 16:return W(`Lazy`);case 13:return e.child!==t&&t!==null?W(`Suspense Fallback`):W(`Suspense`);case 19:return W(`SuspenseList`);case 0:case 15:return Ce(e.type,!1);case 11:return Ce(e.type.render,!1);case 1:return Ce(e.type,!0);case 31:return W(`Activity`);case 30:return W(`ViewTransition`);default:return``}}function Te(e){try{var t=``,n=null;do t+=we(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
8
8
|
Error generating stack: `+e.message+`
|
|
9
9
|
`+e.stack}}var Ee=Object.prototype.hasOwnProperty,De=t.unstable_scheduleCallback,Oe=t.unstable_cancelCallback,ke=t.unstable_shouldYield,Ae=t.unstable_requestPaint,je=t.unstable_now,Me=t.unstable_getCurrentPriorityLevel,Ne=t.unstable_ImmediatePriority,Pe=t.unstable_UserBlockingPriority,Fe=t.unstable_NormalPriority,Ie=t.unstable_LowPriority,Le=t.unstable_IdlePriority,Re=t.log,ze=t.unstable_setDisableYieldValue,Be=null,Ve=null;function He(e){if(typeof Re==`function`&&ze(e),Ve&&typeof Ve.setStrictMode==`function`)try{Ve.setStrictMode(Be,e)}catch{}}var G=Math.clz32?Math.clz32:Ge,Ue=Math.log,We=Math.LN2;function Ge(e){return e>>>=0,e===0?32:31-(Ue(e)/We|0)|0}var Ke=256,K=262144,qe=4194304;function Je(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64: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 e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ye(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Je(n))):i=Je(o):i=Je(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Je(n))):i=Je(o)):i=Je(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Xe(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ze(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-G(n),i=1<<r;t|=e[r],n&=~i}return t}function Qe(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+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 $e(){var e=qe;return qe<<=1,!(qe&62914560)&&(qe=4194304),e}function et(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function tt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function nt(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-G(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&rt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function rt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-G(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function it(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-G(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function ot(e,t){var n=t&-t;return n=n&42?1:ct(n),(n&(e.suspendedLanes|t))===0?n:0}function ct(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function ut(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function dt(){var e=se.p;return e===0?(e=window.event,e===void 0?32:Dh(e.type)):e}function ft(e,t){var n=se.p;try{return se.p=e,t()}finally{se.p=n}}var pt=Math.random().toString(36).slice(2),q=`__reactFiber$`+pt,J=`__reactProps$`+pt,mt=`__reactContainer$`+pt,ht=`__reactEvents$`+pt,gt=`__reactListeners$`+pt,_t=`__reactHandles$`+pt,vt=`__reactResources$`+pt,yt=`__reactMarker$`+pt,bt=`__reactLoad$`+pt;function xt(e){delete e[q],delete e[J],delete e[gt],delete e[_t]}function St(e){var t;if(t=e[q])return t;for(var n=e.parentNode;n;){if(t=n[mt]||n[q]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=gm(e);e!==null;){if(n=e[q])return n;e=gm(e)}return t}e=n,n=e.parentNode}return null}function Ct(e){if(e=e[q]||e[mt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function wt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Tt(e){var t=e[vt];return t||=e[vt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Et(e){e[yt]=!0}function Dt(e){e[bt]=void 0}var Ot=new Set,kt={};function At(e,t){jt(e,t),jt(e+`Capture`,t)}function jt(e,t){for(kt[e]=t,e=0;e<t.length;e++)Ot.add(t[e])}var Mt=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]*$`),Nt={},Pt={};function Ft(e){return Ee.call(Pt,e)?!0:Ee.call(Nt,e)?!1:Mt.test(e)?Pt[e]=!0:(Nt[e]=!0,!1)}var It=!1;function Lt(){var e=It;return It=!1,e}function Rt(e,t,n){if(Ft(t)){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,n)}}}function zt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,n)}}function Bt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,r)}}function Vt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Ht(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Ut(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Wt(e){if(!e._valueTracker){var t=Ht(e)?`checked`:`value`;e._valueTracker=Ut(e,t,``+e[t])}}function Gt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Ht(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var Kt=/[\n"\\]/g;function qt(e){return e.replace(Kt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Jt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Vt(t)):e.value!==``+Vt(t)&&(e.value=``+Vt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Xt(e,Vt(n)):o===`number`&&e.value==t?Xt(e,Vt(e.value)):Xt(e,Vt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Vt(s):e.removeAttribute(`name`)}function Yt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Wt(e);return}n=n==null?``:``+Vt(n),t=t==null?n:``+Vt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Wt(e)}function Xt(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function Zt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Vt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Qt(e,t,n){t!=null&&(t=``+Vt(t),t!==e.value&&(e.value=t),n==null)?e.defaultValue!==t&&(e.defaultValue=t):e.defaultValue=n==null?``:``+Vt(n)}function $t(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(oe(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Vt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Wt(e)}function en(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var tn=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 nn(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||tn.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function rn(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``,It=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(nn(e,a,r),It=!0)}else for(var o in t)t.hasOwnProperty(o)&&nn(e,o,t[o])}function an(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var on=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`],[`maskType`,`mask-type`],[`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`]]),sn=/^[\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 cn(e){return sn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function ln(){}var un=null;function dn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var fn=null,pn=null;function mn(e){var t=Ct(e);if(t&&(e=t.stateNode)){var n=e[J]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Jt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+qt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[J]||null;if(!a)throw Error(i(90));Jt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Gt(r)}break a;case`textarea`:Qt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Zt(e,!!n.multiple,t,!1)}}}var hn=!1;function gn(e,t,n){if(hn)return e(t,n);hn=!0;try{return e(t)}finally{if(hn=!1,(fn!==null||pn!==null)&&(Bd(),fn&&(t=fn,e=pn,pn=fn=null,mn(t),e)))for(t=0;t<e.length;t++)mn(e[t])}}function _n(e,t){var n=e.stateNode;if(n===null)return null;var r=n[J]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var vn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,yn=!1;if(vn)try{var bn={};Object.defineProperty(bn,"passive",{get:function(){yn=!0}}),window.addEventListener(`test`,bn,bn),window.removeEventListener(`test`,bn,bn)}catch{yn=!1}var xn=null,Sn=null,Cn=null;function wn(){if(Cn)return Cn;var e,t=Sn,n=t.length,r,i=`value`in xn?xn.value:xn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return Cn=i.slice(e,1<r?1-r:void 0)}function Tn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function En(){return!0}function Dn(){return!1}function On(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?En:Dn,this.isPropagationStopped=Dn,this}return w(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=En)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=En)},persist:function(){},isPersistent:En}),t}var kn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},An=On(kn),jn=w({},kn,{view:0,detail:0}),Mn=On(jn),Nn,Pn,Fn,In=w({},jn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:qn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Fn&&(Fn&&e.type===`mousemove`?(Nn=e.screenX-Fn.screenX,Pn=e.screenY-Fn.screenY):Pn=Nn=0,Fn=e),Nn)},movementY:function(e){return`movementY`in e?e.movementY:Pn}}),Ln=On(In),Rn=On(w({},In,{dataTransfer:0})),zn=On(w({},jn,{relatedTarget:0})),Bn=On(w({},kn,{animationName:0,elapsedTime:0,pseudoElement:0})),Vn=On(w({},kn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Hn=On(w({},kn,{data:0})),Un={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Wn={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`},Gn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Kn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Gn[e])?!!t[e]:!1}function qn(){return Kn}var Jn=On(w({},jn,{key:function(e){if(e.key){var t=Un[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Tn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Wn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:qn,charCode:function(e){return e.type===`keypress`?Tn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Tn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Yn=On(w({},In,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Xn=On(w({},kn,{submitter:0})),Zn=On(w({},jn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:qn})),Qn=On(w({},kn,{propertyName:0,elapsedTime:0,pseudoElement:0})),$n=On(w({},In,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),er=On(w({},kn,{newState:0,oldState:0,source:0})),tr=[9,13,27,32],nr=vn&&`CompositionEvent`in window,rr=null;vn&&`documentMode`in document&&(rr=document.documentMode);var ir=vn&&`TextEvent`in window&&!rr,ar=vn&&(!nr||rr&&8<rr&&11>=rr),or=` `,sr=!1;function cr(e,t){switch(e){case`keyup`:return tr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function lr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var ur=!1;function dr(e,t){switch(e){case`compositionend`:return lr(t);case`keypress`:return t.which===32?(sr=!0,or):null;case`textInput`:return e=t.data,e===or&&sr?null:e;default:return null}}function fr(e,t){if(ur)return e===`compositionend`||!nr&&cr(e,t)?(e=wn(),Cn=Sn=xn=null,ur=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return ar&&t.locale!==`ko`?null:t.data;default:return null}}var pr={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 mr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!pr[e.type]:t===`textarea`}function hr(e,t,n,r){fn?pn?pn.push(r):pn=[r]:fn=r,t=Zf(t,`onChange`),0<t.length&&(n=new An(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var gr=null,_r=null;function vr(e){Uf(e,0)}function yr(e){if(Gt(wt(e)))return e}function br(e,t){if(e===`change`)return t}var xr=!1;if(vn){var Sr;if(vn){var Cr=`oninput`in document;if(!Cr){var wr=document.createElement(`div`);wr.setAttribute(`oninput`,`return;`),Cr=typeof wr.oninput==`function`}Sr=Cr}else Sr=!1;xr=Sr&&(!document.documentMode||9<document.documentMode)}function Tr(){gr&&(gr.detachEvent(`onpropertychange`,Er),_r=gr=null)}function Er(e){if(e.propertyName===`value`&&yr(_r)){var t=[];hr(t,_r,e,dn(e)),gn(vr,t)}}function Dr(e,t,n){e===`focusin`?(Tr(),gr=t,_r=n,gr.attachEvent(`onpropertychange`,Er)):e===`focusout`&&Tr()}function Or(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return yr(_r)}function kr(e,t){if(e===`click`)return yr(t)}function Ar(e,t){if(e===`input`||e===`change`)return yr(t)}function jr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Mr=typeof Object.is==`function`?Object.is:jr;function Nr(e,t){if(Mr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Ee.call(t,i)||!Mr(e[i],t[i]))return!1}return!0}function Pr(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function Fr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ir(e,t){var n=Fr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Fr(n)}}function Lr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Lr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Rr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Pr(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Pr(e.document)}return t}function zr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Br=vn&&`documentMode`in document&&11>=document.documentMode,Vr=null,Hr=null,Ur=null,Wr=!1;function Gr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Wr||Vr==null||Vr!==Pr(r)||(r=Vr,`selectionStart`in r&&zr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ur&&Nr(Ur,r)||(Ur=r,r=Zf(Hr,`onSelect`),0<r.length&&(t=new An(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Vr)))}function Kr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var qr={animationend:Kr(`Animation`,`AnimationEnd`),animationiteration:Kr(`Animation`,`AnimationIteration`),animationstart:Kr(`Animation`,`AnimationStart`),transitionrun:Kr(`Transition`,`TransitionRun`),transitionstart:Kr(`Transition`,`TransitionStart`),transitioncancel:Kr(`Transition`,`TransitionCancel`),transitionend:Kr(`Transition`,`TransitionEnd`)},Jr={},Yr={};vn&&(Yr=document.createElement(`div`).style,`AnimationEvent`in window||(delete qr.animationend.animation,delete qr.animationiteration.animation,delete qr.animationstart.animation),`TransitionEvent`in window||delete qr.transitionend.transition);function Xr(e){if(Jr[e])return Jr[e];if(!qr[e])return e;var t=qr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Yr)return Jr[e]=t[n];return e}var Zr=Xr(`animationend`),Qr=Xr(`animationiteration`),$r=Xr(`animationstart`),ei=Xr(`transitionrun`),ti=Xr(`transitionstart`),ni=Xr(`transitioncancel`),ri=Xr(`transitionend`),ii=new Map,ai=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError 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(` `);ai.push(`scrollEnd`);function oi(e,t){ii.set(e,t),At(t,[e])}var si=0;function ci(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=xd.identifierPrefix;var n=si++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function li(e){if(e==null||typeof e==`string`)return e;var t=null,n=kd;if(n!==null)for(var r=0;r<n.length;r++){var i=e[n[r]];if(i!=null){if(i===`none`)return`none`;t=t==null?i:t+(` `+i)}}return t??e.default}function ui(e,t){return e=li(e),t=li(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var di=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},fi=[],pi=0,mi=0;function hi(){for(var e=pi,t=mi=pi=0;t<e;){var n=fi[t];fi[t++]=null;var r=fi[t];fi[t++]=null;var i=fi[t];fi[t++]=null;var a=fi[t];if(fi[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&yi(n,i,a)}}function gi(e,t,n,r){fi[pi++]=e,fi[pi++]=t,fi[pi++]=n,fi[pi++]=r,mi|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function _i(e,t,n,r){return gi(e,t,n,r),bi(e)}function vi(e,t){return gi(e,null,null,t),bi(e)}function yi(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-G(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function bi(e){if(50<Ad)throw Ad=0,jd=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var xi={};function Si(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ci(e,t,n,r){return new Si(e,t,n,r)}function wi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ti(e,t){var n=e.alternate;return n===null?(n=Ci(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&1206910976,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Ei(e,t){e.flags&=1206910978;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Di(e,t,n,r,a,o){var s=0;if(r=e,typeof r==`function`)wi(r)&&(s=1);else if(typeof r==`string`)s=Zm(e,n,fe.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case L:return e=Ci(31,n,t,a),e.elementType=L,e.lanes=o,e;case O:return Oi(n.children,a,o,t);case k:s=8,a|=24;break;case A:return e=Ci(12,n,t,a|2),e.elementType=A,e.lanes=o,e;case P:return e=Ci(13,n,t,a),e.elementType=P,e.lanes=o,e;case ee:return e=Ci(19,n,t,a),e.elementType=ee,e.lanes=o,e;case te:case z:return e=a|32,e=Ci(30,n,t,e),e.elementType=z,e.lanes=o,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case M:s=10;break a;case j:s=9;break a;case N:s=11;break a;case F:s=14;break a;case I:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=Ci(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function Oi(e,t,n,r){return e=Ci(7,e,r,t),e.lanes=n,e}function ki(e,t,n){return e=Ci(6,e,null,t),e.lanes=n,e}function Ai(e){var t=Ci(18,null,null,0);return t.stateNode=e,t}function ji(e,t,n){return t=Ci(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Mi=new WeakMap;function Ni(e,t){if(typeof e==`object`&&e){var n=Mi.get(e);return n===void 0?(t={value:e,source:t,stack:Te(t)},Mi.set(e,t),t):n}return{value:e,source:t,stack:Te(t)}}var Pi=[],Fi=0,Ii=null,Li=0,Ri=[],zi=0,Bi=null,Vi=1,Hi=``;function Ui(e,t){Pi[Fi++]=Li,Pi[Fi++]=Ii,Ii=e,Li=t}function Wi(e,t,n){Ri[zi++]=Vi,Ri[zi++]=Hi,Ri[zi++]=Bi,Bi=e;var r=Vi;e=Hi;var i=32-G(r)-1;r&=~(1<<i),n+=1;var a=32-G(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Vi=1<<32-G(t)+i|n<<i|r,Hi=a+e}else Vi=1<<a|n<<i|r,Hi=e}function Gi(e){e.return!==null&&(Ui(e,1),Wi(e,1,0))}function Ki(e){for(;e===Ii;)Ii=Pi[--Fi],Pi[Fi]=null,Li=Pi[--Fi],Pi[Fi]=null;for(;e===Bi;)Bi=Ri[--zi],Ri[zi]=null,Hi=Ri[--zi],Ri[zi]=null,Vi=Ri[--zi],Ri[zi]=null}function qi(e,t){Ri[zi++]=Vi,Ri[zi++]=Hi,Ri[zi++]=Bi,Vi=t.id,Hi=t.overflow,Bi=e}var Ji=null,Yi=null,Xi=!1,Zi=null,Qi=!1,$i=Error(i(519));function ea(e){throw oa(Ni(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),$i}function ta(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[q]=e,t[J]=r,n){case`dialog`:Wf(`cancel`,t),Wf(`close`,t);break;case`iframe`:case`object`:case`embed`:Wf(`load`,t);break;case`video`:case`audio`:for(n=0;n<Vf.length;n++)Wf(Vf[n],t);break;case`source`:Wf(`error`,t);break;case`img`:case`image`:case`link`:Wf(`error`,t),Wf(`load`,t);break;case`details`:Wf(`toggle`,t);break;case`input`:Wf(`invalid`,t),Yt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Wf(`invalid`,t);break;case`textarea`:Wf(`invalid`,t),$t(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||rp(t.textContent,n)?(r.popover!=null&&(Wf(`beforetoggle`,t),Wf(`toggle`,t)),r.onScroll!=null&&Wf(`scroll`,t),r.onScrollEnd!=null&&Wf(`scrollend`,t),r.onClick!=null&&(t.onclick=ln),t=!0):t=!1,t||ea(e,!0)}function na(e){for(Ji=e.return;Ji;)switch(Ji.tag){case 5:case 31:case 13:Qi=!1;return;case 27:case 3:Qi=!0;return;default:Ji=Ji.return}}function ra(e){if(e!==Ji)return!1;if(!Xi)return na(e),Xi=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||_p(e.type,e.memoizedProps)),n=!n),n&&Yi&&ea(e),na(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Yi=hm(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Yi=hm(e)}else t===27?(t=Yi,Ep(e.type)?(e=mm,mm=null,Yi=e):Yi=t):Yi=Ji?pm(e.stateNode.nextSibling):null;return!0}function ia(){Yi=Ji=null,Xi=!1}function aa(){var e=Zi;return e!==null&&(pd===null?pd=e:pd.push.apply(pd,e),Zi=null),e}function oa(e){Zi===null?Zi=[e]:Zi.push(e)}var sa=U(null),ca=null,la=null;function ua(e,t,n){de(sa,t._currentValue),t._currentValue=n}function da(e){e._currentValue=sa.current,ue(sa)}function fa(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function pa(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),fa(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),fa(s,n,e),s=null}else a.tag===13&&a.memoizedState!==null&&a.memoizedState.dehydrated===null?(a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),fa(a.return,n,e),s=a.child,s=s===null?null:s.sibling):s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function ma(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Mr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===he.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[dh]:e.push(dh))}a=a.return}return e!==null&&pa(t,e,n,r),t.flags|=262144,e!==null}function ha(e){for(e=e.firstContext;e!==null;){if(!Mr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ga(e){ca=e,la=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function _a(e){return ya(ca,e)}function va(e,t){return ca===null&&ga(e),ya(e,t)}function ya(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},la===null){if(e===null)throw Error(i(308));la=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else la=la.next=t;return n}var ba=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},xa=t.unstable_scheduleCallback,Sa=t.unstable_NormalPriority,Ca={$$typeof:M,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function wa(){return{controller:new ba,data:new Map,refCount:0}}function Ta(e){e.refCount--,e.refCount===0&&xa(Sa,function(){e.controller.abort()})}function Ea(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var r=t[e];n.indexOf(r)===-1&&n.push(r)}}}var Da=null;function Oa(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var ka=null,Aa=0,ja=0,Ma=null;function Na(e,t){if(ka===null){var n=ka=[];Aa=0,ja=If(),Ma={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return Aa++,t.then(Pa,Pa),t}function Pa(){if(--Aa===0&&(Da=null,ka!==null)){Ma!==null&&(Ma.status=`fulfilled`);var e=ka;ka=null,ja=0,Ma=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Fa(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var Ia=V.S;V.S=function(e,t){if(gd=je(),typeof t==`object`&&t&&typeof t.then==`function`&&Na(e,t),Da!==null)for(var n=Sf;n!==null;)Ea(n,Da),n=n.next;if(n=e.types,n!==null){for(var r=Sf;r!==null;)Ea(r,n),r=r.next;if(ja!==0){r=Da,r===null&&(r=Da=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}Ia!==null&&Ia(e,t)};var La=U(null);function Ra(){var e=La.current;return e===null?Zu.pooledCache:e}function za(e,t){t===null?de(La,La.current):de(La,t.pool)}function Ba(){var e=Ra();return e===null?null:{parent:Ca._currentValue,pool:e}}var Va=Error(i(460)),Ha=Error(i(474)),Ua=Error(i(542)),Wa={then:function(){}};function Ga(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Ka(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(ln,ln),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Xa(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(ln,ln);else{if(e=Zu,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Xa(e),e}throw Ja=t,Va}}function qa(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Ja=e,Va):e}}var Ja=null;function Ya(){if(Ja===null)throw Error(i(459));var e=Ja;return Ja=null,e}function Xa(e){if(e===Va||e===Ua)throw Error(i(483))}var Za=null,Qa=0;function $a(e){var t=Qa;return Qa+=1,Za===null&&(Za=[]),Ka(Za,e,t)}function eo(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function to(e,t){throw t.$$typeof===T?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function no(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=Ti(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=134217730,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=134217730),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=ki(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===O?(e=d(e,t,n.props.children,r,n.key),eo(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===I&&qa(i)===t.type)?(t=a(t,n.props),eo(t,n),t.return=e,t):(t=Di(n.type,n.key,n.props,null,e.mode,r),eo(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=ji(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=Oi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=ki(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case E:return n=Di(t.type,t.key,t.props,null,e.mode,n),eo(n,t),n.return=e,n;case D:return t=ji(t,e.mode,n),t.return=e,t;case I:return t=qa(t),f(e,t,n)}if(oe(t)||re(t))return t=Oi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,$a(t),n);if(t.$$typeof===M)return f(e,va(e,t),n);to(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case E:return n.key===i?l(e,t,n,r):null;case D:return n.key===i?u(e,t,n,r):null;case I:return n=qa(n),p(e,t,n,r)}if(oe(n)||re(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,$a(n),r);if(n.$$typeof===M)return p(e,t,va(e,n),r);to(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case E:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case D:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case I:return r=qa(r),m(e,t,n,r,i)}if(oe(r)||re(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,$a(r),i);if(r.$$typeof===M)return m(e,t,n,va(t,r),i);to(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),Xi&&Ui(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return Xi&&Ui(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&(_=g.alternate,_!==null&&d.delete(_.key===null?h:_.key)),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),Xi&&Ui(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),Xi&&Ui(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Xi&&Ui(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&(_=v.alternate,_!==null&&h.delete(_.key===null?g:_.key)),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),Xi&&Ui(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===O&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case E:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===O){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),eo(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===I&&qa(l)===r.type){n(e,r.sibling),c=a(r,o.props),eo(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===O?(c=Oi(o.props.children,e.mode,c,o.key),eo(c,o),c.return=e,e=c):(c=Di(o.type,o.key,o.props,null,e.mode,c),eo(c,o),c.return=e,e=c)}return s(e);case D:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=ji(o,e.mode,c),c.return=e,e=c}return s(e);case I:return o=qa(o),_(e,r,o,c)}if(oe(o))return h(e,r,o,c);if(re(o)){if(l=re(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,$a(o),c);if(o.$$typeof===M)return _(e,r,va(e,o),c);to(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=ki(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Qa=0;var i=_(e,t,n,r);return Za=null,i}catch(t){if(t===Va||t===Ua)throw t;var a=Ci(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var ro=no(!0),io=no(!1),ao=!1;function oo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function so(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function co(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function lo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Xu&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=bi(e),yi(e,null,n),t}return gi(e,r,t,n),bi(e)}function uo(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,it(e,n)}}function fo(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n}else e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var po=!1;function mo(){if(po){var e=Ma;if(e!==null)throw e}}function ho(e,t,n,r){po=!1;var i=e.updateQueue;ao=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?($u&f)===f:(r&f)===f){f!==0&&f===ja&&(po=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=w({},d,f);break a;case 2:ao=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),sd|=o,e.lanes=o,e.memoizedState=d}}function go(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function _o(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)go(n[e],t)}var vo=U(null),yo=U(0);function bo(e,t){e=ad,de(yo,e),de(vo,t),ad=e|t.baseLanes}function xo(){de(yo,ad),de(vo,vo.current)}function So(){ad=yo.current,ue(vo),ue(yo)}var Co=U(null),wo=null;function To(e){var t=e.alternate;de(Ao,Ao.current&1),de(Co,e),wo===null&&(t===null||vo.current!==null||t.memoizedState!==null)&&(wo=e)}function Eo(e){de(Ao,Ao.current),de(Co,e),wo===null&&(wo=e)}function Do(e){e.tag===22?(de(Ao,Ao.current),de(Co,e),wo===null&&(wo=e)):Oo()}function Oo(){de(Ao,Ao.current),de(Co,Co.current)}function ko(e){ue(Co),wo===e&&(wo=null),ue(Ao)}var Ao=U(0);function jo(e,t){de(Co,Co.current),de(Ao,t)}function Mo(e){ue(Ao),ue(Co),wo===e&&(wo=null)}function No(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||um(n)||dm(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==`independent`){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Po=0,Fo=null,Io=null,Lo=null,Ro=!1,zo=!1,Bo=!1,Vo=0,Ho=0,Uo=null,Wo=0;function Go(){throw Error(i(321))}function Ko(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Mr(e[n],t[n]))return!1;return!0}function qo(e,t,n,r,i,a){return Po=a,Fo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,V.H=e===null||e.memoizedState===null?uc:dc,Bo=!1,a=n(r,i),Bo=!1,zo&&(a=Yo(t,n,r,i)),Jo(e),a}function Jo(e){V.H=lc;var t=Io!==null&&Io.next!==null;if(Po=0,Lo=Io=Fo=null,Ro=!1,Ho=0,Uo=null,t)throw Error(i(300));e===null||Oc||(e=e.dependencies,e!==null&&ha(e)&&(Oc=!0))}function Yo(e,t,n,r){Fo=e;var a=0;do{if(zo&&(Uo=null),Ho=0,zo=!1,25<=a)throw Error(i(301));if(a+=1,Lo=Io=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}V.H=fc,o=t(n,r)}while(zo);return o}function Xo(){var e=V.H,t=e.useState()[0];return t=typeof t.then==`function`?rs(t):t,e=e.useState()[0],(Io===null?null:Io.memoizedState)!==e&&(Fo.flags|=1024),t}function Zo(){var e=Vo!==0;return Vo=0,e}function Qo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function $o(e){if(Ro){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ro=!1}Po=0,Lo=Io=Fo=null,zo=!1,Ho=Vo=0,Uo=null}function es(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Lo===null?Fo.memoizedState=Lo=e:Lo=Lo.next=e,Lo}function ts(){if(Io===null){var e=Fo.alternate;e=e===null?null:e.memoizedState}else e=Io.next;var t=Lo===null?Fo.memoizedState:Lo.next;if(t!==null)Lo=t,Io=e;else{if(e===null)throw Fo.alternate===null?Error(i(467)):Error(i(310));Io=e,e={memoizedState:Io.memoizedState,baseState:Io.baseState,baseQueue:Io.baseQueue,queue:Io.queue,next:null},Lo===null?Fo.memoizedState=Lo=e:Lo=Lo.next=e}return Lo}function ns(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function rs(e){var t=Ho;return Ho+=1,Uo===null&&(Uo=[]),e=Ka(Uo,e,t),t=Fo,(Lo===null?t.memoizedState:Lo.next)===null&&(t=t.alternate,V.H=t===null||t.memoizedState===null?uc:dc),e}function is(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return rs(e);if(e.$$typeof===B)return;if(e.$$typeof===M)return _a(e)}throw Error(i(438,String(e)))}function as(e){var t=null,n=Fo.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=Fo.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=ns(),Fo.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=R;return t.index++,n}function os(e,t){return typeof t==`function`?t(e):t}function ss(e){return cs(ts(),Io,e)}function cs(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(Po&f)===f:($u&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===ja&&(d=!0);else if((Po&p)===p){u=u.next,p===ja&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,Fo.lanes|=p,sd|=p;f=u.action,Bo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,Fo.lanes|=f,sd|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Mr(o,e.memoizedState)&&(Oc=!0,d&&(n=Ma,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function ls(e){var t=ts(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Mr(o,t.memoizedState)||(Oc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function us(e,t,n){var r=Fo,a=ts(),o=Xi;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Mr((Io||a).memoizedState,n);if(s&&(a.memoizedState=n,Oc=!0),a=a.queue,Fs(ps.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||Lo!==null&&!!(Lo.memoizedState.tag&1),As(e?9:8,{destroy:void 0},fs.bind(null,r,a,n,t),null),e){if(r.flags|=2048,Zu===null)throw Error(i(349));o||Po&127||ds(r,t,n)}return n}function ds(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Fo.updateQueue,t===null?(t=ns(),Fo.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function fs(e,t,n,r){t.value=n,t.getSnapshot=r,ms(t)&&hs(e)}function ps(e,t,n){return n(function(){ms(t)&&hs(e)})}function ms(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Mr(e,n)}catch{return!0}}function hs(e){var t=vi(e,2);t!==null&&Fd(t,e,2)}function gs(e){var t=es();if(typeof e==`function`){var n=e;if(e=n(),Bo){He(!0);try{n()}finally{He(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:os,lastRenderedState:e},t}function _s(e,t,n,r){return e.baseState=n,cs(e,Io,typeof r==`function`?r:os)}function vs(e,t,n,r,a){if(oc(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};V.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,ys(t,o)):(o.next=n.next,t.pending=n.next=o)}}function ys(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=V.T,o={};o.types=a===null?null:a.types,V.T=o;try{var s=n(i,r),c=V.S;c!==null&&c(o,s),bs(e,t,s)}catch(n){Ss(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),V.T=a}}else try{a=n(i,r),bs(e,t,a)}catch(n){Ss(e,t,n)}}function bs(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){xs(e,t,n)},function(n){return Ss(e,t,n)}):xs(e,t,n)}function xs(e,t,n){t.status=`fulfilled`,t.value=n,Cs(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,ys(e,n)))}function Ss(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Cs(t),t=t.next;while(t!==r)}e.action=null}function Cs(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ws(e,t){return t}function Ts(e,t){if(Xi){var n=Zu.formState;if(n!==null){a:{var r=Fo;if(Xi){if(Yi){b:{for(var i=Yi,a=Qi;i.nodeType!==8;)if(!a||(i=pm(i.nextSibling),i===null)){i=null;break b}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Yi=pm(i.nextSibling),r=i.data===`F!`;break a}}ea(r)}r=!1}r&&(t=n[0])}}return n=es(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ws,lastRenderedState:t},n.queue=r,n=rc.bind(null,Fo,r),r.dispatch=n,r=gs(!1),a=ac.bind(null,Fo,!1,r.queue),r=es(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=vs.bind(null,Fo,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Es(e){return Ds(ts(),Io,e)}function Ds(e,t,n){if(t=cs(e,t,ws)[0],e=ss(os)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=rs(t)}catch(e){throw e===Va?Ua:e}else r=t;t=ts();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(Fo.flags|=2048,As(9,{destroy:void 0},Os.bind(null,i,n),null)),[r,a,e]}function Os(e,t){e.action=t}function ks(e){var t=ts(),n=Io;if(n!==null)return Ds(t,n,e);ts(),t=t.memoizedState,n=ts();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function As(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=Fo.updateQueue,t===null&&(t=ns(),Fo.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function js(){return ts().memoizedState}function Ms(e,t,n,r){var i=es();Fo.flags|=e,i.memoizedState=As(1|t,{destroy:void 0},n,r===void 0?null:r)}function Ns(e,t,n,r){var i=ts();r=r===void 0?null:r;var a=i.memoizedState.inst;Io!==null&&r!==null&&Ko(r,Io.memoizedState.deps)?i.memoizedState=As(t,a,n,r):(Fo.flags|=e,i.memoizedState=As(1|t,a,n,r))}function Ps(e,t){Ms(8390656,8,e,t)}function Fs(e,t){Ns(2048,8,e,t)}function Is(e){Fo.flags|=4;var t=Fo.updateQueue;if(t===null)t=ns(),Fo.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Ls(e){var t=ts().memoizedState;return Is({ref:t,nextImpl:e}),function(){if(Xu&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Rs(e,t){return Ns(4,2,e,t)}function zs(e,t){return Ns(4,4,e,t)}function Bs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Vs(e,t,n){n=n==null?null:n.concat([e]),Ns(4,4,Bs.bind(null,t,e),n)}function Hs(){}function Us(e,t){var n=ts();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Ko(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ws(e,t){var n=ts();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Ko(t,r[1]))return r[0];if(r=e(),Bo){He(!0);try{e()}finally{He(!1)}}return n.memoizedState=[r,t],r}function Gs(e,t,n){return n===void 0||Po&1073741824&&!($u&261930)?e.memoizedState=t:(e.memoizedState=n,e=Nd(),Fo.lanes|=e,sd|=e,n)}function Ks(e,t,n,r){return Mr(n,t)?n:vo.current===null?!(Po&106)||Po&1073741824&&!($u&261930)?(Oc=!0,e.memoizedState=n):(e=Nd(),Fo.lanes|=e,sd|=e,t):(e=Gs(e,n,r),Mr(e,t)||(Oc=!0),e)}function qs(e,t,n,r,i){var a=se.p;se.p=a!==0&&8>a?a:8;var o=V.T,s={};s.types=o===null?null:o.types,V.T=s,ac(e,!1,t,n);try{var c=i(),l=V.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?ic(e,t,Fa(c,r),Md(e)):ic(e,t,r,Md(e))}catch(n){ic(e,t,{then:function(){},status:`rejected`,reason:n},Md())}finally{se.p=a,o!==null&&s.types!==null&&(o.types=s.types),V.T=o}}function Js(){}function Ys(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Xs(e).queue;qs(e,a,t,H,n===null?Js:function(){return Zs(e),n(r)})}function Xs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:H,baseState:H,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:os,lastRenderedState:H},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:os,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Zs(e){var t=Xs(e);t.next===null&&(t=e.alternate.memoizedState),ic(e,t.next.queue,{},Md())}function Qs(){return _a(dh)}function $s(){return ts().memoizedState}function ec(){return ts().memoizedState}function tc(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Md();e=co(n);var r=lo(t,e,n);r!==null&&(Fd(r,t,n),uo(r,t,n)),t={cache:wa()},e.payload=t;return}t=t.return}}function nc(e,t,n){var r=Md();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},oc(e)?sc(t,n):(n=_i(e,t,n,r),n!==null&&(Fd(n,e,r),cc(n,t,r)))}function rc(e,t,n){ic(e,t,n,Md())}function ic(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(oc(e))sc(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Mr(s,o))return gi(e,t,i,0),Zu===null&&hi(),!1}catch{}if(n=_i(e,t,i,r),n!==null)return Fd(n,e,r),cc(n,t,r),!0}return!1}function ac(e,t,n,r){if(r={lane:2,revertLane:If(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},oc(e)){if(t)throw Error(i(479))}else t=_i(e,n,r,2),t!==null&&Fd(t,e,2)}function oc(e){var t=e.alternate;return e===Fo||t!==null&&t===Fo}function sc(e,t){zo=Ro=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function cc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,it(e,n)}}var lc={readContext:_a,use:is,useCallback:Go,useContext:Go,useEffect:Go,useImperativeHandle:Go,useLayoutEffect:Go,useInsertionEffect:Go,useMemo:Go,useReducer:Go,useRef:Go,useState:Go,useDebugValue:Go,useDeferredValue:Go,useTransition:Go,useSyncExternalStore:Go,useId:Go,useHostTransitionStatus:Go,useFormState:Go,useActionState:Go,useOptimistic:Go,useMemoCache:Go,useCacheRefresh:Go,useEffectEvent:Go},uc={readContext:_a,use:is,useCallback:function(e,t){return es().memoizedState=[e,t===void 0?null:t],e},useContext:_a,useEffect:Ps,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Ms(4194308,4,Bs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ms(4194308,4,e,t)},useInsertionEffect:function(e,t){Ms(4,2,e,t)},useMemo:function(e,t){var n=es();t=t===void 0?null:t;var r=e();if(Bo){He(!0);try{e()}finally{He(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=es();if(n!==void 0){var i=n(t);if(Bo){He(!0);try{n(t)}finally{He(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=nc.bind(null,Fo,e),[r.memoizedState,e]},useRef:function(e){var t=es();return e={current:e},t.memoizedState=e},useState:function(e){e=gs(e);var t=e.queue,n=rc.bind(null,Fo,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Hs,useDeferredValue:function(e,t){return Gs(es(),e,t)},useTransition:function(){var e=gs(!1);return e=qs.bind(null,Fo,e.queue,!0,!1),es().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=Fo,a=es();if(Xi){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Zu===null)throw Error(i(349));$u&127||ds(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Ps(ps.bind(null,r,o,e),[e]),r.flags|=2048,As(9,{destroy:void 0},fs.bind(null,r,o,n,t),null),n},useId:function(){var e=es(),t=Zu.identifierPrefix;if(Xi){var n=Hi,r=Vi;n=(r&~(1<<32-G(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Vo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Wo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Qs,useFormState:Ts,useActionState:Ts,useOptimistic:function(e){var t=es();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=ac.bind(null,Fo,!0,n),n.dispatch=t,[e,t]},useMemoCache:as,useCacheRefresh:function(){return es().memoizedState=tc.bind(null,Fo)},useEffectEvent:function(e){var t=es(),n={impl:e};return t.memoizedState=n,function(){if(Xu&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},dc={readContext:_a,use:is,useCallback:Us,useContext:_a,useEffect:Fs,useImperativeHandle:Vs,useInsertionEffect:Rs,useLayoutEffect:zs,useMemo:Ws,useReducer:ss,useRef:js,useState:function(){return ss(os)},useDebugValue:Hs,useDeferredValue:function(e,t){return Ks(ts(),Io.memoizedState,e,t)},useTransition:function(){var e=ss(os)[0],t=ts().memoizedState;return[typeof e==`boolean`?e:rs(e),t]},useSyncExternalStore:us,useId:$s,useHostTransitionStatus:Qs,useFormState:Es,useActionState:Es,useOptimistic:function(e,t){return _s(ts(),Io,e,t)},useMemoCache:as,useCacheRefresh:ec,useEffectEvent:Ls},fc={readContext:_a,use:is,useCallback:Us,useContext:_a,useEffect:Fs,useImperativeHandle:Vs,useInsertionEffect:Rs,useLayoutEffect:zs,useMemo:Ws,useReducer:ls,useRef:js,useState:function(){return ls(os)},useDebugValue:Hs,useDeferredValue:function(e,t){var n=ts();return Io===null?Gs(n,e,t):Ks(n,Io.memoizedState,e,t)},useTransition:function(){var e=ls(os)[0],t=ts().memoizedState;return[typeof e==`boolean`?e:rs(e),t]},useSyncExternalStore:us,useId:$s,useHostTransitionStatus:Qs,useFormState:ks,useActionState:ks,useOptimistic:function(e,t){var n=ts();return Io===null?(n.baseState=e,[e,n.queue.dispatch]):_s(n,Io,e,t)},useMemoCache:as,useCacheRefresh:ec,useEffectEvent:Ls};function pc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:w({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var mc={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Md(),i=co(r);i.payload=t,n!=null&&(i.callback=n),t=lo(e,i,r),t!==null&&(Fd(t,e,r),uo(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Md(),i=co(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=lo(e,i,r),t!==null&&(Fd(t,e,r),uo(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Md(),r=co(n);r.tag=2,t!=null&&(r.callback=t),t=lo(e,r,n),t!==null&&(Fd(t,e,n),uo(t,e,n))}};function hc(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Nr(n,r)||!Nr(i,a):!0}function gc(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&mc.enqueueReplaceState(t,t.state,null)}function _c(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=w({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function vc(e){di(e)}function yc(e){console.error(e)}function bc(e){di(e)}function xc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Sc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Cc(e,t,n){return n=co(n),n.tag=3,n.payload={element:null},n.callback=function(){xc(e,t)},n}function wc(e){return e=co(e),e.tag=3,e}function Tc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Sc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Sc(t,n,r),typeof i!=`function`&&(yd===null?yd=new Set([this]):yd.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Ec(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&ma(t,n,a,!0),n=Co.current,n!==null){switch(n.tag){case 31:case 13:case 19:return wo===null?qd():n.alternate===null&&od===0&&(od=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Wa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),gf(e,r,a)),!1;case 22:return n.flags|=65536,r===Wa?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),gf(e,r,a)),!1}throw Error(i(435,n.tag))}return gf(e,r,a),qd(),!1}if(Xi)return t=Co.current,t===null?(r!==$i&&(t=Error(i(423),{cause:r}),oa(Ni(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Ni(r,n),a=Cc(e.stateNode,r,a),fo(e,a),od!==4&&(od=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==$i&&(e=Error(i(422),{cause:r}),oa(Ni(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Ni(o,n),fd===null?fd=[o]:fd.push(o),od!==4&&(od=2),t===null)return!0;r=Ni(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Cc(n.stateNode,r,e),fo(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(yd===null||!yd.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=wc(a),Tc(a,e,n,r),fo(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Dc=Error(i(461)),Oc=!1;function kc(e,t,n,r){t.child=e===null?io(t,null,n,r):ro(t,e.child,n,r)}function Ac(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return ga(t),r=qo(e,t,n,o,a,i),s=Zo(),e!==null&&!Oc?(Qo(e,t,i),il(e,t,i)):(Xi&&s&&Gi(t),t.flags|=1,kc(e,t,r,i),t.child)}function jc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!wi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Mc(e,t,a,r,i)):(e=Di(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!al(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Nr:n,n(o,r)&&e.ref===t.ref)return il(e,t,i)}return t.flags|=1,e=Ti(a,r),e.ref=t.ref,e.return=t,t.child=e}function Mc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Nr(a,r)&&e.ref===t.ref){if(Oc=!1,t.pendingProps=r=a,al(e,i))e.flags&131072&&(Oc=!0);else return t.lanes=e.lanes,il(e,t,i)}}return Bc(e,t,n,r,i)}function Nc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return Fc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&za(t,a===null?null:a.cachePool),a===null?xo():bo(t,a),Do(t);else return r=t.lanes=536870912,Fc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&za(t,null),xo(),Oo()):(za(t,a.cachePool),bo(t,a),Oo(),t.memoizedState=null);return kc(e,t,i,n),t.child}function Pc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Fc(e,t,n,r,i){var a=Ra();return a=a===null?null:{parent:Ca._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&za(t,null),xo(),Do(t),e!==null&&ma(e,t,r,!0),t.childLanes=i,null}function Ic(e,t){return t=Yc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Lc(e,t,n){return ro(t,e.child,null,n),e=Ic(t,t.pendingProps),e.flags|=2,ko(t),t.memoizedState=null,e}function Rc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(Xi){if(r.mode===`hidden`)return e=Ic(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Pc(null,e);if(Eo(t),(e=Yi)?(e=lm(e,Qi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Bi===null?null:{id:Vi,overflow:Hi},retryLane:536870912,hydrationErrors:null},n=Ai(e),n.return=t,t.child=n,Ji=t,Yi=null)):e=null,e===null)throw ea(t);return t.lanes=536870912,null}return Ic(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Eo(t),a){if(t.flags&256)t.flags&=-257,t=Lc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(Oc||ma(e,t,n,!1),a=(n&e.childLanes)!==0,Oc||a){if(vo.current===null){if(r=Zu,r!==null&&(s=ot(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,vi(e,s),Fd(r,e,s),Dc;qd()}t=Lc(e,t,n)}else e=o.treeContext,Yi=pm(s.nextSibling),Ji=t,Xi=!0,Zi=null,Qi=!1,e!==null&&qi(t,e),t=Ic(t,r),t.flags|=134221824;return t}return e=Ti(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function zc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Bc(e,t,n,r,i){return ga(t),n=qo(e,t,n,r,void 0,i),r=Zo(),e!==null&&!Oc?(Qo(e,t,i),il(e,t,i)):(Xi&&r&&Gi(t),t.flags|=1,kc(e,t,n,i),t.child)}function Vc(e,t,n,r,i,a){return ga(t),t.updateQueue=null,n=Yo(t,r,n,i),Jo(e),r=Zo(),e!==null&&!Oc?(Qo(e,t,a),il(e,t,a)):(Xi&&r&&Gi(t),t.flags|=1,kc(e,t,n,a),t.child)}function Hc(e,t,n,r,i){if(ga(t),t.stateNode===null){var a=xi,o=n.contextType;typeof o==`object`&&o&&(a=_a(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=mc,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},oo(t),o=n.contextType,a.context=typeof o==`object`&&o?_a(o):xi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(pc(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&mc.enqueueReplaceState(a,a.state,null),ho(t,r,a,i),mo(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=_c(n,s);a.props=c;var l=a.context,u=n.contextType;o=xi,typeof u==`object`&&u&&(o=_a(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&gc(t,a,r,o),ao=!1;var f=t.memoizedState;a.state=f,ho(t,r,a,i),mo(),l=t.memoizedState,s||f!==l||ao?(typeof d==`function`&&(pc(t,n,d,r),l=t.memoizedState),(c=ao||hc(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,so(e,t),o=t.memoizedProps,u=_c(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=xi,typeof l==`object`&&l&&(c=_a(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&gc(t,a,r,c),ao=!1,f=t.memoizedState,a.state=f,ho(t,r,a,i),mo();var p=t.memoizedState;o!==d||f!==p||ao||e!==null&&e.dependencies!==null&&ha(e.dependencies)?(typeof s==`function`&&(pc(t,n,s,r),p=t.memoizedState),(u=ao||hc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&ha(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,zc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=ro(t,e.child,null,i),t.child=ro(t,null,n,i)):kc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=il(e,t,i),e}function Uc(e,t,n,r){return ia(),t.flags|=256,kc(e,t,n,r),t.child}var Wc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Gc(e){return{baseLanes:e,cachePool:Ba()}}function Kc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=ud),e}function qc(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(Ao.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(Xi){if(i?To(t):Oo(),(e=Yi)?(e=lm(e,Qi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Bi===null?null:{id:Vi,overflow:Hi},retryLane:536870912,hydrationErrors:null},n=Ai(e),n.return=t,t.child=n,Ji=t,Yi=null)):e=null,e===null)throw ea(t);return t.lanes=dm(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(Oo(),i=t.mode,a=Yc({mode:`hidden`,children:a},i),r=Oi(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=Gc(n),r.childLanes=Kc(e,o,n),t.memoizedState=Wc,Pc(null,r)):(To(t),Jc(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return Zc(e,t,a,o,r,c,s,n)}return i?(Oo(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=Ti(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=Oi(i,a,n,null),i.flags|=2):i=Ti(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,Pc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=Gc(n):(a=i.cachePool,a===null?a=Ba():(s=Ca._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=Kc(e,o,n),t.memoizedState=Wc,Pc(e.child,r)):(To(t),n=e.child,e=n.sibling,n=Ti(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function Jc(e,t){return t=Yc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Yc(e,t){return e=Ci(22,e,null,t),e.lanes=0,e}function Xc(e,t,n){return ro(t,e.child,null,n),e=Jc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Zc(e,t,n,r,a,o,s,c){if(n)return t.flags&256?(To(t),t.flags&=-257,Xc(e,t,c)):t.memoizedState===null?(Oo(),o=a.fallback,s=t.mode,a=Yc({mode:`visible`,children:a.children},s),o=Oi(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,ro(t,e.child,null,c),a=t.child,a.memoizedState=Gc(c),a.childLanes=Kc(e,r,c),t.memoizedState=Wc,Pc(null,a)):(Oo(),t.child=e.child,t.flags|=128,null);if(To(t),dm(o)){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,r!==``&&(a=Error(i(419)),a.stack=``,a.digest=r,oa({value:a,source:null,stack:null})),Xc(e,t,c)}if(Oc||ma(e,t,c,!1),r=(c&e.childLanes)!==0,Oc||r){if(vo.current!==null)return Xc(e,t,c);if(r=Zu,r!==null&&(a=ot(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,vi(e,a),Fd(r,e,a),Dc;return um(o)||qd(),Xc(e,t,c)}return um(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,Yi=pm(o.nextSibling),Ji=t,Xi=!0,Zi=null,Qi=!1,e!==null&&qi(t,e),t=Jc(t,a.children),t.flags|=134221824,t)}function Qc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),fa(e.return,t,n)}function $c(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&No(n)===null&&(t=e),e=e.sibling}return t}function el(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function tl(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function nl(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Ao.current;if(t.flags&128)return jo(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,jo(t,o),i===`backwards`&&e!==null?(tl(e),kc(e,t,r,n),tl(e)):kc(e,t,r,n),r=Xi?Li:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Qc(e,n,t);else if(e.tag===19)Qc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`backwards`:n=$c(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,tl(t)),el(t,!0,i,null,a,r);break;case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&No(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}el(t,!0,n,null,a,r);break;case`together`:el(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=$c(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),el(t,!1,i,n,a,r)}return t.child}function rl(e,t,n){var r=t.pendingProps;return ua(t,t.type,r.value),kc(e,t,r.children,n),t.child}function il(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),sd|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(ma(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=Ti(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ti(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function al(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&ha(e)))}function ol(e,t,n){switch(t.tag){case 3:ge(t,t.stateNode.containerInfo),ua(t,Ca,e.memoizedState.cache),ia();break;case 27:case 5:ve(t);break;case 4:ge(t,t.stateNode.containerInfo);break;case 10:ua(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Eo(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return To(t),t.flags|=128,null;r=ma(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?qc(e,t,n):(To(t),e=il(e,t,n),e===null?null:e.sibling)}To(t);break;case 19:if(t.flags&128)return nl(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(ma(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return nl(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),jo(t,Ao.current),r)break;return null;case 22:return t.lanes=0,Nc(e,t,n,t.pendingProps);case 24:ua(t,Ca,e.memoizedState.cache)}return il(e,t,n)}function sl(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)Oc=!0;else{if(!al(e,n)&&!(t.flags&128))return Oc=!1,ol(e,t,n);Oc=!!(e.flags&131072)}}else Oc=!1,Xi&&t.flags&1048576&&Wi(t,Li,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=qa(t.elementType),t.type=e,typeof e==`function`)wi(e)?(r=_c(e,r),t.tag=1,t=Hc(null,t,e,r,n)):(t.tag=0,t=Bc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===N){t.tag=11,t=Ac(null,t,e,r,n);break a}if(a===F){t.tag=14,t=jc(null,t,e,r,n);break a}if(a===M){t.tag=10,t.type=e,t=rl(null,t,n);break a}}throw t=ae(e)||e,Error(i(306,t,``))}}return t;case 0:return Bc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=_c(r,t.pendingProps),Hc(e,t,r,a,n);case 3:a:{if(ge(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,so(e,t),ho(t,r,null,n);var s=t.memoizedState;if(r=s.cache,ua(t,Ca,r),r!==o.cache&&pa(t,[Ca],n,!0),mo(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Uc(e,t,r,n);break a}if(r!==a){a=Ni(Error(i(424)),t),oa(a),t=Uc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Yi=pm(e.firstChild),Ji=t,Xi=!0,Zi=null,Qi=!0,n=io(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(ia(),r===a){t=il(e,t,n);break a}kc(e,t,r,n)}t=t.child}return t;case 26:return zc(e,t),e===null?(n=Lm(t.type,null,t.pendingProps,null))?t.memoizedState=n:Xi||(t.stateNode=gp(t.type,t.pendingProps,me.current,t)):t.memoizedState=Lm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ve(t),e===null&&Xi&&(r=t.stateNode=ym(t.type,t.pendingProps,me.current),Ji=t,Qi=!0,a=Yi,Ep(t.type)?(mm=a,Yi=pm(r.firstChild)):Yi=a),kc(e,t,t.pendingProps.children,n),zc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Xi&&((a=r=Yi)&&(r=sm(r,t.type,t.pendingProps,Qi),r===null?a=!1:(t.stateNode=r,Ji=t,Yi=pm(r.firstChild),Qi=!1,a=!0)),a||ea(t)),ve(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,_p(a,o)?r=null:s!==null&&_p(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=qo(e,t,Xo,null,null,n),dh._currentValue=a),zc(e,t),kc(e,t,r,n),t.child;case 6:return e===null&&Xi&&((e=n=Yi)&&(n=cm(n,t.pendingProps,Qi),n===null?e=!1:(t.stateNode=n,Ji=t,Yi=null,e=!0)),e||ea(t)),null;case 13:return qc(e,t,n);case 4:return ge(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ro(t,null,r,n):kc(e,t,r,n),t.child;case 11:return Ac(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,zc(e,t),kc(e,t,r,n),t.child;case 8:return kc(e,t,t.pendingProps.children,n),t.child;case 12:return kc(e,t,t.pendingProps.children,n),t.child;case 10:return rl(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,ga(t),a=_a(a),r=r(a),t.flags|=1,kc(e,t,r,n),t.child;case 14:return jc(e,t,t.type,t.pendingProps,n);case 15:return Mc(e,t,t.type,t.pendingProps,n);case 19:return nl(e,t,n);case 31:return Rc(e,t,n);case 22:return Nc(e,t,n,t.pendingProps);case 24:return ga(t),r=_a(Ca),e===null?(a=Ra(),a===null&&(a=Zu,o=wa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},oo(t),ua(t,Ca,a)):((e.lanes&n)!==0&&(so(e,t),ho(t,null,null,n),mo()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,ua(t,Ca,r),r!==a.cache&&pa(t,[Ca],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),ua(t,Ca,r))),kc(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=t.pendingProps,r.name!=null&&r.name!==`auto`?t.flags|=e===null?18882560:18874368:Xi&&Gi(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:zc(e,t),kc(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function cl(e){e.flags|=4}function ll(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?Qm(t,r):Qm(t,r)&&(r.src!==n.src||r.srcSet!==n.srcSet)),a){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Wd())e.flags|=8192;else throw Ja=Wa,Ha}}else e.flags&=-16777217}function ul(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!$m(t)){if(Wd())e.flags|=8192;else throw Ja=Wa,Ha}}function dl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:$e(),e.lanes|=t,dd|=t)}function fl(e,t){if(!Xi)switch(e.tailMode){case`visible`:break;case`collapsed`:for(var n=e.tail,r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function pl(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&1206910976,r|=i.flags&1206910976,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function ml(e,t,n){var r=t.pendingProps;switch(Ki(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return pl(t),null;case 1:return pl(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),da(Ca),_e(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ra(t)?cl(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,aa())),pl(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(cl(t),o===null?(pl(t),ll(t,a,null,r,n)):(pl(t),ul(t,o))):o?o===e.memoizedState?(pl(t),t.flags&=-16777217):(cl(t),pl(t),ul(t,o)):(e=e.memoizedProps,e!==r&&cl(t),pl(t),ll(t,a,e,r,n)),null;case 27:if(ye(t),n=me.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&cl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return pl(t),t.subtreeFlags&=-33554433,null}e=fe.current,ra(t)?ta(t,e):(e=ym(a,r,n),t.stateNode=e,cl(t))}return pl(t),t.subtreeFlags&=-33554433,null;case 5:if(ye(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&cl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return pl(t),t.subtreeFlags&=-33554433,null}if(o=fe.current,ra(t))ta(t,o);else{var s=pp(me.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[q]=t,o[J]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(op(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&cl(t)}}return pl(t),t.subtreeFlags&=-33554433,ll(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&cl(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=me.current,ra(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Ji,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[q]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||rp(e.nodeValue,n)),e||ea(t,!0)}else e=pp(e).createTextNode(r),e[q]=t,t.stateNode=e}return pl(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=ra(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[q]=t}else ia(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;pl(t),e=!1}else n=aa(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(ko(t),t):(ko(t),null);if(t.flags&128)throw Error(i(558))}return pl(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=ra(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[q]=t}else ia(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;pl(t),a=!1}else a=aa(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(ko(t),t):(ko(t),null)}return ko(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),dl(t,t.updateQueue),pl(t),null);case 4:return _e(),e===null&&qf(t.stateNode.containerInfo),t.flags|=67108864,pl(t),null;case 10:return da(t.type),pl(t),null;case 19:if(Mo(t),r=t.memoizedState,r===null)return pl(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)fl(r,!1);else{if(od!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=No(e),o!==null){for(t.flags|=128,fl(r,!1),e=o.updateQueue,t.updateQueue=e,dl(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Ei(n,e),n=n.sibling;return jo(t,Ao.current&1|2),Xi&&Ui(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&je()>_d&&(t.flags|=128,a=!0,fl(r,!1),t.lanes=4194304)}}else{if(!a){if(e=No(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,dl(t,e),fl(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!Xi)return pl(t),null}else 2*je()-r.renderingStartTime>_d&&n!==536870912&&(t.flags|=128,a=!0,fl(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=je(),e.sibling=null,o=Ao.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||Xi?jo(t,o):(n=o,de(Co,t),de(Ao,n),wo===null&&(wo=t)),Xi&&Ui(t,r.treeForkCount),e}return pl(t),null;case 22:case 23:return ko(t),So(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(pl(t),t.subtreeFlags&6&&(t.flags|=8192)):pl(t),n=t.updateQueue,n!==null&&dl(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&ue(La),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),da(Ca),pl(t),null;case 25:return null;case 30:return t.flags|=33554432,pl(t),null}throw Error(i(156,t.tag))}function hl(e,t){switch(Ki(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return da(Ca),_e(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ye(t),null;case 31:if(t.memoizedState!==null){if(ko(t),t.alternate===null)throw Error(i(340));ia()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ko(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));ia()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Mo(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return _e(),null;case 10:return da(t.type),null;case 22:case 23:return ko(t),So(),e!==null&&ue(La),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return da(Ca),null;case 25:return null;default:return null}}function gl(e,t){switch(Ki(t),t.tag){case 3:da(Ca),_e();break;case 26:case 27:case 5:ye(t);break;case 4:_e();break;case 31:t.memoizedState!==null&&ko(t);break;case 13:ko(t);break;case 19:Mo(t);break;case 10:da(t.type);break;case 22:case 23:ko(t),So(),e!==null&&ue(La);break;case 24:da(Ca)}}function _l(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){hf(t,t.return,e)}}function vl(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){hf(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){hf(t,t.return,e)}}function yl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{_o(t,n)}catch(t){hf(e,e.return,t)}}}function bl(e,t,n){n.props=_c(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){hf(e,t,n)}}function xl(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:var i=e.stateNode,a=ci(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Rp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new zp(e);f(e.child,!1,nm,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){hf(e,t,n)}}function Sl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){hf(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){hf(e,t,n)}else n.current=null}}function Cl(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)im(e.stateNode,t[n])}function wl(e){for(var t=e.return;t!==null&&(El(t)&&im(e.stateNode,t.stateNode),!Tl(t));)t=t.return}function Y(e){for(var t=e.return;t!==null&&(El(t)&&am(e.stateNode,t.stateNode),!Tl(t));)t=t.return}function Tl(e){return e.tag===5||e.tag===3||e.tag===27}function El(e){return e&&e.tag===7&&e.stateNode!==null}function Dl(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){hf(e,e.return,t)}}function Ol(e,t,n){try{var r=e.stateNode;cp(r,e.type,n,t),r[J]=t}catch(t){hf(e,e.return,t)}}function kl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ep(e.type)||e.tag===4}function Al(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||kl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Ep(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function jl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(i,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(i),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ln)),Cl(e,r),It=!0;else if(i!==4&&(i===27&&(Cl(e,r),r=null,Ep(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(jl(e,t,n,r),e=e.sibling;e!==null;)jl(e,t,n,r),e=e.sibling}function Ml(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),Cl(e,r),It=!0;else if(i!==4&&(i===27&&(Cl(e,r),r=null,Ep(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Ml(e,t,n,r),e=e.sibling;e!==null;)Ml(e,t,n,r),e=e.sibling}function Nl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);op(t,r,n),t[q]=e,t[J]=n}catch(t){hf(e,e.return,t)}}var Pl=!1,Fl=null;function Il(e){(e.tag===30||e.subtreeFlags&33554432)&&(Pl=!0)}var Ll=null;function Rl(){var e=Ll;return Ll=null,e}var zl=0;function Bl(e,t,n,r,i){return zl=0,Vl(e.child,t,n,r,i)}function Vl(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=Mp(o);r.push(s),s.view&&(a=!0)}else a||Mp(o).view&&(a=!0);Pl=!0,kp(o,zl===0?t:t+`_`+zl,n),zl++}else e.tag===22&&e.memoizedState!==null||e.tag===30&&i||Vl(e.child,t,n,r,i)&&(a=!0);e=e.sibling}return a}function Hl(e,t){for(;e!==null;)e.tag===5?Ap(e.stateNode,e.memoizedProps):e.tag===22&&e.memoizedState!==null||e.tag===30&&t||Hl(e.child,t),e=e.sibling}function Ul(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Ul(e),e.tag===30&&e.flags&18874368&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name===`auto`)throw Error(i(544));var n=t.name;t=ui(t.default,t.share),t!==`none`&&(Bl(e,n,t,null,!1)||Hl(e.child,!1))}e=e.sibling}}function Wl(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=ci(r,n),a=ui(r.default,n.paired?r.share:r.enter);a===`none`?Ul(e):Bl(e,i,a,null,!1)?(Ul(e),n.paired||t||Pd(e,r.onEnter)):Hl(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Wl(e,t),e=e.sibling;else Ul(e)}function Gl(e){if(Fl!==null&&Fl.size!==0){var t=Fl;if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var n=e.memoizedProps,r=n.name;if(r!=null&&r!==`auto`){var i=t.get(r);if(i!==void 0){var a=ui(n.default,n.share);if(a!==`none`&&(Bl(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,Pd(e,n.onShare)):Hl(e.child,!1)),t.delete(r),t.size===0)break}}}Gl(e)}e=e.sibling}}}function Kl(e){if(e.tag===30){var t=e.memoizedProps,n=ci(t,e.stateNode),r=Fl===null?void 0:Fl.get(n),i=ui(t.default,r===void 0?t.exit:t.share);i!==`none`&&(Bl(e,n,i,null,!1)?r===void 0?Pd(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,Fl.delete(n),Pd(e,t.onShare)):Hl(e.child,!1)),Fl!==null&&Gl(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Kl(e),e=e.sibling;else Fl!==null&&Gl(e)}function ql(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=ci(t,e.stateNode);t=ui(t.default,t.update),e.flags&=-5,t!==`none`&&Bl(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&ql(e);e=e.sibling}}function Jl(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var t=e.stateNode;t.paired!==null&&(t.paired=null,Hl(e.child,!1))}Jl(e)}e=e.sibling}}function Yl(e){if(e.tag===30)e.stateNode.paired=null,Hl(e.child,!1),Jl(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Yl(e),e=e.sibling;else Jl(e)}function Xl(e){for(e=e.child;e!==null;)e.tag===30?Hl(e.child,!1):e.subtreeFlags&33554432&&Xl(e),e=e.sibling}function Zl(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&zl<a.length){var l=a[zl],u=Mp(c);(l.view||u.view)&&(s=!0);var d;if(d=!(e.flags&4)){if(u.clip)d=!0;else{d=l.rect;var f=u.rect;d=d.y!==f.y||d.x!==f.x||d.height!==f.height||d.width!==f.width}}d&&(e.flags|=4),u.abs?u=!l.abs:(l=l.rect,u=u.rect,u=l.height!==u.height||l.width!==u.width),u&&(e.flags|=32)}else e.flags|=32;e.flags&4&&kp(c,zl===0?n:n+`_`+zl,i),s&&e.flags&4||(Ll===null&&(Ll=[]),Ll.push(c,zl===0?r:r+`_`+zl,t.memoizedProps)),zl++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:Zl(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function Ql(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=ci(n,r),a=ui(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(Np)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;zl=0,i=Zl(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||Pd(e,n.onUpdate))}else e.subtreeFlags&33554432&&Ql(e,t);e=e.sibling}}var $l=!1,eu=!1,tu=!1,nu=!1,ru=typeof WeakSet==`function`?WeakSet:Set,iu=null,au=!1,ou=!1,su=!1,cu=!1;function lu(e,t,n){if(e=e.containerInfo,dp=bh,e=Rr(e),zr(e)){if(`selectionStart`in e)var r={start:e.selectionStart,end:e.selectionEnd};else a:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==r||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===r&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}r=c===-1||l===-1?null:{start:c,end:l}}else r=null}r||={start:0,end:0}}else r=null;for(fp={focusedElem:e,selectionRange:r},bh=!1,n=(n&335544064)===n,iu=t,t=n?9270:1024;iu!==null;){if(e=iu,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&Kl(r[a]);if(e.alternate===null&&e.flags&2)n&&Il(e),uu(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&Kl(r),uu(n);continue}if(r!==null&&r.memoizedState!==null){n&&Il(e),uu(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,iu=r):(n&&ql(e),uu(n))}}Fl=null}function uu(e){for(;iu!==null;){var t=iu,n=e,r=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(a&1024&&r!==null){n=void 0,a=r.memoizedProps,r=r.memoizedState;var o=t.stateNode;try{var s=_c(t.type,a);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){hf(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)om(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:om(r);break;default:r.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&r!==null&&(n=ci(r.memoizedProps,r.stateNode),a=t.memoizedProps,a=ui(a.default,a.update),a!==`none`&&Bl(r,n,a,r.memoizedState=[],!0));break;default:if(a&1024)throw Error(i(163))}if(r=t.sibling,r!==null){r.return=t.return,iu=r;break}iu=t.return}}function du(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:ju(e,n),r&4&&_l(5,n);break;case 1:if(ju(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){hf(n,n.return,e)}else{var i=_c(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){hf(n,n.return,e)}}}r&64&&yl(n),r&512&&xl(n,n.return);break;case 3:if(ju(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{_o(e,t)}catch(e){hf(n,n.return,e)}}break;case 27:t===null&&r&4&&Nl(n);case 26:case 5:ju(e,n),t===null&&r&4&&Dl(n),r&512&&xl(n,n.return);break;case 12:ju(e,n);break;case 31:ju(e,n),r&4&&bu(e,n);break;case 13:ju(e,n),r&4&&xu(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=yf.bind(null,n),fm(e,n))));break;case 22:if(r=n.memoizedState!==null||$l,!r){var a=t!==null&&t.memoizedState!==null||eu;t=$l,i=eu,$l=r,(eu=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),Nu(e,n,r)):ju(e,n),$l=t,eu=i}break;case 30:ju(e,n),r&512&&xl(n,n.return);break;case 7:r&512&&xl(n,n.return);default:ju(e,n)}}function fu(e,t){for(e=e.child;e!==null;)pu(e,t),e=e.sibling}function pu(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var r=n.style;typeof r.setProperty==`function`?r.setProperty(`display`,`none`,`important`):r.display=`none`}else{var i=e.stateNode,a=e.memoizedProps.style,o=a!=null&&a.hasOwnProperty(`display`)?a.display:null;i.style.display=o==null||typeof o==`boolean`?``:(``+o).trim()}}catch(t){hf(e,e.return,t)}mu(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,It=!0}catch(t){hf(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?Op(s,!0):Op(e.stateNode,!1)}catch(t){hf(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&fu(e,t);break;default:fu(e,t)}}function mu(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:pu(n,r);break a;case 22:n.memoizedState===null&&mu(n,r);break a;default:mu(n,r)}}e=e.sibling}}function hu(e){var t=e.alternate;t!==null&&(e.alternate=null,hu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&xt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var gu=null,_u=!1;function vu(e,t,n){for(n=n.child;n!==null;)yu(e,t,n),n=n.sibling}function yu(e,t,n){if(Ve&&typeof Ve.onCommitFiberUnmount==`function`)try{Ve.onCommitFiberUnmount(Be,n)}catch{}switch(n.tag){case 26:eu||Sl(n,t),vu(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!eu&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:eu||Sl(n,t),Y(n);var r=gu,i=_u;Ep(n.type)&&(gu=n.stateNode,_u=!1),vu(e,t,n),bm(n.stateNode,n.type,n.memoizedProps),gu=r,_u=i;break;case 5:eu||Sl(n,t),Y(n);case 6:if(n.tag===6&&Y(n),r=gu,i=_u,gu=null,vu(e,t,n),gu=r,_u=i,gu!==null){if(_u)try{(gu.nodeType===9?gu.body:gu.nodeName===`HTML`?gu.ownerDocument.body:gu).removeChild(n.stateNode),It=!0}catch(e){hf(n,t,e)}else try{gu.removeChild(n.stateNode),It=!0}catch(e){hf(n,t,e)}}break;case 18:gu!==null&&(_u?(e=gu,Dp(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Kh(e)):Dp(gu,n.stateNode));break;case 4:r=gu,i=_u,gu=n.stateNode.containerInfo,_u=!0,vu(e,t,n),gu=r,_u=i;break;case 0:case 11:case 14:case 15:vl(2,n,t),eu||vl(4,n,t),vu(e,t,n);break;case 1:eu||(Sl(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&bl(n,t,r)),vu(e,t,n);break;case 21:vu(e,t,n);break;case 22:eu=(r=eu)||n.memoizedState!==null,vu(e,t,n),eu=r;break;case 30:Sl(n,t),vu(e,t,n);break;case 7:eu||Sl(n,t),vu(e,t,n);break;default:vu(e,t,n)}}function bu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Kh(e)}catch(e){hf(t,t.return,e)}}}function xu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Kh(e)}catch(e){hf(t,t.return,e)}}function Su(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ru),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ru),t;default:throw Error(i(435,e.tag))}}function Cu(e,t){var n=Su(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=bf.bind(null,e,t);t.then(r,r)}})}function wu(e,t,n){var r=t.deletions;if(r!==null)for(var a=0;a<r.length;a++){var o=r[a],s=e,c=t,l=c;a:for(;l!==null;){switch(l.tag){case 27:if(Ep(l.type)){gu=l.stateNode,_u=!1;break a}break;case 5:gu=l.stateNode,_u=!1;break a;case 3:case 4:gu=l.stateNode.containerInfo,_u=!0;break a}l=l.return}if(gu===null)throw Error(i(160));yu(s,c,o),gu=null,_u=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Eu(t,e,n),t=t.sibling}var Tu=null;function Eu(e,t,n){var r=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(a&4&&(r=e.updateQueue,r=r===null?null:r.events,r!==null))for(var o=0;o<r.length;o++){var s=r[o];s.ref.impl=s.nextImpl}wu(t,e,n),Du(e),a&4&&(vl(3,e,e.return),_l(3,e),vl(5,e,e.return));break;case 1:wu(t,e,n),Du(e),a&512&&(eu||r===null||Sl(r,r.return)),a&64&&$l&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(o=Tu,wu(t,e,n),Du(e),a&512&&(eu||r===null||Sl(r,r.return)),a&4){if(a=r===null?null:r.memoizedState,n=e.memoizedState,r===null){if(n===null){if(e.stateNode===null){if($l)e.stateNode=gp(e.type,e.memoizedProps,t.containerInfo,e);else{a:{t=e.type,n=e.memoizedProps,a=o.ownerDocument||o;b:switch(t){case`title`:r=a.getElementsByTagName(`title`)[0],(!r||r[yt]||r[q]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),op(r,t,n),r[q]=e,Et(r),t=r;break a;case`link`:if(o=Ym(`link`,`href`,a).get(t+(n.href||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&r.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&r.getAttribute(`title`)===(n.title==null?null:n.title)&&r.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(s,1);break b}}r=a.createElement(t),op(r,t,n),a.head.appendChild(r);break;case`meta`:if(o=Ym(`meta`,`content`,a).get(t+(n.content||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`content`)===(n.content==null?null:``+n.content)&&r.getAttribute(`name`)===(n.name==null?null:n.name)&&r.getAttribute(`property`)===(n.property==null?null:n.property)&&r.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){o.splice(s,1);break b}}r=a.createElement(t),op(r,t,n),a.head.appendChild(r);break;default:throw Error(i(468,t))}r[q]=e,Et(r),t=r}e.stateNode=t}}else $l||Xm(o,e.type,e.stateNode)}else e.stateNode=Wm(o,n,e.memoizedProps)}else a===n?n===null&&e.stateNode!==null&&Ol(e,e.memoizedProps,r.memoizedProps):(a===null?(t=r.stateNode,t===null||eu||t.parentNode.removeChild(t)):a.count--,n===null?$l||Xm(o,e.type,e.stateNode):Wm(o,n,e.memoizedProps))}break;case 27:wu(t,e,n),Du(e),a&512&&(eu||r===null||Sl(r,r.return)),r!==null&&a&4&&Ol(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=tu,tu=!1,wu(t,e,n),tu=o,Du(e),a&512&&(eu||r===null||Sl(r,r.return)),e.flags&32){t=e.stateNode;try{en(t,``),It=!0}catch(t){hf(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,Ol(e,t,r===null?t:r.memoizedProps)),a&1024&&(nu=!0);break;case 6:if(wu(t,e,n),Du(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,It=!0}catch(t){hf(e,e.return,t)}}break;case 3:if(It=!1,Jm=null,o=Tu,Tu=wm(t.containerInfo),wu(t,e,n),Tu=o,Du(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{Kh(t.containerInfo)}catch(t){hf(e,e.return,t)}nu&&(nu=!1,Ou(e)),It=!1;break;case 4:a=tu,tu=$l,r=Lt(),o=Tu,Tu=wm(e.stateNode.containerInfo),wu(t,e,n),Du(e),Tu=o,It&&ou&&(su=!0),It=r,tu=a;break;case 12:wu(t,e,n),Du(e);break;case 31:wu(t,e,n),Du(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Cu(e,t)));break;case 13:wu(t,e,n),Du(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(hd=je()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Cu(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=$l,l=eu,u=tu;$l=c||o,tu=u||o,eu=l||s,wu(t,e,n),eu=l,tu=u,$l=c,Du(e),a&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||$l||eu||(t=s||eu,n=$l,r=eu,$l=o||$l,eu=t,Mu(e,2),$l=n,eu=r),!o&&tu||fu(e,o)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,Cu(e,n))));break;case 19:wu(t,e,n),Du(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Cu(e,t)));break;case 30:a&512&&(eu||r===null||Sl(r,r.return)),a=Lt(),o=ou,s=(n&335544064)===n,c=e.memoizedProps,ou=s&&ui(c.default,c.update)!==`none`,wu(t,e,n),Du(e),s&&r!==null&&It&&(e.flags|=4),ou=o,It=a;break;case 21:break;case 7:a&512&&(eu||r===null||Sl(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:wu(t,e,n),Du(e)}}function Du(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(kl(r)){n=r;break}r=r.return}r=null;for(var a=e.return;a!==null;){if(El(a)){var o=a.stateNode;r===null?r=[o]:r.push(o)}if(Tl(a))break;a=a.return}var s=r;if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode;Ml(e,Al(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(en(l,``),n.flags&=-33),Ml(e,Al(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;jl(e,Al(e),u,s);break;default:throw Error(i(161))}}catch(t){hf(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Ou(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Ou(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,bh=!0,t.reset(),bh=!1),e=e.sibling}}function ku(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Au(t,e),t=t.sibling;else Ql(t,!1)}function Au(e,t){var n=e.alternate;if(n===null)Wl(e,!1);else switch(e.tag){case 3:if(cu=au=!1,Rl(),ku(t,e),!au&&!su){if(e=Ll,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];Ap(n,e[r+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(`+i+`)`})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===``&&(e.style.viewTransitionName=`none`,e.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(root)`}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition`})),cu=!0}Ll=null;break;case 5:ku(t,e);break;case 4:r=au,au=!1,ku(t,e),au&&(su=!0),au=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?ku(t,e):Wl(e,!1));break;case 30:r=au,i=Rl(),au=!1,ku(t,e),au&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=ci(a,o),o=ci(n.memoizedProps,o);var s=ui(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,zl=0,t=Zl(e,n,t,o,s,a,!0),zl!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(Pd(e,e.memoizedProps.onUpdate),Ll=i):i!==null&&(i.push.apply(i,Ll),Ll=i),au=e.flags&32?!0:r;break;default:ku(t,e)}}function ju(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)du(e,t.alternate,t),t=t.sibling}function Mu(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:vl(4,n,n.return),Mu(n,r);break;case 1:Sl(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&bl(n,n.return,i),Mu(n,r);break;case 27:r&2&&bm(n.stateNode,n.type,n.memoizedProps);case 5:Sl(n,n.return),n.tag!==5&&n.tag!==27||Y(n),Mu(n,r);break;case 6:Y(n);break;case 26:Sl(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||eu||i.parentNode.removeChild(i),Mu(n,r);break;case 22:n.memoizedState===null&&Mu(n,r);break;case 30:Sl(n,n.return),Mu(n,r);break;case 7:Sl(n,n.return);default:Mu(n,r)}e=e.sibling}}function Nu(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags,s=!!(n&1);switch(a.tag){case 0:case 11:case 15:Nu(i,a,n),_l(4,a);break;case 1:if(Nu(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){hf(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var c=r.stateNode;try{var l=i.shared.hiddenCallbacks;if(l!==null)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)go(l[i],c)}catch(e){hf(r,r.return,e)}}s&&o&64&&yl(a),xl(a,a.return);break;case 27:n&2&&Nl(a);case 5:a.tag!==5&&a.tag!==27||wl(a),Nu(i,a,n),s&&r===null&&o&4&&Dl(a),xl(a,a.return);break;case 6:wl(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||$l||Xm(wm(c.ownerDocument),a.type,c),Nu(i,a,n),s&&r===null&&o&4&&Dl(a),xl(a,a.return);break;case 12:Nu(i,a,n);break;case 31:Nu(i,a,n),s&&o&4&&bu(i,a);break;case 13:Nu(i,a,n),s&&o&4&&xu(i,a);break;case 22:a.memoizedState===null&&Nu(i,a,n),xl(a,a.return);break;case 30:Nu(i,a,n),xl(a,a.return);break;case 7:xl(a,a.return);default:Nu(i,a,n)}t=t.sibling}}function Pu(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Ta(n))}function Fu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ta(e))}function Iu(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)Lu(e,t,n,r),t=t.sibling;else i&&Xl(t)}function Lu(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&Yl(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:Iu(e,t,n,r),a&2048&&_l(9,t);break;case 1:Iu(e,t,n,r);break;case 3:Iu(e,t,n,r),i&&cu&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,e.style.viewTransitionName===`root`&&(e.style.viewTransitionName=``),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===`none`&&(e.style.viewTransitionName=``)),a&2048&&(a=null,t.alternate!==null&&(a=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==a&&(t.refCount++,a!=null&&Ta(a)));break;case 12:if(a&2048){Iu(e,t,n,r),a=t.stateNode;try{var o=t.memoizedProps,s=o.id,c=o.onPostCommit;typeof c==`function`&&c(s,t.alternate===null?`mount`:`update`,a.passiveEffectDuration,-0)}catch(e){hf(t,t.return,e)}}else Iu(e,t,n,r);break;case 31:Iu(e,t,n,r);break;case 13:Iu(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,s=t.alternate,t.memoizedState===null?(i&&s!==null&&s.memoizedState!==null&&Yl(t),o._visibility&2?Iu(e,t,n,r):(o._visibility|=2,Ru(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&Yl(s),o._visibility&2?Iu(e,t,n,r):zu(e,t)),a&2048&&Pu(s,t);break;case 24:Iu(e,t,n,r),a&2048&&Fu(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(Hl(a.child,!0),Hl(t.child,!0))),Iu(e,t,n,r);break;default:Iu(e,t,n,r)}}function Ru(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Ru(a,o,s,c,i),_l(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Ru(a,o,s,c,i)):u._visibility&2?Ru(a,o,s,c,i):zu(a,o),i&&l&2048&&Pu(o.alternate,o);break;case 24:Ru(a,o,s,c,i),i&&l&2048&&Fu(o.alternate,o);break;default:Ru(a,o,s,c,i)}t=t.sibling}}function zu(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:zu(n,r),i&2048&&Pu(r.alternate,r);break;case 24:zu(n,r),i&2048&&Fu(r.alternate,r);break;default:zu(n,r)}t=t.sibling}}var Bu=8192;function Vu(e,t,n){if(e.subtreeFlags&Bu)for(e=e.child;e!==null;)Hu(e,t,n),e=e.sibling}function Hu(e,t,n){switch(e.tag){case 26:Vu(e,t,n),e.flags&Bu&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&th(n,e)):nh(n,Tu,e.memoizedState,e.memoizedProps));break;case 5:Vu(e,t,n),e.flags&Bu&&(e=e.stateNode,(t&335544128)===t&&th(n,e));break;case 3:case 4:var r=Tu;Tu=wm(e.stateNode.containerInfo),Vu(e,t,n),Tu=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Bu,Bu=16777216,Vu(e,t,n),Bu=r):Vu(e,t,n));break;case 30:if((e.flags&Bu)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,Fl===null&&(Fl=new Map),Fl.set(r,i)}Vu(e,t,n);break;default:Vu(e,t,n)}}function Uu(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Wu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];iu=r,qu(r,e)}Uu(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Gu(e),e=e.sibling}function Gu(e){switch(e.tag){case 0:case 11:case 15:Wu(e),e.flags&2048&&vl(9,e,e.return);break;case 3:Wu(e);break;case 12:Wu(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ku(e)):Wu(e);break;default:Wu(e)}}function Ku(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];iu=r,qu(r,e)}Uu(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:vl(8,t,t.return),Ku(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Ku(t));break;default:Ku(t)}e=e.sibling}}function qu(e,t){for(;iu!==null;){var n=iu;switch(n.tag){case 0:case 11:case 15:vl(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Ta(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,iu=r;else a:for(n=e;iu!==null;){r=iu;var i=r.sibling,a=r.return;if(hu(r),r===n){iu=null;break a}if(i!==null){i.return=a,iu=i;break a}iu=a}}}var Ju={getCacheForType:function(e){var t=_a(Ca),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return _a(Ca).controller.signal}},Yu=typeof WeakMap==`function`?WeakMap:Map,Xu=0,Zu=null,Qu=null,$u=0,ed=0,td=null,nd=!1,rd=!1,id=!1,ad=0,od=0,sd=0,cd=0,ld=0,ud=0,dd=0,fd=null,pd=null,md=!1,hd=0,gd=0,_d=1/0,vd=null,yd=null,bd=0,xd=null,Sd=null,Cd=0,wd=0,Td=null,Ed=null,Dd=null,Od=null,kd=null,Ad=0,jd=null;function Md(){return Xu&2&&$u!==0?$u&-$u:V.T===null?dt():If()}function Nd(){if(ud===0){if(!($u&536870912)||Xi){var e=K;K<<=1,!(K&3932160)&&(K=262144),ud=e}else ud=536870912}return e=Co.current,e!==null&&(e.flags|=32),ud}function Pd(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=Rp(ci(e.memoizedProps,n))),Od===null&&(Od=[]),Od.push(t.bind(null,r))}}function Fd(e,t,n){(e===Zu&&(ed===2||ed===9)||e.cancelPendingCommit!==null)&&(Hd(e,0),zd(e,$u,ud,!1)),tt(e,n),Xu&2&&e===Zu||(e===Zu&&(!(Xu&2)&&(cd|=n),od===4&&zd(e,$u,ud,!1)),Of(e))}function Id(e,t,n){if(Xu&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||Xe(e,t),a=r?Xd(e,t):Jd(e,t,!0),o=r;do{if(a===0){rd&&!r&&zd(e,t,0,!1);break}if(n=e.current.alternate,o&&!Rd(n))a=Jd(e,t,!1),o=!1;else{if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=fd;var l=c.current.memoizedState.isDehydrated;if(l&&(Hd(c,s).flags|=256),s=Jd(c,s,!1),s!==2&&s!==6){if(id&&!l){c.errorRecoveryDisabledLanes|=o,cd|=o,a=4;break a}o=pd,pd=a,o!==null&&(pd===null?pd=o:pd.push.apply(pd,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Hd(e,0),zd(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:zd(r,t,ud,!nd);break a;case 2:pd=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=hd+300-je(),10<a)){if(zd(r,t,ud,!nd),Ye(r,0,!0)!==0)break a;Cd=t,r.timeoutHandle=bp(Ld.bind(null,r,n,pd,vd,md,t,ud,cd,dd,nd,o,`Throttled`,-0,0),a);break a}Ld(r,n,pd,vd,md,t,ud,cd,dd,nd,o,null,-0,0)}break}}while(1);Of(e)}function Ld(e,t,n,r,i,a,o,s,c,l,u,d,f,p){e.timeoutHandle=-1;var m=t.subtreeFlags,h=(a&335544064)===a;d=null,(h||m&8192||(m&16785408)==16785408)&&(d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ln},Fl=null,Hu(t,a,d),h&&(m=d,h=e.containerInfo,h=(h.nodeType===9?h:h.ownerDocument).__reactViewTransition,h!=null&&(m.count++,m.waitingForViewTransition=!0,m=oh.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?hd-je():(a&4194048)===a?gd-je():0,m=ih(d,m),m!==null)?(Cd=a,e.cancelPendingCommit=m(rf.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),zd(e,a,o,!l)):rf(e,t,a,n,r,i,o,s,c,l,u,d)}function Rd(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Mr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function zd(e,t,n,r){t=Ze(e,t),t&=~ld,t&=~cd,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-G(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&rt(e,n,t)}function Bd(){return Xu&6?!0:(kf(0,!1),!1)}function Vd(){if(Qu!==null){if(ed===0)var e=Qu.return;else e=Qu,la=ca=null,$o(e),Za=null,Qa=0,e=Qu;for(;e!==null;)gl(e.alternate,e),e=e.return;Qu=null}}function Hd(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,xp(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Cd=0,Vd(),Zu=e,Qu=n=Ti(e.current,null),$u=t,ed=0,td=null,nd=!1,rd=Xe(e,t),id=!1,dd=ud=ld=cd=sd=od=0,pd=fd=null,md=!1,ad=Ze(e,t),hi(),n}function Ud(e,t){Fo=null,V.H=lc,t===Va||t===Ua?(t=Ya(),ed=3):t===Ha?(t=Ya(),ed=4):ed=t===Dc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,td=t,Qu===null&&(od=1,xc(e,Ni(t,e.current)))}function Wd(){var e=Co.current;return e===null?!0:($u&4194048)===$u?wo===null:($u&62914560)===$u||$u&536870912?e===wo:!1}function Gd(){var e=V.H;return V.H=lc,e===null?lc:e}function Kd(){var e=V.A;return V.A=Ju,e}function qd(){od=4,nd||($u&4194048)!==$u&&Co.current!==null||(rd=!0),!(sd&134217727)&&!(cd&134217727)||Zu===null||zd(Zu,$u,ud,!1)}function Jd(e,t,n){var r=Xu;Xu|=2;var i=Gd(),a=Kd();(Zu!==e||$u!==t)&&(vd=null,Hd(e,t)),t=!1;var o=od;a:do try{if(ed!==0&&Qu!==null){var s=Qu,c=td;switch(ed){case 8:Vd(),o=6;break a;case 3:case 2:case 9:case 6:Co.current===null&&(t=!0);var l=ed;if(ed=0,td=null,ef(e,s,c,l),n&&rd){o=0;break a}break;default:l=ed,ed=0,td=null,ef(e,s,c,l)}}Yd(),o=od;break}catch(t){Ud(e,t)}while(1);return t&&e.shellSuspendCounter++,la=ca=null,Xu=r,V.H=i,V.A=a,Qu===null&&(Zu=null,$u=0,hi()),o}function Yd(){for(;Qu!==null;)Qd(Qu)}function Xd(e,t){var n=Xu;Xu|=2;var r=Gd(),a=Kd();Zu!==e||$u!==t?(vd=null,_d=je()+500,Hd(e,t)):rd=Xe(e,t);a:do try{if(ed!==0&&Qu!==null){t=Qu;var o=td;b:switch(ed){case 1:ed=0,td=null,ef(e,t,o,1);break;case 2:case 9:if(Ga(o)){ed=0,td=null,$d(t);break}t=function(){ed!==2&&ed!==9||Zu!==e||(ed=7),Of(e)},o.then(t,t);break a;case 3:ed=7;break a;case 4:ed=5;break a;case 7:Ga(o)?(ed=0,td=null,$d(t)):(ed=0,td=null,ef(e,t,o,7));break;case 5:var s=null;switch(Qu.tag){case 26:s=Qu.memoizedState;case 5:case 27:var c=Qu;if(s?$m(s):c.stateNode.complete){ed=0,td=null;var l=c.sibling;if(l!==null)Qu=l;else{var u=c.return;u===null?Qu=null:(Qu=u,tf(u))}break b}}ed=0,td=null,ef(e,t,o,5);break;case 6:ed=0,td=null,ef(e,t,o,6);break;case 8:Vd(),od=6;break a;default:throw Error(i(462))}}Zd();break}catch(t){Ud(e,t)}while(1);return la=ca=null,V.H=r,V.A=a,Xu=n,Qu===null?(Zu=null,$u=0,hi(),od):0}function Zd(){for(;Qu!==null&&!ke();)Qd(Qu)}function Qd(e){var t=sl(e.alternate,e,ad);e.memoizedProps=e.pendingProps,t===null?tf(e):Qu=t}function $d(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Vc(n,t,t.pendingProps,t.type,void 0,$u);break;case 11:t=Vc(n,t,t.pendingProps,t.type.render,t.ref,$u);break;case 5:$o(t);var r=t;r===Ji&&(Xi?(na(r),r.tag===5&&r.stateNode!=null&&(Yi=r.stateNode)):(na(r),Xi=!0));default:gl(n,t),t=Qu=Ei(t,ad),t=sl(n,t,ad)}e.memoizedProps=e.pendingProps,t===null?tf(e):Qu=t}function ef(e,t,n,r){la=ca=null,$o(t),Za=null,Qa=0;var i=t.return;try{if(Ec(e,i,t,n,$u)){od=1,xc(e,Ni(n,e.current)),Qu=null;return}}catch(t){if(i!==null)throw Qu=i,t;od=1,xc(e,Ni(n,e.current)),Qu=null;return}t.flags&32768?(Xi||r===1?e=!0:rd||$u&536870912?e=!1:(nd=e=!0,(r===2||r===9||r===3||r===6)&&(r=Co.current,r!==null&&r.tag===13&&(r.flags|=16384))),nf(t,e)):tf(t)}function tf(e){var t=e;do{if(t.flags&32768){nf(t,nd);return}e=t.return;var n=ml(t.alternate,t,ad);if(n!==null){Qu=n;return}if(t=t.sibling,t!==null){Qu=t;return}Qu=t=e}while(t!==null);od===0&&(od=5)}function nf(e,t){do{var n=hl(e.alternate,e);if(n!==null){n.flags&=32767,Qu=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Qu=e;return}Qu=e=n}while(e!==null);od=6,Qu=null}function rf(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do ff();while(bd!==0);if(Xu&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===Zu&&(Qu=Zu=null,$u=0),Sd=t,xd=e,Cd=n,Td=a,Ed=r,af(e,t,n,s,c,l,f)}}function af(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(wd=s,s|=mi,nt(e,n,s,r,i,a),Od=null,(n&335544064)===n?(kd=Oa(e),r=10262):(kd=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,xf(Fe,function(){return pf(),null})):(e.callbackNode=null,e.callbackPriority=0),Pl=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=V.T,V.T=null,i=se.p,se.p=2,a=Xu,Xu|=4;try{lu(e,t,n)}finally{Xu=a,se.p=i,V.T=r}}bd=1,Pl?Dd=Ip(o,e.containerInfo,kd,cf,lf,sf,uf,pf,of,null,null):(cf(),lf(),uf())}function of(e){if(bd!==0){var t=xd.onRecoverableError;t(e,{componentStack:null})}}function sf(){bd===3&&(bd=0,Au(Sd,xd),bd=4)}function cf(){if(bd===1){bd=0;var e=xd,t=Sd,n=Cd,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=V.T,V.T=null;var i=se.p;se.p=2;var a=Xu;Xu|=4;try{ou=su=!1,Eu(t,e,n),n=fp;var o=Rr(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&Lr(s.ownerDocument.documentElement,s)){if(c!==null&&zr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Ir(s,h),v=Ir(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}bh=!!dp,fp=dp=null}finally{Xu=a,se.p=i,V.T=r}}e.current=t,bd=2}}function lf(){if(bd===2){bd=0;var e=xd,t=Sd,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=V.T,V.T=null;var r=se.p;se.p=2;var i=Xu;Xu|=4;try{du(e,t.alternate,t)}finally{Xu=i,se.p=r,V.T=n}}bd=3}}function uf(){if(bd===4||bd===3){bd=0;var e=Dd;Dd=null,Ae();var t=xd,n=Sd,r=Cd,i=Ed,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?bd=5:(bd=0,Sd=xd=null,df(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(yd=null),ut(r),n=n.stateNode,Ve&&typeof Ve.onCommitFiberRoot==`function`)try{Ve.onCommitFiberRoot(Be,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=V.T,a=se.p,se.p=2,V.T=null;try{for(var o=t.onRecoverableError,s=0;s<i.length;s++){var c=i[s];o(c.value,{componentStack:c.stack})}}finally{V.T=n,se.p=a}}if(i=Od,o=kd,kd=null,i!==null&&(Od=null,o===null&&(o=[]),e!==null))for(c=0;c<i.length;c++)n=(0,i[c])(o),n!==void 0&&e.finished.finally(n);Cd&3&&ff(),Of(t),a=t.pendingLanes,r&261930&&a&42?t===jd?Ad++:(Ad=0,jd=t):(Ad=0,jd=null),kf(0,!1)}}function df(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ta(t)))}function ff(){return Dd!==null&&(Dd.skipTransition(),Dd=null),cf(),lf(),uf(),pf()}function pf(){if(bd!==5)return!1;var e=xd,t=wd;wd=0;var n=ut(Cd),r=V.T,a=se.p;try{se.p=32>n?32:n,V.T=null,n=Td,Td=null;var o=xd,s=Cd;if(bd=0,Sd=xd=null,Cd=0,Xu&6)throw Error(i(331));var c=Xu;if(Xu|=4,Gu(o.current),Lu(o,o.current,s,n),Xu=c,kf(0,!1),Ve&&typeof Ve.onPostCommitFiberRoot==`function`)try{Ve.onPostCommitFiberRoot(Be,o)}catch{}return!0}finally{se.p=a,V.T=r,df(e,t)}}function mf(e,t,n){t=Ni(n,t),t=Cc(e.stateNode,t,2),e=lo(e,t,2),e!==null&&(tt(e,2),Of(e))}function hf(e,t,n){if(e.tag===3)mf(e,e,n);else for(;t!==null;){if(t.tag===3){mf(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(yd===null||!yd.has(r))){e=Ni(n,e),n=wc(2),r=lo(t,n,2),r!==null&&(Tc(n,r,t,e),tt(r,2),Of(r));break}}t=t.return}}function gf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Yu;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(id=!0,i.add(n),e=_f.bind(null,e,t,n),t.then(e,e))}function _f(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Zu===e&&($u&n)===n&&(od===4||od===3&&($u&62914560)===$u&&300>je()-hd?Xu&2?ld|=n:Hd(e,0):ld|=n,dd===$u&&(dd=0)),Of(e)}function vf(e,t){t===0&&(t=$e()),e=vi(e,t),e!==null&&(tt(e,t),Of(e))}function yf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),vf(e,n)}function bf(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),vf(e,n)}function xf(e,t){return De(e,t)}var Sf=null,Cf=null,wf=!1,Tf=!1,Ef=!1,Df=0;function Of(e){e!==Cf&&e.next===null&&(Cf===null?Sf=Cf=e:Cf=Cf.next=e),Tf=!0,wf||(wf=!0,Ff())}function kf(e,t){if(!Ef&&Tf){Ef=!0;do for(var n=!1,r=Sf;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-G(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Pf(r,a))}else a=$u,a=Ye(r,r===Zu?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Xe(r,a)||(n=!0,Pf(r,a))}r=r.next}while(n);Ef=!1}}function Af(){jf()}function jf(){Tf=wf=!1;var e=0;Df!==0&&yp()&&(e=Df);for(var t=je(),n=null,r=Sf;r!==null;){var i=r.next,a=Mf(r,t);a===0?(r.next=null,n===null?Sf=i:n.next=i,i===null&&(Cf=n)):(n=r,(e!==0||a&3)&&(Tf=!0)),r=i}bd!==0&&bd!==5||kf(e,!1),Df!==0&&(Df=0)}function Mf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-G(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Qe(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Zu,n=$u,n=Ye(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(ed===2||ed===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Oe(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Xe(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Oe(r),ut(n)){case 2:case 8:n=Pe;break;case 32:n=Fe;break;case 268435456:n=Le;break;default:n=Fe}return r=Nf.bind(null,e),n=De(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Oe(r),e.callbackPriority=2,e.callbackNode=null,2}function Nf(e,t){if(bd!==0&&bd!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(ff()&&e.callbackNode!==n)return null;var r=$u;return r=Ye(e,e===Zu?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Id(e,r,t),Mf(e,je()),e.callbackNode!=null&&e.callbackNode===n?Nf.bind(null,e):null)}function Pf(e,t){if(ff())return null;Id(e,t,!0)}function Ff(){wp(function(){Xu&6?De(Ne,Af):jf()})}function If(){if(Df===0){var e=ja;e===0&&(e=Ke,Ke<<=1,!(Ke&261888)&&(Ke=256)),Df=e}return Df}function Lf(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:cn(e)}function Rf(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Lf((i[J]||null).action),o=r.submitter;o&&(t=(t=o[J]||null)?Lf(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new An(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Df!==0){var e=new FormData(i,o);Ys(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),Ys(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var zf=0;zf<ai.length;zf++){var Bf=ai[zf];oi(Bf.toLowerCase(),`on`+(Bf[0].toUpperCase()+Bf.slice(1)))}oi(Zr,`onAnimationEnd`),oi(Qr,`onAnimationIteration`),oi($r,`onAnimationStart`),oi(`dblclick`,`onDoubleClick`),oi(`focusin`,`onFocus`),oi(`focusout`,`onBlur`),oi(ei,`onTransitionRun`),oi(ti,`onTransitionStart`),oi(ni,`onTransitionCancel`),oi(ri,`onTransitionEnd`),jt(`onMouseEnter`,[`mouseout`,`mouseover`]),jt(`onMouseLeave`,[`mouseout`,`mouseover`]),jt(`onPointerEnter`,[`pointerout`,`pointerover`]),jt(`onPointerLeave`,[`pointerout`,`pointerover`]),At(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),At(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),At(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),At(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),At(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),At(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Vf=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),Hf=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Vf));function Uf(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){di(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){di(e)}i.currentTarget=null,a=c}}}}function Wf(e,t){var n=t[ht];n===void 0&&(n=t[ht]=new Set);var r=e+`__bubble`;n.has(r)||(Jf(t,e,2,!1),n.add(r))}function Gf(e,t,n){var r=0;t&&(r|=4),Jf(n,e,r,t)}var Kf=`_reactListening`+Math.random().toString(36).slice(2);function qf(e){if(!e[Kf]){e[Kf]=!0,Ot.forEach(function(t){t!==`selectionchange`&&(Hf.has(t)||Gf(t,!1,e),Gf(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Kf]||(t[Kf]=!0,Gf(`selectionchange`,!1,t))}}function Jf(e,t,n,r){switch(Dh(t)){case 2:var i=xh;break;case 8:i=Sh;break;default:i=Ch}n=i.bind(null,t,n,e),i=void 0,!yn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Yf(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=St(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}gn(function(){var r=a,i=dn(n),s=[];a:{var c=ii.get(e);if(c!==void 0){var l=An,u=e;switch(e){case`keypress`:if(Tn(n)===0)break a;case`keydown`:case`keyup`:l=Jn;break;case`focusin`:u=`focus`,l=zn;break;case`focusout`:u=`blur`,l=zn;break;case`beforeblur`:case`afterblur`:l=zn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Ln;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Rn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Zn;break;case Zr:case Qr:case $r:l=Bn;break;case ri:l=Qn;break;case`scroll`:case`scrollend`:l=Mn;break;case`wheel`:l=$n;break;case`copy`:case`cut`:case`paste`:l=Vn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Yn;break;case`submit`:l=Xn;break;case`toggle`:case`beforetoggle`:l=er}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=_n(m,p),g!=null&&d.push(Xf(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(l=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,l&&n!==un&&(u=n.relatedTarget||n.fromElement)&&(St(u)||u[mt]))break a;(c||l)&&(u=i.window===i?i:(l=i.ownerDocument)?l.defaultView||l.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?St(l):null,l!==null&&(f=o(l),d=l.tag,l!==f||d!==5&&d!==27&&d!==6)&&(l=null)):(c=null,l=r),c!==l&&(d=Ln,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Yn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?u:wt(c),h=l==null?u:wt(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,St(i)===r&&(d=new d(p,m+`enter`,l,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,d=c&&l?C(c,l,Qf):null,c!==null&&$f(s,u,c,d,!1),l!==null&&f!==null&&$f(s,f,l,d,!0)))}a:{if(c=r?wt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=br;else if(mr(c)){if(xr)_=Ar;else{_=Or;var v=Dr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&an(r.elementType)&&(_=br):_=kr;if(_&&=_(e,r)){hr(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?wt(r):window,e){case`focusin`:(mr(v)||v.contentEditable===`true`)&&(Vr=v,Hr=r,Ur=null);break;case`focusout`:Ur=Hr=Vr=null;break;case`mousedown`:Wr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Wr=!1,Gr(s,n,i);break;case`selectionchange`:if(Br)break;case`keydown`:case`keyup`:Gr(s,n,i)}var y;if(nr)b:{switch(e){case`compositionstart`:var b=`onCompositionStart`;break b;case`compositionend`:b=`onCompositionEnd`;break b;case`compositionupdate`:b=`onCompositionUpdate`;break b}b=void 0}else ur?cr(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(ar&&n.locale!==`ko`&&(ur||b!==`onCompositionStart`?b===`onCompositionEnd`&&ur&&(y=wn()):(xn=i,Sn=`value`in xn?xn.value:xn.textContent,ur=!0)),v=Zf(r,b),0<v.length&&(b=new Hn(b,e,null,n,i),s.push({event:b,listeners:v}),y?b.data=y:(y=lr(n),y!==null&&(b.data=y)))),(y=ir?dr(e,n):fr(e,n))&&(b=Zf(r,`onBeforeInput`),0<b.length&&(v=new Hn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),Rf(s,e,r,n,i)}Uf(s,t)})}function Xf(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Zf(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=_n(e,n),i!=null&&r.unshift(Xf(e,i,a)),i=_n(e,t),i!=null&&r.push(Xf(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Qf(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function $f(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=_n(n,a),l!=null&&o.unshift(Xf(n,l,c))):i||(l=_n(n,a),l!=null&&o.push(Xf(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var ep=/\r\n?/g,tp=/\u0000|\uFFFD/g;function np(e){return(typeof e==`string`?e:``+e).replace(ep,`
|
|
10
|
-
`).replace(tp,``)}function rp(e,t){return t=np(t),np(e)===t}function ip(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||en(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&en(e,``+r);else return;break;case`className`:zt(e,`class`,r);break;case`tabIndex`:zt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:zt(e,n,r);break;case`style`:rn(e,r,o);return;case`data`:if(t!==`object`){zt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)||r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=cn(r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`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}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&ip(e,t,`name`,a.name,a,null),ip(e,t,`formEncType`,a.formEncType,a,null),ip(e,t,`formMethod`,a.formMethod,a,null),ip(e,t,`formTarget`,a.formTarget,a,null)):(ip(e,t,`encType`,a.encType,a,null),ip(e,t,`method`,a.method,a,null),ip(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=cn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=ln);return;case`onScroll`:r!=null&&Wf(`scroll`,e);return;case`onScrollEnd`:r!=null&&Wf(`scrollend`,e);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=cn(r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`credentialless`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Wf(`beforetoggle`,e),Wf(`toggle`,e),Rt(e,`popover`,r);break;case`xlinkActuate`:Bt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Bt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Bt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Bt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Bt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Bt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Bt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Bt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Bt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Rt(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)n=on.get(n)||n,Rt(e,n,r);else return}It=!0}function ap(e,t,n,r,a,o){switch(n){case`style`:rn(e,r,o);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)en(e,r);else if(typeof r==`number`||typeof r==`bigint`)en(e,``+r);else return;break;case`onScroll`:r!=null&&Wf(`scroll`,e);return;case`onScrollEnd`:r!=null&&Wf(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=ln);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!kt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),o=n.slice(2,a?n.length-7:void 0),t=e[J]||null,t=t==null?null:t[n],typeof t==`function`&&e.removeEventListener(o,t,a),typeof r==`function`)){typeof t!=`function`&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(o,r,a);break a}It=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):Rt(e,n,r)}return}It=!0}function op(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Wf(`error`,e),Wf(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:ip(e,t,o,s,n,null)}}a&&ip(e,t,`srcSet`,n.srcSet,n,null),r&&ip(e,t,`src`,n.src,n,null);return;case`input`:Wf(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:ip(e,t,r,d,n,null)}}Yt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Wf(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:ip(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Zt(e,!!r,n,!0):Zt(e,!!r,t,!1);return;case`textarea`:for(s in Wf(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:ip(e,t,s,c,n,null)}$t(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:ip(e,t,l,r,n,null)}return;case`dialog`:Wf(`beforetoggle`,e),Wf(`toggle`,e),Wf(`cancel`,e),Wf(`close`,e);break;case`iframe`:case`object`:Wf(`load`,e);break;case`video`:case`audio`:for(r=0;r<Vf.length;r++)Wf(Vf[r],e);break;case`image`:Wf(`error`,e),Wf(`load`,e);break;case`details`:Wf(`toggle`,e);break;case`embed`:case`source`:case`link`:Wf(`error`,e),Wf(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:ip(e,t,u,r,n,null)}return;default:if(an(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&ap(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&ip(e,t,c,r,n,null))}var sp={};function cp(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||ip(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:m!==f&&(It=!0),o=m;break;case`name`:m!==f&&(It=!0),a=m;break;case`checked`:m!==f&&(It=!0),u=m;break;case`defaultChecked`:m!==f&&(It=!0),d=m;break;case`value`:m!==f&&(It=!0),s=m;break;case`defaultValue`:m!==f&&(It=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&ip(e,t,p,m,r,f)}}Jt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||ip(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:o!==l&&(It=!0),p=o;break;case`defaultValue`:o!==l&&(It=!0),c=o;break;case`multiple`:o!==l&&(It=!0),s=o;default:o!==l&&ip(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Zt(e,!!n,n?[]:``,!1):Zt(e,!!n,t,!0)):Zt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:ip(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:a!==o&&(It=!0),p=a;break;case`defaultValue`:a!==o&&(It=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&ip(e,t,s,a,r,o)}Qt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:ip(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:p!==m&&(It=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:ip(e,t,l,p,r,m)}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 g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&ip(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:ip(e,t,u,p,r,m)}return;default:if(an(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&ap(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||ap(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&ip(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||ip(e,t,f,p,r,m)}function lp(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function up(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&lp(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&lp(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var dp=null,fp=null;function pp(e){return e.nodeType===9?e:e.ownerDocument}function mp(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function hp(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function gp(e,t,n,r){return n=pp(n).createElement(e),n[q]=r,n[J]=t,op(n,e,t),Et(n),n}function _p(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var vp=null;function yp(){var e=window.event;return e&&e.type===`popstate`?e!==vp&&(vp=e,!0):(vp=null,!1)}var bp=typeof setTimeout==`function`?setTimeout:void 0,xp=typeof clearTimeout==`function`?clearTimeout:void 0,Sp=typeof Promise==`function`?Promise:void 0,Cp=typeof requestAnimationFrame==`function`?requestAnimationFrame:bp,wp=typeof queueMicrotask==`function`?queueMicrotask:Sp===void 0?bp:function(e){return Sp.resolve(null).then(e).catch(Tp)};function Tp(e){setTimeout(function(){throw e})}function Ep(e){return e===`head`}function Dp(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Kh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)xm(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,xm(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[yt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&xm(e.ownerDocument.body)}n=i}while(n);Kh(t)}function Op(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function kp(e,t,n){if(t=CSS.escape(t)===t?t:`r-`+btoa(t).replace(/=/g,``),e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display===`inline`){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var a=t[i];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?`inline-block`:`block`,e.marginTop=`-`+n.paddingTop,e.marginBottom=`-`+n.paddingBottom)}}function Ap(e,t){e=e.style,t=t.style;var n=t==null?null:t.hasOwnProperty(`viewTransitionName`)?t.viewTransitionName:t.hasOwnProperty(`view-transition-name`)?t[`view-transition-name`]:null;e.viewTransitionName=n==null||typeof n==`boolean`?``:(``+n).trim(),n=t==null?null:t.hasOwnProperty(`viewTransitionClass`)?t.viewTransitionClass:t.hasOwnProperty(`view-transition-class`)?t[`view-transition-class`]:null,e.viewTransitionClass=n==null||typeof n==`boolean`?``:(``+n).trim(),e.display===`inline-block`&&(t==null?e.display=e.margin=``:(n=t.display,e.display=n==null||typeof n==`boolean`?``:n,n=t.margin,n==null?(n=t.hasOwnProperty(`marginTop`)?t.marginTop:t[`margin-top`],e.marginTop=n==null||typeof n==`boolean`?``:n,t=t.hasOwnProperty(`marginBottom`)?t.marginBottom:t[`margin-bottom`],e.marginBottom=t==null||typeof t==`boolean`?``:t):e.margin=n))}function jp(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position===`absolute`||t.position===`fixed`,clip:t.clipPath!==`none`||t.overflow!==`visible`||t.filter!==`none`||t.mask!==`none`||t.mask!==`none`||t.borderRadius!==`0px`,view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function Mp(e){return jp(e.getBoundingClientRect(),getComputedStyle(e),e)}function Np(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return jp(t,n,e)}function Pp(e){return e.documentElement.clientHeight}function Fp(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Ip(e,t,n,r,i,a,o,s,c){var l=t.nodeType===9?t:t.ownerDocument;try{var u=l.startViewTransition({update:function(){var t=l.defaultView,n=t.navigation&&t.navigation.transition,o=l.fonts.status;r();var s=[];if(o===`loaded`&&(Pp(l),l.fonts.status===`loading`&&s.push(l.fonts.ready)),o=s.length,e!==null)for(var c=e.suspenseyImages,u=0,d=0;d<c.length;d++){var f=c[d];if(!f.complete){var p=f.getBoundingClientRect();if(0<p.bottom&&0<p.right&&p.top<t.innerHeight&&p.left<t.innerWidth){if(u+=eh(f),u>rh){s.length=o;break}f=new Promise(Fp.bind(f)),s.push(f)}}}if(0<s.length)return t=Promise.race([Promise.all(s),new Promise(function(e){return setTimeout(e,500)})]).then(i,i),(n?Promise.allSettled([n.finished,t]):t).then(a,a);if(i(),n)return n.finished.then(a,a);a()},types:n});l.__reactViewTransition=u;var d=[];return u.ready.then(function(){for(var e=l.documentElement.getAnimations({subtree:!0}),t=0;t<e.length;t++){var n=e[t],r=n.effect,i=r.pseudoElement;if(i!=null&&i.startsWith(`::view-transition`)){d.push(n),n=r.getKeyframes();for(var a=i=void 0,s=!0,c=0;c<n.length;c++){var u=n[c],f=u.width;if(i===void 0)i=f;else if(i!==f){s=!1;break}if(f=u.height,a===void 0)a=f;else if(a!==f){s=!1;break}delete u.width,delete u.height,u.transform===`none`&&delete u.transform}s&&i!==void 0&&a!==void 0&&(r.setKeyframes(n),s=getComputedStyle(r.target,r.pseudoElement),s.width!==i||s.height!==a)&&(s=n[0],s.width=i,s.height=a,s=n[n.length-1],s.width=i,s.height=a,r.setKeyframes(n))}}o()},function(e){l.__reactViewTransition===u&&(l.__reactViewTransition=null);try{if(typeof e==`object`&&e)switch(e.name){case`InvalidStateError`:(e.message===`View transition was skipped because document visibility state is hidden.`||e.message===`Skipping view transition because document visibility state has become hidden.`||e.message===`Skipping view transition because viewport size changed.`||e.message===`Transition was aborted because of invalid state`)&&(e=null)}e!==null&&c(e)}finally{r(),i(),o()}}),u.finished.finally(function(){for(var e=0;e<d.length;e++)d[e].cancel();l.__reactViewTransition===u&&(l.__reactViewTransition=null),s()}),u}catch{return r(),i(),o(),null}}function Lp(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Lp.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:w({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Lp.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],i=0;i<n.length;i++){var a=n[i].effect;a!==null&&a.target===e&&a.pseudoElement===t&&r.push(n[i])}return r},Lp.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Rp(e){return{name:e,group:new Lp(`group`,e),imagePair:new Lp(`image-pair`,e),old:new Lp(`old`,e),new:new Lp(`new`,e)}}function zp(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}zp.prototype.addEventListener=function(e,t,n){var r=null,i=null;if(!(n!=null&&typeof n!=`boolean`&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var a=this._eventListeners;if(Wp(a,e,t,n)===-1){var o=this,s=t;n!=null&&typeof n!=`boolean`&&!0===n.once&&(s=function(r){o.removeEventListener(e,t,n),typeof t==`function`?t.call(this,r):t.handleEvent(r)}),r!==null&&(i=o.removeEventListener.bind(o,e,t,n),r.addEventListener(`abort`,i,{once:!0}),i=r.removeEventListener.bind(r,`abort`,i)),r=Hp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),f(this._fragmentFiber.child,!1,Bp,e,s,r)}this._eventListeners=a}};function Bp(e,t,n,r){return _(e).addEventListener(t,n,r),!1}zp.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Wp(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=Hp(i.optionsOrUseCapture),f(this._fragmentFiber.child,!1,Vp,e,n,i),r.splice(t,1),a!==null&&a()}};function Vp(e,t,n,r){return _(e).removeEventListener(t,n,r),!1}function Hp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Up(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Wp(e,t,n,r){if(e.length===0)return-1;r=Up(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&Up(a.optionsOrUseCapture)===r)return i}return-1}zp.prototype.dispatchEvent=function(e){var t=p(this._fragmentFiber);if(t===null)return!0;t=_(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(``):document.createTextNode(``);if(n)for(var i=0;i<n.length;i++){var a=n[i];r.addEventListener(a.type,a.attachedListener,Hp(a.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(i=0;i<n.length;i++)a=n[i],r.removeEventListener(a.type,a.attachedListener,Hp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},zp.prototype.focus=function(e){f(this._fragmentFiber.child,!0,Gp,e,void 0,void 0)};function Gp(e,t){return e.tag!==6&&(e=_(e),_m(e,t))}zp.prototype.focusLast=function(e){var t=[];f(this._fragmentFiber.child,!0,Kp,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Gp(t[n],e);n--);};function Kp(e,t){return t.push(e),!1}zp.prototype.blur=function(){var e=p(this._fragmentFiber);e!==null&&(e=_(e),e=pp(e).activeElement,e!==null&&f(this._fragmentFiber.child,!1,qp,e,void 0,void 0))};function qp(e,t){return e.tag!==6&&(e=_(e),e===t||e.contains(t)?(t.blur(),!0):!1)}zp.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),f(this._fragmentFiber.child,!1,Jp,e,void 0,void 0)};function Jp(e,t){return e.tag===6||(e=_(e),t.observe(e)),!1}zp.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),f(this._fragmentFiber.child,!1,Yp,e,void 0,void 0);for(var n=t=0;n<Xp.length;n++){var r=Xp[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):Xp[t++]=r}Xp.length=t}};function Yp(e,t){return e.tag===6||(e=_(e),t.unobserve(e)),!1}var Xp=[],Zp=!1;function Qp(e,t,n){Xp.push({fragmentInstance:e,observer:t,instance:n}),Zp||(Zp=!0,vm(function(){Zp=!1;var e=Xp;Xp=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}zp.prototype.getClientRects=function(){var e=[];return f(this._fragmentFiber.child,!1,$p,e,void 0,void 0),e};function $p(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=_(e),t.push.apply(t,e.getClientRects());return!1}zp.prototype.getRootNode=function(e){var t=p(this._fragmentFiber);return t===null?this:_(t).getRootNode(e)},zp.prototype.compareDocumentPosition=function(e){var t=p(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];f(this._fragmentFiber.child,!1,Kp,n,void 0,void 0);var r=_(t);if(n.length===0){if(n=r,m(this._fragmentFiber)){a:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break a}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=h(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=_(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=_(n[0]),i=_(n[n.length-1]);var a=m(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=i.compareDocumentPosition(e),c=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&a&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&i===e||c||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||em(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function em(e,t,n,r,i){var a=St(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)a:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break a}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;a:{for(a=t,t=p(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break a}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=C(n,a,S),t===null?t=!1:(f(t,!0,b,a,n),a=v,v=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=C(r,a,S),t===null?t=!1:(f(t,!0,x,a,r),a=v,y=v=null,t=a!==null)),t):!1}function tm(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}zp.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];f(this._fragmentFiber.child,!1,Kp,t,void 0,void 0);var n=!1!==e;if(t.length===0){var r=h(this._fragmentFiber);if(r=n?r[1]||r[0]||p(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=_(r),tm(e,n);return}if(r=_(r),r.nodeType!==9){if(r.nodeType===11){n=`host`in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var a=t[r];a.tag===6?(a=_(a),tm(a,n)):_(a).scrollIntoView(e),r+=n?-1:1}};function nm(e,t){return e=_(e),rm(e,t),!1}function rm(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function im(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,Hp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<Xp.length;i++){var a=Xp[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(Xp[r++]=a)}Xp.length=r,n.observe(e)}),rm(e,t))}function am(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,Hp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?Qp(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function om(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:om(n),xt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function sm(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[yt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=pm(e.nextSibling),e===null)break}return null}function cm(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=pm(e.nextSibling),e===null))return null;return e}function lm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=pm(e.nextSibling),e===null))return null;return e}function um(e){return e.data===`$?`||e.data===`$~`}function dm(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function fm(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function pm(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var mm=null;function hm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return pm(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function gm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function _m(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener(`focus`,n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener(`focus`,n,!0)}return r}function vm(e){Cp(function(){Cp(function(t){return e(t)})})}function ym(e,t,n){switch(t=pp(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function bm(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&ip(e,t,r,null,sp,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===ln&&(e.onclick=null),xt(e)}function xm(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);xt(e)}var Sm=new Map,Cm=new Set;function wm(e){if(typeof e.getRootNode==`function`){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var Tm=se.d;se.d={f:Em,r:Dm,D:Am,C:jm,L:Mm,m:Nm,X:Fm,S:Pm,M:Im};function Em(){var e=Tm.f(),t=Bd();return e||t}function Dm(e){var t=Ct(e);t!==null&&t.tag===5&&t.type===`form`?Zs(t):Tm.r(e)}var Om=typeof document>`u`?null:document;function km(e,t,n){var r=Om;if(r&&typeof t==`string`&&t){var i=qt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Cm.has(i)||(Cm.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),op(t,`link`,e),Et(t),r.head.appendChild(t)))}}function Am(e){Tm.D(e),km(`dns-prefetch`,e,null)}function jm(e,t){Tm.C(e,t),km(`preconnect`,e,t)}function Mm(e,t,n){Tm.L(e,t,n);var r=Om;if(r&&e&&t){var i=`link[rel="preload"][as="`+qt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+qt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+qt(n.imageSizes)+`"]`)):i+=`[href="`+qt(e)+`"]`;var a=i;switch(t){case`style`:a=Rm(e);break;case`script`:a=Hm(e)}if(!(Sm.has(a)||(e=w({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Sm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(zm(a))||t===`script`&&r.querySelector(Um(a))))){var o=r.createElement(`link`);op(o,`link`,e),t===`style`&&(o[bt]=!0,o.onload=o.onerror=function(){Dt(o)}),Et(o),r.head.appendChild(o)}}}function Nm(e,t){Tm.m(e,t);var n=Om;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+qt(r)+`"][href="`+qt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Hm(e)}if(!Sm.has(a)&&(e=w({rel:`modulepreload`,href:e},t),Sm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Um(a)))return}r=n.createElement(`link`),op(r,`link`,e),Et(r),n.head.appendChild(r)}}}function Pm(e,t,n){Tm.S(e,t,n);var r=Om;if(r&&e){var i=Tt(r).hoistableStyles,a=Rm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(zm(a)))s.loading=5;else{e=w({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Sm.get(a))&&Km(e,n);var c=o=r.createElement(`link`);Et(c),op(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Gm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Fm(e,t){Tm.X(e,t);var n=Om;if(n&&e){var r=Tt(n).hoistableScripts,i=Hm(e),a=r.get(i);a||(a=n.querySelector(Um(i)),a||(e=w({src:e,async:!0},t),(t=Sm.get(i))&&qm(e,t),a=n.createElement(`script`),Et(a),op(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Im(e,t){Tm.M(e,t);var n=Om;if(n&&e){var r=Tt(n).hoistableScripts,i=Hm(e),a=r.get(i);a||(a=n.querySelector(Um(i)),a||(e=w({src:e,async:!0,type:`module`},t),(t=Sm.get(i))&&qm(e,t),a=n.createElement(`script`),Et(a),op(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Lm(e,t,n,r){var a=(a=me.current)?wm(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Rm(n.href),t=Tt(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Rm(n.href);var o=Tt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(zm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=Sm.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Sm.set(e,o)),Vm(a,e,o,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=Hm(n),t=Tt(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Rm(e){return`href="`+qt(e)+`"`}function zm(e){return`link[rel="stylesheet"][`+e+`]`}function Bm(e){return w({},e,{"data-precedence":e.precedence,precedence:null})}function Vm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[bt]){r.loading=1;return}}else t=e.createElement(`link`),t[bt]=!0,t.onload=t.onerror=Dt.bind(null,t),op(t,`link`,n),Et(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Hm(e){return`[src="`+qt(e)+`"]`}function Um(e){return`script[async]`+e}function Wm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+qt(n.href)+`"]`);if(r)return t.instance=r,Et(r),r;var a=w({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Et(r),op(r,`style`,a),Gm(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Rm(n.href);var o=e.querySelector(zm(a));if(o)return t.state.loading|=4,t.instance=o,Et(o),o;r=Bm(n),(a=Sm.get(a))&&Km(r,a),o=(e.ownerDocument||e).createElement(`link`),Et(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),op(o,`link`,r),t.state.loading|=4,Gm(o,n.precedence,e),t.instance=o;case`script`:return o=Hm(n.src),(a=e.querySelector(Um(o)))?(t.instance=a,Et(a),a):(r=n,(a=Sm.get(o))&&(r=w({},n),qm(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Et(a),op(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Gm(r,n.precedence,e));return t.instance}function Gm(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Km(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function qm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Jm=null;function Ym(e,t,n){if(Jm===null){var r=new Map,i=Jm=new Map;i.set(n,r)}else i=Jm,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[yt]||a[q]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Xm(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Zm(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Qm(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function $m(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function eh(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function th(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=eh(t),e.suspenseyImages.push(t)),e=sh.bind(e),t.decode().then(e,e))}function nh(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Rm(r.href),a=t.querySelector(zm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=oh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Et(a);return}a=t.ownerDocument||t,r=Bm(r),(i=Sm.get(i))&&Km(r,i),a=a.createElement(`link`),Et(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),op(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=oh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var rh=0;function ih(e,t){return e.stylesheets&&e.count===0&&lh(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&lh(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&rh===0&&(rh=62500*up());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&lh(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>rh?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function ah(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)lh(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function oh(){this.count--,ah(this)}function sh(){this.imgCount--,ah(this)}var ch=null;function lh(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ch=new Map,t.forEach(uh,e),ch=null,oh.call(e))}function uh(e,t){if(!(t.state.loading&4)){var n=ch.get(e);if(n)var r=n.get(null);else{n=new Map,ch.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=oh.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var dh={$$typeof:M,Provider:null,Consumer:null,_currentValue:H,_currentValue2:H,_threadCount:0};function fh(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,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=et(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=et(0),this.hiddenUpdates=et(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function ph(e,t,n,r,i,a,o,s,c,l,u,d){return e=new fh(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Ci(3,null,null,t),e.current=a,a.stateNode=e,t=wa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},oo(a),e}function mh(e){return e?(e=xi,e):xi}function hh(e,t,n,r,i,a){i=mh(i),r.context===null?r.context=i:r.pendingContext=i,r=co(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=lo(e,r,t),n!==null&&(Fd(n,e,t),uo(n,e,t))}function gh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function _h(e,t){gh(e,t),(e=e.alternate)&&gh(e,t)}function vh(e){if(e.tag===13||e.tag===31){var t=vi(e,67108864);t!==null&&Fd(t,e,67108864),_h(e,67108864)}}function yh(e){if(e.tag===13||e.tag===31){var t=Md();t=ct(t);var n=vi(e,t);n!==null&&Fd(n,e,t),_h(e,t)}}var bh=!0;function xh(e,t,n,r){var i=V.T;V.T=null;var a=se.p;try{se.p=2,Ch(e,t,n,r)}finally{se.p=a,V.T=i}}function Sh(e,t,n,r){var i=V.T;V.T=null;var a=se.p;try{se.p=8,Ch(e,t,n,r)}finally{se.p=a,V.T=i}}function Ch(e,t,n,r){if(bh){var i=wh(r);if(i===null)Yf(e,t,r,Th,n),Ih(e,r);else if(Rh(i,e,t,n,r))r.stopPropagation();else if(Ih(e,r),t&4&&-1<Fh.indexOf(e)){for(;i!==null;){var a=Ct(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Je(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-G(o);s.entanglements[1]|=c,o&=~c}Of(a),!(Xu&6)&&(_d=je()+500,kf(0,!1))}}break;case 31:case 13:s=vi(a,2),s!==null&&Fd(s,a,2),Bd(),_h(a,2)}if(a=wh(r),a===null&&Yf(e,t,r,Th,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Yf(e,t,r,null,n)}}function wh(e){return e=dn(e),Eh(e)}var Th=null;function Eh(e){if(Th=null,e=St(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Th=e,null}function Dh(e){switch(e){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`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`fullscreenerror`: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`resize`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Me()){case Ne:return 2;case Pe:return 8;case Fe:case Ie:return 32;case Le:return 268435456;default:return 32}default:return 32}}var Oh=!1,kh=null,Ah=null,jh=null,Mh=new Map,Nh=new Map,Ph=[],Fh=`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 Ih(e,t){switch(e){case`focusin`:case`focusout`:kh=null;break;case`dragenter`:case`dragleave`:Ah=null;break;case`mouseover`:case`mouseout`:jh=null;break;case`pointerover`:case`pointerout`:Mh.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Nh.delete(t.pointerId)}}function Lh(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Ct(t),t!==null&&vh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Rh(e,t,n,r,i){switch(t){case`focusin`:return kh=Lh(kh,e,t,n,r,i),!0;case`dragenter`:return Ah=Lh(Ah,e,t,n,r,i),!0;case`mouseover`:return jh=Lh(jh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Mh.set(a,Lh(Mh.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Nh.set(a,Lh(Nh.get(a)||null,e,t,n,r,i)),!0}return!1}function zh(e){var t=St(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,ft(e.priority,function(){yh(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,ft(e.priority,function(){yh(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Bh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=wh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);un=r,n.target.dispatchEvent(r),un=null}else return t=Ct(n),t!==null&&vh(t),e.blockedOn=n,!1;t.shift()}return!0}function Vh(e,t,n){Bh(e)&&n.delete(t)}function Hh(){Oh=!1,kh!==null&&Bh(kh)&&(kh=null),Ah!==null&&Bh(Ah)&&(Ah=null),jh!==null&&Bh(jh)&&(jh=null),Mh.forEach(Vh),Nh.forEach(Vh)}function Uh(e,n){e.blockedOn===n&&(e.blockedOn=null,Oh||(Oh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Hh)))}var Wh=null;function Gh(e){Wh!==e&&(Wh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Wh===e&&(Wh=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(Eh(r||n)===null)continue;break}var a=Ct(n);a!==null&&(e.splice(t,3),t-=3,Ys(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Kh(e){function t(t){return Uh(t,e)}kh!==null&&Uh(kh,e),Ah!==null&&Uh(Ah,e),jh!==null&&Uh(jh,e),Mh.forEach(t),Nh.forEach(t);for(var n=0;n<Ph.length;n++){var r=Ph[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Ph.length&&(n=Ph[0],n.blockedOn===null);)zh(n),n.blockedOn===null&&Ph.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[J]||null;if(typeof a==`function`)o||Gh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[J]||null)s=o.formAction;else if(Eh(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Gh(n)}}}function qh(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Jh(e){this._internalRoot=e}Yh.prototype.render=Jh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;hh(n,Md(),e,t,null,null)},Yh.prototype.unmount=Jh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;hh(e.current,2,null,e,null,null),Bd(),t[mt]=null}};function Yh(e){this._internalRoot=e}Yh.prototype.unstable_scheduleHydration=function(e){if(e){var t=dt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ph.length&&t!==0&&t<Ph[n].priority;n++);Ph.splice(n,0,e),n===0&&zh(e)}};var Xh=n.version;if(Xh!==`19.3.1`)throw Error(i(527,Xh,`19.3.1`));se.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var Zh={bundleType:0,version:`19.3.1`,rendererPackageName:`react-dom`,currentDispatcherRef:V,reconcilerVersion:`19.3.1`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Qh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Qh.isDisabled&&Qh.supportsFiber)try{Be=Qh.inject(Zh),Ve=Qh}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=vc,s=yc,c=bc;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=ph(e,1,!1,null,null,n,r,null,o,s,c,qh),e[mt]=t.current,qf(e),new Jh(t)}})),dt=et(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=ut()})),ft=et((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),pt=et(((e,t)=>{t.exports=ft()})),q=rt(at(),1),J=pt(),mt=q.createContext(void 0),ht=e=>{let t=q.useContext(mt);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},gt=({client:e,children:t})=>(q.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,J.jsx)(mt.Provider,{value:e,children:t})),_t={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},vt=new class{#e=_t;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function yt(e){setTimeout(e,0)}var bt=typeof window>`u`||`Deno`in globalThis;function xt(){}function St(e,t){return typeof e==`function`?e(t):e}function Ct(e){return typeof e==`number`&&e>=0&&e!==1/0}function wt(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Tt(e,t){return typeof e==`function`?e(t):e}function Et(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==Ot(o,t.options))return!1}else if(!At(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function Dt(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(kt(t.options.mutationKey)!==kt(a))return!1}else if(!At(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Ot(e,t){return(t?.queryKeyHashFn||kt)(e)}function kt(e){return JSON.stringify(e,(e,t)=>Ft(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function At(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){if(t.length>e.length)return!1;for(let n=0;n<t.length;n++)if(!At(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!At(e[r],t[r]))return!1;return!0}return!1}var jt=Object.prototype.hasOwnProperty;function Mt(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=Pt(e)&&Pt(t);if(!r&&!(Ft(e)&&Ft(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:jt.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=Mt(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function Nt(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function Pt(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ft(e){if(!It(e))return!1;let t=Object.getPrototypeOf(e),n=t?.constructor;if(n===void 0)return!0;if(typeof n!=`function`)return!1;let r=n.prototype;return!(!It(r)||!r.hasOwnProperty(`isPrototypeOf`)||t!==Object.prototype)}function It(e){return Object.prototype.toString.call(e)===`[object Object]`}function Lt(e){return new Promise(t=>{vt.setTimeout(t,e)})}function Rt(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:Mt(e,t)}function zt(e){return e}function Bt(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function Vt(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Ht=Symbol();function Ut(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Ht?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Wt(e,t){return typeof e==`function`?e(...t):!!e}function Gt(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r||(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0})),i)}),e}var Kt=()=>bt,qt=()=>Kt(),Jt=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Yt=new class extends Jt{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},Xt=yt;function Zt(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=Xt,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var Qt=Zt(),$t=new class extends Jt{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function en(e){return Math.min(1e3*2**e,3e4)}function tn(e){return(e??`online`)!==`online`||$t.isOnline()}var nn=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function rn(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(xt);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new nn(t);h(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>Yt.isFocused()&&(e.networkMode===`always`||$t.isOnline())&&e.canRun(),p=()=>tn(e.networkMode)&&e.canRun(),m=e=>{c()||(r?.(),i=`resolved`,a(e))},h=e=>{c()||(r?.(),i=`rejected`,o(e))},g=t=>new Promise(n=>{r=e=>{(c()||t())&&n(e)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),_=()=>{if(c())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(m).catch(r=>{if(c())return;let i=e.retry??(qt()?0:3),a=e.retryDelay??en,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);t||!s?h(r):(n++,e.onFail?.(n,r),Lt(o).then(()=>f()?void 0:g(f)).then(()=>{t?h(r):_()}))})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:d,canStart:p,start:()=>(p()?_():g(p).then(_),s)}}var an=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ct(this.gcTime)&&(this.#e=vt.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(qt()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(vt.clearTimeout(this.#e),this.#e=void 0)}};function on(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{Gt(e,()=>t.signal,()=>n=!0)},u=Ut(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?Vt:Bt;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?cn:sn,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]===void 0?r.initialPageParam:o[0]:sn(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.fetchFn=t.options.persister?()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function sn(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function cn(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var ln=class extends an{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=fn(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=fn(this.options);e.data!==void 0&&(this.setState(dn(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=Rt(this.state.data,e,this.options);return this.#c({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#c({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(xt).catch(xt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Tt(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ht||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>Tt(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!wt(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){let t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#a&&(this.#s||this.state.fetchStatus===`paused`&&this.state.status===`pending`?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#c({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=Ut(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?on(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta});let o=this.#a=rn({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof nn&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await o.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof nn){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.#a===o&&(this.#a=void 0),this.scheduleGc()}}#c(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...un(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...dn(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),Qt.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function un(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:tn(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function dn(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function fn(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var pn=class extends Jt{#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p=new Set;constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),hn(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return gn(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return gn(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof Tt(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!Nt(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&_n(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#t!==n||Tt(this.options.enabled,this.#t)!==Tt(t.enabled,this.#t)||Tt(this.options.staleTime,this.#t)!==Tt(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||Tt(this.options.enabled,this.#t)!==Tt(t.enabled,this.#t)||i!==this.#f)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Nt(this.getCurrentResult(),n)||(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),Reflect.get(e,n))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t),r=()=>{},i,a=new Promise(e=>{i=e,r=this.#e.getQueryCache().subscribe(i=>{i.type===`updated`&&i.query.queryHash===n.queryHash&&n.state.data!==void 0&&(r(),e(this.createResult(n,t)))})});return Promise.race([n.fetch(t).then(()=>{let e=this.createResult(n,t);return i?.(e),e}).finally(()=>{r()}),a])}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#m(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(xt)),t}#h(e){return!qt()&&Tt(this.options.enabled,this.#t)!==!1&&Ct(e)}#g(){this.#b();let e=Tt(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=wt(this.#r.dataUpdatedAt,e)+1;this.#u=vt.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return Tt(this.options.refetchInterval,this.#t)??!1}#v(e){this.#x(),this.#f=e,this.#f!==0&&this.#h(this.#f)&&(this.#d=vt.setInterval(()=>{(this.options.refetchIntervalInBackground||Yt.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(vt.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(vt.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&hn(e,t),o=i&&_n(e,n,t,r);(a||o)&&(l={...l,...un(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,e!==void 0&&(m=`success`,d=Rt(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h){if(i&&d===a?.data&&t.select===this.#s)d=this.#c;else try{this.#s=t.select,d=t.select(d),d=Rt(i?.data,d,t),this.#c=d,this.#o=null}catch(e){this.#o=e}}else d===void 0&&(this.#o=null);this.#o&&(f=this.#o,d=this.#c,p=Date.now(),m=`error`,u=!1);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0;return{status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:vn(e,t),refetch:this.refetch,isEnabled:Tt(t.enabled,e)!==!1}}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#l=this.#t),Nt(t,e))return;this.#r=t;let n=(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#p.size)return!0;let r=new Set(n??this.#p);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})();Qt.batch(()=>{n&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}};function mn(e,t){return Tt(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||Tt(t.retryOnMount,e)!==!1)}function hn(e,t){return mn(e,t)||e.state.data!==void 0&&gn(e,t,t.refetchOnMount)}function gn(e,t,n){if(Tt(t.enabled,e)!==!1&&Tt(t.staleTime,e)!==`static`){let r=Tt(n,e);return r===`always`||r!==!1&&vn(e,t)}return!1}function _n(e,t,n,r){return(e!==t||Tt(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&vn(e,n)}function vn(e,t){return Tt(t.enabled,e)!==!1&&e.isStaleByTime(Tt(t.staleTime,e))}var yn=class extends an{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||bn(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??(this.state.status===`pending`?this.execute(this.state.variables):Promise.resolve())}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},r=this.#r=rn({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),i=this.state.status===`pending`,a=!r.canStart();try{if(i)t();else{this.#i({type:`pending`,variables:e,isPaused:a}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:a})}let o=await r.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),this.#i({type:`success`,data:o}),o}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#r===r&&(this.#r=void 0),this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),Qt.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function bn(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var xn=class extends Jt{#e;#t;#n;constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}build(e,t,n){let r=new yn({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=Sn(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=Sn(e);if(typeof t==`string`){let n=this.#t.get(t);if(n){if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=Sn(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}return!0}runNext(e){let t=Sn(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){Qt.batch(()=>{let e=this.getAll();this.#e.clear(),this.#t.clear(),e.forEach(e=>{this.notify({type:`removed`,mutation:e})})})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Dt(t,e))}findAll(e={}){return this.getAll().filter(t=>Dt(e,t))}notify(e){Qt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return Qt.batch(()=>Promise.all(e.map(e=>e.continue().catch(xt))))}};function Sn(e){return e.options.scope?.id}var Cn=class extends Jt{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),Nt(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&kt(t.mutationKey)!==kt(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onSubscribe(){this.listeners.size===1&&this.#n&&(this.#n.addObserver(this),this.#i())}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??bn();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){Qt.batch(()=>{let t=this.#r;if(t&&this.hasListeners()){let n=this.#t.variables,r=this.#t.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{t.onSuccess?.(e.data,n,r,i)}catch(e){Promise.reject(e)}try{t.onSettled?.(e.data,null,n,r,i)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{t.onError?.(e.error,n,r,i)}catch(e){Promise.reject(e)}try{t.onSettled?.(void 0,e.error,n,r,i)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}};function wn(e,t){let n=new Set(t);return e.filter(e=>!n.has(e))}var Tn=class extends Jt{#e;#t;#n;#r;#i;#a;#o;#s;#c;#l=[];constructor(e,t,n){super(),this.#e=e,this.#r=n,this.#n=[],this.#i=[],this.#t=[],this.setQueries(t)}onSubscribe(){this.listeners.size===1&&this.#i.forEach(e=>{e.subscribe(t=>{this.#m(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#i.forEach(e=>{e.destroy()})}setQueries(e,t){this.#n=e,this.#r=t,Qt.batch(()=>{let e=this.#i,t=this.#p(this.#n);t.forEach(e=>e.observer.setOptions(e.defaultedQueryOptions));let n=t.map(e=>e.observer),r=n.map(e=>e.getCurrentResult()),i=e.length!==n.length,a=n.some((t,n)=>t!==e[n]),o=i||a,s=o?!0:r.some((e,t)=>{let n=this.#t[t];return!n||!Nt(e,n)});(o||s)&&(o&&(this.#l=t,this.#i=n),this.#t=r,this.hasListeners()&&(o&&(wn(e,n).forEach(e=>{e.destroy()}),wn(n,e).forEach(e=>{e.subscribe(t=>{this.#m(e,t)})})),this.#h()))})}getCurrentResult(){return this.#t}getQueries(){return this.#i.map(e=>e.getCurrentQuery())}getObservers(){return this.#i}getOptimisticResult(e,t){let n=this.#p(e),r=n.map(e=>e.observer.getOptimisticResult(e.defaultedQueryOptions)),i=n.map(e=>e.defaultedQueryOptions.queryHash);return[r,e=>this.#d(e??r,t,i),()=>this.#u(r,n)]}#u(e,t){let n=new Set;return t.map((r,i)=>{let a=e[i];return r.defaultedQueryOptions.notifyOnChangeProps?a:r.observer.trackResult(a,e=>{n.has(e)||(n.add(e),t.forEach(t=>{t.observer.trackProp(e)}))})})}#d(e,t,n){if(t){let r=this.#c,i=n!==void 0&&r!==void 0&&(r.length!==n.length||n.some((e,t)=>e!==r[t]));return(this.#t!==this.#s||i||t!==this.#o)&&(this.#o=t,this.#s=this.#t,n!==void 0&&(this.#c=n),this.#a=Mt(this.#a,t(e))),this.#a}return e}#f(){return!this.#r?.combine||this.#i.some((e,t)=>e.options.suspense&&this.#t[t]?.data===void 0)}#p(e){let t=new Map;this.#i.forEach(e=>{let n=e.options.queryHash;if(!n)return;let r=t.get(n);r?r.push(e):t.set(n,[e])});let n=[];return e.forEach(e=>{let r=this.#e.defaultQueryOptions(e),i=t.get(r.queryHash)?.shift()??new pn(this.#e,r);n.push({defaultedQueryOptions:r,observer:i})}),n}#m(e,t){let n=this.#i.indexOf(e);n!==-1&&(this.#t=this.#t.slice(),this.#t[n]=t,this.#h())}#h(){if(this.hasListeners()){let e=this.#f(),t=this.#a,n=e?t:this.#d(this.#u(this.#t,this.#l),this.#r?.combine);(e||t!==n)&&Qt.batch(()=>{this.listeners.forEach(e=>{e(this.#t)})})}}},En=class extends Jt{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,t,n){let r=t.queryKey,i=t.queryHash??Ot(r,t),a=this.get(i);return a||(a=new ln({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){this.#e.get(e.queryHash)===e&&(e.destroy(),this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){Qt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Et(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>Et(e,t)):t}notify(e){Qt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Qt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Qt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Dn=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new En,this.#t=e.mutationCache||new xn,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=Yt.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=$t.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Tt(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=St(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Qt.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;Qt.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return Qt.batch(()=>{let r=n.findAll(e),i=new Set(r);return r.forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,predicate:e=>i.has(e)},t)})}cancelQueries(e,t={}){let n={revert:!0,...t},r=Qt.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(xt).catch(xt)}invalidateQueries(e,t={}){return Qt.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=Qt.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(xt)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(xt)}async query(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t),r=n.isStaleByTime(Tt(t.staleTime,n))?await n.fetch(t):n.state.data,i=t.select;return i?i(r):r}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(Tt(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(xt).catch(xt)}infiniteQuery(e){return e._type=`infinite`,this.query(e)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(xt).catch(xt)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return $t.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(kt(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{At(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(kt(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{At(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=Ot(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===Ht&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},On=q.createContext(!1),kn=()=>q.useContext(On);On.Provider;function An(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var jn=q.createContext(An()),Mn=()=>q.useContext(jn),Nn=(e,t,n)=>{let r=n?.state.status===`error`&&typeof e.throwOnError==`function`?Wt(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},Pn=e=>{q.useEffect(()=>{e.clearReset()},[e])},Fn=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||Wt(n,[e.error,r])),In=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},Ln=(e,t)=>e?.suspense&&t.isPending,Rn=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function zn({queries:e,...t},n){let r=ht(n),i=kn(),a=Mn(),o=t.subscribed!==!1,s=q.useMemo(()=>e.map(e=>{let t=r.defaultQueryOptions(e);return t._optimisticResults=i?`isRestoring`:o?`optimistic`:void 0,t}),[e,r,i,o]);s.forEach(e=>{In(e);let t=r.getQueryCache().get(e.queryHash);Nn(e,a,t)}),Pn(a);let[c]=q.useState(()=>new Tn(r,s,t)),[l,u,d]=c.getOptimisticResult(s,t.combine),f=!i&&o;q.useSyncExternalStore(q.useCallback(e=>f?c.subscribe(Qt.batchCalls(e)):xt,[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),q.useEffect(()=>{c.setQueries(s,t)},[s,t,c]);let p=l.some((e,t)=>Ln(s[t],e))?l.flatMap((e,t)=>{let n=s[t];return n&&Ln(n,e)?Rn(n,new pn(r,n),a):[]}):[];if(p.length>0)throw Promise.all(p);let m=l.find((e,t)=>{let n=s[t];return n&&Fn({result:e,errorResetBoundary:a,throwOnError:n.throwOnError,query:r.getQueryCache().get(n.queryHash),suspense:n.suspense})});if(m)throw m.error;return u(d())}function Bn(e,t,n){let r=kn(),i=Mn(),a=ht(n),o=a.defaultQueryOptions(e),s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,In(o),Nn(o,i,s),Pn(i);let[l]=q.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),d=!r&&c;if(q.useSyncExternalStore(q.useCallback(e=>{let t=d?l.subscribe(Qt.batchCalls(e)):xt;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),q.useEffect(()=>{l.setOptions(o)},[o,l]),Ln(o,u))throw Rn(o,l,i);if(Fn({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return o.notifyOnChangeProps?u:l.trackResult(u)}function Vn(e,t){return Bn(e,pn,t)}function Hn(e,t){let n=ht(t),[r]=q.useState(()=>new Cn(n,e));q.useEffect(()=>{r.setOptions(e)},[r,e]);let i=q.useSyncExternalStore(q.useCallback(e=>r.subscribe(Qt.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=q.useCallback((...e)=>{r.mutate(e[0],e[1]).catch(xt)},[r]);if(i.error&&Wt(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var Un=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Wn=/^[\\/]{2}/;function Gn(e,t){return t+e.replace(/\\/g,`/`)}var Kn=`popstate`;function qn(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function Jn(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return $n(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:er(t)}return nr(t,n,null,e)}function Yn(e,t){if(e===!1||e==null)throw Error(t)}function Xn(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function Zn(){return Math.random().toString(36).substring(2,10)}function Qn(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function $n(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?tr(t):t,state:n,key:t&&t.key||r||Zn(),mask:i}}function er({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function tr(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function nr(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=qn(e)?e:$n(h.location,e,t);n&&n(r,e),l=u()+1;let d=Qn(r,l),f=h.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=qn(e)?e:$n(h.location,e,t);n&&n(r,e),l=u();let i=Qn(r,l),d=h.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return rr(i,e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(Kn,d),c=e,()=>{i.removeEventListener(Kn,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function rr(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),Yn(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:er(t);return i=i.replace(/ $/,`%20`),!n&&Wn.test(i)&&(i=r+i),new URL(i,r)}var ir=class{#e=new Map;constructor(e){if(e)for(let[t,n]of e)this.set(t,n)}get(e){if(this.#e.has(e))return this.#e.get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw Error(`No value found for context`)}set(e,t){this.#e.set(e,t)}},ar=class extends Error{},or=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`children`,`unstable_validateParams`]);function sr(e){return or.has(e)}var cr=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`middleware`,`children`,`unstable_validateParams`]);function lr(e){return cr.has(e)}function ur(e){return e.index===!0}function dr(e){let t={};return e.Component&&Object.assign(t,{element:q.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:q.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:q.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}function fr(e,t=dr,n=[],r={},i=!1){return e.map((e,a)=>{let o=[...n,String(a)],s=typeof e.id==`string`?e.id:o.join(`-`);if(Yn(e.index!==!0||!e.children,`Cannot specify children on an index route`),Yn(i||!r[s],`Found a route id collision on id "${s}". Route id's must be globally unique within Data Router usages`),ur(e)){let n={...e,id:s};return r[s]=pr(n,t(n)),n}{let n={...e,id:s,children:void 0};return r[s]=pr(n,t(n)),e.children&&(n.children=fr(e.children,t,o,r,i)),n}})}function pr(e,t){return Object.assign(e,{...t,...typeof t.lazy==`object`&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function mr(e,t,n=`/`){return hr(e,t,n,!1)}function hr(e,t,n,r,i){let a=Lr((typeof t==`string`?tr(t):t).pathname||`/`,n);if(a==null)return null;let o=i??_r(e),s=null,c=Ir(a);for(let e=0;s==null&&e<o.length;++e)s=Mr(o[e],c,r);return s}function gr(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,loaderData:t[n.id],handle:n.handle}}function _r(e){let t=vr(e);return br(t),t}function vr(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;Yn(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=qr([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(Yn(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),vr(e.children,t,u,l,o)),(e.path!=null||e.index)&&t.push({path:l,score:Ar(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=Fr(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of yr(e.path))a(e,t,!0,n)}),t}function yr(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=yr(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function br(e){e.sort((e,t)=>e.score===t.score?jr(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var xr=/^:[\w-]+$/,Sr=/^:[\w-]+/,Cr=3.5,wr=3,Tr=2,Er=1,Dr=10,Or=-2,kr=e=>e===`*`;function Ar(e,t){let n=e.split(`/`),r=n.length;return n.some(kr)&&(r+=Or),t&&(r+=Tr),n.filter(e=>!kr(e)).reduce((e,t)=>e+(xr.test(t)?wr:Sr.test(t)?Cr:t===``?Er:Dr),r)}function jr(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function Mr(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?Pr(u,l,s.matcher,s.compiledParams):Nr(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=Nr({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:qr([a,d.pathname]),pathnameBase:Yr(qr([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=qr([a,d.pathnameBase]))}return o}function Nr(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Fr(e.path,e.caseSensitive,e.end);return Pr(e,t,n,r)}function Pr(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=Jr(a,1),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=Jr(a.slice(0,a.length-e.length),1)}let i=s[r];return e[t]=n&&!i?void 0:(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function Fr(e,t=!1,n=!0){Xn(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/((?:[^/?()[\]*^\\]|\\.)+)\?(?=\/|$|\()/g,`(?:/$1)?`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function Ir(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return Xn(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Lr(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function Rr({basename:e,pathname:t}){return t===`/`?e:qr([e,t])}var zr=e=>Un.test(e);function Br(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?tr(e):e,a;return n?(n=Kr(n),a=n.startsWith(`/`)||n.startsWith(`\\`)?Vr(n.substring(1),`/`):Vr(n,t)):a=t,{pathname:a,search:Xr(r),hash:Zr(i)}}function Vr(e,t){let n=Jr(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function Hr(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Ur(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Wr(e){let t=Ur(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Gr(e,t,n,r=!1){let i;typeof e==`string`?i=tr(e):(i={...e},Yn(!i.pathname||!i.pathname.includes(`?`),Hr(`?`,`pathname`,`search`,i)),Yn(!i.pathname||!i.pathname.includes(`#`),Hr(`#`,`pathname`,`hash`,i)),Yn(!i.search||!i.search.includes(`#`),Hr(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=Br(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var Kr=e=>e.replace(/[\\/]{2,}/g,`/`),qr=e=>Kr(e.join(`/`));function Jr(e,t=0){let n=e.length;for(;n>t&&e.charCodeAt(n-1)===47;)n--;return n===e.length?e:e.slice(0,n)}var Yr=e=>Jr(e).replace(/^\/*/,`/`),Xr=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Zr=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Qr=[`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],$r=class{status;statusText;data;error;internal;constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function ei(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function ti(e){return qr(e.map(e=>e.route.path).filter(Boolean))||`/`}function ni(e,t){let n=new URL(typeof e==`string`||e instanceof URL?e:e.url),r=typeof t==`string`?tr(t):t;if(n.pathname=r.pathname||`/`,r.search){let e=new URLSearchParams(r.search),t=e.getAll(`index`);e.delete(`index`);for(let n of t.filter(Boolean))e.append(`index`,n);let i=e.toString();n.search=i?`?${i}`:``}else n.search=``;return n.hash=r.hash||``,n}var ri=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function ii(e,t){let n=e;if(typeof n!=`string`||!Un.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(ri)try{let e=new URL(window.location.href),r=Wn.test(n)?new URL(Gn(n,e.protocol)):new URL(n),a=Lr(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{Xn(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}var ai=Symbol(`Uninstrumented`),oi=new WeakMap;function si(e,t){let n={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(e=>e({id:t.id,index:t.index,path:t.path,instrument(e){e.lazy!=null&&n.lazy.push(e.lazy),e[`lazy.loader`]!=null&&n[`lazy.loader`].push(e[`lazy.loader`]),e[`lazy.action`]!=null&&n[`lazy.action`].push(e[`lazy.action`]),e[`lazy.middleware`]!=null&&n[`lazy.middleware`].push(e[`lazy.middleware`]),e.middleware!=null&&n.middleware.push(e.middleware),e.loader!=null&&n.loader.push(e.loader),e.action!=null&&n.action.push(e.action)}}));let r={};if(typeof t.lazy==`function`&&n.lazy.length>0){let e=t.lazy;r.lazy=async(...t)=>pi(await mi(n.lazy,void 0,()=>e(...t),hi))}if(typeof t.lazy==`object`){let e=t.lazy;if(typeof e.middleware==`function`&&n[`lazy.middleware`].length>0){let t=e.middleware;r.lazy=Object.assign(r.lazy||{},{middleware:async(...e)=>pi(await mi(n[`lazy.middleware`],void 0,()=>t(...e),hi))})}if(typeof e.loader==`function`&&n[`lazy.loader`].length>0){let t=e.loader;r.lazy=Object.assign(r.lazy||{},{loader:async(...e)=>pi(await mi(n[`lazy.loader`],void 0,()=>t(...e),hi))})}if(typeof e.action==`function`&&n[`lazy.action`].length>0){let t=e.action;r.lazy=Object.assign(r.lazy||{},{action:async(...e)=>pi(await mi(n[`lazy.action`],void 0,()=>t(...e),hi))})}}if(typeof t.loader==`function`&&n.loader.length>0){let e=li(t.loader),i=async(...t)=>pi(await mi(n.loader,gi(t[0]),()=>e(...t),hi));e.hydrate===!0&&(i.hydrate=!0),ui(i,e),r.loader=i}if(typeof t.action==`function`&&n.action.length>0){let e=li(t.action),i=async(...t)=>pi(await mi(n.action,gi(t[0]),()=>e(...t),hi));ui(i,e),r.action=i}return t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map(e=>{let t=li(e),r=async(...e)=>pi(await mi(n.middleware,gi(e[0]),()=>t(...e),hi));return ui(r,t),r})),r}function ci(e,t){let n={navigate:[],fetch:[]};if(t.forEach(e=>e({instrument(e){e.navigate!=null&&n.navigate.push(e.navigate),e.fetch!=null&&n.fetch.push(e.fetch)}})),n.navigate.length>0){let t=li(e.navigate),r=async(...r)=>{let[i,a]=r,o,s={to:typeof i==`number`||typeof i==`string`?i:i?er(i):`.`,..._i(e,a??{})};return pi(await mi(n.navigate,s,async()=>{if(typeof i==`number`)return await t(...r);let n=di(e,e=>{o=e});try{return await t(...r)}finally{n()}},e=>({...hi(e),meta:o})))};ui(r,t),e.navigate=r}if(n.fetch.length>0){let t=li(e.fetch),r=async(...r)=>{let[i,a,o,s]=r,c;return pi(await mi(n.fetch,{href:o??`.`,fetcherKey:i,..._i(e,s??{})},async()=>{let n=di(e,e=>{c=e});try{return await t(...r)}finally{n()}},e=>({...hi(e),meta:c})))};ui(r,t),e.fetch=r}return e}function li(e){return e[ai]??e}function ui(e,t){e[ai]=t}function di(e,t){return oi.set(e,t),()=>{oi.get(e)===t&&oi.delete(e)}}function fi(e){let t=oi.get(e);return oi.delete(e),t}function pi(e){if(e.type===`error`)throw e.value;return e.value}async function mi(e,t,n,r,i={result:null,innerResult:null},a=e.length-1){let o=e[a];if(o){let s,c=async()=>(s?console.error(`You cannot call instrumented handlers more than once`):s=mi(e,t,n,r,i,a-1),await s,Yn(i.innerResult,`Expected an inner result`),i.innerResult);try{await o(c,t)}catch(e){console.error(`An instrumentation function threw an error:`,e)}s||await c(),await s}else{try{i.result={type:`success`,value:await n()}}catch(e){i.result={type:`error`,value:e}}i.innerResult=r(i.result,t)}return i.result||(i.result={type:`error`,value:Error(`No result assigned in instrumentation chain.`)},i.innerResult=r(i.result,t)),i.result}function hi(e){return e.type===`error`&&e.value instanceof Error?{status:`error`,error:e.value}:{status:`success`,error:void 0}}function gi(e){let{request:t,context:n,params:r}=e;return{...e,request:vi(t),params:{...r},context:yi(n)}}function _i(e,t){return{currentUrl:er(e.state.location),...`formMethod`in t?{formMethod:t.formMethod}:{},...`formEncType`in t?{formEncType:t.formEncType}:{},...`formData`in t?{formData:t.formData}:{},...`body`in t?{body:t.body}:{}}}function vi(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function yi(e){return{get:t=>e.get(t)}}var bi=class{#e=[];#t=[];#n;constructor(e){this.#n=e}update(e){this.#e=e,this.#t=_r(e)}match(e,t=!1){return hr(this.#e,e,this.#n,t,this.#t)}},xi=new URL(`http://localhost`);function Si(e){if(e.createURL)return e.createURL(`/`);try{return new URL(e.createHref(`/`),xi)}catch{return xi}}function Ci(e,t){return e.origin===t.origin&&(e.origin!==`null`||e.protocol===t.protocol&&e.host===t.host)}function wi(e,t){if(e.startsWith(`//`))return!0;let n=t.protocol.toLowerCase();return e.toLowerCase().startsWith(n)?t.host===``||e.slice(n.length).startsWith(`//`):!1}function Ti(e,t,n,r){let i=null;try{i=e==null?null:new URL(e,n)}catch{}let a=new URL(t,n),o=i!=null&&!Ci(i,n),s=!Ci(a,n);if(r===`reject`){if(o||s)throw Error(`External navigation is not allowed`)}else if(s&&(i==null||!wi(e,i)||!Ci(i,a)))throw Error(`External navigation is not allowed`)}var Ei=[`POST`,`PUT`,`PATCH`,`DELETE`],Di=new Set(Ei),Oi=[`GET`,...Ei],ki=new Set(Oi),Ai=new Set([301,302,303,307,308]),ji=new Set([307,308]),Mi={state:`idle`,location:void 0,matches:void 0,historyAction:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ni={state:`idle`,data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Pi={state:`unblocked`,proceed:void 0,reset:void 0,location:void 0},Fi=`remix-router-transitions`,Ii=Symbol(`ResetLoaderData`);function Li(e,t){return e.unstable_routePatternMatching?(Yn(void 0,`You must call unstable_preloadRoutePattern() from "react-router/route-pattern" before enabling future.unstable_routePatternMatching.`),new(void 0)(t)):new bi(t)}var Ri=class{#e;#t;#n;constructor(e,t){this.#e=e,this.#n=t,this.#n.update(e)}get stableRoutes(){return this.#e}get activeRoutes(){return this.#t??this.#e}get hasHMRRoutes(){return this.#t!=null}setRoutes(e){this.#e=e,this.#t||this.#n.update(e)}setHmrRoutes(e){this.#t=e,this.#n.update(e)}commitHmrRoutes(){this.#t&&(this.#e=this.#t,this.#t=void 0,this.#n.update(this.#e))}},zi=new WeakMap;function Bi(e){let t=e.window?e.window:typeof window<`u`?window:void 0,n=t!==void 0&&t.document!==void 0&&t.document.createElement!==void 0;Yn(e.routes.length>0,`You must provide a non-empty routes array to createRouter`);let r=e.hydrationRouteProperties||[],i=e.mapRouteProperties,a=i||(()=>({}));if(e.instrumentations){let t=e.instrumentations;a=e=>({...i?.(e),...si(t.map(e=>e.route).filter(Boolean),e)})}let o={...e.future},s=e.basename||`/`;s.startsWith(`/`)||(s=`/${s}`);let c=Li(o,s),l={},u=new Ri(fr(e.routes,a,void 0,l),c),d=e.dataStrategy||ra,f=null,p=new Set,m=null,h=null,g=null,_=e.hydrationData!=null,v=c.match(e.history.location),y=!1,b=null,x,S;if(v==null&&!e.patchRoutesOnNavigation){let t=Da(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=Ea(u.activeRoutes);x=!0,S=!x,v=n,b={[r.id]:t}}else if(v&&!e.hydrationData&&G(v,e.history.location.pathname).active&&(v=null),!v){x=!1,S=!x,v=[];let t=G(null,e.history.location.pathname);t.active&&t.matches&&(y=!0,v=t.matches)}else if(v.some(e=>e.route.lazy))x=!1,S=!x;else if(!v.some(e=>Gi(e.route)))x=!0,S=!x;else{let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null,r=v;if(n){let e=v.findIndex(e=>n[e.route.id]!==void 0);r=r.slice(0,e+1)}S=!1,x=!0,r.forEach(e=>{let r=Ki(e.route,t,n);S||=r.renderFallback,x&&=!r.shouldLoad})}let C,w={historyAction:e.history.action,location:e.history.location,matches:v,initialized:x,renderFallback:S,navigation:Mi,restoreScrollPosition:e.hydrationData==null&&null,preventScrollReset:!1,revalidation:`idle`,loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||b,fetchers:new Map,blockers:new Map},T=`POP`,E=0,D,O=null,k=!1,A,j=!1,M=new Map,N=null,P=!1,ee=!1,F=new Set,I=new Map,L=0,te=-1,R=new Map,z=new Set,B=new Map,ne=new Map,re=new Set,ie=new Map,ae,oe=null;function V(){if(f=e.history.listen(({action:t,location:n,delta:r})=>{if(ae){ae(),ae=void 0;return}Xn(ie.size===0||r!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let i=Le({currentLocation:w.location,nextLocation:n,historyAction:t});if(i&&r!=null){let t=new Promise(e=>{ae=e});e.history.go(r*-1),Ie(i,{state:`blocked`,location:n,proceed(){Ie(i,{state:`proceeding`,proceed:void 0,reset:void 0,location:n}),t.then(()=>e.history.go(r))},reset(){let e=new Map(w.blockers);e.set(i,Pi),ce({blockers:e})}}),O?.resolve(),O=null}else return o.unstable_customRouteDiscovery&&(E+=r||0),fe(t,n)}),n){Qa(t,M);let e=()=>$a(t,M);t.addEventListener(`pagehide`,e),N=()=>t.removeEventListener(`pagehide`,e)}return w.initialized||fe(`POP`,w.location,{initialHydration:!0}),C}function se(){f&&f(),N&&N(),p.clear(),A&&A.abort(),w.fetchers.forEach((e,t)=>Oe(w.fetchers,t)),w.blockers.forEach((e,t)=>Fe(t))}function H(e){return p.add(e),()=>p.delete(e)}function ce(e,t={}){let n=e.errors??null,r=n?zi.get(n):void 0;r!==void 0&&(n=r),(e.errors!==void 0||e.initialized)&&(w.errors&&zi.delete(w.errors),e.errors&&zi.set(e.errors,n)),e.matches&&=e.matches.map(e=>{let t=l[e.route.id],n=e.route;return n.element!==t.element||n.errorElement!==t.errorElement||n.hydrateFallbackElement!==t.hydrateFallbackElement?{...e,route:t}:e}),w={...w,...e};let i=[],a=[];w.fetchers.forEach((e,t)=>{e.state===`idle`&&(re.has(t)?i.push(t):a.push(t))}),re.forEach(e=>{!w.fetchers.has(e)&&!I.has(e)&&i.push(e)}),[...p].forEach(e=>e(w,{deletedFetchers:i,newErrors:n,viewTransitionOpts:t.viewTransitionOpts,flushSync:t.flushSync===!0})),i.forEach(e=>Oe(w.fetchers,e)),a.forEach(e=>w.fetchers.delete(e))}function le(t,n,{flushSync:r}={}){let i=w.actionData!=null&&w.navigation.formMethod!=null&&Ha(w.navigation.formMethod)&&w.navigation.state===`loading`&&t.state?._isRedirect!==!0,a;a=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:i?w.actionData:null;let o=n.loaderData?Ca(w.loaderData,n.loaderData,n.matches||[],n.errors):w.loaderData,s=w.blockers;s.size>0&&!P&&(s=new Map(s),s.forEach((e,t)=>s.set(t,Pi)));let c=!P&&He(t,n.matches||w.matches),l=k===!0||w.navigation.formMethod!=null&&Ha(w.navigation.formMethod)&&t.state?._isRedirect!==!0;u.commitHmrRoutes(),P||T===`POP`||(T===`PUSH`?e.history.push(t,t.state):T===`REPLACE`&&e.history.replace(t,t.state));let d;if(T===`POP`&&!P&&t!==w.location){let e=M.get(w.location.pathname);e&&e.has(t.pathname)?d={currentLocation:w.location,nextLocation:t}:M.has(t.pathname)&&(d={currentLocation:t,nextLocation:w.location})}else if(j){let e=M.get(w.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),M.set(w.location.pathname,e)),d={currentLocation:w.location,nextLocation:t}}ce({...n,actionData:a,loaderData:o,historyAction:T,location:t,initialized:!0,renderFallback:!1,navigation:Mi,revalidation:`idle`,restoreScrollPosition:c,preventScrollReset:l,blockers:s},{viewTransitionOpts:d,flushSync:r===!0}),U(),O?.resolve(),O=null,oe?.resolve(),oe=null}function U(){E=0,T=`POP`,k=!1,j=!1,P=!1,ee=!1}async function ue(t,n){if(D&&await D,O?.resolve(),O=null,typeof t==`number`){O||=eo();let n=O.promise;return e.history.go(t),n}let r=fi(C),{path:i,submission:a,error:o}=Ui(!1,Hi(w.location,w.matches,s,t,n?.fromRouteId,n?.relative),n),c;if(n?.mask){let t=typeof n.mask==`string`?tr(n.mask):{...w.location.mask,...n.mask};if(c={pathname:t.pathname??``,search:t.search??``,hash:t.hash??``},Wn.test(c.pathname))throw Error(`External navigation is not allowed`);c.pathname.startsWith(`\\`)&&(c.pathname=c.pathname.replace(/^\\+/,`/`)),Ti(typeof n.mask==`string`?n.mask:er(n.mask),er(c),e.history.createURL(`/`),`reject`)}let l=w.location,u=$n(l,i,n&&n.state,void 0,c);u={...u,...e.history.encodeLocation(u)},Ti(t==null?e.history.createHref(w.location):typeof t==`string`?t:er(t),e.history.createHref(u.mask||u),e.history.createURL(`/`),`reject`);let d=n&&n.replace!=null?n.replace:void 0,f=`PUSH`;d===!0?f=`REPLACE`:d===!1||a!=null&&Ha(a.formMethod)&&a.formAction===w.location.pathname+w.location.search&&(f=`REPLACE`);let p=n&&`preventScrollReset`in n?n.preventScrollReset===!0:void 0,m=(n&&n.flushSync)===!0,h=Le({currentLocation:l,nextLocation:u,historyAction:f});h?Ie(h,{state:`blocked`,location:u,proceed(){Ie(h,{state:`proceeding`,proceed:void 0,reset:void 0,location:u}),ue(t,n)},reset(){let e=new Map(w.blockers);e.set(h,Pi),ce({blockers:e})}}):await fe(f,u,{submission:a,pendingError:o,preventScrollReset:p,replace:n&&n.replace,enableViewTransition:n&&n.viewTransition,flushSync:m,callSiteDefaultShouldRevalidate:n&&n.defaultShouldRevalidate,instrumentationNavigateMetaReceiver:r})}function de(){if(D)return D.then(de);oe||=eo(),Ce(),ce({revalidation:`loading`});let e=oe.promise;return w.navigation.state===`submitting`?e:w.navigation.state===`idle`?(fe(w.historyAction,w.location,{startUninterruptedRevalidation:!0,dataStrategyInitiator:`revalidation`}),e):(fe(T||w.historyAction,w.navigation.location,{overrideNavigation:w.navigation,dataStrategyInitiator:`revalidation`,enableViewTransition:j===!0}),e)}async function fe(t,n,r){D&&await D,A&&A.abort(),A=null,T=t,P=(r&&r.startUninterruptedRevalidation)===!0,Ve(w.location,w.matches),k=(r&&r.preventScrollReset)===!0,j=(r&&r.enableViewTransition)===!0;let i=r?.initialHydration&&w.matches&&w.matches.length>0&&!y?w.matches:c.match(n),a=(r&&r.flushSync)===!0;if(i&&w.initialized&&!ee&&Aa(w.location,n)&&!(r&&r.submission&&Ha(r.submission.formMethod))){le(n,{matches:i},{flushSync:a});return}let o=G(i,n.pathname);if(o.active&&o.matches&&(i=o.matches),r?.instrumentationNavigateMetaReceiver){let t=Ga(e.history,n,i);r.instrumentationNavigateMetaReceiver(t)}if(!i){let{error:e,notFoundMatches:t,route:r}=Re(n.pathname);le(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:a});return}let s=r&&r.overrideNavigation?{...r.overrideNavigation,matches:i,historyAction:t}:void 0;A=new AbortController;let l=va(e.history,n,A.signal,r&&r.submission),u=r?.initialHydration?`initialization`:r?.dataStrategyInitiator??`navigation`,d=e.getContext?await e.getContext():new ir,f;if(r&&r.pendingError)f=[Ta(i).route.id,{type:`error`,error:r.pendingError}];else if(r&&r.submission&&Ha(r.submission.formMethod)){let c=await me(l,u,n,r.submission,i,t,d,o.active,r&&r.initialHydration===!0,{replace:r.replace,flushSync:a});if(c.shortCircuited)return;if(c.pendingActionResult){let[e,t]=c.pendingActionResult;if(Fa(t)&&ei(t.error)&&t.error.status===404){A=null,le(n,{matches:c.matches,loaderData:{},errors:{[e]:t.error}});return}}i=c.matches||i,f=c.pendingActionResult,s=qa(n,i,t,r.submission),a=!1,o.active=!1,l=va(e.history,l.url,l.signal)}let{shortCircuited:p,matches:m,loaderData:h,errors:g,workingFetchers:_}=await he(l,u,n,i,t,d,o.active,s,r&&r.submission,r&&r.fetcherSubmission,r&&r.replace,r&&r.initialHydration===!0,a,f,r&&r.callSiteDefaultShouldRevalidate);p||(A=null,le(n,{matches:m||i,...wa(f),loaderData:h,errors:g,..._?{fetchers:_}:{}}))}function pe(){let t=eo();D=t.promise;let n=E,r=O;O=null,A?.abort(),A=null,U(),oe?.resolve(),oe=null;let i=new Map(w.blockers);i.forEach((e,t)=>{e.state===`proceeding`&&i.set(t,Pi)});let a=new Map(w.fetchers),o=Me(a);a.forEach((e,t)=>{e.state===`loading`&&!I.has(t)&&(a.set(t,Za(e.data)),o=!0)}),F.clear(),ce({navigation:Mi,revalidation:`idle`,blockers:i,...o?{fetchers:a}:{}});function s(){D=void 0,r?.resolve(),t.resolve()}return n?(ae=s,e.history.go(-n)):s(),t.promise}async function me(t,n,i,c,d,f,p,m,h,g={}){if(o.unstable_customRouteDiscovery||Ce(),ce({navigation:Ja(i,d,f,c)},{flushSync:g.flushSync===!0}),m){let e=await Ue(d,i.pathname,t.signal);if(o.unstable_customRouteDiscovery&&t.signal.aborted||e.type===`aborted`)return{shortCircuited:!0};if(e.type===`cancelled`)return await pe(),{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=Ea(u.activeRoutes);return{matches:t,pendingActionResult:[n.id,{type:`error`,error:e.error}]}}let t=Ta(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:`error`,error:e.error}]}}if(e.matches)d=e.matches;else{let{notFoundMatches:e,error:t,route:n}=Re(i.pathname);return{matches:e,pendingActionResult:[n.id,{type:`error`,error:t}]}}}o.unstable_customRouteDiscovery&&Ce();let _,v=Wa(d,i);if(!v.route.action&&!v.route.lazy)_={type:`error`,error:Da(405,{method:t.method,pathname:i.pathname,routeId:v.route.id})};else{let e=await W(t,i,la(a,l,t,i,d,v,h?[]:r,p),p,null,n,f);if(_=e[v.route.id],!_){for(let t of d)if(e[t.route.id]){_=e[t.route.id];break}}if(t.signal.aborted)return{shortCircuited:!0}}if(Ia(_)){let r;return r=g&&g.replace!=null?g.replace:_a(_.response.headers.get(`Location`),new URL(t.url),s,e.history)===w.location.pathname+w.location.search,await xe(t,_,!0,n,{submission:c,replace:r}),{shortCircuited:!0}}if(Fa(_)){let e=Ta(d,v.route.id);return(g&&g.replace)!==!0&&(T=`PUSH`),{matches:d,pendingActionResult:[e.route.id,_,v.route.id]}}return{matches:d,pendingActionResult:[v.route.id,_]}}async function he(t,n,i,s,d,f,p,m,h,g,_,v,y,b,x){let S=m||qa(i,s,d,h),C=h||g||Ka(S),T=!P&&!v;if(p){if(T){let e=ge(b);ce({navigation:S,...e===void 0?{}:{actionData:e}},{flushSync:y})}let e=await Ue(s,i.pathname,t.signal);if(o.unstable_customRouteDiscovery&&t.signal.aborted||e.type===`aborted`)return{shortCircuited:!0};if(e.type===`cancelled`)return await pe(),{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=Ea(u.activeRoutes);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=Ta(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(e.matches)s=e.matches,v&&!t.signal.aborted&&ce({matches:s});else{let{error:e,notFoundMatches:t,route:n}=Re(i.pathname);return{matches:t,loaderData:{},errors:{[n.id]:e}}}}let{dsMatches:E,revalidatingFetchers:D}=Wi(t,f,a,l,e.history,w,s,C,i,v?[]:r,v===!0,ee,F,re,B,z,c,b,x);if(te=++L,!e.dataStrategy&&!E.some(e=>e.shouldLoad)&&!E.some(e=>e.route.middleware&&e.route.middleware.length>0)&&D.length===0){let e=new Map(w.fetchers),t=Me(e);return le(i,{matches:s,loaderData:{},errors:b&&Fa(b[1])?{[b[0]]:b[1].error}:null,...wa(b),...t?{fetchers:e}:{}},{flushSync:y}),{shortCircuited:!0}}if(T){let e={};if(!p){e.navigation=S;let t=ge(b);t!==void 0&&(e.actionData=t)}D.length>0&&(e.fetchers=_e(D)),ce(e,{flushSync:y})}D.forEach(e=>{Ae(e.key),e.controller&&I.set(e.key,e.controller)});let O=()=>D.forEach(e=>Ae(e.key));A&&A.signal.addEventListener(`abort`,O);let{loaderResults:k,fetcherResults:j}=await Se(E,D,t,i,f,n,d);if(t.signal.aborted)return{shortCircuited:!0};A&&A.signal.removeEventListener(`abort`,O),D.forEach(e=>I.delete(e.key));let M=Oa(k);if(M)return await xe(t,M.result,!0,n,{replace:_}),{shortCircuited:!0};if(M=Oa(j),M)return z.add(M.key),await xe(t,M.result,!0,n,{replace:_}),{shortCircuited:!0};let N=new Map(w.fetchers),{loaderData:R,errors:ne}=Sa(w,s,k,b,D,j,N);if(v&&w.errors){let e=ne??null;ne={...w.errors,...ne},zi.set(ne,e)}let ie=Me(N),ae=Ne(te,N),oe=ie||ae||D.length>0;return{matches:s,loaderData:R,errors:ne,...oe?{workingFetchers:N}:{}}}function ge(e){if(e&&!Fa(e[1]))return{[e[0]]:e[1].data};if(w.actionData)return Object.keys(w.actionData).length===0?null:w.actionData}function _e(e){let t=new Map(w.fetchers);return e.forEach(e=>{let n=t.get(e.key),r=Ya(void 0,n?n.data:void 0);t.set(e.key,r)}),t}async function ve(t,n,r,i){D&&await D,Ae(t);let a=(i&&i.flushSync)===!0,o=fi(C),l=Hi(w.location,w.matches,s,r,n,i?.relative),u=c.match(l),d=G(u,l);if(d.active&&d.matches&&(u=d.matches),o&&o(Ga(e.history,l,u)),!u){Te(t,n,Da(404,{pathname:l}),{flushSync:a});return}let{path:f,submission:p,error:m}=Ui(!0,l,i);if(m){Te(t,n,m,{flushSync:a});return}let h=e.getContext?await e.getContext():new ir,g=(i&&i.preventScrollReset)===!0;if(p&&Ha(p.formMethod)){await ye(t,n,f,u,h,d.active,a,g,p,i&&i.defaultShouldRevalidate);return}let _={routeId:n,path:f,isDiscovering:d.active};B.set(t,_),await be(t,_,u,h,a,g,p)}async function ye(t,n,i,s,u,d,f,p,m,h){o.unstable_customRouteDiscovery||Ce(),B.delete(t);let g=w.fetchers.get(t);we(t,Xa(m,g),{flushSync:f});let _=new AbortController;o.unstable_customRouteDiscovery&&I.set(t,_);let v=va(e.history,i,_.signal,m);if(d){let e=await Ue(s,new URL(v.url).pathname,v.signal,t);if(o.unstable_customRouteDiscovery&&v.signal.aborted||e.type===`aborted`)return;if(e.type===`cancelled`){I.delete(t),B.delete(t),we(t,Za(g?.data),{flushSync:f});return}if(e.type===`error`){Te(t,n,e.error,{flushSync:f});return}if(e.matches)s=e.matches;else{Te(t,n,Da(404,{pathname:i}),{flushSync:f});return}}let y=Wa(s,i);if(!y.route.action&&!y.route.lazy){Te(t,n,Da(405,{method:m.formMethod,pathname:i,routeId:n}),{flushSync:f});return}o.unstable_customRouteDiscovery&&Ce(),I.set(t,_);let b=L,x=la(a,l,v,i,s,y,r,u),S=await W(v,i,x,u,t,`fetcher`),C=S[y.route.id];if(!C){for(let e of x)if(S[e.route.id]){C=S[e.route.id];break}}if(v.signal.aborted){I.get(t)===_&&I.delete(t);return}if(re.has(t)){if(Ia(C)||Fa(C)){we(t,Za(void 0));return}}else{if(Ia(C)){if(I.delete(t),te>b){we(t,Za(void 0));return}return z.add(t),we(t,Ya(m)),xe(v,C,!1,`fetcher`,{fetcherSubmission:m,preventScrollReset:p})}if(Fa(C)){Te(t,n,C.error);return}}let E=w.navigation.location||w.location,D=va(e.history,E,_.signal),O=w.navigation.state===`idle`?w.matches:c.match(w.navigation.location);Yn(O,`Didn't find any matches after fetcher action`);let k=++L;R.set(t,k);let{dsMatches:j,revalidatingFetchers:M}=Wi(D,u,a,l,e.history,w,O,m,E,r,!1,ee,F,re,B,z,c,[y.route.id,C],h),N=Ya(m,C.data),P=new Map(w.fetchers);P.set(t,N),M.filter(e=>e.key!==t).forEach(e=>{let t=e.key,n=P.get(t),r=Ya(void 0,n?n.data:void 0);P.set(t,r),Ae(t),e.controller&&I.set(t,e.controller)}),ce({fetchers:P});let ne=()=>M.forEach(e=>Ae(e.key));_.signal.addEventListener(`abort`,ne);let{loaderResults:ie,fetcherResults:ae}=await Se(j,M,D,E,u,`fetcher`);if(_.signal.aborted){R.get(t)===k&&R.delete(t);return}_.signal.removeEventListener(`abort`,ne),R.delete(t),I.delete(t),M.forEach(e=>I.delete(e.key));let oe=w.fetchers.has(t),V=e=>{if(!oe)return e;let n=new Map(e.fetchers);return n.set(t,Za(C.data)),{...e,fetchers:n}},se=Oa(ie);if(se)return w=V(w),xe(D,se.result,!1,`fetcher`,{preventScrollReset:p});if(se=Oa(ae),se)return z.add(se.key),w=V(w),xe(D,se.result,!1,`fetcher`,{preventScrollReset:p});let H=new Map(w.fetchers);oe&&H.set(t,Za(C.data));let{loaderData:U,errors:ue}=Sa(w,O,ie,void 0,M,ae,H);Ne(k,H),w.navigation.state===`loading`&&k>te?(Yn(T,`Expected pending action`),A&&A.abort(),le(w.navigation.location,{matches:O,loaderData:U,errors:ue,fetchers:H})):(ce({errors:ue,loaderData:Ca(w.loaderData,U,O,ue),fetchers:H}),ee=!1)}async function be(t,n,i,s,c,u,d){let{routeId:f,path:p}=n,m=w.fetchers.get(t);we(t,Ya(d,m?m.data:void 0),{flushSync:c});let h=new AbortController;o.unstable_customRouteDiscovery&&I.set(t,h);let g=va(e.history,p,h.signal);if(n.isDiscovering){let e=await Ue(i,new URL(g.url).pathname,g.signal,t);if(o.unstable_customRouteDiscovery&&g.signal.aborted||e.type===`aborted`)return;if(e.type===`cancelled`){I.delete(t),B.delete(t),we(t,Za(m?.data),{flushSync:c});return}if(e.type===`error`){Te(t,f,e.error,{flushSync:c});return}if(e.matches)i=e.matches,n.isDiscovering=!1;else{Te(t,f,Da(404,{pathname:p}),{flushSync:c});return}}let _=Wa(i,p);I.set(t,h);let v=L,y=await W(g,p,la(a,l,g,p,i,_,r,s),s,t,`fetcher`),b=y[_.route.id];if(!b){for(let e of i)if(y[e.route.id]){b=y[e.route.id];break}}if(I.get(t)===h&&I.delete(t),!g.signal.aborted){if(re.has(t))we(t,Za(void 0));else{if(Ia(b)){if(te>v){we(t,Za(void 0));return}z.add(t),await xe(g,b,!1,`fetcher`,{preventScrollReset:u});return}Fa(b)?Te(t,f,b.error):we(t,Za(b.data))}}}async function xe(r,i,a,o,{submission:c,fetcherSubmission:l,preventScrollReset:u,replace:d}={}){a||(O?.resolve(),O=null),i.response.headers.has(`X-Remix-Revalidate`)&&(ee=!0);let f=i.response.headers.get(`Location`);Yn(f,`Expected a Location header on the redirect Response`);let p=f,m=new URL(r.url);f=_a(f,m,s,e.history),Ti(p,f,m,`allow-explicit`);let h=$n(w.location,f,{_isRedirect:!0});if(n){let e=!1;if(i.response.headers.has(`X-Remix-Reload-Document`))e=!0;else if(zr(f)){let n=rr(t,f,!0);e=n.origin!==t.location.origin||Lr(n.pathname,s)==null}if(e){d?t.location.replace(f):t.location.assign(f);return}}A=null;let g=d===!0||i.response.headers.has(`X-Remix-Replace`)?`REPLACE`:`PUSH`,{formMethod:_,formAction:v,formEncType:y}=w.navigation;!c&&!l&&_&&v&&y&&(c=Ka(w.navigation));let b=c||l;ji.has(i.response.status)&&b&&Ha(b.formMethod)?await fe(g,h,{submission:{...b,formAction:f},preventScrollReset:u||k,enableViewTransition:a?j:void 0,dataStrategyInitiator:o}):await fe(g,h,{overrideNavigation:qa(h,[],g,c),fetcherSubmission:l,preventScrollReset:u||k,enableViewTransition:a?j:void 0,dataStrategyInitiator:o})}async function W(e,t,n,r,i,a,o=null){let c,l={};try{c=await ua(d,e,t,n,i,a,r,!1,o)}catch(e){return n.filter(e=>e.shouldLoad).forEach(t=>{l[t.route.id]={type:`error`,error:e}}),l}if(e.signal.aborted)return l;if(!Ha(e.method))for(let e of n){if(c[e.route.id]?.type===`error`)break;c.hasOwnProperty(e.route.id)||w.loaderData.hasOwnProperty(e.route.id)||w.errors&&w.errors.hasOwnProperty(e.route.id)||!e.shouldCallHandler()||(c[e.route.id]={type:`error`,result:Error(`No result returned from dataStrategy for route ${e.route.id}`)})}for(let[t,r]of Object.entries(c))if(Pa(r)){let i=r.result;l[t]={type:`redirect`,response:ma(i,e,t,n,s)}}else l[t]=await pa(r);return l}async function Se(e,t,n,r,i,a,o=null){let s=W(n,r,e,i,null,a,o),c=Promise.all(t.map(async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await W(e.request,e.path,e.matches,i,e.key,a,o))[e.match.route.id];return{[e.key]:t}}return Promise.resolve({[e.key]:{type:`error`,error:Da(404,{pathname:e.path})}})}));return{loaderResults:await s,fetcherResults:(await c).reduce((e,t)=>Object.assign(e,t),{})}}function Ce(){ee=!0,B.forEach((e,t)=>{o.unstable_customRouteDiscovery&&e.isDiscovering||(I.has(t)&&F.add(t),Ae(t))})}function we(e,t,n={}){let r=new Map(w.fetchers);r.set(e,t),ce({fetchers:r},{flushSync:(n&&n.flushSync)===!0})}function Te(e,t,n,r={}){let i=Ta(w.matches,t),a=new Map(w.fetchers);Oe(a,e),ce({errors:{[i.route.id]:n},fetchers:a},{flushSync:(r&&r.flushSync)===!0})}function Ee(e){return ne.set(e,(ne.get(e)||0)+1),re.has(e)&&re.delete(e),w.fetchers.get(e)||Ni}function De(e,t){Ae(e,t?.reason),B.delete(e),F.delete(e),we(e,Za(null))}function Oe(e,t){let n=w.fetchers.get(t);I.has(t)&&!(n&&n.state===`loading`&&R.has(t))&&Ae(t),B.delete(t),R.delete(t),z.delete(t),re.delete(t),F.delete(t),e.delete(t)}function ke(e){let t=(ne.get(e)||0)-1;t<=0?(ne.delete(e),re.add(e)):ne.set(e,t),ce({fetchers:new Map(w.fetchers)})}function Ae(e,t){let n=I.get(e);n&&(n.abort(t),I.delete(e))}function je(e,t){for(let n of e){let e=t.get(n);Yn(e,`Expected fetcher: ${n}`);let r=Za(e.data);t.set(n,r)}}function Me(e){let t=[],n=!1;for(let r of z){let i=e.get(r);Yn(i,`Expected fetcher: ${r}`),i.state===`loading`&&(z.delete(r),t.push(r),n=!0)}return je(t,e),n}function Ne(e,t){let n=[];for(let[r,i]of R)if(i<e){let e=t.get(r);Yn(e,`Expected fetcher: ${r}`),e.state===`loading`&&(Ae(r),R.delete(r),n.push(r))}return je(n,t),n.length>0}function Pe(e,t){let n=w.blockers.get(e)||Pi;return ie.get(e)!==t&&ie.set(e,t),n}function Fe(e){w.blockers.delete(e),ie.delete(e)}function Ie(e,t){let n=w.blockers.get(e)||Pi;Yn(n.state===`unblocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`proceeding`||n.state===`blocked`&&t.state===`unblocked`||n.state===`proceeding`&&t.state===`unblocked`,`Invalid blocker state transition: ${n.state} -> ${t.state}`);let r=new Map(w.blockers);r.set(e,t),ce({blockers:r})}function Le({currentLocation:e,nextLocation:t,historyAction:n}){if(ie.size===0)return;ie.size>1&&Xn(!1,`A router only supports one blocker at a time`);let r=Array.from(ie.entries()),[i,a]=r[r.length-1],o=w.blockers.get(i);if(!(o&&o.state===`proceeding`)&&a({currentLocation:e,nextLocation:t,historyAction:n}))return i}function Re(e){let t=Da(404,{pathname:e}),n=u.activeRoutes,{matches:r,route:i}=Ea(n);return{notFoundMatches:r,route:i,error:t}}function ze(e,t,n){if(m=e,g=t,h=n||null,!_&&w.navigation===Mi){_=!0;let e=He(w.location,w.matches);e!=null&&ce({restoreScrollPosition:e})}return()=>{m=null,g=null,h=null}}function Be(e,t){return h&&h(e,t.map(e=>gr(e,w.loaderData)))||e.key}function Ve(e,t){if(m&&g){let n=Be(e,t);m[n]=g()}}function He(e,t){if(m){let n=Be(e,t),r=m[n];if(typeof r==`number`)return r}return null}function G(t,n){if(e.patchRoutesOnNavigation){if(!t)return{active:!0,matches:c.match(n,!0)||[]};if(Object.keys(t[0].params).length>0)return{active:!0,matches:c.match(n,!0)}}return{active:!1,matches:null}}async function Ue(t,n,r,i){if(!e.patchRoutesOnNavigation)return{type:`success`,matches:t};let s=t;for(;;){let t=l;try{await e.patchRoutesOnNavigation({signal:r,path:n,matches:s,fetcherKey:i,patch:(e,n)=>{r.aborted||Xi(e,n,u,t,a,!1)}})}catch(e){if(o.unstable_customRouteDiscovery){if(r.aborted)return{type:`aborted`};if(e instanceof ar)return{type:`cancelled`}}return{type:`error`,error:e,partialMatches:s}}if(r.aborted)return{type:`aborted`};let d=c.match(n),f=null;if(d&&(Object.keys(d[0].params).length===0||(f=c.match(n,!0),!(f&&s.length<f.length&&We(s,f.slice(0,s.length))))))return{type:`success`,matches:d};if(f||=c.match(n,!0),!f||We(s,f))return{type:`success`,matches:null};s=f}}function We(e,t){return e.length===t.length&&e.every((e,n)=>e.route.id===t[n].route.id)}function Ge(e){l={},u.setHmrRoutes(fr(e,a,void 0,l))}function Ke(e,t,n=!1){Xi(e,t,u,l,a,n),u.hasHMRRoutes||ce({})}return C={get basename(){return s},get future(){return o},get state(){return w},get routes(){return u.stableRoutes},match(e){return c.match(e)},get manifest(){return l},get window(){return t},initialize:V,subscribe:H,enableScrollRestoration:ze,navigate:ue,fetch:ve,revalidate:de,createHref:t=>e.history.createHref(t),createURL:t=>e.history.createURL(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:Ee,resetFetcher:De,deleteFetcher:ke,dispose:se,getBlocker:Pe,deleteBlocker:Fe,patchRoutes:Ke,_internalFetchControllers:I,_internalSetRoutes:Ge,_internalSetStateDoNotUseOrYouWillBreakYourApp(e){ce(e)}},e.instrumentations&&(C=ci(C,e.instrumentations.map(e=>e.router).filter(Boolean))),C}function Vi(e){return e!=null&&(`formData`in e&&e.formData!=null||`body`in e&&e.body!==void 0)}function Hi(e,t,n,r,i,a){let o,s;if(i){o=[];for(let e of t)if(o.push(e),e.route.id===i){s=e;break}}else o=t,s=t[t.length-1];let c=Gr(r||`.`,Wr(o),Lr(e.pathname,n)||e.pathname,a===`path`);if(r??(c.search=e.search,c.hash=e.hash),(r==null||r===``||r===`.`)&&s){let e=Ua(c.search);if(s.route.index&&!e)c.search=c.search?c.search.replace(/^\?/,`?index&`):`?index`;else if(!s.route.index&&e){let e=new URLSearchParams(c.search),t=e.getAll(`index`);e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();c.search=n?`?${n}`:``}}return n!==`/`&&(c.pathname=Rr({basename:n,pathname:c.pathname})),er(c)}function Ui(e,t,n){if(!n||!Vi(n))return{path:t};if(n.formMethod&&!Va(n.formMethod))return{path:t,error:Da(405,{method:n.formMethod})};let r=()=>({path:t,error:Da(400,{type:`invalid-body`})}),i=(n.formMethod||`get`).toUpperCase(),a=ka(t);if(n.body!==void 0){if(n.formEncType===`text/plain`){if(!Ha(i))return r();let e=typeof n.body==`string`?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((e,[t,n])=>`${e}${t}=${n}\n`,``):String(n.body);return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}if(n.formEncType===`application/json`){if(!Ha(i))return r();try{let e=typeof n.body==`string`?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:e,text:void 0}}}catch{return r()}}}Yn(typeof FormData==`function`,`FormData is not available in this environment`);let o,s;if(n.formData)o=ya(n.formData),s=n.formData;else if(n.body instanceof FormData)o=ya(n.body),s=n.body;else if(n.body instanceof URLSearchParams)o=n.body,s=ba(o);else if(n.body==null)o=new URLSearchParams,s=new FormData;else try{o=new URLSearchParams(n.body),s=ba(o)}catch{return r()}let c={formMethod:i,formAction:a,formEncType:n&&n.formEncType||`application/x-www-form-urlencoded`,formData:s,json:void 0,text:void 0};if(Ha(c.formMethod))return{path:t,submission:c};let l=tr(t);return e&&l.search&&Ua(l.search)&&o.append(`index`,``),l.search=`?${o}`,{path:er(l),submission:c}}function Wi(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v){let y=_?Fa(_[1])?_[1].error:_[1].data:void 0,b=i.createURL(a.location),x=i.createURL(c),S;if(u&&a.errors){let e=Object.keys(a.errors)[0];S=o.findIndex(t=>t.route.id===e)}else if(_&&Fa(_[1])){let e=_[0];S=o.findIndex(t=>t.route.id===e)-1}let C=_?_[1].statusCode:void 0,w=C&&C>=400,T={currentUrl:b,currentParams:a.matches[0]?.params||{},nextUrl:x,nextParams:o[0].params,...s,actionResult:y,actionStatus:C},E=ti(o),D=o.map((i,o)=>{let{route:s}=i,f=null;if(S!=null&&o>S)f=!1;else if(s.lazy)f=!0;else if(!Gi(s))f=!1;else if(u){let{shouldLoad:e}=Ki(s,a.loaderData,a.errors);f=e}else qi(a.loaderData,a.matches[o],i)&&(f=!0);if(f!==null)return ca(n,r,e,c,E,i,l,t,f);let p=!1;typeof v==`boolean`?p=v:w?p=!1:d||b.pathname+b.search===x.pathname+x.search?p=!0:b.search===x.search?Ji(a.matches[o],i)&&(p=!0):p=!0;let m={...T,defaultShouldRevalidate:p};return ca(n,r,e,c,E,i,l,t,Yi(i,m),m,v)}),O=[];return m.forEach((e,s)=>{if(u||!o.some(t=>t.route.id===e.routeId)||p.has(s)||e.isDiscovering)return;let c=a.fetchers.get(s),m=c&&c.state!==`idle`&&c.data===void 0,_=g.match(e.path);if(!_){O.push({key:s,routeId:e.routeId,path:e.path,matches:null,match:null,request:null,controller:null});return}if(h.has(s))return;let y=Wa(_,e.path),b=new AbortController,x=va(i,e.path,b.signal),S=null;if(f.has(s))f.delete(s),S=la(n,r,x,e.path,_,y,l,t);else if(m)d&&(S=la(n,r,x,e.path,_,y,l,t));else{let i;i=typeof v==`boolean`?v:!w&&d;let a={...T,defaultShouldRevalidate:i};Yi(y,a)&&(S=la(n,r,x,e.path,_,y,l,t,a))}S&&O.push({key:s,routeId:e.routeId,path:e.path,matches:S,match:y,request:x,controller:b})}),{dsMatches:D,revalidatingFetchers:O}}function Gi(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function Ki(e,t,n){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!Gi(e))return{shouldLoad:!1,renderFallback:!1};let r=t!=null&&e.id in t,i=n!=null&&n[e.id]!==void 0;if(!r&&i)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader==`function`&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!r};let a=!r&&!i;return{shouldLoad:a,renderFallback:a}}function qi(e,t,n){let r=!t||n.route.id!==t.route.id,i=!e.hasOwnProperty(n.route.id);return r||i}function Ji(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith(`*`)&&e.params[`*`]!==t.params[`*`]}function Yi(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n==`boolean`)return n}return t.defaultShouldRevalidate}function Xi(e,t,n,r,i,a){let o;if(e){let t=r[e];Yn(t,`No route found to patch children into: routeId = ${e}`),t.children||=[],o=t.children}else o=n.activeRoutes;let s=[],c=[];if(t.forEach(e=>{let t=o.find(t=>Zi(e,t));t?c.push({existingRoute:t,newRoute:e}):s.push(e)}),s.length>0){let t=fr(s,i,[e||`_`,`patch`,String(o?.length||`0`)],r);o.push(...t)}if(a&&c.length>0)for(let e=0;e<c.length;e++){let{existingRoute:t,newRoute:n}=c[e],r=t,[a]=fr([n],i,[],{},!0);Object.assign(r,{element:a.element?a.element:r.element,errorElement:a.errorElement?a.errorElement:r.errorElement,hydrateFallbackElement:a.hydrateFallbackElement?a.hydrateFallbackElement:r.hydrateFallbackElement})}n.hasHMRRoutes||n.setRoutes([...n.activeRoutes])}function Zi(e,t){return`id`in e&&`id`in t&&e.id===t.id?!0:e.index!==t.index||e.path!==t.path||e.caseSensitive!==t.caseSensitive?!1:(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children?.every((e,n)=>t.children?.some(t=>Zi(e,t)))??!1}var Qi=new WeakMap,$i=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let i=n[t.id];if(Yn(i,`No route found in manifest`),!i.lazy||typeof i.lazy!=`object`)return;let a=i.lazy[e];if(!a)return;let o=Qi.get(i);o||(o={},Qi.set(i,o));let s=o[e];if(s)return s;let c=(async()=>{let t=sr(e),n=i[e]!==void 0;if(t)Xn(!t,`Route property `+e+` is not a supported lazy route property. This property will be ignored.`),o[e]=Promise.resolve();else if(n)Xn(!1,`Route "${i.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let t=await a();t!=null&&(Object.assign(i,{[e]:t}),Object.assign(i,r(i)))}typeof i.lazy==`object`&&(i.lazy[e]=void 0,Object.values(i.lazy).every(e=>e===void 0)&&(i.lazy=void 0))})();return o[e]=c,c},ea=new WeakMap;function ta(e,t,n,r,i){let a=n[e.id];if(Yn(a,`No route found in manifest`),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy==`function`){let t=ea.get(a);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let n=(async()=>{Yn(typeof e.lazy==`function`,`No lazy route function found`);let t=await e.lazy(),n={};for(let e in t){let r=t[e];if(r===void 0)continue;let i=lr(e),o=a[e]!==void 0;i?Xn(!i,`Route property `+e+` is not a supported property to be returned from a lazy route function. This property will be ignored.`):o?Xn(!o,`Route "${a.id}" has a static property "${e}" defined but its lazy function is also returning a value for this property. The lazy route property "${e}" will be ignored.`):n[e]=r}Object.assign(a,n),Object.assign(a,{...r(a),lazy:void 0})})();return ea.set(a,n),n.catch(()=>{}),{lazyRoutePromise:n,lazyHandlerPromise:n}}let o=Object.keys(e.lazy),s=[],c;for(let a of o){if(i&&i.includes(a))continue;let o=$i({key:a,route:e,manifest:n,mapRouteProperties:r});o&&(s.push(o),a===t&&(c=o))}let l=s.length>0?Promise.all(s).then(()=>{}):void 0;return l?.catch(()=>{}),c?.catch(()=>{}),{lazyRoutePromise:l,lazyHandlerPromise:c}}async function na(e){let t=e.matches.filter(e=>e.shouldLoad),n={};return(await Promise.all(t.map(e=>e.resolve()))).forEach((e,r)=>{n[t[r].route.id]=e}),n}async function ra(e){return e.matches.some(e=>e.route.middleware)?ia(e,()=>na(e)):na(e)}function ia(e,t){return aa(e,t,e=>{if(Ba(e))throw e;return e},Ma,n);async function n(t,n,r){if(r)return Object.assign(r.value,{[n]:{type:`error`,result:t}});{let{matches:r}=e,i=Math.min(Math.max(r.findIndex(e=>e.route.id===n),0),Math.max(r.findIndex(e=>e.shouldCallHandler()),0)),a=r[i].route.id;for(let e of r.slice(0,i+1))try{await e._lazyPromises?.route}catch{a=e.route.id;break}return{[Ta(r,a).route.id]:{type:`error`,result:t}}}}}async function aa(e,t,n,r,i){let{matches:a,...o}=e;return await oa(o,a.flatMap(e=>e.route.middleware?e.route.middleware.map(t=>[e.route.id,t]):[]),t,n,r,i)}async function oa(e,t,n,r,i,a,o=0){let{request:s}=e;if(s.signal.aborted)throw s.signal.reason??Error(`Request aborted: ${s.method} ${s.url}`);let c=t[o];if(!c)return await n();let[l,u]=c,d,f=async()=>{if(d)throw Error("You may only call `next()` once per middleware");try{return d={value:await oa(e,t,n,r,i,a,o+1)},d.value}catch(e){return d={value:await a(e,l,d)},d.value}};try{let t=await u(e,f),n=t==null?void 0:r(t);return i(n)?n:d?n??d.value:(d={value:await f()},d.value)}catch(e){return await a(e,l,d)}}function sa(e,t,n,r,i){let a=$i({key:`middleware`,route:r.route,manifest:t,mapRouteProperties:e}),o=ta(r.route,Ha(n.method)?`action`:`loader`,t,e,i);return{middleware:a,route:o.lazyRoutePromise,handler:o.lazyHandlerPromise}}function ca(e,t,n,r,i,a,o,s,c,l=null,u){let d=!1,f=sa(e,t,n,a,o);return{...a,_lazyPromises:f,shouldLoad:c,shouldRevalidateArgs:l,shouldCallHandler(e){return d=!0,l?typeof u==`boolean`?Yi(a,{...l,defaultShouldRevalidate:u}):typeof e==`boolean`?Yi(a,{...l,defaultShouldRevalidate:e}):Yi(a,l):c},resolve(e){let{lazy:t,loader:o,middleware:l}=a.route,u=d||c||e&&!Ha(n.method)&&(t||o),p=l&&l.length>0&&!o&&!t;return u&&(Ha(n.method)||!p)?da({request:n,path:r,pattern:i,match:a,lazyHandlerPromise:f?.handler,lazyRoutePromise:f?.route,handlerOverride:e,scopedContext:s}):Promise.resolve({type:`data`,result:void 0})}}}function la(e,t,n,r,i,a,o,s,c=null){return i.map(l=>l.route.id===a.route.id?ca(e,t,n,r,ti(i),l,o,s,!0,c):{...l,shouldLoad:!1,shouldRevalidateArgs:c,shouldCallHandler:()=>!1,_lazyPromises:sa(e,t,n,l,o),resolve:()=>Promise.resolve({type:`data`,result:void 0})})}async function ua(e,t,n,r,i,a,o,s,c=null){r.some(e=>e._lazyPromises?.middleware)&&await Promise.all(r.map(e=>e._lazyPromises?.middleware));let l={request:t,url:ni(t,n),pattern:ti(r),params:r[0].params,context:o,matches:r,unstable_initiator:a,unstable_navigationType:a===`navigation`?c:null},u=s?()=>{throw Error("You cannot call `runClientMiddleware()` from a static handler `dataStrategy`. Middleware is run outside of `dataStrategy` during SSR in order to bubble up the Response. You can enable middleware via the `respond` API in `query`/`queryRoute`")}:e=>{let t=l;return ia(t,()=>e({...t,fetcherKey:i,runClientMiddleware:()=>{throw Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))},d=await e({...l,fetcherKey:i,runClientMiddleware:u});try{await Promise.all(r.flatMap(e=>[e._lazyPromises?.handler,e._lazyPromises?.route]))}catch{}return d}async function da({request:e,path:t,pattern:n,match:r,lazyHandlerPromise:i,lazyRoutePromise:a,handlerOverride:o,scopedContext:s}){let c,l,u=Ha(e.method),d=u?`action`:`loader`,f=i=>{let a,c=new Promise((e,t)=>a=t);l=()=>a(),e.signal.addEventListener(`abort`,l);let u=a=>typeof i==`function`?i({request:e,url:ni(e,t),pattern:n,params:r.params,context:s},...a===void 0?[]:[a]):Promise.reject(Error(`You cannot call the handler for a route which defines a boolean "${d}" [routeId: ${r.route.id}]`)),f=(async()=>{try{return{type:`data`,result:await(o?o(e=>u(e)):u())}}catch(e){return{type:`error`,result:e}}})();return Promise.race([f,c])};try{let t=u?r.route.action:r.route.loader;if(i||a){if(t){let e,[n]=await Promise.all([f(t).catch(t=>{e=t}),i,a]);if(e!==void 0)throw e;c=n}else{await i;let t=u?r.route.action:r.route.loader;if(t)[c]=await Promise.all([f(t),a]);else if(d===`action`){let t=new URL(e.url),n=t.pathname+t.search;throw Da(405,{method:e.method,pathname:n,routeId:r.route.id})}else return{type:`data`,result:void 0}}}else if(t)c=await f(t);else{let t=new URL(e.url);throw Da(404,{pathname:t.pathname+t.search})}}catch(e){return{type:`error`,result:e}}finally{l&&e.signal.removeEventListener(`abort`,l)}return c}async function fa(e){let t=e.headers.get(`Content-Type`);return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function pa(e){let{result:t,type:n}=e;if(Ra(t)){let e;try{e=await fa(t)}catch(e){return{type:`error`,error:e}}return n===`error`?{type:`error`,error:new $r(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:`data`,data:e,statusCode:t.status,headers:t.headers}}return n===`error`?La(t)?t.data instanceof Error?{type:`error`,error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:ja(t),statusCode:ei(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:t,statusCode:ei(t)?t.status:void 0}:La(t)?{type:`data`,data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`data`,data:t}}function ma(e,t,n,r,i){let a=e.headers.get(`Location`);if(Yn(a,`Redirects returned/thrown from loaders/actions must have a Location header`),!zr(a)){let o=r.slice(0,r.findIndex(e=>e.route.id===n)+1);a=Hi(new URL(t.url),o,i,a),e.headers.set(`Location`,a)}return e}var ha=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function ga(e){try{return ha.includes(new URL(e).protocol)}catch{return!1}}function _a(e,t,n,r){if(zr(e)){let r=e,i=Wn.test(r)?new URL(Gn(r,t.protocol)):new URL(r);if(ga(i.toString()))throw Error(`Invalid redirect location`);let a=Lr(i.pathname,n)!=null;if(i.origin===t.origin&&a)return Kr(i.pathname)+i.search+i.hash}try{if(ga(r.createURL(e).toString()))throw Error(`Invalid redirect location`)}catch{}return e}function va(e,t,n,r){let i=e.createURL(ka(t)).toString(),a={signal:n};if(r&&Ha(r.formMethod)){let{formMethod:e,formEncType:t}=r;a.method=e.toUpperCase(),t===`application/json`?(a.headers=new Headers({"Content-Type":t}),a.body=JSON.stringify(r.json)):a.body=t===`text/plain`?r.text:t===`application/x-www-form-urlencoded`&&r.formData?ya(r.formData):r.formData}return new Request(i,a)}function ya(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r==`string`?r:r.name);return t}function ba(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function xa(e,t,n,r=!1,i=!1){let a={},o=null,s,c=!1,l={},u=n&&Fa(n[1])?n[1].error:void 0;return e.forEach(n=>{if(!(n.route.id in t))return;let d=n.route.id,f=t[d];if(Yn(!Ia(f),`Cannot handle redirect results in processLoaderData`),Fa(f)){let t=f.error;if(u!==void 0&&(t=u,u=void 0),o||={},i)o[d]=t;else{let n=Ta(e,d);o[n.route.id]??(o[n.route.id]=t)}r||(a[d]=Ii),c||(c=!0,s=ei(f.error)?f.error.status:500),f.headers&&(l[d]=f.headers)}else a[d]=f.data,f.statusCode&&f.statusCode!==200&&!c&&(s=f.statusCode),f.headers&&(l[d]=f.headers)}),u!==void 0&&n&&(o={[n[0]]:u},n[2]&&(a[n[2]]=void 0)),{loaderData:a,errors:o,statusCode:s||200,loaderHeaders:l}}function Sa(e,t,n,r,i,a,o){let{loaderData:s,errors:c}=xa(t,n,r);return i.filter(e=>!e.matches||e.matches.some(e=>e.shouldLoad)).forEach(t=>{let{key:n,match:r,controller:i}=t;if(i&&i.signal.aborted)return;let s=a[n];if(Yn(s,`Did not find corresponding fetcher result`),Fa(s)){let t=Ta(e.matches,r?.route.id);c&&c[t.route.id]||(c={...c,[t.route.id]:s.error}),o.delete(n)}else if(Ia(s))Yn(!1,`Unhandled fetcher revalidation redirect`);else{let e=Za(s.data);o.set(n,e)}}),{loaderData:s,errors:c}}function Ca(e,t,n,r){let i=Object.entries(t).filter(([,e])=>e!==Ii).reduce((e,[t,n])=>(e[t]=n,e),{}),a=0;for(let o of n){let n=o.route.id;if(!t.hasOwnProperty(n)&&e.hasOwnProperty(n)&&o.route.loader&&(i[n]=e[n],a++),r&&r.hasOwnProperty(n))break}return Object.keys(t).length===0&&a===Object.keys(e).length?e:i}function wa(e){return e?Fa(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Ta(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>e.route.ErrorBoundary!=null||e.route.errorElement!=null)||e[0]}function Ea(e){let t=e.length===1?e[0]:e.find(e=>e.index||!e.path||e.path===`/`)||{id:`__shim-error-route__`};return{matches:[{params:{},pathname:``,pathnameBase:``,route:t}],route:t}}function Da(e,{pathname:t,routeId:n,method:r,type:i,message:a}={}){let o=`Unknown Server Error`,s=`Unknown @remix-run/router error`;return e===400?(o=`Bad Request`,r&&t&&n?s=`You made a ${r} request to "${t}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:i===`invalid-body`&&(s=`Unable to encode submission body`)):e===403?(o=`Forbidden`,s=`Route "${n}" does not match URL "${t}"`):e===404?(o=`Not Found`,s=`No route matches URL "${t}"`):e===405&&(o=`Method Not Allowed`,r&&t&&n?s=`You made a ${r.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:r&&(s=`Invalid request method "${r.toUpperCase()}"`)),new $r(e||500,o,Error(s),!0)}function Oa(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(Ia(r))return{key:n,result:r}}}function ka(e){return er({...typeof e==`string`?tr(e):e,hash:``})}function Aa(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===``?t.hash!==``:e.hash===t.hash||t.hash!==``}function ja(e){return new $r(e.init?.status??500,e.init?.statusText??`Internal Server Error`,e.data)}function Ma(e){return typeof e==`object`&&!!e&&Object.entries(e).every(([e,t])=>typeof e==`string`&&Na(t))}function Na(e){return typeof e==`object`&&!!e&&`type`in e&&`result`in e&&(e.type===`data`||e.type===`error`)}function Pa(e){return Ra(e.result)&&Ai.has(e.result.status)}function Fa(e){return e.type===`error`}function Ia(e){return(e&&e.type)===`redirect`}function La(e){return typeof e==`object`&&!!e&&`type`in e&&`data`in e&&`init`in e&&e.type===`DataWithResponseInit`}function Ra(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.headers==`object`&&e.body!==void 0}function za(e){return Ai.has(e)}function Ba(e){return Ra(e)&&za(e.status)&&e.headers.has(`Location`)}function Va(e){return ki.has(e.toUpperCase())}function Ha(e){return Di.has(e.toUpperCase())}function Ua(e){return new URLSearchParams(e).getAll(`index`).some(e=>e===``)}function Wa(e,t){let n=typeof t==`string`?tr(t).search:t.search;if(e[e.length-1].route.index&&Ua(n||``))return e[e.length-1];let r=Ur(e);return r[r.length-1]}function Ga(e,t,n){return{url:ni(e.createURL(t),t),pattern:n?ti(n):``,params:n?.[0]?.params?{...n[0].params}:{}}}function Ka(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:a,json:o}=e;if(t&&n&&r){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(a!=null)return{formMethod:t,formAction:n,formEncType:r,formData:a,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:o,text:void 0}}}function qa(e,t,n,r){return r?{state:`loading`,location:e,matches:t,historyAction:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}:{state:`loading`,location:e,matches:t,historyAction:n,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Ja(e,t,n,r){return{state:`submitting`,location:e,matches:t,historyAction:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}}function Ya(e,t){return e?{state:`loading`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:`loading`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Xa(e,t){return{state:`submitting`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Za(e){return{state:`idle`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Qa(e,t){try{let n=e.sessionStorage.getItem(Fi);if(n){let e=JSON.parse(n);for(let[n,r]of Object.entries(e||{}))r&&Array.isArray(r)&&t.set(n,new Set(r||[]))}}catch{}}function $a(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(Fi,JSON.stringify(n))}catch(e){Xn(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}function eo(){let e,t,n=new Promise((r,i)=>{e=async e=>{r(e);try{await n}catch{}},t=async e=>{i(e);try{await n}catch{}}});return{promise:n,resolve:e,reject:t}}var to=q.createContext(null);to.displayName=`DataRouter`;var no=q.createContext(null);no.displayName=`DataRouterState`;var ro=q.createContext(null);ro.displayName=`DataRouterData`;var io=q.createContext(null);io.displayName=`DataRouterNavigation`;var ao=q.createContext(!1);function oo(){return q.useContext(ao)}var so=q.createContext({isTransitioning:!1});so.displayName=`ViewTransition`;var co=q.createContext(null);co.displayName=`Fetchers`;var lo=q.createContext(null);lo.displayName=`Await`;var uo=q.createContext(null);uo.displayName=`Navigation`;var fo=q.createContext(null);fo.displayName=`Location`;var po=q.createContext({outlet:null,matches:[],isDataRoute:!1});po.displayName=`Route`;var mo=q.createContext(!1);mo.displayName=`IsDataRoute`;var ho=q.createContext(void 0);ho.displayName=`RouteId`;var go=q.createContext(null);go.displayName=`RouteError`;var _o=`REACT_ROUTER_ERROR`,vo=`REDIRECT`,yo=`ROUTE_ERROR_RESPONSE`;function bo(e){if(e.startsWith(`${_o}:${vo}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function xo(e){if(e.startsWith(`${_o}:${yo}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new $r(t.status,t.statusText,t.data)}catch{}}function So(e,{relative:t}={}){Yn(Co(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=q.useContext(uo),{hash:i,pathname:a,search:o}=jo(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:qr([n,a])),r.createHref({pathname:s,search:o,hash:i})}function Co(){return q.useContext(fo)!=null}function wo(){return Yn(Co(),`useLocation() may be used only in the context of a <Router> component.`),q.useContext(fo).location}var To=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function Eo(){return q.useContext(mo)?Jo():Do()}function Do(){Yn(Co(),`useNavigate() may be used only in the context of a <Router> component.`);let e=q.useContext(to),{basename:t,navigator:n}=q.useContext(uo),{matches:r}=q.useContext(po),{pathname:i}=wo(),a=JSON.stringify(Wr(r)),o=q.useRef(!1);return q.useLayoutEffect(()=>{o.current=!0}),q.useCallback((r,s={})=>{if(Xn(o.current,To),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=Gr(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:qr([t,c.pathname])),Ti(typeof r==`string`?r:er(r),n.createHref(c),Si(n),`reject`),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var Oo=q.createContext(null);function ko(e){let t=q.useContext(po).outlet;return q.useMemo(()=>t&&q.createElement(Oo.Provider,{value:e},t),[t,e])}function Ao(){let{matches:e}=q.useContext(po);return e[e.length-1]?.params??{}}function jo(e,{relative:t}={}){let{matches:n}=q.useContext(po),{pathname:r}=wo(),i=JSON.stringify(Wr(n));return q.useMemo(()=>Gr(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function Mo(e,t,n){Yn(Co(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=q.useContext(uo),{matches:i}=q.useContext(po),a=i[i.length-1],o=a?a.params:{};a&&a.pathname;let s=a?a.pathnameBase:`/`;a&&a.route;let c=wo(),l;if(t){let e=typeof t==`string`?tr(t):t;Yn(s===`/`||e.pathname?.startsWith(s),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${s}" but pathname "${e.pathname}" was given in the \`location\` prop.`),l=e}else l=c;let u=l.pathname||`/`,d=u;if(s!==`/`){let e=s.replace(/^\//,``).split(`/`);d=`/`+u.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let f;f=n?n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):n.router.match(n.state.location):mr(e,{pathname:d});let p=zo(f&&f.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:qr([s,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?s:qr([s,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&p?q.createElement(fo.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...l},navigationType:`POP`}},p):p}function No(){let e=Go(),t=ei(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return q.createElement(q.Fragment,null,q.createElement(`h2`,null,`Unexpected Application Error!`),q.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?q.createElement(`pre`,{style:{padding:`0.5rem`,backgroundColor:`rgba(200,200,200, 0.5)`}},n):null,null)}var Po=q.createElement(No,null),Fo=class extends q.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static contextType=ao;static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=xo(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:q.createElement(po.Provider,{value:this.props.routeContext},q.createElement(mo.Provider,{value:this.props.routeContext.isDataRoute},q.createElement(ho.Provider,{value:this.props.routeContext.matches[this.props.routeContext.matches.length-1]?.route.id},q.createElement(go.Provider,{value:e,children:this.props.component}))));return this.context?q.createElement(Lo,{error:e},t):t}},Io=new WeakMap;function Lo({children:e,error:t}){let{basename:n,navigator:r}=q.useContext(uo);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=bo(t.digest);if(e){let i=Io.get(t);if(i)throw i;let a=ii(e.location,n),o=a.absoluteURL||a.to;if(Ti(e.location,o,Si(r),`allow-explicit`),ga(o))throw Error(`Invalid redirect location`);if(ri&&!Io.get(t)){if(a.isExternal||e.reloadDocument)window.location.href=o;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:e.replace}));throw Io.set(t,n),n}}return q.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${o}`})}}return e}function Ro({routeContext:e,match:t,children:n}){let r=q.useContext(to);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),q.createElement(po.Provider,{value:e},q.createElement(mo.Provider,{value:e.isDataRoute},q.createElement(ho.Provider,{value:t.route.id},n)))}function zo(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);Yn(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:ti(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||Po,o&&(s<0&&c===0?(Xo(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?q.createElement(n.route.Component,null):n.route.element?n.route.element:e,q.createElement(Ro,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?q.createElement(Fo,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function Bo(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Vo(e){let t=q.useContext(to);return Yn(t,Bo(e)),t}function Ho(e){let t=q.useContext(no);return Yn(t,Bo(e)),t}function Uo(e){let t=q.useContext(ro);return Yn(t,Bo(e)),t}function Wo(e){let t=q.useContext(ho);return Yn(t,`${e} can only be used on routes that contain a unique "id"`),t}function Go(){let e=q.useContext(go),t=Uo(`useRouteError`),n=Wo(`useRouteError`);return e===void 0?t.errors?.[n]:e}var Ko=0;function qo(e){let{router:t,basename:n}=Vo(`useBlocker`),r=Ho(`useBlocker`),[i,a]=q.useState(``),o=q.useCallback(t=>{if(typeof e!=`function`)return!!e;if(n===`/`)return e(t);let{currentLocation:r,nextLocation:i,historyAction:a}=t;return e({currentLocation:{...r,pathname:Lr(r.pathname,n)||r.pathname},nextLocation:{...i,pathname:Lr(i.pathname,n)||i.pathname},historyAction:a})},[n,e]);return q.useEffect(()=>{let e=String(++Ko);return a(e),()=>t.deleteBlocker(e)},[t]),q.useEffect(()=>{i!==``&&t.getBlocker(i,o)},[t,i,o]),i&&r.blockers.has(i)?r.blockers.get(i):Pi}function Jo(){let{router:e}=Vo(`useNavigate`),t=Wo(`useNavigate`),n=q.useRef(!1);return q.useLayoutEffect(()=>{n.current=!0}),q.useCallback(async(r,i={})=>{Xn(n.current,To),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var Yo={};function Xo(e,t,n){!t&&!Yo[e]&&(Yo[e]=!0,Xn(!1,n))}function Zo(e,t){if(e===!1||e==null)throw Error(t)}function Qo(e,t,n){let r=typeof e==`string`?new URL(e,n??(typeof window>`u`?`server://singlefetch/`:window.location.origin)):new URL(e);return n&&r.origin!==n&&(r=new URL(r.pathname+r.search+r.hash,n)),r.pathname.endsWith(`/`)?r.pathname=`${r.pathname}_.${t}`:r.pathname=`${r.pathname}.${t}`,r}async function $o(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function es(e){return e!=null&&typeof e.page==`string`}function ts(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function ns(e,t,n){return ss((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await $o(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(ts).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function rs(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function is(e,t,{includeHydrateFallback:n}={}){return as(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function as(e){return[...new Set(e)]}function os(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function ss(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!es(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(os(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}var cs={};function ls(e,t){!e&&!cs[t]&&(cs[t]=!0,console.warn(t))}var us=q.createContext(void 0);us.displayName=`FrameworkContext`;function ds(){let e=q.useContext(us);return Zo(e,`You must render this element inside a <HydratedRouter> element`),e}function fs(e,t){let n=q.useContext(us),[r,i]=q.useState(!1),[a,o]=q.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=q.useRef(null);q.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),q.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:ps(s,p),onBlur:ps(c,m),onMouseEnter:ps(l,p),onMouseLeave:ps(u,m),onTouchStart:ps(d,p)}]:[a,f,{}]:[!1,f,{}]}function ps(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function ms({page:e,...t}){let n=oo(),{nonce:r}=ds(),{router:i}=Vo(`PrefetchPageLinks`),a=q.useMemo(()=>i.match(e),[i,i.routes,e]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?q.createElement(gs,{page:e,matches:a,...t}):q.createElement(_s,{page:e,matches:a,...t})):null}function hs(e){let{manifest:t,routeModules:n}=ds(),[r,i]=q.useState([]);return q.useEffect(()=>{let r=!1;return ns(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function gs({page:e,matches:t,...n}){let r=wo(),{unstable_apiServerOrigin:i}=ds(),a=q.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=Qo(e,`rsc`,i),a=!1,o=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?a=!0:o.push(e.route.id);return a&&o.length>0&&n.searchParams.set(`_routes`,o.join(`,`)),[i?n.toString():n.pathname+n.search]},[e,r,t,i]);return q.createElement(q.Fragment,null,a.map(e=>q.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function _s({page:e,matches:t,...n}){let r=wo(),{manifest:i,routeModules:a,unstable_apiServerOrigin:o}=ds(),{matches:s}=Ho(`PrefetchPageLinks`),{loaderData:c}=Uo(`PrefetchPageLinks`),l=q.useMemo(()=>rs(e,t,s,i,r,`data`),[e,t,s,i,r]),u=q.useMemo(()=>rs(e,t,s,i,r,`assets`),[e,t,s,i,r]),d=q.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,s=!1;if(t.forEach(e=>{let t=i.routes[e.route.id];t&&t.hasLoader&&(!l.some(t=>t.route.id===e.route.id)&&e.route.id in c&&a[e.route.id]?.shouldRevalidate||t.hasClientLoader?s=!0:n.add(e.route.id))}),n.size===0)return[];let u=Qo(e,`data`,o);return s&&n.size>0&&u.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[o?u.toString():u.pathname+u.search]},[c,r,i,l,t,e,a,o]),f=q.useMemo(()=>is(u,i),[u,i]),p=hs(u);return q.createElement(q.Fragment,null,d.map(e=>q.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),f.map(e=>q.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),p.map(({key:e,link:t})=>q.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function vs(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}var ys=[`HydrateFallback`,`hydrateFallbackElement`],bs=class{status=`pending`;promise;resolve;reject;constructor(){this.promise=new Promise((e,t)=>{this.resolve=t=>{this.status===`pending`&&(this.status=`resolved`,e(t))},this.reject=e=>{this.status===`pending`&&(this.status=`rejected`,t(e))}})}};function xs({router:e,flushSync:t,onError:n,useTransitions:r}){r=oo()||r;let[i,a]=q.useState(e.state),[o,s]=(0,q.useOptimistic)(i),c=q.useRef(o),[l,u]=q.useState(),[d,f]=q.useState({isTransitioning:!1}),[p,m]=q.useState(),[h,g]=q.useState(),[_,v]=q.useState(),y=q.useRef(new Map),b=q.useRef(new WeakSet),x=q.useCallback((i,{deletedFetchers:o,newErrors:l,flushSync:d,viewTransitionOpts:_})=>{c.current=i,l&&i.errors&&zi.has(i.errors)&&(b.current.has(i.errors)?l=null:b.current.add(i.errors)),l&&n&&Object.values(l).forEach(e=>n(e,{location:i.location,params:i.matches[0]?.params??{},pattern:ti(i.matches)})),i.fetchers.forEach((e,t)=>{e.data!==void 0&&y.current.set(t,e.data)}),o.forEach(e=>y.current.delete(e)),ls(d===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let x=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition==`function`;if(ls(_==null||x,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!_||!x)t&&d?t(()=>a(i)):r===!1?a(i):q.startTransition(()=>{r===!0&&s(e=>Ss(e,i)),a(i)});else if(t&&d){t(()=>{h&&(p?.resolve(),h.skipTransition()),f({isTransitioning:!0,flushSync:!0,currentLocation:_.currentLocation,nextLocation:_.nextLocation})});let n=e.window.document.startViewTransition(()=>{t(()=>a(i))});n.finished.finally(()=>{t(()=>{m(void 0),g(void 0),u(void 0),f({isTransitioning:!1})})}),t(()=>g(n))}else h?(p?.resolve(),h.skipTransition(),v({state:i,currentLocation:_.currentLocation,nextLocation:_.nextLocation})):(u(i),f({isTransitioning:!0,flushSync:!1,currentLocation:_.currentLocation,nextLocation:_.nextLocation}))},[e.window,t,h,p,r,s,n]);q.useLayoutEffect(()=>e.subscribe(x),[e,x]),q.useLayoutEffect(()=>{let t=e.state.errors,n=t?zi.get(t):null;(c.current!==e.state||t&&n&&!b.current.has(t))&&x(e.state,{deletedFetchers:[],flushSync:!1,newErrors:n??null})},[e,x]),q.useEffect(()=>{d.isTransitioning&&!d.flushSync&&m(new bs)},[d]),q.useEffect(()=>{if(p&&l&&e.window){let t=l,n=p.promise,i=e.window.document.startViewTransition(async()=>{r===!1?a(t):q.startTransition(()=>{r===!0&&s(e=>Ss(e,t)),a(t)}),await n});i.finished.finally(()=>{m(void 0),g(void 0),u(void 0),f({isTransitioning:!1})}),g(i)}},[l,p,e.window,r,s]),q.useEffect(()=>{p&&l&&o.location.key===l.location.key&&p.resolve()},[p,h,o.location,l]),q.useEffect(()=>{!d.isTransitioning&&_&&(u(_.state),f({isTransitioning:!0,flushSync:!1,currentLocation:_.currentLocation,nextLocation:_.nextLocation}),v(void 0))},[d.isTransitioning,_]);let S=q.useMemo(()=>({createHref:e.createHref,createURL:e.createURL,encodeLocation:e.encodeLocation,go:t=>e.navigate(t),push:(t,n,r)=>e.navigate(t,{state:n,preventScrollReset:r?.preventScrollReset}),replace:(t,n,r)=>e.navigate(t,{replace:!0,state:n,preventScrollReset:r?.preventScrollReset})}),[e]),C=e.basename||`/`,w=q.useMemo(()=>({router:e,navigator:S,static:!1,basename:C,onError:n}),[e,S,C,n]),T=q.useMemo(()=>({historyAction:o.historyAction,location:o.location,matches:o.matches,initialized:o.initialized,renderFallback:o.renderFallback,restoreScrollPosition:o.restoreScrollPosition,preventScrollReset:o.preventScrollReset,blockers:o.blockers}),[o.historyAction,o.location,o.matches,o.initialized,o.renderFallback,o.restoreScrollPosition,o.preventScrollReset,o.blockers]),E=q.useMemo(()=>({navigation:o.navigation,revalidation:o.revalidation}),[o.navigation,o.revalidation]),D=q.useMemo(()=>({loaderData:o.loaderData,actionData:o.actionData,errors:o.errors}),[o.loaderData,o.actionData,o.errors]),O=q.useMemo(()=>({fetchers:o.fetchers,fetcherData:y.current}),[o.fetchers]);return q.createElement(q.Fragment,null,q.createElement(to.Provider,{value:w},q.createElement(no.Provider,{value:T},q.createElement(io.Provider,{value:E},q.createElement(ro.Provider,{value:D},q.createElement(co.Provider,{value:O},q.createElement(so.Provider,{value:d},q.createElement(Ds,{basename:C,location:o.location,navigationType:o.historyAction,navigator:S,useTransitions:r},q.createElement(Cs,{routes:e.routes,manifest:e.manifest,state:o,isStatic:!1,onError:n})))))))),null)}function Ss(e,t){return{...e,navigation:t.navigation.state===`idle`?e.navigation:t.navigation,revalidation:t.revalidation===`idle`?e.revalidation:t.revalidation,actionData:t.navigation.state===`submitting`?e.actionData:t.actionData,fetchers:t.fetchers}}var Cs=q.memo(ws);function ws({routes:e,manifest:t,state:n,isStatic:r,onError:i}){let a=q.useContext(to);Yn(a,`You must render this element inside a <DataRouterContext.Provider> element`);let o=q.useContext(us)?.routeDiscoveryRuntime;return q.useEffect(()=>{n.initialized&&o?.markReady()},[n.initialized,o]),Mo(e,void 0,{router:a.router,manifest:t,state:n,isStatic:r,onError:i})}function Ts({to:e,replace:t,state:n,relative:r}){Yn(Co(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i,navigator:a}=q.useContext(uo);Xn(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:o}=q.useContext(po),{pathname:s}=wo(),c=Eo(),l=Gr(e,Wr(o),s,r===`path`);Ti(typeof e==`string`?e:er(e),a.createHref(l),Si(a),`reject`);let u=JSON.stringify(l);return q.useEffect(()=>{c(JSON.parse(u),{replace:t,state:n,relative:r})},[c,u,r,t,n]),null}function Es(e){return ko(e.context)}function Ds({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){Yn(!Co(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=q.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=tr(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,mask:m}=n,h=q.useMemo(()=>{let e=Lr(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);return Xn(h!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:q.createElement(uo.Provider,{value:c},q.createElement(fo.Provider,{children:t,value:h}))}q.Component;var Os=`application/x-www-form-urlencoded`;function ks(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function As(e){return ks(e)&&e.tagName.toLowerCase()===`button`}function js(e){return ks(e)&&e.tagName.toLowerCase()===`form`}function Ms(e){return ks(e)&&e.tagName.toLowerCase()===`input`}function Ns(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Ps(e,t){return e.button===0&&(!t||t===`_self`)&&!Ns(e)}function Fs(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function Is(e,t){let n=Fs(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var Ls=null;function Rs(){if(Ls===null)try{new FormData(document.createElement(`form`),0),Ls=!1}catch{Ls=!0}return Ls}var zs=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Bs(e){return e!=null&&!zs.has(e)?(Xn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Os}"`),null):e}function Vs(e,t){let n,r,i,a,o;if(js(e)){let o=e.getAttribute(`action`);r=o?Lr(o,t):null,n=e.getAttribute(`method`)||`get`,i=Bs(e.getAttribute(`enctype`))||Os,a=new FormData(e)}else if(As(e)||Ms(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?Lr(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||`get`,i=Bs(e.getAttribute(`formenctype`))||Bs(o.getAttribute(`enctype`))||Os,a=new FormData(o,e),!Rs()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(ks(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=`get`,r=null,i=Os,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}var Hs=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{Hs&&(window.__reactRouterVersion=`8`)}catch{}function Us(e,t){return Bi({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:Jn({window:t?.window}),hydrationData:t?.hydrationData||Ws(),routes:e,mapRouteProperties:dr,hydrationRouteProperties:ys,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,instrumentations:t?.instrumentations}).initialize()}function Ws(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:Gs(e.errors)}),e}function Gs(e){if(!e)return null;let t=Object.entries(e),n={};for(let[e,r]of t)if(r&&r.__type===`RouteErrorResponse`)n[e]=new $r(r.status,r.statusText,r.data,r.internal===!0);else if(r&&r.__type===`Error`){if(typeof r.__subType==`string`&&Qr.includes(r.__subType)){let t=window[r.__subType];if(typeof t==`function`)try{let i=new t(r.message);i.stack=``,n[e]=i}catch{}}if(n[e]==null){let t=Error(r.message);t.stack=``,n[e]=t}}else n[e]=r;return n}var Ks=q.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m){let{basename:h,navigator:g,useTransitions:_}=q.useContext(uo),v=typeof l==`string`&&Un.test(l),y=ii(l,h);l=y.to;let b=So(l,{relative:r}),x=wo(),S=null;if(o){let e=Gr(o,[],x.mask?x.mask.pathname:`/`,!0);h!==`/`&&(e.pathname=e.pathname===`/`?h:qr([h,e.pathname])),S=g.createHref(e)}let[C,w,T]=fs(n,p),E=Ys(l,{replace:a,mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,defaultShouldRevalidate:f,useTransitions:_});function D(t){e&&e(t),t.defaultPrevented||E(t)}let O=!(y.isExternal||i),k=q.createElement(`a`,{...p,...T,href:(O?S:void 0)||y.absoluteURL||b,onClick:O?D:e,ref:vs(m,w),target:c,"data-discover":!v&&t===`render`?`true`:void 0});return C&&!v?q.createElement(q.Fragment,null,k,q.createElement(ms,{page:b})):k});Ks.displayName=`Link`;var qs=q.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=jo(a,{relative:c.relative}),d=wo(),f=q.useContext(io),{navigator:p,basename:m}=q.useContext(uo),h=f!=null&&tc(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,_=d.pathname,v=f?.navigation.location?f.navigation.location.pathname:null;t||(_=_.toLowerCase(),v=v?v.toLowerCase():null,g=g.toLowerCase()),v&&m&&(v=Lr(v,m)||v);let y=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,b=_===g||!r&&_.startsWith(g)&&_.charAt(y)===`/`,x=v!=null&&(v===g||!r&&v.startsWith(g)&&v.charAt(y)===`/`),S={isActive:b,isPending:x,isTransitioning:h},C=b?e:void 0,w;w=typeof n==`function`?n(S):[n,b?`active`:null,x?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let T=typeof i==`function`?i(S):i;return q.createElement(Ks,{...c,"aria-current":C,className:w,ref:l,style:T,to:a,viewTransition:o},typeof s==`function`?s(S):s)});qs.displayName=`NavLink`;var Js=q.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=`get`,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m)=>{let{useTransitions:h}=q.useContext(uo),g=$s(),_=ec(s,{relative:l}),v=o.toLowerCase()===`get`?`get`:`post`,y=typeof s==`string`&&Un.test(s);return q.createElement(`form`,{ref:m,method:v,action:_,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>g(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f});h&&n!==!1?q.startTransition(()=>p()):p()},...p,"data-discover":!y&&e===`render`?`true`:void 0})});Js.displayName=`Form`;function Ys(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let u=Eo(),d=wo(),f=jo(e,{relative:o});return q.useCallback(p=>{if(Ps(p,t)){p.preventDefault();let t=n===void 0?er(d)===er(f):n,m=()=>u(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});l?q.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}function Xs(e){Xn(typeof URLSearchParams<`u`,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=q.useRef(Fs(e)),n=q.useRef(!1),r=wo(),i=q.useMemo(()=>Is(r.search,n.current?null:t.current),[r.search]),a=Eo();return[i,q.useCallback((e,t)=>{let r=Fs(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var Zs=0,Qs=()=>`__${String(++Zs)}__`;function $s(){let{router:e}=Vo(`useSubmit`),{basename:t}=q.useContext(uo),n=Wo(`useSubmit`),r=e.fetch,i=e.navigate;return q.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=Vs(e,t);a.navigate===!1?await r(a.fetcherKey||Qs(),n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,relative:a.relative,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,relative:a.relative,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function ec(e,{relative:t}={}){let{basename:n}=q.useContext(uo),r=q.useContext(po);Yn(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...jo(e||`.`,{relative:t})},o=wo();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:qr([n,a.pathname])),er(a)}function tc(e,{relative:t}={}){let n=q.useContext(so);Yn(n!=null,"`useViewTransitionState` must be used within `react-router/dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Vo(`useViewTransitionState`),i=jo(e,{relative:t});if(!n.isTransitioning)return!1;let a=Lr(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Lr(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Nr(i.pathname,o)!=null||Nr(i.pathname,a)!=null}var nc=rt(lt(),1);function rc(e){return q.createElement(xs,{flushSync:nc.flushSync,...e})}var ic=dt(),ac=class extends Error{status;constructor(e,t){super(e),this.status=t}};async function oc(e,t,n){let r=await fetch(t,{method:e,headers:{...n!==void 0&&{"Content-Type":`application/json`},...e!==`GET`&&{"X-AsRun-Ui":`1`}},body:n===void 0?void 0:JSON.stringify(n)}),i=await r.json().catch(()=>({}));if(!r.ok)throw new ac(i.error??`Request failed (${r.status})`,r.status);return i}var sc={info:()=>oc(`GET`,`/api/info`),update:(e=!1)=>oc(`GET`,`/api/update${e?`?refresh=1`:``}`),profiles:()=>oc(`GET`,`/api/profiles`),addProfile:e=>oc(`POST`,`/api/profiles`,e),editProfile:(e,t)=>oc(`PUT`,`/api/profiles/${encodeURIComponent(e)}`,t),verifyProfiles:e=>oc(`POST`,`/api/profiles/verify`,e??{}),logoutProfile:e=>oc(`POST`,`/api/profiles/logout`,{profile:e}),deleteProfile:e=>oc(`DELETE`,`/api/profiles/${encodeURIComponent(e)}`),cases:()=>oc(`GET`,`/api/cases`),case:e=>oc(`GET`,`/api/cases/${e}`),saveCase:(e,t,n)=>oc(`PUT`,`/api/cases/${e}`,{content:t,mtimeMs:n}),spec:e=>oc(`GET`,`/api/specs/${e}`),saveSpec:(e,t,n)=>oc(`PUT`,`/api/specs/${e}`,{content:t,mtimeMs:n}),openSpec:e=>oc(`POST`,`/api/spec-open`,{id:e}),caseImpact:e=>oc(`GET`,`/api/case-impact/${e}`),renameCase:(e,t)=>oc(`POST`,`/api/case-rename`,{id:e,to:t}),deleteCase:e=>oc(`DELETE`,`/api/cases/${e}`),createCase:e=>oc(`POST`,`/api/cases`,{id:e}),baselines:e=>oc(`GET`,`/api/baselines?case=${encodeURIComponent(e)}`),reports:()=>oc(`GET`,`/api/reports`),reportSummary:e=>oc(`GET`,`/api/reports/${e}/summary`),previewRun:e=>oc(`POST`,`/api/runs/preview`,e),planRun:e=>oc(`POST`,`/api/runs/plan`,e),jobs:()=>oc(`GET`,`/api/jobs`),aiModels:(e,t=!1)=>oc(`GET`,`/api/ai/models?tool=${encodeURIComponent(e)}${t?`&refresh=1`:``}`),startJob:e=>oc(`POST`,`/api/jobs`,e),jobRerun:e=>oc(`GET`,`/api/jobs/${encodeURIComponent(e)}/rerun`),sendInput:(e,t)=>oc(`POST`,`/api/jobs/${e}/input`,{text:t}),cancelJob:e=>oc(`POST`,`/api/jobs/${e}/cancel`)},cc=[`claude`,`opencode`],lc=`claude`,uc={claude:`Claude`,opencode:`OpenCode`},dc=[`explore-case`,`gen-spec`,`heal-spec`],fc={"explore-case":`Explore case`,"gen-spec":`Generate spec`,"heal-spec":`Heal spec`},pc={"explore-case":`case`,"gen-spec":`spec`,"heal-spec":`files`},mc={"explore-case":`Where the agent explores. Only the profiles you tick are opened; it only reads, and with Attended on you do the steps that write data.`,"gen-spec":`Where the agent explores and verifies the spec.`,"heal-spec":`Where the failure is diagnosed and the pages are checked. Only the profiles that are logged in there are run.`},hc=(e,t,n)=>{let{env:r,force:i,attended:a,profiles:o,hints:s,report:c}=n,l=e===`heal-spec`;return`/${e} ${t} ${r}${i&&e===`gen-spec`?` --force`:``}${a&&e===`explore-case`?` --attended`:``}${(e===`explore-case`||l)&&o?.length?` --profiles ${o.join(`,`)}`:``}${l&&c?` --report ${c}`:``}${s?` --hints ${s}`:``}`},gc=`mcp__playwright-test__*`;function _c(e){let t=`Bash(node --import tsx:*)`,n=[`Bash(pnpm case:check:*)`,t],r=[gc,`Bash(pnpm status:*)`,`Bash(pnpm pdf:render:*)`,...n];if(e===`case`)return[...r,`Edit(/cases/**)`];if(e===`cases-new`)return[...n,`Edit(/cases/**)`];let i=[...r,`Edit(/cases/**)`,`Edit(/tests/**)`,`Bash(pnpm typecheck:*)`,`Bash(pnpm spec:lint:*)`,`Bash(pnpm markers:confirm:*)`,t,`Bash(pnpm baselines:review:*)`];return e===`spec`?i:[...i,`Bash(pnpm asrun:*)`,`Bash(pnpm heal:evidence:*)`]}var vc=[`Bash(*--allow-writes*)`,`Bash(*ASRUN_ALLOW_WRITES*)`],yc={claude:[`--output-format`,`stream-json`,`--verbose`],opencode:[`--format`,`json`]};function bc(e,t,n,r,i,a){return e===`opencode`?{file:`opencode`,args:[`run`,`--auto`,`--agent`,`build`,...yc.opencode,...r?[`-s`,r.id]:[],...i?[`--model`,i]:[],...a?[`--thinking`]:[],t]}:{file:`claude`,args:[`-p`,t,...yc.claude,...r?[r.resume?`--resume`:`--session-id`,r.id]:[],...n===`files`||n===`spec`?[`--permission-mode`,`acceptEdits`]:[],...i?[`--model`,i]:[],`--allowedTools`,..._c(n),`--disallowedTools`,...vc]}}var xc=({file:e,args:t})=>[e,...t.map(e=>/^[\w@=,.:/-]+$/.test(e)?e:JSON.stringify(e))].join(` `),Sc=`The last line of your final message is plain text and nothing else: exactly "RESULT: ready" or "RESULT: needs-input". Never put it in a code fence or inline code, never make it bold, a heading or a list item, put no label, number or emoji in front of it, and write nothing after it.`,Cc=`Non-interactive run: nobody can answer questions, so do not stop to ask. Write open questions into the case file as the skill describes. ${Sc}`,wc=`Attended run: a person is at the machine and the browser window is visible, so hand steps that write data or need a choice to them and wait, as the skill describes. Start every handoff (also a second one in the same run) with its own call that sets __handoffCfg, before the call that runs handoff-card.js, and never change those options inside the call that runs the card: the web UI sees that a person is needed only from that call, so without it there is no "Your turn" badge and no notification. Nobody can answer questions in the chat, so write open questions into the case file as the skill describes. ${Sc}`;function Tc(e,t,n){let r=hc(e,t,n);return e===`explore-case`&&n.attended?`${r} ${wc}`:`${r} ${Cc}`}function Ec(e,t,n,r,i){return bc(e,Tc(t,n,r),pc[t],i,r.model,r.thinking)}function Dc(e,t,n,r,i){return xc(Ec(e,t,n,r,i))}var Oc=8e3,kc=4e3,Ac=`Accept the suggestion of every open question: delete its TODO block and keep the sentence above it as confirmed text.`,jc=1e5,Mc=e=>`/make-case ${e} Non-interactive run: nobody can answer questions, so do not stop to ask. Do not open a browser or explore pages. Write the suggested default of every gap as a normal sentence and put a TODO block with an empty Answer: line under it, as open-questions.md describes (every marker starts with its emoji). Never put a marker word inside a TODO block: one claim carries one signal. Never overwrite an existing case: choose a new id instead. Put the cases of one area in a group folder (cases/<group>/<name>.md, id <group>/<name>), reusing an existing folder when it fits. Write the cases, run pnpm case:check, and list the open questions in your final report.`,Nc=(e,t,n,r)=>bc(e,Mc(t),`cases-new`,void 0,n,r),Pc=(e,t,n,r)=>xc(Nc(e,t,n,r));function Fc(e,t){return e.find(e=>e.continuesJobId===t&&(e.status===`running`||e.status===`succeeded`))}var Ic=`asrun-ui.notify`,Lc=new Set,Rc=!1,zc=()=>typeof Notification<`u`,Bc=()=>{try{return localStorage.getItem(Ic)===`true`}catch{return!1}},Vc=e=>(Lc.add(e),window.addEventListener(`storage`,e),()=>{Lc.delete(e),window.removeEventListener(`storage`,e)}),Hc=()=>zc()?Notification.permission:`unsupported`,Uc=()=>(0,q.useSyncExternalStore)(Vc,Bc),Wc=()=>(Uc(),Hc()),Gc=()=>(0,q.useSyncExternalStore)(Vc,()=>Rc);function Kc(e){try{localStorage.setItem(Ic,String(e))}catch{}Lc.forEach(e=>e())}function qc(){Rc||(Rc=!0,Lc.forEach(e=>e()))}function Jc(e,t,n,r={}){if(!Xc())return null;try{let i=new Notification(e,{body:t,tag:n,...r.sticky&&{requireInteraction:!0}});return i.onerror=qc,i.onclick=()=>{window.focus(),i.close(),r.onClick?.()},i}catch(e){return qc(),console.warn(`Could not show a browser notification:`,e),null}}async function Yc(e){if(!e)return Kc(!1);if(!zc())return;Notification.permission==="default"&&await Notification.requestPermission();let t=Notification.permission===`granted`;Kc(t),t&&Jc(`Notifications are on`,`You are told here when it is your turn, and when a run ends. Only while this tab is in the background.`,`${Ic}:hello`)}var Xc=()=>Bc()&&Hc()===`granted`,Zc=e=>[e.profile,e.env].filter(Boolean).join(` @ `),Qc=e=>{if(e.caseId)return e.caseId;let t=/--grep=(?:"([^"]+)"|(\S+))/.exec(e.command);return t?t[1]??t[2]:e.command},$c=()=>document.visibilityState===`hidden`||!document.hasFocus();function el(e,t){let n=[];for(let r of e)if(r.status===`running`&&r.kind===`signin`)n.push({key:`${r.id}:signin`,jobId:r.id,kind:`signin`,title:`Your turn: log in`,body:`Log in${Zc(r)?` to ${Zc(r)}`:``} in the browser window, then press "Done, save the session" on the card in it.`});else if(r.status===`running`&&r.awaitingUser)n.push({key:`${r.id}:handoff:${r.awaitingUser.since}`,jobId:r.id,kind:`handoff`,title:`Your turn in the browser window`,body:r.awaitingUser.message??`Do the step, then press Done on the card.`});else if(r.status===`interrupted`&&r.leftover?.state===`alive`)n.push({key:`${r.id}:leftover`,jobId:r.id,kind:`orphan`,title:`A run survived a restart`,body:`Its process (pid ${r.leftover.pid}) is still running after the UI server restarted. Stop it before starting another AI run.`});else if(r.status===`succeeded`&&r.resultState===`needs-input`&&!t.has(r.id)&&!Fc(e,r.id)){let e=r.aiCommand===`heal-spec`;n.push({key:`${r.id}:needs-input`,jobId:r.id,kind:`needs-input`,title:e?`The case needs your review`:`The agent needs your answers`,body:e?r.caseId?`The case changed: review it and explore it again (${r.caseId}).`:`The case changed: review it and explore it again.`:r.caseId?`Open questions in ${r.caseId}.`:`There are open questions in the case file.`})}return n}function tl(e,t){if(e.kind!==`run`&&e.kind!==`ai`||e.status===`running`||e.status===`interrupted`||e.resultState===`needs-input`||!$c()||!Xc())return;let n=Zc(e),r=e.status===`succeeded`?e.kind===`run`?`passed`:`finished`:e.status===`cancelled`?`cancelled`:`failed${e.exitCode===null?``:` (exit ${e.exitCode})`}`,i=e.kind===`ai`&&e.aiCommand?fc[e.aiCommand]:``;Jc(`${e.kind===`run`?`Run`:`AI run`} finished: ${Qc(e)}`,[i,r,n].filter(Boolean).join(` · `),`${e.id}:finished`,{onClick:()=>t(e.id)})}function nl(e,t,n){(0,q.useEffect)(()=>{if(!e)return;let r=()=>{!document.hidden&&document.hasFocus()&&n?.find(t=>t.id===e)?.status!==`running`&&t(e)};return r(),window.addEventListener(`focus`,r),document.addEventListener(`visibilitychange`,r),()=>{window.removeEventListener(`focus`,r),document.removeEventListener(`visibilitychange`,r)}},[e,t,n])}function rl(e,t,n){let r=(0,q.useMemo)(()=>el(e??[],t),[e,t]),i=(0,q.useRef)(null),a=(0,q.useRef)(new Map),o=(0,q.useRef)(new Map),s=(0,q.useCallback)(()=>{if($c()&&Xc())for(let[e,t]of a.current){a.current.delete(e),i.current?.add(e);let r=Jc(t.title,t.body,e,{sticky:!0,onClick:()=>n(t.jobId)});r&&o.current.set(e,r)}},[n]);return(0,q.useEffect)(()=>{let e=()=>s();return window.addEventListener(`blur`,e),document.addEventListener(`visibilitychange`,e),()=>{window.removeEventListener(`blur`,e),document.removeEventListener(`visibilitychange`,e)}},[s]),(0,q.useEffect)(()=>{if(!e)return;let t=i.current===null,n=i.current??new Set;i.current=n;let c=new Set(r.map(e=>e.key));for(let e of a.current.keys())c.has(e)||a.current.delete(e);for(let[e,t]of o.current)c.has(e)||(t.close(),o.current.delete(e));for(let e of r)n.has(e.key)||(t?n.add(e.key):a.current.set(e.key,e));s()},[e,r,s]),r}var il=`AsRun`,al=il,ol=[{prefix:`/profiles`,title:`Profiles`},{prefix:`/cases`,title:`Cases`},{prefix:`/run`,title:`Run tests`},{prefix:`/reports`,title:`Reports`},{prefix:`/guide`,title:`AI guide`},{prefix:`/help`,title:`Help`},{prefix:`/jobs`,title:`Job Log`}],sl=(e,t)=>e===t||e.startsWith(`${t}/`);function cl(e){let t=ol.find(t=>sl(e,t.prefix));if(!t)return al;if(t.prefix===`/cases`){let n=decodeURIComponent(e.slice(7));if(n===`memo`)return`${al} | ${t.title} | From memo`;if(n)return`${al} | ${t.title} | ${n}`}return`${al} | ${t.title}`}function ll(e,t){(0,q.useEffect)(()=>{document.title=`${t>0?`(${t}) `:``}${cl(e)}`},[e,t])}var ul={info:[`info`],update:[`update`],profiles:[`profiles`],cases:[`cases`],caseDetails:[`case`],case:e=>[`case`,e],specs:[`spec`],spec:e=>[`spec`,e],reports:[`reports`],reportSummary:e=>[`report-summary`,e],jobs:[`jobs`],aiModels:e=>[`ai-models`,e]},dl=()=>Vn({queryKey:ul.info,queryFn:sc.info}),fl=()=>Vn({queryKey:ul.update,queryFn:()=>sc.update(),refetchInterval:9e5,retry:!1}),pl=()=>Vn({queryKey:ul.profiles,queryFn:sc.profiles,refetchInterval:e=>e.state.data?.verifying?1500:!1}),ml=()=>Vn({queryKey:ul.cases,queryFn:sc.cases}),hl=()=>Vn({queryKey:ul.reports,queryFn:sc.reports,placeholderData:zt}),gl=()=>Vn({queryKey:ul.jobs,queryFn:sc.jobs,refetchInterval:e=>e.state.data?.some(e=>e.status===`running`||e.leftover?.state===`alive`)?3e3:!1}),_l=e=>Vn({queryKey:ul.reportSummary(e),queryFn:()=>sc.reportSummary(e),retry:!1}),vl=e=>Vn({queryKey:ul.aiModels(e),queryFn:()=>sc.aiModels(e),staleTime:3e5,retry:!1}),yl=`asrun-ui.jobs.seen`,bl=(0,q.createContext)(null),xl=()=>{let e=(0,q.useContext)(bl);if(!e)throw Error(`JobsProvider is missing`);return e};function Sl({children:e}){let t=ht(),[n,r]=(0,q.useState)(null),[i,a]=(0,q.useState)(!1),[o,s]=(0,q.useState)(!1),[c,l]=(0,q.useState)(null),u=(0,q.useCallback)(e=>{e.kind===`signin`&&t.invalidateQueries({queryKey:ul.profiles}),e.kind===`ai`&&(t.invalidateQueries({queryKey:ul.cases}),t.invalidateQueries({queryKey:ul.caseDetails}),t.invalidateQueries({queryKey:ul.specs}),t.invalidateQueries({queryKey:ul.reports}),t.invalidateQueries({queryKey:ul.profiles})),e.kind===`run`&&(t.invalidateQueries({queryKey:ul.reports}),t.invalidateQueries({queryKey:ul.profiles}))},[t]);(0,q.useEffect)(()=>{let e=new EventSource(`/api/events`),n=!1;return e.onopen=()=>{n&&t.invalidateQueries(),n=!0},e.addEventListener(`job`,e=>{let n=JSON.parse(e.data);t.invalidateQueries({queryKey:ul.jobs}),n.status!==`running`&&u(n)}),e.addEventListener(`files`,e=>{let n=JSON.parse(e.data);n.cases&&(t.invalidateQueries({queryKey:ul.cases}),t.invalidateQueries({queryKey:ul.caseDetails})),n.specs&&(t.invalidateQueries({queryKey:ul.cases}),t.invalidateQueries({queryKey:ul.specs}))}),e.addEventListener(`update`,()=>{t.invalidateQueries({queryKey:ul.update})}),()=>e.close()},[t,u]);let d=gl().data,f=(0,q.useRef)(null),p=(0,q.useRef)(d);(0,q.useEffect)(()=>{p.current=d},[d]);let[m,h]=(0,q.useState)(()=>{try{let e=JSON.parse(localStorage.getItem(yl)??`[]`);return new Set(Array.isArray(e)?e.filter(e=>typeof e==`string`):[])}catch{return new Set}}),g=(0,q.useCallback)(e=>{p.current?.find(t=>t.id===e)?.status!==`running`&&h(t=>{if(t.has(e))return t;let n=new Set(t).add(e);try{localStorage.setItem(yl,JSON.stringify([...n].slice(-100)))}catch{}return n})},[]),_=(0,q.useCallback)(e=>{r(e),e&&(a(!0),g(e))},[g]);(0,q.useEffect)(()=>{if(!d)return;let e=f.current;if(f.current=new Set(d.filter(e=>e.status===`running`).map(e=>e.id)),e)for(let t of d)e.has(t.id)&&t.status!==`running`&&(u(t),tl(t,_))},[d,u,_]);let v=rl(d,m,_);nl(i?n:null,g,d);let{pathname:y}=wo();ll(y,v.length);let b=Hn({mutationFn:sc.startJob}),x=(0,q.useCallback)(async e=>{l(null);try{let n=await b.mutateAsync(e);return r(n.id),a(!0),t.invalidateQueries({queryKey:ul.jobs}),n}catch(e){return l(e.message),a(!0),null}},[b,t]),S=(0,q.useMemo)(()=>({attention:v,markSeen:g,selectedJobId:n,drawerOpen:i,drawerMaximized:o,selectJob:_,setDrawerOpen:a,setDrawerMaximized:s,startJob:x,startError:c,clearStartError:()=>l(null)}),[v,g,n,i,o,_,x,c]);return(0,J.jsx)(bl.Provider,{value:S,children:e})}var Cl=et(((e,t)=>{t.exports=`SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED`})),wl=et(((e,t)=>{var n=Cl();function r(){}function i(){}i.resetWarningCache=r,t.exports=function(){function e(e,t,r,i,a,o){if(o!==n){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name=`Invariant Violation`,s}}e.isRequired=e;function t(){return e}var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return a.PropTypes=a,a}})),Y=rt(et(((e,t)=>{t.exports=wl()()}))());function Tl(){return Tl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Tl.apply(this,arguments)}function El(e,t){if(e==null)return{};var n=Dl(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Dl(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Ol=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=El(e,[`color`,`size`]);return q.createElement(`svg`,Tl({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`circle`,{cx:`12`,cy:`12`,r:`10`}),q.createElement(`line`,{x1:`12`,y1:`8`,x2:`12`,y2:`12`}),q.createElement(`line`,{x1:`12`,y1:`16`,x2:`12.01`,y2:`16`}))});Ol.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Ol.displayName=`AlertCircle`;function kl(){return kl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kl.apply(this,arguments)}function Al(e,t){if(e==null)return{};var n=jl(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function jl(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Ml=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Al(e,[`color`,`size`]);return q.createElement(`svg`,kl({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`path`,{d:`M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z`}),q.createElement(`line`,{x1:`12`,y1:`9`,x2:`12`,y2:`13`}),q.createElement(`line`,{x1:`12`,y1:`17`,x2:`12.01`,y2:`17`}))});Ml.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Ml.displayName=`AlertTriangle`;function Nl(){return Nl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Nl.apply(this,arguments)}function Pl(e,t){if(e==null)return{};var n=Fl(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Fl(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Il=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Pl(e,[`color`,`size`]);return q.createElement(`svg`,Nl({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`polyline`,{points:`21 8 21 21 3 21 3 8`}),q.createElement(`rect`,{x:`1`,y:`3`,width:`22`,height:`5`}),q.createElement(`line`,{x1:`10`,y1:`12`,x2:`14`,y2:`12`}))});Il.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Il.displayName=`Archive`;function Ll(){return Ll=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ll.apply(this,arguments)}function Rl(e,t){if(e==null)return{};var n=zl(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function zl(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Bl=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Rl(e,[`color`,`size`]);return q.createElement(`svg`,Ll({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`line`,{x1:`5`,y1:`12`,x2:`19`,y2:`12`}),q.createElement(`polyline`,{points:`12 5 19 12 12 19`}))});Bl.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Bl.displayName=`ArrowRight`;function Vl(){return Vl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vl.apply(this,arguments)}function Hl(e,t){if(e==null)return{};var n=Ul(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ul(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Wl=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Hl(e,[`color`,`size`]);return q.createElement(`svg`,Vl({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`circle`,{cx:`12`,cy:`12`,r:`10`}),q.createElement(`polyline`,{points:`16 12 12 8 8 12`}),q.createElement(`line`,{x1:`12`,y1:`16`,x2:`12`,y2:`8`}))});Wl.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Wl.displayName=`ArrowUpCircle`;function Gl(){return Gl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gl.apply(this,arguments)}function Kl(e,t){if(e==null)return{};var n=ql(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ql(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Jl=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Kl(e,[`color`,`size`]);return q.createElement(`svg`,Gl({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`line`,{x1:`7`,y1:`17`,x2:`17`,y2:`7`}),q.createElement(`polyline`,{points:`7 7 17 7 17 17`}))});Jl.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Jl.displayName=`ArrowUpRight`;function Yl(){return Yl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yl.apply(this,arguments)}function Xl(e,t){if(e==null)return{};var n=Zl(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Zl(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Ql=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Xl(e,[`color`,`size`]);return q.createElement(`svg`,Yl({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`path`,{d:`M13.73 21a2 2 0 0 1-3.46 0`}),q.createElement(`path`,{d:`M18.63 13A17.89 17.89 0 0 1 18 8`}),q.createElement(`path`,{d:`M6.26 6.26A5.86 5.86 0 0 0 6 8c0 7-3 9-3 9h14`}),q.createElement(`path`,{d:`M18 8a6 6 0 0 0-9.33-5`}),q.createElement(`line`,{x1:`1`,y1:`1`,x2:`23`,y2:`23`}))});Ql.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Ql.displayName=`BellOff`;function $l(){return $l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$l.apply(this,arguments)}function eu(e,t){if(e==null)return{};var n=tu(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function tu(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var nu=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=eu(e,[`color`,`size`]);return q.createElement(`svg`,$l({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`path`,{d:`M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9`}),q.createElement(`path`,{d:`M13.73 21a2 2 0 0 1-3.46 0`}))});nu.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},nu.displayName=`Bell`;function ru(){return ru=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ru.apply(this,arguments)}function iu(e,t){if(e==null)return{};var n=au(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function au(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var ou=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=iu(e,[`color`,`size`]);return q.createElement(`svg`,ru({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`polyline`,{points:`9 11 12 14 22 4`}),q.createElement(`path`,{d:`M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11`}))});ou.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},ou.displayName=`CheckSquare`;function su(){return su=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},su.apply(this,arguments)}function cu(e,t){if(e==null)return{};var n=lu(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function lu(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var uu=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=cu(e,[`color`,`size`]);return q.createElement(`svg`,su({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`polyline`,{points:`20 6 9 17 4 12`}))});uu.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},uu.displayName=`Check`;function du(){return du=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},du.apply(this,arguments)}function fu(e,t){if(e==null)return{};var n=pu(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function pu(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var mu=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=fu(e,[`color`,`size`]);return q.createElement(`svg`,du({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`polyline`,{points:`6 9 12 15 18 9`}))});mu.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},mu.displayName=`ChevronDown`;function hu(){return hu=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hu.apply(this,arguments)}function gu(e,t){if(e==null)return{};var n=_u(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function _u(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var vu=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=gu(e,[`color`,`size`]);return q.createElement(`svg`,hu({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`polyline`,{points:`15 18 9 12 15 6`}))});vu.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},vu.displayName=`ChevronLeft`;function yu(){return yu=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yu.apply(this,arguments)}function bu(e,t){if(e==null)return{};var n=xu(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function xu(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Su=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=bu(e,[`color`,`size`]);return q.createElement(`svg`,yu({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`polyline`,{points:`9 18 15 12 9 6`}))});Su.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Su.displayName=`ChevronRight`;function Cu(){return Cu=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Cu.apply(this,arguments)}function wu(e,t){if(e==null)return{};var n=Tu(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Tu(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Eu=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=wu(e,[`color`,`size`]);return q.createElement(`svg`,Cu({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`polyline`,{points:`18 15 12 9 6 15`}))});Eu.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Eu.displayName=`ChevronUp`;function Du(){return Du=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Du.apply(this,arguments)}function Ou(e,t){if(e==null)return{};var n=ku(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ku(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Au=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Ou(e,[`color`,`size`]);return q.createElement(`svg`,Du({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`}),q.createElement(`rect`,{x:`8`,y:`2`,width:`8`,height:`4`,rx:`1`,ry:`1`}))});Au.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Au.displayName=`Clipboard`;function ju(){return ju=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ju.apply(this,arguments)}function Mu(e,t){if(e==null)return{};var n=Nu(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Nu(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Pu=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Mu(e,[`color`,`size`]);return q.createElement(`svg`,ju({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`polyline`,{points:`16 18 22 12 16 6`}),q.createElement(`polyline`,{points:`8 6 2 12 8 18`}))});Pu.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Pu.displayName=`Code`;function Fu(){return Fu=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fu.apply(this,arguments)}function Iu(e,t){if(e==null)return{};var n=Lu(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Lu(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Ru=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Iu(e,[`color`,`size`]);return q.createElement(`svg`,Fu({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`circle`,{cx:`12`,cy:`12`,r:`10`}),q.createElement(`polygon`,{points:`16.24 7.76 14.12 14.12 7.76 16.24 9.88 9.88 16.24 7.76`}))});Ru.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Ru.displayName=`Compass`;function zu(){return zu=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zu.apply(this,arguments)}function Bu(e,t){if(e==null)return{};var n=Vu(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Vu(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Hu=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Bu(e,[`color`,`size`]);return q.createElement(`svg`,zu({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`rect`,{x:`9`,y:`9`,width:`13`,height:`13`,rx:`2`,ry:`2`}),q.createElement(`path`,{d:`M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1`}))});Hu.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Hu.displayName=`Copy`;function Uu(){return Uu=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Uu.apply(this,arguments)}function Wu(e,t){if(e==null)return{};var n=Gu(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Gu(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Ku=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Wu(e,[`color`,`size`]);return q.createElement(`svg`,Uu({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`polyline`,{points:`15 10 20 15 15 20`}),q.createElement(`path`,{d:`M4 4v7a4 4 0 0 0 4 4h12`}))});Ku.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Ku.displayName=`CornerDownRight`;function qu(){return qu=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qu.apply(this,arguments)}function Ju(e,t){if(e==null)return{};var n=Yu(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Yu(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Xu=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Ju(e,[`color`,`size`]);return q.createElement(`svg`,qu({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,ry:`2`}),q.createElement(`rect`,{x:`9`,y:`9`,width:`6`,height:`6`}),q.createElement(`line`,{x1:`9`,y1:`1`,x2:`9`,y2:`4`}),q.createElement(`line`,{x1:`15`,y1:`1`,x2:`15`,y2:`4`}),q.createElement(`line`,{x1:`9`,y1:`20`,x2:`9`,y2:`23`}),q.createElement(`line`,{x1:`15`,y1:`20`,x2:`15`,y2:`23`}),q.createElement(`line`,{x1:`20`,y1:`9`,x2:`23`,y2:`9`}),q.createElement(`line`,{x1:`20`,y1:`14`,x2:`23`,y2:`14`}),q.createElement(`line`,{x1:`1`,y1:`9`,x2:`4`,y2:`9`}),q.createElement(`line`,{x1:`1`,y1:`14`,x2:`4`,y2:`14`}))});Xu.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Xu.displayName=`Cpu`;function Zu(){return Zu=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zu.apply(this,arguments)}function Qu(e,t){if(e==null)return{};var n=$u(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $u(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var ed=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Qu(e,[`color`,`size`]);return q.createElement(`svg`,Zu({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`circle`,{cx:`12`,cy:`12`,r:`10`}),q.createElement(`line`,{x1:`22`,y1:`12`,x2:`18`,y2:`12`}),q.createElement(`line`,{x1:`6`,y1:`12`,x2:`2`,y2:`12`}),q.createElement(`line`,{x1:`12`,y1:`6`,x2:`12`,y2:`2`}),q.createElement(`line`,{x1:`12`,y1:`22`,x2:`12`,y2:`18`}))});ed.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},ed.displayName=`Crosshair`;function td(){return td=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},td.apply(this,arguments)}function nd(e,t){if(e==null)return{};var n=rd(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function rd(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var id=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=nd(e,[`color`,`size`]);return q.createElement(`svg`,td({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`path`,{d:`M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z`}))});id.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},id.displayName=`Edit2`;function ad(){return ad=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ad.apply(this,arguments)}function od(e,t){if(e==null)return{};var n=sd(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function sd(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var cd=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=od(e,[`color`,`size`]);return q.createElement(`svg`,ad({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`path`,{d:`M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`}),q.createElement(`path`,{d:`M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z`}))});cd.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},cd.displayName=`Edit`;function ld(){return ld=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ld.apply(this,arguments)}function ud(e,t){if(e==null)return{};var n=dd(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function dd(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var fd=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=ud(e,[`color`,`size`]);return q.createElement(`svg`,ld({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`}),q.createElement(`polyline`,{points:`15 3 21 3 21 9`}),q.createElement(`line`,{x1:`10`,y1:`14`,x2:`21`,y2:`3`}))});fd.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},fd.displayName=`ExternalLink`;function pd(){return pd=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pd.apply(this,arguments)}function md(e,t){if(e==null)return{};var n=hd(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function hd(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var gd=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=md(e,[`color`,`size`]);return q.createElement(`svg`,pd({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`path`,{d:`M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z`}),q.createElement(`circle`,{cx:`12`,cy:`12`,r:`3`}))});gd.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},gd.displayName=`Eye`;function _d(){return _d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_d.apply(this,arguments)}function vd(e,t){if(e==null)return{};var n=yd(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function yd(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var bd=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=vd(e,[`color`,`size`]);return q.createElement(`svg`,_d({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`path`,{d:`M20.24 12.24a6 6 0 0 0-8.49-8.49L5 10.5V19h8.5z`}),q.createElement(`line`,{x1:`16`,y1:`8`,x2:`2`,y2:`22`}),q.createElement(`line`,{x1:`17.5`,y1:`15`,x2:`9`,y2:`15`}))});bd.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},bd.displayName=`Feather`;function xd(){return xd=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xd.apply(this,arguments)}function Sd(e,t){if(e==null)return{};var n=Cd(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Cd(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var wd=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Sd(e,[`color`,`size`]);return q.createElement(`svg`,xd({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`path`,{d:`M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z`}),q.createElement(`polyline`,{points:`14 2 14 8 20 8`}),q.createElement(`line`,{x1:`12`,y1:`18`,x2:`12`,y2:`12`}),q.createElement(`line`,{x1:`9`,y1:`15`,x2:`15`,y2:`15`}))});wd.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},wd.displayName=`FilePlus`;function Td(){return Td=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Td.apply(this,arguments)}function Ed(e,t){if(e==null)return{};var n=Dd(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Dd(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Od=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Ed(e,[`color`,`size`]);return q.createElement(`svg`,Td({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`path`,{d:`M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z`}),q.createElement(`polyline`,{points:`14 2 14 8 20 8`}),q.createElement(`line`,{x1:`16`,y1:`13`,x2:`8`,y2:`13`}),q.createElement(`line`,{x1:`16`,y1:`17`,x2:`8`,y2:`17`}),q.createElement(`polyline`,{points:`10 9 9 9 8 9`}))});Od.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Od.displayName=`FileText`;function kd(){return kd=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kd.apply(this,arguments)}function Ad(e,t){if(e==null)return{};var n=jd(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function jd(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Md=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Ad(e,[`color`,`size`]);return q.createElement(`svg`,kd({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`path`,{d:`M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z`}),q.createElement(`line`,{x1:`4`,y1:`22`,x2:`4`,y2:`15`}))});Md.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Md.displayName=`Flag`;function Nd(){return Nd=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Nd.apply(this,arguments)}function Pd(e,t){if(e==null)return{};var n=Fd(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Fd(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Id=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Pd(e,[`color`,`size`]);return q.createElement(`svg`,Nd({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`path`,{d:`M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z`}))});Id.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Id.displayName=`Folder`;function Ld(){return Ld=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ld.apply(this,arguments)}function Rd(e,t){if(e==null)return{};var n=zd(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function zd(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Bd=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Rd(e,[`color`,`size`]);return q.createElement(`svg`,Ld({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`circle`,{cx:`12`,cy:`12`,r:`10`}),q.createElement(`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`}),q.createElement(`line`,{x1:`12`,y1:`17`,x2:`12.01`,y2:`17`}))});Bd.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Bd.displayName=`HelpCircle`;function Vd(){return Vd=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vd.apply(this,arguments)}function Hd(e,t){if(e==null)return{};var n=Ud(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ud(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Wd=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Hd(e,[`color`,`size`]);return q.createElement(`svg`,Vd({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,ry:`2`}),q.createElement(`circle`,{cx:`8.5`,cy:`8.5`,r:`1.5`}),q.createElement(`polyline`,{points:`21 15 16 10 5 21`}))});Wd.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Wd.displayName=`Image`;function Gd(){return Gd=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gd.apply(this,arguments)}function Kd(e,t){if(e==null)return{};var n=qd(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function qd(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Jd=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Kd(e,[`color`,`size`]);return q.createElement(`svg`,Gd({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`circle`,{cx:`12`,cy:`12`,r:`10`}),q.createElement(`line`,{x1:`12`,y1:`16`,x2:`12`,y2:`12`}),q.createElement(`line`,{x1:`12`,y1:`8`,x2:`12.01`,y2:`8`}))});Jd.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Jd.displayName=`Info`;function Yd(){return Yd=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yd.apply(this,arguments)}function Xd(e,t){if(e==null)return{};var n=Zd(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Zd(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Qd=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Xd(e,[`color`,`size`]);return q.createElement(`svg`,Yd({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`polygon`,{points:`12 2 2 7 12 12 22 7 12 2`}),q.createElement(`polyline`,{points:`2 17 12 22 22 17`}),q.createElement(`polyline`,{points:`2 12 12 17 22 12`}))});Qd.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Qd.displayName=`Layers`;function $d(){return $d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$d.apply(this,arguments)}function ef(e,t){if(e==null)return{};var n=tf(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function tf(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var nf=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=ef(e,[`color`,`size`]);return q.createElement(`svg`,$d({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`line`,{x1:`8`,y1:`6`,x2:`21`,y2:`6`}),q.createElement(`line`,{x1:`8`,y1:`12`,x2:`21`,y2:`12`}),q.createElement(`line`,{x1:`8`,y1:`18`,x2:`21`,y2:`18`}),q.createElement(`line`,{x1:`3`,y1:`6`,x2:`3.01`,y2:`6`}),q.createElement(`line`,{x1:`3`,y1:`12`,x2:`3.01`,y2:`12`}),q.createElement(`line`,{x1:`3`,y1:`18`,x2:`3.01`,y2:`18`}))});nf.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},nf.displayName=`List`;function rf(){return rf=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rf.apply(this,arguments)}function af(e,t){if(e==null)return{};var n=of(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function of(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var sf=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=af(e,[`color`,`size`]);return q.createElement(`svg`,rf({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`line`,{x1:`12`,y1:`2`,x2:`12`,y2:`6`}),q.createElement(`line`,{x1:`12`,y1:`18`,x2:`12`,y2:`22`}),q.createElement(`line`,{x1:`4.93`,y1:`4.93`,x2:`7.76`,y2:`7.76`}),q.createElement(`line`,{x1:`16.24`,y1:`16.24`,x2:`19.07`,y2:`19.07`}),q.createElement(`line`,{x1:`2`,y1:`12`,x2:`6`,y2:`12`}),q.createElement(`line`,{x1:`18`,y1:`12`,x2:`22`,y2:`12`}),q.createElement(`line`,{x1:`4.93`,y1:`19.07`,x2:`7.76`,y2:`16.24`}),q.createElement(`line`,{x1:`16.24`,y1:`7.76`,x2:`19.07`,y2:`4.93`}))});sf.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},sf.displayName=`Loader`;function cf(){return cf=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cf.apply(this,arguments)}function lf(e,t){if(e==null)return{};var n=uf(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function uf(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var df=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=lf(e,[`color`,`size`]);return q.createElement(`svg`,cf({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`rect`,{x:`3`,y:`11`,width:`18`,height:`11`,rx:`2`,ry:`2`}),q.createElement(`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`}))});df.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},df.displayName=`Lock`;function ff(){return ff=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ff.apply(this,arguments)}function pf(e,t){if(e==null)return{};var n=mf(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function mf(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var hf=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=pf(e,[`color`,`size`]);return q.createElement(`svg`,ff({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`path`,{d:`M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4`}),q.createElement(`polyline`,{points:`10 17 15 12 10 7`}),q.createElement(`line`,{x1:`15`,y1:`12`,x2:`3`,y2:`12`}))});hf.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},hf.displayName=`LogIn`;function gf(){return gf=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gf.apply(this,arguments)}function _f(e,t){if(e==null)return{};var n=vf(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function vf(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var yf=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=_f(e,[`color`,`size`]);return q.createElement(`svg`,gf({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`}),q.createElement(`polyline`,{points:`16 17 21 12 16 7`}),q.createElement(`line`,{x1:`21`,y1:`12`,x2:`9`,y2:`12`}))});yf.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},yf.displayName=`LogOut`;function bf(){return bf=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bf.apply(this,arguments)}function xf(e,t){if(e==null)return{};var n=Sf(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Sf(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Cf=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=xf(e,[`color`,`size`]);return q.createElement(`svg`,bf({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`polyline`,{points:`15 3 21 3 21 9`}),q.createElement(`polyline`,{points:`9 21 3 21 3 15`}),q.createElement(`line`,{x1:`21`,y1:`3`,x2:`14`,y2:`10`}),q.createElement(`line`,{x1:`3`,y1:`21`,x2:`10`,y2:`14`}))});Cf.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Cf.displayName=`Maximize2`;function wf(){return wf=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wf.apply(this,arguments)}function Tf(e,t){if(e==null)return{};var n=Ef(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ef(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Df=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Tf(e,[`color`,`size`]);return q.createElement(`svg`,wf({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`path`,{d:`M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z`}))});Df.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Df.displayName=`MessageCircle`;function Of(){return Of=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Of.apply(this,arguments)}function kf(e,t){if(e==null)return{};var n=Af(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Af(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var jf=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=kf(e,[`color`,`size`]);return q.createElement(`svg`,Of({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`path`,{d:`M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z`}))});jf.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},jf.displayName=`MessageSquare`;function Mf(){return Mf=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Mf.apply(this,arguments)}function Nf(e,t){if(e==null)return{};var n=Pf(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Pf(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Ff=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Nf(e,[`color`,`size`]);return q.createElement(`svg`,Mf({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`polyline`,{points:`4 14 10 14 10 20`}),q.createElement(`polyline`,{points:`20 10 14 10 14 4`}),q.createElement(`line`,{x1:`14`,y1:`10`,x2:`21`,y2:`3`}),q.createElement(`line`,{x1:`3`,y1:`21`,x2:`10`,y2:`14`}))});Ff.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Ff.displayName=`Minimize2`;function If(){return If=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},If.apply(this,arguments)}function Lf(e,t){if(e==null)return{};var n=Rf(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Rf(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var zf=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Lf(e,[`color`,`size`]);return q.createElement(`svg`,If({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`circle`,{cx:`12`,cy:`12`,r:`1`}),q.createElement(`circle`,{cx:`19`,cy:`12`,r:`1`}),q.createElement(`circle`,{cx:`5`,cy:`12`,r:`1`}))});zf.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},zf.displayName=`MoreHorizontal`;function Bf(){return Bf=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Bf.apply(this,arguments)}function Vf(e,t){if(e==null)return{};var n=Hf(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Hf(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Uf=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Vf(e,[`color`,`size`]);return q.createElement(`svg`,Bf({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`polyline`,{points:`5 9 2 12 5 15`}),q.createElement(`polyline`,{points:`9 5 12 2 15 5`}),q.createElement(`polyline`,{points:`15 19 12 22 9 19`}),q.createElement(`polyline`,{points:`19 9 22 12 19 15`}),q.createElement(`line`,{x1:`2`,y1:`12`,x2:`22`,y2:`12`}),q.createElement(`line`,{x1:`12`,y1:`2`,x2:`12`,y2:`22`}))});Uf.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Uf.displayName=`Move`;function Wf(){return Wf=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wf.apply(this,arguments)}function Gf(e,t){if(e==null)return{};var n=Kf(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Kf(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var qf=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Gf(e,[`color`,`size`]);return q.createElement(`svg`,Wf({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`polygon`,{points:`5 3 19 12 5 21 5 3`}))});qf.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},qf.displayName=`Play`;function Jf(){return Jf=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jf.apply(this,arguments)}function Yf(e,t){if(e==null)return{};var n=Xf(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Xf(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Zf=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Yf(e,[`color`,`size`]);return q.createElement(`svg`,Jf({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`line`,{x1:`12`,y1:`5`,x2:`12`,y2:`19`}),q.createElement(`line`,{x1:`5`,y1:`12`,x2:`19`,y2:`12`}))});Zf.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Zf.displayName=`Plus`;function Qf(){return Qf=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qf.apply(this,arguments)}function $f(e,t){if(e==null)return{};var n=ep(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ep(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var tp=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=$f(e,[`color`,`size`]);return q.createElement(`svg`,Qf({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`polyline`,{points:`23 4 23 10 17 10`}),q.createElement(`polyline`,{points:`1 20 1 14 7 14`}),q.createElement(`path`,{d:`M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15`}))});tp.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},tp.displayName=`RefreshCw`;function np(){return np=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},np.apply(this,arguments)}function rp(e,t){if(e==null)return{};var n=ip(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ip(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var ap=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=rp(e,[`color`,`size`]);return q.createElement(`svg`,np({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`polyline`,{points:`23 4 23 10 17 10`}),q.createElement(`path`,{d:`M20.49 15a9 9 0 1 1-2.12-9.36L23 10`}))});ap.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},ap.displayName=`RotateCw`;function op(){return op=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},op.apply(this,arguments)}function sp(e,t){if(e==null)return{};var n=cp(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function cp(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var lp=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=sp(e,[`color`,`size`]);return q.createElement(`svg`,op({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`circle`,{cx:`11`,cy:`11`,r:`8`}),q.createElement(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`}))});lp.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},lp.displayName=`Search`;function up(){return up=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},up.apply(this,arguments)}function dp(e,t){if(e==null)return{};var n=fp(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function fp(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var pp=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=dp(e,[`color`,`size`]);return q.createElement(`svg`,up({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`line`,{x1:`22`,y1:`2`,x2:`11`,y2:`13`}),q.createElement(`polygon`,{points:`22 2 15 22 11 13 2 9 22 2`}))});pp.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},pp.displayName=`Send`;function mp(){return mp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mp.apply(this,arguments)}function hp(e,t){if(e==null)return{};var n=gp(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function gp(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var _p=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=hp(e,[`color`,`size`]);return q.createElement(`svg`,mp({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`path`,{d:`M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z`}))});_p.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},_p.displayName=`Shield`;function vp(){return vp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vp.apply(this,arguments)}function yp(e,t){if(e==null)return{};var n=bp(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function bp(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var xp=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=yp(e,[`color`,`size`]);return q.createElement(`svg`,vp({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`line`,{x1:`4`,y1:`21`,x2:`4`,y2:`14`}),q.createElement(`line`,{x1:`4`,y1:`10`,x2:`4`,y2:`3`}),q.createElement(`line`,{x1:`12`,y1:`21`,x2:`12`,y2:`12`}),q.createElement(`line`,{x1:`12`,y1:`8`,x2:`12`,y2:`3`}),q.createElement(`line`,{x1:`20`,y1:`21`,x2:`20`,y2:`16`}),q.createElement(`line`,{x1:`20`,y1:`12`,x2:`20`,y2:`3`}),q.createElement(`line`,{x1:`1`,y1:`14`,x2:`7`,y2:`14`}),q.createElement(`line`,{x1:`9`,y1:`8`,x2:`15`,y2:`8`}),q.createElement(`line`,{x1:`17`,y1:`16`,x2:`23`,y2:`16`}))});xp.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},xp.displayName=`Sliders`;function Sp(){return Sp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sp.apply(this,arguments)}function Cp(e,t){if(e==null)return{};var n=wp(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function wp(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Tp=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Cp(e,[`color`,`size`]);return q.createElement(`svg`,Sp({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`path`,{d:`M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18`}))});Tp.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Tp.displayName=`Table`;function Ep(){return Ep=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ep.apply(this,arguments)}function Dp(e,t){if(e==null)return{};var n=Op(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Op(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var kp=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Dp(e,[`color`,`size`]);return q.createElement(`svg`,Ep({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z`}))});kp.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},kp.displayName=`Tool`;function Ap(){return Ap=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ap.apply(this,arguments)}function jp(e,t){if(e==null)return{};var n=Mp(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Mp(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Np=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=jp(e,[`color`,`size`]);return q.createElement(`svg`,Ap({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`polyline`,{points:`3 6 5 6 21 6`}),q.createElement(`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`}),q.createElement(`line`,{x1:`10`,y1:`11`,x2:`10`,y2:`17`}),q.createElement(`line`,{x1:`14`,y1:`11`,x2:`14`,y2:`17`}))});Np.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Np.displayName=`Trash2`;function Pp(){return Pp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pp.apply(this,arguments)}function Fp(e,t){if(e==null)return{};var n=Ip(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ip(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Lp=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Fp(e,[`color`,`size`]);return q.createElement(`svg`,Pp({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`path`,{d:`M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2`}),q.createElement(`circle`,{cx:`9`,cy:`7`,r:`4`}),q.createElement(`path`,{d:`M23 21v-2a4 4 0 0 0-3-3.87`}),q.createElement(`path`,{d:`M16 3.13a4 4 0 0 1 0 7.75`}))});Lp.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Lp.displayName=`Users`;function Rp(){return Rp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rp.apply(this,arguments)}function zp(e,t){if(e==null)return{};var n=Bp(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Bp(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Vp=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=zp(e,[`color`,`size`]);return q.createElement(`svg`,Rp({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`circle`,{cx:`12`,cy:`12`,r:`10`}),q.createElement(`line`,{x1:`15`,y1:`9`,x2:`9`,y2:`15`}),q.createElement(`line`,{x1:`9`,y1:`9`,x2:`15`,y2:`15`}))});Vp.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Vp.displayName=`XCircle`;function Hp(){return Hp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hp.apply(this,arguments)}function Up(e,t){if(e==null)return{};var n=Wp(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Wp(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Gp=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Up(e,[`color`,`size`]);return q.createElement(`svg`,Hp({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),q.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`}))});Gp.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Gp.displayName=`X`;var Kp=(e,t,n)=>Math.max(t,Math.min(n,e));function qp(e,t,n){e.preventDefault();let r=e.clientX,i=e.clientY,a=e=>t(e.clientX-r,e.clientY-i),o=()=>{window.removeEventListener(`pointermove`,a),window.removeEventListener(`pointerup`,o),window.removeEventListener(`pointercancel`,o),n?.()};window.addEventListener(`pointermove`,a),window.addEventListener(`pointerup`,o),window.addEventListener(`pointercancel`,o)}function Jp(e,t,n){let[r,i]=(0,q.useState)(()=>{try{let t=localStorage.getItem(e);if(t!==null){let e=JSON.parse(t);if(n(e))return e}}catch{}return t});return[r,(0,q.useCallback)(t=>{i(t);try{localStorage.setItem(e,JSON.stringify(t))}catch{}},[e])]}var Yp=e=>typeof e==`string`,Xp=e=>typeof e==`boolean`,Zp=e=>typeof e==`number`&&Number.isFinite(e);function Qp(e,t){let[n,r]=(0,q.useState)(e),[i,a]=(0,q.useState)(e);return(0,q.useEffect)(()=>{if(e){r(!0);let e=0,t=requestAnimationFrame(()=>{e=requestAnimationFrame(()=>a(!0))});return()=>{cancelAnimationFrame(t),cancelAnimationFrame(e)}}a(!1);let n=window.setTimeout(()=>r(!1),t);return()=>window.clearTimeout(n)},[e,t]),{mounted:n,shown:i}}function $p({open:e,children:t}){let{mounted:n,shown:r}=Qp(e,200);return n?(0,J.jsx)(`div`,{inert:!e,className:`grid transition-[grid-template-rows,opacity] duration-200 ease-out motion-reduce:transition-none ${r?`grid-rows-[1fr] opacity-100`:`grid-rows-[0fr] opacity-0`}`,children:(0,J.jsx)(`div`,{className:`min-h-0 overflow-hidden`,children:t})}):null}var em=Symbol.for(`yaml.alias`),tm=Symbol.for(`yaml.document`),nm=Symbol.for(`yaml.map`),rm=Symbol.for(`yaml.pair`),im=Symbol.for(`yaml.scalar`),am=Symbol.for(`yaml.seq`),om=Symbol.for(`yaml.node.type`),sm=e=>!!e&&typeof e==`object`&&e[om]===em,cm=e=>!!e&&typeof e==`object`&&e[om]===tm,lm=e=>!!e&&typeof e==`object`&&e[om]===nm,um=e=>!!e&&typeof e==`object`&&e[om]===rm,dm=e=>!!e&&typeof e==`object`&&e[om]===im,fm=e=>!!e&&typeof e==`object`&&e[om]===am;function pm(e){if(e&&typeof e==`object`)switch(e[om]){case nm:case am:return!0}return!1}function mm(e){if(e&&typeof e==`object`)switch(e[om]){case em:case nm:case im:case am:return!0}return!1}var hm=e=>(dm(e)||pm(e))&&!!e.anchor,gm=Symbol(`break visit`),_m=Symbol(`skip children`),vm=Symbol(`remove node`);function ym(e,t){let n=xm(t);cm(e)?bm(null,e.contents,n,Object.freeze([e]))===vm&&(e.contents=null):bm(null,e,n,Object.freeze([]))}ym.BREAK=gm,ym.SKIP=_m,ym.REMOVE=vm;function bm(e,t,n,r){let i=Sm(e,t,n,r);if(mm(i)||um(i))return Cm(e,r,i),bm(e,i,n,r);if(typeof i!=`symbol`){if(pm(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=bm(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===gm)return gm;else i===vm&&(t.items.splice(e,1),--e)}}else if(um(t)){r=Object.freeze(r.concat(t));let e=bm(`key`,t.key,n,r);if(e===gm)return gm;e===vm&&(t.key=null);let i=bm(`value`,t.value,n,r);if(i===gm)return gm;i===vm&&(t.value=null)}}return i}function xm(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 Sm(e,t,n,r){if(typeof n==`function`)return n(e,t,r);if(lm(t))return n.Map?.(e,t,r);if(fm(t))return n.Seq?.(e,t,r);if(um(t))return n.Pair?.(e,t,r);if(dm(t))return n.Scalar?.(e,t,r);if(sm(t))return n.Alias?.(e,t,r)}function Cm(e,t,n){let r=t[t.length-1];if(pm(r))r.items[e]=n;else if(um(r))e===`key`?r.key=n:r.value=n;else if(cm(r))r.contents=n;else{let e=sm(r)?`alias`:`scalar`;throw Error(`Cannot replace node with ${e} parent`)}}var wm={"!":`%21`,",":`%2C`,"[":`%5B`,"]":`%5D`,"{":`%7B`,"}":`%7D`},Tm=e=>e.replace(/[!,[\]{}]/g,e=>wm[e]),Em=class e{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,n)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case`1.1`:this.atNextDocument=!0;break;case`1.2`:this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:`1.2`},this.tags=Object.assign({},e.defaultTags)}return t}add(t,n){this.atNextDocument&&=(this.yaml={explicit:e.defaultYaml.explicit,version:`1.1`},this.tags=Object.assign({},e.defaultTags),!1);let r=t.trim().split(/[ \t]+/),i=r.shift();switch(i){case`%TAG`:{if(r.length!==2&&(n(0,`%TAG directive should contain exactly two parts`),r.length<2))return!1;let[e,t]=r;return this.tags[e]=t,!0}case`%YAML`:{if(this.yaml.explicit=!0,r.length!==1)return n(0,`%YAML directive should contain exactly one part`),!1;let[e]=r;if(e===`1.1`||e===`1.2`)return this.yaml.version=e,!0;{let t=/^\d+\.\d+$/.test(e);return n(6,`Unsupported YAML version ${e}`,t),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e===`!`)return`!`;if(e[0]!==`!`)return t(`Not a valid tag: ${e}`),null;if(e[1]===`<`){let n=e.slice(2,-1);return n===`!`||n===`!!`?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==`>`&&t(`Verbatim tags must end with a >`),n)}let[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);let i=this.tags[n];if(i)try{return i+decodeURIComponent(r)}catch(e){return t(String(e)),null}return n===`!`?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+Tm(e.substring(n.length));return e[0]===`!`?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||`1.2`}`]:[],n=Object.entries(this.tags),r;if(e&&n.length>0&&mm(e.contents)){let t={};ym(e.contents,(e,n)=>{mm(n)&&n.tag&&(t[n.tag]=!0)}),r=Object.keys(t)}else r=[];for(let[i,a]of n)i===`!!`&&a===`tag:yaml.org,2002:`||e&&!r.some(e=>e.startsWith(a))||t.push(`%TAG ${i} ${a}`);return t.join(`
|
|
10
|
+
`).replace(tp,``)}function rp(e,t){return t=np(t),np(e)===t}function ip(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||en(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&en(e,``+r);else return;break;case`className`:zt(e,`class`,r);break;case`tabIndex`:zt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:zt(e,n,r);break;case`style`:rn(e,r,o);return;case`data`:if(t!==`object`){zt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)||r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=cn(r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`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}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&ip(e,t,`name`,a.name,a,null),ip(e,t,`formEncType`,a.formEncType,a,null),ip(e,t,`formMethod`,a.formMethod,a,null),ip(e,t,`formTarget`,a.formTarget,a,null)):(ip(e,t,`encType`,a.encType,a,null),ip(e,t,`method`,a.method,a,null),ip(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=cn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=ln);return;case`onScroll`:r!=null&&Wf(`scroll`,e);return;case`onScrollEnd`:r!=null&&Wf(`scrollend`,e);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=cn(r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`credentialless`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Wf(`beforetoggle`,e),Wf(`toggle`,e),Rt(e,`popover`,r);break;case`xlinkActuate`:Bt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Bt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Bt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Bt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Bt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Bt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Bt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Bt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Bt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Rt(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)n=on.get(n)||n,Rt(e,n,r);else return}It=!0}function ap(e,t,n,r,a,o){switch(n){case`style`:rn(e,r,o);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)en(e,r);else if(typeof r==`number`||typeof r==`bigint`)en(e,``+r);else return;break;case`onScroll`:r!=null&&Wf(`scroll`,e);return;case`onScrollEnd`:r!=null&&Wf(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=ln);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!kt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),o=n.slice(2,a?n.length-7:void 0),t=e[J]||null,t=t==null?null:t[n],typeof t==`function`&&e.removeEventListener(o,t,a),typeof r==`function`)){typeof t!=`function`&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(o,r,a);break a}It=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):Rt(e,n,r)}return}It=!0}function op(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Wf(`error`,e),Wf(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:ip(e,t,o,s,n,null)}}a&&ip(e,t,`srcSet`,n.srcSet,n,null),r&&ip(e,t,`src`,n.src,n,null);return;case`input`:Wf(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:ip(e,t,r,d,n,null)}}Yt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Wf(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:ip(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Zt(e,!!r,n,!0):Zt(e,!!r,t,!1);return;case`textarea`:for(s in Wf(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:ip(e,t,s,c,n,null)}$t(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:ip(e,t,l,r,n,null)}return;case`dialog`:Wf(`beforetoggle`,e),Wf(`toggle`,e),Wf(`cancel`,e),Wf(`close`,e);break;case`iframe`:case`object`:Wf(`load`,e);break;case`video`:case`audio`:for(r=0;r<Vf.length;r++)Wf(Vf[r],e);break;case`image`:Wf(`error`,e),Wf(`load`,e);break;case`details`:Wf(`toggle`,e);break;case`embed`:case`source`:case`link`:Wf(`error`,e),Wf(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:ip(e,t,u,r,n,null)}return;default:if(an(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&ap(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&ip(e,t,c,r,n,null))}var sp={};function cp(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||ip(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:m!==f&&(It=!0),o=m;break;case`name`:m!==f&&(It=!0),a=m;break;case`checked`:m!==f&&(It=!0),u=m;break;case`defaultChecked`:m!==f&&(It=!0),d=m;break;case`value`:m!==f&&(It=!0),s=m;break;case`defaultValue`:m!==f&&(It=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&ip(e,t,p,m,r,f)}}Jt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||ip(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:o!==l&&(It=!0),p=o;break;case`defaultValue`:o!==l&&(It=!0),c=o;break;case`multiple`:o!==l&&(It=!0),s=o;default:o!==l&&ip(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Zt(e,!!n,n?[]:``,!1):Zt(e,!!n,t,!0)):Zt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:ip(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:a!==o&&(It=!0),p=a;break;case`defaultValue`:a!==o&&(It=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&ip(e,t,s,a,r,o)}Qt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:ip(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:p!==m&&(It=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:ip(e,t,l,p,r,m)}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 g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&ip(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:ip(e,t,u,p,r,m)}return;default:if(an(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&ap(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||ap(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&ip(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||ip(e,t,f,p,r,m)}function lp(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function up(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&lp(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&lp(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var dp=null,fp=null;function pp(e){return e.nodeType===9?e:e.ownerDocument}function mp(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function hp(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function gp(e,t,n,r){return n=pp(n).createElement(e),n[q]=r,n[J]=t,op(n,e,t),Et(n),n}function _p(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var vp=null;function yp(){var e=window.event;return e&&e.type===`popstate`?e!==vp&&(vp=e,!0):(vp=null,!1)}var bp=typeof setTimeout==`function`?setTimeout:void 0,xp=typeof clearTimeout==`function`?clearTimeout:void 0,Sp=typeof Promise==`function`?Promise:void 0,Cp=typeof requestAnimationFrame==`function`?requestAnimationFrame:bp,wp=typeof queueMicrotask==`function`?queueMicrotask:Sp===void 0?bp:function(e){return Sp.resolve(null).then(e).catch(Tp)};function Tp(e){setTimeout(function(){throw e})}function Ep(e){return e===`head`}function Dp(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Kh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)xm(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,xm(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[yt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&xm(e.ownerDocument.body)}n=i}while(n);Kh(t)}function Op(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function kp(e,t,n){if(t=CSS.escape(t)===t?t:`r-`+btoa(t).replace(/=/g,``),e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display===`inline`){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var a=t[i];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?`inline-block`:`block`,e.marginTop=`-`+n.paddingTop,e.marginBottom=`-`+n.paddingBottom)}}function Ap(e,t){e=e.style,t=t.style;var n=t==null?null:t.hasOwnProperty(`viewTransitionName`)?t.viewTransitionName:t.hasOwnProperty(`view-transition-name`)?t[`view-transition-name`]:null;e.viewTransitionName=n==null||typeof n==`boolean`?``:(``+n).trim(),n=t==null?null:t.hasOwnProperty(`viewTransitionClass`)?t.viewTransitionClass:t.hasOwnProperty(`view-transition-class`)?t[`view-transition-class`]:null,e.viewTransitionClass=n==null||typeof n==`boolean`?``:(``+n).trim(),e.display===`inline-block`&&(t==null?e.display=e.margin=``:(n=t.display,e.display=n==null||typeof n==`boolean`?``:n,n=t.margin,n==null?(n=t.hasOwnProperty(`marginTop`)?t.marginTop:t[`margin-top`],e.marginTop=n==null||typeof n==`boolean`?``:n,t=t.hasOwnProperty(`marginBottom`)?t.marginBottom:t[`margin-bottom`],e.marginBottom=t==null||typeof t==`boolean`?``:t):e.margin=n))}function jp(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position===`absolute`||t.position===`fixed`,clip:t.clipPath!==`none`||t.overflow!==`visible`||t.filter!==`none`||t.mask!==`none`||t.mask!==`none`||t.borderRadius!==`0px`,view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function Mp(e){return jp(e.getBoundingClientRect(),getComputedStyle(e),e)}function Np(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return jp(t,n,e)}function Pp(e){return e.documentElement.clientHeight}function Fp(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Ip(e,t,n,r,i,a,o,s,c){var l=t.nodeType===9?t:t.ownerDocument;try{var u=l.startViewTransition({update:function(){var t=l.defaultView,n=t.navigation&&t.navigation.transition,o=l.fonts.status;r();var s=[];if(o===`loaded`&&(Pp(l),l.fonts.status===`loading`&&s.push(l.fonts.ready)),o=s.length,e!==null)for(var c=e.suspenseyImages,u=0,d=0;d<c.length;d++){var f=c[d];if(!f.complete){var p=f.getBoundingClientRect();if(0<p.bottom&&0<p.right&&p.top<t.innerHeight&&p.left<t.innerWidth){if(u+=eh(f),u>rh){s.length=o;break}f=new Promise(Fp.bind(f)),s.push(f)}}}if(0<s.length)return t=Promise.race([Promise.all(s),new Promise(function(e){return setTimeout(e,500)})]).then(i,i),(n?Promise.allSettled([n.finished,t]):t).then(a,a);if(i(),n)return n.finished.then(a,a);a()},types:n});l.__reactViewTransition=u;var d=[];return u.ready.then(function(){for(var e=l.documentElement.getAnimations({subtree:!0}),t=0;t<e.length;t++){var n=e[t],r=n.effect,i=r.pseudoElement;if(i!=null&&i.startsWith(`::view-transition`)){d.push(n),n=r.getKeyframes();for(var a=i=void 0,s=!0,c=0;c<n.length;c++){var u=n[c],f=u.width;if(i===void 0)i=f;else if(i!==f){s=!1;break}if(f=u.height,a===void 0)a=f;else if(a!==f){s=!1;break}delete u.width,delete u.height,u.transform===`none`&&delete u.transform}s&&i!==void 0&&a!==void 0&&(r.setKeyframes(n),s=getComputedStyle(r.target,r.pseudoElement),s.width!==i||s.height!==a)&&(s=n[0],s.width=i,s.height=a,s=n[n.length-1],s.width=i,s.height=a,r.setKeyframes(n))}}o()},function(e){l.__reactViewTransition===u&&(l.__reactViewTransition=null);try{if(typeof e==`object`&&e)switch(e.name){case`InvalidStateError`:(e.message===`View transition was skipped because document visibility state is hidden.`||e.message===`Skipping view transition because document visibility state has become hidden.`||e.message===`Skipping view transition because viewport size changed.`||e.message===`Transition was aborted because of invalid state`)&&(e=null)}e!==null&&c(e)}finally{r(),i(),o()}}),u.finished.finally(function(){for(var e=0;e<d.length;e++)d[e].cancel();l.__reactViewTransition===u&&(l.__reactViewTransition=null),s()}),u}catch{return r(),i(),o(),null}}function Lp(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Lp.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:w({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Lp.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],i=0;i<n.length;i++){var a=n[i].effect;a!==null&&a.target===e&&a.pseudoElement===t&&r.push(n[i])}return r},Lp.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Rp(e){return{name:e,group:new Lp(`group`,e),imagePair:new Lp(`image-pair`,e),old:new Lp(`old`,e),new:new Lp(`new`,e)}}function zp(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}zp.prototype.addEventListener=function(e,t,n){var r=null,i=null;if(!(n!=null&&typeof n!=`boolean`&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var a=this._eventListeners;if(Wp(a,e,t,n)===-1){var o=this,s=t;n!=null&&typeof n!=`boolean`&&!0===n.once&&(s=function(r){o.removeEventListener(e,t,n),typeof t==`function`?t.call(this,r):t.handleEvent(r)}),r!==null&&(i=o.removeEventListener.bind(o,e,t,n),r.addEventListener(`abort`,i,{once:!0}),i=r.removeEventListener.bind(r,`abort`,i)),r=Hp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),f(this._fragmentFiber.child,!1,Bp,e,s,r)}this._eventListeners=a}};function Bp(e,t,n,r){return _(e).addEventListener(t,n,r),!1}zp.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Wp(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=Hp(i.optionsOrUseCapture),f(this._fragmentFiber.child,!1,Vp,e,n,i),r.splice(t,1),a!==null&&a()}};function Vp(e,t,n,r){return _(e).removeEventListener(t,n,r),!1}function Hp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Up(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Wp(e,t,n,r){if(e.length===0)return-1;r=Up(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&Up(a.optionsOrUseCapture)===r)return i}return-1}zp.prototype.dispatchEvent=function(e){var t=p(this._fragmentFiber);if(t===null)return!0;t=_(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(``):document.createTextNode(``);if(n)for(var i=0;i<n.length;i++){var a=n[i];r.addEventListener(a.type,a.attachedListener,Hp(a.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(i=0;i<n.length;i++)a=n[i],r.removeEventListener(a.type,a.attachedListener,Hp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},zp.prototype.focus=function(e){f(this._fragmentFiber.child,!0,Gp,e,void 0,void 0)};function Gp(e,t){return e.tag!==6&&(e=_(e),_m(e,t))}zp.prototype.focusLast=function(e){var t=[];f(this._fragmentFiber.child,!0,Kp,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Gp(t[n],e);n--);};function Kp(e,t){return t.push(e),!1}zp.prototype.blur=function(){var e=p(this._fragmentFiber);e!==null&&(e=_(e),e=pp(e).activeElement,e!==null&&f(this._fragmentFiber.child,!1,qp,e,void 0,void 0))};function qp(e,t){return e.tag!==6&&(e=_(e),e===t||e.contains(t)?(t.blur(),!0):!1)}zp.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),f(this._fragmentFiber.child,!1,Jp,e,void 0,void 0)};function Jp(e,t){return e.tag===6||(e=_(e),t.observe(e)),!1}zp.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),f(this._fragmentFiber.child,!1,Yp,e,void 0,void 0);for(var n=t=0;n<Xp.length;n++){var r=Xp[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):Xp[t++]=r}Xp.length=t}};function Yp(e,t){return e.tag===6||(e=_(e),t.unobserve(e)),!1}var Xp=[],Zp=!1;function Qp(e,t,n){Xp.push({fragmentInstance:e,observer:t,instance:n}),Zp||(Zp=!0,vm(function(){Zp=!1;var e=Xp;Xp=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}zp.prototype.getClientRects=function(){var e=[];return f(this._fragmentFiber.child,!1,$p,e,void 0,void 0),e};function $p(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=_(e),t.push.apply(t,e.getClientRects());return!1}zp.prototype.getRootNode=function(e){var t=p(this._fragmentFiber);return t===null?this:_(t).getRootNode(e)},zp.prototype.compareDocumentPosition=function(e){var t=p(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];f(this._fragmentFiber.child,!1,Kp,n,void 0,void 0);var r=_(t);if(n.length===0){if(n=r,m(this._fragmentFiber)){a:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break a}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=h(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=_(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=_(n[0]),i=_(n[n.length-1]);var a=m(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=i.compareDocumentPosition(e),c=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&a&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&i===e||c||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||em(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function em(e,t,n,r,i){var a=St(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)a:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break a}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;a:{for(a=t,t=p(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break a}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=C(n,a,S),t===null?t=!1:(f(t,!0,b,a,n),a=v,v=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=C(r,a,S),t===null?t=!1:(f(t,!0,x,a,r),a=v,y=v=null,t=a!==null)),t):!1}function tm(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}zp.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];f(this._fragmentFiber.child,!1,Kp,t,void 0,void 0);var n=!1!==e;if(t.length===0){var r=h(this._fragmentFiber);if(r=n?r[1]||r[0]||p(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=_(r),tm(e,n);return}if(r=_(r),r.nodeType!==9){if(r.nodeType===11){n=`host`in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var a=t[r];a.tag===6?(a=_(a),tm(a,n)):_(a).scrollIntoView(e),r+=n?-1:1}};function nm(e,t){return e=_(e),rm(e,t),!1}function rm(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function im(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,Hp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<Xp.length;i++){var a=Xp[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(Xp[r++]=a)}Xp.length=r,n.observe(e)}),rm(e,t))}function am(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,Hp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?Qp(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function om(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:om(n),xt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function sm(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[yt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=pm(e.nextSibling),e===null)break}return null}function cm(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=pm(e.nextSibling),e===null))return null;return e}function lm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=pm(e.nextSibling),e===null))return null;return e}function um(e){return e.data===`$?`||e.data===`$~`}function dm(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function fm(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function pm(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var mm=null;function hm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return pm(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function gm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function _m(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener(`focus`,n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener(`focus`,n,!0)}return r}function vm(e){Cp(function(){Cp(function(t){return e(t)})})}function ym(e,t,n){switch(t=pp(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function bm(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&ip(e,t,r,null,sp,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===ln&&(e.onclick=null),xt(e)}function xm(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);xt(e)}var Sm=new Map,Cm=new Set;function wm(e){if(typeof e.getRootNode==`function`){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var Tm=se.d;se.d={f:Em,r:Dm,D:Am,C:jm,L:Mm,m:Nm,X:Fm,S:Pm,M:Im};function Em(){var e=Tm.f(),t=Bd();return e||t}function Dm(e){var t=Ct(e);t!==null&&t.tag===5&&t.type===`form`?Zs(t):Tm.r(e)}var Om=typeof document>`u`?null:document;function km(e,t,n){var r=Om;if(r&&typeof t==`string`&&t){var i=qt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Cm.has(i)||(Cm.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),op(t,`link`,e),Et(t),r.head.appendChild(t)))}}function Am(e){Tm.D(e),km(`dns-prefetch`,e,null)}function jm(e,t){Tm.C(e,t),km(`preconnect`,e,t)}function Mm(e,t,n){Tm.L(e,t,n);var r=Om;if(r&&e&&t){var i=`link[rel="preload"][as="`+qt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+qt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+qt(n.imageSizes)+`"]`)):i+=`[href="`+qt(e)+`"]`;var a=i;switch(t){case`style`:a=Rm(e);break;case`script`:a=Hm(e)}if(!(Sm.has(a)||(e=w({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Sm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(zm(a))||t===`script`&&r.querySelector(Um(a))))){var o=r.createElement(`link`);op(o,`link`,e),t===`style`&&(o[bt]=!0,o.onload=o.onerror=function(){Dt(o)}),Et(o),r.head.appendChild(o)}}}function Nm(e,t){Tm.m(e,t);var n=Om;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+qt(r)+`"][href="`+qt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Hm(e)}if(!Sm.has(a)&&(e=w({rel:`modulepreload`,href:e},t),Sm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Um(a)))return}r=n.createElement(`link`),op(r,`link`,e),Et(r),n.head.appendChild(r)}}}function Pm(e,t,n){Tm.S(e,t,n);var r=Om;if(r&&e){var i=Tt(r).hoistableStyles,a=Rm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(zm(a)))s.loading=5;else{e=w({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Sm.get(a))&&Km(e,n);var c=o=r.createElement(`link`);Et(c),op(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Gm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Fm(e,t){Tm.X(e,t);var n=Om;if(n&&e){var r=Tt(n).hoistableScripts,i=Hm(e),a=r.get(i);a||(a=n.querySelector(Um(i)),a||(e=w({src:e,async:!0},t),(t=Sm.get(i))&&qm(e,t),a=n.createElement(`script`),Et(a),op(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Im(e,t){Tm.M(e,t);var n=Om;if(n&&e){var r=Tt(n).hoistableScripts,i=Hm(e),a=r.get(i);a||(a=n.querySelector(Um(i)),a||(e=w({src:e,async:!0,type:`module`},t),(t=Sm.get(i))&&qm(e,t),a=n.createElement(`script`),Et(a),op(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Lm(e,t,n,r){var a=(a=me.current)?wm(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Rm(n.href),t=Tt(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Rm(n.href);var o=Tt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(zm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=Sm.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Sm.set(e,o)),Vm(a,e,o,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=Hm(n),t=Tt(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Rm(e){return`href="`+qt(e)+`"`}function zm(e){return`link[rel="stylesheet"][`+e+`]`}function Bm(e){return w({},e,{"data-precedence":e.precedence,precedence:null})}function Vm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[bt]){r.loading=1;return}}else t=e.createElement(`link`),t[bt]=!0,t.onload=t.onerror=Dt.bind(null,t),op(t,`link`,n),Et(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Hm(e){return`[src="`+qt(e)+`"]`}function Um(e){return`script[async]`+e}function Wm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+qt(n.href)+`"]`);if(r)return t.instance=r,Et(r),r;var a=w({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Et(r),op(r,`style`,a),Gm(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Rm(n.href);var o=e.querySelector(zm(a));if(o)return t.state.loading|=4,t.instance=o,Et(o),o;r=Bm(n),(a=Sm.get(a))&&Km(r,a),o=(e.ownerDocument||e).createElement(`link`),Et(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),op(o,`link`,r),t.state.loading|=4,Gm(o,n.precedence,e),t.instance=o;case`script`:return o=Hm(n.src),(a=e.querySelector(Um(o)))?(t.instance=a,Et(a),a):(r=n,(a=Sm.get(o))&&(r=w({},n),qm(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Et(a),op(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Gm(r,n.precedence,e));return t.instance}function Gm(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Km(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function qm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Jm=null;function Ym(e,t,n){if(Jm===null){var r=new Map,i=Jm=new Map;i.set(n,r)}else i=Jm,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[yt]||a[q]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Xm(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Zm(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Qm(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function $m(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function eh(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function th(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=eh(t),e.suspenseyImages.push(t)),e=sh.bind(e),t.decode().then(e,e))}function nh(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Rm(r.href),a=t.querySelector(zm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=oh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Et(a);return}a=t.ownerDocument||t,r=Bm(r),(i=Sm.get(i))&&Km(r,i),a=a.createElement(`link`),Et(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),op(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=oh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var rh=0;function ih(e,t){return e.stylesheets&&e.count===0&&lh(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&lh(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&rh===0&&(rh=62500*up());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&lh(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>rh?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function ah(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)lh(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function oh(){this.count--,ah(this)}function sh(){this.imgCount--,ah(this)}var ch=null;function lh(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ch=new Map,t.forEach(uh,e),ch=null,oh.call(e))}function uh(e,t){if(!(t.state.loading&4)){var n=ch.get(e);if(n)var r=n.get(null);else{n=new Map,ch.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=oh.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var dh={$$typeof:M,Provider:null,Consumer:null,_currentValue:H,_currentValue2:H,_threadCount:0};function fh(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,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=et(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=et(0),this.hiddenUpdates=et(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function ph(e,t,n,r,i,a,o,s,c,l,u,d){return e=new fh(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Ci(3,null,null,t),e.current=a,a.stateNode=e,t=wa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},oo(a),e}function mh(e){return e?(e=xi,e):xi}function hh(e,t,n,r,i,a){i=mh(i),r.context===null?r.context=i:r.pendingContext=i,r=co(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=lo(e,r,t),n!==null&&(Fd(n,e,t),uo(n,e,t))}function gh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function _h(e,t){gh(e,t),(e=e.alternate)&&gh(e,t)}function vh(e){if(e.tag===13||e.tag===31){var t=vi(e,67108864);t!==null&&Fd(t,e,67108864),_h(e,67108864)}}function yh(e){if(e.tag===13||e.tag===31){var t=Md();t=ct(t);var n=vi(e,t);n!==null&&Fd(n,e,t),_h(e,t)}}var bh=!0;function xh(e,t,n,r){var i=V.T;V.T=null;var a=se.p;try{se.p=2,Ch(e,t,n,r)}finally{se.p=a,V.T=i}}function Sh(e,t,n,r){var i=V.T;V.T=null;var a=se.p;try{se.p=8,Ch(e,t,n,r)}finally{se.p=a,V.T=i}}function Ch(e,t,n,r){if(bh){var i=wh(r);if(i===null)Yf(e,t,r,Th,n),Ih(e,r);else if(Rh(i,e,t,n,r))r.stopPropagation();else if(Ih(e,r),t&4&&-1<Fh.indexOf(e)){for(;i!==null;){var a=Ct(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Je(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-G(o);s.entanglements[1]|=c,o&=~c}Of(a),!(Xu&6)&&(_d=je()+500,kf(0,!1))}}break;case 31:case 13:s=vi(a,2),s!==null&&Fd(s,a,2),Bd(),_h(a,2)}if(a=wh(r),a===null&&Yf(e,t,r,Th,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Yf(e,t,r,null,n)}}function wh(e){return e=dn(e),Eh(e)}var Th=null;function Eh(e){if(Th=null,e=St(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Th=e,null}function Dh(e){switch(e){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`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`fullscreenerror`: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`resize`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Me()){case Ne:return 2;case Pe:return 8;case Fe:case Ie:return 32;case Le:return 268435456;default:return 32}default:return 32}}var Oh=!1,kh=null,Ah=null,jh=null,Mh=new Map,Nh=new Map,Ph=[],Fh=`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 Ih(e,t){switch(e){case`focusin`:case`focusout`:kh=null;break;case`dragenter`:case`dragleave`:Ah=null;break;case`mouseover`:case`mouseout`:jh=null;break;case`pointerover`:case`pointerout`:Mh.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Nh.delete(t.pointerId)}}function Lh(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Ct(t),t!==null&&vh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Rh(e,t,n,r,i){switch(t){case`focusin`:return kh=Lh(kh,e,t,n,r,i),!0;case`dragenter`:return Ah=Lh(Ah,e,t,n,r,i),!0;case`mouseover`:return jh=Lh(jh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Mh.set(a,Lh(Mh.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Nh.set(a,Lh(Nh.get(a)||null,e,t,n,r,i)),!0}return!1}function zh(e){var t=St(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,ft(e.priority,function(){yh(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,ft(e.priority,function(){yh(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Bh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=wh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);un=r,n.target.dispatchEvent(r),un=null}else return t=Ct(n),t!==null&&vh(t),e.blockedOn=n,!1;t.shift()}return!0}function Vh(e,t,n){Bh(e)&&n.delete(t)}function Hh(){Oh=!1,kh!==null&&Bh(kh)&&(kh=null),Ah!==null&&Bh(Ah)&&(Ah=null),jh!==null&&Bh(jh)&&(jh=null),Mh.forEach(Vh),Nh.forEach(Vh)}function Uh(e,n){e.blockedOn===n&&(e.blockedOn=null,Oh||(Oh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Hh)))}var Wh=null;function Gh(e){Wh!==e&&(Wh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Wh===e&&(Wh=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(Eh(r||n)===null)continue;break}var a=Ct(n);a!==null&&(e.splice(t,3),t-=3,Ys(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Kh(e){function t(t){return Uh(t,e)}kh!==null&&Uh(kh,e),Ah!==null&&Uh(Ah,e),jh!==null&&Uh(jh,e),Mh.forEach(t),Nh.forEach(t);for(var n=0;n<Ph.length;n++){var r=Ph[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Ph.length&&(n=Ph[0],n.blockedOn===null);)zh(n),n.blockedOn===null&&Ph.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[J]||null;if(typeof a==`function`)o||Gh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[J]||null)s=o.formAction;else if(Eh(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Gh(n)}}}function qh(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Jh(e){this._internalRoot=e}Yh.prototype.render=Jh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;hh(n,Md(),e,t,null,null)},Yh.prototype.unmount=Jh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;hh(e.current,2,null,e,null,null),Bd(),t[mt]=null}};function Yh(e){this._internalRoot=e}Yh.prototype.unstable_scheduleHydration=function(e){if(e){var t=dt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ph.length&&t!==0&&t<Ph[n].priority;n++);Ph.splice(n,0,e),n===0&&zh(e)}};var Xh=n.version;if(Xh!==`19.3.1`)throw Error(i(527,Xh,`19.3.1`));se.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var Zh={bundleType:0,version:`19.3.1`,rendererPackageName:`react-dom`,currentDispatcherRef:V,reconcilerVersion:`19.3.1`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Qh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Qh.isDisabled&&Qh.supportsFiber)try{Be=Qh.inject(Zh),Ve=Qh}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=vc,s=yc,c=bc;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=ph(e,1,!1,null,null,n,r,null,o,s,c,qh),e[mt]=t.current,qf(e),new Jh(t)}})),dt=et(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=ut()})),ft=et((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),pt=et(((e,t)=>{t.exports=ft()})),q=rt(at(),1),J=pt(),mt=q.createContext(void 0),ht=e=>{let t=q.useContext(mt);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},gt=({client:e,children:t})=>(q.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,J.jsx)(mt.Provider,{value:e,children:t})),_t={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},vt=new class{#e=_t;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function yt(e){setTimeout(e,0)}var bt=typeof window>`u`||`Deno`in globalThis;function xt(){}function St(e,t){return typeof e==`function`?e(t):e}function Ct(e){return typeof e==`number`&&e>=0&&e!==1/0}function wt(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Tt(e,t){return typeof e==`function`?e(t):e}function Et(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==Ot(o,t.options))return!1}else if(!At(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function Dt(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(kt(t.options.mutationKey)!==kt(a))return!1}else if(!At(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Ot(e,t){return(t?.queryKeyHashFn||kt)(e)}function kt(e){return JSON.stringify(e,(e,t)=>Ft(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function At(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){if(t.length>e.length)return!1;for(let n=0;n<t.length;n++)if(!At(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!At(e[r],t[r]))return!1;return!0}return!1}var jt=Object.prototype.hasOwnProperty;function Mt(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=Pt(e)&&Pt(t);if(!r&&!(Ft(e)&&Ft(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:jt.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=Mt(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function Nt(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function Pt(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ft(e){if(!It(e))return!1;let t=Object.getPrototypeOf(e),n=t?.constructor;if(n===void 0)return!0;if(typeof n!=`function`)return!1;let r=n.prototype;return!(!It(r)||!r.hasOwnProperty(`isPrototypeOf`)||t!==Object.prototype)}function It(e){return Object.prototype.toString.call(e)===`[object Object]`}function Lt(e){return new Promise(t=>{vt.setTimeout(t,e)})}function Rt(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:Mt(e,t)}function zt(e){return e}function Bt(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function Vt(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Ht=Symbol();function Ut(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Ht?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Wt(e,t){return typeof e==`function`?e(...t):!!e}function Gt(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r||(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0})),i)}),e}var Kt=()=>bt,qt=()=>Kt(),Jt=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Yt=new class extends Jt{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},Xt=yt;function Zt(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=Xt,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var Qt=Zt(),$t=new class extends Jt{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function en(e){return Math.min(1e3*2**e,3e4)}function tn(e){return(e??`online`)!==`online`||$t.isOnline()}var nn=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function rn(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(xt);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new nn(t);h(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>Yt.isFocused()&&(e.networkMode===`always`||$t.isOnline())&&e.canRun(),p=()=>tn(e.networkMode)&&e.canRun(),m=e=>{c()||(r?.(),i=`resolved`,a(e))},h=e=>{c()||(r?.(),i=`rejected`,o(e))},g=t=>new Promise(n=>{r=e=>{(c()||t())&&n(e)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),_=()=>{if(c())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(m).catch(r=>{if(c())return;let i=e.retry??(qt()?0:3),a=e.retryDelay??en,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);t||!s?h(r):(n++,e.onFail?.(n,r),Lt(o).then(()=>f()?void 0:g(f)).then(()=>{t?h(r):_()}))})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:d,canStart:p,start:()=>(p()?_():g(p).then(_),s)}}var an=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ct(this.gcTime)&&(this.#e=vt.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(qt()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(vt.clearTimeout(this.#e),this.#e=void 0)}};function on(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{Gt(e,()=>t.signal,()=>n=!0)},u=Ut(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?Vt:Bt;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?cn:sn,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]===void 0?r.initialPageParam:o[0]:sn(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.fetchFn=t.options.persister?()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function sn(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function cn(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var ln=class extends an{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=fn(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=fn(this.options);e.data!==void 0&&(this.setState(dn(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=Rt(this.state.data,e,this.options);return this.#c({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#c({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(xt).catch(xt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Tt(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ht||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>Tt(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!wt(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){let t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#a&&(this.#s||this.state.fetchStatus===`paused`&&this.state.status===`pending`?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#c({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=Ut(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?on(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta});let o=this.#a=rn({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof nn&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await o.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof nn){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.#a===o&&(this.#a=void 0),this.scheduleGc()}}#c(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...un(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...dn(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),Qt.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function un(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:tn(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function dn(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function fn(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var pn=class extends Jt{#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p=new Set;constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),hn(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return gn(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return gn(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof Tt(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!Nt(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&_n(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#t!==n||Tt(this.options.enabled,this.#t)!==Tt(t.enabled,this.#t)||Tt(this.options.staleTime,this.#t)!==Tt(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||Tt(this.options.enabled,this.#t)!==Tt(t.enabled,this.#t)||i!==this.#f)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Nt(this.getCurrentResult(),n)||(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),Reflect.get(e,n))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t),r=()=>{},i,a=new Promise(e=>{i=e,r=this.#e.getQueryCache().subscribe(i=>{i.type===`updated`&&i.query.queryHash===n.queryHash&&n.state.data!==void 0&&(r(),e(this.createResult(n,t)))})});return Promise.race([n.fetch(t).then(()=>{let e=this.createResult(n,t);return i?.(e),e}).finally(()=>{r()}),a])}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#m(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(xt)),t}#h(e){return!qt()&&Tt(this.options.enabled,this.#t)!==!1&&Ct(e)}#g(){this.#b();let e=Tt(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=wt(this.#r.dataUpdatedAt,e)+1;this.#u=vt.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return Tt(this.options.refetchInterval,this.#t)??!1}#v(e){this.#x(),this.#f=e,this.#f!==0&&this.#h(this.#f)&&(this.#d=vt.setInterval(()=>{(this.options.refetchIntervalInBackground||Yt.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(vt.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(vt.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&hn(e,t),o=i&&_n(e,n,t,r);(a||o)&&(l={...l,...un(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,e!==void 0&&(m=`success`,d=Rt(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h){if(i&&d===a?.data&&t.select===this.#s)d=this.#c;else try{this.#s=t.select,d=t.select(d),d=Rt(i?.data,d,t),this.#c=d,this.#o=null}catch(e){this.#o=e}}else d===void 0&&(this.#o=null);this.#o&&(f=this.#o,d=this.#c,p=Date.now(),m=`error`,u=!1);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0;return{status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:vn(e,t),refetch:this.refetch,isEnabled:Tt(t.enabled,e)!==!1}}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#l=this.#t),Nt(t,e))return;this.#r=t;let n=(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#p.size)return!0;let r=new Set(n??this.#p);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})();Qt.batch(()=>{n&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}};function mn(e,t){return Tt(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||Tt(t.retryOnMount,e)!==!1)}function hn(e,t){return mn(e,t)||e.state.data!==void 0&&gn(e,t,t.refetchOnMount)}function gn(e,t,n){if(Tt(t.enabled,e)!==!1&&Tt(t.staleTime,e)!==`static`){let r=Tt(n,e);return r===`always`||r!==!1&&vn(e,t)}return!1}function _n(e,t,n,r){return(e!==t||Tt(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&vn(e,n)}function vn(e,t){return Tt(t.enabled,e)!==!1&&e.isStaleByTime(Tt(t.staleTime,e))}var yn=class extends an{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||bn(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??(this.state.status===`pending`?this.execute(this.state.variables):Promise.resolve())}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},r=this.#r=rn({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),i=this.state.status===`pending`,a=!r.canStart();try{if(i)t();else{this.#i({type:`pending`,variables:e,isPaused:a}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:a})}let o=await r.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),this.#i({type:`success`,data:o}),o}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#r===r&&(this.#r=void 0),this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),Qt.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function bn(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var xn=class extends Jt{#e;#t;#n;constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}build(e,t,n){let r=new yn({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=Sn(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=Sn(e);if(typeof t==`string`){let n=this.#t.get(t);if(n){if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=Sn(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}return!0}runNext(e){let t=Sn(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){Qt.batch(()=>{let e=this.getAll();this.#e.clear(),this.#t.clear(),e.forEach(e=>{this.notify({type:`removed`,mutation:e})})})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Dt(t,e))}findAll(e={}){return this.getAll().filter(t=>Dt(e,t))}notify(e){Qt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return Qt.batch(()=>Promise.all(e.map(e=>e.continue().catch(xt))))}};function Sn(e){return e.options.scope?.id}var Cn=class extends Jt{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),Nt(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&kt(t.mutationKey)!==kt(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onSubscribe(){this.listeners.size===1&&this.#n&&(this.#n.addObserver(this),this.#i())}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??bn();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){Qt.batch(()=>{let t=this.#r;if(t&&this.hasListeners()){let n=this.#t.variables,r=this.#t.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{t.onSuccess?.(e.data,n,r,i)}catch(e){Promise.reject(e)}try{t.onSettled?.(e.data,null,n,r,i)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{t.onError?.(e.error,n,r,i)}catch(e){Promise.reject(e)}try{t.onSettled?.(void 0,e.error,n,r,i)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}};function wn(e,t){let n=new Set(t);return e.filter(e=>!n.has(e))}var Tn=class extends Jt{#e;#t;#n;#r;#i;#a;#o;#s;#c;#l=[];constructor(e,t,n){super(),this.#e=e,this.#r=n,this.#n=[],this.#i=[],this.#t=[],this.setQueries(t)}onSubscribe(){this.listeners.size===1&&this.#i.forEach(e=>{e.subscribe(t=>{this.#m(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#i.forEach(e=>{e.destroy()})}setQueries(e,t){this.#n=e,this.#r=t,Qt.batch(()=>{let e=this.#i,t=this.#p(this.#n);t.forEach(e=>e.observer.setOptions(e.defaultedQueryOptions));let n=t.map(e=>e.observer),r=n.map(e=>e.getCurrentResult()),i=e.length!==n.length,a=n.some((t,n)=>t!==e[n]),o=i||a,s=o?!0:r.some((e,t)=>{let n=this.#t[t];return!n||!Nt(e,n)});(o||s)&&(o&&(this.#l=t,this.#i=n),this.#t=r,this.hasListeners()&&(o&&(wn(e,n).forEach(e=>{e.destroy()}),wn(n,e).forEach(e=>{e.subscribe(t=>{this.#m(e,t)})})),this.#h()))})}getCurrentResult(){return this.#t}getQueries(){return this.#i.map(e=>e.getCurrentQuery())}getObservers(){return this.#i}getOptimisticResult(e,t){let n=this.#p(e),r=n.map(e=>e.observer.getOptimisticResult(e.defaultedQueryOptions)),i=n.map(e=>e.defaultedQueryOptions.queryHash);return[r,e=>this.#d(e??r,t,i),()=>this.#u(r,n)]}#u(e,t){let n=new Set;return t.map((r,i)=>{let a=e[i];return r.defaultedQueryOptions.notifyOnChangeProps?a:r.observer.trackResult(a,e=>{n.has(e)||(n.add(e),t.forEach(t=>{t.observer.trackProp(e)}))})})}#d(e,t,n){if(t){let r=this.#c,i=n!==void 0&&r!==void 0&&(r.length!==n.length||n.some((e,t)=>e!==r[t]));return(this.#t!==this.#s||i||t!==this.#o)&&(this.#o=t,this.#s=this.#t,n!==void 0&&(this.#c=n),this.#a=Mt(this.#a,t(e))),this.#a}return e}#f(){return!this.#r?.combine||this.#i.some((e,t)=>e.options.suspense&&this.#t[t]?.data===void 0)}#p(e){let t=new Map;this.#i.forEach(e=>{let n=e.options.queryHash;if(!n)return;let r=t.get(n);r?r.push(e):t.set(n,[e])});let n=[];return e.forEach(e=>{let r=this.#e.defaultQueryOptions(e),i=t.get(r.queryHash)?.shift()??new pn(this.#e,r);n.push({defaultedQueryOptions:r,observer:i})}),n}#m(e,t){let n=this.#i.indexOf(e);n!==-1&&(this.#t=this.#t.slice(),this.#t[n]=t,this.#h())}#h(){if(this.hasListeners()){let e=this.#f(),t=this.#a,n=e?t:this.#d(this.#u(this.#t,this.#l),this.#r?.combine);(e||t!==n)&&Qt.batch(()=>{this.listeners.forEach(e=>{e(this.#t)})})}}},En=class extends Jt{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,t,n){let r=t.queryKey,i=t.queryHash??Ot(r,t),a=this.get(i);return a||(a=new ln({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){this.#e.get(e.queryHash)===e&&(e.destroy(),this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){Qt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Et(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>Et(e,t)):t}notify(e){Qt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Qt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Qt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Dn=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new En,this.#t=e.mutationCache||new xn,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=Yt.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=$t.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Tt(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=St(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Qt.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;Qt.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return Qt.batch(()=>{let r=n.findAll(e),i=new Set(r);return r.forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,predicate:e=>i.has(e)},t)})}cancelQueries(e,t={}){let n={revert:!0,...t},r=Qt.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(xt).catch(xt)}invalidateQueries(e,t={}){return Qt.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=Qt.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(xt)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(xt)}async query(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t),r=n.isStaleByTime(Tt(t.staleTime,n))?await n.fetch(t):n.state.data,i=t.select;return i?i(r):r}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(Tt(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(xt).catch(xt)}infiniteQuery(e){return e._type=`infinite`,this.query(e)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(xt).catch(xt)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return $t.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(kt(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{At(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(kt(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{At(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=Ot(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===Ht&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},On=q.createContext(!1),kn=()=>q.useContext(On);On.Provider;function An(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var jn=q.createContext(An()),Mn=()=>q.useContext(jn),Nn=(e,t,n)=>{let r=n?.state.status===`error`&&typeof e.throwOnError==`function`?Wt(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},Pn=e=>{q.useEffect(()=>{e.clearReset()},[e])},Fn=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||Wt(n,[e.error,r])),In=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},Ln=(e,t)=>e?.suspense&&t.isPending,Rn=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function zn({queries:e,...t},n){let r=ht(n),i=kn(),a=Mn(),o=t.subscribed!==!1,s=q.useMemo(()=>e.map(e=>{let t=r.defaultQueryOptions(e);return t._optimisticResults=i?`isRestoring`:o?`optimistic`:void 0,t}),[e,r,i,o]);s.forEach(e=>{In(e);let t=r.getQueryCache().get(e.queryHash);Nn(e,a,t)}),Pn(a);let[c]=q.useState(()=>new Tn(r,s,t)),[l,u,d]=c.getOptimisticResult(s,t.combine),f=!i&&o;q.useSyncExternalStore(q.useCallback(e=>f?c.subscribe(Qt.batchCalls(e)):xt,[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),q.useEffect(()=>{c.setQueries(s,t)},[s,t,c]);let p=l.some((e,t)=>Ln(s[t],e))?l.flatMap((e,t)=>{let n=s[t];return n&&Ln(n,e)?Rn(n,new pn(r,n),a):[]}):[];if(p.length>0)throw Promise.all(p);let m=l.find((e,t)=>{let n=s[t];return n&&Fn({result:e,errorResetBoundary:a,throwOnError:n.throwOnError,query:r.getQueryCache().get(n.queryHash),suspense:n.suspense})});if(m)throw m.error;return u(d())}function Bn(e,t,n){let r=kn(),i=Mn(),a=ht(n),o=a.defaultQueryOptions(e),s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,In(o),Nn(o,i,s),Pn(i);let[l]=q.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),d=!r&&c;if(q.useSyncExternalStore(q.useCallback(e=>{let t=d?l.subscribe(Qt.batchCalls(e)):xt;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),q.useEffect(()=>{l.setOptions(o)},[o,l]),Ln(o,u))throw Rn(o,l,i);if(Fn({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return o.notifyOnChangeProps?u:l.trackResult(u)}function Vn(e,t){return Bn(e,pn,t)}function Hn(e,t){let n=ht(t),[r]=q.useState(()=>new Cn(n,e));q.useEffect(()=>{r.setOptions(e)},[r,e]);let i=q.useSyncExternalStore(q.useCallback(e=>r.subscribe(Qt.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=q.useCallback((...e)=>{r.mutate(e[0],e[1]).catch(xt)},[r]);if(i.error&&Wt(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var Un=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Wn=/^[\\/]{2}/;function Gn(e,t){return t+e.replace(/\\/g,`/`)}var Kn=`popstate`;function qn(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function Jn(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return $n(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:er(t)}return nr(t,n,null,e)}function Yn(e,t){if(e===!1||e==null)throw Error(t)}function Xn(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function Zn(){return Math.random().toString(36).substring(2,10)}function Qn(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function $n(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?tr(t):t,state:n,key:t&&t.key||r||Zn(),mask:i}}function er({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function tr(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function nr(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=qn(e)?e:$n(h.location,e,t);n&&n(r,e),l=u()+1;let d=Qn(r,l),f=h.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=qn(e)?e:$n(h.location,e,t);n&&n(r,e),l=u();let i=Qn(r,l),d=h.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return rr(i,e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(Kn,d),c=e,()=>{i.removeEventListener(Kn,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function rr(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),Yn(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:er(t);return i=i.replace(/ $/,`%20`),!n&&Wn.test(i)&&(i=r+i),new URL(i,r)}var ir=class{#e=new Map;constructor(e){if(e)for(let[t,n]of e)this.set(t,n)}get(e){if(this.#e.has(e))return this.#e.get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw Error(`No value found for context`)}set(e,t){this.#e.set(e,t)}},ar=class extends Error{},or=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`children`,`unstable_validateParams`]);function sr(e){return or.has(e)}var cr=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`middleware`,`children`,`unstable_validateParams`]);function lr(e){return cr.has(e)}function ur(e){return e.index===!0}function dr(e){let t={};return e.Component&&Object.assign(t,{element:q.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:q.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:q.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}function fr(e,t=dr,n=[],r={},i=!1){return e.map((e,a)=>{let o=[...n,String(a)],s=typeof e.id==`string`?e.id:o.join(`-`);if(Yn(e.index!==!0||!e.children,`Cannot specify children on an index route`),Yn(i||!r[s],`Found a route id collision on id "${s}". Route id's must be globally unique within Data Router usages`),ur(e)){let n={...e,id:s};return r[s]=pr(n,t(n)),n}{let n={...e,id:s,children:void 0};return r[s]=pr(n,t(n)),e.children&&(n.children=fr(e.children,t,o,r,i)),n}})}function pr(e,t){return Object.assign(e,{...t,...typeof t.lazy==`object`&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function mr(e,t,n=`/`){return hr(e,t,n,!1)}function hr(e,t,n,r,i){let a=Lr((typeof t==`string`?tr(t):t).pathname||`/`,n);if(a==null)return null;let o=i??_r(e),s=null,c=Ir(a);for(let e=0;s==null&&e<o.length;++e)s=Mr(o[e],c,r);return s}function gr(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,loaderData:t[n.id],handle:n.handle}}function _r(e){let t=vr(e);return br(t),t}function vr(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;Yn(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=qr([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(Yn(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),vr(e.children,t,u,l,o)),(e.path!=null||e.index)&&t.push({path:l,score:Ar(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=Fr(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of yr(e.path))a(e,t,!0,n)}),t}function yr(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=yr(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function br(e){e.sort((e,t)=>e.score===t.score?jr(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var xr=/^:[\w-]+$/,Sr=/^:[\w-]+/,Cr=3.5,wr=3,Tr=2,Er=1,Dr=10,Or=-2,kr=e=>e===`*`;function Ar(e,t){let n=e.split(`/`),r=n.length;return n.some(kr)&&(r+=Or),t&&(r+=Tr),n.filter(e=>!kr(e)).reduce((e,t)=>e+(xr.test(t)?wr:Sr.test(t)?Cr:t===``?Er:Dr),r)}function jr(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function Mr(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?Pr(u,l,s.matcher,s.compiledParams):Nr(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=Nr({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:qr([a,d.pathname]),pathnameBase:Yr(qr([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=qr([a,d.pathnameBase]))}return o}function Nr(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Fr(e.path,e.caseSensitive,e.end);return Pr(e,t,n,r)}function Pr(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=Jr(a,1),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=Jr(a.slice(0,a.length-e.length),1)}let i=s[r];return e[t]=n&&!i?void 0:(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function Fr(e,t=!1,n=!0){Xn(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/((?:[^/?()[\]*^\\]|\\.)+)\?(?=\/|$|\()/g,`(?:/$1)?`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function Ir(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return Xn(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Lr(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function Rr({basename:e,pathname:t}){return t===`/`?e:qr([e,t])}var zr=e=>Un.test(e);function Br(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?tr(e):e,a;return n?(n=Kr(n),a=n.startsWith(`/`)||n.startsWith(`\\`)?Vr(n.substring(1),`/`):Vr(n,t)):a=t,{pathname:a,search:Xr(r),hash:Zr(i)}}function Vr(e,t){let n=Jr(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function Hr(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Ur(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Wr(e){let t=Ur(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Gr(e,t,n,r=!1){let i;typeof e==`string`?i=tr(e):(i={...e},Yn(!i.pathname||!i.pathname.includes(`?`),Hr(`?`,`pathname`,`search`,i)),Yn(!i.pathname||!i.pathname.includes(`#`),Hr(`#`,`pathname`,`hash`,i)),Yn(!i.search||!i.search.includes(`#`),Hr(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=Br(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var Kr=e=>e.replace(/[\\/]{2,}/g,`/`),qr=e=>Kr(e.join(`/`));function Jr(e,t=0){let n=e.length;for(;n>t&&e.charCodeAt(n-1)===47;)n--;return n===e.length?e:e.slice(0,n)}var Yr=e=>Jr(e).replace(/^\/*/,`/`),Xr=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Zr=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Qr=[`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],$r=class{status;statusText;data;error;internal;constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function ei(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function ti(e){return qr(e.map(e=>e.route.path).filter(Boolean))||`/`}function ni(e,t){let n=new URL(typeof e==`string`||e instanceof URL?e:e.url),r=typeof t==`string`?tr(t):t;if(n.pathname=r.pathname||`/`,r.search){let e=new URLSearchParams(r.search),t=e.getAll(`index`);e.delete(`index`);for(let n of t.filter(Boolean))e.append(`index`,n);let i=e.toString();n.search=i?`?${i}`:``}else n.search=``;return n.hash=r.hash||``,n}var ri=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function ii(e,t){let n=e;if(typeof n!=`string`||!Un.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(ri)try{let e=new URL(window.location.href),r=Wn.test(n)?new URL(Gn(n,e.protocol)):new URL(n),a=Lr(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{Xn(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}var ai=Symbol(`Uninstrumented`),oi=new WeakMap;function si(e,t){let n={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(e=>e({id:t.id,index:t.index,path:t.path,instrument(e){e.lazy!=null&&n.lazy.push(e.lazy),e[`lazy.loader`]!=null&&n[`lazy.loader`].push(e[`lazy.loader`]),e[`lazy.action`]!=null&&n[`lazy.action`].push(e[`lazy.action`]),e[`lazy.middleware`]!=null&&n[`lazy.middleware`].push(e[`lazy.middleware`]),e.middleware!=null&&n.middleware.push(e.middleware),e.loader!=null&&n.loader.push(e.loader),e.action!=null&&n.action.push(e.action)}}));let r={};if(typeof t.lazy==`function`&&n.lazy.length>0){let e=t.lazy;r.lazy=async(...t)=>pi(await mi(n.lazy,void 0,()=>e(...t),hi))}if(typeof t.lazy==`object`){let e=t.lazy;if(typeof e.middleware==`function`&&n[`lazy.middleware`].length>0){let t=e.middleware;r.lazy=Object.assign(r.lazy||{},{middleware:async(...e)=>pi(await mi(n[`lazy.middleware`],void 0,()=>t(...e),hi))})}if(typeof e.loader==`function`&&n[`lazy.loader`].length>0){let t=e.loader;r.lazy=Object.assign(r.lazy||{},{loader:async(...e)=>pi(await mi(n[`lazy.loader`],void 0,()=>t(...e),hi))})}if(typeof e.action==`function`&&n[`lazy.action`].length>0){let t=e.action;r.lazy=Object.assign(r.lazy||{},{action:async(...e)=>pi(await mi(n[`lazy.action`],void 0,()=>t(...e),hi))})}}if(typeof t.loader==`function`&&n.loader.length>0){let e=li(t.loader),i=async(...t)=>pi(await mi(n.loader,gi(t[0]),()=>e(...t),hi));e.hydrate===!0&&(i.hydrate=!0),ui(i,e),r.loader=i}if(typeof t.action==`function`&&n.action.length>0){let e=li(t.action),i=async(...t)=>pi(await mi(n.action,gi(t[0]),()=>e(...t),hi));ui(i,e),r.action=i}return t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map(e=>{let t=li(e),r=async(...e)=>pi(await mi(n.middleware,gi(e[0]),()=>t(...e),hi));return ui(r,t),r})),r}function ci(e,t){let n={navigate:[],fetch:[]};if(t.forEach(e=>e({instrument(e){e.navigate!=null&&n.navigate.push(e.navigate),e.fetch!=null&&n.fetch.push(e.fetch)}})),n.navigate.length>0){let t=li(e.navigate),r=async(...r)=>{let[i,a]=r,o,s={to:typeof i==`number`||typeof i==`string`?i:i?er(i):`.`,..._i(e,a??{})};return pi(await mi(n.navigate,s,async()=>{if(typeof i==`number`)return await t(...r);let n=di(e,e=>{o=e});try{return await t(...r)}finally{n()}},e=>({...hi(e),meta:o})))};ui(r,t),e.navigate=r}if(n.fetch.length>0){let t=li(e.fetch),r=async(...r)=>{let[i,a,o,s]=r,c;return pi(await mi(n.fetch,{href:o??`.`,fetcherKey:i,..._i(e,s??{})},async()=>{let n=di(e,e=>{c=e});try{return await t(...r)}finally{n()}},e=>({...hi(e),meta:c})))};ui(r,t),e.fetch=r}return e}function li(e){return e[ai]??e}function ui(e,t){e[ai]=t}function di(e,t){return oi.set(e,t),()=>{oi.get(e)===t&&oi.delete(e)}}function fi(e){let t=oi.get(e);return oi.delete(e),t}function pi(e){if(e.type===`error`)throw e.value;return e.value}async function mi(e,t,n,r,i={result:null,innerResult:null},a=e.length-1){let o=e[a];if(o){let s,c=async()=>(s?console.error(`You cannot call instrumented handlers more than once`):s=mi(e,t,n,r,i,a-1),await s,Yn(i.innerResult,`Expected an inner result`),i.innerResult);try{await o(c,t)}catch(e){console.error(`An instrumentation function threw an error:`,e)}s||await c(),await s}else{try{i.result={type:`success`,value:await n()}}catch(e){i.result={type:`error`,value:e}}i.innerResult=r(i.result,t)}return i.result||(i.result={type:`error`,value:Error(`No result assigned in instrumentation chain.`)},i.innerResult=r(i.result,t)),i.result}function hi(e){return e.type===`error`&&e.value instanceof Error?{status:`error`,error:e.value}:{status:`success`,error:void 0}}function gi(e){let{request:t,context:n,params:r}=e;return{...e,request:vi(t),params:{...r},context:yi(n)}}function _i(e,t){return{currentUrl:er(e.state.location),...`formMethod`in t?{formMethod:t.formMethod}:{},...`formEncType`in t?{formEncType:t.formEncType}:{},...`formData`in t?{formData:t.formData}:{},...`body`in t?{body:t.body}:{}}}function vi(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function yi(e){return{get:t=>e.get(t)}}var bi=class{#e=[];#t=[];#n;constructor(e){this.#n=e}update(e){this.#e=e,this.#t=_r(e)}match(e,t=!1){return hr(this.#e,e,this.#n,t,this.#t)}},xi=new URL(`http://localhost`);function Si(e){if(e.createURL)return e.createURL(`/`);try{return new URL(e.createHref(`/`),xi)}catch{return xi}}function Ci(e,t){return e.origin===t.origin&&(e.origin!==`null`||e.protocol===t.protocol&&e.host===t.host)}function wi(e,t){if(e.startsWith(`//`))return!0;let n=t.protocol.toLowerCase();return e.toLowerCase().startsWith(n)?t.host===``||e.slice(n.length).startsWith(`//`):!1}function Ti(e,t,n,r){let i=null;try{i=e==null?null:new URL(e,n)}catch{}let a=new URL(t,n),o=i!=null&&!Ci(i,n),s=!Ci(a,n);if(r===`reject`){if(o||s)throw Error(`External navigation is not allowed`)}else if(s&&(i==null||!wi(e,i)||!Ci(i,a)))throw Error(`External navigation is not allowed`)}var Ei=[`POST`,`PUT`,`PATCH`,`DELETE`],Di=new Set(Ei),Oi=[`GET`,...Ei],ki=new Set(Oi),Ai=new Set([301,302,303,307,308]),ji=new Set([307,308]),Mi={state:`idle`,location:void 0,matches:void 0,historyAction:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ni={state:`idle`,data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Pi={state:`unblocked`,proceed:void 0,reset:void 0,location:void 0},Fi=`remix-router-transitions`,Ii=Symbol(`ResetLoaderData`);function Li(e,t){return e.unstable_routePatternMatching?(Yn(void 0,`You must call unstable_preloadRoutePattern() from "react-router/route-pattern" before enabling future.unstable_routePatternMatching.`),new(void 0)(t)):new bi(t)}var Ri=class{#e;#t;#n;constructor(e,t){this.#e=e,this.#n=t,this.#n.update(e)}get stableRoutes(){return this.#e}get activeRoutes(){return this.#t??this.#e}get hasHMRRoutes(){return this.#t!=null}setRoutes(e){this.#e=e,this.#t||this.#n.update(e)}setHmrRoutes(e){this.#t=e,this.#n.update(e)}commitHmrRoutes(){this.#t&&(this.#e=this.#t,this.#t=void 0,this.#n.update(this.#e))}},zi=new WeakMap;function Bi(e){let t=e.window?e.window:typeof window<`u`?window:void 0,n=t!==void 0&&t.document!==void 0&&t.document.createElement!==void 0;Yn(e.routes.length>0,`You must provide a non-empty routes array to createRouter`);let r=e.hydrationRouteProperties||[],i=e.mapRouteProperties,a=i||(()=>({}));if(e.instrumentations){let t=e.instrumentations;a=e=>({...i?.(e),...si(t.map(e=>e.route).filter(Boolean),e)})}let o={...e.future},s=e.basename||`/`;s.startsWith(`/`)||(s=`/${s}`);let c=Li(o,s),l={},u=new Ri(fr(e.routes,a,void 0,l),c),d=e.dataStrategy||ra,f=null,p=new Set,m=null,h=null,g=null,_=e.hydrationData!=null,v=c.match(e.history.location),y=!1,b=null,x,S;if(v==null&&!e.patchRoutesOnNavigation){let t=Da(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=Ea(u.activeRoutes);x=!0,S=!x,v=n,b={[r.id]:t}}else if(v&&!e.hydrationData&&G(v,e.history.location.pathname).active&&(v=null),!v){x=!1,S=!x,v=[];let t=G(null,e.history.location.pathname);t.active&&t.matches&&(y=!0,v=t.matches)}else if(v.some(e=>e.route.lazy))x=!1,S=!x;else if(!v.some(e=>Gi(e.route)))x=!0,S=!x;else{let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null,r=v;if(n){let e=v.findIndex(e=>n[e.route.id]!==void 0);r=r.slice(0,e+1)}S=!1,x=!0,r.forEach(e=>{let r=Ki(e.route,t,n);S||=r.renderFallback,x&&=!r.shouldLoad})}let C,w={historyAction:e.history.action,location:e.history.location,matches:v,initialized:x,renderFallback:S,navigation:Mi,restoreScrollPosition:e.hydrationData==null&&null,preventScrollReset:!1,revalidation:`idle`,loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||b,fetchers:new Map,blockers:new Map},T=`POP`,E=0,D,O=null,k=!1,A,j=!1,M=new Map,N=null,P=!1,ee=!1,F=new Set,I=new Map,L=0,te=-1,R=new Map,z=new Set,B=new Map,ne=new Map,re=new Set,ie=new Map,ae,oe=null;function V(){if(f=e.history.listen(({action:t,location:n,delta:r})=>{if(ae){ae(),ae=void 0;return}Xn(ie.size===0||r!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let i=Le({currentLocation:w.location,nextLocation:n,historyAction:t});if(i&&r!=null){let t=new Promise(e=>{ae=e});e.history.go(r*-1),Ie(i,{state:`blocked`,location:n,proceed(){Ie(i,{state:`proceeding`,proceed:void 0,reset:void 0,location:n}),t.then(()=>e.history.go(r))},reset(){let e=new Map(w.blockers);e.set(i,Pi),ce({blockers:e})}}),O?.resolve(),O=null}else return o.unstable_customRouteDiscovery&&(E+=r||0),fe(t,n)}),n){Qa(t,M);let e=()=>$a(t,M);t.addEventListener(`pagehide`,e),N=()=>t.removeEventListener(`pagehide`,e)}return w.initialized||fe(`POP`,w.location,{initialHydration:!0}),C}function se(){f&&f(),N&&N(),p.clear(),A&&A.abort(),w.fetchers.forEach((e,t)=>Oe(w.fetchers,t)),w.blockers.forEach((e,t)=>Fe(t))}function H(e){return p.add(e),()=>p.delete(e)}function ce(e,t={}){let n=e.errors??null,r=n?zi.get(n):void 0;r!==void 0&&(n=r),(e.errors!==void 0||e.initialized)&&(w.errors&&zi.delete(w.errors),e.errors&&zi.set(e.errors,n)),e.matches&&=e.matches.map(e=>{let t=l[e.route.id],n=e.route;return n.element!==t.element||n.errorElement!==t.errorElement||n.hydrateFallbackElement!==t.hydrateFallbackElement?{...e,route:t}:e}),w={...w,...e};let i=[],a=[];w.fetchers.forEach((e,t)=>{e.state===`idle`&&(re.has(t)?i.push(t):a.push(t))}),re.forEach(e=>{!w.fetchers.has(e)&&!I.has(e)&&i.push(e)}),[...p].forEach(e=>e(w,{deletedFetchers:i,newErrors:n,viewTransitionOpts:t.viewTransitionOpts,flushSync:t.flushSync===!0})),i.forEach(e=>Oe(w.fetchers,e)),a.forEach(e=>w.fetchers.delete(e))}function le(t,n,{flushSync:r}={}){let i=w.actionData!=null&&w.navigation.formMethod!=null&&Ha(w.navigation.formMethod)&&w.navigation.state===`loading`&&t.state?._isRedirect!==!0,a;a=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:i?w.actionData:null;let o=n.loaderData?Ca(w.loaderData,n.loaderData,n.matches||[],n.errors):w.loaderData,s=w.blockers;s.size>0&&!P&&(s=new Map(s),s.forEach((e,t)=>s.set(t,Pi)));let c=!P&&He(t,n.matches||w.matches),l=k===!0||w.navigation.formMethod!=null&&Ha(w.navigation.formMethod)&&t.state?._isRedirect!==!0;u.commitHmrRoutes(),P||T===`POP`||(T===`PUSH`?e.history.push(t,t.state):T===`REPLACE`&&e.history.replace(t,t.state));let d;if(T===`POP`&&!P&&t!==w.location){let e=M.get(w.location.pathname);e&&e.has(t.pathname)?d={currentLocation:w.location,nextLocation:t}:M.has(t.pathname)&&(d={currentLocation:t,nextLocation:w.location})}else if(j){let e=M.get(w.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),M.set(w.location.pathname,e)),d={currentLocation:w.location,nextLocation:t}}ce({...n,actionData:a,loaderData:o,historyAction:T,location:t,initialized:!0,renderFallback:!1,navigation:Mi,revalidation:`idle`,restoreScrollPosition:c,preventScrollReset:l,blockers:s},{viewTransitionOpts:d,flushSync:r===!0}),U(),O?.resolve(),O=null,oe?.resolve(),oe=null}function U(){E=0,T=`POP`,k=!1,j=!1,P=!1,ee=!1}async function ue(t,n){if(D&&await D,O?.resolve(),O=null,typeof t==`number`){O||=eo();let n=O.promise;return e.history.go(t),n}let r=fi(C),{path:i,submission:a,error:o}=Ui(!1,Hi(w.location,w.matches,s,t,n?.fromRouteId,n?.relative),n),c;if(n?.mask){let t=typeof n.mask==`string`?tr(n.mask):{...w.location.mask,...n.mask};if(c={pathname:t.pathname??``,search:t.search??``,hash:t.hash??``},Wn.test(c.pathname))throw Error(`External navigation is not allowed`);c.pathname.startsWith(`\\`)&&(c.pathname=c.pathname.replace(/^\\+/,`/`)),Ti(typeof n.mask==`string`?n.mask:er(n.mask),er(c),e.history.createURL(`/`),`reject`)}let l=w.location,u=$n(l,i,n&&n.state,void 0,c);u={...u,...e.history.encodeLocation(u)},Ti(t==null?e.history.createHref(w.location):typeof t==`string`?t:er(t),e.history.createHref(u.mask||u),e.history.createURL(`/`),`reject`);let d=n&&n.replace!=null?n.replace:void 0,f=`PUSH`;d===!0?f=`REPLACE`:d===!1||a!=null&&Ha(a.formMethod)&&a.formAction===w.location.pathname+w.location.search&&(f=`REPLACE`);let p=n&&`preventScrollReset`in n?n.preventScrollReset===!0:void 0,m=(n&&n.flushSync)===!0,h=Le({currentLocation:l,nextLocation:u,historyAction:f});h?Ie(h,{state:`blocked`,location:u,proceed(){Ie(h,{state:`proceeding`,proceed:void 0,reset:void 0,location:u}),ue(t,n)},reset(){let e=new Map(w.blockers);e.set(h,Pi),ce({blockers:e})}}):await fe(f,u,{submission:a,pendingError:o,preventScrollReset:p,replace:n&&n.replace,enableViewTransition:n&&n.viewTransition,flushSync:m,callSiteDefaultShouldRevalidate:n&&n.defaultShouldRevalidate,instrumentationNavigateMetaReceiver:r})}function de(){if(D)return D.then(de);oe||=eo(),Ce(),ce({revalidation:`loading`});let e=oe.promise;return w.navigation.state===`submitting`?e:w.navigation.state===`idle`?(fe(w.historyAction,w.location,{startUninterruptedRevalidation:!0,dataStrategyInitiator:`revalidation`}),e):(fe(T||w.historyAction,w.navigation.location,{overrideNavigation:w.navigation,dataStrategyInitiator:`revalidation`,enableViewTransition:j===!0}),e)}async function fe(t,n,r){D&&await D,A&&A.abort(),A=null,T=t,P=(r&&r.startUninterruptedRevalidation)===!0,Ve(w.location,w.matches),k=(r&&r.preventScrollReset)===!0,j=(r&&r.enableViewTransition)===!0;let i=r?.initialHydration&&w.matches&&w.matches.length>0&&!y?w.matches:c.match(n),a=(r&&r.flushSync)===!0;if(i&&w.initialized&&!ee&&Aa(w.location,n)&&!(r&&r.submission&&Ha(r.submission.formMethod))){le(n,{matches:i},{flushSync:a});return}let o=G(i,n.pathname);if(o.active&&o.matches&&(i=o.matches),r?.instrumentationNavigateMetaReceiver){let t=Ga(e.history,n,i);r.instrumentationNavigateMetaReceiver(t)}if(!i){let{error:e,notFoundMatches:t,route:r}=Re(n.pathname);le(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:a});return}let s=r&&r.overrideNavigation?{...r.overrideNavigation,matches:i,historyAction:t}:void 0;A=new AbortController;let l=va(e.history,n,A.signal,r&&r.submission),u=r?.initialHydration?`initialization`:r?.dataStrategyInitiator??`navigation`,d=e.getContext?await e.getContext():new ir,f;if(r&&r.pendingError)f=[Ta(i).route.id,{type:`error`,error:r.pendingError}];else if(r&&r.submission&&Ha(r.submission.formMethod)){let c=await me(l,u,n,r.submission,i,t,d,o.active,r&&r.initialHydration===!0,{replace:r.replace,flushSync:a});if(c.shortCircuited)return;if(c.pendingActionResult){let[e,t]=c.pendingActionResult;if(Fa(t)&&ei(t.error)&&t.error.status===404){A=null,le(n,{matches:c.matches,loaderData:{},errors:{[e]:t.error}});return}}i=c.matches||i,f=c.pendingActionResult,s=qa(n,i,t,r.submission),a=!1,o.active=!1,l=va(e.history,l.url,l.signal)}let{shortCircuited:p,matches:m,loaderData:h,errors:g,workingFetchers:_}=await he(l,u,n,i,t,d,o.active,s,r&&r.submission,r&&r.fetcherSubmission,r&&r.replace,r&&r.initialHydration===!0,a,f,r&&r.callSiteDefaultShouldRevalidate);p||(A=null,le(n,{matches:m||i,...wa(f),loaderData:h,errors:g,..._?{fetchers:_}:{}}))}function pe(){let t=eo();D=t.promise;let n=E,r=O;O=null,A?.abort(),A=null,U(),oe?.resolve(),oe=null;let i=new Map(w.blockers);i.forEach((e,t)=>{e.state===`proceeding`&&i.set(t,Pi)});let a=new Map(w.fetchers),o=Me(a);a.forEach((e,t)=>{e.state===`loading`&&!I.has(t)&&(a.set(t,Za(e.data)),o=!0)}),F.clear(),ce({navigation:Mi,revalidation:`idle`,blockers:i,...o?{fetchers:a}:{}});function s(){D=void 0,r?.resolve(),t.resolve()}return n?(ae=s,e.history.go(-n)):s(),t.promise}async function me(t,n,i,c,d,f,p,m,h,g={}){if(o.unstable_customRouteDiscovery||Ce(),ce({navigation:Ja(i,d,f,c)},{flushSync:g.flushSync===!0}),m){let e=await Ue(d,i.pathname,t.signal);if(o.unstable_customRouteDiscovery&&t.signal.aborted||e.type===`aborted`)return{shortCircuited:!0};if(e.type===`cancelled`)return await pe(),{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=Ea(u.activeRoutes);return{matches:t,pendingActionResult:[n.id,{type:`error`,error:e.error}]}}let t=Ta(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:`error`,error:e.error}]}}if(e.matches)d=e.matches;else{let{notFoundMatches:e,error:t,route:n}=Re(i.pathname);return{matches:e,pendingActionResult:[n.id,{type:`error`,error:t}]}}}o.unstable_customRouteDiscovery&&Ce();let _,v=Wa(d,i);if(!v.route.action&&!v.route.lazy)_={type:`error`,error:Da(405,{method:t.method,pathname:i.pathname,routeId:v.route.id})};else{let e=await W(t,i,la(a,l,t,i,d,v,h?[]:r,p),p,null,n,f);if(_=e[v.route.id],!_){for(let t of d)if(e[t.route.id]){_=e[t.route.id];break}}if(t.signal.aborted)return{shortCircuited:!0}}if(Ia(_)){let r;return r=g&&g.replace!=null?g.replace:_a(_.response.headers.get(`Location`),new URL(t.url),s,e.history)===w.location.pathname+w.location.search,await xe(t,_,!0,n,{submission:c,replace:r}),{shortCircuited:!0}}if(Fa(_)){let e=Ta(d,v.route.id);return(g&&g.replace)!==!0&&(T=`PUSH`),{matches:d,pendingActionResult:[e.route.id,_,v.route.id]}}return{matches:d,pendingActionResult:[v.route.id,_]}}async function he(t,n,i,s,d,f,p,m,h,g,_,v,y,b,x){let S=m||qa(i,s,d,h),C=h||g||Ka(S),T=!P&&!v;if(p){if(T){let e=ge(b);ce({navigation:S,...e===void 0?{}:{actionData:e}},{flushSync:y})}let e=await Ue(s,i.pathname,t.signal);if(o.unstable_customRouteDiscovery&&t.signal.aborted||e.type===`aborted`)return{shortCircuited:!0};if(e.type===`cancelled`)return await pe(),{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=Ea(u.activeRoutes);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=Ta(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(e.matches)s=e.matches,v&&!t.signal.aborted&&ce({matches:s});else{let{error:e,notFoundMatches:t,route:n}=Re(i.pathname);return{matches:t,loaderData:{},errors:{[n.id]:e}}}}let{dsMatches:E,revalidatingFetchers:D}=Wi(t,f,a,l,e.history,w,s,C,i,v?[]:r,v===!0,ee,F,re,B,z,c,b,x);if(te=++L,!e.dataStrategy&&!E.some(e=>e.shouldLoad)&&!E.some(e=>e.route.middleware&&e.route.middleware.length>0)&&D.length===0){let e=new Map(w.fetchers),t=Me(e);return le(i,{matches:s,loaderData:{},errors:b&&Fa(b[1])?{[b[0]]:b[1].error}:null,...wa(b),...t?{fetchers:e}:{}},{flushSync:y}),{shortCircuited:!0}}if(T){let e={};if(!p){e.navigation=S;let t=ge(b);t!==void 0&&(e.actionData=t)}D.length>0&&(e.fetchers=_e(D)),ce(e,{flushSync:y})}D.forEach(e=>{Ae(e.key),e.controller&&I.set(e.key,e.controller)});let O=()=>D.forEach(e=>Ae(e.key));A&&A.signal.addEventListener(`abort`,O);let{loaderResults:k,fetcherResults:j}=await Se(E,D,t,i,f,n,d);if(t.signal.aborted)return{shortCircuited:!0};A&&A.signal.removeEventListener(`abort`,O),D.forEach(e=>I.delete(e.key));let M=Oa(k);if(M)return await xe(t,M.result,!0,n,{replace:_}),{shortCircuited:!0};if(M=Oa(j),M)return z.add(M.key),await xe(t,M.result,!0,n,{replace:_}),{shortCircuited:!0};let N=new Map(w.fetchers),{loaderData:R,errors:ne}=Sa(w,s,k,b,D,j,N);if(v&&w.errors){let e=ne??null;ne={...w.errors,...ne},zi.set(ne,e)}let ie=Me(N),ae=Ne(te,N),oe=ie||ae||D.length>0;return{matches:s,loaderData:R,errors:ne,...oe?{workingFetchers:N}:{}}}function ge(e){if(e&&!Fa(e[1]))return{[e[0]]:e[1].data};if(w.actionData)return Object.keys(w.actionData).length===0?null:w.actionData}function _e(e){let t=new Map(w.fetchers);return e.forEach(e=>{let n=t.get(e.key),r=Ya(void 0,n?n.data:void 0);t.set(e.key,r)}),t}async function ve(t,n,r,i){D&&await D,Ae(t);let a=(i&&i.flushSync)===!0,o=fi(C),l=Hi(w.location,w.matches,s,r,n,i?.relative),u=c.match(l),d=G(u,l);if(d.active&&d.matches&&(u=d.matches),o&&o(Ga(e.history,l,u)),!u){Te(t,n,Da(404,{pathname:l}),{flushSync:a});return}let{path:f,submission:p,error:m}=Ui(!0,l,i);if(m){Te(t,n,m,{flushSync:a});return}let h=e.getContext?await e.getContext():new ir,g=(i&&i.preventScrollReset)===!0;if(p&&Ha(p.formMethod)){await ye(t,n,f,u,h,d.active,a,g,p,i&&i.defaultShouldRevalidate);return}let _={routeId:n,path:f,isDiscovering:d.active};B.set(t,_),await be(t,_,u,h,a,g,p)}async function ye(t,n,i,s,u,d,f,p,m,h){o.unstable_customRouteDiscovery||Ce(),B.delete(t);let g=w.fetchers.get(t);we(t,Xa(m,g),{flushSync:f});let _=new AbortController;o.unstable_customRouteDiscovery&&I.set(t,_);let v=va(e.history,i,_.signal,m);if(d){let e=await Ue(s,new URL(v.url).pathname,v.signal,t);if(o.unstable_customRouteDiscovery&&v.signal.aborted||e.type===`aborted`)return;if(e.type===`cancelled`){I.delete(t),B.delete(t),we(t,Za(g?.data),{flushSync:f});return}if(e.type===`error`){Te(t,n,e.error,{flushSync:f});return}if(e.matches)s=e.matches;else{Te(t,n,Da(404,{pathname:i}),{flushSync:f});return}}let y=Wa(s,i);if(!y.route.action&&!y.route.lazy){Te(t,n,Da(405,{method:m.formMethod,pathname:i,routeId:n}),{flushSync:f});return}o.unstable_customRouteDiscovery&&Ce(),I.set(t,_);let b=L,x=la(a,l,v,i,s,y,r,u),S=await W(v,i,x,u,t,`fetcher`),C=S[y.route.id];if(!C){for(let e of x)if(S[e.route.id]){C=S[e.route.id];break}}if(v.signal.aborted){I.get(t)===_&&I.delete(t);return}if(re.has(t)){if(Ia(C)||Fa(C)){we(t,Za(void 0));return}}else{if(Ia(C)){if(I.delete(t),te>b){we(t,Za(void 0));return}return z.add(t),we(t,Ya(m)),xe(v,C,!1,`fetcher`,{fetcherSubmission:m,preventScrollReset:p})}if(Fa(C)){Te(t,n,C.error);return}}let E=w.navigation.location||w.location,D=va(e.history,E,_.signal),O=w.navigation.state===`idle`?w.matches:c.match(w.navigation.location);Yn(O,`Didn't find any matches after fetcher action`);let k=++L;R.set(t,k);let{dsMatches:j,revalidatingFetchers:M}=Wi(D,u,a,l,e.history,w,O,m,E,r,!1,ee,F,re,B,z,c,[y.route.id,C],h),N=Ya(m,C.data),P=new Map(w.fetchers);P.set(t,N),M.filter(e=>e.key!==t).forEach(e=>{let t=e.key,n=P.get(t),r=Ya(void 0,n?n.data:void 0);P.set(t,r),Ae(t),e.controller&&I.set(t,e.controller)}),ce({fetchers:P});let ne=()=>M.forEach(e=>Ae(e.key));_.signal.addEventListener(`abort`,ne);let{loaderResults:ie,fetcherResults:ae}=await Se(j,M,D,E,u,`fetcher`);if(_.signal.aborted){R.get(t)===k&&R.delete(t);return}_.signal.removeEventListener(`abort`,ne),R.delete(t),I.delete(t),M.forEach(e=>I.delete(e.key));let oe=w.fetchers.has(t),V=e=>{if(!oe)return e;let n=new Map(e.fetchers);return n.set(t,Za(C.data)),{...e,fetchers:n}},se=Oa(ie);if(se)return w=V(w),xe(D,se.result,!1,`fetcher`,{preventScrollReset:p});if(se=Oa(ae),se)return z.add(se.key),w=V(w),xe(D,se.result,!1,`fetcher`,{preventScrollReset:p});let H=new Map(w.fetchers);oe&&H.set(t,Za(C.data));let{loaderData:U,errors:ue}=Sa(w,O,ie,void 0,M,ae,H);Ne(k,H),w.navigation.state===`loading`&&k>te?(Yn(T,`Expected pending action`),A&&A.abort(),le(w.navigation.location,{matches:O,loaderData:U,errors:ue,fetchers:H})):(ce({errors:ue,loaderData:Ca(w.loaderData,U,O,ue),fetchers:H}),ee=!1)}async function be(t,n,i,s,c,u,d){let{routeId:f,path:p}=n,m=w.fetchers.get(t);we(t,Ya(d,m?m.data:void 0),{flushSync:c});let h=new AbortController;o.unstable_customRouteDiscovery&&I.set(t,h);let g=va(e.history,p,h.signal);if(n.isDiscovering){let e=await Ue(i,new URL(g.url).pathname,g.signal,t);if(o.unstable_customRouteDiscovery&&g.signal.aborted||e.type===`aborted`)return;if(e.type===`cancelled`){I.delete(t),B.delete(t),we(t,Za(m?.data),{flushSync:c});return}if(e.type===`error`){Te(t,f,e.error,{flushSync:c});return}if(e.matches)i=e.matches,n.isDiscovering=!1;else{Te(t,f,Da(404,{pathname:p}),{flushSync:c});return}}let _=Wa(i,p);I.set(t,h);let v=L,y=await W(g,p,la(a,l,g,p,i,_,r,s),s,t,`fetcher`),b=y[_.route.id];if(!b){for(let e of i)if(y[e.route.id]){b=y[e.route.id];break}}if(I.get(t)===h&&I.delete(t),!g.signal.aborted){if(re.has(t))we(t,Za(void 0));else{if(Ia(b)){if(te>v){we(t,Za(void 0));return}z.add(t),await xe(g,b,!1,`fetcher`,{preventScrollReset:u});return}Fa(b)?Te(t,f,b.error):we(t,Za(b.data))}}}async function xe(r,i,a,o,{submission:c,fetcherSubmission:l,preventScrollReset:u,replace:d}={}){a||(O?.resolve(),O=null),i.response.headers.has(`X-Remix-Revalidate`)&&(ee=!0);let f=i.response.headers.get(`Location`);Yn(f,`Expected a Location header on the redirect Response`);let p=f,m=new URL(r.url);f=_a(f,m,s,e.history),Ti(p,f,m,`allow-explicit`);let h=$n(w.location,f,{_isRedirect:!0});if(n){let e=!1;if(i.response.headers.has(`X-Remix-Reload-Document`))e=!0;else if(zr(f)){let n=rr(t,f,!0);e=n.origin!==t.location.origin||Lr(n.pathname,s)==null}if(e){d?t.location.replace(f):t.location.assign(f);return}}A=null;let g=d===!0||i.response.headers.has(`X-Remix-Replace`)?`REPLACE`:`PUSH`,{formMethod:_,formAction:v,formEncType:y}=w.navigation;!c&&!l&&_&&v&&y&&(c=Ka(w.navigation));let b=c||l;ji.has(i.response.status)&&b&&Ha(b.formMethod)?await fe(g,h,{submission:{...b,formAction:f},preventScrollReset:u||k,enableViewTransition:a?j:void 0,dataStrategyInitiator:o}):await fe(g,h,{overrideNavigation:qa(h,[],g,c),fetcherSubmission:l,preventScrollReset:u||k,enableViewTransition:a?j:void 0,dataStrategyInitiator:o})}async function W(e,t,n,r,i,a,o=null){let c,l={};try{c=await ua(d,e,t,n,i,a,r,!1,o)}catch(e){return n.filter(e=>e.shouldLoad).forEach(t=>{l[t.route.id]={type:`error`,error:e}}),l}if(e.signal.aborted)return l;if(!Ha(e.method))for(let e of n){if(c[e.route.id]?.type===`error`)break;c.hasOwnProperty(e.route.id)||w.loaderData.hasOwnProperty(e.route.id)||w.errors&&w.errors.hasOwnProperty(e.route.id)||!e.shouldCallHandler()||(c[e.route.id]={type:`error`,result:Error(`No result returned from dataStrategy for route ${e.route.id}`)})}for(let[t,r]of Object.entries(c))if(Pa(r)){let i=r.result;l[t]={type:`redirect`,response:ma(i,e,t,n,s)}}else l[t]=await pa(r);return l}async function Se(e,t,n,r,i,a,o=null){let s=W(n,r,e,i,null,a,o),c=Promise.all(t.map(async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await W(e.request,e.path,e.matches,i,e.key,a,o))[e.match.route.id];return{[e.key]:t}}return Promise.resolve({[e.key]:{type:`error`,error:Da(404,{pathname:e.path})}})}));return{loaderResults:await s,fetcherResults:(await c).reduce((e,t)=>Object.assign(e,t),{})}}function Ce(){ee=!0,B.forEach((e,t)=>{o.unstable_customRouteDiscovery&&e.isDiscovering||(I.has(t)&&F.add(t),Ae(t))})}function we(e,t,n={}){let r=new Map(w.fetchers);r.set(e,t),ce({fetchers:r},{flushSync:(n&&n.flushSync)===!0})}function Te(e,t,n,r={}){let i=Ta(w.matches,t),a=new Map(w.fetchers);Oe(a,e),ce({errors:{[i.route.id]:n},fetchers:a},{flushSync:(r&&r.flushSync)===!0})}function Ee(e){return ne.set(e,(ne.get(e)||0)+1),re.has(e)&&re.delete(e),w.fetchers.get(e)||Ni}function De(e,t){Ae(e,t?.reason),B.delete(e),F.delete(e),we(e,Za(null))}function Oe(e,t){let n=w.fetchers.get(t);I.has(t)&&!(n&&n.state===`loading`&&R.has(t))&&Ae(t),B.delete(t),R.delete(t),z.delete(t),re.delete(t),F.delete(t),e.delete(t)}function ke(e){let t=(ne.get(e)||0)-1;t<=0?(ne.delete(e),re.add(e)):ne.set(e,t),ce({fetchers:new Map(w.fetchers)})}function Ae(e,t){let n=I.get(e);n&&(n.abort(t),I.delete(e))}function je(e,t){for(let n of e){let e=t.get(n);Yn(e,`Expected fetcher: ${n}`);let r=Za(e.data);t.set(n,r)}}function Me(e){let t=[],n=!1;for(let r of z){let i=e.get(r);Yn(i,`Expected fetcher: ${r}`),i.state===`loading`&&(z.delete(r),t.push(r),n=!0)}return je(t,e),n}function Ne(e,t){let n=[];for(let[r,i]of R)if(i<e){let e=t.get(r);Yn(e,`Expected fetcher: ${r}`),e.state===`loading`&&(Ae(r),R.delete(r),n.push(r))}return je(n,t),n.length>0}function Pe(e,t){let n=w.blockers.get(e)||Pi;return ie.get(e)!==t&&ie.set(e,t),n}function Fe(e){w.blockers.delete(e),ie.delete(e)}function Ie(e,t){let n=w.blockers.get(e)||Pi;Yn(n.state===`unblocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`proceeding`||n.state===`blocked`&&t.state===`unblocked`||n.state===`proceeding`&&t.state===`unblocked`,`Invalid blocker state transition: ${n.state} -> ${t.state}`);let r=new Map(w.blockers);r.set(e,t),ce({blockers:r})}function Le({currentLocation:e,nextLocation:t,historyAction:n}){if(ie.size===0)return;ie.size>1&&Xn(!1,`A router only supports one blocker at a time`);let r=Array.from(ie.entries()),[i,a]=r[r.length-1],o=w.blockers.get(i);if(!(o&&o.state===`proceeding`)&&a({currentLocation:e,nextLocation:t,historyAction:n}))return i}function Re(e){let t=Da(404,{pathname:e}),n=u.activeRoutes,{matches:r,route:i}=Ea(n);return{notFoundMatches:r,route:i,error:t}}function ze(e,t,n){if(m=e,g=t,h=n||null,!_&&w.navigation===Mi){_=!0;let e=He(w.location,w.matches);e!=null&&ce({restoreScrollPosition:e})}return()=>{m=null,g=null,h=null}}function Be(e,t){return h&&h(e,t.map(e=>gr(e,w.loaderData)))||e.key}function Ve(e,t){if(m&&g){let n=Be(e,t);m[n]=g()}}function He(e,t){if(m){let n=Be(e,t),r=m[n];if(typeof r==`number`)return r}return null}function G(t,n){if(e.patchRoutesOnNavigation){if(!t)return{active:!0,matches:c.match(n,!0)||[]};if(Object.keys(t[0].params).length>0)return{active:!0,matches:c.match(n,!0)}}return{active:!1,matches:null}}async function Ue(t,n,r,i){if(!e.patchRoutesOnNavigation)return{type:`success`,matches:t};let s=t;for(;;){let t=l;try{await e.patchRoutesOnNavigation({signal:r,path:n,matches:s,fetcherKey:i,patch:(e,n)=>{r.aborted||Xi(e,n,u,t,a,!1)}})}catch(e){if(o.unstable_customRouteDiscovery){if(r.aborted)return{type:`aborted`};if(e instanceof ar)return{type:`cancelled`}}return{type:`error`,error:e,partialMatches:s}}if(r.aborted)return{type:`aborted`};let d=c.match(n),f=null;if(d&&(Object.keys(d[0].params).length===0||(f=c.match(n,!0),!(f&&s.length<f.length&&We(s,f.slice(0,s.length))))))return{type:`success`,matches:d};if(f||=c.match(n,!0),!f||We(s,f))return{type:`success`,matches:null};s=f}}function We(e,t){return e.length===t.length&&e.every((e,n)=>e.route.id===t[n].route.id)}function Ge(e){l={},u.setHmrRoutes(fr(e,a,void 0,l))}function Ke(e,t,n=!1){Xi(e,t,u,l,a,n),u.hasHMRRoutes||ce({})}return C={get basename(){return s},get future(){return o},get state(){return w},get routes(){return u.stableRoutes},match(e){return c.match(e)},get manifest(){return l},get window(){return t},initialize:V,subscribe:H,enableScrollRestoration:ze,navigate:ue,fetch:ve,revalidate:de,createHref:t=>e.history.createHref(t),createURL:t=>e.history.createURL(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:Ee,resetFetcher:De,deleteFetcher:ke,dispose:se,getBlocker:Pe,deleteBlocker:Fe,patchRoutes:Ke,_internalFetchControllers:I,_internalSetRoutes:Ge,_internalSetStateDoNotUseOrYouWillBreakYourApp(e){ce(e)}},e.instrumentations&&(C=ci(C,e.instrumentations.map(e=>e.router).filter(Boolean))),C}function Vi(e){return e!=null&&(`formData`in e&&e.formData!=null||`body`in e&&e.body!==void 0)}function Hi(e,t,n,r,i,a){let o,s;if(i){o=[];for(let e of t)if(o.push(e),e.route.id===i){s=e;break}}else o=t,s=t[t.length-1];let c=Gr(r||`.`,Wr(o),Lr(e.pathname,n)||e.pathname,a===`path`);if(r??(c.search=e.search,c.hash=e.hash),(r==null||r===``||r===`.`)&&s){let e=Ua(c.search);if(s.route.index&&!e)c.search=c.search?c.search.replace(/^\?/,`?index&`):`?index`;else if(!s.route.index&&e){let e=new URLSearchParams(c.search),t=e.getAll(`index`);e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();c.search=n?`?${n}`:``}}return n!==`/`&&(c.pathname=Rr({basename:n,pathname:c.pathname})),er(c)}function Ui(e,t,n){if(!n||!Vi(n))return{path:t};if(n.formMethod&&!Va(n.formMethod))return{path:t,error:Da(405,{method:n.formMethod})};let r=()=>({path:t,error:Da(400,{type:`invalid-body`})}),i=(n.formMethod||`get`).toUpperCase(),a=ka(t);if(n.body!==void 0){if(n.formEncType===`text/plain`){if(!Ha(i))return r();let e=typeof n.body==`string`?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((e,[t,n])=>`${e}${t}=${n}\n`,``):String(n.body);return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}if(n.formEncType===`application/json`){if(!Ha(i))return r();try{let e=typeof n.body==`string`?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:e,text:void 0}}}catch{return r()}}}Yn(typeof FormData==`function`,`FormData is not available in this environment`);let o,s;if(n.formData)o=ya(n.formData),s=n.formData;else if(n.body instanceof FormData)o=ya(n.body),s=n.body;else if(n.body instanceof URLSearchParams)o=n.body,s=ba(o);else if(n.body==null)o=new URLSearchParams,s=new FormData;else try{o=new URLSearchParams(n.body),s=ba(o)}catch{return r()}let c={formMethod:i,formAction:a,formEncType:n&&n.formEncType||`application/x-www-form-urlencoded`,formData:s,json:void 0,text:void 0};if(Ha(c.formMethod))return{path:t,submission:c};let l=tr(t);return e&&l.search&&Ua(l.search)&&o.append(`index`,``),l.search=`?${o}`,{path:er(l),submission:c}}function Wi(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v){let y=_?Fa(_[1])?_[1].error:_[1].data:void 0,b=i.createURL(a.location),x=i.createURL(c),S;if(u&&a.errors){let e=Object.keys(a.errors)[0];S=o.findIndex(t=>t.route.id===e)}else if(_&&Fa(_[1])){let e=_[0];S=o.findIndex(t=>t.route.id===e)-1}let C=_?_[1].statusCode:void 0,w=C&&C>=400,T={currentUrl:b,currentParams:a.matches[0]?.params||{},nextUrl:x,nextParams:o[0].params,...s,actionResult:y,actionStatus:C},E=ti(o),D=o.map((i,o)=>{let{route:s}=i,f=null;if(S!=null&&o>S)f=!1;else if(s.lazy)f=!0;else if(!Gi(s))f=!1;else if(u){let{shouldLoad:e}=Ki(s,a.loaderData,a.errors);f=e}else qi(a.loaderData,a.matches[o],i)&&(f=!0);if(f!==null)return ca(n,r,e,c,E,i,l,t,f);let p=!1;typeof v==`boolean`?p=v:w?p=!1:d||b.pathname+b.search===x.pathname+x.search?p=!0:b.search===x.search?Ji(a.matches[o],i)&&(p=!0):p=!0;let m={...T,defaultShouldRevalidate:p};return ca(n,r,e,c,E,i,l,t,Yi(i,m),m,v)}),O=[];return m.forEach((e,s)=>{if(u||!o.some(t=>t.route.id===e.routeId)||p.has(s)||e.isDiscovering)return;let c=a.fetchers.get(s),m=c&&c.state!==`idle`&&c.data===void 0,_=g.match(e.path);if(!_){O.push({key:s,routeId:e.routeId,path:e.path,matches:null,match:null,request:null,controller:null});return}if(h.has(s))return;let y=Wa(_,e.path),b=new AbortController,x=va(i,e.path,b.signal),S=null;if(f.has(s))f.delete(s),S=la(n,r,x,e.path,_,y,l,t);else if(m)d&&(S=la(n,r,x,e.path,_,y,l,t));else{let i;i=typeof v==`boolean`?v:!w&&d;let a={...T,defaultShouldRevalidate:i};Yi(y,a)&&(S=la(n,r,x,e.path,_,y,l,t,a))}S&&O.push({key:s,routeId:e.routeId,path:e.path,matches:S,match:y,request:x,controller:b})}),{dsMatches:D,revalidatingFetchers:O}}function Gi(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function Ki(e,t,n){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!Gi(e))return{shouldLoad:!1,renderFallback:!1};let r=t!=null&&e.id in t,i=n!=null&&n[e.id]!==void 0;if(!r&&i)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader==`function`&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!r};let a=!r&&!i;return{shouldLoad:a,renderFallback:a}}function qi(e,t,n){let r=!t||n.route.id!==t.route.id,i=!e.hasOwnProperty(n.route.id);return r||i}function Ji(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith(`*`)&&e.params[`*`]!==t.params[`*`]}function Yi(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n==`boolean`)return n}return t.defaultShouldRevalidate}function Xi(e,t,n,r,i,a){let o;if(e){let t=r[e];Yn(t,`No route found to patch children into: routeId = ${e}`),t.children||=[],o=t.children}else o=n.activeRoutes;let s=[],c=[];if(t.forEach(e=>{let t=o.find(t=>Zi(e,t));t?c.push({existingRoute:t,newRoute:e}):s.push(e)}),s.length>0){let t=fr(s,i,[e||`_`,`patch`,String(o?.length||`0`)],r);o.push(...t)}if(a&&c.length>0)for(let e=0;e<c.length;e++){let{existingRoute:t,newRoute:n}=c[e],r=t,[a]=fr([n],i,[],{},!0);Object.assign(r,{element:a.element?a.element:r.element,errorElement:a.errorElement?a.errorElement:r.errorElement,hydrateFallbackElement:a.hydrateFallbackElement?a.hydrateFallbackElement:r.hydrateFallbackElement})}n.hasHMRRoutes||n.setRoutes([...n.activeRoutes])}function Zi(e,t){return`id`in e&&`id`in t&&e.id===t.id?!0:e.index!==t.index||e.path!==t.path||e.caseSensitive!==t.caseSensitive?!1:(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children?.every((e,n)=>t.children?.some(t=>Zi(e,t)))??!1}var Qi=new WeakMap,$i=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let i=n[t.id];if(Yn(i,`No route found in manifest`),!i.lazy||typeof i.lazy!=`object`)return;let a=i.lazy[e];if(!a)return;let o=Qi.get(i);o||(o={},Qi.set(i,o));let s=o[e];if(s)return s;let c=(async()=>{let t=sr(e),n=i[e]!==void 0;if(t)Xn(!t,`Route property `+e+` is not a supported lazy route property. This property will be ignored.`),o[e]=Promise.resolve();else if(n)Xn(!1,`Route "${i.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let t=await a();t!=null&&(Object.assign(i,{[e]:t}),Object.assign(i,r(i)))}typeof i.lazy==`object`&&(i.lazy[e]=void 0,Object.values(i.lazy).every(e=>e===void 0)&&(i.lazy=void 0))})();return o[e]=c,c},ea=new WeakMap;function ta(e,t,n,r,i){let a=n[e.id];if(Yn(a,`No route found in manifest`),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy==`function`){let t=ea.get(a);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let n=(async()=>{Yn(typeof e.lazy==`function`,`No lazy route function found`);let t=await e.lazy(),n={};for(let e in t){let r=t[e];if(r===void 0)continue;let i=lr(e),o=a[e]!==void 0;i?Xn(!i,`Route property `+e+` is not a supported property to be returned from a lazy route function. This property will be ignored.`):o?Xn(!o,`Route "${a.id}" has a static property "${e}" defined but its lazy function is also returning a value for this property. The lazy route property "${e}" will be ignored.`):n[e]=r}Object.assign(a,n),Object.assign(a,{...r(a),lazy:void 0})})();return ea.set(a,n),n.catch(()=>{}),{lazyRoutePromise:n,lazyHandlerPromise:n}}let o=Object.keys(e.lazy),s=[],c;for(let a of o){if(i&&i.includes(a))continue;let o=$i({key:a,route:e,manifest:n,mapRouteProperties:r});o&&(s.push(o),a===t&&(c=o))}let l=s.length>0?Promise.all(s).then(()=>{}):void 0;return l?.catch(()=>{}),c?.catch(()=>{}),{lazyRoutePromise:l,lazyHandlerPromise:c}}async function na(e){let t=e.matches.filter(e=>e.shouldLoad),n={};return(await Promise.all(t.map(e=>e.resolve()))).forEach((e,r)=>{n[t[r].route.id]=e}),n}async function ra(e){return e.matches.some(e=>e.route.middleware)?ia(e,()=>na(e)):na(e)}function ia(e,t){return aa(e,t,e=>{if(Ba(e))throw e;return e},Ma,n);async function n(t,n,r){if(r)return Object.assign(r.value,{[n]:{type:`error`,result:t}});{let{matches:r}=e,i=Math.min(Math.max(r.findIndex(e=>e.route.id===n),0),Math.max(r.findIndex(e=>e.shouldCallHandler()),0)),a=r[i].route.id;for(let e of r.slice(0,i+1))try{await e._lazyPromises?.route}catch{a=e.route.id;break}return{[Ta(r,a).route.id]:{type:`error`,result:t}}}}}async function aa(e,t,n,r,i){let{matches:a,...o}=e;return await oa(o,a.flatMap(e=>e.route.middleware?e.route.middleware.map(t=>[e.route.id,t]):[]),t,n,r,i)}async function oa(e,t,n,r,i,a,o=0){let{request:s}=e;if(s.signal.aborted)throw s.signal.reason??Error(`Request aborted: ${s.method} ${s.url}`);let c=t[o];if(!c)return await n();let[l,u]=c,d,f=async()=>{if(d)throw Error("You may only call `next()` once per middleware");try{return d={value:await oa(e,t,n,r,i,a,o+1)},d.value}catch(e){return d={value:await a(e,l,d)},d.value}};try{let t=await u(e,f),n=t==null?void 0:r(t);return i(n)?n:d?n??d.value:(d={value:await f()},d.value)}catch(e){return await a(e,l,d)}}function sa(e,t,n,r,i){let a=$i({key:`middleware`,route:r.route,manifest:t,mapRouteProperties:e}),o=ta(r.route,Ha(n.method)?`action`:`loader`,t,e,i);return{middleware:a,route:o.lazyRoutePromise,handler:o.lazyHandlerPromise}}function ca(e,t,n,r,i,a,o,s,c,l=null,u){let d=!1,f=sa(e,t,n,a,o);return{...a,_lazyPromises:f,shouldLoad:c,shouldRevalidateArgs:l,shouldCallHandler(e){return d=!0,l?typeof u==`boolean`?Yi(a,{...l,defaultShouldRevalidate:u}):typeof e==`boolean`?Yi(a,{...l,defaultShouldRevalidate:e}):Yi(a,l):c},resolve(e){let{lazy:t,loader:o,middleware:l}=a.route,u=d||c||e&&!Ha(n.method)&&(t||o),p=l&&l.length>0&&!o&&!t;return u&&(Ha(n.method)||!p)?da({request:n,path:r,pattern:i,match:a,lazyHandlerPromise:f?.handler,lazyRoutePromise:f?.route,handlerOverride:e,scopedContext:s}):Promise.resolve({type:`data`,result:void 0})}}}function la(e,t,n,r,i,a,o,s,c=null){return i.map(l=>l.route.id===a.route.id?ca(e,t,n,r,ti(i),l,o,s,!0,c):{...l,shouldLoad:!1,shouldRevalidateArgs:c,shouldCallHandler:()=>!1,_lazyPromises:sa(e,t,n,l,o),resolve:()=>Promise.resolve({type:`data`,result:void 0})})}async function ua(e,t,n,r,i,a,o,s,c=null){r.some(e=>e._lazyPromises?.middleware)&&await Promise.all(r.map(e=>e._lazyPromises?.middleware));let l={request:t,url:ni(t,n),pattern:ti(r),params:r[0].params,context:o,matches:r,unstable_initiator:a,unstable_navigationType:a===`navigation`?c:null},u=s?()=>{throw Error("You cannot call `runClientMiddleware()` from a static handler `dataStrategy`. Middleware is run outside of `dataStrategy` during SSR in order to bubble up the Response. You can enable middleware via the `respond` API in `query`/`queryRoute`")}:e=>{let t=l;return ia(t,()=>e({...t,fetcherKey:i,runClientMiddleware:()=>{throw Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))},d=await e({...l,fetcherKey:i,runClientMiddleware:u});try{await Promise.all(r.flatMap(e=>[e._lazyPromises?.handler,e._lazyPromises?.route]))}catch{}return d}async function da({request:e,path:t,pattern:n,match:r,lazyHandlerPromise:i,lazyRoutePromise:a,handlerOverride:o,scopedContext:s}){let c,l,u=Ha(e.method),d=u?`action`:`loader`,f=i=>{let a,c=new Promise((e,t)=>a=t);l=()=>a(),e.signal.addEventListener(`abort`,l);let u=a=>typeof i==`function`?i({request:e,url:ni(e,t),pattern:n,params:r.params,context:s},...a===void 0?[]:[a]):Promise.reject(Error(`You cannot call the handler for a route which defines a boolean "${d}" [routeId: ${r.route.id}]`)),f=(async()=>{try{return{type:`data`,result:await(o?o(e=>u(e)):u())}}catch(e){return{type:`error`,result:e}}})();return Promise.race([f,c])};try{let t=u?r.route.action:r.route.loader;if(i||a){if(t){let e,[n]=await Promise.all([f(t).catch(t=>{e=t}),i,a]);if(e!==void 0)throw e;c=n}else{await i;let t=u?r.route.action:r.route.loader;if(t)[c]=await Promise.all([f(t),a]);else if(d===`action`){let t=new URL(e.url),n=t.pathname+t.search;throw Da(405,{method:e.method,pathname:n,routeId:r.route.id})}else return{type:`data`,result:void 0}}}else if(t)c=await f(t);else{let t=new URL(e.url);throw Da(404,{pathname:t.pathname+t.search})}}catch(e){return{type:`error`,result:e}}finally{l&&e.signal.removeEventListener(`abort`,l)}return c}async function fa(e){let t=e.headers.get(`Content-Type`);return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function pa(e){let{result:t,type:n}=e;if(Ra(t)){let e;try{e=await fa(t)}catch(e){return{type:`error`,error:e}}return n===`error`?{type:`error`,error:new $r(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:`data`,data:e,statusCode:t.status,headers:t.headers}}return n===`error`?La(t)?t.data instanceof Error?{type:`error`,error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:ja(t),statusCode:ei(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:t,statusCode:ei(t)?t.status:void 0}:La(t)?{type:`data`,data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`data`,data:t}}function ma(e,t,n,r,i){let a=e.headers.get(`Location`);if(Yn(a,`Redirects returned/thrown from loaders/actions must have a Location header`),!zr(a)){let o=r.slice(0,r.findIndex(e=>e.route.id===n)+1);a=Hi(new URL(t.url),o,i,a),e.headers.set(`Location`,a)}return e}var ha=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function ga(e){try{return ha.includes(new URL(e).protocol)}catch{return!1}}function _a(e,t,n,r){if(zr(e)){let r=e,i=Wn.test(r)?new URL(Gn(r,t.protocol)):new URL(r);if(ga(i.toString()))throw Error(`Invalid redirect location`);let a=Lr(i.pathname,n)!=null;if(i.origin===t.origin&&a)return Kr(i.pathname)+i.search+i.hash}try{if(ga(r.createURL(e).toString()))throw Error(`Invalid redirect location`)}catch{}return e}function va(e,t,n,r){let i=e.createURL(ka(t)).toString(),a={signal:n};if(r&&Ha(r.formMethod)){let{formMethod:e,formEncType:t}=r;a.method=e.toUpperCase(),t===`application/json`?(a.headers=new Headers({"Content-Type":t}),a.body=JSON.stringify(r.json)):a.body=t===`text/plain`?r.text:t===`application/x-www-form-urlencoded`&&r.formData?ya(r.formData):r.formData}return new Request(i,a)}function ya(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r==`string`?r:r.name);return t}function ba(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function xa(e,t,n,r=!1,i=!1){let a={},o=null,s,c=!1,l={},u=n&&Fa(n[1])?n[1].error:void 0;return e.forEach(n=>{if(!(n.route.id in t))return;let d=n.route.id,f=t[d];if(Yn(!Ia(f),`Cannot handle redirect results in processLoaderData`),Fa(f)){let t=f.error;if(u!==void 0&&(t=u,u=void 0),o||={},i)o[d]=t;else{let n=Ta(e,d);o[n.route.id]??(o[n.route.id]=t)}r||(a[d]=Ii),c||(c=!0,s=ei(f.error)?f.error.status:500),f.headers&&(l[d]=f.headers)}else a[d]=f.data,f.statusCode&&f.statusCode!==200&&!c&&(s=f.statusCode),f.headers&&(l[d]=f.headers)}),u!==void 0&&n&&(o={[n[0]]:u},n[2]&&(a[n[2]]=void 0)),{loaderData:a,errors:o,statusCode:s||200,loaderHeaders:l}}function Sa(e,t,n,r,i,a,o){let{loaderData:s,errors:c}=xa(t,n,r);return i.filter(e=>!e.matches||e.matches.some(e=>e.shouldLoad)).forEach(t=>{let{key:n,match:r,controller:i}=t;if(i&&i.signal.aborted)return;let s=a[n];if(Yn(s,`Did not find corresponding fetcher result`),Fa(s)){let t=Ta(e.matches,r?.route.id);c&&c[t.route.id]||(c={...c,[t.route.id]:s.error}),o.delete(n)}else if(Ia(s))Yn(!1,`Unhandled fetcher revalidation redirect`);else{let e=Za(s.data);o.set(n,e)}}),{loaderData:s,errors:c}}function Ca(e,t,n,r){let i=Object.entries(t).filter(([,e])=>e!==Ii).reduce((e,[t,n])=>(e[t]=n,e),{}),a=0;for(let o of n){let n=o.route.id;if(!t.hasOwnProperty(n)&&e.hasOwnProperty(n)&&o.route.loader&&(i[n]=e[n],a++),r&&r.hasOwnProperty(n))break}return Object.keys(t).length===0&&a===Object.keys(e).length?e:i}function wa(e){return e?Fa(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Ta(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>e.route.ErrorBoundary!=null||e.route.errorElement!=null)||e[0]}function Ea(e){let t=e.length===1?e[0]:e.find(e=>e.index||!e.path||e.path===`/`)||{id:`__shim-error-route__`};return{matches:[{params:{},pathname:``,pathnameBase:``,route:t}],route:t}}function Da(e,{pathname:t,routeId:n,method:r,type:i,message:a}={}){let o=`Unknown Server Error`,s=`Unknown @remix-run/router error`;return e===400?(o=`Bad Request`,r&&t&&n?s=`You made a ${r} request to "${t}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:i===`invalid-body`&&(s=`Unable to encode submission body`)):e===403?(o=`Forbidden`,s=`Route "${n}" does not match URL "${t}"`):e===404?(o=`Not Found`,s=`No route matches URL "${t}"`):e===405&&(o=`Method Not Allowed`,r&&t&&n?s=`You made a ${r.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:r&&(s=`Invalid request method "${r.toUpperCase()}"`)),new $r(e||500,o,Error(s),!0)}function Oa(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(Ia(r))return{key:n,result:r}}}function ka(e){return er({...typeof e==`string`?tr(e):e,hash:``})}function Aa(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===``?t.hash!==``:e.hash===t.hash||t.hash!==``}function ja(e){return new $r(e.init?.status??500,e.init?.statusText??`Internal Server Error`,e.data)}function Ma(e){return typeof e==`object`&&!!e&&Object.entries(e).every(([e,t])=>typeof e==`string`&&Na(t))}function Na(e){return typeof e==`object`&&!!e&&`type`in e&&`result`in e&&(e.type===`data`||e.type===`error`)}function Pa(e){return Ra(e.result)&&Ai.has(e.result.status)}function Fa(e){return e.type===`error`}function Ia(e){return(e&&e.type)===`redirect`}function La(e){return typeof e==`object`&&!!e&&`type`in e&&`data`in e&&`init`in e&&e.type===`DataWithResponseInit`}function Ra(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.headers==`object`&&e.body!==void 0}function za(e){return Ai.has(e)}function Ba(e){return Ra(e)&&za(e.status)&&e.headers.has(`Location`)}function Va(e){return ki.has(e.toUpperCase())}function Ha(e){return Di.has(e.toUpperCase())}function Ua(e){return new URLSearchParams(e).getAll(`index`).some(e=>e===``)}function Wa(e,t){let n=typeof t==`string`?tr(t).search:t.search;if(e[e.length-1].route.index&&Ua(n||``))return e[e.length-1];let r=Ur(e);return r[r.length-1]}function Ga(e,t,n){return{url:ni(e.createURL(t),t),pattern:n?ti(n):``,params:n?.[0]?.params?{...n[0].params}:{}}}function Ka(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:a,json:o}=e;if(t&&n&&r){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(a!=null)return{formMethod:t,formAction:n,formEncType:r,formData:a,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:o,text:void 0}}}function qa(e,t,n,r){return r?{state:`loading`,location:e,matches:t,historyAction:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}:{state:`loading`,location:e,matches:t,historyAction:n,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Ja(e,t,n,r){return{state:`submitting`,location:e,matches:t,historyAction:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}}function Ya(e,t){return e?{state:`loading`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:`loading`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Xa(e,t){return{state:`submitting`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Za(e){return{state:`idle`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Qa(e,t){try{let n=e.sessionStorage.getItem(Fi);if(n){let e=JSON.parse(n);for(let[n,r]of Object.entries(e||{}))r&&Array.isArray(r)&&t.set(n,new Set(r||[]))}}catch{}}function $a(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(Fi,JSON.stringify(n))}catch(e){Xn(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}function eo(){let e,t,n=new Promise((r,i)=>{e=async e=>{r(e);try{await n}catch{}},t=async e=>{i(e);try{await n}catch{}}});return{promise:n,resolve:e,reject:t}}var to=q.createContext(null);to.displayName=`DataRouter`;var no=q.createContext(null);no.displayName=`DataRouterState`;var ro=q.createContext(null);ro.displayName=`DataRouterData`;var io=q.createContext(null);io.displayName=`DataRouterNavigation`;var ao=q.createContext(!1);function oo(){return q.useContext(ao)}var so=q.createContext({isTransitioning:!1});so.displayName=`ViewTransition`;var co=q.createContext(null);co.displayName=`Fetchers`;var lo=q.createContext(null);lo.displayName=`Await`;var uo=q.createContext(null);uo.displayName=`Navigation`;var fo=q.createContext(null);fo.displayName=`Location`;var po=q.createContext({outlet:null,matches:[],isDataRoute:!1});po.displayName=`Route`;var mo=q.createContext(!1);mo.displayName=`IsDataRoute`;var ho=q.createContext(void 0);ho.displayName=`RouteId`;var go=q.createContext(null);go.displayName=`RouteError`;var _o=`REACT_ROUTER_ERROR`,vo=`REDIRECT`,yo=`ROUTE_ERROR_RESPONSE`;function bo(e){if(e.startsWith(`${_o}:${vo}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function xo(e){if(e.startsWith(`${_o}:${yo}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new $r(t.status,t.statusText,t.data)}catch{}}function So(e,{relative:t}={}){Yn(Co(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=q.useContext(uo),{hash:i,pathname:a,search:o}=jo(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:qr([n,a])),r.createHref({pathname:s,search:o,hash:i})}function Co(){return q.useContext(fo)!=null}function wo(){return Yn(Co(),`useLocation() may be used only in the context of a <Router> component.`),q.useContext(fo).location}var To=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function Eo(){return q.useContext(mo)?Jo():Do()}function Do(){Yn(Co(),`useNavigate() may be used only in the context of a <Router> component.`);let e=q.useContext(to),{basename:t,navigator:n}=q.useContext(uo),{matches:r}=q.useContext(po),{pathname:i}=wo(),a=JSON.stringify(Wr(r)),o=q.useRef(!1);return q.useLayoutEffect(()=>{o.current=!0}),q.useCallback((r,s={})=>{if(Xn(o.current,To),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=Gr(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:qr([t,c.pathname])),Ti(typeof r==`string`?r:er(r),n.createHref(c),Si(n),`reject`),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var Oo=q.createContext(null);function ko(e){let t=q.useContext(po).outlet;return q.useMemo(()=>t&&q.createElement(Oo.Provider,{value:e},t),[t,e])}function Ao(){let{matches:e}=q.useContext(po);return e[e.length-1]?.params??{}}function jo(e,{relative:t}={}){let{matches:n}=q.useContext(po),{pathname:r}=wo(),i=JSON.stringify(Wr(n));return q.useMemo(()=>Gr(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function Mo(e,t,n){Yn(Co(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=q.useContext(uo),{matches:i}=q.useContext(po),a=i[i.length-1],o=a?a.params:{};a&&a.pathname;let s=a?a.pathnameBase:`/`;a&&a.route;let c=wo(),l;if(t){let e=typeof t==`string`?tr(t):t;Yn(s===`/`||e.pathname?.startsWith(s),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${s}" but pathname "${e.pathname}" was given in the \`location\` prop.`),l=e}else l=c;let u=l.pathname||`/`,d=u;if(s!==`/`){let e=s.replace(/^\//,``).split(`/`);d=`/`+u.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let f;f=n?n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):n.router.match(n.state.location):mr(e,{pathname:d});let p=zo(f&&f.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:qr([s,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?s:qr([s,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&p?q.createElement(fo.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...l},navigationType:`POP`}},p):p}function No(){let e=Go(),t=ei(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return q.createElement(q.Fragment,null,q.createElement(`h2`,null,`Unexpected Application Error!`),q.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?q.createElement(`pre`,{style:{padding:`0.5rem`,backgroundColor:`rgba(200,200,200, 0.5)`}},n):null,null)}var Po=q.createElement(No,null),Fo=class extends q.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static contextType=ao;static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=xo(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:q.createElement(po.Provider,{value:this.props.routeContext},q.createElement(mo.Provider,{value:this.props.routeContext.isDataRoute},q.createElement(ho.Provider,{value:this.props.routeContext.matches[this.props.routeContext.matches.length-1]?.route.id},q.createElement(go.Provider,{value:e,children:this.props.component}))));return this.context?q.createElement(Lo,{error:e},t):t}},Io=new WeakMap;function Lo({children:e,error:t}){let{basename:n,navigator:r}=q.useContext(uo);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=bo(t.digest);if(e){let i=Io.get(t);if(i)throw i;let a=ii(e.location,n),o=a.absoluteURL||a.to;if(Ti(e.location,o,Si(r),`allow-explicit`),ga(o))throw Error(`Invalid redirect location`);if(ri&&!Io.get(t)){if(a.isExternal||e.reloadDocument)window.location.href=o;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:e.replace}));throw Io.set(t,n),n}}return q.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${o}`})}}return e}function Ro({routeContext:e,match:t,children:n}){let r=q.useContext(to);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),q.createElement(po.Provider,{value:e},q.createElement(mo.Provider,{value:e.isDataRoute},q.createElement(ho.Provider,{value:t.route.id},n)))}function zo(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);Yn(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:ti(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||Po,o&&(s<0&&c===0?(Xo(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?q.createElement(n.route.Component,null):n.route.element?n.route.element:e,q.createElement(Ro,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?q.createElement(Fo,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function Bo(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Vo(e){let t=q.useContext(to);return Yn(t,Bo(e)),t}function Ho(e){let t=q.useContext(no);return Yn(t,Bo(e)),t}function Uo(e){let t=q.useContext(ro);return Yn(t,Bo(e)),t}function Wo(e){let t=q.useContext(ho);return Yn(t,`${e} can only be used on routes that contain a unique "id"`),t}function Go(){let e=q.useContext(go),t=Uo(`useRouteError`),n=Wo(`useRouteError`);return e===void 0?t.errors?.[n]:e}var Ko=0;function qo(e){let{router:t,basename:n}=Vo(`useBlocker`),r=Ho(`useBlocker`),[i,a]=q.useState(``),o=q.useCallback(t=>{if(typeof e!=`function`)return!!e;if(n===`/`)return e(t);let{currentLocation:r,nextLocation:i,historyAction:a}=t;return e({currentLocation:{...r,pathname:Lr(r.pathname,n)||r.pathname},nextLocation:{...i,pathname:Lr(i.pathname,n)||i.pathname},historyAction:a})},[n,e]);return q.useEffect(()=>{let e=String(++Ko);return a(e),()=>t.deleteBlocker(e)},[t]),q.useEffect(()=>{i!==``&&t.getBlocker(i,o)},[t,i,o]),i&&r.blockers.has(i)?r.blockers.get(i):Pi}function Jo(){let{router:e}=Vo(`useNavigate`),t=Wo(`useNavigate`),n=q.useRef(!1);return q.useLayoutEffect(()=>{n.current=!0}),q.useCallback(async(r,i={})=>{Xn(n.current,To),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var Yo={};function Xo(e,t,n){!t&&!Yo[e]&&(Yo[e]=!0,Xn(!1,n))}function Zo(e,t){if(e===!1||e==null)throw Error(t)}function Qo(e,t,n){let r=typeof e==`string`?new URL(e,n??(typeof window>`u`?`server://singlefetch/`:window.location.origin)):new URL(e);return n&&r.origin!==n&&(r=new URL(r.pathname+r.search+r.hash,n)),r.pathname.endsWith(`/`)?r.pathname=`${r.pathname}_.${t}`:r.pathname=`${r.pathname}.${t}`,r}async function $o(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function es(e){return e!=null&&typeof e.page==`string`}function ts(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function ns(e,t,n){return ss((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await $o(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(ts).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function rs(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function is(e,t,{includeHydrateFallback:n}={}){return as(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function as(e){return[...new Set(e)]}function os(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function ss(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!es(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(os(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}var cs={};function ls(e,t){!e&&!cs[t]&&(cs[t]=!0,console.warn(t))}var us=q.createContext(void 0);us.displayName=`FrameworkContext`;function ds(){let e=q.useContext(us);return Zo(e,`You must render this element inside a <HydratedRouter> element`),e}function fs(e,t){let n=q.useContext(us),[r,i]=q.useState(!1),[a,o]=q.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=q.useRef(null);q.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),q.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:ps(s,p),onBlur:ps(c,m),onMouseEnter:ps(l,p),onMouseLeave:ps(u,m),onTouchStart:ps(d,p)}]:[a,f,{}]:[!1,f,{}]}function ps(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function ms({page:e,...t}){let n=oo(),{nonce:r}=ds(),{router:i}=Vo(`PrefetchPageLinks`),a=q.useMemo(()=>i.match(e),[i,i.routes,e]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?q.createElement(gs,{page:e,matches:a,...t}):q.createElement(_s,{page:e,matches:a,...t})):null}function hs(e){let{manifest:t,routeModules:n}=ds(),[r,i]=q.useState([]);return q.useEffect(()=>{let r=!1;return ns(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function gs({page:e,matches:t,...n}){let r=wo(),{unstable_apiServerOrigin:i}=ds(),a=q.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=Qo(e,`rsc`,i),a=!1,o=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?a=!0:o.push(e.route.id);return a&&o.length>0&&n.searchParams.set(`_routes`,o.join(`,`)),[i?n.toString():n.pathname+n.search]},[e,r,t,i]);return q.createElement(q.Fragment,null,a.map(e=>q.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function _s({page:e,matches:t,...n}){let r=wo(),{manifest:i,routeModules:a,unstable_apiServerOrigin:o}=ds(),{matches:s}=Ho(`PrefetchPageLinks`),{loaderData:c}=Uo(`PrefetchPageLinks`),l=q.useMemo(()=>rs(e,t,s,i,r,`data`),[e,t,s,i,r]),u=q.useMemo(()=>rs(e,t,s,i,r,`assets`),[e,t,s,i,r]),d=q.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,s=!1;if(t.forEach(e=>{let t=i.routes[e.route.id];t&&t.hasLoader&&(!l.some(t=>t.route.id===e.route.id)&&e.route.id in c&&a[e.route.id]?.shouldRevalidate||t.hasClientLoader?s=!0:n.add(e.route.id))}),n.size===0)return[];let u=Qo(e,`data`,o);return s&&n.size>0&&u.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[o?u.toString():u.pathname+u.search]},[c,r,i,l,t,e,a,o]),f=q.useMemo(()=>is(u,i),[u,i]),p=hs(u);return q.createElement(q.Fragment,null,d.map(e=>q.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),f.map(e=>q.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),p.map(({key:e,link:t})=>q.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function vs(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}var ys=[`HydrateFallback`,`hydrateFallbackElement`],bs=class{status=`pending`;promise;resolve;reject;constructor(){this.promise=new Promise((e,t)=>{this.resolve=t=>{this.status===`pending`&&(this.status=`resolved`,e(t))},this.reject=e=>{this.status===`pending`&&(this.status=`rejected`,t(e))}})}};function xs({router:e,flushSync:t,onError:n,useTransitions:r}){r=oo()||r;let[i,a]=q.useState(e.state),[o,s]=(0,q.useOptimistic)(i),c=q.useRef(o),[l,u]=q.useState(),[d,f]=q.useState({isTransitioning:!1}),[p,m]=q.useState(),[h,g]=q.useState(),[_,v]=q.useState(),y=q.useRef(new Map),b=q.useRef(new WeakSet),x=q.useCallback((i,{deletedFetchers:o,newErrors:l,flushSync:d,viewTransitionOpts:_})=>{c.current=i,l&&i.errors&&zi.has(i.errors)&&(b.current.has(i.errors)?l=null:b.current.add(i.errors)),l&&n&&Object.values(l).forEach(e=>n(e,{location:i.location,params:i.matches[0]?.params??{},pattern:ti(i.matches)})),i.fetchers.forEach((e,t)=>{e.data!==void 0&&y.current.set(t,e.data)}),o.forEach(e=>y.current.delete(e)),ls(d===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let x=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition==`function`;if(ls(_==null||x,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!_||!x)t&&d?t(()=>a(i)):r===!1?a(i):q.startTransition(()=>{r===!0&&s(e=>Ss(e,i)),a(i)});else if(t&&d){t(()=>{h&&(p?.resolve(),h.skipTransition()),f({isTransitioning:!0,flushSync:!0,currentLocation:_.currentLocation,nextLocation:_.nextLocation})});let n=e.window.document.startViewTransition(()=>{t(()=>a(i))});n.finished.finally(()=>{t(()=>{m(void 0),g(void 0),u(void 0),f({isTransitioning:!1})})}),t(()=>g(n))}else h?(p?.resolve(),h.skipTransition(),v({state:i,currentLocation:_.currentLocation,nextLocation:_.nextLocation})):(u(i),f({isTransitioning:!0,flushSync:!1,currentLocation:_.currentLocation,nextLocation:_.nextLocation}))},[e.window,t,h,p,r,s,n]);q.useLayoutEffect(()=>e.subscribe(x),[e,x]),q.useLayoutEffect(()=>{let t=e.state.errors,n=t?zi.get(t):null;(c.current!==e.state||t&&n&&!b.current.has(t))&&x(e.state,{deletedFetchers:[],flushSync:!1,newErrors:n??null})},[e,x]),q.useEffect(()=>{d.isTransitioning&&!d.flushSync&&m(new bs)},[d]),q.useEffect(()=>{if(p&&l&&e.window){let t=l,n=p.promise,i=e.window.document.startViewTransition(async()=>{r===!1?a(t):q.startTransition(()=>{r===!0&&s(e=>Ss(e,t)),a(t)}),await n});i.finished.finally(()=>{m(void 0),g(void 0),u(void 0),f({isTransitioning:!1})}),g(i)}},[l,p,e.window,r,s]),q.useEffect(()=>{p&&l&&o.location.key===l.location.key&&p.resolve()},[p,h,o.location,l]),q.useEffect(()=>{!d.isTransitioning&&_&&(u(_.state),f({isTransitioning:!0,flushSync:!1,currentLocation:_.currentLocation,nextLocation:_.nextLocation}),v(void 0))},[d.isTransitioning,_]);let S=q.useMemo(()=>({createHref:e.createHref,createURL:e.createURL,encodeLocation:e.encodeLocation,go:t=>e.navigate(t),push:(t,n,r)=>e.navigate(t,{state:n,preventScrollReset:r?.preventScrollReset}),replace:(t,n,r)=>e.navigate(t,{replace:!0,state:n,preventScrollReset:r?.preventScrollReset})}),[e]),C=e.basename||`/`,w=q.useMemo(()=>({router:e,navigator:S,static:!1,basename:C,onError:n}),[e,S,C,n]),T=q.useMemo(()=>({historyAction:o.historyAction,location:o.location,matches:o.matches,initialized:o.initialized,renderFallback:o.renderFallback,restoreScrollPosition:o.restoreScrollPosition,preventScrollReset:o.preventScrollReset,blockers:o.blockers}),[o.historyAction,o.location,o.matches,o.initialized,o.renderFallback,o.restoreScrollPosition,o.preventScrollReset,o.blockers]),E=q.useMemo(()=>({navigation:o.navigation,revalidation:o.revalidation}),[o.navigation,o.revalidation]),D=q.useMemo(()=>({loaderData:o.loaderData,actionData:o.actionData,errors:o.errors}),[o.loaderData,o.actionData,o.errors]),O=q.useMemo(()=>({fetchers:o.fetchers,fetcherData:y.current}),[o.fetchers]);return q.createElement(q.Fragment,null,q.createElement(to.Provider,{value:w},q.createElement(no.Provider,{value:T},q.createElement(io.Provider,{value:E},q.createElement(ro.Provider,{value:D},q.createElement(co.Provider,{value:O},q.createElement(so.Provider,{value:d},q.createElement(Ds,{basename:C,location:o.location,navigationType:o.historyAction,navigator:S,useTransitions:r},q.createElement(Cs,{routes:e.routes,manifest:e.manifest,state:o,isStatic:!1,onError:n})))))))),null)}function Ss(e,t){return{...e,navigation:t.navigation.state===`idle`?e.navigation:t.navigation,revalidation:t.revalidation===`idle`?e.revalidation:t.revalidation,actionData:t.navigation.state===`submitting`?e.actionData:t.actionData,fetchers:t.fetchers}}var Cs=q.memo(ws);function ws({routes:e,manifest:t,state:n,isStatic:r,onError:i}){let a=q.useContext(to);Yn(a,`You must render this element inside a <DataRouterContext.Provider> element`);let o=q.useContext(us)?.routeDiscoveryRuntime;return q.useEffect(()=>{n.initialized&&o?.markReady()},[n.initialized,o]),Mo(e,void 0,{router:a.router,manifest:t,state:n,isStatic:r,onError:i})}function Ts({to:e,replace:t,state:n,relative:r}){Yn(Co(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i,navigator:a}=q.useContext(uo);Xn(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:o}=q.useContext(po),{pathname:s}=wo(),c=Eo(),l=Gr(e,Wr(o),s,r===`path`);Ti(typeof e==`string`?e:er(e),a.createHref(l),Si(a),`reject`);let u=JSON.stringify(l);return q.useEffect(()=>{c(JSON.parse(u),{replace:t,state:n,relative:r})},[c,u,r,t,n]),null}function Es(e){return ko(e.context)}function Ds({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){Yn(!Co(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=q.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=tr(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,mask:m}=n,h=q.useMemo(()=>{let e=Lr(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);return Xn(h!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:q.createElement(uo.Provider,{value:c},q.createElement(fo.Provider,{children:t,value:h}))}q.Component;var Os=`application/x-www-form-urlencoded`;function ks(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function As(e){return ks(e)&&e.tagName.toLowerCase()===`button`}function js(e){return ks(e)&&e.tagName.toLowerCase()===`form`}function Ms(e){return ks(e)&&e.tagName.toLowerCase()===`input`}function Ns(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Ps(e,t){return e.button===0&&(!t||t===`_self`)&&!Ns(e)}function Fs(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function Is(e,t){let n=Fs(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var Ls=null;function Rs(){if(Ls===null)try{new FormData(document.createElement(`form`),0),Ls=!1}catch{Ls=!0}return Ls}var zs=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Bs(e){return e!=null&&!zs.has(e)?(Xn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Os}"`),null):e}function Vs(e,t){let n,r,i,a,o;if(js(e)){let o=e.getAttribute(`action`);r=o?Lr(o,t):null,n=e.getAttribute(`method`)||`get`,i=Bs(e.getAttribute(`enctype`))||Os,a=new FormData(e)}else if(As(e)||Ms(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?Lr(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||`get`,i=Bs(e.getAttribute(`formenctype`))||Bs(o.getAttribute(`enctype`))||Os,a=new FormData(o,e),!Rs()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(ks(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=`get`,r=null,i=Os,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}var Hs=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{Hs&&(window.__reactRouterVersion=`8`)}catch{}function Us(e,t){return Bi({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:Jn({window:t?.window}),hydrationData:t?.hydrationData||Ws(),routes:e,mapRouteProperties:dr,hydrationRouteProperties:ys,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,instrumentations:t?.instrumentations}).initialize()}function Ws(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:Gs(e.errors)}),e}function Gs(e){if(!e)return null;let t=Object.entries(e),n={};for(let[e,r]of t)if(r&&r.__type===`RouteErrorResponse`)n[e]=new $r(r.status,r.statusText,r.data,r.internal===!0);else if(r&&r.__type===`Error`){if(typeof r.__subType==`string`&&Qr.includes(r.__subType)){let t=window[r.__subType];if(typeof t==`function`)try{let i=new t(r.message);i.stack=``,n[e]=i}catch{}}if(n[e]==null){let t=Error(r.message);t.stack=``,n[e]=t}}else n[e]=r;return n}var Ks=q.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m){let{basename:h,navigator:g,useTransitions:_}=q.useContext(uo),v=typeof l==`string`&&Un.test(l),y=ii(l,h);l=y.to;let b=So(l,{relative:r}),x=wo(),S=null;if(o){let e=Gr(o,[],x.mask?x.mask.pathname:`/`,!0);h!==`/`&&(e.pathname=e.pathname===`/`?h:qr([h,e.pathname])),S=g.createHref(e)}let[C,w,T]=fs(n,p),E=Ys(l,{replace:a,mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,defaultShouldRevalidate:f,useTransitions:_});function D(t){e&&e(t),t.defaultPrevented||E(t)}let O=!(y.isExternal||i),k=q.createElement(`a`,{...p,...T,href:(O?S:void 0)||y.absoluteURL||b,onClick:O?D:e,ref:vs(m,w),target:c,"data-discover":!v&&t===`render`?`true`:void 0});return C&&!v?q.createElement(q.Fragment,null,k,q.createElement(ms,{page:b})):k});Ks.displayName=`Link`;var qs=q.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=jo(a,{relative:c.relative}),d=wo(),f=q.useContext(io),{navigator:p,basename:m}=q.useContext(uo),h=f!=null&&tc(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,_=d.pathname,v=f?.navigation.location?f.navigation.location.pathname:null;t||(_=_.toLowerCase(),v=v?v.toLowerCase():null,g=g.toLowerCase()),v&&m&&(v=Lr(v,m)||v);let y=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,b=_===g||!r&&_.startsWith(g)&&_.charAt(y)===`/`,x=v!=null&&(v===g||!r&&v.startsWith(g)&&v.charAt(y)===`/`),S={isActive:b,isPending:x,isTransitioning:h},C=b?e:void 0,w;w=typeof n==`function`?n(S):[n,b?`active`:null,x?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let T=typeof i==`function`?i(S):i;return q.createElement(Ks,{...c,"aria-current":C,className:w,ref:l,style:T,to:a,viewTransition:o},typeof s==`function`?s(S):s)});qs.displayName=`NavLink`;var Js=q.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=`get`,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m)=>{let{useTransitions:h}=q.useContext(uo),g=$s(),_=ec(s,{relative:l}),v=o.toLowerCase()===`get`?`get`:`post`,y=typeof s==`string`&&Un.test(s);return q.createElement(`form`,{ref:m,method:v,action:_,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>g(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f});h&&n!==!1?q.startTransition(()=>p()):p()},...p,"data-discover":!y&&e===`render`?`true`:void 0})});Js.displayName=`Form`;function Ys(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let u=Eo(),d=wo(),f=jo(e,{relative:o});return q.useCallback(p=>{if(Ps(p,t)){p.preventDefault();let t=n===void 0?er(d)===er(f):n,m=()=>u(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});l?q.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}function Xs(e){Xn(typeof URLSearchParams<`u`,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=q.useRef(Fs(e)),n=q.useRef(!1),r=wo(),i=q.useMemo(()=>Is(r.search,n.current?null:t.current),[r.search]),a=Eo();return[i,q.useCallback((e,t)=>{let r=Fs(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var Zs=0,Qs=()=>`__${String(++Zs)}__`;function $s(){let{router:e}=Vo(`useSubmit`),{basename:t}=q.useContext(uo),n=Wo(`useSubmit`),r=e.fetch,i=e.navigate;return q.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=Vs(e,t);a.navigate===!1?await r(a.fetcherKey||Qs(),n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,relative:a.relative,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,relative:a.relative,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function ec(e,{relative:t}={}){let{basename:n}=q.useContext(uo),r=q.useContext(po);Yn(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...jo(e||`.`,{relative:t})},o=wo();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:qr([n,a.pathname])),er(a)}function tc(e,{relative:t}={}){let n=q.useContext(so);Yn(n!=null,"`useViewTransitionState` must be used within `react-router/dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Vo(`useViewTransitionState`),i=jo(e,{relative:t});if(!n.isTransitioning)return!1;let a=Lr(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Lr(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Nr(i.pathname,o)!=null||Nr(i.pathname,a)!=null}var nc=rt(lt(),1);function rc(e){return q.createElement(xs,{flushSync:nc.flushSync,...e})}var ic=dt(),ac=class extends Error{status;constructor(e,t){super(e),this.status=t}};async function oc(e,t,n){let r=await fetch(t,{method:e,headers:{...n!==void 0&&{"Content-Type":`application/json`},...e!==`GET`&&{"X-AsRun-Ui":`1`}},body:n===void 0?void 0:JSON.stringify(n)}),i=await r.json().catch(()=>({}));if(!r.ok)throw new ac(i.error??`Request failed (${r.status})`,r.status);return i}var sc={info:()=>oc(`GET`,`/api/info`),update:(e=!1)=>oc(`GET`,`/api/update${e?`?refresh=1`:``}`),profiles:()=>oc(`GET`,`/api/profiles`),addProfile:e=>oc(`POST`,`/api/profiles`,e),editProfile:(e,t)=>oc(`PUT`,`/api/profiles/${encodeURIComponent(e)}`,t),verifyProfiles:e=>oc(`POST`,`/api/profiles/verify`,e??{}),logoutProfile:e=>oc(`POST`,`/api/profiles/logout`,{profile:e}),deleteProfile:e=>oc(`DELETE`,`/api/profiles/${encodeURIComponent(e)}`),cases:()=>oc(`GET`,`/api/cases`),case:e=>oc(`GET`,`/api/cases/${e}`),saveCase:(e,t,n)=>oc(`PUT`,`/api/cases/${e}`,{content:t,mtimeMs:n}),spec:e=>oc(`GET`,`/api/specs/${e}`),saveSpec:(e,t,n)=>oc(`PUT`,`/api/specs/${e}`,{content:t,mtimeMs:n}),openSpec:e=>oc(`POST`,`/api/spec-open`,{id:e}),caseImpact:e=>oc(`GET`,`/api/case-impact/${e}`),renameCase:(e,t)=>oc(`POST`,`/api/case-rename`,{id:e,to:t}),deleteCase:e=>oc(`DELETE`,`/api/cases/${e}`),createCase:e=>oc(`POST`,`/api/cases`,{id:e}),baselines:e=>oc(`GET`,`/api/baselines?case=${encodeURIComponent(e)}`),reports:()=>oc(`GET`,`/api/reports`),reportSummary:e=>oc(`GET`,`/api/reports/${e}/summary`),previewRun:e=>oc(`POST`,`/api/runs/preview`,e),planRun:e=>oc(`POST`,`/api/runs/plan`,e),jobs:()=>oc(`GET`,`/api/jobs`),aiModels:(e,t=!1)=>oc(`GET`,`/api/ai/models?tool=${encodeURIComponent(e)}${t?`&refresh=1`:``}`),startJob:e=>oc(`POST`,`/api/jobs`,e),jobRerun:e=>oc(`GET`,`/api/jobs/${encodeURIComponent(e)}/rerun`),sendInput:(e,t)=>oc(`POST`,`/api/jobs/${e}/input`,{text:t}),cancelJob:e=>oc(`POST`,`/api/jobs/${e}/cancel`)},cc=[`claude`,`opencode`],lc=`claude`,uc={claude:`Claude`,opencode:`OpenCode`},dc=[`explore-case`,`gen-spec`,`heal-spec`],fc={"explore-case":`Explore case`,"gen-spec":`Generate spec`,"heal-spec":`Heal spec`},pc={"explore-case":`case`,"gen-spec":`spec`,"heal-spec":`files`},mc={"explore-case":`Where the agent explores. Only the profiles you tick are opened; it only reads, and with Attended on you do the steps that write data.`,"gen-spec":`Where the agent explores and verifies the spec.`,"heal-spec":`Where the failure is diagnosed and the pages are checked. Only the profiles that are logged in there are run.`},hc=(e,t,n)=>{let{env:r,force:i,attended:a,profiles:o,hints:s,report:c}=n,l=e===`heal-spec`;return`/${e} ${t} ${r}${i&&e===`gen-spec`?` --force`:``}${a&&e===`explore-case`?` --attended`:``}${(e===`explore-case`||l)&&o?.length?` --profiles ${o.join(`,`)}`:``}${l&&c?` --report ${c}`:``}${s?` --hints ${s}`:``}`},gc=`mcp__playwright-test__*`;function _c(e){let t=`Bash(node --import tsx:*)`,n=[`Bash(pnpm case:check:*)`,t],r=[gc,`Bash(pnpm status:*)`,`Bash(pnpm pdf:render:*)`,...n];if(e===`case`)return[...r,`Edit(/cases/**)`];if(e===`cases-new`)return[...n,`Edit(/cases/**)`];let i=[...r,`Edit(/cases/**)`,`Edit(/tests/**)`,`Bash(pnpm typecheck:*)`,`Bash(pnpm spec:lint:*)`,`Bash(pnpm markers:confirm:*)`,t,`Bash(pnpm baselines:review:*)`];return e===`spec`?i:[...i,`Bash(pnpm asrun:*)`,`Bash(pnpm heal:evidence:*)`]}var vc=[`Bash(*--allow-writes*)`,`Bash(*ASRUN_ALLOW_WRITES*)`],yc={claude:[`--output-format`,`stream-json`,`--verbose`],opencode:[`--format`,`json`]};function bc(e,t,n,r,i,a){return e===`opencode`?{file:`opencode`,args:[`run`,`--auto`,`--agent`,`build`,...yc.opencode,...r?[`-s`,r.id]:[],...i?[`--model`,i]:[],...a?[`--thinking`]:[],t]}:{file:`claude`,args:[`-p`,t,...yc.claude,...r?[r.resume?`--resume`:`--session-id`,r.id]:[],...n===`files`||n===`spec`?[`--permission-mode`,`acceptEdits`]:[],...i?[`--model`,i]:[],`--allowedTools`,..._c(n),`--disallowedTools`,...vc]}}var xc=({file:e,args:t})=>[e,...t.map(e=>/^[\w@=,.:/-]+$/.test(e)?e:JSON.stringify(e))].join(` `),Sc=`The last line of your final message is plain text and nothing else: exactly "RESULT: ready" or "RESULT: needs-input". Never put it in a code fence or inline code, never make it bold, a heading or a list item, put no label, number or emoji in front of it, and write nothing after it.`,Cc=`Non-interactive run: nobody can answer questions, so do not stop to ask. Write open questions into the case file as the skill describes. ${Sc}`,wc=`Attended run: a person is at the machine and the browser window is visible, so hand steps that write data or need a choice to them and wait, as the skill describes. Start every handoff (also a second one in the same run) with its own call that sets __handoffCfg, before the call that runs handoff-card.js, and never change those options inside the call that runs the card: the web UI sees that a person is needed only from that call, so without it there is no "Your turn" badge and no notification. Put one action per string in \`steps\` (the card numbers them), keep \`message\` to one sentence, write the finish condition into \`finish\` as plain text, and set \`doneText\` to the exact text that appears when the step is done so the card ends by itself. Nobody can answer questions in the chat, so write open questions into the case file as the skill describes. ${Sc}`;function Tc(e,t,n){let r=hc(e,t,n);return e===`explore-case`&&n.attended?`${r} ${wc}`:`${r} ${Cc}`}function Ec(e,t,n,r,i){return bc(e,Tc(t,n,r),pc[t],i,r.model,r.thinking)}function Dc(e,t,n,r,i){return xc(Ec(e,t,n,r,i))}var Oc=8e3,kc=4e3,Ac=`Accept the suggestion of every open question: delete its TODO block and keep the sentence above it as confirmed text.`,jc=1e5,Mc=e=>`/make-case ${e} Non-interactive run: nobody can answer questions, so do not stop to ask. Do not open a browser or explore pages. Write the suggested default of every gap as a normal sentence and put a TODO block with an empty Answer: line under it, as open-questions.md describes (every marker starts with its emoji). Never put a marker word inside a TODO block: one claim carries one signal. Never overwrite an existing case: choose a new id instead. Put the cases of one area in a group folder (cases/<group>/<name>.md, id <group>/<name>), reusing an existing folder when it fits. Write the cases, run pnpm case:check, and list the open questions in your final report.`,Nc=(e,t,n,r)=>bc(e,Mc(t),`cases-new`,void 0,n,r),Pc=(e,t,n,r)=>xc(Nc(e,t,n,r));function Fc(e,t){return e.find(e=>e.continuesJobId===t&&(e.status===`running`||e.status===`succeeded`))}var Ic=`asrun-ui.notify`,Lc=new Set,Rc=!1,zc=()=>typeof Notification<`u`,Bc=()=>{try{return localStorage.getItem(Ic)===`true`}catch{return!1}},Vc=e=>(Lc.add(e),window.addEventListener(`storage`,e),()=>{Lc.delete(e),window.removeEventListener(`storage`,e)}),Hc=()=>zc()?Notification.permission:`unsupported`,Uc=()=>(0,q.useSyncExternalStore)(Vc,Bc),Wc=()=>(Uc(),Hc()),Gc=()=>(0,q.useSyncExternalStore)(Vc,()=>Rc);function Kc(e){try{localStorage.setItem(Ic,String(e))}catch{}Lc.forEach(e=>e())}function qc(){Rc||(Rc=!0,Lc.forEach(e=>e()))}function Jc(e,t,n,r={}){if(!Xc())return null;try{let i=new Notification(e,{body:t,tag:n});return i.onerror=qc,i.onclick=()=>{window.focus(),i.close(),r.onClick?.()},i}catch(e){return qc(),console.warn(`Could not show a browser notification:`,e),null}}async function Yc(e){if(!e)return Kc(!1);if(!zc())return;Notification.permission==="default"&&await Notification.requestPermission();let t=Notification.permission===`granted`;Kc(t),t&&Jc(`Notifications are on`,`You are told here when a run ends. Whatever waits for you (a login, a step in the browser window, open questions) is a desktop notification, wherever you are.`,`${Ic}:hello`)}var Xc=()=>Bc()&&Hc()===`granted`,Zc=e=>[e.profile,e.env].filter(Boolean).join(` @ `),Qc=e=>{if(e.caseId)return e.caseId;let t=/--grep=(?:"([^"]+)"|(\S+))/.exec(e.command);return t?t[1]??t[2]:e.command},$c=()=>document.visibilityState===`hidden`||!document.hasFocus();function el(e,t){let n=[];for(let r of e)if(r.status===`running`&&r.kind===`signin`)n.push({key:`${r.id}:signin`,jobId:r.id,kind:`signin`,title:`Your turn: log in`,body:`Log in${Zc(r)?` to ${Zc(r)}`:``} in the browser window, then press "Done, save the session" on the card in it.`});else if(r.status===`running`&&r.awaitingUser){let{message:e,finish:t}=r.awaitingUser;n.push({key:`${r.id}:handoff:${r.awaitingUser.since}`,jobId:r.id,kind:`handoff`,title:`Your turn in the browser window`,body:(e??`Do the step, then press Done on the card.`)+(t?` Done when ${t}.`:``)})}else if(r.status===`interrupted`&&r.leftover?.state===`alive`)n.push({key:`${r.id}:leftover`,jobId:r.id,kind:`orphan`,title:`A run survived a restart`,body:`Its process (pid ${r.leftover.pid}) is still running after the UI server restarted. Stop it before starting another AI run.`});else if(r.status===`succeeded`&&r.resultState===`needs-input`&&!t.has(r.id)&&!Fc(e,r.id)){let e=r.aiCommand===`heal-spec`;n.push({key:`${r.id}:needs-input`,jobId:r.id,kind:`needs-input`,title:e?`The case needs your review`:`The agent needs your answers`,body:e?r.caseId?`The case changed: review it and explore it again (${r.caseId}).`:`The case changed: review it and explore it again.`:r.caseId?`Open questions in ${r.caseId}.`:`There are open questions in the case file.`})}return n}function tl(e,t){if(e.kind!==`run`&&e.kind!==`ai`||e.status===`running`||e.status===`interrupted`||e.resultState===`needs-input`||!$c()||!Xc())return;let n=Zc(e),r=e.status===`succeeded`?e.kind===`run`?`passed`:`finished`:e.status===`cancelled`?`cancelled`:`failed${e.exitCode===null?``:` (exit ${e.exitCode})`}`,i=e.kind===`ai`&&e.aiCommand?fc[e.aiCommand]:``;Jc(`${e.kind===`run`?`Run`:`AI run`} finished: ${Qc(e)}`,[i,r,n].filter(Boolean).join(` · `),`${e.id}:finished`,{onClick:()=>t(e.id)})}function nl(e,t,n){(0,q.useEffect)(()=>{if(!e)return;let r=()=>{!document.hidden&&document.hasFocus()&&n?.find(t=>t.id===e)?.status!==`running`&&t(e)};return r(),window.addEventListener(`focus`,r),document.addEventListener(`visibilitychange`,r),()=>{window.removeEventListener(`focus`,r),document.removeEventListener(`visibilitychange`,r)}},[e,t,n])}function rl(e,t){return(0,q.useMemo)(()=>el(e??[],t),[e,t])}var il=`AsRun`,al=il,ol=[{prefix:`/profiles`,title:`Profiles`},{prefix:`/cases`,title:`Cases`},{prefix:`/run`,title:`Run tests`},{prefix:`/reports`,title:`Reports`},{prefix:`/guide`,title:`AI guide`},{prefix:`/help`,title:`Help`},{prefix:`/jobs`,title:`Job Log`}],sl=(e,t)=>e===t||e.startsWith(`${t}/`);function cl(e){let t=ol.find(t=>sl(e,t.prefix));if(!t)return al;if(t.prefix===`/cases`){let n=decodeURIComponent(e.slice(7));if(n===`memo`)return`${al} | ${t.title} | From memo`;if(n)return`${al} | ${t.title} | ${n}`}return`${al} | ${t.title}`}function ll(e,t){(0,q.useEffect)(()=>{document.title=`${t>0?`(${t}) `:``}${cl(e)}`},[e,t])}var ul={info:[`info`],update:[`update`],profiles:[`profiles`],cases:[`cases`],caseDetails:[`case`],case:e=>[`case`,e],specs:[`spec`],spec:e=>[`spec`,e],reports:[`reports`],reportSummary:e=>[`report-summary`,e],jobs:[`jobs`],aiModels:e=>[`ai-models`,e]},dl=()=>Vn({queryKey:ul.info,queryFn:sc.info}),fl=()=>Vn({queryKey:ul.update,queryFn:()=>sc.update(),refetchInterval:9e5,retry:!1}),pl=()=>Vn({queryKey:ul.profiles,queryFn:sc.profiles,refetchInterval:e=>e.state.data?.verifying?1500:!1}),ml=()=>Vn({queryKey:ul.cases,queryFn:sc.cases}),hl=()=>Vn({queryKey:ul.reports,queryFn:sc.reports,placeholderData:zt}),gl=()=>Vn({queryKey:ul.jobs,queryFn:sc.jobs,refetchInterval:e=>e.state.data?.some(e=>e.status===`running`||e.leftover?.state===`alive`)?3e3:!1}),_l=e=>Vn({queryKey:ul.reportSummary(e),queryFn:()=>sc.reportSummary(e),retry:!1}),vl=e=>Vn({queryKey:ul.aiModels(e),queryFn:()=>sc.aiModels(e),staleTime:3e5,retry:!1}),yl=`asrun-ui.jobs.seen`,bl=(0,q.createContext)(null),xl=()=>{let e=(0,q.useContext)(bl);if(!e)throw Error(`JobsProvider is missing`);return e};function Sl({children:e}){let t=ht(),[n,r]=(0,q.useState)(null),[i,a]=(0,q.useState)(!1),[o,s]=(0,q.useState)(!1),[c,l]=(0,q.useState)(null),u=(0,q.useCallback)(e=>{e.kind===`signin`&&t.invalidateQueries({queryKey:ul.profiles}),e.kind===`ai`&&(t.invalidateQueries({queryKey:ul.cases}),t.invalidateQueries({queryKey:ul.caseDetails}),t.invalidateQueries({queryKey:ul.specs}),t.invalidateQueries({queryKey:ul.reports}),t.invalidateQueries({queryKey:ul.profiles})),e.kind===`run`&&(t.invalidateQueries({queryKey:ul.reports}),t.invalidateQueries({queryKey:ul.profiles}))},[t]);(0,q.useEffect)(()=>{let e=new EventSource(`/api/events`),n=!1;return e.onopen=()=>{n&&t.invalidateQueries(),n=!0},e.addEventListener(`job`,e=>{let n=JSON.parse(e.data);t.invalidateQueries({queryKey:ul.jobs}),n.status!==`running`&&u(n)}),e.addEventListener(`files`,e=>{let n=JSON.parse(e.data);n.cases&&(t.invalidateQueries({queryKey:ul.cases}),t.invalidateQueries({queryKey:ul.caseDetails})),n.specs&&(t.invalidateQueries({queryKey:ul.cases}),t.invalidateQueries({queryKey:ul.specs}))}),e.addEventListener(`update`,()=>{t.invalidateQueries({queryKey:ul.update})}),()=>e.close()},[t,u]);let d=gl().data,f=(0,q.useRef)(null),p=(0,q.useRef)(d);(0,q.useEffect)(()=>{p.current=d},[d]);let[m,h]=(0,q.useState)(()=>{try{let e=JSON.parse(localStorage.getItem(yl)??`[]`);return new Set(Array.isArray(e)?e.filter(e=>typeof e==`string`):[])}catch{return new Set}}),g=(0,q.useCallback)(e=>{p.current?.find(t=>t.id===e)?.status!==`running`&&h(t=>{if(t.has(e))return t;let n=new Set(t).add(e);try{localStorage.setItem(yl,JSON.stringify([...n].slice(-100)))}catch{}return n})},[]),_=(0,q.useCallback)(e=>{r(e),e&&(a(!0),g(e))},[g]);(0,q.useEffect)(()=>{if(!d)return;let e=f.current;if(f.current=new Set(d.filter(e=>e.status===`running`).map(e=>e.id)),e)for(let t of d)e.has(t.id)&&t.status!==`running`&&(u(t),tl(t,_))},[d,u,_]);let v=rl(d,m);nl(i?n:null,g,d);let{pathname:y}=wo();ll(y,v.length);let b=Hn({mutationFn:sc.startJob}),x=(0,q.useCallback)(async e=>{l(null);try{let n=await b.mutateAsync(e);return r(n.id),a(!0),t.invalidateQueries({queryKey:ul.jobs}),n}catch(e){return l(e.message),a(!0),null}},[b,t]),S=(0,q.useMemo)(()=>({attention:v,markSeen:g,selectedJobId:n,drawerOpen:i,drawerMaximized:o,selectJob:_,setDrawerOpen:a,setDrawerMaximized:s,startJob:x,startError:c,clearStartError:()=>l(null)}),[v,g,n,i,o,_,x,c]);return(0,J.jsx)(bl.Provider,{value:S,children:e})}var Cl=et(((e,t)=>{t.exports=`SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED`})),wl=et(((e,t)=>{var n=Cl();function r(){}function i(){}i.resetWarningCache=r,t.exports=function(){function e(e,t,r,i,a,o){if(o!==n){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name=`Invariant Violation`,s}}e.isRequired=e;function t(){return e}var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return a.PropTypes=a,a}})),Y=rt(et(((e,t)=>{t.exports=wl()()}))());function Tl(){return Tl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Tl.apply(this,arguments)}function El(e,t){if(e==null)return{};var n=Dl(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Dl(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Ol=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=El(e,[`color`,`size`]);return q.createElement(`svg`,Tl({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`circle`,{cx:`12`,cy:`12`,r:`10`}),q.createElement(`line`,{x1:`12`,y1:`8`,x2:`12`,y2:`12`}),q.createElement(`line`,{x1:`12`,y1:`16`,x2:`12.01`,y2:`16`}))});Ol.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Ol.displayName=`AlertCircle`;function kl(){return kl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kl.apply(this,arguments)}function Al(e,t){if(e==null)return{};var n=jl(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function jl(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Ml=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Al(e,[`color`,`size`]);return q.createElement(`svg`,kl({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`path`,{d:`M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z`}),q.createElement(`line`,{x1:`12`,y1:`9`,x2:`12`,y2:`13`}),q.createElement(`line`,{x1:`12`,y1:`17`,x2:`12.01`,y2:`17`}))});Ml.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Ml.displayName=`AlertTriangle`;function Nl(){return Nl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Nl.apply(this,arguments)}function Pl(e,t){if(e==null)return{};var n=Fl(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Fl(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Il=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Pl(e,[`color`,`size`]);return q.createElement(`svg`,Nl({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`polyline`,{points:`21 8 21 21 3 21 3 8`}),q.createElement(`rect`,{x:`1`,y:`3`,width:`22`,height:`5`}),q.createElement(`line`,{x1:`10`,y1:`12`,x2:`14`,y2:`12`}))});Il.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Il.displayName=`Archive`;function Ll(){return Ll=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ll.apply(this,arguments)}function Rl(e,t){if(e==null)return{};var n=zl(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function zl(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Bl=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Rl(e,[`color`,`size`]);return q.createElement(`svg`,Ll({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`line`,{x1:`5`,y1:`12`,x2:`19`,y2:`12`}),q.createElement(`polyline`,{points:`12 5 19 12 12 19`}))});Bl.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Bl.displayName=`ArrowRight`;function Vl(){return Vl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vl.apply(this,arguments)}function Hl(e,t){if(e==null)return{};var n=Ul(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ul(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Wl=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Hl(e,[`color`,`size`]);return q.createElement(`svg`,Vl({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`circle`,{cx:`12`,cy:`12`,r:`10`}),q.createElement(`polyline`,{points:`16 12 12 8 8 12`}),q.createElement(`line`,{x1:`12`,y1:`16`,x2:`12`,y2:`8`}))});Wl.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Wl.displayName=`ArrowUpCircle`;function Gl(){return Gl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gl.apply(this,arguments)}function Kl(e,t){if(e==null)return{};var n=ql(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ql(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Jl=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Kl(e,[`color`,`size`]);return q.createElement(`svg`,Gl({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`line`,{x1:`7`,y1:`17`,x2:`17`,y2:`7`}),q.createElement(`polyline`,{points:`7 7 17 7 17 17`}))});Jl.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Jl.displayName=`ArrowUpRight`;function Yl(){return Yl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yl.apply(this,arguments)}function Xl(e,t){if(e==null)return{};var n=Zl(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Zl(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Ql=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Xl(e,[`color`,`size`]);return q.createElement(`svg`,Yl({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`path`,{d:`M13.73 21a2 2 0 0 1-3.46 0`}),q.createElement(`path`,{d:`M18.63 13A17.89 17.89 0 0 1 18 8`}),q.createElement(`path`,{d:`M6.26 6.26A5.86 5.86 0 0 0 6 8c0 7-3 9-3 9h14`}),q.createElement(`path`,{d:`M18 8a6 6 0 0 0-9.33-5`}),q.createElement(`line`,{x1:`1`,y1:`1`,x2:`23`,y2:`23`}))});Ql.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Ql.displayName=`BellOff`;function $l(){return $l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$l.apply(this,arguments)}function eu(e,t){if(e==null)return{};var n=tu(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function tu(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var nu=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=eu(e,[`color`,`size`]);return q.createElement(`svg`,$l({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`path`,{d:`M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9`}),q.createElement(`path`,{d:`M13.73 21a2 2 0 0 1-3.46 0`}))});nu.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},nu.displayName=`Bell`;function ru(){return ru=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ru.apply(this,arguments)}function iu(e,t){if(e==null)return{};var n=au(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function au(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var ou=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=iu(e,[`color`,`size`]);return q.createElement(`svg`,ru({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`polyline`,{points:`9 11 12 14 22 4`}),q.createElement(`path`,{d:`M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11`}))});ou.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},ou.displayName=`CheckSquare`;function su(){return su=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},su.apply(this,arguments)}function cu(e,t){if(e==null)return{};var n=lu(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function lu(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var uu=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=cu(e,[`color`,`size`]);return q.createElement(`svg`,su({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`polyline`,{points:`20 6 9 17 4 12`}))});uu.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},uu.displayName=`Check`;function du(){return du=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},du.apply(this,arguments)}function fu(e,t){if(e==null)return{};var n=pu(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function pu(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var mu=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=fu(e,[`color`,`size`]);return q.createElement(`svg`,du({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`polyline`,{points:`6 9 12 15 18 9`}))});mu.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},mu.displayName=`ChevronDown`;function hu(){return hu=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hu.apply(this,arguments)}function gu(e,t){if(e==null)return{};var n=_u(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function _u(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var vu=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=gu(e,[`color`,`size`]);return q.createElement(`svg`,hu({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`polyline`,{points:`15 18 9 12 15 6`}))});vu.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},vu.displayName=`ChevronLeft`;function yu(){return yu=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yu.apply(this,arguments)}function bu(e,t){if(e==null)return{};var n=xu(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function xu(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Su=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=bu(e,[`color`,`size`]);return q.createElement(`svg`,yu({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`polyline`,{points:`9 18 15 12 9 6`}))});Su.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Su.displayName=`ChevronRight`;function Cu(){return Cu=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Cu.apply(this,arguments)}function wu(e,t){if(e==null)return{};var n=Tu(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Tu(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Eu=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=wu(e,[`color`,`size`]);return q.createElement(`svg`,Cu({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`polyline`,{points:`18 15 12 9 6 15`}))});Eu.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Eu.displayName=`ChevronUp`;function Du(){return Du=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Du.apply(this,arguments)}function Ou(e,t){if(e==null)return{};var n=ku(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ku(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Au=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Ou(e,[`color`,`size`]);return q.createElement(`svg`,Du({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`}),q.createElement(`rect`,{x:`8`,y:`2`,width:`8`,height:`4`,rx:`1`,ry:`1`}))});Au.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Au.displayName=`Clipboard`;function ju(){return ju=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ju.apply(this,arguments)}function Mu(e,t){if(e==null)return{};var n=Nu(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Nu(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Pu=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Mu(e,[`color`,`size`]);return q.createElement(`svg`,ju({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`polyline`,{points:`16 18 22 12 16 6`}),q.createElement(`polyline`,{points:`8 6 2 12 8 18`}))});Pu.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Pu.displayName=`Code`;function Fu(){return Fu=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fu.apply(this,arguments)}function Iu(e,t){if(e==null)return{};var n=Lu(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Lu(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Ru=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Iu(e,[`color`,`size`]);return q.createElement(`svg`,Fu({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`circle`,{cx:`12`,cy:`12`,r:`10`}),q.createElement(`polygon`,{points:`16.24 7.76 14.12 14.12 7.76 16.24 9.88 9.88 16.24 7.76`}))});Ru.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Ru.displayName=`Compass`;function zu(){return zu=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zu.apply(this,arguments)}function Bu(e,t){if(e==null)return{};var n=Vu(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Vu(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Hu=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Bu(e,[`color`,`size`]);return q.createElement(`svg`,zu({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`rect`,{x:`9`,y:`9`,width:`13`,height:`13`,rx:`2`,ry:`2`}),q.createElement(`path`,{d:`M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1`}))});Hu.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Hu.displayName=`Copy`;function Uu(){return Uu=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Uu.apply(this,arguments)}function Wu(e,t){if(e==null)return{};var n=Gu(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Gu(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Ku=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Wu(e,[`color`,`size`]);return q.createElement(`svg`,Uu({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`polyline`,{points:`15 10 20 15 15 20`}),q.createElement(`path`,{d:`M4 4v7a4 4 0 0 0 4 4h12`}))});Ku.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Ku.displayName=`CornerDownRight`;function qu(){return qu=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qu.apply(this,arguments)}function Ju(e,t){if(e==null)return{};var n=Yu(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Yu(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Xu=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Ju(e,[`color`,`size`]);return q.createElement(`svg`,qu({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,ry:`2`}),q.createElement(`rect`,{x:`9`,y:`9`,width:`6`,height:`6`}),q.createElement(`line`,{x1:`9`,y1:`1`,x2:`9`,y2:`4`}),q.createElement(`line`,{x1:`15`,y1:`1`,x2:`15`,y2:`4`}),q.createElement(`line`,{x1:`9`,y1:`20`,x2:`9`,y2:`23`}),q.createElement(`line`,{x1:`15`,y1:`20`,x2:`15`,y2:`23`}),q.createElement(`line`,{x1:`20`,y1:`9`,x2:`23`,y2:`9`}),q.createElement(`line`,{x1:`20`,y1:`14`,x2:`23`,y2:`14`}),q.createElement(`line`,{x1:`1`,y1:`9`,x2:`4`,y2:`9`}),q.createElement(`line`,{x1:`1`,y1:`14`,x2:`4`,y2:`14`}))});Xu.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Xu.displayName=`Cpu`;function Zu(){return Zu=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zu.apply(this,arguments)}function Qu(e,t){if(e==null)return{};var n=$u(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $u(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var ed=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Qu(e,[`color`,`size`]);return q.createElement(`svg`,Zu({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`circle`,{cx:`12`,cy:`12`,r:`10`}),q.createElement(`line`,{x1:`22`,y1:`12`,x2:`18`,y2:`12`}),q.createElement(`line`,{x1:`6`,y1:`12`,x2:`2`,y2:`12`}),q.createElement(`line`,{x1:`12`,y1:`6`,x2:`12`,y2:`2`}),q.createElement(`line`,{x1:`12`,y1:`22`,x2:`12`,y2:`18`}))});ed.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},ed.displayName=`Crosshair`;function td(){return td=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},td.apply(this,arguments)}function nd(e,t){if(e==null)return{};var n=rd(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function rd(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var id=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=nd(e,[`color`,`size`]);return q.createElement(`svg`,td({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`path`,{d:`M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z`}))});id.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},id.displayName=`Edit2`;function ad(){return ad=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ad.apply(this,arguments)}function od(e,t){if(e==null)return{};var n=sd(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function sd(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var cd=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=od(e,[`color`,`size`]);return q.createElement(`svg`,ad({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`path`,{d:`M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`}),q.createElement(`path`,{d:`M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z`}))});cd.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},cd.displayName=`Edit`;function ld(){return ld=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ld.apply(this,arguments)}function ud(e,t){if(e==null)return{};var n=dd(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function dd(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var fd=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=ud(e,[`color`,`size`]);return q.createElement(`svg`,ld({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`}),q.createElement(`polyline`,{points:`15 3 21 3 21 9`}),q.createElement(`line`,{x1:`10`,y1:`14`,x2:`21`,y2:`3`}))});fd.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},fd.displayName=`ExternalLink`;function pd(){return pd=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pd.apply(this,arguments)}function md(e,t){if(e==null)return{};var n=hd(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function hd(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var gd=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=md(e,[`color`,`size`]);return q.createElement(`svg`,pd({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`path`,{d:`M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z`}),q.createElement(`circle`,{cx:`12`,cy:`12`,r:`3`}))});gd.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},gd.displayName=`Eye`;function _d(){return _d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_d.apply(this,arguments)}function vd(e,t){if(e==null)return{};var n=yd(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function yd(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var bd=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=vd(e,[`color`,`size`]);return q.createElement(`svg`,_d({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`path`,{d:`M20.24 12.24a6 6 0 0 0-8.49-8.49L5 10.5V19h8.5z`}),q.createElement(`line`,{x1:`16`,y1:`8`,x2:`2`,y2:`22`}),q.createElement(`line`,{x1:`17.5`,y1:`15`,x2:`9`,y2:`15`}))});bd.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},bd.displayName=`Feather`;function xd(){return xd=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xd.apply(this,arguments)}function Sd(e,t){if(e==null)return{};var n=Cd(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Cd(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var wd=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Sd(e,[`color`,`size`]);return q.createElement(`svg`,xd({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`path`,{d:`M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z`}),q.createElement(`polyline`,{points:`14 2 14 8 20 8`}),q.createElement(`line`,{x1:`12`,y1:`18`,x2:`12`,y2:`12`}),q.createElement(`line`,{x1:`9`,y1:`15`,x2:`15`,y2:`15`}))});wd.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},wd.displayName=`FilePlus`;function Td(){return Td=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Td.apply(this,arguments)}function Ed(e,t){if(e==null)return{};var n=Dd(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Dd(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Od=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Ed(e,[`color`,`size`]);return q.createElement(`svg`,Td({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`path`,{d:`M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z`}),q.createElement(`polyline`,{points:`14 2 14 8 20 8`}),q.createElement(`line`,{x1:`16`,y1:`13`,x2:`8`,y2:`13`}),q.createElement(`line`,{x1:`16`,y1:`17`,x2:`8`,y2:`17`}),q.createElement(`polyline`,{points:`10 9 9 9 8 9`}))});Od.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Od.displayName=`FileText`;function kd(){return kd=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kd.apply(this,arguments)}function Ad(e,t){if(e==null)return{};var n=jd(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function jd(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Md=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Ad(e,[`color`,`size`]);return q.createElement(`svg`,kd({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`path`,{d:`M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z`}),q.createElement(`line`,{x1:`4`,y1:`22`,x2:`4`,y2:`15`}))});Md.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Md.displayName=`Flag`;function Nd(){return Nd=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Nd.apply(this,arguments)}function Pd(e,t){if(e==null)return{};var n=Fd(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Fd(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Id=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Pd(e,[`color`,`size`]);return q.createElement(`svg`,Nd({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`path`,{d:`M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z`}))});Id.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Id.displayName=`Folder`;function Ld(){return Ld=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ld.apply(this,arguments)}function Rd(e,t){if(e==null)return{};var n=zd(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function zd(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Bd=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Rd(e,[`color`,`size`]);return q.createElement(`svg`,Ld({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`circle`,{cx:`12`,cy:`12`,r:`10`}),q.createElement(`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`}),q.createElement(`line`,{x1:`12`,y1:`17`,x2:`12.01`,y2:`17`}))});Bd.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Bd.displayName=`HelpCircle`;function Vd(){return Vd=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vd.apply(this,arguments)}function Hd(e,t){if(e==null)return{};var n=Ud(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ud(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Wd=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Hd(e,[`color`,`size`]);return q.createElement(`svg`,Vd({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,ry:`2`}),q.createElement(`circle`,{cx:`8.5`,cy:`8.5`,r:`1.5`}),q.createElement(`polyline`,{points:`21 15 16 10 5 21`}))});Wd.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Wd.displayName=`Image`;function Gd(){return Gd=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gd.apply(this,arguments)}function Kd(e,t){if(e==null)return{};var n=qd(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function qd(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Jd=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Kd(e,[`color`,`size`]);return q.createElement(`svg`,Gd({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`circle`,{cx:`12`,cy:`12`,r:`10`}),q.createElement(`line`,{x1:`12`,y1:`16`,x2:`12`,y2:`12`}),q.createElement(`line`,{x1:`12`,y1:`8`,x2:`12.01`,y2:`8`}))});Jd.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Jd.displayName=`Info`;function Yd(){return Yd=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yd.apply(this,arguments)}function Xd(e,t){if(e==null)return{};var n=Zd(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Zd(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Qd=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Xd(e,[`color`,`size`]);return q.createElement(`svg`,Yd({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`polygon`,{points:`12 2 2 7 12 12 22 7 12 2`}),q.createElement(`polyline`,{points:`2 17 12 22 22 17`}),q.createElement(`polyline`,{points:`2 12 12 17 22 12`}))});Qd.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Qd.displayName=`Layers`;function $d(){return $d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$d.apply(this,arguments)}function ef(e,t){if(e==null)return{};var n=tf(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function tf(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var nf=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=ef(e,[`color`,`size`]);return q.createElement(`svg`,$d({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`line`,{x1:`8`,y1:`6`,x2:`21`,y2:`6`}),q.createElement(`line`,{x1:`8`,y1:`12`,x2:`21`,y2:`12`}),q.createElement(`line`,{x1:`8`,y1:`18`,x2:`21`,y2:`18`}),q.createElement(`line`,{x1:`3`,y1:`6`,x2:`3.01`,y2:`6`}),q.createElement(`line`,{x1:`3`,y1:`12`,x2:`3.01`,y2:`12`}),q.createElement(`line`,{x1:`3`,y1:`18`,x2:`3.01`,y2:`18`}))});nf.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},nf.displayName=`List`;function rf(){return rf=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rf.apply(this,arguments)}function af(e,t){if(e==null)return{};var n=of(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function of(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var sf=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=af(e,[`color`,`size`]);return q.createElement(`svg`,rf({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`line`,{x1:`12`,y1:`2`,x2:`12`,y2:`6`}),q.createElement(`line`,{x1:`12`,y1:`18`,x2:`12`,y2:`22`}),q.createElement(`line`,{x1:`4.93`,y1:`4.93`,x2:`7.76`,y2:`7.76`}),q.createElement(`line`,{x1:`16.24`,y1:`16.24`,x2:`19.07`,y2:`19.07`}),q.createElement(`line`,{x1:`2`,y1:`12`,x2:`6`,y2:`12`}),q.createElement(`line`,{x1:`18`,y1:`12`,x2:`22`,y2:`12`}),q.createElement(`line`,{x1:`4.93`,y1:`19.07`,x2:`7.76`,y2:`16.24`}),q.createElement(`line`,{x1:`16.24`,y1:`7.76`,x2:`19.07`,y2:`4.93`}))});sf.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},sf.displayName=`Loader`;function cf(){return cf=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cf.apply(this,arguments)}function lf(e,t){if(e==null)return{};var n=uf(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function uf(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var df=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=lf(e,[`color`,`size`]);return q.createElement(`svg`,cf({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`rect`,{x:`3`,y:`11`,width:`18`,height:`11`,rx:`2`,ry:`2`}),q.createElement(`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`}))});df.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},df.displayName=`Lock`;function ff(){return ff=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ff.apply(this,arguments)}function pf(e,t){if(e==null)return{};var n=mf(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function mf(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var hf=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=pf(e,[`color`,`size`]);return q.createElement(`svg`,ff({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`path`,{d:`M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4`}),q.createElement(`polyline`,{points:`10 17 15 12 10 7`}),q.createElement(`line`,{x1:`15`,y1:`12`,x2:`3`,y2:`12`}))});hf.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},hf.displayName=`LogIn`;function gf(){return gf=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gf.apply(this,arguments)}function _f(e,t){if(e==null)return{};var n=vf(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function vf(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var yf=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=_f(e,[`color`,`size`]);return q.createElement(`svg`,gf({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`}),q.createElement(`polyline`,{points:`16 17 21 12 16 7`}),q.createElement(`line`,{x1:`21`,y1:`12`,x2:`9`,y2:`12`}))});yf.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},yf.displayName=`LogOut`;function bf(){return bf=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bf.apply(this,arguments)}function xf(e,t){if(e==null)return{};var n=Sf(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Sf(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Cf=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=xf(e,[`color`,`size`]);return q.createElement(`svg`,bf({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`polyline`,{points:`15 3 21 3 21 9`}),q.createElement(`polyline`,{points:`9 21 3 21 3 15`}),q.createElement(`line`,{x1:`21`,y1:`3`,x2:`14`,y2:`10`}),q.createElement(`line`,{x1:`3`,y1:`21`,x2:`10`,y2:`14`}))});Cf.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Cf.displayName=`Maximize2`;function wf(){return wf=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wf.apply(this,arguments)}function Tf(e,t){if(e==null)return{};var n=Ef(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ef(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Df=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Tf(e,[`color`,`size`]);return q.createElement(`svg`,wf({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`path`,{d:`M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z`}))});Df.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Df.displayName=`MessageCircle`;function Of(){return Of=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Of.apply(this,arguments)}function kf(e,t){if(e==null)return{};var n=Af(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Af(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var jf=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=kf(e,[`color`,`size`]);return q.createElement(`svg`,Of({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`path`,{d:`M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z`}))});jf.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},jf.displayName=`MessageSquare`;function Mf(){return Mf=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Mf.apply(this,arguments)}function Nf(e,t){if(e==null)return{};var n=Pf(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Pf(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Ff=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Nf(e,[`color`,`size`]);return q.createElement(`svg`,Mf({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`polyline`,{points:`4 14 10 14 10 20`}),q.createElement(`polyline`,{points:`20 10 14 10 14 4`}),q.createElement(`line`,{x1:`14`,y1:`10`,x2:`21`,y2:`3`}),q.createElement(`line`,{x1:`3`,y1:`21`,x2:`10`,y2:`14`}))});Ff.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Ff.displayName=`Minimize2`;function If(){return If=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},If.apply(this,arguments)}function Lf(e,t){if(e==null)return{};var n=Rf(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Rf(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var zf=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Lf(e,[`color`,`size`]);return q.createElement(`svg`,If({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`circle`,{cx:`12`,cy:`12`,r:`1`}),q.createElement(`circle`,{cx:`19`,cy:`12`,r:`1`}),q.createElement(`circle`,{cx:`5`,cy:`12`,r:`1`}))});zf.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},zf.displayName=`MoreHorizontal`;function Bf(){return Bf=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Bf.apply(this,arguments)}function Vf(e,t){if(e==null)return{};var n=Hf(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Hf(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Uf=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Vf(e,[`color`,`size`]);return q.createElement(`svg`,Bf({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`polyline`,{points:`5 9 2 12 5 15`}),q.createElement(`polyline`,{points:`9 5 12 2 15 5`}),q.createElement(`polyline`,{points:`15 19 12 22 9 19`}),q.createElement(`polyline`,{points:`19 9 22 12 19 15`}),q.createElement(`line`,{x1:`2`,y1:`12`,x2:`22`,y2:`12`}),q.createElement(`line`,{x1:`12`,y1:`2`,x2:`12`,y2:`22`}))});Uf.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Uf.displayName=`Move`;function Wf(){return Wf=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wf.apply(this,arguments)}function Gf(e,t){if(e==null)return{};var n=Kf(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Kf(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var qf=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Gf(e,[`color`,`size`]);return q.createElement(`svg`,Wf({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`polygon`,{points:`5 3 19 12 5 21 5 3`}))});qf.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},qf.displayName=`Play`;function Jf(){return Jf=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jf.apply(this,arguments)}function Yf(e,t){if(e==null)return{};var n=Xf(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Xf(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Zf=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Yf(e,[`color`,`size`]);return q.createElement(`svg`,Jf({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`line`,{x1:`12`,y1:`5`,x2:`12`,y2:`19`}),q.createElement(`line`,{x1:`5`,y1:`12`,x2:`19`,y2:`12`}))});Zf.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Zf.displayName=`Plus`;function Qf(){return Qf=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qf.apply(this,arguments)}function $f(e,t){if(e==null)return{};var n=ep(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ep(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var tp=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=$f(e,[`color`,`size`]);return q.createElement(`svg`,Qf({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`polyline`,{points:`23 4 23 10 17 10`}),q.createElement(`polyline`,{points:`1 20 1 14 7 14`}),q.createElement(`path`,{d:`M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15`}))});tp.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},tp.displayName=`RefreshCw`;function np(){return np=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},np.apply(this,arguments)}function rp(e,t){if(e==null)return{};var n=ip(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ip(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var ap=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=rp(e,[`color`,`size`]);return q.createElement(`svg`,np({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`polyline`,{points:`23 4 23 10 17 10`}),q.createElement(`path`,{d:`M20.49 15a9 9 0 1 1-2.12-9.36L23 10`}))});ap.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},ap.displayName=`RotateCw`;function op(){return op=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},op.apply(this,arguments)}function sp(e,t){if(e==null)return{};var n=cp(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function cp(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var lp=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=sp(e,[`color`,`size`]);return q.createElement(`svg`,op({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`circle`,{cx:`11`,cy:`11`,r:`8`}),q.createElement(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`}))});lp.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},lp.displayName=`Search`;function up(){return up=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},up.apply(this,arguments)}function dp(e,t){if(e==null)return{};var n=fp(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function fp(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var pp=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=dp(e,[`color`,`size`]);return q.createElement(`svg`,up({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`line`,{x1:`22`,y1:`2`,x2:`11`,y2:`13`}),q.createElement(`polygon`,{points:`22 2 15 22 11 13 2 9 22 2`}))});pp.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},pp.displayName=`Send`;function mp(){return mp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mp.apply(this,arguments)}function hp(e,t){if(e==null)return{};var n=gp(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function gp(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var _p=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=hp(e,[`color`,`size`]);return q.createElement(`svg`,mp({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`path`,{d:`M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z`}))});_p.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},_p.displayName=`Shield`;function vp(){return vp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vp.apply(this,arguments)}function yp(e,t){if(e==null)return{};var n=bp(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function bp(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var xp=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=yp(e,[`color`,`size`]);return q.createElement(`svg`,vp({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`line`,{x1:`4`,y1:`21`,x2:`4`,y2:`14`}),q.createElement(`line`,{x1:`4`,y1:`10`,x2:`4`,y2:`3`}),q.createElement(`line`,{x1:`12`,y1:`21`,x2:`12`,y2:`12`}),q.createElement(`line`,{x1:`12`,y1:`8`,x2:`12`,y2:`3`}),q.createElement(`line`,{x1:`20`,y1:`21`,x2:`20`,y2:`16`}),q.createElement(`line`,{x1:`20`,y1:`12`,x2:`20`,y2:`3`}),q.createElement(`line`,{x1:`1`,y1:`14`,x2:`7`,y2:`14`}),q.createElement(`line`,{x1:`9`,y1:`8`,x2:`15`,y2:`8`}),q.createElement(`line`,{x1:`17`,y1:`16`,x2:`23`,y2:`16`}))});xp.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},xp.displayName=`Sliders`;function Sp(){return Sp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sp.apply(this,arguments)}function Cp(e,t){if(e==null)return{};var n=wp(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function wp(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Tp=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Cp(e,[`color`,`size`]);return q.createElement(`svg`,Sp({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`path`,{d:`M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18`}))});Tp.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Tp.displayName=`Table`;function Ep(){return Ep=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ep.apply(this,arguments)}function Dp(e,t){if(e==null)return{};var n=Op(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Op(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var kp=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Dp(e,[`color`,`size`]);return q.createElement(`svg`,Ep({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z`}))});kp.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},kp.displayName=`Tool`;function Ap(){return Ap=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ap.apply(this,arguments)}function jp(e,t){if(e==null)return{};var n=Mp(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Mp(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Np=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=jp(e,[`color`,`size`]);return q.createElement(`svg`,Ap({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`polyline`,{points:`3 6 5 6 21 6`}),q.createElement(`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`}),q.createElement(`line`,{x1:`10`,y1:`11`,x2:`10`,y2:`17`}),q.createElement(`line`,{x1:`14`,y1:`11`,x2:`14`,y2:`17`}))});Np.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Np.displayName=`Trash2`;function Pp(){return Pp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pp.apply(this,arguments)}function Fp(e,t){if(e==null)return{};var n=Ip(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ip(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Lp=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Fp(e,[`color`,`size`]);return q.createElement(`svg`,Pp({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`path`,{d:`M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2`}),q.createElement(`circle`,{cx:`9`,cy:`7`,r:`4`}),q.createElement(`path`,{d:`M23 21v-2a4 4 0 0 0-3-3.87`}),q.createElement(`path`,{d:`M16 3.13a4 4 0 0 1 0 7.75`}))});Lp.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Lp.displayName=`Users`;function Rp(){return Rp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rp.apply(this,arguments)}function zp(e,t){if(e==null)return{};var n=Bp(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Bp(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Vp=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=zp(e,[`color`,`size`]);return q.createElement(`svg`,Rp({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`circle`,{cx:`12`,cy:`12`,r:`10`}),q.createElement(`line`,{x1:`15`,y1:`9`,x2:`9`,y2:`15`}),q.createElement(`line`,{x1:`9`,y1:`9`,x2:`15`,y2:`15`}))});Vp.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Vp.displayName=`XCircle`;function Hp(){return Hp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hp.apply(this,arguments)}function Up(e,t){if(e==null)return{};var n=Wp(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Wp(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Gp=(0,q.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Up(e,[`color`,`size`]);return q.createElement(`svg`,Hp({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),q.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),q.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`}))});Gp.propTypes={color:Y.default.string,size:Y.default.oneOfType([Y.default.string,Y.default.number])},Gp.displayName=`X`;var Kp=(e,t,n)=>Math.max(t,Math.min(n,e));function qp(e,t,n){e.preventDefault();let r=e.clientX,i=e.clientY,a=e=>t(e.clientX-r,e.clientY-i),o=()=>{window.removeEventListener(`pointermove`,a),window.removeEventListener(`pointerup`,o),window.removeEventListener(`pointercancel`,o),n?.()};window.addEventListener(`pointermove`,a),window.addEventListener(`pointerup`,o),window.addEventListener(`pointercancel`,o)}function Jp(e,t,n){let[r,i]=(0,q.useState)(()=>{try{let t=localStorage.getItem(e);if(t!==null){let e=JSON.parse(t);if(n(e))return e}}catch{}return t});return[r,(0,q.useCallback)(t=>{i(t);try{localStorage.setItem(e,JSON.stringify(t))}catch{}},[e])]}var Yp=e=>typeof e==`string`,Xp=e=>typeof e==`boolean`,Zp=e=>typeof e==`number`&&Number.isFinite(e);function Qp(e,t){let[n,r]=(0,q.useState)(e),[i,a]=(0,q.useState)(e);return(0,q.useEffect)(()=>{if(e){r(!0);let e=0,t=requestAnimationFrame(()=>{e=requestAnimationFrame(()=>a(!0))});return()=>{cancelAnimationFrame(t),cancelAnimationFrame(e)}}a(!1);let n=window.setTimeout(()=>r(!1),t);return()=>window.clearTimeout(n)},[e,t]),{mounted:n,shown:i}}function $p({open:e,children:t}){let{mounted:n,shown:r}=Qp(e,200);return n?(0,J.jsx)(`div`,{inert:!e,className:`grid transition-[grid-template-rows,opacity] duration-200 ease-out motion-reduce:transition-none ${r?`grid-rows-[1fr] opacity-100`:`grid-rows-[0fr] opacity-0`}`,children:(0,J.jsx)(`div`,{className:`min-h-0 overflow-hidden`,children:t})}):null}var em=Symbol.for(`yaml.alias`),tm=Symbol.for(`yaml.document`),nm=Symbol.for(`yaml.map`),rm=Symbol.for(`yaml.pair`),im=Symbol.for(`yaml.scalar`),am=Symbol.for(`yaml.seq`),om=Symbol.for(`yaml.node.type`),sm=e=>!!e&&typeof e==`object`&&e[om]===em,cm=e=>!!e&&typeof e==`object`&&e[om]===tm,lm=e=>!!e&&typeof e==`object`&&e[om]===nm,um=e=>!!e&&typeof e==`object`&&e[om]===rm,dm=e=>!!e&&typeof e==`object`&&e[om]===im,fm=e=>!!e&&typeof e==`object`&&e[om]===am;function pm(e){if(e&&typeof e==`object`)switch(e[om]){case nm:case am:return!0}return!1}function mm(e){if(e&&typeof e==`object`)switch(e[om]){case em:case nm:case im:case am:return!0}return!1}var hm=e=>(dm(e)||pm(e))&&!!e.anchor,gm=Symbol(`break visit`),_m=Symbol(`skip children`),vm=Symbol(`remove node`);function ym(e,t){let n=xm(t);cm(e)?bm(null,e.contents,n,Object.freeze([e]))===vm&&(e.contents=null):bm(null,e,n,Object.freeze([]))}ym.BREAK=gm,ym.SKIP=_m,ym.REMOVE=vm;function bm(e,t,n,r){let i=Sm(e,t,n,r);if(mm(i)||um(i))return Cm(e,r,i),bm(e,i,n,r);if(typeof i!=`symbol`){if(pm(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=bm(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===gm)return gm;else i===vm&&(t.items.splice(e,1),--e)}}else if(um(t)){r=Object.freeze(r.concat(t));let e=bm(`key`,t.key,n,r);if(e===gm)return gm;e===vm&&(t.key=null);let i=bm(`value`,t.value,n,r);if(i===gm)return gm;i===vm&&(t.value=null)}}return i}function xm(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 Sm(e,t,n,r){if(typeof n==`function`)return n(e,t,r);if(lm(t))return n.Map?.(e,t,r);if(fm(t))return n.Seq?.(e,t,r);if(um(t))return n.Pair?.(e,t,r);if(dm(t))return n.Scalar?.(e,t,r);if(sm(t))return n.Alias?.(e,t,r)}function Cm(e,t,n){let r=t[t.length-1];if(pm(r))r.items[e]=n;else if(um(r))e===`key`?r.key=n:r.value=n;else if(cm(r))r.contents=n;else{let e=sm(r)?`alias`:`scalar`;throw Error(`Cannot replace node with ${e} parent`)}}var wm={"!":`%21`,",":`%2C`,"[":`%5B`,"]":`%5D`,"{":`%7B`,"}":`%7D`},Tm=e=>e.replace(/[!,[\]{}]/g,e=>wm[e]),Em=class e{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,n)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case`1.1`:this.atNextDocument=!0;break;case`1.2`:this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:`1.2`},this.tags=Object.assign({},e.defaultTags)}return t}add(t,n){this.atNextDocument&&=(this.yaml={explicit:e.defaultYaml.explicit,version:`1.1`},this.tags=Object.assign({},e.defaultTags),!1);let r=t.trim().split(/[ \t]+/),i=r.shift();switch(i){case`%TAG`:{if(r.length!==2&&(n(0,`%TAG directive should contain exactly two parts`),r.length<2))return!1;let[e,t]=r;return this.tags[e]=t,!0}case`%YAML`:{if(this.yaml.explicit=!0,r.length!==1)return n(0,`%YAML directive should contain exactly one part`),!1;let[e]=r;if(e===`1.1`||e===`1.2`)return this.yaml.version=e,!0;{let t=/^\d+\.\d+$/.test(e);return n(6,`Unsupported YAML version ${e}`,t),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e===`!`)return`!`;if(e[0]!==`!`)return t(`Not a valid tag: ${e}`),null;if(e[1]===`<`){let n=e.slice(2,-1);return n===`!`||n===`!!`?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==`>`&&t(`Verbatim tags must end with a >`),n)}let[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);let i=this.tags[n];if(i)try{return i+decodeURIComponent(r)}catch(e){return t(String(e)),null}return n===`!`?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+Tm(e.substring(n.length));return e[0]===`!`?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||`1.2`}`]:[],n=Object.entries(this.tags),r;if(e&&n.length>0&&mm(e.contents)){let t={};ym(e.contents,(e,n)=>{mm(n)&&n.tag&&(t[n.tag]=!0)}),r=Object.keys(t)}else r=[];for(let[i,a]of n)i===`!!`&&a===`tag:yaml.org,2002:`||e&&!r.some(e=>e.startsWith(a))||t.push(`%TAG ${i} ${a}`);return t.join(`
|
|
11
11
|
`)}};Em.defaultYaml={explicit:!1,version:`1.2`},Em.defaultTags={"!!":`tag:yaml.org,2002:`};function Dm(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw Error(t)}return!0}function Om(e){let t=new Set;return ym(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function km(e,t){for(let n=1;;++n){let r=`${e}${n}`;if(!t.has(r))return r}}function Am(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??=Om(e);let a=km(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t==`object`&&t.anchor&&(dm(t.node)||pm(t.node)))t.node.anchor=t.anchor;else{let t=Error(`Failed to resolve repeated object (this should not happen)`);throw t.source=e,t}}},sourceObjects:r}}function jm(e,t,n,r){if(r&&typeof r==`object`){if(Array.isArray(r))for(let t=0,n=r.length;t<n;++t){let n=r[t],i=jm(e,r,String(t),n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}else if(r instanceof Map)for(let t of Array.from(r.keys())){let n=r.get(t),i=jm(e,r,t,n);i===void 0?r.delete(t):i!==n&&r.set(t,i)}else if(r instanceof Set)for(let t of Array.from(r)){let n=jm(e,r,t,t);n===void 0?r.delete(t):n!==t&&(r.delete(t),r.add(n))}else for(let[t,n]of Object.entries(r)){let i=jm(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}}return e.call(t,n,r)}function Mm(e,t,n){if(Array.isArray(e))return e.map((e,t)=>Mm(e,String(t),n));if(e&&typeof e.toJSON==`function`){if(!n||!hm(e))return e.toJSON(t,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=e=>{r.res=e,delete n.onCreate};let i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e==`bigint`&&!n?.keep?Number(e):e}var Nm=class{constructor(e){Object.defineProperty(this,om,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:r,reviver:i}={}){if(!cm(e))throw TypeError(`A document argument is required`);let a={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n==`number`?n:100},o=Mm(this,``,a);if(typeof r==`function`)for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i==`function`?jm(i,{"":o},``,o):o}},Pm=class extends Nm{constructor(e){super(em),this.source=e,Object.defineProperty(this,"tag",{set(){throw Error(`Alias nodes cannot have tags`)}})}resolve(e,t){if(t?.maxAliasCount===0)throw ReferenceError(`Alias resolution is disabled`);let n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],ym(e,{Node:(e,t)=>{(sm(t)||hm(t))&&n.push(t)}}),t&&(t.aliasResolveCache=n));let r;for(let e of n){if(e===this)break;e.anchor===this.source&&(r=e)}if(r&&t){let{anchors:e,doc:n,maxAliasCount:i}=t,a=e.get(r);if(a||=(Mm(r,null,t),e.get(r)),a?.res===void 0)throw ReferenceError(`This should not happen: Alias anchor was not resolved?`);if(i>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=Fm(n,r,e)),a.count*a.aliasCount>i))throw ReferenceError(`Excessive alias count indicates a resource exhaustion attack`)}return r}toJSON(e,t){if(!t)return{source:this.source};let n=this.resolve(t.doc,t);if(!n){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(e)}return t.anchors.get(n).res}toString(e,t,n){let r=`*${this.source}`;if(e){if(Dm(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(e)}if(e.implicitKey)return`${r} `}return r}};function Fm(e,t,n){if(sm(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}if(pm(t)){let r=0;for(let i of t.items){let t=Fm(e,i,n);t>r&&(r=t)}return r}if(um(t)){let r=Fm(e,t.key,n),i=Fm(e,t.value,n);return Math.max(r,i)}return 1}var Im=e=>!e||typeof e!=`function`&&typeof e!=`object`,Lm=class extends Nm{constructor(e){super(im),this.value=e}toJSON(e,t){return t?.keep?this.value:Mm(this.value,e,t)}toString(){return String(this.value)}};Lm.BLOCK_FOLDED=`BLOCK_FOLDED`,Lm.BLOCK_LITERAL=`BLOCK_LITERAL`,Lm.PLAIN=`PLAIN`,Lm.QUOTE_DOUBLE=`QUOTE_DOUBLE`,Lm.QUOTE_SINGLE=`QUOTE_SINGLE`;var Rm=`tag:yaml.org,2002:`;function zm(e,t,n){if(t){let e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw Error(`Tag ${t} not found`);return r}return n.find(t=>t.identify?.(e)&&!t.format)}function Bm(e,t,n){if(cm(e)&&(e=e.contents),mm(e))return e;if(um(e)){let t=n.schema[nm].createNode?.(n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<`u`&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:r,onAnchor:i,onTagObj:a,schema:o,sourceObjects:s}=n,c;if(r&&e&&typeof e==`object`){if(c=s.get(e),c)return c.anchor??(c.anchor=i(e)),new Pm(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith(`!!`)&&(t=Rm+t.slice(2));let l=zm(e,t,o.tags);if(!l){if(e&&typeof e.toJSON==`function`&&(e=e.toJSON()),!e||typeof e!=`object`){let t=new Lm(e);return c&&(c.node=t),t}l=e instanceof Map?o[nm]:Symbol.iterator in Object(e)?o[am]:o[nm]}a&&(a(l),delete n.onTagObj);let u=l?.createNode?l.createNode(n.schema,e,n):typeof l?.nodeClass?.from==`function`?l.nodeClass.from(n.schema,e,n):new Lm(e);return t?u.tag=t:l.default||(u.tag=l.tag),c&&(c.node=u),u}function Vm(e,t,n){let r=n;for(let e=t.length-1;e>=0;--e){let n=t[e];if(typeof n==`number`&&Number.isInteger(n)&&n>=0){let e=[];e[n]=r,r=e}else r=new Map([[n,r]])}return Bm(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error(`This should not happen, please report a bug.`)},schema:e,sourceObjects:new Map})}var Hm=e=>e==null||typeof e==`object`&&!!e[Symbol.iterator]().next().done,Um=class extends Nm{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(t=>mm(t)||um(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(Hm(e))this.add(t);else{let[n,...r]=e,i=this.get(n,!0);if(pm(i))i.addIn(r,t);else if(i===void 0&&this.schema)this.set(n,Vm(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}deleteIn(e){let[t,...n]=e;if(n.length===0)return this.delete(t);let r=this.get(t,!0);if(pm(r))return r.deleteIn(n);throw Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...r]=e,i=this.get(n,!0);return r.length===0?!t&&dm(i)?i.value:i:pm(i)?i.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!um(t))return!1;let n=t.value;return n==null||e&&dm(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(n.length===0)return this.has(t);let r=this.get(t,!0);return pm(r)?r.hasIn(n):!1}setIn(e,t){let[n,...r]=e;if(r.length===0)this.set(n,t);else{let e=this.get(n,!0);if(pm(e))e.setIn(r,t);else if(e===void 0&&this.schema)this.set(n,Vm(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}},Wm=e=>e.replace(/^(?!$)(?: $)?/gm,`#`);function Gm(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}var Km=(e,t,n)=>e.endsWith(`
|
|
12
12
|
`)?Gm(n,t):n.includes(`
|
|
13
13
|
`)?`
|
|
@@ -188,10 +188,10 @@ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\
|
|
|
188
188
|
`).split(`
|
|
189
189
|
`).map(e=>Math.ceil(e.length/a)).reduce((e,t)=>e+t,0)*i;return Math.min(o+30,window.innerHeight-50)})(e,u,r,i))}c(!s),f.current=window.setTimeout(()=>{l.current=!1,n||o(void 0)},t)}},[t,s,e,r,i]);return{contentRef:u,isAnimating:l.current,animateCollapse:m,maxHeight:a,collapsed:s,cssTransitionValue:p}})(l,g,B,c,k),{pathString:se,nodeData:H,path:ce,name:le,size:U,canEdit:ue,canDelete:de,canAdd:fe,canDrag:pe,error:me,setError:he,onError:ge,derivedValues:_e,buildKeyDisplayProps:ve}=HM({props:e,collapsed:ae}),{dragSourceProps:ye,getDropTargetProps:be,BottomDropTarget:xe,DropTargetPadding:W}=UM({canDrag:pe,canDelete:de,canDragOnto:p,canAddHere:m,path:ce,nodeData:H,onError:ge,translate:T}),Se=(0,q.useRef)(!B),{isEditing:Ce,isEditingKey:we,isPending:Te,isArray:Ee}=_e,De=(e=>{let t=(0,q.useRef)(e),n=!Object.is(t.current,e);return(0,q.useEffect)(()=>{t.current=e}),n})(h);(0,q.useEffect)(()=>{let e=z&&h(H)&&!Ce;Se.current=!e,oe(e),De&&s(null)},[h]),((e,t,n)=>{let{commands:r,version:i}=mM(),a=(0,q.useRef)(0);(0,q.useEffect)(()=>{if(i===a.current||(a.current=i,!r))return;let o;for(let t of r)hM(e,t)&&(o=t);o&&(o.collapsed||(t.current=!0),n(o.collapsed))},[i,r])})(ce,Se,z?oe:hj);let Oe=(0,q.useRef)(null),ke=(0,q.useCallback)(e=>R(t=>typeof e==`function`?e(t??k(l)):e),[l,k]),Ae=(0,q.useCallback)(()=>R(null),[]),je=(0,q.useMemo)(()=>Ce?te??k(l):null,[Ce,te,l,k]),Me=(0,q.useCallback)((e,t)=>{if(typeof C!=`function`)return C;let n=C(e,t);return n===void 0?null:n},[C]),Ne=(0,q.useCallback)(e=>w?typeof w==`function`?w(e):w:null,[w]),{CustomComponent:Pe,componentProps:Fe,CustomWrapperComponent:Ie,wrapperProps:Le={},showKey:Re=!0,showEditTools:ze=!0,showOnEdit:Be,showOnView:Ve,passOriginalNode:He}=D,G=dM(e=>e.active!==null&&Oj(e.active.path,ce));!G&&z||!ae||oe(!1);let Ue=SM(ce)||H.level===0,We=(0,q.useRef)(hj);if(!Ue&&!G)return null;let{visibleSize:Ge}=H,Ke=Array.isArray(l)?`array`:`object`,K=Ke===`array`?{open:`[`,close:`]`}:{open:`{`,close:`}`},qe=e=>{if(e.key===`Tab`&&!e.getModifierState(`Shift`)&&e.target===Oe.current){e.preventDefault();let t=Kj(Oe,` `);R(t)}else N(e,{objectConfirm:Ye,cancel:Qe})},Je=e=>{if(e.stopPropagation(),!z)return;let t=Vj(e);if(t&&M.collapseModifier.includes(t))return Se.current=!0,void s({collapsed:!ae,path:ce,includeChildren:!0});a(ce)||(Se.current=!0,ee&&ee({...H,fullData:L(),collapsed:!ae,includeChildren:!1}),oe(!ae))},Ye=(e,t)=>{let n=e!==void 0&&!bj(e),r=l;if(n)r=e;else if(te!==null)try{r=O(te)}catch{ge({code:`INVALID_JSON`,message:T(`ERROR_INVALID_JSON`,H)},te);return}he(null),i({op:`edit`,path:ce,value:r,onCommit:()=>{Ae(),t?.()}}).then(e=>{if(e?.status===`error`&&ge(e.error,r),e?.status===`error`||e?.status===`cancel`){let e=o().active;e?.phase===`editing`&&Dj(e.path,ce)||Ae()}})};We.current=Ye;let Xe=e=>Ye(e),Ze=ce.length>0?()=>{i({op:`delete`,path:ce,instant:!0}).then(e=>{e?.status===`error`&&ge(e.error,l)})}:void 0,Qe=()=>{r(),he(null),Ae()},$e=f===`when-collapsed`?ae:f===`when-collapsed-or-filtered`?ae||Ge!=null:f,et=!Ce&&ze,tt=(S||!Ee)&&Re&&le!==void 0,nt=Pe&&(Ce&&Be||!Ce&&Ve),rt=Object.entries(l).map(([e,t])=>[Ke===`array`?Number(e):e,t]);Ke===`object`&&x(rt,e=>e);let it=!Ce||!!Pe&&Be,at=()=>(0,J.jsxs)(`div`,{className:`jer-collection-text-edit`+(A?`-custom`:``),children:[A?(0,J.jsx)(A,{value:je??``,onChange:R,onKeyDown:e=>N(e,{objectConfirm:Ye,cancel:Qe})}):(0,J.jsx)(Bj,{textAreaRef:Oe,className:`jer-collection-text-area`,name:se,value:je??``,setValue:ke,onKeyDown:qe,styles:t(`input`,H)}),(0,J.jsx)(`div`,{className:`jer-collection-input-button-row`,children:(0,J.jsx)(IM,{onOk:Ye,onCancel:Qe,nodeData:H,translate:T,showIconTooltips:y,editConfirmRef:F})})]}),ot=Se.current?it?rt.map(([n,r],i)=>{let a={key:n,value:r,path:[...ce,n],level:ce.length+1,index:i,size:_j(r)?Object.keys(r).length:null,parentData:l,fullData:H.fullData},o=VM(E,a);return(0,J.jsx)(`div`,{className:`jer-collection-element`,style:t(`collectionElement`,a),children:_j(r)&&!o?.renderCollectionAsValue?(0,J.jsx)($M,{...e,data:r,parentData:l,nodeData:a,canDragOnto:ue,canAddHere:fe,customNodeData:o},n):(0,J.jsx)(qM,{...e,data:r,parentData:l,nodeData:a,canDragOnto:ue,canAddHere:fe,showLabel:Ke===`object`||S,customNodeData:o},n)},n)}):(0,J.jsx)(J.Fragment,{children:at()}):null,st=!!z&&ae&&!G;st||(Se.current=!0);let ct=T(ae?`TOOLTIP_EXPAND`:`TOOLTIP_COLLAPSE`,H),lt=()=>({...e,data:l,value:l,parentData:d,nodeData:H,setValue:Xe,handleEdit:Ye,handleCancel:Qe,onKeyDown:qe,isEditing:Ce,isPending:Te,setIsEditing:ue?()=>n(ce,{cancelOp:Ae,commitOp:e=>We.current(void 0,e)}):hj,getStyles:t,canDragOnto:ue,canAddHere:fe,canEdit:ue,keyboardCommon:{}}),ut=nt?(0,J.jsx)(Pe,{componentProps:Fe,...lt(),originalNode:He&&Ce?at():void 0,children:ot}):ot,dt=et&&(0,J.jsx)(FM,{startEdit:ue?()=>{Se.current=!0,n(ce,{cancelOp:Ae,commitOp:e=>We.current(void 0,e)})}:void 0,handleAdd:fe?e=>{s(null),oe(!1);let t=Me(H,e);if(Ke===`array`){let e=P.array?0:l.length,n=P.array?{insert:!0}:{};i({op:`add`,path:ce,key:e,value:t,options:n,instant:!0}).then(e=>{e?.status===`error`&&ge(e.error,t)});return}if(e in l)return ge({code:`KEY_EXISTS`,message:T(`ERROR_KEY_EXISTS`,H)},e),void r();let n=P.object?{insertBefore:0}:{};i({op:`add`,path:ce,key:e,value:t,options:n}).then(e=>{e?.status===`error`&&ge(e.error,t)})}:void 0,handleDelete:de?Ze:void 0,showClipboardButton:_,onCopy:v,type:Ke,nodeData:H,translate:T,customButtons:e.customButtons,handleEdit:Xe,canEdit:ue,keyboardControls:M,handleKeyboard:N,getNewKeyOptions:Ne,editConfirmRef:F,jsonStringify:k,showIconTooltips:y,Select:j}),ft=ve({handleCancel:Qe,getStyles:t,keyValueArray:rt,handleClick:I.includes(`property`)?Je:e=>e.stopPropagation()}),pt=(0,J.jsxs)(`div`,{className:`jer-component jer-collection-component`,style:{marginLeft:(ce.length===0?0:b/2)+`em`,...t(`collection`,H),position:`relative`},draggable:pe&&!Ce&&!we&&!G,...ye,...be(`above`),children:[z&&(0,J.jsx)(`div`,{className:`jer-clickzone`,style:{width:b/2+1+`em`,zIndex:10+2*H.level},onClick:I.includes(`left`)?Je:void 0}),!Ce&&xe,(0,J.jsx)(W,{position:`above`,nodeData:H}),z?(0,J.jsxs)(`div`,{className:`jer-collection-header-row`,style:{...t(`headerRow`,H),position:`relative`},onClick:I.includes(`header`)?Je:void 0,children:[(0,J.jsxs)(`div`,{className:`jer-collection-name`,children:[(0,J.jsx)(`button`,{type:`button`,className:`jer-collapse-icon jer-accordion-icon`+(ae?` jer-rotate-90`:``),style:{zIndex:11+2*H.level,transition:V},onClick:Je,tabIndex:-1,"aria-expanded":!ae,"aria-label":ct,title:y?ct:``,children:(0,J.jsx)(PM,{name:`collection`,nodeData:H})}),tt&&(0,J.jsx)(WM,{...ft}),!Ce&&(0,J.jsx)(`span`,{className:`jer-brackets jer-bracket-open`,style:t(`bracket`,H),children:K.open})]}),!1!==f&&!Ce&&(0,J.jsx)(`div`,{className:`jer-collection-item-count`+($e?` jer-visible`:` jer-hidden`),style:{...t(`itemCount`,H),transition:V,transitionBehavior:`allow-discrete`},children:Ge!=null&&Ge!==U?T(`ITEMS_FILTERED`,H,{visible:Ge,total:U}):U===1?T(`ITEM_SINGLE`,{...H,size:1},1):T(`ITEMS_MULTIPLE`,H,U)}),(0,J.jsx)(`div`,{className:`jer-brackets`+(st?` jer-visible`:` jer-hidden`),style:{...t(`bracket`,H),transition:V},children:K.close}),dt]}):Re?(0,J.jsxs)(`div`,{className:`jer-collection-header-row`,style:{...t(`headerRow`,H),position:`relative`},children:[(0,J.jsx)(WM,{...ft}),dt]}):(0,J.jsx)(J.Fragment,{}),(0,J.jsxs)(`div`,{className:`jer-collection-inner`,style:{overflowY:st||re?`clip`:`visible`,maxHeight:G?void 0:ie,...t(`collectionInner`,H),transition:`max-height ${V}`},ref:ne,children:[ut,(0,J.jsx)(`div`,{className:Ce?`jer-collection-error-row-edit`:`jer-collection-error-row`,children:me&&(0,J.jsx)(`span`,{className:`jer-error-slug`,style:t(`error`,H),children:me})}),!Ce&&z&&(0,J.jsx)(`div`,{className:`jer-brackets jer-bracket-outside`,style:t(`bracket`,H),children:K.close})]}),(0,J.jsx)(W,{position:`below`,nodeData:H})]});return Ie?(0,J.jsx)(Ie,{wrapperProps:Le,...lt(),children:pt}):pt},KM),eN=({options:e,value:t,defaultValue:n,onChange:r,placeholder:i,className:a,...o})=>(0,J.jsxs)(`div`,{className:`jer-select`,children:[(0,J.jsxs)(`select`,{className:a??`jer-select-inner`,onChange:e=>r(e.target.value),...o,...t===void 0?{defaultValue:n??``}:{value:t},children:[i!==void 0&&(0,J.jsx)(`option`,{value:``,disabled:!0,children:i}),e.map(e=>(0,J.jsx)(`option`,{value:e,children:e},e))]}),(0,J.jsx)(`span`,{className:`focus`})]}),tN=(e,t=``)=>{let{value:n}=e;if(n===null&&`null`.includes(t.toLowerCase()))return!0;switch(typeof n){case`string`:return n.toLowerCase().includes(t.toLowerCase());case`number`:return!!String(n).includes(t);case`boolean`:return n?`true`.includes(t.toLowerCase())||t===`1`:`false`.includes(t.toLowerCase())||t===`0`;default:return!1}},nN=({key:e,path:t},n=``)=>!!tN({value:e},n)||!!t.some(e=>tN({value:e},n)),rN={ITEM_SINGLE:`{{count}} item`,ITEMS_MULTIPLE:`{{count}} items`,ITEMS_FILTERED:`{{visible}} of {{total}} items`,KEY_NEW:`Enter new key`,KEY_SELECT:`Select key`,NO_KEY_OPTIONS:`No key options`,ERROR_KEY_EXISTS:`Key already exists`,ERROR_INVALID_JSON:`Invalid JSON`,ERROR_UPDATE:`Update unsuccessful`,ERROR_DELETE:`Delete unsuccessful`,ERROR_ADD:`Adding node unsuccessful`,ERROR_RENAME:`Rename unsuccessful`,ERROR_MOVE:`Move unsuccessful`,DEFAULT_NEW_KEY:`key`,SHOW_LESS:`(Show less)`,SHOW_MORE:`Show more`,EMPTY_STRING:`<empty string>`,TOOLTIP_COPY:`Copy to clipboard`,TOOLTIP_EDIT:`Edit`,TOOLTIP_DELETE:`Delete`,TOOLTIP_ADD:`Add`,TOOLTIP_OK:`OK`,TOOLTIP_CANCEL:`Cancel`,TOOLTIP_COLLAPSE:`Collapse`,TOOLTIP_EXPAND:`Expand`},iN=`:root,:host{--jer-select-border: #b6b6b6;--jer-select-focus: #777;--jer-select-arrow: #777;--jer-form-border: 1px solid #ededf0;--jer-form-border-focus: 1px solid #e2e2e2;--jer-highlight-color: #b3d8ff;--jer-icon-copy-color: #268bd2}.jer-visible{opacity:1}.jer-hidden{opacity:0}.jer-select select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:none;padding:0 1em 0 0;margin:0;font-family:inherit;font-size:.8em;color:#000;cursor:inherit;line-height:inherit;z-index:1;outline:none}select::-ms-expand{display:none}.jer-select{display:grid;grid-template-areas:"select";align-items:center;position:relative;min-width:12ch;max-width:15ch;border:1px solid var(--jer-select-border);border-radius:.25em;padding:.25em .5em;cursor:pointer;line-height:1.1;background-color:#fff;background-image:linear-gradient(to top,#f9f9f9,#fff 33%)}.jer-select select,.jer-select:after{grid-area:select}.jer-select:not(.jer-select--multiple):after{content:"";justify-self:end;width:.8em;height:.5em;background-color:var(--jer-select-arrow);clip-path:polygon(100% 0%,0 0%,50% 100%)}select:focus+.focus{position:absolute;inset:-1px;border:1px solid var(--jer-select-focus);border-radius:inherit}.jer-select-inner{width:100%;text-overflow:ellipsis}.jer-editor-container{position:relative;font-size:16px;line-height:1;padding:1em 1em 1em 2em;border-radius:.5em;text-align:left}.jer-editor-container textarea{color:var(--jer-input-color);border:var(--jer-form-border);border-radius:.3em;outline:none}.jer-editor-container textarea:focus{border:var(--jer-form-border-focus)}.jer-editor-container input{border:var(--jer-form-border);border-radius:.3em;outline:none;font-family:inherit}.jer-editor-container input:focus{border:var(--jer-form-border-focus)}.jer-editor-container ::selection{background-color:var(--jer-highlight-color)}.jer-collection-header-row,.jer-value-main-row{display:flex;min-height:1.7em;gap:.3em;align-items:center}.jer-collection-header-row{flex-wrap:wrap}.jer-value-main-row{gap:0}.jer-bracket-outside{padding-left:0}.jer-collection-item-count{display:none}.jer-collection-item-count.jer-visible{display:block}@starting-style{.jer-collection-item-count.jer-visible{opacity:0}}.jer-collapse-icon{position:absolute;left:-1.2em;top:50%;transform:translateY(-50%)}.jer-collapse-icon.jer-rotate-90{transform:translateY(-50%) rotate(-90deg)}.jer-collection-inner{position:relative}.jer-collection-text-edit,.jer-collection-text-edit-custom{display:flex;flex-direction:column;gap:.3em;align-items:flex-start;line-height:1.1em}.jer-collection-text-edit{width:fit-content}.jer-collection-text-area{box-sizing:content-box;resize:both;padding:.2em .5em 0;overflow:hidden;max-height:40em;line-height:1.25em;font-family:inherit;font-size:.85em}.jer-collection-input-button-row{display:flex;justify-content:flex-end;width:100%;font-size:150%;margin-top:.4em}.jer-collection-error-row-edit{position:absolute;bottom:.5em}.jer-error-slug{margin-left:1em}.jer-value-component{position:relative}.jer-value-and-buttons{display:flex;justify-content:flex-start;align-items:center;padding-left:.5em}.jer-value-error-row{position:absolute}.jer-value-string{line-height:1.3em;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word}.jer-string-expansion{cursor:pointer;opacity:.6;filter:saturate(50%)}.jer-string-expansion.jer-show-less{font-size:80%}.jer-hyperlink{text-decoration:underline}.jer-input-text{box-sizing:content-box;resize:none;margin:0;height:1.2em;padding:.25em .5em .2em;min-width:6em;overflow:hidden;line-height:1.2em;font-family:inherit;font-size:.9em}.jer-input-boolean{transform:scale(1.5);margin-left:.3em;margin-right:.3em}.jer-key-text{word-break:break-word;line-height:1.1em;white-space:pre-wrap}.jer-value-invalid{opacity:.5;font-style:italic}.jer-input-number{min-width:3em;font-size:90%}.jer-edit-buttons,.jer-confirm-buttons{display:flex;align-items:center;height:1em;margin-right:.2em}.jer-edit-buttons>button,.jer-confirm-buttons>button,button.jer-collapse-icon,button.jer-string-expansion{appearance:none;background:none;border:none;margin:0;padding:0;font:inherit;color:inherit;vertical-align:baseline;cursor:pointer}.jer-input-buttons{gap:.4em}.jer-edit-buttons{gap:.4em;margin-left:.5em;opacity:0}.jer-custom-button:empty{display:none}div.jer-custom-button{cursor:pointer}.jer-confirm-buttons{gap:.2em;margin-left:.4em}.jer-edit-buttons:hover{opacity:1;position:relative}.jer-collection-header-row:hover>.jer-edit-buttons{opacity:1}.jer-value-main-row:hover>.jer-edit-buttons{opacity:1}.jer-value-and-buttons:hover>.jer-edit-buttons{opacity:1}.jer-copy-pulse{position:relative;transition:.3s}.jer-copy-pulse:hover{opacity:.85;transition:.3s;transform:scale(1.2)}.jer-copy-pulse:after{content:"";display:block;position:absolute;border-radius:50%;left:0;top:0;width:100%;height:100%;opacity:0;transition:all .5s;box-shadow:0 0 15px 5px var(--jer-icon-copy-color)}.jer-copy-pulse:active:after{box-shadow:0 0 0 0 var(--jer-icon-copy-color);position:absolute;border-radius:4em;left:0;top:0;opacity:1;transition:0s}.jer-copy-pulse:active{top:.07em}.jer-icon:hover{opacity:.85;transition:.3s;transform:scale(1.2)}.jer-empty-string{font-style:italic;font-size:90%}.jer-drag-n-drop-padding{height:.5em;border:1px dashed #b4b4b4;border-radius:.3em}.jer-clickzone{position:absolute;left:-1em;top:1.2em;height:calc(100% - .8em)}`,aN=`data-jer-styles`,oN=(e,t)=>JSON.stringify(e,t,2),sN={edit:`ERROR_UPDATE`,add:`ERROR_ADD`,delete:`ERROR_DELETE`,rename:`ERROR_RENAME`,move:`ERROR_MOVE`},cN={edit:`UPDATE_ERROR`,add:`ADD_ERROR`,delete:`DELETE_ERROR`,rename:`RENAME_ERROR`,move:`MOVE_ERROR`},lN=e=>{let t=(0,q.useRef)(e);e&&(t.current=e);let n=(0,q.useRef)((...e)=>t.current(...e));return e?n.current:void 0},uN=[],dN=[`header`,`left`],fN={},pN={},mN={},hN=[],gN=({data:e,setData:t,buildNodeDataFromPathRef:n,commitRef:r,rootName:i=`root`,onUpdate:a=hj,onChange:o,onError:s,onEditEvent:c,showErrorMessages:l=!0,showClipboardButton:u=!0,onCopy:d,indent:f=2,collapse:p=3,collapseAnimationTime:m=300,showCollectionCount:h=`when-collapsed-or-filtered`,allowEdit:g=!0,allowDelete:_=!0,allowAdd:v=!0,allowTypeSelection:y=!0,allowDrag:b=!1,searchFilter:x,searchText:S,searchDebounceTime:C=350,sortKeys:w=!1,showArrayIndexes:T=!0,arrayIndexStart:E=0,showStringQuotes:D=!0,showIconTooltips:O=!1,defaultValue:k=null,newKeyOptions:A,minWidth:j=250,maxWidth:M=`min(600px, 90vw)`,baseFontSize:N,stringTruncateLength:P=250,translations:ee=fN,className:F,id:I,customText:L=pN,customNodeDefinitions:te=uN,customButtons:R=hN,jsonParse:z=JSON.parse,jsonStringify:B=oN,TextEditor:ne,Select:re=eN,errorDisplayTime:ie=2500,keyboardControls:ae=mN,editorRef:oe,insertAtTop:V=!1,onCollapse:se,collapseClickZones:H=dN})=>{let{getStyles:ce,cssVars:le}=rM(),{open:U,cancel:ue,getSnapshot:de}=uM(),fe=(0,q.useMemo)(()=>yN(p),[p]),pe=(0,q.useMemo)(()=>((e,t)=>(n,r,i)=>((e,t,n,r,i)=>{if(t[r]){let e=t[r](n);if(e!==null)return e}let a=r in e?e[r]:rN[r];if(i!==void 0){let e=vj(i)?i:{count:i};for(let[t,n]of Object.entries(e))a=a?.replace(`{{${t}}}`,String(n))}return a})(e,t,r,n,i))(ee,L),[ee,L]),[me,he]=(0,q.useState)(S),ge=(0,q.useRef)(null);(0,q.useEffect)(()=>{ue();let e=setTimeout(()=>he(S),C);return()=>clearTimeout(e)},[S,C]);let _e=Rj(e,[],i),ve=(0,q.useRef)(e);ve.current=e;let ye=(0,q.useRef)(t);ye.current=t;let be=(0,q.useRef)(pe);be.current=pe;let xe=(0,q.useRef)(_e);xe.current=_e;let W=(0,q.useRef)(a);W.current=a;let Se=(0,q.useRef)(i);Se.current=i;let Ce=(0,q.useRef)(void 0),we=(0,q.useCallback)(()=>ve.current,[]),Te=lN(o),Ee=lN(s),De=lN(se),Oe=lN(c),ke=lN(d),Ae=(0,q.useCallback)(e=>{ve.current=e,ye.current(e)},[]),je=(0,q.useCallback)((e,t)=>{Ae(vN(ve.current,e,t,`update`).newData)},[Ae]),Me=(0,q.useCallback)(e=>{let t=ve.current,n=Se.current,r=Ce.current,i=Ae,{op:a,path:o}=e;switch(a){case`edit`:{let{newData:a,currentValue:s,newValue:c}=vN(t,o,e.value,`update`),l=Rj(t,o,n,r);return{input:{...l,newData:a,event:`edit`,newValue:c},nodeData:l,isNoOp:s===c,apply:()=>i(a),revert:()=>i(vN(ve.current,o,s,`update`).newData)}}case`delete`:{let{newData:e,currentValue:a}=vN(t,o,``,`delete`),s=Rj(t,o,n,r);return{input:{...s,newData:e,event:`delete`},nodeData:s,isNoOp:!1,apply:()=>i(e),revert:()=>i(vN(ve.current,o,a,`add`,{insert:!0,insertBefore:s.index}).newData)}}case`add`:{let a=[...o,e.key],{newData:s,newValue:c}=vN(t,a,e.value,`add`,e.options),l=Rj(s,a,n,r);return{input:{...l,value:void 0,size:null,parentData:Ij(t,o)??null,fullData:t,newData:s,event:`add`,newValue:c},nodeData:l,isNoOp:!1,apply:()=>i(s),revert:()=>i(vN(ve.current,a,``,`delete`).newData)}}case`rename`:{let a=o.slice(0,-1),s=o[o.length-1],{newKey:c}=e,l=Ij(t,a),{newData:u}=vN(t,a,Object.fromEntries(Object.entries(l).map(([e,t])=>e===s?[c,t]:[e,t])),`update`),d=Rj(t,o,n,r);return{input:{...d,newData:u,event:`rename`,newKey:c},nodeData:d,isNoOp:s===c,apply:()=>i(u),revert:()=>i(vN(ve.current,a,l,`update`).newData),extra:{oldKey:s,newKey:c}}}case`move`:{let a=o,{path:s,position:c}=e.to,l=t,{newData:u,currentValue:d}=vN(t,a,``,`delete`),f=a.slice(-1)[0],p=s.slice(0,-1),m=s.slice(-1)[0],h=typeof m==`number`?c===`above`?m:m+1:typeof f==`number`?`arr_${f}`:f;a.slice(0,-1).join(`.`)===s.slice(0,-1).join(`.`)&&typeof f==`number`&&typeof h==`number`&&f<h&&--h;let g=typeof h==`number`?{insert:!0}:c===`above`?{insertBefore:m}:{insertAfter:m},_=[...p,h],{newData:v}=vN(u,_,d,`add`,g),y=Rj(t,a,n,r);return{input:{...y,newData:v,event:`move`,newPath:_},nodeData:y,isNoOp:!1,apply:()=>i(v),revert:()=>i(l)}}}},[Ae]),Ne=(0,q.useCallback)((e,t)=>{let n=cN[e.event],r=()=>be.current(sN[e.event],xe.current),i=e=>{let t=e instanceof Error&&e.message?e.message:typeof e==`string`&&e?e:r();return{status:`error`,error:{code:n,message:t}}},a=t=>{if(!1===t)return{status:`error`,error:{code:n,message:r()}};if(t===null)return{status:`cancel`};if(t&&typeof t==`object`){if(t.error!==void 0)return typeof t.error==`string`?{status:`error`,error:{code:n,message:t.error}}:{status:`error`,error:t.error};let r=t.data!==void 0,i=t.value!==void 0;if(r&&i&&console.warn(`json-edit-react: onUpdate returned both { value } and { data }; { data } (whole-document) takes precedence and { value } is ignored.`),r)return{status:`override`,value:t.data,path:[]};if(i&&(e.event===`edit`||e.event===`add`))return{status:`override`,value:t.value,path:e.path}}return{status:`commit`}},o;try{o=W.current(e,t)}catch(e){return i(e)}return yj(o)?o.then(a,i):a(o)},[]);r.current=(0,q.useMemo)(()=>({runUpdate:a===hj?void 0:Ne,buildCommit:Me,applyValue:je}),[Ne,Me,je,a]);let Pe=(0,q.useMemo)(()=>yN(g),[g]),Fe=(0,q.useMemo)(()=>yN(_),[_]),Ie=(0,q.useMemo)(()=>yN(v),[v]),Le=(0,q.useMemo)(()=>yN(b),[b]),Re=(0,q.useMemo)(()=>bN(x),[x]),ze=(0,q.useMemo)(()=>((e,t,n)=>{if(!t&&!n)return null;let r=new Set,i=new Map,a=t??tN,o=n??``,s=e=>{let t=a(e,o);if(_j(e.value)){let n=0,r=Array.isArray(e.value),a=Object.entries(e.value);for(let[i,o]of a){let a=r?Number(i):i,c={key:a,path:[...e.path,a],level:e.level+1,index:n,value:o,size:_j(o)?Object.keys(o).length:null,parentData:e.value,fullData:e.fullData};s(c)&&(t=!0,n++)}i.set(Ej(e.path),n)}return t&&r.add(Ej(e.path)),t};return s(e),{visiblePaths:r,visibleChildCounts:i}})(_e,Re,me),[e,me,Re,i]),Be=(0,q.useMemo)(()=>(e=>{let t={...Wj};for(let n of Object.keys(Wj)){let r=n,i=e[r];if(i===void 0)continue;let a=n===`clipboardModifier`||n===`collapseModifier`;t[r]=i===null?a?[]:null:a?gj(i):typeof i==`string`?{key:i}:i}return Gj.forEach(n=>{e[n]===void 0&&e.confirm!==void 0&&(t[n]=t.confirm)}),t})(ae),[ae]),Ve=(0,q.useCallback)((e,t)=>((e,t,n)=>{for(let[r,i]of Object.entries(t))if(Hj(n,e[r],r)){n.preventDefault(),i();break}})(Be,t,e),[Be]),He=(0,q.useMemo)(()=>{let e=xN(te,`stringifyReplacer`);return t=>B(t,e)},[te,B]),G=(0,q.useMemo)(()=>{let e=xN(te,`parseReviver`);return t=>Sj(z(t,e))},[te,z]),Ue=(0,q.useRef)(null),{setCollapseState:We}=mM(),Ge=(0,q.useCallback)((e,t)=>{!1!==w&&(typeof w==`function`?e.sort((e,n)=>w(t(e),t(n))):e.sort((e,n)=>{let r=t(e)[0],i=t(n)[0];return r<i?-1:+(r>i)}))},[w]);Ce.current=Ge,n.current=(0,q.useCallback)(e=>Rj(we(),e,Se.current,Ce.current),[we]),(0,q.useImperativeHandle)(oe,()=>{let e=Symbol(`path-missing`);return{collapse:e=>We(e),startEdit:({path:t,overrideRestrictions:n=!1})=>Ij(we(),t,e)===e?`PATH_NOT_FOUND`:n||Pe(Rj(we(),t,i,Ge))?(U(t,{force:!0}),!0):`RESTRICTED`,confirm:()=>{Ue.current&&(Ue.current.click(),de().active?.phase!==`editing`&&ue())},cancel:()=>ue()}},[We,U,ue,de,Pe,we,i,Ge]);let Ke=VM(te,_e),K={mainContainerRef:ge,name:i,nodeData:_e,getLatestData:we,onChange:Te,onError:Ee,onEditEvent:Oe,showErrorMessages:l,showCollectionCount:h,collapseFilter:fe,collapseAnimationTime:m,allowEditFilter:Pe,allowDeleteFilter:Fe,allowAddFilter:Ie,allowTypeSelection:y,allowDragFilter:Le,canDragOnto:!1,canAddHere:!1,showClipboardButton:u,onCopy:ke,sortKeys:w,sort:Ge,showArrayIndexes:T,arrayIndexStart:E,showStringQuotes:D,showIconTooltips:O,indent:f,defaultValue:k,newKeyOptions:A,stringTruncateLength:P,translate:pe,customNodeDefinitions:te,customNodeData:Ke,customButtons:R,parentData:null,jsonParse:G,jsonStringify:He,TextEditor:ne,Select:re,errorDisplayTime:ie,handleKeyboard:Ve,keyboardControls:Be,insertAtTop:(0,q.useMemo)(()=>({object:!0===V||V===`object`,array:!0===V||V===`array`}),[V]),onCollapse:De,editConfirmRef:Ue,collapseClickZones:H},qe={...ce(`container`,_e),...le,minWidth:j,maxWidth:M};return qe.fontSize=N??qe.fontSize,(0,J.jsx)(`div`,{id:I,ref:ge,className:`jer-editor-container ${F??``}`,style:qe,children:(0,J.jsx)(bM,{value:ze,children:_j(e)&&!Ke.renderCollectionAsValue?(0,J.jsx)($M,{data:e,...K}):(0,J.jsx)(qM,{data:e,showLabel:!0,...K})})})};function _N(e){(0,q.useInsertionEffect)(()=>{(()=>{if(typeof document>`u`)return;let e=document.head.querySelector(`style[${aN}]`);if(e)return void(e.textContent!==iN&&(e.textContent=iN));let t=document.createElement(`style`);t.setAttribute(aN,``),t.textContent=iN,document.head.appendChild(t)})()},[]);let t=(0,q.useRef)(void 0),n=(0,q.useRef)(void 0),r=e;return(0,J.jsx)(nM,{theme:r.theme??Zj,children:(0,J.jsx)(vM,{onEditEvent:r.onEditEvent,onCollapse:r.onCollapse,buildNodeDataFromPathRef:t,commitRef:n,children:(0,J.jsx)(gN,{...r,buildNodeDataFromPathRef:t,commitRef:n})})})}var vN=(e,t,n,r,i={})=>{if(t.length===0)return{currentData:e,newData:n,currentValue:e,newValue:n};let a={remove:r===`delete`,...i},o=r===`add`?void 0:Ij(e,t);return{currentData:e,newData:Mj(e,t,n,a),currentValue:o,newValue:r===`delete`?void 0:n}},yN=e=>typeof e==`boolean`?()=>e:typeof e==`number`?({level:t})=>t>=e:e,bN=e=>{if(e!==void 0)return e===`value`?tN:e===`key`?nN:e===`all`?(e,t)=>tN(e,t)||nN(e,t):e},xN=(e,t)=>{let n=t===`stringifyReplacer`?[e=>e===void 0?Cj:e]:[];if(n.push(...e.map(e=>e[t]).filter(e=>!!e)),n.length!==0)return(e,t)=>{let r=t;for(let e of n)r=e(r);return r}};function SN(e){let{editorRef:t,...n}=e,r=(0,q.useRef)(null);return(0,q.useImperativeHandle)(t,()=>({collapse:e=>r.current?.collapse(e)}),[]),(0,J.jsx)(_N,{...n,editorRef:r,setData:hj,allowEdit:!1,allowAdd:!1,allowDelete:!1,allowDrag:!1})}var CN=`color-mix(in srgb, var(--color-paper) 45%, transparent)`,wN=`color-mix(in srgb, var(--color-paper) 60%, transparent)`,TN={styles:{container:{padding:0,paddingLeft:`1.4em`,backgroundColor:`transparent`,lineHeight:1.5,fontFamily:`inherit`},headerRow:{alignItems:`flex-start`},valueRow:{alignItems:`flex-start`},property:`var(--color-qing-glow)`,string:`var(--color-jade-glow)`,number:`var(--color-gold-glow)`,boolean:`var(--color-cheng)`,null:CN,bracket:CN,itemCount:CN,iconCollection:wN,iconCopy:wN},icons:{collection:{content:(0,J.jsx)(mu,{size:24,"aria-hidden":`true`}),scale:.85},copy:{content:(0,J.jsx)(Hu,{size:24,"aria-hidden":`true`}),scale:.86}}},EN=`inline-flex shrink-0 items-center justify-center rounded-sm border border-gold/60 px-1.5 py-0.5 text-[11px] text-gold transition-colors hover:bg-gold/15 focus-visible:ring-2 focus-visible:ring-gold/50 focus-visible:outline-none`;function DN({document:e}){let t=(0,q.useRef)(null),n=e=>t.current?.collapse({path:[],collapsed:e,includeChildren:!0});return(0,J.jsxs)(`div`,{children:[(0,J.jsxs)(`div`,{className:`mb-1 flex items-center gap-2`,children:[(0,J.jsx)(`span`,{className:`text-[10px] tracking-wider text-paper/30 uppercase`,children:`json`}),(0,J.jsx)(`button`,{type:`button`,className:EN,onClick:()=>n(!1),title:`Open every node`,children:`Expand nodes`}),(0,J.jsx)(`button`,{type:`button`,className:EN,onClick:()=>n(!0),title:`Close every node`,children:`Collapse nodes`}),(0,J.jsxs)(`span`,{className:`text-paper/25`,children:[e.nodes,` value`,e.nodes===1?``:`s`]})]}),(0,J.jsx)(SN,{data:e.value,theme:TN,editorRef:t,rootName:`result`,baseFontSize:12,indent:2,collapse:2,minWidth:0,maxWidth:`100%`,showCollectionCount:`when-collapsed`,showStringQuotes:!1,stringTruncateLength:200,showClipboardButton:!0,collapseClickZones:[`header`,`property`,`left`]})]})}var ON=e=>e?new Date(e).toTimeString().slice(0,8):``;function kN({text:e}){let t=hA.default.ansiToJson(e,{remove_empty:!0,use_classes:!1});return(0,J.jsx)(J.Fragment,{children:t.map((e,t)=>(0,J.jsx)(`span`,{style:xA(e),children:e.content},t))})}function AN({at:e}){return e?(0,J.jsx)(`span`,{className:`shrink-0 select-none tabular-nums text-paper/30`,children:ON(e)}):null}var jN=(0,q.memo)(function({chunk:e}){return(0,J.jsxs)(`div`,{className:`relative my-3`,children:[(0,J.jsx)(`div`,{className:`absolute top-0 right-0 z-10 rounded bg-dai-deep/85`,children:(0,J.jsx)(nb,{tone:`log`,iconOnly:!0,text:e.data,label:`Copy markdown`,title:`Copy this message as the Markdown the agent wrote`})}),(0,J.jsx)(`div`,{className:`prose prose-log max-w-none overflow-x-auto`,children:(0,J.jsx)(qE,{remarkPlugins:[mA],children:e.data})})]})}),MN=3,NN=e=>`rounded-sm border px-1 py-px text-[10px] uppercase transition-colors focus-visible:ring-2 focus-visible:ring-gold/50 focus-visible:outline-none ${e?`border-gold/60 text-gold`:`border-transparent text-paper/30 hover:text-paper/60`}`;function PN(e){let t=[];for(let n=0;n<e.length;n+=1){let r=e[n];if(r.kind===`tool`&&r.tool){let i=e[n+1],a=!r.tool.pending&&i?.kind===`result`?i:void 0;t.push({type:`call`,call:r,...a&&{result:a}}),a&&(n+=1)}else t.push({type:`chunk`,chunk:r})}return t}var FN=(0,q.memo)(function({call:e,result:t,open:n,wrap:r,onToggle:i}){let a=e.tool,o=a.pending?`…`:a.ok?`✓`:`✗`,s=(0,q.useMemo)(()=>t?vA(t.data):null,[t]),c=(0,q.useMemo)(()=>sj(s),[s]),l=(0,q.useMemo)(()=>sj(a.input),[a.input]),u=(0,q.useMemo)(()=>XA(a.name,a.input),[a.name,a.input]),[d,f]=(0,q.useState)(!1),p=u!==null&&!d,m=s?s.split(`
|
|
190
190
|
`):[],h=Math.max(0,m.length-MN),g=r?`break-words whitespace-pre-wrap`:`whitespace-pre`,_=(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(AN,{at:e.at}),(0,J.jsx)(`span`,{className:`shrink-0 ${a.pending?`text-paper/50`:a.ok?`text-jade-glow`:`text-seal-glow`}`,"aria-hidden":`true`,children:o}),(0,J.jsx)(`span`,{className:`shrink-0 ${a.ok?`text-qing-glow`:`text-seal-glow`}`,children:a.name}),a.detail?(0,J.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-paper/55`,children:a.detail}):null,(0,J.jsxs)(`span`,{className:`ml-auto flex shrink-0 items-center gap-2 pl-3 text-paper/30 tabular-nums`,children:[u?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`span`,{className:`text-jade-glow`,children:[`+`,u.added]}),(0,J.jsxs)(`span`,{className:`text-seal-soft`,children:[`-`,u.removed]})]}):null,s?(0,J.jsxs)(`span`,{children:[m.length,` line`,m.length===1?``:`s`]}):null,a.took?(0,J.jsx)(`span`,{children:a.took}):null,(0,J.jsx)(Su,{size:12,"aria-hidden":`true`,className:`transition-transform ${n?`rotate-90`:``}`})]})]});return(0,J.jsxs)(`div`,{className:`py-px`,children:[n?(0,J.jsx)(`button`,{type:`button`,"aria-expanded":!0,onClick:()=>i(e.seq),title:`Hide what this call ran and returned`,className:`flex w-full items-baseline gap-2 rounded px-1 text-left transition-colors hover:bg-paper/5 focus-visible:ring-2 focus-visible:ring-qing-glow/40 focus-visible:outline-none`,children:_}):(0,J.jsxs)(`button`,{type:`button`,"aria-expanded":!1,onClick:()=>i(e.seq),title:`Show what this call ran and returned`,className:`block w-full rounded px-1 text-left transition-colors hover:bg-paper/5 focus-visible:ring-2 focus-visible:ring-qing-glow/40 focus-visible:outline-none`,children:[(0,J.jsx)(`span`,{className:`flex items-baseline gap-2`,children:_}),s?(0,J.jsxs)(`span`,{className:`mt-0.5 ml-4 block border-l border-paper/15 pl-3 text-paper/55 ${g}`,children:[(0,J.jsx)(kN,{text:m.slice(0,MN).join(`
|
|
191
|
-
`)}),h>0?(0,J.jsxs)(`span`,{className:`block text-paper/30`,children:[`… `,h,` more line`,h===1?``:`s`]}):null]}):null]}),n?(0,J.jsxs)(`div`,{className:`mt-1 mb-2 ml-4 space-y-2 rounded bg-black/25 px-3 py-2`,children:[a.input?(0,J.jsxs)(`div`,{children:[(0,J.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,J.jsx)(`span`,{className:`text-[10px] tracking-wider text-paper/30 uppercase`,children:`input`}),(0,J.jsx)(nb,{tone:`log`,iconOnly:!0,text:p?u.text:l?l.pretty:a.input,label:`Copy input`,title:p?`Copy this edit as a diff`:`Copy what this call ran`}),u?(0,J.jsxs)(`span`,{className:`flex items-center gap-1`,role:`group`,"aria-label":`How the input is shown`,children:[(0,J.jsx)(`button`,{type:`button`,"aria-pressed":!d,onClick:()=>f(!1),className:NN(!d),title:`Show the change as a diff`,children:`diff`}),(0,J.jsx)(`button`,{type:`button`,"aria-pressed":d,onClick:()=>f(!0),className:NN(d),title:`Show the arguments the agent passed`,children:`raw`})]}):null]}),p?(0,J.jsx)(`div`,{className:`mt-1`,children:(0,J.jsx)(uj,{view:u,wrap:r})}):l?(0,J.jsx)(`div`,{className:`mt-1`,children:(0,J.jsx)(DN,{document:l})}):(0,J.jsx)(`pre`,{className:`mt-0.5 max-h-80 overflow-auto text-paper/75 ${g}`,children:(0,J.jsx)(kN,{text:a.input})})]}):null,s?(0,J.jsxs)(`div`,{children:[(0,J.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,J.jsx)(`span`,{className:`text-[10px] tracking-wider text-paper/30 uppercase`,children:`output`}),(0,J.jsx)(nb,{tone:`log`,iconOnly:!0,text:c?c.pretty:s,label:`Copy output`,title:`Copy what this call returned`})]}),c?(0,J.jsx)(`div`,{className:`mt-1`,children:(0,J.jsx)(DN,{document:c})}):(0,J.jsx)(`pre`,{className:`mt-0.5 max-h-80 overflow-auto text-paper/75 ${g}`,children:(0,J.jsx)(kN,{text:s})})]}):null,!a.input&&!s?(0,J.jsx)(`span`,{className:`text-paper/30`,children:`Nothing more to show.`}):null]}):null]})}),IN=(0,q.memo)(function({chunk:e}){if(!e.kind){let t=e.stream===`stderr`?`text-seal-soft`:e.stream===`system`?`text-gold`:``;return(0,J.jsx)(`span`,{className:t,children:(0,J.jsx)(kN,{text:e.data})})}if(e.kind===`markdown`)return(0,J.jsx)(jN,{chunk:e});if(e.kind===`reasoning`)return(0,J.jsxs)(`div`,{className:`my-1 flex gap-2 text-paper/45 italic`,children:[(0,J.jsx)(AN,{at:e.at}),(0,J.jsx)(`span`,{className:`shrink-0 select-none text-paper/25`,"aria-hidden":`true`,children:`~`}),(0,J.jsx)(`div`,{className:`min-w-0 whitespace-pre-wrap break-words`,children:e.data})]});let t=e.kind===`error`?`text-seal-glow`:e.kind===`hint`?`text-gold-glow`:`text-paper/40`;return(0,J.jsxs)(`div`,{className:`my-1 flex gap-2 ${t}`,children:[(0,J.jsx)(AN,{at:e.at}),(0,J.jsx)(`div`,{className:`min-w-0 whitespace-pre-wrap break-words`,children:e.data})]})});function LN(e){let t=e.map(e=>e.kind?e.kind===`result`?`${vA(e.data)}\n`:`${e.kind===`markdown`||e.kind===`reasoning`?``:`${ON(e.at)} `}${e.data}\n`:e.data).join(``);return hA.default.ansiToText(t)}function RN({chunks:e,wrap:t=!0,openCalls:n,onToggle:r,className:i=``}){let a=(0,q.useRef)(null),o=(0,q.useRef)(!0),s=(0,q.useMemo)(()=>PN(e),[e]);return(0,q.useEffect)(()=>{let e=a.current;e&&o.current&&(e.scrollTop=e.scrollHeight)},[e]),(0,J.jsxs)(`div`,{ref:a,onScroll:e=>{let t=e.currentTarget;o.current=t.scrollHeight-t.scrollTop-t.clientHeight<24},className:`paper-grain overflow-auto bg-dai-deep p-3 font-mono text-xs leading-5 text-paper ${t?`break-words whitespace-pre-wrap`:`whitespace-pre`} ${i}`,children:[e.length===0?(0,J.jsx)(`span`,{className:`text-ink-3`,children:`Waiting for output...`}):null,s.map(e=>e.type===`call`?(0,J.jsx)(FN,{call:e.call,result:e.result,open:n.has(e.call.seq),wrap:t,onToggle:r},e.call.seq):(0,J.jsx)(IN,{chunk:e.chunk},e.chunk.seq))]})}function zN(e){let t=Qv(e),n=t.questions.filter(e=>e.kind===`blocking`);return{questions:t.questions,blocking:n,markers:t.markers,markerAssertions:Fv(t)}}function BN(e,t){let n=Date.parse(e.startedAt)-2e3,r=e.endedAt?Date.parse(e.endedAt)+2e3:Date.now();return t.filter(e=>{let t=Date.parse(e.updatedAt);return Number.isFinite(t)&&t>=n&&t<=r}).sort((e,t)=>e.updatedAt.localeCompare(t.updatedAt))}function VN(e,t){if(!t)return!1;let n=Date.parse(t.updatedAt),r=Date.parse(e.startedAt)-2e3,i=e.endedAt?Date.parse(e.endedAt)+2e3:Date.now();return Number.isFinite(n)&&n>=r&&n<=i}function HN({job:e,openJob:t}){let{startJob:n}=xl(),[r,i]=(0,q.useState)(``),[a,o]=(0,q.useState)(!1),s=async r=>{o(!0);let a=await n({action:`continue`,jobId:e.id,reply:r});o(!1),a&&(i(``),t(a.id))};return(0,J.jsxs)(`div`,{className:`mt-2 space-y-2`,children:[(0,J.jsx)(`textarea`,{autoFocus:!0,value:r,onChange:e=>i(e.target.value),maxLength:kc,rows:3,spellCheck:!1,placeholder:`Your answers, in your own words. The agent writes them into the case file and goes on.`,"aria-label":`Your answers to the agent's questions`,className:`${Uy} w-full resize-y`}),(0,J.jsxs)(`div`,{className:`text-right text-xs text-ink-3`,children:[r.length,` / `,kc]}),(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center justify-end gap-2`,children:[(0,J.jsx)(`button`,{className:X(),disabled:a,onClick:()=>void s(Ac),title:`Keeps every suggested sentence and removes the questions, so the case is confirmed as it stands`,children:`Use the suggested defaults`}),(0,J.jsx)(`button`,{className:`${X(`primary`)} gap-1.5`,disabled:a||r.trim()===``,onClick:()=>void s(r),title:`Continue the same conversation with the same permissions`,children:`Send answers and continue`})]})]})}function UN({job:e,openJob:t,review:n,casePending:r,next:i,needsAnswers:a,origin:o=`exploration`}){let s=e.caseId??``,c=n.questions.length-n.blocking.length;return(0,J.jsxs)(`div`,{className:`rounded border border-line bg-card px-3 py-2`,children:[(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,J.jsx)(jf,{size:14,className:`shrink-0 text-ink-3`,"aria-hidden":`true`}),(0,J.jsx)(`span`,{className:`text-sm font-medium text-ink`,children:`Answer the open questions, or keep what the case says`}),r?(0,J.jsx)(Ny,{tone:`gray`,children:`loading`}):null,n.blocking.length>0?(0,J.jsxs)(Ny,{tone:`red`,children:[n.blocking.length,` must answer`]}):null,c>0?(0,J.jsxs)(Ny,{tone:`amber`,children:[c,` suggestion`,c===1?``:`s`]}):null]}),r?null:n.questions.length===0?(0,J.jsx)(`p`,{className:`mt-1 pl-6 text-xs text-ink-2`,children:`The agent stopped without leaving a question in the case file: read what it says above, then answer here.`}):(0,J.jsx)(`p`,{className:`mt-1 pl-6 text-xs text-ink-2`,children:o===`heal`?`The change left these open. Each one keeps what the case says above it: keep that text, or write your own answer.`:`The exploration could not settle these from the page. Each one keeps what the case says above it: keep that text, or write your own answer.`}),n.blocking.length>0?(0,J.jsx)(`ul`,{className:`mt-1.5 space-y-1 pl-6 text-xs text-ink`,children:n.blocking.map(e=>(0,J.jsxs)(`li`,{className:`flex items-start gap-1.5`,children:[(0,J.jsx)(Ml,{size:14,className:`mt-0.5 shrink-0 text-seal-deep`,"aria-hidden":`true`}),(0,J.jsxs)(`span`,{children:[e.question,e.parent?(0,J.jsxs)(`span`,{className:`block text-ink-2`,children:[`Deleting it confirms: `,e.parent.text]}):null]})]},`${e.line}-${e.question}`))}):null,i?(0,J.jsxs)(`div`,{className:`mt-2 flex flex-wrap items-center gap-2 pl-6 text-xs text-ink-2`,children:[(0,J.jsxs)(`span`,{children:[`Answers were sent in job `,(0,J.jsx)(`code`,{children:i.id}),` (`,i.status,`).`]}),(0,J.jsxs)(`button`,{className:`${X()} shrink-0 gap-1.5`,onClick:()=>t(i.id),title:`Open the run that carries your answers`,children:[`Open that job`,(0,J.jsx)(Bl,{size:14,"aria-hidden":`true`})]})]}):a?(0,J.jsx)(`div`,{className:`pl-6`,children:(0,J.jsx)(HN,{job:e,openJob:t})}):null,!r&&!i&&!a&&n.questions.length>0?(0,J.jsx)(`div`,{className:`mt-2 flex justify-end`,children:(0,J.jsxs)(Ks,{to:`/cases/${s}?review=questions`,className:`${X()} gap-1.5`,children:[`Answer in the case`,(0,J.jsx)(Bl,{size:14,"aria-hidden":`true`})]})}):null]})}function WN({caseId:e,markers:t,assertions:n,origin:r=`exploration`}){return(0,J.jsxs)(`div`,{className:`rounded border border-line bg-card px-3 py-2`,children:[(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,J.jsx)(gd,{size:14,className:`shrink-0 text-ink-3`,"aria-hidden":`true`}),(0,J.jsx)(`span`,{className:`text-sm font-medium text-ink`,children:r===`heal`?`Confirm what the change relies on`:`Lines that need your judgement`}),(0,J.jsxs)(Ny,{tone:n>0?`amber`:`blue`,children:[t,` marked`]}),n>0?(0,J.jsxs)(Ny,{tone:`amber`,children:[n,` change an assertion`]}):null]}),(0,J.jsxs)(`p`,{className:`mt-1 pl-6 text-xs text-ink-2`,children:[r===`heal`?`The change marked the lines it could not check by itself. `:``,n>0?`${n===1?`One line decides an assertion`:`${n} lines decide an assertion`}: a wrong wording there would pass silently, so a person settles it. The rest are notes the run checks by itself. `:`Nothing here can pass while wrong: the run checks these lines by itself. `,`Generating a spec does not wait for them; healing does.`]}),(0,J.jsx)(`div`,{className:`mt-2 flex justify-end`,children:(0,J.jsxs)(Ks,{to:`/cases/${e}?review=observations`,className:`${X()} gap-1.5`,children:[`Review them in the case`,(0,J.jsx)(Bl,{size:14,"aria-hidden":`true`})]})})]})}function GN({caseId:e,blocking:t}){return(0,J.jsxs)(`div`,{className:`rounded border border-line bg-card px-3 py-2`,children:[(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,J.jsx)(bd,{size:14,className:`shrink-0 text-ink-3`,"aria-hidden":`true`}),(0,J.jsx)(`span`,{className:`text-sm font-medium text-ink`,children:`Generate the spec`})]}),(0,J.jsxs)(`p`,{className:`mt-1 pl-6 text-xs text-ink-2`,children:[`Opens the case with Generate spec selected and marks its Run AI button; choose the environment there and run it.`,t>0?` The must-answer questions stay open, so answer them first for a complete spec.`:``]}),(0,J.jsx)(`div`,{className:`mt-2 flex justify-end`,children:(0,J.jsxs)(Ks,{to:`/cases/${e}?ai=gen-spec`,className:`${X(`primary`)} gap-1.5`,children:[(0,J.jsx)(Od,{size:14,"aria-hidden":`true`}),`Generate spec`]})})]})}function KN({caseId:e,what:t}){return(0,J.jsxs)(`div`,{className:`rounded border border-gold-deep/40 bg-gold-bg px-3 py-2`,children:[(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,J.jsx)(Ku,{size:14,className:`shrink-0 text-gold-deep`,"aria-hidden":`true`}),(0,J.jsx)(`span`,{className:`text-sm font-medium text-ink`,children:`Explore the case again`})]}),(0,J.jsxs)(`p`,{className:`mt-1 pl-6 text-xs text-ink-2`,children:[t===`questions`?`Answer the questions or keep what the case says first: an answer can change a step, a value or a target. `:t===`marks`?`Confirm the marked lines first. `:`Read the log above first: it says why healing stopped. `,`Then run Explore case, so the pages settle what changed. Only after that is the spec generated again (it asks before overwriting the existing one).`]}),(0,J.jsx)(`div`,{className:`mt-2 flex justify-end`,children:(0,J.jsxs)(Ks,{to:`/cases/${e}?ai=explore-case`,className:`${X(`primary`)} gap-1.5`,children:[(0,J.jsx)(lp,{size:14,"aria-hidden":`true`}),`Re-explore the case`]})})]})}function qN({job:e,openJob:t,review:n,casePending:r,readFailed:i,next:a}){let o=e.caseId??``,s=e.resultState===`needs-input`&&!a,c=!i&&(n.questions.length>0||s),l=!i&&n.markers.length>0;return(0,J.jsxs)(`div`,{className:`space-y-3`,children:[i?(0,J.jsxs)(`p`,{className:`text-sm text-seal-deep`,children:[`The case file could not be read: `,i]}):null,c||l?(0,J.jsx)(`p`,{className:`text-sm text-ink-2`,children:`The exploration is done. Finish these, then generate the spec.`}):null,i?null:(0,J.jsxs)(`div`,{className:`space-y-2`,children:[c?(0,J.jsx)(UN,{job:e,openJob:t,review:n,casePending:r,next:a,needsAnswers:s}):null,l?(0,J.jsx)(WN,{caseId:o,markers:n.markers.length,assertions:n.markerAssertions}):null,(0,J.jsx)(GN,{caseId:o,blocking:n.blocking.length})]})]})}function JN({job:e,openJob:t,review:n,casePending:r}){return(0,J.jsxs)(`div`,{className:`space-y-3`,children:[n.blocking.length>0?(0,J.jsx)(`ul`,{className:`space-y-2`,children:n.blocking.map(e=>(0,J.jsx)(`li`,{className:`rounded border border-seal/40 bg-seal-bg px-3 py-2 text-sm text-ink`,children:(0,J.jsxs)(`div`,{className:`flex items-start gap-1.5`,children:[(0,J.jsx)(Ml,{size:14,className:`mt-0.5 shrink-0 text-seal-deep`,"aria-hidden":`true`}),(0,J.jsxs)(`span`,{children:[e.question,e.parent?(0,J.jsxs)(`span`,{className:`block text-xs text-ink-2`,children:[`Deleting it confirms: `,e.parent.text]}):null]})]})},`${e.line}-${e.question}`))}):(0,J.jsx)(`p`,{className:`text-sm text-ink-2`,children:r?`Loading the questions...`:`No blocking question is left in the case file.`}),(0,J.jsx)(HN,{job:e,openJob:t})]})}function YN({created:e,loading:t}){return t?(0,J.jsx)(`p`,{className:`text-sm text-ink-2`,children:`Loading the new cases...`}):e.length===0?(0,J.jsx)(`p`,{className:`text-sm text-ink-2`,children:`The run did not leave a new case file. Open the case list to see what it wrote, or read its last lines above.`}):(0,J.jsxs)(`div`,{className:`space-y-3`,children:[(0,J.jsx)(`p`,{className:`text-sm text-ink-2`,children:`These are drafts: nobody has checked their steps against the real pages yet. Run Explore case on each one, so the AI opens the pages and writes down what it saw.`}),(0,J.jsx)(`ul`,{className:`divide-y divide-line rounded border border-line bg-card`,children:e.map(e=>(0,J.jsxs)(`li`,{className:`flex flex-wrap items-center gap-2 px-3 py-2`,children:[(0,J.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,J.jsx)(`div`,{className:`truncate font-mono text-xs text-ink`,children:e.id}),e.title?(0,J.jsx)(`div`,{className:`truncate text-xs text-ink-2`,children:e.title}):null]}),(0,J.jsxs)(Ks,{to:`/cases/${e.id}?ai=explore-case`,className:`${X()} shrink-0 gap-1.5`,title:`Open this case with Explore case selected`,children:[`Explore`,(0,J.jsx)(Bl,{size:14,"aria-hidden":`true`})]})]},e.id))})]})}function XN({caseId:e}){return(0,J.jsxs)(`div`,{className:`rounded border border-line bg-card px-3 py-2`,children:[(0,J.jsxs)(`p`,{className:`text-sm text-ink-2`,children:[`The spec is written but has not been run. The Run page opens with this case selected; if it has visual checks, tick `,(0,J.jsx)(`b`,{children:`Update baselines`}),` for the first run.`]}),(0,J.jsxs)(`div`,{className:`mt-2 flex flex-wrap justify-end gap-2`,children:[(0,J.jsxs)(Ks,{to:`/cases/${e}?view=spec`,className:`${X()} gap-1.5`,children:[(0,J.jsx)(Pu,{size:14,"aria-hidden":`true`}),`View the spec`]}),(0,J.jsxs)(Ks,{to:`/run`,state:{case:e},className:`${X(`primary`)} gap-1.5`,children:[(0,J.jsx)(qf,{size:14,"aria-hidden":`true`}),`Open Run tests`]})]})]})}function ZN({job:e,openJob:t,review:n,casePending:r,readFailed:i}){let a=e.caseId??``,o=!i&&n.questions.length>0,s=!i&&n.markers.length>0,c=o?`questions`:s?`marks`:`log`;return(0,J.jsxs)(`div`,{className:`space-y-3`,children:[i?(0,J.jsxs)(`p`,{className:`text-sm text-seal-deep`,children:[`The case file could not be read: `,i]}):null,(0,J.jsx)(`p`,{className:`text-sm text-ink-2`,children:o||s?`The case is the source of truth, so healing changed it first. Nothing is written into the spec from a case that still asks something: finish the points below, then explore the case again.`:`Healing stopped and left the decision to you. Its log above says what it needs; after that, explore the case again before the spec is generated.`}),i?null:(0,J.jsxs)(`div`,{className:`space-y-2`,children:[o?(0,J.jsx)(UN,{job:e,openJob:t,review:n,casePending:r,next:void 0,needsAnswers:!1,origin:`heal`}):null,s?(0,J.jsx)(WN,{caseId:a,markers:n.markers.length,assertions:n.markerAssertions,origin:`heal`}):null,(0,J.jsx)(KN,{caseId:a,what:c})]})]})}function QN({tone:e,icon:t,label:n,badges:r,actions:i,sheet:a,open:o,onOpen:s,onClose:c}){let l=e===`attention`?`border-t-2 border-gold-deep/40 bg-gold-bg`:`border-t border-line-mid bg-warm`,u=(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`span`,{className:`shrink-0 ${e===`attention`?`text-gold-deep`:`text-ink-3`}`,children:t}),(0,J.jsx)(`span`,{className:`text-sm font-medium ${e===`attention`?`text-gold-deep`:`text-ink`}`,children:n}),r]});return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`div`,{className:`flex shrink-0 flex-wrap items-center gap-2 px-3 py-2 ${l}`,children:[a?(0,J.jsx)(`button`,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":o,title:`Show the details`,onClick:s,className:`flex min-w-0 flex-1 cursor-pointer flex-wrap items-center gap-2 rounded px-1 py-0.5 text-left transition-colors hover:bg-line/40 focus-visible:ring-2 focus-visible:ring-theme/40 focus-visible:outline-none`,children:u}):(0,J.jsx)(`div`,{className:`flex min-w-0 flex-1 flex-wrap items-center gap-2 px-1 py-0.5`,children:u}),(0,J.jsx)(`div`,{className:`ml-auto flex shrink-0 flex-wrap items-center gap-2`,children:i})]}),o&&a?(0,J.jsx)(rb,{title:a.title,action:a.action,onClose:c,children:a.body}):null]})}function $N({job:e,openJob:t}){let[n,r]=(0,q.useState)(!1),i=wo();(0,q.useEffect)(()=>r(!1),[i.key]);let a=gl().data,o=a?Fc(a,e.id):void 0,s=e.caseId??``,c=e.kind===`ai`&&!e.aiCommand&&e.command.includes(`/make-case `),l=e.aiCommand===`explore-case`,u=e.aiCommand===`gen-spec`,d=e.aiCommand===`heal-spec`,f=e.resultState===`needs-input`&&!l&&!c&&!d&&s!==``,p=l||f||d,m=Vn({queryKey:ul.case(s),queryFn:()=>sc.case(s),enabled:s!==``&&p}),h=(0,q.useMemo)(()=>zN(m.data?.content??``),[m.data?.content]),g=ml(),_=(0,q.useMemo)(()=>c&&g.data?BN(e,g.data):[],[c,e,g.data]),v=g.isPending||g.isFetching&&_.length===0;if(e.status!==`succeeded`)return null;let y=g.data?.find(e=>e.id===s),b=h.questions.length>0||h.markers.length>0,x=e.resultState===`needs-input`||e.resultState===null&&VN(e,y)&&b;if(e.kind===`ai`&&!c&&e.resultState===null&&!x)return null;let S=l&&s!==``?`explore`:c?`make-cases`:f?`answers`:u&&s!==``?`gen-spec`:d&&s!==``?`healed`:null;if(S===null)return null;let C=p&&m.isError?m.error.message:null,w=S===`explore`&&e.resultState===`needs-input`&&!o,T=h.questions.length-h.blocking.length,E=!!C||w||h.questions.length>0||h.markers.length>0;if(S===`explore`)return(0,J.jsx)(QN,{tone:w||C||h.blocking.length>0?`attention`:`plain`,icon:(0,J.jsx)(nf,{size:16,"aria-hidden":`true`}),label:C?`The case could not be read`:w?`The agent needs your answers`:o?(0,J.jsxs)(J.Fragment,{children:[`Answers sent in job `,(0,J.jsx)(`code`,{children:o.id})]}):`What to do next`,badges:(0,J.jsxs)(J.Fragment,{children:[h.blocking.length>0?(0,J.jsxs)(Ny,{tone:`red`,children:[h.blocking.length,` must answer`]}):null,T>0?(0,J.jsxs)(Ny,{tone:`amber`,children:[T,` suggestion`,T===1?``:`s`]}):null,h.markers.length>0?(0,J.jsxs)(Ny,{tone:`blue`,children:[h.markers.length,` to confirm`]}):null]}),actions:(0,J.jsxs)(J.Fragment,{children:[o?(0,J.jsxs)(`button`,{className:`${X(`primary`)} gap-1.5`,onClick:()=>t(o.id),title:`Open the run that carries your answers`,children:[`Open that job`,(0,J.jsx)(Bl,{size:14,"aria-hidden":`true`})]}):w?(0,J.jsxs)(`button`,{className:`${X(`primary`)} gap-1.5`,onClick:()=>r(!0),children:[(0,J.jsx)(jf,{size:14,"aria-hidden":`true`}),`Answer`]}):C?null:(0,J.jsxs)(Ks,{to:`/cases/${s}?ai=gen-spec`,className:`${X(`primary`)} gap-1.5`,children:[(0,J.jsx)(Od,{size:14,"aria-hidden":`true`}),`Generate spec`]}),E&&!w?(0,J.jsx)(`button`,{className:X(),onClick:()=>r(!0),children:`Details`}):null]}),sheet:E?{title:w?`The agent needs your answers`:`What to do next`,action:(0,J.jsx)(Ks,{to:`/cases/${s}`,className:`text-xs font-normal text-ink-2 underline hover:text-ink`,children:`Open the case`}),body:(0,J.jsx)(qN,{job:e,openJob:t,review:h,casePending:m.isPending,readFailed:C,next:o})}:null,open:n,onOpen:()=>r(!0),onClose:()=>r(!1)});if(S===`make-cases`)return(0,J.jsx)(QN,{tone:`plain`,icon:(0,J.jsx)(wd,{size:16,"aria-hidden":`true`}),label:v?`Loading the new cases...`:_.length>0?`${_.length} new ${_.length===1?`case`:`cases`}`:`No new case found`,actions:(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`button`,{className:`${X(`primary`)} gap-1.5`,onClick:()=>r(!0),children:[(0,J.jsx)(nf,{size:14,"aria-hidden":`true`}),`Review`]}),(0,J.jsx)(Ks,{to:`/cases`,className:X(),children:`Open the case list`})]}),sheet:{title:`What to do next`,action:(0,J.jsx)(Ks,{to:`/cases`,className:`text-xs font-normal text-ink-2 underline hover:text-ink`,children:`Open the case list`}),body:(0,J.jsx)(YN,{created:_,loading:v})},open:n,onOpen:()=>r(!0),onClose:()=>r(!1)});if(S===`gen-spec`)return(0,J.jsx)(QN,{tone:`plain`,icon:(0,J.jsx)(Od,{size:16,"aria-hidden":`true`}),label:`Spec written, not run`,actions:(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(Ks,{to:`/run`,state:{case:s},className:`${X(`primary`)} gap-1.5`,children:[(0,J.jsx)(qf,{size:14,"aria-hidden":`true`}),`Open Run tests`]}),(0,J.jsxs)(Ks,{to:`/cases/${s}?view=spec`,className:`${X()} gap-1.5`,children:[(0,J.jsx)(Pu,{size:14,"aria-hidden":`true`}),`View spec`]}),(0,J.jsx)(`button`,{className:X(),onClick:()=>r(!0),children:`Details`})]}),sheet:{title:`What to do next`,action:(0,J.jsx)(Ks,{to:`/cases/${s}`,className:`text-xs font-normal text-ink-2 underline hover:text-ink`,children:`Open the case`}),body:(0,J.jsx)(XN,{caseId:s})},open:n,onOpen:()=>r(!0),onClose:()=>r(!1)});if(S===`answers`)return(0,J.jsx)(QN,{tone:o?`plain`:`attention`,icon:(0,J.jsx)(jf,{size:16,"aria-hidden":`true`}),label:o?(0,J.jsxs)(J.Fragment,{children:[`Answers sent in job `,(0,J.jsx)(`code`,{children:o.id})]}):`The agent needs your answers`,badges:o?null:(0,J.jsxs)(J.Fragment,{children:[h.blocking.length>0?(0,J.jsxs)(Ny,{tone:`red`,children:[h.blocking.length,` must answer`]}):null,(0,J.jsxs)(Ny,{tone:`gray`,children:[h.questions.length-h.blocking.length,` non-blocking`]})]}),actions:o?(0,J.jsxs)(`button`,{className:`${X(`primary`)} gap-1.5`,onClick:()=>t(o.id),children:[`Open that job`,(0,J.jsx)(Bl,{size:14,"aria-hidden":`true`})]}):(0,J.jsxs)(`button`,{className:`${X(`primary`)} gap-1.5`,onClick:()=>r(!0),children:[(0,J.jsx)(jf,{size:14,"aria-hidden":`true`}),`Answer`]}),sheet:o?null:{title:`The agent needs your answers`,action:(0,J.jsx)(Ks,{to:`/cases/${s}?review=questions`,className:`text-xs font-normal text-ink-2 underline hover:text-ink`,title:`The questions are also saved in the case file. There, answering one means keeping what the case says above it or writing your own.`,children:`Open the case`}),body:(0,J.jsx)(JN,{job:e,openJob:t,review:h,casePending:m.isPending})},open:n,onOpen:()=>r(!0),onClose:()=>r(!1)});let D=y?.hasSpec??!1;return x?(0,J.jsx)(QN,{tone:`attention`,icon:(0,J.jsx)(Ml,{size:16,"aria-hidden":`true`}),label:C?`The case could not be read`:b?`The case changed and needs your review`:`Healing stopped: the case needs your attention`,badges:(0,J.jsxs)(J.Fragment,{children:[h.blocking.length>0?(0,J.jsxs)(Ny,{tone:`red`,children:[h.blocking.length,` must answer`]}):null,T>0?(0,J.jsxs)(Ny,{tone:`amber`,children:[T,` suggestion`,T===1?``:`s`]}):null,h.markers.length>0?(0,J.jsxs)(Ny,{tone:`blue`,children:[h.markers.length,` to confirm`]}):null]}),actions:(0,J.jsxs)(J.Fragment,{children:[h.questions.length>0?(0,J.jsxs)(Ks,{to:`/cases/${s}?review=questions`,className:`${X(`primary`)} gap-1.5`,children:[(0,J.jsx)(jf,{size:14,"aria-hidden":`true`}),`Review the questions`]}):h.markers.length>0?(0,J.jsxs)(Ks,{to:`/cases/${s}?review=observations`,className:`${X(`primary`)} gap-1.5`,children:[(0,J.jsx)(gd,{size:14,"aria-hidden":`true`}),`Review the marked lines`]}):(0,J.jsxs)(Ks,{to:`/cases/${s}`,className:`${X(`primary`)} gap-1.5`,children:[`Open the case`,(0,J.jsx)(Bl,{size:14,"aria-hidden":`true`})]}),(0,J.jsxs)(Ks,{to:`/cases/${s}?ai=explore-case`,className:`${X()} gap-1.5`,children:[(0,J.jsx)(lp,{size:14,"aria-hidden":`true`}),`Re-explore`]}),(0,J.jsx)(`button`,{className:X(),onClick:()=>r(!0),children:`Details`})]}),sheet:{title:`Review the case, then explore it again`,action:(0,J.jsx)(Ks,{to:`/cases/${s}`,className:`text-xs font-normal text-ink-2 underline hover:text-ink`,children:`Open the case`}),body:(0,J.jsx)(ZN,{job:e,openJob:t,review:h,casePending:m.isPending,readFailed:C})},open:n,onOpen:()=>r(!0),onClose:()=>r(!1)}):(0,J.jsx)(QN,{tone:`plain`,icon:(0,J.jsx)(uu,{size:16,className:`text-jade-btn`,"aria-hidden":`true`}),label:`Healing is done: the case and the spec are up to date.`,actions:(0,J.jsxs)(J.Fragment,{children:[D?(0,J.jsxs)(Ks,{to:`/cases/${s}?view=spec`,className:`${X(`primary`)} gap-1.5`,children:[(0,J.jsx)(Pu,{size:14,"aria-hidden":`true`}),`View spec`]}):null,(0,J.jsxs)(Ks,{to:`/cases/${s}`,className:D?X():`${X(`primary`)} gap-1.5`,children:[`Open the case`,(0,J.jsx)(Bl,{size:14,"aria-hidden":`true`})]})]}),sheet:null,open:!1,onOpen:()=>r(!0),onClose:()=>r(!1)})}function eP({job:e,showOpenInTab:t=!1,openJob:n}){let{chunks:r,connected:i}=Ay(e.id),a=gl().data,o=hl().data,s=!!(a&&Fc(a,e.id)),c=e,l=Hn({mutationFn:()=>sc.cancelJob(e.id)}),u=Hn({mutationFn:t=>sc.sendInput(e.id,t)}),[d,f]=(0,q.useState)(!1),[p,m]=Jp(`asrun-ui.jobs.wrap`,!0,Xp),[h,g]=(0,q.useState)(()=>new Set),_=c.status===`running`,v=c.status===`interrupted`,y=(0,q.useMemo)(()=>r.filter(e=>e.kind===`tool`&&e.tool).map(e=>e.seq),[r]),b=y.length>0&&y.every(e=>h.has(e));(0,q.useEffect)(()=>g(new Set),[e.id]);let x=(0,q.useCallback)(e=>g(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),[]),S=c.kind===`run`&&c.reportId&&!_?[c.reportId,`${c.reportId}-baselines`].find(e=>o?.some(t=>t.id===e)):void 0;return(0,J.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col`,children:[(0,J.jsxs)(`div`,{className:`max-h-[45%] shrink-0 overflow-auto`,children:[(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 border-b border-line-mid bg-warm px-3 py-2`,children:[(0,J.jsx)(Hy,{status:c.status,needsInput:c.resultState===`needs-input`,missingResult:c.kind===`ai`&&!_&&!v&&c.resultState===null,awaitingUser:!!c.awaitingUser,answered:s}),c.continuesJobId?(0,J.jsxs)(`button`,{className:`inline-flex items-center gap-1 text-xs text-ink-2 underline hover:text-ink`,onClick:()=>n(c.continuesJobId),title:`This run goes on with the conversation of an earlier run`,children:[(0,J.jsx)(Ku,{size:12,"aria-hidden":`true`}),`Continues job `,c.continuesJobId]}):null,(0,J.jsx)(`span`,{className:`text-xs text-ink-2`,children:c.exitCode===null?c.signal?`signal ${c.signal}`:``:`exit code ${c.exitCode}`}),_&&!i?(0,J.jsx)(`span`,{className:`text-xs text-gold-deep`,children:`reconnecting...`}):null,(0,J.jsxs)(`div`,{className:`ml-auto flex flex-wrap items-center gap-2`,children:[y.length>0?(0,J.jsx)(`button`,{className:`${X()} shrink-0`,"aria-pressed":b,title:b?`Close every tool call again`:`Open every tool call of this run`,onClick:()=>g(b?new Set:new Set(y)),children:b?`Collapse all`:`Expand all`}):null,(0,J.jsxs)(`button`,{className:`${X()} shrink-0`,"aria-pressed":p,title:`Wrap long lines, or scroll them sideways`,onClick:()=>m(!p),children:[`Wrap lines: `,p?`on`:`off`]}),(0,J.jsx)(nb,{text:LN(r),label:`Copy log`,title:`Copy the output without colors`}),S?(0,J.jsxs)(`a`,{className:`${X()} gap-1.5`,href:`/reports/${S}`,title:`Open the report of this run`,children:[(0,J.jsx)(Od,{size:14,"aria-hidden":`true`}),`Go to the report`]}):null,t?(0,J.jsxs)(`a`,{className:`${X()} gap-1.5`,href:`/jobs/${e.id}`,target:`_blank`,rel:`noreferrer`,title:`Open this job in its own tab`,children:[(0,J.jsx)(fd,{size:14,"aria-hidden":`true`}),`Open in new tab`]}):null,_&&c.kind===`signin`?(0,J.jsx)(`button`,{className:X(`primary`),disabled:u.isPending,onClick:()=>u.mutate(`
|
|
192
|
-
`),title:`Press this after you logged in in the browser window that opened. The card in that window does the same.`,children:`I've logged in, save the session`}):null,v&&c.leftover?.state===`alive`?(0,J.jsx)(`button`,{className:X(`danger`),disabled:l.isPending,onClick:()=>l.mutate(),title:`End the process tree the previous UI server left behind: the agent, its browser and its MCP server.`,children:`Stop the leftover process`}):null,!_&&c.rerunable?(0,J.jsx)($y,{job:c,onStarted:n,disabledReason:c.leftover?.state===`alive`?`Stop the leftover process of this job first: it still holds the browser MCP server.`:void 0}):null,_?(0,J.jsx)(`button`,{className:X(`danger`),disabled:l.isPending,onClick:()=>l.mutate(),children:`Cancel`}):null]})]}),(0,J.jsxs)(`div`,{className:`flex items-start gap-2 border-b border-line-mid bg-warm px-3 py-1.5`,children:[(0,J.jsx)(`button`,{className:`min-w-0 flex-1 text-left`,onClick:()=>f(!d),title:d?`Show the command on one line`:`Show the whole command`,children:(0,J.jsx)(`code`,{className:`block text-xs text-ink ${d?`max-h-24 overflow-auto break-all whitespace-pre-wrap`:`truncate`}`,children:c.command})}),(0,J.jsx)(nb,{text:c.command,label:`Copy command`,title:`Copy the command`,iconOnly:!0})]}),v?(0,J.jsxs)(`p`,{className:`border-b border-gold/50 bg-gold-bg px-3 py-2 text-xs text-warn-ink`,children:[(0,J.jsx)(`b`,{children:`This job was interrupted when the UI server stopped.`}),` Its output ends at the last line the server received; the old process does not write to it any more.`,c.leftover?.state===`alive`?(0,J.jsxs)(J.Fragment,{children:[` `,`Its process (pid `,c.leftover.pid,`) is still running. Stop it before starting another AI run: it still holds the browser MCP server.`]}):null,c.leftover?.state===`unknown`?(0,J.jsxs)(J.Fragment,{children:[` `,`A process with its pid is running, but it could not be identified as this job, so it was not marked for stopping.`]}):null,c.leftover?.state===`stopped`?(0,J.jsx)(J.Fragment,{children:` The leftover process was stopped.`}):null]}):null,!_&&!v&&c.kind===`ai`&&c.resultState===null?(0,J.jsxs)(`p`,{className:`border-b border-gold/50 bg-gold-bg px-3 py-2 text-xs text-warn-ink`,children:[(0,J.jsx)(`b`,{children:`This run ended without a RESULT line`}),`, so whether it finished is unknown: read the log to see how far it got. A run that could not finish should end with `,(0,J.jsx)(`code`,{children:`RESULT: needs-input`}),`; if it proposed a plan and asked a question instead, nothing was written.`]}):null,_&&c.kind===`signin`?(0,J.jsxs)(`p`,{className:`border-b border-gold/50 bg-gold-bg px-3 py-2 text-xs text-warn-ink`,children:[`A browser window opened on your machine. Log in there (including 2FA), then press `,(0,J.jsx)(`b`,{children:`Done, save the session`}),` `,`on the card in that window. The button above does the same, if you would rather stay on this page.`]}):null]}),_&&c.awaitingUser?(0,J.jsxs)(`p`,{className:`border-b border-gold/50 bg-gold-bg px-3 py-2 text-xs text-warn-ink`,children:[(0,J.jsx)(`b`,{children:`Your turn in the browser window:`}),` `,c.awaitingUser.message??`do the step`,`. Press Done on the card (bottom-left of the page) when you finish.`]}):null,(0,J.jsx)(RN,{chunks:r,wrap:p,openCalls:h,onToggle:x,className:`min-h-0 flex-1`}),c.kind===`run`&&c.baselineCases&&c.baselineCases.length>0?(0,J.jsx)(tb,{caseIds:c.baselineCases,running:_}):null,(0,J.jsx)($N,{job:c,openJob:n})]})}var tP=360,nP=160,rP=256,iP=140,aP=640,oP=6,sP=28,cP=140,lP=()=>Math.max(nP,window.innerHeight-cP);function uP(){let{attention:e,drawerOpen:t,setDrawerOpen:n,drawerMaximized:r,setDrawerMaximized:i,selectedJobId:a,selectJob:o,startError:s,clearStartError:c}=xl(),l=gl(),[u,d]=Jp(`asrun-ui.jobs.height`,tP,Zp),[f,p]=Jp(`asrun-ui.jobs.list-width`,rP,Zp),[m,h]=Jp(`asrun-ui.jobs.list-hidden`,!1,Xp),[g,_]=(0,q.useState)(!1),v=l.data??[],y=v.find(e=>e.id===a)??null,b=v.filter(e=>e.status===`running`).length,x=t&&r;(0,q.useEffect)(()=>{if(!x)return;let e=e=>{e.key===`Escape`&&i(!1)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[x,i]);let S=Qp(t,200),C=Math.min(u,lP()),w=g?``:`transition-[flex-basis,max-height,width,opacity] duration-200 ease-out motion-reduce:transition-none`;return(0,J.jsxs)(`div`,{className:`relative flex flex-col border-t-2 border-ink bg-card shadow-[0_-6px_16px_-8px_color-mix(in_srgb,var(--theme)_40%,transparent)] transition-[flex-grow] duration-200 ease-out motion-reduce:transition-none ${x?`min-h-0 grow`:`shrink-0 grow-0`}`,children:[(0,J.jsxs)(`div`,{className:`relative flex items-center bg-dai-deep text-white`,children:[(0,J.jsxs)(`button`,{className:`group flex flex-1 cursor-pointer items-center gap-3 px-4 py-2 text-left text-sm transition-colors hover:bg-white/10`,onClick:()=>n(!t),"aria-expanded":t,title:t?`Collapse the jobs drawer`:`Expand the jobs drawer`,children:[(0,J.jsx)(`span`,{className:`eyebrow`,children:`Jobs`}),b>0?(0,J.jsxs)(`span`,{className:`font-medium text-qing-bg`,children:[b,` running`]}):(0,J.jsx)(`span`,{className:`text-white/70`,children:`idle`}),e.length>0?(0,J.jsxs)(`span`,{className:`rounded-sm bg-gold-bg px-2 py-0.5 text-xs font-bold text-gold-deep`,children:[e.length,` waiting for you`]}):null,(0,J.jsx)(`span`,{className:`ml-auto flex h-6 w-6 shrink-0 items-center justify-center rounded bg-white/15 transition-colors group-hover:bg-white/30`,"aria-hidden":`true`,children:(0,J.jsx)(Eu,{size:16,className:`transition-transform duration-200 motion-reduce:transition-none ${t?`rotate-180`:``}`})})]}),(0,J.jsx)(`span`,{className:`absolute inset-y-0 right-12 my-auto h-fit transition-opacity duration-200 motion-reduce:transition-none ${t?`opacity-100`:`invisible opacity-0`}`,children:(0,J.jsx)(`button`,{className:`${X(`info`)} shrink-0 gap-1.5`,onClick:()=>i(!r),tabIndex:t?0:-1,title:r?`Restore the drawer (Esc)`:`Fill the screen below the top bar`,children:r?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(Ff,{size:14,"aria-hidden":`true`}),`Restore`]}):(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(Cf,{size:14,"aria-hidden":`true`}),`Full screen`]})})})]}),S.mounted?(0,J.jsxs)(`div`,{inert:!t,className:`flex min-h-0 grow flex-col overflow-hidden ${w}`,style:{flexBasis:S.shown?C:0,maxHeight:x?`100vh`:`calc(100vh - ${cP}px)`},children:[x?null:(0,J.jsx)(`div`,{role:`separator`,"aria-orientation":`horizontal`,title:`Drag to resize, double-click to switch between the default and the largest size`,className:`group flex h-2.5 shrink-0 cursor-row-resize items-center justify-center bg-line-mid transition-colors hover:bg-theme`,onPointerDown:e=>{let t=Math.min(u,lP());_(!0),qp(e,(e,n)=>d(Kp(t-n,nP,lP())),()=>_(!1))},onDoubleClick:()=>d(u>=lP()-1?tP:lP()),children:(0,J.jsx)(`span`,{className:`h-0.5 w-10 rounded-full bg-ink-3 group-hover:bg-white`})}),s?(0,J.jsxs)(`div`,{className:`flex items-center gap-3 border-b border-seal/40 bg-seal-bg px-3 py-2 text-sm text-seal-deep`,children:[(0,J.jsx)(`span`,{children:s}),(0,J.jsx)(`button`,{className:`ml-auto text-xs underline`,onClick:c,children:`dismiss`})]}):null,(0,J.jsxs)(`div`,{className:`flex min-h-0 flex-1`,children:[(0,J.jsxs)(`div`,{className:`relative shrink-0 overflow-hidden ${w}`,style:{width:m?sP:f+oP},children:[(0,J.jsxs)(`div`,{inert:m,className:`flex h-full ${w} ${m?`opacity-0`:`opacity-100`}`,style:{width:f+oP},children:[(0,J.jsxs)(`div`,{className:`flex shrink-0 flex-col`,style:{width:f},children:[(0,J.jsxs)(`div`,{className:`flex items-center border-b border-line-mid px-3 py-1 text-xs text-ink-2`,children:[(0,J.jsxs)(`span`,{children:[v.length,` jobs`]}),(0,J.jsx)(`button`,{className:`ml-auto rounded-sm px-1 py-0.5 hover:bg-warm hover:text-ink`,onClick:()=>h(!0),title:`Hide the job list`,"aria-label":`Hide the job list`,children:(0,J.jsx)(vu,{size:14,"aria-hidden":`true`})})]}),(0,J.jsxs)(`ul`,{className:`min-h-0 flex-1 overflow-auto`,children:[v.length===0?(0,J.jsx)(`li`,{className:`p-3 text-sm text-ink-2`,children:`No jobs yet.`}):null,v.map(e=>(0,J.jsx)(`li`,{children:(0,J.jsxs)(`button`,{onClick:()=>o(e.id),className:`block w-full border-b border-line px-3 py-2 text-left hover:bg-warm ${e.id===a?`bg-theme-bg`:``}`,children:[(0,J.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,J.jsx)(Hy,{status:e.status,needsInput:e.resultState===`needs-input`,missingResult:e.kind===`ai`&&e.status!==`running`&&e.status!==`interrupted`&&e.resultState===null,awaitingUser:!!e.awaitingUser,answered:!!Fc(v,e.id)}),e.continuesJobId?(0,J.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-xs text-ink-2`,title:`Continues job ${e.continuesJobId}`,children:[(0,J.jsx)(Ku,{size:12,"aria-hidden":`true`}),`continues `,e.continuesJobId.slice(0,6)]}):null]}),(0,J.jsx)(`div`,{className:`mt-1 truncate font-mono text-xs text-ink`,title:e.command,children:e.command}),(0,J.jsx)(`div`,{className:`text-xs text-ink-2`,children:Xy(e.startedAt)})]})},e.id))]})]}),(0,J.jsx)(`div`,{role:`separator`,"aria-orientation":`vertical`,title:`Drag to resize the job list`,className:`shrink-0 cursor-col-resize bg-line-mid transition-colors hover:bg-theme`,style:{width:oP},onPointerDown:e=>{let t=f;_(!0),qp(e,e=>p(Kp(t+e,iP,aP)),()=>_(!1))},onDoubleClick:()=>p(rP)})]}),(0,J.jsx)(`button`,{className:`absolute inset-y-0 left-0 w-7 border-r border-line-mid bg-card text-xs text-ink-2 hover:bg-warm hover:text-ink ${w} ${m?`opacity-100`:`pointer-events-none opacity-0`}`,tabIndex:m?0:-1,onClick:()=>h(!1),title:`Show the job list`,"aria-label":`Show the job list`,children:(0,J.jsx)(Su,{size:14,className:`mx-auto`,"aria-hidden":`true`})})]}),y?(0,J.jsx)(eP,{job:y,showOpenInTab:!0,openJob:o},y.id):(0,J.jsx)(`div`,{className:`flex flex-1 items-center justify-center text-sm text-ink-2`,children:`Select a job to see its output.`})]})]}):null]})}function dP(){let e=Uc(),t=Wc(),n=Gc(),r=zc(),i=t===`denied`,a=e&&t===`granted`,o=r?i?`# Notifications are blocked
|
|
191
|
+
`)}),h>0?(0,J.jsxs)(`span`,{className:`block text-paper/30`,children:[`… `,h,` more line`,h===1?``:`s`]}):null]}):null]}),n?(0,J.jsxs)(`div`,{className:`mt-1 mb-2 ml-4 space-y-2 rounded bg-black/25 px-3 py-2`,children:[a.input?(0,J.jsxs)(`div`,{children:[(0,J.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,J.jsx)(`span`,{className:`text-[10px] tracking-wider text-paper/30 uppercase`,children:`input`}),(0,J.jsx)(nb,{tone:`log`,iconOnly:!0,text:p?u.text:l?l.pretty:a.input,label:`Copy input`,title:p?`Copy this edit as a diff`:`Copy what this call ran`}),u?(0,J.jsxs)(`span`,{className:`flex items-center gap-1`,role:`group`,"aria-label":`How the input is shown`,children:[(0,J.jsx)(`button`,{type:`button`,"aria-pressed":!d,onClick:()=>f(!1),className:NN(!d),title:`Show the change as a diff`,children:`diff`}),(0,J.jsx)(`button`,{type:`button`,"aria-pressed":d,onClick:()=>f(!0),className:NN(d),title:`Show the arguments the agent passed`,children:`raw`})]}):null]}),p?(0,J.jsx)(`div`,{className:`mt-1`,children:(0,J.jsx)(uj,{view:u,wrap:r})}):l?(0,J.jsx)(`div`,{className:`mt-1`,children:(0,J.jsx)(DN,{document:l})}):(0,J.jsx)(`pre`,{className:`mt-0.5 max-h-80 overflow-auto text-paper/75 ${g}`,children:(0,J.jsx)(kN,{text:a.input})})]}):null,s?(0,J.jsxs)(`div`,{children:[(0,J.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,J.jsx)(`span`,{className:`text-[10px] tracking-wider text-paper/30 uppercase`,children:`output`}),(0,J.jsx)(nb,{tone:`log`,iconOnly:!0,text:c?c.pretty:s,label:`Copy output`,title:`Copy what this call returned`})]}),c?(0,J.jsx)(`div`,{className:`mt-1`,children:(0,J.jsx)(DN,{document:c})}):(0,J.jsx)(`pre`,{className:`mt-0.5 max-h-80 overflow-auto text-paper/75 ${g}`,children:(0,J.jsx)(kN,{text:s})})]}):null,!a.input&&!s?(0,J.jsx)(`span`,{className:`text-paper/30`,children:`Nothing more to show.`}):null]}):null]})}),IN=(0,q.memo)(function({chunk:e}){if(!e.kind){let t=e.stream===`stderr`?`text-seal-soft`:e.stream===`system`?`text-gold`:``;return(0,J.jsx)(`span`,{className:t,children:(0,J.jsx)(kN,{text:e.data})})}if(e.kind===`markdown`)return(0,J.jsx)(jN,{chunk:e});if(e.kind===`reasoning`)return(0,J.jsxs)(`div`,{className:`my-1 flex gap-2 text-paper/45 italic`,children:[(0,J.jsx)(AN,{at:e.at}),(0,J.jsx)(`span`,{className:`shrink-0 select-none text-paper/25`,"aria-hidden":`true`,children:`~`}),(0,J.jsx)(`div`,{className:`min-w-0 whitespace-pre-wrap break-words`,children:e.data})]});let t=e.kind===`error`?`text-seal-glow`:e.kind===`hint`?`text-gold-glow`:`text-paper/40`;return(0,J.jsxs)(`div`,{className:`my-1 flex gap-2 ${t}`,children:[(0,J.jsx)(AN,{at:e.at}),(0,J.jsx)(`div`,{className:`min-w-0 whitespace-pre-wrap break-words`,children:e.data})]})});function LN(e){let t=e.map(e=>e.kind?e.kind===`result`?`${vA(e.data)}\n`:`${e.kind===`markdown`||e.kind===`reasoning`?``:`${ON(e.at)} `}${e.data}\n`:e.data).join(``);return hA.default.ansiToText(t)}function RN({chunks:e,wrap:t=!0,openCalls:n,onToggle:r,className:i=``}){let a=(0,q.useRef)(null),o=(0,q.useRef)(!0),s=(0,q.useMemo)(()=>PN(e),[e]);return(0,q.useEffect)(()=>{let e=a.current;e&&o.current&&(e.scrollTop=e.scrollHeight)},[e]),(0,J.jsxs)(`div`,{ref:a,onScroll:e=>{let t=e.currentTarget;o.current=t.scrollHeight-t.scrollTop-t.clientHeight<24},className:`paper-grain overflow-auto bg-dai-deep p-3 font-mono text-xs leading-5 text-paper ${t?`break-words whitespace-pre-wrap`:`whitespace-pre`} ${i}`,children:[e.length===0?(0,J.jsx)(`span`,{className:`text-ink-3`,children:`Waiting for output...`}):null,s.map(e=>e.type===`call`?(0,J.jsx)(FN,{call:e.call,result:e.result,open:n.has(e.call.seq),wrap:t,onToggle:r},e.call.seq):(0,J.jsx)(IN,{chunk:e.chunk},e.chunk.seq))]})}function zN(e){let t=Qv(e),n=t.questions.filter(e=>e.kind===`blocking`);return{questions:t.questions,blocking:n,markers:t.markers,markerAssertions:Fv(t)}}function BN(e,t){let n=Date.parse(e.startedAt)-2e3,r=e.endedAt?Date.parse(e.endedAt)+2e3:Date.now();return t.filter(e=>{let t=Date.parse(e.updatedAt);return Number.isFinite(t)&&t>=n&&t<=r}).sort((e,t)=>e.updatedAt.localeCompare(t.updatedAt))}function VN(e,t){if(!t)return!1;let n=Date.parse(t.updatedAt),r=Date.parse(e.startedAt)-2e3,i=e.endedAt?Date.parse(e.endedAt)+2e3:Date.now();return Number.isFinite(n)&&n>=r&&n<=i}function HN({job:e,openJob:t}){let{startJob:n}=xl(),[r,i]=(0,q.useState)(``),[a,o]=(0,q.useState)(!1),s=async r=>{o(!0);let a=await n({action:`continue`,jobId:e.id,reply:r});o(!1),a&&(i(``),t(a.id))};return(0,J.jsxs)(`div`,{className:`mt-2 space-y-2`,children:[(0,J.jsx)(`textarea`,{autoFocus:!0,value:r,onChange:e=>i(e.target.value),maxLength:kc,rows:3,spellCheck:!1,placeholder:`Your answers, in your own words. The agent writes them into the case file and goes on.`,"aria-label":`Your answers to the agent's questions`,className:`${Uy} w-full resize-y`}),(0,J.jsxs)(`div`,{className:`text-right text-xs text-ink-3`,children:[r.length,` / `,kc]}),(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center justify-end gap-2`,children:[(0,J.jsx)(`button`,{className:X(),disabled:a,onClick:()=>void s(Ac),title:`Keeps every suggested sentence and removes the questions, so the case is confirmed as it stands`,children:`Use the suggested defaults`}),(0,J.jsx)(`button`,{className:`${X(`primary`)} gap-1.5`,disabled:a||r.trim()===``,onClick:()=>void s(r),title:`Continue the same conversation with the same permissions`,children:`Send answers and continue`})]})]})}function UN({job:e,openJob:t,review:n,casePending:r,next:i,needsAnswers:a,origin:o=`exploration`}){let s=e.caseId??``,c=n.questions.length-n.blocking.length;return(0,J.jsxs)(`div`,{className:`rounded border border-line bg-card px-3 py-2`,children:[(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,J.jsx)(jf,{size:14,className:`shrink-0 text-ink-3`,"aria-hidden":`true`}),(0,J.jsx)(`span`,{className:`text-sm font-medium text-ink`,children:`Answer the open questions, or keep what the case says`}),r?(0,J.jsx)(Ny,{tone:`gray`,children:`loading`}):null,n.blocking.length>0?(0,J.jsxs)(Ny,{tone:`red`,children:[n.blocking.length,` must answer`]}):null,c>0?(0,J.jsxs)(Ny,{tone:`amber`,children:[c,` suggestion`,c===1?``:`s`]}):null]}),r?null:n.questions.length===0?(0,J.jsx)(`p`,{className:`mt-1 pl-6 text-xs text-ink-2`,children:`The agent stopped without leaving a question in the case file: read the run log above, then answer here.`}):(0,J.jsx)(`p`,{className:`mt-1 pl-6 text-xs text-ink-2`,children:o===`heal`?`The change left these open. Each one keeps the sentence it is about: keep that text, or write your own answer.`:`The exploration could not settle these from the page. Each one keeps the sentence it is about: keep that text, or write your own answer.`}),n.blocking.length>0?(0,J.jsx)(`ul`,{className:`mt-1.5 space-y-1 pl-6 text-xs text-ink`,children:n.blocking.map(e=>(0,J.jsxs)(`li`,{className:`flex items-start gap-1.5`,children:[(0,J.jsx)(Ml,{size:14,className:`mt-0.5 shrink-0 text-seal-deep`,"aria-hidden":`true`}),(0,J.jsxs)(`span`,{children:[e.question,e.parent?(0,J.jsxs)(`span`,{className:`block text-ink-2`,children:[`Deleting it confirms: `,e.parent.text]}):null]})]},`${e.line}-${e.question}`))}):null,i?(0,J.jsxs)(`div`,{className:`mt-2 flex flex-wrap items-center gap-2 pl-6 text-xs text-ink-2`,children:[(0,J.jsxs)(`span`,{children:[`Answers were sent in job `,(0,J.jsx)(`code`,{children:i.id}),` (`,i.status,`).`]}),(0,J.jsxs)(`button`,{className:`${X()} shrink-0 gap-1.5`,onClick:()=>t(i.id),title:`Open the run that carries your answers`,children:[`Open that job`,(0,J.jsx)(Bl,{size:14,"aria-hidden":`true`})]})]}):a?(0,J.jsx)(`div`,{className:`pl-6`,children:(0,J.jsx)(HN,{job:e,openJob:t})}):null,!r&&!i&&!a&&n.questions.length>0?(0,J.jsx)(`div`,{className:`mt-2 flex justify-end`,children:(0,J.jsxs)(Ks,{to:`/cases/${s}?review=questions`,className:`${X()} gap-1.5`,children:[`Answer in the case`,(0,J.jsx)(Bl,{size:14,"aria-hidden":`true`})]})}):null]})}function WN({caseId:e,markers:t,assertions:n,origin:r=`exploration`}){return(0,J.jsxs)(`div`,{className:`rounded border border-line bg-card px-3 py-2`,children:[(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,J.jsx)(gd,{size:14,className:`shrink-0 text-ink-3`,"aria-hidden":`true`}),(0,J.jsx)(`span`,{className:`text-sm font-medium text-ink`,children:r===`heal`?`Confirm what the change relies on`:`Lines that need your judgement`}),(0,J.jsxs)(Ny,{tone:n>0?`amber`:`blue`,children:[t,` marked`]}),n>0?(0,J.jsxs)(Ny,{tone:`amber`,children:[n,` change an assertion`]}):null]}),(0,J.jsxs)(`p`,{className:`mt-1 pl-6 text-xs text-ink-2`,children:[r===`heal`?`The change marked the lines it could not check by itself. `:``,n>0?`${n===1?`One line decides an assertion`:`${n} lines decide an assertion`}: a wrong wording there would pass silently, so a person settles it. The rest are notes the run checks by itself. `:`Nothing here can pass while wrong: the run checks these lines by itself. `,`Generating a spec does not wait for them; healing does.`]}),(0,J.jsx)(`div`,{className:`mt-2 flex justify-end`,children:(0,J.jsxs)(Ks,{to:`/cases/${e}?review=observations`,className:`${X()} gap-1.5`,children:[`Review them in the case`,(0,J.jsx)(Bl,{size:14,"aria-hidden":`true`})]})})]})}function GN({caseId:e,blocking:t}){return(0,J.jsxs)(`div`,{className:`rounded border border-line bg-card px-3 py-2`,children:[(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,J.jsx)(bd,{size:14,className:`shrink-0 text-ink-3`,"aria-hidden":`true`}),(0,J.jsx)(`span`,{className:`text-sm font-medium text-ink`,children:`Generate the spec`})]}),(0,J.jsxs)(`p`,{className:`mt-1 pl-6 text-xs text-ink-2`,children:[`Opens the case with Generate spec selected and marks its Run AI button; choose the environment there and run it.`,t>0?` The must-answer questions stay open, so answer them first for a complete spec.`:``]}),(0,J.jsx)(`div`,{className:`mt-2 flex justify-end`,children:(0,J.jsxs)(Ks,{to:`/cases/${e}?ai=gen-spec`,className:`${X(`primary`)} gap-1.5`,children:[(0,J.jsx)(Od,{size:14,"aria-hidden":`true`}),`Generate spec`]})})]})}function KN({caseId:e,what:t}){return(0,J.jsxs)(`div`,{className:`rounded border border-gold-deep/40 bg-gold-bg px-3 py-2`,children:[(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,J.jsx)(Ku,{size:14,className:`shrink-0 text-gold-deep`,"aria-hidden":`true`}),(0,J.jsx)(`span`,{className:`text-sm font-medium text-ink`,children:`Explore the case again`})]}),(0,J.jsxs)(`p`,{className:`mt-1 pl-6 text-xs text-ink-2`,children:[t===`questions`?`Answer the questions or keep what the case says first: an answer can change a step, a value or a target. `:t===`marks`?`Confirm the marked lines first. `:`Read the log above first: it says why healing stopped. `,`Then run Explore case, so the pages settle what changed. Only after that is the spec generated again (it asks before overwriting the existing one).`]}),(0,J.jsx)(`div`,{className:`mt-2 flex justify-end`,children:(0,J.jsxs)(Ks,{to:`/cases/${e}?ai=explore-case`,className:`${X(`primary`)} gap-1.5`,children:[(0,J.jsx)(lp,{size:14,"aria-hidden":`true`}),`Re-explore the case`]})})]})}function qN({job:e,openJob:t,review:n,casePending:r,readFailed:i,next:a}){let o=e.caseId??``,s=e.resultState===`needs-input`&&!a,c=!i&&(n.questions.length>0||s),l=!i&&n.markers.length>0;return(0,J.jsxs)(`div`,{className:`space-y-3`,children:[i?(0,J.jsxs)(`p`,{className:`text-sm text-seal-deep`,children:[`The case file could not be read: `,i]}):null,c||l?(0,J.jsx)(`p`,{className:`text-sm text-ink-2`,children:`The exploration is done. Finish these, then generate the spec.`}):null,i?null:(0,J.jsxs)(`div`,{className:`space-y-2`,children:[c?(0,J.jsx)(UN,{job:e,openJob:t,review:n,casePending:r,next:a,needsAnswers:s}):null,l?(0,J.jsx)(WN,{caseId:o,markers:n.markers.length,assertions:n.markerAssertions}):null,(0,J.jsx)(GN,{caseId:o,blocking:n.blocking.length})]})]})}function JN({job:e,openJob:t,review:n,casePending:r}){return(0,J.jsxs)(`div`,{className:`space-y-3`,children:[n.blocking.length>0?(0,J.jsx)(`ul`,{className:`space-y-2`,children:n.blocking.map(e=>(0,J.jsx)(`li`,{className:`rounded border border-seal/40 bg-seal-bg px-3 py-2 text-sm text-ink`,children:(0,J.jsxs)(`div`,{className:`flex items-start gap-1.5`,children:[(0,J.jsx)(Ml,{size:14,className:`mt-0.5 shrink-0 text-seal-deep`,"aria-hidden":`true`}),(0,J.jsxs)(`span`,{children:[e.question,e.parent?(0,J.jsxs)(`span`,{className:`block text-xs text-ink-2`,children:[`Deleting it confirms: `,e.parent.text]}):null]})]})},`${e.line}-${e.question}`))}):(0,J.jsx)(`p`,{className:`text-sm text-ink-2`,children:r?`Loading the questions...`:`No blocking question is left in the case file.`}),(0,J.jsx)(HN,{job:e,openJob:t})]})}function YN({created:e,loading:t}){return t?(0,J.jsx)(`p`,{className:`text-sm text-ink-2`,children:`Loading the new cases...`}):e.length===0?(0,J.jsx)(`p`,{className:`text-sm text-ink-2`,children:`The run did not leave a new case file. Open the case list to see what it wrote, or read its last lines above.`}):(0,J.jsxs)(`div`,{className:`space-y-3`,children:[(0,J.jsx)(`p`,{className:`text-sm text-ink-2`,children:`These are drafts: nobody has checked their steps against the real pages yet. Run Explore case on each one, so the AI opens the pages and writes down what it saw.`}),(0,J.jsx)(`ul`,{className:`divide-y divide-line rounded border border-line bg-card`,children:e.map(e=>(0,J.jsxs)(`li`,{className:`flex flex-wrap items-center gap-2 px-3 py-2`,children:[(0,J.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,J.jsx)(`div`,{className:`truncate font-mono text-xs text-ink`,children:e.id}),e.title?(0,J.jsx)(`div`,{className:`truncate text-xs text-ink-2`,children:e.title}):null]}),(0,J.jsxs)(Ks,{to:`/cases/${e.id}?ai=explore-case`,className:`${X()} shrink-0 gap-1.5`,title:`Open this case with Explore case selected`,children:[`Explore`,(0,J.jsx)(Bl,{size:14,"aria-hidden":`true`})]})]},e.id))})]})}function XN({caseId:e}){return(0,J.jsxs)(`div`,{className:`rounded border border-line bg-card px-3 py-2`,children:[(0,J.jsxs)(`p`,{className:`text-sm text-ink-2`,children:[`The spec is written but has not been run. The Run page opens with this case selected; if it has visual checks, tick `,(0,J.jsx)(`b`,{children:`Update baselines`}),` for the first run.`]}),(0,J.jsxs)(`div`,{className:`mt-2 flex flex-wrap justify-end gap-2`,children:[(0,J.jsxs)(Ks,{to:`/cases/${e}?view=spec`,className:`${X()} gap-1.5`,children:[(0,J.jsx)(Pu,{size:14,"aria-hidden":`true`}),`View the spec`]}),(0,J.jsxs)(Ks,{to:`/run`,state:{case:e},className:`${X(`primary`)} gap-1.5`,children:[(0,J.jsx)(qf,{size:14,"aria-hidden":`true`}),`Open Run tests`]})]})]})}function ZN({job:e,openJob:t,review:n,casePending:r,readFailed:i}){let a=e.caseId??``,o=!i&&n.questions.length>0,s=!i&&n.markers.length>0,c=o?`questions`:s?`marks`:`log`;return(0,J.jsxs)(`div`,{className:`space-y-3`,children:[i?(0,J.jsxs)(`p`,{className:`text-sm text-seal-deep`,children:[`The case file could not be read: `,i]}):null,(0,J.jsx)(`p`,{className:`text-sm text-ink-2`,children:o||s?`The case is the source of truth, so healing changed it first. Nothing is written into the spec from a case that still asks something: finish the points below, then explore the case again.`:`Healing stopped and left the decision to you. Its log above says what it needs; after that, explore the case again before the spec is generated.`}),i?null:(0,J.jsxs)(`div`,{className:`space-y-2`,children:[o?(0,J.jsx)(UN,{job:e,openJob:t,review:n,casePending:r,next:void 0,needsAnswers:!1,origin:`heal`}):null,s?(0,J.jsx)(WN,{caseId:a,markers:n.markers.length,assertions:n.markerAssertions,origin:`heal`}):null,(0,J.jsx)(KN,{caseId:a,what:c})]})]})}function QN({tone:e,icon:t,label:n,badges:r,actions:i,sheet:a,open:o,onOpen:s,onClose:c}){let l=e===`attention`?`border-t-2 border-gold-deep/40 bg-gold-bg`:`border-t border-line-mid bg-warm`,u=(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`span`,{className:`shrink-0 ${e===`attention`?`text-gold-deep`:`text-ink-3`}`,children:t}),(0,J.jsx)(`span`,{className:`text-sm font-medium ${e===`attention`?`text-gold-deep`:`text-ink`}`,children:n}),r]});return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`div`,{className:`flex shrink-0 flex-wrap items-center gap-2 px-3 py-2 ${l}`,children:[a?(0,J.jsx)(`button`,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":o,title:`Show the details`,onClick:s,className:`flex min-w-0 flex-1 cursor-pointer flex-wrap items-center gap-2 rounded px-1 py-0.5 text-left transition-colors hover:bg-line/40 focus-visible:ring-2 focus-visible:ring-theme/40 focus-visible:outline-none`,children:u}):(0,J.jsx)(`div`,{className:`flex min-w-0 flex-1 flex-wrap items-center gap-2 px-1 py-0.5`,children:u}),(0,J.jsx)(`div`,{className:`ml-auto flex shrink-0 flex-wrap items-center gap-2`,children:i})]}),o&&a?(0,J.jsx)(rb,{title:a.title,action:a.action,onClose:c,children:a.body}):null]})}function $N({job:e,openJob:t}){let[n,r]=(0,q.useState)(!1),i=wo();(0,q.useEffect)(()=>r(!1),[i.key]);let a=gl().data,o=a?Fc(a,e.id):void 0,s=e.caseId??``,c=e.kind===`ai`&&!e.aiCommand&&e.command.includes(`/make-case `),l=e.aiCommand===`explore-case`,u=e.aiCommand===`gen-spec`,d=e.aiCommand===`heal-spec`,f=e.resultState===`needs-input`&&!l&&!c&&!d&&s!==``,p=l||f||d,m=Vn({queryKey:ul.case(s),queryFn:()=>sc.case(s),enabled:s!==``&&p}),h=(0,q.useMemo)(()=>zN(m.data?.content??``),[m.data?.content]),g=ml(),_=(0,q.useMemo)(()=>c&&g.data?BN(e,g.data):[],[c,e,g.data]),v=g.isPending||g.isFetching&&_.length===0;if(e.status!==`succeeded`)return null;let y=g.data?.find(e=>e.id===s),b=h.questions.length>0||h.markers.length>0,x=e.resultState===`needs-input`||e.resultState===null&&VN(e,y)&&b;if(e.kind===`ai`&&!c&&e.resultState===null&&!x)return null;let S=l&&s!==``?`explore`:c?`make-cases`:f?`answers`:u&&s!==``?`gen-spec`:d&&s!==``?`healed`:null;if(S===null)return null;let C=p&&m.isError?m.error.message:null,w=S===`explore`&&e.resultState===`needs-input`&&!o,T=h.questions.length-h.blocking.length,E=!!C||w||h.questions.length>0||h.markers.length>0;if(S===`explore`)return(0,J.jsx)(QN,{tone:w||C||h.blocking.length>0?`attention`:`plain`,icon:(0,J.jsx)(nf,{size:16,"aria-hidden":`true`}),label:C?`The case could not be read`:w?`The agent needs your answers`:o?(0,J.jsxs)(J.Fragment,{children:[`Answers sent in job `,(0,J.jsx)(`code`,{children:o.id})]}):`What to do next`,badges:(0,J.jsxs)(J.Fragment,{children:[h.blocking.length>0?(0,J.jsxs)(Ny,{tone:`red`,children:[h.blocking.length,` must answer`]}):null,T>0?(0,J.jsxs)(Ny,{tone:`amber`,children:[T,` suggestion`,T===1?``:`s`]}):null,h.markers.length>0?(0,J.jsxs)(Ny,{tone:`blue`,children:[h.markers.length,` to confirm`]}):null]}),actions:(0,J.jsxs)(J.Fragment,{children:[o?(0,J.jsxs)(`button`,{className:`${X(`primary`)} gap-1.5`,onClick:()=>t(o.id),title:`Open the run that carries your answers`,children:[`Open that job`,(0,J.jsx)(Bl,{size:14,"aria-hidden":`true`})]}):w?(0,J.jsxs)(`button`,{className:`${X(`primary`)} gap-1.5`,onClick:()=>r(!0),children:[(0,J.jsx)(jf,{size:14,"aria-hidden":`true`}),`Answer`]}):C?null:(0,J.jsxs)(Ks,{to:`/cases/${s}?ai=gen-spec`,className:`${X(`primary`)} gap-1.5`,children:[(0,J.jsx)(Od,{size:14,"aria-hidden":`true`}),`Generate spec`]}),E&&!w?(0,J.jsx)(`button`,{className:X(),onClick:()=>r(!0),children:`Details`}):null]}),sheet:E?{title:w?`The agent needs your answers`:`What to do next`,action:(0,J.jsx)(Ks,{to:`/cases/${s}`,className:`text-xs font-normal text-ink-2 underline hover:text-ink`,children:`Open the case`}),body:(0,J.jsx)(qN,{job:e,openJob:t,review:h,casePending:m.isPending,readFailed:C,next:o})}:null,open:n,onOpen:()=>r(!0),onClose:()=>r(!1)});if(S===`make-cases`)return(0,J.jsx)(QN,{tone:`plain`,icon:(0,J.jsx)(wd,{size:16,"aria-hidden":`true`}),label:v?`Loading the new cases...`:_.length>0?`${_.length} new ${_.length===1?`case`:`cases`}`:`No new case found`,actions:(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`button`,{className:`${X(`primary`)} gap-1.5`,onClick:()=>r(!0),children:[(0,J.jsx)(nf,{size:14,"aria-hidden":`true`}),`Review`]}),(0,J.jsx)(Ks,{to:`/cases`,className:X(),children:`Open the case list`})]}),sheet:{title:`What to do next`,action:(0,J.jsx)(Ks,{to:`/cases`,className:`text-xs font-normal text-ink-2 underline hover:text-ink`,children:`Open the case list`}),body:(0,J.jsx)(YN,{created:_,loading:v})},open:n,onOpen:()=>r(!0),onClose:()=>r(!1)});if(S===`gen-spec`)return(0,J.jsx)(QN,{tone:`plain`,icon:(0,J.jsx)(Od,{size:16,"aria-hidden":`true`}),label:`Spec written, not run`,actions:(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(Ks,{to:`/run`,state:{case:s},className:`${X(`primary`)} gap-1.5`,children:[(0,J.jsx)(qf,{size:14,"aria-hidden":`true`}),`Open Run tests`]}),(0,J.jsxs)(Ks,{to:`/cases/${s}?view=spec`,className:`${X()} gap-1.5`,children:[(0,J.jsx)(Pu,{size:14,"aria-hidden":`true`}),`View spec`]}),(0,J.jsx)(`button`,{className:X(),onClick:()=>r(!0),children:`Details`})]}),sheet:{title:`What to do next`,action:(0,J.jsx)(Ks,{to:`/cases/${s}`,className:`text-xs font-normal text-ink-2 underline hover:text-ink`,children:`Open the case`}),body:(0,J.jsx)(XN,{caseId:s})},open:n,onOpen:()=>r(!0),onClose:()=>r(!1)});if(S===`answers`)return(0,J.jsx)(QN,{tone:o?`plain`:`attention`,icon:(0,J.jsx)(jf,{size:16,"aria-hidden":`true`}),label:o?(0,J.jsxs)(J.Fragment,{children:[`Answers sent in job `,(0,J.jsx)(`code`,{children:o.id})]}):`The agent needs your answers`,badges:o?null:(0,J.jsxs)(J.Fragment,{children:[h.blocking.length>0?(0,J.jsxs)(Ny,{tone:`red`,children:[h.blocking.length,` must answer`]}):null,(0,J.jsxs)(Ny,{tone:`gray`,children:[h.questions.length-h.blocking.length,` non-blocking`]})]}),actions:o?(0,J.jsxs)(`button`,{className:`${X(`primary`)} gap-1.5`,onClick:()=>t(o.id),children:[`Open that job`,(0,J.jsx)(Bl,{size:14,"aria-hidden":`true`})]}):(0,J.jsxs)(`button`,{className:`${X(`primary`)} gap-1.5`,onClick:()=>r(!0),children:[(0,J.jsx)(jf,{size:14,"aria-hidden":`true`}),`Answer`]}),sheet:o?null:{title:`The agent needs your answers`,action:(0,J.jsx)(Ks,{to:`/cases/${s}?review=questions`,className:`text-xs font-normal text-ink-2 underline hover:text-ink`,title:`The questions are also saved in the case file. There, answering one means keeping the sentence it is about or writing your own.`,children:`Open the case`}),body:(0,J.jsx)(JN,{job:e,openJob:t,review:h,casePending:m.isPending})},open:n,onOpen:()=>r(!0),onClose:()=>r(!1)});let D=y?.hasSpec??!1;return x?(0,J.jsx)(QN,{tone:`attention`,icon:(0,J.jsx)(Ml,{size:16,"aria-hidden":`true`}),label:C?`The case could not be read`:b?`The case changed and needs your review`:`Healing stopped: the case needs your attention`,badges:(0,J.jsxs)(J.Fragment,{children:[h.blocking.length>0?(0,J.jsxs)(Ny,{tone:`red`,children:[h.blocking.length,` must answer`]}):null,T>0?(0,J.jsxs)(Ny,{tone:`amber`,children:[T,` suggestion`,T===1?``:`s`]}):null,h.markers.length>0?(0,J.jsxs)(Ny,{tone:`blue`,children:[h.markers.length,` to confirm`]}):null]}),actions:(0,J.jsxs)(J.Fragment,{children:[h.questions.length>0?(0,J.jsxs)(Ks,{to:`/cases/${s}?review=questions`,className:`${X(`primary`)} gap-1.5`,children:[(0,J.jsx)(jf,{size:14,"aria-hidden":`true`}),`Review the questions`]}):h.markers.length>0?(0,J.jsxs)(Ks,{to:`/cases/${s}?review=observations`,className:`${X(`primary`)} gap-1.5`,children:[(0,J.jsx)(gd,{size:14,"aria-hidden":`true`}),`Review the marked lines`]}):(0,J.jsxs)(Ks,{to:`/cases/${s}`,className:`${X(`primary`)} gap-1.5`,children:[`Open the case`,(0,J.jsx)(Bl,{size:14,"aria-hidden":`true`})]}),(0,J.jsxs)(Ks,{to:`/cases/${s}?ai=explore-case`,className:`${X()} gap-1.5`,children:[(0,J.jsx)(lp,{size:14,"aria-hidden":`true`}),`Re-explore`]}),(0,J.jsx)(`button`,{className:X(),onClick:()=>r(!0),children:`Details`})]}),sheet:{title:`Review the case, then explore it again`,action:(0,J.jsx)(Ks,{to:`/cases/${s}`,className:`text-xs font-normal text-ink-2 underline hover:text-ink`,children:`Open the case`}),body:(0,J.jsx)(ZN,{job:e,openJob:t,review:h,casePending:m.isPending,readFailed:C})},open:n,onOpen:()=>r(!0),onClose:()=>r(!1)}):(0,J.jsx)(QN,{tone:`plain`,icon:(0,J.jsx)(uu,{size:16,className:`text-jade-btn`,"aria-hidden":`true`}),label:`Healing is done: the case and the spec are up to date.`,actions:(0,J.jsxs)(J.Fragment,{children:[D?(0,J.jsxs)(Ks,{to:`/cases/${s}?view=spec`,className:`${X(`primary`)} gap-1.5`,children:[(0,J.jsx)(Pu,{size:14,"aria-hidden":`true`}),`View spec`]}):null,(0,J.jsxs)(Ks,{to:`/cases/${s}`,className:D?X():`${X(`primary`)} gap-1.5`,children:[`Open the case`,(0,J.jsx)(Bl,{size:14,"aria-hidden":`true`})]})]}),sheet:null,open:!1,onOpen:()=>r(!0),onClose:()=>r(!1)})}function eP({job:e,showOpenInTab:t=!1,openJob:n}){let{chunks:r,connected:i}=Ay(e.id),a=gl().data,o=hl().data,s=!!(a&&Fc(a,e.id)),c=e,l=Hn({mutationFn:()=>sc.cancelJob(e.id)}),u=Hn({mutationFn:t=>sc.sendInput(e.id,t)}),[d,f]=(0,q.useState)(!1),[p,m]=Jp(`asrun-ui.jobs.wrap`,!0,Xp),[h,g]=(0,q.useState)(()=>new Set),_=c.status===`running`,v=c.status===`interrupted`,y=(0,q.useMemo)(()=>r.filter(e=>e.kind===`tool`&&e.tool).map(e=>e.seq),[r]),b=y.length>0&&y.every(e=>h.has(e));(0,q.useEffect)(()=>g(new Set),[e.id]);let x=(0,q.useCallback)(e=>g(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),[]),S=c.kind===`run`&&c.reportId&&!_?[c.reportId,`${c.reportId}-baselines`].find(e=>o?.some(t=>t.id===e)):void 0;return(0,J.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col`,children:[(0,J.jsxs)(`div`,{className:`max-h-[45%] shrink-0 overflow-auto`,children:[(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 border-b border-line-mid bg-warm px-3 py-2`,children:[(0,J.jsx)(Hy,{status:c.status,needsInput:c.resultState===`needs-input`,missingResult:c.kind===`ai`&&!_&&!v&&c.resultState===null,awaitingUser:!!c.awaitingUser,answered:s}),c.continuesJobId?(0,J.jsxs)(`button`,{className:`inline-flex items-center gap-1 text-xs text-ink-2 underline hover:text-ink`,onClick:()=>n(c.continuesJobId),title:`This run goes on with the conversation of an earlier run`,children:[(0,J.jsx)(Ku,{size:12,"aria-hidden":`true`}),`Continues job `,c.continuesJobId]}):null,(0,J.jsx)(`span`,{className:`text-xs text-ink-2`,children:c.exitCode===null?c.signal?`signal ${c.signal}`:``:`exit code ${c.exitCode}`}),_&&!i?(0,J.jsx)(`span`,{className:`text-xs text-gold-deep`,children:`reconnecting...`}):null,(0,J.jsxs)(`div`,{className:`ml-auto flex flex-wrap items-center gap-2`,children:[y.length>0?(0,J.jsx)(`button`,{className:`${X()} shrink-0`,"aria-pressed":b,title:b?`Close every tool call again`:`Open every tool call of this run`,onClick:()=>g(b?new Set:new Set(y)),children:b?`Collapse all`:`Expand all`}):null,(0,J.jsxs)(`button`,{className:`${X()} shrink-0`,"aria-pressed":p,title:`Wrap long lines, or scroll them sideways`,onClick:()=>m(!p),children:[`Wrap lines: `,p?`on`:`off`]}),(0,J.jsx)(nb,{text:LN(r),label:`Copy log`,title:`Copy the output without colors`}),S?(0,J.jsxs)(`a`,{className:`${X()} gap-1.5`,href:`/reports/${S}`,title:`Open the report of this run`,children:[(0,J.jsx)(Od,{size:14,"aria-hidden":`true`}),`Go to the report`]}):null,t?(0,J.jsxs)(`a`,{className:`${X()} gap-1.5`,href:`/jobs/${e.id}`,target:`_blank`,rel:`noreferrer`,title:`Open this job in its own tab`,children:[(0,J.jsx)(fd,{size:14,"aria-hidden":`true`}),`Open in new tab`]}):null,_&&c.kind===`signin`?(0,J.jsx)(`button`,{className:X(`primary`),disabled:u.isPending,onClick:()=>u.mutate(`
|
|
192
|
+
`),title:`Press this after you logged in in the browser window that opened. The card in that window does the same.`,children:`I've logged in, save the session`}):null,v&&c.leftover?.state===`alive`?(0,J.jsx)(`button`,{className:X(`danger`),disabled:l.isPending,onClick:()=>l.mutate(),title:`End the process tree the previous UI server left behind: the agent, its browser and its MCP server.`,children:`Stop the leftover process`}):null,!_&&c.rerunable?(0,J.jsx)($y,{job:c,onStarted:n,disabledReason:c.leftover?.state===`alive`?`Stop the leftover process of this job first: it still holds the browser MCP server.`:void 0}):null,_?(0,J.jsx)(`button`,{className:X(`danger`),disabled:l.isPending,onClick:()=>l.mutate(),children:`Cancel`}):null]})]}),(0,J.jsxs)(`div`,{className:`flex items-start gap-2 border-b border-line-mid bg-warm px-3 py-1.5`,children:[(0,J.jsx)(`button`,{className:`min-w-0 flex-1 text-left`,onClick:()=>f(!d),title:d?`Show the command on one line`:`Show the whole command`,children:(0,J.jsx)(`code`,{className:`block text-xs text-ink ${d?`max-h-24 overflow-auto break-all whitespace-pre-wrap`:`truncate`}`,children:c.command})}),(0,J.jsx)(nb,{text:c.command,label:`Copy command`,title:`Copy the command`,iconOnly:!0})]}),v?(0,J.jsxs)(`p`,{className:`border-b border-gold/50 bg-gold-bg px-3 py-2 text-xs text-warn-ink`,children:[(0,J.jsx)(`b`,{children:`This job was interrupted when the UI server stopped.`}),` Its output ends at the last line the server received; the old process does not write to it any more.`,c.leftover?.state===`alive`?(0,J.jsxs)(J.Fragment,{children:[` `,`Its process (pid `,c.leftover.pid,`) is still running. Stop it before starting another AI run: it still holds the browser MCP server.`]}):null,c.leftover?.state===`unknown`?(0,J.jsxs)(J.Fragment,{children:[` `,`A process with its pid is running, but it could not be identified as this job, so it was not marked for stopping.`]}):null,c.leftover?.state===`stopped`?(0,J.jsx)(J.Fragment,{children:` The leftover process was stopped.`}):null]}):null,!_&&!v&&c.kind===`ai`&&c.resultState===null?(0,J.jsxs)(`p`,{className:`border-b border-gold/50 bg-gold-bg px-3 py-2 text-xs text-warn-ink`,children:[(0,J.jsx)(`b`,{children:`This run ended without a RESULT line`}),`, so whether it finished is unknown: read the log to see how far it got. A run that could not finish should end with `,(0,J.jsx)(`code`,{children:`RESULT: needs-input`}),`; if it proposed a plan and asked a question instead, nothing was written.`]}):null,_&&c.kind===`signin`?(0,J.jsxs)(`p`,{className:`border-b border-gold/50 bg-gold-bg px-3 py-2 text-xs text-warn-ink`,children:[`A browser window opened on your machine. Log in there (including 2FA), then press `,(0,J.jsx)(`b`,{children:`Done, save the session`}),` `,`on the card in that window. The button above does the same, if you would rather stay on this page.`]}):null]}),_&&c.awaitingUser?(0,J.jsxs)(`p`,{className:`border-b border-gold/50 bg-gold-bg px-3 py-2 text-xs text-warn-ink`,children:[(0,J.jsx)(`b`,{children:`Your turn in the browser window:`}),` `,c.awaitingUser.message??`do the step`,`.`,c.awaitingUser.finish?(0,J.jsxs)(J.Fragment,{children:[` `,(0,J.jsx)(`b`,{children:`Done when`}),` `,c.awaitingUser.finish,`.`]}):null,` `,`Press Done on the card (bottom-left of the page) when you finish.`]}):null,(0,J.jsx)(RN,{chunks:r,wrap:p,openCalls:h,onToggle:x,className:`min-h-0 flex-1`}),c.kind===`run`&&c.baselineCases&&c.baselineCases.length>0?(0,J.jsx)(tb,{caseIds:c.baselineCases,running:_}):null,(0,J.jsx)($N,{job:c,openJob:n})]})}var tP=360,nP=160,rP=256,iP=140,aP=640,oP=6,sP=28,cP=140,lP=()=>Math.max(nP,window.innerHeight-cP);function uP(){let{attention:e,drawerOpen:t,setDrawerOpen:n,drawerMaximized:r,setDrawerMaximized:i,selectedJobId:a,selectJob:o,startError:s,clearStartError:c}=xl(),l=gl(),[u,d]=Jp(`asrun-ui.jobs.height`,tP,Zp),[f,p]=Jp(`asrun-ui.jobs.list-width`,rP,Zp),[m,h]=Jp(`asrun-ui.jobs.list-hidden`,!1,Xp),[g,_]=(0,q.useState)(!1),v=l.data??[],y=v.find(e=>e.id===a)??null,b=v.filter(e=>e.status===`running`).length,x=t&&r;(0,q.useEffect)(()=>{if(!x)return;let e=e=>{e.key===`Escape`&&i(!1)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[x,i]);let S=Qp(t,200),C=Math.min(u,lP()),w=g?``:`transition-[flex-basis,max-height,width,opacity] duration-200 ease-out motion-reduce:transition-none`;return(0,J.jsxs)(`div`,{className:`relative flex flex-col border-t-2 border-ink bg-card shadow-[0_-6px_16px_-8px_color-mix(in_srgb,var(--theme)_40%,transparent)] transition-[flex-grow] duration-200 ease-out motion-reduce:transition-none ${x?`min-h-0 grow`:`shrink-0 grow-0`}`,children:[(0,J.jsxs)(`div`,{className:`relative flex items-center bg-dai-deep text-white`,children:[(0,J.jsxs)(`button`,{className:`group flex flex-1 cursor-pointer items-center gap-3 px-4 py-2 text-left text-sm transition-colors hover:bg-white/10`,onClick:()=>n(!t),"aria-expanded":t,title:t?`Collapse the jobs drawer`:`Expand the jobs drawer`,children:[(0,J.jsx)(`span`,{className:`eyebrow`,children:`Jobs`}),b>0?(0,J.jsxs)(`span`,{className:`font-medium text-qing-bg`,children:[b,` running`]}):(0,J.jsx)(`span`,{className:`text-white/70`,children:`idle`}),e.length>0?(0,J.jsxs)(`span`,{className:`rounded-sm bg-gold-bg px-2 py-0.5 text-xs font-bold text-gold-deep`,children:[e.length,` waiting for you`]}):null,(0,J.jsx)(`span`,{className:`ml-auto flex h-6 w-6 shrink-0 items-center justify-center rounded bg-white/15 transition-colors group-hover:bg-white/30`,"aria-hidden":`true`,children:(0,J.jsx)(Eu,{size:16,className:`transition-transform duration-200 motion-reduce:transition-none ${t?`rotate-180`:``}`})})]}),(0,J.jsx)(`span`,{className:`absolute inset-y-0 right-12 my-auto h-fit transition-opacity duration-200 motion-reduce:transition-none ${t?`opacity-100`:`invisible opacity-0`}`,children:(0,J.jsx)(`button`,{className:`${X(`info`)} shrink-0 gap-1.5`,onClick:()=>i(!r),tabIndex:t?0:-1,title:r?`Restore the drawer (Esc)`:`Fill the screen below the top bar`,children:r?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(Ff,{size:14,"aria-hidden":`true`}),`Restore`]}):(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(Cf,{size:14,"aria-hidden":`true`}),`Full screen`]})})})]}),S.mounted?(0,J.jsxs)(`div`,{inert:!t,className:`flex min-h-0 grow flex-col overflow-hidden ${w}`,style:{flexBasis:S.shown?C:0,maxHeight:x?`100vh`:`calc(100vh - ${cP}px)`},children:[x?null:(0,J.jsx)(`div`,{role:`separator`,"aria-orientation":`horizontal`,title:`Drag to resize, double-click to switch between the default and the largest size`,className:`group flex h-2.5 shrink-0 cursor-row-resize items-center justify-center bg-line-mid transition-colors hover:bg-theme`,onPointerDown:e=>{let t=Math.min(u,lP());_(!0),qp(e,(e,n)=>d(Kp(t-n,nP,lP())),()=>_(!1))},onDoubleClick:()=>d(u>=lP()-1?tP:lP()),children:(0,J.jsx)(`span`,{className:`h-0.5 w-10 rounded-full bg-ink-3 group-hover:bg-white`})}),s?(0,J.jsxs)(`div`,{className:`flex items-center gap-3 border-b border-seal/40 bg-seal-bg px-3 py-2 text-sm text-seal-deep`,children:[(0,J.jsx)(`span`,{children:s}),(0,J.jsx)(`button`,{className:`ml-auto text-xs underline`,onClick:c,children:`dismiss`})]}):null,(0,J.jsxs)(`div`,{className:`flex min-h-0 flex-1`,children:[(0,J.jsxs)(`div`,{className:`relative shrink-0 overflow-hidden ${w}`,style:{width:m?sP:f+oP},children:[(0,J.jsxs)(`div`,{inert:m,className:`flex h-full ${w} ${m?`opacity-0`:`opacity-100`}`,style:{width:f+oP},children:[(0,J.jsxs)(`div`,{className:`flex shrink-0 flex-col`,style:{width:f},children:[(0,J.jsxs)(`div`,{className:`flex items-center border-b border-line-mid px-3 py-1 text-xs text-ink-2`,children:[(0,J.jsxs)(`span`,{children:[v.length,` jobs`]}),(0,J.jsx)(`button`,{className:`ml-auto rounded-sm px-1 py-0.5 hover:bg-warm hover:text-ink`,onClick:()=>h(!0),title:`Hide the job list`,"aria-label":`Hide the job list`,children:(0,J.jsx)(vu,{size:14,"aria-hidden":`true`})})]}),(0,J.jsxs)(`ul`,{className:`min-h-0 flex-1 overflow-auto`,children:[v.length===0?(0,J.jsx)(`li`,{className:`p-3 text-sm text-ink-2`,children:`No jobs yet.`}):null,v.map(e=>(0,J.jsx)(`li`,{children:(0,J.jsxs)(`button`,{onClick:()=>o(e.id),className:`block w-full border-b border-line px-3 py-2 text-left hover:bg-warm ${e.id===a?`bg-theme-bg`:``}`,children:[(0,J.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,J.jsx)(Hy,{status:e.status,needsInput:e.resultState===`needs-input`,missingResult:e.kind===`ai`&&e.status!==`running`&&e.status!==`interrupted`&&e.resultState===null,awaitingUser:!!e.awaitingUser,answered:!!Fc(v,e.id)}),e.continuesJobId?(0,J.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-xs text-ink-2`,title:`Continues job ${e.continuesJobId}`,children:[(0,J.jsx)(Ku,{size:12,"aria-hidden":`true`}),`continues `,e.continuesJobId.slice(0,6)]}):null]}),(0,J.jsx)(`div`,{className:`mt-1 truncate font-mono text-xs text-ink`,title:e.command,children:e.command}),(0,J.jsx)(`div`,{className:`text-xs text-ink-2`,children:Xy(e.startedAt)})]})},e.id))]})]}),(0,J.jsx)(`div`,{role:`separator`,"aria-orientation":`vertical`,title:`Drag to resize the job list`,className:`shrink-0 cursor-col-resize bg-line-mid transition-colors hover:bg-theme`,style:{width:oP},onPointerDown:e=>{let t=f;_(!0),qp(e,e=>p(Kp(t+e,iP,aP)),()=>_(!1))},onDoubleClick:()=>p(rP)})]}),(0,J.jsx)(`button`,{className:`absolute inset-y-0 left-0 w-7 border-r border-line-mid bg-card text-xs text-ink-2 hover:bg-warm hover:text-ink ${w} ${m?`opacity-100`:`pointer-events-none opacity-0`}`,tabIndex:m?0:-1,onClick:()=>h(!1),title:`Show the job list`,"aria-label":`Show the job list`,children:(0,J.jsx)(Su,{size:14,className:`mx-auto`,"aria-hidden":`true`})})]}),y?(0,J.jsx)(eP,{job:y,showOpenInTab:!0,openJob:o},y.id):(0,J.jsx)(`div`,{className:`flex flex-1 items-center justify-center text-sm text-ink-2`,children:`Select a job to see its output.`})]})]}):null]})}function dP(){let e=Uc(),t=Wc(),n=Gc(),r=zc(),i=t===`denied`,a=e&&t===`granted`,o=r?i?`# Notifications are blocked
|
|
193
193
|
Allow them for this site in the browser settings, then click again.`:n?`# Notifications are on, but the system hides them
|
|
194
|
-
This browser may not show notifications: allow it in the notifications settings of the operating system.`:`# Notifications: ${a?`on`:`off`}\nShows a notification when
|
|
194
|
+
This browser may not show notifications: allow it in the notifications settings of the operating system.`:`# Notifications: ${a?`on`:`off`}\nShows a notification when a run ends, while this tab is in the background. Whatever waits for you (a login, a step in the browser window that an AI run hands to you, questions that need your answers) is a desktop notification from asrun instead, wherever you are.`:`# Notifications
|
|
195
195
|
This browser does not support notifications.`;return(0,J.jsx)(`button`,{onClick:()=>void Yc(!a),...Wy(i),disabled:!r||i,"aria-pressed":a,"aria-label":a?`Turn notifications off`:`Turn notifications on`,title:o,className:`flex items-center rounded p-1.5 transition-colors disabled:cursor-not-allowed disabled:opacity-50 ${a?`bg-theme-bg text-theme-ink`:`text-ink-2 hover:bg-warm hover:text-ink`}`,children:a?(0,J.jsx)(nu,{size:18,"aria-hidden":`true`}):(0,J.jsx)(Ql,{size:18,"aria-hidden":`true`})})}var fP=e=>`asrun-ui.ai-model.${e}`,pP=new Map,mP=new Set;function hP(e){let t=pP.get(e);if(t)return t;let n={chosen:!1,model:``};try{let t=localStorage.getItem(fP(e));t!==null&&(n={chosen:!0,model:t})}catch{}return pP.set(e,n),n}function gP(e){let t=t=>{(t.key===null||t.key.startsWith(`asrun-ui.ai-model.`))&&(pP.clear(),e())};return mP.add(e),window.addEventListener(`storage`,t),()=>{mP.delete(e),window.removeEventListener(`storage`,t)}}function _P(e){return[(0,q.useSyncExternalStore)(gP,()=>hP(e),()=>hP(e)),(0,q.useCallback)(t=>{pP.set(e,{chosen:!0,model:t});try{localStorage.setItem(fP(e),t)}catch{}mP.forEach(e=>e())},[e])]}function vP(e){let[t]=_P(e),n=vl(e);return t.chosen?t.model||void 0:n.data?.suggested??void 0}function yP(e,t){return t===`claude`?e:e.split(`#`)[0].split(`/`).pop()||e}var bP=`asrun-ui.ai-tool`,xP=new Set,SP=null;function CP(){try{let e=localStorage.getItem(bP);return cc.find(t=>t===e)??null}catch{return null}}function wP(){return SP??CP()??`claude`}function TP(e){let t=t=>{(t.key===null||t.key===bP)&&(SP=CP()??SP,e())};return xP.add(e),window.addEventListener(`storage`,t),()=>{xP.delete(e),window.removeEventListener(`storage`,t)}}function EP(){return[(0,q.useSyncExternalStore)(TP,wP,()=>lc),(0,q.useCallback)(e=>{SP=e;try{localStorage.setItem(bP,e)}catch{}xP.forEach(e=>e())},[])]}var DP={claude:{label:`Follow Claude Code`,detail:`Whatever Claude Code is set to run from its own settings, which is what it does outside asrun too.`},opencode:{label:`Follow OpenCode (its built-in free model)`,detail:`OpenCode then takes its built-in free model, which has a daily usage limit and is not the model its TUI last used.`}},OP={alias:`Aliases`,settings:`Configured for this CLI`},kP=e=>OP[e]??e;function AP(){let[e]=EP(),[t,n]=_P(e),r=vl(e),i=ht(),[a,o]=(0,q.useState)(!1),[s,c]=(0,q.useState)(!1),[l,u]=(0,q.useState)(``),[d,f]=(0,q.useState)(0),p=(0,q.useRef)(null),m=r.data,h=t.chosen?t.model:m?.suggested??``,g=h?yP(h,e):`Default (${uc[e]})`,_=(0,q.useMemo)(()=>[{kind:`cli`},...(m?.models??[]).map(e=>({kind:`model`,model:e}))],[m]),v=(0,q.useMemo)(()=>{let t=l.trim().toLowerCase();return t===``?_:_.filter(n=>n.kind===`cli`?DP[e].label.toLowerCase().includes(t):[n.model.id,n.model.label,n.model.group,n.model.detail??``].some(e=>e.toLowerCase().includes(t)))},[_,l,e]),y=()=>{u(``);let e=_.findIndex(e=>e.kind===`cli`?h===``:e.model.id===h);f(e===-1?0:e),o(!0)};(0,q.useEffect)(()=>{a&&f(e=>Math.max(0,Math.min(e,v.length-1)))},[v.length,a]);let b=e=>p.current?.querySelector(`[data-row="${e}"]`)?.scrollIntoView({block:`nearest`}),x=e=>{n(e.kind===`cli`?``:e.model.id),o(!1)},S=e=>{if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault();let t=Math.max(0,Math.min(v.length-1,d+(e.key===`ArrowDown`?1:-1)));f(t),b(t)}else if(e.key===`Enter`){e.preventDefault();let t=v[d];t&&x(t)}},C=async()=>{c(!0);try{i.setQueryData(ul.aiModels(e),await sc.aiModels(e,!0))}catch{}finally{c(!1)}},w=``;return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`button`,{onClick:y,title:`# Model (now: ${h||`whatever ${uc[e]} is set to`})\nChooses the model the AI commands run with, out of the models this CLI has on this machine. The choice is remembered for each CLI.`,className:`flex max-w-[15rem] items-center gap-1.5 rounded bg-card px-2.5 py-1.5 text-sm text-ink-2 ring-1 ring-line-mid transition-colors hover:bg-warm hover:text-ink`,children:(0,J.jsx)(`span`,{className:`truncate`,children:g})}),a?(0,J.jsx)(Zy,{title:`Model for ${uc[e]}`,onClose:()=>o(!1),footer:(0,J.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-ink-3`,children:[(0,J.jsx)(`span`,{children:r.isPending?`Reading the models…`:`${m?.models.length??0} model(s), read from ${uc[e]} on this machine`}),(0,J.jsxs)(`button`,{className:`${X()} ml-auto gap-1.5`,onClick:()=>void C(),disabled:s,title:`Read the list again, after adding a provider or signing one in.`,children:[(0,J.jsx)(tp,{size:13,"aria-hidden":`true`,className:s?`animate-spin`:``}),s?`Reading`:`Refresh`]})]}),children:(0,J.jsxs)(`div`,{className:`space-y-3`,children:[(0,J.jsx)(`input`,{className:`${Uy} w-full`,placeholder:`Search a provider or a model`,value:l,autoFocus:!0,onChange:e=>{u(e.target.value),f(0)},onKeyDown:S}),r.error?(0,J.jsx)(`p`,{className:`rounded border border-seal/40 bg-seal-bg px-2 py-1.5 text-xs text-seal-deep`,children:r.error.message}):null,m?.error?(0,J.jsx)(`p`,{className:`rounded border border-seal/40 bg-seal-bg px-2 py-1.5 text-xs text-seal-deep`,children:m.error}):null,(m?.notes??[]).map(e=>(0,J.jsx)(`p`,{className:`rounded border border-gold-deep/30 bg-gold-bg px-2 py-1.5 text-xs text-gold-deep`,children:e},e)),(0,J.jsxs)(`div`,{ref:p,className:`max-h-[24rem] overflow-y-auto rounded border border-line-mid`,children:[v.length===0?(0,J.jsx)(`p`,{className:`px-3 py-4 text-sm text-ink-3`,children:r.isPending?`Reading the models…`:`No model matches that search.`}):null,v.map((t,n)=>{let r=t.kind===`cli`,i=t.kind===`model`?t.model.group:``,a=!r&&i!==w?kP(i):null;r||(w=i);let o=r?h===``:t.model.id===h,s=r?DP[e].label:t.model.label,c=r?DP[e].detail:t.model.detail;return(0,J.jsxs)(`div`,{children:[a?(0,J.jsx)(`p`,{className:`sticky top-0 border-y border-line bg-warm px-3 py-1 text-[11px] font-bold tracking-wider text-ink-3`,children:a.toUpperCase()}):null,(0,J.jsxs)(`button`,{"data-row":n,onClick:()=>x(t),onMouseEnter:()=>f(n),"aria-current":o,className:`flex w-full items-start gap-2 px-3 py-2 text-left text-sm transition-colors ${n===d?`bg-theme-bg`:`hover:bg-warm`}`,children:[(0,J.jsx)(`span`,{className:`mt-0.5 w-4 shrink-0 text-theme-btn`,children:o?(0,J.jsx)(uu,{size:14}):null}),(0,J.jsxs)(`span`,{className:`min-w-0`,children:[(0,J.jsx)(`span`,{className:`block truncate text-ink`,children:s}),!r&&t.model.id!==s?(0,J.jsx)(`span`,{className:`block truncate font-mono text-[11px] text-ink-3`,children:t.model.id}):null,c?(0,J.jsx)(`span`,{className:`block text-[11px] text-ink-3`,children:c}):null]})]})]},r?`cli`:t.model.id)})]}),e===`opencode`&&h===``?(0,J.jsx)(`p`,{className:`text-xs text-seal-deep`,children:`Without a model, OpenCode runs its built-in free model, which has a daily limit.`}):null,(0,J.jsxs)(`p`,{className:`text-xs text-ink-3`,children:[`The list comes from `,uc[e],` itself, so it follows the providers you add or sign in to. Only a model listed here can be run.`]})]})}):null]})}var jP=`asrun-ui.ai-thinking`,MP=null,NP=new Set;function PP(){try{return localStorage.getItem(jP)===`on`}catch{return!1}}function FP(){return MP??PP()}function IP(e){let t=t=>{(t.key===null||t.key===jP)&&(MP=PP(),e())};return NP.add(e),window.addEventListener(`storage`,t),()=>{NP.delete(e),window.removeEventListener(`storage`,t)}}function LP(){return[(0,q.useSyncExternalStore)(IP,FP,()=>!1),(0,q.useCallback)(e=>{MP=e;try{localStorage.setItem(jP,e?`on`:`off`)}catch{}NP.forEach(e=>e())},[])]}var RP=`# Show thinking
|
|
196
196
|
Turns thinking on for the AI runs: the model is asked to think, and the job log shows it dimmed, before the agent acts.
|
|
197
197
|
It costs extra tokens and makes a run slower, so it is off unless you turn it on.`,zP=`# Show thinking
|
|
@@ -222,7 +222,7 @@ Pick the one that is installed and logged in on this machine. Your choice is rem
|
|
|
222
222
|
4. Finish with pnpm typecheck and pnpm asrun --env <env> --profile ${e}, then summarize what changed and what
|
|
223
223
|
is still open. Keep "email: false" for the new profile. Cases that write data must not run in production without my
|
|
224
224
|
explicit permission.`;function bF({onAdded:e,envs:t}){let n=ht(),[r,i]=(0,q.useState)(``),[a,o]=(0,q.useState)(``),[s,c]=(0,q.useState)(`staging`),[l,u]=(0,q.useState)(``),[d,f]=(0,q.useState)(``),[p,m]=(0,q.useState)(``),[h,g]=(0,q.useState)(``),[_,v]=(0,q.useState)(``),[y,b]=(0,q.useState)(ZP),[x,S]=(0,q.useState)(!1),C=Hn({mutationFn:()=>sc.addProfile({id:r,name:a,env:s,baseURL:cF(l),account:d.trim()||void 0,tags:p.split(`,`).map(e=>e.trim()).filter(Boolean),startPath:h.trim()||void 0,sessionCheckPath:_||void 0,sessionCheck:nF(y),email:s!==`production`&&x}),onSuccess:t=>{n.invalidateQueries({queryKey:ul.profiles}),n.invalidateQueries({queryKey:ul.info}),i(``),o(``),u(``),f(``),m(``),g(``),v(``),b(ZP),S(!1),e(t.id)}}),w=_F.test(r),T=_F.test(s),E=/^https?:\/\/[^/\s]+\/?$/.test(cF(l)),D=h.trim(),O=D===``||D.startsWith(`/`)&&!D.startsWith(`//`)&&!/\s/.test(D),k=w&&T&&a.trim()!==``&&E&&O&&(!_||_.startsWith(`/`))&&tF(y)===null,A=`mt-1 w-full ${Uy}`;return(0,J.jsxs)(`form`,{className:`grid gap-4 sm:grid-cols-2`,onSubmit:e=>{e.preventDefault(),k&&C.mutate()},children:[(0,J.jsxs)(`label`,{className:`text-sm`,children:[(0,J.jsx)(`span`,{className:`text-ink`,children:`Profile id`}),(0,J.jsx)(`input`,{className:`${A} font-mono`,value:r,onChange:e=>i(e.target.value),placeholder:`example-staging`}),(0,J.jsx)(`span`,{className:`text-xs ${r&&!w?`text-seal-deep`:`text-ink-2`}`,children:`Lowercase letters, digits and single dashes. Cannot be changed later.`})]}),(0,J.jsxs)(`label`,{className:`text-sm`,children:[(0,J.jsx)(`span`,{className:`text-ink`,children:`Name`}),(0,J.jsx)(`input`,{className:A,value:a,onChange:e=>o(e.target.value),placeholder:`Example (staging)`})]}),(0,J.jsxs)(`div`,{className:`text-sm`,children:[(0,J.jsx)(`span`,{className:`text-ink`,children:`Environment`}),(0,J.jsx)(uF,{value:s,onChange:c,envs:t,invalid:s!==``&&!T,className:`mt-1 w-full`}),(0,J.jsx)(`span`,{className:`text-xs ${s&&!T?`text-seal-deep`:`text-ink-2`}`,children:`Anything other than staging is protected for cases that write data.`})]}),(0,J.jsxs)(`label`,{className:`text-sm`,children:[(0,J.jsx)(`span`,{className:`text-ink`,children:`Base URL`}),(0,J.jsx)(`input`,{className:A,value:l,onChange:e=>u(e.target.value),onBlur:()=>l.trim()&&u(cF(l)),placeholder:`https://staging.example.com`}),(0,J.jsx)(`span`,{className:`text-xs ${l&&!E?`text-seal-deep`:`text-ink-2`}`,children:`Only the site address, no path. https:// is added when you leave it out.`})]}),(0,J.jsxs)(`label`,{className:`text-sm`,children:[(0,J.jsx)(`span`,{className:`text-ink`,children:`Account (optional)`}),(0,J.jsx)(`input`,{className:A,value:d,onChange:e=>f(e.target.value),placeholder:`qa@example.com`}),(0,J.jsx)(`span`,{className:`text-xs text-ink-2`,children:`A label for people. Never a password; logins stay in .auth/.`})]}),(0,J.jsxs)(`label`,{className:`text-sm`,children:[(0,J.jsx)(`span`,{className:`text-ink`,children:`Start path (optional)`}),(0,J.jsx)(`input`,{className:`${A} font-mono`,value:h,onChange:e=>g(e.target.value),placeholder:`/app/home`}),(0,J.jsx)(`span`,{className:`text-xs ${O?`text-ink-2`:`text-seal-deep`}`,children:`The page "Visit" opens. Empty opens the site root.`})]}),(0,J.jsxs)(`label`,{className:`text-sm`,children:[(0,J.jsx)(`span`,{className:`text-ink`,children:`Tags (optional)`}),(0,J.jsx)(`input`,{className:`${A} font-mono`,value:p,onChange:e=>m(e.target.value),placeholder:`us, core`}),(0,J.jsx)(`span`,{className:`text-xs text-ink-2`,children:`Comma-separated lowercase words, to group profiles and run one group.`})]}),(0,J.jsxs)(`label`,{className:`text-sm`,children:[(0,J.jsx)(`span`,{className:`text-ink`,children:`Session check path (optional)`}),(0,J.jsx)(`input`,{className:`${A} font-mono`,value:_,onChange:e=>v(e.target.value),placeholder:`/account/`}),(0,J.jsx)(`span`,{className:`text-xs text-ink-2`,children:`A page only a signed-in visitor sees; "Verify" opens it.`})]}),(0,J.jsx)(rF,{draft:y,onChange:e=>b(t=>({...t,...e}))}),(0,J.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,title:s===`production`?`Production never sends email: a test may not send mail there, so this stays off.`:void 0,children:[(0,J.jsx)(`input`,{type:`checkbox`,checked:x,disabled:s===`production`,onChange:e=>S(e.target.checked)}),(0,J.jsx)(`span`,{className:`text-ink`,children:`A real mailbox is connected; tests may send email`})]}),(0,J.jsxs)(`div`,{className:`flex items-center gap-3 sm:col-span-2`,children:[(0,J.jsx)(`button`,{className:X(`primary`),disabled:!k||C.isPending,children:C.isPending?`Adding...`:`Add profile`}),(0,J.jsx)(`span`,{className:`text-xs text-ink-2`,children:`Appends an entry to profiles.yaml. Existing entries and comments stay untouched.`})]}),C.isError?(0,J.jsx)(`p`,{className:`text-sm text-seal-deep sm:col-span-2`,children:C.error.message}):null]})}function xF({n:e,title:t,children:n}){return(0,J.jsxs)(`li`,{className:`flex gap-3`,children:[(0,J.jsx)(`span`,{className:`mt-0.5 flex h-6 w-6 shrink-0 items-center justify-center rounded-sm bg-theme-bg font-serif text-xs text-theme-ink ring-1 ring-theme/40`,children:e}),(0,J.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-2 text-sm text-ink`,children:[(0,J.jsx)(`div`,{className:`font-serif text-ink`,children:t}),n]})]})}function SF({profileIds:e,envs:t}){let[n,r]=(0,q.useState)(!1),[i,a]=(0,q.useState)(null),[o,s]=(0,q.useState)(null),c=o??i??e[e.length-1]??`<profile-id>`;return(0,J.jsxs)(`section`,{className:`card-paper mt-6`,children:[(0,J.jsxs)(`button`,{className:`flex w-full items-center gap-3 px-4 py-3 text-left`,onClick:()=>r(!n),"aria-expanded":n,children:[(0,J.jsx)(`span`,{className:`font-serif`,children:`Add a new profile`}),(0,J.jsx)(`span`,{className:`text-sm text-ink-2`,children:`another environment or site, step by step`}),(0,J.jsx)(`span`,{className:`ml-auto text-ink-3`,children:(0,J.jsx)(mu,{size:16,className:`transition-transform duration-200 motion-reduce:transition-none ${n?``:`-rotate-90`}`,"aria-hidden":`true`})})]}),(0,J.jsx)($p,{open:n,children:(0,J.jsxs)(`div`,{className:`space-y-6 border-t border-line-mid p-4`,children:[i?(0,J.jsxs)(`div`,{className:`rounded border border-jade-deep/40 bg-jade-bg px-3 py-2 text-sm text-jade-btn`,children:[`Profile `,(0,J.jsx)(`code`,{className:`font-mono`,children:i}),` was added. Continue with steps 2 to 4 below.`]}):null,(0,J.jsxs)(`ol`,{className:`space-y-6`,children:[(0,J.jsxs)(xF,{n:1,title:`Tell AsRun about the new environment`,children:[(0,J.jsx)(`p`,{children:`Fill in the form; AsRun writes the entry for you:`}),(0,J.jsx)(`div`,{className:`rounded border border-line-mid bg-warm p-4`,children:(0,J.jsx)(bF,{envs:t,onAdded:e=>(a(e),s(null))})}),(0,J.jsxs)(`details`,{className:`text-sm`,children:[(0,J.jsx)(`summary`,{className:`cursor-pointer text-ink-2`,children:`Prefer to edit the file by hand?`}),(0,J.jsxs)(`div`,{className:`mt-2 space-y-2`,children:[(0,J.jsxs)(`p`,{children:[`Append an entry to the `,(0,J.jsx)(`code`,{children:`profiles`}),` list in `,(0,J.jsx)(`code`,{children:`profiles.yaml`}),`. Each entry is one environment and becomes one Playwright project, so every test runs once per profile. No code changes needed.`]}),(0,J.jsx)(UP,{text:vF}),(0,J.jsxs)(`p`,{children:[`Profiles hold connection settings only. Expected values belong to the case that checks them (its`,` `,(0,J.jsx)(`code`,{children:`## Values`}),` block).`]})]})]})]}),(0,J.jsx)(xF,{n:2,title:`Log in the new profile`,children:(0,J.jsxs)(`p`,{children:[`Click `,(0,J.jsx)(`b`,{children:`Log in`}),` in the table above, log in yourself in the browser window (2FA included), then press`,` `,(0,J.jsx)(`b`,{children:`Done, save the session`}),` on the card in that window. Every case that runs as this profile uses that saved login.`]})}),(0,J.jsxs)(xF,{n:3,title:`Give each case the values for this profile`,children:[(0,J.jsxs)(`p`,{children:[`A case that checks something that differs per environment needs the value for `,(0,J.jsx)(`code`,{children:c}),`: the page title, the logo, a label. Two ways:`]}),(0,J.jsxs)(`ul`,{className:`list-disc space-y-1 pl-5`,children:[(0,J.jsxs)(`li`,{children:[`By hand: open the case on the`,` `,(0,J.jsx)(Ks,{to:`/cases`,className:`text-theme-ink underline decoration-theme/50 underline-offset-2 hover:decoration-theme`,children:`Cases page`}),` `,`and fill in its `,(0,J.jsx)(`b`,{children:`Values`}),` section. A case with no value for a profile cannot be checked there.`]}),(0,J.jsx)(`li`,{children:`With the AI (recommended): the agent opens the real pages as this profile and writes the values. Paste the prompt below into Claude Code or OpenCode, started in the asrun workspace.`})]}),(0,J.jsxs)(`div`,{className:`flex items-center gap-2 pt-1 text-xs text-ink-2`,children:[`Profile in the prompt`,(0,J.jsxs)(Yy,{value:c,onChange:s,"aria-label":`Profile in the prompt`,mono:!0,children:[e.length===0?(0,J.jsx)(`option`,{children:`<profile-id>`}):null,e.map(e=>(0,J.jsx)(`option`,{value:e,children:e},e))]})]}),(0,J.jsx)(UP,{text:yF(c)}),(0,J.jsxs)(`p`,{className:`text-xs text-ink-2`,children:[`To only check one case against the new profile first, run `,(0,J.jsx)(`code`,{children:`/explore-case <case-id>`}),` (see the`,` `,(0,J.jsx)(Ks,{to:`/guide`,className:`text-theme-ink underline decoration-theme/50 underline-offset-2 hover:decoration-theme`,children:`AI guide`}),`). It reports the missing values and edits only that case file.`]})]}),(0,J.jsx)(xF,{n:4,title:`Check the result and run it`,children:(0,J.jsxs)(`ul`,{className:`list-disc space-y-1 pl-5`,children:[(0,J.jsxs)(`li`,{children:[`Open the new screenshots in the snapshots folder of the case and confirm each one shows the right thing for `,(0,J.jsx)(`code`,{children:c}),`. A screenshot baseline is what the test compares against.`]}),(0,J.jsxs)(`li`,{children:[`Run this profile on the`,` `,(0,J.jsx)(Ks,{to:`/run`,className:`text-theme-ink underline decoration-theme/50 underline-offset-2 hover:decoration-theme`,children:`Run tests page`}),`, then read the`,` `,(0,J.jsx)(Ks,{to:`/reports`,className:`text-theme-ink underline decoration-theme/50 underline-offset-2 hover:decoration-theme`,children:`report`}),`.`]})]})})]})]})})]})}var CF=32,wF=8;function TF({label:e,busy:t=!1,busyLabel:n=`Checking...`,items:r}){let i=(0,q.useRef)(null),a=(0,q.useRef)(null),[o,s]=(0,q.useState)(null),c=()=>s(null);(0,q.useEffect)(()=>{t&&s(null)},[t]),(0,q.useEffect)(()=>{if(!o)return;let e=e=>{let t=e.target;i.current?.contains(t)||a.current?.contains(t)||c()},t=e=>{e.key===`Escape`&&(c(),i.current?.focus())};return window.addEventListener(`mousedown`,e),window.addEventListener(`keydown`,t),window.addEventListener(`resize`,c),window.addEventListener(`scroll`,c,!0),()=>{window.removeEventListener(`mousedown`,e),window.removeEventListener(`keydown`,t),window.removeEventListener(`resize`,c),window.removeEventListener(`scroll`,c,!0)}},[o]);let l=()=>{let e=i.current?.getBoundingClientRect();if(!e)return;let t=r.length*CF+wF;s({top:Math.max(8,Math.min(e.bottom+4,window.innerHeight-t-8)),right:Math.max(8,window.innerWidth-e.right)})};return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`button`,{ref:i,className:X(),disabled:t,title:t?n:e,"aria-label":t?n:e,"aria-haspopup":`menu`,"aria-expanded":!t&&o!==null,"aria-busy":t||void 0,onClick:()=>t?void 0:o?c():l(),children:t?(0,J.jsx)(tp,{size:16,className:`animate-spin motion-reduce:animate-none`,"aria-hidden":`true`}):(0,J.jsx)(zf,{size:16,"aria-hidden":`true`})}),o?(0,nc.createPortal)((0,J.jsx)(`div`,{ref:a,role:`menu`,"aria-label":e,style:{top:o.top,right:o.right},className:`card-popup fixed z-50 min-w-[11rem] p-1`,children:r.map(e=>(0,J.jsxs)(`button`,{type:`button`,role:`menuitem`,...Wy(!!e.disabledReason),disabled:!!e.disabledReason,title:e.disabledReason,onClick:()=>{c(),e.onSelect()},className:[`flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-left text-sm transition-colors duration-150`,`disabled:cursor-not-allowed disabled:opacity-50`,e.danger?`text-seal-deep hover:bg-seal-bg`:`text-ink hover:bg-warm disabled:hover:bg-transparent`].filter(Boolean).join(` `),children:[(0,J.jsx)(`span`,{className:`shrink-0`,"aria-hidden":`true`,children:e.icon}),e.label,e.disabledReason?(0,J.jsx)(df,{size:12,className:`ml-auto shrink-0`,"aria-hidden":`true`}):null]},e.label))}),document.body):null]})}var EF=(e,t)=>[`inline-flex h-6 items-center gap-1 rounded-sm px-1.5 text-xs transition-colors`,`focus-visible:ring-2 focus-visible:ring-theme/40 focus-visible:outline-none`,e?`font-medium ring-1 ring-inset ${t??`bg-theme-btn text-white ring-theme-btn`}`:`bg-card text-ink-2 ring-1 ring-line-mid ring-inset hover:bg-warm hover:text-ink`].join(` `);function DF({label:e,options:t,selected:n,onChange:r,allLabel:i=`All`,allCount:a}){let o=e=>r(n.includes(e)?n.filter(t=>t!==e):[...n,e]);return(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1`,role:`group`,"aria-label":e,children:[(0,J.jsx)(`span`,{className:`mr-0.5 text-xs text-ink-3`,children:e}),(0,J.jsxs)(`button`,{type:`button`,className:EF(n.length===0),"aria-pressed":n.length===0,title:n.length===0?`Every ${e.toLowerCase()}`:`Clear the ${e.toLowerCase()} filter`,onClick:()=>r([]),children:[i,a===void 0?null:(0,J.jsx)(`span`,{className:`opacity-70`,children:a})]}),t.map(e=>{let t=n.includes(e.value);return(0,J.jsxs)(`button`,{type:`button`,className:EF(t,e.tone),"aria-pressed":t,title:e.count===void 0?`${e.value}${t?` (pressed: click to stop filtering by it)`:``}`:`${e.value}: ${e.count} profile${e.count===1?``:`s`}${t?` (pressed: click to stop filtering by it)`:``}`,onClick:()=>o(e.value),children:[e.label??e.value,e.count===void 0?null:(0,J.jsx)(`span`,{className:t?`text-white/75`:`text-ink-3`,children:e.count})]},e.value)})]})}function OF({value:e,onChange:t,placeholder:n,ariaLabel:r,className:i=``}){return(0,J.jsxs)(`div`,{className:`relative ${i}`,children:[(0,J.jsx)(lp,{size:14,className:`pointer-events-none absolute top-1/2 left-2.5 -translate-y-1/2 text-ink-3`,"aria-hidden":`true`}),(0,J.jsx)(`input`,{type:`search`,value:e,onChange:e=>t(e.target.value),onKeyDown:e=>{e.key===`Escape`&&t(``)},placeholder:n,"aria-label":r,spellCheck:!1,className:`${Uy} block h-8 w-full py-0 pr-8 pl-8 [&::-webkit-search-cancel-button]:hidden`}),e?(0,J.jsx)(`button`,{type:`button`,className:`absolute top-1/2 right-2 -translate-y-1/2 rounded p-0.5 text-ink-3 hover:text-ink focus-visible:ring-2 focus-visible:ring-theme/25 focus-visible:outline-none`,"aria-label":`Clear the search`,title:`Clear the search`,onClick:()=>t(``),children:(0,J.jsx)(Gp,{size:14,"aria-hidden":`true`})}):null]})}function kF(e){let t=[e.id,e.name,e.account??``,e.env,...e.tags];return e.baseURL&&t.push(e.baseURL,AF(e.baseURL)),t.map(e=>e.toLowerCase())}function AF(e){try{return new URL(e).host}catch{return``}}var jF=e=>e.toLowerCase().replace(/[^a-z0-9]/g,``);function MF(e,t){let n=t.trim().toLowerCase().split(/\s+/).filter(Boolean);if(n.length===0)return!0;let r=kF(e),i=r.map(jF);return n.every(e=>{if(r.some(t=>t.includes(e)))return!0;let t=jF(e);return t!==``&&i.some(e=>e.includes(t))})}function NF(e){return[...new Set(e.map(e=>e.env))].sort((e,t)=>e===`production`?-1:t===`production`?1:e.localeCompare(t))}function PF({profile:e}){return(0,J.jsxs)(`div`,{className:`space-y-1`,children:[(0,J.jsx)(`div`,{className:`text-xs text-ink-2`,children:e.account??(0,J.jsx)(`span`,{className:`text-ink-3`,children:`no account label`})}),e.tags.length>0?(0,J.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:e.tags.map(e=>(0,J.jsx)(`span`,{className:`rounded-sm bg-warm px-1.5 py-0.5 font-mono text-xs text-ink-2 ring-1 ring-line-mid`,children:e},e))}):null]})}function FF({profile:e,onClose:t,onDone:n}){let r=ht(),i=Hn({mutationFn:()=>sc.logoutProfile(e.id),onSuccess:e=>{r.setQueryData(ul.profiles,e),n()}});return(0,J.jsxs)(Zy,{title:`Log out ${e.id}?`,onClose:t,footer:(0,J.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,J.jsx)(`button`,{type:`button`,className:X(),onClick:t,children:`Cancel`}),(0,J.jsx)(`button`,{type:`button`,className:X(`stop`),disabled:i.isPending,onClick:()=>i.mutate(),children:i.isPending?`Logging out...`:`Log out`})]}),children:[(0,J.jsxs)(`p`,{className:`text-sm text-ink-2`,children:[`The saved login of`,` `,(0,J.jsx)(`code`,{className:`font-mono text-ink`,children:e.id}),` (the session file in `,(0,J.jsx)(`code`,{className:`font-mono text-ink`,children:`.auth/`}),`) is deleted. Nothing else changes. Visit and the tests cannot use this profile until you log in again by hand.`]}),i.isError?(0,J.jsx)(`p`,{className:`mt-2 text-sm text-seal-deep`,children:i.error.message}):null]})}function IF({profile:e,lastOne:t,onClose:n,onDone:r}){let i=ht(),a=Hn({mutationFn:()=>sc.deleteProfile(e.id),onSuccess:e=>{i.setQueryData(ul.profiles,e),i.invalidateQueries({queryKey:ul.info}),r()}});return(0,J.jsx)(Zy,{title:`Delete ${e.id}?`,onClose:n,footer:(0,J.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,J.jsx)(`button`,{type:`button`,className:X(),onClick:n,children:`Cancel`}),(0,J.jsx)(`button`,{type:`button`,className:X(`stop`),disabled:a.isPending,onClick:()=>a.mutate(),children:a.isPending?`Deleting...`:`Delete profile`})]}),children:(0,J.jsxs)(`div`,{className:`space-y-2 text-sm text-ink-2`,children:[(0,J.jsxs)(`p`,{children:[`The entry of`,` `,(0,J.jsx)(`code`,{className:`font-mono text-ink`,children:e.id}),` is removed from `,(0,J.jsx)(`code`,{className:`font-mono text-ink`,children:`profiles.yaml`}),`, and its saved login (the session file in`,` `,(0,J.jsx)(`code`,{className:`font-mono text-ink`,children:`.auth/`}),`) is deleted. Nothing else in the file changes.`]}),(0,J.jsx)(`p`,{children:`Screenshot baselines and old reports keep the profile id in their names; they stay on disk. Delete those files by hand if you want them gone.`}),t?(0,J.jsx)(`p`,{className:`rounded border border-gold-deep/40 bg-gold-bg px-3 py-2 text-gold-deep`,children:`This is the only profile. Tests cannot run until another one is added under "Add a new profile".`}):null,a.isError?(0,J.jsx)(`p`,{className:`text-seal-deep`,children:a.error.message}):null]})})}function LF(){let e=pl(),t=gl(),n=ht(),{startJob:r,selectJob:i}=xl(),[a,o]=(0,q.useState)(null),[s,c]=(0,q.useState)(null),[l,u]=(0,q.useState)(null),[d,f]=(0,q.useState)(null),[p,m]=(0,q.useState)(null),h=Hn({mutationFn:e=>sc.verifyProfiles(e),onSuccess:e=>n.setQueryData(ul.profiles,e)}),g=e=>t.data?.find(t=>t.kind===`signin`&&t.profile===e&&t.status===`running`),_=e=>t.data?.find(t=>t.kind===`visit`&&t.profile===e&&t.status===`running`),v=Hn({mutationFn:e=>sc.cancelJob(e),onSettled:()=>void n.invalidateQueries({queryKey:ul.jobs})}),y=e.data?.profiles??[],[b,x]=(0,q.useState)(``),[S,C]=(0,q.useState)([]),[w,T]=(0,q.useState)([]),E=(0,q.useMemo)(()=>NF(y),[y]),D=(0,q.useMemo)(()=>[...new Set(y.flatMap(e=>e.tags))].sort(),[y]),O=(0,q.useMemo)(()=>new Map(E.map(e=>[e,y.filter(t=>t.env===e).length])),[y,E]),k=(0,q.useMemo)(()=>new Map(D.map(e=>[e,y.filter(t=>t.tags.includes(e)).length])),[y,D]),A=(0,q.useMemo)(()=>y.filter(e=>(S.length===0||S.includes(e.env))&&(w.length===0||w.some(t=>e.tags.includes(t)))&&MF(e,b)),[y,S,w,b]),j=b.trim()!==``||S.length>0||w.length>0,M=()=>{x(``),C([]),T([])},N=t.data?.some(e=>e.kind===`run`&&e.status===`running`)??!1;return(0,J.jsxs)(`div`,{className:`mx-auto max-w-5xl p-6`,children:[(0,J.jsxs)(`div`,{className:`mb-4 flex items-center gap-3`,children:[(0,J.jsx)(`h1`,{className:`font-serif text-2xl tracking-wide border-l-4 border-theme pl-3`,children:`Profiles`}),(0,J.jsx)(`span`,{className:`text-sm text-ink-2`,children:`one row per profile`}),(0,J.jsx)(`button`,{className:`${X()} ml-auto`,onClick:()=>h.mutate(void 0),disabled:e.data?.verifying||h.isPending,children:e.data?.verifying?`Checking sessions...`:`Re-check all sessions`})]}),e.isError?(0,J.jsx)(`p`,{className:`text-seal-deep`,children:e.error.message}):null,p?(0,J.jsxs)(`div`,{className:`mb-4 flex items-start gap-2 rounded border px-3 py-2 text-sm ${p.error?`border-seal/40 bg-seal-bg text-seal-deep`:`border-jade-deep/40 bg-jade-bg text-jade-btn`}`,children:[(0,J.jsx)(`span`,{className:`flex-1`,children:p.text}),(0,J.jsx)(`button`,{className:`rounded p-1 hover:bg-white/40 ${p.error?`text-seal-deep`:`text-jade-btn`}`,title:`Dismiss`,"aria-label":`Dismiss`,onClick:()=>m(null),children:(0,J.jsx)(Gp,{size:14,"aria-hidden":`true`})})]}):null,(0,J.jsxs)(`div`,{className:`card-paper overflow-hidden`,children:[(0,J.jsxs)(`div`,{className:`space-y-2 border-b border-line bg-warm px-3 py-2`,children:[(0,J.jsx)(OF,{className:`w-full`,value:b,onChange:x,placeholder:`Search id, name, account, tag...`,ariaLabel:`Search profiles`}),(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-4 gap-y-2`,children:[(0,J.jsx)(DF,{label:`Env`,allCount:y.length,options:E.map(e=>({value:e,label:e.toUpperCase(),count:O.get(e)??0,tone:Py(e)})),selected:S,onChange:C}),D.length>0?(0,J.jsx)(DF,{label:`Tag`,options:D.map(e=>({value:e,count:k.get(e)??0})),selected:w,onChange:T}):null]}),j?(0,J.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-ink-2`,children:[(0,J.jsxs)(`span`,{children:[`Showing `,A.length,` of `,y.length,` profiles`]}),(0,J.jsx)(`button`,{type:`button`,className:`underline underline-offset-2 hover:text-ink`,onClick:M,children:`Clear filters`})]}):null]}),(0,J.jsxs)(`table`,{className:`w-full text-left text-sm`,children:[(0,J.jsx)(`thead`,{className:`border-b border-line-mid bg-warm text-xs tracking-widest text-ink-2 uppercase`,children:(0,J.jsxs)(`tr`,{children:[(0,J.jsx)(`th`,{className:`px-4 py-2`,children:`Profile`}),(0,J.jsx)(`th`,{className:`px-4 py-2`,children:`Environment`}),(0,J.jsx)(`th`,{className:`px-4 py-2`,children:`Account`}),(0,J.jsx)(`th`,{className:`px-4 py-2`,children:`Login`}),(0,J.jsx)(`th`,{className:`px-4 py-2`,children:`Session saved`}),(0,J.jsx)(`th`,{className:`px-4 py-2 text-right`,children:`Actions`})]})}),(0,J.jsxs)(`tbody`,{className:`divide-y divide-line`,children:[e.isSuccess&&y.length===0?(0,J.jsx)(`tr`,{children:(0,J.jsx)(`td`,{colSpan:6,className:`px-4 py-6 text-center text-sm text-ink-2`,children:`No profiles yet: add one under "Add a new profile" below.`})}):e.isSuccess&&A.length===0?(0,J.jsx)(`tr`,{children:(0,J.jsxs)(`td`,{colSpan:6,className:`px-4 py-6 text-center text-sm text-ink-2`,children:[`No profile matches these filters.`,` `,(0,J.jsx)(`button`,{type:`button`,className:`underline underline-offset-2 hover:text-ink`,onClick:M,children:`Clear filters`})]})}):null,A.map(e=>{let t=g(e.id),n=_(e.id),a=e.status===`missing`||e.status===`expired`,s=e.status===`ok`,l=e.status!==`missing`,d=N?`Wait for the running test run to finish`:void 0,p=[];return s&&(p.push({label:`Verify`,icon:(0,J.jsx)(tp,{size:14,"aria-hidden":`true`}),disabledReason:d??(t?`A login is in progress for this profile`:void 0),onSelect:()=>h.mutate({profile:e.id,env:e.env})}),p.push({label:`Re-login`,icon:(0,J.jsx)(hf,{size:14,"aria-hidden":`true`}),disabledReason:d??(n?`Close the browser of this profile first`:t?`A login is in progress for this profile`:void 0),onSelect:()=>void r({action:`signin`,profile:e.id,env:e.env})})),l&&p.push({label:`Logout`,icon:(0,J.jsx)(yf,{size:14,"aria-hidden":`true`}),danger:!0,disabledReason:d??(n?`Close the browser of this profile first`:t?`A login is in progress for this profile`:void 0),onSelect:()=>f(e)}),p.push({label:`Duplicate`,icon:(0,J.jsx)(Hu,{size:14,"aria-hidden":`true`}),disabledReason:d,onSelect:()=>c(e)}),p.push({label:`Delete`,icon:(0,J.jsx)(Np,{size:14,"aria-hidden":`true`}),danger:!0,disabledReason:d??(n?`Close the browser of this profile first`:t?`A login is in progress for this profile`:void 0),onSelect:()=>u(e)}),(0,J.jsxs)(`tr`,{children:[(0,J.jsxs)(`td`,{className:`px-4 py-2`,children:[(0,J.jsx)(`div`,{className:`font-medium text-ink`,children:e.name}),(0,J.jsx)(`div`,{className:`font-mono text-xs text-ink-2`,children:e.id})]}),(0,J.jsxs)(`td`,{className:`px-4 py-2`,children:[(0,J.jsx)(Fy,{env:e.env}),(0,J.jsx)(`div`,{className:`mt-1 text-xs text-ink-2`,children:new URL(e.baseURL).host})]}),(0,J.jsx)(`td`,{className:`px-4 py-2`,children:(0,J.jsx)(PF,{profile:e})}),(0,J.jsxs)(`td`,{className:`px-4 py-2`,children:[e.verifying?(0,J.jsx)(`span`,{className:`text-xs text-ink-2`,children:`checking...`}):(0,J.jsx)(By,{status:e.status}),e.error?(0,J.jsx)(`div`,{className:`mt-1 text-xs text-ink-2`,children:e.error}):null]}),(0,J.jsx)(`td`,{className:`px-4 py-2 text-ink-2`,children:Xy(e.savedAt)}),(0,J.jsx)(`td`,{className:`px-4 py-2`,children:(0,J.jsxs)(`div`,{className:`flex items-center justify-end gap-2`,children:[(0,J.jsxs)(`button`,{className:`${X()} gap-1.5`,disabled:N||!!t||!!n,title:N?`Wait for the running test run to finish`:t?`A login is in progress for this profile`:n?`Close the browser of this profile first`:`Change the fields of this profile`,onClick:()=>o(e),children:[(0,J.jsx)(id,{size:14,"aria-hidden":`true`}),`Edit`]}),t?(0,J.jsxs)(`button`,{className:`${X(`primary`)} gap-1.5`,title:`Login in progress, click to show the browser job`,onClick:()=>i(t.id),children:[(0,J.jsx)(sf,{size:14,"aria-hidden":`true`}),`Waiting`]}):null,!t&&!s?(0,J.jsxs)(`button`,{className:`${X(a?`primary`:`secondary`)} gap-1.5`,disabled:N,title:N?`Wait for the running test run to finish`:`Open a browser window to log in`,onClick:()=>void r({action:`signin`,profile:e.id,env:e.env}),children:[(0,J.jsx)(hf,{size:14,"aria-hidden":`true`}),`Login`]}):null,n?(0,J.jsxs)(`button`,{className:`${X(`stop`)} gap-1.5`,disabled:v.isPending,title:`Forcibly close the browser opened by Visit`,onClick:()=>v.mutate(n.id),children:[(0,J.jsx)(Vp,{size:14,"aria-hidden":`true`}),`Close`]}):s?(0,J.jsxs)(`button`,{className:`${X()} gap-1.5`,title:e.startPath?`Open a logged-in browser window at ${e.startPath} in ${e.env}`:`Open a logged-in browser window at the site root in ${e.env}`,onClick:()=>void r({action:`visit`,profile:e.id,env:e.env}),children:[(0,J.jsx)(fd,{size:14,"aria-hidden":`true`}),`Visit`]}):null,!s&&l&&!e.verifying?(0,J.jsxs)(`button`,{className:`${X()} gap-1.5`,title:`Check that the saved session is still logged in`,onClick:()=>h.mutate({profile:e.id,env:e.env}),children:[(0,J.jsx)(tp,{size:14,"aria-hidden":`true`}),`Verify`]}):null,p.length>0?(0,J.jsx)(TF,{label:`More actions for ${e.id}`,busy:e.verifying,busyLabel:`Checking the session of ${e.id}...`,items:p}):null]})})]},e.id)})]})]})]}),(0,J.jsxs)(`ul`,{className:`mt-3 space-y-1 text-xs text-ink-2`,children:[(0,J.jsxs)(`li`,{children:[(0,J.jsx)(`b`,{className:`text-ink`,children:`Login`}),` opens a browser window on this machine; you log in yourself, 2FA included. Nothing is automated. A card in the bottom-left corner of that window saves the session when you press Done.`]}),(0,J.jsxs)(`li`,{children:[(0,J.jsx)(`b`,{className:`text-ink`,children:`Visit`}),` opens a logged-in browser window at the profile's start path, to look at the site as that profile.`]}),(0,J.jsxs)(`li`,{children:[(0,J.jsx)(`b`,{className:`text-ink`,children:`Verify`}),` checks that a saved login still works, without changing anything: it opens the session check path and waits for the signal set under `,(0,J.jsx)(`b`,{children:`Edit`}),` → `,(0,J.jsx)(`b`,{children:`Session check`}),` (a redirect to the signed-out address, a 401/403, a signed-in-only element). A logged-in row keeps`,` `,(0,J.jsx)(`b`,{children:`Re-login`}),` and `,(0,J.jsx)(`b`,{children:`Logout`}),` under its "..." menu; `,(0,J.jsx)(`b`,{children:`Logout`}),` deletes the saved login.`]}),(0,J.jsxs)(`li`,{children:[(0,J.jsx)(`b`,{className:`text-ink`,children:`Duplicate`}),` adds a second profile with the same settings under a new id; the saved login is not copied. `,(0,J.jsx)(`b`,{className:`text-ink`,children:`Delete`}),` removes the profile from`,` `,(0,J.jsx)(`code`,{className:`font-mono text-ink`,children:`profiles.yaml`}),` and deletes its saved login. Both sit in the "..." menu of every row.`]})]}),(0,J.jsx)(SF,{profileIds:[...new Set(y.map(e=>e.id))],envs:e.data?.envs??[]}),a?(0,J.jsx)(gF,{profile:a,envs:e.data?.envs??[],onClose:()=>o(null),onSaved:e=>{o(null),m({text:e})}}):null,d?(0,J.jsx)(FF,{profile:d,onClose:()=>f(null),onDone:()=>{let e=d.id;f(null),m({text:`Profile "${e}" logged out. Its saved login was deleted; log in again before visiting it or running its tests.`})}}):null,s?(0,J.jsx)(oF,{profile:s,profileIds:y.map(e=>e.id),onClose:()=>c(null),onDone:e=>{c(null),m({text:`Profile "${e}" was added as a copy. Log in to it before visiting it or running its tests.`})}}):null,l?(0,J.jsx)(IF,{profile:l,lastOne:y.length===1,onClose:()=>u(null),onDone:()=>{let e=l.id;u(null),m({text:`Profile "${e}" was deleted: its entry and its saved login are gone.`})}}):null,(0,J.jsx)(qP,{})]})}function RF(){return RF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},RF.apply(null,arguments)}function zF(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var BF=e=>{let{state:t}=e,n=t.doc.lineAt(t.selection.main.from),r=GF(e.state,n.from);return r.line?HF(e):r.block?WF(e):!1};function VF(e,t){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=e(t,n);return i?(r(n.update(i)),!0):!1}}var HF=VF(XF,0),UF=VF(YF,0),WF=VF((e,t)=>YF(e,t,JF(t)),0);function GF(e,t){let n=e.languageDataAt(`commentTokens`,t,1);return n.length?n[0]:{}}var KF=50;function qF(e,{open:t,close:n},r,i){let a=e.sliceDoc(r-KF,r),o=e.sliceDoc(i,i+KF),s=/\s*$/.exec(a)[0].length,c=/^\s*/.exec(o)[0].length,l=a.length-s;if(a.slice(l-t.length,l)==t&&o.slice(c,c+n.length)==n)return{open:{pos:r-s,margin:s&&1},close:{pos:i+c,margin:c&&1}};let u,d;i-r<=100?u=d=e.sliceDoc(r,i):(u=e.sliceDoc(r,r+KF),d=e.sliceDoc(i-KF,i));let f=/^\s*/.exec(u)[0].length,p=/\s*$/.exec(d)[0].length,m=d.length-p-n.length;return u.slice(f,f+t.length)==t&&d.slice(m,m+n.length)==n?{open:{pos:r+f+t.length,margin:+!!/\s/.test(u.charAt(f+t.length))},close:{pos:i-p-n.length,margin:+!!/\s/.test(d.charAt(m-1))}}:null}function JF(e){let t=[];for(let n of e.selection.ranges){let r=e.doc.lineAt(n.from),i=n.to<=r.to?r:e.doc.lineAt(n.to);i.from>r.from&&i.from==n.to&&(i=n.to==r.to+1?r:e.doc.lineAt(n.to-1));let a=t.length-1;a>=0&&t[a].to>r.from?t[a].to=i.to:t.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return t}function YF(e,t,n=t.selection.ranges){let r=n.map(e=>GF(t,e.from).block);if(!r.every(e=>e))return null;let i=n.map((e,n)=>qF(t,r[n],e.from,e.to));if(e!=2&&!i.every(e=>e))return{changes:t.changes(n.map((e,t)=>i[t]?[]:[{from:e.from,insert:r[t].open+` `},{from:e.to,insert:` `+r[t].close}]))};if(e!=1&&i.some(e=>e)){let e=[];for(let t=0,n;t<i.length;t++)if(n=i[t]){let i=r[t],{open:a,close:o}=n;e.push({from:a.pos-i.open.length,to:a.pos+a.margin},{from:o.pos-o.margin,to:o.pos+i.close.length})}return{changes:e}}return null}function XF(e,t,n=t.selection.ranges){let r=[],i=-1;ranges:for(let{from:e,to:a}of n){let n=r.length,o=1e9,s;for(let n=e;n<=a;){let c=t.doc.lineAt(n);if(s==null&&(s=GF(t,c.from).line,!s))continue ranges;if(c.from>i&&(e==a||a>c.from)){i=c.from;let e=/^\s*/.exec(c.text)[0].length,t=e==c.length,n=c.text.slice(e,e+s.length)==s?e:-1;e<c.text.length&&e<o&&(o=e),r.push({line:c,comment:n,token:s,indent:e,empty:t,single:!1})}n=c.to+1}if(o<1e9)for(let e=n;e<r.length;e++)r[e].indent<r[e].line.text.length&&(r[e].indent=o);r.length==n+1&&(r[n].single=!0)}if(e!=2&&r.some(e=>e.comment<0&&(!e.empty||e.single))){let e=[];for(let{line:t,token:n,indent:i,empty:a,single:o}of r)(o||!a)&&e.push({from:t.from+i,insert:n+` `});let n=t.changes(e);return{changes:n,selection:t.selection.map(n,1)}}if(e!=1&&r.some(e=>e.comment>=0)){let e=[];for(let{line:t,comment:n,token:i}of r)if(n>=0){let r=t.from+n,a=r+i.length;t.text[a-t.from]==` `&&a++,e.push({from:r,to:a})}return{changes:e}}return null}var ZF=V.define(),QF=V.define(),$F=u.define(),eI=u.define({combine(e){return j(e,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,r)=>e(n,r)||t(n,r)})}}),tI=w.define({create(){return bI.empty},update(e,t){let n=t.state.facet(eI),r=t.annotation(ZF);if(r){let i=cI.fromTransaction(t,r.selection),a=r.side,o=a==0?e.undone:e.done;return o=i?lI(o,o.length,n.minDepth,i):hI(o,t.startState.selection),new bI(a==0?r.rest:o,a==0?o:r.rest)}let i=t.annotation(QF);if((i==`full`||i==`before`)&&(e=e.isolate()),t.annotation(f.addToHistory)===!1)return t.changes.empty?e:e.addMapping(t.changes.desc);let a=cI.fromTransaction(t),o=t.annotation(f.time),s=t.annotation(f.userEvent);return a?e=e.addChanges(a,o,s,n,t):t.selection&&(e=e.addSelection(t.startState.selection,o,s,n.newGroupDelay)),(i==`full`||i==`after`)&&(e=e.isolate()),e},toJSON(e){return{done:e.done.map(e=>e.toJSON()),undone:e.undone.map(e=>e.toJSON())}},fromJSON(e){return new bI(e.done.map(cI.fromJSON),e.undone.map(cI.fromJSON))}});function nI(e={}){return[tI,eI.of(e),R.domEventHandlers({beforeinput(e,t){let n=e.inputType==`historyUndo`?iI:e.inputType==`historyRedo`?aI:null;return n?(e.preventDefault(),n(t)):!1}})]}function rI(e,t){return function({state:n,dispatch:r}){if(!t&&n.readOnly)return!1;let i=n.field(tI,!1);if(!i)return!1;let a=i.pop(e,n,t);return a?(r(a),!0):!1}}var iI=rI(0,!1),aI=rI(1,!1),oI=rI(0,!0),sI=rI(1,!0),cI=class e{constructor(e,t,n,r,i){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=r,this.selectionsAfter=i}setSelAfter(t){return new e(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){return{changes:this.changes?.toJSON(),mapped:this.mapped?.toJSON(),startSelection:this.startSelection?.toJSON(),selectionsAfter:this.selectionsAfter.map(e=>e.toJSON())}}static fromJSON(t){return new e(t.changes&&N.fromJSON(t.changes),[],t.mapped&&We.fromJSON(t.mapped),t.startSelection&&G.fromJSON(t.startSelection),t.selectionsAfter.map(G.fromJSON))}static fromTransaction(t,n){let r=pI;for(let e of t.startState.facet($F)){let n=e(t);n.length&&(r=r.concat(n))}return!r.length&&t.changes.empty?null:new e(t.changes.invert(t.startState.doc),r,void 0,n||t.startState.selection,pI)}static selection(t){return new e(void 0,pI,void 0,void 0,t)}};function lI(e,t,n,r){let i=t+1>n+20?t-n-1:0,a=e.slice(i,t);return a.push(r),a}function uI(e,t){let n=[],r=!1;return e.iterChangedRanges((e,t)=>n.push(e,t)),t.iterChangedRanges((e,t,i,a)=>{for(let e=0;e<n.length;){let t=n[e++],o=n[e++];a>=t&&i<=o&&(r=!0)}}),r}function dI(e,t){return e.ranges.length==t.ranges.length&&e.ranges.filter((e,n)=>e.empty!=t.ranges[n].empty).length===0}function fI(e,t){return e.length?t.length?e.concat(t):e:t}var pI=[],mI=200;function hI(e,t){if(e.length){let n=e[e.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-mI));return r.length&&r[r.length-1].eq(t)?e:(r.push(t),lI(e,e.length-1,1e9,n.setSelAfter(r)))}return[cI.selection([t])]}function gI(e){let t=e[e.length-1],n=e.slice();return n[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),n}function _I(e,t){if(!e.length)return e;let n=e.length,r=pI;for(;n;){let i=vI(e[n-1],t,r);if(i.changes&&!i.changes.empty||i.effects.length){let t=e.slice(0,n);return t[n-1]=i,t}t=i.mapped,n--,r=i.selectionsAfter}return r.length?[cI.selection(r)]:pI}function vI(e,t,n){let r=fI(e.selectionsAfter.length?e.selectionsAfter.map(e=>e.map(t)):pI,n);if(!e.changes)return cI.selection(r);let i=e.changes.map(t),a=t.mapDesc(e.changes,!0),o=e.mapped?e.mapped.composeDesc(a):a;return new cI(i,S.mapEffects(e.effects,t),o,e.startSelection.map(a),r)}var yI=/^(input\.type|delete)($|\.)/,bI=class e{constructor(e,t,n=0,r=void 0){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=r}isolate(){return this.prevTime?new e(this.done,this.undone):this}addChanges(t,n,r,i,a){let o=this.done,s=o[o.length-1];return o=s&&s.changes&&!s.changes.empty&&t.changes&&(!r||yI.test(r))&&(!s.selectionsAfter.length&&n-this.prevTime<i.newGroupDelay&&i.joinToEvent(a,uI(s.changes,t.changes))||r==`input.type.compose`)?lI(o,o.length-1,i.minDepth,new cI(t.changes.compose(s.changes),fI(S.mapEffects(t.effects,s.changes),s.effects),s.mapped,s.startSelection,pI)):lI(o,o.length,i.minDepth,t),new e(o,pI,n,r)}addSelection(t,n,r,i){let a=this.done.length?this.done[this.done.length-1].selectionsAfter:pI;return a.length>0&&n-this.prevTime<i&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&dI(a[a.length-1],t)?this:new e(hI(this.done,t),this.undone,n,r)}addMapping(t){return new e(_I(this.done,t),_I(this.undone,t),this.prevTime,this.prevUserEvent)}pop(e,t,n){let r=e==0?this.done:this.undone;if(r.length==0)return null;let i=r[r.length-1],a=i.selectionsAfter[0]||(i.startSelection?i.startSelection.map(i.changes.invertedDesc,1):t.selection);if(n&&i.selectionsAfter.length)return t.update({selection:i.selectionsAfter[i.selectionsAfter.length-1],annotations:ZF.of({side:e,rest:gI(r),selection:a}),userEvent:e==0?`select.undo`:`select.redo`,scrollIntoView:!0});if(i.changes){let n=r.length==1?pI:r.slice(0,r.length-1);return i.mapped&&(n=_I(n,i.mapped)),t.update({changes:i.changes,selection:i.startSelection,effects:i.effects,annotations:ZF.of({side:e,rest:n,selection:a}),filter:!1,userEvent:e==0?`undo`:`redo`,scrollIntoView:!0})}return null}};bI.empty=new bI(pI,pI);var xI=[{key:`Mod-z`,run:iI,preventDefault:!0},{key:`Mod-y`,mac:`Mod-Shift-z`,run:aI,preventDefault:!0},{linux:`Ctrl-Shift-z`,run:aI,preventDefault:!0},{key:`Mod-u`,run:oI,preventDefault:!0},{key:`Alt-u`,mac:`Mod-Shift-u`,run:sI,preventDefault:!0}];function SI(e,t){return G.create(e.ranges.map(t),e.mainIndex)}function CI(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:`select`})}function wI({state:e,dispatch:t},n){let r=SI(e.selection,n);return!r.eq(e.selection,!0)&&(t(CI(e,r)),!0)}function TI(e,t){return G.cursor(t?e.to:e.from)}function EI(e,t){return wI(e,n=>n.empty?e.moveByChar(n,t):TI(n,t))}function DI(e){return e.textDirectionAt(e.state.selection.main.head)==z.LTR}var OI=e=>EI(e,!DI(e)),kI=e=>EI(e,DI(e));function AI(e,t){return wI(e,n=>n.empty?e.moveByGroup(n,t):TI(n,t))}var jI=e=>AI(e,!DI(e)),MI=e=>AI(e,DI(e));typeof Intl<`u`&&Intl.Segmenter;function NI(e,t,n){if(t.type.prop(n))return!0;let r=t.to-t.from;return r&&(r>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function PI(e,t,n){let r=d(e).resolveInner(t.head),i=n?I.closedBy:I.openedBy;for(let a=t.head;;){let t=n?r.childAfter(a):r.childBefore(a);if(!t)break;NI(e,t,i)?r=t:a=n?t.to:t.from}let a=r.type.prop(i),o,s;return s=a&&(o=n?x(e,r.from,1):x(e,r.to,-1))&&o.matched?n?o.end.to:o.end.from:n?r.to:r.from,G.cursor(s,n?-1:1)}var FI=e=>wI(e,t=>PI(e.state,t,!DI(e))),II=e=>wI(e,t=>PI(e.state,t,DI(e)));function LI(e,t){return wI(e,n=>{if(!n.empty)return TI(n,t);let r=e.moveVertically(n,t);return r.head==n.head?e.moveToLineBoundary(n,t):r})}var RI=e=>LI(e,!1),zI=e=>LI(e,!0);function BI(e){let t=e.scrollDOM.clientHeight<e.scrollDOM.scrollHeight-2,n=0,r=0,i;if(t){for(let t of e.state.facet(R.scrollMargins)){let i=t(e);i?.top&&(n=Math.max(i?.top,n)),i?.bottom&&(r=Math.max(i?.bottom,r))}i=e.scrollDOM.clientHeight-n-r}else i=(e.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:r,selfScroll:t,height:Math.max(e.defaultLineHeight,i-5)}}function VI(e,t){let n=BI(e),{state:r}=e,i=SI(r.selection,r=>r.empty?e.moveVertically(r,t,n.height):TI(r,t));if(i.eq(r.selection))return!1;let a;if(n.selfScroll){let t=e.coordsAtPos(r.selection.main.head),o=e.scrollDOM.getBoundingClientRect(),s=o.top+n.marginTop,c=o.bottom-n.marginBottom;t&&t.top>s&&t.bottom<c&&(a=R.scrollIntoView(i.main.head,{y:`start`,yMargin:t.top-s}))}return e.dispatch(CI(r,i),{effects:a}),!0}var HI=e=>VI(e,!1),UI=e=>VI(e,!0);function WI(e,t,n){let r=e.lineBlockAt(t.head),i=e.moveToLineBoundary(t,n);if(i.head==t.head&&i.head!=(n?r.to:r.from)&&(i=e.moveToLineBoundary(t,n,!1)),!n&&i.head==r.from&&r.length){let n=/^\s*/.exec(e.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;n&&t.head!=r.from+n&&(i=G.cursor(r.from+n))}return i}var GI=e=>wI(e,t=>WI(e,t,!0)),KI=e=>wI(e,t=>WI(e,t,!1)),qI=e=>wI(e,t=>WI(e,t,!DI(e))),JI=e=>wI(e,t=>WI(e,t,DI(e))),YI=e=>wI(e,t=>e.moveToLineBoundary(t,!1,!1)),XI=e=>wI(e,t=>e.moveToLineBoundary(t,!0,!1));function ZI(e,t,n){let r=!1,i=SI(e.selection,t=>{let i=x(e,t.head,-1)||x(e,t.head,1)||t.head>0&&x(e,t.head-1,1)||t.head<e.doc.length&&x(e,t.head+1,-1);if(!i||!i.end)return t;r=!0;let a=i.start.from==t.head?i.end.to:i.end.from;return n?G.range(t.anchor,a):G.cursor(a)});return r?(t(CI(e,i)),!0):!1}var QI=({state:e,dispatch:t})=>ZI(e,t,!1);function $I(e,t,n){let r=SI(e.state.selection,e=>{e.undirectional&&e.head>=e.anchor!=t&&(e=G.range(e.head,e.anchor));let r=n(e);return G.range(e.anchor,r.head,r.goalColumn,r.bidiLevel||void 0,r.assoc)});return!r.eq(e.state.selection)&&(e.dispatch(CI(e.state,r)),!0)}function eL(e,t){return $I(e,t,n=>e.moveByChar(n,t))}var tL=e=>eL(e,!DI(e)),nL=e=>eL(e,DI(e));function rL(e,t){return $I(e,t,n=>e.moveByGroup(n,t))}var iL=e=>rL(e,!DI(e)),aL=e=>rL(e,DI(e)),oL=e=>{let t=!DI(e);return $I(e,t,n=>PI(e.state,n,t))},sL=e=>{let t=DI(e);return $I(e,t,n=>PI(e.state,n,t))};function cL(e,t){return $I(e,t,n=>e.moveVertically(n,t))}var lL=e=>cL(e,!1),uL=e=>cL(e,!0);function dL(e,t){return $I(e,t,n=>e.moveVertically(n,t,BI(e).height))}var fL=e=>dL(e,!1),pL=e=>dL(e,!0),mL=e=>$I(e,!0,t=>WI(e,t,!0)),hL=e=>$I(e,!1,t=>WI(e,t,!1)),gL=e=>{let t=!DI(e);return $I(e,t,n=>WI(e,n,t))},_L=e=>{let t=DI(e);return $I(e,t,n=>WI(e,n,t))},vL=e=>$I(e,!1,t=>G.cursor(e.lineBlockAt(t.head).from)),yL=e=>$I(e,!0,t=>G.cursor(e.lineBlockAt(t.head).to)),bL=({state:e,dispatch:t})=>(t(CI(e,{anchor:0})),!0),xL=({state:e,dispatch:t})=>(t(CI(e,{anchor:e.doc.length})),!0),SL=({state:e,dispatch:t})=>(t(CI(e,{anchor:e.selection.main.anchor,head:0})),!0),CL=({state:e,dispatch:t})=>(t(CI(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0),wL=({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:`select`})),!0),TL=({state:e,dispatch:t})=>{let n=WL(e).map(({from:t,to:n})=>G.undirectionalRange(t,Math.min(n+1,e.doc.length)));return t(e.update({selection:G.create(n),userEvent:`select`})),!0},EL=({state:e,dispatch:t})=>{let n=SI(e.selection,t=>{let n=d(e),r=n.resolveStack(t.from,1);if(t.empty){let e=n.resolveStack(t.from,-1);e.node.from>=r.node.from&&e.node.to<=r.node.to&&(r=e)}for(let e=r;e;e=e.next){let{node:n}=e;if((n.from<t.from&&n.to>=t.to||n.to>t.to&&n.from<=t.from)&&e.next)return G.undirectionalRange(n.from,n.to)}return t});return!n.eq(e.selection)&&(t(CI(e,n)),!0)};function DL(e,t){let{state:n}=e,r=n.selection,i=n.selection.ranges.slice();for(let r of n.selection.ranges){let a=n.doc.lineAt(r.head);if(t?a.to<e.state.doc.length:a.from>0)for(let n=r;;){let r=e.moveVertically(n,t);if(r.head<a.from||r.head>a.to){i.some(e=>e.head==r.head)||i.push(r);break}if(r.head==n.head)break;n=r}}return i.length!=r.ranges.length&&(e.dispatch(CI(n,G.create(i,i.length-1))),!0)}var OL=e=>DL(e,!1),kL=e=>DL(e,!0),AL=({state:e,dispatch:t})=>{let n=e.selection,r=null;return n.ranges.length>1?r=G.create([n.main]):n.main.empty||(r=G.create([G.cursor(n.main.head)])),r?(t(CI(e,r)),!0):!1};function jL(e,t){if(e.state.readOnly)return!1;let n=`delete.selection`,{state:r}=e,i=r.changeByRange(r=>{let{from:i,to:a}=r;if(i==a){let o=t(r);o<i?(n=`delete.backward`,o=ML(e,o,!1)):o>i&&(n=`delete.forward`,o=ML(e,o,!0)),i=Math.min(i,o),a=Math.max(a,o)}else i=ML(e,i,!1),a=ML(e,a,!0);return i==a?{range:r}:{changes:{from:i,to:a},range:G.cursor(i,i<r.head?-1:1)}});return!i.changes.empty&&(e.dispatch(r.update(i,{scrollIntoView:!0,userEvent:n,effects:n==`delete.selection`?R.announce.of(r.phrase(`Selection deleted`)):void 0})),!0)}function ML(e,t,n){if(e instanceof R)for(let r of e.state.facet(R.atomicRanges).map(t=>t(e)))r.between(t,t,(e,r)=>{e<t&&r>t&&(t=n?r:e)});return t}var NL=(e,t,n)=>jL(e,r=>{let a=r.from,{state:o}=e,s=o.doc.lineAt(a),c,l;if(n&&!t&&a>s.from&&a<s.from+200&&!/[^ \t]/.test(c=s.text.slice(0,a-s.from))){if(c[c.length-1]==` `)return a-1;let e=qe(c,o.tabSize)%P(o)||P(o);for(let t=0;t<e&&c[c.length-1-t]==` `;t++)a--;l=a}else l=i(s.text,a-s.from,t,t)+s.from,l==a&&s.number!=(t?o.doc.lines:1)?l+=t?1:-1:!t&&/[\ufe00-\ufe0f]/.test(s.text.slice(l-s.from,a-s.from))&&(l=i(s.text,l-s.from,!1,!1)+s.from);return l}),PL=e=>NL(e,!1,!0),FL=e=>NL(e,!0,!1),IL=(e,t)=>jL(e,n=>{let r=n.head,{state:a}=e,o=a.doc.lineAt(r),s=a.charCategorizer(r);for(let e=null;;){if(r==(t?o.to:o.from)){r==n.head&&o.number!=(t?a.doc.lines:1)&&(r+=t?1:-1);break}let c=i(o.text,r-o.from,t)+o.from,l=o.text.slice(Math.min(r,c)-o.from,Math.max(r,c)-o.from),u=s(l);if(e!=null&&u!=e)break;(l!=` `||r!=n.head)&&(e=u),r=c}return r}),LL=e=>IL(e,!1),RL=e=>IL(e,!0),zL=e=>jL(e,t=>{let n=e.lineBlockAt(t.head).to;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)}),BL=e=>jL(e,t=>{let n=e.moveToLineBoundary(t,!1).head;return t.head>n?n:Math.max(0,t.head-1)}),VL=e=>jL(e,t=>{let n=e.moveToLineBoundary(t,!0).head;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)}),HL=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:O.of([``,``])},range:G.cursor(e.from)}));return t(e.update(n,{scrollIntoView:!0,userEvent:`input`})),!0},UL=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(t=>{if(!t.empty||t.from==0||t.from==e.doc.length)return{range:t};let n=t.from,r=e.doc.lineAt(n),a=n==r.from?n-1:i(r.text,n-r.from,!1)+r.from,o=n==r.to?n+1:i(r.text,n-r.from,!0)+r.from;return{changes:{from:a,to:o,insert:e.doc.slice(n,o).append(e.doc.slice(a,n))},range:G.cursor(o)}});return!n.changes.empty&&(t(e.update(n,{scrollIntoView:!0,userEvent:`move.character`})),!0)};function WL(e){let t=[],n=-1;for(let r of e.selection.ranges){let i=e.doc.lineAt(r.from),a=e.doc.lineAt(r.to);if(!r.empty&&r.to==a.from&&(a=e.doc.lineAt(r.to-1)),n>=i.number){let e=t[t.length-1];e.to=a.to,e.ranges.push(r)}else t.push({from:i.from,to:a.to,ranges:[r]});n=a.number+1}return t}function GL(e,t,n){if(e.readOnly)return!1;let r=[],i=[];for(let t of WL(e)){if(n?t.to==e.doc.length:t.from==0)continue;let a=e.doc.lineAt(n?t.to+1:t.from-1),o=a.length+1;if(n){r.push({from:t.to,to:a.to},{from:t.from,insert:a.text+e.lineBreak});for(let n of t.ranges)i.push(G.range(Math.min(e.doc.length,n.anchor+o),Math.min(e.doc.length,n.head+o)))}else{r.push({from:a.from,to:t.from},{from:t.to,insert:e.lineBreak+a.text});for(let e of t.ranges)i.push(G.range(e.anchor-o,e.head-o))}}return r.length?(t(e.update({changes:r,scrollIntoView:!0,selection:G.create(i,e.selection.mainIndex),userEvent:`move.line`})),!0):!1}var KL=({state:e,dispatch:t})=>GL(e,t,!1),qL=({state:e,dispatch:t})=>GL(e,t,!0);function JL(e,t,n){if(e.readOnly)return!1;let r=[];for(let t of WL(e))n?r.push({from:t.from,insert:e.doc.slice(t.from,t.to)+e.lineBreak}):r.push({from:t.to,insert:e.lineBreak+e.doc.slice(t.from,t.to)});let i=e.changes(r);return t(e.update({changes:i,selection:e.selection.map(i,n?1:-1),scrollIntoView:!0,userEvent:`input.copyline`})),!0}var YL=({state:e,dispatch:t})=>JL(e,t,!1),XL=({state:e,dispatch:t})=>JL(e,t,!0),ZL=e=>{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(WL(t).map(({from:e,to:n})=>(e>0?e--:n<t.doc.length&&n++,{from:e,to:n}))),r=SI(t.selection,t=>{let n;if(e.lineWrapping){let r=e.lineBlockAt(t.head),i=e.coordsAtPos(t.head,t.assoc||1);i&&(n=r.bottom+e.documentTop-i.bottom+e.defaultLineHeight/2)}return e.moveVertically(t,!0,n)}).map(n);return e.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:`delete.line`}),!0};function QL(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let n=d(e).resolveInner(t),r=n.childBefore(t),i=n.childAfter(t),a;return r&&i&&r.to<=t&&i.from>=t&&(a=r.type.prop(I.closedBy))&&a.indexOf(i.name)>-1&&e.doc.lineAt(r.to).from==e.doc.lineAt(i.from).from&&!/\S/.test(e.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}var $L=tR(!1),eR=tR(!0);function tR(e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let r=t.changeByRange(n=>{let{from:r,to:i}=n,a=t.doc.lineAt(r),o=!e&&r==i&&QL(t,r);e&&(r=i=(i<=a.to?a:t.doc.lineAt(i)).to);let s=new De(t,{simulateBreak:r,simulateDoubleBreak:!!o}),c=l(s,r);for(c??=qe(/^\s*/.exec(t.doc.lineAt(r).text)[0],t.tabSize);i<a.to&&/\s/.test(a.text[i-a.from]);)i++;o?{from:r,to:i}=o:r>a.from&&r<a.from+100&&!/\S/.test(a.text.slice(0,r))&&(r=a.from);let u=[``,be(t,c)];return o&&u.push(be(t,s.lineIndent(a.from,-1))),{changes:{from:r,to:i,insert:O.of(u)},range:G.cursor(r+1+u[1].length)}});return n(t.update(r,{scrollIntoView:!0,userEvent:`input`})),!0}}function nR(e,t){let n=-1;return e.changeByRange(r=>{let i=[];for(let a=r.from;a<=r.to;){let o=e.doc.lineAt(a);o.number>n&&(r.empty||r.to>o.from)&&(t(o,i,r),n=o.number),a=o.to+1}let a=e.changes(i);return{changes:i,range:G.range(a.mapPos(r.anchor,1),a.mapPos(r.head,1))}})}var rR=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Object.create(null),r=new De(e,{overrideIndentation:e=>n[e]??-1}),i=nR(e,(t,i,a)=>{let o=l(r,t.from);if(o==null)return;/\S/.test(t.text)||(o=0);let s=/^\s*/.exec(t.text)[0],c=be(e,o);(s!=c||a.from<t.from+s.length)&&(n[t.from]=o,i.push({from:t.from,to:t.from+s.length,insert:c}))});return i.changes.empty||t(e.update(i,{userEvent:`indent`})),!0},iR=({state:e,dispatch:n})=>!e.readOnly&&(n(e.update(nR(e,(n,r)=>{r.push({from:n.from,insert:e.facet(t)})}),{userEvent:`input.indent`})),!0),aR=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(nR(e,(t,n)=>{let r=/^\s*/.exec(t.text)[0];if(!r)return;let i=qe(r,e.tabSize),a=0,o=be(e,Math.max(0,i-P(e)));for(;a<r.length&&a<o.length&&r.charCodeAt(a)==o.charCodeAt(a);)a++;n.push({from:t.from+a,to:t.from+r.length,insert:o.slice(a)})}),{userEvent:`delete.dedent`})),!0),oR=e=>(e.setTabFocusMode(),!0),sR=[{key:`Ctrl-b`,run:OI,shift:tL,preventDefault:!0},{key:`Ctrl-f`,run:kI,shift:nL},{key:`Ctrl-p`,run:RI,shift:lL},{key:`Ctrl-n`,run:zI,shift:uL},{key:`Ctrl-a`,run:YI,shift:vL},{key:`Ctrl-e`,run:XI,shift:yL},{key:`Ctrl-d`,run:FL},{key:`Ctrl-h`,run:PL},{key:`Ctrl-k`,run:zL},{key:`Ctrl-Alt-h`,run:LL},{key:`Ctrl-o`,run:HL},{key:`Ctrl-t`,run:UL},{key:`Ctrl-v`,run:UI}],cR=[{key:`ArrowLeft`,run:OI,shift:tL,preventDefault:!0},{key:`Mod-ArrowLeft`,mac:`Alt-ArrowLeft`,run:jI,shift:iL,preventDefault:!0},{mac:`Cmd-ArrowLeft`,run:qI,shift:gL,preventDefault:!0},{key:`ArrowRight`,run:kI,shift:nL,preventDefault:!0},{key:`Mod-ArrowRight`,mac:`Alt-ArrowRight`,run:MI,shift:aL,preventDefault:!0},{mac:`Cmd-ArrowRight`,run:JI,shift:_L,preventDefault:!0},{key:`ArrowUp`,run:RI,shift:lL,preventDefault:!0},{mac:`Cmd-ArrowUp`,run:bL,shift:SL},{mac:`Ctrl-ArrowUp`,run:HI,shift:fL},{key:`ArrowDown`,run:zI,shift:uL,preventDefault:!0},{mac:`Cmd-ArrowDown`,run:xL,shift:CL},{mac:`Ctrl-ArrowDown`,run:UI,shift:pL},{key:`PageUp`,run:HI,shift:fL},{key:`PageDown`,run:UI,shift:pL},{key:`Home`,run:KI,shift:hL,preventDefault:!0},{key:`Mod-Home`,run:bL,shift:SL},{key:`End`,run:GI,shift:mL,preventDefault:!0},{key:`Mod-End`,run:xL,shift:CL},{key:`Enter`,run:$L,shift:$L},{key:`Mod-a`,run:wL},{key:`Backspace`,run:PL,shift:PL,preventDefault:!0},{key:`Delete`,run:FL,preventDefault:!0},{key:`Mod-Backspace`,mac:`Alt-Backspace`,run:LL,preventDefault:!0},{key:`Mod-Delete`,mac:`Alt-Delete`,run:RL,preventDefault:!0},{mac:`Mod-Backspace`,run:BL,preventDefault:!0},{mac:`Mod-Delete`,run:VL,preventDefault:!0}].concat(sR.map(e=>({mac:e.key,run:e.run,shift:e.shift}))),lR=[{key:`Alt-ArrowLeft`,mac:`Ctrl-ArrowLeft`,run:FI,shift:oL},{key:`Alt-ArrowRight`,mac:`Ctrl-ArrowRight`,run:II,shift:sL},{key:`Alt-ArrowUp`,run:KL},{key:`Shift-Alt-ArrowUp`,run:YL},{key:`Alt-ArrowDown`,run:qL},{key:`Shift-Alt-ArrowDown`,run:XL},{key:`Mod-Alt-ArrowUp`,run:OL},{key:`Mod-Alt-ArrowDown`,run:kL},{key:`Escape`,run:AL},{key:`Mod-Enter`,run:eR},{key:`Alt-l`,mac:`Ctrl-l`,run:TL},{key:`Mod-i`,run:EL,preventDefault:!0},{key:`Mod-[`,run:aR},{key:`Mod-]`,run:iR},{key:`Mod-Alt-\\`,run:rR},{key:`Shift-Mod-k`,run:ZL},{key:`Shift-Mod-\\`,run:QI},{key:`Mod-/`,run:BF},{key:`Alt-A`,mac:`Ctrl-A`,run:UF},{key:`Ctrl-m`,mac:`Shift-Alt-m`,run:oR}].concat(cR),uR={key:`Tab`,run:iR,shift:aR},dR=typeof String.prototype.normalize==`function`?e=>e.normalize(`NFKD`):e=>e,fR=class{constructor(e,t,n=0,r=e.length,i,a){this.test=a,this.value={from:0,to:0,precise:!1},this.done=!1,this.matches=[],this.buffer=``,this.bufferPos=0,this.iter=e.iterRange(n,r),this.bufferStart=n,this.normalize=i?e=>i(dR(e)):dR,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return g(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=L(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=b(e);let r=this.normalize(t);if(r.length)for(let e=0,i=n,a=!0;;e++){let n=r.charCodeAt(e),o=this.match(n,i,a,this.bufferPos+this.bufferStart,e==r.length-1);if(o)return this.value=o,this;if(e==r.length-1)break;a&&e<t.length&&t.charCodeAt(e)==n?i++:a=!1}}}match(e,t,n,r,i){let a=null;for(let t=0;t<this.matches.length;){let n=this.matches[t],o=!1;this.query.charCodeAt(n.index)==e&&(n.index==this.query.length-1?a={from:n.from,to:r,precise:i&&n.precise}:(n.index++,o=!0)),o?t++:this.matches.splice(t,1)}return this.query.charCodeAt(0)==e&&(this.query.length==1?a={from:t,to:r,precise:n&&i}:this.matches.push({from:t,index:1,precise:n})),a&&this.test&&!this.test(a.from,a.to,this.buffer,this.bufferStart)&&(a=null),a}};typeof Symbol<`u`&&(fR.prototype[Symbol.iterator]=function(){return this});var pR={from:-1,to:-1,match:/.*/.exec(``),precise:!0},mR=`gm`+(/x/.unicode==null?``:`u`),hR=class{constructor(e,t,n,r=0,i=e.length){if(this.text=e,this.to=i,this.curLine=``,this.done=!1,this.value=pR,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new vR(e,t,n,r,i);this.re=new RegExp(t,mR+(n?.ignoreCase?`i`:``)),this.test=n?.test,this.iter=e.iter();let a=e.lineAt(r);this.curLineStart=a.from,this.matchPos=bR(e,r),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine=``:(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine=``:this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let n=this.curLineStart+t.index,r=n+t[0].length;if(this.matchPos=bR(this.text,r+ +(n==r)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(n<r||n>this.value.to)&&(!this.test||this.test(n,r,t)))return this.value={from:n,to:r,precise:!0,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}},gR=new WeakMap,_R=class e{constructor(e,t){this.from=e,this.text=t}get to(){return this.from+this.text.length}static get(t,n,r){let i=gR.get(t);if(!i||i.from>=r||i.to<=n){let i=new e(n,t.sliceString(n,r));return gR.set(t,i),i}if(i.from==n&&i.to==r)return i;let{text:a,from:o}=i;return o>n&&(a=t.sliceString(n,o)+a,o=n),i.to<r&&(a+=t.sliceString(i.to,r)),gR.set(t,new e(o,a)),new e(n,a.slice(n-o,r-o))}},vR=class{constructor(e,t,n,r,i){this.text=e,this.to=i,this.done=!1,this.value=pR,this.matchPos=bR(e,r),this.re=new RegExp(t,mR+(n?.ignoreCase?`i`:``)),this.test=n?.test,this.flat=_R.get(e,r,this.chunkEnd(r+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let e=this.flat.from+t.index,n=e+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(e,n,t)))return this.value={from:e,to:n,precise:!0,match:t},this.matchPos=bR(this.text,n+ +(e==n)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=_R.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}};typeof Symbol<`u`&&(hR.prototype[Symbol.iterator]=vR.prototype[Symbol.iterator]=function(){return this});function yR(e){try{return new RegExp(e,mR),!0}catch{return!1}}function bR(e,t){if(t>=e.length)return t;let n=e.lineAt(t),r;for(;t<n.to&&(r=n.text.charCodeAt(t-n.from))>=56320&&r<57344;)t++;return t}var xR=e=>{let t=Ne(e,`cm-goto-line`);if(t){let e=t.dom.querySelector(`input[type=text]`);return e&&e.select(),!0}let{state:n}=e,r=String(n.doc.lineAt(e.state.selection.main.head).number),{close:i,result:a}=pe(e,{class:`cm-goto-line`,label:n.phrase(`Go to line`),input:{type:`text`,name:`line`,value:r},focus:!0,submitLabel:n.phrase(`go`)});return a.then(t=>{let r=t&&/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.elements.line.value);if(!r){e.dispatch({effects:i});return}let a=n.doc.lineAt(n.selection.main.head),[,o,s,c,l]=r,u=c?+c.slice(1):0,d=s?+s:a.number;if(s&&l){let e=d/100;o&&(e=e*(o==`-`?-1:1)+a.number/n.doc.lines),d=Math.round(n.doc.lines*e)}else s&&o&&(d=d*(o==`-`?-1:1)+a.number);let f=n.doc.line(Math.max(1,Math.min(n.doc.lines,d))),p=G.cursor(f.from+Math.max(0,Math.min(u,f.length)));e.dispatch({effects:[i,R.scrollIntoView(p.from,{y:`center`})],selection:p})}),!0},SR={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},CR=u.define({combine(e){return j(e,SR,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function wR(e){let t=[AR,kR];return e&&t.push(CR.of(e)),t}var TR=_.mark({class:`cm-selectionMatch`}),ER=_.mark({class:`cm-selectionMatch cm-selectionMatch-main`});function DR(e,t,n,r){return(n==0||e(t.sliceDoc(n-1,n))!=o.Word)&&(r==t.doc.length||e(t.sliceDoc(r,r+1))!=o.Word)}function OR(e,t,n,r){return e(t.sliceDoc(n,n+1))==o.Word&&e(t.sliceDoc(r-1,r))==o.Word}var kR=B.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.selectionSet||e.docChanged||e.viewportChanged)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=e.state.facet(CR),{state:n}=e,r=n.selection;if(r.ranges.length>1)return _.none;let i=r.main,a,o=null;if(i.empty){if(!t.highlightWordAroundCursor)return _.none;let e=n.wordAt(i.head);if(!e)return _.none;o=n.charCategorizer(i.head),a=n.sliceDoc(e.from,e.to)}else{let e=i.to-i.from;if(e<t.minSelectionLength||e>200)return _.none;if(t.wholeWords){if(a=n.sliceDoc(i.from,i.to),o=n.charCategorizer(i.head),!(DR(o,n,i.from,i.to)&&OR(o,n,i.from,i.to)))return _.none}else if(a=n.sliceDoc(i.from,i.to),!a)return _.none}let s=[];for(let r of e.visibleRanges){let e=new fR(n.doc,a,r.from,r.to);for(;!e.next().done;){let{from:r,to:a}=e.value;if((!o||DR(o,n,r,a))&&(i.empty&&r<=i.from&&a>=i.to?s.push(ER.range(r,a)):(r>=i.to||a<=i.from)&&s.push(TR.range(r,a)),s.length>t.maxMatches))return _.none}}return _.set(s)}},{decorations:e=>e.decorations}),AR=R.baseTheme({".cm-selectionMatch":{backgroundColor:`#99ff7780`},".cm-searchMatch .cm-selectionMatch":{backgroundColor:`transparent`}}),jR=({state:e,dispatch:t})=>{let{selection:n}=e,r=G.create(n.ranges.map(t=>e.wordAt(t.head)||G.cursor(t.head)),n.mainIndex);return!r.eq(n)&&(t(e.update({selection:r})),!0)};function MR(e,t){let{main:n,ranges:r}=e.selection,i=e.wordAt(n.head),a=i&&i.from==n.from&&i.to==n.to;for(let n=!1,i=new fR(e.doc,t,r[r.length-1].to);;)if(i.next(),i.done){if(n)return null;i=new fR(e.doc,t,0,Math.max(0,r[r.length-1].from-1)),n=!0}else{if(n&&r.some(e=>e.from==i.value.from))continue;if(a){let t=e.wordAt(i.value.from);if(!t||t.from!=i.value.from||t.to!=i.value.to)continue}return i.value}}var NR=({state:e,dispatch:t})=>{let{ranges:n}=e.selection;if(n.some(e=>e.from===e.to))return jR({state:e,dispatch:t});let r=e.sliceDoc(n[0].from,n[0].to);if(e.selection.ranges.some(t=>e.sliceDoc(t.from,t.to)!=r))return!1;let i=MR(e,r);return i?(t(e.update({selection:e.selection.addRange(G.range(i.from,i.to),!1),effects:R.scrollIntoView(i.to)})),!0):!1},PR=u.define({combine(e){return j(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new mz(e),scrollToMatch:e=>R.scrollIntoView(e)})}}),FR=class{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||``,this.valid=!!this.search&&(!this.regexp||yR(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord,this.test=e.test}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(e,t)=>t==`n`?`
|
|
225
|
-
`:t==`r`?`\r`:t==`t`?` `:`\\`)}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord&&this.test==e.test}create(){return this.regexp?new KR(this):new BR(this)}getCursor(e,t=0,n){let r=e.doc?e:ee.create({doc:e});return n??=r.doc.length,this.regexp?HR(this,r,t,n):RR(this,r,t,n)}},IR=class{constructor(e){this.spec=e}};function LR(e,t,n){return(r,i,a,o)=>n&&!n(r,i,a,o)?!1:e(r>=o&&i<=o+a.length?a.slice(r-o,i-o):t.doc.sliceString(r,i),t,r,i)}function RR(e,t,n,r){let i;return e.wholeWord&&(i=zR(t.doc,t.charCategorizer(t.selection.main.head))),e.test&&(i=LR(e.test,t,i)),new fR(t.doc,e.unquoted,n,r,e.caseSensitive?void 0:e=>e.toLowerCase(),i)}function zR(e,t){return(n,r,i,a)=>((a>n||a+i.length<r)&&(a=Math.max(0,n-2),i=e.sliceString(a,Math.min(e.length,r+2))),(t(UR(i,n-a))!=o.Word||t(WR(i,n-a))!=o.Word)&&(t(WR(i,r-a))!=o.Word||t(UR(i,r-a))!=o.Word))}var BR=class extends IR{constructor(e){super(e)}nextMatch(e,t,n){let r=RR(this.spec,e,n,e.doc.length).nextOverlapping();if(r.done){let n=Math.min(e.doc.length,t+this.spec.unquoted.length);r=RR(this.spec,e,0,n).nextOverlapping()}return r.done||r.value.from==t&&r.value.to==n?null:r.value}prevMatchInRange(e,t,n){for(let r=n;;){let n=Math.max(t,r-1e4-this.spec.unquoted.length),i=RR(this.spec,e,n,r),a=null;for(;!i.nextOverlapping().done;)a=i.value;if(a)return a;if(n==t)return null;r-=1e4}}prevMatch(e,t,n){let r=this.prevMatchInRange(e,0,t);return r||=this.prevMatchInRange(e,Math.max(0,n-this.spec.unquoted.length),e.doc.length),r&&(r.from!=t||r.to!=n)?r:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let n=RR(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=RR(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}};function VR(e,t,n){return(r,i,a)=>(!n||n(r,i,a))&&e(a[0],t,r,i)}function HR(e,t,n,r){let i;return e.wholeWord&&(i=GR(t.charCategorizer(t.selection.main.head))),e.test&&(i=VR(e.test,t,i)),new hR(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:i},n,r)}function UR(e,t){return e.slice(i(e,t,!1),t)}function WR(e,t){return e.slice(t,i(e,t))}function GR(e){return(t,n,r)=>!r[0].length||(e(UR(r.input,r.index))!=o.Word||e(WR(r.input,r.index))!=o.Word)&&(e(WR(r.input,r.index+r[0].length))!=o.Word||e(UR(r.input,r.index+r[0].length))!=o.Word)}var KR=class extends IR{nextMatch(e,t,n){let r=HR(this.spec,e,n,e.doc.length).next();return r.done&&(r=HR(this.spec,e,0,t).next()),r.done?null:r.value}prevMatchInRange(e,t,n){for(let r=1;;r++){let i=Math.max(t,n-r*1e4),a=HR(this.spec,e,i,n),o=null;for(;!a.next().done;)o=a.value;if(o&&(i==t||o.from>i+10))return o;if(i==t)return null}}prevMatch(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(t,n)=>{if(n==`&`)return e.match[0];if(n==`$`)return`$`;for(let t=n.length;t>0;t--){let r=+n.slice(0,t);if(r>0&&r<e.match.length)return e.match[r]+n.slice(t)}return t})}matchAll(e,t){let n=HR(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=HR(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}},qR=S.define(),JR=S.define(),YR=w.define({create(e){return new XR(cz(e).create(),null)},update(e,t){for(let n of t.effects)n.is(qR)?e=new XR(n.value.create(),e.panel):n.is(JR)&&(e=new XR(e.query,n.value?sz:null));return e},provide:e=>re.from(e,e=>e.panel)}),XR=class{constructor(e,t){this.query=e,this.panel=t}},ZR=_.mark({class:`cm-searchMatch`}),QR=_.mark({class:`cm-searchMatch cm-searchMatch-selected`}),$R=B.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(YR))}update(e){let t=e.state.field(YR);(t!=e.startState.field(YR)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:e,panel:t}){if(!t||!e.spec.valid)return _.none;let{view:r}=this,i=new n;for(let t=0,n=r.visibleRanges,a=n.length;t<a;t++){let{from:o,to:s}=n[t];for(;t<a-1&&s>n[t+1].from-500;)s=n[++t].to;e.highlight(r.state,o,s,(e,t)=>{let n=r.state.selection.ranges.some(n=>n.from==e&&n.to==t);i.add(e,t,n?QR:ZR)})}return i.finish()}},{decorations:e=>e.decorations});function ez(e){return t=>{let n=t.state.field(YR,!1);return n&&n.query.spec.valid?e(t,n):dz(t)}}var tz=ez((e,{query:t})=>{let{to:n}=e.state.selection.main,r=t.nextMatch(e.state,n,n);if(!r)return!1;let i=G.single(r.from,r.to),a=e.state.facet(PR);return e.dispatch({selection:i,effects:[vz(e,r),a.scrollToMatch(i.main,e)],userEvent:`select.search`}),uz(e),!0}),nz=ez((e,{query:t})=>{let{state:n}=e,{from:r}=n.selection.main,i=t.prevMatch(n,r,r);if(!i)return!1;let a=G.single(i.from,i.to),o=e.state.facet(PR);return e.dispatch({selection:a,effects:[vz(e,i),o.scrollToMatch(a.main,e)],userEvent:`select.search`}),uz(e),!0}),rz=ez((e,{query:t})=>{let n=t.matchAll(e.state,1e3);return!n||!n.length?!1:(e.dispatch({selection:G.create(n.map(e=>G.range(e.from,e.to))),userEvent:`select.search.matches`}),!0)}),iz=({state:e,dispatch:t})=>{let n=e.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,a=[],o=0;for(let t=new fR(e.doc,e.sliceDoc(r,i));!t.next().done;){if(a.length>1e3)return!1;t.value.from==r&&(o=a.length),a.push(G.range(t.value.from,t.value.to))}return t(e.update({selection:G.create(a,o),userEvent:`select.search.matches`})),!0},az=ez((e,{query:t})=>{let{state:n}=e,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let a=t.nextMatch(n,r,r);if(!a)return!1;let o=a,s=[],c,l,u=[];o.precise?o.from==r&&o.to==i&&(l=n.toText(t.getReplacement(o)),s.push({from:o.from,to:o.to,insert:l}),o=t.nextMatch(n,o.from,o.to),u.push(R.announce.of(n.phrase(`replaced match on line $`,n.doc.lineAt(r).number)+`.`))):o=t.nextMatch(n,o.from,o.to);let d=e.state.changes(s);return o&&(c=G.single(o.from,o.to).map(d),u.push(vz(e,o)),u.push(n.facet(PR).scrollToMatch(c.main,e))),e.dispatch({changes:d,selection:c,effects:u,userEvent:`input.replace`}),!0}),oz=ez((e,{query:t})=>{if(e.state.readOnly)return!1;let n=[];for(let r of t.matchAll(e.state,1e9)){let{from:e,to:i,precise:a}=r;a&&n.push({from:e,to:i,insert:t.getReplacement(r)})}if(!n.length)return!1;let r=e.state.phrase(`replaced $ matches`,n.length)+`.`;return e.dispatch({changes:n,effects:R.announce.of(r),userEvent:`input.replace.all`}),!0});function sz(e){return e.state.facet(PR).createPanel(e)}function cz(e,t){let n=e.selection.main,r=n.empty||n.to>n.from+100?``:e.sliceDoc(n.from,n.to);if(t&&!r)return t;let i=e.facet(PR);return new FR({search:t?.literal??i.literal?r:r.replace(/\n/g,`\\n`),caseSensitive:t?.caseSensitive??i.caseSensitive,literal:t?.literal??i.literal,regexp:t?.regexp??i.regexp,wholeWord:t?.wholeWord??i.wholeWord})}function lz(e){let t=_e(e,sz);return t&&t.dom.querySelector(`[main-field]`)}function uz(e){let t=lz(e);t&&t==e.root.activeElement&&t.select()}var dz=e=>{let t=e.state.field(YR,!1);if(t&&t.panel){let n=lz(e);if(n&&n!=e.root.activeElement){let r=cz(e.state,t.query.spec);r.valid&&e.dispatch({effects:qR.of(r)}),n.focus(),n.select()}}else e.dispatch({effects:[JR.of(!0),t?qR.of(cz(e.state,t.query.spec)):S.appendConfig.of(bz)]});return!0},fz=e=>{let t=e.state.field(YR,!1);if(!t||!t.panel)return!1;let n=_e(e,sz);return n&&n.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:JR.of(!1)}),!0},pz=[{key:`Mod-f`,run:dz,scope:`editor search-panel`},{key:`F3`,run:tz,shift:nz,scope:`editor search-panel`,preventDefault:!0},{key:`Mod-g`,run:tz,shift:nz,scope:`editor search-panel`,preventDefault:!0},{key:`Escape`,run:fz,scope:`editor search-panel`},{key:`Mod-Shift-l`,run:iz},{key:`Mod-Alt-g`,run:xR},{key:`Mod-d`,run:NR,preventDefault:!0}],mz=class{constructor(e){this.view=e;let t=this.query=e.state.field(YR).query.spec;this.commit=this.commit.bind(this),this.searchField=Ke(`input`,{value:t.search,placeholder:hz(e,`Find`),"aria-label":hz(e,`Find`),class:`cm-textfield`,name:`search`,form:``,"main-field":`true`,onchange:this.commit,onkeyup:this.commit}),this.replaceField=Ke(`input`,{value:t.replace,placeholder:hz(e,`Replace`),"aria-label":hz(e,`Replace`),class:`cm-textfield`,name:`replace`,form:``,onchange:this.commit,onkeyup:this.commit}),this.caseField=Ke(`input`,{type:`checkbox`,name:`case`,form:``,checked:t.caseSensitive,onchange:this.commit}),this.reField=Ke(`input`,{type:`checkbox`,name:`re`,form:``,checked:t.regexp,onchange:this.commit}),this.wordField=Ke(`input`,{type:`checkbox`,name:`word`,form:``,checked:t.wholeWord,onchange:this.commit});function n(e,t,n){return Ke(`button`,{class:`cm-button`,name:e,onclick:t,type:`button`},n)}this.dom=Ke(`div`,{onkeydown:e=>this.keydown(e),class:`cm-search`},[this.searchField,n(`next`,()=>tz(e),[hz(e,`next`)]),n(`prev`,()=>nz(e),[hz(e,`previous`)]),n(`select`,()=>rz(e),[hz(e,`all`)]),Ke(`label`,null,[this.caseField,hz(e,`match case`)]),Ke(`label`,null,[this.reField,hz(e,`regexp`)]),Ke(`label`,null,[this.wordField,hz(e,`by word`)]),...e.state.readOnly?[]:[Ke(`br`),this.replaceField,n(`replace`,()=>az(e),[hz(e,`replace`)]),n(`replaceAll`,()=>oz(e),[hz(e,`replace all`)])],Ke(`button`,{name:`close`,onclick:()=>fz(e),"aria-label":hz(e,`close`),type:`button`},[`×`])])}commit(){let e=new FR({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:qR.of(e)}))}keydown(e){he(this.view,e,`search-panel`)?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?nz:tz)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),az(this.view))}update(e){for(let t of e.transactions)for(let e of t.effects)e.is(qR)&&!e.value.eq(this.query)&&this.setQuery(e.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(PR).top}};function hz(e,t){return e.state.phrase(t)}var gz=30,_z=/[\s\.,:;?!]/;function vz(e,{from:t,to:n}){let r=e.state.doc.lineAt(t),i=e.state.doc.lineAt(n).to,a=Math.max(r.from,t-gz),o=Math.min(i,n+gz),s=e.state.sliceDoc(a,o);if(a!=r.from){for(let e=0;e<gz;e++)if(!_z.test(s[e+1])&&_z.test(s[e])){s=s.slice(e);break}}if(o!=i){for(let e=s.length-1;e>s.length-gz;e--)if(!_z.test(s[e-1])&&_z.test(s[e])){s=s.slice(0,e);break}}return R.announce.of(`${e.state.phrase(`current match`)}. ${s} ${e.state.phrase(`on line`)} ${r.number}.`)}var yz=R.baseTheme({".cm-panel.cm-search":{padding:`2px 6px 4px`,position:`relative`,"& [name=close]":{position:`absolute`,top:`0`,right:`4px`,backgroundColor:`inherit`,border:`none`,font:`inherit`,padding:0,margin:0},"& input, & button, & label":{margin:`.2em .6em .2em 0`},"& input[type=checkbox]":{marginRight:`.2em`},"& label":{fontSize:`80%`,whiteSpace:`pre`}},"&light .cm-searchMatch":{backgroundColor:`#ffff0054`},"&dark .cm-searchMatch":{backgroundColor:`#00ffff8a`},"&light .cm-searchMatch-selected":{backgroundColor:`#ff6a0054`},"&dark .cm-searchMatch-selected":{backgroundColor:`#ff00ff8a`}}),bz=[YR,E.low($R),yz],xz=class{constructor(e,t,n,r){this.state=e,this.pos=t,this.explicit=n,this.view=r,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=d(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),r=t.text.slice(n-t.from,this.pos-t.from),i=r.search(Oz(e,!1));return i<0?null:{from:n+i,to:this.pos,text:r.slice(i)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,n){e==`abort`&&this.abortListeners&&(this.abortListeners.push(t),n&&n.onDocChange&&(this.abortOnDocChange=!0))}};function Sz(e){let t=Object.keys(e).join(``),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,``)),`[${n?`\\w`:``}${t.replace(/[^\w\s]/g,`\\$&`)}]`}function Cz(e){let t=Object.create(null),n=Object.create(null);for(let{label:r}of e){t[r[0]]=!0;for(let e=1;e<r.length;e++)n[r[e]]=!0}let r=Sz(t)+Sz(n)+`*$`;return[RegExp(`^`+r),new RegExp(r)]}function wz(e){let t=e.map(e=>typeof e==`string`?{label:e}:e),[n,r]=t.every(e=>/^\w+$/.test(e.label))?[/\w*$/,/\w+$/]:Cz(t);return e=>{let i=e.matchBefore(r);return i||e.explicit?{from:i?i.from:e.pos,options:t,validFor:n}:null}}function Tz(e,t){return n=>{for(let t=d(n.state).resolveInner(n.pos,-1);t;t=t.parent){if(e.indexOf(t.name)>-1)return null;if(t.type.isTop)break}return t(n)}}var Ez=class{constructor(e,t,n,r){this.completion=e,this.source=t,this.match=n,this.score=r}};function Dz(e){return e.selection.main.from}function Oz(e,t){let{source:n}=e,r=t&&n[0]!=`^`,i=n[n.length-1]!=`$`;return!r&&!i?e:RegExp(`${r?`^`:``}(?:${n})${i?`$`:``}`,e.flags??(e.ignoreCase?`i`:``))}var kz=V.define();function Az(e,t,n,r){let{main:i}=e.selection,a=n-i.from,o=r-i.from;return{...e.changeByRange(s=>{if(s!=i&&n!=r&&e.sliceDoc(s.from+a,s.from+o)!=e.sliceDoc(n,r))return{range:s};let c=e.toText(t);return{changes:{from:s.from+a,to:r==i.from?s.to:s.from+o,insert:c},range:G.cursor(s.from+a+c.length)}}),scrollIntoView:!0,userEvent:`input.complete`}}var jz=new WeakMap;function Mz(e){if(!Array.isArray(e))return e;let t=jz.get(e);return t||jz.set(e,t=wz(e)),t}var Nz=S.define(),Pz=S.define(),Fz=class{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t<e.length;){let n=g(e,t),r=b(n);this.chars.push(n);let i=e.slice(t,t+r),a=i.toUpperCase();this.folded.push(g(a==i?i.toLowerCase():a,0)),t+=r}this.astral=e.length!=this.chars.length}ret(e,t){return this.score=e,this.matched=t,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:t,folded:n,any:r,precise:i,byWord:a}=this;if(t.length==1){let r=g(e,0),i=b(r),a=i==e.length?0:-100;if(r!=t[0]){if(r==n[0])a+=-200;else return null}return this.ret(a,[0,i])}let o=e.indexOf(this.pattern);if(o==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let s=t.length,c=0;if(o<0){for(let i=0,a=Math.min(e.length,200);i<a&&c<s;){let a=g(e,i);(a==t[c]||a==n[c])&&(r[c++]=i),i+=b(a)}if(c<s)return null}let l=0,u=0,d=!1,f=0,p=-1,m=-1,h=/[a-z]/.test(e),_=!0;for(let r=0,c=Math.min(e.length,200),v=0;r<c&&u<s;){let c=g(e,r);o<0&&(l<s&&c==t[l]&&(i[l++]=r),f<s&&(c==t[f]||c==n[f]?(f==0&&(p=r),m=r+1,f++):f=0));let y,x=c<255?c>=48&&c<=57||c>=97&&c<=122?2:+(c>=65&&c<=90):(y=L(c))==y.toLowerCase()?y==y.toUpperCase()?0:2:1;(!r||x==1&&h||v==0&&x!=0)&&(t[u]==c||n[u]==c&&(d=!0)?a[u++]=r:a.length&&(_=!1)),v=x,r+=b(c)}return u==s&&a[0]==0&&_?this.result(-100+(d?-200:0),a,e):f==s&&p==0?this.ret(-200-e.length+(m==e.length?0:-100),[0,m]):o>-1?this.ret(-700-e.length,[o,o+this.pattern.length]):f==s?this.ret(-900-e.length,[p,m]):u==s?this.result(-100+(d?-200:0)+-700+(_?0:-1100),a,e):t.length==2?null:this.result((r[0]?-700:0)+-200+-1100,r,e)}result(e,t,n){let r=[],i=0;for(let e of t){let t=e+(this.astral?b(g(n,e)):1);i&&r[i-1]==e?r[i-1]=t:(r[i++]=e,r[i++]=t)}return this.ret(e-n.length,r)}},Iz=class{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let t=e.slice(0,this.pattern.length),n=t==this.pattern?0:t.toLowerCase()==this.folded?-200:null;return n==null?null:(this.matched=[0,t.length],this.score=n+(e.length==this.pattern.length?0:-100),this)}},Lz=u.define({combine(e){return j(e,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>``,optionClass:()=>``,aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:zz,filterStrict:!1,compareCompletions:(e,t)=>(e.sortText||e.label).localeCompare(t.sortText||t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>n=>Rz(e(n),t(n)),optionClass:(e,t)=>n=>Rz(e(n),t(n)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function Rz(e,t){return e?t?e+` `+t:e:t}function zz(e,t,n,r,i,a){let o=e.textDirection==z.RTL,s=o,c=!1,l=`top`,u,d,f=t.left-i.left,p=i.right-t.right,m=r.right-r.left,h=r.bottom-r.top;if(s&&f<Math.min(m,p)?s=!1:!s&&p<Math.min(m,f)&&(s=!0),m<=(s?f:p))u=Math.max(i.top,Math.min(n.top,i.bottom-h))-t.top,d=Math.min(400,s?f:p);else{c=!0,d=Math.min(400,(o?t.right:i.right-t.left)-30);let e=i.bottom-t.bottom;e>=h||e>t.top?u=n.bottom-t.top:(l=`bottom`,u=t.bottom-n.top)}let g=(t.bottom-t.top)/a.offsetHeight,_=(t.right-t.left)/a.offsetWidth;return{style:`${l}: ${u/g}px; max-width: ${d/_}px`,class:`cm-completionInfo-`+(c?o?`left-narrow`:`right-narrow`:s?`left`:`right`)}}var Bz=S.define();function Vz(e){let t=e.addToOptions.slice();return e.icons&&t.push({render(e){let t=document.createElement(`div`);return t.classList.add(`cm-completionIcon`),e.type&&t.classList.add(...e.type.split(/\s+/g).map(e=>`cm-completionIcon-`+e)),t.setAttribute(`aria-hidden`,`true`),t},position:20}),t.push({render(e,t,n,r){let i=document.createElement(`span`);i.className=`cm-completionLabel`;let a=e.displayLabel||e.label,o=0;for(let e=0;e<r.length;){let t=r[e++],n=r[e++];t>o&&i.appendChild(document.createTextNode(a.slice(o,t)));let s=i.appendChild(document.createElement(`span`));s.appendChild(document.createTextNode(a.slice(t,n))),s.className=`cm-completionMatchedText`,o=n}return o<a.length&&i.appendChild(document.createTextNode(a.slice(o))),i},position:50},{render(e){if(!e.detail)return null;let t=document.createElement(`span`);return t.className=`cm-completionDetail`,t.textContent=e.detail,t},position:80}),t.sort((e,t)=>e.position-t.position).map(e=>e.render)}function Hz(e,t,n){if(e<=n)return{from:0,to:e};if(t<0&&(t=0),t<=e>>1){let e=Math.floor(t/n);return{from:e*n,to:(e+1)*n}}let r=Math.ceil((e-t)/n);return{from:e-r*n,to:e-(r-1)*n}}var Uz=class{constructor(e,t,n){this.view=e,this.stateField=t,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:e=>this.placeInfo(e),key:this},this.space=null,this.currentClass=``;let r=e.state.field(t),{options:i,selected:a}=r.open,o=e.state.facet(Lz);this.optionContent=Vz(o),this.optionClass=o.optionClass,this.tooltipClass=o.tooltipClass,this.range=Hz(i.length,a,o.maxRenderedOptions),this.dom=document.createElement(`div`),this.dom.className=`cm-tooltip-autocomplete`,this.updateTooltipClass(e.state),this.dom.addEventListener(`mousedown`,n=>{let{options:r}=e.state.field(t).open;for(let t=n.target,i;t&&t!=this.dom;t=t.parentNode)if(t.nodeName==`LI`&&(i=/-(\d+)$/.exec(t.id))&&+i[1]<r.length){this.applyCompletion(e,r[+i[1]]),n.preventDefault();return}if(n.target==this.list){let t=this.list.classList.contains(`cm-completionListIncompleteTop`)&&n.clientY<this.list.firstChild.getBoundingClientRect().top?this.range.from-1:this.list.classList.contains(`cm-completionListIncompleteBottom`)&&n.clientY>this.list.lastChild.getBoundingClientRect().bottom?this.range.to:null;t!=null&&(e.dispatch({effects:Bz.of(t)}),n.preventDefault())}}),this.dom.addEventListener(`focusout`,t=>{let n=e.state.field(this.stateField,!1);n&&n.tooltip&&e.state.facet(Lz).closeOnBlur&&t.relatedTarget!=e.contentDOM&&e.dispatch({effects:Pz.of(null)})}),this.showOptions(i,r.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener(`scroll`,()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){let t=e.state.field(this.stateField),n=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),t!=n){let{options:r,selected:i,disabled:a}=t.open;n.open&&n.open.options==r||(this.range=Hz(r.length,i,e.state.facet(Lz).maxRenderedOptions),this.showOptions(r,t.id)),this.updateSel(),a!=n.open?.disabled&&this.dom.classList.toggle(`cm-tooltip-autocomplete-disabled`,!!a)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let e of this.currentClass.split(` `))e&&this.dom.classList.remove(e);for(let e of t.split(` `))e&&this.dom.classList.add(e);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;(t.selected>-1&&t.selected<this.range.from||t.selected>=this.range.to)&&(this.range=Hz(t.options.length,t.selected,this.view.state.facet(Lz).maxRenderedOptions),this.showOptions(t.options,e.id));let n=this.updateSelectedOption(t.selected);if(n){this.destroyInfo();let{completion:r}=t.options[t.selected],{info:i}=r;if(!i)return;let a=typeof i==`string`?document.createTextNode(i):i(r);if(!a)return;`then`in a?a.then(t=>{t&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(t,r)}).catch(e=>de(this.view.state,e,`completion info`)):(this.addInfoPane(a,r),n.setAttribute(`aria-describedby`,this.info.id))}}addInfoPane(e,t){this.destroyInfo();let n=this.info=document.createElement(`div`);if(n.className=`cm-tooltip cm-completionInfo`,n.id=`cm-completionInfo-`+Math.floor(Math.random()*65535).toString(16),e.nodeType!=null)n.appendChild(e),this.infoDestroy=null;else{let{dom:t,destroy:r}=e;n.appendChild(t),this.infoDestroy=r||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let n=this.list.firstChild,r=this.range.from;n;n=n.nextSibling,r++)n.nodeName!=`LI`||!n.id?r--:r==e?n.hasAttribute(`aria-selected`)||(n.setAttribute(`aria-selected`,`true`),t=n):n.hasAttribute(`aria-selected`)&&(n.removeAttribute(`aria-selected`),n.removeAttribute(`aria-describedby`));return t&&Gz(this.list,t),t}measureInfo(){let e=this.dom.querySelector(`[aria-selected]`);if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),i=this.space;if(!i){let e=this.dom.ownerDocument.documentElement;i={left:0,top:0,right:e.clientWidth,bottom:e.clientHeight}}return r.top>Math.min(i.bottom,t.bottom)-10||r.bottom<Math.max(i.top,t.top)+10?null:this.view.state.facet(Lz).positionInfo(this.view,t,r,n,i,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className=`cm-tooltip cm-completionInfo `+(e.class||``)):this.info.style.cssText=`top: -1e6px`)}createListBox(e,t,n){let r=document.createElement(`ul`);r.id=t,r.setAttribute(`role`,`listbox`),r.setAttribute(`aria-expanded`,`true`),r.setAttribute(`aria-label`,this.view.state.phrase(`Completions`)),r.addEventListener(`mousedown`,e=>{e.target==r&&e.preventDefault()});let i=null;for(let a=n.from;a<n.to;a++){let{completion:o,match:s}=e[a],{section:c}=o;if(c){let e=typeof c==`string`?c:c.name;if(e!=i&&(a>n.from||n.from==0)){if(i=e,typeof c!=`string`&&c.header)r.appendChild(c.header(c));else{let t=r.appendChild(document.createElement(`completion-section`));t.textContent=e}}}let l=r.appendChild(document.createElement(`li`));l.id=t+`-`+a,l.setAttribute(`role`,`option`);let u=this.optionClass(o);u&&(l.className=u);for(let e of this.optionContent){let t=e(o,this.view.state,this.view,s);t&&l.appendChild(t)}}return n.from&&r.classList.add(`cm-completionListIncompleteTop`),n.to<e.length&&r.classList.add(`cm-completionListIncompleteBottom`),r}destroyInfo(){this.info&&=(this.infoDestroy&&this.infoDestroy(),this.info.remove(),null)}destroy(){this.destroyInfo()}};function Wz(e,t){return n=>new Uz(n,e,t)}function Gz(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=n.height/e.offsetHeight;r.top<n.top?e.scrollTop-=(n.top-r.top)/i:r.bottom>n.bottom&&(e.scrollTop+=(r.bottom-n.bottom)/i)}function Kz(e){return(e.boost||0)*100+(e.apply?10:0)+(e.info?5:0)+ +!!e.type}function qz(e,t){let n=[],r=null,i=null,a=e=>{n.push(e);let{section:t}=e.completion;if(t){r||=[];let e=typeof t==`string`?t:t.name;r.some(t=>t.name==e)||r.push(typeof t==`string`?{name:e}:t)}},o=t.facet(Lz);for(let r of e)if(r.hasResult()){let e=r.result.getMatch;if(r.result.filter===!1)for(let t of r.result.options)a(new Ez(t,r.source,e?e(t):[],1e9-n.length));else{let n=t.sliceDoc(r.from,r.to),s,c=o.filterStrict?new Iz(n):new Fz(n);for(let t of r.result.options)if(s=c.match(t.label)){let n=t.displayLabel?e?e(t,s.matched):[]:s.matched,o=s.score+(t.boost||0);if(a(new Ez(t,r.source,n,o)),typeof t.section==`object`&&t.section.rank===`dynamic`){let{name:e}=t.section;i||=Object.create(null),i[e]=Math.max(o,i[e]||-1e9)}}}}if(r){let e=Object.create(null),t=0,a=(e,t)=>(e.rank===`dynamic`&&t.rank===`dynamic`?i[t.name]-i[e.name]:0)||(typeof e.rank==`number`?e.rank:1e9)-(typeof t.rank==`number`?t.rank:1e9)||(e.name<t.name?-1:1);for(let n of r.sort(a))t-=1e5,e[n.name]=t;for(let t of n){let{section:n}=t.completion;n&&(t.score+=e[typeof n==`string`?n:n.name])}}let s=[],c=null,l=o.compareCompletions;for(let e of n.sort((e,t)=>t.score-e.score||l(e.completion,t.completion))){let t=e.completion;!c||c.label!=t.label||c.detail!=t.detail||c.type!=null&&t.type!=null&&c.type!=t.type||c.apply!=t.apply||c.boost!=t.boost?s.push(e):Kz(e.completion)>Kz(c)&&(s[s.length-1]=e),c=e.completion}return s}var Jz=class e{constructor(e,t,n,r,i,a){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=r,this.selected=i,this.disabled=a}setSelected(t,n){return t==this.selected||t>=this.options.length?this:new e(this.options,$z(n,t),this.tooltip,this.timestamp,t,this.disabled)}static build(t,n,r,i,a,o){if(i&&!o&&t.some(e=>e.isPending))return i.setDisabled();let s=qz(t,n);if(!s.length)return i&&t.some(e=>e.isPending)?i.setDisabled():null;let c=n.facet(Lz).selectOnOpen?0:-1;if(i&&i.selected!=c&&i.selected!=-1){let e=i.options[i.selected].completion;for(let t=0;t<s.length;t++)if(s[t].completion==e){c=t;break}}return new e(s,$z(r,c),{pos:t.reduce((e,t)=>t.hasResult()?Math.min(e,t.from):e,1e8),create:cB,above:a.aboveCursor},i?i.timestamp:Date.now(),c,!1)}map(t){return new e(this.options,this.attrs,{...this.tooltip,pos:t.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new e(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}},Yz=class e{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new e(eB,`cm-ac-`+Math.floor(Math.random()*2e6).toString(36),null)}update(t){let{state:n}=t,r=n.facet(Lz),i=(r.override||n.languageDataAt(`autocomplete`,Dz(n)).map(Mz)).map(e=>(this.active.find(t=>t.source==e)||new nB(e,+!!this.active.some(e=>e.state!=0))).update(t,r));i.length==this.active.length&&i.every((e,t)=>e==this.active[t])&&(i=this.active);let a=this.open,o=t.effects.some(e=>e.is(aB));a&&t.docChanged&&(a=a.map(t.changes)),t.selection||i.some(e=>e.hasResult()&&t.changes.touchesRange(e.from,e.to))||!Xz(i,this.active)||o?a=Jz.build(i,n,this.id,a,r,o):a&&a.disabled&&!i.some(e=>e.isPending)&&(a=null),!a&&i.every(e=>!e.isPending)&&i.some(e=>e.hasResult())&&(i=i.map(e=>e.hasResult()?new nB(e.source,0):e));for(let e of t.effects)e.is(Bz)&&(a&&=a.setSelected(e.value,this.id));return i==this.active&&a==this.open?this:new e(i,this.id,a)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?Zz:Qz}};function Xz(e,t){if(e==t)return!0;for(let n=0,r=0;;){for(;n<e.length&&!e[n].hasResult();)n++;for(;r<t.length&&!t[r].hasResult();)r++;let i=n==e.length,a=r==t.length;if(i||a)return i==a;if(e[n++].result!=t[r++].result)return!1}}var Zz={"aria-autocomplete":`list`},Qz={};function $z(e,t){let n={"aria-autocomplete":`list`,"aria-haspopup":`listbox`,"aria-controls":e};return t>-1&&(n[`aria-activedescendant`]=e+`-`+t),n}var eB=[];function tB(e,t){if(e.isUserEvent(`input.complete`)){let n=e.annotation(kz);if(n&&t.activateOnCompletion(n))return 12}let n=e.isUserEvent(`input.type`);return n&&t.activateOnTyping?5:n?1:e.isUserEvent(`delete.backward`)?2:e.selection?8:e.docChanged?16:0}var nB=class e{constructor(e,t,n=!1){this.source=e,this.state=t,this.explicit=n}hasResult(){return!1}get isPending(){return this.state==1}update(t,n){let r=tB(t,n),i=this;(r&8||r&16&&this.touches(t))&&(i=new e(i.source,0)),r&4&&i.state==0&&(i=new e(this.source,1)),i=i.updateFor(t,r);for(let n of t.effects)if(n.is(Nz))i=new e(i.source,1,n.value);else if(n.is(Pz))i=new e(i.source,0);else if(n.is(aB))for(let e of n.value)e.source==i.source&&(i=e);return i}updateFor(e,t){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(Dz(e.state))}},rB=class e extends nB{constructor(e,t,n,r,i,a){super(e,3,t),this.limit=n,this.result=r,this.from=i,this.to=a}hasResult(){return!0}updateFor(t,n){if(!(n&3))return this.map(t.changes);let r=this.result;r.map&&!t.changes.empty&&(r=r.map(r,t.changes));let i=t.changes.mapPos(this.from),a=t.changes.mapPos(this.to,1),o=Dz(t.state);if(o>a||!r||n&2&&(Dz(t.startState)==this.from||o<this.limit))return new nB(this.source,n&4?1:0);let s=t.changes.mapPos(this.limit);return iB(r.validFor,t.state,i,a)?new e(this.source,this.explicit,s,r,i,a):r.update&&(r=r.update(r,i,a,new xz(t.state,o,!1)))?new e(this.source,this.explicit,s,r,r.from,r.to??Dz(t.state)):new nB(this.source,1,this.explicit)}map(t){if(t.empty)return this;let n=this.result.map?this.result.map(this.result,t):this.result;return n?new e(this.source,this.explicit,t.mapPos(this.limit),n,t.mapPos(this.from),t.mapPos(this.to,1)):new nB(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}};function iB(e,t,n,r){if(!e)return!1;let i=t.sliceDoc(n,r);return typeof e==`function`?e(i,n,r,t):Oz(e,!0).test(i)}var aB=S.define({map(e,t){return e.map(e=>e.map(t))}}),oB=w.define({create(){return Yz.start()},update(e,t){return e.update(t)},provide:e=>[Ve.from(e,e=>e.tooltip),R.contentAttributes.from(e,e=>e.attrs)]});function sB(e,t){let n=t.completion.apply||t.completion.label,r=e.state.field(oB).active.find(e=>e.source==t.source);return r instanceof rB&&(typeof n==`string`?e.dispatch({...Az(e.state,n,r.from,r.to),annotations:kz.of(t.completion)}):n(e,t.completion,r.from,r.to),!0)}var cB=Wz(oB,sB);function lB(e,t=`option`){return n=>{let r=n.state.field(oB,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<n.state.facet(Lz).interactionDelay)return!1;let i=1,a;t==`page`&&(a=ae(n,r.open.tooltip))&&(i=Math.max(2,Math.floor(a.dom.offsetHeight/a.dom.querySelector(`li`).offsetHeight)-1));let{length:o}=r.open.options,s=r.open.selected>-1?r.open.selected+i*(e?1:-1):e?0:o-1;return s<0?s=t==`page`?0:o-1:s>=o&&(s=t==`page`?o-1:0),n.dispatch({effects:Bz.of(s)}),!0}}var uB=e=>{let t=e.state.field(oB,!1);return e.state.readOnly||!t||!t.open||t.open.selected<0||t.open.disabled||Date.now()-t.open.timestamp<e.state.facet(Lz).interactionDelay?!1:sB(e,t.open.options[t.open.selected])},dB=e=>e.state.field(oB,!1)?(e.dispatch({effects:Nz.of(!0)}),!0):!1,fB=e=>{let t=e.state.field(oB,!1);return!t||!t.active.some(e=>e.state!=0)?!1:(e.dispatch({effects:Pz.of(null)}),!0)},pB=class{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}},mB=50,hB=1e3,gB=B.fromClass(class{constructor(e){this.view=e,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let t of e.state.field(oB).active)t.isPending&&this.startQuery(t)}update(e){let t=e.state.field(oB),n=e.state.facet(Lz);if(!e.selectionSet&&!e.docChanged&&e.startState.field(oB)==t)return;let r=e.transactions.some(e=>{let t=tB(e,n);return t&8||(e.selection||e.docChanged)&&!(t&3)});for(let t=0;t<this.running.length;t++){let n=this.running[t];if(r||n.context.abortOnDocChange&&e.docChanged||n.updates.length+e.transactions.length>mB&&Date.now()-n.time>hB){for(let e of n.context.abortListeners)try{e()}catch(e){de(this.view.state,e)}n.context.abortListeners=null,this.running.splice(t--,1)}else n.updates.push(...e.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),e.transactions.some(e=>e.effects.some(e=>e.is(Nz)))&&(this.pendingStart=!0);let i=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=t.active.some(e=>e.isPending&&!this.running.some(t=>t.active.source==e.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let t of e.transactions)t.isUserEvent(`input.type`)?this.composing=2:this.composing==2&&t.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:e}=this.view,t=e.field(oB);for(let e of t.active)e.isPending&&!this.running.some(t=>t.active.source==e.source)&&this.startQuery(e);this.running.length&&t.open&&t.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Lz).updateSyncTime))}startQuery(e){let{state:t}=this.view,n=new xz(t,Dz(t),e.explicit,this.view),r=new pB(e,n);this.running.push(r),Promise.resolve(e.source(n)).then(e=>{r.context.aborted||(r.done=e||null,this.scheduleAccept())},e=>{this.view.dispatch({effects:Pz.of(null)}),de(this.view.state,e)})}scheduleAccept(){this.running.every(e=>e.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Lz).updateSyncTime))}accept(){this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(Lz),n=this.view.state.field(oB);for(let r=0;r<this.running.length;r++){let i=this.running[r];if(i.done===void 0)continue;if(this.running.splice(r--,1),i.done){let n=Dz(i.updates.length?i.updates[0].startState:this.view.state),r=Math.min(n,i.done.from+ +!i.active.explicit),a=new rB(i.active.source,i.active.explicit,r,i.done,i.done.from,i.done.to??n);for(let e of i.updates)a=a.update(e,t);if(a.hasResult()){e.push(a);continue}}let a=n.active.find(e=>e.source==i.active.source);if(a&&a.isPending){if(i.done==null){let n=new nB(i.active.source,0);for(let e of i.updates)n=n.update(e,t);n.isPending||e.push(n)}else this.startQuery(a)}}(e.length||n.open&&n.open.disabled)&&this.view.dispatch({effects:aB.of(e)})}},{eventHandlers:{blur(e){let t=this.view.state.field(oB,!1);if(t&&t.tooltip&&this.view.state.facet(Lz).closeOnBlur){let n=t.open&&ae(this.view,t.open.tooltip);n&&n.dom.contains(e.relatedTarget)||setTimeout(()=>this.view.dispatch({effects:Pz.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:Nz.of(!1)}),20),this.composing=0}}}),_B=typeof navigator==`object`&&/Win/.test(navigator.platform),vB=E.highest(R.domEventHandlers({keydown(e,t){let n=t.state.field(oB,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||!e.key||e.key.length>1||e.ctrlKey&&!(_B&&e.altKey)||e.metaKey)return!1;let r=n.open.options[n.open.selected],i=n.active.find(e=>e.source==r.source),a=r.completion.commitCharacters||i.result.commitCharacters;return a&&a.indexOf(e.key)>-1&&sB(t,r),!1}})),yB=R.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:`monospace`,whiteSpace:`nowrap`,overflow:`hidden auto`,maxWidth_fallback:`700px`,maxWidth:`min(700px, 95vw)`,minWidth:`250px`,maxHeight:`10em`,height:`100%`,listStyle:`none`,margin:0,padding:0,"& > li, & > completion-section":{padding:`1px 3px`,lineHeight:1.2},"& > li":{overflowX:`hidden`,textOverflow:`ellipsis`,cursor:`pointer`},"& > completion-section":{display:`list-item`,borderBottom:`1px solid silver`,paddingLeft:`0.5em`,opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:`#17c`,color:`white`},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:`#777`},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:`#347`,color:`white`},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:`#444`},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:`"···"`,opacity:.5,display:`block`,textAlign:`center`,cursor:`pointer`},".cm-tooltip.cm-completionInfo":{position:`absolute`,padding:`3px 9px`,width:`max-content`,maxWidth:`400px`,boxSizing:`border-box`,whiteSpace:`pre-line`},".cm-completionInfo.cm-completionInfo-left":{right:`100%`},".cm-completionInfo.cm-completionInfo-right":{left:`100%`},".cm-completionInfo.cm-completionInfo-left-narrow":{right:`30px`},".cm-completionInfo.cm-completionInfo-right-narrow":{left:`30px`},"&light .cm-snippetField":{backgroundColor:`#00000022`},"&dark .cm-snippetField":{backgroundColor:`#ffffff22`},".cm-snippetFieldPosition":{verticalAlign:`text-top`,width:0,height:`1.15em`,display:`inline-block`,margin:`0 -0.7px -.7em`,borderLeft:`1.4px dotted #888`},".cm-completionMatchedText":{textDecoration:`underline`},".cm-completionDetail":{marginLeft:`0.5em`,fontStyle:`italic`},".cm-completionIcon":{fontSize:`90%`,width:`.8em`,display:`inline-block`,textAlign:`center`,paddingRight:`.6em`,opacity:`0.6`,boxSizing:`content-box`},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:`'ƒ'`}},".cm-completionIcon-class":{"&:after":{content:`'○'`}},".cm-completionIcon-interface":{"&:after":{content:`'◌'`}},".cm-completionIcon-variable":{"&:after":{content:`'𝑥'`}},".cm-completionIcon-constant":{"&:after":{content:`'𝐶'`}},".cm-completionIcon-type":{"&:after":{content:`'𝑡'`}},".cm-completionIcon-enum":{"&:after":{content:`'∪'`}},".cm-completionIcon-property":{"&:after":{content:`'□'`}},".cm-completionIcon-keyword":{"&:after":{content:`'🔑︎'`}},".cm-completionIcon-namespace":{"&:after":{content:`'▢'`}},".cm-completionIcon-text":{"&:after":{content:`'abc'`,fontSize:`50%`,verticalAlign:`middle`}}}),bB=class{constructor(e,t,n,r){this.field=e,this.line=t,this.from=n,this.to=r}},xB=class e{constructor(e,t,n){this.field=e,this.from=t,this.to=n}map(t){let n=t.mapPos(this.from,-1,c.TrackDel),r=t.mapPos(this.to,1,c.TrackDel);return n==null||r==null?null:new e(this.field,n,r)}},SB=class e{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,n){let r=[],i=[n],a=e.doc.lineAt(n),o=/^\s*/.exec(a.text)[0];for(let a of this.lines){if(r.length){let r=o,s=/^\t*/.exec(a)[0].length;for(let n=0;n<s;n++)r+=e.facet(t);i.push(n+r.length-s),a=r+a.slice(s)}r.push(a),n+=a.length+1}return{text:r,ranges:this.fieldPositions.map(e=>new xB(e.field,i[e.line]+e.from,i[e.line]+e.to))}}static parse(t){let n=[],r=[],i=[],a;for(let e of t.split(/\r\n?|\n/)){for(;a=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(e);){let t=a[1]?+a[1]:null,o=a[2]||a[3]||``,s=-1;t===0&&(t=1e9);let c=o.replace(/\\[{}]/g,e=>e[1]);for(let e=0;e<n.length;e++)(t==null?c&&n[e].name==c:n[e].seq==t)&&(s=e);if(s<0){let e=0;for(;e<n.length&&(t==null||n[e].seq!=null&&n[e].seq<t);)e++;n.splice(e,0,{seq:t,name:c}),s=e;for(let e of i)e.field>=s&&e.field++}for(let e of i)if(e.line==r.length&&e.from>a.index){let t=a[2]?3+(a[1]||``).length:2;e.from-=t,e.to-=t}i.push(new bB(s,r.length,a.index,a.index+c.length)),e=e.slice(0,a.index)+o+e.slice(a.index+a[0].length)}e=e.replace(/\\([{}])/g,(e,t,n)=>{for(let e of i)e.line==r.length&&e.from>n&&(e.from--,e.to--);return t}),r.push(e)}return new e(r,i)}},CB=_.widget({widget:new class extends k{toDOM(){let e=document.createElement(`span`);return e.className=`cm-snippetFieldPosition`,e}ignoreEvent(){return!1}}}),wB=_.mark({class:`cm-snippetField`}),TB=class e{constructor(e,t){this.ranges=e,this.active=t,this.deco=_.set(e.map(e=>(e.from==e.to?CB:wB).range(e.from,e.to)),!0)}map(t){let n=[];for(let e of this.ranges){let r=e.map(t);if(!r)return null;n.push(r)}return new e(n,this.active)}selectionInsideField(e){return e.ranges.every(e=>this.ranges.some(t=>t.field==this.active&&t.from<=e.from&&t.to>=e.to))}},EB=S.define({map(e,t){return e&&e.map(t)}}),DB=S.define(),OB=w.define({create(){return null},update(e,t){for(let n of t.effects){if(n.is(EB))return n.value;if(n.is(DB)&&e)return new TB(e.ranges,n.value)}return e&&t.docChanged&&(e=e.map(t.changes)),e&&t.selection&&!e.selectionInsideField(t.selection)&&(e=null),e},provide:e=>R.decorations.from(e,e=>e?e.deco:_.none)});function kB(e,t){return G.create(e.filter(e=>e.field==t).map(e=>G.range(e.from,e.to)))}function AB(e){let t=SB.parse(e);return(e,n,r,i)=>{let{text:a,ranges:o}=t.instantiate(e.state,r),{main:s}=e.state.selection,c={changes:{from:r,to:i==s.from?s.to:i,insert:O.of(a)},scrollIntoView:!0,annotations:n?[kz.of(n),f.userEvent.of(`input.complete`)]:void 0};if(o.length&&(c.selection=kB(o,0)),o.some(e=>e.field>0)){let t=new TB(o,0),n=c.effects=[EB.of(t)];e.state.field(OB,!1)===void 0&&n.push(S.appendConfig.of([OB,PB,IB,yB]))}e.dispatch(e.state.update(c))}}function jB(e){return({state:t,dispatch:n})=>{let r=t.field(OB,!1);if(!r||e<0&&r.active==0)return!1;let i=r.active+e,a=e>0&&!r.ranges.some(t=>t.field==i+e);return n(t.update({selection:kB(r.ranges,i),effects:EB.of(a?null:new TB(r.ranges,i)),scrollIntoView:!0})),!0}}var MB=[{key:`Tab`,run:jB(1),shift:jB(-1)},{key:`Escape`,run:({state:e,dispatch:t})=>e.field(OB,!1)?(t(e.update({effects:EB.of(null)})),!0):!1}],NB=u.define({combine(e){return e.length?e[0]:MB}}),PB=E.highest(ze.compute([NB],e=>e.facet(NB)));function FB(e,t){return{...t,apply:AB(e)}}var IB=R.domEventHandlers({mousedown(e,t){let n=t.state.field(OB,!1),r;if(!n||(r=t.posAtCoords({x:e.clientX,y:e.clientY}))==null)return!1;let i=n.ranges.find(e=>e.from<=r&&e.to>=r);return!i||i.field==n.active?!1:(t.dispatch({selection:kB(n.ranges,i.field),effects:EB.of(n.ranges.some(e=>e.field>i.field)?new TB(n.ranges,i.field):null),scrollIntoView:!0}),!0)}}),LB={brackets:[`(`,`[`,`{`,`'`,`"`],before:`)]}:;>`,stringPrefixes:[]},RB=S.define({map(e,t){return t.mapPos(e,-1,c.TrackAfter)??void 0}}),zB=new class extends ye{};zB.startSide=1,zB.endSide=-1;var BB=w.define({create(){return xe.empty},update(e,t){if(e=e.map(t.changes),t.selection){let n=t.state.doc.lineAt(t.selection.main.head);e=e.update({filter:e=>e>=n.from&&e<=n.to})}for(let n of t.effects)n.is(RB)&&(e=e.update({add:[zB.range(n.value,n.value+1)]}));return e}});function VB(){return[KB,BB]}var HB=`()[]{}<>«»»«[]{}`;function UB(e){for(let t=0;t<16;t+=2)if(HB.charCodeAt(t)==e)return HB.charAt(t+1);return L(e<128?e:e+1)}function WB(e,t){return e.languageDataAt(`closeBrackets`,t)[0]||LB}var GB=typeof navigator==`object`&&/Android\b/.test(navigator.userAgent),KB=R.inputHandler.of((e,t,n,r)=>{if((GB?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let i=e.state.selection.main;if(r.length>2||r.length==2&&b(g(r,0))==1||t!=i.from||n!=i.to)return!1;let a=JB(e.state,r);return a?(e.dispatch(a),!0):!1}),qB=[{key:`Backspace`,run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=WB(e,e.selection.main.head).brackets||LB.brackets,r=null,i=e.changeByRange(t=>{if(t.empty){let r=ZB(e.doc,t.head);for(let i of n)if(i==r&&XB(e.doc,t.head)==UB(g(i,0)))return{changes:{from:t.head-i.length,to:t.head+i.length},range:G.cursor(t.head-i.length)}}return{range:r=t}});return r||t(e.update(i,{scrollIntoView:!0,userEvent:`delete.backward`})),!r}}];function JB(e,t){let n=WB(e,e.selection.main.head),r=n.brackets||LB.brackets;for(let i of r){let a=UB(g(i,0));if(t==i)return a==i?eV(e,i,r.indexOf(i+i+i)>-1,n):QB(e,i,a,n.before||LB.before);if(t==a&&YB(e,e.selection.main.from))return $B(e,i,a)}return null}function YB(e,t){let n=!1;return e.field(BB).between(0,e.doc.length,e=>{e==t&&(n=!0)}),n}function XB(e,t){let n=e.sliceString(t,t+2);return n.slice(0,b(g(n,0)))}function ZB(e,t){let n=e.sliceString(t-2,t);return b(g(n,0))==n.length?n:n.slice(1)}function QB(e,t,n,r){let i=null,a=e.changeByRange(a=>{if(!a.empty)return{changes:[{insert:t,from:a.from},{insert:n,from:a.to}],effects:RB.of(a.to+t.length),range:G.range(a.anchor+t.length,a.head+t.length)};let o=XB(e.doc,a.head);return!o||/\s/.test(o)||r.indexOf(o)>-1?{changes:{insert:t+n,from:a.head},effects:RB.of(a.head+t.length),range:G.cursor(a.head+t.length)}:{range:i=a}});return i?null:e.update(a,{scrollIntoView:!0,userEvent:`input.type`})}function $B(e,t,n){let r=null,i=e.changeByRange(t=>t.empty&&XB(e.doc,t.head)==n?{changes:{from:t.head,to:t.head+n.length,insert:n},range:G.cursor(t.head+n.length)}:r={range:t});return r?null:e.update(i,{scrollIntoView:!0,userEvent:`input.type`})}function eV(e,t,n,r){let i=r.stringPrefixes||LB.stringPrefixes,a=null,s=e.changeByRange(r=>{if(!r.empty)return{changes:[{insert:t,from:r.from},{insert:t,from:r.to}],effects:RB.of(r.to+t.length),range:G.range(r.anchor+t.length,r.head+t.length)};let s=r.head,c=XB(e.doc,s),l;if(c==t){if(tV(e,s))return{changes:{insert:t+t,from:s},effects:RB.of(s+t.length),range:G.cursor(s+t.length)};if(YB(e,s)){let r=n&&e.sliceDoc(s,s+t.length*3)==t+t+t?t+t+t:t;return{changes:{from:s,to:s+r.length,insert:r},range:G.cursor(s+r.length)}}}else if(n&&e.sliceDoc(s-2*t.length,s)==t+t&&(l=rV(e,s-2*t.length,i))>-1&&tV(e,l))return{changes:{insert:t+t+t+t,from:s},effects:RB.of(s+t.length),range:G.cursor(s+t.length)};else if(e.charCategorizer(s)(c)!=o.Word&&rV(e,s,i)>-1&&!nV(e,s,t,i))return{changes:{insert:t+t,from:s},effects:RB.of(s+t.length),range:G.cursor(s+t.length)};return{range:a=r}});return a?null:e.update(s,{scrollIntoView:!0,userEvent:`input.type`})}function tV(e,t){let n=d(e).resolveInner(t+1);return n.parent&&n.from==t}function nV(e,t,n,r){let i=d(e).resolveInner(t,-1),a=r.reduce((e,t)=>Math.max(e,t.length),0);for(let o=0;o<5;o++){let o=e.sliceDoc(i.from,Math.min(i.to,i.from+n.length+a)),s=o.indexOf(n);if(!s||s>-1&&r.indexOf(o.slice(0,s))>-1){let t=i.firstChild;for(;t&&t.from==i.from&&t.to-t.from>n.length+s;){if(e.sliceDoc(t.to-n.length,t.to)==n)return!1;t=t.firstChild}return!0}let c=i.to==t&&i.parent;if(!c)break;i=c}return!1}function rV(e,t,n){let r=e.charCategorizer(t);if(r(e.sliceDoc(t-1,t))!=o.Word)return t;for(let i of n){let n=t-i.length;if(e.sliceDoc(n,t)==i&&r(e.sliceDoc(n-1,n))!=o.Word)return n}return-1}function iV(e={}){return[vB,oB,Lz.of(e),gB,oV,yB]}var aV=[{key:`Ctrl-Space`,run:dB},{mac:"Alt-`",run:dB},{mac:`Alt-i`,run:dB},{key:`Escape`,run:fB},{key:`ArrowDown`,run:lB(!0)},{key:`ArrowUp`,run:lB(!1)},{key:`PageDown`,run:lB(!0,`page`)},{key:`PageUp`,run:lB(!1,`page`)},{key:`Enter`,run:uB}],oV=E.highest(ze.computeN([Lz],e=>e.facet(Lz).defaultKeymap?[aV]:[])),sV=class{constructor(e,t,n){this.from=e,this.to=t,this.diagnostic=n}},cV=class e{constructor(e,t,n){this.diagnostics=e,this.panel=t,this.selected=n}static init(t,r,i){let a=i.facet(SV).markerFilter;a&&(t=a(t,i));let o=t.slice().sort((e,t)=>e.from-t.from||e.to-t.to),s=new n,c=[],l=0,u=i.doc.iter(),d=0,f=i.doc.length;for(let e=0;;){let t=e==o.length?null:o[e];if(!t&&!c.length)break;let n,r;if(c.length)n=l,r=c.reduce((e,t)=>Math.min(e,t.to),t&&t.from>n?t.from:1e8);else{if(n=t.from,n>f)break;r=t.to,c.push(t),e++}for(;e<o.length;){let t=o[e];if(t.from==n&&(t.to>t.from||t.to==n))c.push(t),e++,r=Math.min(t.to,r);else{r=Math.min(t.from,r);break}}r=Math.min(r,f);let i=!1;if(c.some(e=>e.from==n&&(e.to==r||r==f))&&(i=n==r,!i&&r-n<10)){let e=n-(d+u.value.length);e>0&&(u.next(e),d=n);for(let e=n;;){if(e>=r){i=!0;break}if(!u.lineBreak&&d+u.value.length>e)break;e=d+u.value.length,d+=u.value.length,u.next()}}let a=NV(c);if(i)s.add(n,n,_.widget({widget:new EV(a),diagnostics:c.slice()}));else{let e=c.reduce((e,t)=>t.markClass?e+` `+t.markClass:e,``);s.add(n,r,_.mark({class:`cm-lintRange cm-lintRange-`+a+e,diagnostics:c.slice(),inclusiveEnd:c.some(e=>e.to>r)}))}if(l=r,l==f)break;for(let e=0;e<c.length;e++)c[e].to<=l&&c.splice(e--,1)}let p=s.finish();return new e(p,r,lV(p))}};function lV(e,t=null,n=0){let r=null;return e.between(n,1e9,(e,n,{spec:i})=>{if(!(t&&i.diagnostics.indexOf(t)<0)){if(!r)r=new sV(e,n,t||i.diagnostics[0]);else if(i.diagnostics.indexOf(r.diagnostic)<0)return!1;else r=new sV(r.from,n,r.diagnostic)}}),r}function uV(e,t){let n=t.pos,r=t.end||n,i=e.state.facet(SV).hideOn(e,n,r);if(i!=null)return i;let a=e.startState.doc.lineAt(t.pos);return!!(e.effects.some(e=>e.is(fV))||e.changes.touchesRange(a.from,Math.max(a.to,r)))}function dV(e,t){return e.field(hV,!1)?t:t.concat(S.appendConfig.of(FV))}var fV=S.define(),pV=S.define(),mV=S.define(),hV=w.define({create(){return new cV(_.none,null,null)},update(e,t){if(t.docChanged&&e.diagnostics.size){let n=e.diagnostics.map(t.changes),r=null,i=e.panel;if(e.selected){let i=t.changes.mapPos(e.selected.from,1);r=lV(n,e.selected.diagnostic,i)||lV(n,null,i)}!n.size&&i&&t.state.facet(SV).autoPanel&&(i=null),e=new cV(n,i,r)}for(let n of t.effects)if(n.is(fV)){let r=t.state.facet(SV).autoPanel?n.value.length?OV.open:null:e.panel;e=cV.init(n.value,r,t.state)}else n.is(pV)?e=new cV(e.diagnostics,n.value?OV.open:null,e.selected):n.is(mV)&&(e=new cV(e.diagnostics,e.panel,n.value));return e},provide:e=>[re.from(e,e=>e.panel),R.decorations.from(e,e=>e.diagnostics)]}),gV=_.mark({class:`cm-lintRange cm-lintRange-active`});function _V(e,t,n){let{diagnostics:r}=e.state.field(hV),i,a=-1,o=-1;r.between(t-+(n<0),t+ +(n>0),(e,r,{spec:s})=>{if(t>=e&&t<=r&&(e==r||(t>e||n>0)&&(t<r||n<0)))return i=s.diagnostics,a=e,o=r,!1});let s=e.state.facet(SV).tooltipFilter;return i&&s&&(i=s(i,e.state)),i?{pos:a,end:o,above:!0,create(){return{dom:vV(e,i)}}}:null}function vV(e,t){return Ke(`ul`,{class:`cm-tooltip-lint`},t.map(t=>TV(e,t,!1)))}var yV=e=>{let t=e.state.field(hV,!1);t&&t.panel||e.dispatch({effects:dV(e.state,[pV.of(!0)])});let n=_e(e,OV.open);return n&&n.dom.querySelector(`.cm-panel-lint ul`).focus(),!0},bV=e=>{let t=e.state.field(hV,!1);return!t||!t.panel?!1:(e.dispatch({effects:pV.of(!1)}),!0)},xV=[{key:`Mod-Shift-m`,run:yV,preventDefault:!0},{key:`F8`,run:t=>{let n=t.state.field(hV,!1);if(!n)return!1;let r=t.state.selection.main,i=lV(n.diagnostics,null,r.to+1);return!i&&(i=lV(n.diagnostics,null,0),!i||i.from==r.from&&i.to==r.to)?!1:(t.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0}),e(t,i.from,1,{tooltip:PV,until:e=>e.docChanged||e.newSelection.main.head<i.from||e.newSelection.main.head>i.to}),!0)}}],SV=u.define({combine(e){return{sources:e.map(e=>e.source).filter(e=>e!=null),...j(e.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{delay:Math.max,markerFilter:CV,tooltipFilter:CV,needsRefresh:(e,t)=>e?t?n=>e(n)||t(n):e:t,hideOn:(e,t)=>e?t?(n,r,i)=>e(n,r,i)||t(n,r,i):e:t,autoPanel:(e,t)=>e||t})}}});function CV(e,t){return e?t?(n,r)=>t(e(n,r),r):e:t}function wV(e){let t=[];if(e)actions:for(let{name:n}of e){for(let e=0;e<n.length;e++){let r=n[e];if(/[a-zA-Z]/.test(r)&&!t.some(e=>e.toLowerCase()==r.toLowerCase())){t.push(r);continue actions}}t.push(``)}return t}function TV(e,t,n){let r=n?wV(t.actions):[];return Ke(`li`,{class:`cm-diagnostic cm-diagnostic-`+t.severity},Ke(`span`,{class:`cm-diagnosticText`},t.renderMessage?t.renderMessage(e):t.message),t.actions?.map((n,i)=>{let a=!1,o=r=>{if(r.preventDefault(),a)return;a=!0;let i=lV(e.state.field(hV).diagnostics,t);i&&n.apply(e,i.from,i.to)},{name:s}=n,c=r[i]?s.indexOf(r[i]):-1,l=c<0?s:[s.slice(0,c),Ke(`u`,s.slice(c,c+1)),s.slice(c+1)],u=n.markClass?` `+n.markClass:``;return Ke(`button`,{type:`button`,class:`cm-diagnosticAction`+u,onclick:o,onmousedown:o,"aria-label":` Action: ${s}${c<0?``:` (access key "${r[i]})"`}.`},l)}),t.source&&Ke(`div`,{class:`cm-diagnosticSource`},t.source))}var EV=class extends k{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return Ke(`span`,{class:`cm-lintPoint cm-lintPoint-`+this.sev})}},DV=class{constructor(e,t){this.diagnostic=t,this.id=`item_`+Math.floor(Math.random()*4294967295).toString(16),this.dom=TV(e,t,!0),this.dom.id=this.id,this.dom.setAttribute(`role`,`option`)}},OV=class e{constructor(e){this.view=e,this.items=[];let t=t=>{if(!(t.ctrlKey||t.altKey||t.metaKey)){if(t.keyCode==27)bV(this.view),this.view.focus();else if(t.keyCode==38||t.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(t.keyCode==40||t.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(t.keyCode==36)this.moveSelection(0);else if(t.keyCode==35)this.moveSelection(this.items.length-1);else if(t.keyCode==13)this.view.focus();else if(t.keyCode>=65&&t.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:n}=this.items[this.selectedIndex],r=wV(n.actions);for(let i=0;i<r.length;i++)if(r[i].toUpperCase().charCodeAt(0)==t.keyCode){let t=lV(this.view.state.field(hV).diagnostics,n);t&&n.actions[i].apply(e,t.from,t.to)}}else return;t.preventDefault()}},n=e=>{for(let t=0;t<this.items.length;t++)this.items[t].dom.contains(e.target)&&this.moveSelection(t)};this.list=Ke(`ul`,{tabIndex:0,role:`listbox`,"aria-label":this.view.state.phrase(`Diagnostics`),onkeydown:t,onclick:n}),this.dom=Ke(`div`,{class:`cm-panel-lint`},this.list,Ke(`button`,{type:`button`,name:`close`,"aria-label":this.view.state.phrase(`close`),onclick:()=>bV(this.view)},`×`)),this.update()}get selectedIndex(){let e=this.view.state.field(hV).selected;if(!e)return-1;for(let t=0;t<this.items.length;t++)if(this.items[t].diagnostic==e.diagnostic)return t;return-1}update(){let{diagnostics:e,selected:t}=this.view.state.field(hV),n=0,r=!1,i=null,a=new Set;for(e.between(0,this.view.state.doc.length,(e,o,{spec:s})=>{for(let e of s.diagnostics){if(a.has(e))continue;a.add(e);let o=-1,s;for(let t=n;t<this.items.length;t++)if(this.items[t].diagnostic==e){o=t;break}o<0?(s=new DV(this.view,e),this.items.splice(n,0,s),r=!0):(s=this.items[o],o>n&&(this.items.splice(n,o-n),r=!0)),t&&s.diagnostic==t.diagnostic?s.dom.hasAttribute(`aria-selected`)||(s.dom.setAttribute(`aria-selected`,`true`),i=s):s.dom.hasAttribute(`aria-selected`)&&s.dom.removeAttribute(`aria-selected`),n++}});n<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)r=!0,this.items.pop();this.items.length==0&&(this.items.push(new DV(this.view,{from:-1,to:-1,severity:`info`,message:this.view.state.phrase(`No diagnostics`)})),r=!0),i?(this.list.setAttribute(`aria-activedescendant`,i.id),this.view.requestMeasure({key:this,read:()=>({sel:i.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:e,panel:t})=>{let n=t.height/this.list.offsetHeight;e.top<t.top?this.list.scrollTop-=(t.top-e.top)/n:e.bottom>t.bottom&&(this.list.scrollTop+=(e.bottom-t.bottom)/n)}})):this.selectedIndex<0&&this.list.removeAttribute(`aria-activedescendant`),r&&this.sync()}sync(){let e=this.list.firstChild;function t(){let t=e;e=t.nextSibling,t.remove()}for(let n of this.items)if(n.dom.parentNode==this.list){for(;e!=n.dom;)t();e=n.dom.nextSibling}else this.list.insertBefore(n.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=lV(this.view.state.field(hV).diagnostics,this.items[e].diagnostic);t&&this.view.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0,effects:mV.of(t)})}static open(t){return new e(t)}};function kV(e,t=`viewBox="0 0 40 40"`){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${t}>${encodeURIComponent(e)}</svg>')`}function AV(e){return kV(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${e}" fill="none" stroke-width=".7"/>`,`width="6" height="3"`)}var jV=R.baseTheme({".cm-diagnostic":{padding:`3px 6px 3px 8px`,marginLeft:`-1px`,display:`block`,whiteSpace:`pre-wrap`},".cm-diagnostic-error":{borderLeft:`5px solid #d11`},".cm-diagnostic-warning":{borderLeft:`5px solid orange`},".cm-diagnostic-info":{borderLeft:`5px solid #999`},".cm-diagnostic-hint":{borderLeft:`5px solid #66d`},".cm-diagnosticAction":{font:`inherit`,border:`none`,padding:`2px 4px`,backgroundColor:`#444`,color:`white`,borderRadius:`3px`,marginLeft:`8px`,cursor:`pointer`},".cm-diagnosticSource":{fontSize:`70%`,opacity:.7},".cm-lintRange":{backgroundPosition:`left bottom`,backgroundRepeat:`repeat-x`,paddingBottom:`0.7px`},".cm-lintRange-error":{backgroundImage:AV(`#f11`)},".cm-lintRange-warning":{backgroundImage:AV(`orange`)},".cm-lintRange-info":{backgroundImage:AV(`#999`)},".cm-lintRange-hint":{backgroundImage:AV(`#66d`)},".cm-lintRange-active":{backgroundColor:`#ffdd9980`},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:`relative`,"&:after":{content:`""`,position:`absolute`,bottom:0,left:`-2px`,borderLeft:`3px solid transparent`,borderRight:`3px solid transparent`,borderBottom:`4px solid #d11`}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:`orange`}},".cm-lintPoint-info":{"&:after":{borderBottomColor:`#999`}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:`#66d`}},".cm-panel.cm-panel-lint":{position:`relative`,"& ul":{maxHeight:`100px`,overflowY:`auto`,"& [aria-selected]":{backgroundColor:`#ddd`,"& u":{textDecoration:`underline`}},"&:focus [aria-selected]":{background_fallback:`#bdf`,backgroundColor:`Highlight`,color_fallback:`white`,color:`HighlightText`},"& u":{textDecoration:`none`},padding:0,margin:0},"& [name=close]":{position:`absolute`,top:`0`,right:`2px`,background:`inherit`,border:`none`,font:`inherit`,padding:0,margin:0}},"&dark .cm-lintRange-active":{backgroundColor:`#86714a80`},"&dark .cm-panel.cm-panel-lint ul":{"& [aria-selected]":{backgroundColor:`#2e343e`}}});function MV(e){return e==`error`?4:e==`warning`?3:e==`info`?2:1}function NV(e){let t=`hint`,n=1;for(let r of e){let e=MV(r.severity);e>n&&(n=e,t=r.severity)}return t}var PV=Se(_V,{hideOn:uV}),FV=[hV,R.decorations.compute([hV],e=>{let{selected:t,panel:n}=e.field(hV);return!t||!n||t.from==t.to?_.none:_.set([gV.range(t.from,t.to)])}),PV,jV],IV=function(e){e===void 0&&(e={});var n=e.crosshairCursor,r=n!==void 0&&n,i=[];e.closeBracketsKeymap!==!1&&(i=i.concat(qB)),e.defaultKeymap!==!1&&(i=i.concat(lR)),e.searchKeymap!==!1&&(i=i.concat(pz)),e.historyKeymap!==!1&&(i=i.concat(xI)),e.foldKeymap!==!1&&(i=i.concat(M)),e.completionKeymap!==!1&&(i=i.concat(aV)),e.lintKeymap!==!1&&(i=i.concat(xV));var a=[];return e.lineNumbers!==!1&&a.push(le()),e.highlightActiveLineGutter!==!1&&a.push(Fe()),e.highlightSpecialChars!==!1&&a.push(H()),e.history!==!1&&a.push(nI()),e.foldGutter!==!1&&a.push(oe()),e.drawSelection!==!1&&a.push(Le()),e.dropCursor!==!1&&a.push(Ee()),e.allowMultipleSelections!==!1&&a.push(ee.allowMultipleSelections.of(!0)),e.indentOnInput!==!1&&a.push(T()),e.syntaxHighlighting!==!1&&a.push(D(fe,{fallback:!0})),e.bracketMatching!==!1&&a.push(ke()),e.closeBrackets!==!1&&a.push(VB()),e.autocompletion!==!1&&a.push(iV()),e.rectangularSelection!==!1&&a.push(we()),r!==!1&&a.push(U()),e.highlightActiveLine!==!1&&a.push(Oe()),e.highlightSelectionMatches!==!1&&a.push(wR()),e.tabSize&&typeof e.tabSize==`number`&&a.push(t.of(` `.repeat(e.tabSize))),a.concat([ze.of(i.flat())]).filter(Boolean)},LV=`#e5c07b`,RV=`#e06c75`,zV=`#56b6c2`,BV=`#ffffff`,VV=`#abb2bf`,HV=`#7d8799`,UV=`#61afef`,WV=`#98c379`,GV=`#d19a66`,KV=`#c678dd`,qV=`#21252b`,JV=`#2c313a`,YV=`#282c34`,XV=`#353a42`,ZV=`#3E4451`,QV=`#528bff`,$V=R.theme({"&":{color:VV,backgroundColor:YV},".cm-content":{caretColor:QV},".cm-cursor, .cm-dropCursor":{borderLeftColor:QV},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:ZV},".cm-panels":{backgroundColor:qV,color:VV},".cm-panels.cm-panels-top":{borderBottom:`2px solid black`},".cm-panels.cm-panels-bottom":{borderTop:`2px solid black`},".cm-searchMatch":{backgroundColor:`#72a1ff59`,outline:`1px solid #457dff`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:`#6199ff2f`},".cm-activeLine":{backgroundColor:`#6699ff0b`},".cm-selectionMatch":{backgroundColor:`#aafe661a`},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:`#bad0f847`},".cm-gutters":{backgroundColor:YV,color:HV,border:`none`},".cm-activeLineGutter":{backgroundColor:JV},".cm-foldPlaceholder":{backgroundColor:`transparent`,border:`none`,color:`#ddd`},".cm-tooltip":{border:`none`,backgroundColor:XV},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:XV,borderBottomColor:XV},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:JV,color:VV}}},{dark:!0}),eH=ie.define([{tag:K.keyword,color:KV},{tag:[K.name,K.deleted,K.character,K.propertyName,K.macroName],color:RV},{tag:[K.function(K.variableName),K.labelName],color:UV},{tag:[K.color,K.constant(K.name),K.standard(K.name)],color:GV},{tag:[K.definition(K.name),K.separator],color:VV},{tag:[K.typeName,K.className,K.number,K.changed,K.annotation,K.modifier,K.self,K.namespace],color:LV},{tag:[K.operator,K.operatorKeyword,K.url,K.escape,K.regexp,K.link,K.special(K.string)],color:zV},{tag:[K.meta,K.comment],color:HV},{tag:K.strong,fontWeight:`bold`},{tag:K.emphasis,fontStyle:`italic`},{tag:K.strikethrough,textDecoration:`line-through`},{tag:K.link,color:HV,textDecoration:`underline`},{tag:K.heading,fontWeight:`bold`,color:RV},{tag:[K.atom,K.bool,K.special(K.variableName)],color:GV},{tag:[K.processingInstruction,K.string,K.inserted],color:WV},{tag:K.invalid,color:BV}]),tH=[$V,D(eH)],nH=R.theme({"&":{backgroundColor:`#fff`}},{dark:!1}),rH=function(e){e===void 0&&(e={});var t=e,n=t.indentWithTab,r=n===void 0||n,i=t.editable,a=i===void 0||i,o=t.readOnly,s=o!==void 0&&o,c=t.theme,l=c===void 0?`light`:c,u=t.placeholder,d=u===void 0?``:u,f=t.basicSetup,p=f===void 0||f,m=[];switch(r&&m.unshift(ze.of([uR])),p&&(typeof p==`boolean`?m.unshift(IV()):m.unshift(IV(p))),d&&m.unshift(Ae(d)),l){case`light`:m.push(nH);break;case`dark`:m.push(tH);break;case`none`:break;default:m.push(l)}return a===!1&&m.push(R.editable.of(!1)),s&&m.push(ee.readOnly.of(!0)),[...m]},iH=e=>({line:e.state.doc.lineAt(e.state.selection.main.from),lineCount:e.state.doc.lines,lineBreak:e.state.lineBreak,length:e.state.doc.length,readOnly:e.state.readOnly,tabSize:e.state.tabSize,selection:e.state.selection,selectionAsSingle:e.state.selection.asSingle().main,ranges:e.state.selection.ranges,selectionCode:e.state.sliceDoc(e.state.selection.main.from,e.state.selection.main.to),selections:e.state.selection.ranges.map(t=>e.state.sliceDoc(t.from,t.to)),selectedText:e.state.selection.ranges.some(e=>!e.empty)}),aH=class{constructor(e,t){this.timeLeftMS=void 0,this.timeoutMS=void 0,this.isCancelled=!1,this.isTimeExhausted=!1,this.callbacks=[],this.timeLeftMS=t,this.timeoutMS=t,this.callbacks.push(e)}tick(){if(!this.isCancelled&&!this.isTimeExhausted&&(this.timeLeftMS--,this.timeLeftMS<=0)){this.isTimeExhausted=!0;var e=this.callbacks.slice();this.callbacks.length=0,e.forEach(e=>{try{e()}catch(e){console.error(`TimeoutLatch callback error:`,e)}})}}cancel(){this.isCancelled=!0,this.callbacks.length=0}reset(){this.timeLeftMS=this.timeoutMS,this.isCancelled=!1,this.isTimeExhausted=!1}get isDone(){return this.isCancelled||this.isTimeExhausted}},oH=class{constructor(){this.interval=null,this.latches=new Set}add(e){this.latches.add(e),this.start()}remove(e){this.latches.delete(e),this.latches.size===0&&this.stop()}start(){this.interval===null&&(this.interval=setInterval(()=>{this.latches.forEach(e=>{e.tick(),e.isDone&&this.remove(e)})},1))}stop(){this.interval!==null&&(clearInterval(this.interval),this.interval=null)}},sH=null,cH=()=>typeof window>`u`?new oH:(sH||=new oH,sH),lH=R.theme({"& .cm-scroller":{height:`100% !important`}}),uH=null,dH=null;function fH(e,t,n,r,i,a){if(!e&&!t&&!n&&!r&&!i&&!a)return null;var o=JSON.stringify({height:e,minHeight:t,maxHeight:n,width:r,minWidth:i,maxWidth:a});return o===uH||(uH=o,dH=R.theme({"&":{height:e,minHeight:t,maxHeight:n,width:r,minWidth:i,maxWidth:a}})),dH}var pH=V.define(),mH=200,hH=[];function gH(e){var t=e.value,n=e.selection,r=e.onChange,i=e.onStatistics,a=e.onCreateEditor,o=e.onUpdate,s=e.extensions,c=s===void 0?hH:s,l=e.autoFocus,u=e.theme,d=u===void 0?`light`:u,f=e.height,p=f===void 0?null:f,m=e.minHeight,h=m===void 0?null:m,g=e.maxHeight,_=g===void 0?null:g,v=e.width,y=v===void 0?null:v,b=e.minWidth,x=b===void 0?null:b,C=e.maxWidth,w=C===void 0?null:C,T=e.placeholder,E=T===void 0?``:T,D=e.editable,O=D===void 0||D,k=e.readOnly,A=k!==void 0&&k,j=e.indentWithTab,M=j===void 0||j,N=e.basicSetup,P=N===void 0||N,F=e.root,I=e.initialState,L=(0,q.useState)(),te=L[0],z=L[1],B=(0,q.useState)(),ne=B[0],re=B[1],ie=(0,q.useState)(),ae=ie[0],oe=ie[1],V=(0,q.useState)(()=>({current:null}))[0],se=(0,q.useState)(()=>({current:null}))[0],H=fH(p,h,_,y,x,w),ce=R.updateListener.of(e=>{e.docChanged&&typeof r==`function`&&!e.transactions.some(e=>e.annotation(pH))&&(V.current?V.current.reset():(V.current=new aH(()=>{if(se.current){var e=se.current;se.current=null,e()}V.current=null},mH),cH().add(V.current)),r(e.state.doc.toString(),e)),i&&i(iH(e))}),le=rH({theme:d,editable:O,readOnly:A,placeholder:E,indentWithTab:M,basicSetup:P}),U=[ce,...H?[H]:[],lH,...le];return o&&typeof o==`function`&&U.push(R.updateListener.of(o)),U=U.concat(c),(0,q.useLayoutEffect)(()=>{if(te&&!ae){var e={doc:t,selection:n,extensions:U},r=I?ee.fromJSON(I.json,e,I.fields):ee.create(e);if(oe(r),!ne){var i=new R({state:r,parent:te,root:F});re(i),a&&a(i,r)}}return()=>{ne&&(oe(void 0),re(void 0))}},[te,ae]),(0,q.useEffect)(()=>{e.container&&z(e.container)},[e.container]),(0,q.useEffect)(()=>()=>{ne&&(ne.destroy(),re(void 0)),V.current&&=(V.current.cancel(),null)},[ne]),(0,q.useEffect)(()=>{l&&ne&&ne.focus()},[l,ne]),(0,q.useEffect)(()=>{ne&&ne.dispatch({effects:S.reconfigure.of(U)})},[d,c,p,h,_,y,x,w,E,O,A,M,P,r,o]),(0,q.useEffect)(()=>{if(t!==void 0){var e=ne?ne.state.doc.toString():``;if(ne&&t!==e){var n=V.current&&!V.current.isDone,r=()=>{ne&&t!==ne.state.doc.toString()&&ne.dispatch({changes:{from:0,to:ne.state.doc.toString().length,insert:t||``},annotations:[pH.of(!0)]})};n?se.current=r:r()}}},[t,ne]),{state:ae,setState:oe,view:ne,setView:re,container:te,setContainer:z}}var _H=[`className`,`value`,`selection`,`extensions`,`onChange`,`onStatistics`,`onCreateEditor`,`onUpdate`,`autoFocus`,`theme`,`height`,`minHeight`,`maxHeight`,`width`,`minWidth`,`maxWidth`,`basicSetup`,`placeholder`,`indentWithTab`,`editable`,`readOnly`,`root`,`initialState`],vH=(0,q.forwardRef)((e,t)=>{var n=e.className,r=e.value,i=r===void 0?``:r,a=e.selection,o=e.extensions,s=o===void 0?[]:o,c=e.onChange,l=e.onStatistics,u=e.onCreateEditor,d=e.onUpdate,f=e.autoFocus,p=e.theme,m=p===void 0?`light`:p,h=e.height,g=e.minHeight,_=e.maxHeight,v=e.width,y=e.minWidth,b=e.maxWidth,x=e.basicSetup,S=e.placeholder,C=e.indentWithTab,w=e.editable,T=e.readOnly,E=e.root,D=e.initialState,O=zF(e,_H),k=(0,q.useRef)(null),A=gH({root:E,value:i,autoFocus:f,theme:m,height:h,minHeight:g,maxHeight:_,width:v,minWidth:y,maxWidth:b,basicSetup:x,placeholder:S,indentWithTab:C,editable:w,readOnly:T,selection:a,onChange:c,onStatistics:l,onCreateEditor:u,onUpdate:d,extensions:s,initialState:D}),j=A.state,M=A.view,N=A.container,P=A.setContainer;(0,q.useImperativeHandle)(t,()=>({editor:k.current,state:j,view:M}),[k,N,j,M]);var ee=(0,q.useCallback)(e=>{k.current=e,P(e)},[P]);if(typeof i!=`string`)throw Error(`value must be typeof string but got `+typeof i);var F=typeof m==`string`?`cm-theme-`+m:`cm-theme`;return(0,J.jsx)(`div`,RF({ref:ee,className:``+F+(n?` `+n:``)},O))});vH.displayName=`CodeMirror`;var yH=/\.(png|jpe?g|webp)$/i;function bH(e){let t=e.trim().replace(/\\/g,`/`);return/^none\b/i.test(t)||!t.startsWith(`.explore/`)||t.includes(`..`)||!yH.test(t)?null:`/explore-files?file=${encodeURIComponent(t)}`}var xH=`bottom`,SH=`right`,CH=`left`,wH=`auto`,TH=[`top`,xH,SH,CH],EH=`start`,DH=`clippingParents`,OH=`viewport`,kH=`popper`,AH=`reference`,jH=TH.reduce(function(e,t){return e.concat([t+`-`+EH,t+`-end`])},[]),MH=[].concat(TH,[wH]).reduce(function(e,t){return e.concat([t,t+`-`+EH,t+`-end`])},[]),NH=[`beforeRead`,`read`,`afterRead`,`beforeMain`,`main`,`afterMain`,`beforeWrite`,`write`,`afterWrite`];function PH(e){return e?(e.nodeName||``).toLowerCase():null}function FH(e){if(e==null)return window;if(e.toString()!==`[object Window]`){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function IH(e){return e instanceof FH(e).Element||e instanceof Element}function LH(e){return e instanceof FH(e).HTMLElement||e instanceof HTMLElement}function RH(e){return typeof ShadowRoot>`u`?!1:e instanceof FH(e).ShadowRoot||e instanceof ShadowRoot}function zH(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];LH(i)&&PH(i)&&(Object.assign(i.style,n),Object.keys(r).forEach(function(e){var t=r[e];t===!1?i.removeAttribute(e):i.setAttribute(e,t===!0?``:t)}))})}function BH(e){var t=e.state,n={popper:{position:t.options.strategy,left:`0`,top:`0`,margin:`0`},arrow:{position:`absolute`},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var r=t.elements[e],i=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]=``,e},{});LH(r)&&PH(r)&&(Object.assign(r.style,a),Object.keys(i).forEach(function(e){r.removeAttribute(e)}))})}}var VH={name:`applyStyles`,enabled:!0,phase:`write`,fn:zH,effect:BH,requires:[`computeStyles`]};function HH(e){return e.split(`-`)[0]}var UH=Math.max,WH=Math.min,GH=Math.round;function KH(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+`/`+e.version}).join(` `):navigator.userAgent}function qH(){return!/^((?!chrome|android).)*safari/i.test(KH())}function JH(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,a=1;t&&LH(e)&&(i=e.offsetWidth>0&&GH(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&GH(r.height)/e.offsetHeight||1);var o=(IH(e)?FH(e):window).visualViewport,s=!qH()&&n,c=(r.left+(s&&o?o.offsetLeft:0))/i,l=(r.top+(s&&o?o.offsetTop:0))/a,u=r.width/i,d=r.height/a;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c,x:c,y:l}}function YH(e){var t=JH(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function XH(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&RH(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function ZH(e){return FH(e).getComputedStyle(e)}function QH(e){return[`table`,`td`,`th`].indexOf(PH(e))>=0}function $H(e){return((IH(e)?e.ownerDocument:e.document)||window.document).documentElement}function eU(e){return PH(e)===`html`?e:e.assignedSlot||e.parentNode||(RH(e)?e.host:null)||$H(e)}function tU(e){return!LH(e)||ZH(e).position===`fixed`?null:e.offsetParent}function nU(e){var t=/firefox/i.test(KH());if(/Trident/i.test(KH())&&LH(e)&&ZH(e).position===`fixed`)return null;var n=eU(e);for(RH(n)&&(n=n.host);LH(n)&&[`html`,`body`].indexOf(PH(n))<0;){var r=ZH(n);if(r.transform!==`none`||r.perspective!==`none`||r.contain===`paint`||[`transform`,`perspective`].indexOf(r.willChange)!==-1||t&&r.willChange===`filter`||t&&r.filter&&r.filter!==`none`)return n;n=n.parentNode}return null}function rU(e){for(var t=FH(e),n=tU(e);n&&QH(n)&&ZH(n).position===`static`;)n=tU(n);return n&&(PH(n)===`html`||PH(n)===`body`&&ZH(n).position===`static`)?t:n||nU(e)||t}function iU(e){return[`top`,`bottom`].indexOf(e)>=0?`x`:`y`}function aU(e,t,n){return UH(e,WH(t,n))}function oU(e,t,n){var r=aU(e,t,n);return r>n?n:r}function sU(){return{top:0,right:0,bottom:0,left:0}}function cU(e){return Object.assign({},sU(),e)}function lU(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}var uU=function(e,t){return e=typeof e==`function`?e(Object.assign({},t.rects,{placement:t.placement})):e,cU(typeof e==`number`?lU(e,TH):e)};function dU(e){var t,n=e.state,r=e.name,i=e.options,a=n.elements.arrow,o=n.modifiersData.popperOffsets,s=HH(n.placement),c=iU(s),l=[`left`,`right`].indexOf(s)>=0?`height`:`width`;if(a&&o){var u=uU(i.padding,n),d=YH(a),f=c===`y`?`top`:CH,p=c===`y`?xH:SH,m=n.rects.reference[l]+n.rects.reference[c]-o[c]-n.rects.popper[l],h=o[c]-n.rects.reference[c],g=rU(a),_=g?c===`y`?g.clientHeight||0:g.clientWidth||0:0,v=m/2-h/2,y=u[f],b=_-d[l]-u[p],x=_/2-d[l]/2+v,S=aU(y,x,b),C=c;n.modifiersData[r]=(t={},t[C]=S,t.centerOffset=S-x,t)}}function fU(e){var t=e.state,n=e.options.element,r=n===void 0?`[data-popper-arrow]`:n;r!=null&&(typeof r==`string`&&(r=t.elements.popper.querySelector(r),!r)||XH(t.elements.popper,r)&&(t.elements.arrow=r))}var pU={name:`arrow`,enabled:!0,phase:`main`,fn:dU,effect:fU,requires:[`popperOffsets`],requiresIfExists:[`preventOverflow`]};function mU(e){return e.split(`-`)[1]}var hU={top:`auto`,right:`auto`,bottom:`auto`,left:`auto`};function gU(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:GH(n*i)/i||0,y:GH(r*i)/i||0}}function _U(e){var t,n=e.popper,r=e.popperRect,i=e.placement,a=e.variation,o=e.offsets,s=e.position,c=e.gpuAcceleration,l=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=o.x,p=f===void 0?0:f,m=o.y,h=m===void 0?0:m,g=typeof u==`function`?u({x:p,y:h}):{x:p,y:h};p=g.x,h=g.y;var _=o.hasOwnProperty(`x`),v=o.hasOwnProperty(`y`),y=CH,b=`top`,x=window;if(l){var S=rU(n),C=`clientHeight`,w=`clientWidth`;if(S===FH(n)&&(S=$H(n),ZH(S).position!==`static`&&s===`absolute`&&(C=`scrollHeight`,w=`scrollWidth`)),S=S,i===`top`||(i===`left`||i===`right`)&&a===`end`){b=xH;var T=d&&S===x&&x.visualViewport?x.visualViewport.height:S[C];h-=T-r.height,h*=c?1:-1}if(i===`left`||(i===`top`||i===`bottom`)&&a===`end`){y=SH;var E=d&&S===x&&x.visualViewport?x.visualViewport.width:S[w];p-=E-r.width,p*=c?1:-1}}var D=Object.assign({position:s},l&&hU),O=u===!0?gU({x:p,y:h},FH(n)):{x:p,y:h};if(p=O.x,h=O.y,c){var k;return Object.assign({},D,(k={},k[b]=v?`0`:``,k[y]=_?`0`:``,k.transform=(x.devicePixelRatio||1)<=1?`translate(`+p+`px, `+h+`px)`:`translate3d(`+p+`px, `+h+`px, 0)`,k))}return Object.assign({},D,(t={},t[b]=v?h+`px`:``,t[y]=_?p+`px`:``,t.transform=``,t))}function vU(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0||r,a=n.adaptive,o=a===void 0||a,s=n.roundOffsets,c=s===void 0||s,l={placement:HH(t.placement),variation:mU(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy===`fixed`};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,_U(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,_U(Object.assign({},l,{offsets:t.modifiersData.arrow,position:`absolute`,adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var yU={name:`computeStyles`,enabled:!0,phase:`beforeWrite`,fn:vU,data:{}},bU={passive:!0};function xU(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,a=i===void 0||i,o=r.resize,s=o===void 0||o,c=FH(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&l.forEach(function(e){e.addEventListener(`scroll`,n.update,bU)}),s&&c.addEventListener(`resize`,n.update,bU),function(){a&&l.forEach(function(e){e.removeEventListener(`scroll`,n.update,bU)}),s&&c.removeEventListener(`resize`,n.update,bU)}}var SU={name:`eventListeners`,enabled:!0,phase:`write`,fn:function(){},effect:xU,data:{}},CU={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function wU(e){return e.replace(/left|right|bottom|top/g,function(e){return CU[e]})}var TU={start:`end`,end:`start`};function EU(e){return e.replace(/start|end/g,function(e){return TU[e]})}function DU(e){var t=FH(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function OU(e){return JH($H(e)).left+DU(e).scrollLeft}function kU(e,t){var n=FH(e),r=$H(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;var l=qH();(l||!l&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s+OU(e),y:c}}function AU(e){var t=$H(e),n=DU(e),r=e.ownerDocument?.body,i=UH(t.scrollWidth,t.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=UH(t.scrollHeight,t.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),o=-n.scrollLeft+OU(e),s=-n.scrollTop;return ZH(r||t).direction===`rtl`&&(o+=UH(t.clientWidth,r?r.clientWidth:0)-i),{width:i,height:a,x:o,y:s}}function jU(e){var t=ZH(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function MU(e){return[`html`,`body`,`#document`].indexOf(PH(e))>=0?e.ownerDocument.body:LH(e)&&jU(e)?e:MU(eU(e))}function NU(e,t){t===void 0&&(t=[]);var n=MU(e),r=n===e.ownerDocument?.body,i=FH(n),a=r?[i].concat(i.visualViewport||[],jU(n)?n:[]):n,o=t.concat(a);return r?o:o.concat(NU(eU(a)))}function PU(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function FU(e,t){var n=JH(e,!1,t===`fixed`);return n.top+=e.clientTop,n.left+=e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function IU(e,t,n){return t===`viewport`?PU(kU(e,n)):IH(t)?FU(t,n):PU(AU($H(e)))}function LU(e){var t=NU(eU(e)),n=[`absolute`,`fixed`].indexOf(ZH(e).position)>=0&&LH(e)?rU(e):e;return IH(n)?t.filter(function(e){return IH(e)&&XH(e,n)&&PH(e)!==`body`}):[]}function RU(e,t,n,r){var i=t===`clippingParents`?LU(e):[].concat(t),a=[].concat(i,[n]),o=a[0],s=a.reduce(function(t,n){var i=IU(e,n,r);return t.top=UH(i.top,t.top),t.right=WH(i.right,t.right),t.bottom=WH(i.bottom,t.bottom),t.left=UH(i.left,t.left),t},IU(e,o,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function zU(e){var t=e.reference,n=e.element,r=e.placement,i=r?HH(r):null,a=r?mU(r):null,o=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,c;switch(i){case`top`:c={x:o,y:t.y-n.height};break;case xH:c={x:o,y:t.y+t.height};break;case SH:c={x:t.x+t.width,y:s};break;case CH:c={x:t.x-n.width,y:s};break;default:c={x:t.x,y:t.y}}var l=i?iU(i):null;if(l!=null){var u=l===`y`?`height`:`width`;switch(a){case EH:c[l]=c[l]-(t[u]/2-n[u]/2);break;case`end`:c[l]=c[l]+(t[u]/2-n[u]/2)}}return c}function BU(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,a=n.strategy,o=a===void 0?e.strategy:a,s=n.boundary,c=s===void 0?DH:s,l=n.rootBoundary,u=l===void 0?OH:l,d=n.elementContext,f=d===void 0?kH:d,p=n.altBoundary,m=p!==void 0&&p,h=n.padding,g=h===void 0?0:h,_=cU(typeof g==`number`?lU(g,TH):g),v=f===`popper`?AH:kH,y=e.rects.popper,b=e.elements[m?v:f],x=RU(IH(b)?b:b.contextElement||$H(e.elements.popper),c,u,o),S=JH(e.elements.reference),C=zU({reference:S,element:y,strategy:`absolute`,placement:i}),w=PU(Object.assign({},y,C)),T=f===`popper`?w:S,E={top:x.top-T.top+_.top,bottom:T.bottom-x.bottom+_.bottom,left:x.left-T.left+_.left,right:T.right-x.right+_.right},D=e.modifiersData.offset;if(f===`popper`&&D){var O=D[i];Object.keys(E).forEach(function(e){var t=[`right`,`bottom`].indexOf(e)>=0?1:-1,n=[`top`,`bottom`].indexOf(e)>=0?`y`:`x`;E[e]+=O[n]*t})}return E}function VU(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,a=n.rootBoundary,o=n.padding,s=n.flipVariations,c=n.allowedAutoPlacements,l=c===void 0?MH:c,u=mU(r),d=u?s?jH:jH.filter(function(e){return mU(e)===u}):TH,f=d.filter(function(e){return l.indexOf(e)>=0});f.length===0&&(f=d);var p=f.reduce(function(t,n){return t[n]=BU(e,{placement:n,boundary:i,rootBoundary:a,padding:o})[HH(n)],t},{});return Object.keys(p).sort(function(e,t){return p[e]-p[t]})}function HU(e){if(HH(e)===`auto`)return[];var t=wU(e);return[EU(e),t,EU(t)]}function UU(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,a=i===void 0||i,o=n.altAxis,s=o===void 0||o,c=n.fallbackPlacements,l=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,m=p===void 0||p,h=n.allowedAutoPlacements,g=t.options.placement,_=HH(g)===g,v=c||(_||!m?[wU(g)]:HU(g)),y=[g].concat(v).reduce(function(e,n){return e.concat(HH(n)===`auto`?VU(t,{placement:n,boundary:u,rootBoundary:d,padding:l,flipVariations:m,allowedAutoPlacements:h}):n)},[]),b=t.rects.reference,x=t.rects.popper,S=new Map,C=!0,w=y[0],T=0;T<y.length;T++){var E=y[T],D=HH(E),O=mU(E)===EH,k=[`top`,xH].indexOf(D)>=0,A=k?`width`:`height`,j=BU(t,{placement:E,boundary:u,rootBoundary:d,altBoundary:f,padding:l}),M=k?O?SH:CH:O?xH:`top`;b[A]>x[A]&&(M=wU(M));var N=wU(M),P=[];if(a&&P.push(j[D]<=0),s&&P.push(j[M]<=0,j[N]<=0),P.every(function(e){return e})){w=E,C=!1;break}S.set(E,P)}if(C)for(var ee=m?3:1,F=function(e){var t=y.find(function(t){var n=S.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return w=t,`break`},I=ee;I>0&&F(I)!==`break`;I--);t.placement!==w&&(t.modifiersData[r]._skip=!0,t.placement=w,t.reset=!0)}}var WU={name:`flip`,enabled:!0,phase:`main`,fn:UU,requiresIfExists:[`offset`],data:{_skip:!1}};function GU(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function KU(e){return[`top`,SH,xH,CH].some(function(t){return e[t]>=0})}function qU(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,o=BU(t,{elementContext:`reference`}),s=BU(t,{altBoundary:!0}),c=GU(o,r),l=GU(s,i,a),u=KU(c),d=KU(l);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}var JU={name:`hide`,enabled:!0,phase:`main`,requiresIfExists:[`preventOverflow`],fn:qU};function YU(e,t,n){var r=HH(e),i=[`left`,`top`].indexOf(r)>=0?-1:1,a=typeof n==`function`?n(Object.assign({},t,{placement:e})):n,o=a[0],s=a[1];return o||=0,s=(s||0)*i,[`left`,`right`].indexOf(r)>=0?{x:s,y:o}:{x:o,y:s}}function XU(e){var t=e.state,n=e.options,r=e.name,i=n.offset,a=i===void 0?[0,0]:i,o=MH.reduce(function(e,n){return e[n]=YU(n,t.rects,a),e},{}),s=o[t.placement],c=s.x,l=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=l),t.modifiersData[r]=o}var ZU={name:`offset`,enabled:!0,phase:`main`,requires:[`popperOffsets`],fn:XU};function QU(e){var t=e.state,n=e.name;t.modifiersData[n]=zU({reference:t.rects.reference,element:t.rects.popper,strategy:`absolute`,placement:t.placement})}var $U={name:`popperOffsets`,enabled:!0,phase:`read`,fn:QU,data:{}};function eW(e){return e===`x`?`y`:`x`}function tW(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,a=i===void 0||i,o=n.altAxis,s=o!==void 0&&o,c=n.boundary,l=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,p=f===void 0||f,m=n.tetherOffset,h=m===void 0?0:m,g=BU(t,{boundary:c,rootBoundary:l,padding:d,altBoundary:u}),_=HH(t.placement),v=mU(t.placement),y=!v,b=iU(_),x=eW(b),S=t.modifiersData.popperOffsets,C=t.rects.reference,w=t.rects.popper,T=typeof h==`function`?h(Object.assign({},t.rects,{placement:t.placement})):h,E=typeof T==`number`?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),D=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,O={x:0,y:0};if(S){if(a){var k=b===`y`?`top`:CH,A=b===`y`?xH:SH,j=b===`y`?`height`:`width`,M=S[b],N=M+g[k],P=M-g[A],ee=p?-w[j]/2:0,F=v===`start`?C[j]:w[j],I=v===`start`?-w[j]:-C[j],L=t.elements.arrow,te=p&&L?YH(L):{width:0,height:0},R=t.modifiersData[`arrow#persistent`]?t.modifiersData[`arrow#persistent`].padding:sU(),z=R[k],B=R[A],ne=aU(0,C[j],te[j]),re=y?C[j]/2-ee-ne-z-E.mainAxis:F-ne-z-E.mainAxis,ie=y?-C[j]/2+ee+ne+B+E.mainAxis:I+ne+B+E.mainAxis,ae=t.elements.arrow&&rU(t.elements.arrow),oe=ae?b===`y`?ae.clientTop||0:ae.clientLeft||0:0,V=D?.[b]??0,se=M+re-V-oe,H=M+ie-V,ce=aU(p?WH(N,se):N,M,p?UH(P,H):P);S[b]=ce,O[b]=ce-M}if(s){var le=b===`x`?`top`:CH,U=b===`x`?xH:SH,ue=S[x],de=x===`y`?`height`:`width`,fe=ue+g[le],pe=ue-g[U],me=[`top`,CH].indexOf(_)!==-1,he=D?.[x]??0,ge=me?fe:ue-C[de]-w[de]-he+E.altAxis,_e=me?ue+C[de]+w[de]-he-E.altAxis:pe,ve=p&&me?oU(ge,ue,_e):aU(p?ge:fe,ue,p?_e:pe);S[x]=ve,O[x]=ve-ue}t.modifiersData[r]=O}}var nW={name:`preventOverflow`,enabled:!0,phase:`main`,fn:tW,requiresIfExists:[`offset`]};function rW(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function iW(e){return e===FH(e)||!LH(e)?DU(e):rW(e)}function aW(e){var t=e.getBoundingClientRect(),n=GH(t.width)/e.offsetWidth||1,r=GH(t.height)/e.offsetHeight||1;return n!==1||r!==1}function oW(e,t,n){n===void 0&&(n=!1);var r=LH(t),i=LH(t)&&aW(t),a=$H(t),o=JH(e,i,n),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((PH(t)!==`body`||jU(a))&&(s=iW(t)),LH(t)?(c=JH(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):a&&(c.x=OU(a))),{x:o.left+s.scrollLeft-c.x,y:o.top+s.scrollTop-c.y,width:o.width,height:o.height}}function sW(e){var t=new Map,n=new Set,r=[];e.forEach(function(e){t.set(e.name,e)});function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}}),r.push(e)}return e.forEach(function(e){n.has(e.name)||i(e)}),r}function cW(e){var t=sW(e);return NH.reduce(function(e,n){return e.concat(t.filter(function(e){return e.phase===n}))},[])}function lW(e){var t;return function(){return t||=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})}),t}}function uW(e){var t=e.reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{});return Object.keys(t).map(function(e){return t[e]})}var dW={placement:`bottom`,modifiers:[],strategy:`absolute`};function fW(){return![...arguments].some(function(e){return!(e&&typeof e.getBoundingClientRect==`function`)})}function pW(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,a=i===void 0?dW:i;return function(e,t,n){n===void 0&&(n=a);var i={placement:`bottom`,orderedModifiers:[],options:Object.assign({},dW,a),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},o=[],s=!1,c={state:i,setOptions:function(n){var o=typeof n==`function`?n(i.options):n;u(),i.options=Object.assign({},a,i.options,o),i.scrollParents={reference:IH(e)?NU(e):e.contextElement?NU(e.contextElement):[],popper:NU(t)};var s=cW(uW([].concat(r,i.options.modifiers)));return i.orderedModifiers=s.filter(function(e){return e.enabled}),l(),c.update()},forceUpdate:function(){if(!s){var e=i.elements,t=e.reference,n=e.popper;if(fW(t,n)){i.rects={reference:oW(t,rU(n),i.options.strategy===`fixed`),popper:YH(n)},i.reset=!1,i.placement=i.options.placement,i.orderedModifiers.forEach(function(e){return i.modifiersData[e.name]=Object.assign({},e.data)});for(var r=0;r<i.orderedModifiers.length;r++)if(i.reset===!0)i.reset=!1,r=-1;else{var a=i.orderedModifiers[r],o=a.fn,l=a.options,u=l===void 0?{}:l,d=a.name;typeof o==`function`&&(i=o({state:i,options:u,name:d,instance:c})||i)}}}},update:lW(function(){return new Promise(function(e){c.forceUpdate(),e(i)})}),destroy:function(){u(),s=!0}};if(!fW(e,t))return c;c.setOptions(n).then(function(e){!s&&n.onFirstUpdate&&n.onFirstUpdate(e)});function l(){i.orderedModifiers.forEach(function(e){var t=e.name,n=e.options,r=n===void 0?{}:n,a=e.effect;if(typeof a==`function`){var s=a({state:i,name:t,instance:c,options:r});o.push(s||function(){})}})}function u(){o.forEach(function(e){return e()}),o=[]}return c}}var mW=pW({defaultModifiers:[SU,$U,yU,VH,ZU,WU,nW,pU,JU]}),hW=`tippy-box`,gW=`tippy-content`,_W=`tippy-backdrop`,vW=`tippy-arrow`,yW=`tippy-svg-arrow`,bW={passive:!0,capture:!0},xW=function(){return document.body};function SW(e,t,n){return Array.isArray(e)?e[t]??(Array.isArray(n)?n[t]:n):e}function CW(e,t){var n={}.toString.call(e);return n.indexOf(`[object`)===0&&n.indexOf(t+`]`)>-1}function wW(e,t){return typeof e==`function`?e.apply(void 0,t):e}function TW(e,t){if(t===0)return e;var n;return function(r){clearTimeout(n),n=setTimeout(function(){e(r)},t)}}function EW(e,t){var n=Object.assign({},e);return t.forEach(function(e){delete n[e]}),n}function DW(e){return e.split(/\s+/).filter(Boolean)}function OW(e){return[].concat(e)}function kW(e,t){e.indexOf(t)===-1&&e.push(t)}function AW(e){return e.filter(function(t,n){return e.indexOf(t)===n})}function jW(e){return e.split(`-`)[0]}function MW(e){return[].slice.call(e)}function NW(e){return Object.keys(e).reduce(function(t,n){return e[n]!==void 0&&(t[n]=e[n]),t},{})}function PW(){return document.createElement(`div`)}function FW(e){return[`Element`,`Fragment`].some(function(t){return CW(e,t)})}function IW(e){return CW(e,`NodeList`)}function LW(e){return CW(e,`MouseEvent`)}function RW(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function zW(e){return FW(e)?[e]:IW(e)?MW(e):Array.isArray(e)?e:MW(document.querySelectorAll(e))}function BW(e,t){e.forEach(function(e){e&&(e.style.transitionDuration=t+`ms`)})}function VW(e,t){e.forEach(function(e){e&&e.setAttribute(`data-state`,t)})}function HW(e){var t,n=OW(e)[0];return n!=null&&(t=n.ownerDocument)!=null&&t.body?n.ownerDocument:document}function UW(e,t){var n=t.clientX,r=t.clientY;return e.every(function(e){var t=e.popperRect,i=e.popperState,a=e.props.interactiveBorder,o=jW(i.placement),s=i.modifiersData.offset;if(!s)return!0;var c=o===`bottom`?s.top.y:0,l=o===`top`?s.bottom.y:0,u=o===`right`?s.left.x:0,d=o===`left`?s.right.x:0,f=t.top-r+c>a,p=r-t.bottom-l>a,m=t.left-n+u>a,h=n-t.right-d>a;return f||p||m||h})}function WW(e,t,n){var r=t+`EventListener`;[`transitionend`,`webkitTransitionEnd`].forEach(function(t){e[r](t,n)})}function GW(e,t){for(var n=t;n;){if(e.contains(n))return!0;n=n.getRootNode==null?void 0:n.getRootNode()?.host}return!1}var KW={isTouch:!1},qW=0;function JW(){KW.isTouch||(KW.isTouch=!0,window.performance&&document.addEventListener(`mousemove`,YW))}function YW(){var e=performance.now();e-qW<20&&(KW.isTouch=!1,document.removeEventListener(`mousemove`,YW)),qW=e}function XW(){var e=document.activeElement;if(RW(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function ZW(){document.addEventListener(`touchstart`,JW,bW),window.addEventListener(`blur`,XW)}var QW=typeof window<`u`&&typeof document<`u`&&!!window.msCrypto,$W=Object.assign({appendTo:xW,aria:{content:`auto`,expanded:`auto`},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:``,offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:`top`,plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:`mouseenter focus`,triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{allowHTML:!1,animation:`fade`,arrow:!0,content:``,inertia:!1,maxWidth:350,role:`tooltip`,theme:``,zIndex:9999}),eG=Object.keys($W),tG=function(e){Object.keys(e).forEach(function(t){$W[t]=e[t]})};function nG(e){var t=(e.plugins||[]).reduce(function(t,n){var r=n.name,i=n.defaultValue;return r&&(t[r]=e[r]===void 0?$W[r]??i:e[r]),t},{});return Object.assign({},e,t)}function rG(e,t){return(t?Object.keys(nG(Object.assign({},$W,{plugins:t}))):eG).reduce(function(t,n){var r=(e.getAttribute(`data-tippy-`+n)||``).trim();if(!r)return t;if(n===`content`)t[n]=r;else try{t[n]=JSON.parse(r)}catch{t[n]=r}return t},{})}function iG(e,t){var n=Object.assign({},t,{content:wW(t.content,[e])},t.ignoreAttributes?{}:rG(e,t.plugins));return n.aria=Object.assign({},$W.aria,n.aria),n.aria={expanded:n.aria.expanded===`auto`?t.interactive:n.aria.expanded,content:n.aria.content===`auto`?t.interactive?null:`describedby`:n.aria.content},n}var aG=function(){return`innerHTML`};function oG(e,t){e[aG()]=t}function sG(e){var t=PW();return e===!0?t.className=vW:(t.className=yW,FW(e)?t.appendChild(e):oG(t,e)),t}function cG(e,t){FW(t.content)?(oG(e,``),e.appendChild(t.content)):typeof t.content!=`function`&&(t.allowHTML?oG(e,t.content):e.textContent=t.content)}function lG(e){var t=e.firstElementChild,n=MW(t.children);return{box:t,content:n.find(function(e){return e.classList.contains(gW)}),arrow:n.find(function(e){return e.classList.contains(vW)||e.classList.contains(yW)}),backdrop:n.find(function(e){return e.classList.contains(_W)})}}function uG(e){var t=PW(),n=PW();n.className=hW,n.setAttribute(`data-state`,`hidden`),n.setAttribute(`tabindex`,`-1`);var r=PW();r.className=gW,r.setAttribute(`data-state`,`hidden`),cG(r,e.props),t.appendChild(n),n.appendChild(r),i(e.props,e.props);function i(n,r){var i=lG(t),a=i.box,o=i.content,s=i.arrow;r.theme?a.setAttribute(`data-theme`,r.theme):a.removeAttribute(`data-theme`),typeof r.animation==`string`?a.setAttribute(`data-animation`,r.animation):a.removeAttribute(`data-animation`),r.inertia?a.setAttribute(`data-inertia`,``):a.removeAttribute(`data-inertia`),a.style.maxWidth=typeof r.maxWidth==`number`?r.maxWidth+`px`:r.maxWidth,r.role?a.setAttribute(`role`,r.role):a.removeAttribute(`role`),(n.content!==r.content||n.allowHTML!==r.allowHTML)&&cG(o,e.props),r.arrow?s?n.arrow!==r.arrow&&(a.removeChild(s),a.appendChild(sG(r.arrow))):a.appendChild(sG(r.arrow)):s&&a.removeChild(s)}return{popper:t,onUpdate:i}}uG.$$tippy=!0;var dG=1,fG=[],pG=[];function mG(e,t){var n=iG(e,Object.assign({},$W,nG(NW(t)))),r,i,a,o=!1,s=!1,c=!1,l=!1,u,d,f,p=[],m=TW(se,n.interactiveDebounce),h,g=dG++,_=null,v=AW(n.plugins),y={id:g,reference:e,popper:PW(),popperInstance:_,props:n,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:v,clearDelayTimeouts:_e,setProps:ve,setContent:ye,show:be,hide:xe,hideWithInteractivity:W,enable:he,disable:ge,unmount:Se,destroy:Ce};if(!n.render)return y;var b=n.render(y),x=b.popper,S=b.onUpdate;x.setAttribute(`data-tippy-root`,``),x.id=`tippy-`+y.id,y.popper=x,e._tippy=y,x._tippy=y;var C=v.map(function(e){return e.fn(y)}),w=e.hasAttribute(`aria-expanded`);return ae(),ee(),M(),N(`onCreate`,[y]),n.showOnCreate&&pe(),x.addEventListener(`mouseenter`,function(){y.props.interactive&&y.state.isVisible&&y.clearDelayTimeouts()}),x.addEventListener(`mouseleave`,function(){y.props.interactive&&y.props.trigger.indexOf(`mouseenter`)>=0&&k().addEventListener(`mousemove`,m)}),y;function T(){var e=y.props.touch;return Array.isArray(e)?e:[e,0]}function E(){return T()[0]===`hold`}function D(){var e;return!!((e=y.props.render)!=null&&e.$$tippy)}function O(){return h||e}function k(){var e=O().parentNode;return e?HW(e):document}function A(){return lG(x)}function j(e){return y.state.isMounted&&!y.state.isVisible||KW.isTouch||u&&u.type===`focus`?0:SW(y.props.delay,+!e,$W.delay)}function M(e){e===void 0&&(e=!1),x.style.pointerEvents=y.props.interactive&&!e?``:`none`,x.style.zIndex=``+y.props.zIndex}function N(e,t,n){if(n===void 0&&(n=!0),C.forEach(function(n){n[e]&&n[e].apply(n,t)}),n){var r;(r=y.props)[e].apply(r,t)}}function P(){var t=y.props.aria;if(t.content){var n=`aria-`+t.content,r=x.id;OW(y.props.triggerTarget||e).forEach(function(e){var t=e.getAttribute(n);if(y.state.isVisible)e.setAttribute(n,t?t+` `+r:r);else{var i=t&&t.replace(r,``).trim();i?e.setAttribute(n,i):e.removeAttribute(n)}})}}function ee(){!w&&y.props.aria.expanded&&OW(y.props.triggerTarget||e).forEach(function(e){y.props.interactive?e.setAttribute(`aria-expanded`,y.state.isVisible&&e===O()?`true`:`false`):e.removeAttribute(`aria-expanded`)})}function F(){k().removeEventListener(`mousemove`,m),fG=fG.filter(function(e){return e!==m})}function I(t){if(!KW.isTouch||!c&&t.type!==`mousedown`){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!(y.props.interactive&&GW(x,n))){if(OW(y.props.triggerTarget||e).some(function(e){return GW(e,n)})){if(KW.isTouch||y.state.isVisible&&y.props.trigger.indexOf(`click`)>=0)return}else N(`onClickOutside`,[y,t]);y.props.hideOnClick===!0&&(y.clearDelayTimeouts(),y.hide(),s=!0,setTimeout(function(){s=!1}),y.state.isMounted||z())}}}function L(){c=!0}function te(){c=!1}function R(){var e=k();e.addEventListener(`mousedown`,I,!0),e.addEventListener(`touchend`,I,bW),e.addEventListener(`touchstart`,te,bW),e.addEventListener(`touchmove`,L,bW)}function z(){var e=k();e.removeEventListener(`mousedown`,I,!0),e.removeEventListener(`touchend`,I,bW),e.removeEventListener(`touchstart`,te,bW),e.removeEventListener(`touchmove`,L,bW)}function B(e,t){re(e,function(){!y.state.isVisible&&x.parentNode&&x.parentNode.contains(x)&&t()})}function ne(e,t){re(e,t)}function re(e,t){var n=A().box;function r(e){e.target===n&&(WW(n,`remove`,r),t())}if(e===0)return t();WW(n,`remove`,d),WW(n,`add`,r),d=r}function ie(t,n,r){r===void 0&&(r=!1),OW(y.props.triggerTarget||e).forEach(function(e){e.addEventListener(t,n,r),p.push({node:e,eventType:t,handler:n,options:r})})}function ae(){E()&&(ie(`touchstart`,V,{passive:!0}),ie(`touchend`,H,{passive:!0})),DW(y.props.trigger).forEach(function(e){if(e!==`manual`)switch(ie(e,V),e){case`mouseenter`:ie(`mouseleave`,H);break;case`focus`:ie(QW?`focusout`:`blur`,ce);break;case`focusin`:ie(`focusout`,ce)}})}function oe(){p.forEach(function(e){var t=e.node,n=e.eventType,r=e.handler,i=e.options;t.removeEventListener(n,r,i)}),p=[]}function V(e){var t=!1;if(!(!y.state.isEnabled||le(e)||s)){var n=u?.type===`focus`;u=e,h=e.currentTarget,ee(),!y.state.isVisible&&LW(e)&&fG.forEach(function(t){return t(e)}),e.type===`click`&&(y.props.trigger.indexOf(`mouseenter`)<0||o)&&y.props.hideOnClick!==!1&&y.state.isVisible?t=!0:pe(e),e.type===`click`&&(o=!t),t&&!n&&me(e)}}function se(e){var t=e.target,r=O().contains(t)||x.contains(t);e.type===`mousemove`&&r||UW(fe().concat(x).map(function(e){var t=e._tippy.popperInstance?.state;return t?{popperRect:e.getBoundingClientRect(),popperState:t,props:n}:null}).filter(Boolean),e)&&(F(),me(e))}function H(e){le(e)||y.props.trigger.indexOf(`click`)>=0&&o||(y.props.interactive?y.hideWithInteractivity(e):me(e))}function ce(e){y.props.trigger.indexOf(`focusin`)<0&&e.target!==O()||y.props.interactive&&e.relatedTarget&&x.contains(e.relatedTarget)||me(e)}function le(e){return KW.isTouch?E()!==e.type.indexOf(`touch`)>=0:!1}function U(){ue();var t=y.props,n=t.popperOptions,r=t.placement,i=t.offset,a=t.getReferenceClientRect,o=t.moveTransition,s=D()?lG(x).arrow:null,c=a?{getBoundingClientRect:a,contextElement:a.contextElement||O()}:e,l=[{name:`offset`,options:{offset:i}},{name:`preventOverflow`,options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:`flip`,options:{padding:5}},{name:`computeStyles`,options:{adaptive:!o}},{name:`$$tippy`,enabled:!0,phase:`beforeWrite`,requires:[`computeStyles`],fn:function(e){var t=e.state;if(D()){var n=A().box;[`placement`,`reference-hidden`,`escaped`].forEach(function(e){e===`placement`?n.setAttribute(`data-placement`,t.placement):t.attributes.popper[`data-popper-`+e]?n.setAttribute(`data-`+e,``):n.removeAttribute(`data-`+e)}),t.attributes.popper={}}}}];D()&&s&&l.push({name:`arrow`,options:{element:s,padding:3}}),l.push.apply(l,n?.modifiers||[]),y.popperInstance=mW(c,x,Object.assign({},n,{placement:r,onFirstUpdate:f,modifiers:l}))}function ue(){y.popperInstance&&=(y.popperInstance.destroy(),null)}function de(){var e=y.props.appendTo,t,n=O();t=y.props.interactive&&e===xW||e===`parent`?n.parentNode:wW(e,[n]),t.contains(x)||t.appendChild(x),y.state.isMounted=!0,U()}function fe(){return MW(x.querySelectorAll(`[data-tippy-root]`))}function pe(e){y.clearDelayTimeouts(),e&&N(`onTrigger`,[y,e]),R();var t=j(!0),n=T(),i=n[0],a=n[1];KW.isTouch&&i===`hold`&&a&&(t=a),t?r=setTimeout(function(){y.show()},t):y.show()}function me(e){if(y.clearDelayTimeouts(),N(`onUntrigger`,[y,e]),!y.state.isVisible)z();else if(!(y.props.trigger.indexOf(`mouseenter`)>=0&&y.props.trigger.indexOf(`click`)>=0&&[`mouseleave`,`mousemove`].indexOf(e.type)>=0&&o)){var t=j(!1);t?i=setTimeout(function(){y.state.isVisible&&y.hide()},t):a=requestAnimationFrame(function(){y.hide()})}}function he(){y.state.isEnabled=!0}function ge(){y.hide(),y.state.isEnabled=!1}function _e(){clearTimeout(r),clearTimeout(i),cancelAnimationFrame(a)}function ve(t){if(!y.state.isDestroyed){N(`onBeforeUpdate`,[y,t]),oe();var n=y.props,r=iG(e,Object.assign({},n,NW(t),{ignoreAttributes:!0}));y.props=r,ae(),n.interactiveDebounce!==r.interactiveDebounce&&(F(),m=TW(se,r.interactiveDebounce)),n.triggerTarget&&!r.triggerTarget?OW(n.triggerTarget).forEach(function(e){e.removeAttribute(`aria-expanded`)}):r.triggerTarget&&e.removeAttribute(`aria-expanded`),ee(),M(),S&&S(n,r),y.popperInstance&&(U(),fe().forEach(function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})),N(`onAfterUpdate`,[y,t])}}function ye(e){y.setProps({content:e})}function be(){var e=y.state.isVisible,t=y.state.isDestroyed,n=!y.state.isEnabled,r=KW.isTouch&&!y.props.touch,i=SW(y.props.duration,0,$W.duration);if(!(e||t||n||r)&&!O().hasAttribute(`disabled`)&&(N(`onShow`,[y],!1),y.props.onShow(y)!==!1)){if(y.state.isVisible=!0,D()&&(x.style.visibility=`visible`),M(),R(),y.state.isMounted||(x.style.transition=`none`),D()){var a=A(),o=a.box,s=a.content;BW([o,s],0)}f=function(){var e;if(y.state.isVisible&&!l){if(l=!0,x.offsetHeight,x.style.transition=y.props.moveTransition,D()&&y.props.animation){var t=A(),n=t.box,r=t.content;BW([n,r],i),VW([n,r],`visible`)}P(),ee(),kW(pG,y),(e=y.popperInstance)==null||e.forceUpdate(),N(`onMount`,[y]),y.props.animation&&D()&&ne(i,function(){y.state.isShown=!0,N(`onShown`,[y])})}},de()}}function xe(){var e=!y.state.isVisible,t=y.state.isDestroyed,n=!y.state.isEnabled,r=SW(y.props.duration,1,$W.duration);if(!(e||t||n)&&(N(`onHide`,[y],!1),y.props.onHide(y)!==!1)){if(y.state.isVisible=!1,y.state.isShown=!1,l=!1,o=!1,D()&&(x.style.visibility=`hidden`),F(),z(),M(!0),D()){var i=A(),a=i.box,s=i.content;y.props.animation&&(BW([a,s],r),VW([a,s],`hidden`))}P(),ee(),y.props.animation?D()&&B(r,y.unmount):y.unmount()}}function W(e){k().addEventListener(`mousemove`,m),kW(fG,m),m(e)}function Se(){y.state.isVisible&&y.hide(),y.state.isMounted&&(ue(),fe().forEach(function(e){e._tippy.unmount()}),x.parentNode&&x.parentNode.removeChild(x),pG=pG.filter(function(e){return e!==y}),y.state.isMounted=!1,N(`onHidden`,[y]))}function Ce(){y.state.isDestroyed||(y.clearDelayTimeouts(),y.unmount(),oe(),delete e._tippy,y.state.isDestroyed=!0,N(`onDestroy`,[y]))}}function hG(e,t){t===void 0&&(t={});var n=$W.plugins.concat(t.plugins||[]);ZW();var r=Object.assign({},t,{plugins:n}),i=zW(e).reduce(function(e,t){var n=t&&mG(t,r);return n&&e.push(n),e},[]);return FW(e)?i[0]:i}hG.defaultProps=$W,hG.setDefaultProps=tG,hG.currentInput=KW;var gG=function(e){var t=e===void 0?{}:e,n=t.exclude,r=t.duration;pG.forEach(function(e){var t=!1;if(n&&(t=RW(n)?e.reference===n:e.popper===n.popper),!t){var i=e.props.duration;e.setProps({duration:r}),e.hide(),e.state.isDestroyed||e.setProps({duration:i})}})};Object.assign({},VH,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:`0`,top:`0`,margin:`0`},arrow:{position:`absolute`},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}});var _G={mouseover:`mouseenter`,focusin:`focus`,click:`click`};function vG(e,t){var n=[],r=[],i=!1,a=t.target,o=EW(t,[`target`]),s=Object.assign({},o,{trigger:`manual`,touch:!1}),c=Object.assign({touch:$W.touch},o,{showOnCreate:!0}),l=hG(e,s),u=OW(l);function d(e){if(e.target&&!i){var n=e.target.closest(a);if(n){var o=n.getAttribute(`data-tippy-trigger`)||t.trigger||$W.trigger;if(!n._tippy&&(e.type!==`touchstart`||typeof c.touch!=`boolean`)&&!(e.type!==`touchstart`&&o.indexOf(_G[e.type])<0)){var s=hG(n,c);s&&(r=r.concat(s))}}}}function f(e,t,r,i){i===void 0&&(i=!1),e.addEventListener(t,r,i),n.push({node:e,eventType:t,handler:r,options:i})}function p(e){var t=e.reference;f(t,`touchstart`,d,bW),f(t,`mouseover`,d),f(t,`focusin`,d),f(t,`click`,d)}function m(){n.forEach(function(e){var t=e.node,n=e.eventType,r=e.handler,i=e.options;t.removeEventListener(n,r,i)}),n=[]}function h(e){var t=e.destroy,n=e.enable,a=e.disable;e.destroy=function(e){e===void 0&&(e=!0),e&&r.forEach(function(e){e.destroy()}),r=[],m(),t()},e.enable=function(){n(),r.forEach(function(e){return e.enable()}),i=!1},e.disable=function(){a(),r.forEach(function(e){return e.disable()}),i=!0},p(e)}return u.forEach(h),l}hG.setDefaultProps({render:uG});var yG={questions:{title:`Open questions`,lead:`A question the AI could not settle, and what the case says above it. A must-answer question keeps a check from being generated until you answer.`,steps:[`Keep what the case says: the question block disappears and the case keeps that text.`,`Or write your own answer: it replaces the text where they disagree, and the AI folds it in on its next run.`,`Click the case text, or the question, to show it in the source editor, where it flashes. Nothing else in the row jumps.`,`Red means the question blocks generation; amber means the case text is used as it is until you change it.`,`One claim carries one signal: a question never also has a "to confirm" marker on the line above it. Use a question when someone has to decide, a marker when nobody does.`]},steps:{title:`Steps`,lead:`The steps of the case, in order. Edit a sentence here, tag a step so the tools know what it does, and keep the record of a step that a person did.`,steps:["`input`: a person does this step (a choice, an item that already exists).","`writes`: the step creates, changes or deletes data of the test account.","`email`: the step sends email (never in production).","A `[T1]` in the sentence or in a ready signal becomes a chip: click it to open the card of that target.","`- Ready when: ...` under the step: the signal that what the step loads is really there. The test waits for it before it looks.","`- Recipe (phase): ...` under the step: what the person did during an attended exploration. A step tagged input or writes needs one; generating the spec stops without it.",`Adding, deleting and renumbering steps is done in the source; recipes and questions move with their step.`]},values:{title:`Values`,lead:`The values the test checks, one column per profile. They live in the case document, never in the profile settings.`,steps:["`default` applies to every profile; a profile column overrides it key by key.","An empty cell shows the grey `default:` value; clearing a cell removes the key from that profile.","An empty or `TODO` value makes the test refuse to run; an unknown profile fails pnpm case:check."]},inputs:{title:`Inputs (old format)`,lead:"An old section of the case document. A step’s recipe now lives under that step as `- Recipe (phase): ...`, so the step number is not a key to another section anymore.",steps:["Move each `- Step <n> ...` line under step n as `- Recipe ...`.","A line without `Step <n>` is a free note: move it to `## Notes` if it still matters.",`This block stays editable until it is empty; new cases do not get it.`]},markers:{title:`To confirm`,lead:`A line the AI saw on a page and a person has not settled. Only the ones that change an assertion need you: a wrong wording there would pass silently. The rest are notes the run checks by itself.`,steps:[`Read the reason under the line ("why it needs you") and the screenshot when there is one: the exploration took it, so you do not have to open the page again.`,`Right: click Confirmed, or use "Confirm all" in the section header (one undo step).`,`Wrong: fix the sentence in the source first, then remove the marker.`,`They do not block generating a spec. Healing stops until they are settled.`]},settings:{title:`Case settings`,lead:`What the case is called, who logs in, where it runs, which suites run it, and where it may write data.`,steps:["`title`: one line, shown in the case list.","`login`: required for a signed-in case; none for a public page (no saved session).","`envs`: press the environments the case runs in; all pressed means every environment, including new ones.","`suites`: every suite that runs this case; a case runs in all of them. Type a name, then comma or Enter adds it as a tag.","`writes`: environments where the case may create or change data. It then needs a `writes-note` that says what it touches.",`The id is the file path: rename the case with the pencil next to its file name.`]},goal:{title:`Goal`,lead:`Why the case exists, in one or two sentences. The tools read it for context; it is not a check.`,steps:[`Read-only here: click a paragraph to jump to that line of the source and edit it there.`]},expected:{title:`Expected`,lead:`What must hold for every profile. The spec turns each bullet into an assertion or a step check.`,steps:[`Drag the handle (or Space and the arrow keys) to reorder; the order is the order of the case.`,`A bullet with an open question keeps that question until it is answered in Open questions.`,`Deleting a bullet deletes the question blocks that hang under it (you are asked first).`]},rules:{title:`Rules`,lead:`Instructions for the AI on how to run this case: a page quirk, a mandatory read-only preparation, a control to avoid. They never say what the case proves.`,steps:["One bullet per rule; start it with `Step 3:`, `Before step 3:` or `After step 3:` to tie it to a step.",`Expectations, values and targets stay in their own sections: a rule that states one is moved there.`,`A rule never allows writing data, sending email or doing a person's step; those stay tagged steps with a recipe.`,`The AI re-checks the rules on every exploration and never deletes one silently.`]},visual:{title:`Visual checks`,lead:"What is compared to a screenshot baseline. Each bullet names a target card as `[T1]`; click the card name to see what the check looks at.",steps:["A bullet without `[Tn]`, or with an id that has no card, is marked in red and `pnpm case:check` warns.",`The order and drag behaviour are the same as in Expected.`]},targets:{title:`Targets`,lead:`One card per image, logo, icon, file, PDF or repeated text that a check looks at: what it is, where it is, how it is found, and what proves that it has loaded.`,steps:[`Click a target name next to a step or a check, or a card here, to open it in a window.`,`Each reference screenshot is under the card; click one for the full size.`,`Amber means the card is not ready: a required field is empty, or an open question still blocks it.`,`The text is edited in the editor: the window has "Open in editor".`]},notes:{title:`Notes`,lead:`Free context for a reviewer: why the case is built this way, what it avoids, what may change.`,steps:[`Read-only here: click a paragraph to jump to that line of the source and edit it there.`]},source:{title:`Source`,lead:`The original notes the case was made from, verbatim, with what became of each line. Traceability only.`,steps:[`Read-only: never edit this table. It shows a reviewer that nothing was lost.`]}},bG={"field.id":{title:`id`,lead:"The path of the case file below `cases/`, without `.md`. Runs, specs and reports use it as the identity.",steps:[]},"field.title":{title:`title`,lead:`One line, shown in the case list and in reports. It says what the case proves, not which button it clicks.`,steps:[]},"field.login":{title:`login`,lead:"`required` signs in with the saved session of a profile before the case runs. `none` is for a public page that needs no session.",steps:[]},"field.runs-in":{title:`runs in`,lead:`The environments this case may run in. Every environment is pressed by default, including ones added to the profiles later.`,steps:[]},"field.suites":{title:`suites`,lead:`The suites that run this case; a case runs in every suite it lists. Matching names of other cases appear while you type.`,steps:[]},"field.writes":{title:`writes data in`,lead:`Environments where the case may create or change data of the test accounts. Nothing pressed means read-only: the case changes nothing.`,steps:[]},"field.writes-note":{title:`what it changes`,lead:`What the case creates or changes, in one sentence. Whoever confirms a run that writes data reads it before saying yes.`,steps:[]}},xG={...yG,...bG};function SG(e,t){t.split(/`([^`]+)`/g).forEach((t,n)=>{if(t!==``){if(n%2==1){let n=document.createElement(`code`);n.className=`rounded-sm bg-dai px-1 py-px font-mono text-[0.9em]`,n.textContent=t,e.append(n)}else e.append(document.createTextNode(t))}})}function CG(e){let t=document.createElement(`div`);t.className=`space-y-1.5`;let n=document.createElement(`p`);n.className=`text-sm font-semibold`,n.textContent=e.title;let r=document.createElement(`p`);if(r.className=`text-line-mid`,SG(r,e.lead),t.append(n,r),e.steps.length===0)return t;let i=document.createElement(`p`);i.className=`pt-0.5 font-medium`,i.textContent=`How to use it`;let a=document.createElement(`ul`);a.className=`list-disc space-y-1 pl-4`;for(let t of e.steps){let e=document.createElement(`li`);SG(e,t),a.append(e)}return t.append(i,a),t}function wG(){let[e,t]=(0,q.useState)(null);return(0,q.useEffect)(()=>{if(!e)return;let t=vG(e,{target:`[data-help]`,content:e=>CG(xG[e.getAttribute(`data-help`)??`questions`]??yG.questions),theme:`inkstone`,placement:`bottom-start`,trigger:`click`,interactive:!0,maxWidth:380,offset:[0,8],touch:!1,appendTo:()=>document.body,onShow:e=>{e.popper.querySelector(`.tippy-box`)?.setAttribute(`data-help-box`,``)}}),n=()=>gG({duration:0});return document.addEventListener(`keydown`,n,!0),()=>{document.removeEventListener(`keydown`,n,!0),(Array.isArray(t)?t:[t]).forEach(e=>e.destroy())}},[e]),t}var TG=e=>(0,J.jsx)(e,{size:14,"aria-hidden":`true`}),EG={questions:TG(Df),steps:TG(nf),values:TG(Tp),inputs:TG(Qd),markers:TG(Md),settings:TG(xp),goal:TG(Ru),expected:TG(ou),rules:TG(_p),visual:TG(gd),targets:TG(ed),notes:TG(Od),source:TG(Il)};function DG({text:e}){return(0,J.jsx)(qE,{remarkPlugins:[mA],allowedElements:[`p`,`code`,`strong`,`em`,`del`,`a`,`br`],unwrapDisallowed:!0,components:{p:({children:e})=>(0,J.jsx)(J.Fragment,{children:e}),code:({children:e})=>(0,J.jsx)(`code`,{className:`rounded-sm bg-warm px-1 py-px font-mono text-[0.9em] text-ink ring-1 ring-line-mid ring-inset`,children:e}),a:({href:e,children:t})=>(0,J.jsx)(`a`,{href:e,target:`_blank`,rel:`noreferrer`,className:`text-theme-ink underline`,children:t})},children:e})}function OG({help:e}){return(0,J.jsx)(`button`,{type:`button`,"data-help":e,"aria-label":`About ${yG[e].title}`,className:`rounded p-0.5 text-ink-3 transition-colors hover:bg-line hover:text-ink-2 focus-visible:ring-2 focus-visible:ring-theme/40 focus-visible:outline-none`,children:(0,J.jsx)(Bd,{size:14,"aria-hidden":`true`})})}function kG({help:e}){return(0,J.jsx)(`button`,{type:`button`,"data-help":e,"aria-label":`About ${bG[e].title}`,className:`-my-0.5 shrink-0 rounded p-0.5 text-ink-3 transition-colors hover:bg-line hover:text-ink-2 focus-visible:ring-2 focus-visible:ring-theme/40 focus-visible:outline-none`,children:(0,J.jsx)(Bd,{size:12,"aria-hidden":`true`})})}function AG({title:e,count:t,tone:n=`gray`,help:r,storage:i,defaultOpen:a=!0,children:o}){let[s,c]=Jp(`asrun-ui.panel.${i??r}`,a,Xp);return(0,J.jsxs)(`section`,{className:`card-panel overflow-hidden`,children:[(0,J.jsxs)(`header`,{className:`flex flex-wrap items-center gap-1.5 border-b border-line bg-warm px-2 py-1.5`,children:[(0,J.jsxs)(`button`,{type:`button`,"aria-expanded":s,title:s?`Collapse this section`:`Expand this section`,onClick:()=>c(!s),className:`flex items-center gap-1 rounded px-1 py-0.5 text-left transition-colors hover:bg-line focus-visible:ring-2 focus-visible:ring-theme/40 focus-visible:outline-none`,children:[s?(0,J.jsx)(mu,{size:14,className:`shrink-0 text-ink-3`,"aria-hidden":`true`}):(0,J.jsx)(Su,{size:14,className:`shrink-0 text-ink-3`,"aria-hidden":`true`}),(0,J.jsx)(`span`,{className:`shrink-0 text-ink-3`,children:EG[r]}),(0,J.jsx)(`h3`,{className:`font-serif text-sm tracking-wide text-ink`,children:e})]}),(0,J.jsx)(OG,{help:r}),t===void 0?null:(0,J.jsx)(Ny,{tone:n,children:t})]}),(0,J.jsx)($p,{open:s,children:o})]})}var jG=({text:e})=>(0,J.jsx)(`p`,{className:`px-3 py-2 text-sm text-ink-3`,children:e}),MG=class e{static create(t,n,r,i,a){let o=i+(i<<8)+t+(n<<4)|0;return new e(t,n,r,o,a,[],[])}constructor(e,t,n,r,i,a,o){this.type=e,this.value=t,this.from=n,this.hash=r,this.end=i,this.children=a,this.positions=o,this.blankFirstLine=!1,this.hashProp=[[I.contextHash,r]]}addChild(e,t){e.prop(I.contextHash)!=this.hash&&(e=new v(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(t)}toTree(e,t=this.end){let n=this.children.length-1;return n>=0&&(t=Math.max(t,this.positions[n]+this.children[n].length+this.from)),new v(e.types[this.type],this.children,this.positions,t-this.from).balance({makeTree:(e,t,n)=>new v(F.none,e,t,n,this.hashProp)})}},NG;(function(e){e[e.Document=1]=`Document`,e[e.CodeBlock=2]=`CodeBlock`,e[e.FencedCode=3]=`FencedCode`,e[e.Blockquote=4]=`Blockquote`,e[e.HorizontalRule=5]=`HorizontalRule`,e[e.BulletList=6]=`BulletList`,e[e.OrderedList=7]=`OrderedList`,e[e.ListItem=8]=`ListItem`,e[e.ATXHeading1=9]=`ATXHeading1`,e[e.ATXHeading2=10]=`ATXHeading2`,e[e.ATXHeading3=11]=`ATXHeading3`,e[e.ATXHeading4=12]=`ATXHeading4`,e[e.ATXHeading5=13]=`ATXHeading5`,e[e.ATXHeading6=14]=`ATXHeading6`,e[e.SetextHeading1=15]=`SetextHeading1`,e[e.SetextHeading2=16]=`SetextHeading2`,e[e.HTMLBlock=17]=`HTMLBlock`,e[e.LinkReference=18]=`LinkReference`,e[e.Paragraph=19]=`Paragraph`,e[e.CommentBlock=20]=`CommentBlock`,e[e.ProcessingInstructionBlock=21]=`ProcessingInstructionBlock`,e[e.Escape=22]=`Escape`,e[e.Entity=23]=`Entity`,e[e.HardBreak=24]=`HardBreak`,e[e.Emphasis=25]=`Emphasis`,e[e.StrongEmphasis=26]=`StrongEmphasis`,e[e.Link=27]=`Link`,e[e.Image=28]=`Image`,e[e.InlineCode=29]=`InlineCode`,e[e.HTMLTag=30]=`HTMLTag`,e[e.Comment=31]=`Comment`,e[e.ProcessingInstruction=32]=`ProcessingInstruction`,e[e.Autolink=33]=`Autolink`,e[e.HeaderMark=34]=`HeaderMark`,e[e.QuoteMark=35]=`QuoteMark`,e[e.ListMark=36]=`ListMark`,e[e.LinkMark=37]=`LinkMark`,e[e.EmphasisMark=38]=`EmphasisMark`,e[e.CodeMark=39]=`CodeMark`,e[e.CodeText=40]=`CodeText`,e[e.CodeInfo=41]=`CodeInfo`,e[e.LinkTitle=42]=`LinkTitle`,e[e.LinkLabel=43]=`LinkLabel`,e[e.URL=44]=`URL`})(NG||={});var PG=class{constructor(e,t){this.start=e,this.content=t,this.marks=[],this.parsers=[]}},FG=class{constructor(){this.text=``,this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return zG(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,t=0,n=0){for(let r=t;r<e;r++)n+=this.text.charCodeAt(r)==9?4-n%4:1;return n}findColumn(e){let t=0;for(let n=0;t<this.text.length&&n<e;t++)n+=this.text.charCodeAt(t)==9?4-n%4:1;return t}scrub(){if(!this.baseIndent)return this.text;let e=``;for(let t=0;t<this.basePos;t++)e+=` `;return e+this.text.slice(this.basePos)}};function IG(e,t,n){if(n.pos==n.text.length||e!=t.block&&n.indent>=t.stack[n.depth+1].value+n.baseIndent)return!0;if(n.indent>=n.baseIndent+4)return!1;let r=(e.type==NG.OrderedList?KG:GG)(n,t,!1);return r>0&&(e.type!=NG.BulletList||UG(n,t,!1)<0)&&n.text.charCodeAt(n.pos+r-1)==e.value}var LG={[NG.Blockquote](e,t,n){return n.next==62&&(n.markers.push(bK(NG.QuoteMark,t.lineStart+n.pos,t.lineStart+n.pos+1)),n.moveBase(n.pos+(RG(n.text.charCodeAt(n.pos+1))?2:1)),e.end=t.lineStart+n.text.length,!0)},[NG.ListItem](e,t,n){return!(n.next<0?e.blankFirstLine&&e.children.length==1:n.indent<n.baseIndent+e.value)&&(n.moveBaseColumn(n.baseIndent+e.value),!0)},[NG.OrderedList]:IG,[NG.BulletList]:IG,[NG.Document](){return!0}};function RG(e){return e==32||e==9||e==10||e==13}function zG(e,t=0){for(;t<e.length&&RG(e.charCodeAt(t));)t++;return t}function BG(e,t,n){for(;t>n&&RG(e.charCodeAt(t-1));)t--;return t}function VG(e){if(e.next!=96&&e.next!=126)return-1;let t=e.pos+1;for(;t<e.text.length&&e.text.charCodeAt(t)==e.next;)t++;if(t<e.pos+3)return-1;if(e.next==96){for(let n=t;n<e.text.length;n++)if(e.text.charCodeAt(n)==96)return-1}return t}function HG(e){return e.next==62?e.text.charCodeAt(e.pos+1)==32?2:1:-1}function UG(e,t,n){if(e.next!=42&&e.next!=45&&e.next!=95)return-1;let r=1;for(let t=e.pos+1;t<e.text.length;t++){let n=e.text.charCodeAt(t);if(n==e.next)r++;else if(!RG(n))return-1}return n&&e.next==45&&JG(e)>-1&&e.depth==t.stack.length&&t.parser.leafBlockParsers.indexOf(oK.SetextHeading)>-1||r<3?-1:1}function WG(e,t){for(let n=e.stack.length-1;n>=0;n--)if(e.stack[n].type==t)return!0;return!1}function GG(e,t,n){return(e.next==45||e.next==43||e.next==42)&&(e.pos==e.text.length-1||RG(e.text.charCodeAt(e.pos+1)))&&(!n||WG(t,NG.BulletList)||e.skipSpace(e.pos+2)<e.text.length)?1:-1}function KG(e,t,n){let r=e.pos,i=e.next;for(;i>=48&&i<=57;){if(r++,r==e.text.length)return-1;i=e.text.charCodeAt(r)}return r==e.pos||r>e.pos+9||i!=46&&i!=41||r<e.text.length-1&&!RG(e.text.charCodeAt(r+1))||n&&!WG(t,NG.OrderedList)&&(e.skipSpace(r+1)==e.text.length||r>e.pos+1||e.next!=49)?-1:r+1-e.pos}function qG(e){if(e.next!=35)return-1;let t=e.pos+1;for(;t<e.text.length&&e.text.charCodeAt(t)==35;)t++;if(t<e.text.length&&!RG(e.text.charCodeAt(t)))return-1;let n=t-e.pos;return n>6?-1:n}function JG(e){if(e.next!=45&&e.next!=61||e.indent>=e.baseIndent+4)return-1;let t=e.pos+1;for(;t<e.text.length&&e.text.charCodeAt(t)==e.next;)t++;let n=t;for(;t<e.text.length&&RG(e.text.charCodeAt(t));)t++;return t==e.text.length?n:-1}var YG=/^[ \t]*$/,XG=/-->/,ZG=/\?>/,QG=[[/^<(?:script|pre|style|textarea)(?:\s|>|$)/i,/<\/(?:script|pre|style|textarea)>/i],[/^\s*<!--/,XG],[/^\s*<\?/,ZG],[/^\s*<![A-Z]/,/>/],[/^\s*<!\[CDATA\[/,/\]\]>/],[/^\s*<\/?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i,YG],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,YG]];function $G(e,t,n){if(e.next!=60)return-1;let r=e.text.slice(e.pos);for(let e=0,t=QG.length-+!!n;e<t;e++)if(QG[e][0].test(r))return e;return-1}function eK(e,t){let n=e.countIndent(t,e.pos,e.indent),r=e.skipSpace(t),i=e.countIndent(r,t,n);return i>=n+5||r==e.text.length?n+1:i}function tK(e,t,n){let r=e.length-1;r>=0&&e[r].to==t&&e[r].type==NG.CodeText?e[r].to=n:e.push(bK(NG.CodeText,t,n))}var nK={LinkReference:void 0,IndentedCode(e,t){let n=t.baseIndent+4;if(t.indent<n)return!1;let r=t.findColumn(n),i=e.lineStart+r,a=e.lineStart+t.text.length,o=[],s=[];for(tK(o,i,a);e.nextLine()&&t.depth>=e.stack.length;)if(t.pos==t.text.length){tK(s,e.lineStart-1,e.lineStart);for(let e of t.markers)s.push(e)}else if(t.indent<n)break;else{if(s.length){for(let e of s)e.type==NG.CodeText?tK(o,e.from,e.to):o.push(e);s=[]}tK(o,e.lineStart-1,e.lineStart);for(let e of t.markers)o.push(e);a=e.lineStart+t.text.length;let n=e.lineStart+t.findColumn(t.baseIndent+4);n<a&&tK(o,n,a)}return s.length&&(s=s.filter(e=>e.type!=NG.CodeText),s.length&&(t.markers=s.concat(t.markers))),e.addNode(e.buffer.writeElements(o,-i).finish(NG.CodeBlock,a-i),i),!0},FencedCode(e,t){let n=VG(t);if(n<0)return!1;let r=e.lineStart+t.pos,i=t.next,a=n-t.pos,o=t.skipSpace(n),s=BG(t.text,t.text.length,o),c=[bK(NG.CodeMark,r,r+a)];o<s&&c.push(bK(NG.CodeInfo,e.lineStart+o,e.lineStart+s));for(let n=!0,r=!0,o=!1;e.nextLine()&&t.depth>=e.stack.length;n=!1){let s=t.pos;if(t.indent-t.baseIndent<4)for(;s<t.text.length&&t.text.charCodeAt(s)==i;)s++;if(s-t.pos>=a&&t.skipSpace(s)==t.text.length){for(let e of t.markers)c.push(e);r&&o&&tK(c,e.lineStart-1,e.lineStart),c.push(bK(NG.CodeMark,e.lineStart+t.pos,e.lineStart+s)),e.nextLine();break}{o=!0,n||(tK(c,e.lineStart-1,e.lineStart),r=!1);for(let e of t.markers)c.push(e);let i=e.lineStart+t.basePos,a=e.lineStart+t.text.length;i<a&&(tK(c,i,a),r=!1)}}return e.addNode(e.buffer.writeElements(c,-r).finish(NG.FencedCode,e.prevLineEnd()-r),r),!0},Blockquote(e,t){let n=HG(t);return n<0?!1:(e.startContext(NG.Blockquote,t.pos),e.addNode(NG.QuoteMark,e.lineStart+t.pos,e.lineStart+t.pos+1),t.moveBase(t.pos+n),null)},HorizontalRule(e,t){if(UG(t,e,!1)<0)return!1;let n=e.lineStart+t.pos;return e.nextLine(),e.addNode(NG.HorizontalRule,n),!0},BulletList(e,t){let n=GG(t,e,!1);if(n<0)return!1;e.block.type!=NG.BulletList&&e.startContext(NG.BulletList,t.basePos,t.next);let r=eK(t,t.pos+1);return e.startContext(NG.ListItem,t.basePos,r-t.baseIndent),e.addNode(NG.ListMark,e.lineStart+t.pos,e.lineStart+t.pos+n),t.moveBaseColumn(r),e.block.blankFirstLine=r>=t.text.length,null},OrderedList(e,t){let n=KG(t,e,!1);if(n<0)return!1;e.block.type!=NG.OrderedList&&e.startContext(NG.OrderedList,t.basePos,t.text.charCodeAt(t.pos+n-1));let r=eK(t,t.pos+n);return e.startContext(NG.ListItem,t.basePos,r-t.baseIndent),e.addNode(NG.ListMark,e.lineStart+t.pos,e.lineStart+t.pos+n),t.moveBaseColumn(r),e.block.blankFirstLine=r==t.text.length,null},ATXHeading(e,t){let n=qG(t);if(n<0)return!1;let r=t.pos,i=e.lineStart+r,a=BG(t.text,t.text.length,r),o=a;for(;o>r&&t.text.charCodeAt(o-1)==t.next;)o--;o!=a&&o!=r&&RG(t.text.charCodeAt(o-1))||(o=t.text.length);let s=e.buffer.write(NG.HeaderMark,0,n).writeElements(e.parser.parseInline(t.text.slice(r+n+1,o),i+n+1),-i);o<t.text.length&&s.write(NG.HeaderMark,o-r,a-r);let c=s.finish(NG.ATXHeading1-1+n,t.text.length-r);return e.nextLine(),e.addNode(c,i),!0},HTMLBlock(e,t){let n=$G(t,e,!1);if(n<0)return!1;let r=e.lineStart+t.pos,i=QG[n][1],a=[],o=i!=YG;for(;!i.test(t.text)&&e.nextLine();){if(t.depth<e.stack.length){o=!1;break}for(let e of t.markers)a.push(e)}o&&e.nextLine();let s=i==XG?NG.CommentBlock:i==ZG?NG.ProcessingInstructionBlock:NG.HTMLBlock,c=e.prevLineEnd();return e.addNode(e.buffer.writeElements(a,-r).finish(s,c-r),r),!0},SetextHeading:void 0},rK=class{constructor(e){this.stage=0,this.elts=[],this.pos=0,this.start=e.start,this.advance(e.content)}nextLine(e,t,n){if(this.stage==-1)return!1;let r=n.content+`
|
|
225
|
+
`:t==`r`?`\r`:t==`t`?` `:`\\`)}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord&&this.test==e.test}create(){return this.regexp?new KR(this):new BR(this)}getCursor(e,t=0,n){let r=e.doc?e:ee.create({doc:e});return n??=r.doc.length,this.regexp?HR(this,r,t,n):RR(this,r,t,n)}},IR=class{constructor(e){this.spec=e}};function LR(e,t,n){return(r,i,a,o)=>n&&!n(r,i,a,o)?!1:e(r>=o&&i<=o+a.length?a.slice(r-o,i-o):t.doc.sliceString(r,i),t,r,i)}function RR(e,t,n,r){let i;return e.wholeWord&&(i=zR(t.doc,t.charCategorizer(t.selection.main.head))),e.test&&(i=LR(e.test,t,i)),new fR(t.doc,e.unquoted,n,r,e.caseSensitive?void 0:e=>e.toLowerCase(),i)}function zR(e,t){return(n,r,i,a)=>((a>n||a+i.length<r)&&(a=Math.max(0,n-2),i=e.sliceString(a,Math.min(e.length,r+2))),(t(UR(i,n-a))!=o.Word||t(WR(i,n-a))!=o.Word)&&(t(WR(i,r-a))!=o.Word||t(UR(i,r-a))!=o.Word))}var BR=class extends IR{constructor(e){super(e)}nextMatch(e,t,n){let r=RR(this.spec,e,n,e.doc.length).nextOverlapping();if(r.done){let n=Math.min(e.doc.length,t+this.spec.unquoted.length);r=RR(this.spec,e,0,n).nextOverlapping()}return r.done||r.value.from==t&&r.value.to==n?null:r.value}prevMatchInRange(e,t,n){for(let r=n;;){let n=Math.max(t,r-1e4-this.spec.unquoted.length),i=RR(this.spec,e,n,r),a=null;for(;!i.nextOverlapping().done;)a=i.value;if(a)return a;if(n==t)return null;r-=1e4}}prevMatch(e,t,n){let r=this.prevMatchInRange(e,0,t);return r||=this.prevMatchInRange(e,Math.max(0,n-this.spec.unquoted.length),e.doc.length),r&&(r.from!=t||r.to!=n)?r:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let n=RR(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=RR(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}};function VR(e,t,n){return(r,i,a)=>(!n||n(r,i,a))&&e(a[0],t,r,i)}function HR(e,t,n,r){let i;return e.wholeWord&&(i=GR(t.charCategorizer(t.selection.main.head))),e.test&&(i=VR(e.test,t,i)),new hR(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:i},n,r)}function UR(e,t){return e.slice(i(e,t,!1),t)}function WR(e,t){return e.slice(t,i(e,t))}function GR(e){return(t,n,r)=>!r[0].length||(e(UR(r.input,r.index))!=o.Word||e(WR(r.input,r.index))!=o.Word)&&(e(WR(r.input,r.index+r[0].length))!=o.Word||e(UR(r.input,r.index+r[0].length))!=o.Word)}var KR=class extends IR{nextMatch(e,t,n){let r=HR(this.spec,e,n,e.doc.length).next();return r.done&&(r=HR(this.spec,e,0,t).next()),r.done?null:r.value}prevMatchInRange(e,t,n){for(let r=1;;r++){let i=Math.max(t,n-r*1e4),a=HR(this.spec,e,i,n),o=null;for(;!a.next().done;)o=a.value;if(o&&(i==t||o.from>i+10))return o;if(i==t)return null}}prevMatch(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(t,n)=>{if(n==`&`)return e.match[0];if(n==`$`)return`$`;for(let t=n.length;t>0;t--){let r=+n.slice(0,t);if(r>0&&r<e.match.length)return e.match[r]+n.slice(t)}return t})}matchAll(e,t){let n=HR(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=HR(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}},qR=S.define(),JR=S.define(),YR=w.define({create(e){return new XR(cz(e).create(),null)},update(e,t){for(let n of t.effects)n.is(qR)?e=new XR(n.value.create(),e.panel):n.is(JR)&&(e=new XR(e.query,n.value?sz:null));return e},provide:e=>re.from(e,e=>e.panel)}),XR=class{constructor(e,t){this.query=e,this.panel=t}},ZR=_.mark({class:`cm-searchMatch`}),QR=_.mark({class:`cm-searchMatch cm-searchMatch-selected`}),$R=B.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(YR))}update(e){let t=e.state.field(YR);(t!=e.startState.field(YR)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:e,panel:t}){if(!t||!e.spec.valid)return _.none;let{view:r}=this,i=new n;for(let t=0,n=r.visibleRanges,a=n.length;t<a;t++){let{from:o,to:s}=n[t];for(;t<a-1&&s>n[t+1].from-500;)s=n[++t].to;e.highlight(r.state,o,s,(e,t)=>{let n=r.state.selection.ranges.some(n=>n.from==e&&n.to==t);i.add(e,t,n?QR:ZR)})}return i.finish()}},{decorations:e=>e.decorations});function ez(e){return t=>{let n=t.state.field(YR,!1);return n&&n.query.spec.valid?e(t,n):dz(t)}}var tz=ez((e,{query:t})=>{let{to:n}=e.state.selection.main,r=t.nextMatch(e.state,n,n);if(!r)return!1;let i=G.single(r.from,r.to),a=e.state.facet(PR);return e.dispatch({selection:i,effects:[vz(e,r),a.scrollToMatch(i.main,e)],userEvent:`select.search`}),uz(e),!0}),nz=ez((e,{query:t})=>{let{state:n}=e,{from:r}=n.selection.main,i=t.prevMatch(n,r,r);if(!i)return!1;let a=G.single(i.from,i.to),o=e.state.facet(PR);return e.dispatch({selection:a,effects:[vz(e,i),o.scrollToMatch(a.main,e)],userEvent:`select.search`}),uz(e),!0}),rz=ez((e,{query:t})=>{let n=t.matchAll(e.state,1e3);return!n||!n.length?!1:(e.dispatch({selection:G.create(n.map(e=>G.range(e.from,e.to))),userEvent:`select.search.matches`}),!0)}),iz=({state:e,dispatch:t})=>{let n=e.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,a=[],o=0;for(let t=new fR(e.doc,e.sliceDoc(r,i));!t.next().done;){if(a.length>1e3)return!1;t.value.from==r&&(o=a.length),a.push(G.range(t.value.from,t.value.to))}return t(e.update({selection:G.create(a,o),userEvent:`select.search.matches`})),!0},az=ez((e,{query:t})=>{let{state:n}=e,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let a=t.nextMatch(n,r,r);if(!a)return!1;let o=a,s=[],c,l,u=[];o.precise?o.from==r&&o.to==i&&(l=n.toText(t.getReplacement(o)),s.push({from:o.from,to:o.to,insert:l}),o=t.nextMatch(n,o.from,o.to),u.push(R.announce.of(n.phrase(`replaced match on line $`,n.doc.lineAt(r).number)+`.`))):o=t.nextMatch(n,o.from,o.to);let d=e.state.changes(s);return o&&(c=G.single(o.from,o.to).map(d),u.push(vz(e,o)),u.push(n.facet(PR).scrollToMatch(c.main,e))),e.dispatch({changes:d,selection:c,effects:u,userEvent:`input.replace`}),!0}),oz=ez((e,{query:t})=>{if(e.state.readOnly)return!1;let n=[];for(let r of t.matchAll(e.state,1e9)){let{from:e,to:i,precise:a}=r;a&&n.push({from:e,to:i,insert:t.getReplacement(r)})}if(!n.length)return!1;let r=e.state.phrase(`replaced $ matches`,n.length)+`.`;return e.dispatch({changes:n,effects:R.announce.of(r),userEvent:`input.replace.all`}),!0});function sz(e){return e.state.facet(PR).createPanel(e)}function cz(e,t){let n=e.selection.main,r=n.empty||n.to>n.from+100?``:e.sliceDoc(n.from,n.to);if(t&&!r)return t;let i=e.facet(PR);return new FR({search:t?.literal??i.literal?r:r.replace(/\n/g,`\\n`),caseSensitive:t?.caseSensitive??i.caseSensitive,literal:t?.literal??i.literal,regexp:t?.regexp??i.regexp,wholeWord:t?.wholeWord??i.wholeWord})}function lz(e){let t=_e(e,sz);return t&&t.dom.querySelector(`[main-field]`)}function uz(e){let t=lz(e);t&&t==e.root.activeElement&&t.select()}var dz=e=>{let t=e.state.field(YR,!1);if(t&&t.panel){let n=lz(e);if(n&&n!=e.root.activeElement){let r=cz(e.state,t.query.spec);r.valid&&e.dispatch({effects:qR.of(r)}),n.focus(),n.select()}}else e.dispatch({effects:[JR.of(!0),t?qR.of(cz(e.state,t.query.spec)):S.appendConfig.of(bz)]});return!0},fz=e=>{let t=e.state.field(YR,!1);if(!t||!t.panel)return!1;let n=_e(e,sz);return n&&n.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:JR.of(!1)}),!0},pz=[{key:`Mod-f`,run:dz,scope:`editor search-panel`},{key:`F3`,run:tz,shift:nz,scope:`editor search-panel`,preventDefault:!0},{key:`Mod-g`,run:tz,shift:nz,scope:`editor search-panel`,preventDefault:!0},{key:`Escape`,run:fz,scope:`editor search-panel`},{key:`Mod-Shift-l`,run:iz},{key:`Mod-Alt-g`,run:xR},{key:`Mod-d`,run:NR,preventDefault:!0}],mz=class{constructor(e){this.view=e;let t=this.query=e.state.field(YR).query.spec;this.commit=this.commit.bind(this),this.searchField=Ke(`input`,{value:t.search,placeholder:hz(e,`Find`),"aria-label":hz(e,`Find`),class:`cm-textfield`,name:`search`,form:``,"main-field":`true`,onchange:this.commit,onkeyup:this.commit}),this.replaceField=Ke(`input`,{value:t.replace,placeholder:hz(e,`Replace`),"aria-label":hz(e,`Replace`),class:`cm-textfield`,name:`replace`,form:``,onchange:this.commit,onkeyup:this.commit}),this.caseField=Ke(`input`,{type:`checkbox`,name:`case`,form:``,checked:t.caseSensitive,onchange:this.commit}),this.reField=Ke(`input`,{type:`checkbox`,name:`re`,form:``,checked:t.regexp,onchange:this.commit}),this.wordField=Ke(`input`,{type:`checkbox`,name:`word`,form:``,checked:t.wholeWord,onchange:this.commit});function n(e,t,n){return Ke(`button`,{class:`cm-button`,name:e,onclick:t,type:`button`},n)}this.dom=Ke(`div`,{onkeydown:e=>this.keydown(e),class:`cm-search`},[this.searchField,n(`next`,()=>tz(e),[hz(e,`next`)]),n(`prev`,()=>nz(e),[hz(e,`previous`)]),n(`select`,()=>rz(e),[hz(e,`all`)]),Ke(`label`,null,[this.caseField,hz(e,`match case`)]),Ke(`label`,null,[this.reField,hz(e,`regexp`)]),Ke(`label`,null,[this.wordField,hz(e,`by word`)]),...e.state.readOnly?[]:[Ke(`br`),this.replaceField,n(`replace`,()=>az(e),[hz(e,`replace`)]),n(`replaceAll`,()=>oz(e),[hz(e,`replace all`)])],Ke(`button`,{name:`close`,onclick:()=>fz(e),"aria-label":hz(e,`close`),type:`button`},[`×`])])}commit(){let e=new FR({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:qR.of(e)}))}keydown(e){he(this.view,e,`search-panel`)?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?nz:tz)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),az(this.view))}update(e){for(let t of e.transactions)for(let e of t.effects)e.is(qR)&&!e.value.eq(this.query)&&this.setQuery(e.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(PR).top}};function hz(e,t){return e.state.phrase(t)}var gz=30,_z=/[\s\.,:;?!]/;function vz(e,{from:t,to:n}){let r=e.state.doc.lineAt(t),i=e.state.doc.lineAt(n).to,a=Math.max(r.from,t-gz),o=Math.min(i,n+gz),s=e.state.sliceDoc(a,o);if(a!=r.from){for(let e=0;e<gz;e++)if(!_z.test(s[e+1])&&_z.test(s[e])){s=s.slice(e);break}}if(o!=i){for(let e=s.length-1;e>s.length-gz;e--)if(!_z.test(s[e-1])&&_z.test(s[e])){s=s.slice(0,e);break}}return R.announce.of(`${e.state.phrase(`current match`)}. ${s} ${e.state.phrase(`on line`)} ${r.number}.`)}var yz=R.baseTheme({".cm-panel.cm-search":{padding:`2px 6px 4px`,position:`relative`,"& [name=close]":{position:`absolute`,top:`0`,right:`4px`,backgroundColor:`inherit`,border:`none`,font:`inherit`,padding:0,margin:0},"& input, & button, & label":{margin:`.2em .6em .2em 0`},"& input[type=checkbox]":{marginRight:`.2em`},"& label":{fontSize:`80%`,whiteSpace:`pre`}},"&light .cm-searchMatch":{backgroundColor:`#ffff0054`},"&dark .cm-searchMatch":{backgroundColor:`#00ffff8a`},"&light .cm-searchMatch-selected":{backgroundColor:`#ff6a0054`},"&dark .cm-searchMatch-selected":{backgroundColor:`#ff00ff8a`}}),bz=[YR,E.low($R),yz],xz=class{constructor(e,t,n,r){this.state=e,this.pos=t,this.explicit=n,this.view=r,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=d(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),r=t.text.slice(n-t.from,this.pos-t.from),i=r.search(Oz(e,!1));return i<0?null:{from:n+i,to:this.pos,text:r.slice(i)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,n){e==`abort`&&this.abortListeners&&(this.abortListeners.push(t),n&&n.onDocChange&&(this.abortOnDocChange=!0))}};function Sz(e){let t=Object.keys(e).join(``),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,``)),`[${n?`\\w`:``}${t.replace(/[^\w\s]/g,`\\$&`)}]`}function Cz(e){let t=Object.create(null),n=Object.create(null);for(let{label:r}of e){t[r[0]]=!0;for(let e=1;e<r.length;e++)n[r[e]]=!0}let r=Sz(t)+Sz(n)+`*$`;return[RegExp(`^`+r),new RegExp(r)]}function wz(e){let t=e.map(e=>typeof e==`string`?{label:e}:e),[n,r]=t.every(e=>/^\w+$/.test(e.label))?[/\w*$/,/\w+$/]:Cz(t);return e=>{let i=e.matchBefore(r);return i||e.explicit?{from:i?i.from:e.pos,options:t,validFor:n}:null}}function Tz(e,t){return n=>{for(let t=d(n.state).resolveInner(n.pos,-1);t;t=t.parent){if(e.indexOf(t.name)>-1)return null;if(t.type.isTop)break}return t(n)}}var Ez=class{constructor(e,t,n,r){this.completion=e,this.source=t,this.match=n,this.score=r}};function Dz(e){return e.selection.main.from}function Oz(e,t){let{source:n}=e,r=t&&n[0]!=`^`,i=n[n.length-1]!=`$`;return!r&&!i?e:RegExp(`${r?`^`:``}(?:${n})${i?`$`:``}`,e.flags??(e.ignoreCase?`i`:``))}var kz=V.define();function Az(e,t,n,r){let{main:i}=e.selection,a=n-i.from,o=r-i.from;return{...e.changeByRange(s=>{if(s!=i&&n!=r&&e.sliceDoc(s.from+a,s.from+o)!=e.sliceDoc(n,r))return{range:s};let c=e.toText(t);return{changes:{from:s.from+a,to:r==i.from?s.to:s.from+o,insert:c},range:G.cursor(s.from+a+c.length)}}),scrollIntoView:!0,userEvent:`input.complete`}}var jz=new WeakMap;function Mz(e){if(!Array.isArray(e))return e;let t=jz.get(e);return t||jz.set(e,t=wz(e)),t}var Nz=S.define(),Pz=S.define(),Fz=class{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t<e.length;){let n=g(e,t),r=b(n);this.chars.push(n);let i=e.slice(t,t+r),a=i.toUpperCase();this.folded.push(g(a==i?i.toLowerCase():a,0)),t+=r}this.astral=e.length!=this.chars.length}ret(e,t){return this.score=e,this.matched=t,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:t,folded:n,any:r,precise:i,byWord:a}=this;if(t.length==1){let r=g(e,0),i=b(r),a=i==e.length?0:-100;if(r!=t[0]){if(r==n[0])a+=-200;else return null}return this.ret(a,[0,i])}let o=e.indexOf(this.pattern);if(o==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let s=t.length,c=0;if(o<0){for(let i=0,a=Math.min(e.length,200);i<a&&c<s;){let a=g(e,i);(a==t[c]||a==n[c])&&(r[c++]=i),i+=b(a)}if(c<s)return null}let l=0,u=0,d=!1,f=0,p=-1,m=-1,h=/[a-z]/.test(e),_=!0;for(let r=0,c=Math.min(e.length,200),v=0;r<c&&u<s;){let c=g(e,r);o<0&&(l<s&&c==t[l]&&(i[l++]=r),f<s&&(c==t[f]||c==n[f]?(f==0&&(p=r),m=r+1,f++):f=0));let y,x=c<255?c>=48&&c<=57||c>=97&&c<=122?2:+(c>=65&&c<=90):(y=L(c))==y.toLowerCase()?y==y.toUpperCase()?0:2:1;(!r||x==1&&h||v==0&&x!=0)&&(t[u]==c||n[u]==c&&(d=!0)?a[u++]=r:a.length&&(_=!1)),v=x,r+=b(c)}return u==s&&a[0]==0&&_?this.result(-100+(d?-200:0),a,e):f==s&&p==0?this.ret(-200-e.length+(m==e.length?0:-100),[0,m]):o>-1?this.ret(-700-e.length,[o,o+this.pattern.length]):f==s?this.ret(-900-e.length,[p,m]):u==s?this.result(-100+(d?-200:0)+-700+(_?0:-1100),a,e):t.length==2?null:this.result((r[0]?-700:0)+-200+-1100,r,e)}result(e,t,n){let r=[],i=0;for(let e of t){let t=e+(this.astral?b(g(n,e)):1);i&&r[i-1]==e?r[i-1]=t:(r[i++]=e,r[i++]=t)}return this.ret(e-n.length,r)}},Iz=class{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let t=e.slice(0,this.pattern.length),n=t==this.pattern?0:t.toLowerCase()==this.folded?-200:null;return n==null?null:(this.matched=[0,t.length],this.score=n+(e.length==this.pattern.length?0:-100),this)}},Lz=u.define({combine(e){return j(e,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>``,optionClass:()=>``,aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:zz,filterStrict:!1,compareCompletions:(e,t)=>(e.sortText||e.label).localeCompare(t.sortText||t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>n=>Rz(e(n),t(n)),optionClass:(e,t)=>n=>Rz(e(n),t(n)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function Rz(e,t){return e?t?e+` `+t:e:t}function zz(e,t,n,r,i,a){let o=e.textDirection==z.RTL,s=o,c=!1,l=`top`,u,d,f=t.left-i.left,p=i.right-t.right,m=r.right-r.left,h=r.bottom-r.top;if(s&&f<Math.min(m,p)?s=!1:!s&&p<Math.min(m,f)&&(s=!0),m<=(s?f:p))u=Math.max(i.top,Math.min(n.top,i.bottom-h))-t.top,d=Math.min(400,s?f:p);else{c=!0,d=Math.min(400,(o?t.right:i.right-t.left)-30);let e=i.bottom-t.bottom;e>=h||e>t.top?u=n.bottom-t.top:(l=`bottom`,u=t.bottom-n.top)}let g=(t.bottom-t.top)/a.offsetHeight,_=(t.right-t.left)/a.offsetWidth;return{style:`${l}: ${u/g}px; max-width: ${d/_}px`,class:`cm-completionInfo-`+(c?o?`left-narrow`:`right-narrow`:s?`left`:`right`)}}var Bz=S.define();function Vz(e){let t=e.addToOptions.slice();return e.icons&&t.push({render(e){let t=document.createElement(`div`);return t.classList.add(`cm-completionIcon`),e.type&&t.classList.add(...e.type.split(/\s+/g).map(e=>`cm-completionIcon-`+e)),t.setAttribute(`aria-hidden`,`true`),t},position:20}),t.push({render(e,t,n,r){let i=document.createElement(`span`);i.className=`cm-completionLabel`;let a=e.displayLabel||e.label,o=0;for(let e=0;e<r.length;){let t=r[e++],n=r[e++];t>o&&i.appendChild(document.createTextNode(a.slice(o,t)));let s=i.appendChild(document.createElement(`span`));s.appendChild(document.createTextNode(a.slice(t,n))),s.className=`cm-completionMatchedText`,o=n}return o<a.length&&i.appendChild(document.createTextNode(a.slice(o))),i},position:50},{render(e){if(!e.detail)return null;let t=document.createElement(`span`);return t.className=`cm-completionDetail`,t.textContent=e.detail,t},position:80}),t.sort((e,t)=>e.position-t.position).map(e=>e.render)}function Hz(e,t,n){if(e<=n)return{from:0,to:e};if(t<0&&(t=0),t<=e>>1){let e=Math.floor(t/n);return{from:e*n,to:(e+1)*n}}let r=Math.ceil((e-t)/n);return{from:e-r*n,to:e-(r-1)*n}}var Uz=class{constructor(e,t,n){this.view=e,this.stateField=t,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:e=>this.placeInfo(e),key:this},this.space=null,this.currentClass=``;let r=e.state.field(t),{options:i,selected:a}=r.open,o=e.state.facet(Lz);this.optionContent=Vz(o),this.optionClass=o.optionClass,this.tooltipClass=o.tooltipClass,this.range=Hz(i.length,a,o.maxRenderedOptions),this.dom=document.createElement(`div`),this.dom.className=`cm-tooltip-autocomplete`,this.updateTooltipClass(e.state),this.dom.addEventListener(`mousedown`,n=>{let{options:r}=e.state.field(t).open;for(let t=n.target,i;t&&t!=this.dom;t=t.parentNode)if(t.nodeName==`LI`&&(i=/-(\d+)$/.exec(t.id))&&+i[1]<r.length){this.applyCompletion(e,r[+i[1]]),n.preventDefault();return}if(n.target==this.list){let t=this.list.classList.contains(`cm-completionListIncompleteTop`)&&n.clientY<this.list.firstChild.getBoundingClientRect().top?this.range.from-1:this.list.classList.contains(`cm-completionListIncompleteBottom`)&&n.clientY>this.list.lastChild.getBoundingClientRect().bottom?this.range.to:null;t!=null&&(e.dispatch({effects:Bz.of(t)}),n.preventDefault())}}),this.dom.addEventListener(`focusout`,t=>{let n=e.state.field(this.stateField,!1);n&&n.tooltip&&e.state.facet(Lz).closeOnBlur&&t.relatedTarget!=e.contentDOM&&e.dispatch({effects:Pz.of(null)})}),this.showOptions(i,r.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener(`scroll`,()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){let t=e.state.field(this.stateField),n=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),t!=n){let{options:r,selected:i,disabled:a}=t.open;n.open&&n.open.options==r||(this.range=Hz(r.length,i,e.state.facet(Lz).maxRenderedOptions),this.showOptions(r,t.id)),this.updateSel(),a!=n.open?.disabled&&this.dom.classList.toggle(`cm-tooltip-autocomplete-disabled`,!!a)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let e of this.currentClass.split(` `))e&&this.dom.classList.remove(e);for(let e of t.split(` `))e&&this.dom.classList.add(e);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;(t.selected>-1&&t.selected<this.range.from||t.selected>=this.range.to)&&(this.range=Hz(t.options.length,t.selected,this.view.state.facet(Lz).maxRenderedOptions),this.showOptions(t.options,e.id));let n=this.updateSelectedOption(t.selected);if(n){this.destroyInfo();let{completion:r}=t.options[t.selected],{info:i}=r;if(!i)return;let a=typeof i==`string`?document.createTextNode(i):i(r);if(!a)return;`then`in a?a.then(t=>{t&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(t,r)}).catch(e=>de(this.view.state,e,`completion info`)):(this.addInfoPane(a,r),n.setAttribute(`aria-describedby`,this.info.id))}}addInfoPane(e,t){this.destroyInfo();let n=this.info=document.createElement(`div`);if(n.className=`cm-tooltip cm-completionInfo`,n.id=`cm-completionInfo-`+Math.floor(Math.random()*65535).toString(16),e.nodeType!=null)n.appendChild(e),this.infoDestroy=null;else{let{dom:t,destroy:r}=e;n.appendChild(t),this.infoDestroy=r||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let n=this.list.firstChild,r=this.range.from;n;n=n.nextSibling,r++)n.nodeName!=`LI`||!n.id?r--:r==e?n.hasAttribute(`aria-selected`)||(n.setAttribute(`aria-selected`,`true`),t=n):n.hasAttribute(`aria-selected`)&&(n.removeAttribute(`aria-selected`),n.removeAttribute(`aria-describedby`));return t&&Gz(this.list,t),t}measureInfo(){let e=this.dom.querySelector(`[aria-selected]`);if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),i=this.space;if(!i){let e=this.dom.ownerDocument.documentElement;i={left:0,top:0,right:e.clientWidth,bottom:e.clientHeight}}return r.top>Math.min(i.bottom,t.bottom)-10||r.bottom<Math.max(i.top,t.top)+10?null:this.view.state.facet(Lz).positionInfo(this.view,t,r,n,i,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className=`cm-tooltip cm-completionInfo `+(e.class||``)):this.info.style.cssText=`top: -1e6px`)}createListBox(e,t,n){let r=document.createElement(`ul`);r.id=t,r.setAttribute(`role`,`listbox`),r.setAttribute(`aria-expanded`,`true`),r.setAttribute(`aria-label`,this.view.state.phrase(`Completions`)),r.addEventListener(`mousedown`,e=>{e.target==r&&e.preventDefault()});let i=null;for(let a=n.from;a<n.to;a++){let{completion:o,match:s}=e[a],{section:c}=o;if(c){let e=typeof c==`string`?c:c.name;if(e!=i&&(a>n.from||n.from==0)){if(i=e,typeof c!=`string`&&c.header)r.appendChild(c.header(c));else{let t=r.appendChild(document.createElement(`completion-section`));t.textContent=e}}}let l=r.appendChild(document.createElement(`li`));l.id=t+`-`+a,l.setAttribute(`role`,`option`);let u=this.optionClass(o);u&&(l.className=u);for(let e of this.optionContent){let t=e(o,this.view.state,this.view,s);t&&l.appendChild(t)}}return n.from&&r.classList.add(`cm-completionListIncompleteTop`),n.to<e.length&&r.classList.add(`cm-completionListIncompleteBottom`),r}destroyInfo(){this.info&&=(this.infoDestroy&&this.infoDestroy(),this.info.remove(),null)}destroy(){this.destroyInfo()}};function Wz(e,t){return n=>new Uz(n,e,t)}function Gz(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=n.height/e.offsetHeight;r.top<n.top?e.scrollTop-=(n.top-r.top)/i:r.bottom>n.bottom&&(e.scrollTop+=(r.bottom-n.bottom)/i)}function Kz(e){return(e.boost||0)*100+(e.apply?10:0)+(e.info?5:0)+ +!!e.type}function qz(e,t){let n=[],r=null,i=null,a=e=>{n.push(e);let{section:t}=e.completion;if(t){r||=[];let e=typeof t==`string`?t:t.name;r.some(t=>t.name==e)||r.push(typeof t==`string`?{name:e}:t)}},o=t.facet(Lz);for(let r of e)if(r.hasResult()){let e=r.result.getMatch;if(r.result.filter===!1)for(let t of r.result.options)a(new Ez(t,r.source,e?e(t):[],1e9-n.length));else{let n=t.sliceDoc(r.from,r.to),s,c=o.filterStrict?new Iz(n):new Fz(n);for(let t of r.result.options)if(s=c.match(t.label)){let n=t.displayLabel?e?e(t,s.matched):[]:s.matched,o=s.score+(t.boost||0);if(a(new Ez(t,r.source,n,o)),typeof t.section==`object`&&t.section.rank===`dynamic`){let{name:e}=t.section;i||=Object.create(null),i[e]=Math.max(o,i[e]||-1e9)}}}}if(r){let e=Object.create(null),t=0,a=(e,t)=>(e.rank===`dynamic`&&t.rank===`dynamic`?i[t.name]-i[e.name]:0)||(typeof e.rank==`number`?e.rank:1e9)-(typeof t.rank==`number`?t.rank:1e9)||(e.name<t.name?-1:1);for(let n of r.sort(a))t-=1e5,e[n.name]=t;for(let t of n){let{section:n}=t.completion;n&&(t.score+=e[typeof n==`string`?n:n.name])}}let s=[],c=null,l=o.compareCompletions;for(let e of n.sort((e,t)=>t.score-e.score||l(e.completion,t.completion))){let t=e.completion;!c||c.label!=t.label||c.detail!=t.detail||c.type!=null&&t.type!=null&&c.type!=t.type||c.apply!=t.apply||c.boost!=t.boost?s.push(e):Kz(e.completion)>Kz(c)&&(s[s.length-1]=e),c=e.completion}return s}var Jz=class e{constructor(e,t,n,r,i,a){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=r,this.selected=i,this.disabled=a}setSelected(t,n){return t==this.selected||t>=this.options.length?this:new e(this.options,$z(n,t),this.tooltip,this.timestamp,t,this.disabled)}static build(t,n,r,i,a,o){if(i&&!o&&t.some(e=>e.isPending))return i.setDisabled();let s=qz(t,n);if(!s.length)return i&&t.some(e=>e.isPending)?i.setDisabled():null;let c=n.facet(Lz).selectOnOpen?0:-1;if(i&&i.selected!=c&&i.selected!=-1){let e=i.options[i.selected].completion;for(let t=0;t<s.length;t++)if(s[t].completion==e){c=t;break}}return new e(s,$z(r,c),{pos:t.reduce((e,t)=>t.hasResult()?Math.min(e,t.from):e,1e8),create:cB,above:a.aboveCursor},i?i.timestamp:Date.now(),c,!1)}map(t){return new e(this.options,this.attrs,{...this.tooltip,pos:t.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new e(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}},Yz=class e{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new e(eB,`cm-ac-`+Math.floor(Math.random()*2e6).toString(36),null)}update(t){let{state:n}=t,r=n.facet(Lz),i=(r.override||n.languageDataAt(`autocomplete`,Dz(n)).map(Mz)).map(e=>(this.active.find(t=>t.source==e)||new nB(e,+!!this.active.some(e=>e.state!=0))).update(t,r));i.length==this.active.length&&i.every((e,t)=>e==this.active[t])&&(i=this.active);let a=this.open,o=t.effects.some(e=>e.is(aB));a&&t.docChanged&&(a=a.map(t.changes)),t.selection||i.some(e=>e.hasResult()&&t.changes.touchesRange(e.from,e.to))||!Xz(i,this.active)||o?a=Jz.build(i,n,this.id,a,r,o):a&&a.disabled&&!i.some(e=>e.isPending)&&(a=null),!a&&i.every(e=>!e.isPending)&&i.some(e=>e.hasResult())&&(i=i.map(e=>e.hasResult()?new nB(e.source,0):e));for(let e of t.effects)e.is(Bz)&&(a&&=a.setSelected(e.value,this.id));return i==this.active&&a==this.open?this:new e(i,this.id,a)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?Zz:Qz}};function Xz(e,t){if(e==t)return!0;for(let n=0,r=0;;){for(;n<e.length&&!e[n].hasResult();)n++;for(;r<t.length&&!t[r].hasResult();)r++;let i=n==e.length,a=r==t.length;if(i||a)return i==a;if(e[n++].result!=t[r++].result)return!1}}var Zz={"aria-autocomplete":`list`},Qz={};function $z(e,t){let n={"aria-autocomplete":`list`,"aria-haspopup":`listbox`,"aria-controls":e};return t>-1&&(n[`aria-activedescendant`]=e+`-`+t),n}var eB=[];function tB(e,t){if(e.isUserEvent(`input.complete`)){let n=e.annotation(kz);if(n&&t.activateOnCompletion(n))return 12}let n=e.isUserEvent(`input.type`);return n&&t.activateOnTyping?5:n?1:e.isUserEvent(`delete.backward`)?2:e.selection?8:e.docChanged?16:0}var nB=class e{constructor(e,t,n=!1){this.source=e,this.state=t,this.explicit=n}hasResult(){return!1}get isPending(){return this.state==1}update(t,n){let r=tB(t,n),i=this;(r&8||r&16&&this.touches(t))&&(i=new e(i.source,0)),r&4&&i.state==0&&(i=new e(this.source,1)),i=i.updateFor(t,r);for(let n of t.effects)if(n.is(Nz))i=new e(i.source,1,n.value);else if(n.is(Pz))i=new e(i.source,0);else if(n.is(aB))for(let e of n.value)e.source==i.source&&(i=e);return i}updateFor(e,t){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(Dz(e.state))}},rB=class e extends nB{constructor(e,t,n,r,i,a){super(e,3,t),this.limit=n,this.result=r,this.from=i,this.to=a}hasResult(){return!0}updateFor(t,n){if(!(n&3))return this.map(t.changes);let r=this.result;r.map&&!t.changes.empty&&(r=r.map(r,t.changes));let i=t.changes.mapPos(this.from),a=t.changes.mapPos(this.to,1),o=Dz(t.state);if(o>a||!r||n&2&&(Dz(t.startState)==this.from||o<this.limit))return new nB(this.source,n&4?1:0);let s=t.changes.mapPos(this.limit);return iB(r.validFor,t.state,i,a)?new e(this.source,this.explicit,s,r,i,a):r.update&&(r=r.update(r,i,a,new xz(t.state,o,!1)))?new e(this.source,this.explicit,s,r,r.from,r.to??Dz(t.state)):new nB(this.source,1,this.explicit)}map(t){if(t.empty)return this;let n=this.result.map?this.result.map(this.result,t):this.result;return n?new e(this.source,this.explicit,t.mapPos(this.limit),n,t.mapPos(this.from),t.mapPos(this.to,1)):new nB(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}};function iB(e,t,n,r){if(!e)return!1;let i=t.sliceDoc(n,r);return typeof e==`function`?e(i,n,r,t):Oz(e,!0).test(i)}var aB=S.define({map(e,t){return e.map(e=>e.map(t))}}),oB=w.define({create(){return Yz.start()},update(e,t){return e.update(t)},provide:e=>[Ve.from(e,e=>e.tooltip),R.contentAttributes.from(e,e=>e.attrs)]});function sB(e,t){let n=t.completion.apply||t.completion.label,r=e.state.field(oB).active.find(e=>e.source==t.source);return r instanceof rB&&(typeof n==`string`?e.dispatch({...Az(e.state,n,r.from,r.to),annotations:kz.of(t.completion)}):n(e,t.completion,r.from,r.to),!0)}var cB=Wz(oB,sB);function lB(e,t=`option`){return n=>{let r=n.state.field(oB,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<n.state.facet(Lz).interactionDelay)return!1;let i=1,a;t==`page`&&(a=ae(n,r.open.tooltip))&&(i=Math.max(2,Math.floor(a.dom.offsetHeight/a.dom.querySelector(`li`).offsetHeight)-1));let{length:o}=r.open.options,s=r.open.selected>-1?r.open.selected+i*(e?1:-1):e?0:o-1;return s<0?s=t==`page`?0:o-1:s>=o&&(s=t==`page`?o-1:0),n.dispatch({effects:Bz.of(s)}),!0}}var uB=e=>{let t=e.state.field(oB,!1);return e.state.readOnly||!t||!t.open||t.open.selected<0||t.open.disabled||Date.now()-t.open.timestamp<e.state.facet(Lz).interactionDelay?!1:sB(e,t.open.options[t.open.selected])},dB=e=>e.state.field(oB,!1)?(e.dispatch({effects:Nz.of(!0)}),!0):!1,fB=e=>{let t=e.state.field(oB,!1);return!t||!t.active.some(e=>e.state!=0)?!1:(e.dispatch({effects:Pz.of(null)}),!0)},pB=class{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}},mB=50,hB=1e3,gB=B.fromClass(class{constructor(e){this.view=e,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let t of e.state.field(oB).active)t.isPending&&this.startQuery(t)}update(e){let t=e.state.field(oB),n=e.state.facet(Lz);if(!e.selectionSet&&!e.docChanged&&e.startState.field(oB)==t)return;let r=e.transactions.some(e=>{let t=tB(e,n);return t&8||(e.selection||e.docChanged)&&!(t&3)});for(let t=0;t<this.running.length;t++){let n=this.running[t];if(r||n.context.abortOnDocChange&&e.docChanged||n.updates.length+e.transactions.length>mB&&Date.now()-n.time>hB){for(let e of n.context.abortListeners)try{e()}catch(e){de(this.view.state,e)}n.context.abortListeners=null,this.running.splice(t--,1)}else n.updates.push(...e.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),e.transactions.some(e=>e.effects.some(e=>e.is(Nz)))&&(this.pendingStart=!0);let i=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=t.active.some(e=>e.isPending&&!this.running.some(t=>t.active.source==e.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let t of e.transactions)t.isUserEvent(`input.type`)?this.composing=2:this.composing==2&&t.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:e}=this.view,t=e.field(oB);for(let e of t.active)e.isPending&&!this.running.some(t=>t.active.source==e.source)&&this.startQuery(e);this.running.length&&t.open&&t.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Lz).updateSyncTime))}startQuery(e){let{state:t}=this.view,n=new xz(t,Dz(t),e.explicit,this.view),r=new pB(e,n);this.running.push(r),Promise.resolve(e.source(n)).then(e=>{r.context.aborted||(r.done=e||null,this.scheduleAccept())},e=>{this.view.dispatch({effects:Pz.of(null)}),de(this.view.state,e)})}scheduleAccept(){this.running.every(e=>e.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Lz).updateSyncTime))}accept(){this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(Lz),n=this.view.state.field(oB);for(let r=0;r<this.running.length;r++){let i=this.running[r];if(i.done===void 0)continue;if(this.running.splice(r--,1),i.done){let n=Dz(i.updates.length?i.updates[0].startState:this.view.state),r=Math.min(n,i.done.from+ +!i.active.explicit),a=new rB(i.active.source,i.active.explicit,r,i.done,i.done.from,i.done.to??n);for(let e of i.updates)a=a.update(e,t);if(a.hasResult()){e.push(a);continue}}let a=n.active.find(e=>e.source==i.active.source);if(a&&a.isPending){if(i.done==null){let n=new nB(i.active.source,0);for(let e of i.updates)n=n.update(e,t);n.isPending||e.push(n)}else this.startQuery(a)}}(e.length||n.open&&n.open.disabled)&&this.view.dispatch({effects:aB.of(e)})}},{eventHandlers:{blur(e){let t=this.view.state.field(oB,!1);if(t&&t.tooltip&&this.view.state.facet(Lz).closeOnBlur){let n=t.open&&ae(this.view,t.open.tooltip);n&&n.dom.contains(e.relatedTarget)||setTimeout(()=>this.view.dispatch({effects:Pz.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:Nz.of(!1)}),20),this.composing=0}}}),_B=typeof navigator==`object`&&/Win/.test(navigator.platform),vB=E.highest(R.domEventHandlers({keydown(e,t){let n=t.state.field(oB,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||!e.key||e.key.length>1||e.ctrlKey&&!(_B&&e.altKey)||e.metaKey)return!1;let r=n.open.options[n.open.selected],i=n.active.find(e=>e.source==r.source),a=r.completion.commitCharacters||i.result.commitCharacters;return a&&a.indexOf(e.key)>-1&&sB(t,r),!1}})),yB=R.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:`monospace`,whiteSpace:`nowrap`,overflow:`hidden auto`,maxWidth_fallback:`700px`,maxWidth:`min(700px, 95vw)`,minWidth:`250px`,maxHeight:`10em`,height:`100%`,listStyle:`none`,margin:0,padding:0,"& > li, & > completion-section":{padding:`1px 3px`,lineHeight:1.2},"& > li":{overflowX:`hidden`,textOverflow:`ellipsis`,cursor:`pointer`},"& > completion-section":{display:`list-item`,borderBottom:`1px solid silver`,paddingLeft:`0.5em`,opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:`#17c`,color:`white`},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:`#777`},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:`#347`,color:`white`},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:`#444`},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:`"···"`,opacity:.5,display:`block`,textAlign:`center`,cursor:`pointer`},".cm-tooltip.cm-completionInfo":{position:`absolute`,padding:`3px 9px`,width:`max-content`,maxWidth:`400px`,boxSizing:`border-box`,whiteSpace:`pre-line`},".cm-completionInfo.cm-completionInfo-left":{right:`100%`},".cm-completionInfo.cm-completionInfo-right":{left:`100%`},".cm-completionInfo.cm-completionInfo-left-narrow":{right:`30px`},".cm-completionInfo.cm-completionInfo-right-narrow":{left:`30px`},"&light .cm-snippetField":{backgroundColor:`#00000022`},"&dark .cm-snippetField":{backgroundColor:`#ffffff22`},".cm-snippetFieldPosition":{verticalAlign:`text-top`,width:0,height:`1.15em`,display:`inline-block`,margin:`0 -0.7px -.7em`,borderLeft:`1.4px dotted #888`},".cm-completionMatchedText":{textDecoration:`underline`},".cm-completionDetail":{marginLeft:`0.5em`,fontStyle:`italic`},".cm-completionIcon":{fontSize:`90%`,width:`.8em`,display:`inline-block`,textAlign:`center`,paddingRight:`.6em`,opacity:`0.6`,boxSizing:`content-box`},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:`'ƒ'`}},".cm-completionIcon-class":{"&:after":{content:`'○'`}},".cm-completionIcon-interface":{"&:after":{content:`'◌'`}},".cm-completionIcon-variable":{"&:after":{content:`'𝑥'`}},".cm-completionIcon-constant":{"&:after":{content:`'𝐶'`}},".cm-completionIcon-type":{"&:after":{content:`'𝑡'`}},".cm-completionIcon-enum":{"&:after":{content:`'∪'`}},".cm-completionIcon-property":{"&:after":{content:`'□'`}},".cm-completionIcon-keyword":{"&:after":{content:`'🔑︎'`}},".cm-completionIcon-namespace":{"&:after":{content:`'▢'`}},".cm-completionIcon-text":{"&:after":{content:`'abc'`,fontSize:`50%`,verticalAlign:`middle`}}}),bB=class{constructor(e,t,n,r){this.field=e,this.line=t,this.from=n,this.to=r}},xB=class e{constructor(e,t,n){this.field=e,this.from=t,this.to=n}map(t){let n=t.mapPos(this.from,-1,c.TrackDel),r=t.mapPos(this.to,1,c.TrackDel);return n==null||r==null?null:new e(this.field,n,r)}},SB=class e{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,n){let r=[],i=[n],a=e.doc.lineAt(n),o=/^\s*/.exec(a.text)[0];for(let a of this.lines){if(r.length){let r=o,s=/^\t*/.exec(a)[0].length;for(let n=0;n<s;n++)r+=e.facet(t);i.push(n+r.length-s),a=r+a.slice(s)}r.push(a),n+=a.length+1}return{text:r,ranges:this.fieldPositions.map(e=>new xB(e.field,i[e.line]+e.from,i[e.line]+e.to))}}static parse(t){let n=[],r=[],i=[],a;for(let e of t.split(/\r\n?|\n/)){for(;a=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(e);){let t=a[1]?+a[1]:null,o=a[2]||a[3]||``,s=-1;t===0&&(t=1e9);let c=o.replace(/\\[{}]/g,e=>e[1]);for(let e=0;e<n.length;e++)(t==null?c&&n[e].name==c:n[e].seq==t)&&(s=e);if(s<0){let e=0;for(;e<n.length&&(t==null||n[e].seq!=null&&n[e].seq<t);)e++;n.splice(e,0,{seq:t,name:c}),s=e;for(let e of i)e.field>=s&&e.field++}for(let e of i)if(e.line==r.length&&e.from>a.index){let t=a[2]?3+(a[1]||``).length:2;e.from-=t,e.to-=t}i.push(new bB(s,r.length,a.index,a.index+c.length)),e=e.slice(0,a.index)+o+e.slice(a.index+a[0].length)}e=e.replace(/\\([{}])/g,(e,t,n)=>{for(let e of i)e.line==r.length&&e.from>n&&(e.from--,e.to--);return t}),r.push(e)}return new e(r,i)}},CB=_.widget({widget:new class extends k{toDOM(){let e=document.createElement(`span`);return e.className=`cm-snippetFieldPosition`,e}ignoreEvent(){return!1}}}),wB=_.mark({class:`cm-snippetField`}),TB=class e{constructor(e,t){this.ranges=e,this.active=t,this.deco=_.set(e.map(e=>(e.from==e.to?CB:wB).range(e.from,e.to)),!0)}map(t){let n=[];for(let e of this.ranges){let r=e.map(t);if(!r)return null;n.push(r)}return new e(n,this.active)}selectionInsideField(e){return e.ranges.every(e=>this.ranges.some(t=>t.field==this.active&&t.from<=e.from&&t.to>=e.to))}},EB=S.define({map(e,t){return e&&e.map(t)}}),DB=S.define(),OB=w.define({create(){return null},update(e,t){for(let n of t.effects){if(n.is(EB))return n.value;if(n.is(DB)&&e)return new TB(e.ranges,n.value)}return e&&t.docChanged&&(e=e.map(t.changes)),e&&t.selection&&!e.selectionInsideField(t.selection)&&(e=null),e},provide:e=>R.decorations.from(e,e=>e?e.deco:_.none)});function kB(e,t){return G.create(e.filter(e=>e.field==t).map(e=>G.range(e.from,e.to)))}function AB(e){let t=SB.parse(e);return(e,n,r,i)=>{let{text:a,ranges:o}=t.instantiate(e.state,r),{main:s}=e.state.selection,c={changes:{from:r,to:i==s.from?s.to:i,insert:O.of(a)},scrollIntoView:!0,annotations:n?[kz.of(n),f.userEvent.of(`input.complete`)]:void 0};if(o.length&&(c.selection=kB(o,0)),o.some(e=>e.field>0)){let t=new TB(o,0),n=c.effects=[EB.of(t)];e.state.field(OB,!1)===void 0&&n.push(S.appendConfig.of([OB,PB,IB,yB]))}e.dispatch(e.state.update(c))}}function jB(e){return({state:t,dispatch:n})=>{let r=t.field(OB,!1);if(!r||e<0&&r.active==0)return!1;let i=r.active+e,a=e>0&&!r.ranges.some(t=>t.field==i+e);return n(t.update({selection:kB(r.ranges,i),effects:EB.of(a?null:new TB(r.ranges,i)),scrollIntoView:!0})),!0}}var MB=[{key:`Tab`,run:jB(1),shift:jB(-1)},{key:`Escape`,run:({state:e,dispatch:t})=>e.field(OB,!1)?(t(e.update({effects:EB.of(null)})),!0):!1}],NB=u.define({combine(e){return e.length?e[0]:MB}}),PB=E.highest(ze.compute([NB],e=>e.facet(NB)));function FB(e,t){return{...t,apply:AB(e)}}var IB=R.domEventHandlers({mousedown(e,t){let n=t.state.field(OB,!1),r;if(!n||(r=t.posAtCoords({x:e.clientX,y:e.clientY}))==null)return!1;let i=n.ranges.find(e=>e.from<=r&&e.to>=r);return!i||i.field==n.active?!1:(t.dispatch({selection:kB(n.ranges,i.field),effects:EB.of(n.ranges.some(e=>e.field>i.field)?new TB(n.ranges,i.field):null),scrollIntoView:!0}),!0)}}),LB={brackets:[`(`,`[`,`{`,`'`,`"`],before:`)]}:;>`,stringPrefixes:[]},RB=S.define({map(e,t){return t.mapPos(e,-1,c.TrackAfter)??void 0}}),zB=new class extends ye{};zB.startSide=1,zB.endSide=-1;var BB=w.define({create(){return xe.empty},update(e,t){if(e=e.map(t.changes),t.selection){let n=t.state.doc.lineAt(t.selection.main.head);e=e.update({filter:e=>e>=n.from&&e<=n.to})}for(let n of t.effects)n.is(RB)&&(e=e.update({add:[zB.range(n.value,n.value+1)]}));return e}});function VB(){return[KB,BB]}var HB=`()[]{}<>«»»«[]{}`;function UB(e){for(let t=0;t<16;t+=2)if(HB.charCodeAt(t)==e)return HB.charAt(t+1);return L(e<128?e:e+1)}function WB(e,t){return e.languageDataAt(`closeBrackets`,t)[0]||LB}var GB=typeof navigator==`object`&&/Android\b/.test(navigator.userAgent),KB=R.inputHandler.of((e,t,n,r)=>{if((GB?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let i=e.state.selection.main;if(r.length>2||r.length==2&&b(g(r,0))==1||t!=i.from||n!=i.to)return!1;let a=JB(e.state,r);return a?(e.dispatch(a),!0):!1}),qB=[{key:`Backspace`,run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=WB(e,e.selection.main.head).brackets||LB.brackets,r=null,i=e.changeByRange(t=>{if(t.empty){let r=ZB(e.doc,t.head);for(let i of n)if(i==r&&XB(e.doc,t.head)==UB(g(i,0)))return{changes:{from:t.head-i.length,to:t.head+i.length},range:G.cursor(t.head-i.length)}}return{range:r=t}});return r||t(e.update(i,{scrollIntoView:!0,userEvent:`delete.backward`})),!r}}];function JB(e,t){let n=WB(e,e.selection.main.head),r=n.brackets||LB.brackets;for(let i of r){let a=UB(g(i,0));if(t==i)return a==i?eV(e,i,r.indexOf(i+i+i)>-1,n):QB(e,i,a,n.before||LB.before);if(t==a&&YB(e,e.selection.main.from))return $B(e,i,a)}return null}function YB(e,t){let n=!1;return e.field(BB).between(0,e.doc.length,e=>{e==t&&(n=!0)}),n}function XB(e,t){let n=e.sliceString(t,t+2);return n.slice(0,b(g(n,0)))}function ZB(e,t){let n=e.sliceString(t-2,t);return b(g(n,0))==n.length?n:n.slice(1)}function QB(e,t,n,r){let i=null,a=e.changeByRange(a=>{if(!a.empty)return{changes:[{insert:t,from:a.from},{insert:n,from:a.to}],effects:RB.of(a.to+t.length),range:G.range(a.anchor+t.length,a.head+t.length)};let o=XB(e.doc,a.head);return!o||/\s/.test(o)||r.indexOf(o)>-1?{changes:{insert:t+n,from:a.head},effects:RB.of(a.head+t.length),range:G.cursor(a.head+t.length)}:{range:i=a}});return i?null:e.update(a,{scrollIntoView:!0,userEvent:`input.type`})}function $B(e,t,n){let r=null,i=e.changeByRange(t=>t.empty&&XB(e.doc,t.head)==n?{changes:{from:t.head,to:t.head+n.length,insert:n},range:G.cursor(t.head+n.length)}:r={range:t});return r?null:e.update(i,{scrollIntoView:!0,userEvent:`input.type`})}function eV(e,t,n,r){let i=r.stringPrefixes||LB.stringPrefixes,a=null,s=e.changeByRange(r=>{if(!r.empty)return{changes:[{insert:t,from:r.from},{insert:t,from:r.to}],effects:RB.of(r.to+t.length),range:G.range(r.anchor+t.length,r.head+t.length)};let s=r.head,c=XB(e.doc,s),l;if(c==t){if(tV(e,s))return{changes:{insert:t+t,from:s},effects:RB.of(s+t.length),range:G.cursor(s+t.length)};if(YB(e,s)){let r=n&&e.sliceDoc(s,s+t.length*3)==t+t+t?t+t+t:t;return{changes:{from:s,to:s+r.length,insert:r},range:G.cursor(s+r.length)}}}else if(n&&e.sliceDoc(s-2*t.length,s)==t+t&&(l=rV(e,s-2*t.length,i))>-1&&tV(e,l))return{changes:{insert:t+t+t+t,from:s},effects:RB.of(s+t.length),range:G.cursor(s+t.length)};else if(e.charCategorizer(s)(c)!=o.Word&&rV(e,s,i)>-1&&!nV(e,s,t,i))return{changes:{insert:t+t,from:s},effects:RB.of(s+t.length),range:G.cursor(s+t.length)};return{range:a=r}});return a?null:e.update(s,{scrollIntoView:!0,userEvent:`input.type`})}function tV(e,t){let n=d(e).resolveInner(t+1);return n.parent&&n.from==t}function nV(e,t,n,r){let i=d(e).resolveInner(t,-1),a=r.reduce((e,t)=>Math.max(e,t.length),0);for(let o=0;o<5;o++){let o=e.sliceDoc(i.from,Math.min(i.to,i.from+n.length+a)),s=o.indexOf(n);if(!s||s>-1&&r.indexOf(o.slice(0,s))>-1){let t=i.firstChild;for(;t&&t.from==i.from&&t.to-t.from>n.length+s;){if(e.sliceDoc(t.to-n.length,t.to)==n)return!1;t=t.firstChild}return!0}let c=i.to==t&&i.parent;if(!c)break;i=c}return!1}function rV(e,t,n){let r=e.charCategorizer(t);if(r(e.sliceDoc(t-1,t))!=o.Word)return t;for(let i of n){let n=t-i.length;if(e.sliceDoc(n,t)==i&&r(e.sliceDoc(n-1,n))!=o.Word)return n}return-1}function iV(e={}){return[vB,oB,Lz.of(e),gB,oV,yB]}var aV=[{key:`Ctrl-Space`,run:dB},{mac:"Alt-`",run:dB},{mac:`Alt-i`,run:dB},{key:`Escape`,run:fB},{key:`ArrowDown`,run:lB(!0)},{key:`ArrowUp`,run:lB(!1)},{key:`PageDown`,run:lB(!0,`page`)},{key:`PageUp`,run:lB(!1,`page`)},{key:`Enter`,run:uB}],oV=E.highest(ze.computeN([Lz],e=>e.facet(Lz).defaultKeymap?[aV]:[])),sV=class{constructor(e,t,n){this.from=e,this.to=t,this.diagnostic=n}},cV=class e{constructor(e,t,n){this.diagnostics=e,this.panel=t,this.selected=n}static init(t,r,i){let a=i.facet(SV).markerFilter;a&&(t=a(t,i));let o=t.slice().sort((e,t)=>e.from-t.from||e.to-t.to),s=new n,c=[],l=0,u=i.doc.iter(),d=0,f=i.doc.length;for(let e=0;;){let t=e==o.length?null:o[e];if(!t&&!c.length)break;let n,r;if(c.length)n=l,r=c.reduce((e,t)=>Math.min(e,t.to),t&&t.from>n?t.from:1e8);else{if(n=t.from,n>f)break;r=t.to,c.push(t),e++}for(;e<o.length;){let t=o[e];if(t.from==n&&(t.to>t.from||t.to==n))c.push(t),e++,r=Math.min(t.to,r);else{r=Math.min(t.from,r);break}}r=Math.min(r,f);let i=!1;if(c.some(e=>e.from==n&&(e.to==r||r==f))&&(i=n==r,!i&&r-n<10)){let e=n-(d+u.value.length);e>0&&(u.next(e),d=n);for(let e=n;;){if(e>=r){i=!0;break}if(!u.lineBreak&&d+u.value.length>e)break;e=d+u.value.length,d+=u.value.length,u.next()}}let a=NV(c);if(i)s.add(n,n,_.widget({widget:new EV(a),diagnostics:c.slice()}));else{let e=c.reduce((e,t)=>t.markClass?e+` `+t.markClass:e,``);s.add(n,r,_.mark({class:`cm-lintRange cm-lintRange-`+a+e,diagnostics:c.slice(),inclusiveEnd:c.some(e=>e.to>r)}))}if(l=r,l==f)break;for(let e=0;e<c.length;e++)c[e].to<=l&&c.splice(e--,1)}let p=s.finish();return new e(p,r,lV(p))}};function lV(e,t=null,n=0){let r=null;return e.between(n,1e9,(e,n,{spec:i})=>{if(!(t&&i.diagnostics.indexOf(t)<0)){if(!r)r=new sV(e,n,t||i.diagnostics[0]);else if(i.diagnostics.indexOf(r.diagnostic)<0)return!1;else r=new sV(r.from,n,r.diagnostic)}}),r}function uV(e,t){let n=t.pos,r=t.end||n,i=e.state.facet(SV).hideOn(e,n,r);if(i!=null)return i;let a=e.startState.doc.lineAt(t.pos);return!!(e.effects.some(e=>e.is(fV))||e.changes.touchesRange(a.from,Math.max(a.to,r)))}function dV(e,t){return e.field(hV,!1)?t:t.concat(S.appendConfig.of(FV))}var fV=S.define(),pV=S.define(),mV=S.define(),hV=w.define({create(){return new cV(_.none,null,null)},update(e,t){if(t.docChanged&&e.diagnostics.size){let n=e.diagnostics.map(t.changes),r=null,i=e.panel;if(e.selected){let i=t.changes.mapPos(e.selected.from,1);r=lV(n,e.selected.diagnostic,i)||lV(n,null,i)}!n.size&&i&&t.state.facet(SV).autoPanel&&(i=null),e=new cV(n,i,r)}for(let n of t.effects)if(n.is(fV)){let r=t.state.facet(SV).autoPanel?n.value.length?OV.open:null:e.panel;e=cV.init(n.value,r,t.state)}else n.is(pV)?e=new cV(e.diagnostics,n.value?OV.open:null,e.selected):n.is(mV)&&(e=new cV(e.diagnostics,e.panel,n.value));return e},provide:e=>[re.from(e,e=>e.panel),R.decorations.from(e,e=>e.diagnostics)]}),gV=_.mark({class:`cm-lintRange cm-lintRange-active`});function _V(e,t,n){let{diagnostics:r}=e.state.field(hV),i,a=-1,o=-1;r.between(t-+(n<0),t+ +(n>0),(e,r,{spec:s})=>{if(t>=e&&t<=r&&(e==r||(t>e||n>0)&&(t<r||n<0)))return i=s.diagnostics,a=e,o=r,!1});let s=e.state.facet(SV).tooltipFilter;return i&&s&&(i=s(i,e.state)),i?{pos:a,end:o,above:!0,create(){return{dom:vV(e,i)}}}:null}function vV(e,t){return Ke(`ul`,{class:`cm-tooltip-lint`},t.map(t=>TV(e,t,!1)))}var yV=e=>{let t=e.state.field(hV,!1);t&&t.panel||e.dispatch({effects:dV(e.state,[pV.of(!0)])});let n=_e(e,OV.open);return n&&n.dom.querySelector(`.cm-panel-lint ul`).focus(),!0},bV=e=>{let t=e.state.field(hV,!1);return!t||!t.panel?!1:(e.dispatch({effects:pV.of(!1)}),!0)},xV=[{key:`Mod-Shift-m`,run:yV,preventDefault:!0},{key:`F8`,run:t=>{let n=t.state.field(hV,!1);if(!n)return!1;let r=t.state.selection.main,i=lV(n.diagnostics,null,r.to+1);return!i&&(i=lV(n.diagnostics,null,0),!i||i.from==r.from&&i.to==r.to)?!1:(t.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0}),e(t,i.from,1,{tooltip:PV,until:e=>e.docChanged||e.newSelection.main.head<i.from||e.newSelection.main.head>i.to}),!0)}}],SV=u.define({combine(e){return{sources:e.map(e=>e.source).filter(e=>e!=null),...j(e.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{delay:Math.max,markerFilter:CV,tooltipFilter:CV,needsRefresh:(e,t)=>e?t?n=>e(n)||t(n):e:t,hideOn:(e,t)=>e?t?(n,r,i)=>e(n,r,i)||t(n,r,i):e:t,autoPanel:(e,t)=>e||t})}}});function CV(e,t){return e?t?(n,r)=>t(e(n,r),r):e:t}function wV(e){let t=[];if(e)actions:for(let{name:n}of e){for(let e=0;e<n.length;e++){let r=n[e];if(/[a-zA-Z]/.test(r)&&!t.some(e=>e.toLowerCase()==r.toLowerCase())){t.push(r);continue actions}}t.push(``)}return t}function TV(e,t,n){let r=n?wV(t.actions):[];return Ke(`li`,{class:`cm-diagnostic cm-diagnostic-`+t.severity},Ke(`span`,{class:`cm-diagnosticText`},t.renderMessage?t.renderMessage(e):t.message),t.actions?.map((n,i)=>{let a=!1,o=r=>{if(r.preventDefault(),a)return;a=!0;let i=lV(e.state.field(hV).diagnostics,t);i&&n.apply(e,i.from,i.to)},{name:s}=n,c=r[i]?s.indexOf(r[i]):-1,l=c<0?s:[s.slice(0,c),Ke(`u`,s.slice(c,c+1)),s.slice(c+1)],u=n.markClass?` `+n.markClass:``;return Ke(`button`,{type:`button`,class:`cm-diagnosticAction`+u,onclick:o,onmousedown:o,"aria-label":` Action: ${s}${c<0?``:` (access key "${r[i]})"`}.`},l)}),t.source&&Ke(`div`,{class:`cm-diagnosticSource`},t.source))}var EV=class extends k{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return Ke(`span`,{class:`cm-lintPoint cm-lintPoint-`+this.sev})}},DV=class{constructor(e,t){this.diagnostic=t,this.id=`item_`+Math.floor(Math.random()*4294967295).toString(16),this.dom=TV(e,t,!0),this.dom.id=this.id,this.dom.setAttribute(`role`,`option`)}},OV=class e{constructor(e){this.view=e,this.items=[];let t=t=>{if(!(t.ctrlKey||t.altKey||t.metaKey)){if(t.keyCode==27)bV(this.view),this.view.focus();else if(t.keyCode==38||t.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(t.keyCode==40||t.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(t.keyCode==36)this.moveSelection(0);else if(t.keyCode==35)this.moveSelection(this.items.length-1);else if(t.keyCode==13)this.view.focus();else if(t.keyCode>=65&&t.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:n}=this.items[this.selectedIndex],r=wV(n.actions);for(let i=0;i<r.length;i++)if(r[i].toUpperCase().charCodeAt(0)==t.keyCode){let t=lV(this.view.state.field(hV).diagnostics,n);t&&n.actions[i].apply(e,t.from,t.to)}}else return;t.preventDefault()}},n=e=>{for(let t=0;t<this.items.length;t++)this.items[t].dom.contains(e.target)&&this.moveSelection(t)};this.list=Ke(`ul`,{tabIndex:0,role:`listbox`,"aria-label":this.view.state.phrase(`Diagnostics`),onkeydown:t,onclick:n}),this.dom=Ke(`div`,{class:`cm-panel-lint`},this.list,Ke(`button`,{type:`button`,name:`close`,"aria-label":this.view.state.phrase(`close`),onclick:()=>bV(this.view)},`×`)),this.update()}get selectedIndex(){let e=this.view.state.field(hV).selected;if(!e)return-1;for(let t=0;t<this.items.length;t++)if(this.items[t].diagnostic==e.diagnostic)return t;return-1}update(){let{diagnostics:e,selected:t}=this.view.state.field(hV),n=0,r=!1,i=null,a=new Set;for(e.between(0,this.view.state.doc.length,(e,o,{spec:s})=>{for(let e of s.diagnostics){if(a.has(e))continue;a.add(e);let o=-1,s;for(let t=n;t<this.items.length;t++)if(this.items[t].diagnostic==e){o=t;break}o<0?(s=new DV(this.view,e),this.items.splice(n,0,s),r=!0):(s=this.items[o],o>n&&(this.items.splice(n,o-n),r=!0)),t&&s.diagnostic==t.diagnostic?s.dom.hasAttribute(`aria-selected`)||(s.dom.setAttribute(`aria-selected`,`true`),i=s):s.dom.hasAttribute(`aria-selected`)&&s.dom.removeAttribute(`aria-selected`),n++}});n<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)r=!0,this.items.pop();this.items.length==0&&(this.items.push(new DV(this.view,{from:-1,to:-1,severity:`info`,message:this.view.state.phrase(`No diagnostics`)})),r=!0),i?(this.list.setAttribute(`aria-activedescendant`,i.id),this.view.requestMeasure({key:this,read:()=>({sel:i.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:e,panel:t})=>{let n=t.height/this.list.offsetHeight;e.top<t.top?this.list.scrollTop-=(t.top-e.top)/n:e.bottom>t.bottom&&(this.list.scrollTop+=(e.bottom-t.bottom)/n)}})):this.selectedIndex<0&&this.list.removeAttribute(`aria-activedescendant`),r&&this.sync()}sync(){let e=this.list.firstChild;function t(){let t=e;e=t.nextSibling,t.remove()}for(let n of this.items)if(n.dom.parentNode==this.list){for(;e!=n.dom;)t();e=n.dom.nextSibling}else this.list.insertBefore(n.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=lV(this.view.state.field(hV).diagnostics,this.items[e].diagnostic);t&&this.view.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0,effects:mV.of(t)})}static open(t){return new e(t)}};function kV(e,t=`viewBox="0 0 40 40"`){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${t}>${encodeURIComponent(e)}</svg>')`}function AV(e){return kV(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${e}" fill="none" stroke-width=".7"/>`,`width="6" height="3"`)}var jV=R.baseTheme({".cm-diagnostic":{padding:`3px 6px 3px 8px`,marginLeft:`-1px`,display:`block`,whiteSpace:`pre-wrap`},".cm-diagnostic-error":{borderLeft:`5px solid #d11`},".cm-diagnostic-warning":{borderLeft:`5px solid orange`},".cm-diagnostic-info":{borderLeft:`5px solid #999`},".cm-diagnostic-hint":{borderLeft:`5px solid #66d`},".cm-diagnosticAction":{font:`inherit`,border:`none`,padding:`2px 4px`,backgroundColor:`#444`,color:`white`,borderRadius:`3px`,marginLeft:`8px`,cursor:`pointer`},".cm-diagnosticSource":{fontSize:`70%`,opacity:.7},".cm-lintRange":{backgroundPosition:`left bottom`,backgroundRepeat:`repeat-x`,paddingBottom:`0.7px`},".cm-lintRange-error":{backgroundImage:AV(`#f11`)},".cm-lintRange-warning":{backgroundImage:AV(`orange`)},".cm-lintRange-info":{backgroundImage:AV(`#999`)},".cm-lintRange-hint":{backgroundImage:AV(`#66d`)},".cm-lintRange-active":{backgroundColor:`#ffdd9980`},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:`relative`,"&:after":{content:`""`,position:`absolute`,bottom:0,left:`-2px`,borderLeft:`3px solid transparent`,borderRight:`3px solid transparent`,borderBottom:`4px solid #d11`}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:`orange`}},".cm-lintPoint-info":{"&:after":{borderBottomColor:`#999`}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:`#66d`}},".cm-panel.cm-panel-lint":{position:`relative`,"& ul":{maxHeight:`100px`,overflowY:`auto`,"& [aria-selected]":{backgroundColor:`#ddd`,"& u":{textDecoration:`underline`}},"&:focus [aria-selected]":{background_fallback:`#bdf`,backgroundColor:`Highlight`,color_fallback:`white`,color:`HighlightText`},"& u":{textDecoration:`none`},padding:0,margin:0},"& [name=close]":{position:`absolute`,top:`0`,right:`2px`,background:`inherit`,border:`none`,font:`inherit`,padding:0,margin:0}},"&dark .cm-lintRange-active":{backgroundColor:`#86714a80`},"&dark .cm-panel.cm-panel-lint ul":{"& [aria-selected]":{backgroundColor:`#2e343e`}}});function MV(e){return e==`error`?4:e==`warning`?3:e==`info`?2:1}function NV(e){let t=`hint`,n=1;for(let r of e){let e=MV(r.severity);e>n&&(n=e,t=r.severity)}return t}var PV=Se(_V,{hideOn:uV}),FV=[hV,R.decorations.compute([hV],e=>{let{selected:t,panel:n}=e.field(hV);return!t||!n||t.from==t.to?_.none:_.set([gV.range(t.from,t.to)])}),PV,jV],IV=function(e){e===void 0&&(e={});var n=e.crosshairCursor,r=n!==void 0&&n,i=[];e.closeBracketsKeymap!==!1&&(i=i.concat(qB)),e.defaultKeymap!==!1&&(i=i.concat(lR)),e.searchKeymap!==!1&&(i=i.concat(pz)),e.historyKeymap!==!1&&(i=i.concat(xI)),e.foldKeymap!==!1&&(i=i.concat(M)),e.completionKeymap!==!1&&(i=i.concat(aV)),e.lintKeymap!==!1&&(i=i.concat(xV));var a=[];return e.lineNumbers!==!1&&a.push(le()),e.highlightActiveLineGutter!==!1&&a.push(Fe()),e.highlightSpecialChars!==!1&&a.push(H()),e.history!==!1&&a.push(nI()),e.foldGutter!==!1&&a.push(oe()),e.drawSelection!==!1&&a.push(Le()),e.dropCursor!==!1&&a.push(Ee()),e.allowMultipleSelections!==!1&&a.push(ee.allowMultipleSelections.of(!0)),e.indentOnInput!==!1&&a.push(T()),e.syntaxHighlighting!==!1&&a.push(D(fe,{fallback:!0})),e.bracketMatching!==!1&&a.push(ke()),e.closeBrackets!==!1&&a.push(VB()),e.autocompletion!==!1&&a.push(iV()),e.rectangularSelection!==!1&&a.push(we()),r!==!1&&a.push(U()),e.highlightActiveLine!==!1&&a.push(Oe()),e.highlightSelectionMatches!==!1&&a.push(wR()),e.tabSize&&typeof e.tabSize==`number`&&a.push(t.of(` `.repeat(e.tabSize))),a.concat([ze.of(i.flat())]).filter(Boolean)},LV=`#e5c07b`,RV=`#e06c75`,zV=`#56b6c2`,BV=`#ffffff`,VV=`#abb2bf`,HV=`#7d8799`,UV=`#61afef`,WV=`#98c379`,GV=`#d19a66`,KV=`#c678dd`,qV=`#21252b`,JV=`#2c313a`,YV=`#282c34`,XV=`#353a42`,ZV=`#3E4451`,QV=`#528bff`,$V=R.theme({"&":{color:VV,backgroundColor:YV},".cm-content":{caretColor:QV},".cm-cursor, .cm-dropCursor":{borderLeftColor:QV},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:ZV},".cm-panels":{backgroundColor:qV,color:VV},".cm-panels.cm-panels-top":{borderBottom:`2px solid black`},".cm-panels.cm-panels-bottom":{borderTop:`2px solid black`},".cm-searchMatch":{backgroundColor:`#72a1ff59`,outline:`1px solid #457dff`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:`#6199ff2f`},".cm-activeLine":{backgroundColor:`#6699ff0b`},".cm-selectionMatch":{backgroundColor:`#aafe661a`},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:`#bad0f847`},".cm-gutters":{backgroundColor:YV,color:HV,border:`none`},".cm-activeLineGutter":{backgroundColor:JV},".cm-foldPlaceholder":{backgroundColor:`transparent`,border:`none`,color:`#ddd`},".cm-tooltip":{border:`none`,backgroundColor:XV},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:XV,borderBottomColor:XV},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:JV,color:VV}}},{dark:!0}),eH=ie.define([{tag:K.keyword,color:KV},{tag:[K.name,K.deleted,K.character,K.propertyName,K.macroName],color:RV},{tag:[K.function(K.variableName),K.labelName],color:UV},{tag:[K.color,K.constant(K.name),K.standard(K.name)],color:GV},{tag:[K.definition(K.name),K.separator],color:VV},{tag:[K.typeName,K.className,K.number,K.changed,K.annotation,K.modifier,K.self,K.namespace],color:LV},{tag:[K.operator,K.operatorKeyword,K.url,K.escape,K.regexp,K.link,K.special(K.string)],color:zV},{tag:[K.meta,K.comment],color:HV},{tag:K.strong,fontWeight:`bold`},{tag:K.emphasis,fontStyle:`italic`},{tag:K.strikethrough,textDecoration:`line-through`},{tag:K.link,color:HV,textDecoration:`underline`},{tag:K.heading,fontWeight:`bold`,color:RV},{tag:[K.atom,K.bool,K.special(K.variableName)],color:GV},{tag:[K.processingInstruction,K.string,K.inserted],color:WV},{tag:K.invalid,color:BV}]),tH=[$V,D(eH)],nH=R.theme({"&":{backgroundColor:`#fff`}},{dark:!1}),rH=function(e){e===void 0&&(e={});var t=e,n=t.indentWithTab,r=n===void 0||n,i=t.editable,a=i===void 0||i,o=t.readOnly,s=o!==void 0&&o,c=t.theme,l=c===void 0?`light`:c,u=t.placeholder,d=u===void 0?``:u,f=t.basicSetup,p=f===void 0||f,m=[];switch(r&&m.unshift(ze.of([uR])),p&&(typeof p==`boolean`?m.unshift(IV()):m.unshift(IV(p))),d&&m.unshift(Ae(d)),l){case`light`:m.push(nH);break;case`dark`:m.push(tH);break;case`none`:break;default:m.push(l)}return a===!1&&m.push(R.editable.of(!1)),s&&m.push(ee.readOnly.of(!0)),[...m]},iH=e=>({line:e.state.doc.lineAt(e.state.selection.main.from),lineCount:e.state.doc.lines,lineBreak:e.state.lineBreak,length:e.state.doc.length,readOnly:e.state.readOnly,tabSize:e.state.tabSize,selection:e.state.selection,selectionAsSingle:e.state.selection.asSingle().main,ranges:e.state.selection.ranges,selectionCode:e.state.sliceDoc(e.state.selection.main.from,e.state.selection.main.to),selections:e.state.selection.ranges.map(t=>e.state.sliceDoc(t.from,t.to)),selectedText:e.state.selection.ranges.some(e=>!e.empty)}),aH=class{constructor(e,t){this.timeLeftMS=void 0,this.timeoutMS=void 0,this.isCancelled=!1,this.isTimeExhausted=!1,this.callbacks=[],this.timeLeftMS=t,this.timeoutMS=t,this.callbacks.push(e)}tick(){if(!this.isCancelled&&!this.isTimeExhausted&&(this.timeLeftMS--,this.timeLeftMS<=0)){this.isTimeExhausted=!0;var e=this.callbacks.slice();this.callbacks.length=0,e.forEach(e=>{try{e()}catch(e){console.error(`TimeoutLatch callback error:`,e)}})}}cancel(){this.isCancelled=!0,this.callbacks.length=0}reset(){this.timeLeftMS=this.timeoutMS,this.isCancelled=!1,this.isTimeExhausted=!1}get isDone(){return this.isCancelled||this.isTimeExhausted}},oH=class{constructor(){this.interval=null,this.latches=new Set}add(e){this.latches.add(e),this.start()}remove(e){this.latches.delete(e),this.latches.size===0&&this.stop()}start(){this.interval===null&&(this.interval=setInterval(()=>{this.latches.forEach(e=>{e.tick(),e.isDone&&this.remove(e)})},1))}stop(){this.interval!==null&&(clearInterval(this.interval),this.interval=null)}},sH=null,cH=()=>typeof window>`u`?new oH:(sH||=new oH,sH),lH=R.theme({"& .cm-scroller":{height:`100% !important`}}),uH=null,dH=null;function fH(e,t,n,r,i,a){if(!e&&!t&&!n&&!r&&!i&&!a)return null;var o=JSON.stringify({height:e,minHeight:t,maxHeight:n,width:r,minWidth:i,maxWidth:a});return o===uH||(uH=o,dH=R.theme({"&":{height:e,minHeight:t,maxHeight:n,width:r,minWidth:i,maxWidth:a}})),dH}var pH=V.define(),mH=200,hH=[];function gH(e){var t=e.value,n=e.selection,r=e.onChange,i=e.onStatistics,a=e.onCreateEditor,o=e.onUpdate,s=e.extensions,c=s===void 0?hH:s,l=e.autoFocus,u=e.theme,d=u===void 0?`light`:u,f=e.height,p=f===void 0?null:f,m=e.minHeight,h=m===void 0?null:m,g=e.maxHeight,_=g===void 0?null:g,v=e.width,y=v===void 0?null:v,b=e.minWidth,x=b===void 0?null:b,C=e.maxWidth,w=C===void 0?null:C,T=e.placeholder,E=T===void 0?``:T,D=e.editable,O=D===void 0||D,k=e.readOnly,A=k!==void 0&&k,j=e.indentWithTab,M=j===void 0||j,N=e.basicSetup,P=N===void 0||N,F=e.root,I=e.initialState,L=(0,q.useState)(),te=L[0],z=L[1],B=(0,q.useState)(),ne=B[0],re=B[1],ie=(0,q.useState)(),ae=ie[0],oe=ie[1],V=(0,q.useState)(()=>({current:null}))[0],se=(0,q.useState)(()=>({current:null}))[0],H=fH(p,h,_,y,x,w),ce=R.updateListener.of(e=>{e.docChanged&&typeof r==`function`&&!e.transactions.some(e=>e.annotation(pH))&&(V.current?V.current.reset():(V.current=new aH(()=>{if(se.current){var e=se.current;se.current=null,e()}V.current=null},mH),cH().add(V.current)),r(e.state.doc.toString(),e)),i&&i(iH(e))}),le=rH({theme:d,editable:O,readOnly:A,placeholder:E,indentWithTab:M,basicSetup:P}),U=[ce,...H?[H]:[],lH,...le];return o&&typeof o==`function`&&U.push(R.updateListener.of(o)),U=U.concat(c),(0,q.useLayoutEffect)(()=>{if(te&&!ae){var e={doc:t,selection:n,extensions:U},r=I?ee.fromJSON(I.json,e,I.fields):ee.create(e);if(oe(r),!ne){var i=new R({state:r,parent:te,root:F});re(i),a&&a(i,r)}}return()=>{ne&&(oe(void 0),re(void 0))}},[te,ae]),(0,q.useEffect)(()=>{e.container&&z(e.container)},[e.container]),(0,q.useEffect)(()=>()=>{ne&&(ne.destroy(),re(void 0)),V.current&&=(V.current.cancel(),null)},[ne]),(0,q.useEffect)(()=>{l&&ne&&ne.focus()},[l,ne]),(0,q.useEffect)(()=>{ne&&ne.dispatch({effects:S.reconfigure.of(U)})},[d,c,p,h,_,y,x,w,E,O,A,M,P,r,o]),(0,q.useEffect)(()=>{if(t!==void 0){var e=ne?ne.state.doc.toString():``;if(ne&&t!==e){var n=V.current&&!V.current.isDone,r=()=>{ne&&t!==ne.state.doc.toString()&&ne.dispatch({changes:{from:0,to:ne.state.doc.toString().length,insert:t||``},annotations:[pH.of(!0)]})};n?se.current=r:r()}}},[t,ne]),{state:ae,setState:oe,view:ne,setView:re,container:te,setContainer:z}}var _H=[`className`,`value`,`selection`,`extensions`,`onChange`,`onStatistics`,`onCreateEditor`,`onUpdate`,`autoFocus`,`theme`,`height`,`minHeight`,`maxHeight`,`width`,`minWidth`,`maxWidth`,`basicSetup`,`placeholder`,`indentWithTab`,`editable`,`readOnly`,`root`,`initialState`],vH=(0,q.forwardRef)((e,t)=>{var n=e.className,r=e.value,i=r===void 0?``:r,a=e.selection,o=e.extensions,s=o===void 0?[]:o,c=e.onChange,l=e.onStatistics,u=e.onCreateEditor,d=e.onUpdate,f=e.autoFocus,p=e.theme,m=p===void 0?`light`:p,h=e.height,g=e.minHeight,_=e.maxHeight,v=e.width,y=e.minWidth,b=e.maxWidth,x=e.basicSetup,S=e.placeholder,C=e.indentWithTab,w=e.editable,T=e.readOnly,E=e.root,D=e.initialState,O=zF(e,_H),k=(0,q.useRef)(null),A=gH({root:E,value:i,autoFocus:f,theme:m,height:h,minHeight:g,maxHeight:_,width:v,minWidth:y,maxWidth:b,basicSetup:x,placeholder:S,indentWithTab:C,editable:w,readOnly:T,selection:a,onChange:c,onStatistics:l,onCreateEditor:u,onUpdate:d,extensions:s,initialState:D}),j=A.state,M=A.view,N=A.container,P=A.setContainer;(0,q.useImperativeHandle)(t,()=>({editor:k.current,state:j,view:M}),[k,N,j,M]);var ee=(0,q.useCallback)(e=>{k.current=e,P(e)},[P]);if(typeof i!=`string`)throw Error(`value must be typeof string but got `+typeof i);var F=typeof m==`string`?`cm-theme-`+m:`cm-theme`;return(0,J.jsx)(`div`,RF({ref:ee,className:``+F+(n?` `+n:``)},O))});vH.displayName=`CodeMirror`;var yH=/\.(png|jpe?g|webp)$/i;function bH(e){let t=e.trim().replace(/\\/g,`/`);return/^none\b/i.test(t)||!t.startsWith(`.explore/`)||t.includes(`..`)||!yH.test(t)?null:`/explore-files?file=${encodeURIComponent(t)}`}var xH=`bottom`,SH=`right`,CH=`left`,wH=`auto`,TH=[`top`,xH,SH,CH],EH=`start`,DH=`clippingParents`,OH=`viewport`,kH=`popper`,AH=`reference`,jH=TH.reduce(function(e,t){return e.concat([t+`-`+EH,t+`-end`])},[]),MH=[].concat(TH,[wH]).reduce(function(e,t){return e.concat([t,t+`-`+EH,t+`-end`])},[]),NH=[`beforeRead`,`read`,`afterRead`,`beforeMain`,`main`,`afterMain`,`beforeWrite`,`write`,`afterWrite`];function PH(e){return e?(e.nodeName||``).toLowerCase():null}function FH(e){if(e==null)return window;if(e.toString()!==`[object Window]`){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function IH(e){return e instanceof FH(e).Element||e instanceof Element}function LH(e){return e instanceof FH(e).HTMLElement||e instanceof HTMLElement}function RH(e){return typeof ShadowRoot>`u`?!1:e instanceof FH(e).ShadowRoot||e instanceof ShadowRoot}function zH(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];LH(i)&&PH(i)&&(Object.assign(i.style,n),Object.keys(r).forEach(function(e){var t=r[e];t===!1?i.removeAttribute(e):i.setAttribute(e,t===!0?``:t)}))})}function BH(e){var t=e.state,n={popper:{position:t.options.strategy,left:`0`,top:`0`,margin:`0`},arrow:{position:`absolute`},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var r=t.elements[e],i=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]=``,e},{});LH(r)&&PH(r)&&(Object.assign(r.style,a),Object.keys(i).forEach(function(e){r.removeAttribute(e)}))})}}var VH={name:`applyStyles`,enabled:!0,phase:`write`,fn:zH,effect:BH,requires:[`computeStyles`]};function HH(e){return e.split(`-`)[0]}var UH=Math.max,WH=Math.min,GH=Math.round;function KH(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+`/`+e.version}).join(` `):navigator.userAgent}function qH(){return!/^((?!chrome|android).)*safari/i.test(KH())}function JH(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,a=1;t&&LH(e)&&(i=e.offsetWidth>0&&GH(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&GH(r.height)/e.offsetHeight||1);var o=(IH(e)?FH(e):window).visualViewport,s=!qH()&&n,c=(r.left+(s&&o?o.offsetLeft:0))/i,l=(r.top+(s&&o?o.offsetTop:0))/a,u=r.width/i,d=r.height/a;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c,x:c,y:l}}function YH(e){var t=JH(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function XH(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&RH(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function ZH(e){return FH(e).getComputedStyle(e)}function QH(e){return[`table`,`td`,`th`].indexOf(PH(e))>=0}function $H(e){return((IH(e)?e.ownerDocument:e.document)||window.document).documentElement}function eU(e){return PH(e)===`html`?e:e.assignedSlot||e.parentNode||(RH(e)?e.host:null)||$H(e)}function tU(e){return!LH(e)||ZH(e).position===`fixed`?null:e.offsetParent}function nU(e){var t=/firefox/i.test(KH());if(/Trident/i.test(KH())&&LH(e)&&ZH(e).position===`fixed`)return null;var n=eU(e);for(RH(n)&&(n=n.host);LH(n)&&[`html`,`body`].indexOf(PH(n))<0;){var r=ZH(n);if(r.transform!==`none`||r.perspective!==`none`||r.contain===`paint`||[`transform`,`perspective`].indexOf(r.willChange)!==-1||t&&r.willChange===`filter`||t&&r.filter&&r.filter!==`none`)return n;n=n.parentNode}return null}function rU(e){for(var t=FH(e),n=tU(e);n&&QH(n)&&ZH(n).position===`static`;)n=tU(n);return n&&(PH(n)===`html`||PH(n)===`body`&&ZH(n).position===`static`)?t:n||nU(e)||t}function iU(e){return[`top`,`bottom`].indexOf(e)>=0?`x`:`y`}function aU(e,t,n){return UH(e,WH(t,n))}function oU(e,t,n){var r=aU(e,t,n);return r>n?n:r}function sU(){return{top:0,right:0,bottom:0,left:0}}function cU(e){return Object.assign({},sU(),e)}function lU(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}var uU=function(e,t){return e=typeof e==`function`?e(Object.assign({},t.rects,{placement:t.placement})):e,cU(typeof e==`number`?lU(e,TH):e)};function dU(e){var t,n=e.state,r=e.name,i=e.options,a=n.elements.arrow,o=n.modifiersData.popperOffsets,s=HH(n.placement),c=iU(s),l=[`left`,`right`].indexOf(s)>=0?`height`:`width`;if(a&&o){var u=uU(i.padding,n),d=YH(a),f=c===`y`?`top`:CH,p=c===`y`?xH:SH,m=n.rects.reference[l]+n.rects.reference[c]-o[c]-n.rects.popper[l],h=o[c]-n.rects.reference[c],g=rU(a),_=g?c===`y`?g.clientHeight||0:g.clientWidth||0:0,v=m/2-h/2,y=u[f],b=_-d[l]-u[p],x=_/2-d[l]/2+v,S=aU(y,x,b),C=c;n.modifiersData[r]=(t={},t[C]=S,t.centerOffset=S-x,t)}}function fU(e){var t=e.state,n=e.options.element,r=n===void 0?`[data-popper-arrow]`:n;r!=null&&(typeof r==`string`&&(r=t.elements.popper.querySelector(r),!r)||XH(t.elements.popper,r)&&(t.elements.arrow=r))}var pU={name:`arrow`,enabled:!0,phase:`main`,fn:dU,effect:fU,requires:[`popperOffsets`],requiresIfExists:[`preventOverflow`]};function mU(e){return e.split(`-`)[1]}var hU={top:`auto`,right:`auto`,bottom:`auto`,left:`auto`};function gU(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:GH(n*i)/i||0,y:GH(r*i)/i||0}}function _U(e){var t,n=e.popper,r=e.popperRect,i=e.placement,a=e.variation,o=e.offsets,s=e.position,c=e.gpuAcceleration,l=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=o.x,p=f===void 0?0:f,m=o.y,h=m===void 0?0:m,g=typeof u==`function`?u({x:p,y:h}):{x:p,y:h};p=g.x,h=g.y;var _=o.hasOwnProperty(`x`),v=o.hasOwnProperty(`y`),y=CH,b=`top`,x=window;if(l){var S=rU(n),C=`clientHeight`,w=`clientWidth`;if(S===FH(n)&&(S=$H(n),ZH(S).position!==`static`&&s===`absolute`&&(C=`scrollHeight`,w=`scrollWidth`)),S=S,i===`top`||(i===`left`||i===`right`)&&a===`end`){b=xH;var T=d&&S===x&&x.visualViewport?x.visualViewport.height:S[C];h-=T-r.height,h*=c?1:-1}if(i===`left`||(i===`top`||i===`bottom`)&&a===`end`){y=SH;var E=d&&S===x&&x.visualViewport?x.visualViewport.width:S[w];p-=E-r.width,p*=c?1:-1}}var D=Object.assign({position:s},l&&hU),O=u===!0?gU({x:p,y:h},FH(n)):{x:p,y:h};if(p=O.x,h=O.y,c){var k;return Object.assign({},D,(k={},k[b]=v?`0`:``,k[y]=_?`0`:``,k.transform=(x.devicePixelRatio||1)<=1?`translate(`+p+`px, `+h+`px)`:`translate3d(`+p+`px, `+h+`px, 0)`,k))}return Object.assign({},D,(t={},t[b]=v?h+`px`:``,t[y]=_?p+`px`:``,t.transform=``,t))}function vU(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0||r,a=n.adaptive,o=a===void 0||a,s=n.roundOffsets,c=s===void 0||s,l={placement:HH(t.placement),variation:mU(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy===`fixed`};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,_U(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,_U(Object.assign({},l,{offsets:t.modifiersData.arrow,position:`absolute`,adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var yU={name:`computeStyles`,enabled:!0,phase:`beforeWrite`,fn:vU,data:{}},bU={passive:!0};function xU(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,a=i===void 0||i,o=r.resize,s=o===void 0||o,c=FH(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&l.forEach(function(e){e.addEventListener(`scroll`,n.update,bU)}),s&&c.addEventListener(`resize`,n.update,bU),function(){a&&l.forEach(function(e){e.removeEventListener(`scroll`,n.update,bU)}),s&&c.removeEventListener(`resize`,n.update,bU)}}var SU={name:`eventListeners`,enabled:!0,phase:`write`,fn:function(){},effect:xU,data:{}},CU={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function wU(e){return e.replace(/left|right|bottom|top/g,function(e){return CU[e]})}var TU={start:`end`,end:`start`};function EU(e){return e.replace(/start|end/g,function(e){return TU[e]})}function DU(e){var t=FH(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function OU(e){return JH($H(e)).left+DU(e).scrollLeft}function kU(e,t){var n=FH(e),r=$H(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;var l=qH();(l||!l&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s+OU(e),y:c}}function AU(e){var t=$H(e),n=DU(e),r=e.ownerDocument?.body,i=UH(t.scrollWidth,t.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=UH(t.scrollHeight,t.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),o=-n.scrollLeft+OU(e),s=-n.scrollTop;return ZH(r||t).direction===`rtl`&&(o+=UH(t.clientWidth,r?r.clientWidth:0)-i),{width:i,height:a,x:o,y:s}}function jU(e){var t=ZH(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function MU(e){return[`html`,`body`,`#document`].indexOf(PH(e))>=0?e.ownerDocument.body:LH(e)&&jU(e)?e:MU(eU(e))}function NU(e,t){t===void 0&&(t=[]);var n=MU(e),r=n===e.ownerDocument?.body,i=FH(n),a=r?[i].concat(i.visualViewport||[],jU(n)?n:[]):n,o=t.concat(a);return r?o:o.concat(NU(eU(a)))}function PU(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function FU(e,t){var n=JH(e,!1,t===`fixed`);return n.top+=e.clientTop,n.left+=e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function IU(e,t,n){return t===`viewport`?PU(kU(e,n)):IH(t)?FU(t,n):PU(AU($H(e)))}function LU(e){var t=NU(eU(e)),n=[`absolute`,`fixed`].indexOf(ZH(e).position)>=0&&LH(e)?rU(e):e;return IH(n)?t.filter(function(e){return IH(e)&&XH(e,n)&&PH(e)!==`body`}):[]}function RU(e,t,n,r){var i=t===`clippingParents`?LU(e):[].concat(t),a=[].concat(i,[n]),o=a[0],s=a.reduce(function(t,n){var i=IU(e,n,r);return t.top=UH(i.top,t.top),t.right=WH(i.right,t.right),t.bottom=WH(i.bottom,t.bottom),t.left=UH(i.left,t.left),t},IU(e,o,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function zU(e){var t=e.reference,n=e.element,r=e.placement,i=r?HH(r):null,a=r?mU(r):null,o=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,c;switch(i){case`top`:c={x:o,y:t.y-n.height};break;case xH:c={x:o,y:t.y+t.height};break;case SH:c={x:t.x+t.width,y:s};break;case CH:c={x:t.x-n.width,y:s};break;default:c={x:t.x,y:t.y}}var l=i?iU(i):null;if(l!=null){var u=l===`y`?`height`:`width`;switch(a){case EH:c[l]=c[l]-(t[u]/2-n[u]/2);break;case`end`:c[l]=c[l]+(t[u]/2-n[u]/2)}}return c}function BU(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,a=n.strategy,o=a===void 0?e.strategy:a,s=n.boundary,c=s===void 0?DH:s,l=n.rootBoundary,u=l===void 0?OH:l,d=n.elementContext,f=d===void 0?kH:d,p=n.altBoundary,m=p!==void 0&&p,h=n.padding,g=h===void 0?0:h,_=cU(typeof g==`number`?lU(g,TH):g),v=f===`popper`?AH:kH,y=e.rects.popper,b=e.elements[m?v:f],x=RU(IH(b)?b:b.contextElement||$H(e.elements.popper),c,u,o),S=JH(e.elements.reference),C=zU({reference:S,element:y,strategy:`absolute`,placement:i}),w=PU(Object.assign({},y,C)),T=f===`popper`?w:S,E={top:x.top-T.top+_.top,bottom:T.bottom-x.bottom+_.bottom,left:x.left-T.left+_.left,right:T.right-x.right+_.right},D=e.modifiersData.offset;if(f===`popper`&&D){var O=D[i];Object.keys(E).forEach(function(e){var t=[`right`,`bottom`].indexOf(e)>=0?1:-1,n=[`top`,`bottom`].indexOf(e)>=0?`y`:`x`;E[e]+=O[n]*t})}return E}function VU(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,a=n.rootBoundary,o=n.padding,s=n.flipVariations,c=n.allowedAutoPlacements,l=c===void 0?MH:c,u=mU(r),d=u?s?jH:jH.filter(function(e){return mU(e)===u}):TH,f=d.filter(function(e){return l.indexOf(e)>=0});f.length===0&&(f=d);var p=f.reduce(function(t,n){return t[n]=BU(e,{placement:n,boundary:i,rootBoundary:a,padding:o})[HH(n)],t},{});return Object.keys(p).sort(function(e,t){return p[e]-p[t]})}function HU(e){if(HH(e)===`auto`)return[];var t=wU(e);return[EU(e),t,EU(t)]}function UU(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,a=i===void 0||i,o=n.altAxis,s=o===void 0||o,c=n.fallbackPlacements,l=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,m=p===void 0||p,h=n.allowedAutoPlacements,g=t.options.placement,_=HH(g)===g,v=c||(_||!m?[wU(g)]:HU(g)),y=[g].concat(v).reduce(function(e,n){return e.concat(HH(n)===`auto`?VU(t,{placement:n,boundary:u,rootBoundary:d,padding:l,flipVariations:m,allowedAutoPlacements:h}):n)},[]),b=t.rects.reference,x=t.rects.popper,S=new Map,C=!0,w=y[0],T=0;T<y.length;T++){var E=y[T],D=HH(E),O=mU(E)===EH,k=[`top`,xH].indexOf(D)>=0,A=k?`width`:`height`,j=BU(t,{placement:E,boundary:u,rootBoundary:d,altBoundary:f,padding:l}),M=k?O?SH:CH:O?xH:`top`;b[A]>x[A]&&(M=wU(M));var N=wU(M),P=[];if(a&&P.push(j[D]<=0),s&&P.push(j[M]<=0,j[N]<=0),P.every(function(e){return e})){w=E,C=!1;break}S.set(E,P)}if(C)for(var ee=m?3:1,F=function(e){var t=y.find(function(t){var n=S.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return w=t,`break`},I=ee;I>0&&F(I)!==`break`;I--);t.placement!==w&&(t.modifiersData[r]._skip=!0,t.placement=w,t.reset=!0)}}var WU={name:`flip`,enabled:!0,phase:`main`,fn:UU,requiresIfExists:[`offset`],data:{_skip:!1}};function GU(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function KU(e){return[`top`,SH,xH,CH].some(function(t){return e[t]>=0})}function qU(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,o=BU(t,{elementContext:`reference`}),s=BU(t,{altBoundary:!0}),c=GU(o,r),l=GU(s,i,a),u=KU(c),d=KU(l);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}var JU={name:`hide`,enabled:!0,phase:`main`,requiresIfExists:[`preventOverflow`],fn:qU};function YU(e,t,n){var r=HH(e),i=[`left`,`top`].indexOf(r)>=0?-1:1,a=typeof n==`function`?n(Object.assign({},t,{placement:e})):n,o=a[0],s=a[1];return o||=0,s=(s||0)*i,[`left`,`right`].indexOf(r)>=0?{x:s,y:o}:{x:o,y:s}}function XU(e){var t=e.state,n=e.options,r=e.name,i=n.offset,a=i===void 0?[0,0]:i,o=MH.reduce(function(e,n){return e[n]=YU(n,t.rects,a),e},{}),s=o[t.placement],c=s.x,l=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=l),t.modifiersData[r]=o}var ZU={name:`offset`,enabled:!0,phase:`main`,requires:[`popperOffsets`],fn:XU};function QU(e){var t=e.state,n=e.name;t.modifiersData[n]=zU({reference:t.rects.reference,element:t.rects.popper,strategy:`absolute`,placement:t.placement})}var $U={name:`popperOffsets`,enabled:!0,phase:`read`,fn:QU,data:{}};function eW(e){return e===`x`?`y`:`x`}function tW(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,a=i===void 0||i,o=n.altAxis,s=o!==void 0&&o,c=n.boundary,l=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,p=f===void 0||f,m=n.tetherOffset,h=m===void 0?0:m,g=BU(t,{boundary:c,rootBoundary:l,padding:d,altBoundary:u}),_=HH(t.placement),v=mU(t.placement),y=!v,b=iU(_),x=eW(b),S=t.modifiersData.popperOffsets,C=t.rects.reference,w=t.rects.popper,T=typeof h==`function`?h(Object.assign({},t.rects,{placement:t.placement})):h,E=typeof T==`number`?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),D=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,O={x:0,y:0};if(S){if(a){var k=b===`y`?`top`:CH,A=b===`y`?xH:SH,j=b===`y`?`height`:`width`,M=S[b],N=M+g[k],P=M-g[A],ee=p?-w[j]/2:0,F=v===`start`?C[j]:w[j],I=v===`start`?-w[j]:-C[j],L=t.elements.arrow,te=p&&L?YH(L):{width:0,height:0},R=t.modifiersData[`arrow#persistent`]?t.modifiersData[`arrow#persistent`].padding:sU(),z=R[k],B=R[A],ne=aU(0,C[j],te[j]),re=y?C[j]/2-ee-ne-z-E.mainAxis:F-ne-z-E.mainAxis,ie=y?-C[j]/2+ee+ne+B+E.mainAxis:I+ne+B+E.mainAxis,ae=t.elements.arrow&&rU(t.elements.arrow),oe=ae?b===`y`?ae.clientTop||0:ae.clientLeft||0:0,V=D?.[b]??0,se=M+re-V-oe,H=M+ie-V,ce=aU(p?WH(N,se):N,M,p?UH(P,H):P);S[b]=ce,O[b]=ce-M}if(s){var le=b===`x`?`top`:CH,U=b===`x`?xH:SH,ue=S[x],de=x===`y`?`height`:`width`,fe=ue+g[le],pe=ue-g[U],me=[`top`,CH].indexOf(_)!==-1,he=D?.[x]??0,ge=me?fe:ue-C[de]-w[de]-he+E.altAxis,_e=me?ue+C[de]+w[de]-he-E.altAxis:pe,ve=p&&me?oU(ge,ue,_e):aU(p?ge:fe,ue,p?_e:pe);S[x]=ve,O[x]=ve-ue}t.modifiersData[r]=O}}var nW={name:`preventOverflow`,enabled:!0,phase:`main`,fn:tW,requiresIfExists:[`offset`]};function rW(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function iW(e){return e===FH(e)||!LH(e)?DU(e):rW(e)}function aW(e){var t=e.getBoundingClientRect(),n=GH(t.width)/e.offsetWidth||1,r=GH(t.height)/e.offsetHeight||1;return n!==1||r!==1}function oW(e,t,n){n===void 0&&(n=!1);var r=LH(t),i=LH(t)&&aW(t),a=$H(t),o=JH(e,i,n),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((PH(t)!==`body`||jU(a))&&(s=iW(t)),LH(t)?(c=JH(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):a&&(c.x=OU(a))),{x:o.left+s.scrollLeft-c.x,y:o.top+s.scrollTop-c.y,width:o.width,height:o.height}}function sW(e){var t=new Map,n=new Set,r=[];e.forEach(function(e){t.set(e.name,e)});function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}}),r.push(e)}return e.forEach(function(e){n.has(e.name)||i(e)}),r}function cW(e){var t=sW(e);return NH.reduce(function(e,n){return e.concat(t.filter(function(e){return e.phase===n}))},[])}function lW(e){var t;return function(){return t||=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})}),t}}function uW(e){var t=e.reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{});return Object.keys(t).map(function(e){return t[e]})}var dW={placement:`bottom`,modifiers:[],strategy:`absolute`};function fW(){return![...arguments].some(function(e){return!(e&&typeof e.getBoundingClientRect==`function`)})}function pW(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,a=i===void 0?dW:i;return function(e,t,n){n===void 0&&(n=a);var i={placement:`bottom`,orderedModifiers:[],options:Object.assign({},dW,a),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},o=[],s=!1,c={state:i,setOptions:function(n){var o=typeof n==`function`?n(i.options):n;u(),i.options=Object.assign({},a,i.options,o),i.scrollParents={reference:IH(e)?NU(e):e.contextElement?NU(e.contextElement):[],popper:NU(t)};var s=cW(uW([].concat(r,i.options.modifiers)));return i.orderedModifiers=s.filter(function(e){return e.enabled}),l(),c.update()},forceUpdate:function(){if(!s){var e=i.elements,t=e.reference,n=e.popper;if(fW(t,n)){i.rects={reference:oW(t,rU(n),i.options.strategy===`fixed`),popper:YH(n)},i.reset=!1,i.placement=i.options.placement,i.orderedModifiers.forEach(function(e){return i.modifiersData[e.name]=Object.assign({},e.data)});for(var r=0;r<i.orderedModifiers.length;r++)if(i.reset===!0)i.reset=!1,r=-1;else{var a=i.orderedModifiers[r],o=a.fn,l=a.options,u=l===void 0?{}:l,d=a.name;typeof o==`function`&&(i=o({state:i,options:u,name:d,instance:c})||i)}}}},update:lW(function(){return new Promise(function(e){c.forceUpdate(),e(i)})}),destroy:function(){u(),s=!0}};if(!fW(e,t))return c;c.setOptions(n).then(function(e){!s&&n.onFirstUpdate&&n.onFirstUpdate(e)});function l(){i.orderedModifiers.forEach(function(e){var t=e.name,n=e.options,r=n===void 0?{}:n,a=e.effect;if(typeof a==`function`){var s=a({state:i,name:t,instance:c,options:r});o.push(s||function(){})}})}function u(){o.forEach(function(e){return e()}),o=[]}return c}}var mW=pW({defaultModifiers:[SU,$U,yU,VH,ZU,WU,nW,pU,JU]}),hW=`tippy-box`,gW=`tippy-content`,_W=`tippy-backdrop`,vW=`tippy-arrow`,yW=`tippy-svg-arrow`,bW={passive:!0,capture:!0},xW=function(){return document.body};function SW(e,t,n){return Array.isArray(e)?e[t]??(Array.isArray(n)?n[t]:n):e}function CW(e,t){var n={}.toString.call(e);return n.indexOf(`[object`)===0&&n.indexOf(t+`]`)>-1}function wW(e,t){return typeof e==`function`?e.apply(void 0,t):e}function TW(e,t){if(t===0)return e;var n;return function(r){clearTimeout(n),n=setTimeout(function(){e(r)},t)}}function EW(e,t){var n=Object.assign({},e);return t.forEach(function(e){delete n[e]}),n}function DW(e){return e.split(/\s+/).filter(Boolean)}function OW(e){return[].concat(e)}function kW(e,t){e.indexOf(t)===-1&&e.push(t)}function AW(e){return e.filter(function(t,n){return e.indexOf(t)===n})}function jW(e){return e.split(`-`)[0]}function MW(e){return[].slice.call(e)}function NW(e){return Object.keys(e).reduce(function(t,n){return e[n]!==void 0&&(t[n]=e[n]),t},{})}function PW(){return document.createElement(`div`)}function FW(e){return[`Element`,`Fragment`].some(function(t){return CW(e,t)})}function IW(e){return CW(e,`NodeList`)}function LW(e){return CW(e,`MouseEvent`)}function RW(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function zW(e){return FW(e)?[e]:IW(e)?MW(e):Array.isArray(e)?e:MW(document.querySelectorAll(e))}function BW(e,t){e.forEach(function(e){e&&(e.style.transitionDuration=t+`ms`)})}function VW(e,t){e.forEach(function(e){e&&e.setAttribute(`data-state`,t)})}function HW(e){var t,n=OW(e)[0];return n!=null&&(t=n.ownerDocument)!=null&&t.body?n.ownerDocument:document}function UW(e,t){var n=t.clientX,r=t.clientY;return e.every(function(e){var t=e.popperRect,i=e.popperState,a=e.props.interactiveBorder,o=jW(i.placement),s=i.modifiersData.offset;if(!s)return!0;var c=o===`bottom`?s.top.y:0,l=o===`top`?s.bottom.y:0,u=o===`right`?s.left.x:0,d=o===`left`?s.right.x:0,f=t.top-r+c>a,p=r-t.bottom-l>a,m=t.left-n+u>a,h=n-t.right-d>a;return f||p||m||h})}function WW(e,t,n){var r=t+`EventListener`;[`transitionend`,`webkitTransitionEnd`].forEach(function(t){e[r](t,n)})}function GW(e,t){for(var n=t;n;){if(e.contains(n))return!0;n=n.getRootNode==null?void 0:n.getRootNode()?.host}return!1}var KW={isTouch:!1},qW=0;function JW(){KW.isTouch||(KW.isTouch=!0,window.performance&&document.addEventListener(`mousemove`,YW))}function YW(){var e=performance.now();e-qW<20&&(KW.isTouch=!1,document.removeEventListener(`mousemove`,YW)),qW=e}function XW(){var e=document.activeElement;if(RW(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function ZW(){document.addEventListener(`touchstart`,JW,bW),window.addEventListener(`blur`,XW)}var QW=typeof window<`u`&&typeof document<`u`&&!!window.msCrypto,$W=Object.assign({appendTo:xW,aria:{content:`auto`,expanded:`auto`},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:``,offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:`top`,plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:`mouseenter focus`,triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{allowHTML:!1,animation:`fade`,arrow:!0,content:``,inertia:!1,maxWidth:350,role:`tooltip`,theme:``,zIndex:9999}),eG=Object.keys($W),tG=function(e){Object.keys(e).forEach(function(t){$W[t]=e[t]})};function nG(e){var t=(e.plugins||[]).reduce(function(t,n){var r=n.name,i=n.defaultValue;return r&&(t[r]=e[r]===void 0?$W[r]??i:e[r]),t},{});return Object.assign({},e,t)}function rG(e,t){return(t?Object.keys(nG(Object.assign({},$W,{plugins:t}))):eG).reduce(function(t,n){var r=(e.getAttribute(`data-tippy-`+n)||``).trim();if(!r)return t;if(n===`content`)t[n]=r;else try{t[n]=JSON.parse(r)}catch{t[n]=r}return t},{})}function iG(e,t){var n=Object.assign({},t,{content:wW(t.content,[e])},t.ignoreAttributes?{}:rG(e,t.plugins));return n.aria=Object.assign({},$W.aria,n.aria),n.aria={expanded:n.aria.expanded===`auto`?t.interactive:n.aria.expanded,content:n.aria.content===`auto`?t.interactive?null:`describedby`:n.aria.content},n}var aG=function(){return`innerHTML`};function oG(e,t){e[aG()]=t}function sG(e){var t=PW();return e===!0?t.className=vW:(t.className=yW,FW(e)?t.appendChild(e):oG(t,e)),t}function cG(e,t){FW(t.content)?(oG(e,``),e.appendChild(t.content)):typeof t.content!=`function`&&(t.allowHTML?oG(e,t.content):e.textContent=t.content)}function lG(e){var t=e.firstElementChild,n=MW(t.children);return{box:t,content:n.find(function(e){return e.classList.contains(gW)}),arrow:n.find(function(e){return e.classList.contains(vW)||e.classList.contains(yW)}),backdrop:n.find(function(e){return e.classList.contains(_W)})}}function uG(e){var t=PW(),n=PW();n.className=hW,n.setAttribute(`data-state`,`hidden`),n.setAttribute(`tabindex`,`-1`);var r=PW();r.className=gW,r.setAttribute(`data-state`,`hidden`),cG(r,e.props),t.appendChild(n),n.appendChild(r),i(e.props,e.props);function i(n,r){var i=lG(t),a=i.box,o=i.content,s=i.arrow;r.theme?a.setAttribute(`data-theme`,r.theme):a.removeAttribute(`data-theme`),typeof r.animation==`string`?a.setAttribute(`data-animation`,r.animation):a.removeAttribute(`data-animation`),r.inertia?a.setAttribute(`data-inertia`,``):a.removeAttribute(`data-inertia`),a.style.maxWidth=typeof r.maxWidth==`number`?r.maxWidth+`px`:r.maxWidth,r.role?a.setAttribute(`role`,r.role):a.removeAttribute(`role`),(n.content!==r.content||n.allowHTML!==r.allowHTML)&&cG(o,e.props),r.arrow?s?n.arrow!==r.arrow&&(a.removeChild(s),a.appendChild(sG(r.arrow))):a.appendChild(sG(r.arrow)):s&&a.removeChild(s)}return{popper:t,onUpdate:i}}uG.$$tippy=!0;var dG=1,fG=[],pG=[];function mG(e,t){var n=iG(e,Object.assign({},$W,nG(NW(t)))),r,i,a,o=!1,s=!1,c=!1,l=!1,u,d,f,p=[],m=TW(se,n.interactiveDebounce),h,g=dG++,_=null,v=AW(n.plugins),y={id:g,reference:e,popper:PW(),popperInstance:_,props:n,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:v,clearDelayTimeouts:_e,setProps:ve,setContent:ye,show:be,hide:xe,hideWithInteractivity:W,enable:he,disable:ge,unmount:Se,destroy:Ce};if(!n.render)return y;var b=n.render(y),x=b.popper,S=b.onUpdate;x.setAttribute(`data-tippy-root`,``),x.id=`tippy-`+y.id,y.popper=x,e._tippy=y,x._tippy=y;var C=v.map(function(e){return e.fn(y)}),w=e.hasAttribute(`aria-expanded`);return ae(),ee(),M(),N(`onCreate`,[y]),n.showOnCreate&&pe(),x.addEventListener(`mouseenter`,function(){y.props.interactive&&y.state.isVisible&&y.clearDelayTimeouts()}),x.addEventListener(`mouseleave`,function(){y.props.interactive&&y.props.trigger.indexOf(`mouseenter`)>=0&&k().addEventListener(`mousemove`,m)}),y;function T(){var e=y.props.touch;return Array.isArray(e)?e:[e,0]}function E(){return T()[0]===`hold`}function D(){var e;return!!((e=y.props.render)!=null&&e.$$tippy)}function O(){return h||e}function k(){var e=O().parentNode;return e?HW(e):document}function A(){return lG(x)}function j(e){return y.state.isMounted&&!y.state.isVisible||KW.isTouch||u&&u.type===`focus`?0:SW(y.props.delay,+!e,$W.delay)}function M(e){e===void 0&&(e=!1),x.style.pointerEvents=y.props.interactive&&!e?``:`none`,x.style.zIndex=``+y.props.zIndex}function N(e,t,n){if(n===void 0&&(n=!0),C.forEach(function(n){n[e]&&n[e].apply(n,t)}),n){var r;(r=y.props)[e].apply(r,t)}}function P(){var t=y.props.aria;if(t.content){var n=`aria-`+t.content,r=x.id;OW(y.props.triggerTarget||e).forEach(function(e){var t=e.getAttribute(n);if(y.state.isVisible)e.setAttribute(n,t?t+` `+r:r);else{var i=t&&t.replace(r,``).trim();i?e.setAttribute(n,i):e.removeAttribute(n)}})}}function ee(){!w&&y.props.aria.expanded&&OW(y.props.triggerTarget||e).forEach(function(e){y.props.interactive?e.setAttribute(`aria-expanded`,y.state.isVisible&&e===O()?`true`:`false`):e.removeAttribute(`aria-expanded`)})}function F(){k().removeEventListener(`mousemove`,m),fG=fG.filter(function(e){return e!==m})}function I(t){if(!KW.isTouch||!c&&t.type!==`mousedown`){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!(y.props.interactive&&GW(x,n))){if(OW(y.props.triggerTarget||e).some(function(e){return GW(e,n)})){if(KW.isTouch||y.state.isVisible&&y.props.trigger.indexOf(`click`)>=0)return}else N(`onClickOutside`,[y,t]);y.props.hideOnClick===!0&&(y.clearDelayTimeouts(),y.hide(),s=!0,setTimeout(function(){s=!1}),y.state.isMounted||z())}}}function L(){c=!0}function te(){c=!1}function R(){var e=k();e.addEventListener(`mousedown`,I,!0),e.addEventListener(`touchend`,I,bW),e.addEventListener(`touchstart`,te,bW),e.addEventListener(`touchmove`,L,bW)}function z(){var e=k();e.removeEventListener(`mousedown`,I,!0),e.removeEventListener(`touchend`,I,bW),e.removeEventListener(`touchstart`,te,bW),e.removeEventListener(`touchmove`,L,bW)}function B(e,t){re(e,function(){!y.state.isVisible&&x.parentNode&&x.parentNode.contains(x)&&t()})}function ne(e,t){re(e,t)}function re(e,t){var n=A().box;function r(e){e.target===n&&(WW(n,`remove`,r),t())}if(e===0)return t();WW(n,`remove`,d),WW(n,`add`,r),d=r}function ie(t,n,r){r===void 0&&(r=!1),OW(y.props.triggerTarget||e).forEach(function(e){e.addEventListener(t,n,r),p.push({node:e,eventType:t,handler:n,options:r})})}function ae(){E()&&(ie(`touchstart`,V,{passive:!0}),ie(`touchend`,H,{passive:!0})),DW(y.props.trigger).forEach(function(e){if(e!==`manual`)switch(ie(e,V),e){case`mouseenter`:ie(`mouseleave`,H);break;case`focus`:ie(QW?`focusout`:`blur`,ce);break;case`focusin`:ie(`focusout`,ce)}})}function oe(){p.forEach(function(e){var t=e.node,n=e.eventType,r=e.handler,i=e.options;t.removeEventListener(n,r,i)}),p=[]}function V(e){var t=!1;if(!(!y.state.isEnabled||le(e)||s)){var n=u?.type===`focus`;u=e,h=e.currentTarget,ee(),!y.state.isVisible&&LW(e)&&fG.forEach(function(t){return t(e)}),e.type===`click`&&(y.props.trigger.indexOf(`mouseenter`)<0||o)&&y.props.hideOnClick!==!1&&y.state.isVisible?t=!0:pe(e),e.type===`click`&&(o=!t),t&&!n&&me(e)}}function se(e){var t=e.target,r=O().contains(t)||x.contains(t);e.type===`mousemove`&&r||UW(fe().concat(x).map(function(e){var t=e._tippy.popperInstance?.state;return t?{popperRect:e.getBoundingClientRect(),popperState:t,props:n}:null}).filter(Boolean),e)&&(F(),me(e))}function H(e){le(e)||y.props.trigger.indexOf(`click`)>=0&&o||(y.props.interactive?y.hideWithInteractivity(e):me(e))}function ce(e){y.props.trigger.indexOf(`focusin`)<0&&e.target!==O()||y.props.interactive&&e.relatedTarget&&x.contains(e.relatedTarget)||me(e)}function le(e){return KW.isTouch?E()!==e.type.indexOf(`touch`)>=0:!1}function U(){ue();var t=y.props,n=t.popperOptions,r=t.placement,i=t.offset,a=t.getReferenceClientRect,o=t.moveTransition,s=D()?lG(x).arrow:null,c=a?{getBoundingClientRect:a,contextElement:a.contextElement||O()}:e,l=[{name:`offset`,options:{offset:i}},{name:`preventOverflow`,options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:`flip`,options:{padding:5}},{name:`computeStyles`,options:{adaptive:!o}},{name:`$$tippy`,enabled:!0,phase:`beforeWrite`,requires:[`computeStyles`],fn:function(e){var t=e.state;if(D()){var n=A().box;[`placement`,`reference-hidden`,`escaped`].forEach(function(e){e===`placement`?n.setAttribute(`data-placement`,t.placement):t.attributes.popper[`data-popper-`+e]?n.setAttribute(`data-`+e,``):n.removeAttribute(`data-`+e)}),t.attributes.popper={}}}}];D()&&s&&l.push({name:`arrow`,options:{element:s,padding:3}}),l.push.apply(l,n?.modifiers||[]),y.popperInstance=mW(c,x,Object.assign({},n,{placement:r,onFirstUpdate:f,modifiers:l}))}function ue(){y.popperInstance&&=(y.popperInstance.destroy(),null)}function de(){var e=y.props.appendTo,t,n=O();t=y.props.interactive&&e===xW||e===`parent`?n.parentNode:wW(e,[n]),t.contains(x)||t.appendChild(x),y.state.isMounted=!0,U()}function fe(){return MW(x.querySelectorAll(`[data-tippy-root]`))}function pe(e){y.clearDelayTimeouts(),e&&N(`onTrigger`,[y,e]),R();var t=j(!0),n=T(),i=n[0],a=n[1];KW.isTouch&&i===`hold`&&a&&(t=a),t?r=setTimeout(function(){y.show()},t):y.show()}function me(e){if(y.clearDelayTimeouts(),N(`onUntrigger`,[y,e]),!y.state.isVisible)z();else if(!(y.props.trigger.indexOf(`mouseenter`)>=0&&y.props.trigger.indexOf(`click`)>=0&&[`mouseleave`,`mousemove`].indexOf(e.type)>=0&&o)){var t=j(!1);t?i=setTimeout(function(){y.state.isVisible&&y.hide()},t):a=requestAnimationFrame(function(){y.hide()})}}function he(){y.state.isEnabled=!0}function ge(){y.hide(),y.state.isEnabled=!1}function _e(){clearTimeout(r),clearTimeout(i),cancelAnimationFrame(a)}function ve(t){if(!y.state.isDestroyed){N(`onBeforeUpdate`,[y,t]),oe();var n=y.props,r=iG(e,Object.assign({},n,NW(t),{ignoreAttributes:!0}));y.props=r,ae(),n.interactiveDebounce!==r.interactiveDebounce&&(F(),m=TW(se,r.interactiveDebounce)),n.triggerTarget&&!r.triggerTarget?OW(n.triggerTarget).forEach(function(e){e.removeAttribute(`aria-expanded`)}):r.triggerTarget&&e.removeAttribute(`aria-expanded`),ee(),M(),S&&S(n,r),y.popperInstance&&(U(),fe().forEach(function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})),N(`onAfterUpdate`,[y,t])}}function ye(e){y.setProps({content:e})}function be(){var e=y.state.isVisible,t=y.state.isDestroyed,n=!y.state.isEnabled,r=KW.isTouch&&!y.props.touch,i=SW(y.props.duration,0,$W.duration);if(!(e||t||n||r)&&!O().hasAttribute(`disabled`)&&(N(`onShow`,[y],!1),y.props.onShow(y)!==!1)){if(y.state.isVisible=!0,D()&&(x.style.visibility=`visible`),M(),R(),y.state.isMounted||(x.style.transition=`none`),D()){var a=A(),o=a.box,s=a.content;BW([o,s],0)}f=function(){var e;if(y.state.isVisible&&!l){if(l=!0,x.offsetHeight,x.style.transition=y.props.moveTransition,D()&&y.props.animation){var t=A(),n=t.box,r=t.content;BW([n,r],i),VW([n,r],`visible`)}P(),ee(),kW(pG,y),(e=y.popperInstance)==null||e.forceUpdate(),N(`onMount`,[y]),y.props.animation&&D()&&ne(i,function(){y.state.isShown=!0,N(`onShown`,[y])})}},de()}}function xe(){var e=!y.state.isVisible,t=y.state.isDestroyed,n=!y.state.isEnabled,r=SW(y.props.duration,1,$W.duration);if(!(e||t||n)&&(N(`onHide`,[y],!1),y.props.onHide(y)!==!1)){if(y.state.isVisible=!1,y.state.isShown=!1,l=!1,o=!1,D()&&(x.style.visibility=`hidden`),F(),z(),M(!0),D()){var i=A(),a=i.box,s=i.content;y.props.animation&&(BW([a,s],r),VW([a,s],`hidden`))}P(),ee(),y.props.animation?D()&&B(r,y.unmount):y.unmount()}}function W(e){k().addEventListener(`mousemove`,m),kW(fG,m),m(e)}function Se(){y.state.isVisible&&y.hide(),y.state.isMounted&&(ue(),fe().forEach(function(e){e._tippy.unmount()}),x.parentNode&&x.parentNode.removeChild(x),pG=pG.filter(function(e){return e!==y}),y.state.isMounted=!1,N(`onHidden`,[y]))}function Ce(){y.state.isDestroyed||(y.clearDelayTimeouts(),y.unmount(),oe(),delete e._tippy,y.state.isDestroyed=!0,N(`onDestroy`,[y]))}}function hG(e,t){t===void 0&&(t={});var n=$W.plugins.concat(t.plugins||[]);ZW();var r=Object.assign({},t,{plugins:n}),i=zW(e).reduce(function(e,t){var n=t&&mG(t,r);return n&&e.push(n),e},[]);return FW(e)?i[0]:i}hG.defaultProps=$W,hG.setDefaultProps=tG,hG.currentInput=KW;var gG=function(e){var t=e===void 0?{}:e,n=t.exclude,r=t.duration;pG.forEach(function(e){var t=!1;if(n&&(t=RW(n)?e.reference===n:e.popper===n.popper),!t){var i=e.props.duration;e.setProps({duration:r}),e.hide(),e.state.isDestroyed||e.setProps({duration:i})}})};Object.assign({},VH,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:`0`,top:`0`,margin:`0`},arrow:{position:`absolute`},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}});var _G={mouseover:`mouseenter`,focusin:`focus`,click:`click`};function vG(e,t){var n=[],r=[],i=!1,a=t.target,o=EW(t,[`target`]),s=Object.assign({},o,{trigger:`manual`,touch:!1}),c=Object.assign({touch:$W.touch},o,{showOnCreate:!0}),l=hG(e,s),u=OW(l);function d(e){if(e.target&&!i){var n=e.target.closest(a);if(n){var o=n.getAttribute(`data-tippy-trigger`)||t.trigger||$W.trigger;if(!n._tippy&&(e.type!==`touchstart`||typeof c.touch!=`boolean`)&&!(e.type!==`touchstart`&&o.indexOf(_G[e.type])<0)){var s=hG(n,c);s&&(r=r.concat(s))}}}}function f(e,t,r,i){i===void 0&&(i=!1),e.addEventListener(t,r,i),n.push({node:e,eventType:t,handler:r,options:i})}function p(e){var t=e.reference;f(t,`touchstart`,d,bW),f(t,`mouseover`,d),f(t,`focusin`,d),f(t,`click`,d)}function m(){n.forEach(function(e){var t=e.node,n=e.eventType,r=e.handler,i=e.options;t.removeEventListener(n,r,i)}),n=[]}function h(e){var t=e.destroy,n=e.enable,a=e.disable;e.destroy=function(e){e===void 0&&(e=!0),e&&r.forEach(function(e){e.destroy()}),r=[],m(),t()},e.enable=function(){n(),r.forEach(function(e){return e.enable()}),i=!1},e.disable=function(){a(),r.forEach(function(e){return e.disable()}),i=!0},p(e)}return u.forEach(h),l}hG.setDefaultProps({render:uG});var yG={questions:{title:`Open questions`,lead:`A question the AI could not settle, and the sentence it is about. A must-answer question keeps a check from being generated until you answer.`,steps:[`Keep what the case says: the question block disappears and the case keeps that text.`,`Or write your own answer: it replaces the text where they disagree, and the AI folds it in on its next run.`,`Click the sentence, or the question, to open it in the case file, where it flashes. Nothing else in the row jumps.`,`Red means the question blocks generation; amber means the case text is used as it is until you change it.`,`One claim carries one signal: a question never also has a "to confirm" marker on its sentence. Use a question when someone has to decide, a marker when nobody does.`]},steps:{title:`Steps`,lead:`The steps of the case, in order. Edit a sentence here, tag a step so the tools know what it does, and keep the record of a step that a person did.`,steps:["`input`: a person does this step (a choice, an item that already exists).","`writes`: the step creates, changes or deletes data of the test account.","`email`: the step sends email (never in production).","A `[T1]` in the sentence or in a ready signal becomes a chip: click it to open the card of that target.","`- Ready when: ...` under the step: the signal that what the step loads is really there. The test waits for it before it looks.","`- Recipe (phase): ...` under the step: what the person did during an attended exploration. A step tagged input or writes needs one; generating the spec stops without it.",`Adding, deleting and renumbering steps is done in the source; recipes and questions move with their step.`]},values:{title:`Values`,lead:`The values the test checks, one column per profile. They live in the case document, never in the profile settings.`,steps:["`default` applies to every profile; a profile column overrides it key by key.","An empty cell shows the grey `default:` value; clearing a cell removes the key from that profile.","An empty or `TODO` value makes the test refuse to run; an unknown profile fails pnpm case:check."]},inputs:{title:`Inputs (old format)`,lead:"An old section of the case document. A step’s recipe now lives under that step as `- Recipe (phase): ...`, so the step number is not a key to another section anymore.",steps:["Move each `- Step <n> ...` line under step n as `- Recipe ...`.","A line without `Step <n>` is a free note: move it to `## Notes` if it still matters.",`This block stays editable until it is empty; new cases do not get it.`]},markers:{title:`To confirm`,lead:`A line the AI saw on a page and a person has not settled. Only the ones that change an assertion need you: a wrong wording there would pass silently. The rest are notes the run checks by itself.`,steps:[`Read the reason under the line ("why it needs you") and the screenshot when there is one: the exploration took it, so you do not have to open the page again.`,`Right: click Confirmed, or use "Confirm all" in the section header (one undo step).`,`Wrong: fix the sentence in the source first, then remove the marker.`,`They do not block generating a spec. Healing stops until they are settled.`]},settings:{title:`Case settings`,lead:`What the case is called, who logs in, where it runs, which suites run it, and where it may write data.`,steps:["`title`: one line, shown in the case list.","`login`: required for a signed-in case; none for a public page (no saved session).","`envs`: press the environments the case runs in; all pressed means every environment, including new ones.","`suites`: every suite that runs this case; a case runs in all of them. Type a name, then comma or Enter adds it as a tag.","`writes`: environments where the case may create or change data. It then needs a `writes-note` that says what it touches.",`The id is the file path: rename the case with the pencil next to its file name.`]},goal:{title:`Goal`,lead:`Why the case exists, in one or two sentences. The tools read it for context; it is not a check.`,steps:[`Read-only here: click a paragraph to jump to that line of the source and edit it there.`]},expected:{title:`Expected`,lead:`What must hold for every profile. The spec turns each bullet into an assertion or a step check.`,steps:[`Drag the handle (or Space and the arrow keys) to reorder; the order is the order of the case.`,`A bullet with an open question keeps that question until it is answered in Open questions.`,`Deleting a bullet deletes the question blocks that hang under it (you are asked first).`]},rules:{title:`Rules`,lead:`Instructions for the AI on how to run this case: a page quirk, a mandatory read-only preparation, a control to avoid. They never say what the case proves.`,steps:["One bullet per rule; start it with `Step 3:`, `Before step 3:` or `After step 3:` to tie it to a step.",`Expectations, values and targets stay in their own sections: a rule that states one is moved there.`,`A rule never allows writing data, sending email or doing a person's step; those stay tagged steps with a recipe.`,`The AI re-checks the rules on every exploration and never deletes one silently.`]},visual:{title:`Visual checks`,lead:"What is compared to a screenshot baseline. Each bullet names a target card as `[T1]`; click the card name to see what the check looks at.",steps:["A bullet without `[Tn]`, or with an id that has no card, is marked in red and `pnpm case:check` warns.",`The order and drag behaviour are the same as in Expected.`]},targets:{title:`Targets`,lead:`One card per image, logo, icon, file, PDF or repeated text that a check looks at: what it is, where it is, how it is found, and what proves that it has loaded.`,steps:[`Click a target name next to a step or a check, or a card here, to open it in a window.`,`Each reference screenshot is under the card; click one for the full size.`,`Amber means the card is not ready: a required field is empty, or an open question still blocks it.`,`The text is edited in the editor: the window has "Open in editor".`]},notes:{title:`Notes`,lead:`Free context for a reviewer: why the case is built this way, what it avoids, what may change.`,steps:[`Read-only here: click a paragraph to jump to that line of the source and edit it there.`]},source:{title:`Source`,lead:`The original notes the case was made from, verbatim, with what became of each line. Traceability only.`,steps:[`Read-only: never edit this table. It shows a reviewer that nothing was lost.`]}},bG={"field.id":{title:`id`,lead:"The path of the case file below `cases/`, without `.md`. Runs, specs and reports use it as the identity.",steps:[]},"field.title":{title:`title`,lead:`One line, shown in the case list and in reports. It says what the case proves, not which button it clicks.`,steps:[]},"field.login":{title:`login`,lead:"`required` signs in with the saved session of a profile before the case runs. `none` is for a public page that needs no session.",steps:[]},"field.runs-in":{title:`runs in`,lead:`The environments this case may run in. Every environment is pressed by default, including ones added to the profiles later.`,steps:[]},"field.suites":{title:`suites`,lead:`The suites that run this case; a case runs in every suite it lists. Matching names of other cases appear while you type.`,steps:[]},"field.writes":{title:`writes data in`,lead:`Environments where the case may create or change data of the test accounts. Nothing pressed means read-only: the case changes nothing.`,steps:[]},"field.writes-note":{title:`what it changes`,lead:`What the case creates or changes, in one sentence. Whoever confirms a run that writes data reads it before saying yes.`,steps:[]}},xG={...yG,...bG};function SG(e,t){t.split(/`([^`]+)`/g).forEach((t,n)=>{if(t!==``){if(n%2==1){let n=document.createElement(`code`);n.className=`rounded-sm bg-dai px-1 py-px font-mono text-[0.9em]`,n.textContent=t,e.append(n)}else e.append(document.createTextNode(t))}})}function CG(e){let t=document.createElement(`div`);t.className=`space-y-1.5`;let n=document.createElement(`p`);n.className=`text-sm font-semibold`,n.textContent=e.title;let r=document.createElement(`p`);if(r.className=`text-line-mid`,SG(r,e.lead),t.append(n,r),e.steps.length===0)return t;let i=document.createElement(`p`);i.className=`pt-0.5 font-medium`,i.textContent=`How to use it`;let a=document.createElement(`ul`);a.className=`list-disc space-y-1 pl-4`;for(let t of e.steps){let e=document.createElement(`li`);SG(e,t),a.append(e)}return t.append(i,a),t}function wG(){let[e,t]=(0,q.useState)(null);return(0,q.useEffect)(()=>{if(!e)return;let t=vG(e,{target:`[data-help]`,content:e=>CG(xG[e.getAttribute(`data-help`)??`questions`]??yG.questions),theme:`inkstone`,placement:`bottom-start`,trigger:`click`,interactive:!0,maxWidth:380,offset:[0,8],touch:!1,appendTo:()=>document.body,onShow:e=>{e.popper.querySelector(`.tippy-box`)?.setAttribute(`data-help-box`,``)}}),n=()=>gG({duration:0});return document.addEventListener(`keydown`,n,!0),()=>{document.removeEventListener(`keydown`,n,!0),(Array.isArray(t)?t:[t]).forEach(e=>e.destroy())}},[e]),t}var TG=e=>(0,J.jsx)(e,{size:14,"aria-hidden":`true`}),EG={questions:TG(Df),steps:TG(nf),values:TG(Tp),inputs:TG(Qd),markers:TG(Md),settings:TG(xp),goal:TG(Ru),expected:TG(ou),rules:TG(_p),visual:TG(gd),targets:TG(ed),notes:TG(Od),source:TG(Il)};function DG({text:e}){return(0,J.jsx)(qE,{remarkPlugins:[mA],allowedElements:[`p`,`code`,`strong`,`em`,`del`,`a`,`br`],unwrapDisallowed:!0,components:{p:({children:e})=>(0,J.jsx)(J.Fragment,{children:e}),code:({children:e})=>(0,J.jsx)(`code`,{className:`rounded-sm bg-warm px-1 py-px font-mono text-[0.9em] text-ink ring-1 ring-line-mid ring-inset`,children:e}),a:({href:e,children:t})=>(0,J.jsx)(`a`,{href:e,target:`_blank`,rel:`noreferrer`,className:`text-theme-ink underline`,children:t})},children:e})}function OG({help:e}){return(0,J.jsx)(`button`,{type:`button`,"data-help":e,"aria-label":`About ${yG[e].title}`,className:`rounded p-0.5 text-ink-3 transition-colors hover:bg-line hover:text-ink-2 focus-visible:ring-2 focus-visible:ring-theme/40 focus-visible:outline-none`,children:(0,J.jsx)(Bd,{size:14,"aria-hidden":`true`})})}function kG({help:e}){return(0,J.jsx)(`button`,{type:`button`,"data-help":e,"aria-label":`About ${bG[e].title}`,className:`-my-0.5 shrink-0 rounded p-0.5 text-ink-3 transition-colors hover:bg-line hover:text-ink-2 focus-visible:ring-2 focus-visible:ring-theme/40 focus-visible:outline-none`,children:(0,J.jsx)(Bd,{size:12,"aria-hidden":`true`})})}function AG({title:e,count:t,tone:n=`gray`,help:r,storage:i,defaultOpen:a=!0,children:o}){let[s,c]=Jp(`asrun-ui.panel.${i??r}`,a,Xp);return(0,J.jsxs)(`section`,{className:`card-panel overflow-hidden`,children:[(0,J.jsxs)(`header`,{className:`flex flex-wrap items-center gap-1.5 border-b border-line bg-warm px-2 py-1.5`,children:[(0,J.jsxs)(`button`,{type:`button`,"aria-expanded":s,title:s?`Collapse this section`:`Expand this section`,onClick:()=>c(!s),className:`flex items-center gap-1 rounded px-1 py-0.5 text-left transition-colors hover:bg-line focus-visible:ring-2 focus-visible:ring-theme/40 focus-visible:outline-none`,children:[s?(0,J.jsx)(mu,{size:14,className:`shrink-0 text-ink-3`,"aria-hidden":`true`}):(0,J.jsx)(Su,{size:14,className:`shrink-0 text-ink-3`,"aria-hidden":`true`}),(0,J.jsx)(`span`,{className:`shrink-0 text-ink-3`,children:EG[r]}),(0,J.jsx)(`h3`,{className:`font-serif text-sm tracking-wide text-ink`,children:e})]}),(0,J.jsx)(OG,{help:r}),t===void 0?null:(0,J.jsx)(Ny,{tone:n,children:t})]}),(0,J.jsx)($p,{open:s,children:o})]})}var jG=({text:e})=>(0,J.jsx)(`p`,{className:`px-3 py-2 text-sm text-ink-3`,children:e}),MG=class e{static create(t,n,r,i,a){let o=i+(i<<8)+t+(n<<4)|0;return new e(t,n,r,o,a,[],[])}constructor(e,t,n,r,i,a,o){this.type=e,this.value=t,this.from=n,this.hash=r,this.end=i,this.children=a,this.positions=o,this.blankFirstLine=!1,this.hashProp=[[I.contextHash,r]]}addChild(e,t){e.prop(I.contextHash)!=this.hash&&(e=new v(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(t)}toTree(e,t=this.end){let n=this.children.length-1;return n>=0&&(t=Math.max(t,this.positions[n]+this.children[n].length+this.from)),new v(e.types[this.type],this.children,this.positions,t-this.from).balance({makeTree:(e,t,n)=>new v(F.none,e,t,n,this.hashProp)})}},NG;(function(e){e[e.Document=1]=`Document`,e[e.CodeBlock=2]=`CodeBlock`,e[e.FencedCode=3]=`FencedCode`,e[e.Blockquote=4]=`Blockquote`,e[e.HorizontalRule=5]=`HorizontalRule`,e[e.BulletList=6]=`BulletList`,e[e.OrderedList=7]=`OrderedList`,e[e.ListItem=8]=`ListItem`,e[e.ATXHeading1=9]=`ATXHeading1`,e[e.ATXHeading2=10]=`ATXHeading2`,e[e.ATXHeading3=11]=`ATXHeading3`,e[e.ATXHeading4=12]=`ATXHeading4`,e[e.ATXHeading5=13]=`ATXHeading5`,e[e.ATXHeading6=14]=`ATXHeading6`,e[e.SetextHeading1=15]=`SetextHeading1`,e[e.SetextHeading2=16]=`SetextHeading2`,e[e.HTMLBlock=17]=`HTMLBlock`,e[e.LinkReference=18]=`LinkReference`,e[e.Paragraph=19]=`Paragraph`,e[e.CommentBlock=20]=`CommentBlock`,e[e.ProcessingInstructionBlock=21]=`ProcessingInstructionBlock`,e[e.Escape=22]=`Escape`,e[e.Entity=23]=`Entity`,e[e.HardBreak=24]=`HardBreak`,e[e.Emphasis=25]=`Emphasis`,e[e.StrongEmphasis=26]=`StrongEmphasis`,e[e.Link=27]=`Link`,e[e.Image=28]=`Image`,e[e.InlineCode=29]=`InlineCode`,e[e.HTMLTag=30]=`HTMLTag`,e[e.Comment=31]=`Comment`,e[e.ProcessingInstruction=32]=`ProcessingInstruction`,e[e.Autolink=33]=`Autolink`,e[e.HeaderMark=34]=`HeaderMark`,e[e.QuoteMark=35]=`QuoteMark`,e[e.ListMark=36]=`ListMark`,e[e.LinkMark=37]=`LinkMark`,e[e.EmphasisMark=38]=`EmphasisMark`,e[e.CodeMark=39]=`CodeMark`,e[e.CodeText=40]=`CodeText`,e[e.CodeInfo=41]=`CodeInfo`,e[e.LinkTitle=42]=`LinkTitle`,e[e.LinkLabel=43]=`LinkLabel`,e[e.URL=44]=`URL`})(NG||={});var PG=class{constructor(e,t){this.start=e,this.content=t,this.marks=[],this.parsers=[]}},FG=class{constructor(){this.text=``,this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return zG(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,t=0,n=0){for(let r=t;r<e;r++)n+=this.text.charCodeAt(r)==9?4-n%4:1;return n}findColumn(e){let t=0;for(let n=0;t<this.text.length&&n<e;t++)n+=this.text.charCodeAt(t)==9?4-n%4:1;return t}scrub(){if(!this.baseIndent)return this.text;let e=``;for(let t=0;t<this.basePos;t++)e+=` `;return e+this.text.slice(this.basePos)}};function IG(e,t,n){if(n.pos==n.text.length||e!=t.block&&n.indent>=t.stack[n.depth+1].value+n.baseIndent)return!0;if(n.indent>=n.baseIndent+4)return!1;let r=(e.type==NG.OrderedList?KG:GG)(n,t,!1);return r>0&&(e.type!=NG.BulletList||UG(n,t,!1)<0)&&n.text.charCodeAt(n.pos+r-1)==e.value}var LG={[NG.Blockquote](e,t,n){return n.next==62&&(n.markers.push(bK(NG.QuoteMark,t.lineStart+n.pos,t.lineStart+n.pos+1)),n.moveBase(n.pos+(RG(n.text.charCodeAt(n.pos+1))?2:1)),e.end=t.lineStart+n.text.length,!0)},[NG.ListItem](e,t,n){return!(n.next<0?e.blankFirstLine&&e.children.length==1:n.indent<n.baseIndent+e.value)&&(n.moveBaseColumn(n.baseIndent+e.value),!0)},[NG.OrderedList]:IG,[NG.BulletList]:IG,[NG.Document](){return!0}};function RG(e){return e==32||e==9||e==10||e==13}function zG(e,t=0){for(;t<e.length&&RG(e.charCodeAt(t));)t++;return t}function BG(e,t,n){for(;t>n&&RG(e.charCodeAt(t-1));)t--;return t}function VG(e){if(e.next!=96&&e.next!=126)return-1;let t=e.pos+1;for(;t<e.text.length&&e.text.charCodeAt(t)==e.next;)t++;if(t<e.pos+3)return-1;if(e.next==96){for(let n=t;n<e.text.length;n++)if(e.text.charCodeAt(n)==96)return-1}return t}function HG(e){return e.next==62?e.text.charCodeAt(e.pos+1)==32?2:1:-1}function UG(e,t,n){if(e.next!=42&&e.next!=45&&e.next!=95)return-1;let r=1;for(let t=e.pos+1;t<e.text.length;t++){let n=e.text.charCodeAt(t);if(n==e.next)r++;else if(!RG(n))return-1}return n&&e.next==45&&JG(e)>-1&&e.depth==t.stack.length&&t.parser.leafBlockParsers.indexOf(oK.SetextHeading)>-1||r<3?-1:1}function WG(e,t){for(let n=e.stack.length-1;n>=0;n--)if(e.stack[n].type==t)return!0;return!1}function GG(e,t,n){return(e.next==45||e.next==43||e.next==42)&&(e.pos==e.text.length-1||RG(e.text.charCodeAt(e.pos+1)))&&(!n||WG(t,NG.BulletList)||e.skipSpace(e.pos+2)<e.text.length)?1:-1}function KG(e,t,n){let r=e.pos,i=e.next;for(;i>=48&&i<=57;){if(r++,r==e.text.length)return-1;i=e.text.charCodeAt(r)}return r==e.pos||r>e.pos+9||i!=46&&i!=41||r<e.text.length-1&&!RG(e.text.charCodeAt(r+1))||n&&!WG(t,NG.OrderedList)&&(e.skipSpace(r+1)==e.text.length||r>e.pos+1||e.next!=49)?-1:r+1-e.pos}function qG(e){if(e.next!=35)return-1;let t=e.pos+1;for(;t<e.text.length&&e.text.charCodeAt(t)==35;)t++;if(t<e.text.length&&!RG(e.text.charCodeAt(t)))return-1;let n=t-e.pos;return n>6?-1:n}function JG(e){if(e.next!=45&&e.next!=61||e.indent>=e.baseIndent+4)return-1;let t=e.pos+1;for(;t<e.text.length&&e.text.charCodeAt(t)==e.next;)t++;let n=t;for(;t<e.text.length&&RG(e.text.charCodeAt(t));)t++;return t==e.text.length?n:-1}var YG=/^[ \t]*$/,XG=/-->/,ZG=/\?>/,QG=[[/^<(?:script|pre|style|textarea)(?:\s|>|$)/i,/<\/(?:script|pre|style|textarea)>/i],[/^\s*<!--/,XG],[/^\s*<\?/,ZG],[/^\s*<![A-Z]/,/>/],[/^\s*<!\[CDATA\[/,/\]\]>/],[/^\s*<\/?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i,YG],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,YG]];function $G(e,t,n){if(e.next!=60)return-1;let r=e.text.slice(e.pos);for(let e=0,t=QG.length-+!!n;e<t;e++)if(QG[e][0].test(r))return e;return-1}function eK(e,t){let n=e.countIndent(t,e.pos,e.indent),r=e.skipSpace(t),i=e.countIndent(r,t,n);return i>=n+5||r==e.text.length?n+1:i}function tK(e,t,n){let r=e.length-1;r>=0&&e[r].to==t&&e[r].type==NG.CodeText?e[r].to=n:e.push(bK(NG.CodeText,t,n))}var nK={LinkReference:void 0,IndentedCode(e,t){let n=t.baseIndent+4;if(t.indent<n)return!1;let r=t.findColumn(n),i=e.lineStart+r,a=e.lineStart+t.text.length,o=[],s=[];for(tK(o,i,a);e.nextLine()&&t.depth>=e.stack.length;)if(t.pos==t.text.length){tK(s,e.lineStart-1,e.lineStart);for(let e of t.markers)s.push(e)}else if(t.indent<n)break;else{if(s.length){for(let e of s)e.type==NG.CodeText?tK(o,e.from,e.to):o.push(e);s=[]}tK(o,e.lineStart-1,e.lineStart);for(let e of t.markers)o.push(e);a=e.lineStart+t.text.length;let n=e.lineStart+t.findColumn(t.baseIndent+4);n<a&&tK(o,n,a)}return s.length&&(s=s.filter(e=>e.type!=NG.CodeText),s.length&&(t.markers=s.concat(t.markers))),e.addNode(e.buffer.writeElements(o,-i).finish(NG.CodeBlock,a-i),i),!0},FencedCode(e,t){let n=VG(t);if(n<0)return!1;let r=e.lineStart+t.pos,i=t.next,a=n-t.pos,o=t.skipSpace(n),s=BG(t.text,t.text.length,o),c=[bK(NG.CodeMark,r,r+a)];o<s&&c.push(bK(NG.CodeInfo,e.lineStart+o,e.lineStart+s));for(let n=!0,r=!0,o=!1;e.nextLine()&&t.depth>=e.stack.length;n=!1){let s=t.pos;if(t.indent-t.baseIndent<4)for(;s<t.text.length&&t.text.charCodeAt(s)==i;)s++;if(s-t.pos>=a&&t.skipSpace(s)==t.text.length){for(let e of t.markers)c.push(e);r&&o&&tK(c,e.lineStart-1,e.lineStart),c.push(bK(NG.CodeMark,e.lineStart+t.pos,e.lineStart+s)),e.nextLine();break}{o=!0,n||(tK(c,e.lineStart-1,e.lineStart),r=!1);for(let e of t.markers)c.push(e);let i=e.lineStart+t.basePos,a=e.lineStart+t.text.length;i<a&&(tK(c,i,a),r=!1)}}return e.addNode(e.buffer.writeElements(c,-r).finish(NG.FencedCode,e.prevLineEnd()-r),r),!0},Blockquote(e,t){let n=HG(t);return n<0?!1:(e.startContext(NG.Blockquote,t.pos),e.addNode(NG.QuoteMark,e.lineStart+t.pos,e.lineStart+t.pos+1),t.moveBase(t.pos+n),null)},HorizontalRule(e,t){if(UG(t,e,!1)<0)return!1;let n=e.lineStart+t.pos;return e.nextLine(),e.addNode(NG.HorizontalRule,n),!0},BulletList(e,t){let n=GG(t,e,!1);if(n<0)return!1;e.block.type!=NG.BulletList&&e.startContext(NG.BulletList,t.basePos,t.next);let r=eK(t,t.pos+1);return e.startContext(NG.ListItem,t.basePos,r-t.baseIndent),e.addNode(NG.ListMark,e.lineStart+t.pos,e.lineStart+t.pos+n),t.moveBaseColumn(r),e.block.blankFirstLine=r>=t.text.length,null},OrderedList(e,t){let n=KG(t,e,!1);if(n<0)return!1;e.block.type!=NG.OrderedList&&e.startContext(NG.OrderedList,t.basePos,t.text.charCodeAt(t.pos+n-1));let r=eK(t,t.pos+n);return e.startContext(NG.ListItem,t.basePos,r-t.baseIndent),e.addNode(NG.ListMark,e.lineStart+t.pos,e.lineStart+t.pos+n),t.moveBaseColumn(r),e.block.blankFirstLine=r==t.text.length,null},ATXHeading(e,t){let n=qG(t);if(n<0)return!1;let r=t.pos,i=e.lineStart+r,a=BG(t.text,t.text.length,r),o=a;for(;o>r&&t.text.charCodeAt(o-1)==t.next;)o--;o!=a&&o!=r&&RG(t.text.charCodeAt(o-1))||(o=t.text.length);let s=e.buffer.write(NG.HeaderMark,0,n).writeElements(e.parser.parseInline(t.text.slice(r+n+1,o),i+n+1),-i);o<t.text.length&&s.write(NG.HeaderMark,o-r,a-r);let c=s.finish(NG.ATXHeading1-1+n,t.text.length-r);return e.nextLine(),e.addNode(c,i),!0},HTMLBlock(e,t){let n=$G(t,e,!1);if(n<0)return!1;let r=e.lineStart+t.pos,i=QG[n][1],a=[],o=i!=YG;for(;!i.test(t.text)&&e.nextLine();){if(t.depth<e.stack.length){o=!1;break}for(let e of t.markers)a.push(e)}o&&e.nextLine();let s=i==XG?NG.CommentBlock:i==ZG?NG.ProcessingInstructionBlock:NG.HTMLBlock,c=e.prevLineEnd();return e.addNode(e.buffer.writeElements(a,-r).finish(s,c-r),r),!0},SetextHeading:void 0},rK=class{constructor(e){this.stage=0,this.elts=[],this.pos=0,this.start=e.start,this.advance(e.content)}nextLine(e,t,n){if(this.stage==-1)return!1;let r=n.content+`
|
|
226
226
|
`+t.scrub(),i=this.advance(r);return i>-1&&i<r.length&&this.complete(e,n,i)}finish(e,t){return(this.stage==2||this.stage==3)&&zG(t.content,this.pos)==t.content.length&&this.complete(e,t,t.content.length)}complete(e,t,n){return e.addLeafElement(t,bK(NG.LinkReference,this.start,this.start+n,this.elts)),!0}nextStage(e){return e?(this.pos=e.to-this.start,this.elts.push(e),this.stage++,!0):(e===!1&&(this.stage=-1),!1)}advance(e){for(;;)if(this.stage==-1)return-1;else if(this.stage==0){if(!this.nextStage(MK(e,this.pos,this.start,!0)))return-1;if(e.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push(bK(NG.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage(AK(e,zG(e,this.pos),this.start)))return-1}else if(this.stage==2){let t=zG(e,this.pos),n=0;if(t>this.pos){let r=jK(e,t,this.start);if(r){let t=iK(e,r.to-this.start);t>0&&(this.nextStage(r),n=t)}}return n||=iK(e,this.pos),n>0&&n<e.length?n:-1}else return iK(e,this.pos)}};function iK(e,t){for(;t<e.length;t++){let n=e.charCodeAt(t);if(n==10)break;if(!RG(n))return-1}return t}var aK=class{nextLine(e,t,n){let r=t.depth<e.stack.length?-1:JG(t),i=t.next;if(r<0)return!1;let a=bK(NG.HeaderMark,e.lineStart+t.pos,e.lineStart+r);return e.nextLine(),e.addLeafElement(n,bK(i==61?NG.SetextHeading1:NG.SetextHeading2,n.start,e.prevLineEnd(),[...e.parser.parseInline(n.content,n.start),a])),!0}finish(){return!1}},oK={LinkReference(e,t){return t.content.charCodeAt(0)==91?new rK(t):null},SetextHeading(){return new aK}},sK=[(e,t)=>qG(t)>=0,(e,t)=>VG(t)>=0,(e,t)=>HG(t)>=0,(e,t)=>GG(t,e,!0)>=0,(e,t)=>KG(t,e,!0)>=0,(e,t)=>UG(t,e,!0)>=0,(e,t)=>$G(t,e,!0)>=0],cK={text:``,end:0},lK=class{constructor(e,t,n,r){this.parser=e,this.input=t,this.ranges=r,this.line=new FG,this.atEnd=!1,this.reusePlaceholders=new Map,this.stoppedAt=null,this.rangeI=0,this.to=r[r.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=r[0].from,this.block=MG.create(NG.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=n.length?new IK(n,t):null,this.readLine()}get parsedPos(){return this.absoluteLineStart}advance(){if(this.stoppedAt!=null&&this.absoluteLineStart>this.stoppedAt)return this.finish();let{line:e}=this;for(;;){for(let t=0;;){let n=e.depth<this.stack.length?this.stack[this.stack.length-1]:null;for(;t<e.markers.length&&(!n||e.markers[t].from<n.end);){let n=e.markers[t++];this.addNode(n.type,n.from,n.to)}if(!n)break;this.finishContext()}if(e.pos<e.text.length)break;if(!this.nextLine())return this.finish()}if(this.fragments&&this.reuseFragment(e.basePos))return null;start:for(;;){for(let t of this.parser.blockParsers)if(t){let n=t(this,e);if(n!=0){if(n==1)return null;e.forward();continue start}}break}if(e.pos==e.text.length)return this.nextLine()?null:this.finish();let t=new PG(this.lineStart+e.pos,e.text.slice(e.pos));for(let e of this.parser.leafBlockParsers)if(e){let n=e(this,t);n&&t.parsers.push(n)}lines:for(;this.nextLine()&&e.pos!=e.text.length;){if(e.indent<e.baseIndent+4){for(let n of this.parser.endLeafBlock)if(n(this,e,t))break lines}for(let n of t.parsers)if(n.nextLine(this,e,t))return null;t.content+=`
|
|
227
227
|
`+e.scrub();for(let n of e.markers)t.marks.push(n)}return this.finishLeaf(t),null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw RangeError(`Can't move stoppedAt forward`);this.stoppedAt=e}reuseFragment(e){if(!this.fragments.moveTo(this.absoluteLineStart+e,this.absoluteLineStart)||!this.fragments.matches(this.block.hash))return!1;let t=this.fragments.takeNodes(this);return t?(this.absoluteLineStart+=t,this.lineStart=RK(this.absoluteLineStart,this.ranges),this.moveRangeI(),this.absoluteLineStart<this.to?(this.lineStart++,this.absoluteLineStart++,this.readLine()):(this.atEnd=!0,this.readLine()),!0):!1}get depth(){return this.stack.length}parentType(e=this.depth-1){return this.parser.nodeSet.types[this.stack[e].type]}nextLine(){return this.lineStart+=this.line.text.length,this.absoluteLineEnd>=this.to?(this.absoluteLineStart=this.absoluteLineEnd,this.atEnd=!0,this.readLine(),!1):(this.lineStart++,this.absoluteLineStart=this.absoluteLineEnd+1,this.moveRangeI(),this.readLine(),!0)}peekLine(){return this.scanLine(this.absoluteLineEnd+1).text}moveRangeI(){for(;this.rangeI<this.ranges.length-1&&this.absoluteLineStart>=this.ranges[this.rangeI].to;)this.rangeI++,this.absoluteLineStart=Math.max(this.absoluteLineStart,this.ranges[this.rangeI].from)}scanLine(e){let t=cK;if(t.end=e,e>=this.to)t.text=``;else if(t.text=this.lineChunkAt(e),t.end+=t.text.length,this.ranges.length>1){let e=this.absoluteLineStart,n=this.rangeI;for(;this.ranges[n].to<t.end;){n++;let r=this.ranges[n].from,i=this.lineChunkAt(r);t.end=r+i.length,t.text=t.text.slice(0,this.ranges[n-1].to-e)+i,e=t.end-t.text.length}}return t}readLine(){let{line:e}=this,{text:t,end:n}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=n,e.reset(t);e.depth<this.stack.length;e.depth++){let t=this.stack[e.depth],n=this.parser.skipContextMarkup[t.type];if(!n)throw Error(`Unhandled block context `+NG[t.type]);let r=this.line.markers.length;if(!n(t,this,e)){this.line.markers.length>r&&(t.end=this.line.markers[this.line.markers.length-1].to),e.forward();break}e.forward()}}lineChunkAt(e){let t=this.input.chunk(e),n;if(this.input.lineChunks)n=t==`
|
|
228
228
|
`?``:t;else{let e=t.indexOf(`
|
|
@@ -249,7 +249,7 @@ Pick the one that is installed and logged in on this machine. Your choice is rem
|
|
|
249
249
|
\${}
|
|
250
250
|
}`,{label:`interface`,detail:`definition`,type:`keyword`}),FB("type ${name} = ${type}",{label:`type`,detail:`definition`,type:`keyword`}),FB(`enum \${name} {
|
|
251
251
|
\${}
|
|
252
|
-
}`,{label:`enum`,detail:`definition`,type:`keyword`})]),cX=new te,lX=new Set([`Script`,`Block`,`FunctionExpression`,`FunctionDeclaration`,`ArrowFunction`,`MethodDeclaration`,`ForStatement`]);function uX(e){return(t,n)=>{let r=t.node.getChild(`VariableDefinition`);return r&&n(r,e),!0}}var dX=[`FunctionDeclaration`],fX={FunctionDeclaration:uX(`function`),ClassDeclaration:uX(`class`),ClassExpression:()=>!0,EnumDeclaration:uX(`constant`),TypeAliasDeclaration:uX(`type`),NamespaceDeclaration:uX(`namespace`),VariableDefinition(e,t){e.matchContext(dX)||t(e,`variable`)},TypeDefinition(e,t){t(e,`type`)},__proto__:null};function pX(e,t){let n=cX.get(t);if(n)return n;let i=[],a=!0;function o(t,n){let r=e.sliceString(t.from,t.to);i.push({label:r,type:n})}return t.cursor(r.IncludeAnonymous).iterate(t=>{if(a)a=!1;else if(t.name){let e=fX[t.name];if(e&&e(t,o)||lX.has(t.name))return!1}else if(t.to-t.from>8192){for(let n of pX(e,t.node))i.push(n);return!1}}),cX.set(t,i),i}var mX=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,hX=[`TemplateString`,`String`,`RegExp`,`LineComment`,`BlockComment`,`VariableDefinition`,`TypeDefinition`,`Label`,`PropertyDefinition`,`PropertyName`,`PrivatePropertyDefinition`,`PrivatePropertyName`,`JSXText`,`JSXAttributeValue`,`JSXOpenTag`,`JSXCloseTag`,`JSXSelfClosingTag`,`.`,`?.`];function gX(e){let t=d(e.state).resolveInner(e.pos,-1);if(hX.indexOf(t.name)>-1)return null;let n=t.name==`VariableName`||t.to-t.from<20&&mX.test(e.state.sliceDoc(t.from,t.to));if(!n&&!e.explicit)return null;let r=[];for(let n=t;n;n=n.parent)lX.has(n.name)&&(r=r.concat(pX(e.state.doc,n)));return{options:r,from:n?t.from:e.pos,validFor:mX}}var _X=Pe.define({name:`javascript`,parser:iX.configure({props:[s.add({IfStatement:me({except:/^\s*({|else\b)/}),TryStatement:me({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:Ge,SwitchBody:e=>{let t=e.textAfter,n=/^\s*\}/.test(t),r=/^\s*(case|default)\b/.test(t);return e.baseIndent+(n?0:r?1:2)*e.unit},Block:Be({closing:`}`}),ArrowFunction:e=>e.baseIndent+e.unit,"TemplateString BlockComment":()=>null,"Statement Property":me({except:/^\s*{/}),JSXElement(e){let t=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},JSXEscape(e){let t=/\s*\}/.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},"JSXOpenTag JSXSelfClosingTag"(e){return e.column(e.node.from)+e.unit}}),a.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":Ue,BlockComment(e){return{from:e.from+2,to:e.to-2}},JSXElement(e){let t=e.firstChild;if(!t||t.name==`JSXSelfClosingTag`)return null;let n=e.lastChild;return{from:t.to,to:n.type.isError?e.to:n.from}},"JSXSelfClosingTag JSXOpenTag"(e){let t=e.firstChild?.nextSibling,n=e.lastChild;return!t||t.type.isError?null:{from:t.to,to:n.type.isError?e.to:n.from}}})]}),languageData:{closeBrackets:{brackets:[`(`,`[`,`{`,`'`,`"`,"`"]},commentTokens:{line:`//`,block:{open:`/*`,close:`*/`}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:`$`}}),vX={test:e=>/^JSX/.test(e.name),facet:ne({commentTokens:{block:{open:`{/*`,close:`*/}`}}})},yX=_X.configure({dialect:`ts`},`typescript`),bX=_X.configure({dialect:`jsx`,props:[C.add(e=>e.isTop?[vX]:void 0)]}),xX=_X.configure({dialect:`jsx ts`,props:[C.add(e=>e.isTop?[vX]:void 0)]},`typescript`),SX=e=>({label:e,type:`keyword`}),CX=`break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield`.split(` `).map(SX),wX=CX.concat([`declare`,`implements`,`private`,`protected`,`public`].map(SX));function TX(e={}){let t=e.jsx?e.typescript?xX:bX:e.typescript?yX:_X,n=e.typescript?sX.concat(wX):oX.concat(CX);return new Re(t,[_X.data.of({autocomplete:Tz(hX,wz(n))}),_X.data.of({autocomplete:gX}),e.jsx?kX:[]])}function EX(e){for(;;){if(e.name==`JSXOpenTag`||e.name==`JSXSelfClosingTag`||e.name==`JSXFragmentTag`)return e;if(e.name==`JSXEscape`||!e.parent)return null;e=e.parent}}function DX(e,t,n=e.length){for(let r=t?.firstChild;r;r=r.nextSibling)if(r.name==`JSXIdentifier`||r.name==`JSXBuiltin`||r.name==`JSXNamespacedName`||r.name==`JSXMemberExpression`)return e.sliceString(r.from,Math.min(r.to,n));return``}var OX=typeof navigator==`object`&&/Android\b/.test(navigator.userAgent),kX=R.inputHandler.of((e,t,n,r,i)=>{if((OX?e.composing:e.compositionStarted)||e.state.readOnly||t!=n||r!=`>`&&r!=`/`||!_X.isActiveAt(e.state,t,-1))return!1;let a=i(),{state:o}=a,s=o.changeByRange(e=>{let{head:t}=e,n=d(o).resolveInner(t-1,-1),i;if(n.name==`JSXStartTag`&&(n=n.parent),!(o.doc.sliceString(t-1,t)!=r||n.name==`JSXAttributeValue`&&n.to>t)){if(r==`>`&&n.name==`JSXFragmentTag`)return{range:e,changes:{from:t,insert:`</>`}};if(r==`/`&&n.name==`JSXStartCloseTag`){let e=n.parent,r=e.parent;if(r&&e.from==t-2&&((i=DX(o.doc,r.firstChild,t))||r.firstChild?.name==`JSXFragmentTag`)){let e=`${i}>`;return{range:G.cursor(t+e.length,-1),changes:{from:t,insert:e}}}}else if(r==`>`){let r=EX(n);if(r&&r.name==`JSXOpenTag`&&!/^\/?>|^<\//.test(o.doc.sliceString(t,t+2))&&(i=DX(o.doc,r,t)))return{range:e,changes:{from:t,insert:`</${i}>`}}}}return{range:e}});return!s.changes.empty&&(e.dispatch([a,o.update(s,{userEvent:`input.complete`,scrollIntoView:!0})]),!0)}),AX=tt({autoCloseTags:()=>cZ,html:()=>aZ,htmlCompletionSource:()=>QX,htmlCompletionSourceWith:()=>$X,htmlLanguage:()=>iZ}),jX=[`_blank`,`_self`,`_top`,`_parent`],MX=[`ascii`,`utf-8`,`utf-16`,`latin1`,`latin1`],NX=[`get`,`post`,`put`,`delete`],PX=[`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`],FX=[`true`,`false`],IX={},LX={a:{attrs:{href:null,ping:null,type:null,media:null,target:jX,hreflang:null}},abbr:IX,address:IX,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:[`default`,`rect`,`circle`,`poly`]}},article:IX,aside:IX,audio:{attrs:{src:null,mediagroup:null,crossorigin:[`anonymous`,`use-credentials`],preload:[`none`,`metadata`,`auto`],autoplay:[`autoplay`],loop:[`loop`],controls:[`controls`]}},b:IX,base:{attrs:{href:null,target:jX}},bdi:IX,bdo:IX,blockquote:{attrs:{cite:null}},body:IX,br:IX,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:[`autofocus`],disabled:[`autofocus`],formenctype:PX,formmethod:NX,formnovalidate:[`novalidate`],formtarget:jX,type:[`submit`,`reset`,`button`]}},canvas:{attrs:{width:null,height:null}},caption:IX,center:IX,cite:IX,code:IX,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:[`command`,`checkbox`,`radio`],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:[`disabled`],checked:[`checked`]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:[`disabled`],multiple:[`multiple`]}},datalist:{attrs:{data:null}},dd:IX,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:[`open`]}},dfn:IX,div:IX,dl:IX,dt:IX,em:IX,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:[`disabled`],form:null,name:null}},figcaption:IX,figure:IX,footer:IX,form:{attrs:{action:null,name:null,"accept-charset":MX,autocomplete:[`on`,`off`],enctype:PX,method:NX,novalidate:[`novalidate`],target:jX}},h1:IX,h2:IX,h3:IX,h4:IX,h5:IX,h6:IX,head:{children:[`title`,`base`,`link`,`style`,`meta`,`script`,`noscript`,`command`]},header:IX,hgroup:IX,hr:IX,html:{attrs:{manifest:null}},i:IX,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:[`allow-top-navigation`,`allow-same-origin`,`allow-forms`,`allow-scripts`],seamless:[`seamless`]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:[`anonymous`,`use-credentials`]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:[`audio/*`,`video/*`,`image/*`],autocomplete:[`on`,`off`],autofocus:[`autofocus`],checked:[`checked`],disabled:[`disabled`],formenctype:PX,formmethod:NX,formnovalidate:[`novalidate`],formtarget:jX,multiple:[`multiple`],readonly:[`readonly`],required:[`required`],type:[`hidden`,`text`,`search`,`tel`,`url`,`email`,`password`,`datetime`,`date`,`month`,`week`,`time`,`datetime-local`,`number`,`range`,`color`,`checkbox`,`radio`,`file`,`submit`,`image`,`reset`,`button`]}},ins:{attrs:{cite:null,datetime:null}},kbd:IX,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:[`autofocus`],disabled:[`disabled`],keytype:[`RSA`]}},label:{attrs:{for:null,form:null}},legend:IX,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:[`all`,`16x16`,`16x16 32x32`,`16x16 32x32 64x64`]}},map:{attrs:{name:null}},mark:IX,menu:{attrs:{label:null,type:[`list`,`context`,`toolbar`]}},meta:{attrs:{content:null,charset:MX,name:[`viewport`,`application-name`,`author`,`description`,`generator`,`keywords`],"http-equiv":[`content-language`,`content-type`,`default-style`,`refresh`]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:IX,noscript:IX,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:[`typemustmatch`]}},ol:{attrs:{reversed:[`reversed`],start:null,type:[`1`,`a`,`A`,`i`,`I`]},children:[`li`,`script`,`template`,`ul`,`ol`]},optgroup:{attrs:{disabled:[`disabled`],label:null}},option:{attrs:{disabled:[`disabled`],label:null,selected:[`selected`],value:null}},output:{attrs:{for:null,form:null,name:null}},p:IX,param:{attrs:{name:null,value:null}},pre:IX,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:IX,rt:IX,ruby:IX,samp:IX,script:{attrs:{type:[`text/javascript`],src:null,async:[`async`],defer:[`defer`],charset:MX}},section:IX,select:{attrs:{form:null,name:null,size:null,autofocus:[`autofocus`],disabled:[`disabled`],multiple:[`multiple`]}},slot:{attrs:{name:null}},small:IX,source:{attrs:{src:null,type:null,media:null}},span:IX,strong:IX,style:{attrs:{type:[`text/css`],media:null,scoped:null}},sub:IX,summary:IX,sup:IX,table:IX,tbody:IX,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:IX,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:[`autofocus`],disabled:[`disabled`],readonly:[`readonly`],required:[`required`],wrap:[`soft`,`hard`]}},tfoot:IX,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:[`row`,`col`,`rowgroup`,`colgroup`]}},thead:IX,time:{attrs:{datetime:null}},title:IX,tr:IX,track:{attrs:{src:null,label:null,default:null,kind:[`subtitles`,`captions`,`descriptions`,`chapters`,`metadata`],srclang:null}},ul:{children:[`li`,`script`,`template`,`ul`,`ol`]},var:IX,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:[`anonymous`,`use-credentials`],preload:[`auto`,`metadata`,`none`],autoplay:[`autoplay`],mediagroup:[`movie`],muted:[`muted`],controls:[`controls`]}},wbr:IX},RX={accesskey:null,class:null,contenteditable:FX,contextmenu:null,dir:[`ltr`,`rtl`,`auto`],draggable:[`true`,`false`,`auto`],dropzone:[`copy`,`move`,`link`,`string:`,`file:`],hidden:[`hidden`],id:null,inert:[`inert`],itemid:null,itemprop:null,itemref:null,itemscope:[`itemscope`],itemtype:null,lang:[`ar`,`bn`,`de`,`en-GB`,`en-US`,`es`,`fr`,`hi`,`id`,`ja`,`pa`,`pt`,`ru`,`tr`,`zh`],spellcheck:FX,autocorrect:FX,autocapitalize:FX,style:null,tabindex:null,title:null,translate:[`yes`,`no`],rel:[`stylesheet`,`alternate`,`author`,`bookmark`,`help`,`license`,`next`,`nofollow`,`noreferrer`,`prefetch`,`prev`,`search`,`tag`],role:`alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer`.split(` `),"aria-activedescendant":null,"aria-atomic":FX,"aria-autocomplete":[`inline`,`list`,`both`,`none`],"aria-busy":FX,"aria-checked":[`true`,`false`,`mixed`,`undefined`],"aria-controls":null,"aria-describedby":null,"aria-disabled":FX,"aria-dropeffect":null,"aria-expanded":[`true`,`false`,`undefined`],"aria-flowto":null,"aria-grabbed":[`true`,`false`,`undefined`],"aria-haspopup":FX,"aria-hidden":FX,"aria-invalid":[`true`,`false`,`grammar`,`spelling`],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":[`off`,`polite`,`assertive`],"aria-multiline":FX,"aria-multiselectable":FX,"aria-owns":null,"aria-posinset":null,"aria-pressed":[`true`,`false`,`mixed`,`undefined`],"aria-readonly":FX,"aria-relevant":null,"aria-required":FX,"aria-selected":[`true`,`false`,`undefined`],"aria-setsize":null,"aria-sort":[`ascending`,`descending`,`none`,`other`],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},zX=`beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload`.split(` `).map(e=>`on`+e);for(let e of zX)RX[e]=null;var BX=class{constructor(e,t){this.tags={...LX,...e},this.globalAttrs={...RX,...t},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}};BX.default=new BX;function VX(e,t,n=e.length){if(!t)return``;let r=t.firstChild,i=r&&r.getChild(`TagName`);return i?e.sliceString(i.from,Math.min(i.to,n)):``}function HX(e,t=!1){for(;e;e=e.parent)if(e.name==`Element`){if(t)t=!1;else return e}return null}function UX(e,t,n){return n.tags[VX(e,HX(t))]?.children||n.allTags}function WX(e,t){let n=[];for(let r=HX(t);r&&!r.type.isTop;r=HX(r.parent)){let i=VX(e,r);if(i&&r.lastChild.name==`CloseTag`)break;i&&n.indexOf(i)<0&&(t.name==`EndTag`||t.from>=r.firstChild.to)&&n.push(i)}return n}var GX=/^[:\-\.\w\u00b7-\uffff]*$/;function KX(e,t,n,r,i){let a=/\s*>/.test(e.sliceDoc(i,i+5))?``:`>`,o=HX(n,n.name==`StartTag`||n.name==`TagName`);return{from:r,to:i,options:UX(e.doc,o,t).map(e=>({label:e,type:`type`})).concat(WX(e.doc,n).map((e,t)=>({label:`/`+e,apply:`/`+e+a,type:`type`,boost:99-t}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function qX(e,t,n,r){let i=/\s*>/.test(e.sliceDoc(r,r+5))?``:`>`;return{from:n,to:r,options:WX(e.doc,t).map((e,t)=>({label:e,apply:e+i,type:`type`,boost:99-t})),validFor:GX}}function JX(e,t,n,r){let i=[],a=0;for(let r of UX(e.doc,n,t))i.push({label:`<`+r,type:`type`});for(let t of WX(e.doc,n))i.push({label:`</`+t+`>`,type:`type`,boost:99-a++});return{from:r,to:r,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function YX(e,t,n,r,i){let a=HX(n),o=a?t.tags[VX(e.doc,a)]:null,s=o&&o.attrs?Object.keys(o.attrs):[];return{from:r,to:i,options:(o&&o.globalAttrs===!1?s:s.length?s.concat(t.globalAttrNames):t.globalAttrNames).map(e=>({label:e,type:`property`})),validFor:GX}}function XX(e,t,n,r,i){let a=n.parent?.getChild(`AttributeName`),o=[],s;if(a){let c=e.sliceDoc(a.from,a.to),l=t.globalAttrs[c];if(!l){let r=HX(n),i=r?t.tags[VX(e.doc,r)]:null;l=i?.attrs&&i.attrs[c]}if(l){let t=e.sliceDoc(r,i).toLowerCase(),n=`"`,a=`"`;/^['"]/.test(t)?(s=t[0]==`"`?/^[^"]*$/:/^[^']*$/,n=``,a=e.sliceDoc(i,i+1)==t[0]?``:t[0],t=t.slice(1),r++):s=/^[^\s<>='"]*$/;for(let e of l)o.push({label:e,apply:n+e+a,type:`constant`})}}return{from:r,to:i,options:o,validFor:s}}function ZX(e,t){let{state:n,pos:r}=t,i=d(n).resolveInner(r,-1),a=i.resolve(r);for(let e=r,t;a==i&&(t=i.childBefore(e));){let n=t.lastChild;if(!n||!n.type.isError||n.from<n.to)break;a=i=t,e=n.from}return i.name==`TagName`?i.parent&&/CloseTag$/.test(i.parent.name)?qX(n,i,i.from,r):KX(n,e,i,i.from,r):i.name==`StartTag`||i.name==`IncompleteTag`?KX(n,e,i,r,r):i.name==`StartCloseTag`||i.name==`IncompleteCloseTag`?qX(n,i,r,r):i.name==`OpenTag`||i.name==`SelfClosingTag`||i.name==`AttributeName`?YX(n,e,i,i.name==`AttributeName`?i.from:r,r):i.name==`Is`||i.name==`AttributeValue`||i.name==`UnquotedAttributeValue`?XX(n,e,i,i.name==`Is`?r:i.from,r):t.explicit&&(a.name==`Element`||a.name==`Text`||a.name==`Document`)?JX(n,e,i,r):null}function QX(e){return ZX(BX.default,e)}function $X(e){let{extraTags:t,extraGlobalAttributes:n}=e,r=n||t?new BX(t,n):BX.default;return e=>ZX(r,e)}var eZ=_X.parser.configure({top:`SingleExpression`}),tZ=[{tag:`script`,attrs:e=>e.type==`text/typescript`||e.lang==`ts`,parser:yX.parser},{tag:`script`,attrs:e=>e.type==`text/babel`||e.type==`text/jsx`,parser:bX.parser},{tag:`script`,attrs:e=>e.type==`text/typescript-jsx`,parser:xX.parser},{tag:`script`,attrs(e){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(e.type)},parser:eZ},{tag:`script`,attrs(e){return!e.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(e.type)},parser:_X.parser},{tag:`style`,attrs(e){return(!e.lang||e.lang==`css`)&&(!e.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(e.type))},parser:xY.parser}],nZ=[{name:`style`,parser:xY.parser.configure({top:`Styles`})}].concat(zX.map(e=>({name:e,parser:_X.parser}))),rZ=Pe.define({name:`html`,parser:gJ.configure({props:[s.add({Element(e){let t=/^(\s*)(<\/)?/.exec(e.textAfter);return e.node.to<=e.pos+t[0].length?e.continue():e.lineIndent(e.node.from)+(t[2]?0:e.unit)},"OpenTag CloseTag SelfClosingTag"(e){return e.column(e.node.from)+e.unit},Document(e){if(e.pos+/\s*/.exec(e.textAfter)[0].length<e.node.to)return e.continue();let t=null,n;for(let n=e.node;;){let e=n.lastChild;if(!e||e.name!=`Element`||e.to!=n.to)break;t=n=e}return t&&!((n=t.lastChild)&&(n.name==`CloseTag`||n.name==`SelfClosingTag`))?e.lineIndent(t.from)+e.unit:null}}),a.add({Element(e){let t=e.firstChild,n=e.lastChild;return!t||t.name!=`OpenTag`?null:{from:t.to,to:n.name==`CloseTag`?n.from:e.to}}}),Ce.add({"OpenTag CloseTag":e=>e.getChild(`TagName`)})]}),languageData:{commentTokens:{block:{open:`<!--`,close:`-->`}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:`-_`}}),iZ=rZ.configure({wrap:bJ(tZ,nZ)});function aZ(e={}){let t=``,n;e.matchClosingTags===!1&&(t=`noMatch`),e.selfClosingTags===!0&&(t=(t?t+` `:``)+`selfClosing`),(e.nestedLanguages&&e.nestedLanguages.length||e.nestedAttributes&&e.nestedAttributes.length)&&(n=bJ((e.nestedLanguages||[]).concat(tZ),(e.nestedAttributes||[]).concat(nZ)));let r=n?rZ.configure({wrap:n,dialect:t}):t?iZ.configure({dialect:t}):iZ;return new Re(r,[iZ.data.of({autocomplete:$X(e)}),e.autoCloseTags===!1?[]:cZ,TX().support,SY().support])}var oZ=new Set(`area base br col command embed frame hr img input keygen link meta param source track wbr menuitem`.split(` `));function sZ(e,t,n){for(;;){if(t.lastChild?.name!=`CloseTag`)return!1;let r=t.parent;if(!r||VX(e,r)!=n)return!0;t=r}}var cZ=R.inputHandler.of((e,t,n,r,i)=>{if(e.composing||e.state.readOnly||t!=n||r!=`>`&&r!=`/`||!iZ.isActiveAt(e.state,t,-1))return!1;let a=i(),{state:o}=a,s=o.changeByRange(e=>{let t=o.doc.sliceString(e.from-1,e.to)==r,{head:n}=e,i=d(o).resolveInner(n,-1),a;if(t&&r==`>`&&i.name==`EndTag`){let t=i.parent;if((a=VX(o.doc,t.parent,n))&&!oZ.has(a)&&!sZ(o.doc,t.parent,a))return{range:e,changes:{from:n,to:n+ +(o.doc.sliceString(n,n+1)===`>`),insert:`</${a}>`}}}else if(t&&r==`/`&&i.name==`IncompleteCloseTag`){let e=i.parent;if(i.from==n-2&&e.lastChild?.name!=`CloseTag`&&(a=VX(o.doc,e,n))&&!oZ.has(a)){let e=n+ +(o.doc.sliceString(n,n+1)===`>`),t=`${a}>`;return{range:G.cursor(n+t.length,-1),changes:{from:n,to:e,insert:t}}}}return{range:e}});return!s.changes.empty&&(e.dispatch([a,o.update(s,{userEvent:`input.complete`,scrollIntoView:!0})]),!0)}),lZ=tt({commonmarkLanguage:()=>vZ,deleteMarkupBackward:()=>MZ,insertNewlineContinueMarkup:()=>DZ,insertNewlineContinueMarkupCommand:()=>EZ,markdown:()=>FZ,markdownKeymap:()=>NZ,markdownLanguage:()=>yZ,pasteURLAsLink:()=>BZ}),uZ=ne({commentTokens:{block:{open:`<!--`,close:`-->`}}}),dZ=new I,fZ=BK.configure({props:[a.add(e=>!e.is(`Block`)||e.is(`Document`)||pZ(e)!=null||mZ(e)?void 0:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})),dZ.add(pZ),s.add({Document:()=>null}),ve.add({Document:uZ})]});function pZ(e){let t=/^(?:ATX|Setext)Heading(\d)$/.exec(e.name);return t?+t[1]:void 0}function mZ(e){return e.name==`OrderedList`||e.name==`BulletList`}function hZ(e,t){let n=e;for(;;){let e=n.nextSibling,r;if(!e||(r=pZ(e.type))!=null&&r<=t)break;n=e}return n.to}var gZ=He.of((e,t,n)=>{for(let r=d(e).resolveInner(n,-1);r&&!(r.from<t);r=r.parent){let e=r.type.prop(dZ);if(e==null)continue;let t=hZ(r,e);if(t>n)return{from:n,to:t}}return null});function _Z(e){return new se(uZ,e,[],`markdown`)}var vZ=_Z(fZ),yZ=_Z(fZ.configure([oq,lq,cq,uq,{props:[a.add({Table:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}]));function bZ(e,t){return n=>{if(n&&e){let t=null;if(n=/\S*/.exec(n)[0],t=typeof e==`function`?e(n):W.matchLanguageName(e,n,!0),t instanceof W)return t.support?t.support.language.parser:ce.getSkippingParser(t.load());if(t)return t.parser}return t?t.parser:null}}var xZ=class{constructor(e,t,n,r,i,a,o){this.node=e,this.from=t,this.to=n,this.spaceBefore=r,this.spaceAfter=i,this.type=a,this.item=o}blank(e,t=!0){let n=this.spaceBefore+(this.node.name==`Blockquote`?`>`:``);if(e!=null){for(;n.length<e;)n+=` `;return n}for(let e=this.to-this.from-n.length-this.spaceAfter.length;e>0;e--)n+=` `;return n+(t?this.spaceAfter:``)}marker(e,t){let n=this.node.name==`OrderedList`?String(+CZ(this.item,e)[2]+t):``;return this.spaceBefore+n+this.type+this.spaceAfter}};function SZ(e,t){let n=[],r=[];for(let t=e;t;t=t.parent){if(t.name==`FencedCode`)return r;(t.name==`ListItem`||t.name==`Blockquote`)&&n.push(t)}for(let e=n.length-1;e>=0;e--){let i=n[e],a,o=t.lineAt(i.from),s=i.from-o.from;if(i.name==`Blockquote`&&(a=/^ *>( ?)/.exec(o.text.slice(s))))r.push(new xZ(i,s,s+a[0].length,``,a[1],`>`,null));else if(i.name==`ListItem`&&i.parent.name==`OrderedList`&&(a=/^( *)\d+([.)])( *)/.exec(o.text.slice(s)))){let e=a[3],t=a[0].length;e.length>=4&&(e=e.slice(0,e.length-4),t-=4),r.push(new xZ(i.parent,s,s+t,a[1],e,a[2],i))}else if(i.name==`ListItem`&&i.parent.name==`BulletList`&&(a=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(o.text.slice(s)))){let e=a[4],t=a[0].length;e.length>4&&(e=e.slice(0,e.length-4),t-=4);let n=a[2];a[3]&&(n+=a[3].replace(/[xX]/,` `)),r.push(new xZ(i.parent,s,s+t,a[1],e,n,i))}}return r}function CZ(e,t){return/^(\s*)(\d+)(?=[.)])/.exec(t.sliceString(e.from,e.from+10))}function wZ(e,t,n,r=0){for(let i=-1,a=e;;){if(a.name==`ListItem`){let e=CZ(a,t),o=+e[2];if(i>=0){if(o!=i+1)return;n.push({from:a.from+e[1].length,to:a.from+e[0].length,insert:String(i+2+r)})}i=o}let e=a.nextSibling;if(!e)break;a=e}}function TZ(e,n){let r=/^[ \t]*/.exec(e)[0].length;if(!r||n.facet(t)!=` `)return e;let i=qe(e,4,r),a=``;for(let e=i;e>0;)e>=4?(a+=` `,e-=4):(a+=` `,e--);return a+e.slice(r)}var EZ=(e={})=>({state:t,dispatch:n})=>{let r=d(t),{doc:i}=t,a=null,o=t.changeByRange(n=>{if(!n.empty||!yZ.isActiveAt(t,n.from,-1)&&!yZ.isActiveAt(t,n.from,1))return a={range:n};let o=n.from,s=i.lineAt(o),c=SZ(r.resolveInner(o,-1),i);for(;c.length&&c[c.length-1].from>o-s.from;)c.pop();if(!c.length)return a={range:n};let l=c[c.length-1];if(l.to-l.spaceAfter.length>o-s.from)return a={range:n};let u=o>=l.to-l.spaceAfter.length&&!/\S/.test(s.text.slice(l.to));if(l.item&&u){if(l.item.from<s.from&&!/^[\s>]*$/.test(s.text.slice(0,l.to)))return a={range:n};let r=l.node.firstChild,u=l.node.getChild(`ListItem`,`ListItem`);if(r.to>=o||u&&u.to<o||s.from>0&&!/[^\s>]/.test(i.lineAt(s.from-1).text)||e.nonTightLists===!1){let e=c.length>1?c[c.length-2]:null,t,n=``;e&&e.item?(t=s.from+e.from,n=e.marker(i,1)):t=s.from+(e?e.to:0);let r=[{from:t,to:o,insert:n}];return l.node.name==`OrderedList`&&wZ(l.item,i,r,-2),e&&e.node.name==`OrderedList`&&wZ(e.item,i,r),{range:G.cursor(t+n.length),changes:r}}{let e=AZ(c,t,s);return{range:G.cursor(o+e.length+1),changes:{from:s.from,insert:e+t.lineBreak}}}}if(l.node.name==`Blockquote`&&u&&s.from){let e=i.lineAt(s.from-1),r=/>\s*$/.exec(e.text);if(r&&r.index==l.from){let i=t.changes([{from:e.from+r.index,to:e.to},{from:s.from+l.from,to:s.to}]);return{range:n.map(i),changes:i}}}let d=[];l.node.name==`OrderedList`&&wZ(l.item,i,d);let f=l.item&&l.item.from<s.from,p=``;if(!f||/^[\s\d.)\-+*>]*/.exec(s.text)[0].length>=l.to)for(let e=0,t=c.length-1;e<=t;e++)p+=e==t&&!f?c[e].marker(i,1):c[e].blank(e<t?qe(s.text,4,c[e+1].from)-p.length:null);let m=o;for(;m>s.from&&/\s/.test(s.text.charAt(m-s.from-1));)m--;return p=TZ(p,t),kZ(l.node,t.doc)&&(p=AZ(c,t,s)+t.lineBreak+p),d.push({from:m,to:o,insert:t.lineBreak+p}),{range:G.cursor(m+p.length+1),changes:d}});return!a&&(n(t.update(o,{scrollIntoView:!0,userEvent:`input`})),!0)},DZ=EZ();function OZ(e){return e.name==`QuoteMark`||e.name==`ListMark`}function kZ(e,t){if(e.name!=`OrderedList`&&e.name!=`BulletList`)return!1;let n=e.firstChild,r=e.getChild(`ListItem`,`ListItem`);if(!r)return!1;let i=t.lineAt(n.to),a=t.lineAt(r.from),o=/^[\s>]*$/.test(i.text);return i.number+ +!o<a.number}function AZ(e,t,n){let r=``;for(let t=0,i=e.length-2;t<=i;t++)r+=e[t].blank(t<i?qe(n.text,4,e[t+1].from)-r.length:null,t<i);return TZ(r,t)}function jZ(e,t){let n=e.resolveInner(t,-1),r=t;OZ(n)&&(r=n.from,n=n.parent);for(let e;e=n.childBefore(r);)if(OZ(e))r=e.from;else if(e.name==`OrderedList`||e.name==`BulletList`)n=e.lastChild,r=n.to;else break;return n}var MZ=({state:e,dispatch:t})=>{let n=d(e),r=null,i=e.changeByRange(t=>{let i=t.from,{doc:a}=e;if(t.empty&&yZ.isActiveAt(e,t.from)){let t=a.lineAt(i),r=SZ(jZ(n,i),a);if(r.length){let n=r[r.length-1],a=n.to-n.spaceAfter.length+ +!!n.spaceAfter;if(i-t.from>a&&!/\S/.test(t.text.slice(a,i-t.from)))return{range:G.cursor(t.from+a),changes:{from:t.from+a,to:i}};if(i-t.from==a&&(n.item&&t.from<=n.item.from||/^[\s>]*$/.test(t.text.slice(0,n.to)))){let r=t.from+n.from;if(n.item&&n.node.from<n.item.from&&/\S/.test(t.text.slice(n.from,n.to))){let i=n.blank(qe(t.text,4,n.to)-qe(t.text,4,n.from));return r==t.from&&(i=TZ(i,e)),{range:G.cursor(r+i.length),changes:{from:r,to:t.from+n.to,insert:i}}}if(r<i)return{range:G.cursor(r),changes:{from:r,to:i}}}}}return r={range:t}});return!r&&(t(e.update(i,{scrollIntoView:!0,userEvent:`delete`})),!0)},NZ=[{key:`Enter`,run:DZ},{key:`Backspace`,run:MZ}],PZ=aZ({matchClosingTags:!1});function FZ(e={}){let{codeLanguages:t,defaultCodeLanguage:n,addKeymap:r=!0,base:{parser:i}=vZ,completeHTMLTags:a=!0,pasteURLAsLink:o=!0,htmlTagLanguage:s=PZ}=e;if(!(i instanceof dK))throw RangeError("Base parser provided to `markdown` should be a Markdown parser");let c=e.extensions?[e.extensions]:[],l=[s.support,gZ],u;o&&l.push(BZ),n instanceof Re?(l.push(n.support),u=n.language):n&&(u=n);let d=t||u?bZ(t,u):void 0;c.push(HK({codeParser:d,htmlParser:s.language.parser})),r&&l.push(E.high(ze.of(NZ)));let f=_Z(i.configure(c));return a&&l.push(f.data.of({autocomplete:IZ})),new Re(f,l)}function IZ(e){let{state:t,pos:n}=e,r=/<[:\-\.\w\u00b7-\uffff]*$/.exec(t.sliceDoc(n-25,n));if(!r)return null;let i=d(t).resolveInner(n,-1);for(;i&&!i.type.isTop;){if(i.name==`CodeBlock`||i.name==`FencedCode`||i.name==`ProcessingInstructionBlock`||i.name==`CommentBlock`||i.name==`Link`||i.name==`Image`)return null;i=i.parent}return{from:n-r[0].length,to:n,options:RZ(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}var LZ=null;function RZ(){if(LZ)return LZ;let e=QX(new xz(ee.create({extensions:PZ}),0,!0));return LZ=e?e.options:[]}var zZ=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,BZ=R.domEventHandlers({paste:(e,t)=>{let{main:n}=t.state.selection;if(n.empty)return!1;let r=e.clipboardData?.getData(`text/plain`);if(!r||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(r)||(/^www\./.test(r)&&(r=`https://`+r),!yZ.isActiveAt(t.state,n.from,1)))return!1;let i=d(t.state),a=!1;return i.iterate({from:n.from,to:n.to,enter:e=>{(e.from>n.from||zZ.test(e.name))&&(a=!0)},leave:e=>{e.to<n.to&&(a=!0)}}),!a&&(t.dispatch({changes:[{from:n.from,insert:`[`},{from:n.to,insert:`](${r})`}],userEvent:`input.paste`,scrollIntoView:!0}),!0)}}),VZ=63,HZ=64,UZ=1,WZ=2,GZ=3,KZ=4,qZ=5,JZ=6,YZ=7,XZ=65,ZZ=66,QZ=8,$Z=9,eQ=10,tQ=11,nQ=12,rQ=13,iQ=19,aQ=20,oQ=29,sQ=33,cQ=34,lQ=47,uQ=0,dQ=1,fQ=2,pQ=3,mQ=4,hQ=class{constructor(e,t,n){this.parent=e,this.depth=t,this.type=n,this.hash=(e?e.hash+e.hash<<8:0)+t+(t<<4)+n}};hQ.top=new hQ(null,-1,uQ);function gQ(e,t){for(let n=0,r=t-e.pos-1;;r--,n++){let t=e.peek(r);if(vQ(t)||t==-1)return n}}function _Q(e){return e==32||e==9}function vQ(e){return e==10||e==13}function yQ(e){return _Q(e)||vQ(e)}function bQ(e){return e<0||yQ(e)}var xQ=new Ie({start:hQ.top,reduce(e,t){return e.type==pQ&&(t==aQ||t==cQ)?e.parent:e},shift(e,t,n,r){if(t==GZ)return new hQ(e,gQ(r,r.pos),dQ);if(t==XZ||t==qZ)return new hQ(e,gQ(r,r.pos),fQ);if(t==VZ)return e.parent;if(t==iQ||t==sQ)return new hQ(e,0,pQ);if(t==rQ&&e.type==mQ)return e.parent;if(t==lQ){let t=/[1-9]/.exec(r.read(r.pos,n.pos));if(t)return new hQ(e,e.depth+ +t[0],mQ)}return e},hash(e){return e.hash}});function SQ(e,t,n=0){return e.peek(n)==t&&e.peek(n+1)==t&&e.peek(n+2)==t&&bQ(e.peek(n+3))}var CQ=new Te((e,t)=>{if(e.next==-1&&t.canShift(HZ))return e.acceptToken(HZ);let n=e.peek(-1);if((vQ(n)||n<0)&&t.context.type!=pQ){if(SQ(e,45)){if(t.canShift(VZ))e.acceptToken(VZ);else return e.acceptToken(UZ,3)}if(SQ(e,46)){if(t.canShift(VZ))e.acceptToken(VZ);else return e.acceptToken(WZ,3)}let n=0;for(;e.next==32;)n++,e.advance();(n<t.context.depth||n==t.context.depth&&t.context.type==dQ&&(e.next!=45||!bQ(e.peek(1))))&&e.next!=-1&&!vQ(e.next)&&e.next!=35&&e.acceptToken(VZ,-n)}},{contextual:!0}),wQ=new Te((e,t)=>{if(t.context.type==pQ)e.next==63&&(e.advance(),bQ(e.next)&&e.acceptToken(YZ));else if(e.next==45)e.advance(),bQ(e.next)&&e.acceptToken(t.context.type==dQ&&t.context.depth==gQ(e,e.pos-1)?KZ:GZ);else if(e.next==63)e.advance(),bQ(e.next)&&e.acceptToken(t.context.type==fQ&&t.context.depth==gQ(e,e.pos-1)?JZ:qZ);else{let n=e.pos;for(;;)if(_Q(e.next)){if(e.pos==n)return;e.advance()}else if(e.next==33)OQ(e);else if(e.next==38)kQ(e);else if(e.next==42){kQ(e);break}else if(e.next==39||e.next==34){if(AQ(e,!0))break;return}else if(e.next==91||e.next==123){if(!jQ(e))return;break}else{FQ(e,!0,!1,0);break}for(;_Q(e.next);)e.advance();if(e.next==58){if(e.pos==n&&t.canShift(oQ))return;bQ(e.peek(1))&&e.acceptTokenTo(t.context.type==fQ&&t.context.depth==gQ(e,n)?ZZ:XZ,n)}}},{contextual:!0});function TQ(e){return e>32&&e<127&&e!=34&&e!=37&&e!=44&&e!=60&&e!=62&&e!=92&&e!=94&&e!=96&&e!=123&&e!=124&&e!=125}function EQ(e){return e>=48&&e<=57||e>=97&&e<=102||e>=65&&e<=70}function DQ(e,t){return e.next==37?(e.advance(),EQ(e.next)&&e.advance(),EQ(e.next)&&e.advance(),!0):TQ(e.next)||t&&e.next==44?(e.advance(),!0):!1}function OQ(e){if(e.advance(),e.next==60){for(e.advance();;)if(!DQ(e,!0)){e.next==62&&e.advance();break}}else for(;DQ(e,!1););}function kQ(e){for(e.advance();!bQ(e.next)&&NQ(e.next)!=`f`;)e.advance()}function AQ(e,t){let n=e.next,r=!1,i=e.pos;for(e.advance();;){let a=e.next;if(a<0)break;if(e.advance(),a==n){if(a==39){if(e.next==39)e.advance();else break}else break}else if(a==92&&n==34)e.next>=0&&e.advance();else if(vQ(a)){if(t)return!1;r=!0}else if(t&&e.pos>=i+1024)return!1}return!r}function jQ(e){for(let t=[],n=e.pos+1024;;)if(e.next==91||e.next==123)t.push(e.next),e.advance();else if(e.next==39||e.next==34){if(!AQ(e,!0))return!1}else if(e.next==93||e.next==125){if(t[t.length-1]!=e.next-2)return!1;if(t.pop(),e.advance(),!t.length)return!0}else if(e.next<0||e.pos>n||vQ(e.next))return!1;else e.advance()}var MQ=`iiisiiissisfissssssssssssisssiiissssssssssssssssssssssssssfsfssissssssssssssssssssssssssssfif`;function NQ(e){return e<33?`u`:e>125?`s`:MQ[e-33]}function PQ(e,t){let n=NQ(e);return n!=`u`&&!(t&&n==`f`)}function FQ(e,t,n,r){if(NQ(e.next)==`s`||(e.next==63||e.next==58||e.next==45)&&PQ(e.peek(1),n))e.advance();else return!1;let i=e.pos;for(;;){let a=e.next,o=0,s=r+1;for(;yQ(a);){if(vQ(a)){if(t)return!1;s=0}else s++;a=e.peek(++o)}if(!(a>=0&&(a==58?PQ(e.peek(o+1),n):a==35?e.peek(o-1)!=32:PQ(a,n)))||!n&&s<=r||s==0&&!n&&(SQ(e,45,o)||SQ(e,46,o)))break;if(t&&NQ(a)==`f`)return!1;for(let t=o;t>=0;t--)e.advance();if(t&&e.pos>i+1024)return!1}return!0}var IQ=new Te((e,t)=>{if(e.next==33)OQ(e),e.acceptToken(nQ);else if(e.next==38||e.next==42){let t=e.next==38?eQ:tQ;kQ(e),e.acceptToken(t)}else e.next==39||e.next==34?(AQ(e,!1),e.acceptToken($Z)):FQ(e,!1,t.context.type==pQ,t.context.depth)&&e.acceptToken(QZ)}),LQ=new Te((e,t)=>{let n=t.context.type==mQ?t.context.depth:-1,r=e.pos;scan:for(;;){let i=0,a=e.next;for(;a==32;)a=e.peek(++i);if(!i&&(SQ(e,45,i)||SQ(e,46,i))||!vQ(a)&&(n<0&&(n=Math.max(t.context.depth+1,i)),i<n))break;for(;;){if(e.next<0)break scan;let t=vQ(e.next);if(e.advance(),t)continue scan;r=e.pos}}e.acceptTokenTo(rQ,r)}),RQ=y({DirectiveName:K.keyword,DirectiveContent:K.attributeValue,"DirectiveEnd DocEnd":K.meta,QuotedLiteral:K.string,BlockLiteralHeader:K.special(K.string),BlockLiteralContent:K.content,Literal:K.content,"Key/Literal Key/QuotedLiteral":K.definition(K.propertyName),"Anchor Alias":K.labelName,Tag:K.typeName,Comment:K.lineComment,": , -":K.separator,"?":K.punctuation,"[ ]":K.squareBracket,"{ }":K.brace}),zQ=Me.deserialize({version:14,states:"5lQ!ZQgOOO#PQfO'#CpO#uQfO'#DOOOQR'#Dv'#DvO$qQgO'#DRO%gQdO'#DUO%nQgO'#DUO&ROaO'#D[OOQR'#Du'#DuO&{QgO'#D^O'rQgO'#D`OOQR'#Dt'#DtO(iOqO'#DbOOQP'#Dj'#DjO(zQaO'#CmO)YQgO'#CmOOQP'#Cm'#CmQ)jQaOOQ)uQgOOQ]QgOOO*PQdO'#CrO*nQdO'#CtOOQO'#Dw'#DwO+]Q`O'#CxO+hQdO'#CwO+rQ`O'#CwOOQO'#Cv'#CvO+wQdO'#CvOOQO'#Cq'#CqO,UQ`O,59[O,^QfO,59[OOQR,59[,59[OOQO'#Cx'#CxO,eQ`O'#DPO,pQdO'#DPOOQO'#Dx'#DxO,zQdO'#DxO-XQ`O,59jO-aQfO,59jOOQR,59j,59jOOQR'#DS'#DSO-hQcO,59mO-sQgO'#DVO.TQ`O'#DVO.YQcO,59pOOQR'#DX'#DXO#|QfO'#DWO.hQcO'#DWOOQR,59v,59vO.yOWO,59vO/OOaO,59vO/WOaO,59vO/cQgO'#D_OOQR,59x,59xO0VQgO'#DaOOQR,59z,59zOOQP,59|,59|O0yOaO,59|O1ROaO,59|O1aOqO,59|OOQP-E7h-E7hO1oQgO,59XOOQP,59X,59XO2PQaO'#DeO2_QgO'#DeO2oQgO'#DkOOQP'#Dk'#DkQ)jQaOOO3PQdO'#CsOOQO,59^,59^O3kQdO'#CuOOQO,59`,59`OOQO,59c,59cO4VQdO,59cO4aQdO'#CzO4kQ`O'#CzOOQO,59b,59bOOQU,5:Q,5:QOOQR1G.v1G.vO4pQ`O1G.vOOQU-E7d-E7dO4xQdO,59kOOQO,59k,59kO5SQdO'#DQO5^Q`O'#DQOOQO,5:d,5:dOOQU,5:R,5:ROOQR1G/U1G/UO5cQ`O1G/UOOQU-E7e-E7eO5kQgO'#DhO5xQcO1G/XOOQR1G/X1G/XOOQR,59q,59qO6TQgO,59qO6eQdO'#DiO6lQgO'#DiO7PQcO1G/[OOQR1G/[1G/[OOQR,59r,59rO#|QfO,59rOOQR1G/b1G/bO7_OWO1G/bO7dOaO1G/bOOQR,59y,59yOOQR,59{,59{OOQP1G/h1G/hO7lOaO1G/hO7tOaO1G/hO8POaO1G/hOOQP1G.s1G.sO8_QgO,5:POOQP,5:P,5:POOQP,5:V,5:VOOQP-E7i-E7iOOQO,59_,59_OOQO,59a,59aOOQO1G.}1G.}OOQO,59f,59fO8oQdO,59fOOQR7+$b7+$bP,XQ`O'#DfOOQO1G/V1G/VOOQO,59l,59lO8yQdO,59lOOQR7+$p7+$pP9TQ`O'#DgOOQR'#DT'#DTOOQR,5:S,5:SOOQR-E7f-E7fOOQR7+$s7+$sOOQR1G/]1G/]O9YQgO'#DYO9jQ`O'#DYOOQR,5:T,5:TO#|QfO'#DZO9oQcO'#DZOOQR-E7g-E7gOOQR7+$v7+$vOOQR1G/^1G/^OOQR7+$|7+$|O:QOWO7+$|OOQP7+%S7+%SO:VOaO7+%SO:_OaO7+%SOOQP1G/k1G/kOOQO1G/Q1G/QOOQO1G/W1G/WOOQR,59t,59tO:jQgO,59tOOQR,59u,59uO#|QfO,59uOOQR<<Hh<<HhOOQP<<Hn<<HnO:zOaO<<HnOOQR1G/`1G/`OOQR1G/a1G/aOOQPAN>YAN>Y",stateData:";S~O!fOS!gOS^OS~OP_OQbORSOTUOWROXROYYOZZO[XOcPOqQO!PVO!V[O!cTO~O`cO~P]OVkOWROXROYeOZfO[dOcPOmhOqQO~OboO~P!bOVtOWROXROYeOZfO[dOcPOmrOqQO~OpwO~P#WORSOTUOWROXROYYOZZO[XOcPOqQO!PVO!cTO~OSvP!avP!bvP~P#|OWROXROYeOZfO[dOcPOqQO~OmzO~P%OOm!OOUzP!azP!bzP!dzP~P#|O^!SO!b!QO!f!TO!g!RO~ORSOTUOWROXROcPOqQO!PVO!cTO~OY!UOP!QXQ!QX!V!QX!`!QXS!QX!a!QX!b!QXU!QXm!QX!d!QX~P&aO[!WOP!SXQ!SX!V!SX!`!SXS!SX!a!SX!b!SXU!SXm!SX!d!SX~P&aO^!ZO!W![O!b!YO!f!]O!g!YO~OP!_O!V[OQaX!`aX~OPaXQaX!VaX!`aX~P#|OP!bOQ!cO!V[O~OP_O!V[O~P#|OWROXROY!fOcPOqQObfXmfXofXpfX~OWROXRO[!hOcPOqQObhXmhXohXphX~ObeXmlXoeX~ObkXokX~P%OOm!kO~Om!lObnPonP~P%OOb!pOo!oO~Ob!pO~P!bOm!sOosXpsX~OosXpsX~P%OOm!uOotPptP~P%OOo!xOp!yO~Op!yO~P#WOS!|O!a#OO!b#OO~OUyX!ayX!byX!dyX~P#|Om#QO~OU#SO!a#UO!b#UO!d#RO~Om#WOUzX!azX!bzX!dzX~O]#XO~O!b#XO!g#YO~O^#ZO!b#XO!g#YO~OP!RXQ!RX!V!RX!`!RXS!RX!a!RX!b!RXU!RXm!RX!d!RX~P&aOP!TXQ!TX!V!TX!`!TXS!TX!a!TX!b!TXU!TXm!TX!d!TX~P&aO!b#^O!g#^O~O^#_O!b#^O!f#`O!g#^O~O^#_O!W#aO!b#^O!g#^O~OPaaQaa!Vaa!`aa~P#|OP#cO!V[OQ!XX!`!XX~OP!XXQ!XX!V!XX!`!XX~P#|OP_O!V[OQ!_X!`!_X~P#|OWROXROcPOqQObgXmgXogXpgX~OWROXROcPOqQObiXmiXoiXpiX~Obkaoka~P%OObnXonX~P%OOm#kO~Ob#lOo!oO~Oosapsa~P%OOotXptX~P%OOm#pO~Oo!xOp#qO~OSwP!awP!bwP~P#|OS!|O!a#vO!b#vO~OUya!aya!bya!dya~P#|Om#xO~P%OOm#{OU}P!a}P!b}P!d}P~P#|OU#SO!a$OO!b$OO!d#RO~O]$QO~O!b$QO!g$RO~O!b$SO!g$SO~O^$TO!b$SO!g$SO~O^$TO!b$SO!f$UO!g$SO~OP!XaQ!Xa!V!Xa!`!Xa~P#|Obnaona~P%OOotapta~P%OOo!xO~OU|X!a|X!b|X!d|X~P#|Om$ZO~Om$]OU}X!a}X!b}X!d}X~O]$^O~O!b$_O!g$_O~O^$`O!b$_O!g$_O~OU|a!a|a!b|a!d|a~P#|O!b$cO!g$cO~O",goto:",]!mPPPPPPPPPPPPPPPPP!nPP!v#v#|$`#|$c$f$j$nP%VPPP!v%Y%^%a%{&O%a&R&U&X&_&b%aP&e&{&e'O'RPP']'a'g'm's'y(XPPPPPPPP(_)e*X+c,VUaObcR#e!c!{ROPQSTUXY_bcdehknrtvz!O!U!W!_!b!c!f!h!k!l!s!u!|#Q#R#S#W#c#k#p#x#{$Z$]QmPR!qnqfPQThknrtv!k!l!s!u#R#k#pR!gdR!ieTlPnTjPnSiPnSqQvQ{TQ!mkQ!trQ!vtR#y#RR!nkTsQvR!wt!RWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]RySR#t!|R|TR|UQ!PUR#|#SR#z#RR#z#SyZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]R!VXR!XYa]O^abc!a!c!eT!da!eQnPR!rnQvQR!{vQ!}yR#u!}Q#T|R#}#TW^Obc!cS!^^!aT!aa!eQ!eaR#f!eW`Obc!cQxSS}U#SQ!`_Q#PzQ#V!OQ#b!_Q#d!bQ#s!|Q#w#QQ$P#WQ$V#cQ$Y#xQ$[#{Q$a$ZR$b$]xZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]Q!VXQ!XYQ#[!UR#]!W!QWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]pfPQThknrtv!k!l!s!u#R#k#pQ!gdQ!ieQ#g!fR#h!hSgPn^pQTkrtv#RQ!jhQ#i!kQ#j!lQ#n!sQ#o!uQ$W#kR$X#pQuQR!zv",nodeNames:`⚠ DirectiveEnd DocEnd - - ? ? ? Literal QuotedLiteral Anchor Alias Tag BlockLiteralContent Comment Stream BOM Document ] [ FlowSequence Item Tagged Anchored Anchored Tagged FlowMapping Pair Key : Pair , } { FlowMapping Pair Pair BlockSequence Item Item BlockMapping Pair Pair Key Pair Pair BlockLiteral BlockLiteralHeader Tagged Anchored Anchored Tagged Directive DirectiveName DirectiveContent Document`,maxTerm:74,context:xQ,nodeProps:[[`isolate`,-3,8,9,14,``],[`openedBy`,18,`[`,32,`{`],[`closedBy`,19,`]`,33,`}`]],propSources:[RQ],skippedNodes:[0],repeatNodeCount:6,tokenData:"-Y~RnOX#PXY$QYZ$]Z]#P]^$]^p#Ppq$Qqs#Pst$btu#Puv$yv|#P|}&e}![#P![!]'O!]!`#P!`!a'i!a!}#P!}#O*g#O#P#P#P#Q+Q#Q#o#P#o#p+k#p#q'i#q#r,U#r;'S#P;'S;=`#z<%l?HT#P?HT?HU,o?HUO#PQ#UU!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PQ#kTOY#PZs#Pt;'S#P;'S;=`#z<%lO#PQ#}P;=`<%l#P~$VQ!f~XY$Qpq$Q~$bO!g~~$gS^~OY$bZ;'S$b;'S;=`$s<%lO$b~$vP;=`<%l$bR%OX!WQOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR%rX!WQ!VPOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR&bP;=`<%l%kR&lUoP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'VUmP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'p[!PP!WQOY#PZp#Ppq#hq{#P{|(f|}#P}!O(f!O!R#P!R![)p![;'S#P;'S;=`#z<%lO#PR(mW!PP!WQOY#PZp#Ppq#hq!R#P!R![)V![;'S#P;'S;=`#z<%lO#PR)^U!PP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR)wY!PP!WQOY#PZp#Ppq#hq{#P{|)V|}#P}!O)V!O;'S#P;'S;=`#z<%lO#PR*nUcP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+XUbP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+rUqP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,]UpP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,vU`P!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#P",tokenizers:[CQ,wQ,IQ,LQ,0,1],topRules:{Stream:[0,15]},tokenPrec:0}),BQ=tt({yaml:()=>UQ,yamlFrontmatter:()=>GQ,yamlLanguage:()=>HQ}),VQ=Me.deserialize({version:14,states:"!vOQOPOOO]OPO'#C_OhOPO'#C^OOOO'#Cc'#CcOpOPO'#CaQOOOOOO{OPOOOOOO'#Cb'#CbO!WOPO'#C`O!`OPO,58xOOOO-E6a-E6aOOOO-E6`-E6`OOOO'#C_'#C_OOOO1G.d1G.d",stateData:`!h~OXPOYROWTP~OWVXXRXYRX~OYVOXSP~OXROYROWTX~OXROYROWTP~OYVOXSX~OX[O~OXY~`,goto:`vWPPX[beioRUOQQOR]XRXQTTOUQWQRZWSSOURYS`,nodeNames:`⚠ Document Frontmatter DashLine FrontmatterContent Body`,maxTerm:10,skippedNodes:[0],repeatNodeCount:2,tokenData:"$z~RXOYnYZ!^Z]n]^!^^}n}!O!i!O;'Sn;'S;=`!c<%lOn~qXOYnYZ!^Z]n]^!^^;'Sn;'S;=`!c<%l~n~On~~!^~!cOY~~!fP;=`<%ln~!lZOYnYZ!^Z]n]^!^^}n}!O#_!O;'Sn;'S;=`!c<%l~n~On~~!^~#bZOYnYZ!^Z]n]^!^^}n}!O$T!O;'Sn;'S;=`!c<%l~n~On~~!^~$WXOYnYZ$sZ]n]^$s^;'Sn;'S;=`!c<%l~n~On~~$s~$zOX~Y~",tokenizers:[0],topRules:{Document:[0,1]},tokenPrec:67}),HQ=Pe.define({name:`yaml`,parser:zQ.configure({props:[s.add({Stream:e=>{for(let t=e.node.resolve(e.pos,-1);t&&t.to>=e.pos;t=t.parent){if(t.name==`BlockLiteralContent`&&t.from<t.to)return e.baseIndentFor(t);if(t.name==`BlockLiteral`)return e.baseIndentFor(t)+e.unit;if(t.name==`BlockSequence`||t.name==`BlockMapping`)return e.column(t.firstChild.from,1);if(t.name==`QuotedLiteral`)return null;if(t.name==`Literal`){let n=e.column(t.from,1);if(n==e.lineIndent(t.from,1))return n;if(t.to>e.pos)return null}}return null},FlowMapping:Be({closing:`}`}),FlowSequence:Be({closing:`]`})}),a.add({"FlowMapping FlowSequence":Ue,"Item Pair BlockLiteral":(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}),languageData:{commentTokens:{line:`#`},indentOnInput:/^\s*[\]\}]$/}});function UQ(){return new Re(HQ)}var WQ=Pe.define({name:`yaml-frontmatter`,parser:VQ.configure({props:[y({DashLine:K.meta})]})});function GQ(e){let{language:t,support:n}=e.content instanceof Re?e.content:{language:e.content,support:[]};return new Re(WQ.configure({wrap:je(e=>e.name==`FrontmatterContent`?{parser:HQ.parser}:e.name==`Body`?{parser:t.parser}:null)}),n)}var KQ=`modulepreload`,qQ=function(e){return`/`+e},JQ={},YQ=function(e){return e.pathname.endsWith(`.css`)},XQ=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},Q=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=qQ(t,n);let r=s(t),i=YQ(r);return XQ(JQ,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:KQ,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{t.addEventListener(`load`,e),t.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${r}`)))})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};function $(e){return new Re(ue.define(e))}function ZQ(e){return Q(()=>import(`./dist-P9roUi1O.js`).then(t=>t.sql({dialect:t[e]})),__vite__mapDeps([0,1]))}var QQ=[W.of({name:`C`,extensions:[`c`,`h`,`ino`],load(){return Q(()=>import(`./dist-Bw5-uxs9.js`).then(e=>e.cpp()),__vite__mapDeps([2,1]))}}),W.of({name:`C++`,alias:[`cpp`],extensions:[`cpp`,`c++`,`cc`,`cxx`,`hpp`,`h++`,`hh`,`hxx`],load(){return Q(()=>import(`./dist-Bw5-uxs9.js`).then(e=>e.cpp()),__vite__mapDeps([2,1]))}}),W.of({name:`CQL`,alias:[`cassandra`],extensions:[`cql`],load(){return ZQ(`Cassandra`)}}),W.of({name:`CSS`,extensions:[`css`],load(){return Q(()=>Promise.resolve().then(()=>aY).then(e=>e.css()),[])}}),W.of({name:`Go`,extensions:[`go`],load(){return Q(()=>import(`./dist-DrFzCwMc.js`).then(e=>e.go()),__vite__mapDeps([3,1]))}}),W.of({name:`HTML`,alias:[`xhtml`],extensions:[`html`,`htm`,`handlebars`,`hbs`],load(){return Q(()=>Promise.resolve().then(()=>AX).then(e=>e.html()),void 0)}}),W.of({name:`Java`,extensions:[`java`],load(){return Q(()=>import(`./dist-DDJNvivM.js`).then(e=>e.java()),__vite__mapDeps([4,1]))}}),W.of({name:`JavaScript`,alias:[`ecmascript`,`js`,`node`],extensions:[`js`,`mjs`,`cjs`],load(){return Q(()=>Promise.resolve().then(()=>aX).then(e=>e.javascript()),void 0)}}),W.of({name:`Jinja`,extensions:[`j2`,`jinja`,`jinja2`],load(){return Q(()=>import(`./dist-C46EmZuI.js`).then(e=>e.jinja()),__vite__mapDeps([5,1]))}}),W.of({name:`JSON`,alias:[`json5`],extensions:[`json`,`map`],load(){return Q(()=>import(`./dist-BzulKuec.js`).then(e=>e.json()),__vite__mapDeps([6,1]))}}),W.of({name:`JSX`,extensions:[`jsx`],load(){return Q(()=>Promise.resolve().then(()=>aX).then(e=>e.javascript({jsx:!0})),void 0)}}),W.of({name:`LESS`,extensions:[`less`],load(){return Q(()=>import(`./dist-Dy45nXf8.js`).then(e=>e.less()),__vite__mapDeps([7,1]))}}),W.of({name:`Liquid`,extensions:[`liquid`],load(){return Q(()=>import(`./dist-D9GmSkjm.js`).then(e=>e.liquid()),__vite__mapDeps([8,1]))}}),W.of({name:`MariaDB SQL`,load(){return ZQ(`MariaSQL`)}}),W.of({name:`Markdown`,extensions:[`md`,`markdown`,`mkd`],load(){return Q(()=>Promise.resolve().then(()=>lZ).then(e=>e.markdown()),void 0)}}),W.of({name:`MS SQL`,load(){return ZQ(`MSSQL`)}}),W.of({name:`MySQL`,load(){return ZQ(`MySQL`)}}),W.of({name:`PHP`,extensions:[`php`,`php3`,`php4`,`php5`,`php7`,`phtml`],load(){return Q(()=>import(`./dist-DMiOs9Qj.js`).then(e=>e.php()),__vite__mapDeps([9,1]))}}),W.of({name:`PLSQL`,extensions:[`pls`],load(){return ZQ(`PLSQL`)}}),W.of({name:`PostgreSQL`,load(){return ZQ(`PostgreSQL`)}}),W.of({name:`Python`,extensions:[`BUILD`,`bzl`,`py`,`pyw`],filename:/^(BUCK|BUILD)$/,load(){return Q(()=>import(`./dist-BB2cF3XN.js`).then(e=>e.python()),__vite__mapDeps([10,1]))}}),W.of({name:`Rust`,extensions:[`rs`],load(){return Q(()=>import(`./dist-CgIQYY1o.js`).then(e=>e.rust()),__vite__mapDeps([11,1]))}}),W.of({name:`Sass`,extensions:[`sass`],load(){return Q(()=>import(`./dist-DGzg2gyA.js`).then(e=>e.sass({indented:!0})),__vite__mapDeps([12,1]))}}),W.of({name:`SCSS`,extensions:[`scss`],load(){return Q(()=>import(`./dist-DGzg2gyA.js`).then(e=>e.sass()),__vite__mapDeps([12,1]))}}),W.of({name:`SQL`,extensions:[`sql`],load(){return ZQ(`StandardSQL`)}}),W.of({name:`SQLite`,load(){return ZQ(`SQLite`)}}),W.of({name:`TSX`,extensions:[`tsx`],load(){return Q(()=>Promise.resolve().then(()=>aX).then(e=>e.javascript({jsx:!0,typescript:!0})),void 0)}}),W.of({name:`TypeScript`,alias:[`ts`],extensions:[`ts`,`mts`,`cts`],load(){return Q(()=>Promise.resolve().then(()=>aX).then(e=>e.javascript({typescript:!0})),void 0)}}),W.of({name:`WebAssembly`,extensions:[`wat`,`wast`],load(){return Q(()=>import(`./dist-DF3F_I8N.js`).then(e=>e.wast()),__vite__mapDeps([13,1]))}}),W.of({name:`XML`,alias:[`rss`,`wsdl`,`xsd`],extensions:[`xml`,`xsl`,`xsd`,`svg`],load(){return Q(()=>import(`./dist-Dlorc3Sx.js`).then(e=>e.xml()),__vite__mapDeps([14,1]))}}),W.of({name:`YAML`,alias:[`yml`],extensions:[`yaml`,`yml`],load(){return Q(()=>Promise.resolve().then(()=>BQ).then(e=>e.yaml()),void 0)}}),W.of({name:`APL`,extensions:[`dyalog`,`apl`],load(){return Q(()=>import(`./apl-gfMMiTNf.js`).then(e=>$(e.apl)),[])}}),W.of({name:`PGP`,alias:[`asciiarmor`],extensions:[`asc`,`pgp`,`sig`],load(){return Q(()=>import(`./asciiarmor-C_eisQCp.js`).then(e=>$(e.asciiArmor)),[])}}),W.of({name:`ASN.1`,extensions:[`asn`,`asn1`],load(){return Q(()=>import(`./asn1-DCl_8MCW.js`).then(e=>$(e.asn1({}))),[])}}),W.of({name:`Asterisk`,filename:/^extensions\.conf$/i,load(){return Q(()=>import(`./asterisk-BEn0Cwpx.js`).then(e=>$(e.asterisk)),[])}}),W.of({name:`Brainfuck`,extensions:[`b`,`bf`],load(){return Q(()=>import(`./brainfuck-D5EjA2JK.js`).then(e=>$(e.brainfuck)),[])}}),W.of({name:`Cobol`,extensions:[`cob`,`cpy`],load(){return Q(()=>import(`./cobol-DHLQUbN7.js`).then(e=>$(e.cobol)),[])}}),W.of({name:`C#`,alias:[`csharp`,`cs`],extensions:[`cs`],load(){return Q(()=>import(`./clike-xvONpD0Z.js`).then(e=>$(e.csharp)),[])}}),W.of({name:`Clojure`,extensions:[`clj`,`cljc`,`cljx`],load(){return Q(()=>import(`./clojure-BflJGmDX.js`).then(e=>$(e.clojure)),[])}}),W.of({name:`ClojureScript`,extensions:[`cljs`],load(){return Q(()=>import(`./clojure-BflJGmDX.js`).then(e=>$(e.clojure)),[])}}),W.of({name:`Closure Stylesheets (GSS)`,extensions:[`gss`],load(){return Q(()=>import(`./css-CnaYoQib.js`).then(e=>$(e.gss)),[])}}),W.of({name:`CMake`,extensions:[`cmake`,`cmake.in`],filename:/^CMakeLists\.txt$/,load(){return Q(()=>import(`./cmake-84nbDH0I.js`).then(e=>$(e.cmake)),[])}}),W.of({name:`CoffeeScript`,alias:[`coffee`,`coffee-script`],extensions:[`coffee`],load(){return Q(()=>import(`./coffeescript-De_zI4J0.js`).then(e=>$(e.coffeeScript)),[])}}),W.of({name:`Common Lisp`,alias:[`lisp`],extensions:[`cl`,`lisp`,`el`],load(){return Q(()=>import(`./commonlisp-DgAKBe0r.js`).then(e=>$(e.commonLisp)),[])}}),W.of({name:`Cypher`,extensions:[`cyp`,`cypher`],load(){return Q(()=>import(`./cypher-p9eYesGn.js`).then(e=>$(e.cypher)),[])}}),W.of({name:`Cython`,extensions:[`pyx`,`pxd`,`pxi`],load(){return Q(()=>import(`./python-B_1Jd8HM.js`).then(e=>$(e.cython)),[])}}),W.of({name:`Crystal`,extensions:[`cr`],load(){return Q(()=>import(`./crystal-Bl6YKCG_.js`).then(e=>$(e.crystal)),[])}}),W.of({name:`D`,extensions:[`d`],load(){return Q(()=>import(`./d-DWkQyNnU.js`).then(e=>$(e.d)),[])}}),W.of({name:`Dart`,extensions:[`dart`],load(){return Q(()=>import(`./clike-xvONpD0Z.js`).then(e=>$(e.dart)),[])}}),W.of({name:`diff`,extensions:[`diff`,`patch`],load(){return Q(()=>import(`./diff-ChtP43wD.js`).then(e=>$(e.diff)),[])}}),W.of({name:`Dockerfile`,filename:/^Dockerfile$/,load(){return Q(()=>import(`./dockerfile-DJkHQgkl.js`).then(e=>$(e.dockerFile)),__vite__mapDeps([15,16]))}}),W.of({name:`DTD`,extensions:[`dtd`],load(){return Q(()=>import(`./dtd-DTF72YNO.js`).then(e=>$(e.dtd)),[])}}),W.of({name:`Dylan`,extensions:[`dylan`,`dyl`,`intr`],load(){return Q(()=>import(`./dylan-S7ucR4pR.js`).then(e=>$(e.dylan)),[])}}),W.of({name:`EBNF`,load(){return Q(()=>import(`./ebnf-D4c0_ac3.js`).then(e=>$(e.ebnf)),[])}}),W.of({name:`ECL`,extensions:[`ecl`],load(){return Q(()=>import(`./ecl-BVIeWmwY.js`).then(e=>$(e.ecl)),[])}}),W.of({name:`edn`,extensions:[`edn`],load(){return Q(()=>import(`./clojure-BflJGmDX.js`).then(e=>$(e.clojure)),[])}}),W.of({name:`Eiffel`,extensions:[`e`],load(){return Q(()=>import(`./eiffel-BEjRio4Q.js`).then(e=>$(e.eiffel)),[])}}),W.of({name:`Elm`,extensions:[`elm`],load(){return Q(()=>import(`./elm-Cshzl8qu.js`).then(e=>$(e.elm)),[])}}),W.of({name:`Erlang`,extensions:[`erl`],load(){return Q(()=>import(`./erlang-BV0c4Hdn.js`).then(e=>$(e.erlang)),[])}}),W.of({name:`Esper`,load(){return Q(()=>import(`./sql-DuQMFDvy.js`).then(e=>$(e.esper)),[])}}),W.of({name:`Factor`,extensions:[`factor`],load(){return Q(()=>import(`./factor-LKH5gN8L.js`).then(e=>$(e.factor)),__vite__mapDeps([17,16]))}}),W.of({name:`FCL`,load(){return Q(()=>import(`./fcl-ClOhbFR7.js`).then(e=>$(e.fcl)),[])}}),W.of({name:`Forth`,extensions:[`forth`,`fth`,`4th`],load(){return Q(()=>import(`./forth-D6RzAl64.js`).then(e=>$(e.forth)),[])}}),W.of({name:`Fortran`,extensions:[`f`,`for`,`f77`,`f90`,`f95`],load(){return Q(()=>import(`./fortran-Bt6PBEDR.js`).then(e=>$(e.fortran)),[])}}),W.of({name:`F#`,alias:[`fsharp`],extensions:[`fs`],load(){return Q(()=>import(`./mllike-B45xgp2S.js`).then(e=>$(e.fSharp)),[])}}),W.of({name:`Gas`,extensions:[`s`],load(){return Q(()=>import(`./gas-BHEdbvp9.js`).then(e=>$(e.gas)),[])}}),W.of({name:`Gherkin`,extensions:[`feature`],load(){return Q(()=>import(`./gherkin-oBAE_ms0.js`).then(e=>$(e.gherkin)),[])}}),W.of({name:`Groovy`,extensions:[`groovy`,`gradle`],filename:/^Jenkinsfile$/,load(){return Q(()=>import(`./groovy-CUrWKPia.js`).then(e=>$(e.groovy)),[])}}),W.of({name:`Haskell`,extensions:[`hs`],load(){return Q(()=>import(`./haskell-BRsoo5mP.js`).then(e=>$(e.haskell)),[])}}),W.of({name:`Haxe`,extensions:[`hx`],load(){return Q(()=>import(`./haxe-DjVOVvNP.js`).then(e=>$(e.haxe)),[])}}),W.of({name:`HXML`,extensions:[`hxml`],load(){return Q(()=>import(`./haxe-DjVOVvNP.js`).then(e=>$(e.hxml)),[])}}),W.of({name:`HTTP`,load(){return Q(()=>import(`./http-CLVgA2GD.js`).then(e=>$(e.http)),[])}}),W.of({name:`IDL`,extensions:[`pro`],load(){return Q(()=>import(`./idl-BUZw3wgd.js`).then(e=>$(e.idl)),[])}}),W.of({name:`JSON-LD`,alias:[`jsonld`],extensions:[`jsonld`],load(){return Q(()=>import(`./javascript-lS2r2ifg.js`).then(e=>$(e.jsonld)),[])}}),W.of({name:`Julia`,extensions:[`jl`],load(){return Q(()=>import(`./julia-CQfgDRfP.js`).then(e=>$(e.julia)),[])}}),W.of({name:`Kotlin`,extensions:[`kt`,`kts`],load(){return Q(()=>import(`./clike-xvONpD0Z.js`).then(e=>$(e.kotlin)),[])}}),W.of({name:`LiveScript`,alias:[`ls`],extensions:[`ls`],load(){return Q(()=>import(`./livescript-BXxG0Yva.js`).then(e=>$(e.liveScript)),[])}}),W.of({name:`Lua`,extensions:[`lua`],load(){return Q(()=>import(`./lua-DPCEkfD_.js`).then(e=>$(e.lua)),[])}}),W.of({name:`mIRC`,extensions:[`mrc`],load(){return Q(()=>import(`./mirc-C9zpzAZU.js`).then(e=>$(e.mirc)),[])}}),W.of({name:`Mathematica`,extensions:[`m`,`nb`,`wl`,`wls`],load(){return Q(()=>import(`./mathematica-u8YMmbU0.js`).then(e=>$(e.mathematica)),[])}}),W.of({name:`Modelica`,extensions:[`mo`],load(){return Q(()=>import(`./modelica-CqHI_q-D.js`).then(e=>$(e.modelica)),[])}}),W.of({name:`MUMPS`,extensions:[`mps`],load(){return Q(()=>import(`./mumps-BSzj6Xyz.js`).then(e=>$(e.mumps)),[])}}),W.of({name:`Mbox`,extensions:[`mbox`],load(){return Q(()=>import(`./mbox-BEMVcqjs.js`).then(e=>$(e.mbox)),[])}}),W.of({name:`Nginx`,filename:/nginx.*\.conf$/i,load(){return Q(()=>import(`./nginx-C-ORUuei.js`).then(e=>$(e.nginx)),[])}}),W.of({name:`NSIS`,extensions:[`nsh`,`nsi`],load(){return Q(()=>import(`./nsis-viPvXFiq.js`).then(e=>$(e.nsis)),__vite__mapDeps([18,16]))}}),W.of({name:`NTriples`,extensions:[`nt`,`nq`],load(){return Q(()=>import(`./ntriples-CzMBulkp.js`).then(e=>$(e.ntriples)),[])}}),W.of({name:`Objective-C`,alias:[`objective-c`,`objc`],extensions:[`m`],load(){return Q(()=>import(`./clike-xvONpD0Z.js`).then(e=>$(e.objectiveC)),[])}}),W.of({name:`Objective-C++`,alias:[`objective-c++`,`objc++`],extensions:[`mm`],load(){return Q(()=>import(`./clike-xvONpD0Z.js`).then(e=>$(e.objectiveCpp)),[])}}),W.of({name:`OCaml`,extensions:[`ml`,`mli`,`mll`,`mly`],load(){return Q(()=>import(`./mllike-B45xgp2S.js`).then(e=>$(e.oCaml)),[])}}),W.of({name:`Octave`,extensions:[`m`],load(){return Q(()=>import(`./octave-D2Q8cUp1.js`).then(e=>$(e.octave)),[])}}),W.of({name:`Oz`,extensions:[`oz`],load(){return Q(()=>import(`./oz-BwTct_5T.js`).then(e=>$(e.oz)),[])}}),W.of({name:`Pascal`,extensions:[`p`,`pas`],load(){return Q(()=>import(`./pascal-Dp_KdFgX.js`).then(e=>$(e.pascal)),[])}}),W.of({name:`Perl`,extensions:[`pl`,`pm`],load(){return Q(()=>import(`./perl-BkSkiI9m.js`).then(e=>$(e.perl)),[])}}),W.of({name:`Pig`,extensions:[`pig`],load(){return Q(()=>import(`./pig-AF4Hwhju.js`).then(e=>$(e.pig)),[])}}),W.of({name:`PowerShell`,extensions:[`ps1`,`psd1`,`psm1`],load(){return Q(()=>import(`./powershell-D8WpQPaX.js`).then(e=>$(e.powerShell)),[])}}),W.of({name:`Properties files`,alias:[`ini`,`properties`],extensions:[`properties`,`ini`,`in`],load(){return Q(()=>import(`./properties-C357ku5U.js`).then(e=>$(e.properties)),[])}}),W.of({name:`ProtoBuf`,extensions:[`proto`],load(){return Q(()=>import(`./protobuf-D1ij_kNL.js`).then(e=>$(e.protobuf)),[])}}),W.of({name:`Pug`,alias:[`jade`],extensions:[`pug`,`jade`],load(){return Q(()=>import(`./pug-BqCHZ5xT.js`).then(e=>$(e.pug)),__vite__mapDeps([19,20]))}}),W.of({name:`Puppet`,extensions:[`pp`],load(){return Q(()=>import(`./puppet-BZyAS7I4.js`).then(e=>$(e.puppet)),[])}}),W.of({name:`Q`,extensions:[`q`],load(){return Q(()=>import(`./q-B9NhS7L_.js`).then(e=>$(e.q)),[])}}),W.of({name:`R`,alias:[`rscript`],extensions:[`r`,`R`],load(){return Q(()=>import(`./r-CxDmU1I4.js`).then(e=>$(e.r)),[])}}),W.of({name:`RPM Changes`,load(){return Q(()=>import(`./rpm-gpDK5sbt.js`).then(e=>$(e.rpmChanges)),[])}}),W.of({name:`RPM Spec`,extensions:[`spec`],load(){return Q(()=>import(`./rpm-gpDK5sbt.js`).then(e=>$(e.rpmSpec)),[])}}),W.of({name:`Ruby`,alias:[`jruby`,`macruby`,`rake`,`rb`,`rbx`],extensions:[`rb`],filename:/^(Gemfile|Rakefile)$/,load(){return Q(()=>import(`./ruby-ChfNwlCY.js`).then(e=>$(e.ruby)),[])}}),W.of({name:`SAS`,extensions:[`sas`],load(){return Q(()=>import(`./sas-C2OyD2Y6.js`).then(e=>$(e.sas)),[])}}),W.of({name:`Scala`,extensions:[`scala`],load(){return Q(()=>import(`./clike-xvONpD0Z.js`).then(e=>$(e.scala)),[])}}),W.of({name:`Scheme`,extensions:[`scm`,`ss`],load(){return Q(()=>import(`./scheme-D9qYN0V5.js`).then(e=>$(e.scheme)),[])}}),W.of({name:`Shell`,alias:[`bash`,`sh`,`zsh`],extensions:[`sh`,`ksh`,`bash`],filename:/^PKGBUILD$/,load(){return Q(()=>import(`./shell-DwuoZtxw.js`).then(e=>$(e.shell)),[])}}),W.of({name:`Sieve`,extensions:[`siv`,`sieve`],load(){return Q(()=>import(`./sieve-tLWDfEkZ.js`).then(e=>$(e.sieve)),[])}}),W.of({name:`Smalltalk`,extensions:[`st`],load(){return Q(()=>import(`./smalltalk-BLp5-jwC.js`).then(e=>$(e.smalltalk)),[])}}),W.of({name:`Solr`,load(){return Q(()=>import(`./solr-B78wSQJQ.js`).then(e=>$(e.solr)),[])}}),W.of({name:`SML`,extensions:[`sml`,`sig`,`fun`,`smackspec`],load(){return Q(()=>import(`./mllike-B45xgp2S.js`).then(e=>$(e.sml)),[])}}),W.of({name:`SPARQL`,alias:[`sparul`],extensions:[`rq`,`sparql`],load(){return Q(()=>import(`./sparql-Dz-mlCAC.js`).then(e=>$(e.sparql)),[])}}),W.of({name:`Spreadsheet`,alias:[`excel`,`formula`],load(){return Q(()=>import(`./spreadsheet-CTIncYxj.js`).then(e=>$(e.spreadsheet)),[])}}),W.of({name:`Squirrel`,extensions:[`nut`],load(){return Q(()=>import(`./clike-xvONpD0Z.js`).then(e=>$(e.squirrel)),[])}}),W.of({name:`Stylus`,extensions:[`styl`],load(){return Q(()=>import(`./stylus-BOVgKnng.js`).then(e=>$(e.stylus)),[])}}),W.of({name:`Swift`,extensions:[`swift`],load(){return Q(()=>import(`./swift-DKB6_1j6.js`).then(e=>$(e.swift)),[])}}),W.of({name:`sTeX`,load(){return Q(()=>import(`./stex-DNzd62Q_.js`).then(e=>$(e.stex)),[])}}),W.of({name:`LaTeX`,alias:[`tex`],extensions:[`text`,`ltx`,`tex`],load(){return Q(()=>import(`./stex-DNzd62Q_.js`).then(e=>$(e.stex)),[])}}),W.of({name:`SystemVerilog`,extensions:[`v`,`sv`,`svh`],load(){return Q(()=>import(`./verilog-CjI9Y6RI.js`).then(e=>$(e.verilog)),[])}}),W.of({name:`Tcl`,extensions:[`tcl`],load(){return Q(()=>import(`./tcl-BGfruO1u.js`).then(e=>$(e.tcl)),[])}}),W.of({name:`Textile`,extensions:[`textile`],load(){return Q(()=>import(`./textile-C4jVoHG1.js`).then(e=>$(e.textile)),[])}}),W.of({name:`TiddlyWiki`,load(){return Q(()=>import(`./tiddlywiki-VlUiK86J.js`).then(e=>$(e.tiddlyWiki)),[])}}),W.of({name:`Tiki wiki`,load(){return Q(()=>import(`./tiki-CvUEFusT.js`).then(e=>$(e.tiki)),[])}}),W.of({name:`TOML`,extensions:[`toml`],load(){return Q(()=>import(`./toml-BPTmHmyx.js`).then(e=>$(e.toml)),[])}}),W.of({name:`Troff`,extensions:[`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],load(){return Q(()=>import(`./troff-C2dAgh7P.js`).then(e=>$(e.troff)),[])}}),W.of({name:`TTCN`,extensions:[`ttcn`,`ttcn3`,`ttcnpp`],load(){return Q(()=>import(`./ttcn-PPSTk1ow.js`).then(e=>$(e.ttcn)),[])}}),W.of({name:`TTCN_CFG`,extensions:[`cfg`],load(){return Q(()=>import(`./ttcn-cfg-2b4Gb5sE.js`).then(e=>$(e.ttcnCfg)),[])}}),W.of({name:`Turtle`,extensions:[`ttl`],load(){return Q(()=>import(`./turtle-Cx3rYX2g.js`).then(e=>$(e.turtle)),[])}}),W.of({name:`Web IDL`,extensions:[`webidl`],load(){return Q(()=>import(`./webidl-D5jiJvOU.js`).then(e=>$(e.webIDL)),[])}}),W.of({name:`VB.NET`,extensions:[`vb`],load(){return Q(()=>import(`./vb-BthdM_4N.js`).then(e=>$(e.vb)),[])}}),W.of({name:`VBScript`,extensions:[`vbs`],load(){return Q(()=>import(`./vbscript-D9f6rSsU.js`).then(e=>$(e.vbScript)),[])}}),W.of({name:`Velocity`,extensions:[`vtl`],load(){return Q(()=>import(`./velocity-CqftRsjg.js`).then(e=>$(e.velocity)),[])}}),W.of({name:`Verilog`,extensions:[`v`],load(){return Q(()=>import(`./verilog-CjI9Y6RI.js`).then(e=>$(e.verilog)),[])}}),W.of({name:`VHDL`,extensions:[`vhd`,`vhdl`],load(){return Q(()=>import(`./vhdl-kS471soi.js`).then(e=>$(e.vhdl)),[])}}),W.of({name:`XQuery`,extensions:[`xy`,`xquery`,`xq`,`xqm`,`xqy`],load(){return Q(()=>import(`./xquery-BKJx4mf9.js`).then(e=>$(e.xQuery)),[])}}),W.of({name:`Yacas`,extensions:[`ys`],load(){return Q(()=>import(`./yacas-CXXgtw0p.js`).then(e=>$(e.yacas)),[])}}),W.of({name:`Z80`,extensions:[`z80`],load(){return Q(()=>import(`./z80-Co3PbHdE.js`).then(e=>$(e.z80)),[])}}),W.of({name:`MscGen`,extensions:[`mscgen`,`mscin`,`msc`],load(){return Q(()=>import(`./mscgen-qgSLujhx.js`).then(e=>$(e.mscgen)),[])}}),W.of({name:`Xù`,extensions:[`xu`],load(){return Q(()=>import(`./mscgen-qgSLujhx.js`).then(e=>$(e.xu)),[])}}),W.of({name:`MsGenny`,extensions:[`msgenny`],load(){return Q(()=>import(`./mscgen-qgSLujhx.js`).then(e=>$(e.msgenny)),[])}}),W.of({name:`Vue`,extensions:[`vue`],load(){return Q(()=>import(`./dist-_0g6iC9K.js`).then(e=>e.vue()),__vite__mapDeps([21,1]))}}),W.of({name:`Angular Template`,load(){return Q(()=>import(`./dist-Db_XhDui.js`).then(e=>e.angular()),__vite__mapDeps([22,1]))}})],$Q=et((e=>{var t=at(),n=lt();function r(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}var i=Symbol.for(`react.transitional.element`),a=Symbol.for(`react.portal`),o=Symbol.for(`react.fragment`),s=Symbol.for(`react.strict_mode`),c=Symbol.for(`react.profiler`),l=Symbol.for(`react.consumer`),u=Symbol.for(`react.context`),d=Symbol.for(`react.forward_ref`),f=Symbol.for(`react.suspense`),p=Symbol.for(`react.suspense_list`),m=Symbol.for(`react.memo`),h=Symbol.for(`react.lazy`),g=Symbol.for(`react.scope`),_=Symbol.for(`react.activity`),v=Symbol.for(`react.legacy_hidden`),y=Symbol.for(`react.memo_cache_sentinel`),b=Symbol.for(`react.view_transition`),x=Symbol.for(`react.recoverable`),S=Symbol.iterator;function C(e){return typeof e!=`object`||!e?null:(e=S&&e[S]||e[`@@iterator`],typeof e==`function`?e:null)}var w=Symbol.for(`react.optimistic_key`),T=Array.isArray;function E(e,t){var n=e.length&3,r=e.length-n,i=t;for(t=0;t<r;){var a=e.charCodeAt(t)&255|(e.charCodeAt(++t)&255)<<8|(e.charCodeAt(++t)&255)<<16|(e.charCodeAt(++t)&255)<<24;++t,a=3432918353*(a&65535)+((3432918353*(a>>>16)&65535)<<16)|0,a=a<<15|a>>>17,a=461845907*(a&65535)+((461845907*(a>>>16)&65535)<<16)|0,i^=a,i=i<<13|i>>>19,i=5*(i&65535)+((5*(i>>>16)&65535)<<16)|0,i=(i&65535)+27492+(((i>>>16)+58964&65535)<<16)}switch(a=0,n){case 3:a^=(e.charCodeAt(t+2)&255)<<16;case 2:a^=(e.charCodeAt(t+1)&255)<<8;case 1:a^=e.charCodeAt(t)&255,a=3432918353*(a&65535)+((3432918353*(a>>>16)&65535)<<16)|0,a=a<<15|a>>>17,i^=461845907*(a&65535)+((461845907*(a>>>16)&65535)<<16)|0}return i^=e.length,i^=i>>>16,i=2246822507*(i&65535)+((2246822507*(i>>>16)&65535)<<16)|0,i^=i>>>13,i=3266489909*(i&65535)+((3266489909*(i>>>16)&65535)<<16)|0,(i^i>>>16)>>>0}var D=Object.assign,O=Object.prototype.hasOwnProperty,k=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]*$`),A={},j={};function M(e){return O.call(j,e)?!0:O.call(A,e)?!1:k.test(e)?j[e]=!0:(A[e]=!0,!1)}var N=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(` `)),P=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`],[`maskType`,`mask-type`],[`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`]]),ee=/["'&<>]/;function F(e){if(typeof e==`boolean`||typeof e==`number`||typeof e==`bigint`)return``+e;e=``+e;var t=ee.exec(e);if(t){var n=``,r,i=0;for(r=t.index;r<e.length;r++){switch(e.charCodeAt(r)){case 34:t=`"`;break;case 38:t=`&`;break;case 39:t=`'`;break;case 60:t=`<`;break;case 62:t=`>`;break;default:continue}i!==r&&(n+=e.slice(i,r)),i=r+1,n+=t}e=i===r?n:n+e.slice(i,r)}return e}var I=/([A-Z])/g,L=/^ms-/,te=/^[\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 R(e){return te.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}var z=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne={pending:!1,data:null,method:null,action:null},re=B.d;B.d={f:re.f,r:re.r,D:ct,C:ut,L:dt,m:ft,X:q,S:pt,M:J};var ie=[],ae=null,oe=/(<\/|<)(s)(cript)/gi;function V(e,t,n,r){return``+t+(n===`s`?`\\u0073`:`\\u0053`)+r}function se(e,t,n,r,i){return{idPrefix:e===void 0?``:e,nextFormID:0,streamingFormat:0,bootstrapScriptContent:n,bootstrapScripts:r,bootstrapModules:i,instructions:0,hasBody:!1,hasHtml:!1,unknownResources:{},dnsResources:{},connectResources:{default:{},anonymous:{},credentials:{}},imageResources:{},styleResources:{},scriptResources:{},moduleUnknownResources:{},moduleScriptResources:{}}}function H(e,t,n,r){return{insertionMode:e,selectedValue:t,tagScope:n,viewTransition:r}}function ce(e,t,n){var r=e.tagScope&-25;switch(t){case`noscript`:return H(2,null,r|1,null);case`select`:return H(2,n.value==null?n.defaultValue:n.value,r,null);case`svg`:return H(4,null,r,null);case`picture`:return H(2,null,r|2,null);case`math`:return H(5,null,r,null);case`foreignObject`:return H(2,null,r,null);case`table`:return H(6,null,r,null);case`thead`:case`tbody`:case`tfoot`:return H(7,null,r,null);case`colgroup`:return H(9,null,r,null);case`tr`:return H(8,null,r,null);case`head`:if(2>e.insertionMode)return H(3,null,r,null);break;case`html`:if(e.insertionMode===0)return H(1,null,r,null)}return 6<=e.insertionMode||2>e.insertionMode?H(2,null,r,null):e.viewTransition!==null||e.tagScope!==r?H(e.insertionMode,e.selectedValue,r,null):e}function le(e){return e===null?null:{update:e.update,enter:`none`,exit:`none`,share:e.update,parentEnter:`none`,parentExit:`none`,name:e.autoName,autoName:e.autoName,nameIdx:0}}function U(e,t){return t.tagScope&32&&(e.instructions|=128),H(t.insertionMode,t.selectedValue,t.tagScope|12,le(t.viewTransition))}function ue(e,t){e=le(t.viewTransition);var n=t.tagScope|16;return e!==null&&e.share!==`none`&&(n|=64),H(t.insertionMode,t.selectedValue,n,e)}function de(e,t,n){return e=`_`+e.idPrefix+`R_`+t,0<n&&(e+=`H`+n.toString(32)),e+`_`}function fe(e,t){t=t.viewTransition,t!==null&&(t.name!==`auto`&&(ge(e,`vt-name`,t.nameIdx===0?t.name:t.name+`_`+t.nameIdx),t.nameIdx++),ge(e,`vt-update`,t.update),t.enter!==`none`&&ge(e,`vt-enter`,t.enter),t.exit!==`none`&&ge(e,`vt-exit`,t.exit),t.share!==`none`&&ge(e,`vt-share`,t.share))}var pe=new Map;function me(e,t){if(typeof t!=`object`)throw Error(r(62));var n=!0,i;for(i in t)if(O.call(t,i)){var a=t[i];if(a!=null&&typeof a!=`boolean`&&a!==``){if(i.indexOf(`--`)===0){var o=F(i);a=F((``+a).trim())}else o=pe.get(i),o===void 0&&(o=F(i.replace(I,`-$1`).toLowerCase().replace(L,`-ms-`)),pe.set(i,o)),a=typeof a==`number`?a===0||N.has(i)?``+a:a+`px`:F((``+a).trim());n?(n=!1,e.push(` style="`,o,`:`,a)):e.push(`;`,o,`:`,a)}}n||e.push(`"`)}function he(e,t,n){n&&typeof n!=`function`&&typeof n!=`symbol`&&e.push(` `,t,`=""`)}function ge(e,t,n){typeof n!=`function`&&typeof n!=`symbol`&&typeof n!=`boolean`&&e.push(` `,t,`="`,F(n),`"`)}var _e=F(`javascript:throw new Error('React form unexpectedly submitted.')`);function ve(e,t){this.push(`<input type="hidden"`),ye(e),ge(this,`name`,t),ge(this,`value`,e),this.push(`/>`)}function ye(e){if(typeof e!=`string`)throw Error(r(480))}function be(e,t){if(typeof t.$$FORM_ACTION==`function`){var n=e.nextFormID++;e=e.idPrefix+n;try{var r=t.$$FORM_ACTION(e);return r&&r.data?.forEach(ye),r}catch(e){if(typeof e==`object`&&e&&typeof e.then==`function`)throw e}}return null}function xe(e,t,n,r,i,a,o,s){var c=null;if(typeof r==`function`){var l=be(t,r);l===null?(e.push(` `,`formAction`,`="`,_e,`"`),o=a=i=r=s=null,we(t,n)):(s=l.name,r=l.action||``,i=l.encType,a=l.method,o=l.target,c=l.data)}return s!=null&&W(e,`name`,s),r!=null&&W(e,`formAction`,r),i!=null&&W(e,`formEncType`,i),a!=null&&W(e,`formMethod`,a),o!=null&&W(e,`formTarget`,o),c}function W(e,t,n){switch(t){case`className`:ge(e,`class`,n);break;case`tabIndex`:ge(e,`tabindex`,n);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:ge(e,t,n);break;case`style`:me(e,n);break;case`src`:case`href`:if(n===``)break;case`action`:case`formAction`:if(n==null||typeof n==`function`||typeof n==`symbol`||typeof n==`boolean`)break;n=R(``+n),e.push(` `,t,`="`,F(n),`"`);break;case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`ref`:break;case`autoFocus`:case`multiple`:case`muted`:he(e,t.toLowerCase(),n);break;case`xlinkHref`:if(typeof n==`function`||typeof n==`symbol`||typeof n==`boolean`)break;n=R(``+n),e.push(` `,`xlink:href`,`="`,F(n),`"`);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:typeof n!=`function`&&typeof n!=`symbol`&&e.push(` `,t,`="`,F(n),`"`);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`credentialless`: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`:n&&typeof n!=`function`&&typeof n!=`symbol`&&e.push(` `,t,`=""`);break;case`capture`:case`download`:!0===n?e.push(` `,t,`=""`):!1!==n&&typeof n!=`function`&&typeof n!=`symbol`&&e.push(` `,t,`="`,F(n),`"`);break;case`cols`:case`rows`:case`size`:case`span`:typeof n!=`function`&&typeof n!=`symbol`&&!isNaN(n)&&1<=n&&e.push(` `,t,`="`,F(n),`"`);break;case`rowSpan`:case`start`:typeof n==`function`||typeof n==`symbol`||isNaN(n)||e.push(` `,t,`="`,F(n),`"`);break;case`xlinkActuate`:ge(e,`xlink:actuate`,n);break;case`xlinkArcrole`:ge(e,`xlink:arcrole`,n);break;case`xlinkRole`:ge(e,`xlink:role`,n);break;case`xlinkShow`:ge(e,`xlink:show`,n);break;case`xlinkTitle`:ge(e,`xlink:title`,n);break;case`xlinkType`:ge(e,`xlink:type`,n);break;case`xmlBase`:ge(e,`xml:base`,n);break;case`xmlLang`:ge(e,`xml:lang`,n);break;case`xmlSpace`:ge(e,`xml:space`,n);break;default:if((!(2<t.length)||t[0]!==`o`&&t[0]!==`O`||t[1]!==`n`&&t[1]!==`N`)&&(t=P.get(t)||t,M(t))){switch(typeof n){case`function`:case`symbol`:return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`)return}e.push(` `,t,`="`,F(n),`"`)}}}function Se(e,t,n){if(t!=null){if(n!=null)throw Error(r(60));if(typeof t!=`object`||!(`__html`in t))throw Error(r(61));t=t.__html,t!=null&&e.push(``+t)}}function Ce(e){var n=``;return t.Children.forEach(e,function(e){e!=null&&(n+=e)}),n}function we(e,t){if(!(e.instructions&16)){e.instructions|=16;var n=t.preamble,r=t.bootstrapChunks;(n.htmlChunks||n.headChunks)&&r.length===0?(r.push(t.startInlineScript),rt(r,e),r.push(`>`,`addEventListener("submit",function(a){if(!a.defaultPrevented){var b=a.target,d=a.submitter,c=b.action,e=d;if(d){var f=d.getAttribute("formAction");null!=f&&(c=f,e=null)}"javascript:throw new Error('React form unexpectedly submitted.')"===c&&(a.preventDefault(),a=new FormData(b,e),c=b.ownerDocument||b,(c.$$reactFormReplay=c.$$reactFormReplay||[]).push(b,d,a))}});`,`<\/script>`)):r.unshift(t.startInlineScript,`>`,`addEventListener("submit",function(a){if(!a.defaultPrevented){var b=a.target,d=a.submitter,c=b.action,e=d;if(d){var f=d.getAttribute("formAction");null!=f&&(c=f,e=null)}"javascript:throw new Error('React form unexpectedly submitted.')"===c&&(a.preventDefault(),a=new FormData(b,e),c=b.ownerDocument||b,(c.$$reactFormReplay=c.$$reactFormReplay||[]).push(b,d,a))}});`,`<\/script>`)}}function Te(e,t){for(var n in e.push(Fe(`link`)),t)if(O.call(t,n)){var i=t[n];if(i!=null)switch(n){case`children`:case`dangerouslySetInnerHTML`:throw Error(r(399,`link`));default:W(e,n,i)}}return e.push(`/>`),null}var Ee=/(<\/|<)(s)(tyle)/gi;function De(e,t,n,r){return``+t+(n===`s`?`\\73 `:`\\53 `)+r}function Oe(e,t,n,i){for(var a in e.push(Fe(n)),t)if(O.call(t,a)){var o=t[a];if(o!=null)switch(a){case`children`:case`dangerouslySetInnerHTML`:throw Error(r(399,n));default:W(e,a,o)}}return fe(e,i),e.push(`/>`),null}function ke(e,t){e.push(Fe(`title`));var n=null,r=null,i;for(i in t)if(O.call(t,i)){var a=t[i];if(a!=null)switch(i){case`children`:n=a;break;case`dangerouslySetInnerHTML`:r=a;break;default:W(e,i,a)}}return e.push(`>`),t=Array.isArray(n)?2>n.length?n[0]:null:n,typeof t!=`function`&&typeof t!=`symbol`&&t!=null&&e.push(F(``+t)),Se(e,r,n),e.push(Re(`title`)),null}function Ae(e,t){e.push(Fe(`script`));var n=null,r=null,i;for(i in t)if(O.call(t,i)){var a=t[i];if(a!=null)switch(i){case`children`:n=a;break;case`dangerouslySetInnerHTML`:r=a;break;default:W(e,i,a)}}return e.push(`>`),Se(e,r,n),typeof n==`string`&&e.push((``+n).replace(oe,V)),e.push(Re(`script`)),null}function je(e,t,n,r){e.push(Fe(n));var i=n=null,a;for(a in t)if(O.call(t,a)){var o=t[a];if(o!=null)switch(a){case`children`:n=o;break;case`dangerouslySetInnerHTML`:i=o;break;default:W(e,a,o)}}return fe(e,r),e.push(`>`),Se(e,i,n),n}function Me(e,t,n,r){e.push(Fe(n));var i=n=null,a;for(a in t)if(O.call(t,a)){var o=t[a];if(o!=null)switch(a){case`children`:n=o;break;case`dangerouslySetInnerHTML`:i=o;break;default:W(e,a,o)}}return fe(e,r),e.push(`>`),Se(e,i,n),typeof n==`string`?(e.push(F(n)),null):n}var Ne=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,Pe=new Map;function Fe(e){var t=Pe.get(e);if(t===void 0){if(!Ne.test(e))throw Error(r(65,e));t=`<`+e,Pe.set(e,t)}return t}function Ie(e,t,n,i,a,o,s,c,l){switch(t){case`div`:case`span`:case`svg`:case`path`:break;case`a`:e.push(Fe(`a`));var u=null,d=null,f;for(f in n)if(O.call(n,f)){var p=n[f];if(p!=null)switch(f){case`children`:u=p;break;case`dangerouslySetInnerHTML`:d=p;break;case`href`:p===``?ge(e,`href`,``):W(e,f,p);break;default:W(e,f,p)}}if(fe(e,c),e.push(`>`),Se(e,d,u),typeof u==`string`){e.push(F(u));var m=null}else m=u;return m;case`g`:case`p`:case`li`:break;case`select`:e.push(Fe(`select`));var h=null,g=null,_;for(_ in n)if(O.call(n,_)){var v=n[_];if(v!=null)switch(_){case`children`:h=v;break;case`dangerouslySetInnerHTML`:g=v;break;case`defaultValue`:case`value`:break;default:W(e,_,v)}}return fe(e,c),e.push(`>`),Se(e,g,h),h;case`option`:var y=c.selectedValue;e.push(Fe(`option`));var b=null,x=null,S=null,C=null,w;for(w in n)if(O.call(n,w)){var E=n[w];if(E!=null)switch(w){case`children`:b=E;break;case`selected`:S=E;break;case`dangerouslySetInnerHTML`:C=E;break;case`value`:x=E;default:W(e,w,E)}}if(y!=null){var k=x===null?Ce(b):``+x;if(T(y)){for(var A=0;A<y.length;A++)if(``+y[A]===k){e.push(` selected=""`);break}}else``+y===k&&e.push(` selected=""`)}else S&&e.push(` selected=""`);return e.push(`>`),Se(e,C,b),b;case`textarea`:e.push(Fe(`textarea`));var j=null,N=null,P=null,ee;for(ee in n)if(O.call(n,ee)){var I=n[ee];if(I!=null)switch(ee){case`children`:P=I;break;case`value`:j=I;break;case`defaultValue`:N=I;break;case`dangerouslySetInnerHTML`:throw Error(r(91));default:W(e,ee,I)}}if(j===null&&N!==null&&(j=N),fe(e,c),e.push(`>`),P!=null){if(j!=null)throw Error(r(92));if(T(P)){if(1<P.length)throw Error(r(93));j=``+P[0]}j=``+P}return typeof j==`string`&&j[0]===`
|
|
252
|
+
}`,{label:`enum`,detail:`definition`,type:`keyword`})]),cX=new te,lX=new Set([`Script`,`Block`,`FunctionExpression`,`FunctionDeclaration`,`ArrowFunction`,`MethodDeclaration`,`ForStatement`]);function uX(e){return(t,n)=>{let r=t.node.getChild(`VariableDefinition`);return r&&n(r,e),!0}}var dX=[`FunctionDeclaration`],fX={FunctionDeclaration:uX(`function`),ClassDeclaration:uX(`class`),ClassExpression:()=>!0,EnumDeclaration:uX(`constant`),TypeAliasDeclaration:uX(`type`),NamespaceDeclaration:uX(`namespace`),VariableDefinition(e,t){e.matchContext(dX)||t(e,`variable`)},TypeDefinition(e,t){t(e,`type`)},__proto__:null};function pX(e,t){let n=cX.get(t);if(n)return n;let i=[],a=!0;function o(t,n){let r=e.sliceString(t.from,t.to);i.push({label:r,type:n})}return t.cursor(r.IncludeAnonymous).iterate(t=>{if(a)a=!1;else if(t.name){let e=fX[t.name];if(e&&e(t,o)||lX.has(t.name))return!1}else if(t.to-t.from>8192){for(let n of pX(e,t.node))i.push(n);return!1}}),cX.set(t,i),i}var mX=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,hX=[`TemplateString`,`String`,`RegExp`,`LineComment`,`BlockComment`,`VariableDefinition`,`TypeDefinition`,`Label`,`PropertyDefinition`,`PropertyName`,`PrivatePropertyDefinition`,`PrivatePropertyName`,`JSXText`,`JSXAttributeValue`,`JSXOpenTag`,`JSXCloseTag`,`JSXSelfClosingTag`,`.`,`?.`];function gX(e){let t=d(e.state).resolveInner(e.pos,-1);if(hX.indexOf(t.name)>-1)return null;let n=t.name==`VariableName`||t.to-t.from<20&&mX.test(e.state.sliceDoc(t.from,t.to));if(!n&&!e.explicit)return null;let r=[];for(let n=t;n;n=n.parent)lX.has(n.name)&&(r=r.concat(pX(e.state.doc,n)));return{options:r,from:n?t.from:e.pos,validFor:mX}}var _X=Pe.define({name:`javascript`,parser:iX.configure({props:[s.add({IfStatement:me({except:/^\s*({|else\b)/}),TryStatement:me({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:Ge,SwitchBody:e=>{let t=e.textAfter,n=/^\s*\}/.test(t),r=/^\s*(case|default)\b/.test(t);return e.baseIndent+(n?0:r?1:2)*e.unit},Block:Be({closing:`}`}),ArrowFunction:e=>e.baseIndent+e.unit,"TemplateString BlockComment":()=>null,"Statement Property":me({except:/^\s*{/}),JSXElement(e){let t=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},JSXEscape(e){let t=/\s*\}/.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},"JSXOpenTag JSXSelfClosingTag"(e){return e.column(e.node.from)+e.unit}}),a.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":Ue,BlockComment(e){return{from:e.from+2,to:e.to-2}},JSXElement(e){let t=e.firstChild;if(!t||t.name==`JSXSelfClosingTag`)return null;let n=e.lastChild;return{from:t.to,to:n.type.isError?e.to:n.from}},"JSXSelfClosingTag JSXOpenTag"(e){let t=e.firstChild?.nextSibling,n=e.lastChild;return!t||t.type.isError?null:{from:t.to,to:n.type.isError?e.to:n.from}}})]}),languageData:{closeBrackets:{brackets:[`(`,`[`,`{`,`'`,`"`,"`"]},commentTokens:{line:`//`,block:{open:`/*`,close:`*/`}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:`$`}}),vX={test:e=>/^JSX/.test(e.name),facet:ne({commentTokens:{block:{open:`{/*`,close:`*/}`}}})},yX=_X.configure({dialect:`ts`},`typescript`),bX=_X.configure({dialect:`jsx`,props:[C.add(e=>e.isTop?[vX]:void 0)]}),xX=_X.configure({dialect:`jsx ts`,props:[C.add(e=>e.isTop?[vX]:void 0)]},`typescript`),SX=e=>({label:e,type:`keyword`}),CX=`break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield`.split(` `).map(SX),wX=CX.concat([`declare`,`implements`,`private`,`protected`,`public`].map(SX));function TX(e={}){let t=e.jsx?e.typescript?xX:bX:e.typescript?yX:_X,n=e.typescript?sX.concat(wX):oX.concat(CX);return new Re(t,[_X.data.of({autocomplete:Tz(hX,wz(n))}),_X.data.of({autocomplete:gX}),e.jsx?kX:[]])}function EX(e){for(;;){if(e.name==`JSXOpenTag`||e.name==`JSXSelfClosingTag`||e.name==`JSXFragmentTag`)return e;if(e.name==`JSXEscape`||!e.parent)return null;e=e.parent}}function DX(e,t,n=e.length){for(let r=t?.firstChild;r;r=r.nextSibling)if(r.name==`JSXIdentifier`||r.name==`JSXBuiltin`||r.name==`JSXNamespacedName`||r.name==`JSXMemberExpression`)return e.sliceString(r.from,Math.min(r.to,n));return``}var OX=typeof navigator==`object`&&/Android\b/.test(navigator.userAgent),kX=R.inputHandler.of((e,t,n,r,i)=>{if((OX?e.composing:e.compositionStarted)||e.state.readOnly||t!=n||r!=`>`&&r!=`/`||!_X.isActiveAt(e.state,t,-1))return!1;let a=i(),{state:o}=a,s=o.changeByRange(e=>{let{head:t}=e,n=d(o).resolveInner(t-1,-1),i;if(n.name==`JSXStartTag`&&(n=n.parent),!(o.doc.sliceString(t-1,t)!=r||n.name==`JSXAttributeValue`&&n.to>t)){if(r==`>`&&n.name==`JSXFragmentTag`)return{range:e,changes:{from:t,insert:`</>`}};if(r==`/`&&n.name==`JSXStartCloseTag`){let e=n.parent,r=e.parent;if(r&&e.from==t-2&&((i=DX(o.doc,r.firstChild,t))||r.firstChild?.name==`JSXFragmentTag`)){let e=`${i}>`;return{range:G.cursor(t+e.length,-1),changes:{from:t,insert:e}}}}else if(r==`>`){let r=EX(n);if(r&&r.name==`JSXOpenTag`&&!/^\/?>|^<\//.test(o.doc.sliceString(t,t+2))&&(i=DX(o.doc,r,t)))return{range:e,changes:{from:t,insert:`</${i}>`}}}}return{range:e}});return!s.changes.empty&&(e.dispatch([a,o.update(s,{userEvent:`input.complete`,scrollIntoView:!0})]),!0)}),AX=tt({autoCloseTags:()=>cZ,html:()=>aZ,htmlCompletionSource:()=>QX,htmlCompletionSourceWith:()=>$X,htmlLanguage:()=>iZ}),jX=[`_blank`,`_self`,`_top`,`_parent`],MX=[`ascii`,`utf-8`,`utf-16`,`latin1`,`latin1`],NX=[`get`,`post`,`put`,`delete`],PX=[`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`],FX=[`true`,`false`],IX={},LX={a:{attrs:{href:null,ping:null,type:null,media:null,target:jX,hreflang:null}},abbr:IX,address:IX,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:[`default`,`rect`,`circle`,`poly`]}},article:IX,aside:IX,audio:{attrs:{src:null,mediagroup:null,crossorigin:[`anonymous`,`use-credentials`],preload:[`none`,`metadata`,`auto`],autoplay:[`autoplay`],loop:[`loop`],controls:[`controls`]}},b:IX,base:{attrs:{href:null,target:jX}},bdi:IX,bdo:IX,blockquote:{attrs:{cite:null}},body:IX,br:IX,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:[`autofocus`],disabled:[`autofocus`],formenctype:PX,formmethod:NX,formnovalidate:[`novalidate`],formtarget:jX,type:[`submit`,`reset`,`button`]}},canvas:{attrs:{width:null,height:null}},caption:IX,center:IX,cite:IX,code:IX,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:[`command`,`checkbox`,`radio`],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:[`disabled`],checked:[`checked`]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:[`disabled`],multiple:[`multiple`]}},datalist:{attrs:{data:null}},dd:IX,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:[`open`]}},dfn:IX,div:IX,dl:IX,dt:IX,em:IX,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:[`disabled`],form:null,name:null}},figcaption:IX,figure:IX,footer:IX,form:{attrs:{action:null,name:null,"accept-charset":MX,autocomplete:[`on`,`off`],enctype:PX,method:NX,novalidate:[`novalidate`],target:jX}},h1:IX,h2:IX,h3:IX,h4:IX,h5:IX,h6:IX,head:{children:[`title`,`base`,`link`,`style`,`meta`,`script`,`noscript`,`command`]},header:IX,hgroup:IX,hr:IX,html:{attrs:{manifest:null}},i:IX,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:[`allow-top-navigation`,`allow-same-origin`,`allow-forms`,`allow-scripts`],seamless:[`seamless`]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:[`anonymous`,`use-credentials`]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:[`audio/*`,`video/*`,`image/*`],autocomplete:[`on`,`off`],autofocus:[`autofocus`],checked:[`checked`],disabled:[`disabled`],formenctype:PX,formmethod:NX,formnovalidate:[`novalidate`],formtarget:jX,multiple:[`multiple`],readonly:[`readonly`],required:[`required`],type:[`hidden`,`text`,`search`,`tel`,`url`,`email`,`password`,`datetime`,`date`,`month`,`week`,`time`,`datetime-local`,`number`,`range`,`color`,`checkbox`,`radio`,`file`,`submit`,`image`,`reset`,`button`]}},ins:{attrs:{cite:null,datetime:null}},kbd:IX,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:[`autofocus`],disabled:[`disabled`],keytype:[`RSA`]}},label:{attrs:{for:null,form:null}},legend:IX,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:[`all`,`16x16`,`16x16 32x32`,`16x16 32x32 64x64`]}},map:{attrs:{name:null}},mark:IX,menu:{attrs:{label:null,type:[`list`,`context`,`toolbar`]}},meta:{attrs:{content:null,charset:MX,name:[`viewport`,`application-name`,`author`,`description`,`generator`,`keywords`],"http-equiv":[`content-language`,`content-type`,`default-style`,`refresh`]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:IX,noscript:IX,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:[`typemustmatch`]}},ol:{attrs:{reversed:[`reversed`],start:null,type:[`1`,`a`,`A`,`i`,`I`]},children:[`li`,`script`,`template`,`ul`,`ol`]},optgroup:{attrs:{disabled:[`disabled`],label:null}},option:{attrs:{disabled:[`disabled`],label:null,selected:[`selected`],value:null}},output:{attrs:{for:null,form:null,name:null}},p:IX,param:{attrs:{name:null,value:null}},pre:IX,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:IX,rt:IX,ruby:IX,samp:IX,script:{attrs:{type:[`text/javascript`],src:null,async:[`async`],defer:[`defer`],charset:MX}},section:IX,select:{attrs:{form:null,name:null,size:null,autofocus:[`autofocus`],disabled:[`disabled`],multiple:[`multiple`]}},slot:{attrs:{name:null}},small:IX,source:{attrs:{src:null,type:null,media:null}},span:IX,strong:IX,style:{attrs:{type:[`text/css`],media:null,scoped:null}},sub:IX,summary:IX,sup:IX,table:IX,tbody:IX,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:IX,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:[`autofocus`],disabled:[`disabled`],readonly:[`readonly`],required:[`required`],wrap:[`soft`,`hard`]}},tfoot:IX,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:[`row`,`col`,`rowgroup`,`colgroup`]}},thead:IX,time:{attrs:{datetime:null}},title:IX,tr:IX,track:{attrs:{src:null,label:null,default:null,kind:[`subtitles`,`captions`,`descriptions`,`chapters`,`metadata`],srclang:null}},ul:{children:[`li`,`script`,`template`,`ul`,`ol`]},var:IX,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:[`anonymous`,`use-credentials`],preload:[`auto`,`metadata`,`none`],autoplay:[`autoplay`],mediagroup:[`movie`],muted:[`muted`],controls:[`controls`]}},wbr:IX},RX={accesskey:null,class:null,contenteditable:FX,contextmenu:null,dir:[`ltr`,`rtl`,`auto`],draggable:[`true`,`false`,`auto`],dropzone:[`copy`,`move`,`link`,`string:`,`file:`],hidden:[`hidden`],id:null,inert:[`inert`],itemid:null,itemprop:null,itemref:null,itemscope:[`itemscope`],itemtype:null,lang:[`ar`,`bn`,`de`,`en-GB`,`en-US`,`es`,`fr`,`hi`,`id`,`ja`,`pa`,`pt`,`ru`,`tr`,`zh`],spellcheck:FX,autocorrect:FX,autocapitalize:FX,style:null,tabindex:null,title:null,translate:[`yes`,`no`],rel:[`stylesheet`,`alternate`,`author`,`bookmark`,`help`,`license`,`next`,`nofollow`,`noreferrer`,`prefetch`,`prev`,`search`,`tag`],role:`alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer`.split(` `),"aria-activedescendant":null,"aria-atomic":FX,"aria-autocomplete":[`inline`,`list`,`both`,`none`],"aria-busy":FX,"aria-checked":[`true`,`false`,`mixed`,`undefined`],"aria-controls":null,"aria-describedby":null,"aria-disabled":FX,"aria-dropeffect":null,"aria-expanded":[`true`,`false`,`undefined`],"aria-flowto":null,"aria-grabbed":[`true`,`false`,`undefined`],"aria-haspopup":FX,"aria-hidden":FX,"aria-invalid":[`true`,`false`,`grammar`,`spelling`],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":[`off`,`polite`,`assertive`],"aria-multiline":FX,"aria-multiselectable":FX,"aria-owns":null,"aria-posinset":null,"aria-pressed":[`true`,`false`,`mixed`,`undefined`],"aria-readonly":FX,"aria-relevant":null,"aria-required":FX,"aria-selected":[`true`,`false`,`undefined`],"aria-setsize":null,"aria-sort":[`ascending`,`descending`,`none`,`other`],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},zX=`beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload`.split(` `).map(e=>`on`+e);for(let e of zX)RX[e]=null;var BX=class{constructor(e,t){this.tags={...LX,...e},this.globalAttrs={...RX,...t},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}};BX.default=new BX;function VX(e,t,n=e.length){if(!t)return``;let r=t.firstChild,i=r&&r.getChild(`TagName`);return i?e.sliceString(i.from,Math.min(i.to,n)):``}function HX(e,t=!1){for(;e;e=e.parent)if(e.name==`Element`){if(t)t=!1;else return e}return null}function UX(e,t,n){return n.tags[VX(e,HX(t))]?.children||n.allTags}function WX(e,t){let n=[];for(let r=HX(t);r&&!r.type.isTop;r=HX(r.parent)){let i=VX(e,r);if(i&&r.lastChild.name==`CloseTag`)break;i&&n.indexOf(i)<0&&(t.name==`EndTag`||t.from>=r.firstChild.to)&&n.push(i)}return n}var GX=/^[:\-\.\w\u00b7-\uffff]*$/;function KX(e,t,n,r,i){let a=/\s*>/.test(e.sliceDoc(i,i+5))?``:`>`,o=HX(n,n.name==`StartTag`||n.name==`TagName`);return{from:r,to:i,options:UX(e.doc,o,t).map(e=>({label:e,type:`type`})).concat(WX(e.doc,n).map((e,t)=>({label:`/`+e,apply:`/`+e+a,type:`type`,boost:99-t}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function qX(e,t,n,r){let i=/\s*>/.test(e.sliceDoc(r,r+5))?``:`>`;return{from:n,to:r,options:WX(e.doc,t).map((e,t)=>({label:e,apply:e+i,type:`type`,boost:99-t})),validFor:GX}}function JX(e,t,n,r){let i=[],a=0;for(let r of UX(e.doc,n,t))i.push({label:`<`+r,type:`type`});for(let t of WX(e.doc,n))i.push({label:`</`+t+`>`,type:`type`,boost:99-a++});return{from:r,to:r,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function YX(e,t,n,r,i){let a=HX(n),o=a?t.tags[VX(e.doc,a)]:null,s=o&&o.attrs?Object.keys(o.attrs):[];return{from:r,to:i,options:(o&&o.globalAttrs===!1?s:s.length?s.concat(t.globalAttrNames):t.globalAttrNames).map(e=>({label:e,type:`property`})),validFor:GX}}function XX(e,t,n,r,i){let a=n.parent?.getChild(`AttributeName`),o=[],s;if(a){let c=e.sliceDoc(a.from,a.to),l=t.globalAttrs[c];if(!l){let r=HX(n),i=r?t.tags[VX(e.doc,r)]:null;l=i?.attrs&&i.attrs[c]}if(l){let t=e.sliceDoc(r,i).toLowerCase(),n=`"`,a=`"`;/^['"]/.test(t)?(s=t[0]==`"`?/^[^"]*$/:/^[^']*$/,n=``,a=e.sliceDoc(i,i+1)==t[0]?``:t[0],t=t.slice(1),r++):s=/^[^\s<>='"]*$/;for(let e of l)o.push({label:e,apply:n+e+a,type:`constant`})}}return{from:r,to:i,options:o,validFor:s}}function ZX(e,t){let{state:n,pos:r}=t,i=d(n).resolveInner(r,-1),a=i.resolve(r);for(let e=r,t;a==i&&(t=i.childBefore(e));){let n=t.lastChild;if(!n||!n.type.isError||n.from<n.to)break;a=i=t,e=n.from}return i.name==`TagName`?i.parent&&/CloseTag$/.test(i.parent.name)?qX(n,i,i.from,r):KX(n,e,i,i.from,r):i.name==`StartTag`||i.name==`IncompleteTag`?KX(n,e,i,r,r):i.name==`StartCloseTag`||i.name==`IncompleteCloseTag`?qX(n,i,r,r):i.name==`OpenTag`||i.name==`SelfClosingTag`||i.name==`AttributeName`?YX(n,e,i,i.name==`AttributeName`?i.from:r,r):i.name==`Is`||i.name==`AttributeValue`||i.name==`UnquotedAttributeValue`?XX(n,e,i,i.name==`Is`?r:i.from,r):t.explicit&&(a.name==`Element`||a.name==`Text`||a.name==`Document`)?JX(n,e,i,r):null}function QX(e){return ZX(BX.default,e)}function $X(e){let{extraTags:t,extraGlobalAttributes:n}=e,r=n||t?new BX(t,n):BX.default;return e=>ZX(r,e)}var eZ=_X.parser.configure({top:`SingleExpression`}),tZ=[{tag:`script`,attrs:e=>e.type==`text/typescript`||e.lang==`ts`,parser:yX.parser},{tag:`script`,attrs:e=>e.type==`text/babel`||e.type==`text/jsx`,parser:bX.parser},{tag:`script`,attrs:e=>e.type==`text/typescript-jsx`,parser:xX.parser},{tag:`script`,attrs(e){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(e.type)},parser:eZ},{tag:`script`,attrs(e){return!e.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(e.type)},parser:_X.parser},{tag:`style`,attrs(e){return(!e.lang||e.lang==`css`)&&(!e.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(e.type))},parser:xY.parser}],nZ=[{name:`style`,parser:xY.parser.configure({top:`Styles`})}].concat(zX.map(e=>({name:e,parser:_X.parser}))),rZ=Pe.define({name:`html`,parser:gJ.configure({props:[s.add({Element(e){let t=/^(\s*)(<\/)?/.exec(e.textAfter);return e.node.to<=e.pos+t[0].length?e.continue():e.lineIndent(e.node.from)+(t[2]?0:e.unit)},"OpenTag CloseTag SelfClosingTag"(e){return e.column(e.node.from)+e.unit},Document(e){if(e.pos+/\s*/.exec(e.textAfter)[0].length<e.node.to)return e.continue();let t=null,n;for(let n=e.node;;){let e=n.lastChild;if(!e||e.name!=`Element`||e.to!=n.to)break;t=n=e}return t&&!((n=t.lastChild)&&(n.name==`CloseTag`||n.name==`SelfClosingTag`))?e.lineIndent(t.from)+e.unit:null}}),a.add({Element(e){let t=e.firstChild,n=e.lastChild;return!t||t.name!=`OpenTag`?null:{from:t.to,to:n.name==`CloseTag`?n.from:e.to}}}),Ce.add({"OpenTag CloseTag":e=>e.getChild(`TagName`)})]}),languageData:{commentTokens:{block:{open:`<!--`,close:`-->`}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:`-_`}}),iZ=rZ.configure({wrap:bJ(tZ,nZ)});function aZ(e={}){let t=``,n;e.matchClosingTags===!1&&(t=`noMatch`),e.selfClosingTags===!0&&(t=(t?t+` `:``)+`selfClosing`),(e.nestedLanguages&&e.nestedLanguages.length||e.nestedAttributes&&e.nestedAttributes.length)&&(n=bJ((e.nestedLanguages||[]).concat(tZ),(e.nestedAttributes||[]).concat(nZ)));let r=n?rZ.configure({wrap:n,dialect:t}):t?iZ.configure({dialect:t}):iZ;return new Re(r,[iZ.data.of({autocomplete:$X(e)}),e.autoCloseTags===!1?[]:cZ,TX().support,SY().support])}var oZ=new Set(`area base br col command embed frame hr img input keygen link meta param source track wbr menuitem`.split(` `));function sZ(e,t,n){for(;;){if(t.lastChild?.name!=`CloseTag`)return!1;let r=t.parent;if(!r||VX(e,r)!=n)return!0;t=r}}var cZ=R.inputHandler.of((e,t,n,r,i)=>{if(e.composing||e.state.readOnly||t!=n||r!=`>`&&r!=`/`||!iZ.isActiveAt(e.state,t,-1))return!1;let a=i(),{state:o}=a,s=o.changeByRange(e=>{let t=o.doc.sliceString(e.from-1,e.to)==r,{head:n}=e,i=d(o).resolveInner(n,-1),a;if(t&&r==`>`&&i.name==`EndTag`){let t=i.parent;if((a=VX(o.doc,t.parent,n))&&!oZ.has(a)&&!sZ(o.doc,t.parent,a))return{range:e,changes:{from:n,to:n+ +(o.doc.sliceString(n,n+1)===`>`),insert:`</${a}>`}}}else if(t&&r==`/`&&i.name==`IncompleteCloseTag`){let e=i.parent;if(i.from==n-2&&e.lastChild?.name!=`CloseTag`&&(a=VX(o.doc,e,n))&&!oZ.has(a)){let e=n+ +(o.doc.sliceString(n,n+1)===`>`),t=`${a}>`;return{range:G.cursor(n+t.length,-1),changes:{from:n,to:e,insert:t}}}}return{range:e}});return!s.changes.empty&&(e.dispatch([a,o.update(s,{userEvent:`input.complete`,scrollIntoView:!0})]),!0)}),lZ=tt({commonmarkLanguage:()=>vZ,deleteMarkupBackward:()=>MZ,insertNewlineContinueMarkup:()=>DZ,insertNewlineContinueMarkupCommand:()=>EZ,markdown:()=>FZ,markdownKeymap:()=>NZ,markdownLanguage:()=>yZ,pasteURLAsLink:()=>BZ}),uZ=ne({commentTokens:{block:{open:`<!--`,close:`-->`}}}),dZ=new I,fZ=BK.configure({props:[a.add(e=>!e.is(`Block`)||e.is(`Document`)||pZ(e)!=null||mZ(e)?void 0:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})),dZ.add(pZ),s.add({Document:()=>null}),ve.add({Document:uZ})]});function pZ(e){let t=/^(?:ATX|Setext)Heading(\d)$/.exec(e.name);return t?+t[1]:void 0}function mZ(e){return e.name==`OrderedList`||e.name==`BulletList`}function hZ(e,t){let n=e;for(;;){let e=n.nextSibling,r;if(!e||(r=pZ(e.type))!=null&&r<=t)break;n=e}return n.to}var gZ=He.of((e,t,n)=>{for(let r=d(e).resolveInner(n,-1);r&&!(r.from<t);r=r.parent){let e=r.type.prop(dZ);if(e==null)continue;let t=hZ(r,e);if(t>n)return{from:n,to:t}}return null});function _Z(e){return new se(uZ,e,[],`markdown`)}var vZ=_Z(fZ),yZ=_Z(fZ.configure([oq,lq,cq,uq,{props:[a.add({Table:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}]));function bZ(e,t){return n=>{if(n&&e){let t=null;if(n=/\S*/.exec(n)[0],t=typeof e==`function`?e(n):W.matchLanguageName(e,n,!0),t instanceof W)return t.support?t.support.language.parser:ce.getSkippingParser(t.load());if(t)return t.parser}return t?t.parser:null}}var xZ=class{constructor(e,t,n,r,i,a,o){this.node=e,this.from=t,this.to=n,this.spaceBefore=r,this.spaceAfter=i,this.type=a,this.item=o}blank(e,t=!0){let n=this.spaceBefore+(this.node.name==`Blockquote`?`>`:``);if(e!=null){for(;n.length<e;)n+=` `;return n}for(let e=this.to-this.from-n.length-this.spaceAfter.length;e>0;e--)n+=` `;return n+(t?this.spaceAfter:``)}marker(e,t){let n=this.node.name==`OrderedList`?String(+CZ(this.item,e)[2]+t):``;return this.spaceBefore+n+this.type+this.spaceAfter}};function SZ(e,t){let n=[],r=[];for(let t=e;t;t=t.parent){if(t.name==`FencedCode`)return r;(t.name==`ListItem`||t.name==`Blockquote`)&&n.push(t)}for(let e=n.length-1;e>=0;e--){let i=n[e],a,o=t.lineAt(i.from),s=i.from-o.from;if(i.name==`Blockquote`&&(a=/^ *>( ?)/.exec(o.text.slice(s))))r.push(new xZ(i,s,s+a[0].length,``,a[1],`>`,null));else if(i.name==`ListItem`&&i.parent.name==`OrderedList`&&(a=/^( *)\d+([.)])( *)/.exec(o.text.slice(s)))){let e=a[3],t=a[0].length;e.length>=4&&(e=e.slice(0,e.length-4),t-=4),r.push(new xZ(i.parent,s,s+t,a[1],e,a[2],i))}else if(i.name==`ListItem`&&i.parent.name==`BulletList`&&(a=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(o.text.slice(s)))){let e=a[4],t=a[0].length;e.length>4&&(e=e.slice(0,e.length-4),t-=4);let n=a[2];a[3]&&(n+=a[3].replace(/[xX]/,` `)),r.push(new xZ(i.parent,s,s+t,a[1],e,n,i))}}return r}function CZ(e,t){return/^(\s*)(\d+)(?=[.)])/.exec(t.sliceString(e.from,e.from+10))}function wZ(e,t,n,r=0){for(let i=-1,a=e;;){if(a.name==`ListItem`){let e=CZ(a,t),o=+e[2];if(i>=0){if(o!=i+1)return;n.push({from:a.from+e[1].length,to:a.from+e[0].length,insert:String(i+2+r)})}i=o}let e=a.nextSibling;if(!e)break;a=e}}function TZ(e,n){let r=/^[ \t]*/.exec(e)[0].length;if(!r||n.facet(t)!=` `)return e;let i=qe(e,4,r),a=``;for(let e=i;e>0;)e>=4?(a+=` `,e-=4):(a+=` `,e--);return a+e.slice(r)}var EZ=(e={})=>({state:t,dispatch:n})=>{let r=d(t),{doc:i}=t,a=null,o=t.changeByRange(n=>{if(!n.empty||!yZ.isActiveAt(t,n.from,-1)&&!yZ.isActiveAt(t,n.from,1))return a={range:n};let o=n.from,s=i.lineAt(o),c=SZ(r.resolveInner(o,-1),i);for(;c.length&&c[c.length-1].from>o-s.from;)c.pop();if(!c.length)return a={range:n};let l=c[c.length-1];if(l.to-l.spaceAfter.length>o-s.from)return a={range:n};let u=o>=l.to-l.spaceAfter.length&&!/\S/.test(s.text.slice(l.to));if(l.item&&u){if(l.item.from<s.from&&!/^[\s>]*$/.test(s.text.slice(0,l.to)))return a={range:n};let r=l.node.firstChild,u=l.node.getChild(`ListItem`,`ListItem`);if(r.to>=o||u&&u.to<o||s.from>0&&!/[^\s>]/.test(i.lineAt(s.from-1).text)||e.nonTightLists===!1){let e=c.length>1?c[c.length-2]:null,t,n=``;e&&e.item?(t=s.from+e.from,n=e.marker(i,1)):t=s.from+(e?e.to:0);let r=[{from:t,to:o,insert:n}];return l.node.name==`OrderedList`&&wZ(l.item,i,r,-2),e&&e.node.name==`OrderedList`&&wZ(e.item,i,r),{range:G.cursor(t+n.length),changes:r}}{let e=AZ(c,t,s);return{range:G.cursor(o+e.length+1),changes:{from:s.from,insert:e+t.lineBreak}}}}if(l.node.name==`Blockquote`&&u&&s.from){let e=i.lineAt(s.from-1),r=/>\s*$/.exec(e.text);if(r&&r.index==l.from){let i=t.changes([{from:e.from+r.index,to:e.to},{from:s.from+l.from,to:s.to}]);return{range:n.map(i),changes:i}}}let d=[];l.node.name==`OrderedList`&&wZ(l.item,i,d);let f=l.item&&l.item.from<s.from,p=``;if(!f||/^[\s\d.)\-+*>]*/.exec(s.text)[0].length>=l.to)for(let e=0,t=c.length-1;e<=t;e++)p+=e==t&&!f?c[e].marker(i,1):c[e].blank(e<t?qe(s.text,4,c[e+1].from)-p.length:null);let m=o;for(;m>s.from&&/\s/.test(s.text.charAt(m-s.from-1));)m--;return p=TZ(p,t),kZ(l.node,t.doc)&&(p=AZ(c,t,s)+t.lineBreak+p),d.push({from:m,to:o,insert:t.lineBreak+p}),{range:G.cursor(m+p.length+1),changes:d}});return!a&&(n(t.update(o,{scrollIntoView:!0,userEvent:`input`})),!0)},DZ=EZ();function OZ(e){return e.name==`QuoteMark`||e.name==`ListMark`}function kZ(e,t){if(e.name!=`OrderedList`&&e.name!=`BulletList`)return!1;let n=e.firstChild,r=e.getChild(`ListItem`,`ListItem`);if(!r)return!1;let i=t.lineAt(n.to),a=t.lineAt(r.from),o=/^[\s>]*$/.test(i.text);return i.number+ +!o<a.number}function AZ(e,t,n){let r=``;for(let t=0,i=e.length-2;t<=i;t++)r+=e[t].blank(t<i?qe(n.text,4,e[t+1].from)-r.length:null,t<i);return TZ(r,t)}function jZ(e,t){let n=e.resolveInner(t,-1),r=t;OZ(n)&&(r=n.from,n=n.parent);for(let e;e=n.childBefore(r);)if(OZ(e))r=e.from;else if(e.name==`OrderedList`||e.name==`BulletList`)n=e.lastChild,r=n.to;else break;return n}var MZ=({state:e,dispatch:t})=>{let n=d(e),r=null,i=e.changeByRange(t=>{let i=t.from,{doc:a}=e;if(t.empty&&yZ.isActiveAt(e,t.from)){let t=a.lineAt(i),r=SZ(jZ(n,i),a);if(r.length){let n=r[r.length-1],a=n.to-n.spaceAfter.length+ +!!n.spaceAfter;if(i-t.from>a&&!/\S/.test(t.text.slice(a,i-t.from)))return{range:G.cursor(t.from+a),changes:{from:t.from+a,to:i}};if(i-t.from==a&&(n.item&&t.from<=n.item.from||/^[\s>]*$/.test(t.text.slice(0,n.to)))){let r=t.from+n.from;if(n.item&&n.node.from<n.item.from&&/\S/.test(t.text.slice(n.from,n.to))){let i=n.blank(qe(t.text,4,n.to)-qe(t.text,4,n.from));return r==t.from&&(i=TZ(i,e)),{range:G.cursor(r+i.length),changes:{from:r,to:t.from+n.to,insert:i}}}if(r<i)return{range:G.cursor(r),changes:{from:r,to:i}}}}}return r={range:t}});return!r&&(t(e.update(i,{scrollIntoView:!0,userEvent:`delete`})),!0)},NZ=[{key:`Enter`,run:DZ},{key:`Backspace`,run:MZ}],PZ=aZ({matchClosingTags:!1});function FZ(e={}){let{codeLanguages:t,defaultCodeLanguage:n,addKeymap:r=!0,base:{parser:i}=vZ,completeHTMLTags:a=!0,pasteURLAsLink:o=!0,htmlTagLanguage:s=PZ}=e;if(!(i instanceof dK))throw RangeError("Base parser provided to `markdown` should be a Markdown parser");let c=e.extensions?[e.extensions]:[],l=[s.support,gZ],u;o&&l.push(BZ),n instanceof Re?(l.push(n.support),u=n.language):n&&(u=n);let d=t||u?bZ(t,u):void 0;c.push(HK({codeParser:d,htmlParser:s.language.parser})),r&&l.push(E.high(ze.of(NZ)));let f=_Z(i.configure(c));return a&&l.push(f.data.of({autocomplete:IZ})),new Re(f,l)}function IZ(e){let{state:t,pos:n}=e,r=/<[:\-\.\w\u00b7-\uffff]*$/.exec(t.sliceDoc(n-25,n));if(!r)return null;let i=d(t).resolveInner(n,-1);for(;i&&!i.type.isTop;){if(i.name==`CodeBlock`||i.name==`FencedCode`||i.name==`ProcessingInstructionBlock`||i.name==`CommentBlock`||i.name==`Link`||i.name==`Image`)return null;i=i.parent}return{from:n-r[0].length,to:n,options:RZ(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}var LZ=null;function RZ(){if(LZ)return LZ;let e=QX(new xz(ee.create({extensions:PZ}),0,!0));return LZ=e?e.options:[]}var zZ=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,BZ=R.domEventHandlers({paste:(e,t)=>{let{main:n}=t.state.selection;if(n.empty)return!1;let r=e.clipboardData?.getData(`text/plain`);if(!r||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(r)||(/^www\./.test(r)&&(r=`https://`+r),!yZ.isActiveAt(t.state,n.from,1)))return!1;let i=d(t.state),a=!1;return i.iterate({from:n.from,to:n.to,enter:e=>{(e.from>n.from||zZ.test(e.name))&&(a=!0)},leave:e=>{e.to<n.to&&(a=!0)}}),!a&&(t.dispatch({changes:[{from:n.from,insert:`[`},{from:n.to,insert:`](${r})`}],userEvent:`input.paste`,scrollIntoView:!0}),!0)}}),VZ=63,HZ=64,UZ=1,WZ=2,GZ=3,KZ=4,qZ=5,JZ=6,YZ=7,XZ=65,ZZ=66,QZ=8,$Z=9,eQ=10,tQ=11,nQ=12,rQ=13,iQ=19,aQ=20,oQ=29,sQ=33,cQ=34,lQ=47,uQ=0,dQ=1,fQ=2,pQ=3,mQ=4,hQ=class{constructor(e,t,n){this.parent=e,this.depth=t,this.type=n,this.hash=(e?e.hash+e.hash<<8:0)+t+(t<<4)+n}};hQ.top=new hQ(null,-1,uQ);function gQ(e,t){for(let n=0,r=t-e.pos-1;;r--,n++){let t=e.peek(r);if(vQ(t)||t==-1)return n}}function _Q(e){return e==32||e==9}function vQ(e){return e==10||e==13}function yQ(e){return _Q(e)||vQ(e)}function bQ(e){return e<0||yQ(e)}var xQ=new Ie({start:hQ.top,reduce(e,t){return e.type==pQ&&(t==aQ||t==cQ)?e.parent:e},shift(e,t,n,r){if(t==GZ)return new hQ(e,gQ(r,r.pos),dQ);if(t==XZ||t==qZ)return new hQ(e,gQ(r,r.pos),fQ);if(t==VZ)return e.parent;if(t==iQ||t==sQ)return new hQ(e,0,pQ);if(t==rQ&&e.type==mQ)return e.parent;if(t==lQ){let t=/[1-9]/.exec(r.read(r.pos,n.pos));if(t)return new hQ(e,e.depth+ +t[0],mQ)}return e},hash(e){return e.hash}});function SQ(e,t,n=0){return e.peek(n)==t&&e.peek(n+1)==t&&e.peek(n+2)==t&&bQ(e.peek(n+3))}var CQ=new Te((e,t)=>{if(e.next==-1&&t.canShift(HZ))return e.acceptToken(HZ);let n=e.peek(-1);if((vQ(n)||n<0)&&t.context.type!=pQ){if(SQ(e,45)){if(t.canShift(VZ))e.acceptToken(VZ);else return e.acceptToken(UZ,3)}if(SQ(e,46)){if(t.canShift(VZ))e.acceptToken(VZ);else return e.acceptToken(WZ,3)}let n=0;for(;e.next==32;)n++,e.advance();(n<t.context.depth||n==t.context.depth&&t.context.type==dQ&&(e.next!=45||!bQ(e.peek(1))))&&e.next!=-1&&!vQ(e.next)&&e.next!=35&&e.acceptToken(VZ,-n)}},{contextual:!0}),wQ=new Te((e,t)=>{if(t.context.type==pQ)e.next==63&&(e.advance(),bQ(e.next)&&e.acceptToken(YZ));else if(e.next==45)e.advance(),bQ(e.next)&&e.acceptToken(t.context.type==dQ&&t.context.depth==gQ(e,e.pos-1)?KZ:GZ);else if(e.next==63)e.advance(),bQ(e.next)&&e.acceptToken(t.context.type==fQ&&t.context.depth==gQ(e,e.pos-1)?JZ:qZ);else{let n=e.pos;for(;;)if(_Q(e.next)){if(e.pos==n)return;e.advance()}else if(e.next==33)OQ(e);else if(e.next==38)kQ(e);else if(e.next==42){kQ(e);break}else if(e.next==39||e.next==34){if(AQ(e,!0))break;return}else if(e.next==91||e.next==123){if(!jQ(e))return;break}else{FQ(e,!0,!1,0);break}for(;_Q(e.next);)e.advance();if(e.next==58){if(e.pos==n&&t.canShift(oQ))return;bQ(e.peek(1))&&e.acceptTokenTo(t.context.type==fQ&&t.context.depth==gQ(e,n)?ZZ:XZ,n)}}},{contextual:!0});function TQ(e){return e>32&&e<127&&e!=34&&e!=37&&e!=44&&e!=60&&e!=62&&e!=92&&e!=94&&e!=96&&e!=123&&e!=124&&e!=125}function EQ(e){return e>=48&&e<=57||e>=97&&e<=102||e>=65&&e<=70}function DQ(e,t){return e.next==37?(e.advance(),EQ(e.next)&&e.advance(),EQ(e.next)&&e.advance(),!0):TQ(e.next)||t&&e.next==44?(e.advance(),!0):!1}function OQ(e){if(e.advance(),e.next==60){for(e.advance();;)if(!DQ(e,!0)){e.next==62&&e.advance();break}}else for(;DQ(e,!1););}function kQ(e){for(e.advance();!bQ(e.next)&&NQ(e.next)!=`f`;)e.advance()}function AQ(e,t){let n=e.next,r=!1,i=e.pos;for(e.advance();;){let a=e.next;if(a<0)break;if(e.advance(),a==n){if(a==39){if(e.next==39)e.advance();else break}else break}else if(a==92&&n==34)e.next>=0&&e.advance();else if(vQ(a)){if(t)return!1;r=!0}else if(t&&e.pos>=i+1024)return!1}return!r}function jQ(e){for(let t=[],n=e.pos+1024;;)if(e.next==91||e.next==123)t.push(e.next),e.advance();else if(e.next==39||e.next==34){if(!AQ(e,!0))return!1}else if(e.next==93||e.next==125){if(t[t.length-1]!=e.next-2)return!1;if(t.pop(),e.advance(),!t.length)return!0}else if(e.next<0||e.pos>n||vQ(e.next))return!1;else e.advance()}var MQ=`iiisiiissisfissssssssssssisssiiissssssssssssssssssssssssssfsfssissssssssssssssssssssssssssfif`;function NQ(e){return e<33?`u`:e>125?`s`:MQ[e-33]}function PQ(e,t){let n=NQ(e);return n!=`u`&&!(t&&n==`f`)}function FQ(e,t,n,r){if(NQ(e.next)==`s`||(e.next==63||e.next==58||e.next==45)&&PQ(e.peek(1),n))e.advance();else return!1;let i=e.pos;for(;;){let a=e.next,o=0,s=r+1;for(;yQ(a);){if(vQ(a)){if(t)return!1;s=0}else s++;a=e.peek(++o)}if(!(a>=0&&(a==58?PQ(e.peek(o+1),n):a==35?e.peek(o-1)!=32:PQ(a,n)))||!n&&s<=r||s==0&&!n&&(SQ(e,45,o)||SQ(e,46,o)))break;if(t&&NQ(a)==`f`)return!1;for(let t=o;t>=0;t--)e.advance();if(t&&e.pos>i+1024)return!1}return!0}var IQ=new Te((e,t)=>{if(e.next==33)OQ(e),e.acceptToken(nQ);else if(e.next==38||e.next==42){let t=e.next==38?eQ:tQ;kQ(e),e.acceptToken(t)}else e.next==39||e.next==34?(AQ(e,!1),e.acceptToken($Z)):FQ(e,!1,t.context.type==pQ,t.context.depth)&&e.acceptToken(QZ)}),LQ=new Te((e,t)=>{let n=t.context.type==mQ?t.context.depth:-1,r=e.pos;scan:for(;;){let i=0,a=e.next;for(;a==32;)a=e.peek(++i);if(!i&&(SQ(e,45,i)||SQ(e,46,i))||!vQ(a)&&(n<0&&(n=Math.max(t.context.depth+1,i)),i<n))break;for(;;){if(e.next<0)break scan;let t=vQ(e.next);if(e.advance(),t)continue scan;r=e.pos}}e.acceptTokenTo(rQ,r)}),RQ=y({DirectiveName:K.keyword,DirectiveContent:K.attributeValue,"DirectiveEnd DocEnd":K.meta,QuotedLiteral:K.string,BlockLiteralHeader:K.special(K.string),BlockLiteralContent:K.content,Literal:K.content,"Key/Literal Key/QuotedLiteral":K.definition(K.propertyName),"Anchor Alias":K.labelName,Tag:K.typeName,Comment:K.lineComment,": , -":K.separator,"?":K.punctuation,"[ ]":K.squareBracket,"{ }":K.brace}),zQ=Me.deserialize({version:14,states:"5lQ!ZQgOOO#PQfO'#CpO#uQfO'#DOOOQR'#Dv'#DvO$qQgO'#DRO%gQdO'#DUO%nQgO'#DUO&ROaO'#D[OOQR'#Du'#DuO&{QgO'#D^O'rQgO'#D`OOQR'#Dt'#DtO(iOqO'#DbOOQP'#Dj'#DjO(zQaO'#CmO)YQgO'#CmOOQP'#Cm'#CmQ)jQaOOQ)uQgOOQ]QgOOO*PQdO'#CrO*nQdO'#CtOOQO'#Dw'#DwO+]Q`O'#CxO+hQdO'#CwO+rQ`O'#CwOOQO'#Cv'#CvO+wQdO'#CvOOQO'#Cq'#CqO,UQ`O,59[O,^QfO,59[OOQR,59[,59[OOQO'#Cx'#CxO,eQ`O'#DPO,pQdO'#DPOOQO'#Dx'#DxO,zQdO'#DxO-XQ`O,59jO-aQfO,59jOOQR,59j,59jOOQR'#DS'#DSO-hQcO,59mO-sQgO'#DVO.TQ`O'#DVO.YQcO,59pOOQR'#DX'#DXO#|QfO'#DWO.hQcO'#DWOOQR,59v,59vO.yOWO,59vO/OOaO,59vO/WOaO,59vO/cQgO'#D_OOQR,59x,59xO0VQgO'#DaOOQR,59z,59zOOQP,59|,59|O0yOaO,59|O1ROaO,59|O1aOqO,59|OOQP-E7h-E7hO1oQgO,59XOOQP,59X,59XO2PQaO'#DeO2_QgO'#DeO2oQgO'#DkOOQP'#Dk'#DkQ)jQaOOO3PQdO'#CsOOQO,59^,59^O3kQdO'#CuOOQO,59`,59`OOQO,59c,59cO4VQdO,59cO4aQdO'#CzO4kQ`O'#CzOOQO,59b,59bOOQU,5:Q,5:QOOQR1G.v1G.vO4pQ`O1G.vOOQU-E7d-E7dO4xQdO,59kOOQO,59k,59kO5SQdO'#DQO5^Q`O'#DQOOQO,5:d,5:dOOQU,5:R,5:ROOQR1G/U1G/UO5cQ`O1G/UOOQU-E7e-E7eO5kQgO'#DhO5xQcO1G/XOOQR1G/X1G/XOOQR,59q,59qO6TQgO,59qO6eQdO'#DiO6lQgO'#DiO7PQcO1G/[OOQR1G/[1G/[OOQR,59r,59rO#|QfO,59rOOQR1G/b1G/bO7_OWO1G/bO7dOaO1G/bOOQR,59y,59yOOQR,59{,59{OOQP1G/h1G/hO7lOaO1G/hO7tOaO1G/hO8POaO1G/hOOQP1G.s1G.sO8_QgO,5:POOQP,5:P,5:POOQP,5:V,5:VOOQP-E7i-E7iOOQO,59_,59_OOQO,59a,59aOOQO1G.}1G.}OOQO,59f,59fO8oQdO,59fOOQR7+$b7+$bP,XQ`O'#DfOOQO1G/V1G/VOOQO,59l,59lO8yQdO,59lOOQR7+$p7+$pP9TQ`O'#DgOOQR'#DT'#DTOOQR,5:S,5:SOOQR-E7f-E7fOOQR7+$s7+$sOOQR1G/]1G/]O9YQgO'#DYO9jQ`O'#DYOOQR,5:T,5:TO#|QfO'#DZO9oQcO'#DZOOQR-E7g-E7gOOQR7+$v7+$vOOQR1G/^1G/^OOQR7+$|7+$|O:QOWO7+$|OOQP7+%S7+%SO:VOaO7+%SO:_OaO7+%SOOQP1G/k1G/kOOQO1G/Q1G/QOOQO1G/W1G/WOOQR,59t,59tO:jQgO,59tOOQR,59u,59uO#|QfO,59uOOQR<<Hh<<HhOOQP<<Hn<<HnO:zOaO<<HnOOQR1G/`1G/`OOQR1G/a1G/aOOQPAN>YAN>Y",stateData:";S~O!fOS!gOS^OS~OP_OQbORSOTUOWROXROYYOZZO[XOcPOqQO!PVO!V[O!cTO~O`cO~P]OVkOWROXROYeOZfO[dOcPOmhOqQO~OboO~P!bOVtOWROXROYeOZfO[dOcPOmrOqQO~OpwO~P#WORSOTUOWROXROYYOZZO[XOcPOqQO!PVO!cTO~OSvP!avP!bvP~P#|OWROXROYeOZfO[dOcPOqQO~OmzO~P%OOm!OOUzP!azP!bzP!dzP~P#|O^!SO!b!QO!f!TO!g!RO~ORSOTUOWROXROcPOqQO!PVO!cTO~OY!UOP!QXQ!QX!V!QX!`!QXS!QX!a!QX!b!QXU!QXm!QX!d!QX~P&aO[!WOP!SXQ!SX!V!SX!`!SXS!SX!a!SX!b!SXU!SXm!SX!d!SX~P&aO^!ZO!W![O!b!YO!f!]O!g!YO~OP!_O!V[OQaX!`aX~OPaXQaX!VaX!`aX~P#|OP!bOQ!cO!V[O~OP_O!V[O~P#|OWROXROY!fOcPOqQObfXmfXofXpfX~OWROXRO[!hOcPOqQObhXmhXohXphX~ObeXmlXoeX~ObkXokX~P%OOm!kO~Om!lObnPonP~P%OOb!pOo!oO~Ob!pO~P!bOm!sOosXpsX~OosXpsX~P%OOm!uOotPptP~P%OOo!xOp!yO~Op!yO~P#WOS!|O!a#OO!b#OO~OUyX!ayX!byX!dyX~P#|Om#QO~OU#SO!a#UO!b#UO!d#RO~Om#WOUzX!azX!bzX!dzX~O]#XO~O!b#XO!g#YO~O^#ZO!b#XO!g#YO~OP!RXQ!RX!V!RX!`!RXS!RX!a!RX!b!RXU!RXm!RX!d!RX~P&aOP!TXQ!TX!V!TX!`!TXS!TX!a!TX!b!TXU!TXm!TX!d!TX~P&aO!b#^O!g#^O~O^#_O!b#^O!f#`O!g#^O~O^#_O!W#aO!b#^O!g#^O~OPaaQaa!Vaa!`aa~P#|OP#cO!V[OQ!XX!`!XX~OP!XXQ!XX!V!XX!`!XX~P#|OP_O!V[OQ!_X!`!_X~P#|OWROXROcPOqQObgXmgXogXpgX~OWROXROcPOqQObiXmiXoiXpiX~Obkaoka~P%OObnXonX~P%OOm#kO~Ob#lOo!oO~Oosapsa~P%OOotXptX~P%OOm#pO~Oo!xOp#qO~OSwP!awP!bwP~P#|OS!|O!a#vO!b#vO~OUya!aya!bya!dya~P#|Om#xO~P%OOm#{OU}P!a}P!b}P!d}P~P#|OU#SO!a$OO!b$OO!d#RO~O]$QO~O!b$QO!g$RO~O!b$SO!g$SO~O^$TO!b$SO!g$SO~O^$TO!b$SO!f$UO!g$SO~OP!XaQ!Xa!V!Xa!`!Xa~P#|Obnaona~P%OOotapta~P%OOo!xO~OU|X!a|X!b|X!d|X~P#|Om$ZO~Om$]OU}X!a}X!b}X!d}X~O]$^O~O!b$_O!g$_O~O^$`O!b$_O!g$_O~OU|a!a|a!b|a!d|a~P#|O!b$cO!g$cO~O",goto:",]!mPPPPPPPPPPPPPPPPP!nPP!v#v#|$`#|$c$f$j$nP%VPPP!v%Y%^%a%{&O%a&R&U&X&_&b%aP&e&{&e'O'RPP']'a'g'm's'y(XPPPPPPPP(_)e*X+c,VUaObcR#e!c!{ROPQSTUXY_bcdehknrtvz!O!U!W!_!b!c!f!h!k!l!s!u!|#Q#R#S#W#c#k#p#x#{$Z$]QmPR!qnqfPQThknrtv!k!l!s!u#R#k#pR!gdR!ieTlPnTjPnSiPnSqQvQ{TQ!mkQ!trQ!vtR#y#RR!nkTsQvR!wt!RWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]RySR#t!|R|TR|UQ!PUR#|#SR#z#RR#z#SyZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]R!VXR!XYa]O^abc!a!c!eT!da!eQnPR!rnQvQR!{vQ!}yR#u!}Q#T|R#}#TW^Obc!cS!^^!aT!aa!eQ!eaR#f!eW`Obc!cQxSS}U#SQ!`_Q#PzQ#V!OQ#b!_Q#d!bQ#s!|Q#w#QQ$P#WQ$V#cQ$Y#xQ$[#{Q$a$ZR$b$]xZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]Q!VXQ!XYQ#[!UR#]!W!QWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]pfPQThknrtv!k!l!s!u#R#k#pQ!gdQ!ieQ#g!fR#h!hSgPn^pQTkrtv#RQ!jhQ#i!kQ#j!lQ#n!sQ#o!uQ$W#kR$X#pQuQR!zv",nodeNames:`⚠ DirectiveEnd DocEnd - - ? ? ? Literal QuotedLiteral Anchor Alias Tag BlockLiteralContent Comment Stream BOM Document ] [ FlowSequence Item Tagged Anchored Anchored Tagged FlowMapping Pair Key : Pair , } { FlowMapping Pair Pair BlockSequence Item Item BlockMapping Pair Pair Key Pair Pair BlockLiteral BlockLiteralHeader Tagged Anchored Anchored Tagged Directive DirectiveName DirectiveContent Document`,maxTerm:74,context:xQ,nodeProps:[[`isolate`,-3,8,9,14,``],[`openedBy`,18,`[`,32,`{`],[`closedBy`,19,`]`,33,`}`]],propSources:[RQ],skippedNodes:[0],repeatNodeCount:6,tokenData:"-Y~RnOX#PXY$QYZ$]Z]#P]^$]^p#Ppq$Qqs#Pst$btu#Puv$yv|#P|}&e}![#P![!]'O!]!`#P!`!a'i!a!}#P!}#O*g#O#P#P#P#Q+Q#Q#o#P#o#p+k#p#q'i#q#r,U#r;'S#P;'S;=`#z<%l?HT#P?HT?HU,o?HUO#PQ#UU!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PQ#kTOY#PZs#Pt;'S#P;'S;=`#z<%lO#PQ#}P;=`<%l#P~$VQ!f~XY$Qpq$Q~$bO!g~~$gS^~OY$bZ;'S$b;'S;=`$s<%lO$b~$vP;=`<%l$bR%OX!WQOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR%rX!WQ!VPOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR&bP;=`<%l%kR&lUoP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'VUmP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'p[!PP!WQOY#PZp#Ppq#hq{#P{|(f|}#P}!O(f!O!R#P!R![)p![;'S#P;'S;=`#z<%lO#PR(mW!PP!WQOY#PZp#Ppq#hq!R#P!R![)V![;'S#P;'S;=`#z<%lO#PR)^U!PP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR)wY!PP!WQOY#PZp#Ppq#hq{#P{|)V|}#P}!O)V!O;'S#P;'S;=`#z<%lO#PR*nUcP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+XUbP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+rUqP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,]UpP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,vU`P!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#P",tokenizers:[CQ,wQ,IQ,LQ,0,1],topRules:{Stream:[0,15]},tokenPrec:0}),BQ=tt({yaml:()=>UQ,yamlFrontmatter:()=>GQ,yamlLanguage:()=>HQ}),VQ=Me.deserialize({version:14,states:"!vOQOPOOO]OPO'#C_OhOPO'#C^OOOO'#Cc'#CcOpOPO'#CaQOOOOOO{OPOOOOOO'#Cb'#CbO!WOPO'#C`O!`OPO,58xOOOO-E6a-E6aOOOO-E6`-E6`OOOO'#C_'#C_OOOO1G.d1G.d",stateData:`!h~OXPOYROWTP~OWVXXRXYRX~OYVOXSP~OXROYROWTX~OXROYROWTP~OYVOXSX~OX[O~OXY~`,goto:`vWPPX[beioRUOQQOR]XRXQTTOUQWQRZWSSOURYS`,nodeNames:`⚠ Document Frontmatter DashLine FrontmatterContent Body`,maxTerm:10,skippedNodes:[0],repeatNodeCount:2,tokenData:"$z~RXOYnYZ!^Z]n]^!^^}n}!O!i!O;'Sn;'S;=`!c<%lOn~qXOYnYZ!^Z]n]^!^^;'Sn;'S;=`!c<%l~n~On~~!^~!cOY~~!fP;=`<%ln~!lZOYnYZ!^Z]n]^!^^}n}!O#_!O;'Sn;'S;=`!c<%l~n~On~~!^~#bZOYnYZ!^Z]n]^!^^}n}!O$T!O;'Sn;'S;=`!c<%l~n~On~~!^~$WXOYnYZ$sZ]n]^$s^;'Sn;'S;=`!c<%l~n~On~~$s~$zOX~Y~",tokenizers:[0],topRules:{Document:[0,1]},tokenPrec:67}),HQ=Pe.define({name:`yaml`,parser:zQ.configure({props:[s.add({Stream:e=>{for(let t=e.node.resolve(e.pos,-1);t&&t.to>=e.pos;t=t.parent){if(t.name==`BlockLiteralContent`&&t.from<t.to)return e.baseIndentFor(t);if(t.name==`BlockLiteral`)return e.baseIndentFor(t)+e.unit;if(t.name==`BlockSequence`||t.name==`BlockMapping`)return e.column(t.firstChild.from,1);if(t.name==`QuotedLiteral`)return null;if(t.name==`Literal`){let n=e.column(t.from,1);if(n==e.lineIndent(t.from,1))return n;if(t.to>e.pos)return null}}return null},FlowMapping:Be({closing:`}`}),FlowSequence:Be({closing:`]`})}),a.add({"FlowMapping FlowSequence":Ue,"Item Pair BlockLiteral":(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}),languageData:{commentTokens:{line:`#`},indentOnInput:/^\s*[\]\}]$/}});function UQ(){return new Re(HQ)}var WQ=Pe.define({name:`yaml-frontmatter`,parser:VQ.configure({props:[y({DashLine:K.meta})]})});function GQ(e){let{language:t,support:n}=e.content instanceof Re?e.content:{language:e.content,support:[]};return new Re(WQ.configure({wrap:je(e=>e.name==`FrontmatterContent`?{parser:HQ.parser}:e.name==`Body`?{parser:t.parser}:null)}),n)}var KQ=`modulepreload`,qQ=function(e){return`/`+e},JQ={},YQ=function(e){return e.pathname.endsWith(`.css`)},XQ=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},Q=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=qQ(t,n);let r=s(t),i=YQ(r);return XQ(JQ,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:KQ,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{t.addEventListener(`load`,e),t.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${r}`)))})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};function $(e){return new Re(ue.define(e))}function ZQ(e){return Q(()=>import(`./dist-DxlXH2E-.js`).then(t=>t.sql({dialect:t[e]})),__vite__mapDeps([0,1]))}var QQ=[W.of({name:`C`,extensions:[`c`,`h`,`ino`],load(){return Q(()=>import(`./dist-Bw5-uxs9.js`).then(e=>e.cpp()),__vite__mapDeps([2,1]))}}),W.of({name:`C++`,alias:[`cpp`],extensions:[`cpp`,`c++`,`cc`,`cxx`,`hpp`,`h++`,`hh`,`hxx`],load(){return Q(()=>import(`./dist-Bw5-uxs9.js`).then(e=>e.cpp()),__vite__mapDeps([2,1]))}}),W.of({name:`CQL`,alias:[`cassandra`],extensions:[`cql`],load(){return ZQ(`Cassandra`)}}),W.of({name:`CSS`,extensions:[`css`],load(){return Q(()=>Promise.resolve().then(()=>aY).then(e=>e.css()),[])}}),W.of({name:`Go`,extensions:[`go`],load(){return Q(()=>import(`./dist-BwXTr_k4.js`).then(e=>e.go()),__vite__mapDeps([3,1]))}}),W.of({name:`HTML`,alias:[`xhtml`],extensions:[`html`,`htm`,`handlebars`,`hbs`],load(){return Q(()=>Promise.resolve().then(()=>AX).then(e=>e.html()),void 0)}}),W.of({name:`Java`,extensions:[`java`],load(){return Q(()=>import(`./dist-DDJNvivM.js`).then(e=>e.java()),__vite__mapDeps([4,1]))}}),W.of({name:`JavaScript`,alias:[`ecmascript`,`js`,`node`],extensions:[`js`,`mjs`,`cjs`],load(){return Q(()=>Promise.resolve().then(()=>aX).then(e=>e.javascript()),void 0)}}),W.of({name:`Jinja`,extensions:[`j2`,`jinja`,`jinja2`],load(){return Q(()=>import(`./dist-BlFnpAOk.js`).then(e=>e.jinja()),__vite__mapDeps([5,1]))}}),W.of({name:`JSON`,alias:[`json5`],extensions:[`json`,`map`],load(){return Q(()=>import(`./dist-BzulKuec.js`).then(e=>e.json()),__vite__mapDeps([6,1]))}}),W.of({name:`JSX`,extensions:[`jsx`],load(){return Q(()=>Promise.resolve().then(()=>aX).then(e=>e.javascript({jsx:!0})),void 0)}}),W.of({name:`LESS`,extensions:[`less`],load(){return Q(()=>import(`./dist-fpvlcqX7.js`).then(e=>e.less()),__vite__mapDeps([7,1]))}}),W.of({name:`Liquid`,extensions:[`liquid`],load(){return Q(()=>import(`./dist-D7YBl9nc.js`).then(e=>e.liquid()),__vite__mapDeps([8,1]))}}),W.of({name:`MariaDB SQL`,load(){return ZQ(`MariaSQL`)}}),W.of({name:`Markdown`,extensions:[`md`,`markdown`,`mkd`],load(){return Q(()=>Promise.resolve().then(()=>lZ).then(e=>e.markdown()),void 0)}}),W.of({name:`MS SQL`,load(){return ZQ(`MSSQL`)}}),W.of({name:`MySQL`,load(){return ZQ(`MySQL`)}}),W.of({name:`PHP`,extensions:[`php`,`php3`,`php4`,`php5`,`php7`,`phtml`],load(){return Q(()=>import(`./dist-CjFzi6xl.js`).then(e=>e.php()),__vite__mapDeps([9,1]))}}),W.of({name:`PLSQL`,extensions:[`pls`],load(){return ZQ(`PLSQL`)}}),W.of({name:`PostgreSQL`,load(){return ZQ(`PostgreSQL`)}}),W.of({name:`Python`,extensions:[`BUILD`,`bzl`,`py`,`pyw`],filename:/^(BUCK|BUILD)$/,load(){return Q(()=>import(`./dist-DxeJFPaO.js`).then(e=>e.python()),__vite__mapDeps([10,1]))}}),W.of({name:`Rust`,extensions:[`rs`],load(){return Q(()=>import(`./dist-CgIQYY1o.js`).then(e=>e.rust()),__vite__mapDeps([11,1]))}}),W.of({name:`Sass`,extensions:[`sass`],load(){return Q(()=>import(`./dist-BzDmxZ9V.js`).then(e=>e.sass({indented:!0})),__vite__mapDeps([12,1]))}}),W.of({name:`SCSS`,extensions:[`scss`],load(){return Q(()=>import(`./dist-BzDmxZ9V.js`).then(e=>e.sass()),__vite__mapDeps([12,1]))}}),W.of({name:`SQL`,extensions:[`sql`],load(){return ZQ(`StandardSQL`)}}),W.of({name:`SQLite`,load(){return ZQ(`SQLite`)}}),W.of({name:`TSX`,extensions:[`tsx`],load(){return Q(()=>Promise.resolve().then(()=>aX).then(e=>e.javascript({jsx:!0,typescript:!0})),void 0)}}),W.of({name:`TypeScript`,alias:[`ts`],extensions:[`ts`,`mts`,`cts`],load(){return Q(()=>Promise.resolve().then(()=>aX).then(e=>e.javascript({typescript:!0})),void 0)}}),W.of({name:`WebAssembly`,extensions:[`wat`,`wast`],load(){return Q(()=>import(`./dist-DF3F_I8N.js`).then(e=>e.wast()),__vite__mapDeps([13,1]))}}),W.of({name:`XML`,alias:[`rss`,`wsdl`,`xsd`],extensions:[`xml`,`xsl`,`xsd`,`svg`],load(){return Q(()=>import(`./dist-Dlorc3Sx.js`).then(e=>e.xml()),__vite__mapDeps([14,1]))}}),W.of({name:`YAML`,alias:[`yml`],extensions:[`yaml`,`yml`],load(){return Q(()=>Promise.resolve().then(()=>BQ).then(e=>e.yaml()),void 0)}}),W.of({name:`APL`,extensions:[`dyalog`,`apl`],load(){return Q(()=>import(`./apl-gfMMiTNf.js`).then(e=>$(e.apl)),[])}}),W.of({name:`PGP`,alias:[`asciiarmor`],extensions:[`asc`,`pgp`,`sig`],load(){return Q(()=>import(`./asciiarmor-C_eisQCp.js`).then(e=>$(e.asciiArmor)),[])}}),W.of({name:`ASN.1`,extensions:[`asn`,`asn1`],load(){return Q(()=>import(`./asn1-DCl_8MCW.js`).then(e=>$(e.asn1({}))),[])}}),W.of({name:`Asterisk`,filename:/^extensions\.conf$/i,load(){return Q(()=>import(`./asterisk-BEn0Cwpx.js`).then(e=>$(e.asterisk)),[])}}),W.of({name:`Brainfuck`,extensions:[`b`,`bf`],load(){return Q(()=>import(`./brainfuck-D5EjA2JK.js`).then(e=>$(e.brainfuck)),[])}}),W.of({name:`Cobol`,extensions:[`cob`,`cpy`],load(){return Q(()=>import(`./cobol-DHLQUbN7.js`).then(e=>$(e.cobol)),[])}}),W.of({name:`C#`,alias:[`csharp`,`cs`],extensions:[`cs`],load(){return Q(()=>import(`./clike-xvONpD0Z.js`).then(e=>$(e.csharp)),[])}}),W.of({name:`Clojure`,extensions:[`clj`,`cljc`,`cljx`],load(){return Q(()=>import(`./clojure-BflJGmDX.js`).then(e=>$(e.clojure)),[])}}),W.of({name:`ClojureScript`,extensions:[`cljs`],load(){return Q(()=>import(`./clojure-BflJGmDX.js`).then(e=>$(e.clojure)),[])}}),W.of({name:`Closure Stylesheets (GSS)`,extensions:[`gss`],load(){return Q(()=>import(`./css-CnaYoQib.js`).then(e=>$(e.gss)),[])}}),W.of({name:`CMake`,extensions:[`cmake`,`cmake.in`],filename:/^CMakeLists\.txt$/,load(){return Q(()=>import(`./cmake-84nbDH0I.js`).then(e=>$(e.cmake)),[])}}),W.of({name:`CoffeeScript`,alias:[`coffee`,`coffee-script`],extensions:[`coffee`],load(){return Q(()=>import(`./coffeescript-De_zI4J0.js`).then(e=>$(e.coffeeScript)),[])}}),W.of({name:`Common Lisp`,alias:[`lisp`],extensions:[`cl`,`lisp`,`el`],load(){return Q(()=>import(`./commonlisp-DgAKBe0r.js`).then(e=>$(e.commonLisp)),[])}}),W.of({name:`Cypher`,extensions:[`cyp`,`cypher`],load(){return Q(()=>import(`./cypher-p9eYesGn.js`).then(e=>$(e.cypher)),[])}}),W.of({name:`Cython`,extensions:[`pyx`,`pxd`,`pxi`],load(){return Q(()=>import(`./python-B_1Jd8HM.js`).then(e=>$(e.cython)),[])}}),W.of({name:`Crystal`,extensions:[`cr`],load(){return Q(()=>import(`./crystal-Bl6YKCG_.js`).then(e=>$(e.crystal)),[])}}),W.of({name:`D`,extensions:[`d`],load(){return Q(()=>import(`./d-DWkQyNnU.js`).then(e=>$(e.d)),[])}}),W.of({name:`Dart`,extensions:[`dart`],load(){return Q(()=>import(`./clike-xvONpD0Z.js`).then(e=>$(e.dart)),[])}}),W.of({name:`diff`,extensions:[`diff`,`patch`],load(){return Q(()=>import(`./diff-ChtP43wD.js`).then(e=>$(e.diff)),[])}}),W.of({name:`Dockerfile`,filename:/^Dockerfile$/,load(){return Q(()=>import(`./dockerfile-DJkHQgkl.js`).then(e=>$(e.dockerFile)),__vite__mapDeps([15,16]))}}),W.of({name:`DTD`,extensions:[`dtd`],load(){return Q(()=>import(`./dtd-DTF72YNO.js`).then(e=>$(e.dtd)),[])}}),W.of({name:`Dylan`,extensions:[`dylan`,`dyl`,`intr`],load(){return Q(()=>import(`./dylan-S7ucR4pR.js`).then(e=>$(e.dylan)),[])}}),W.of({name:`EBNF`,load(){return Q(()=>import(`./ebnf-D4c0_ac3.js`).then(e=>$(e.ebnf)),[])}}),W.of({name:`ECL`,extensions:[`ecl`],load(){return Q(()=>import(`./ecl-BVIeWmwY.js`).then(e=>$(e.ecl)),[])}}),W.of({name:`edn`,extensions:[`edn`],load(){return Q(()=>import(`./clojure-BflJGmDX.js`).then(e=>$(e.clojure)),[])}}),W.of({name:`Eiffel`,extensions:[`e`],load(){return Q(()=>import(`./eiffel-BEjRio4Q.js`).then(e=>$(e.eiffel)),[])}}),W.of({name:`Elm`,extensions:[`elm`],load(){return Q(()=>import(`./elm-Cshzl8qu.js`).then(e=>$(e.elm)),[])}}),W.of({name:`Erlang`,extensions:[`erl`],load(){return Q(()=>import(`./erlang-BV0c4Hdn.js`).then(e=>$(e.erlang)),[])}}),W.of({name:`Esper`,load(){return Q(()=>import(`./sql-DuQMFDvy.js`).then(e=>$(e.esper)),[])}}),W.of({name:`Factor`,extensions:[`factor`],load(){return Q(()=>import(`./factor-LKH5gN8L.js`).then(e=>$(e.factor)),__vite__mapDeps([17,16]))}}),W.of({name:`FCL`,load(){return Q(()=>import(`./fcl-ClOhbFR7.js`).then(e=>$(e.fcl)),[])}}),W.of({name:`Forth`,extensions:[`forth`,`fth`,`4th`],load(){return Q(()=>import(`./forth-D6RzAl64.js`).then(e=>$(e.forth)),[])}}),W.of({name:`Fortran`,extensions:[`f`,`for`,`f77`,`f90`,`f95`],load(){return Q(()=>import(`./fortran-Bt6PBEDR.js`).then(e=>$(e.fortran)),[])}}),W.of({name:`F#`,alias:[`fsharp`],extensions:[`fs`],load(){return Q(()=>import(`./mllike-B45xgp2S.js`).then(e=>$(e.fSharp)),[])}}),W.of({name:`Gas`,extensions:[`s`],load(){return Q(()=>import(`./gas-BHEdbvp9.js`).then(e=>$(e.gas)),[])}}),W.of({name:`Gherkin`,extensions:[`feature`],load(){return Q(()=>import(`./gherkin-oBAE_ms0.js`).then(e=>$(e.gherkin)),[])}}),W.of({name:`Groovy`,extensions:[`groovy`,`gradle`],filename:/^Jenkinsfile$/,load(){return Q(()=>import(`./groovy-CUrWKPia.js`).then(e=>$(e.groovy)),[])}}),W.of({name:`Haskell`,extensions:[`hs`],load(){return Q(()=>import(`./haskell-BRsoo5mP.js`).then(e=>$(e.haskell)),[])}}),W.of({name:`Haxe`,extensions:[`hx`],load(){return Q(()=>import(`./haxe-DjVOVvNP.js`).then(e=>$(e.haxe)),[])}}),W.of({name:`HXML`,extensions:[`hxml`],load(){return Q(()=>import(`./haxe-DjVOVvNP.js`).then(e=>$(e.hxml)),[])}}),W.of({name:`HTTP`,load(){return Q(()=>import(`./http-CLVgA2GD.js`).then(e=>$(e.http)),[])}}),W.of({name:`IDL`,extensions:[`pro`],load(){return Q(()=>import(`./idl-BUZw3wgd.js`).then(e=>$(e.idl)),[])}}),W.of({name:`JSON-LD`,alias:[`jsonld`],extensions:[`jsonld`],load(){return Q(()=>import(`./javascript-lS2r2ifg.js`).then(e=>$(e.jsonld)),[])}}),W.of({name:`Julia`,extensions:[`jl`],load(){return Q(()=>import(`./julia-CQfgDRfP.js`).then(e=>$(e.julia)),[])}}),W.of({name:`Kotlin`,extensions:[`kt`,`kts`],load(){return Q(()=>import(`./clike-xvONpD0Z.js`).then(e=>$(e.kotlin)),[])}}),W.of({name:`LiveScript`,alias:[`ls`],extensions:[`ls`],load(){return Q(()=>import(`./livescript-BXxG0Yva.js`).then(e=>$(e.liveScript)),[])}}),W.of({name:`Lua`,extensions:[`lua`],load(){return Q(()=>import(`./lua-DPCEkfD_.js`).then(e=>$(e.lua)),[])}}),W.of({name:`mIRC`,extensions:[`mrc`],load(){return Q(()=>import(`./mirc-C9zpzAZU.js`).then(e=>$(e.mirc)),[])}}),W.of({name:`Mathematica`,extensions:[`m`,`nb`,`wl`,`wls`],load(){return Q(()=>import(`./mathematica-u8YMmbU0.js`).then(e=>$(e.mathematica)),[])}}),W.of({name:`Modelica`,extensions:[`mo`],load(){return Q(()=>import(`./modelica-CqHI_q-D.js`).then(e=>$(e.modelica)),[])}}),W.of({name:`MUMPS`,extensions:[`mps`],load(){return Q(()=>import(`./mumps-BSzj6Xyz.js`).then(e=>$(e.mumps)),[])}}),W.of({name:`Mbox`,extensions:[`mbox`],load(){return Q(()=>import(`./mbox-BEMVcqjs.js`).then(e=>$(e.mbox)),[])}}),W.of({name:`Nginx`,filename:/nginx.*\.conf$/i,load(){return Q(()=>import(`./nginx-C-ORUuei.js`).then(e=>$(e.nginx)),[])}}),W.of({name:`NSIS`,extensions:[`nsh`,`nsi`],load(){return Q(()=>import(`./nsis-viPvXFiq.js`).then(e=>$(e.nsis)),__vite__mapDeps([18,16]))}}),W.of({name:`NTriples`,extensions:[`nt`,`nq`],load(){return Q(()=>import(`./ntriples-CzMBulkp.js`).then(e=>$(e.ntriples)),[])}}),W.of({name:`Objective-C`,alias:[`objective-c`,`objc`],extensions:[`m`],load(){return Q(()=>import(`./clike-xvONpD0Z.js`).then(e=>$(e.objectiveC)),[])}}),W.of({name:`Objective-C++`,alias:[`objective-c++`,`objc++`],extensions:[`mm`],load(){return Q(()=>import(`./clike-xvONpD0Z.js`).then(e=>$(e.objectiveCpp)),[])}}),W.of({name:`OCaml`,extensions:[`ml`,`mli`,`mll`,`mly`],load(){return Q(()=>import(`./mllike-B45xgp2S.js`).then(e=>$(e.oCaml)),[])}}),W.of({name:`Octave`,extensions:[`m`],load(){return Q(()=>import(`./octave-D2Q8cUp1.js`).then(e=>$(e.octave)),[])}}),W.of({name:`Oz`,extensions:[`oz`],load(){return Q(()=>import(`./oz-BwTct_5T.js`).then(e=>$(e.oz)),[])}}),W.of({name:`Pascal`,extensions:[`p`,`pas`],load(){return Q(()=>import(`./pascal-Dp_KdFgX.js`).then(e=>$(e.pascal)),[])}}),W.of({name:`Perl`,extensions:[`pl`,`pm`],load(){return Q(()=>import(`./perl-BkSkiI9m.js`).then(e=>$(e.perl)),[])}}),W.of({name:`Pig`,extensions:[`pig`],load(){return Q(()=>import(`./pig-AF4Hwhju.js`).then(e=>$(e.pig)),[])}}),W.of({name:`PowerShell`,extensions:[`ps1`,`psd1`,`psm1`],load(){return Q(()=>import(`./powershell-D8WpQPaX.js`).then(e=>$(e.powerShell)),[])}}),W.of({name:`Properties files`,alias:[`ini`,`properties`],extensions:[`properties`,`ini`,`in`],load(){return Q(()=>import(`./properties-C357ku5U.js`).then(e=>$(e.properties)),[])}}),W.of({name:`ProtoBuf`,extensions:[`proto`],load(){return Q(()=>import(`./protobuf-D1ij_kNL.js`).then(e=>$(e.protobuf)),[])}}),W.of({name:`Pug`,alias:[`jade`],extensions:[`pug`,`jade`],load(){return Q(()=>import(`./pug-BqCHZ5xT.js`).then(e=>$(e.pug)),__vite__mapDeps([19,20]))}}),W.of({name:`Puppet`,extensions:[`pp`],load(){return Q(()=>import(`./puppet-BZyAS7I4.js`).then(e=>$(e.puppet)),[])}}),W.of({name:`Q`,extensions:[`q`],load(){return Q(()=>import(`./q-B9NhS7L_.js`).then(e=>$(e.q)),[])}}),W.of({name:`R`,alias:[`rscript`],extensions:[`r`,`R`],load(){return Q(()=>import(`./r-CxDmU1I4.js`).then(e=>$(e.r)),[])}}),W.of({name:`RPM Changes`,load(){return Q(()=>import(`./rpm-gpDK5sbt.js`).then(e=>$(e.rpmChanges)),[])}}),W.of({name:`RPM Spec`,extensions:[`spec`],load(){return Q(()=>import(`./rpm-gpDK5sbt.js`).then(e=>$(e.rpmSpec)),[])}}),W.of({name:`Ruby`,alias:[`jruby`,`macruby`,`rake`,`rb`,`rbx`],extensions:[`rb`],filename:/^(Gemfile|Rakefile)$/,load(){return Q(()=>import(`./ruby-ChfNwlCY.js`).then(e=>$(e.ruby)),[])}}),W.of({name:`SAS`,extensions:[`sas`],load(){return Q(()=>import(`./sas-C2OyD2Y6.js`).then(e=>$(e.sas)),[])}}),W.of({name:`Scala`,extensions:[`scala`],load(){return Q(()=>import(`./clike-xvONpD0Z.js`).then(e=>$(e.scala)),[])}}),W.of({name:`Scheme`,extensions:[`scm`,`ss`],load(){return Q(()=>import(`./scheme-D9qYN0V5.js`).then(e=>$(e.scheme)),[])}}),W.of({name:`Shell`,alias:[`bash`,`sh`,`zsh`],extensions:[`sh`,`ksh`,`bash`],filename:/^PKGBUILD$/,load(){return Q(()=>import(`./shell-DwuoZtxw.js`).then(e=>$(e.shell)),[])}}),W.of({name:`Sieve`,extensions:[`siv`,`sieve`],load(){return Q(()=>import(`./sieve-tLWDfEkZ.js`).then(e=>$(e.sieve)),[])}}),W.of({name:`Smalltalk`,extensions:[`st`],load(){return Q(()=>import(`./smalltalk-BLp5-jwC.js`).then(e=>$(e.smalltalk)),[])}}),W.of({name:`Solr`,load(){return Q(()=>import(`./solr-B78wSQJQ.js`).then(e=>$(e.solr)),[])}}),W.of({name:`SML`,extensions:[`sml`,`sig`,`fun`,`smackspec`],load(){return Q(()=>import(`./mllike-B45xgp2S.js`).then(e=>$(e.sml)),[])}}),W.of({name:`SPARQL`,alias:[`sparul`],extensions:[`rq`,`sparql`],load(){return Q(()=>import(`./sparql-Dz-mlCAC.js`).then(e=>$(e.sparql)),[])}}),W.of({name:`Spreadsheet`,alias:[`excel`,`formula`],load(){return Q(()=>import(`./spreadsheet-CTIncYxj.js`).then(e=>$(e.spreadsheet)),[])}}),W.of({name:`Squirrel`,extensions:[`nut`],load(){return Q(()=>import(`./clike-xvONpD0Z.js`).then(e=>$(e.squirrel)),[])}}),W.of({name:`Stylus`,extensions:[`styl`],load(){return Q(()=>import(`./stylus-BOVgKnng.js`).then(e=>$(e.stylus)),[])}}),W.of({name:`Swift`,extensions:[`swift`],load(){return Q(()=>import(`./swift-DKB6_1j6.js`).then(e=>$(e.swift)),[])}}),W.of({name:`sTeX`,load(){return Q(()=>import(`./stex-DNzd62Q_.js`).then(e=>$(e.stex)),[])}}),W.of({name:`LaTeX`,alias:[`tex`],extensions:[`text`,`ltx`,`tex`],load(){return Q(()=>import(`./stex-DNzd62Q_.js`).then(e=>$(e.stex)),[])}}),W.of({name:`SystemVerilog`,extensions:[`v`,`sv`,`svh`],load(){return Q(()=>import(`./verilog-CjI9Y6RI.js`).then(e=>$(e.verilog)),[])}}),W.of({name:`Tcl`,extensions:[`tcl`],load(){return Q(()=>import(`./tcl-BGfruO1u.js`).then(e=>$(e.tcl)),[])}}),W.of({name:`Textile`,extensions:[`textile`],load(){return Q(()=>import(`./textile-C4jVoHG1.js`).then(e=>$(e.textile)),[])}}),W.of({name:`TiddlyWiki`,load(){return Q(()=>import(`./tiddlywiki-VlUiK86J.js`).then(e=>$(e.tiddlyWiki)),[])}}),W.of({name:`Tiki wiki`,load(){return Q(()=>import(`./tiki-CvUEFusT.js`).then(e=>$(e.tiki)),[])}}),W.of({name:`TOML`,extensions:[`toml`],load(){return Q(()=>import(`./toml-BPTmHmyx.js`).then(e=>$(e.toml)),[])}}),W.of({name:`Troff`,extensions:[`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],load(){return Q(()=>import(`./troff-C2dAgh7P.js`).then(e=>$(e.troff)),[])}}),W.of({name:`TTCN`,extensions:[`ttcn`,`ttcn3`,`ttcnpp`],load(){return Q(()=>import(`./ttcn-PPSTk1ow.js`).then(e=>$(e.ttcn)),[])}}),W.of({name:`TTCN_CFG`,extensions:[`cfg`],load(){return Q(()=>import(`./ttcn-cfg-2b4Gb5sE.js`).then(e=>$(e.ttcnCfg)),[])}}),W.of({name:`Turtle`,extensions:[`ttl`],load(){return Q(()=>import(`./turtle-Cx3rYX2g.js`).then(e=>$(e.turtle)),[])}}),W.of({name:`Web IDL`,extensions:[`webidl`],load(){return Q(()=>import(`./webidl-D5jiJvOU.js`).then(e=>$(e.webIDL)),[])}}),W.of({name:`VB.NET`,extensions:[`vb`],load(){return Q(()=>import(`./vb-BthdM_4N.js`).then(e=>$(e.vb)),[])}}),W.of({name:`VBScript`,extensions:[`vbs`],load(){return Q(()=>import(`./vbscript-D9f6rSsU.js`).then(e=>$(e.vbScript)),[])}}),W.of({name:`Velocity`,extensions:[`vtl`],load(){return Q(()=>import(`./velocity-CqftRsjg.js`).then(e=>$(e.velocity)),[])}}),W.of({name:`Verilog`,extensions:[`v`],load(){return Q(()=>import(`./verilog-CjI9Y6RI.js`).then(e=>$(e.verilog)),[])}}),W.of({name:`VHDL`,extensions:[`vhd`,`vhdl`],load(){return Q(()=>import(`./vhdl-kS471soi.js`).then(e=>$(e.vhdl)),[])}}),W.of({name:`XQuery`,extensions:[`xy`,`xquery`,`xq`,`xqm`,`xqy`],load(){return Q(()=>import(`./xquery-BKJx4mf9.js`).then(e=>$(e.xQuery)),[])}}),W.of({name:`Yacas`,extensions:[`ys`],load(){return Q(()=>import(`./yacas-CXXgtw0p.js`).then(e=>$(e.yacas)),[])}}),W.of({name:`Z80`,extensions:[`z80`],load(){return Q(()=>import(`./z80-Co3PbHdE.js`).then(e=>$(e.z80)),[])}}),W.of({name:`MscGen`,extensions:[`mscgen`,`mscin`,`msc`],load(){return Q(()=>import(`./mscgen-qgSLujhx.js`).then(e=>$(e.mscgen)),[])}}),W.of({name:`Xù`,extensions:[`xu`],load(){return Q(()=>import(`./mscgen-qgSLujhx.js`).then(e=>$(e.xu)),[])}}),W.of({name:`MsGenny`,extensions:[`msgenny`],load(){return Q(()=>import(`./mscgen-qgSLujhx.js`).then(e=>$(e.msgenny)),[])}}),W.of({name:`Vue`,extensions:[`vue`],load(){return Q(()=>import(`./dist-C1uAVsF-.js`).then(e=>e.vue()),__vite__mapDeps([21,1]))}}),W.of({name:`Angular Template`,load(){return Q(()=>import(`./dist-jGvx4PBr.js`).then(e=>e.angular()),__vite__mapDeps([22,1]))}})],$Q=et((e=>{var t=at(),n=lt();function r(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}var i=Symbol.for(`react.transitional.element`),a=Symbol.for(`react.portal`),o=Symbol.for(`react.fragment`),s=Symbol.for(`react.strict_mode`),c=Symbol.for(`react.profiler`),l=Symbol.for(`react.consumer`),u=Symbol.for(`react.context`),d=Symbol.for(`react.forward_ref`),f=Symbol.for(`react.suspense`),p=Symbol.for(`react.suspense_list`),m=Symbol.for(`react.memo`),h=Symbol.for(`react.lazy`),g=Symbol.for(`react.scope`),_=Symbol.for(`react.activity`),v=Symbol.for(`react.legacy_hidden`),y=Symbol.for(`react.memo_cache_sentinel`),b=Symbol.for(`react.view_transition`),x=Symbol.for(`react.recoverable`),S=Symbol.iterator;function C(e){return typeof e!=`object`||!e?null:(e=S&&e[S]||e[`@@iterator`],typeof e==`function`?e:null)}var w=Symbol.for(`react.optimistic_key`),T=Array.isArray;function E(e,t){var n=e.length&3,r=e.length-n,i=t;for(t=0;t<r;){var a=e.charCodeAt(t)&255|(e.charCodeAt(++t)&255)<<8|(e.charCodeAt(++t)&255)<<16|(e.charCodeAt(++t)&255)<<24;++t,a=3432918353*(a&65535)+((3432918353*(a>>>16)&65535)<<16)|0,a=a<<15|a>>>17,a=461845907*(a&65535)+((461845907*(a>>>16)&65535)<<16)|0,i^=a,i=i<<13|i>>>19,i=5*(i&65535)+((5*(i>>>16)&65535)<<16)|0,i=(i&65535)+27492+(((i>>>16)+58964&65535)<<16)}switch(a=0,n){case 3:a^=(e.charCodeAt(t+2)&255)<<16;case 2:a^=(e.charCodeAt(t+1)&255)<<8;case 1:a^=e.charCodeAt(t)&255,a=3432918353*(a&65535)+((3432918353*(a>>>16)&65535)<<16)|0,a=a<<15|a>>>17,i^=461845907*(a&65535)+((461845907*(a>>>16)&65535)<<16)|0}return i^=e.length,i^=i>>>16,i=2246822507*(i&65535)+((2246822507*(i>>>16)&65535)<<16)|0,i^=i>>>13,i=3266489909*(i&65535)+((3266489909*(i>>>16)&65535)<<16)|0,(i^i>>>16)>>>0}var D=Object.assign,O=Object.prototype.hasOwnProperty,k=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]*$`),A={},j={};function M(e){return O.call(j,e)?!0:O.call(A,e)?!1:k.test(e)?j[e]=!0:(A[e]=!0,!1)}var N=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(` `)),P=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`],[`maskType`,`mask-type`],[`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`]]),ee=/["'&<>]/;function F(e){if(typeof e==`boolean`||typeof e==`number`||typeof e==`bigint`)return``+e;e=``+e;var t=ee.exec(e);if(t){var n=``,r,i=0;for(r=t.index;r<e.length;r++){switch(e.charCodeAt(r)){case 34:t=`"`;break;case 38:t=`&`;break;case 39:t=`'`;break;case 60:t=`<`;break;case 62:t=`>`;break;default:continue}i!==r&&(n+=e.slice(i,r)),i=r+1,n+=t}e=i===r?n:n+e.slice(i,r)}return e}var I=/([A-Z])/g,L=/^ms-/,te=/^[\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 R(e){return te.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}var z=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne={pending:!1,data:null,method:null,action:null},re=B.d;B.d={f:re.f,r:re.r,D:ct,C:ut,L:dt,m:ft,X:q,S:pt,M:J};var ie=[],ae=null,oe=/(<\/|<)(s)(cript)/gi;function V(e,t,n,r){return``+t+(n===`s`?`\\u0073`:`\\u0053`)+r}function se(e,t,n,r,i){return{idPrefix:e===void 0?``:e,nextFormID:0,streamingFormat:0,bootstrapScriptContent:n,bootstrapScripts:r,bootstrapModules:i,instructions:0,hasBody:!1,hasHtml:!1,unknownResources:{},dnsResources:{},connectResources:{default:{},anonymous:{},credentials:{}},imageResources:{},styleResources:{},scriptResources:{},moduleUnknownResources:{},moduleScriptResources:{}}}function H(e,t,n,r){return{insertionMode:e,selectedValue:t,tagScope:n,viewTransition:r}}function ce(e,t,n){var r=e.tagScope&-25;switch(t){case`noscript`:return H(2,null,r|1,null);case`select`:return H(2,n.value==null?n.defaultValue:n.value,r,null);case`svg`:return H(4,null,r,null);case`picture`:return H(2,null,r|2,null);case`math`:return H(5,null,r,null);case`foreignObject`:return H(2,null,r,null);case`table`:return H(6,null,r,null);case`thead`:case`tbody`:case`tfoot`:return H(7,null,r,null);case`colgroup`:return H(9,null,r,null);case`tr`:return H(8,null,r,null);case`head`:if(2>e.insertionMode)return H(3,null,r,null);break;case`html`:if(e.insertionMode===0)return H(1,null,r,null)}return 6<=e.insertionMode||2>e.insertionMode?H(2,null,r,null):e.viewTransition!==null||e.tagScope!==r?H(e.insertionMode,e.selectedValue,r,null):e}function le(e){return e===null?null:{update:e.update,enter:`none`,exit:`none`,share:e.update,parentEnter:`none`,parentExit:`none`,name:e.autoName,autoName:e.autoName,nameIdx:0}}function U(e,t){return t.tagScope&32&&(e.instructions|=128),H(t.insertionMode,t.selectedValue,t.tagScope|12,le(t.viewTransition))}function ue(e,t){e=le(t.viewTransition);var n=t.tagScope|16;return e!==null&&e.share!==`none`&&(n|=64),H(t.insertionMode,t.selectedValue,n,e)}function de(e,t,n){return e=`_`+e.idPrefix+`R_`+t,0<n&&(e+=`H`+n.toString(32)),e+`_`}function fe(e,t){t=t.viewTransition,t!==null&&(t.name!==`auto`&&(ge(e,`vt-name`,t.nameIdx===0?t.name:t.name+`_`+t.nameIdx),t.nameIdx++),ge(e,`vt-update`,t.update),t.enter!==`none`&&ge(e,`vt-enter`,t.enter),t.exit!==`none`&&ge(e,`vt-exit`,t.exit),t.share!==`none`&&ge(e,`vt-share`,t.share))}var pe=new Map;function me(e,t){if(typeof t!=`object`)throw Error(r(62));var n=!0,i;for(i in t)if(O.call(t,i)){var a=t[i];if(a!=null&&typeof a!=`boolean`&&a!==``){if(i.indexOf(`--`)===0){var o=F(i);a=F((``+a).trim())}else o=pe.get(i),o===void 0&&(o=F(i.replace(I,`-$1`).toLowerCase().replace(L,`-ms-`)),pe.set(i,o)),a=typeof a==`number`?a===0||N.has(i)?``+a:a+`px`:F((``+a).trim());n?(n=!1,e.push(` style="`,o,`:`,a)):e.push(`;`,o,`:`,a)}}n||e.push(`"`)}function he(e,t,n){n&&typeof n!=`function`&&typeof n!=`symbol`&&e.push(` `,t,`=""`)}function ge(e,t,n){typeof n!=`function`&&typeof n!=`symbol`&&typeof n!=`boolean`&&e.push(` `,t,`="`,F(n),`"`)}var _e=F(`javascript:throw new Error('React form unexpectedly submitted.')`);function ve(e,t){this.push(`<input type="hidden"`),ye(e),ge(this,`name`,t),ge(this,`value`,e),this.push(`/>`)}function ye(e){if(typeof e!=`string`)throw Error(r(480))}function be(e,t){if(typeof t.$$FORM_ACTION==`function`){var n=e.nextFormID++;e=e.idPrefix+n;try{var r=t.$$FORM_ACTION(e);return r&&r.data?.forEach(ye),r}catch(e){if(typeof e==`object`&&e&&typeof e.then==`function`)throw e}}return null}function xe(e,t,n,r,i,a,o,s){var c=null;if(typeof r==`function`){var l=be(t,r);l===null?(e.push(` `,`formAction`,`="`,_e,`"`),o=a=i=r=s=null,we(t,n)):(s=l.name,r=l.action||``,i=l.encType,a=l.method,o=l.target,c=l.data)}return s!=null&&W(e,`name`,s),r!=null&&W(e,`formAction`,r),i!=null&&W(e,`formEncType`,i),a!=null&&W(e,`formMethod`,a),o!=null&&W(e,`formTarget`,o),c}function W(e,t,n){switch(t){case`className`:ge(e,`class`,n);break;case`tabIndex`:ge(e,`tabindex`,n);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:ge(e,t,n);break;case`style`:me(e,n);break;case`src`:case`href`:if(n===``)break;case`action`:case`formAction`:if(n==null||typeof n==`function`||typeof n==`symbol`||typeof n==`boolean`)break;n=R(``+n),e.push(` `,t,`="`,F(n),`"`);break;case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`ref`:break;case`autoFocus`:case`multiple`:case`muted`:he(e,t.toLowerCase(),n);break;case`xlinkHref`:if(typeof n==`function`||typeof n==`symbol`||typeof n==`boolean`)break;n=R(``+n),e.push(` `,`xlink:href`,`="`,F(n),`"`);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:typeof n!=`function`&&typeof n!=`symbol`&&e.push(` `,t,`="`,F(n),`"`);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`credentialless`: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`:n&&typeof n!=`function`&&typeof n!=`symbol`&&e.push(` `,t,`=""`);break;case`capture`:case`download`:!0===n?e.push(` `,t,`=""`):!1!==n&&typeof n!=`function`&&typeof n!=`symbol`&&e.push(` `,t,`="`,F(n),`"`);break;case`cols`:case`rows`:case`size`:case`span`:typeof n!=`function`&&typeof n!=`symbol`&&!isNaN(n)&&1<=n&&e.push(` `,t,`="`,F(n),`"`);break;case`rowSpan`:case`start`:typeof n==`function`||typeof n==`symbol`||isNaN(n)||e.push(` `,t,`="`,F(n),`"`);break;case`xlinkActuate`:ge(e,`xlink:actuate`,n);break;case`xlinkArcrole`:ge(e,`xlink:arcrole`,n);break;case`xlinkRole`:ge(e,`xlink:role`,n);break;case`xlinkShow`:ge(e,`xlink:show`,n);break;case`xlinkTitle`:ge(e,`xlink:title`,n);break;case`xlinkType`:ge(e,`xlink:type`,n);break;case`xmlBase`:ge(e,`xml:base`,n);break;case`xmlLang`:ge(e,`xml:lang`,n);break;case`xmlSpace`:ge(e,`xml:space`,n);break;default:if((!(2<t.length)||t[0]!==`o`&&t[0]!==`O`||t[1]!==`n`&&t[1]!==`N`)&&(t=P.get(t)||t,M(t))){switch(typeof n){case`function`:case`symbol`:return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`)return}e.push(` `,t,`="`,F(n),`"`)}}}function Se(e,t,n){if(t!=null){if(n!=null)throw Error(r(60));if(typeof t!=`object`||!(`__html`in t))throw Error(r(61));t=t.__html,t!=null&&e.push(``+t)}}function Ce(e){var n=``;return t.Children.forEach(e,function(e){e!=null&&(n+=e)}),n}function we(e,t){if(!(e.instructions&16)){e.instructions|=16;var n=t.preamble,r=t.bootstrapChunks;(n.htmlChunks||n.headChunks)&&r.length===0?(r.push(t.startInlineScript),rt(r,e),r.push(`>`,`addEventListener("submit",function(a){if(!a.defaultPrevented){var b=a.target,d=a.submitter,c=b.action,e=d;if(d){var f=d.getAttribute("formAction");null!=f&&(c=f,e=null)}"javascript:throw new Error('React form unexpectedly submitted.')"===c&&(a.preventDefault(),a=new FormData(b,e),c=b.ownerDocument||b,(c.$$reactFormReplay=c.$$reactFormReplay||[]).push(b,d,a))}});`,`<\/script>`)):r.unshift(t.startInlineScript,`>`,`addEventListener("submit",function(a){if(!a.defaultPrevented){var b=a.target,d=a.submitter,c=b.action,e=d;if(d){var f=d.getAttribute("formAction");null!=f&&(c=f,e=null)}"javascript:throw new Error('React form unexpectedly submitted.')"===c&&(a.preventDefault(),a=new FormData(b,e),c=b.ownerDocument||b,(c.$$reactFormReplay=c.$$reactFormReplay||[]).push(b,d,a))}});`,`<\/script>`)}}function Te(e,t){for(var n in e.push(Fe(`link`)),t)if(O.call(t,n)){var i=t[n];if(i!=null)switch(n){case`children`:case`dangerouslySetInnerHTML`:throw Error(r(399,`link`));default:W(e,n,i)}}return e.push(`/>`),null}var Ee=/(<\/|<)(s)(tyle)/gi;function De(e,t,n,r){return``+t+(n===`s`?`\\73 `:`\\53 `)+r}function Oe(e,t,n,i){for(var a in e.push(Fe(n)),t)if(O.call(t,a)){var o=t[a];if(o!=null)switch(a){case`children`:case`dangerouslySetInnerHTML`:throw Error(r(399,n));default:W(e,a,o)}}return fe(e,i),e.push(`/>`),null}function ke(e,t){e.push(Fe(`title`));var n=null,r=null,i;for(i in t)if(O.call(t,i)){var a=t[i];if(a!=null)switch(i){case`children`:n=a;break;case`dangerouslySetInnerHTML`:r=a;break;default:W(e,i,a)}}return e.push(`>`),t=Array.isArray(n)?2>n.length?n[0]:null:n,typeof t!=`function`&&typeof t!=`symbol`&&t!=null&&e.push(F(``+t)),Se(e,r,n),e.push(Re(`title`)),null}function Ae(e,t){e.push(Fe(`script`));var n=null,r=null,i;for(i in t)if(O.call(t,i)){var a=t[i];if(a!=null)switch(i){case`children`:n=a;break;case`dangerouslySetInnerHTML`:r=a;break;default:W(e,i,a)}}return e.push(`>`),Se(e,r,n),typeof n==`string`&&e.push((``+n).replace(oe,V)),e.push(Re(`script`)),null}function je(e,t,n,r){e.push(Fe(n));var i=n=null,a;for(a in t)if(O.call(t,a)){var o=t[a];if(o!=null)switch(a){case`children`:n=o;break;case`dangerouslySetInnerHTML`:i=o;break;default:W(e,a,o)}}return fe(e,r),e.push(`>`),Se(e,i,n),n}function Me(e,t,n,r){e.push(Fe(n));var i=n=null,a;for(a in t)if(O.call(t,a)){var o=t[a];if(o!=null)switch(a){case`children`:n=o;break;case`dangerouslySetInnerHTML`:i=o;break;default:W(e,a,o)}}return fe(e,r),e.push(`>`),Se(e,i,n),typeof n==`string`?(e.push(F(n)),null):n}var Ne=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,Pe=new Map;function Fe(e){var t=Pe.get(e);if(t===void 0){if(!Ne.test(e))throw Error(r(65,e));t=`<`+e,Pe.set(e,t)}return t}function Ie(e,t,n,i,a,o,s,c,l){switch(t){case`div`:case`span`:case`svg`:case`path`:break;case`a`:e.push(Fe(`a`));var u=null,d=null,f;for(f in n)if(O.call(n,f)){var p=n[f];if(p!=null)switch(f){case`children`:u=p;break;case`dangerouslySetInnerHTML`:d=p;break;case`href`:p===``?ge(e,`href`,``):W(e,f,p);break;default:W(e,f,p)}}if(fe(e,c),e.push(`>`),Se(e,d,u),typeof u==`string`){e.push(F(u));var m=null}else m=u;return m;case`g`:case`p`:case`li`:break;case`select`:e.push(Fe(`select`));var h=null,g=null,_;for(_ in n)if(O.call(n,_)){var v=n[_];if(v!=null)switch(_){case`children`:h=v;break;case`dangerouslySetInnerHTML`:g=v;break;case`defaultValue`:case`value`:break;default:W(e,_,v)}}return fe(e,c),e.push(`>`),Se(e,g,h),h;case`option`:var y=c.selectedValue;e.push(Fe(`option`));var b=null,x=null,S=null,C=null,w;for(w in n)if(O.call(n,w)){var E=n[w];if(E!=null)switch(w){case`children`:b=E;break;case`selected`:S=E;break;case`dangerouslySetInnerHTML`:C=E;break;case`value`:x=E;default:W(e,w,E)}}if(y!=null){var k=x===null?Ce(b):``+x;if(T(y)){for(var A=0;A<y.length;A++)if(``+y[A]===k){e.push(` selected=""`);break}}else``+y===k&&e.push(` selected=""`)}else S&&e.push(` selected=""`);return e.push(`>`),Se(e,C,b),b;case`textarea`:e.push(Fe(`textarea`));var j=null,N=null,P=null,ee;for(ee in n)if(O.call(n,ee)){var I=n[ee];if(I!=null)switch(ee){case`children`:P=I;break;case`value`:j=I;break;case`defaultValue`:N=I;break;case`dangerouslySetInnerHTML`:throw Error(r(91));default:W(e,ee,I)}}if(j===null&&N!==null&&(j=N),fe(e,c),e.push(`>`),P!=null){if(j!=null)throw Error(r(92));if(T(P)){if(1<P.length)throw Error(r(93));j=``+P[0]}j=``+P}return typeof j==`string`&&j[0]===`
|
|
253
253
|
`&&e.push(`
|
|
254
254
|
`),j!==null&&e.push(F(``+j)),null;case`input`:e.push(Fe(`input`));var L=null,te=null,z=null,B=null,ne=null,re=null,ae=null,oe=null,V=null,se;for(se in n)if(O.call(n,se)){var H=n[se];if(H!=null)switch(se){case`children`:case`dangerouslySetInnerHTML`:throw Error(r(399,`input`));case`name`:L=H;break;case`formAction`:te=H;break;case`formEncType`:z=H;break;case`formMethod`:B=H;break;case`formTarget`:ne=H;break;case`defaultChecked`:V=H;break;case`defaultValue`:ae=H;break;case`checked`:oe=H;break;case`value`:re=H;break;default:W(e,se,H)}}var ce=xe(e,i,a,te,z,B,ne,L);return oe===null?V!==null&&he(e,`checked`,V):he(e,`checked`,oe),re===null?ae!==null&&W(e,`value`,ae):W(e,`value`,re),fe(e,c),e.push(`/>`),ce?.forEach(ve,e),null;case`button`:e.push(Fe(`button`));var le=null,U=null,ue=null,de=null,pe=null,ye=null,Ne=null,Pe;for(Pe in n)if(O.call(n,Pe)){var Ie=n[Pe];if(Ie!=null)switch(Pe){case`children`:le=Ie;break;case`dangerouslySetInnerHTML`:U=Ie;break;case`name`:ue=Ie;break;case`formAction`:de=Ie;break;case`formEncType`:pe=Ie;break;case`formMethod`:ye=Ie;break;case`formTarget`:Ne=Ie;break;default:W(e,Pe,Ie)}}var Le=xe(e,i,a,de,pe,ye,Ne,ue);if(fe(e,c),e.push(`>`),Le?.forEach(ve,e),Se(e,U,le),typeof le==`string`){e.push(F(le));var ze=null}else ze=le;return ze;case`form`:e.push(Fe(`form`));var Be=null,Ve=null,He=null,G=null,Ue=null,We=null,Ge;for(Ge in n)if(O.call(n,Ge)){var Ke=n[Ge];if(Ke!=null)switch(Ge){case`children`:Be=Ke;break;case`dangerouslySetInnerHTML`:Ve=Ke;break;case`action`:He=Ke;break;case`encType`:G=Ke;break;case`method`:Ue=Ke;break;case`target`:We=Ke;break;default:W(e,Ge,Ke)}}var K=null,qe=null;if(typeof He==`function`){var Je=be(i,He);Je===null?(e.push(` `,`action`,`="`,_e,`"`),We=Ue=G=He=null,we(i,a)):(He=Je.action||``,G=Je.encType,Ue=Je.method,We=Je.target,K=Je.data,qe=Je.name)}if(He!=null&&W(e,`action`,He),G!=null&&W(e,`encType`,G),Ue!=null&&W(e,`method`,Ue),We!=null&&W(e,`target`,We),fe(e,c),e.push(`>`),qe!==null&&(e.push(`<input type="hidden"`),ge(e,`name`,qe),e.push(`/>`),K?.forEach(ve,e)),Se(e,Ve,Be),typeof Be==`string`){e.push(F(Be));var Ye=null}else Ye=Be;return Ye;case`menuitem`:for(var Xe in e.push(Fe(`menuitem`)),n)if(O.call(n,Xe)){var Ze=n[Xe];if(Ze!=null)switch(Xe){case`children`:case`dangerouslySetInnerHTML`:throw Error(r(400));default:W(e,Xe,Ze)}}return fe(e,c),e.push(`>`),null;case`object`:e.push(Fe(`object`));var Qe=null,$e=null,et;for(et in n)if(O.call(n,et)){var tt=n[et];if(tt!=null)switch(et){case`children`:Qe=tt;break;case`dangerouslySetInnerHTML`:$e=tt;break;case`data`:var nt=R(``+tt);if(nt===``)break;e.push(` `,`data`,`="`,F(nt),`"`);break;default:W(e,et,tt)}}if(fe(e,c),e.push(`>`),Se(e,$e,Qe),typeof Qe==`string`){e.push(F(Qe));var rt=null}else rt=Qe;return rt;case`title`:var it=c.tagScope&1,at=c.tagScope&4;if(c.insertionMode===4||it||n.itemProp!=null)var ot=ke(e,n);else at?ot=null:(ke(a.hoistableChunks,n),ot=void 0);return ot;case`link`:var st=c.tagScope&1,ct=c.tagScope&4,lt=n.rel,ut=n.href,dt=n.precedence;if(c.insertionMode===4||st||n.itemProp!=null||typeof lt!=`string`||typeof ut!=`string`||ut===``){Te(e,n);var ft=null}else if(n.rel===`stylesheet`){if(typeof dt!=`string`||n.disabled!=null||n.onLoad||n.onError)ft=Te(e,n);else{var pt=a.styles.get(dt),q=i.styleResources.hasOwnProperty(ut)?i.styleResources[ut]:void 0;if(q!==null){i.styleResources[ut]=null,pt||(pt={precedence:F(dt),rules:[],hrefs:[],sheets:new Map},a.styles.set(dt,pt));var J={state:0,props:D({},n,{"data-precedence":n.precedence,precedence:null})};if(q){q.length===2&&mt(J.props,q);var gt=a.preloads.stylesheets.get(ut);gt&&0<gt.length?gt.length=0:J.state=1}pt.sheets.set(ut,J),s&&s.stylesheets.add(J)}else if(pt){var _t=pt.sheets.get(ut);_t&&s&&s.stylesheets.add(_t)}l&&e.push(`<!-- -->`),ft=null}}else n.onLoad||n.onError?ft=Te(e,n):(l&&e.push(`<!-- -->`),ft=ct?null:Te(a.hoistableChunks,n));return ft;case`script`:var vt=c.tagScope&1,yt=n.async;if(typeof n.src!=`string`||!n.src||!yt||typeof yt==`function`||typeof yt==`symbol`||n.onLoad||n.onError||c.insertionMode===4||vt||n.itemProp!=null)var bt=Ae(e,n);else{var xt=n.src;if(n.type===`module`)var St=i.moduleScriptResources,Ct=a.preloads.moduleScripts;else St=i.scriptResources,Ct=a.preloads.scripts;var wt=St.hasOwnProperty(xt)?St[xt]:void 0;if(wt!==null){St[xt]=null;var Tt=n;if(wt){wt.length===2&&(Tt=D({},n),mt(Tt,wt));var Et=Ct.get(xt);Et&&(Et.length=0)}var Dt=[];a.scripts.add(Dt),Ae(Dt,Tt)}l&&e.push(`<!-- -->`),bt=null}return bt;case`style`:var Ot=c.tagScope&1,kt=n.precedence,At=n.href,jt=n.nonce;if(c.insertionMode===4||Ot||n.itemProp!=null||typeof kt!=`string`||typeof At!=`string`||At===``){e.push(Fe(`style`));var Mt=null,Nt=null,Pt;for(Pt in n)if(O.call(n,Pt)){var Ft=n[Pt];if(Ft!=null)switch(Pt){case`children`:Mt=Ft;break;case`dangerouslySetInnerHTML`:Nt=Ft;break;default:W(e,Pt,Ft)}}e.push(`>`);var It=Array.isArray(Mt)?2>Mt.length?Mt[0]:null:Mt;typeof It!=`function`&&typeof It!=`symbol`&&It!=null&&e.push((``+It).replace(Ee,De)),Se(e,Nt,Mt),e.push(Re(`style`));var Lt=null}else{var Rt=a.styles.get(kt);if((i.styleResources.hasOwnProperty(At)?i.styleResources[At]:void 0)!==null){i.styleResources[At]=null,Rt||(Rt={precedence:F(kt),rules:[],hrefs:[],sheets:new Map},a.styles.set(kt,Rt));var zt=a.nonce.style;if(!zt||zt===jt){Rt.hrefs.push(F(At));var Bt=Rt.rules,Vt=null,Ht=null,Ut;for(Ut in n)if(O.call(n,Ut)){var Wt=n[Ut];if(Wt!=null)switch(Ut){case`children`:Vt=Wt;break;case`dangerouslySetInnerHTML`:Ht=Wt}}var Gt=Array.isArray(Vt)?2>Vt.length?Vt[0]:null:Vt;typeof Gt!=`function`&&typeof Gt!=`symbol`&&Gt!=null&&Bt.push((``+Gt).replace(Ee,De)),Se(Bt,Ht,Vt)}}Rt&&s&&s.styles.add(Rt),l&&e.push(`<!-- -->`),Lt=void 0}return Lt;case`meta`:var Kt=c.tagScope&1,qt=c.tagScope&4;if(c.insertionMode===4||Kt||n.itemProp!=null)var Jt=Oe(e,n,`meta`,c);else l&&e.push(`<!-- -->`),Jt=qt?null:typeof n.charSet==`string`?Oe(a.charsetChunks,n,`meta`,c):n.name===`viewport`?Oe(a.viewportChunks,n,`meta`,c):Oe(a.hoistableChunks,n,`meta`,c);return Jt;case`listing`:case`pre`:e.push(Fe(t));var Yt=null,Xt=null,Zt;for(Zt in n)if(O.call(n,Zt)){var Qt=n[Zt];if(Qt!=null)switch(Zt){case`children`:Yt=Qt;break;case`dangerouslySetInnerHTML`:Xt=Qt;break;default:W(e,Zt,Qt)}}if(fe(e,c),e.push(`>`),Xt!=null){if(Yt!=null)throw Error(r(60));if(typeof Xt!=`object`||!(`__html`in Xt))throw Error(r(61));var $t=Xt.__html;$t!=null&&(typeof $t==`string`&&0<$t.length&&$t[0]===`
|
|
255
255
|
`?e.push(`
|
|
@@ -312,13 +312,13 @@ A.finished.finally(function(){document.__reactViewTransition===A&&(document.__re
|
|
|
312
312
|
`),e=r===-1?e:e.slice(r+1),e.indexOf(n)!==-1)){n=`
|
|
313
313
|
`+e;break a}n=Ji(n+(t?` [`+t+`]`:``))}return n}}switch(e){case p:return Ji(`SuspenseList`);case f:return Ji(`Suspense`);case b:return Ji(`ViewTransition`)}return``}function Qi(e,t){return e=e==null||typeof e==`string`?e:e.default,t=t==null||typeof t==`string`?t:t.default,t==null?e===`auto`?null:e:t===`auto`?null:t}function $i(e,t){return(500<t.byteSize||Lr(t.contentState,!1)||t.defer)&&t.preamble===null}function ea(e){if(typeof e==`object`&&e&&typeof e.environmentName==`string`){var t=e.environmentName;e=[e].slice(0),typeof e[0]==`string`?e.splice(0,1,`%c%s%c `+e[0],`background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px`,` `+t+` `,``):e.splice(0,0,`%c%s%c`,`background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px`,` `+t+` `,``),e.unshift(console),t=Rr.apply(console.error,e),t()}else console.error(e);return null}function ta(e,t,n,r,i,a,o,s,c,l,u){var d=new Set;this.destination=null,this.flushScheduled=!1,this.resumableState=e,this.renderState=t,this.rootFormatContext=n,this.progressiveChunkSize=r===void 0?12800:r,this.status=10,this.fatalError=null,this.aborted=!1,this.pendingRootTasks=this.allPendingTasks=this.nextSegmentId=0,this.completedPreambleSegments=this.completedRootSegment=null,this.byteSize=0,this.abortableTasks=d,this.pingedTasks=[],this.currentTask=null,this.clientRenderedBoundaries=[],this.completedBoundaries=[],this.partialBoundaries=[],this.postponedState=this.trackedPostpones=null,this.onError=i===void 0?ea:i,this.onBrowserBailout=a===void 0?ri:a,this.onAllReady=o===void 0?ri:o,this.onShellReady=s===void 0?ri:s,this.onShellError=c===void 0?ri:c,this.onFatalError=l===void 0?ri:l,this.renderLifetimeController=null,this.formState=u===void 0?null:u}function na(e,t,n,r,i,a,o,s,c,l,u,d){return t=new ta(t,n,r,i,a,o,s,c,l,u,d),n=da(t,0,null,r,!1,!1),n.parentFlushed=!0,e=la(t,null,e,-1,null,n,null,null,t.abortableTasks,null,r,null,Xr,null,null),fa(e),t.pingedTasks.push(e),t}function ra(e,t,n,r,i,a,o,s,c,l,u){return e=na(e,t,n,r,i,a,o,s,c,l,u,void 0),e.trackedPostpones={workingMap:new Map,rootNodes:[],rootSlots:null},e}function ia(e,t,n,r,i,a,o,s,c){return n=new ta(t.resumableState,n,t.rootFormatContext,t.progressiveChunkSize,r,i,a,o,s,c,null),n.nextSegmentId=t.nextSegmentId,typeof t.replaySlots==`number`?(r=da(n,0,null,t.rootFormatContext,!1,!1),r.parentFlushed=!0,e=la(n,null,e,-1,null,r,null,null,n.abortableTasks,null,t.rootFormatContext,null,Xr,null,null),fa(e),n.pingedTasks.push(e),n):(e=ua(n,null,{nodes:t.replayNodes,slots:t.replaySlots,pendingTasks:0},e,-1,null,null,n.abortableTasks,null,t.rootFormatContext,null,Xr,null,null),fa(e),n.pingedTasks.push(e),n)}function aa(e,t,n,r,i,a,o,s,c){return e=ia(e,t,n,r,i,a,o,s,c),e.trackedPostpones={workingMap:new Map,rootNodes:[],rootSlots:null},e}var oa=null;function sa(e,t){e.pingedTasks.push(t),e.pingedTasks.length===1&&(e.flushScheduled=e.destination!==null,e.trackedPostpones!==null||e.status===10?P(function(){return Ga(e)}):j(function(){return Ga(e)}))}function ca(e,t,n,r,i){return n={status:0,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,row:t,completedSegments:[],byteSize:0,defer:i,fallbackAbortableTasks:n,errorDigest:null,contentState:br(),fallbackState:br(),preamble:r,tracked:null},t!==null&&(t.pendingTasks++,r=t.boundaries,r!==null&&(e.allPendingTasks++,n.pendingTasks++,r.push(n)),e=t.inheritedHoistables,e!==null&&Ir(n.contentState,e)),n}function la(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m){e.allPendingTasks++,i===null?e.pendingRootTasks++:i.pendingTasks++,p!==null&&p.pendingTasks++;var h={replay:null,node:n,childIndex:r,ping:{resolve:function(){return sa(e,h)},reject:function(t){e.aborted?h.abortSet.delete(h)&&Ra(h,e,t):sa(e,h)}},blockedBoundary:i,blockedSegment:a,blockedPreamble:o,hoistableState:s,abortSet:c,keyPath:l,formatContext:u,context:d,treeContext:f,row:p,componentStack:m,thenableState:t};return c.add(h),h}function ua(e,t,n,r,i,a,o,s,c,l,u,d,f,p){e.allPendingTasks++,a===null?e.pendingRootTasks++:a.pendingTasks++,f!==null&&f.pendingTasks++,n.pendingTasks++;var m={replay:n,node:r,childIndex:i,ping:{resolve:function(){return sa(e,m)},reject:function(t){e.aborted?m.abortSet.delete(m)&&Ra(m,e,t):sa(e,m)}},blockedBoundary:a,blockedSegment:null,blockedPreamble:null,hoistableState:o,abortSet:s,keyPath:c,formatContext:l,context:u,treeContext:d,row:f,componentStack:p,thenableState:t};return s.add(m),m}function da(e,t,n,r,i,a){return{status:0,parentFlushed:!1,id:-1,index:t,chunks:[],children:[],preambleChildren:[],parentFormatContext:r,boundary:n,lastPushedText:i,textEmbedded:a}}function fa(e){var t=e.node;if(typeof t==`object`&&t)switch(t.$$typeof){case i:e.componentStack={parent:e.componentStack,type:t.type}}}function pa(e){return e===null?null:{parent:e.parent,type:`Suspense Fallback`}}function ma(e){var t={};return e&&Object.defineProperty(t,"componentStack",{configurable:!0,enumerable:!0,get:function(){try{var n=``,r=e;do n+=Zi(r.type),r=r.parent;while(r);var i=n}catch(e){i=`
|
|
314
314
|
Error generating stack: `+e.message+`
|
|
315
|
-
`+e.stack}return Object.defineProperty(t,"componentStack",{value:i}),i}}),t}function ha(e,t,n){if(wi(t))return e=e.onBrowserBailout,e(t,n),``;if(e=e.onError,t=e(t,n),t==null||typeof t==`string`)return t===``?void 0:t}function ga(e,t){var n=e.onShellError,r=e.onFatalError;e.pendingRootTasks!==0&&n(t),r(t),co(e),e.destination===null?(e.status=12,e.aborted||(e.fatalError=t)):(e.status=13,re(e.destination,t))}function _a(e,t){va(e,t.next,t.hoistables)}function va(e,t,n){for(;t!==null;){n!==null&&(Ir(t.hoistables,n),t.inheritedHoistables=n);var r=t.boundaries;if(r!==null){t.boundaries=null;for(var i=0;i<r.length;i++){var a=r[i];n!==null&&Ir(a.contentState,n),Wa(e,a,null,null)}}if(t.pendingTasks--,0<t.pendingTasks)break;n=t.hoistables,t=t.next}}function ya(e,t){var n=t.boundaries;if(n!==null&&t.pendingTasks===n.length){for(var r=!0,i=0;i<n.length;i++){var a=n[i];if(a.pendingTasks!==1||a.parentFlushed||$i(e,a)){r=!1;break}}r&&va(e,t,t.hoistables)}}function ba(e){var t={pendingTasks:1,boundaries:null,hoistables:br(),inheritedHoistables:null,together:!1,next:null};return e!==null&&0<e.pendingTasks&&(t.pendingTasks++,t.boundaries=[],e.next=t),t}function xa(e,t,n,r,i){var a=t.keyPath,o=t.treeContext,s=t.row;t.keyPath=n,n=r.length;var c=null;if(t.replay!==null){var l=t.replay.slots;if(typeof l==`object`&&l)for(var u=0;u<n;u++){var d=i!==`backwards`&&i!==`unstable_legacy-backwards`?u:n-1-u,f=r[d];t.row=c=ba(c),t.treeContext=Qr(o,n,d);var p=l[d];typeof p==`number`?(Ta(e,t,p,f,d),delete l[d]):Pa(e,t,f,d),--c.pendingTasks===0&&_a(e,c)}else for(l=0;l<n;l++)u=i!==`backwards`&&i!==`unstable_legacy-backwards`?l:n-1-l,d=r[u],t.row=c=ba(c),t.treeContext=Qr(o,n,u),Pa(e,t,d,u),--c.pendingTasks===0&&_a(e,c)}else if(i!==`backwards`&&i!==`unstable_legacy-backwards`)for(i=0;i<n;i++)l=r[i],t.row=c=ba(c),t.treeContext=Qr(o,n,i),Pa(e,t,l,i),--c.pendingTasks===0&&_a(e,c);else{for(l=t.blockedSegment,u=l.children.length,d=l.chunks.length,f=0;f<n;f++){p=i===`unstable_legacy-backwards`?n-1-f:f;var m=r[p];t.row=c=ba(c),t.treeContext=Qr(o,n,p);var h=da(e,d,null,t.formatContext,p!==0||l.lastPushedText,!0);l.children.splice(u,0,h),t.blockedSegment=h;try{Pa(e,t,m,p),h.lastPushedText&&h.textEmbedded&&h.chunks.push(He),h.status=1,Ua(e,t.blockedBoundary,h),--c.pendingTasks===0&&_a(e,c)}catch(t){throw h.status=e.aborted?3:4,t}}t.blockedSegment=l,l.lastPushedText=!1}s!==null&&c!==null&&0<c.pendingTasks&&(s.pendingTasks++,c.next=s),t.treeContext=o,t.row=s,t.keyPath=a}function Sa(e,t,n,r,i,a){var o=t.thenableState;for(t.thenableState=null,ui={},di=t,fi=e,pi=n,yi=vi=0,bi=-1,xi=0,Si=o,e=r(i,a);_i;)_i=!1,yi=vi=0,bi=-1,xi=0,Di+=1,hi=null,e=r(i,a);return Mi(),e}function Ca(e,t,n,r,i,a,o){var s=!1;if(a!==0&&e.formState!==null){var c=t.blockedSegment;if(c!==null){s=!0,c=c.chunks;for(var l=0;l<a;l++)l===o?c.push(mt):c.push(ht)}}a=t.keyPath,t.keyPath=n,i?(n=t.treeContext,t.treeContext=Qr(n,1,0),Pa(e,t,r,-1),t.treeContext=n):s?Pa(e,t,r,-1):Ea(e,t,r,-1),t.keyPath=a}function wa(e,t,n,i,a,y){if(typeof i==`function`){if(i.prototype&&i.prototype.isReactComponent){var x=a;if(`ref`in a)for(var S in x={},a)S!==`ref`&&(x[S]=a[S]);var w=i.defaultProps;if(w)for(var E in x===a&&(x=ie({},x,a)),w)x[E]===void 0&&(x[E]=w[E]);var D=x,O=Vr,k=i.contextType;typeof k==`object`&&k&&(O=k._currentValue);var A=new i(D,O),j=A.state===void 0?null:A.state;A.updater=Yr,A.props=D,A.state=j;var M={queue:[],replace:!1};A._reactInternals=M;var N=i.contextType;A.context=typeof N==`object`&&N?N._currentValue:Vr;var P=i.getDerivedStateFromProps;if(typeof P==`function`){var ee=P(D,j);A.state=ee==null?j:ie({},j,ee)}if(typeof i.getDerivedStateFromProps!=`function`&&typeof A.getSnapshotBeforeUpdate!=`function`&&(typeof A.UNSAFE_componentWillMount==`function`||typeof A.componentWillMount==`function`)){var F=A.state;if(typeof A.componentWillMount==`function`&&A.componentWillMount(),typeof A.UNSAFE_componentWillMount==`function`&&A.UNSAFE_componentWillMount(),F!==A.state&&Yr.enqueueReplaceState(A,A.state,null),M.queue!==null&&0<M.queue.length){var I=M.queue,L=M.replace;if(M.queue=null,M.replace=!1,L&&I.length===1)A.state=I[0];else{for(var te=L?I[0]:A.state,R=!0,z=+!!L;z<I.length;z++){var B=I[z],ne=typeof B==`function`?B.call(A,te,D,void 0):B;ne!=null&&(R?(R=!1,te=ie({},te,ne)):ie(te,ne))}A.state=te}}else M.queue=null}var re=A.render();if(e.aborted)throw null;var ae=t.keyPath;t.keyPath=n,Ea(e,t,re,-1),t.keyPath=ae}else{var oe=Sa(e,t,n,i,a,void 0);if(e.aborted)throw null;Ca(e,t,n,oe,vi!==0,yi,bi)}}else if(typeof i==`string`){var V=t.blockedSegment;if(V===null){var se=a.children,H=t.formatContext,ce=t.keyPath;t.formatContext=Le(H,i,a),t.keyPath=n,Pa(e,t,se,-1),t.formatContext=H,t.keyPath=ce}else{var le=Mt(V.chunks,i,a,e.resumableState,e.renderState,t.blockedPreamble,t.hoistableState,t.formatContext,V.lastPushedText);V.lastPushedText=!1;var U=t.formatContext,ue=t.keyPath;if(t.keyPath=n,(t.formatContext=Le(U,i,a)).insertionMode===3){var de=da(e,0,null,t.formatContext,!1,!1);V.preambleChildren.push(de),t.blockedSegment=de;try{Pa(e,t,le,-1),de.lastPushedText&&de.textEmbedded&&de.chunks.push(He),de.status=1,Ua(e,t.blockedBoundary,de)}finally{t.blockedSegment=V}}else Pa(e,t,le,-1);t.formatContext=U,t.keyPath=ue;a:{var fe=V.chunks,pe=e.resumableState;switch(i){case`title`:case`style`:case`script`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`img`:case`input`:case`keygen`:case`link`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:break a;case`body`:if(1>=U.insertionMode){pe.hasBody=!0;break a}break;case`html`:if(U.insertionMode===0){pe.hasHtml=!0;break a}break;case`head`:if(1>=U.insertionMode)break a}fe.push(Pt(i))}V.lastPushedText=!1}}else{switch(i){case v:case s:case c:case o:var me=t.keyPath;t.keyPath=n,Ea(e,t,a.children,-1),t.keyPath=me;return;case _:var he=t.blockedSegment;if(he===null){if(a.mode!==`hidden`){var ge=t.keyPath;t.keyPath=n,Pa(e,t,a.children,-1),t.keyPath=ge}}else if(a.mode!==`hidden`){he.chunks.push(Bt),he.lastPushedText=!1;var _e=t.keyPath;t.keyPath=n,Pa(e,t,a.children,-1),t.keyPath=_e,he.chunks.push(Vt),he.lastPushedText=!1}return;case p:a:{var ve=a.children,ye=a.revealOrder;if(ye!==`independent`&&ye!==`together`){if(T(ve)){xa(e,t,n,ve,ye);break a}var be=C(ve);if(be){var xe=be.call(ve);if(xe){var W=xe.next();if(!W.done){do W=xe.next();while(!W.done);xa(e,t,n,ve,ye)}break a}}}if(ye===`together`){var Se=t.keyPath,Ce=t.row,we=t.row=ba(null);we.boundaries=[],we.together=!0,t.keyPath=n,Ea(e,t,ve,-1),--we.pendingTasks===0&&_a(e,we),t.keyPath=Se,t.row=Ce,Ce!==null&&0<we.pendingTasks&&(Ce.pendingTasks++,we.next=Ce)}else{var Te=t.keyPath;t.keyPath=n,Ea(e,t,ve,-1),t.keyPath=Te}}return;case b:var Ee=t.formatContext,De=t.keyPath,Oe=e.resumableState;if(a.name!=null&&a.name!==`auto`)var ke=a.name;else ke=Ve(Oe,Zr(t.treeContext),0);var Ae=ke,je=e.resumableState,Me=Qi(a.default,a.update),Ne=Qi(a.default,a.enter),Ie=Qi(a.default,a.exit),Re=Qi(a.default,a.share),G=a.name;if(Me??=`auto`,Ne??=`auto`,Ie??=`auto`,G==null){var Ue=Ee.viewTransition;Ue===null?(G=`auto`,Re=`none`):(G=Ue.name,Re=Ue.share)}else Re??=`auto`,Ee.tagScope&4&&(je.instructions|=128);Ee.tagScope&8?je.instructions|=128:Ie=`none`,Ee.tagScope&16?je.instructions|=128:Ne=`none`;var We={update:Me,enter:Ne,exit:Ie,share:Re,parentEnter:`none`,parentExit:`none`,name:G,autoName:Ae,nameIdx:0},Ge=Ee.tagScope&-25;if(Ge=Me===`none`?Ge&-33:Ge|32,Ne!==`none`&&(Ge|=64),t.formatContext=Fe(Ee.insertionMode,Ee.selectedValue,Ge,We),t.keyPath=n,a.name!=null&&a.name!==`auto`)Ea(e,t,a.children,-1);else{var Ke=t.treeContext;t.treeContext=Qr(Ke,1,0),Pa(e,t,a.children,-1),t.treeContext=Ke}t.formatContext=Ee,t.keyPath=De;return;case g:throw Error(r(343));case f:a:if(t.replay!==null){var K=t.keyPath,qe=t.formatContext,Je=t.row;t.keyPath=n,t.formatContext=Be(e.resumableState,qe),t.row=null;var Ye=a.children;try{Pa(e,t,Ye,-1)}finally{t.keyPath=K,t.formatContext=qe,t.row=Je}}else{var Xe=t.keyPath,Ze=t.formatContext,Qe=t.row,$e=t.blockedBoundary,et=t.blockedPreamble,tt=t.hoistableState,nt=t.blockedSegment,rt=a.fallback,it=a.children,at=new Set,ot=ca(e,t.row,at,2>t.formatContext.insertionMode?{content:Pe(),fallback:Pe()}:null,!1),st=da(e,nt.chunks.length,ot,t.formatContext,!1,!1);nt.children.push(st),nt.lastPushedText=!1;var ct=da(e,0,null,t.formatContext,!1,!1);ct.parentFlushed=!0;var lt=e.trackedPostpones;if(lt!==null){var ut=t.componentStack,dt=[n[0],`Suspense Fallback`,n[2]];if(lt!==null){var ft=[dt[1],dt[2],[],null];lt.workingMap.set(dt,ft),ot.tracked={contentKeyPath:n,fallbackNode:ft}}t.blockedSegment=st,t.blockedPreamble=ot.preamble===null?null:ot.preamble.fallback,t.keyPath=dt,t.formatContext=ze(e.resumableState,Ze),t.componentStack=pa(ut);try{Pa(e,t,rt,-1),st.lastPushedText&&st.textEmbedded&&st.chunks.push(He),st.status=1,Ua(e,$e,st)}catch(t){throw st.status=e.aborted?3:4,t}finally{t.blockedSegment=nt,t.blockedPreamble=et,t.keyPath=Xe,t.formatContext=Ze}var pt=la(e,null,it,-1,ot,ct,ot.preamble===null?null:ot.preamble.content,ot.contentState,t.abortSet,n,Be(e.resumableState,t.formatContext),t.context,t.treeContext,null,ut);fa(pt),e.pingedTasks.push(pt)}else{t.blockedBoundary=ot,t.blockedPreamble=ot.preamble===null?null:ot.preamble.content,t.hoistableState=ot.contentState,t.blockedSegment=ct,t.keyPath=n,t.formatContext=Be(e.resumableState,Ze),t.row=null;try{if(Pa(e,t,it,-1),ct.lastPushedText&&ct.textEmbedded&&ct.chunks.push(He),ct.status=1,Ua(e,ot,ct),Ha(ot,ct),ot.pendingTasks===0&&ot.status===0){if(ot.status=1,!$i(e,ot)){Qe!==null&&--Qe.pendingTasks===0&&_a(e,Qe),e.pendingRootTasks===0&&t.blockedPreamble&&Ja(e);break a}}else Qe!==null&&Qe.together&&ya(e,Qe)}catch(n){if(ot.status=4,e.aborted){ct.status=3;var q=e.fatalError}else ct.status=4,q=n;var J=ma(t.componentStack);ot.errorDigest=ha(e,q,J),ja(e,ot)}finally{t.blockedBoundary=$e,t.blockedPreamble=et,t.hoistableState=tt,t.blockedSegment=nt,t.keyPath=Xe,t.formatContext=Ze,t.row=Qe}var mt=la(e,null,rt,-1,$e,st,ot.preamble===null?null:ot.preamble.fallback,ot.fallbackState,at,[n[0],`Suspense Fallback`,n[2]],ze(e.resumableState,t.formatContext),t.context,t.treeContext,t.row,pa(t.componentStack));fa(mt),e.pingedTasks.push(mt)}}return}if(typeof i==`object`&&i)switch(i.$$typeof){case d:if(`ref`in a){var ht={};for(var gt in a)gt!==`ref`&&(ht[gt]=a[gt])}else ht=a;Ca(e,t,n,Sa(e,t,n,i.render,ht,y),vi!==0,yi,bi);return;case m:wa(e,t,n,i.type,a,y);return;case u:var _t=a.children,vt=t.keyPath,yt=a.value,bt=i._currentValue;i._currentValue=yt;var xt=Hr,St={parent:xt,depth:xt===null?0:xt.depth+1,context:i,parentValue:bt,value:yt};Hr=St,t.context=St,t.keyPath=n,Ea(e,t,_t,-1);var Ct=Hr;if(Ct===null)throw Error(r(403));Ct.context._currentValue=Ct.parentValue,t.context=Hr=Ct.parent,t.keyPath=vt;return;case l:var wt=a.children,Tt=wt(i._context._currentValue),Et=t.keyPath;t.keyPath=n,Ea(e,t,Tt,-1),t.keyPath=Et;return;case h:var Dt=i._init,Ot=Dt(i._payload);if(e.aborted)throw null;wa(e,t,n,Ot,a,y);return}throw Error(r(130,i==null?i:typeof i,``))}}function Ta(e,t,n,r,i){var a=t.replay,o=t.blockedBoundary,s=da(e,0,null,t.formatContext,!1,!1);s.id=n,s.parentFlushed=!0;try{t.replay=null,t.blockedSegment=s,Pa(e,t,r,i),s.status=1,Ua(e,o,s),o===null?e.completedRootSegment=s:(Ha(o,s),o.parentFlushed&&e.partialBoundaries.push(o))}finally{t.replay=a,t.blockedSegment=null}}function Ea(e,t,n,r){t.replay!==null&&typeof t.replay.slots==`number`?Ta(e,t,t.replay.slots,n,r):(t.node=n,t.childIndex=r,n=t.componentStack,fa(t),Da(e,t),t.componentStack=n)}function Da(e,t){var n=t.node,o=t.childIndex;if(n!==null){if(typeof n==`object`){switch(n.$$typeof){case i:var s=n.type,c=n.key,l=n.props;n=l.ref;var d=n===void 0?null:n,p=Br(s),m=c==null||c===w?o===-1?0:o:c;if(c=[t.keyPath,p,m],t.replay!==null)a:{var g=t.replay;for(o=g.nodes,n=0;n<o.length;n++){var _=o[n];if(m===_[1]){if(_.length===4){if(p!==null&&p!==_[0])throw Error(r(490,_[0],p));var v=_[2],y=_[3],b=t.node;t.replay={nodes:v,slots:y,pendingTasks:1};try{if(wa(e,t,c,s,l,d),t.replay.pendingTasks===1&&0<t.replay.nodes.length)throw Error(r(488));t.replay.pendingTasks--}catch(r){if(typeof r==`object`&&r&&(r===ii||typeof r.then==`function`||r.message===`Maximum call stack size exceeded`))throw t.node===b?t.replay=g:o.splice(n,1),r;t.replay.pendingTasks--,c=ma(t.componentStack),b=e,l=t.blockedBoundary,e=e.aborted?e.fatalError:r,c=ha(b,e,c),Ia(b,l,v,y,e,c)}t.replay=g}else{if(s!==f)throw Error(r(490,`Suspense`,Br(s)||`Unknown`));b:{g=_[5],s=_[2],d=_[3],p=_[4]===null?[]:_[4][2],_=_[4]===null?null:_[4][3],m=t.keyPath;var x=t.formatContext,S=t.row,E=t.replay,D=t.blockedBoundary,O=t.hoistableState,k=l.children;l=l.fallback;var A=new Set,j=ca(e,t.row,A,2>t.formatContext.insertionMode?{content:Pe(),fallback:Pe()}:null,!1);j.parentFlushed=!0,j.rootSegmentID=g,t.blockedBoundary=j,t.hoistableState=j.contentState,t.keyPath=c,t.formatContext=Be(e.resumableState,x),t.row=null,t.replay={nodes:s,slots:d,pendingTasks:1};try{if(Pa(e,t,k,-1),t.replay.pendingTasks===1&&0<t.replay.nodes.length)throw Error(r(488));if(t.replay.pendingTasks--,j.pendingTasks===0&&j.status===0){j.status=1,e.completedBoundaries.push(j);break b}}catch(n){j.status=4,v=e.aborted?e.fatalError:n,y=ma(t.componentStack),b=ha(e,v,y),j.errorDigest=b,t.replay.pendingTasks--,e.clientRenderedBoundaries.push(j)}finally{t.blockedBoundary=D,t.hoistableState=O,t.replay=E,t.keyPath=m,t.formatContext=x,t.row=S}v=ua(e,null,{nodes:p,slots:_,pendingTasks:0},l,-1,D,j.fallbackState,A,[c[0],`Suspense Fallback`,c[2]],ze(e.resumableState,t.formatContext),t.context,t.treeContext,t.row,pa(t.componentStack)),fa(v),e.pingedTasks.push(v)}}o.splice(n,1);break a}}}else wa(e,t,c,s,l,d);return;case a:throw Error(r(257));case h:if(v=n._init,n=v(n._payload),e.aborted)throw null;Ea(e,t,n,o);return}if(T(n)){Oa(e,t,n,o);return}if((v=C(n))&&(v=v.call(n))){if(n=v.next(),!n.done){y=[];do y.push(n.value),n=v.next();while(!n.done);Oa(e,t,y,o)}return}if(typeof n.then==`function`)return t.thenableState=null,Ea(e,t,Vi(n),o);if(n.$$typeof===u)return Ea(e,t,n._currentValue,o);throw o=Object.prototype.toString.call(n),Error(r(31,o===`[object Object]`?`object with keys {`+Object.keys(n).join(`, `)+`}`:o))}typeof n==`string`?(o=t.blockedSegment,o!==null&&(o.lastPushedText=G(o.chunks,n,e.renderState,o.lastPushedText))):(typeof n==`number`||typeof n==`bigint`)&&(o=t.blockedSegment,o!==null&&(o.lastPushedText=G(o.chunks,``+n,e.renderState,o.lastPushedText)))}}function Oa(e,t,n,i){var a=t.keyPath;if(i!==-1&&(t.keyPath=[t.keyPath,`Fragment`,i],t.replay!==null)){for(var o=t.replay,s=o.nodes,c=0;c<s.length;c++){var l=s[c];if(l[1]===i){i=l[2],l=l[3],t.replay={nodes:i,slots:l,pendingTasks:1};try{if(Oa(e,t,n,-1),t.replay.pendingTasks===1&&0<t.replay.nodes.length)throw Error(r(488));t.replay.pendingTasks--}catch(r){if(typeof r==`object`&&r&&(r===ii||typeof r.then==`function`))throw r;t.replay.pendingTasks--;var u=ma(t.componentStack);n=e;var d=t.blockedBoundary;e=e.aborted?e.fatalError:r,u=ha(n,e,u),Ia(n,d,i,l,e,u)}t.replay=o,s.splice(c,1);break}}t.keyPath=a}else if(o=t.treeContext,s=n.length,t.replay!==null&&(c=t.replay.slots,typeof c==`object`&&c)){for(i=0;i<s;i++)l=n[i],t.treeContext=Qr(o,s,i),d=c[i],typeof d==`number`?(Ta(e,t,d,l,i),delete c[i]):Pa(e,t,l,i);t.treeContext=o,t.keyPath=a}else{for(c=0;c<s;c++)i=n[c],t.treeContext=Qr(o,s,c),Pa(e,t,i,c);t.treeContext=o,t.keyPath=a}}function ka(e,t,n){n.status=5,n.rootSegmentID=e.nextSegmentId++;var i=n.tracked;if(i===null||(e=i.contentKeyPath,e===null))throw Error(r(486));i=i.fallbackNode;var a=[],o=t.workingMap.get(e);return o===void 0?(n=[e[1],e[2],a,null,i,n.rootSegmentID],t.workingMap.set(e,n),fo(n,e[0],t),n):(o[4]=i,o[5]=n.rootSegmentID,o)}function Aa(e,t,n,i){i.status=5;var a=n.keyPath,o=n.blockedBoundary;if(o===null)i.id=e.nextSegmentId++,t.rootSlots=i.id,e.completedRootSegment!==null&&(e.completedRootSegment.status=5);else{if(o!==null&&o.status===0){var s=ka(e,t,o);if(o.tracked!==null&&o.tracked.contentKeyPath===a&&n.childIndex===-1){i.id===-1&&(i.id=i.parentFlushed?o.rootSegmentID:e.nextSegmentId++),s[3]=i.id;return}}if(i.id===-1&&(i.id=i.parentFlushed&&o!==null?o.rootSegmentID:e.nextSegmentId++),n.childIndex===-1)a===null?t.rootSlots=i.id:(n=t.workingMap.get(a),n===void 0?(n=[a[1],a[2],[],i.id],fo(n,a[0],t)):n[3]=i.id);else{if(a===null){if(e=t.rootSlots,e===null)e=t.rootSlots={};else if(typeof e==`number`)throw Error(r(491))}else if(o=t.workingMap,s=o.get(a),s===void 0)e={},s=[a[1],a[2],[],e],o.set(a,s),fo(s,a[0],t);else if(e=s[3],e===null)e=s[3]={};else if(typeof e==`number`)throw Error(r(491));e[n.childIndex]=i.id}}}function ja(e,t){e=e.trackedPostpones,e!==null&&(t=t.tracked,t!==null&&(t=t.contentKeyPath,t!==null&&(e=e.workingMap.get(t),e!==void 0&&(e.length=4,e[2]=[],e[3]=null))))}function Ma(e,t,n){return ua(e,n,t.replay,t.node,t.childIndex,t.blockedBoundary,t.hoistableState,t.abortSet,t.keyPath,t.formatContext,t.context,t.treeContext,t.row,t.componentStack)}function Na(e,t,n){var r=t.blockedSegment,i=da(e,r.chunks.length,null,t.formatContext,r.lastPushedText,!0);return r.children.push(i),r.lastPushedText=!1,la(e,n,t.node,t.childIndex,t.blockedBoundary,i,t.blockedPreamble,t.hoistableState,t.abortSet,t.keyPath,t.formatContext,t.context,t.treeContext,t.row,t.componentStack)}function Pa(e,t,n,r){var i=t.formatContext,a=t.context,o=t.keyPath,s=t.treeContext,c=t.componentStack,l=t.blockedSegment;if(l===null){l=t.replay;try{return Ea(e,t,n,r)}catch(u){if(Mi(),n=u===ii?si():u,!e.aborted&&typeof n==`object`&&n){if(typeof n.then==`function`){r=u===ii?ji():null,e=Ma(e,t,r).ping,n.then(e.resolve,e.reject),t.formatContext=i,t.context=a,t.keyPath=o,t.treeContext=s,t.componentStack=c,t.replay=l,Jr(a);return}if(n.message===`Maximum call stack size exceeded`){n=u===ii?ji():null,n=Ma(e,t,n),e.pingedTasks.push(n),t.formatContext=i,t.context=a,t.keyPath=o,t.treeContext=s,t.componentStack=c,t.replay=l,Jr(a);return}}}}else{var u=l.children.length,d=l.chunks.length;try{return Ea(e,t,n,r)}catch(r){if(Mi(),l.children.length=u,l.chunks.length=d,n=r===ii?si():r,!e.aborted&&typeof n==`object`&&n){if(typeof n.then==`function`){l=n,n=r===ii?ji():null,e=Na(e,t,n).ping,l.then(e.resolve,e.reject),t.formatContext=i,t.context=a,t.keyPath=o,t.treeContext=s,t.componentStack=c,Jr(a);return}if(n.message===`Maximum call stack size exceeded`){l=r===ii?ji():null,l=Na(e,t,l),e.pingedTasks.push(l),t.formatContext=i,t.context=a,t.keyPath=o,t.treeContext=s,t.componentStack=c,Jr(a);return}}}}throw t.formatContext=i,t.context=a,t.keyPath=o,t.treeContext=s,Jr(a),n}function Fa(e){var t=e.blockedBoundary,n=e.blockedSegment;n!==null&&(n.status=3,Wa(this,t,e.row,n))}function Ia(e,t,n,i,a,o){for(var s=0;s<n.length;s++){var c=n[s];if(c.length===4)Ia(e,t,c[2],c[3],a,o);else{c=c[5];var l=e,u=o,d=ca(l,null,new Set,null,!1);d.parentFlushed=!0,d.rootSegmentID=c,d.status=4,d.errorDigest=u,d.parentFlushed&&l.clientRenderedBoundaries.push(d)}}if(n.length=0,i!==null){if(t===null)throw Error(r(487));if(t.status!==4&&(t.status=4,t.errorDigest=o,t.parentFlushed&&e.clientRenderedBoundaries.push(t)),typeof i==`object`)for(var f in i)delete i[f]}}function La(e,t){if(e!==t.currentTask){var n=e.blockedBoundary;e=e.blockedSegment,e!==null&&(e.status=3),n!==null&&n.fallbackAbortableTasks.forEach(function(e){return La(e,t)})}}function Ra(e,t,n){if(e!==t.currentTask){var r=e.blockedBoundary,i=e.blockedSegment;if(i===null||i.status===3){var a=ma(e.componentStack),o=wi(n);if(r===null){if(r=e.replay,r===null){o||t.trackedPostpones===null||i===null?o?(e=Ti(n),ha(t,e,a),t.status!==12&&t.status!==13&&ga(t,e)):(ha(t,n,a),t.status!==12&&t.status!==13&&ga(t,n)):(r=t.trackedPostpones,ha(t,n,a),Aa(t,r,e,i),Wa(t,null,e.row,i));return}t.status!==12&&t.status!==13&&(r.pendingTasks--,r.pendingTasks===0&&0<r.nodes.length&&(a=ha(t,n,a),Ia(t,null,r.nodes,r.slots,n,a)),t.pendingRootTasks--,t.pendingRootTasks===0&&Ba(t))}else{var s=t.trackedPostpones;if(r.status!==4){if(!o&&s!==null&&i!==null)return ha(t,n,a),Aa(t,s,e,i),r.fallbackAbortableTasks.forEach(function(e){return Ra(e,t,n)}),r.fallbackAbortableTasks.clear(),Wa(t,r,e.row,i);r.status=4,a=ha(t,n,a),r.errorDigest=a,ja(t,r),r.parentFlushed&&t.clientRenderedBoundaries.push(r)}r.pendingTasks--,a=r.row,a!==null&&--a.pendingTasks===0&&_a(t,a),r.fallbackAbortableTasks.forEach(function(e){return Ra(e,t,n)}),r.fallbackAbortableTasks.clear()}e=e.row,e!==null&&--e.pendingTasks===0&&_a(t,e),t.allPendingTasks--,t.allPendingTasks===0&&Va(t)}}}function za(e,t){try{var n=e.renderState,r=n.onHeaders;if(r){var i=n.headers;if(i){n.headers=null;var a=i.preconnects;if(i.fontPreloads&&(a&&(a+=`, `),a+=i.fontPreloads),i.highImagePreloads&&(a&&(a+=`, `),a+=i.highImagePreloads),!t){var o=n.styles.values(),s=o.next();b:for(;0<i.remainingCapacity&&!s.done;s=o.next())for(var c=s.value.sheets.values(),l=c.next();0<i.remainingCapacity&&!l.done;l=c.next()){var u=l.value,d=u.props,f=d.href,p=u.props,m=kr(p.href,`style`,{crossOrigin:p.crossOrigin,integrity:p.integrity,nonce:p.nonce,type:p.type,fetchPriority:p.fetchPriority,referrerPolicy:p.referrerPolicy,media:p.media});if(0<=(i.remainingCapacity-=m.length+2))n.resets.style[f]=ve,a&&(a+=`, `),a+=m,n.resets.style[f]=typeof d.crossOrigin==`string`||typeof d.integrity==`string`?[d.crossOrigin,d.integrity]:ve;else break b}}r(a?{Link:a}:{})}}}catch(t){ha(e,t,{})}}function Ba(e){e.trackedPostpones===null&&za(e,!0),e.trackedPostpones===null&&Ja(e),e=e.onShellReady,e()}function Va(e){za(e,e.trackedPostpones===null||e.completedRootSegment===null||e.completedRootSegment.status!==5),Ja(e),e=e.onAllReady,e()}function Ha(e,t){if(t.chunks.length===0&&t.children.length===1&&t.children[0].boundary===null&&t.children[0].id===-1){var n=t.children[0];n.id=t.id,n.parentFlushed=!0,n.status!==1&&n.status!==3&&n.status!==4||Ha(e,n)}else e.completedSegments.push(t)}function Ua(e,t,n){if(ne!==null){n=n.chunks;for(var r=0,i=0;i<n.length;i++)r+=n[i].byteLength;t===null?e.byteSize+=r:t.byteSize+=r}}function Wa(e,t,n,i){if(n!==null&&(--n.pendingTasks===0?_a(e,n):n.together&&ya(e,n)),e.allPendingTasks--,t===null){if(i!==null&&i.parentFlushed){if(e.completedRootSegment!==null)throw Error(r(389));e.completedRootSegment=i}e.pendingRootTasks--,e.pendingRootTasks===0&&Ba(e)}else if(t.pendingTasks--,t.status!==4){if(t.pendingTasks===0){if(t.status===0&&(t.status=1),i!==null&&i.parentFlushed&&(i.status===1||i.status===3)&&Ha(t,i),t.parentFlushed&&e.completedBoundaries.push(t),t.status===1)n=t.row,n!==null&&Ir(n.hoistables,t.contentState),$i(e,t)||(e.allPendingTasks++,t.fallbackAbortableTasks.forEach(Fa,e),t.fallbackAbortableTasks.clear(),n!==null&&--n.pendingTasks===0&&_a(e,n),e.allPendingTasks--),e.pendingRootTasks===0&&e.trackedPostpones===null&&t.preamble!==null&&Ja(e);else if(t.status===5&&(t=t.row,t!==null)){if(e.trackedPostpones!==null){n=e.trackedPostpones;var a=t.next;if(a!==null&&(i=a.boundaries,i!==null))for(a.boundaries=null,a=0;a<i.length;a++){var o=i[a];ka(e,n,o),Wa(e,o,null,null)}}e.allPendingTasks++,--t.pendingTasks===0&&_a(e,t),e.allPendingTasks--}}else i===null||!i.parentFlushed||i.status!==1&&i.status!==3||(Ha(t,i),t.completedSegments.length===1&&t.parentFlushed&&e.partialBoundaries.push(t)),t=t.row,t!==null&&t.together&&ya(e,t)}e.allPendingTasks===0&&Va(e)}function Ga(e){if(!(e.aborted||11<e.status)){var t=Hr,n=me.H;me.H=Ui;var i=me.A;me.A=Gi;var a=oa;oa=e;var o=Wi;Wi=e.resumableState;try{for(var s=e.pingedTasks,c=0;c<s.length;c++){var l=s[c],u=e,d=l.blockedSegment;if(d===null){a:if(l.replay.pendingTasks!==0){var f=u.currentTask;u.currentTask=l,Jr(l.context);var p=l.node;try{if(typeof l.replay.slots==`number`?Ta(u,l,l.replay.slots,l.node,l.childIndex):Da(u,l),l.replay.pendingTasks===1&&0<l.replay.nodes.length)throw Error(r(488));l.replay.pendingTasks--,l.abortSet.delete(l),Wa(u,l.blockedBoundary,l.row,null)}catch(e){Mi();var m=e===ii?si():e;if(u.aborted){e===ii&&(l.thenableState=ji()),u.currentTask=f;var h=u;La(l,h),l.abortSet.delete(l),Ra(l,h,h.fatalError)}else{if(typeof m==`object`&&m){if(typeof m.then==`function`){var g=l.ping;m.then(g.resolve,g.reject),l.thenableState=e===ii?ji():null;break a}if(m.message===`Maximum call stack size exceeded`&&l.node!==p){l.thenableState=null,u.pingedTasks.push(l);break a}}l.replay.pendingTasks--,l.abortSet.delete(l);var _=ma(l.componentStack);h=u;var v=l.blockedBoundary,y=u.aborted?u.fatalError:m,b=l.replay.nodes,x=l.replay.slots,S=ha(h,y,_);Ia(h,v,b,x,y,S),u.pendingRootTasks--,u.pendingRootTasks===0&&Ba(u),u.allPendingTasks--,u.allPendingTasks===0&&Va(u)}}finally{u.currentTask=f}}}else a:if(h=d,h.status===0){var C=u.currentTask;u.currentTask=l,Jr(l.context);var w=h.children.length,T=h.chunks.length,E=l.node;try{Da(u,l),h.lastPushedText&&h.textEmbedded&&h.chunks.push(He),l.abortSet.delete(l),h.status=1,Ua(u,l.blockedBoundary,h),Wa(u,l.blockedBoundary,l.row,h)}catch(e){Mi(),h.children.length=w,h.chunks.length=T;var D=e===ii?si():e;if(u.aborted)e===ii&&(l.thenableState=ji()),u.currentTask=C,h=u,La(l,h),l.abortSet.delete(l),Ra(l,h,h.fatalError);else{if(typeof D==`object`&&D){if(typeof D.then==`function`){h.status=0,l.thenableState=e===ii?ji():null;var O=l.ping;D.then(O.resolve,O.reject);break a}if(D.message===`Maximum call stack size exceeded`&&l.node!==E){h.status=0,l.thenableState=null,u.pingedTasks.push(l);break a}}var k=ma(l.componentStack);l.abortSet.delete(l),h.status=4;var A=l.blockedBoundary,j=l.row;if(j!==null&&--j.pendingTasks===0&&_a(u,j),u.allPendingTasks--,A===null){if(wi(D)){var M=Ti(D);ha(u,M,k),ga(u,M)}else ha(u,D,k),ga(u,D)}else{var N=ha(u,D,k);if(A.pendingTasks--,A.status!==4){A.status=4,A.errorDigest=N,ja(u,A);var P=A.row;P!==null&&(u.allPendingTasks++,--P.pendingTasks===0&&_a(u,P),u.allPendingTasks--),A.parentFlushed&&u.clientRenderedBoundaries.push(A),u.pendingRootTasks===0&&u.trackedPostpones===null&&A.preamble!==null&&Ja(u)}u.allPendingTasks===0&&Va(u)}}}finally{u.currentTask=C}}}s.splice(0,c),e.destination!==null&&ro(e,e.destination)}catch(t){ha(e,t,{}),ga(e,t)}finally{Wi=o,me.H=n,me.A=i,n===Ui&&Jr(t),oa=a}}}function Ka(e,t,n){t.preambleChildren.length&&n.push(t.preambleChildren);for(var r=!1,i=0;i<t.children.length;i++)r=qa(e,t.children[i],n)||r;return r}function qa(e,t,n){var i=t.boundary;if(i===null)return Ka(e,t,n);var a=i.preamble;if(a===null)return!1;switch(i.status){case 1:if(Ft(e.renderState,a.content),e.byteSize+=i.byteSize,t=i.completedSegments[0],!t)throw Error(r(391));return Ka(e,t,n);case 5:if(e.trackedPostpones!==null)return!0;case 4:if(t.status===1)return Ft(e.renderState,a.fallback),Ka(e,t,n);default:return!0}}function Ja(e){if(e.completedRootSegment&&e.completedPreambleSegments===null){var t=[],n=e.byteSize,r=qa(e,e.completedRootSegment,t),i=e.renderState.preamble;!1===r||i.headChunks&&i.bodyChunks?e.completedPreambleSegments=t:e.byteSize=n}}function Ya(e,t,n,i){switch(n.parentFlushed=!0,n.status){case 0:n.id=e.nextSegmentId++;case 5:return i=n.id,n.lastPushedText=!1,n.textEmbedded=!1,e=e.renderState,I(t,Rt),I(t,e.placeholderPrefix),e=z(i.toString(16)),I(t,e),L(t,zt);case 1:n.status=2;var a=!0,o=n.chunks,s=0;n=n.children;for(var c=0;c<n.length;c++){for(a=n[c];s<a.index;s++)I(t,o[s]);a=Za(e,t,a,i)}for(;s<o.length-1;s++)I(t,o[s]);return s<o.length&&(a=L(t,o[s])),a;case 3:return!0;default:throw Error(r(390))}}var Xa=0;function Za(e,t,n,i){var a=n.boundary;if(a===null)return Ya(e,t,n,i);if(n.boundary=null,a.parentFlushed=!0,a.status===4){var o=a.row;o!==null&&--o.pendingTasks===0&&_a(e,o),a=a.errorDigest,L(t,Gt),I(t,qt),a!=null&&(I(t,Yt),I(t,z(U(a))),I(t,Jt)),L(t,Xt),Ya(e,t,n,i)}else if(a.status!==1)a.status===0&&(a.rootSegmentID=e.nextSegmentId++),0<a.completedSegments.length&&e.partialBoundaries.push(a),Zt(t,e.renderState,a.rootSegmentID),i&&Ir(i,a.fallbackState),Ya(e,t,n,i);else if(!to&&$i(e,a)&&(Xa+a.byteSize>e.progressiveChunkSize||Lr(a.contentState,no)||a.defer))a.rootSegmentID=e.nextSegmentId++,e.completedBoundaries.push(a),Zt(t,e.renderState,a.rootSegmentID),Ya(e,t,n,i);else{if(Xa+=a.byteSize,i&&Ir(i,a.contentState),n=a.row,n!==null&&$i(e,a)&&--n.pendingTasks===0&&_a(e,n),L(t,Ht),n=a.completedSegments,n.length!==1)throw Error(r(391));Za(e,t,n[0],i)}return L(t,Kt)}function Qa(e,t,n,r){return bn(t,e.renderState,n.parentFormatContext,n.id),Za(e,t,n,r),xn(t,n.parentFormatContext)}function $a(e,t,n){Xa=n.byteSize;for(var r=n.completedSegments,i=0;i<r.length;i++)eo(e,t,n,r[i]);r.length=0,r=n.row,r!==null&&$i(e,n)&&--r.pendingTasks===0&&_a(e,r),er(t,n.contentState,e.renderState),r=e.resumableState,e=e.renderState,i=n.rootSegmentID,n=n.contentState;var a=e.stylesToHoist,o=!!(r.instructions&128);return e.stylesToHoist=!1,I(t,e.startInlineScript),I(t,ct),a?(!(r.instructions&4)&&(r.instructions|=4,I(t,Fn)),!(r.instructions&2)&&(r.instructions|=2,I(t,En)),o&&!(r.instructions&256)&&(r.instructions|=256,I(t,Dn)),r.instructions&8?I(t,An):(r.instructions|=8,I(t,kn))):(!(r.instructions&2)&&(r.instructions|=2,I(t,En)),o&&!(r.instructions&256)&&(r.instructions|=256,I(t,Dn)),I(t,On)),r=z(i.toString(16)),I(t,e.boundaryPrefix),I(t,r),I(t,jn),I(t,e.segmentPrefix),I(t,r),a?(I(t,Mn),vr(t,n)):I(t,Nn),n=L(t,Pn),It(t,e)&&n}function eo(e,t,n,i){if(i.status===2)return!0;var a=n.contentState,o=i.id;if(o===-1){if((i.id=n.rootSegmentID)===-1)throw Error(r(392));return Qa(e,t,i,a)}return o===n.rootSegmentID?Qa(e,t,i,a):(Qa(e,t,i,a),n=e.resumableState,e=e.renderState,I(t,e.startInlineScript),I(t,ct),n.instructions&1?I(t,Cn):(n.instructions|=1,I(t,Sn)),I(t,e.segmentPrefix),o=z(o.toString(16)),I(t,o),I(t,wn),I(t,e.placeholderPrefix),I(t,o),t=L(t,Tn),t)}var to=!1,no=!1;function ro(e,t){ee=new Uint8Array(2048),F=0;try{if(!(0<e.pendingRootTasks)){var n,r=e.completedRootSegment;if(r!==null){if(r.status===5)return;var i=e.completedPreambleSegments;if(i===null)return;Xa=e.byteSize;var a=e.resumableState,o=e.renderState,s=o.preamble,c=s.htmlChunks,l=s.headChunks,u;if(c){for(u=0;u<c.length;u++)I(t,c[u]);if(l)for(u=0;u<l.length;u++)I(t,l[u]);else I(t,At(`head`)),I(t,ct)}else if(l)for(u=0;u<l.length;u++)I(t,l[u]);var d=o.charsetChunks;for(u=0;u<d.length;u++)I(t,d[u]);d.length=0,o.preconnects.forEach(tr,t),o.preconnects.clear();var f=o.viewportChunks;for(u=0;u<f.length;u++)I(t,f[u]);f.length=0,o.fontPreloads.forEach(tr,t),o.fontPreloads.clear(),o.highImagePreloads.forEach(tr,t),o.highImagePreloads.clear(),ye=o,o.styles.forEach(lr,t),ye=null;var p=o.importMapChunks;for(u=0;u<p.length;u++)I(t,p[u]);p.length=0,o.bootstrapScripts.forEach(tr,t),o.scripts.forEach(tr,t),o.scripts.clear(),o.bulkPreloads.forEach(tr,t),o.bulkPreloads.clear(),c||l||(a.instructions|=32);var m=o.hoistableChunks;for(u=0;u<m.length;u++)I(t,m[u]);for(a=m.length=0;a<i.length;a++){var h=i[a];for(o=0;o<h.length;o++)Za(e,t,h[o],null)}var g=e.renderState.preamble,_=g.headChunks;(g.htmlChunks||_)&&I(t,Pt(`head`));var v=g.bodyChunks;if(v)for(i=0;i<v.length;i++)I(t,v[i]);no=!0,Za(e,t,r,null),no=!1,e.completedRootSegment=null;var y=e.renderState;if(e.allPendingTasks!==0||e.clientRenderedBoundaries.length!==0||e.completedBoundaries.length!==0||e.trackedPostpones!==null&&(e.trackedPostpones.rootNodes.length!==0||e.trackedPostpones.rootSlots!==null)){var b=e.resumableState;if(!(b.instructions&64)){if(b.instructions|=64,I(t,y.startInlineScript),!(b.instructions&32)){b.instructions|=32;var x=`_`+b.idPrefix+`R_`;I(t,fr),I(t,z(U(x))),I(t,Xe)}I(t,ct),I(t,Lt),L(t,xe)}}It(t,y)}var S=e.renderState;r=0;var C=S.viewportChunks;for(r=0;r<C.length;r++)I(t,C[r]);C.length=0,S.preconnects.forEach(tr,t),S.preconnects.clear(),S.fontPreloads.forEach(tr,t),S.fontPreloads.clear(),S.highImagePreloads.forEach(tr,t),S.highImagePreloads.clear(),S.styles.forEach(dr,t),S.scripts.forEach(tr,t),S.scripts.clear(),S.bulkPreloads.forEach(tr,t),S.bulkPreloads.clear();var w=S.hoistableChunks;for(r=0;r<w.length;r++)I(t,w[r]);w.length=0;var T=e.clientRenderedBoundaries;for(n=0;n<T.length;n++){var E=T[n];S=t;var D=e.resumableState,O=e.renderState,k=E.rootSegmentID,A=E.errorDigest;I(S,O.startInlineScript),I(S,ct),D.instructions&4?I(S,Ln):(D.instructions|=4,I(S,In)),I(S,O.boundaryPrefix),I(S,z(k.toString(16))),I(S,Rn),A!=null&&(I(S,zn),A==null?I(S,Bn):I(S,z(Un(A))));var j=L(S,Vn);if(!j){e.destination=null,n++,T.splice(0,n);return}}T.splice(0,n);var M=e.completedBoundaries;for(n=0;n<M.length;n++)if(!$a(e,t,M[n])){e.destination=null,n++,M.splice(0,n);return}M.splice(0,n),te(t),ee=new Uint8Array(2048),F=0,to=!0;var N=e.partialBoundaries;for(n=0;n<N.length;n++){var P=N[n];a:{T=e,E=t,Xa=P.byteSize;var R=P.completedSegments;for(j=0;j<R.length;j++)if(!eo(T,E,P,R[j])){j++,R.splice(0,j);var B=!1;break a}R.splice(0,j);var ne=P.row;ne!==null&&ne.together&&P.pendingTasks===1&&(ne.pendingTasks===1?va(T,ne,ne.hoistables):ne.pendingTasks--),B=er(E,P.contentState,T.renderState)}if(!B){e.destination=null,n++,N.splice(0,n);return}}N.splice(0,n),to=!1;var re=e.completedBoundaries;for(n=0;n<re.length;n++)if(!$a(e,t,re[n])){e.destination=null,n++,re.splice(0,n);return}re.splice(0,n)}}finally{to=!1,n=e.postponedState,n!==null&&(n.nextSegmentId=e.nextSegmentId),e.allPendingTasks===0&&e.clientRenderedBoundaries.length===0&&e.completedBoundaries.length===0?(e.flushScheduled=!1,n=e.resumableState,n.hasBody&&I(t,Pt(`body`)),n.hasHtml&&I(t,Pt(`html`)),te(t),co(e),e.status=13,t.close(),e.destination=null):te(t)}}function io(e){e.flushScheduled=e.destination!==null,P(function(){return Ga(e)}),j(function(){e.status===10&&(e.status=11),e.trackedPostpones===null&&za(e,e.pendingRootTasks===0)})}function ao(e){!1===e.flushScheduled&&e.pingedTasks.length===0&&e.destination!==null&&(e.flushScheduled=!0,j(function(){var t=e.destination;t?ro(e,t):e.flushScheduled=!1}))}function oo(e,t){if(e.status===12)e.status=13,e=e.fatalError,wi(e)&&(e=Ti(e)),re(t,e);else if(e.status!==13&&e.destination===null){e.destination=t;try{ro(e,t)}catch(t){ha(e,t,{}),ga(e,t)}}}function so(e,t){try{if(0<t.size){var n=e.fatalError;t.forEach(function(t){return Ra(t,e,n)}),t.clear()}e.destination!==null&&ro(e,e.destination)}catch(t){ha(e,t,{}),ga(e,t)}}function co(e){e=e.renderLifetimeController,e!==null&&e.abort(`The render ended.`)}function lo(e,t){if(t.aborted)uo(e,t.reason);else{var n=new AbortController;e.renderLifetimeController=n,t.addEventListener(`abort`,function(){uo(e,t.reason)},{signal:n.signal})}}function uo(e,t){if(!(e.aborted||e.status!==11&&e.status!==10)){co(e);var n=typeof t==`object`&&!!t&&t.$$typeof===x;e.aborted=!0,t=n?Ci(t):t===void 0?Error(r(432)):typeof t==`object`&&t&&typeof t.then==`function`?Error(r(530)):t,e.fatalError=t;var i=e.abortableTasks;i.forEach(function(t){return La(t,e)}),j(function(){return so(e,i)})}}function fo(e,t,n){if(t===null)n.rootNodes.push(e);else{var r=n.workingMap,i=r.get(t);i===void 0&&(i=[t[1],t[2],[],null],r.set(t,i),fo(i,t[0],n)),i[2].push(e)}}function po(e){var t=e.trackedPostpones;if(t===null||t.rootNodes.length===0&&t.rootSlots===null)return e.trackedPostpones=null;var n=e.completedRootSegment===null||e.completedRootSegment.status!==5&&e.completedPreambleSegments!==null;if(n){var r=e.nextSegmentId,i=t.rootSlots,a=e.resumableState;a.bootstrapScriptContent=void 0,a.bootstrapScripts=void 0,a.bootstrapModules=void 0}else{r=0,i=-1,a=e.resumableState;var o=e.renderState;a.nextFormID=0,a.hasBody=!1,a.hasHtml=!1,a.unknownResources={font:o.resets.font},a.dnsResources=o.resets.dns,a.connectResources=o.resets.connect,a.imageResources=o.resets.image,a.styleResources=o.resets.style,a.scriptResources={},a.moduleUnknownResources={},a.moduleScriptResources={},a.instructions=0}return t={nextSegmentId:r,rootFormatContext:e.rootFormatContext,progressiveChunkSize:e.progressiveChunkSize,resumableState:e.resumableState,replayNodes:t.rootNodes,replaySlots:i},n&&(e.postponedState=t),t}function mo(){var e=t.version;if(e!==`19.3.1`)throw Error(r(527,e,`19.3.1`))}mo(),mo(),e.prerender=function(e,t){return new Promise(function(n,r){var i=t?t.onHeaders:void 0,a;i&&(a=function(e){i(new Headers(e))});var o=Ne(t?t.identifierPrefix:void 0,t?t.unstable_externalRuntimeSrc:void 0,t?t.bootstrapScriptContent:void 0,t?t.bootstrapScripts:void 0,t?t.bootstrapModules:void 0),s=ra(e,o,Me(o,void 0,t?t.unstable_externalRuntimeSrc:void 0,t?t.importMap:void 0,a,t?t.maxHeadersLength:void 0),Ie(t?t.namespaceURI:void 0),t?t.progressiveChunkSize:void 0,t?t.onError:void 0,t?t.onBrowserBailout:void 0,function(){var e=new ReadableStream({type:`bytes`,pull:function(e){oo(s,e)},cancel:function(e){s.destination=null,uo(s,e)}},{highWaterMark:0});e={postponed:po(s),prelude:e},n(e)},void 0,void 0,r);t&&t.signal&&lo(s,t.signal),io(s)})},e.renderToReadableStream=function(e,t){return new Promise(function(n,r){var i,a,o=new Promise(function(e,t){a=e,i=t}),s=t?t.onHeaders:void 0,c;s&&(c=function(e){s(new Headers(e))});var l=Ne(t?t.identifierPrefix:void 0,t?t.unstable_externalRuntimeSrc:void 0,t?t.bootstrapScriptContent:void 0,t?t.bootstrapScripts:void 0,t?t.bootstrapModules:void 0),u=na(e,l,Me(l,t?t.nonce:void 0,t?t.unstable_externalRuntimeSrc:void 0,t?t.importMap:void 0,c,t?t.maxHeadersLength:void 0),Ie(t?t.namespaceURI:void 0),t?t.progressiveChunkSize:void 0,t?t.onError:void 0,t?t.onBrowserBailout:void 0,a,function(){var e=new ReadableStream({type:`bytes`,pull:function(e){oo(u,e)},cancel:function(e){u.destination=null,uo(u,e)}},{highWaterMark:0});e.allReady=o,n(e)},function(e){o.catch(function(){}),r(e)},i,t?t.formState:void 0);t&&t.signal&&lo(u,t.signal),io(u)})},e.resume=function(e,t,n){return new Promise(function(r,i){var a,o,s=new Promise(function(e,t){o=e,a=t}),c=ia(e,t,Me(t.resumableState,n?n.nonce:void 0,void 0,void 0,void 0,void 0),n?n.onError:void 0,n?n.onBrowserBailout:void 0,o,function(){var e=new ReadableStream({type:`bytes`,pull:function(e){oo(c,e)},cancel:function(e){c.destination=null,uo(c,e)}},{highWaterMark:0});e.allReady=s,r(e)},function(e){s.catch(function(){}),i(e)},a);n&&n.signal&&lo(c,n.signal),io(c)})},e.resumeAndPrerender=function(e,t,n){return new Promise(function(r,i){var a=aa(e,t,Me(t.resumableState,void 0,void 0,void 0,void 0,void 0),n?n.onError:void 0,n?n.onBrowserBailout:void 0,function(){var e=new ReadableStream({type:`bytes`,pull:function(e){oo(a,e)},cancel:function(e){a.destination=null,uo(a,e)}},{highWaterMark:0});e={postponed:po(a),prelude:e},r(e)},void 0,void 0,i);n&&n.signal&&lo(a,n.signal),io(a)})},e.version=`19.3.1`})),t$=(0,et((e=>{var t=$Q(),n=e$();e.version=t.version,e.renderToString=t.renderToString,e.renderToStaticMarkup=t.renderToStaticMarkup,e.renderToReadableStream=n.renderToReadableStream,e.resume=n.resume}))().renderToStaticMarkup)((0,J.jsx)(Gp,{size:14,"aria-hidden":`true`})),n$=()=>(0,J.jsx)(Gp,{size:14,"aria-hidden":`true`}),r$={"todo-blocking":`kw kw-todo-blocking`,todo:`kw kw-todo`,confirm:`kw kw-confirm`,unseen:`kw kw-confirm`,answer:`kw kw-answer`},i$={"todo-blocking":{title:`Blocking question`,lead:`No check is generated for this until you decide.`,steps:[`Keep what the case says above: click the X button to delete this whole TODO block.`,`Decide yourself: type your answer after "Answer:".`],titleClass:`text-seal-glow`},todo:{title:`Open question`,lead:`What the case says above is used as it is.`,steps:[`Keep what the case says above: click the X button to delete this whole TODO block.`,`Disagree: type your answer after "Answer:".`],titleClass:`text-gold-glow`},confirm:{title:`Needs a person to settle`,lead:`Seen on a page by the AI; nobody has settled it yet.`,steps:[`Right: click the X to remove the marker.`,`Wrong: fix the sentence, then remove the marker.`,`Only the rows that change an assertion need you; the panel says which, and why.`],titleClass:`text-qing-glow`},unseen:{title:`Not checked on the page`,lead:`The AI could not verify this.`,steps:[`Check it on the page yourself.`,`Then click the X button to remove this marker, or fix the sentence first.`],titleClass:`text-qing-glow`},answer:{title:`Your answer`,lead:`Empty means no answer: the question stays open.`,steps:[`Type your answer here: it replaces the case text where they differ.`,`Click the X button to clear what you typed.`,`To keep what the case says instead: clear this and delete the TODO block.`],titleClass:`text-jade-glow`}},a$=e=>({class:r$[e],"data-kw":e}),o$=e=>String.raw`(?:\u{${e}}\uFE0F?[ \t]*)?`,s$=[String.raw`(?<blocking>${o$(`1F6AB`)}\bto[-_]?dos?\s*\[blocking\])`,String.raw`(?<todo>${o$(`2753`)}\bto[-_]?dos?\b(?:\s*\[non-blocking\])?)`,String.raw`(?<confirm>${o$(`1F50D`)}(?:\bto be confirmed(?:\s+by\s+QA)?\b|\bTBC\b|\bTBD\b|\bneeds?\s+confirmation\b))`,String.raw`(?<unseen>${o$(`1F441`)}\bnot observed\b)`,String.raw`(?<answer>(?<=^[ \t]*(?:(?:[-*+>]|\d+\.)[ \t]+)*)${o$(`270D`)}\bAnswer:)`].join(`|`),c$=()=>new RegExp(s$,`gimu`);function l$(e){return e?.blocking===void 0?e?.confirm===void 0?e?.unseen===void 0?e?.answer===void 0?`todo`:`answer`:`unseen`:`confirm`:`todo-blocking`}function u$(e){let t=[],n=0;for(let r of e.matchAll(c$()))r[0]!==``&&(r.index>n&&t.push({text:e.slice(n,r.index),kind:null}),t.push({text:r[0],kind:l$(r.groups)}),n=r.index+r[0].length);return n<e.length&&t.push({text:e.slice(n),kind:null}),t}var d$={"todo-blocking":`Keep what the case says above: delete this question block`,todo:`Keep what the case says above: delete this question block`,confirm:`Confirmed: remove this marker`,unseen:`Checked: remove this marker`,answer:`Clear your answer`},f$=/^---\r?\n[\s\S]*?\r?\n---\r?\n?/,p$=/^[ \t]*(?:(?:[-*+>]|\d+\.)[ \t]+)*$/,m$=e=>f$.exec(e)?.[0].length??0,h$=e=>e.length-e.trimStart().length;function g$(e,t){let n=t===0?0:e.lastIndexOf(`
|
|
315
|
+
`+e.stack}return Object.defineProperty(t,"componentStack",{value:i}),i}}),t}function ha(e,t,n){if(wi(t))return e=e.onBrowserBailout,e(t,n),``;if(e=e.onError,t=e(t,n),t==null||typeof t==`string`)return t===``?void 0:t}function ga(e,t){var n=e.onShellError,r=e.onFatalError;e.pendingRootTasks!==0&&n(t),r(t),co(e),e.destination===null?(e.status=12,e.aborted||(e.fatalError=t)):(e.status=13,re(e.destination,t))}function _a(e,t){va(e,t.next,t.hoistables)}function va(e,t,n){for(;t!==null;){n!==null&&(Ir(t.hoistables,n),t.inheritedHoistables=n);var r=t.boundaries;if(r!==null){t.boundaries=null;for(var i=0;i<r.length;i++){var a=r[i];n!==null&&Ir(a.contentState,n),Wa(e,a,null,null)}}if(t.pendingTasks--,0<t.pendingTasks)break;n=t.hoistables,t=t.next}}function ya(e,t){var n=t.boundaries;if(n!==null&&t.pendingTasks===n.length){for(var r=!0,i=0;i<n.length;i++){var a=n[i];if(a.pendingTasks!==1||a.parentFlushed||$i(e,a)){r=!1;break}}r&&va(e,t,t.hoistables)}}function ba(e){var t={pendingTasks:1,boundaries:null,hoistables:br(),inheritedHoistables:null,together:!1,next:null};return e!==null&&0<e.pendingTasks&&(t.pendingTasks++,t.boundaries=[],e.next=t),t}function xa(e,t,n,r,i){var a=t.keyPath,o=t.treeContext,s=t.row;t.keyPath=n,n=r.length;var c=null;if(t.replay!==null){var l=t.replay.slots;if(typeof l==`object`&&l)for(var u=0;u<n;u++){var d=i!==`backwards`&&i!==`unstable_legacy-backwards`?u:n-1-u,f=r[d];t.row=c=ba(c),t.treeContext=Qr(o,n,d);var p=l[d];typeof p==`number`?(Ta(e,t,p,f,d),delete l[d]):Pa(e,t,f,d),--c.pendingTasks===0&&_a(e,c)}else for(l=0;l<n;l++)u=i!==`backwards`&&i!==`unstable_legacy-backwards`?l:n-1-l,d=r[u],t.row=c=ba(c),t.treeContext=Qr(o,n,u),Pa(e,t,d,u),--c.pendingTasks===0&&_a(e,c)}else if(i!==`backwards`&&i!==`unstable_legacy-backwards`)for(i=0;i<n;i++)l=r[i],t.row=c=ba(c),t.treeContext=Qr(o,n,i),Pa(e,t,l,i),--c.pendingTasks===0&&_a(e,c);else{for(l=t.blockedSegment,u=l.children.length,d=l.chunks.length,f=0;f<n;f++){p=i===`unstable_legacy-backwards`?n-1-f:f;var m=r[p];t.row=c=ba(c),t.treeContext=Qr(o,n,p);var h=da(e,d,null,t.formatContext,p!==0||l.lastPushedText,!0);l.children.splice(u,0,h),t.blockedSegment=h;try{Pa(e,t,m,p),h.lastPushedText&&h.textEmbedded&&h.chunks.push(He),h.status=1,Ua(e,t.blockedBoundary,h),--c.pendingTasks===0&&_a(e,c)}catch(t){throw h.status=e.aborted?3:4,t}}t.blockedSegment=l,l.lastPushedText=!1}s!==null&&c!==null&&0<c.pendingTasks&&(s.pendingTasks++,c.next=s),t.treeContext=o,t.row=s,t.keyPath=a}function Sa(e,t,n,r,i,a){var o=t.thenableState;for(t.thenableState=null,ui={},di=t,fi=e,pi=n,yi=vi=0,bi=-1,xi=0,Si=o,e=r(i,a);_i;)_i=!1,yi=vi=0,bi=-1,xi=0,Di+=1,hi=null,e=r(i,a);return Mi(),e}function Ca(e,t,n,r,i,a,o){var s=!1;if(a!==0&&e.formState!==null){var c=t.blockedSegment;if(c!==null){s=!0,c=c.chunks;for(var l=0;l<a;l++)l===o?c.push(mt):c.push(ht)}}a=t.keyPath,t.keyPath=n,i?(n=t.treeContext,t.treeContext=Qr(n,1,0),Pa(e,t,r,-1),t.treeContext=n):s?Pa(e,t,r,-1):Ea(e,t,r,-1),t.keyPath=a}function wa(e,t,n,i,a,y){if(typeof i==`function`){if(i.prototype&&i.prototype.isReactComponent){var x=a;if(`ref`in a)for(var S in x={},a)S!==`ref`&&(x[S]=a[S]);var w=i.defaultProps;if(w)for(var E in x===a&&(x=ie({},x,a)),w)x[E]===void 0&&(x[E]=w[E]);var D=x,O=Vr,k=i.contextType;typeof k==`object`&&k&&(O=k._currentValue);var A=new i(D,O),j=A.state===void 0?null:A.state;A.updater=Yr,A.props=D,A.state=j;var M={queue:[],replace:!1};A._reactInternals=M;var N=i.contextType;A.context=typeof N==`object`&&N?N._currentValue:Vr;var P=i.getDerivedStateFromProps;if(typeof P==`function`){var ee=P(D,j);A.state=ee==null?j:ie({},j,ee)}if(typeof i.getDerivedStateFromProps!=`function`&&typeof A.getSnapshotBeforeUpdate!=`function`&&(typeof A.UNSAFE_componentWillMount==`function`||typeof A.componentWillMount==`function`)){var F=A.state;if(typeof A.componentWillMount==`function`&&A.componentWillMount(),typeof A.UNSAFE_componentWillMount==`function`&&A.UNSAFE_componentWillMount(),F!==A.state&&Yr.enqueueReplaceState(A,A.state,null),M.queue!==null&&0<M.queue.length){var I=M.queue,L=M.replace;if(M.queue=null,M.replace=!1,L&&I.length===1)A.state=I[0];else{for(var te=L?I[0]:A.state,R=!0,z=+!!L;z<I.length;z++){var B=I[z],ne=typeof B==`function`?B.call(A,te,D,void 0):B;ne!=null&&(R?(R=!1,te=ie({},te,ne)):ie(te,ne))}A.state=te}}else M.queue=null}var re=A.render();if(e.aborted)throw null;var ae=t.keyPath;t.keyPath=n,Ea(e,t,re,-1),t.keyPath=ae}else{var oe=Sa(e,t,n,i,a,void 0);if(e.aborted)throw null;Ca(e,t,n,oe,vi!==0,yi,bi)}}else if(typeof i==`string`){var V=t.blockedSegment;if(V===null){var se=a.children,H=t.formatContext,ce=t.keyPath;t.formatContext=Le(H,i,a),t.keyPath=n,Pa(e,t,se,-1),t.formatContext=H,t.keyPath=ce}else{var le=Mt(V.chunks,i,a,e.resumableState,e.renderState,t.blockedPreamble,t.hoistableState,t.formatContext,V.lastPushedText);V.lastPushedText=!1;var U=t.formatContext,ue=t.keyPath;if(t.keyPath=n,(t.formatContext=Le(U,i,a)).insertionMode===3){var de=da(e,0,null,t.formatContext,!1,!1);V.preambleChildren.push(de),t.blockedSegment=de;try{Pa(e,t,le,-1),de.lastPushedText&&de.textEmbedded&&de.chunks.push(He),de.status=1,Ua(e,t.blockedBoundary,de)}finally{t.blockedSegment=V}}else Pa(e,t,le,-1);t.formatContext=U,t.keyPath=ue;a:{var fe=V.chunks,pe=e.resumableState;switch(i){case`title`:case`style`:case`script`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`img`:case`input`:case`keygen`:case`link`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:break a;case`body`:if(1>=U.insertionMode){pe.hasBody=!0;break a}break;case`html`:if(U.insertionMode===0){pe.hasHtml=!0;break a}break;case`head`:if(1>=U.insertionMode)break a}fe.push(Pt(i))}V.lastPushedText=!1}}else{switch(i){case v:case s:case c:case o:var me=t.keyPath;t.keyPath=n,Ea(e,t,a.children,-1),t.keyPath=me;return;case _:var he=t.blockedSegment;if(he===null){if(a.mode!==`hidden`){var ge=t.keyPath;t.keyPath=n,Pa(e,t,a.children,-1),t.keyPath=ge}}else if(a.mode!==`hidden`){he.chunks.push(Bt),he.lastPushedText=!1;var _e=t.keyPath;t.keyPath=n,Pa(e,t,a.children,-1),t.keyPath=_e,he.chunks.push(Vt),he.lastPushedText=!1}return;case p:a:{var ve=a.children,ye=a.revealOrder;if(ye!==`independent`&&ye!==`together`){if(T(ve)){xa(e,t,n,ve,ye);break a}var be=C(ve);if(be){var xe=be.call(ve);if(xe){var W=xe.next();if(!W.done){do W=xe.next();while(!W.done);xa(e,t,n,ve,ye)}break a}}}if(ye===`together`){var Se=t.keyPath,Ce=t.row,we=t.row=ba(null);we.boundaries=[],we.together=!0,t.keyPath=n,Ea(e,t,ve,-1),--we.pendingTasks===0&&_a(e,we),t.keyPath=Se,t.row=Ce,Ce!==null&&0<we.pendingTasks&&(Ce.pendingTasks++,we.next=Ce)}else{var Te=t.keyPath;t.keyPath=n,Ea(e,t,ve,-1),t.keyPath=Te}}return;case b:var Ee=t.formatContext,De=t.keyPath,Oe=e.resumableState;if(a.name!=null&&a.name!==`auto`)var ke=a.name;else ke=Ve(Oe,Zr(t.treeContext),0);var Ae=ke,je=e.resumableState,Me=Qi(a.default,a.update),Ne=Qi(a.default,a.enter),Ie=Qi(a.default,a.exit),Re=Qi(a.default,a.share),G=a.name;if(Me??=`auto`,Ne??=`auto`,Ie??=`auto`,G==null){var Ue=Ee.viewTransition;Ue===null?(G=`auto`,Re=`none`):(G=Ue.name,Re=Ue.share)}else Re??=`auto`,Ee.tagScope&4&&(je.instructions|=128);Ee.tagScope&8?je.instructions|=128:Ie=`none`,Ee.tagScope&16?je.instructions|=128:Ne=`none`;var We={update:Me,enter:Ne,exit:Ie,share:Re,parentEnter:`none`,parentExit:`none`,name:G,autoName:Ae,nameIdx:0},Ge=Ee.tagScope&-25;if(Ge=Me===`none`?Ge&-33:Ge|32,Ne!==`none`&&(Ge|=64),t.formatContext=Fe(Ee.insertionMode,Ee.selectedValue,Ge,We),t.keyPath=n,a.name!=null&&a.name!==`auto`)Ea(e,t,a.children,-1);else{var Ke=t.treeContext;t.treeContext=Qr(Ke,1,0),Pa(e,t,a.children,-1),t.treeContext=Ke}t.formatContext=Ee,t.keyPath=De;return;case g:throw Error(r(343));case f:a:if(t.replay!==null){var K=t.keyPath,qe=t.formatContext,Je=t.row;t.keyPath=n,t.formatContext=Be(e.resumableState,qe),t.row=null;var Ye=a.children;try{Pa(e,t,Ye,-1)}finally{t.keyPath=K,t.formatContext=qe,t.row=Je}}else{var Xe=t.keyPath,Ze=t.formatContext,Qe=t.row,$e=t.blockedBoundary,et=t.blockedPreamble,tt=t.hoistableState,nt=t.blockedSegment,rt=a.fallback,it=a.children,at=new Set,ot=ca(e,t.row,at,2>t.formatContext.insertionMode?{content:Pe(),fallback:Pe()}:null,!1),st=da(e,nt.chunks.length,ot,t.formatContext,!1,!1);nt.children.push(st),nt.lastPushedText=!1;var ct=da(e,0,null,t.formatContext,!1,!1);ct.parentFlushed=!0;var lt=e.trackedPostpones;if(lt!==null){var ut=t.componentStack,dt=[n[0],`Suspense Fallback`,n[2]];if(lt!==null){var ft=[dt[1],dt[2],[],null];lt.workingMap.set(dt,ft),ot.tracked={contentKeyPath:n,fallbackNode:ft}}t.blockedSegment=st,t.blockedPreamble=ot.preamble===null?null:ot.preamble.fallback,t.keyPath=dt,t.formatContext=ze(e.resumableState,Ze),t.componentStack=pa(ut);try{Pa(e,t,rt,-1),st.lastPushedText&&st.textEmbedded&&st.chunks.push(He),st.status=1,Ua(e,$e,st)}catch(t){throw st.status=e.aborted?3:4,t}finally{t.blockedSegment=nt,t.blockedPreamble=et,t.keyPath=Xe,t.formatContext=Ze}var pt=la(e,null,it,-1,ot,ct,ot.preamble===null?null:ot.preamble.content,ot.contentState,t.abortSet,n,Be(e.resumableState,t.formatContext),t.context,t.treeContext,null,ut);fa(pt),e.pingedTasks.push(pt)}else{t.blockedBoundary=ot,t.blockedPreamble=ot.preamble===null?null:ot.preamble.content,t.hoistableState=ot.contentState,t.blockedSegment=ct,t.keyPath=n,t.formatContext=Be(e.resumableState,Ze),t.row=null;try{if(Pa(e,t,it,-1),ct.lastPushedText&&ct.textEmbedded&&ct.chunks.push(He),ct.status=1,Ua(e,ot,ct),Ha(ot,ct),ot.pendingTasks===0&&ot.status===0){if(ot.status=1,!$i(e,ot)){Qe!==null&&--Qe.pendingTasks===0&&_a(e,Qe),e.pendingRootTasks===0&&t.blockedPreamble&&Ja(e);break a}}else Qe!==null&&Qe.together&&ya(e,Qe)}catch(n){if(ot.status=4,e.aborted){ct.status=3;var q=e.fatalError}else ct.status=4,q=n;var J=ma(t.componentStack);ot.errorDigest=ha(e,q,J),ja(e,ot)}finally{t.blockedBoundary=$e,t.blockedPreamble=et,t.hoistableState=tt,t.blockedSegment=nt,t.keyPath=Xe,t.formatContext=Ze,t.row=Qe}var mt=la(e,null,rt,-1,$e,st,ot.preamble===null?null:ot.preamble.fallback,ot.fallbackState,at,[n[0],`Suspense Fallback`,n[2]],ze(e.resumableState,t.formatContext),t.context,t.treeContext,t.row,pa(t.componentStack));fa(mt),e.pingedTasks.push(mt)}}return}if(typeof i==`object`&&i)switch(i.$$typeof){case d:if(`ref`in a){var ht={};for(var gt in a)gt!==`ref`&&(ht[gt]=a[gt])}else ht=a;Ca(e,t,n,Sa(e,t,n,i.render,ht,y),vi!==0,yi,bi);return;case m:wa(e,t,n,i.type,a,y);return;case u:var _t=a.children,vt=t.keyPath,yt=a.value,bt=i._currentValue;i._currentValue=yt;var xt=Hr,St={parent:xt,depth:xt===null?0:xt.depth+1,context:i,parentValue:bt,value:yt};Hr=St,t.context=St,t.keyPath=n,Ea(e,t,_t,-1);var Ct=Hr;if(Ct===null)throw Error(r(403));Ct.context._currentValue=Ct.parentValue,t.context=Hr=Ct.parent,t.keyPath=vt;return;case l:var wt=a.children,Tt=wt(i._context._currentValue),Et=t.keyPath;t.keyPath=n,Ea(e,t,Tt,-1),t.keyPath=Et;return;case h:var Dt=i._init,Ot=Dt(i._payload);if(e.aborted)throw null;wa(e,t,n,Ot,a,y);return}throw Error(r(130,i==null?i:typeof i,``))}}function Ta(e,t,n,r,i){var a=t.replay,o=t.blockedBoundary,s=da(e,0,null,t.formatContext,!1,!1);s.id=n,s.parentFlushed=!0;try{t.replay=null,t.blockedSegment=s,Pa(e,t,r,i),s.status=1,Ua(e,o,s),o===null?e.completedRootSegment=s:(Ha(o,s),o.parentFlushed&&e.partialBoundaries.push(o))}finally{t.replay=a,t.blockedSegment=null}}function Ea(e,t,n,r){t.replay!==null&&typeof t.replay.slots==`number`?Ta(e,t,t.replay.slots,n,r):(t.node=n,t.childIndex=r,n=t.componentStack,fa(t),Da(e,t),t.componentStack=n)}function Da(e,t){var n=t.node,o=t.childIndex;if(n!==null){if(typeof n==`object`){switch(n.$$typeof){case i:var s=n.type,c=n.key,l=n.props;n=l.ref;var d=n===void 0?null:n,p=Br(s),m=c==null||c===w?o===-1?0:o:c;if(c=[t.keyPath,p,m],t.replay!==null)a:{var g=t.replay;for(o=g.nodes,n=0;n<o.length;n++){var _=o[n];if(m===_[1]){if(_.length===4){if(p!==null&&p!==_[0])throw Error(r(490,_[0],p));var v=_[2],y=_[3],b=t.node;t.replay={nodes:v,slots:y,pendingTasks:1};try{if(wa(e,t,c,s,l,d),t.replay.pendingTasks===1&&0<t.replay.nodes.length)throw Error(r(488));t.replay.pendingTasks--}catch(r){if(typeof r==`object`&&r&&(r===ii||typeof r.then==`function`||r.message===`Maximum call stack size exceeded`))throw t.node===b?t.replay=g:o.splice(n,1),r;t.replay.pendingTasks--,c=ma(t.componentStack),b=e,l=t.blockedBoundary,e=e.aborted?e.fatalError:r,c=ha(b,e,c),Ia(b,l,v,y,e,c)}t.replay=g}else{if(s!==f)throw Error(r(490,`Suspense`,Br(s)||`Unknown`));b:{g=_[5],s=_[2],d=_[3],p=_[4]===null?[]:_[4][2],_=_[4]===null?null:_[4][3],m=t.keyPath;var x=t.formatContext,S=t.row,E=t.replay,D=t.blockedBoundary,O=t.hoistableState,k=l.children;l=l.fallback;var A=new Set,j=ca(e,t.row,A,2>t.formatContext.insertionMode?{content:Pe(),fallback:Pe()}:null,!1);j.parentFlushed=!0,j.rootSegmentID=g,t.blockedBoundary=j,t.hoistableState=j.contentState,t.keyPath=c,t.formatContext=Be(e.resumableState,x),t.row=null,t.replay={nodes:s,slots:d,pendingTasks:1};try{if(Pa(e,t,k,-1),t.replay.pendingTasks===1&&0<t.replay.nodes.length)throw Error(r(488));if(t.replay.pendingTasks--,j.pendingTasks===0&&j.status===0){j.status=1,e.completedBoundaries.push(j);break b}}catch(n){j.status=4,v=e.aborted?e.fatalError:n,y=ma(t.componentStack),b=ha(e,v,y),j.errorDigest=b,t.replay.pendingTasks--,e.clientRenderedBoundaries.push(j)}finally{t.blockedBoundary=D,t.hoistableState=O,t.replay=E,t.keyPath=m,t.formatContext=x,t.row=S}v=ua(e,null,{nodes:p,slots:_,pendingTasks:0},l,-1,D,j.fallbackState,A,[c[0],`Suspense Fallback`,c[2]],ze(e.resumableState,t.formatContext),t.context,t.treeContext,t.row,pa(t.componentStack)),fa(v),e.pingedTasks.push(v)}}o.splice(n,1);break a}}}else wa(e,t,c,s,l,d);return;case a:throw Error(r(257));case h:if(v=n._init,n=v(n._payload),e.aborted)throw null;Ea(e,t,n,o);return}if(T(n)){Oa(e,t,n,o);return}if((v=C(n))&&(v=v.call(n))){if(n=v.next(),!n.done){y=[];do y.push(n.value),n=v.next();while(!n.done);Oa(e,t,y,o)}return}if(typeof n.then==`function`)return t.thenableState=null,Ea(e,t,Vi(n),o);if(n.$$typeof===u)return Ea(e,t,n._currentValue,o);throw o=Object.prototype.toString.call(n),Error(r(31,o===`[object Object]`?`object with keys {`+Object.keys(n).join(`, `)+`}`:o))}typeof n==`string`?(o=t.blockedSegment,o!==null&&(o.lastPushedText=G(o.chunks,n,e.renderState,o.lastPushedText))):(typeof n==`number`||typeof n==`bigint`)&&(o=t.blockedSegment,o!==null&&(o.lastPushedText=G(o.chunks,``+n,e.renderState,o.lastPushedText)))}}function Oa(e,t,n,i){var a=t.keyPath;if(i!==-1&&(t.keyPath=[t.keyPath,`Fragment`,i],t.replay!==null)){for(var o=t.replay,s=o.nodes,c=0;c<s.length;c++){var l=s[c];if(l[1]===i){i=l[2],l=l[3],t.replay={nodes:i,slots:l,pendingTasks:1};try{if(Oa(e,t,n,-1),t.replay.pendingTasks===1&&0<t.replay.nodes.length)throw Error(r(488));t.replay.pendingTasks--}catch(r){if(typeof r==`object`&&r&&(r===ii||typeof r.then==`function`))throw r;t.replay.pendingTasks--;var u=ma(t.componentStack);n=e;var d=t.blockedBoundary;e=e.aborted?e.fatalError:r,u=ha(n,e,u),Ia(n,d,i,l,e,u)}t.replay=o,s.splice(c,1);break}}t.keyPath=a}else if(o=t.treeContext,s=n.length,t.replay!==null&&(c=t.replay.slots,typeof c==`object`&&c)){for(i=0;i<s;i++)l=n[i],t.treeContext=Qr(o,s,i),d=c[i],typeof d==`number`?(Ta(e,t,d,l,i),delete c[i]):Pa(e,t,l,i);t.treeContext=o,t.keyPath=a}else{for(c=0;c<s;c++)i=n[c],t.treeContext=Qr(o,s,c),Pa(e,t,i,c);t.treeContext=o,t.keyPath=a}}function ka(e,t,n){n.status=5,n.rootSegmentID=e.nextSegmentId++;var i=n.tracked;if(i===null||(e=i.contentKeyPath,e===null))throw Error(r(486));i=i.fallbackNode;var a=[],o=t.workingMap.get(e);return o===void 0?(n=[e[1],e[2],a,null,i,n.rootSegmentID],t.workingMap.set(e,n),fo(n,e[0],t),n):(o[4]=i,o[5]=n.rootSegmentID,o)}function Aa(e,t,n,i){i.status=5;var a=n.keyPath,o=n.blockedBoundary;if(o===null)i.id=e.nextSegmentId++,t.rootSlots=i.id,e.completedRootSegment!==null&&(e.completedRootSegment.status=5);else{if(o!==null&&o.status===0){var s=ka(e,t,o);if(o.tracked!==null&&o.tracked.contentKeyPath===a&&n.childIndex===-1){i.id===-1&&(i.id=i.parentFlushed?o.rootSegmentID:e.nextSegmentId++),s[3]=i.id;return}}if(i.id===-1&&(i.id=i.parentFlushed&&o!==null?o.rootSegmentID:e.nextSegmentId++),n.childIndex===-1)a===null?t.rootSlots=i.id:(n=t.workingMap.get(a),n===void 0?(n=[a[1],a[2],[],i.id],fo(n,a[0],t)):n[3]=i.id);else{if(a===null){if(e=t.rootSlots,e===null)e=t.rootSlots={};else if(typeof e==`number`)throw Error(r(491))}else if(o=t.workingMap,s=o.get(a),s===void 0)e={},s=[a[1],a[2],[],e],o.set(a,s),fo(s,a[0],t);else if(e=s[3],e===null)e=s[3]={};else if(typeof e==`number`)throw Error(r(491));e[n.childIndex]=i.id}}}function ja(e,t){e=e.trackedPostpones,e!==null&&(t=t.tracked,t!==null&&(t=t.contentKeyPath,t!==null&&(e=e.workingMap.get(t),e!==void 0&&(e.length=4,e[2]=[],e[3]=null))))}function Ma(e,t,n){return ua(e,n,t.replay,t.node,t.childIndex,t.blockedBoundary,t.hoistableState,t.abortSet,t.keyPath,t.formatContext,t.context,t.treeContext,t.row,t.componentStack)}function Na(e,t,n){var r=t.blockedSegment,i=da(e,r.chunks.length,null,t.formatContext,r.lastPushedText,!0);return r.children.push(i),r.lastPushedText=!1,la(e,n,t.node,t.childIndex,t.blockedBoundary,i,t.blockedPreamble,t.hoistableState,t.abortSet,t.keyPath,t.formatContext,t.context,t.treeContext,t.row,t.componentStack)}function Pa(e,t,n,r){var i=t.formatContext,a=t.context,o=t.keyPath,s=t.treeContext,c=t.componentStack,l=t.blockedSegment;if(l===null){l=t.replay;try{return Ea(e,t,n,r)}catch(u){if(Mi(),n=u===ii?si():u,!e.aborted&&typeof n==`object`&&n){if(typeof n.then==`function`){r=u===ii?ji():null,e=Ma(e,t,r).ping,n.then(e.resolve,e.reject),t.formatContext=i,t.context=a,t.keyPath=o,t.treeContext=s,t.componentStack=c,t.replay=l,Jr(a);return}if(n.message===`Maximum call stack size exceeded`){n=u===ii?ji():null,n=Ma(e,t,n),e.pingedTasks.push(n),t.formatContext=i,t.context=a,t.keyPath=o,t.treeContext=s,t.componentStack=c,t.replay=l,Jr(a);return}}}}else{var u=l.children.length,d=l.chunks.length;try{return Ea(e,t,n,r)}catch(r){if(Mi(),l.children.length=u,l.chunks.length=d,n=r===ii?si():r,!e.aborted&&typeof n==`object`&&n){if(typeof n.then==`function`){l=n,n=r===ii?ji():null,e=Na(e,t,n).ping,l.then(e.resolve,e.reject),t.formatContext=i,t.context=a,t.keyPath=o,t.treeContext=s,t.componentStack=c,Jr(a);return}if(n.message===`Maximum call stack size exceeded`){l=r===ii?ji():null,l=Na(e,t,l),e.pingedTasks.push(l),t.formatContext=i,t.context=a,t.keyPath=o,t.treeContext=s,t.componentStack=c,Jr(a);return}}}}throw t.formatContext=i,t.context=a,t.keyPath=o,t.treeContext=s,Jr(a),n}function Fa(e){var t=e.blockedBoundary,n=e.blockedSegment;n!==null&&(n.status=3,Wa(this,t,e.row,n))}function Ia(e,t,n,i,a,o){for(var s=0;s<n.length;s++){var c=n[s];if(c.length===4)Ia(e,t,c[2],c[3],a,o);else{c=c[5];var l=e,u=o,d=ca(l,null,new Set,null,!1);d.parentFlushed=!0,d.rootSegmentID=c,d.status=4,d.errorDigest=u,d.parentFlushed&&l.clientRenderedBoundaries.push(d)}}if(n.length=0,i!==null){if(t===null)throw Error(r(487));if(t.status!==4&&(t.status=4,t.errorDigest=o,t.parentFlushed&&e.clientRenderedBoundaries.push(t)),typeof i==`object`)for(var f in i)delete i[f]}}function La(e,t){if(e!==t.currentTask){var n=e.blockedBoundary;e=e.blockedSegment,e!==null&&(e.status=3),n!==null&&n.fallbackAbortableTasks.forEach(function(e){return La(e,t)})}}function Ra(e,t,n){if(e!==t.currentTask){var r=e.blockedBoundary,i=e.blockedSegment;if(i===null||i.status===3){var a=ma(e.componentStack),o=wi(n);if(r===null){if(r=e.replay,r===null){o||t.trackedPostpones===null||i===null?o?(e=Ti(n),ha(t,e,a),t.status!==12&&t.status!==13&&ga(t,e)):(ha(t,n,a),t.status!==12&&t.status!==13&&ga(t,n)):(r=t.trackedPostpones,ha(t,n,a),Aa(t,r,e,i),Wa(t,null,e.row,i));return}t.status!==12&&t.status!==13&&(r.pendingTasks--,r.pendingTasks===0&&0<r.nodes.length&&(a=ha(t,n,a),Ia(t,null,r.nodes,r.slots,n,a)),t.pendingRootTasks--,t.pendingRootTasks===0&&Ba(t))}else{var s=t.trackedPostpones;if(r.status!==4){if(!o&&s!==null&&i!==null)return ha(t,n,a),Aa(t,s,e,i),r.fallbackAbortableTasks.forEach(function(e){return Ra(e,t,n)}),r.fallbackAbortableTasks.clear(),Wa(t,r,e.row,i);r.status=4,a=ha(t,n,a),r.errorDigest=a,ja(t,r),r.parentFlushed&&t.clientRenderedBoundaries.push(r)}r.pendingTasks--,a=r.row,a!==null&&--a.pendingTasks===0&&_a(t,a),r.fallbackAbortableTasks.forEach(function(e){return Ra(e,t,n)}),r.fallbackAbortableTasks.clear()}e=e.row,e!==null&&--e.pendingTasks===0&&_a(t,e),t.allPendingTasks--,t.allPendingTasks===0&&Va(t)}}}function za(e,t){try{var n=e.renderState,r=n.onHeaders;if(r){var i=n.headers;if(i){n.headers=null;var a=i.preconnects;if(i.fontPreloads&&(a&&(a+=`, `),a+=i.fontPreloads),i.highImagePreloads&&(a&&(a+=`, `),a+=i.highImagePreloads),!t){var o=n.styles.values(),s=o.next();b:for(;0<i.remainingCapacity&&!s.done;s=o.next())for(var c=s.value.sheets.values(),l=c.next();0<i.remainingCapacity&&!l.done;l=c.next()){var u=l.value,d=u.props,f=d.href,p=u.props,m=kr(p.href,`style`,{crossOrigin:p.crossOrigin,integrity:p.integrity,nonce:p.nonce,type:p.type,fetchPriority:p.fetchPriority,referrerPolicy:p.referrerPolicy,media:p.media});if(0<=(i.remainingCapacity-=m.length+2))n.resets.style[f]=ve,a&&(a+=`, `),a+=m,n.resets.style[f]=typeof d.crossOrigin==`string`||typeof d.integrity==`string`?[d.crossOrigin,d.integrity]:ve;else break b}}r(a?{Link:a}:{})}}}catch(t){ha(e,t,{})}}function Ba(e){e.trackedPostpones===null&&za(e,!0),e.trackedPostpones===null&&Ja(e),e=e.onShellReady,e()}function Va(e){za(e,e.trackedPostpones===null||e.completedRootSegment===null||e.completedRootSegment.status!==5),Ja(e),e=e.onAllReady,e()}function Ha(e,t){if(t.chunks.length===0&&t.children.length===1&&t.children[0].boundary===null&&t.children[0].id===-1){var n=t.children[0];n.id=t.id,n.parentFlushed=!0,n.status!==1&&n.status!==3&&n.status!==4||Ha(e,n)}else e.completedSegments.push(t)}function Ua(e,t,n){if(ne!==null){n=n.chunks;for(var r=0,i=0;i<n.length;i++)r+=n[i].byteLength;t===null?e.byteSize+=r:t.byteSize+=r}}function Wa(e,t,n,i){if(n!==null&&(--n.pendingTasks===0?_a(e,n):n.together&&ya(e,n)),e.allPendingTasks--,t===null){if(i!==null&&i.parentFlushed){if(e.completedRootSegment!==null)throw Error(r(389));e.completedRootSegment=i}e.pendingRootTasks--,e.pendingRootTasks===0&&Ba(e)}else if(t.pendingTasks--,t.status!==4){if(t.pendingTasks===0){if(t.status===0&&(t.status=1),i!==null&&i.parentFlushed&&(i.status===1||i.status===3)&&Ha(t,i),t.parentFlushed&&e.completedBoundaries.push(t),t.status===1)n=t.row,n!==null&&Ir(n.hoistables,t.contentState),$i(e,t)||(e.allPendingTasks++,t.fallbackAbortableTasks.forEach(Fa,e),t.fallbackAbortableTasks.clear(),n!==null&&--n.pendingTasks===0&&_a(e,n),e.allPendingTasks--),e.pendingRootTasks===0&&e.trackedPostpones===null&&t.preamble!==null&&Ja(e);else if(t.status===5&&(t=t.row,t!==null)){if(e.trackedPostpones!==null){n=e.trackedPostpones;var a=t.next;if(a!==null&&(i=a.boundaries,i!==null))for(a.boundaries=null,a=0;a<i.length;a++){var o=i[a];ka(e,n,o),Wa(e,o,null,null)}}e.allPendingTasks++,--t.pendingTasks===0&&_a(e,t),e.allPendingTasks--}}else i===null||!i.parentFlushed||i.status!==1&&i.status!==3||(Ha(t,i),t.completedSegments.length===1&&t.parentFlushed&&e.partialBoundaries.push(t)),t=t.row,t!==null&&t.together&&ya(e,t)}e.allPendingTasks===0&&Va(e)}function Ga(e){if(!(e.aborted||11<e.status)){var t=Hr,n=me.H;me.H=Ui;var i=me.A;me.A=Gi;var a=oa;oa=e;var o=Wi;Wi=e.resumableState;try{for(var s=e.pingedTasks,c=0;c<s.length;c++){var l=s[c],u=e,d=l.blockedSegment;if(d===null){a:if(l.replay.pendingTasks!==0){var f=u.currentTask;u.currentTask=l,Jr(l.context);var p=l.node;try{if(typeof l.replay.slots==`number`?Ta(u,l,l.replay.slots,l.node,l.childIndex):Da(u,l),l.replay.pendingTasks===1&&0<l.replay.nodes.length)throw Error(r(488));l.replay.pendingTasks--,l.abortSet.delete(l),Wa(u,l.blockedBoundary,l.row,null)}catch(e){Mi();var m=e===ii?si():e;if(u.aborted){e===ii&&(l.thenableState=ji()),u.currentTask=f;var h=u;La(l,h),l.abortSet.delete(l),Ra(l,h,h.fatalError)}else{if(typeof m==`object`&&m){if(typeof m.then==`function`){var g=l.ping;m.then(g.resolve,g.reject),l.thenableState=e===ii?ji():null;break a}if(m.message===`Maximum call stack size exceeded`&&l.node!==p){l.thenableState=null,u.pingedTasks.push(l);break a}}l.replay.pendingTasks--,l.abortSet.delete(l);var _=ma(l.componentStack);h=u;var v=l.blockedBoundary,y=u.aborted?u.fatalError:m,b=l.replay.nodes,x=l.replay.slots,S=ha(h,y,_);Ia(h,v,b,x,y,S),u.pendingRootTasks--,u.pendingRootTasks===0&&Ba(u),u.allPendingTasks--,u.allPendingTasks===0&&Va(u)}}finally{u.currentTask=f}}}else a:if(h=d,h.status===0){var C=u.currentTask;u.currentTask=l,Jr(l.context);var w=h.children.length,T=h.chunks.length,E=l.node;try{Da(u,l),h.lastPushedText&&h.textEmbedded&&h.chunks.push(He),l.abortSet.delete(l),h.status=1,Ua(u,l.blockedBoundary,h),Wa(u,l.blockedBoundary,l.row,h)}catch(e){Mi(),h.children.length=w,h.chunks.length=T;var D=e===ii?si():e;if(u.aborted)e===ii&&(l.thenableState=ji()),u.currentTask=C,h=u,La(l,h),l.abortSet.delete(l),Ra(l,h,h.fatalError);else{if(typeof D==`object`&&D){if(typeof D.then==`function`){h.status=0,l.thenableState=e===ii?ji():null;var O=l.ping;D.then(O.resolve,O.reject);break a}if(D.message===`Maximum call stack size exceeded`&&l.node!==E){h.status=0,l.thenableState=null,u.pingedTasks.push(l);break a}}var k=ma(l.componentStack);l.abortSet.delete(l),h.status=4;var A=l.blockedBoundary,j=l.row;if(j!==null&&--j.pendingTasks===0&&_a(u,j),u.allPendingTasks--,A===null){if(wi(D)){var M=Ti(D);ha(u,M,k),ga(u,M)}else ha(u,D,k),ga(u,D)}else{var N=ha(u,D,k);if(A.pendingTasks--,A.status!==4){A.status=4,A.errorDigest=N,ja(u,A);var P=A.row;P!==null&&(u.allPendingTasks++,--P.pendingTasks===0&&_a(u,P),u.allPendingTasks--),A.parentFlushed&&u.clientRenderedBoundaries.push(A),u.pendingRootTasks===0&&u.trackedPostpones===null&&A.preamble!==null&&Ja(u)}u.allPendingTasks===0&&Va(u)}}}finally{u.currentTask=C}}}s.splice(0,c),e.destination!==null&&ro(e,e.destination)}catch(t){ha(e,t,{}),ga(e,t)}finally{Wi=o,me.H=n,me.A=i,n===Ui&&Jr(t),oa=a}}}function Ka(e,t,n){t.preambleChildren.length&&n.push(t.preambleChildren);for(var r=!1,i=0;i<t.children.length;i++)r=qa(e,t.children[i],n)||r;return r}function qa(e,t,n){var i=t.boundary;if(i===null)return Ka(e,t,n);var a=i.preamble;if(a===null)return!1;switch(i.status){case 1:if(Ft(e.renderState,a.content),e.byteSize+=i.byteSize,t=i.completedSegments[0],!t)throw Error(r(391));return Ka(e,t,n);case 5:if(e.trackedPostpones!==null)return!0;case 4:if(t.status===1)return Ft(e.renderState,a.fallback),Ka(e,t,n);default:return!0}}function Ja(e){if(e.completedRootSegment&&e.completedPreambleSegments===null){var t=[],n=e.byteSize,r=qa(e,e.completedRootSegment,t),i=e.renderState.preamble;!1===r||i.headChunks&&i.bodyChunks?e.completedPreambleSegments=t:e.byteSize=n}}function Ya(e,t,n,i){switch(n.parentFlushed=!0,n.status){case 0:n.id=e.nextSegmentId++;case 5:return i=n.id,n.lastPushedText=!1,n.textEmbedded=!1,e=e.renderState,I(t,Rt),I(t,e.placeholderPrefix),e=z(i.toString(16)),I(t,e),L(t,zt);case 1:n.status=2;var a=!0,o=n.chunks,s=0;n=n.children;for(var c=0;c<n.length;c++){for(a=n[c];s<a.index;s++)I(t,o[s]);a=Za(e,t,a,i)}for(;s<o.length-1;s++)I(t,o[s]);return s<o.length&&(a=L(t,o[s])),a;case 3:return!0;default:throw Error(r(390))}}var Xa=0;function Za(e,t,n,i){var a=n.boundary;if(a===null)return Ya(e,t,n,i);if(n.boundary=null,a.parentFlushed=!0,a.status===4){var o=a.row;o!==null&&--o.pendingTasks===0&&_a(e,o),a=a.errorDigest,L(t,Gt),I(t,qt),a!=null&&(I(t,Yt),I(t,z(U(a))),I(t,Jt)),L(t,Xt),Ya(e,t,n,i)}else if(a.status!==1)a.status===0&&(a.rootSegmentID=e.nextSegmentId++),0<a.completedSegments.length&&e.partialBoundaries.push(a),Zt(t,e.renderState,a.rootSegmentID),i&&Ir(i,a.fallbackState),Ya(e,t,n,i);else if(!to&&$i(e,a)&&(Xa+a.byteSize>e.progressiveChunkSize||Lr(a.contentState,no)||a.defer))a.rootSegmentID=e.nextSegmentId++,e.completedBoundaries.push(a),Zt(t,e.renderState,a.rootSegmentID),Ya(e,t,n,i);else{if(Xa+=a.byteSize,i&&Ir(i,a.contentState),n=a.row,n!==null&&$i(e,a)&&--n.pendingTasks===0&&_a(e,n),L(t,Ht),n=a.completedSegments,n.length!==1)throw Error(r(391));Za(e,t,n[0],i)}return L(t,Kt)}function Qa(e,t,n,r){return bn(t,e.renderState,n.parentFormatContext,n.id),Za(e,t,n,r),xn(t,n.parentFormatContext)}function $a(e,t,n){Xa=n.byteSize;for(var r=n.completedSegments,i=0;i<r.length;i++)eo(e,t,n,r[i]);r.length=0,r=n.row,r!==null&&$i(e,n)&&--r.pendingTasks===0&&_a(e,r),er(t,n.contentState,e.renderState),r=e.resumableState,e=e.renderState,i=n.rootSegmentID,n=n.contentState;var a=e.stylesToHoist,o=!!(r.instructions&128);return e.stylesToHoist=!1,I(t,e.startInlineScript),I(t,ct),a?(!(r.instructions&4)&&(r.instructions|=4,I(t,Fn)),!(r.instructions&2)&&(r.instructions|=2,I(t,En)),o&&!(r.instructions&256)&&(r.instructions|=256,I(t,Dn)),r.instructions&8?I(t,An):(r.instructions|=8,I(t,kn))):(!(r.instructions&2)&&(r.instructions|=2,I(t,En)),o&&!(r.instructions&256)&&(r.instructions|=256,I(t,Dn)),I(t,On)),r=z(i.toString(16)),I(t,e.boundaryPrefix),I(t,r),I(t,jn),I(t,e.segmentPrefix),I(t,r),a?(I(t,Mn),vr(t,n)):I(t,Nn),n=L(t,Pn),It(t,e)&&n}function eo(e,t,n,i){if(i.status===2)return!0;var a=n.contentState,o=i.id;if(o===-1){if((i.id=n.rootSegmentID)===-1)throw Error(r(392));return Qa(e,t,i,a)}return o===n.rootSegmentID?Qa(e,t,i,a):(Qa(e,t,i,a),n=e.resumableState,e=e.renderState,I(t,e.startInlineScript),I(t,ct),n.instructions&1?I(t,Cn):(n.instructions|=1,I(t,Sn)),I(t,e.segmentPrefix),o=z(o.toString(16)),I(t,o),I(t,wn),I(t,e.placeholderPrefix),I(t,o),t=L(t,Tn),t)}var to=!1,no=!1;function ro(e,t){ee=new Uint8Array(2048),F=0;try{if(!(0<e.pendingRootTasks)){var n,r=e.completedRootSegment;if(r!==null){if(r.status===5)return;var i=e.completedPreambleSegments;if(i===null)return;Xa=e.byteSize;var a=e.resumableState,o=e.renderState,s=o.preamble,c=s.htmlChunks,l=s.headChunks,u;if(c){for(u=0;u<c.length;u++)I(t,c[u]);if(l)for(u=0;u<l.length;u++)I(t,l[u]);else I(t,At(`head`)),I(t,ct)}else if(l)for(u=0;u<l.length;u++)I(t,l[u]);var d=o.charsetChunks;for(u=0;u<d.length;u++)I(t,d[u]);d.length=0,o.preconnects.forEach(tr,t),o.preconnects.clear();var f=o.viewportChunks;for(u=0;u<f.length;u++)I(t,f[u]);f.length=0,o.fontPreloads.forEach(tr,t),o.fontPreloads.clear(),o.highImagePreloads.forEach(tr,t),o.highImagePreloads.clear(),ye=o,o.styles.forEach(lr,t),ye=null;var p=o.importMapChunks;for(u=0;u<p.length;u++)I(t,p[u]);p.length=0,o.bootstrapScripts.forEach(tr,t),o.scripts.forEach(tr,t),o.scripts.clear(),o.bulkPreloads.forEach(tr,t),o.bulkPreloads.clear(),c||l||(a.instructions|=32);var m=o.hoistableChunks;for(u=0;u<m.length;u++)I(t,m[u]);for(a=m.length=0;a<i.length;a++){var h=i[a];for(o=0;o<h.length;o++)Za(e,t,h[o],null)}var g=e.renderState.preamble,_=g.headChunks;(g.htmlChunks||_)&&I(t,Pt(`head`));var v=g.bodyChunks;if(v)for(i=0;i<v.length;i++)I(t,v[i]);no=!0,Za(e,t,r,null),no=!1,e.completedRootSegment=null;var y=e.renderState;if(e.allPendingTasks!==0||e.clientRenderedBoundaries.length!==0||e.completedBoundaries.length!==0||e.trackedPostpones!==null&&(e.trackedPostpones.rootNodes.length!==0||e.trackedPostpones.rootSlots!==null)){var b=e.resumableState;if(!(b.instructions&64)){if(b.instructions|=64,I(t,y.startInlineScript),!(b.instructions&32)){b.instructions|=32;var x=`_`+b.idPrefix+`R_`;I(t,fr),I(t,z(U(x))),I(t,Xe)}I(t,ct),I(t,Lt),L(t,xe)}}It(t,y)}var S=e.renderState;r=0;var C=S.viewportChunks;for(r=0;r<C.length;r++)I(t,C[r]);C.length=0,S.preconnects.forEach(tr,t),S.preconnects.clear(),S.fontPreloads.forEach(tr,t),S.fontPreloads.clear(),S.highImagePreloads.forEach(tr,t),S.highImagePreloads.clear(),S.styles.forEach(dr,t),S.scripts.forEach(tr,t),S.scripts.clear(),S.bulkPreloads.forEach(tr,t),S.bulkPreloads.clear();var w=S.hoistableChunks;for(r=0;r<w.length;r++)I(t,w[r]);w.length=0;var T=e.clientRenderedBoundaries;for(n=0;n<T.length;n++){var E=T[n];S=t;var D=e.resumableState,O=e.renderState,k=E.rootSegmentID,A=E.errorDigest;I(S,O.startInlineScript),I(S,ct),D.instructions&4?I(S,Ln):(D.instructions|=4,I(S,In)),I(S,O.boundaryPrefix),I(S,z(k.toString(16))),I(S,Rn),A!=null&&(I(S,zn),A==null?I(S,Bn):I(S,z(Un(A))));var j=L(S,Vn);if(!j){e.destination=null,n++,T.splice(0,n);return}}T.splice(0,n);var M=e.completedBoundaries;for(n=0;n<M.length;n++)if(!$a(e,t,M[n])){e.destination=null,n++,M.splice(0,n);return}M.splice(0,n),te(t),ee=new Uint8Array(2048),F=0,to=!0;var N=e.partialBoundaries;for(n=0;n<N.length;n++){var P=N[n];a:{T=e,E=t,Xa=P.byteSize;var R=P.completedSegments;for(j=0;j<R.length;j++)if(!eo(T,E,P,R[j])){j++,R.splice(0,j);var B=!1;break a}R.splice(0,j);var ne=P.row;ne!==null&&ne.together&&P.pendingTasks===1&&(ne.pendingTasks===1?va(T,ne,ne.hoistables):ne.pendingTasks--),B=er(E,P.contentState,T.renderState)}if(!B){e.destination=null,n++,N.splice(0,n);return}}N.splice(0,n),to=!1;var re=e.completedBoundaries;for(n=0;n<re.length;n++)if(!$a(e,t,re[n])){e.destination=null,n++,re.splice(0,n);return}re.splice(0,n)}}finally{to=!1,n=e.postponedState,n!==null&&(n.nextSegmentId=e.nextSegmentId),e.allPendingTasks===0&&e.clientRenderedBoundaries.length===0&&e.completedBoundaries.length===0?(e.flushScheduled=!1,n=e.resumableState,n.hasBody&&I(t,Pt(`body`)),n.hasHtml&&I(t,Pt(`html`)),te(t),co(e),e.status=13,t.close(),e.destination=null):te(t)}}function io(e){e.flushScheduled=e.destination!==null,P(function(){return Ga(e)}),j(function(){e.status===10&&(e.status=11),e.trackedPostpones===null&&za(e,e.pendingRootTasks===0)})}function ao(e){!1===e.flushScheduled&&e.pingedTasks.length===0&&e.destination!==null&&(e.flushScheduled=!0,j(function(){var t=e.destination;t?ro(e,t):e.flushScheduled=!1}))}function oo(e,t){if(e.status===12)e.status=13,e=e.fatalError,wi(e)&&(e=Ti(e)),re(t,e);else if(e.status!==13&&e.destination===null){e.destination=t;try{ro(e,t)}catch(t){ha(e,t,{}),ga(e,t)}}}function so(e,t){try{if(0<t.size){var n=e.fatalError;t.forEach(function(t){return Ra(t,e,n)}),t.clear()}e.destination!==null&&ro(e,e.destination)}catch(t){ha(e,t,{}),ga(e,t)}}function co(e){e=e.renderLifetimeController,e!==null&&e.abort(`The render ended.`)}function lo(e,t){if(t.aborted)uo(e,t.reason);else{var n=new AbortController;e.renderLifetimeController=n,t.addEventListener(`abort`,function(){uo(e,t.reason)},{signal:n.signal})}}function uo(e,t){if(!(e.aborted||e.status!==11&&e.status!==10)){co(e);var n=typeof t==`object`&&!!t&&t.$$typeof===x;e.aborted=!0,t=n?Ci(t):t===void 0?Error(r(432)):typeof t==`object`&&t&&typeof t.then==`function`?Error(r(530)):t,e.fatalError=t;var i=e.abortableTasks;i.forEach(function(t){return La(t,e)}),j(function(){return so(e,i)})}}function fo(e,t,n){if(t===null)n.rootNodes.push(e);else{var r=n.workingMap,i=r.get(t);i===void 0&&(i=[t[1],t[2],[],null],r.set(t,i),fo(i,t[0],n)),i[2].push(e)}}function po(e){var t=e.trackedPostpones;if(t===null||t.rootNodes.length===0&&t.rootSlots===null)return e.trackedPostpones=null;var n=e.completedRootSegment===null||e.completedRootSegment.status!==5&&e.completedPreambleSegments!==null;if(n){var r=e.nextSegmentId,i=t.rootSlots,a=e.resumableState;a.bootstrapScriptContent=void 0,a.bootstrapScripts=void 0,a.bootstrapModules=void 0}else{r=0,i=-1,a=e.resumableState;var o=e.renderState;a.nextFormID=0,a.hasBody=!1,a.hasHtml=!1,a.unknownResources={font:o.resets.font},a.dnsResources=o.resets.dns,a.connectResources=o.resets.connect,a.imageResources=o.resets.image,a.styleResources=o.resets.style,a.scriptResources={},a.moduleUnknownResources={},a.moduleScriptResources={},a.instructions=0}return t={nextSegmentId:r,rootFormatContext:e.rootFormatContext,progressiveChunkSize:e.progressiveChunkSize,resumableState:e.resumableState,replayNodes:t.rootNodes,replaySlots:i},n&&(e.postponedState=t),t}function mo(){var e=t.version;if(e!==`19.3.1`)throw Error(r(527,e,`19.3.1`))}mo(),mo(),e.prerender=function(e,t){return new Promise(function(n,r){var i=t?t.onHeaders:void 0,a;i&&(a=function(e){i(new Headers(e))});var o=Ne(t?t.identifierPrefix:void 0,t?t.unstable_externalRuntimeSrc:void 0,t?t.bootstrapScriptContent:void 0,t?t.bootstrapScripts:void 0,t?t.bootstrapModules:void 0),s=ra(e,o,Me(o,void 0,t?t.unstable_externalRuntimeSrc:void 0,t?t.importMap:void 0,a,t?t.maxHeadersLength:void 0),Ie(t?t.namespaceURI:void 0),t?t.progressiveChunkSize:void 0,t?t.onError:void 0,t?t.onBrowserBailout:void 0,function(){var e=new ReadableStream({type:`bytes`,pull:function(e){oo(s,e)},cancel:function(e){s.destination=null,uo(s,e)}},{highWaterMark:0});e={postponed:po(s),prelude:e},n(e)},void 0,void 0,r);t&&t.signal&&lo(s,t.signal),io(s)})},e.renderToReadableStream=function(e,t){return new Promise(function(n,r){var i,a,o=new Promise(function(e,t){a=e,i=t}),s=t?t.onHeaders:void 0,c;s&&(c=function(e){s(new Headers(e))});var l=Ne(t?t.identifierPrefix:void 0,t?t.unstable_externalRuntimeSrc:void 0,t?t.bootstrapScriptContent:void 0,t?t.bootstrapScripts:void 0,t?t.bootstrapModules:void 0),u=na(e,l,Me(l,t?t.nonce:void 0,t?t.unstable_externalRuntimeSrc:void 0,t?t.importMap:void 0,c,t?t.maxHeadersLength:void 0),Ie(t?t.namespaceURI:void 0),t?t.progressiveChunkSize:void 0,t?t.onError:void 0,t?t.onBrowserBailout:void 0,a,function(){var e=new ReadableStream({type:`bytes`,pull:function(e){oo(u,e)},cancel:function(e){u.destination=null,uo(u,e)}},{highWaterMark:0});e.allReady=o,n(e)},function(e){o.catch(function(){}),r(e)},i,t?t.formState:void 0);t&&t.signal&&lo(u,t.signal),io(u)})},e.resume=function(e,t,n){return new Promise(function(r,i){var a,o,s=new Promise(function(e,t){o=e,a=t}),c=ia(e,t,Me(t.resumableState,n?n.nonce:void 0,void 0,void 0,void 0,void 0),n?n.onError:void 0,n?n.onBrowserBailout:void 0,o,function(){var e=new ReadableStream({type:`bytes`,pull:function(e){oo(c,e)},cancel:function(e){c.destination=null,uo(c,e)}},{highWaterMark:0});e.allReady=s,r(e)},function(e){s.catch(function(){}),i(e)},a);n&&n.signal&&lo(c,n.signal),io(c)})},e.resumeAndPrerender=function(e,t,n){return new Promise(function(r,i){var a=aa(e,t,Me(t.resumableState,void 0,void 0,void 0,void 0,void 0),n?n.onError:void 0,n?n.onBrowserBailout:void 0,function(){var e=new ReadableStream({type:`bytes`,pull:function(e){oo(a,e)},cancel:function(e){a.destination=null,uo(a,e)}},{highWaterMark:0});e={postponed:po(a),prelude:e},r(e)},void 0,void 0,i);n&&n.signal&&lo(a,n.signal),io(a)})},e.version=`19.3.1`})),t$=(0,et((e=>{var t=$Q(),n=e$();e.version=t.version,e.renderToString=t.renderToString,e.renderToStaticMarkup=t.renderToStaticMarkup,e.renderToReadableStream=n.renderToReadableStream,e.resume=n.resume}))().renderToStaticMarkup)((0,J.jsx)(Gp,{size:14,"aria-hidden":`true`})),n$=()=>(0,J.jsx)(Gp,{size:14,"aria-hidden":`true`}),r$={"todo-blocking":`kw kw-todo-blocking`,todo:`kw kw-todo`,confirm:`kw kw-confirm`,unseen:`kw kw-confirm`,answer:`kw kw-answer`},i$={"todo-blocking":{title:`Blocking question`,lead:`No check is generated for this until you decide.`,steps:[`Keep what the case says: click the X button to delete this whole TODO block.`,`Decide yourself: type your answer after "Answer:".`],titleClass:`text-seal-glow`},todo:{title:`Open question`,lead:`What the case says is used as it is.`,steps:[`Keep what the case says: click the X button to delete this whole TODO block.`,`Disagree: type your answer after "Answer:".`],titleClass:`text-gold-glow`},confirm:{title:`Needs a person to settle`,lead:`Seen on a page by the AI; nobody has settled it yet.`,steps:[`Right: click the X to remove the marker.`,`Wrong: fix the sentence, then remove the marker.`,`Only the rows that change an assertion need you; the panel says which, and why.`],titleClass:`text-qing-glow`},unseen:{title:`Not checked on the page`,lead:`The AI could not verify this.`,steps:[`Check it on the page yourself.`,`Then click the X button to remove this marker, or fix the sentence first.`],titleClass:`text-qing-glow`},answer:{title:`Your answer`,lead:`Empty means no answer: the question stays open.`,steps:[`Type your answer here: it replaces the case text where they differ.`,`Click the X button to clear what you typed.`,`To keep what the case says instead: clear this and delete the TODO block.`],titleClass:`text-jade-glow`}},a$=e=>({class:r$[e],"data-kw":e}),o$=e=>String.raw`(?:\u{${e}}\uFE0F?[ \t]*)?`,s$=[String.raw`(?<blocking>${o$(`1F6AB`)}\bto[-_]?dos?\s*\[blocking\])`,String.raw`(?<todo>${o$(`2753`)}\bto[-_]?dos?\b(?:\s*\[non-blocking\])?)`,String.raw`(?<confirm>${o$(`1F50D`)}(?:\bto be confirmed(?:\s+by\s+QA)?\b|\bTBC\b|\bTBD\b|\bneeds?\s+confirmation\b))`,String.raw`(?<unseen>${o$(`1F441`)}\bnot observed\b)`,String.raw`(?<answer>(?<=^[ \t]*(?:(?:[-*+>]|\d+\.)[ \t]+)*)${o$(`270D`)}\bAnswer:)`].join(`|`),c$=()=>new RegExp(s$,`gimu`);function l$(e){return e?.blocking===void 0?e?.confirm===void 0?e?.unseen===void 0?e?.answer===void 0?`todo`:`answer`:`unseen`:`confirm`:`todo-blocking`}function u$(e){let t=[],n=0;for(let r of e.matchAll(c$()))r[0]!==``&&(r.index>n&&t.push({text:e.slice(n,r.index),kind:null}),t.push({text:r[0],kind:l$(r.groups)}),n=r.index+r[0].length);return n<e.length&&t.push({text:e.slice(n),kind:null}),t}var d$={"todo-blocking":`Keep what the case says: delete this question block`,todo:`Keep what the case says: delete this question block`,confirm:`Confirmed: remove this marker`,unseen:`Checked: remove this marker`,answer:`Clear your answer`},f$=/^---\r?\n[\s\S]*?\r?\n---\r?\n?/,p$=/^[ \t]*(?:(?:[-*+>]|\d+\.)[ \t]+)*$/,m$=e=>f$.exec(e)?.[0].length??0,h$=e=>e.length-e.trimStart().length;function g$(e,t){let n=t===0?0:e.lastIndexOf(`
|
|
316
316
|
`,t-1)+1,r=e.indexOf(`
|
|
317
317
|
`,t);return{from:n,to:r===-1?e.length:r}}function _$(e,t){let n=h$(e.slice(t.from,t.to)),r=t.to;for(;r<e.length;){let t=g$(e,r+1),i=e.slice(t.from,t.to);if(i.trim()===``||h$(i)<=n)break;r=t.to}return r}function v$(e,t){let n=_$(e,t);return n<e.length?{from:t.from,to:n+1}:{from:Math.max(0,t.from-1),to:n}}function y$(e,t,n,r){let i=e.slice(t.from,n),a=e.slice(r,t.to),o=/\([ \t]*$/.exec(i),s=/^[ \t]*\)/.exec(a);if(o&&s){let e=i.slice(0,o.index),n=p$.test(e)?0:/[ \t]*$/.exec(e)[0].length;return{from:t.from+o.index-n,to:r+s[0].length}}let c=/^[ \t]*[;,][ \t]*/.exec(a);if(c)return{from:n,to:r+c[0].length};let l=/[ \t]*[;,][ \t]*$/.exec(i);if(l&&/^[ \t]*(?:[)\].:!?]|$)/.test(a))return{from:n-l[0].length,to:r};let u=/[ \t]+$/.exec(i);if(u&&!p$.test(i))return{from:n-u[0].length,to:r};let d=/^[ \t]+/.exec(a);return d?{from:n,to:r+d[0].length}:{from:n,to:r}}function b$(e,t,n,r){let i=e.indexOf(`)`,r);if(i===-1||i>t.to||/[\r\n]/.test(e.slice(t.from,i)))return r;let a=/\bevidence:[ \t]*[^\s;)]+\.(?:png|jpe?g|webp)/i.exec(e.slice(r,i));if(a)return r+a.index+a[0].length;let o=/^[ \t]*:[ \t]*/.exec(e.slice(r,i));if(!o)return r;let s=e.slice(r+o[0].length,i).replace(/[;,][ \t]*evidence:[\s\S]*$/i,``);return r+o[0].length+s.trimEnd().length}function x$(e,t,n,r){let i=g$(e,t),a=d$[r];if(r===`answer`){let t=_$(e,i);return e.slice(n,i.to).trim()!==``||t>i.to?{range:{from:n,to:t},label:a}:null}return r===`todo-blocking`||r===`todo`?p$.test(e.slice(i.from,t))?{range:v$(e,i),label:a}:null:{range:y$(e,i,t,b$(e,i,t,n)),label:a}}function S$(e,t,n,r){if(t<m$(e))return null;let i=c$();i.lastIndex=t;let a=i.exec(e);return!a||a.index!==t||a[0].length!==n-t||l$(a.groups)!==r?null:x$(e,t,n,r)}function C$(e){let t=[],n=m$(e);for(let r of e.matchAll(c$())){if(r[0]===``)continue;let i=l$(r.groups),a=r.index+r[0].length;t.push({from:r.index,to:a,kind:i,action:r.index<n?null:x$(e,r.index,a,i)})}return t}function w$(e,t,n,r){let i=S$(e.state.doc.toString(),t,n,r);return i?(e.dispatch({changes:{from:i.range.from,to:i.range.to,insert:``},userEvent:`delete.keyword`}),!0):!1}var T$=h.define(K.processingInstruction),E$=A([{tag:K.heading,class:`tok-heading`},{tag:K.strong,class:`tok-strong`},{tag:K.emphasis,class:`tok-em`},{tag:K.quote,class:`tok-quote`},{tag:K.link,class:`tok-link`},{tag:K.url,class:`tok-url`},{tag:K.monospace,class:`tok-code`},{tag:K.labelName,class:`tok-label`},{tag:K.contentSeparator,class:`tok-mark`},{tag:T$,class:`tok-list-mark`},{tag:K.processingInstruction,class:`tok-mark`},{tag:K.meta,class:`tok-mark`},{tag:K.propertyName,class:`tok-property`},{tag:[K.comment,K.docComment],class:`tok-comment`},{tag:[K.keyword,K.controlKeyword,K.operatorKeyword,K.modifier,K.definitionKeyword],class:`tok-keyword`},{tag:[K.string,K.special(K.string),K.regexp],class:`tok-string`},{tag:[K.number,K.bool,K.null,K.atom],class:`tok-number`},{tag:[K.function(K.variableName),K.function(K.propertyName),K.definition(K.variableName)],class:`tok-function`},{tag:[K.typeName,K.className,K.namespace],class:`tok-type`},{tag:[K.tagName,K.angleBracket],class:`tok-tag`},{tag:K.attributeName,class:`tok-property`},{tag:[K.operator,K.punctuation,K.separator,K.bracket],class:`tok-punct`},{tag:K.invalid,class:`tok-invalid`}]),D$=class extends k{kind;from;to;constructor(e,t,n){super(),this.kind=e,this.from=t,this.to=n}eq(e){return e.kind===this.kind&&e.from===this.from&&e.to===this.to}toDOM(e){let t=document.createElement(`button`);return t.type=`button`,t.className=`kw-remove kw-remove-${this.kind}`,t.dataset.kwRemove=this.kind,t.setAttribute(`aria-label`,d$[this.kind]),t.title=d$[this.kind],t.innerHTML=t$,t.addEventListener(`mousedown`,e=>e.preventDefault()),t.addEventListener(`click`,n=>{n.preventDefault();let r=e.posAtDOM(t),i=C$(e.state.doc.toString()).find(e=>e.to===r);i&&w$(e,i.from,i.to,i.kind)}),t}ignoreEvent(){return!0}};function O$(e){let t=[];for(let{from:n,to:r,kind:i,action:a}of C$(e.state.doc.toString())){let{class:e,"data-kw":o}=a$(i);t.push(_.mark({class:e,attributes:{"data-kw":o}}).range(n,r)),a&&t.push(_.widget({widget:new D$(i,n,r),side:1}).range(r))}return _.set(t,!0)}var k$=B.fromClass(class{decorations;constructor(e){this.decorations=O$(e)}update(e){e.docChanged&&(this.decorations=O$(e.view))}},{decorations:e=>e.decorations}),A$=`inkstone-editor`,j$=S.define(),M$=w.define({create:()=>_.none,update(e,t){let n=e.map(t.changes);for(let e of t.effects)e.is(j$)&&(n=e.value===null?_.none:N$(t.state.doc,e.value));return n},provide:e=>R.decorations.from(e)});function N$(e,{from:t,to:n}){let r=e.lineAt(Kp(t,0,e.length)).number,i=e.lineAt(Kp(n,0,e.length)).number,a=[];for(let t=r;t<=i;t++)a.push(_.line({class:`cm-flash`}).range(e.line(t).from));return _.set(a,!0)}var P$=S.define(),F$=w.define({create:()=>_.none,update(e,t){let n=e.map(t.changes);for(let e of t.effects)e.is(P$)&&(n=e.value===null?_.none:_.set([_.mark({class:`cm-kw-flash`}).range(e.value.from,e.value.to)]));return n},provide:e=>R.decorations.from(e)}),I$=W.matchFilename(QQ,`spec.ts`),L$=()=>I$?.load()??Promise.resolve(null),R$=[D(E$)],z$=[GQ({content:FZ({base:yZ,codeLanguages:QQ,extensions:{props:[y({ListMark:T$})]}})}),D(E$),k$,M$,F$],B$=[FZ({base:yZ,codeLanguages:QQ,extensions:{props:[y({ListMark:T$})]}}),D(E$)],V$={lineNumbers:!1,foldGutter:!1,highlightActiveLine:!1,highlightActiveLineGutter:!1,highlightSelectionMatches:!1,bracketMatching:!1,closeBrackets:!1,autocompletion:!1,rectangularSelection:!1,crosshairCursor:!1,drawSelection:!0};function H$({value:e,onChange:t,ariaLabel:n,placeholder:r,maxHeight:i=220,singleLine:a=!1,autoFocus:o=!1,onEnter:s}){let c=(0,q.useRef)(s);c.current=s;let l=(0,q.useRef)(t);l.current=t;let[u,d]=(0,q.useState)(e),f=(0,q.useRef)(e),p=(0,q.useRef)(e),m=(0,q.useRef)(!1),h=(0,q.useCallback)(()=>{p.current!==f.current&&(f.current=p.current,d(p.current))},[]);(0,q.useEffect)(()=>{p.current=e,!m.current&&h()},[e,h]);let g=(0,q.useCallback)(e=>{f.current=e,d(e),l.current(a?e.replace(/\r?\n/g,` `):e)},[a]),_=(0,q.useMemo)(()=>{let e=[...B$,R.lineWrapping,R.contentAttributes.of({"aria-label":n})];return a&&e.push(E.highest(ze.of([{key:`Enter`,run:()=>(c.current?.(),!0)}]))),e},[n,a]);return(0,J.jsx)(`div`,{className:`${A$} inkstone-field w-full overflow-hidden rounded border border-line-mid bg-white`,style:{"--field-max-height":`${i}px`},onFocus:()=>{m.current=!0},onBlur:()=>{m.current=!1,h()},children:(0,J.jsx)(vH,{value:u,onChange:g,theme:`none`,autoFocus:o,extensions:_,basicSetup:V$,placeholder:r})})}function U$(){var e=[...arguments];return(0,q.useMemo)(()=>t=>{e.forEach(e=>e(t))},e)}var W$=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function G$(e){let t=Object.prototype.toString.call(e);return t===`[object Window]`||t===`[object global]`}function K$(e){return`nodeType`in e}function q$(e){return e?G$(e)?e:K$(e)?e.ownerDocument?.defaultView??window:window:window}function J$(e){let{Document:t}=q$(e);return e instanceof t}function Y$(e){return!G$(e)&&e instanceof q$(e).HTMLElement}function X$(e){return e instanceof q$(e).SVGElement}function Z$(e){return e?G$(e)?e.document:K$(e)?J$(e)?e:Y$(e)||X$(e)?e.ownerDocument:document:document:document}var Q$=W$?q.useLayoutEffect:q.useEffect;function $$(e){let t=(0,q.useRef)(e);return Q$(()=>{t.current=e}),(0,q.useCallback)(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function e1(){let e=(0,q.useRef)(null);return[(0,q.useCallback)((t,n)=>{e.current=setInterval(t,n)},[]),(0,q.useCallback)(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[])]}function t1(e,t){t===void 0&&(t=[e]);let n=(0,q.useRef)(e);return Q$(()=>{n.current!==e&&(n.current=e)},t),n}function n1(e,t){let n=(0,q.useRef)();return(0,q.useMemo)(()=>{let t=e(n.current);return n.current=t,t},[...t])}function r1(e){let t=$$(e),n=(0,q.useRef)(null);return[n,(0,q.useCallback)(e=>{e!==n.current&&t?.(e,n.current),n.current=e},[])]}function i1(e){let t=(0,q.useRef)();return(0,q.useEffect)(()=>{t.current=e},[e]),t.current}var a1={};function o1(e,t){return(0,q.useMemo)(()=>{if(t)return t;let n=a1[e]==null?0:a1[e]+1;return a1[e]=n,e+`-`+n},[e,t])}function s1(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>{let r=Object.entries(n);for(let[n,i]of r){let r=t[n];r!=null&&(t[n]=r+e*i)}return t},{...t})}}var c1=s1(1),l1=s1(-1);function u1(e){return`clientX`in e&&`clientY`in e}function d1(e){if(!e)return!1;let{KeyboardEvent:t}=q$(e.target);return t&&e instanceof t}function f1(e){if(!e)return!1;let{TouchEvent:t}=q$(e.target);return t&&e instanceof t}function p1(e){if(f1(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return u1(e)?{x:e.clientX,y:e.clientY}:null}var m1=Object.freeze({Translate:{toString(e){if(!e)return;let{x:t,y:n}=e;return`translate3d(`+(t?Math.round(t):0)+`px, `+(n?Math.round(n):0)+`px, 0)`}},Scale:{toString(e){if(!e)return;let{scaleX:t,scaleY:n}=e;return`scaleX(`+t+`) scaleY(`+n+`)`}},Transform:{toString(e){if(e)return[m1.Translate.toString(e),m1.Scale.toString(e)].join(` `)}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+` `+n+`ms `+r}}}),h1=`a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]`;function g1(e){return e.matches(h1)?e:e.querySelector(h1)}var _1={display:`none`};function v1(e){let{id:t,value:n}=e;return q.createElement(`div`,{id:t,style:_1},n)}function y1(e){let{id:t,announcement:n,ariaLiveType:r=`assertive`}=e;return q.createElement(`div`,{id:t,style:{position:`fixed`,top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:`hidden`,clip:`rect(0 0 0 0)`,clipPath:`inset(100%)`,whiteSpace:`nowrap`},role:`status`,"aria-live":r,"aria-atomic":!0},n)}function b1(){let[e,t]=(0,q.useState)(``);return{announce:(0,q.useCallback)(e=>{e!=null&&t(e)},[]),announcement:e}}var x1=(0,q.createContext)(null);function S1(e){let t=(0,q.useContext)(x1);(0,q.useEffect)(()=>{if(!t)throw Error(`useDndMonitor must be used within a children of <DndContext>`);return t(e)},[e,t])}function C1(){let[e]=(0,q.useState)(()=>new Set),t=(0,q.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]);return[(0,q.useCallback)(t=>{let{type:n,event:r}=t;e.forEach(e=>e[n]?.call(e,r))},[e]),t]}var w1={draggable:`
|
|
318
318
|
To pick up a draggable item, press the space bar.
|
|
319
319
|
While dragging, use the arrow keys to move the item.
|
|
320
320
|
Press space again to drop the item in its new position, or press escape to cancel.
|
|
321
|
-
`},T1={onDragStart(e){let{active:t}=e;return`Picked up draggable item `+t.id+`.`},onDragOver(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was moved over droppable area `+n.id+`.`:`Draggable item `+t.id+` is no longer over a droppable area.`},onDragEnd(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was dropped over droppable area `+n.id:`Draggable item `+t.id+` was dropped.`},onDragCancel(e){let{active:t}=e;return`Dragging was cancelled. Draggable item `+t.id+` was dropped.`}};function E1(e){let{announcements:t=T1,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=w1}=e,{announce:a,announcement:o}=b1(),s=o1(`DndLiveRegion`),[c,l]=(0,q.useState)(!1);if((0,q.useEffect)(()=>{l(!0)},[]),S1((0,q.useMemo)(()=>({onDragStart(e){let{active:n}=e;a(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&a(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;a(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;a(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;a(t.onDragCancel({active:n,over:r}))}}),[a,t])),!c)return null;let u=q.createElement(q.Fragment,null,q.createElement(v1,{id:r,value:i.draggable}),q.createElement(y1,{id:s,announcement:o}));return n?(0,nc.createPortal)(u,n):u}var D1;(function(e){e.DragStart=`dragStart`,e.DragMove=`dragMove`,e.DragEnd=`dragEnd`,e.DragCancel=`dragCancel`,e.DragOver=`dragOver`,e.RegisterDroppable=`registerDroppable`,e.SetDroppableDisabled=`setDroppableDisabled`,e.UnregisterDroppable=`unregisterDroppable`})(D1||={});function O1(){}function k1(e,t){return(0,q.useMemo)(()=>({sensor:e,options:t??{}}),[e,t])}function A1(){var e=[...arguments];return(0,q.useMemo)(()=>[...e].filter(e=>e!=null),[...e])}var j1=Object.freeze({x:0,y:0});function M1(e,t){return Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2)}function N1(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function P1(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function F1(e){let{left:t,top:n,height:r,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+r},{x:t+i,y:n+r}]}function I1(e,t){if(!e||e.length===0)return null;let[n]=e;return t?n[t]:n}function L1(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}var R1=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=L1(t,t.left,t.top),a=[];for(let e of r){let{id:t}=e,r=n.get(t);if(r){let n=M1(L1(r),i);a.push({id:t,data:{droppableContainer:e,value:n}})}}return a.sort(N1)},z1=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=F1(t),a=[];for(let e of r){let{id:t}=e,r=n.get(t);if(r){let n=F1(r),o=i.reduce((e,t,r)=>e+M1(n[r],t),0),s=Number((o/4).toFixed(4));a.push({id:t,data:{droppableContainer:e,value:s}})}}return a.sort(N1)};function B1(e,t){let n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),o=i-r,s=a-n;if(r<i&&n<a){let n=t.width*t.height,r=e.width*e.height,i=o*s,a=i/(n+r-i);return Number(a.toFixed(4))}return 0}var V1=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=[];for(let e of r){let{id:r}=e,a=n.get(r);if(a){let n=B1(a,t);n>0&&i.push({id:r,data:{droppableContainer:e,value:n}})}}return i.sort(P1)};function H1(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function U1(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:j1}function W1(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}var G1=W1(1);function K1(e){if(e.startsWith(`matrix3d(`)){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith(`matrix(`)){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function q1(e,t,n){let r=K1(t);if(!r)return e;let{scaleX:i,scaleY:a,x:o,y:s}=r,c=e.left-o-(1-i)*parseFloat(n),l=e.top-s-(1-a)*parseFloat(n.slice(n.indexOf(` `)+1)),u=i?e.width/i:e.width,d=a?e.height/a:e.height;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c}}var J1={ignoreTransform:!1};function Y1(e,t){t===void 0&&(t=J1);let n=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:t,transformOrigin:r}=q$(e).getComputedStyle(e);t&&(n=q1(n,t,r))}let{top:r,left:i,width:a,height:o,bottom:s,right:c}=n;return{top:r,left:i,width:a,height:o,bottom:s,right:c}}function X1(e){return Y1(e,{ignoreTransform:!0})}function Z1(e){let t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function Q1(e,t){return t===void 0&&(t=q$(e).getComputedStyle(e)),t.position===`fixed`}function $1(e,t){t===void 0&&(t=q$(e).getComputedStyle(e));let n=/(auto|scroll|overlay)/;return[`overflow`,`overflowX`,`overflowY`].some(e=>{let r=t[e];return typeof r==`string`&&n.test(r)})}function e0(e,t){let n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(J$(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!Y$(i)||X$(i)||n.includes(i))return n;let a=q$(e).getComputedStyle(i);return i!==e&&$1(i,a)&&n.push(i),Q1(i,a)?n:r(i.parentNode)}return e?r(e):n}function t0(e){let[t]=e0(e,1);return t??null}function n0(e){return!W$||!e?null:G$(e)?e:K$(e)?J$(e)||e===Z$(e).scrollingElement?window:Y$(e)?e:null:null}function r0(e){return G$(e)?e.scrollX:e.scrollLeft}function i0(e){return G$(e)?e.scrollY:e.scrollTop}function a0(e){return{x:r0(e),y:i0(e)}}var o0;(function(e){e[e.Forward=1]=`Forward`,e[e.Backward=-1]=`Backward`})(o0||={});function s0(e){return!W$||!e?!1:e===document.scrollingElement}function c0(e){let t={x:0,y:0},n=s0(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}var l0={x:.2,y:.2};function u0(e,t,n,r,i){let{top:a,left:o,right:s,bottom:c}=n;r===void 0&&(r=10),i===void 0&&(i=l0);let{isTop:l,isBottom:u,isLeft:d,isRight:f}=c0(e),p={x:0,y:0},m={x:0,y:0},h={height:t.height*i.y,width:t.width*i.x};return!l&&a<=t.top+h.height?(p.y=o0.Backward,m.y=r*Math.abs((t.top+h.height-a)/h.height)):!u&&c>=t.bottom-h.height&&(p.y=o0.Forward,m.y=r*Math.abs((t.bottom-h.height-c)/h.height)),!f&&s>=t.right-h.width?(p.x=o0.Forward,m.x=r*Math.abs((t.right-h.width-s)/h.width)):!d&&o<=t.left+h.width&&(p.x=o0.Backward,m.x=r*Math.abs((t.left+h.width-o)/h.width)),{direction:p,speed:m}}function d0(e){if(e===document.scrollingElement){let{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}let{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function f0(e){return e.reduce((e,t)=>c1(e,a0(t)),j1)}function p0(e){return e.reduce((e,t)=>e+r0(t),0)}function m0(e){return e.reduce((e,t)=>e+i0(t),0)}function h0(e,t){if(t===void 0&&(t=Y1),!e)return;let{top:n,left:r,bottom:i,right:a}=t(e);t0(e)&&(i<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:`center`,inline:`center`})}var g0=[[`x`,[`left`,`right`],p0],[`y`,[`top`,`bottom`],m0]],_0=class{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;let n=e0(t),r=f0(n);this.rect={...e},this.width=e.width,this.height=e.height;for(let[e,t,i]of g0)for(let a of t)Object.defineProperty(this,a,{get:()=>{let t=i(n),o=r[e]-t;return this.rect[a]+o},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}},v0=class{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>this.target?.removeEventListener(...e))},this.target=e}add(e,t,n){var r;(r=this.target)==null||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}};function y0(e){let{EventTarget:t}=q$(e);return e instanceof t?e:Z$(e)}function b0(e,t){let n=Math.abs(e.x),r=Math.abs(e.y);return typeof t==`number`?Math.sqrt(n**2+r**2)>t:`x`in t&&`y`in t?n>t.x&&r>t.y:`x`in t?n>t.x:`y`in t&&r>t.y}var x0;(function(e){e.Click=`click`,e.DragStart=`dragstart`,e.Keydown=`keydown`,e.ContextMenu=`contextmenu`,e.Resize=`resize`,e.SelectionChange=`selectionchange`,e.VisibilityChange=`visibilitychange`})(x0||={});function S0(e){e.preventDefault()}function C0(e){e.stopPropagation()}var w0;(function(e){e.Space=`Space`,e.Down=`ArrowDown`,e.Right=`ArrowRight`,e.Left=`ArrowLeft`,e.Up=`ArrowUp`,e.Esc=`Escape`,e.Enter=`Enter`,e.Tab=`Tab`})(w0||={});var T0={start:[w0.Space,w0.Enter],cancel:[w0.Esc],end:[w0.Space,w0.Enter,w0.Tab]},E0=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case w0.Right:return{...n,x:n.x+25};case w0.Left:return{...n,x:n.x-25};case w0.Down:return{...n,y:n.y+25};case w0.Up:return{...n,y:n.y-25}}},D0=class{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;let{event:{target:t}}=e;this.props=e,this.listeners=new v0(Z$(t)),this.windowListeners=new v0(q$(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(x0.Resize,this.handleCancel),this.windowListeners.add(x0.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(x0.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&h0(n),t(j1)}handleKeyDown(e){if(d1(e)){let{active:t,context:n,options:r}=this.props,{keyboardCodes:i=T0,coordinateGetter:a=E0,scrollBehavior:o=`smooth`}=r,{code:s}=e;if(i.end.includes(s)){this.handleEnd(e);return}if(i.cancel.includes(s)){this.handleCancel(e);return}let{collisionRect:c}=n.current,l=c?{x:c.left,y:c.top}:j1;this.referenceCoordinates||=l;let u=a(e,{active:t,context:n.current,currentCoordinates:l});if(u){let t=l1(u,l),r={x:0,y:0},{scrollableAncestors:i}=n.current;for(let n of i){let i=e.code,{isTop:a,isRight:s,isLeft:c,isBottom:l,maxScroll:d,minScroll:f}=c0(n),p=d0(n),m={x:Math.min(i===w0.Right?p.right-p.width/2:p.right,Math.max(i===w0.Right?p.left:p.left+p.width/2,u.x)),y:Math.min(i===w0.Down?p.bottom-p.height/2:p.bottom,Math.max(i===w0.Down?p.top:p.top+p.height/2,u.y))},h=i===w0.Right&&!s||i===w0.Left&&!c,g=i===w0.Down&&!l||i===w0.Up&&!a;if(h&&m.x!==u.x){let e=n.scrollLeft+t.x,a=i===w0.Right&&e<=d.x||i===w0.Left&&e>=f.x;if(a&&!t.y){n.scrollTo({left:e,behavior:o});return}r.x=a?n.scrollLeft-e:i===w0.Right?n.scrollLeft-d.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:o});break}if(g&&m.y!==u.y){let e=n.scrollTop+t.y,a=i===w0.Down&&e<=d.y||i===w0.Up&&e>=f.y;if(a&&!t.x){n.scrollTo({top:e,behavior:o});return}r.y=a?n.scrollTop-e:i===w0.Down?n.scrollTop-d.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:o});break}}this.handleMove(e,c1(l1(u,this.referenceCoordinates),r))}}}handleMove(e,t){let{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){let{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){let{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}};D0.activators=[{eventName:`onKeyDown`,handler:(e,t,n)=>{let{keyboardCodes:r=T0,onActivation:i}=t,{active:a}=n,{code:o}=e.nativeEvent;if(r.start.includes(o)){let t=a.activatorNode.current;return t&&e.target!==t?!1:(e.preventDefault(),i?.({event:e.nativeEvent}),!0)}return!1}}];function O0(e){return!!(e&&`distance`in e)}function k0(e){return!!(e&&`delay`in e)}var A0=class{constructor(e,t,n){n===void 0&&(n=y0(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;let{event:r}=e,{target:i}=r;this.props=e,this.events=t,this.document=Z$(i),this.documentListeners=new v0(this.document),this.listeners=new v0(n),this.windowListeners=new v0(q$(i)),this.initialCoordinates=p1(r)??j1,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){let{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(x0.Resize,this.handleCancel),this.windowListeners.add(x0.DragStart,S0),this.windowListeners.add(x0.VisibilityChange,this.handleCancel),this.windowListeners.add(x0.ContextMenu,S0),this.documentListeners.add(x0.Keydown,this.handleKeydown),t){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(k0(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(O0(t)){this.handlePending(t);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){let{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){let{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(x0.Click,C0,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(x0.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){let{activated:t,initialCoordinates:n,props:r}=this,{onMove:i,options:{activationConstraint:a}}=r;if(!n)return;let o=p1(e)??j1,s=l1(n,o);if(!t&&a){if(O0(a)){if(a.tolerance!=null&&b0(s,a.tolerance))return this.handleCancel();if(b0(s,a.distance))return this.handleStart()}if(k0(a)&&b0(s,a.tolerance))return this.handleCancel();this.handlePending(a,s)}else e.cancelable&&e.preventDefault(),i(o)}handleEnd(){let{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){let{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===w0.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}},j0={cancel:{name:`pointercancel`},move:{name:`pointermove`},end:{name:`pointerup`}},M0=class extends A0{constructor(e){let{event:t}=e,n=Z$(t.target);super(e,j0,n)}};M0.activators=[{eventName:`onPointerDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];var N0={move:{name:`mousemove`},end:{name:`mouseup`}},P0;(function(e){e[e.RightClick=2]=`RightClick`})(P0||={});var F0=class extends A0{constructor(e){super(e,N0,Z$(e.event.target))}};F0.activators=[{eventName:`onMouseDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==P0.RightClick&&(r?.({event:n}),!0)}}];var I0={cancel:{name:`touchcancel`},move:{name:`touchmove`},end:{name:`touchend`}},L0=class extends A0{constructor(e){super(e,I0)}static setup(){return window.addEventListener(I0.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(I0.move.name,e)};function e(){}}};L0.activators=[{eventName:`onTouchStart`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t,{touches:i}=n;return i.length>1?!1:(r?.({event:n}),!0)}}];var R0;(function(e){e[e.Pointer=0]=`Pointer`,e[e.DraggableRect=1]=`DraggableRect`})(R0||={});var z0;(function(e){e[e.TreeOrder=0]=`TreeOrder`,e[e.ReversedTreeOrder=1]=`ReversedTreeOrder`})(z0||={});function B0(e){let{acceleration:t,activator:n=R0.Pointer,canScroll:r,draggingRect:i,enabled:a,interval:o=5,order:s=z0.TreeOrder,pointerCoordinates:c,scrollableAncestors:l,scrollableAncestorRects:u,delta:d,threshold:f}=e,p=H0({delta:d,disabled:!a}),[m,h]=e1(),g=(0,q.useRef)({x:0,y:0}),_=(0,q.useRef)({x:0,y:0}),v=(0,q.useMemo)(()=>{switch(n){case R0.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case R0.DraggableRect:return i}},[n,i,c]),y=(0,q.useRef)(null),b=(0,q.useCallback)(()=>{let e=y.current;if(!e)return;let t=g.current.x*_.current.x,n=g.current.y*_.current.y;e.scrollBy(t,n)},[]),x=(0,q.useMemo)(()=>s===z0.TreeOrder?[...l].reverse():l,[s,l]);(0,q.useEffect)(()=>{if(!a||!l.length||!v)h();else{for(let e of x){if(r?.(e)===!1)continue;let n=l.indexOf(e),i=u[n];if(!i)continue;let{direction:a,speed:s}=u0(e,i,v,t,f);for(let e of[`x`,`y`])p[e][a[e]]||(s[e]=0,a[e]=0);if(s.x>0||s.y>0){h(),y.current=e,m(b,o),g.current=s,_.current=a;return}}g.current={x:0,y:0},_.current={x:0,y:0},h()}},[t,b,r,h,a,o,JSON.stringify(v),JSON.stringify(p),m,l,x,u,JSON.stringify(f)])}var V0={x:{[o0.Backward]:!1,[o0.Forward]:!1},y:{[o0.Backward]:!1,[o0.Forward]:!1}};function H0(e){let{delta:t,disabled:n}=e,r=i1(t);return n1(e=>{if(n||!r||!e)return V0;let i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[o0.Backward]:e.x[o0.Backward]||i.x===-1,[o0.Forward]:e.x[o0.Forward]||i.x===1},y:{[o0.Backward]:e.y[o0.Backward]||i.y===-1,[o0.Forward]:e.y[o0.Forward]||i.y===1}}},[n,t,r])}function U0(e,t){let n=t==null?void 0:e.get(t),r=n?n.node.current:null;return n1(e=>t==null?null:r??e??null,[r,t])}function W0(e,t){return(0,q.useMemo)(()=>e.reduce((e,n)=>{let{sensor:r}=n,i=r.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}));return[...e,...i]},[]),[e,t])}var G0;(function(e){e[e.Always=0]=`Always`,e[e.BeforeDragging=1]=`BeforeDragging`,e[e.WhileDragging=2]=`WhileDragging`})(G0||={});var K0;(function(e){e.Optimized=`optimized`})(K0||={});var q0=new Map;function J0(e,t){let{dragging:n,dependencies:r,config:i}=t,[a,o]=(0,q.useState)(null),{frequency:s,measure:c,strategy:l}=i,u=(0,q.useRef)(e),d=g(),f=t1(d),p=(0,q.useCallback)(function(e){e===void 0&&(e=[]),!f.current&&o(t=>t===null?e:t.concat(e.filter(e=>!t.includes(e))))},[f]),m=(0,q.useRef)(null),h=n1(t=>{if(d&&!n)return q0;if(!t||t===q0||u.current!==e||a!=null){let t=new Map;for(let n of e){if(!n)continue;if(a&&a.length>0&&!a.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}let e=n.node.current,r=e?new _0(c(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t},[e,a,n,d,c]);return(0,q.useEffect)(()=>{u.current=e},[e]),(0,q.useEffect)(()=>{d||p()},[n,d]),(0,q.useEffect)(()=>{a&&a.length>0&&o(null)},[JSON.stringify(a)]),(0,q.useEffect)(()=>{d||typeof s!=`number`||m.current!==null||(m.current=setTimeout(()=>{p(),m.current=null},s))},[s,d,p,...r]),{droppableRects:h,measureDroppableContainers:p,measuringScheduled:a!=null};function g(){switch(l){case G0.Always:return!1;case G0.BeforeDragging:return n;default:return!n}}}function Y0(e,t){return n1(n=>e?n||(typeof t==`function`?t(e):e):null,[t,e])}function X0(e,t){return Y0(e,t)}function Z0(e){let{callback:t,disabled:n}=e,r=$$(t),i=(0,q.useMemo)(()=>{if(n||typeof window>`u`||window.MutationObserver===void 0)return;let{MutationObserver:e}=window;return new e(r)},[r,n]);return(0,q.useEffect)(()=>()=>i?.disconnect(),[i]),i}function Q0(e){let{callback:t,disabled:n}=e,r=$$(t),i=(0,q.useMemo)(()=>{if(n||typeof window>`u`||window.ResizeObserver===void 0)return;let{ResizeObserver:e}=window;return new e(r)},[n]);return(0,q.useEffect)(()=>()=>i?.disconnect(),[i]),i}function $0(e){return new _0(Y1(e),e)}function e2(e,t,n){t===void 0&&(t=$0);let[r,i]=(0,q.useState)(null);function a(){i(r=>{if(!e)return null;if(e.isConnected===!1)return r??n??null;let i=t(e);return JSON.stringify(r)===JSON.stringify(i)?r:i})}let o=Z0({callback(t){if(e)for(let n of t){let{type:t,target:r}=n;if(t===`childList`&&r instanceof HTMLElement&&r.contains(e)){a();break}}}}),s=Q0({callback:a});return Q$(()=>{a(),e?(s?.observe(e),o?.observe(document.body,{childList:!0,subtree:!0})):(s?.disconnect(),o?.disconnect())},[e]),r}function t2(e){return U1(e,Y0(e))}var n2=[];function r2(e){let t=(0,q.useRef)(e),n=n1(n=>e?n&&n!==n2&&e&&t.current&&e.parentNode===t.current.parentNode?n:e0(e):n2,[e]);return(0,q.useEffect)(()=>{t.current=e},[e]),n}function i2(e){let[t,n]=(0,q.useState)(null),r=(0,q.useRef)(e),i=(0,q.useCallback)(e=>{let t=n0(e.target);t&&n(e=>e?(e.set(t,a0(t)),new Map(e)):null)},[]);return(0,q.useEffect)(()=>{let t=r.current;if(e!==t){a(t);let o=e.map(e=>{let t=n0(e);return t?(t.addEventListener(`scroll`,i,{passive:!0}),[t,a0(t)]):null}).filter(e=>e!=null);n(o.length?new Map(o):null),r.current=e}return()=>{a(e),a(t)};function a(e){e.forEach(e=>{n0(e)?.removeEventListener(`scroll`,i)})}},[i,e]),(0,q.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>c1(e,t),j1):f0(e):j1,[e,t])}function a2(e,t){t===void 0&&(t=[]);let n=(0,q.useRef)(null);return(0,q.useEffect)(()=>{n.current=null},t),(0,q.useEffect)(()=>{let t=e!==j1;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?l1(e,n.current):j1}function o2(e){(0,q.useEffect)(()=>{if(!W$)return;let t=e.map(e=>{let{sensor:t}=e;return t.setup==null?void 0:t.setup()});return()=>{for(let e of t)e?.()}},e.map(e=>{let{sensor:t}=e;return t}))}function s2(e,t){return(0,q.useMemo)(()=>e.reduce((e,n)=>{let{eventName:r,handler:i}=n;return e[r]=e=>{i(e,t)},e},{}),[e,t])}function c2(e){return(0,q.useMemo)(()=>e?Z1(e):null,[e])}var l2=[];function u2(e,t){t===void 0&&(t=Y1);let[n]=e,r=c2(n?q$(n):null),[i,a]=(0,q.useState)(l2);function o(){a(()=>e.length?e.map(e=>s0(e)?r:new _0(t(e),e)):l2)}let s=Q0({callback:o});return Q$(()=>{s?.disconnect(),o(),e.forEach(e=>s?.observe(e))},[e]),i}function d2(e){if(!e)return null;if(e.children.length>1)return e;let t=e.children[0];return Y$(t)?t:e}function f2(e){let{measure:t}=e,[n,r]=(0,q.useState)(null),i=Q0({callback:(0,q.useCallback)(e=>{for(let{target:n}of e)if(Y$(n)){r(e=>{let r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t])}),[a,o]=r1((0,q.useCallback)(e=>{let n=d2(e);i?.disconnect(),n&&i?.observe(n),r(n?t(n):null)},[t,i]));return(0,q.useMemo)(()=>({nodeRef:a,rect:n,setRef:o}),[n,a,o])}var p2=[{sensor:M0,options:{}},{sensor:D0,options:{}}],m2={current:{}},h2={draggable:{measure:X1},droppable:{measure:X1,strategy:G0.WhileDragging,frequency:K0.Optimized},dragOverlay:{measure:Y1}},g2=class extends Map{get(e){return e==null?void 0:super.get(e)??void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){return this.get(e)?.node.current??void 0}},_2={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new g2,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:O1},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:h2,measureDroppableContainers:O1,windowRect:null,measuringScheduled:!1},v2={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:``},dispatch:O1,draggableNodes:new Map,over:null,measureDroppableContainers:O1},y2=(0,q.createContext)(v2),b2=(0,q.createContext)(_2);function x2(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new g2}}}function S2(e,t){switch(t.type){case D1.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case D1.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case D1.DragEnd:case D1.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case D1.RegisterDroppable:{let{element:n}=t,{id:r}=n,i=new g2(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case D1.SetDroppableDisabled:{let{id:n,key:r,disabled:i}=t,a=e.droppable.containers.get(n);if(!a||r!==a.key)return e;let o=new g2(e.droppable.containers);return o.set(n,{...a,disabled:i}),{...e,droppable:{...e.droppable,containers:o}}}case D1.UnregisterDroppable:{let{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;let a=new g2(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function C2(e){let{disabled:t}=e,{active:n,activatorEvent:r,draggableNodes:i}=(0,q.useContext)(y2),a=i1(r),o=i1(n?.id);return(0,q.useEffect)(()=>{if(!t&&!r&&a&&o!=null){if(!d1(a)||document.activeElement===a.target)return;let e=i.get(o);if(!e)return;let{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(let e of[t.current,n.current]){if(!e)continue;let t=g1(e);if(t){t.focus();break}}})}},[r,t,i,o,a]),null}function w2(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}function T2(e){return(0,q.useMemo)(()=>({draggable:{...h2.draggable,...e?.draggable},droppable:{...h2.droppable,...e?.droppable},dragOverlay:{...h2.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function E2(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e,a=(0,q.useRef)(!1),{x:o,y:s}=typeof i==`boolean`?{x:i,y:i}:i;Q$(()=>{if(!o&&!s||!t){a.current=!1;return}if(a.current||!r)return;let e=t?.node.current;if(!e||e.isConnected===!1)return;let i=U1(n(e),r);if(o||(i.x=0),s||(i.y=0),a.current=!0,Math.abs(i.x)>0||Math.abs(i.y)>0){let t=t0(e);t&&t.scrollBy({top:i.y,left:i.x})}},[t,o,s,r,n])}var D2=(0,q.createContext)({...j1,scaleX:1,scaleY:1}),O2;(function(e){e[e.Uninitialized=0]=`Uninitialized`,e[e.Initializing=1]=`Initializing`,e[e.Initialized=2]=`Initialized`})(O2||={});var k2=(0,q.memo)(function(e){let{id:t,accessibility:n,autoScroll:r=!0,children:i,sensors:a=p2,collisionDetection:o=V1,measuring:s,modifiers:c,...l}=e,[u,d]=(0,q.useReducer)(S2,void 0,x2),[f,p]=C1(),[m,h]=(0,q.useState)(O2.Uninitialized),g=m===O2.Initialized,{draggable:{active:_,nodes:v,translate:y},droppable:{containers:b}}=u,x=_==null?null:v.get(_),S=(0,q.useRef)({initial:null,translated:null}),C=(0,q.useMemo)(()=>_==null?null:{id:_,data:x?.data??m2,rect:S},[_,x]),w=(0,q.useRef)(null),[T,E]=(0,q.useState)(null),[D,O]=(0,q.useState)(null),k=t1(l,Object.values(l)),A=o1(`DndDescribedBy`,t),j=(0,q.useMemo)(()=>b.getEnabled(),[b]),M=T2(s),{droppableRects:N,measureDroppableContainers:P,measuringScheduled:ee}=J0(j,{dragging:g,dependencies:[y.x,y.y],config:M.droppable}),F=U0(v,_),I=(0,q.useMemo)(()=>D?p1(D):null,[D]),L=we(),te=X0(F,M.draggable.measure);E2({activeNode:_==null?null:v.get(_),config:L.layoutShiftCompensation,initialRect:te,measure:M.draggable.measure});let R=e2(F,M.draggable.measure,te),z=e2(F?F.parentElement:null),B=(0,q.useRef)({activatorEvent:null,active:null,activeNode:F,collisionRect:null,collisions:null,droppableRects:N,draggableNodes:v,draggingNode:null,draggingNodeRect:null,droppableContainers:b,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ne=b.getNodeFor(B.current.over?.id),re=f2({measure:M.dragOverlay.measure}),ie=re.nodeRef.current??F,ae=g?re.rect??R:null,oe=!!(re.nodeRef.current&&re.rect),V=t2(oe?null:R),se=c2(ie?q$(ie):null),H=r2(g?ne??F:null),ce=u2(H),le=w2(c,{transform:{x:y.x-V.x,y:y.y-V.y,scaleX:1,scaleY:1},activatorEvent:D,active:C,activeNodeRect:R,containerNodeRect:z,draggingNodeRect:ae,over:B.current.over,overlayNodeRect:re.rect,scrollableAncestors:H,scrollableAncestorRects:ce,windowRect:se}),U=I?c1(I,y):null,ue=i2(H),de=a2(ue),fe=a2(ue,[R]),pe=c1(le,de),me=ae?G1(ae,le):null,he=C&&me?o({active:C,collisionRect:me,droppableRects:N,droppableContainers:j,pointerCoordinates:U}):null,ge=I1(he,`id`),[_e,ve]=(0,q.useState)(null),ye=H1(oe?le:c1(le,fe),_e?.rect??null,R),be=(0,q.useRef)(null),xe=(0,q.useCallback)((e,t)=>{let{sensor:n,options:r}=t;if(w.current==null)return;let i=v.get(w.current);if(!i)return;let a=e.nativeEvent,o=new n({active:w.current,activeNode:i,event:a,options:r,context:B,onAbort(e){if(!v.get(e))return;let{onDragAbort:t}=k.current,n={id:e};t?.(n),f({type:`onDragAbort`,event:n})},onPending(e,t,n,r){if(!v.get(e))return;let{onDragPending:i}=k.current,a={id:e,constraint:t,initialCoordinates:n,offset:r};i?.(a),f({type:`onDragPending`,event:a})},onStart(e){let t=w.current;if(t==null)return;let n=v.get(t);if(!n)return;let{onDragStart:r}=k.current,i={activatorEvent:a,active:{id:t,data:n.data,rect:S}};(0,nc.unstable_batchedUpdates)(()=>{r?.(i),h(O2.Initializing),d({type:D1.DragStart,initialCoordinates:e,active:t}),f({type:`onDragStart`,event:i}),E(be.current),O(a)})},onMove(e){d({type:D1.DragMove,coordinates:e})},onEnd:s(D1.DragEnd),onCancel:s(D1.DragCancel)});be.current=o;function s(e){return async function(){let{active:t,collisions:n,over:r,scrollAdjustedTranslate:i}=B.current,o=null;if(t&&i){let{cancelDrop:s}=k.current;o={activatorEvent:a,active:t,collisions:n,delta:i,over:r},e===D1.DragEnd&&typeof s==`function`&&await Promise.resolve(s(o))&&(e=D1.DragCancel)}w.current=null,(0,nc.unstable_batchedUpdates)(()=>{d({type:e}),h(O2.Uninitialized),ve(null),E(null),O(null),be.current=null;let t=e===D1.DragEnd?`onDragEnd`:`onDragCancel`;if(o){let e=k.current[t];e?.(o),f({type:t,event:o})}})}}},[v]),W=W0(a,(0,q.useCallback)((e,t)=>(n,r)=>{let i=n.nativeEvent,a=v.get(r);if(w.current!==null||!a||i.dndKit||i.defaultPrevented)return;let o={active:a};e(n,t.options,o)===!0&&(i.dndKit={capturedBy:t.sensor},w.current=r,xe(n,t))},[v,xe]));o2(a),Q$(()=>{R&&m===O2.Initializing&&h(O2.Initialized)},[R,m]),(0,q.useEffect)(()=>{let{onDragMove:e}=k.current,{active:t,activatorEvent:n,collisions:r,over:i}=B.current;if(!t||!n)return;let a={active:t,activatorEvent:n,collisions:r,delta:{x:pe.x,y:pe.y},over:i};(0,nc.unstable_batchedUpdates)(()=>{e?.(a),f({type:`onDragMove`,event:a})})},[pe.x,pe.y]),(0,q.useEffect)(()=>{let{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:i}=B.current;if(!e||w.current==null||!t||!i)return;let{onDragOver:a}=k.current,o=r.get(ge),s=o&&o.rect.current?{id:o.id,rect:o.rect.current,data:o.data,disabled:o.disabled}:null,c={active:e,activatorEvent:t,collisions:n,delta:{x:i.x,y:i.y},over:s};(0,nc.unstable_batchedUpdates)(()=>{ve(s),a?.(c),f({type:`onDragOver`,event:c})})},[ge]),Q$(()=>{B.current={activatorEvent:D,active:C,activeNode:F,collisionRect:me,collisions:he,droppableRects:N,draggableNodes:v,draggingNode:ie,draggingNodeRect:ae,droppableContainers:b,over:_e,scrollableAncestors:H,scrollAdjustedTranslate:pe},S.current={initial:ae,translated:me}},[C,F,he,me,v,ie,ae,N,b,_e,H,pe]),B0({...L,delta:y,draggingRect:me,pointerCoordinates:U,scrollableAncestors:H,scrollableAncestorRects:ce});let Se=(0,q.useMemo)(()=>({active:C,activeNode:F,activeNodeRect:R,activatorEvent:D,collisions:he,containerNodeRect:z,dragOverlay:re,draggableNodes:v,droppableContainers:b,droppableRects:N,over:_e,measureDroppableContainers:P,scrollableAncestors:H,scrollableAncestorRects:ce,measuringConfiguration:M,measuringScheduled:ee,windowRect:se}),[C,F,R,D,he,z,re,v,b,N,_e,P,H,ce,M,ee,se]),Ce=(0,q.useMemo)(()=>({activatorEvent:D,activators:W,active:C,activeNodeRect:R,ariaDescribedById:{draggable:A},dispatch:d,draggableNodes:v,over:_e,measureDroppableContainers:P}),[D,W,C,R,d,A,v,_e,P]);return q.createElement(x1.Provider,{value:p},q.createElement(y2.Provider,{value:Ce},q.createElement(b2.Provider,{value:Se},q.createElement(D2.Provider,{value:ye},i)),q.createElement(C2,{disabled:n?.restoreFocus===!1})),q.createElement(E1,{...n,hiddenTextDescribedById:A}));function we(){let e=T?.autoScrollEnabled===!1,t=typeof r==`object`?r.enabled===!1:r===!1,n=g&&!e&&!t;return typeof r==`object`?{...r,enabled:n}:{enabled:n}}}),A2=(0,q.createContext)(null),j2=`button`,M2=`Draggable`;function N2(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e,a=o1(M2),{activators:o,activatorEvent:s,active:c,activeNodeRect:l,ariaDescribedById:u,draggableNodes:d,over:f}=(0,q.useContext)(y2),{role:p=j2,roleDescription:m=`draggable`,tabIndex:h=0}=i??{},g=c?.id===t,_=(0,q.useContext)(g?D2:A2),[v,y]=r1(),[b,x]=r1(),S=s2(o,t),C=t1(n);return Q$(()=>(d.set(t,{id:t,key:a,node:v,activatorNode:b,data:C}),()=>{let e=d.get(t);e&&e.key===a&&d.delete(t)}),[d,t]),{active:c,activatorEvent:s,activeNodeRect:l,attributes:(0,q.useMemo)(()=>({role:p,tabIndex:h,"aria-disabled":r,"aria-pressed":g&&p===j2?!0:void 0,"aria-roledescription":m,"aria-describedby":u.draggable}),[r,p,h,g,m,u.draggable]),isDragging:g,listeners:r?void 0:S,node:v,over:f,setNodeRef:y,setActivatorNodeRef:x,transform:_}}function P2(){return(0,q.useContext)(b2)}var F2=`Droppable`,I2={timeout:25};function L2(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e,a=o1(F2),{active:o,dispatch:s,over:c,measureDroppableContainers:l}=(0,q.useContext)(y2),u=(0,q.useRef)({disabled:n}),d=(0,q.useRef)(!1),f=(0,q.useRef)(null),p=(0,q.useRef)(null),{disabled:m,updateMeasurementsFor:h,timeout:g}={...I2,...i},_=t1(h??r),v=Q0({callback:(0,q.useCallback)(()=>{d.current?(p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{l(Array.isArray(_.current)?_.current:[_.current]),p.current=null},g)):d.current=!0},[g]),disabled:m||!o}),[y,b]=r1((0,q.useCallback)((e,t)=>{v&&(t&&(v.unobserve(t),d.current=!1),e&&v.observe(e))},[v])),x=t1(t);return(0,q.useEffect)(()=>{v&&y.current&&(v.disconnect(),d.current=!1,v.observe(y.current))},[y,v]),(0,q.useEffect)(()=>(s({type:D1.RegisterDroppable,element:{id:r,key:a,disabled:n,node:y,rect:f,data:x}}),()=>s({type:D1.UnregisterDroppable,key:a,id:r})),[r]),(0,q.useEffect)(()=>{n!==u.current.disabled&&(s({type:D1.SetDroppableDisabled,id:r,key:a,disabled:n}),u.current.disabled=n)},[r,a,n,s]),{active:o,rect:f,isOver:c?.id===r,node:y,over:c,setNodeRef:b}}function R2(e,t,n){let r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function z2(e,t){return e.reduce((e,n,r)=>{let i=t.get(n);return i&&(e[r]=i),e},Array(e.length))}function B2(e){return e!==null&&e>=0}function V2(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function H2(e){return typeof e==`boolean`?{draggable:e,droppable:e}:e}var U2=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e,a=R2(t,r,n),o=t[i],s=a[i];return!s||!o?null:{x:s.left-o.left,y:s.top-o.top,scaleX:s.width/o.width,scaleY:s.height/o.height}},W2={scaleX:1,scaleY:1},G2=e=>{let{activeIndex:t,activeNodeRect:n,index:r,rects:i,overIndex:a}=e,o=i[t]??n;if(!o)return null;if(r===t){let e=i[a];return e?{x:0,y:t<a?e.top+e.height-(o.top+o.height):e.top-o.top,...W2}:null}let s=K2(i,r,t);return r>t&&r<=a?{x:0,y:-o.height-s,...W2}:r<t&&r>=a?{x:0,y:o.height+s,...W2}:{x:0,y:0,...W2}};function K2(e,t,n){let r=e[t],i=e[t-1],a=e[t+1];return r?n<t?i?r.top-(i.top+i.height):a?a.top-(r.top+r.height):0:a?a.top-(r.top+r.height):i?r.top-(i.top+i.height):0:0}var q2=`Sortable`,J2=q.createContext({activeIndex:-1,containerId:q2,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:U2,disabled:{draggable:!1,droppable:!1}});function Y2(e){let{children:t,id:n,items:r,strategy:i=U2,disabled:a=!1}=e,{active:o,dragOverlay:s,droppableRects:c,over:l,measureDroppableContainers:u}=P2(),d=o1(q2,n),f=s.rect!==null,p=(0,q.useMemo)(()=>r.map(e=>typeof e==`object`&&`id`in e?e.id:e),[r]),m=o!=null,h=o?p.indexOf(o.id):-1,g=l?p.indexOf(l.id):-1,_=(0,q.useRef)(p),v=!V2(p,_.current),y=g!==-1&&h===-1||v,b=H2(a);Q$(()=>{v&&m&&u(p)},[v,p,m,u]),(0,q.useEffect)(()=>{_.current=p},[p]);let x=(0,q.useMemo)(()=>({activeIndex:h,containerId:d,disabled:b,disableTransforms:y,items:p,overIndex:g,useDragOverlay:f,sortedRects:z2(p,c),strategy:i}),[h,d,b.draggable,b.droppable,y,p,g,c,f,i]);return q.createElement(J2.Provider,{value:x},t)}var X2=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return R2(n,r,i).indexOf(t)},Z2=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:a,newIndex:o,previousItems:s,previousContainerId:c,transition:l}=e;return!l||!r||s!==a&&i===o?!1:n?!0:o!==i&&t===c},Q2={duration:200,easing:`ease`},$2=`transform`,e4=m1.Transition.toString({property:$2,duration:0,easing:`linear`}),t4={roleDescription:`sortable`};function n4(e){let{disabled:t,index:n,node:r,rect:i}=e,[a,o]=(0,q.useState)(null),s=(0,q.useRef)(n);return Q$(()=>{if(!t&&n!==s.current&&r.current){let e=i.current;if(e){let t=Y1(r.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&o(n)}}n!==s.current&&(s.current=n)},[t,n,r,i]),(0,q.useEffect)(()=>{a&&o(null)},[a]),a}function r4(e){let{animateLayoutChanges:t=Z2,attributes:n,disabled:r,data:i,getNewIndex:a=X2,id:o,strategy:s,resizeObserverConfig:c,transition:l=Q2}=e,{items:u,containerId:d,activeIndex:f,disabled:p,disableTransforms:m,sortedRects:h,overIndex:g,useDragOverlay:_,strategy:v}=(0,q.useContext)(J2),y=i4(r,p),b=u.indexOf(o),x=(0,q.useMemo)(()=>({sortable:{containerId:d,index:b,items:u},...i}),[d,i,b,u]),S=(0,q.useMemo)(()=>u.slice(u.indexOf(o)),[u,o]),{rect:C,node:w,isOver:T,setNodeRef:E}=L2({id:o,data:x,disabled:y.droppable,resizeObserverConfig:{updateMeasurementsFor:S,...c}}),{active:D,activatorEvent:O,activeNodeRect:k,attributes:A,setNodeRef:j,listeners:M,isDragging:N,over:P,setActivatorNodeRef:ee,transform:F}=N2({id:o,data:x,attributes:{...t4,...n},disabled:y.draggable}),I=U$(E,j),L=!!D,te=L&&!m&&B2(f)&&B2(g),R=!_&&N,z=te?(R&&te?F:null)??(s??v)({rects:h,activeNodeRect:k,activeIndex:f,overIndex:g,index:b}):null,B=B2(f)&&B2(g)?a({id:o,items:u,activeIndex:f,overIndex:g}):b,ne=D?.id,re=(0,q.useRef)({activeId:ne,items:u,newIndex:B,containerId:d}),ie=u!==re.current.items,ae=t({active:D,containerId:d,isDragging:N,isSorting:L,id:o,index:b,items:u,newIndex:re.current.newIndex,previousItems:re.current.items,previousContainerId:re.current.containerId,transition:l,wasDragging:re.current.activeId!=null}),oe=n4({disabled:!ae,index:b,node:w,rect:C});return(0,q.useEffect)(()=>{L&&re.current.newIndex!==B&&(re.current.newIndex=B),d!==re.current.containerId&&(re.current.containerId=d),u!==re.current.items&&(re.current.items=u)},[L,B,d,u]),(0,q.useEffect)(()=>{if(ne===re.current.activeId)return;if(ne!=null&&re.current.activeId==null){re.current.activeId=ne;return}let e=setTimeout(()=>{re.current.activeId=ne},50);return()=>clearTimeout(e)},[ne]),{active:D,activeIndex:f,attributes:A,data:x,rect:C,index:b,newIndex:B,items:u,isOver:T,isSorting:L,isDragging:N,listeners:M,node:w,overIndex:g,over:P,setNodeRef:I,setActivatorNodeRef:ee,setDroppableNodeRef:E,setDraggableNodeRef:j,transform:oe??z,transition:V()};function V(){if(oe||ie&&re.current.newIndex===b)return e4;if(!(R&&!d1(O)||!l)&&(L||ae))return m1.Transition.toString({...l,property:$2})}}function i4(e,t){return typeof e==`boolean`?{draggable:e,droppable:!1}:{draggable:e?.draggable??t.draggable,droppable:e?.droppable??t.droppable}}function a4(e){if(!e)return!1;let t=e.data.current;return!!(t&&`sortable`in t&&typeof t.sortable==`object`&&`containerId`in t.sortable&&`items`in t.sortable&&`index`in t.sortable)}var o4=[w0.Down,w0.Right,w0.Up,w0.Left],s4=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:i,droppableContainers:a,over:o,scrollableAncestors:s}}=t;if(o4.includes(e.code)){if(e.preventDefault(),!n||!r)return;let t=[];a.getEnabled().forEach(n=>{if(!n||n!=null&&n.disabled)return;let a=i.get(n.id);if(a)switch(e.code){case w0.Down:r.top<a.top&&t.push(n);break;case w0.Up:r.top>a.top&&t.push(n);break;case w0.Left:r.left>a.left&&t.push(n);break;case w0.Right:r.left<a.left&&t.push(n)}});let c=z1({active:n,collisionRect:r,droppableRects:i,droppableContainers:t,pointerCoordinates:null}),l=I1(c,`id`);if(l===o?.id&&c.length>1&&(l=c[1].id),l!=null){let e=a.get(n.id),t=a.get(l),o=t?i.get(t.id):null,c=t?.node.current;if(c&&o&&e&&t){let n=e0(c).some((e,t)=>s[t]!==e),i=c4(e,t),a=l4(e,t),l=n||!i?{x:0,y:0}:{x:a?r.width-o.width:0,y:a?r.height-o.height:0},u={x:o.left,y:o.top};return l.x&&l.y?u:l1(u,l)}}}};function c4(e,t){return!a4(e)||!a4(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function l4(e,t){return!a4(e)||!a4(t)||!c4(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}var u4={ready:`bg-card text-ink ring-cheng/45 hover:bg-cheng-bg`,incomplete:`bg-gold-bg text-gold-deep ring-gold-deep/30 hover:bg-gold-bg/70`,missing:`bg-seal-bg text-seal-deep ring-seal/35 hover:bg-seal-bg/70`},d4=e=>{if(!e)return`missing`;let t=ev.some(t=>!e.fields[t]);return e.blocking||t?`incomplete`:`ready`},f4=e=>[...new Set([...e.matchAll(/\[(T\d+)\]/g)].map(e=>e[1]))];function p4({id:e,size:t=`sm`,className:n=``}){return(0,J.jsx)(`span`,{className:[`inline-flex shrink-0 items-center rounded-sm bg-cheng font-mono font-bold tracking-wide text-white`,t===`md`?`px-2 py-1 text-sm`:`px-1.5 py-0.5 text-[0.7rem]`,n].filter(Boolean).join(` `),children:e})}function m4({id:e,card:t,onOpen:n}){return(0,J.jsxs)(`button`,{type:`button`,title:t?`Open the card of ${e}: ${t.name}`:`Open the card of ${e}`,onClick:()=>n(e),className:`group inline-flex cursor-pointer items-center gap-1.5 rounded-sm py-0.5 pr-1.5 pl-1 text-xs font-medium ring-1 ring-inset transition duration-150 hover:shadow-paper focus-visible:ring-2 focus-visible:ring-cheng/60 focus-visible:outline-none ${u4[d4(t)]}`,children:[(0,J.jsx)(p4,{id:e}),(0,J.jsx)(`span`,{className:`underline-offset-2 group-hover:underline group-hover:decoration-dotted`,children:t?.name??`no target card`}),(0,J.jsx)(Jd,{size:12,className:`shrink-0 text-ink-3 transition-colors group-hover:text-ink-2`,"aria-hidden":`true`})]})}function h4({text:e,targets:t,onOpen:n}){let r=f4(e);return r.length===0?null:(0,J.jsx)(`span`,{className:`flex flex-wrap gap-1`,children:r.map(e=>(0,J.jsx)(m4,{id:e,card:t.get(e),onOpen:n},e))})}function g4({bullet:e,doc:t,targets:n,onOpenTarget:r,onChange:i,onRemove:a}){let{attributes:o,listeners:s,setNodeRef:c,transform:l,transition:u,isDragging:d}=r4({id:String(e.line)}),f=f4(e.text);return(0,J.jsxs)(`li`,{ref:c,style:{transform:m1.Transform.toString(l),transition:u},className:`px-2 py-1.5 ${d?`rounded bg-warm opacity-60 shadow-paper`:``}`,children:[(0,J.jsxs)(`div`,{className:`flex items-start gap-1`,children:[(0,J.jsx)(`button`,{...o,...s,"aria-label":`Drag to reorder`,title:`Drag to reorder (Space to lift, arrows to move, Space to drop)`,className:`mt-1.5 shrink-0 cursor-grab rounded p-0.5 text-ink-3 transition-colors hover:bg-warm hover:text-ink-2 focus-visible:ring-2 focus-visible:ring-theme/40 focus-visible:outline-none active:cursor-grabbing`,children:(0,J.jsx)(Uf,{size:14,"aria-hidden":`true`})}),(0,J.jsx)(H$,{value:e.text,onChange:n=>i(Ey(t.text,e,n)),ariaLabel:`Bullet at line ${e.line}`,maxHeight:180}),(0,J.jsx)(`button`,{className:`${X(`danger`)} shrink-0 px-1.5 py-1`,title:`Delete this bullet`,"aria-label":`Delete this bullet`,onClick:a,children:(0,J.jsx)(Gp,{size:14,"aria-hidden":`true`})})]}),f.length>0||e.questionLines.length>0?(0,J.jsxs)(`div`,{className:`mt-1 flex flex-wrap gap-1 pl-6`,children:[e.questionLines.length>0?(0,J.jsxs)(Ny,{tone:`amber`,children:[e.questionLines.length,` open `,e.questionLines.length===1?`question`:`questions`]}):null,f.map(e=>(0,J.jsx)(m4,{id:e,card:n.get(e),onOpen:r},e))]}):null]})}function _4({name:e,help:t,doc:n,onOpenTarget:r,onChange:i,defaultOpen:a=!0}){let o=Gv(n.text,e),s=new Map(n.targets.map(e=>[e.id,e])),[c,l]=(0,q.useState)(null),[u,d]=(0,q.useState)(``),f=A1(k1(M0,{activationConstraint:{distance:6}}),k1(D0,{coordinateGetter:s4})),p=t=>{let{active:r,over:a}=t;if(!a||r.id===a.id)return;let s=o.findIndex(e=>String(e.line)===r.id),c=o.findIndex(e=>String(e.line)===a.id);s>=0&&c>=0&&i(ky(n.text,e,s,c))},m=()=>{u.trim()!==``&&(i(Dy(n.text,e,u)),d(``))};return(0,J.jsxs)(AG,{title:e,help:t,storage:t,defaultOpen:a,count:o.length,tone:`blue`,children:[o.length===0?(0,J.jsx)(jG,{text:`No bullet yet.`}):null,o.length>0?(0,J.jsx)(k2,{sensors:f,collisionDetection:R1,onDragEnd:p,children:(0,J.jsx)(Y2,{items:o.map(e=>String(e.line)),strategy:G2,children:(0,J.jsx)(`ul`,{className:`divide-y divide-line`,children:o.map(e=>(0,J.jsx)(g4,{bullet:e,doc:n,targets:s,onOpenTarget:r,onChange:i,onRemove:()=>l(e)},e.line))})})}):null,(0,J.jsxs)(`form`,{className:`flex items-end gap-1 border-t border-line bg-warm px-2 py-1.5`,onSubmit:e=>{e.preventDefault(),m()},children:[(0,J.jsx)(`input`,{value:u,onChange:e=>d(e.target.value),placeholder:`Write a bullet and press Enter`,"aria-label":`Add a bullet to ${e}`,className:`${Uy} w-full py-1`}),(0,J.jsxs)(`button`,{className:`${X()} shrink-0 gap-1 py-1`,disabled:u.trim()===``,children:[(0,J.jsx)(Zf,{size:14,"aria-hidden":`true`}),`Add`]})]}),c?(0,J.jsx)(Zy,{title:`Delete this bullet?`,onClose:()=>l(null),children:(0,J.jsxs)(`div`,{className:`space-y-3 text-sm`,children:[(0,J.jsx)(`p`,{className:`rounded border border-line bg-warm px-2 py-1.5 text-ink`,children:c.text}),c.questionLines.length>0?(0,J.jsxs)(`p`,{className:`rounded border border-seal/40 bg-seal-bg px-2 py-1.5 text-seal-deep`,children:[c.questionLines.length,` `,c.questionLines.length===1?`open question hangs`:`open questions hang`,` under this bullet and`,` `,c.questionLines.length===1?`is`:`are`,` deleted with it.`]}):null,(0,J.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,J.jsx)(`button`,{type:`button`,className:X(),onClick:()=>l(null),autoFocus:!0,children:`Cancel`}),(0,J.jsx)(`button`,{type:`button`,className:X(`stop`),onClick:()=>{i(Oy(n.text,c)),l(null)},children:`Delete bullet`})]})]})}):null]})}function v4(e,t,n){let r=e.position?.start.offset,i=e.position?.end.offset;if(r===void 0||i===void 0)return t.map(()=>null);let a=n.slice(r,i),o=[],s=0,c=0;for(let n of t){if(a===e.value)o.push(r+c);else{let e=a.indexOf(n.text,s);o.push(e===-1?null:r+e),e!==-1&&(s=e+n.text.length)}c+=n.text.length}return o}function y4(e,t){if(!e.children)return;let n=[];for(let r of e.children){if(r.type!==`text`||r.value===void 0){y4(r,t),n.push(r);continue}let e=u$(r.value),i=v4(r,e,t.source);e.forEach((e,r)=>{if(e.kind===null){n.push({type:`text`,value:e.text});return}let a=i[r],o=a===null?null:a+t.offset,s=o===null?null:o+e.text.length;n.push({type:`element`,tagName:`mark`,properties:{className:r$[e.kind].split(` `),dataKw:e.kind,...o!==null&&s!==null&&{dataKwFrom:o,dataKwTo:s}},children:[{type:`text`,value:e.text}]}),t.removable&&o!==null&&s!==null&&S$(t.fullText,o,s,e.kind)&&n.push({type:`element`,tagName:`button`,properties:{type:`button`,className:[`kw-remove`,`kw-remove-${e.kind}`],dataKwRemove:e.kind,dataKwFrom:o,dataKwTo:s,ariaLabel:d$[e.kind],title:d$[e.kind]},children:[]})})}e.children=n}function b4(e={}){return(t,n)=>{y4(t,{source:typeof n.value==`string`?n.value:``,offset:e.offset??0,fullText:e.fullText??``,removable:e.removable??!0})}}var x4=new Set([`p`,`h1`,`h2`,`h3`,`h4`,`h5`,`h6`,`pre`,`hr`,`tr`,`li`]),S4=new Set([`ul`,`ol`]),C4=(e,t)=>e.type===`element`&&t.has(e.tagName??``);function w4(e,t){for(let n of e.children??[]){if(n.position&&C4(n,x4)){let e=n.position.start.line,r=n.position.end.line,i=!0;if(n.tagName===`li`){let t=n.children??[];t.some(e=>C4(e,new Set([`p`])))&&(i=!1);let a=t.find(e=>C4(e,S4)&&e.position);a?.position&&(r=Math.max(e,a.position.start.line-1))}i&&(n.properties={...n.properties,dataLineStart:e+t,dataLineEnd:r+t})}w4(n,t)}}function T4(e={}){let t=e.offset??0;return e=>w4(e,t)}function E4({content:e,lineOffset:t=0,keywords:n,clickable:r=!1,className:i=``}){let a=[];return n&&a.push([b4,{offset:n.charOffset,fullText:n.fullText,removable:n.removable}]),a.push([T4,{offset:t}]),(0,J.jsx)(`div`,{className:`prose max-w-none prose-table:text-sm prose-code:before:content-none prose-code:after:content-none ${i}`,children:(0,J.jsx)(qE,{remarkPlugins:[mA],rehypePlugins:a,components:{button:({node:e,children:t,...n})=>(0,J.jsx)(`button`,{...n,children:(0,J.jsx)(n$,{})}),p:({node:e,children:t,...n})=>(0,J.jsx)(`p`,{...n,className:`-mx-1 rounded px-1 ${r?`hover:bg-warm`:``}`,children:t})},children:e})})}function D4({body:e,line:t,onRevealLine:n}){return(0,J.jsx)(`div`,{className:`px-3 py-2 text-sm ${n?`cursor-pointer`:``}`,title:n?`Click a paragraph to edit it in the source`:void 0,onClick:n?e=>{let t=e.target;if(t.closest(`a`))return;let r=t.closest(`[data-line-start]`);if(!r)return;let i=Number(r.getAttribute(`data-line-start`));Number.isInteger(i)&&n(i)}:void 0,children:(0,J.jsx)(E4,{content:e,lineOffset:t-1,keywords:{charOffset:0,fullText:``,removable:!1},clickable:!!n})})}function O4({name:e,help:t,doc:n,onRevealLine:r}){let i=Wv(n.text,e);return i?(0,J.jsx)(AG,{title:e,help:t,storage:t,defaultOpen:!1,children:(0,J.jsx)(D4,{body:i.body,line:i.line,onRevealLine:r})}):null}function k4({doc:e}){let t=Wv(e.text,`Source`);return t?(0,J.jsxs)(AG,{title:`Source`,help:`source`,storage:`source`,defaultOpen:!1,children:[(0,J.jsx)(`p`,{className:`px-3 pt-2 text-xs text-ink-3`,children:`Original notes, verbatim. Do not edit this table; it only exists so a reviewer can check what became of each line.`}),(0,J.jsx)(D4,{body:t.body,line:t.line})]}):null}function A4({label:e,values:t,options:n,onChange:r,placeholder:i,allowNew:a=!0,keepOne:o=!1,keepOneHint:s=`At least one value is needed; add another one first.`,emptyText:c=`Nothing matches.`}){let[l,u]=(0,q.useState)(``),[d,f]=(0,q.useState)(!1),[p,m]=(0,q.useState)(null),[h,g]=(0,q.useState)(0),_=(0,q.useRef)(null),v=(0,q.useRef)(null),y=(0,q.useRef)(null),b=(0,q.useId)(),x=l.trim().toLowerCase(),S=n.filter(e=>!t.includes(e)),C=(x===``?S:S.filter(e=>e.includes(x))).slice(0,8).map(e=>({value:e,isNew:!1})),w=l.trim(),T=a&&w!==``&&q_.test(w)&&!t.includes(w)&&!n.includes(w)?[...C,{value:w,isNew:!0}]:C,E=p!==null,D=E&&(T.length>0||w!==``);(0,q.useEffect)(()=>{g(0)},[l,t.length]),(0,q.useEffect)(()=>{if(!p)return;let e=e=>{let t=e.target;_.current?.contains(t)||y.current?.contains(t)||m(null)},t=e=>{e.key===`Escape`&&m(null)},n=()=>m(null);return window.addEventListener(`mousedown`,e),window.addEventListener(`keydown`,t),window.addEventListener(`resize`,n),window.addEventListener(`scroll`,n,!0),()=>{window.removeEventListener(`mousedown`,e),window.removeEventListener(`keydown`,t),window.removeEventListener(`resize`,n),window.removeEventListener(`scroll`,n,!0)}},[p]);let O=()=>{if(p)return;let e=_.current?.getBoundingClientRect();e&&m({left:e.left,top:e.bottom+4,width:Math.max(e.width,224)})},k=e=>{let i=e.split(`,`).map(e=>e.trim()).filter(e=>e!==``),o=[...t],s=[];for(let e of i)n.includes(e)||a&&q_.test(e)?o.includes(e)||o.push(e):s.push(e);return o.length!==t.length&&r(o),s.join(`, `)},A=e=>{t.includes(e)||r([...t,e]),u(``),f(!1),O()},j=()=>{if(D&&T.length>0){A(T[Math.min(h,T.length-1)].value);return}let e=k(l);u(e),f(e!==``)},M=e=>{let t=e.lastIndexOf(`,`);if(t===-1){u(e),f(!1),O();return}let n=k(e.slice(0,t)),r=e.slice(t+1).trimStart();u(n===``?r:`${n}, ${r}`),f(n!==``)},N=e=>r(t.filter(t=>t!==e));return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`div`,{ref:_,onClick:e=>{e.target===e.currentTarget&&v.current?.focus()},className:[`flex min-h-8 flex-wrap items-center gap-1 rounded border bg-white px-1.5 py-1 transition-colors`,d?`border-seal focus-within:border-seal focus-within:ring-2 focus-within:ring-seal/25`:`border-line-mid focus-within:border-theme focus-within:ring-2 focus-within:ring-theme/25`].join(` `),children:[t.map(e=>{let n=o&&t.length===1;return(0,J.jsxs)(`span`,{title:n?s:void 0,className:`inline-flex h-6 items-center gap-0.5 rounded-sm bg-warm pr-0.5 pl-1.5 font-mono text-xs text-ink-2 ring-1 ring-line-mid ring-inset`,children:[e,(0,J.jsx)(`button`,{type:`button`,"aria-label":`Remove ${e}`,title:n?void 0:`Remove ${e}`,disabled:n,onClick:()=>N(e),className:`rounded p-0.5 text-ink-3 transition-colors hover:text-seal-deep focus-visible:ring-2 focus-visible:ring-theme/40 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-40`,children:(0,J.jsx)(Gp,{size:12,"aria-hidden":`true`})})]},e)}),(0,J.jsx)(`input`,{ref:v,value:l,role:`combobox`,"aria-label":e,"aria-autocomplete":`list`,"aria-expanded":D,"aria-controls":b,"aria-activedescendant":D&&T.length>0?`${b}-${Math.min(h,T.length-1)}`:void 0,"aria-invalid":d||void 0,autoComplete:`off`,spellCheck:!1,placeholder:i,onChange:e=>M(e.target.value),onFocus:O,onKeyDown:e=>{if(e.key===`ArrowDown`||e.key===`ArrowUp`){if(e.preventDefault(),!E){O();return}if(T.length===0)return;g(t=>(t+(e.key===`ArrowDown`?1:-1)+T.length)%T.length)}else if(e.key===`Enter`)e.preventDefault(),j();else if(e.key===`,`){e.preventDefault();let t=k(l);u(t),f(t!==``),O()}else e.key===`Escape`?E?(e.preventDefault(),m(null)):l!==``&&(e.preventDefault(),u(``),f(!1)):e.key===`Backspace`&&l===``&&t.length>0&&!(o&&t.length===1)&&(e.preventDefault(),N(t[t.length-1]))},onBlur:()=>{if(m(null),l!==``){let e=l.trim();n.includes(e)&&!t.includes(e)&&r([...t,e]),u(``),f(!1)}},className:`h-6 min-w-[6rem] flex-1 bg-transparent font-mono text-xs text-ink placeholder:text-ink-3 focus:outline-none`})]}),D&&p?(0,nc.createPortal)((0,J.jsx)(`div`,{ref:y,id:b,role:`listbox`,"aria-label":e,style:{left:p.left,top:p.top,width:p.width},className:`card-popup fixed z-50 max-h-56 overflow-auto p-1`,children:T.length===0?(0,J.jsx)(`p`,{className:`px-2 py-1 text-xs text-ink-3`,children:c}):T.map((e,t)=>(0,J.jsxs)(`button`,{type:`button`,id:`${b}-${t}`,role:`option`,"aria-selected":t===Math.min(h,T.length-1),onMouseDown:e=>e.preventDefault(),onClick:()=>A(e.value),onMouseEnter:()=>g(t),className:[`flex w-full items-center gap-2 rounded-sm px-2 py-1 text-left font-mono text-xs transition-colors`,t===Math.min(h,T.length-1)?`bg-theme-bg text-theme-ink`:`text-ink`].join(` `),children:[(0,J.jsx)(`span`,{className:`truncate`,children:e.value}),e.isNew?(0,J.jsx)(`span`,{className:`ml-auto shrink-0 font-sans text-[0.7rem] text-ink-3`,children:`new`}):null]},`${e.isNew?`new`:`known`}:${e.value}`))}),document.body):null]})}function j4({label:e,envs:t,selected:n,onChange:r,blockedHint:i,keepOne:a=!1,keepOneHint:o=`At least one environment is needed.`}){let s=n.filter(e=>!t.includes(e)),c=e=>{if(n.includes(e)){if(a&&n.length<=1)return;r(n.filter(t=>t!==e))}else r([...n,e])};return(0,J.jsxs)(`span`,{role:`group`,"aria-label":e,className:`flex flex-wrap items-center gap-1`,children:[t.map(e=>{let t=n.includes(e),r=t&&a&&n.length<=1;return(0,J.jsxs)(`button`,{type:`button`,"aria-pressed":t,title:r?o:void 0,onClick:()=>c(e),className:[`inline-flex h-6 items-center gap-1 rounded-sm px-1.5 text-xs font-bold tracking-wider transition-colors`,`focus-visible:ring-2 focus-visible:ring-theme/40 focus-visible:outline-none`,t?Py(e):`bg-card text-ink-2 ring-1 ring-line-mid ring-inset hover:bg-warm hover:text-ink`,r?`cursor-not-allowed`:`cursor-pointer`].join(` `),children:[t?(0,J.jsx)(uu,{size:12,"aria-hidden":`true`}):null,e.toUpperCase()]},e)}),s.map(e=>(0,J.jsx)(`button`,{type:`button`,"aria-pressed":!0,title:i?.(e),onClick:()=>r(n.filter(t=>t!==e)),className:`inline-flex h-6 items-center gap-1 rounded-sm bg-seal-bg px-1.5 text-xs font-bold tracking-wider text-seal-deep ring-1 ring-seal/35 ring-inset transition-colors hover:bg-seal/15 focus-visible:ring-2 focus-visible:ring-seal/40 focus-visible:outline-none`,children:e.toUpperCase()},`blocked:${e}`))]})}var M4=new Set([`id`,`title`,`login`,`suites`,`writes`,`writes-note`,`envs`]),N4=e=>Array.isArray(e)?e.filter(e=>typeof e==`string`):[];function P4({doc:e,onChange:t,caseId:n,envs:r,suites:i}){let a=e.frontMatter;if(!a)return(0,J.jsx)(AG,{title:`Case settings`,help:`settings`,storage:`settings`,children:(0,J.jsx)(jG,{text:`This case has no front matter block. Add it in the source.`})});if(a.problem)return(0,J.jsx)(AG,{title:`Case settings`,help:`settings`,storage:`settings`,children:(0,J.jsxs)(`p`,{className:`flex items-start gap-1.5 px-3 py-2 text-sm text-seal-deep`,children:[(0,J.jsx)(Ml,{size:14,className:`mt-0.5 shrink-0`,"aria-hidden":`true`}),a.problem,` Fix it in the source; the form cannot read the keys.`]})});let o=a.data,s=typeof o.title==`string`?o.title:``,c=o.login===`none`?`none`:`required`,l=o.suites===void 0?o.priority===void 0?[]:[String(o.priority)]:N4(o.suites),u=N4(o.writes),d=o.envs===void 0?null:N4(o.envs),f=d===null?r:r.filter(e=>d.includes(e)),p=typeof o[`writes-note`]==`string`?o[`writes-note`]:``,m=Zv(n,o,r,`this case`).map(e=>e.replace(/^this case: /,``)),h=a.entries.filter(e=>!M4.has(e.key)),g=(n,r)=>t(Cy(e.text,n,r)),_=n=>{let r=Cy(e.text,`writes`,n);t(n.length>0&&o[`writes-note`]===void 0?Cy(r,`writes-note`,``):r)},v=n=>r.every(e=>n.includes(e))?t(wy(e.text,`envs`)):g(`envs`,r.filter(e=>n.includes(e))),y=`flex items-start gap-1 font-mono text-xs leading-snug text-ink-3`,b=`grid grid-cols-[8.5rem_1fr] items-start gap-2 border-t border-line px-3 py-2 first:border-t-0`,x=`text-xs text-ink-3`;return(0,J.jsx)(AG,{title:`Case settings`,help:`settings`,storage:`settings`,tone:m.length>0?`red`:`gray`,count:m.length>0?m.length:void 0,children:(0,J.jsxs)(`div`,{children:[m.length>0?(0,J.jsxs)(`p`,{className:`flex items-start gap-1.5 border-b border-seal/40 bg-seal-bg px-3 py-1.5 text-xs text-seal-deep`,children:[(0,J.jsx)(Ml,{size:14,className:`mt-0.5 shrink-0`,"aria-hidden":`true`}),m[0]]}):null,(0,J.jsxs)(`div`,{className:b,children:[(0,J.jsxs)(`span`,{className:y,children:[`id`,(0,J.jsx)(kG,{help:`field.id`})]}),(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-sm`,children:[(0,J.jsx)(`code`,{className:`font-mono`,children:n}),(0,J.jsx)(`span`,{className:`text-xs text-ink-3`,children:`rename or move it from the menu at the end of the tab strip`})]})]}),(0,J.jsxs)(`div`,{className:b,children:[(0,J.jsxs)(`span`,{className:y,children:[`title`,(0,J.jsx)(kG,{help:`field.title`})]}),(0,J.jsx)(H$,{value:s,onChange:e=>g(`title`,e),ariaLabel:`title`,placeholder:`One line: what this case proves`,singleLine:!0,maxHeight:80})]}),(0,J.jsxs)(`div`,{className:b,children:[(0,J.jsxs)(`span`,{className:y,children:[`login`,(0,J.jsx)(kG,{help:`field.login`})]}),(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,J.jsx)(`span`,{className:`flex overflow-hidden rounded ring-1 ring-line-mid`,children:[`required`,`none`].map(e=>(0,J.jsx)(`button`,{type:`button`,"aria-pressed":c===e,onClick:()=>g(`login`,e),className:`px-3 py-0.5 text-xs ${c===e?`bg-theme-btn text-white`:`bg-card text-ink-2 hover:bg-warm`}`,children:e},e))}),(0,J.jsx)(`span`,{className:`text-xs text-ink-3`,children:`none = public page, no saved session`})]})]}),(0,J.jsxs)(`div`,{className:b,children:[(0,J.jsxs)(`span`,{className:y,children:[`runs in`,(0,J.jsx)(kG,{help:`field.runs-in`})]}),(0,J.jsxs)(`div`,{className:`space-y-1`,children:[(0,J.jsx)(j4,{label:`runs in`,envs:r,selected:f,onChange:v,keepOne:!0,keepOneHint:`A case runs in at least one environment; press another one first.`}),(0,J.jsx)(`p`,{className:x,children:`All pressed means every environment, including ones added later.`})]})]}),(0,J.jsxs)(`div`,{className:b,children:[(0,J.jsxs)(`span`,{className:y,children:[`suites`,(0,J.jsx)(kG,{help:`field.suites`})]}),(0,J.jsxs)(`div`,{className:`space-y-1`,children:[(0,J.jsx)(A4,{label:`suites`,values:l,options:i,onChange:e=>g(`suites`,e),placeholder:`Add a suite…`,keepOne:!0,keepOneHint:`A case needs at least one suite; add another one first.`,emptyText:`No suite matches; a name uses lowercase letters, digits and dashes.`}),(0,J.jsx)(`p`,{className:x,children:`The case runs in every suite it lists.`})]})]}),(0,J.jsxs)(`div`,{className:b,children:[(0,J.jsxs)(`span`,{className:y,children:[`writes data in`,(0,J.jsx)(kG,{help:`field.writes`})]}),(0,J.jsxs)(`div`,{className:`space-y-1`,children:[(0,J.jsx)(j4,{label:`writes data in`,envs:f,selected:u,onChange:_,blockedHint:e=>`The case does not run in ${e}: press it under "runs in", or click to remove it here.`}),(0,J.jsx)(`p`,{className:x,children:`Nothing pressed means read-only: the case changes no test data.`})]})]}),u.length>0?(0,J.jsxs)(`div`,{className:b,children:[(0,J.jsxs)(`span`,{className:y,children:[`what it changes`,(0,J.jsx)(`span`,{className:`text-seal-deep`,children:`*`}),(0,J.jsx)(kG,{help:`field.writes-note`})]}),(0,J.jsxs)(`div`,{children:[(0,J.jsx)(H$,{value:p,onChange:e=>g(`writes-note`,e),ariaLabel:`writes-note`,placeholder:`What the case creates or changes, e.g. one [asrun] draft with the run stamp, deleted at the end.`,maxHeight:160}),(0,J.jsx)(`p`,{className:`mt-0.5 text-xs text-ink-3`,children:`Required once a write environment is pressed. Whoever confirms a run that writes data reads this first.`})]})]}):null,h.length>0?(0,J.jsxs)(`div`,{className:b,children:[(0,J.jsx)(`span`,{className:y,children:`other keys`}),(0,J.jsx)(`ul`,{className:`space-y-0.5`,children:h.map(e=>(0,J.jsxs)(`li`,{className:`font-mono text-xs text-ink-3`,children:[e.key,`: `,(0,J.jsx)(`span`,{className:`text-ink-2`,children:String(e.value)})]},e.key))})]}):null]})})}var F4=[`what`,`where`,`identified by`,`not`,`ready when`],I4={what:`What`,where:`Where`,"identified by":`Identified by`,not:`Not`,"ready when":`Ready when`},L4=e=>I4[e]??e,R4=e=>[...F4,...Object.keys(e.fields).filter(e=>!F4.includes(e))].filter(t=>e.fields[t]).map(t=>({label:L4(t),value:e.fields[t]}));function z4({profile:e,file:t,alt:n}){let[r,i]=(0,q.useState)(!1),a=bH(t);return(0,J.jsxs)(`figure`,{className:`min-w-0 space-y-1`,children:[(0,J.jsxs)(`figcaption`,{className:`text-xs text-ink-2`,children:[`Reference `,e,(0,J.jsx)(`span`,{className:`mt-0.5 block font-mono break-all text-[0.7rem] text-ink-3`,children:t})]}),a===null?null:r?(0,J.jsx)(`p`,{className:`rounded-sm border border-gold-deep/40 bg-gold-bg px-2 py-1 text-xs text-gold-deep`,children:`This screenshot is not on this machine (a fresh checkout has none).`}):(0,J.jsx)(`a`,{href:a,target:`_blank`,rel:`noreferrer`,className:`block`,title:`Open the screenshot at full size`,children:(0,J.jsx)(`img`,{src:a,alt:n,onError:()=>i(!0),className:`max-h-72 w-auto rounded-sm border border-line-mid bg-white object-contain`})})]})}function B4({id:e,card:t,onClose:n,onRevealLine:r}){let i=t?ev.filter(e=>!t.fields[e]):[],a=Object.entries(t?.references??{});return(0,J.jsx)(Zy,{wide:!0,title:(0,J.jsxs)(`span`,{className:`flex flex-wrap items-center gap-2`,children:[(0,J.jsx)(p4,{id:e,size:`md`}),(0,J.jsx)(`span`,{children:t?t.name===``?`unnamed target`:t.name:`no target card`})]}),onClose:n,footer:(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center justify-end gap-2`,children:[t?(0,J.jsx)(`button`,{type:`button`,className:X(),title:`Open this card in the editor to edit it`,onClick:()=>{r(t.line),n()},children:`Open in editor`}):null,(0,J.jsx)(`button`,{type:`button`,className:X(`primary`),onClick:n,autoFocus:!0,children:`Close`})]}),children:t?(0,J.jsxs)(`div`,{className:`space-y-4 text-sm`,children:[t.blocking||i.length>0?(0,J.jsxs)(`div`,{className:`flex flex-wrap gap-1.5`,children:[t.blocking?(0,J.jsx)(Ny,{tone:`red`,children:`an open question blocks this card`}):null,i.length>0?(0,J.jsxs)(Ny,{tone:`amber`,children:[`missing `,i.map(L4).join(`, `)]}):null]}):null,(0,J.jsx)(`dl`,{className:`grid grid-cols-[7rem_1fr] gap-x-3 gap-y-2`,children:R4(t).map(({label:e,value:t})=>(0,J.jsxs)(q.Fragment,{children:[(0,J.jsx)(`dt`,{className:`font-medium text-ink-2`,children:e}),(0,J.jsx)(`dd`,{className:e===`Not`?`text-seal-deep`:`text-ink`,children:(0,J.jsx)(DG,{text:t})})]},e))}),a.length===0?(0,J.jsx)(`p`,{className:`rounded-sm border border-gold-deep/40 bg-gold-bg px-2 py-1.5 text-xs text-gold-deep`,children:`No reference screenshot yet: nobody has looked at this element on a page.`}):(0,J.jsx)(`div`,{className:`grid grid-cols-1 gap-3 md:grid-cols-2`,children:a.map(([e,n])=>(0,J.jsx)(z4,{profile:e,file:n,alt:`What ${t.id} looks like on ${e}`},e))})]}):(0,J.jsxs)(`p`,{className:`text-sm text-seal-deep`,children:[`Nothing under Targets has the id `,e,`. Add the card, or remove the reference from the check that uses it.`]})})}function V4({doc:e,onChange:t,onRevealRange:n}){let r=e.questions.filter(e=>e.kind===`blocking`).length;return(0,J.jsx)(AG,{title:`Open questions`,count:e.questions.length,tone:r>0?`red`:`amber`,help:`questions`,children:e.questions.length===0?(0,J.jsx)(jG,{text:`No open question: every sentence of this case is confirmed.`}):(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`p`,{className:`border-b border-line bg-warm px-3 py-1.5 text-xs leading-5 text-ink-2`,children:[(0,J.jsx)(`span`,{className:`font-medium text-seal-deep`,children:`Must answer`}),` stops the spec until you answer.`,` `,(0,J.jsx)(`span`,{className:`font-medium text-gold-deep`,children:`Optional`}),`: the case text stays as it is unless you write an answer.`]}),(0,J.jsx)(`ul`,{className:`divide-y divide-line`,children:e.questions.map((r,i)=>(0,J.jsx)(U4,{question:r,doc:e,onChange:t,onRevealRange:n},`${r.line}-${i}`))})]})})}function H4({text:e,label:t,className:n=``,onJump:r}){return(0,J.jsxs)(`div`,{role:`button`,tabIndex:0,title:t,"aria-label":t,onClick:e=>{e.target.closest(`a`)||window.getSelection()?.isCollapsed!==!1&&r()},onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),r())},className:`group flex cursor-pointer items-start gap-1 rounded-sm px-1 transition-colors hover:bg-card/70 focus-visible:ring-2 focus-visible:ring-theme/40 focus-visible:outline-none ${n}`,children:[(0,J.jsx)(`span`,{className:`min-w-0 flex-1`,children:(0,J.jsx)(DG,{text:e})}),(0,J.jsx)(Jl,{size:12,className:`mt-0.5 shrink-0 text-ink-3 opacity-40 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100`,"aria-hidden":`true`})]})}function U4({question:e,doc:t,onChange:n,onRevealRange:r}){let i=e.kind===`blocking`,a=e.answer!==``,[o,s]=(0,q.useState)(!1),c=e.parent,l=()=>n(iy(t.text,e));return(0,J.jsxs)(`li`,{className:`px-3 py-3`,children:[(0,J.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-2`,children:[c?(0,J.jsx)(`span`,{className:`text-[11px] font-semibold tracking-wider text-ink-3 uppercase`,children:`The case says`}):null,(0,J.jsxs)(`span`,{className:`ml-auto text-xs text-ink-3`,children:[e.section||`the case`,` · line `,e.line]})]}),c?(0,J.jsx)(`div`,{className:`mt-1 rounded-sm border border-line bg-warm px-2 py-1.5`,children:(0,J.jsx)(H4,{text:c.text,label:`Show the case text above in the source editor`,className:`text-sm text-ink`,onJump:()=>r(c.from,Math.max(c.from,e.blockRange.start-1))})}):(0,J.jsxs)(`p`,{className:`mt-1 flex items-start gap-1.5 rounded-sm border border-seal/40 bg-seal-bg px-2 py-1.5 text-xs text-seal-deep`,children:[(0,J.jsx)(Ml,{size:14,className:`mt-0.5 shrink-0`,"aria-hidden":`true`}),`This question has nothing above it in the case. Keep is off: deleting the block here would delete what it stands for. Fix the case in the source.`]}),(0,J.jsxs)(`div`,{className:`mt-2 rounded-sm border-l-4 px-2 py-1.5 ${i?`border-seal bg-seal-bg/35`:`border-gold bg-gold-bg/35`}`,children:[(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,J.jsx)(Ny,{tone:i?`red`:`amber`,children:i?`Must answer`:`Optional`}),a?(0,J.jsx)(Ny,{tone:`green`,children:`Answered`}):null]}),(0,J.jsx)(H4,{text:e.question,label:`Show this question in the source editor`,className:`mt-1 text-sm font-medium text-ink`,onJump:()=>r(e.blockRange.start,e.region.end)}),e.evidence?(0,J.jsx)(`p`,{className:`mt-0.5 text-xs text-ink-3`,children:(0,J.jsx)(DG,{text:e.evidence})}):null]}),(0,J.jsxs)(`div`,{className:`mt-2 flex flex-wrap items-center gap-2`,children:[c!==null&&!a?(0,J.jsxs)(`button`,{className:`${X(`success`)} gap-1 py-1`,title:`Keeps this text and deletes the question block`,onClick:l,children:[(0,J.jsx)(uu,{size:14,"aria-hidden":`true`}),`Keep what the case says`]}):null,a?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`button`,{className:`${X()} py-1`,title:`Clears what you typed; the question stays open`,onClick:()=>n(ry(t.text,e,``)),children:`Clear my answer`}),(0,J.jsxs)(`button`,{className:`${X(`danger`)} gap-1 py-1`,title:`Deletes the question block together with the answer you typed`,onClick:l,children:[(0,J.jsx)(Gp,{size:14,"aria-hidden":`true`}),`Delete question and answer`]})]}):(0,J.jsx)(`button`,{className:`${X()} py-1`,onClick:()=>s(!o),children:o?`Hide the answer box`:`Write your answer`})]}),o||a?(0,J.jsxs)(`div`,{className:`mt-2`,children:[(0,J.jsx)(`p`,{className:`text-xs text-ink-2`,children:`Your answer`}),(0,J.jsx)(`div`,{className:`mt-2`,children:(0,J.jsx)(H$,{value:e.answer,onChange:r=>n(ry(t.text,e,r)),ariaLabel:`Answer to: ${e.question}`,placeholder:`Answer in your own words`,maxHeight:160,autoFocus:o&&!a})}),(0,J.jsx)(`p`,{className:`mt-1 text-xs text-ink-3`,children:`The AI folds it into the case text on its next run, and changes that text where they differ.`})]}):null]})}var W4={writes:`bg-seal text-white ring-seal`,input:`bg-gold-deep text-white ring-gold-deep`,email:`bg-qing-deep text-white ring-qing-deep`},G4={writes:`text-ink-3 ring-line-mid hover:text-seal-deep`,input:`text-ink-3 ring-line-mid hover:text-gold-deep`,email:`text-ink-3 ring-line-mid hover:text-qing-deep`};function K4({doc:e,targets:t,onOpenTarget:n,onChange:r}){let i=e.steps.filter(e=>e.tags.includes(`input`)||e.tags.includes(`writes`)),a=t=>t.recipes.length>0||e.inputs.some(e=>e.step===t.number),o=i.filter(e=>!a(e)).length;return(0,J.jsxs)(AG,{title:`Steps`,count:e.steps.length,tone:`blue`,help:`steps`,children:[e.steps.length===0?(0,J.jsx)(jG,{text:`This case has no "## Steps" section yet.`}):(0,J.jsx)(`ul`,{className:`divide-y divide-line`,children:e.steps.map((i,a)=>(0,J.jsx)(X4,{step:i,doc:e,targets:t,onOpenTarget:n,onChange:r},`${i.line}-${a}`))}),i.length>0?(0,J.jsxs)(`p`,{className:`border-t border-line px-3 py-1 text-xs ${o>0?`text-gold-deep`:`text-ink-3`}`,children:[i.length-o,` of `,i.length,` `,i.length===1?`step that a person does has`:`steps that a person does have`,` a recipe`,o>0?`; /gen-spec stops on the other ${o}`:``]}):null]})}function q4({textLabel:e,placeholder:t,withPhase:n=!1,onCancel:r,onAdd:i}){let[a,o]=(0,q.useState)(``),[s,c]=(0,q.useState)(``);return(0,J.jsxs)(`form`,{className:`mt-1 flex flex-wrap items-end gap-2 rounded-sm border border-line bg-warm px-2 py-1.5`,onSubmit:e=>{e.preventDefault(),s.trim()!==``&&i(a,s)},children:[n?(0,J.jsxs)(`label`,{className:`text-xs text-ink-2`,children:[`Phase (optional)`,(0,J.jsx)(`input`,{value:a,onChange:e=>o(e.target.value),placeholder:`start`,className:`mt-1 block w-24 ${Uy} py-1 text-xs`})]}):null,(0,J.jsxs)(`label`,{className:`min-w-40 flex-1 text-xs text-ink-2`,children:[e,(0,J.jsx)(H$,{value:s,onChange:c,ariaLabel:e,placeholder:t,maxHeight:140,singleLine:!0,autoFocus:!0,onEnter:()=>{s.trim()!==``&&i(a,s)}})]}),(0,J.jsxs)(`button`,{className:`${X(`primary`)} gap-1 py-1`,disabled:s.trim()===``,children:[(0,J.jsx)(Zf,{size:14,"aria-hidden":`true`}),`Add`]}),(0,J.jsx)(`button`,{type:`button`,className:`${X()} py-1`,onClick:r,children:`Cancel`})]})}function J4({recipe:e,doc:t,onChange:n}){let r=e.what?`Recipe ${e.what}`:`Recipe`;return(0,J.jsxs)(`li`,{className:`flex items-start gap-1`,children:[e.what?(0,J.jsx)(`span`,{className:`mt-1.5 shrink-0 rounded-sm bg-warm px-1.5 py-0.5 text-xs text-ink-3 ring-1 ring-line-mid ring-inset`,children:e.what}):null,(0,J.jsx)(H$,{value:e.text,onChange:r=>n(my(t.text,e,r)),ariaLabel:r,maxHeight:140,singleLine:!0}),(0,J.jsx)(`button`,{className:`${X(`danger`)} shrink-0 px-1.5 py-1`,title:`Delete this recipe line`,"aria-label":`Delete this recipe line`,onClick:()=>n(hy(t.text,e)),children:(0,J.jsx)(Gp,{size:14,"aria-hidden":`true`})})]})}function Y4({signal:e,step:t,doc:n,targets:r,onOpenTarget:i,onChange:a}){return(0,J.jsxs)(`li`,{className:`space-y-1`,children:[(0,J.jsxs)(`div`,{className:`flex items-start gap-1`,children:[(0,J.jsx)(`span`,{className:`mt-1.5 shrink-0 rounded-sm bg-qing-bg px-1.5 py-0.5 text-xs text-qing-deep ring-1 ring-qing/40 ring-inset`,title:`What proves that the content this step loads is really there`,children:`ready when`}),(0,J.jsx)(H$,{value:e.text,onChange:t=>a(_y(n.text,e,t)),ariaLabel:`Ready when, step ${t.number}`,maxHeight:140,singleLine:!0}),(0,J.jsx)(`button`,{className:`${X(`danger`)} shrink-0 px-1.5 py-1`,title:`Delete this readiness signal`,"aria-label":`Delete this readiness signal`,onClick:()=>a(vy(n.text,e)),children:(0,J.jsx)(Gp,{size:14,"aria-hidden":`true`})})]}),f4(e.text).length>0?(0,J.jsx)(`div`,{className:`flex flex-wrap gap-1 pl-6`,children:(0,J.jsx)(h4,{text:e.text,targets:r,onOpen:i})}):null]})}function X4({step:e,doc:t,targets:n,onOpenTarget:r,onChange:i}){let[a,o]=(0,q.useState)(null),s=e.tags.includes(`input`)||e.tags.includes(`writes`),c=t.inputs.some(t=>t.step===e.number),l=s&&e.recipes.length===0&&!c,u=f4(e.text);return(0,J.jsxs)(`li`,{className:`px-3 py-2`,children:[(0,J.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,J.jsx)(`span`,{className:`w-6 shrink-0 pt-1 text-right font-mono text-xs leading-5 text-ink-3`,children:e.number}),(0,J.jsx)(H$,{value:e.text,onChange:n=>i(Ty(t.text,e,n)),ariaLabel:`Step ${e.number}`,placeholder:`The step sentence`,maxHeight:180}),(0,J.jsx)(`span`,{className:`flex shrink-0 gap-1 pt-0.5`,role:`group`,"aria-label":`Tags of step ${e.number}`,children:$_.map(n=>{let r=e.tags.includes(n);return(0,J.jsx)(`button`,{"aria-pressed":r,title:r?`Remove [${n}] from step ${e.number}`:`Mark step ${e.number} as [${n}]`,onClick:()=>i(ey(t.text,e.number,n,!r)),className:`rounded-sm px-1.5 py-0.5 text-xs ring-1 ring-inset transition-colors ${r?W4[n]:G4[n]}`,children:n},n)})})]}),u.length>0?(0,J.jsx)(`div`,{className:`mt-1 flex flex-wrap gap-1 pl-8`,children:u.map(e=>(0,J.jsx)(m4,{id:e,card:n.get(e),onOpen:r},e))}):null,e.readiness.length>0?(0,J.jsx)(`ul`,{className:`mt-1 space-y-1 pl-8`,children:e.readiness.map((a,o)=>(0,J.jsx)(Y4,{signal:a,step:e,doc:t,targets:n,onOpenTarget:r,onChange:i},`${a.line}-${o}`))}):null,e.recipes.length>0?(0,J.jsx)(`ul`,{className:`mt-1 space-y-1 pl-8`,children:e.recipes.map((e,n)=>(0,J.jsx)(J4,{recipe:e,doc:t,onChange:i},`${e.line}-${n}`))}):null,l?(0,J.jsx)(`p`,{className:`mt-1 pl-8 text-xs text-gold-deep`,children:`No recipe: /gen-spec stops until one is recorded (run /explore-case --attended) or written here.`}):null,c&&e.recipes.length===0?(0,J.jsxs)(`p`,{className:`mt-1 pl-8 text-xs text-gold-deep`,children:[`The recipe is in the old Inputs section below; move it under this step as`,` `,(0,J.jsx)(`code`,{className:`rounded-sm bg-dai px-1 py-px font-mono`,children:`- Recipe:`}),`.`]}):null,!s&&e.recipes.length>0?(0,J.jsx)(`p`,{className:`mt-1 pl-8 text-xs text-ink-3`,children:`Recipe lines are used only on steps tagged input or writes.`}):null,a===`ready`?(0,J.jsx)(`div`,{className:`pl-8`,children:(0,J.jsx)(q4,{textLabel:`What shows that the content has loaded`,placeholder:`The feed list has its first row, and the logo image is loaded`,onCancel:()=>o(null),onAdd:(n,r)=>{o(null),i(yy(t.text,e.number,r))}})}):a===`recipe`?(0,J.jsx)(`div`,{className:`pl-8`,children:(0,J.jsx)(q4,{withPhase:!0,textLabel:`What the person does`,placeholder:`Positions (#1 to #3), created names (prefix + run stamp), control labels`,onCancel:()=>o(null),onAdd:(n,r)=>{o(null),i(by(t.text,e.number,n,r))}})}):(0,J.jsxs)(`div`,{className:`mt-1 flex flex-wrap gap-1 pl-8`,children:[(0,J.jsxs)(`button`,{className:`${X()} gap-1 px-1.5 py-0.5 text-xs`,title:`Say what proves that what this step loads is there: the test waits for it before it looks`,onClick:()=>o(`ready`),children:[(0,J.jsx)(Zf,{size:14,"aria-hidden":`true`}),`Add ready signal`]}),(0,J.jsxs)(`button`,{className:`${X()} gap-1 px-1.5 py-0.5 text-xs`,title:`Add a recipe line for this step (another phase, or a correction)`,onClick:()=>o(`recipe`),children:[(0,J.jsx)(Zf,{size:14,"aria-hidden":`true`}),`Add recipe`]})]})]})}function Z4({doc:e,onChange:t,profiles:n}){let[r,i]=(0,q.useState)(``),[a,o]=(0,q.useState)(``),[s,c]=(0,q.useState)(null),[l,u]=(0,q.useState)(``),[d,f]=(0,q.useState)([]),[p,m]=(0,q.useState)(null),h=e.values;if(!h)return(0,J.jsx)(AG,{title:`Values`,tone:`gray`,help:`values`,children:(0,J.jsx)(jG,{text:`This case has no "## Values" block: a spec cannot assert anything for any profile.`})});if(!h.hasBlock||h.problem)return(0,J.jsx)(AG,{title:`Values`,tone:`red`,help:`values`,children:(0,J.jsxs)(`p`,{className:`flex items-start gap-1.5 px-3 py-2 text-sm text-seal-deep`,children:[(0,J.jsx)(Ml,{size:14,className:`mt-0.5 shrink-0`,"aria-hidden":`true`}),h.problem??`The yaml block of "## Values" is incomplete.`]})});let g=Object.keys(h.values),_=n.map(e=>e.id),v=g.filter(e=>e!=="default"&&!_.includes(e)),y=new Set(v),b=[...new Set([`default`,..._,...g])],x=[...new Set(b.flatMap(e=>Object.keys(h.values[e]??{})))],S=new Map(n.map(e=>[e.id,e])),C=NF(n),w=b.filter(e=>{if(e==="default"||y.has(e))return!0;let t=S.get(e);return!t||(d.length===0||d.includes(t.env))&&MF(t,l)}),T=w.filter(e=>e!=="default"&&!y.has(e)).length,E=l.trim()!==``||d.length>0,D=p??(_.length>x.length?`profiles`:`keys`),O=_.length>3,k=_.length>1,A=()=>{u(``),f([])},j=new Map(C.map(e=>[e,n.filter(t=>t.env===e).length])),M=()=>{let n=r.trim();/^[A-Za-z][A-Za-z0-9]*$/.test(n)?x.includes(n)?c(`"${n}" is already in the table: edit its cells there.`):(c(null),t(dy(e.text,n,a)),i(``),o(``)):c(`Use letters and digits only, starting with a letter.`)},N=(n,r)=>{let i=h.values[n]?.[r],a=h.values.default?.[r],o=i==null?``:String(i);return(0,J.jsx)(`input`,{value:o,title:o===``?void 0:o,placeholder:n==="default"||a==null||a===``?`not set`:`default: ${String(a)}`,"aria-label":`${r} for ${n}`,onChange:i=>t(uy(e.text,n,r,i.target.value===``?null:i.target.value)),className:`${Uy} w-full min-w-0 py-1 font-mono text-xs`})},P=e=>{let t=S.get(e);return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`span`,{className:`block text-xs font-medium text-ink`,title:t?.name??e,children:t?.name??(e==="default"?`default`:e)}),(0,J.jsx)(`span`,{className:`mt-0.5 block font-mono text-[11px] text-ink-2 ${e==="default"?``:`break-all`}`,children:e==="default"?`fallback for every profile`:e}),t?(0,J.jsx)(`span`,{className:`mt-0.5 block`,children:(0,J.jsx)(Fy,{env:t.env})}):null,y.has(e)?(0,J.jsx)(`span`,{className:`mt-0.5 block text-[11px] font-medium text-seal-deep`,children:`(unknown)`}):null]})};return(0,J.jsxs)(AG,{title:`Values`,count:x.length,tone:`gray`,help:`values`,children:[x.length===0?(0,J.jsx)(jG,{text:`No value yet: add the first key below.`}):(0,J.jsxs)(J.Fragment,{children:[k?(0,J.jsxs)(`div`,{className:`space-y-2 border-b border-line bg-warm px-3 py-2`,children:[(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[O?(0,J.jsx)(OF,{className:`min-w-40 flex-1`,value:l,onChange:u,placeholder:`Search profiles...`,ariaLabel:`Search the profiles of this table`}):null,(0,J.jsxs)(`div`,{className:`ml-auto flex items-center gap-1.5`,children:[(0,J.jsx)(`span`,{className:`text-xs text-ink-3`,children:`Rows`}),(0,J.jsx)(`div`,{className:`flex overflow-hidden rounded ring-1 ring-line-mid`,role:`group`,"aria-label":`Rows of the values table`,children:[`keys`,`profiles`].map(e=>(0,J.jsx)(`button`,{type:`button`,"aria-pressed":D===e,title:e===`keys`?`One row per key, one column per profile`:`One row per profile, one column per key`,onClick:()=>m(e),className:`px-2 py-1 text-xs transition-colors ${D===e?`bg-theme-btn text-white`:`bg-card text-ink-2 hover:bg-warm`}`,children:e===`keys`?`Keys`:`Profiles`},e))})]})]}),O?(0,J.jsx)(DF,{label:`Env`,allCount:n.length,options:C.map(e=>({value:e,label:e.toUpperCase(),count:j.get(e)??0,tone:Py(e)})),selected:d,onChange:f}):null,E?(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-xs text-ink-2`,children:[(0,J.jsxs)(`span`,{children:[`Showing `,T,` of `,_.length,` profiles`]}),T===0?(0,J.jsx)(`span`,{className:`text-seal-deep`,children:`No profile matches.`}):null,(0,J.jsx)(`button`,{type:`button`,className:`underline underline-offset-2 hover:text-ink`,onClick:A,children:`Clear filters`})]}):null]}):null,D===`keys`?(0,J.jsx)(`div`,{className:`max-h-96 overflow-auto`,children:(0,J.jsxs)(`table`,{className:`w-full border-collapse text-sm`,children:[(0,J.jsx)(`thead`,{className:`sticky top-0 z-20`,children:(0,J.jsxs)(`tr`,{className:`bg-warm`,children:[(0,J.jsx)(`th`,{scope:`col`,className:`sticky left-0 z-10 min-w-32 bg-warm px-3 py-1.5 text-left align-bottom font-mono text-xs font-medium text-ink-2`,children:`key`}),w.map(e=>(0,J.jsx)(`th`,{scope:`col`,className:`min-w-32 border-l border-line px-1.5 py-1.5 text-left align-bottom`,children:P(e)},e))]})}),(0,J.jsx)(`tbody`,{children:x.map(e=>(0,J.jsxs)(`tr`,{className:`border-t border-line`,children:[(0,J.jsx)(`th`,{scope:`row`,className:`sticky left-0 z-10 min-w-32 truncate bg-card px-3 py-1 text-left align-middle font-mono text-xs font-normal text-ink-2`,title:e,children:e}),w.map(t=>(0,J.jsx)(`td`,{className:`min-w-32 border-l border-line px-1.5 py-1`,children:N(t,e)},t))]},e))})]})}):(0,J.jsx)(`div`,{className:`max-h-96 overflow-auto`,children:(0,J.jsxs)(`table`,{className:`w-full border-collapse text-sm`,children:[(0,J.jsx)(`thead`,{className:`sticky top-0 z-20`,children:(0,J.jsxs)(`tr`,{className:`bg-warm`,children:[(0,J.jsx)(`th`,{scope:`col`,className:`sticky left-0 z-10 min-w-52 bg-warm px-3 py-1.5 text-left text-xs font-medium text-ink-2`,children:`profile`}),x.map(e=>(0,J.jsx)(`th`,{scope:`col`,className:`min-w-32 border-l border-line px-1.5 py-1.5 text-left align-bottom font-mono text-xs font-medium text-ink-2`,title:e,children:e},e))]})}),(0,J.jsx)(`tbody`,{children:w.map(e=>{let t=S.get(e);return(0,J.jsxs)(`tr`,{className:`border-t border-line`,children:[(0,J.jsxs)(`th`,{scope:`row`,className:`sticky left-0 z-10 min-w-52 bg-card px-3 py-1 text-left align-middle`,children:[(0,J.jsx)(`span`,{className:`block text-xs font-medium text-ink`,title:t?.name??e,children:t?.name??(e==="default"?`default`:e)}),(0,J.jsxs)(`span`,{className:`mt-0.5 flex flex-wrap items-center gap-1`,children:[t?(0,J.jsx)(Fy,{env:t.env}):null,(0,J.jsx)(`span`,{className:`font-mono text-[11px] text-ink-2`,children:e==="default"?`fallback for every profile`:e}),y.has(e)?(0,J.jsx)(`span`,{className:`text-[11px] font-medium text-seal-deep`,children:`(unknown)`}):null]})]}),x.map(t=>(0,J.jsx)(`td`,{className:`min-w-32 border-l border-line px-1.5 py-1`,children:N(e,t)},t))]},e)})})]})})]}),v.length>0?(0,J.jsxs)(`p`,{className:`flex items-start gap-1.5 border-t border-line bg-seal-bg px-3 py-1.5 text-xs text-seal-deep`,children:[(0,J.jsx)(Ml,{size:14,className:`mt-0.5 shrink-0`,"aria-hidden":`true`}),v.join(`, `),` `,v.length===1?`is`:`are`,` not in profiles.yaml: a spec that runs on this case refuses these values.`]}):null,h.placeholders.length>0?(0,J.jsxs)(`p`,{className:`flex items-start gap-1.5 border-t border-line bg-gold-bg px-3 py-1.5 text-xs text-gold-deep`,children:[(0,J.jsx)(Ml,{size:14,className:`mt-0.5 shrink-0`,"aria-hidden":`true`}),`Empty or TODO: `,h.placeholders.join(`, `),`. The test refuses to run until `,h.placeholders.length===1?`it is`:`they are`,` filled in.`]}):null,(0,J.jsxs)(`form`,{className:`flex flex-wrap items-end gap-2 border-t border-line bg-warm px-3 py-2`,onSubmit:e=>{e.preventDefault(),M()},children:[(0,J.jsxs)(`label`,{className:`text-xs text-ink-2`,children:[`New key`,(0,J.jsx)(`input`,{value:r,onChange:e=>{i(e.target.value),c(null)},placeholder:`createButton`,className:`mt-1 block w-36 ${Uy} py-1 font-mono text-xs`})]}),(0,J.jsxs)(`label`,{className:`text-xs text-ink-2`,children:[`Value in default`,(0,J.jsx)(`input`,{value:a,onChange:e=>o(e.target.value),placeholder:`Create New`,className:`mt-1 block w-48 ${Uy} py-1 font-mono text-xs`})]}),(0,J.jsxs)(`button`,{className:`${X()} gap-1 py-1`,disabled:r.trim()===``,children:[(0,J.jsx)(Zf,{size:14,"aria-hidden":`true`}),`Add`]}),s?(0,J.jsx)(`p`,{className:`w-full text-xs text-seal-deep`,children:s}):null]})]})}function Q4({input:e,doc:t,onChange:n}){let r=e.step===null?`Note`:`Recipe for step ${e.step}${e.what?` ${e.what}`:``}`;return(0,J.jsxs)(`div`,{className:`mt-1 flex items-start gap-1`,children:[e.what?(0,J.jsx)(`span`,{className:`mt-1.5 shrink-0 rounded-sm bg-warm px-1.5 py-0.5 text-xs text-ink-3 ring-1 ring-line-mid ring-inset`,children:e.what}):null,(0,J.jsx)(H$,{value:e.recipe,onChange:r=>n(fy(t.text,e,r)),ariaLabel:r,maxHeight:140,singleLine:!0}),(0,J.jsx)(`button`,{className:`${X(`danger`)} shrink-0 px-1.5 py-1`,title:`Delete this line`,"aria-label":`Delete this line`,onClick:()=>n(py(t.text,e)),children:(0,J.jsx)(Gp,{size:14,"aria-hidden":`true`})})]})}function $4({doc:e,onChange:t}){return e.inputs.length===0?null:(0,J.jsxs)(AG,{title:`Inputs (old format)`,count:e.inputs.length,tone:`amber`,help:`inputs`,children:[(0,J.jsxs)(`p`,{className:`flex items-start gap-1.5 border-b border-line bg-gold-bg px-3 py-1.5 text-xs text-gold-deep`,children:[(0,J.jsx)(Ml,{size:14,className:`mt-0.5 shrink-0`,"aria-hidden":`true`}),`This case uses the old section. Move each line under its step as`,` `,(0,J.jsx)(`code`,{className:`rounded-sm bg-dai px-1 py-px font-mono`,children:`- Recipe (phase): ...`}),`; it keeps working until then.`]}),(0,J.jsx)(`ul`,{className:`divide-y divide-line`,children:e.inputs.map(n=>(0,J.jsxs)(`li`,{className:`px-3 py-1.5`,children:[(0,J.jsx)(`span`,{className:`mb-1 block font-mono text-xs text-ink-3`,children:n.step===null?`free note`:`step ${n.step}`}),(0,J.jsx)(Q4,{input:n,doc:e,onChange:t})]},`${n.line}-${n.step??`note`}`))})]})}var e3={confirm:`to confirm`,unseen:`not observed`};function t3({marker:e,doc:t,onChange:n,onRevealLine:r}){let i=Pv(t,e),a=e.evidence===null?null:bH(e.evidence),o=i.kind===`assertion`;return(0,J.jsxs)(`li`,{className:`px-3 py-2 ${o?`bg-gold-bg/40`:``}`,children:[(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,J.jsx)(Ny,{tone:o?`amber`:`blue`,children:e3[e.kind]}),(0,J.jsxs)(`span`,{className:`text-xs text-ink-3`,children:[e.section||`the case`,` · line `,e.line]}),o?(0,J.jsx)(`span`,{className:`rounded-sm bg-gold-bg px-1.5 py-0.5 text-[11px] font-medium text-gold-deep`,title:`A wrong reading here would pass silently, so only a person can settle it`,children:`changes an assertion`}):null,(0,J.jsxs)(`button`,{className:`${X()} ml-auto gap-1 py-0.5 text-xs`,title:`This line is right: remove the marker (Ctrl/Cmd+Z undoes it)`,onClick:()=>n(oy(t.text,e)),children:[(0,J.jsx)(uu,{size:14,"aria-hidden":`true`}),`Confirmed`]})]}),(0,J.jsx)(`button`,{type:`button`,className:`mt-1 block w-full rounded text-left text-sm text-ink-2 transition-colors hover:text-ink focus-visible:ring-2 focus-visible:ring-theme/40 focus-visible:outline-none`,title:`Show this line in the source`,onClick:()=>r(e.line),children:(0,J.jsx)(DG,{text:Iv(t.text,e)})}),e.detail?(0,J.jsxs)(`p`,{className:`mt-1 rounded border border-line-mid bg-warm px-2 py-1.5 text-xs text-ink-2`,children:[(0,J.jsx)(`span`,{className:`text-ink-3`,children:`Why it needs you: `}),e.detail]}):(0,J.jsx)(`p`,{className:`mt-1 text-xs text-gold-deep`,children:`No reason recorded: this marker predates the format, or the AI did not say what to decide.`}),(0,J.jsxs)(`p`,{className:`mt-1 text-xs text-ink-3`,children:[`Feeds: `,(0,J.jsx)(`span`,{className:`font-mono`,children:i.label})]}),a===null?null:(0,J.jsx)(`a`,{href:a,target:`_blank`,rel:`noreferrer`,className:`mt-1.5 block w-fit`,title:`The screenshot the exploration took: look here instead of opening the page again`,children:(0,J.jsx)(`img`,{src:a,alt:`Evidence for the marker on ${e.section} line ${e.line}`,className:`max-h-40 rounded border border-line-mid`})})]})}function n3({doc:e,onChange:t,onRevealLine:n}){let r=e.markers.filter(t=>Pv(e,t).kind===`assertion`);return(0,J.jsx)(AG,{title:`To confirm`,count:e.markers.length,tone:r.length>0?`amber`:`blue`,help:`markers`,children:e.markers.length===0?(0,J.jsx)(jG,{text:`Nothing waits for a person: every line is either checked by the run or settled.`}):(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 border-b border-line bg-warm px-3 py-1.5 text-xs text-ink-2`,children:[(0,J.jsxs)(`span`,{children:[e.markers.length,` marked`,r.length>0?`, ${r.length} change an assertion`:`: the run checks them all`]}),(0,J.jsxs)(`button`,{className:`${X()} ml-auto gap-1 py-0.5 text-xs`,title:`You have looked at every marked line: remove all markers in one step (Ctrl/Cmd+Z undoes it)`,onClick:()=>t(sy(e.text,e.markers)),children:[(0,J.jsx)(uu,{size:14,"aria-hidden":`true`}),`Confirm all `,e.markers.length]}),r.length>0&&r.length<e.markers.length?(0,J.jsxs)(`button`,{className:`${X()} gap-1 py-0.5 text-xs`,title:`Remove the markers on the lines that change an assertion, and keep the notes`,onClick:()=>t(sy(e.text,r)),children:[`Only the `,r.length,` assertions`]}):null]}),(0,J.jsx)(`ul`,{className:`divide-y divide-line`,children:e.markers.map((r,i)=>(0,J.jsx)(t3,{marker:r,doc:e,onChange:t,onRevealLine:n},`${r.line}-${r.kind}-${i}`))})]})})}function r3(e){let t=e.sections.find(e=>e.name===`Targets`),n=t?e.text.slice(0,t.headingStart)+e.text.slice(t.body.end):e.text,r=new Map;for(let e of n.matchAll(/\[(T\d+)\]/g))r.set(e[1],(r.get(e[1])??0)+1);return r}function i3(e){return ev.filter(t=>!e.fields[t])}function a3({doc:e,onOpenTarget:t,onRevealLine:n}){let r=r3(e),i=e.targets.filter(e=>e.blocking||i3(e).length>0).length;return(0,J.jsxs)(AG,{title:`Targets`,count:e.targets.length,tone:i>0?`amber`:`blue`,help:`targets`,defaultOpen:!1,children:[e.targets.length===0?(0,J.jsx)(jG,{text:`No card: no check names an image, an icon, a file, a PDF, a screenshot or repeated text.`}):(0,J.jsx)(`ul`,{className:`divide-y divide-line`,children:e.targets.map(e=>{let i=i3(e),a=r.get(e.id)??0;return(0,J.jsx)(`li`,{className:`px-3 py-1.5`,children:(0,J.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,J.jsxs)(`button`,{type:`button`,title:`Open this card`,onClick:()=>t(e.id),className:`flex min-w-0 flex-1 items-center gap-1.5 rounded text-left transition-colors hover:text-ink focus-visible:ring-2 focus-visible:ring-theme/40 focus-visible:outline-none`,children:[(0,J.jsx)(Jd,{size:14,className:`shrink-0 text-ink-3`,"aria-hidden":`true`}),(0,J.jsx)(p4,{id:e.id}),(0,J.jsx)(`span`,{className:`min-w-0 flex-1 text-sm text-ink`,children:e.name===``?`unnamed target`:e.name}),e.blocking?(0,J.jsx)(Ny,{tone:`red`,children:`open question`}):null,i.length>0?(0,J.jsxs)(Ny,{tone:`amber`,children:[`missing `,i.map(L4).join(`, `)]}):null,a===0?(0,J.jsx)(Ny,{tone:`gray`,children:`no check uses it`}):null]}),(0,J.jsxs)(`button`,{className:`${X()} shrink-0 gap-1 px-1.5 py-0.5 text-xs`,title:`Open this card in the editor to edit it`,onClick:()=>n(e.line),children:[(0,J.jsx)(Jl,{size:14,"aria-hidden":`true`}),`Open in editor`]})]})},e.id)})}),(0,J.jsx)(`p`,{className:`border-t border-line px-3 py-1 text-xs text-ink-3`,children:`Read-only here: use Open in editor to change a card. A [T1] in a step or a check is the link to its card: the chip opens it.`})]})}function o3({content:e,onChange:t,profiles:n,envs:r,suites:i,caseId:a,onRevealLine:o,onRevealRange:s}){let c=(0,q.useMemo)(()=>Qv(e),[e]),l=wG(),[u,d]=(0,q.useState)(null),f=(0,q.useMemo)(()=>new Map(c.targets.map(e=>[e.id,e])),[c]),p=c.questions.filter(e=>e.kind===`blocking`).length,m=c.questions.filter(e=>e.answer!==``).length;return(0,J.jsxs)(`div`,{ref:l,className:`flex flex-col gap-3 p-3`,children:[(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-2 gap-y-1 px-1 text-xs text-ink-2`,children:[(0,J.jsxs)(`span`,{children:[c.steps.length,` steps`]}),(0,J.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,J.jsxs)(`span`,{children:[c.questions.length,` open `,c.questions.length===1?`question`:`questions`,p>0?` (${p} must answer)`:``]}),c.markers.length>0?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,J.jsxs)(`span`,{children:[c.markers.length,` marked`,Fv(c)>0?` (${Fv(c)} affect an assertion)`:``]})]}):null,m>0?(0,J.jsxs)(Ny,{tone:`green`,children:[m,` answered`]}):null,(0,J.jsx)(`span`,{className:`ml-auto text-ink-3`,children:`Edits land in the source: Save writes them.`})]}),(0,J.jsx)(V4,{doc:c,onChange:t,onRevealRange:s}),(0,J.jsx)(n3,{doc:c,onChange:t,onRevealLine:o}),(0,J.jsx)(P4,{doc:c,onChange:t,caseId:a,envs:r,suites:i}),(0,J.jsx)(O4,{name:`Goal`,help:`goal`,doc:c,onRevealLine:o}),(0,J.jsx)(_4,{name:`Rules`,help:`rules`,doc:c,onOpenTarget:d,onChange:t}),(0,J.jsx)(K4,{doc:c,targets:f,onOpenTarget:d,onChange:t}),(0,J.jsx)(_4,{name:`Expected`,help:`expected`,doc:c,onOpenTarget:d,onChange:t}),(0,J.jsx)(Z4,{doc:c,onChange:t,profiles:n},a),(0,J.jsx)(_4,{name:`Visual checks`,help:`visual`,doc:c,onOpenTarget:d,onChange:t,defaultOpen:!1}),(0,J.jsx)(a3,{doc:c,onOpenTarget:d,onRevealLine:o}),(0,J.jsx)($4,{doc:c,onChange:t}),(0,J.jsx)(O4,{name:`Notes`,help:`notes`,doc:c,onRevealLine:o}),(0,J.jsx)(k4,{doc:c}),u===null?null:(0,J.jsx)(B4,{id:u,card:f.get(u),onClose:()=>d(null),onRevealLine:o})]})}function s3({env:e,envs:t,onChange:n,invalid:r=!1,title:i}){let a=(0,q.useRef)(null),o=(0,q.useRef)(null),s=(0,q.useRef)(null),c=(0,q.useId)(),l=(0,q.useId)(),[u,d]=(0,q.useState)(!1),[f,p]=(0,q.useState)(0),m=t.indexOf(e),h=e=>{d(!1),e&&o.current?.focus()},g=()=>{p(m===-1?0:m),d(!0)},_=e=>{n(e),h(!0)};(0,q.useEffect)(()=>{u&&s.current?.querySelector(`[data-row="${f}"]`)?.scrollIntoView({block:`nearest`})},[f,u]),(0,q.useEffect)(()=>{if(!u)return;let e=e=>{a.current?.contains(e.target)||d(!1)};return window.addEventListener(`mousedown`,e),()=>window.removeEventListener(`mousedown`,e)},[u]);let v=(e,n)=>{let r=e+n;return r>=0&&r<t.length?r:e};return(0,J.jsxs)(`div`,{ref:a,className:`relative inline-block`,children:[(0,J.jsxs)(`button`,{ref:o,type:`button`,role:`combobox`,"aria-label":`Environment the agent works in`,"aria-invalid":r||void 0,"aria-required":!0,"aria-expanded":u,"aria-controls":u?c:void 0,"aria-activedescendant":u&&t[f]!==void 0?`${c}-${f}`:void 0,title:i,onKeyDown:e=>{if(e.key===`ArrowDown`||e.key===`ArrowUp`)e.preventDefault(),u?p(t=>v(t,e.key===`ArrowDown`?1:-1)):g();else if(e.key===`Home`||e.key===`End`){if(!u)return;e.preventDefault(),p(e.key===`Home`?0:Math.max(0,t.length-1))}else if(e.key===`Enter`||e.key===` `)e.preventDefault(),u?t[f]!==void 0&&_(t[f]):g();else if(e.key===`Escape`){if(!u)return;e.preventDefault(),h(!0)}else e.key===`Tab`&&u&&h(!1)},onClick:()=>u?h(!0):g(),className:`${X(r?`invalid`:`secondary`)} h-8 gap-1.5`,children:[(0,J.jsxs)(`span`,{className:`truncate`,children:[`Env: `,e||`choose...`]}),(0,J.jsx)(mu,{size:14,className:`shrink-0`,"aria-hidden":`true`})]}),u?(0,J.jsxs)(`div`,{className:`card-popup absolute top-full left-0 z-30 mt-1 w-56 p-1`,children:[(0,J.jsx)(`p`,{id:l,className:`px-2 py-1 text-xs font-medium text-ink-2`,children:`Environment`}),(0,J.jsxs)(`div`,{ref:s,id:c,role:`listbox`,"aria-labelledby":l,className:`max-h-64 overflow-auto`,children:[t.length===0?(0,J.jsx)(`p`,{className:`px-2 py-1.5 text-sm text-ink-3`,children:`No environment yet: add one to profiles.yaml.`}):null,t.map((t,n)=>(0,J.jsxs)(`div`,{id:`${c}-${n}`,"data-row":n,role:`option`,"aria-selected":t===e,onMouseDown:e=>e.preventDefault(),onClick:()=>_(t),onMouseEnter:()=>p(n),className:[`flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm transition-colors duration-150`,n===f?`bg-theme-bg text-theme-ink`:`text-ink hover:bg-warm`].join(` `),children:[(0,J.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:t}),t===e?(0,J.jsx)(uu,{size:14,className:`shrink-0 text-theme-btn`,"aria-hidden":`true`}):null]},t))]})]}):null]})}var c3=e=>e.status===`ok`,l3=e=>e.status!==`missing`&&e.status!==`expired`,u3=e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.values(e).every(e=>Array.isArray(e)&&e.every(e=>typeof e==`string`));function d3(e,t){if(t===void 0)return e.filter(c3).map(e=>e.id);let n=new Set(e.filter(l3).map(e=>e.id));return t.filter(e=>n.has(e))}function f3({profiles:e,selected:t,onToggle:n}){return(0,J.jsx)(`ul`,{className:`space-y-1`,children:e.map(e=>(0,J.jsx)(`li`,{children:(0,J.jsxs)(`label`,{className:`flex items-center gap-2 ${l3(e)?``:`text-ink-3`}`,children:[(0,J.jsx)(`input`,{type:`checkbox`,checked:t.includes(e.id),disabled:!l3(e),onChange:()=>n(e.id)}),(0,J.jsx)(`span`,{className:`font-mono`,children:e.id}),(0,J.jsx)(By,{status:e.status})]})},e.id))})}function p3({env:e,profiles:t,selected:n,loading:r,pending:i,failed:a,onChange:o}){let s=(0,q.useRef)(null),c=(0,q.useId)(),[l,u]=(0,q.useState)(!1),d=t.filter(l3);(0,q.useEffect)(()=>{u(!1)},[e]),(0,q.useEffect)(()=>{if(!l)return;let e=e=>{s.current?.contains(e.target)||u(!1)},t=e=>{e.key===`Escape`&&u(!1)};return window.addEventListener(`mousedown`,e),window.addEventListener(`keydown`,t),()=>{window.removeEventListener(`mousedown`,e),window.removeEventListener(`keydown`,t)}},[l]);let f=e=>o(n.includes(e)?n.filter(t=>t!==e):[...n,e]),p=e===``,m=p||a?`Profiles`:`Profiles: ${n.length} of ${d.length}`,h=p?`# Profiles
|
|
321
|
+
`},T1={onDragStart(e){let{active:t}=e;return`Picked up draggable item `+t.id+`.`},onDragOver(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was moved over droppable area `+n.id+`.`:`Draggable item `+t.id+` is no longer over a droppable area.`},onDragEnd(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was dropped over droppable area `+n.id:`Draggable item `+t.id+` was dropped.`},onDragCancel(e){let{active:t}=e;return`Dragging was cancelled. Draggable item `+t.id+` was dropped.`}};function E1(e){let{announcements:t=T1,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=w1}=e,{announce:a,announcement:o}=b1(),s=o1(`DndLiveRegion`),[c,l]=(0,q.useState)(!1);if((0,q.useEffect)(()=>{l(!0)},[]),S1((0,q.useMemo)(()=>({onDragStart(e){let{active:n}=e;a(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&a(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;a(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;a(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;a(t.onDragCancel({active:n,over:r}))}}),[a,t])),!c)return null;let u=q.createElement(q.Fragment,null,q.createElement(v1,{id:r,value:i.draggable}),q.createElement(y1,{id:s,announcement:o}));return n?(0,nc.createPortal)(u,n):u}var D1;(function(e){e.DragStart=`dragStart`,e.DragMove=`dragMove`,e.DragEnd=`dragEnd`,e.DragCancel=`dragCancel`,e.DragOver=`dragOver`,e.RegisterDroppable=`registerDroppable`,e.SetDroppableDisabled=`setDroppableDisabled`,e.UnregisterDroppable=`unregisterDroppable`})(D1||={});function O1(){}function k1(e,t){return(0,q.useMemo)(()=>({sensor:e,options:t??{}}),[e,t])}function A1(){var e=[...arguments];return(0,q.useMemo)(()=>[...e].filter(e=>e!=null),[...e])}var j1=Object.freeze({x:0,y:0});function M1(e,t){return Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2)}function N1(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function P1(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function F1(e){let{left:t,top:n,height:r,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+r},{x:t+i,y:n+r}]}function I1(e,t){if(!e||e.length===0)return null;let[n]=e;return t?n[t]:n}function L1(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}var R1=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=L1(t,t.left,t.top),a=[];for(let e of r){let{id:t}=e,r=n.get(t);if(r){let n=M1(L1(r),i);a.push({id:t,data:{droppableContainer:e,value:n}})}}return a.sort(N1)},z1=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=F1(t),a=[];for(let e of r){let{id:t}=e,r=n.get(t);if(r){let n=F1(r),o=i.reduce((e,t,r)=>e+M1(n[r],t),0),s=Number((o/4).toFixed(4));a.push({id:t,data:{droppableContainer:e,value:s}})}}return a.sort(N1)};function B1(e,t){let n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),o=i-r,s=a-n;if(r<i&&n<a){let n=t.width*t.height,r=e.width*e.height,i=o*s,a=i/(n+r-i);return Number(a.toFixed(4))}return 0}var V1=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=[];for(let e of r){let{id:r}=e,a=n.get(r);if(a){let n=B1(a,t);n>0&&i.push({id:r,data:{droppableContainer:e,value:n}})}}return i.sort(P1)};function H1(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function U1(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:j1}function W1(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}var G1=W1(1);function K1(e){if(e.startsWith(`matrix3d(`)){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith(`matrix(`)){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function q1(e,t,n){let r=K1(t);if(!r)return e;let{scaleX:i,scaleY:a,x:o,y:s}=r,c=e.left-o-(1-i)*parseFloat(n),l=e.top-s-(1-a)*parseFloat(n.slice(n.indexOf(` `)+1)),u=i?e.width/i:e.width,d=a?e.height/a:e.height;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c}}var J1={ignoreTransform:!1};function Y1(e,t){t===void 0&&(t=J1);let n=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:t,transformOrigin:r}=q$(e).getComputedStyle(e);t&&(n=q1(n,t,r))}let{top:r,left:i,width:a,height:o,bottom:s,right:c}=n;return{top:r,left:i,width:a,height:o,bottom:s,right:c}}function X1(e){return Y1(e,{ignoreTransform:!0})}function Z1(e){let t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function Q1(e,t){return t===void 0&&(t=q$(e).getComputedStyle(e)),t.position===`fixed`}function $1(e,t){t===void 0&&(t=q$(e).getComputedStyle(e));let n=/(auto|scroll|overlay)/;return[`overflow`,`overflowX`,`overflowY`].some(e=>{let r=t[e];return typeof r==`string`&&n.test(r)})}function e0(e,t){let n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(J$(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!Y$(i)||X$(i)||n.includes(i))return n;let a=q$(e).getComputedStyle(i);return i!==e&&$1(i,a)&&n.push(i),Q1(i,a)?n:r(i.parentNode)}return e?r(e):n}function t0(e){let[t]=e0(e,1);return t??null}function n0(e){return!W$||!e?null:G$(e)?e:K$(e)?J$(e)||e===Z$(e).scrollingElement?window:Y$(e)?e:null:null}function r0(e){return G$(e)?e.scrollX:e.scrollLeft}function i0(e){return G$(e)?e.scrollY:e.scrollTop}function a0(e){return{x:r0(e),y:i0(e)}}var o0;(function(e){e[e.Forward=1]=`Forward`,e[e.Backward=-1]=`Backward`})(o0||={});function s0(e){return!W$||!e?!1:e===document.scrollingElement}function c0(e){let t={x:0,y:0},n=s0(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}var l0={x:.2,y:.2};function u0(e,t,n,r,i){let{top:a,left:o,right:s,bottom:c}=n;r===void 0&&(r=10),i===void 0&&(i=l0);let{isTop:l,isBottom:u,isLeft:d,isRight:f}=c0(e),p={x:0,y:0},m={x:0,y:0},h={height:t.height*i.y,width:t.width*i.x};return!l&&a<=t.top+h.height?(p.y=o0.Backward,m.y=r*Math.abs((t.top+h.height-a)/h.height)):!u&&c>=t.bottom-h.height&&(p.y=o0.Forward,m.y=r*Math.abs((t.bottom-h.height-c)/h.height)),!f&&s>=t.right-h.width?(p.x=o0.Forward,m.x=r*Math.abs((t.right-h.width-s)/h.width)):!d&&o<=t.left+h.width&&(p.x=o0.Backward,m.x=r*Math.abs((t.left+h.width-o)/h.width)),{direction:p,speed:m}}function d0(e){if(e===document.scrollingElement){let{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}let{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function f0(e){return e.reduce((e,t)=>c1(e,a0(t)),j1)}function p0(e){return e.reduce((e,t)=>e+r0(t),0)}function m0(e){return e.reduce((e,t)=>e+i0(t),0)}function h0(e,t){if(t===void 0&&(t=Y1),!e)return;let{top:n,left:r,bottom:i,right:a}=t(e);t0(e)&&(i<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:`center`,inline:`center`})}var g0=[[`x`,[`left`,`right`],p0],[`y`,[`top`,`bottom`],m0]],_0=class{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;let n=e0(t),r=f0(n);this.rect={...e},this.width=e.width,this.height=e.height;for(let[e,t,i]of g0)for(let a of t)Object.defineProperty(this,a,{get:()=>{let t=i(n),o=r[e]-t;return this.rect[a]+o},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}},v0=class{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>this.target?.removeEventListener(...e))},this.target=e}add(e,t,n){var r;(r=this.target)==null||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}};function y0(e){let{EventTarget:t}=q$(e);return e instanceof t?e:Z$(e)}function b0(e,t){let n=Math.abs(e.x),r=Math.abs(e.y);return typeof t==`number`?Math.sqrt(n**2+r**2)>t:`x`in t&&`y`in t?n>t.x&&r>t.y:`x`in t?n>t.x:`y`in t&&r>t.y}var x0;(function(e){e.Click=`click`,e.DragStart=`dragstart`,e.Keydown=`keydown`,e.ContextMenu=`contextmenu`,e.Resize=`resize`,e.SelectionChange=`selectionchange`,e.VisibilityChange=`visibilitychange`})(x0||={});function S0(e){e.preventDefault()}function C0(e){e.stopPropagation()}var w0;(function(e){e.Space=`Space`,e.Down=`ArrowDown`,e.Right=`ArrowRight`,e.Left=`ArrowLeft`,e.Up=`ArrowUp`,e.Esc=`Escape`,e.Enter=`Enter`,e.Tab=`Tab`})(w0||={});var T0={start:[w0.Space,w0.Enter],cancel:[w0.Esc],end:[w0.Space,w0.Enter,w0.Tab]},E0=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case w0.Right:return{...n,x:n.x+25};case w0.Left:return{...n,x:n.x-25};case w0.Down:return{...n,y:n.y+25};case w0.Up:return{...n,y:n.y-25}}},D0=class{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;let{event:{target:t}}=e;this.props=e,this.listeners=new v0(Z$(t)),this.windowListeners=new v0(q$(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(x0.Resize,this.handleCancel),this.windowListeners.add(x0.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(x0.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&h0(n),t(j1)}handleKeyDown(e){if(d1(e)){let{active:t,context:n,options:r}=this.props,{keyboardCodes:i=T0,coordinateGetter:a=E0,scrollBehavior:o=`smooth`}=r,{code:s}=e;if(i.end.includes(s)){this.handleEnd(e);return}if(i.cancel.includes(s)){this.handleCancel(e);return}let{collisionRect:c}=n.current,l=c?{x:c.left,y:c.top}:j1;this.referenceCoordinates||=l;let u=a(e,{active:t,context:n.current,currentCoordinates:l});if(u){let t=l1(u,l),r={x:0,y:0},{scrollableAncestors:i}=n.current;for(let n of i){let i=e.code,{isTop:a,isRight:s,isLeft:c,isBottom:l,maxScroll:d,minScroll:f}=c0(n),p=d0(n),m={x:Math.min(i===w0.Right?p.right-p.width/2:p.right,Math.max(i===w0.Right?p.left:p.left+p.width/2,u.x)),y:Math.min(i===w0.Down?p.bottom-p.height/2:p.bottom,Math.max(i===w0.Down?p.top:p.top+p.height/2,u.y))},h=i===w0.Right&&!s||i===w0.Left&&!c,g=i===w0.Down&&!l||i===w0.Up&&!a;if(h&&m.x!==u.x){let e=n.scrollLeft+t.x,a=i===w0.Right&&e<=d.x||i===w0.Left&&e>=f.x;if(a&&!t.y){n.scrollTo({left:e,behavior:o});return}r.x=a?n.scrollLeft-e:i===w0.Right?n.scrollLeft-d.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:o});break}if(g&&m.y!==u.y){let e=n.scrollTop+t.y,a=i===w0.Down&&e<=d.y||i===w0.Up&&e>=f.y;if(a&&!t.x){n.scrollTo({top:e,behavior:o});return}r.y=a?n.scrollTop-e:i===w0.Down?n.scrollTop-d.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:o});break}}this.handleMove(e,c1(l1(u,this.referenceCoordinates),r))}}}handleMove(e,t){let{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){let{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){let{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}};D0.activators=[{eventName:`onKeyDown`,handler:(e,t,n)=>{let{keyboardCodes:r=T0,onActivation:i}=t,{active:a}=n,{code:o}=e.nativeEvent;if(r.start.includes(o)){let t=a.activatorNode.current;return t&&e.target!==t?!1:(e.preventDefault(),i?.({event:e.nativeEvent}),!0)}return!1}}];function O0(e){return!!(e&&`distance`in e)}function k0(e){return!!(e&&`delay`in e)}var A0=class{constructor(e,t,n){n===void 0&&(n=y0(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;let{event:r}=e,{target:i}=r;this.props=e,this.events=t,this.document=Z$(i),this.documentListeners=new v0(this.document),this.listeners=new v0(n),this.windowListeners=new v0(q$(i)),this.initialCoordinates=p1(r)??j1,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){let{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(x0.Resize,this.handleCancel),this.windowListeners.add(x0.DragStart,S0),this.windowListeners.add(x0.VisibilityChange,this.handleCancel),this.windowListeners.add(x0.ContextMenu,S0),this.documentListeners.add(x0.Keydown,this.handleKeydown),t){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(k0(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(O0(t)){this.handlePending(t);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){let{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){let{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(x0.Click,C0,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(x0.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){let{activated:t,initialCoordinates:n,props:r}=this,{onMove:i,options:{activationConstraint:a}}=r;if(!n)return;let o=p1(e)??j1,s=l1(n,o);if(!t&&a){if(O0(a)){if(a.tolerance!=null&&b0(s,a.tolerance))return this.handleCancel();if(b0(s,a.distance))return this.handleStart()}if(k0(a)&&b0(s,a.tolerance))return this.handleCancel();this.handlePending(a,s)}else e.cancelable&&e.preventDefault(),i(o)}handleEnd(){let{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){let{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===w0.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}},j0={cancel:{name:`pointercancel`},move:{name:`pointermove`},end:{name:`pointerup`}},M0=class extends A0{constructor(e){let{event:t}=e,n=Z$(t.target);super(e,j0,n)}};M0.activators=[{eventName:`onPointerDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];var N0={move:{name:`mousemove`},end:{name:`mouseup`}},P0;(function(e){e[e.RightClick=2]=`RightClick`})(P0||={});var F0=class extends A0{constructor(e){super(e,N0,Z$(e.event.target))}};F0.activators=[{eventName:`onMouseDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==P0.RightClick&&(r?.({event:n}),!0)}}];var I0={cancel:{name:`touchcancel`},move:{name:`touchmove`},end:{name:`touchend`}},L0=class extends A0{constructor(e){super(e,I0)}static setup(){return window.addEventListener(I0.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(I0.move.name,e)};function e(){}}};L0.activators=[{eventName:`onTouchStart`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t,{touches:i}=n;return i.length>1?!1:(r?.({event:n}),!0)}}];var R0;(function(e){e[e.Pointer=0]=`Pointer`,e[e.DraggableRect=1]=`DraggableRect`})(R0||={});var z0;(function(e){e[e.TreeOrder=0]=`TreeOrder`,e[e.ReversedTreeOrder=1]=`ReversedTreeOrder`})(z0||={});function B0(e){let{acceleration:t,activator:n=R0.Pointer,canScroll:r,draggingRect:i,enabled:a,interval:o=5,order:s=z0.TreeOrder,pointerCoordinates:c,scrollableAncestors:l,scrollableAncestorRects:u,delta:d,threshold:f}=e,p=H0({delta:d,disabled:!a}),[m,h]=e1(),g=(0,q.useRef)({x:0,y:0}),_=(0,q.useRef)({x:0,y:0}),v=(0,q.useMemo)(()=>{switch(n){case R0.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case R0.DraggableRect:return i}},[n,i,c]),y=(0,q.useRef)(null),b=(0,q.useCallback)(()=>{let e=y.current;if(!e)return;let t=g.current.x*_.current.x,n=g.current.y*_.current.y;e.scrollBy(t,n)},[]),x=(0,q.useMemo)(()=>s===z0.TreeOrder?[...l].reverse():l,[s,l]);(0,q.useEffect)(()=>{if(!a||!l.length||!v)h();else{for(let e of x){if(r?.(e)===!1)continue;let n=l.indexOf(e),i=u[n];if(!i)continue;let{direction:a,speed:s}=u0(e,i,v,t,f);for(let e of[`x`,`y`])p[e][a[e]]||(s[e]=0,a[e]=0);if(s.x>0||s.y>0){h(),y.current=e,m(b,o),g.current=s,_.current=a;return}}g.current={x:0,y:0},_.current={x:0,y:0},h()}},[t,b,r,h,a,o,JSON.stringify(v),JSON.stringify(p),m,l,x,u,JSON.stringify(f)])}var V0={x:{[o0.Backward]:!1,[o0.Forward]:!1},y:{[o0.Backward]:!1,[o0.Forward]:!1}};function H0(e){let{delta:t,disabled:n}=e,r=i1(t);return n1(e=>{if(n||!r||!e)return V0;let i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[o0.Backward]:e.x[o0.Backward]||i.x===-1,[o0.Forward]:e.x[o0.Forward]||i.x===1},y:{[o0.Backward]:e.y[o0.Backward]||i.y===-1,[o0.Forward]:e.y[o0.Forward]||i.y===1}}},[n,t,r])}function U0(e,t){let n=t==null?void 0:e.get(t),r=n?n.node.current:null;return n1(e=>t==null?null:r??e??null,[r,t])}function W0(e,t){return(0,q.useMemo)(()=>e.reduce((e,n)=>{let{sensor:r}=n,i=r.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}));return[...e,...i]},[]),[e,t])}var G0;(function(e){e[e.Always=0]=`Always`,e[e.BeforeDragging=1]=`BeforeDragging`,e[e.WhileDragging=2]=`WhileDragging`})(G0||={});var K0;(function(e){e.Optimized=`optimized`})(K0||={});var q0=new Map;function J0(e,t){let{dragging:n,dependencies:r,config:i}=t,[a,o]=(0,q.useState)(null),{frequency:s,measure:c,strategy:l}=i,u=(0,q.useRef)(e),d=g(),f=t1(d),p=(0,q.useCallback)(function(e){e===void 0&&(e=[]),!f.current&&o(t=>t===null?e:t.concat(e.filter(e=>!t.includes(e))))},[f]),m=(0,q.useRef)(null),h=n1(t=>{if(d&&!n)return q0;if(!t||t===q0||u.current!==e||a!=null){let t=new Map;for(let n of e){if(!n)continue;if(a&&a.length>0&&!a.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}let e=n.node.current,r=e?new _0(c(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t},[e,a,n,d,c]);return(0,q.useEffect)(()=>{u.current=e},[e]),(0,q.useEffect)(()=>{d||p()},[n,d]),(0,q.useEffect)(()=>{a&&a.length>0&&o(null)},[JSON.stringify(a)]),(0,q.useEffect)(()=>{d||typeof s!=`number`||m.current!==null||(m.current=setTimeout(()=>{p(),m.current=null},s))},[s,d,p,...r]),{droppableRects:h,measureDroppableContainers:p,measuringScheduled:a!=null};function g(){switch(l){case G0.Always:return!1;case G0.BeforeDragging:return n;default:return!n}}}function Y0(e,t){return n1(n=>e?n||(typeof t==`function`?t(e):e):null,[t,e])}function X0(e,t){return Y0(e,t)}function Z0(e){let{callback:t,disabled:n}=e,r=$$(t),i=(0,q.useMemo)(()=>{if(n||typeof window>`u`||window.MutationObserver===void 0)return;let{MutationObserver:e}=window;return new e(r)},[r,n]);return(0,q.useEffect)(()=>()=>i?.disconnect(),[i]),i}function Q0(e){let{callback:t,disabled:n}=e,r=$$(t),i=(0,q.useMemo)(()=>{if(n||typeof window>`u`||window.ResizeObserver===void 0)return;let{ResizeObserver:e}=window;return new e(r)},[n]);return(0,q.useEffect)(()=>()=>i?.disconnect(),[i]),i}function $0(e){return new _0(Y1(e),e)}function e2(e,t,n){t===void 0&&(t=$0);let[r,i]=(0,q.useState)(null);function a(){i(r=>{if(!e)return null;if(e.isConnected===!1)return r??n??null;let i=t(e);return JSON.stringify(r)===JSON.stringify(i)?r:i})}let o=Z0({callback(t){if(e)for(let n of t){let{type:t,target:r}=n;if(t===`childList`&&r instanceof HTMLElement&&r.contains(e)){a();break}}}}),s=Q0({callback:a});return Q$(()=>{a(),e?(s?.observe(e),o?.observe(document.body,{childList:!0,subtree:!0})):(s?.disconnect(),o?.disconnect())},[e]),r}function t2(e){return U1(e,Y0(e))}var n2=[];function r2(e){let t=(0,q.useRef)(e),n=n1(n=>e?n&&n!==n2&&e&&t.current&&e.parentNode===t.current.parentNode?n:e0(e):n2,[e]);return(0,q.useEffect)(()=>{t.current=e},[e]),n}function i2(e){let[t,n]=(0,q.useState)(null),r=(0,q.useRef)(e),i=(0,q.useCallback)(e=>{let t=n0(e.target);t&&n(e=>e?(e.set(t,a0(t)),new Map(e)):null)},[]);return(0,q.useEffect)(()=>{let t=r.current;if(e!==t){a(t);let o=e.map(e=>{let t=n0(e);return t?(t.addEventListener(`scroll`,i,{passive:!0}),[t,a0(t)]):null}).filter(e=>e!=null);n(o.length?new Map(o):null),r.current=e}return()=>{a(e),a(t)};function a(e){e.forEach(e=>{n0(e)?.removeEventListener(`scroll`,i)})}},[i,e]),(0,q.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>c1(e,t),j1):f0(e):j1,[e,t])}function a2(e,t){t===void 0&&(t=[]);let n=(0,q.useRef)(null);return(0,q.useEffect)(()=>{n.current=null},t),(0,q.useEffect)(()=>{let t=e!==j1;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?l1(e,n.current):j1}function o2(e){(0,q.useEffect)(()=>{if(!W$)return;let t=e.map(e=>{let{sensor:t}=e;return t.setup==null?void 0:t.setup()});return()=>{for(let e of t)e?.()}},e.map(e=>{let{sensor:t}=e;return t}))}function s2(e,t){return(0,q.useMemo)(()=>e.reduce((e,n)=>{let{eventName:r,handler:i}=n;return e[r]=e=>{i(e,t)},e},{}),[e,t])}function c2(e){return(0,q.useMemo)(()=>e?Z1(e):null,[e])}var l2=[];function u2(e,t){t===void 0&&(t=Y1);let[n]=e,r=c2(n?q$(n):null),[i,a]=(0,q.useState)(l2);function o(){a(()=>e.length?e.map(e=>s0(e)?r:new _0(t(e),e)):l2)}let s=Q0({callback:o});return Q$(()=>{s?.disconnect(),o(),e.forEach(e=>s?.observe(e))},[e]),i}function d2(e){if(!e)return null;if(e.children.length>1)return e;let t=e.children[0];return Y$(t)?t:e}function f2(e){let{measure:t}=e,[n,r]=(0,q.useState)(null),i=Q0({callback:(0,q.useCallback)(e=>{for(let{target:n}of e)if(Y$(n)){r(e=>{let r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t])}),[a,o]=r1((0,q.useCallback)(e=>{let n=d2(e);i?.disconnect(),n&&i?.observe(n),r(n?t(n):null)},[t,i]));return(0,q.useMemo)(()=>({nodeRef:a,rect:n,setRef:o}),[n,a,o])}var p2=[{sensor:M0,options:{}},{sensor:D0,options:{}}],m2={current:{}},h2={draggable:{measure:X1},droppable:{measure:X1,strategy:G0.WhileDragging,frequency:K0.Optimized},dragOverlay:{measure:Y1}},g2=class extends Map{get(e){return e==null?void 0:super.get(e)??void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){return this.get(e)?.node.current??void 0}},_2={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new g2,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:O1},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:h2,measureDroppableContainers:O1,windowRect:null,measuringScheduled:!1},v2={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:``},dispatch:O1,draggableNodes:new Map,over:null,measureDroppableContainers:O1},y2=(0,q.createContext)(v2),b2=(0,q.createContext)(_2);function x2(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new g2}}}function S2(e,t){switch(t.type){case D1.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case D1.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case D1.DragEnd:case D1.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case D1.RegisterDroppable:{let{element:n}=t,{id:r}=n,i=new g2(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case D1.SetDroppableDisabled:{let{id:n,key:r,disabled:i}=t,a=e.droppable.containers.get(n);if(!a||r!==a.key)return e;let o=new g2(e.droppable.containers);return o.set(n,{...a,disabled:i}),{...e,droppable:{...e.droppable,containers:o}}}case D1.UnregisterDroppable:{let{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;let a=new g2(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function C2(e){let{disabled:t}=e,{active:n,activatorEvent:r,draggableNodes:i}=(0,q.useContext)(y2),a=i1(r),o=i1(n?.id);return(0,q.useEffect)(()=>{if(!t&&!r&&a&&o!=null){if(!d1(a)||document.activeElement===a.target)return;let e=i.get(o);if(!e)return;let{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(let e of[t.current,n.current]){if(!e)continue;let t=g1(e);if(t){t.focus();break}}})}},[r,t,i,o,a]),null}function w2(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}function T2(e){return(0,q.useMemo)(()=>({draggable:{...h2.draggable,...e?.draggable},droppable:{...h2.droppable,...e?.droppable},dragOverlay:{...h2.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function E2(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e,a=(0,q.useRef)(!1),{x:o,y:s}=typeof i==`boolean`?{x:i,y:i}:i;Q$(()=>{if(!o&&!s||!t){a.current=!1;return}if(a.current||!r)return;let e=t?.node.current;if(!e||e.isConnected===!1)return;let i=U1(n(e),r);if(o||(i.x=0),s||(i.y=0),a.current=!0,Math.abs(i.x)>0||Math.abs(i.y)>0){let t=t0(e);t&&t.scrollBy({top:i.y,left:i.x})}},[t,o,s,r,n])}var D2=(0,q.createContext)({...j1,scaleX:1,scaleY:1}),O2;(function(e){e[e.Uninitialized=0]=`Uninitialized`,e[e.Initializing=1]=`Initializing`,e[e.Initialized=2]=`Initialized`})(O2||={});var k2=(0,q.memo)(function(e){let{id:t,accessibility:n,autoScroll:r=!0,children:i,sensors:a=p2,collisionDetection:o=V1,measuring:s,modifiers:c,...l}=e,[u,d]=(0,q.useReducer)(S2,void 0,x2),[f,p]=C1(),[m,h]=(0,q.useState)(O2.Uninitialized),g=m===O2.Initialized,{draggable:{active:_,nodes:v,translate:y},droppable:{containers:b}}=u,x=_==null?null:v.get(_),S=(0,q.useRef)({initial:null,translated:null}),C=(0,q.useMemo)(()=>_==null?null:{id:_,data:x?.data??m2,rect:S},[_,x]),w=(0,q.useRef)(null),[T,E]=(0,q.useState)(null),[D,O]=(0,q.useState)(null),k=t1(l,Object.values(l)),A=o1(`DndDescribedBy`,t),j=(0,q.useMemo)(()=>b.getEnabled(),[b]),M=T2(s),{droppableRects:N,measureDroppableContainers:P,measuringScheduled:ee}=J0(j,{dragging:g,dependencies:[y.x,y.y],config:M.droppable}),F=U0(v,_),I=(0,q.useMemo)(()=>D?p1(D):null,[D]),L=we(),te=X0(F,M.draggable.measure);E2({activeNode:_==null?null:v.get(_),config:L.layoutShiftCompensation,initialRect:te,measure:M.draggable.measure});let R=e2(F,M.draggable.measure,te),z=e2(F?F.parentElement:null),B=(0,q.useRef)({activatorEvent:null,active:null,activeNode:F,collisionRect:null,collisions:null,droppableRects:N,draggableNodes:v,draggingNode:null,draggingNodeRect:null,droppableContainers:b,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ne=b.getNodeFor(B.current.over?.id),re=f2({measure:M.dragOverlay.measure}),ie=re.nodeRef.current??F,ae=g?re.rect??R:null,oe=!!(re.nodeRef.current&&re.rect),V=t2(oe?null:R),se=c2(ie?q$(ie):null),H=r2(g?ne??F:null),ce=u2(H),le=w2(c,{transform:{x:y.x-V.x,y:y.y-V.y,scaleX:1,scaleY:1},activatorEvent:D,active:C,activeNodeRect:R,containerNodeRect:z,draggingNodeRect:ae,over:B.current.over,overlayNodeRect:re.rect,scrollableAncestors:H,scrollableAncestorRects:ce,windowRect:se}),U=I?c1(I,y):null,ue=i2(H),de=a2(ue),fe=a2(ue,[R]),pe=c1(le,de),me=ae?G1(ae,le):null,he=C&&me?o({active:C,collisionRect:me,droppableRects:N,droppableContainers:j,pointerCoordinates:U}):null,ge=I1(he,`id`),[_e,ve]=(0,q.useState)(null),ye=H1(oe?le:c1(le,fe),_e?.rect??null,R),be=(0,q.useRef)(null),xe=(0,q.useCallback)((e,t)=>{let{sensor:n,options:r}=t;if(w.current==null)return;let i=v.get(w.current);if(!i)return;let a=e.nativeEvent,o=new n({active:w.current,activeNode:i,event:a,options:r,context:B,onAbort(e){if(!v.get(e))return;let{onDragAbort:t}=k.current,n={id:e};t?.(n),f({type:`onDragAbort`,event:n})},onPending(e,t,n,r){if(!v.get(e))return;let{onDragPending:i}=k.current,a={id:e,constraint:t,initialCoordinates:n,offset:r};i?.(a),f({type:`onDragPending`,event:a})},onStart(e){let t=w.current;if(t==null)return;let n=v.get(t);if(!n)return;let{onDragStart:r}=k.current,i={activatorEvent:a,active:{id:t,data:n.data,rect:S}};(0,nc.unstable_batchedUpdates)(()=>{r?.(i),h(O2.Initializing),d({type:D1.DragStart,initialCoordinates:e,active:t}),f({type:`onDragStart`,event:i}),E(be.current),O(a)})},onMove(e){d({type:D1.DragMove,coordinates:e})},onEnd:s(D1.DragEnd),onCancel:s(D1.DragCancel)});be.current=o;function s(e){return async function(){let{active:t,collisions:n,over:r,scrollAdjustedTranslate:i}=B.current,o=null;if(t&&i){let{cancelDrop:s}=k.current;o={activatorEvent:a,active:t,collisions:n,delta:i,over:r},e===D1.DragEnd&&typeof s==`function`&&await Promise.resolve(s(o))&&(e=D1.DragCancel)}w.current=null,(0,nc.unstable_batchedUpdates)(()=>{d({type:e}),h(O2.Uninitialized),ve(null),E(null),O(null),be.current=null;let t=e===D1.DragEnd?`onDragEnd`:`onDragCancel`;if(o){let e=k.current[t];e?.(o),f({type:t,event:o})}})}}},[v]),W=W0(a,(0,q.useCallback)((e,t)=>(n,r)=>{let i=n.nativeEvent,a=v.get(r);if(w.current!==null||!a||i.dndKit||i.defaultPrevented)return;let o={active:a};e(n,t.options,o)===!0&&(i.dndKit={capturedBy:t.sensor},w.current=r,xe(n,t))},[v,xe]));o2(a),Q$(()=>{R&&m===O2.Initializing&&h(O2.Initialized)},[R,m]),(0,q.useEffect)(()=>{let{onDragMove:e}=k.current,{active:t,activatorEvent:n,collisions:r,over:i}=B.current;if(!t||!n)return;let a={active:t,activatorEvent:n,collisions:r,delta:{x:pe.x,y:pe.y},over:i};(0,nc.unstable_batchedUpdates)(()=>{e?.(a),f({type:`onDragMove`,event:a})})},[pe.x,pe.y]),(0,q.useEffect)(()=>{let{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:i}=B.current;if(!e||w.current==null||!t||!i)return;let{onDragOver:a}=k.current,o=r.get(ge),s=o&&o.rect.current?{id:o.id,rect:o.rect.current,data:o.data,disabled:o.disabled}:null,c={active:e,activatorEvent:t,collisions:n,delta:{x:i.x,y:i.y},over:s};(0,nc.unstable_batchedUpdates)(()=>{ve(s),a?.(c),f({type:`onDragOver`,event:c})})},[ge]),Q$(()=>{B.current={activatorEvent:D,active:C,activeNode:F,collisionRect:me,collisions:he,droppableRects:N,draggableNodes:v,draggingNode:ie,draggingNodeRect:ae,droppableContainers:b,over:_e,scrollableAncestors:H,scrollAdjustedTranslate:pe},S.current={initial:ae,translated:me}},[C,F,he,me,v,ie,ae,N,b,_e,H,pe]),B0({...L,delta:y,draggingRect:me,pointerCoordinates:U,scrollableAncestors:H,scrollableAncestorRects:ce});let Se=(0,q.useMemo)(()=>({active:C,activeNode:F,activeNodeRect:R,activatorEvent:D,collisions:he,containerNodeRect:z,dragOverlay:re,draggableNodes:v,droppableContainers:b,droppableRects:N,over:_e,measureDroppableContainers:P,scrollableAncestors:H,scrollableAncestorRects:ce,measuringConfiguration:M,measuringScheduled:ee,windowRect:se}),[C,F,R,D,he,z,re,v,b,N,_e,P,H,ce,M,ee,se]),Ce=(0,q.useMemo)(()=>({activatorEvent:D,activators:W,active:C,activeNodeRect:R,ariaDescribedById:{draggable:A},dispatch:d,draggableNodes:v,over:_e,measureDroppableContainers:P}),[D,W,C,R,d,A,v,_e,P]);return q.createElement(x1.Provider,{value:p},q.createElement(y2.Provider,{value:Ce},q.createElement(b2.Provider,{value:Se},q.createElement(D2.Provider,{value:ye},i)),q.createElement(C2,{disabled:n?.restoreFocus===!1})),q.createElement(E1,{...n,hiddenTextDescribedById:A}));function we(){let e=T?.autoScrollEnabled===!1,t=typeof r==`object`?r.enabled===!1:r===!1,n=g&&!e&&!t;return typeof r==`object`?{...r,enabled:n}:{enabled:n}}}),A2=(0,q.createContext)(null),j2=`button`,M2=`Draggable`;function N2(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e,a=o1(M2),{activators:o,activatorEvent:s,active:c,activeNodeRect:l,ariaDescribedById:u,draggableNodes:d,over:f}=(0,q.useContext)(y2),{role:p=j2,roleDescription:m=`draggable`,tabIndex:h=0}=i??{},g=c?.id===t,_=(0,q.useContext)(g?D2:A2),[v,y]=r1(),[b,x]=r1(),S=s2(o,t),C=t1(n);return Q$(()=>(d.set(t,{id:t,key:a,node:v,activatorNode:b,data:C}),()=>{let e=d.get(t);e&&e.key===a&&d.delete(t)}),[d,t]),{active:c,activatorEvent:s,activeNodeRect:l,attributes:(0,q.useMemo)(()=>({role:p,tabIndex:h,"aria-disabled":r,"aria-pressed":g&&p===j2?!0:void 0,"aria-roledescription":m,"aria-describedby":u.draggable}),[r,p,h,g,m,u.draggable]),isDragging:g,listeners:r?void 0:S,node:v,over:f,setNodeRef:y,setActivatorNodeRef:x,transform:_}}function P2(){return(0,q.useContext)(b2)}var F2=`Droppable`,I2={timeout:25};function L2(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e,a=o1(F2),{active:o,dispatch:s,over:c,measureDroppableContainers:l}=(0,q.useContext)(y2),u=(0,q.useRef)({disabled:n}),d=(0,q.useRef)(!1),f=(0,q.useRef)(null),p=(0,q.useRef)(null),{disabled:m,updateMeasurementsFor:h,timeout:g}={...I2,...i},_=t1(h??r),v=Q0({callback:(0,q.useCallback)(()=>{d.current?(p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{l(Array.isArray(_.current)?_.current:[_.current]),p.current=null},g)):d.current=!0},[g]),disabled:m||!o}),[y,b]=r1((0,q.useCallback)((e,t)=>{v&&(t&&(v.unobserve(t),d.current=!1),e&&v.observe(e))},[v])),x=t1(t);return(0,q.useEffect)(()=>{v&&y.current&&(v.disconnect(),d.current=!1,v.observe(y.current))},[y,v]),(0,q.useEffect)(()=>(s({type:D1.RegisterDroppable,element:{id:r,key:a,disabled:n,node:y,rect:f,data:x}}),()=>s({type:D1.UnregisterDroppable,key:a,id:r})),[r]),(0,q.useEffect)(()=>{n!==u.current.disabled&&(s({type:D1.SetDroppableDisabled,id:r,key:a,disabled:n}),u.current.disabled=n)},[r,a,n,s]),{active:o,rect:f,isOver:c?.id===r,node:y,over:c,setNodeRef:b}}function R2(e,t,n){let r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function z2(e,t){return e.reduce((e,n,r)=>{let i=t.get(n);return i&&(e[r]=i),e},Array(e.length))}function B2(e){return e!==null&&e>=0}function V2(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function H2(e){return typeof e==`boolean`?{draggable:e,droppable:e}:e}var U2=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e,a=R2(t,r,n),o=t[i],s=a[i];return!s||!o?null:{x:s.left-o.left,y:s.top-o.top,scaleX:s.width/o.width,scaleY:s.height/o.height}},W2={scaleX:1,scaleY:1},G2=e=>{let{activeIndex:t,activeNodeRect:n,index:r,rects:i,overIndex:a}=e,o=i[t]??n;if(!o)return null;if(r===t){let e=i[a];return e?{x:0,y:t<a?e.top+e.height-(o.top+o.height):e.top-o.top,...W2}:null}let s=K2(i,r,t);return r>t&&r<=a?{x:0,y:-o.height-s,...W2}:r<t&&r>=a?{x:0,y:o.height+s,...W2}:{x:0,y:0,...W2}};function K2(e,t,n){let r=e[t],i=e[t-1],a=e[t+1];return r?n<t?i?r.top-(i.top+i.height):a?a.top-(r.top+r.height):0:a?a.top-(r.top+r.height):i?r.top-(i.top+i.height):0:0}var q2=`Sortable`,J2=q.createContext({activeIndex:-1,containerId:q2,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:U2,disabled:{draggable:!1,droppable:!1}});function Y2(e){let{children:t,id:n,items:r,strategy:i=U2,disabled:a=!1}=e,{active:o,dragOverlay:s,droppableRects:c,over:l,measureDroppableContainers:u}=P2(),d=o1(q2,n),f=s.rect!==null,p=(0,q.useMemo)(()=>r.map(e=>typeof e==`object`&&`id`in e?e.id:e),[r]),m=o!=null,h=o?p.indexOf(o.id):-1,g=l?p.indexOf(l.id):-1,_=(0,q.useRef)(p),v=!V2(p,_.current),y=g!==-1&&h===-1||v,b=H2(a);Q$(()=>{v&&m&&u(p)},[v,p,m,u]),(0,q.useEffect)(()=>{_.current=p},[p]);let x=(0,q.useMemo)(()=>({activeIndex:h,containerId:d,disabled:b,disableTransforms:y,items:p,overIndex:g,useDragOverlay:f,sortedRects:z2(p,c),strategy:i}),[h,d,b.draggable,b.droppable,y,p,g,c,f,i]);return q.createElement(J2.Provider,{value:x},t)}var X2=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return R2(n,r,i).indexOf(t)},Z2=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:a,newIndex:o,previousItems:s,previousContainerId:c,transition:l}=e;return!l||!r||s!==a&&i===o?!1:n?!0:o!==i&&t===c},Q2={duration:200,easing:`ease`},$2=`transform`,e4=m1.Transition.toString({property:$2,duration:0,easing:`linear`}),t4={roleDescription:`sortable`};function n4(e){let{disabled:t,index:n,node:r,rect:i}=e,[a,o]=(0,q.useState)(null),s=(0,q.useRef)(n);return Q$(()=>{if(!t&&n!==s.current&&r.current){let e=i.current;if(e){let t=Y1(r.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&o(n)}}n!==s.current&&(s.current=n)},[t,n,r,i]),(0,q.useEffect)(()=>{a&&o(null)},[a]),a}function r4(e){let{animateLayoutChanges:t=Z2,attributes:n,disabled:r,data:i,getNewIndex:a=X2,id:o,strategy:s,resizeObserverConfig:c,transition:l=Q2}=e,{items:u,containerId:d,activeIndex:f,disabled:p,disableTransforms:m,sortedRects:h,overIndex:g,useDragOverlay:_,strategy:v}=(0,q.useContext)(J2),y=i4(r,p),b=u.indexOf(o),x=(0,q.useMemo)(()=>({sortable:{containerId:d,index:b,items:u},...i}),[d,i,b,u]),S=(0,q.useMemo)(()=>u.slice(u.indexOf(o)),[u,o]),{rect:C,node:w,isOver:T,setNodeRef:E}=L2({id:o,data:x,disabled:y.droppable,resizeObserverConfig:{updateMeasurementsFor:S,...c}}),{active:D,activatorEvent:O,activeNodeRect:k,attributes:A,setNodeRef:j,listeners:M,isDragging:N,over:P,setActivatorNodeRef:ee,transform:F}=N2({id:o,data:x,attributes:{...t4,...n},disabled:y.draggable}),I=U$(E,j),L=!!D,te=L&&!m&&B2(f)&&B2(g),R=!_&&N,z=te?(R&&te?F:null)??(s??v)({rects:h,activeNodeRect:k,activeIndex:f,overIndex:g,index:b}):null,B=B2(f)&&B2(g)?a({id:o,items:u,activeIndex:f,overIndex:g}):b,ne=D?.id,re=(0,q.useRef)({activeId:ne,items:u,newIndex:B,containerId:d}),ie=u!==re.current.items,ae=t({active:D,containerId:d,isDragging:N,isSorting:L,id:o,index:b,items:u,newIndex:re.current.newIndex,previousItems:re.current.items,previousContainerId:re.current.containerId,transition:l,wasDragging:re.current.activeId!=null}),oe=n4({disabled:!ae,index:b,node:w,rect:C});return(0,q.useEffect)(()=>{L&&re.current.newIndex!==B&&(re.current.newIndex=B),d!==re.current.containerId&&(re.current.containerId=d),u!==re.current.items&&(re.current.items=u)},[L,B,d,u]),(0,q.useEffect)(()=>{if(ne===re.current.activeId)return;if(ne!=null&&re.current.activeId==null){re.current.activeId=ne;return}let e=setTimeout(()=>{re.current.activeId=ne},50);return()=>clearTimeout(e)},[ne]),{active:D,activeIndex:f,attributes:A,data:x,rect:C,index:b,newIndex:B,items:u,isOver:T,isSorting:L,isDragging:N,listeners:M,node:w,overIndex:g,over:P,setNodeRef:I,setActivatorNodeRef:ee,setDroppableNodeRef:E,setDraggableNodeRef:j,transform:oe??z,transition:V()};function V(){if(oe||ie&&re.current.newIndex===b)return e4;if(!(R&&!d1(O)||!l)&&(L||ae))return m1.Transition.toString({...l,property:$2})}}function i4(e,t){return typeof e==`boolean`?{draggable:e,droppable:!1}:{draggable:e?.draggable??t.draggable,droppable:e?.droppable??t.droppable}}function a4(e){if(!e)return!1;let t=e.data.current;return!!(t&&`sortable`in t&&typeof t.sortable==`object`&&`containerId`in t.sortable&&`items`in t.sortable&&`index`in t.sortable)}var o4=[w0.Down,w0.Right,w0.Up,w0.Left],s4=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:i,droppableContainers:a,over:o,scrollableAncestors:s}}=t;if(o4.includes(e.code)){if(e.preventDefault(),!n||!r)return;let t=[];a.getEnabled().forEach(n=>{if(!n||n!=null&&n.disabled)return;let a=i.get(n.id);if(a)switch(e.code){case w0.Down:r.top<a.top&&t.push(n);break;case w0.Up:r.top>a.top&&t.push(n);break;case w0.Left:r.left>a.left&&t.push(n);break;case w0.Right:r.left<a.left&&t.push(n)}});let c=z1({active:n,collisionRect:r,droppableRects:i,droppableContainers:t,pointerCoordinates:null}),l=I1(c,`id`);if(l===o?.id&&c.length>1&&(l=c[1].id),l!=null){let e=a.get(n.id),t=a.get(l),o=t?i.get(t.id):null,c=t?.node.current;if(c&&o&&e&&t){let n=e0(c).some((e,t)=>s[t]!==e),i=c4(e,t),a=l4(e,t),l=n||!i?{x:0,y:0}:{x:a?r.width-o.width:0,y:a?r.height-o.height:0},u={x:o.left,y:o.top};return l.x&&l.y?u:l1(u,l)}}}};function c4(e,t){return!a4(e)||!a4(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function l4(e,t){return!a4(e)||!a4(t)||!c4(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}var u4={ready:`bg-card text-ink ring-cheng/45 hover:bg-cheng-bg`,incomplete:`bg-gold-bg text-gold-deep ring-gold-deep/30 hover:bg-gold-bg/70`,missing:`bg-seal-bg text-seal-deep ring-seal/35 hover:bg-seal-bg/70`},d4=e=>{if(!e)return`missing`;let t=ev.some(t=>!e.fields[t]);return e.blocking||t?`incomplete`:`ready`},f4=e=>[...new Set([...e.matchAll(/\[(T\d+)\]/g)].map(e=>e[1]))];function p4({id:e,size:t=`sm`,className:n=``}){return(0,J.jsx)(`span`,{className:[`inline-flex shrink-0 items-center rounded-sm bg-cheng font-mono font-bold tracking-wide text-white`,t===`md`?`px-2 py-1 text-sm`:`px-1.5 py-0.5 text-[0.7rem]`,n].filter(Boolean).join(` `),children:e})}function m4({id:e,card:t,onOpen:n}){return(0,J.jsxs)(`button`,{type:`button`,title:t?`Open the card of ${e}: ${t.name}`:`Open the card of ${e}`,onClick:()=>n(e),className:`group inline-flex cursor-pointer items-center gap-1.5 rounded-sm py-0.5 pr-1.5 pl-1 text-xs font-medium ring-1 ring-inset transition duration-150 hover:shadow-paper focus-visible:ring-2 focus-visible:ring-cheng/60 focus-visible:outline-none ${u4[d4(t)]}`,children:[(0,J.jsx)(p4,{id:e}),(0,J.jsx)(`span`,{className:`underline-offset-2 group-hover:underline group-hover:decoration-dotted`,children:t?.name??`no target card`}),(0,J.jsx)(Jd,{size:12,className:`shrink-0 text-ink-3 transition-colors group-hover:text-ink-2`,"aria-hidden":`true`})]})}function h4({text:e,targets:t,onOpen:n}){let r=f4(e);return r.length===0?null:(0,J.jsx)(`span`,{className:`flex flex-wrap gap-1`,children:r.map(e=>(0,J.jsx)(m4,{id:e,card:t.get(e),onOpen:n},e))})}function g4({bullet:e,doc:t,targets:n,onOpenTarget:r,onChange:i,onRemove:a}){let{attributes:o,listeners:s,setNodeRef:c,transform:l,transition:u,isDragging:d}=r4({id:String(e.line)}),f=f4(e.text);return(0,J.jsxs)(`li`,{ref:c,style:{transform:m1.Transform.toString(l),transition:u},className:`px-2 py-1.5 ${d?`rounded bg-warm opacity-60 shadow-paper`:``}`,children:[(0,J.jsxs)(`div`,{className:`flex items-start gap-1`,children:[(0,J.jsx)(`button`,{...o,...s,"aria-label":`Drag to reorder`,title:`Drag to reorder (Space to lift, arrows to move, Space to drop)`,className:`mt-1.5 shrink-0 cursor-grab rounded p-0.5 text-ink-3 transition-colors hover:bg-warm hover:text-ink-2 focus-visible:ring-2 focus-visible:ring-theme/40 focus-visible:outline-none active:cursor-grabbing`,children:(0,J.jsx)(Uf,{size:14,"aria-hidden":`true`})}),(0,J.jsx)(H$,{value:e.text,onChange:n=>i(Ey(t.text,e,n)),ariaLabel:`Bullet at line ${e.line}`,maxHeight:180}),(0,J.jsx)(`button`,{className:`${X(`danger`)} shrink-0 px-1.5 py-1`,title:`Delete this bullet`,"aria-label":`Delete this bullet`,onClick:a,children:(0,J.jsx)(Gp,{size:14,"aria-hidden":`true`})})]}),f.length>0||e.questionLines.length>0?(0,J.jsxs)(`div`,{className:`mt-1 flex flex-wrap gap-1 pl-6`,children:[e.questionLines.length>0?(0,J.jsxs)(Ny,{tone:`amber`,children:[e.questionLines.length,` open `,e.questionLines.length===1?`question`:`questions`]}):null,f.map(e=>(0,J.jsx)(m4,{id:e,card:n.get(e),onOpen:r},e))]}):null]})}function _4({name:e,help:t,doc:n,onOpenTarget:r,onChange:i,defaultOpen:a=!0}){let o=Gv(n.text,e),s=new Map(n.targets.map(e=>[e.id,e])),[c,l]=(0,q.useState)(null),[u,d]=(0,q.useState)(``),f=A1(k1(M0,{activationConstraint:{distance:6}}),k1(D0,{coordinateGetter:s4})),p=t=>{let{active:r,over:a}=t;if(!a||r.id===a.id)return;let s=o.findIndex(e=>String(e.line)===r.id),c=o.findIndex(e=>String(e.line)===a.id);s>=0&&c>=0&&i(ky(n.text,e,s,c))},m=()=>{u.trim()!==``&&(i(Dy(n.text,e,u)),d(``))};return(0,J.jsxs)(AG,{title:e,help:t,storage:t,defaultOpen:a,count:o.length,tone:`blue`,children:[o.length===0?(0,J.jsx)(jG,{text:`No bullet yet.`}):null,o.length>0?(0,J.jsx)(k2,{sensors:f,collisionDetection:R1,onDragEnd:p,children:(0,J.jsx)(Y2,{items:o.map(e=>String(e.line)),strategy:G2,children:(0,J.jsx)(`ul`,{className:`divide-y divide-line`,children:o.map(e=>(0,J.jsx)(g4,{bullet:e,doc:n,targets:s,onOpenTarget:r,onChange:i,onRemove:()=>l(e)},e.line))})})}):null,(0,J.jsxs)(`form`,{className:`flex items-end gap-1 border-t border-line bg-warm px-2 py-1.5`,onSubmit:e=>{e.preventDefault(),m()},children:[(0,J.jsx)(`input`,{value:u,onChange:e=>d(e.target.value),placeholder:`Write a bullet and press Enter`,"aria-label":`Add a bullet to ${e}`,className:`${Uy} w-full py-1`}),(0,J.jsxs)(`button`,{className:`${X()} shrink-0 gap-1 py-1`,disabled:u.trim()===``,children:[(0,J.jsx)(Zf,{size:14,"aria-hidden":`true`}),`Add`]})]}),c?(0,J.jsx)(Zy,{title:`Delete this bullet?`,onClose:()=>l(null),children:(0,J.jsxs)(`div`,{className:`space-y-3 text-sm`,children:[(0,J.jsx)(`p`,{className:`rounded border border-line bg-warm px-2 py-1.5 text-ink`,children:c.text}),c.questionLines.length>0?(0,J.jsxs)(`p`,{className:`rounded border border-seal/40 bg-seal-bg px-2 py-1.5 text-seal-deep`,children:[c.questionLines.length,` `,c.questionLines.length===1?`open question hangs`:`open questions hang`,` under this bullet and`,` `,c.questionLines.length===1?`is`:`are`,` deleted with it.`]}):null,(0,J.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,J.jsx)(`button`,{type:`button`,className:X(),onClick:()=>l(null),autoFocus:!0,children:`Cancel`}),(0,J.jsx)(`button`,{type:`button`,className:X(`stop`),onClick:()=>{i(Oy(n.text,c)),l(null)},children:`Delete bullet`})]})]})}):null]})}function v4(e,t,n){let r=e.position?.start.offset,i=e.position?.end.offset;if(r===void 0||i===void 0)return t.map(()=>null);let a=n.slice(r,i),o=[],s=0,c=0;for(let n of t){if(a===e.value)o.push(r+c);else{let e=a.indexOf(n.text,s);o.push(e===-1?null:r+e),e!==-1&&(s=e+n.text.length)}c+=n.text.length}return o}function y4(e,t){if(!e.children)return;let n=[];for(let r of e.children){if(r.type!==`text`||r.value===void 0){y4(r,t),n.push(r);continue}let e=u$(r.value),i=v4(r,e,t.source);e.forEach((e,r)=>{if(e.kind===null){n.push({type:`text`,value:e.text});return}let a=i[r],o=a===null?null:a+t.offset,s=o===null?null:o+e.text.length;n.push({type:`element`,tagName:`mark`,properties:{className:r$[e.kind].split(` `),dataKw:e.kind,...o!==null&&s!==null&&{dataKwFrom:o,dataKwTo:s}},children:[{type:`text`,value:e.text}]}),t.removable&&o!==null&&s!==null&&S$(t.fullText,o,s,e.kind)&&n.push({type:`element`,tagName:`button`,properties:{type:`button`,className:[`kw-remove`,`kw-remove-${e.kind}`],dataKwRemove:e.kind,dataKwFrom:o,dataKwTo:s,ariaLabel:d$[e.kind],title:d$[e.kind]},children:[]})})}e.children=n}function b4(e={}){return(t,n)=>{y4(t,{source:typeof n.value==`string`?n.value:``,offset:e.offset??0,fullText:e.fullText??``,removable:e.removable??!0})}}var x4=new Set([`p`,`h1`,`h2`,`h3`,`h4`,`h5`,`h6`,`pre`,`hr`,`tr`,`li`]),S4=new Set([`ul`,`ol`]),C4=(e,t)=>e.type===`element`&&t.has(e.tagName??``);function w4(e,t){for(let n of e.children??[]){if(n.position&&C4(n,x4)){let e=n.position.start.line,r=n.position.end.line,i=!0;if(n.tagName===`li`){let t=n.children??[];t.some(e=>C4(e,new Set([`p`])))&&(i=!1);let a=t.find(e=>C4(e,S4)&&e.position);a?.position&&(r=Math.max(e,a.position.start.line-1))}i&&(n.properties={...n.properties,dataLineStart:e+t,dataLineEnd:r+t})}w4(n,t)}}function T4(e={}){let t=e.offset??0;return e=>w4(e,t)}function E4({content:e,lineOffset:t=0,keywords:n,clickable:r=!1,className:i=``}){let a=[];return n&&a.push([b4,{offset:n.charOffset,fullText:n.fullText,removable:n.removable}]),a.push([T4,{offset:t}]),(0,J.jsx)(`div`,{className:`prose max-w-none prose-table:text-sm prose-code:before:content-none prose-code:after:content-none ${i}`,children:(0,J.jsx)(qE,{remarkPlugins:[mA],rehypePlugins:a,components:{button:({node:e,children:t,...n})=>(0,J.jsx)(`button`,{...n,children:(0,J.jsx)(n$,{})}),p:({node:e,children:t,...n})=>(0,J.jsx)(`p`,{...n,className:`-mx-1 rounded px-1 ${r?`hover:bg-warm`:``}`,children:t})},children:e})})}function D4({body:e,line:t,onRevealLine:n}){return(0,J.jsx)(`div`,{className:`px-3 py-2 text-sm ${n?`cursor-pointer`:``}`,title:n?`Click a paragraph to edit it in the source`:void 0,onClick:n?e=>{let t=e.target;if(t.closest(`a`))return;let r=t.closest(`[data-line-start]`);if(!r)return;let i=Number(r.getAttribute(`data-line-start`));Number.isInteger(i)&&n(i)}:void 0,children:(0,J.jsx)(E4,{content:e,lineOffset:t-1,keywords:{charOffset:0,fullText:``,removable:!1},clickable:!!n})})}function O4({name:e,help:t,doc:n,onRevealLine:r}){let i=Wv(n.text,e);return i?(0,J.jsx)(AG,{title:e,help:t,storage:t,defaultOpen:!1,children:(0,J.jsx)(D4,{body:i.body,line:i.line,onRevealLine:r})}):null}function k4({doc:e}){let t=Wv(e.text,`Source`);return t?(0,J.jsxs)(AG,{title:`Source`,help:`source`,storage:`source`,defaultOpen:!1,children:[(0,J.jsx)(`p`,{className:`px-3 pt-2 text-xs text-ink-3`,children:`Original notes, verbatim. Do not edit this table; it only exists so a reviewer can check what became of each line.`}),(0,J.jsx)(D4,{body:t.body,line:t.line})]}):null}function A4({label:e,values:t,options:n,onChange:r,placeholder:i,allowNew:a=!0,keepOne:o=!1,keepOneHint:s=`At least one value is needed; add another one first.`,emptyText:c=`Nothing matches.`}){let[l,u]=(0,q.useState)(``),[d,f]=(0,q.useState)(!1),[p,m]=(0,q.useState)(null),[h,g]=(0,q.useState)(0),_=(0,q.useRef)(null),v=(0,q.useRef)(null),y=(0,q.useRef)(null),b=(0,q.useId)(),x=l.trim().toLowerCase(),S=n.filter(e=>!t.includes(e)),C=(x===``?S:S.filter(e=>e.includes(x))).slice(0,8).map(e=>({value:e,isNew:!1})),w=l.trim(),T=a&&w!==``&&q_.test(w)&&!t.includes(w)&&!n.includes(w)?[...C,{value:w,isNew:!0}]:C,E=p!==null,D=E&&(T.length>0||w!==``);(0,q.useEffect)(()=>{g(0)},[l,t.length]),(0,q.useEffect)(()=>{if(!p)return;let e=e=>{let t=e.target;_.current?.contains(t)||y.current?.contains(t)||m(null)},t=e=>{e.key===`Escape`&&m(null)},n=()=>m(null);return window.addEventListener(`mousedown`,e),window.addEventListener(`keydown`,t),window.addEventListener(`resize`,n),window.addEventListener(`scroll`,n,!0),()=>{window.removeEventListener(`mousedown`,e),window.removeEventListener(`keydown`,t),window.removeEventListener(`resize`,n),window.removeEventListener(`scroll`,n,!0)}},[p]);let O=()=>{if(p)return;let e=_.current?.getBoundingClientRect();e&&m({left:e.left,top:e.bottom+4,width:Math.max(e.width,224)})},k=e=>{let i=e.split(`,`).map(e=>e.trim()).filter(e=>e!==``),o=[...t],s=[];for(let e of i)n.includes(e)||a&&q_.test(e)?o.includes(e)||o.push(e):s.push(e);return o.length!==t.length&&r(o),s.join(`, `)},A=e=>{t.includes(e)||r([...t,e]),u(``),f(!1),O()},j=()=>{if(D&&T.length>0){A(T[Math.min(h,T.length-1)].value);return}let e=k(l);u(e),f(e!==``)},M=e=>{let t=e.lastIndexOf(`,`);if(t===-1){u(e),f(!1),O();return}let n=k(e.slice(0,t)),r=e.slice(t+1).trimStart();u(n===``?r:`${n}, ${r}`),f(n!==``)},N=e=>r(t.filter(t=>t!==e));return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`div`,{ref:_,onClick:e=>{e.target===e.currentTarget&&v.current?.focus()},className:[`flex min-h-8 flex-wrap items-center gap-1 rounded border bg-white px-1.5 py-1 transition-colors`,d?`border-seal focus-within:border-seal focus-within:ring-2 focus-within:ring-seal/25`:`border-line-mid focus-within:border-theme focus-within:ring-2 focus-within:ring-theme/25`].join(` `),children:[t.map(e=>{let n=o&&t.length===1;return(0,J.jsxs)(`span`,{title:n?s:void 0,className:`inline-flex h-6 items-center gap-0.5 rounded-sm bg-warm pr-0.5 pl-1.5 font-mono text-xs text-ink-2 ring-1 ring-line-mid ring-inset`,children:[e,(0,J.jsx)(`button`,{type:`button`,"aria-label":`Remove ${e}`,title:n?void 0:`Remove ${e}`,disabled:n,onClick:()=>N(e),className:`rounded p-0.5 text-ink-3 transition-colors hover:text-seal-deep focus-visible:ring-2 focus-visible:ring-theme/40 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-40`,children:(0,J.jsx)(Gp,{size:12,"aria-hidden":`true`})})]},e)}),(0,J.jsx)(`input`,{ref:v,value:l,role:`combobox`,"aria-label":e,"aria-autocomplete":`list`,"aria-expanded":D,"aria-controls":b,"aria-activedescendant":D&&T.length>0?`${b}-${Math.min(h,T.length-1)}`:void 0,"aria-invalid":d||void 0,autoComplete:`off`,spellCheck:!1,placeholder:i,onChange:e=>M(e.target.value),onFocus:O,onKeyDown:e=>{if(e.key===`ArrowDown`||e.key===`ArrowUp`){if(e.preventDefault(),!E){O();return}if(T.length===0)return;g(t=>(t+(e.key===`ArrowDown`?1:-1)+T.length)%T.length)}else if(e.key===`Enter`)e.preventDefault(),j();else if(e.key===`,`){e.preventDefault();let t=k(l);u(t),f(t!==``),O()}else e.key===`Escape`?E?(e.preventDefault(),m(null)):l!==``&&(e.preventDefault(),u(``),f(!1)):e.key===`Backspace`&&l===``&&t.length>0&&!(o&&t.length===1)&&(e.preventDefault(),N(t[t.length-1]))},onBlur:()=>{if(m(null),l!==``){let e=l.trim();n.includes(e)&&!t.includes(e)&&r([...t,e]),u(``),f(!1)}},className:`h-6 min-w-[6rem] flex-1 bg-transparent font-mono text-xs text-ink placeholder:text-ink-3 focus:outline-none`})]}),D&&p?(0,nc.createPortal)((0,J.jsx)(`div`,{ref:y,id:b,role:`listbox`,"aria-label":e,style:{left:p.left,top:p.top,width:p.width},className:`card-popup fixed z-50 max-h-56 overflow-auto p-1`,children:T.length===0?(0,J.jsx)(`p`,{className:`px-2 py-1 text-xs text-ink-3`,children:c}):T.map((e,t)=>(0,J.jsxs)(`button`,{type:`button`,id:`${b}-${t}`,role:`option`,"aria-selected":t===Math.min(h,T.length-1),onMouseDown:e=>e.preventDefault(),onClick:()=>A(e.value),onMouseEnter:()=>g(t),className:[`flex w-full items-center gap-2 rounded-sm px-2 py-1 text-left font-mono text-xs transition-colors`,t===Math.min(h,T.length-1)?`bg-theme-bg text-theme-ink`:`text-ink`].join(` `),children:[(0,J.jsx)(`span`,{className:`truncate`,children:e.value}),e.isNew?(0,J.jsx)(`span`,{className:`ml-auto shrink-0 font-sans text-[0.7rem] text-ink-3`,children:`new`}):null]},`${e.isNew?`new`:`known`}:${e.value}`))}),document.body):null]})}function j4({label:e,envs:t,selected:n,onChange:r,blockedHint:i,keepOne:a=!1,keepOneHint:o=`At least one environment is needed.`}){let s=n.filter(e=>!t.includes(e)),c=e=>{if(n.includes(e)){if(a&&n.length<=1)return;r(n.filter(t=>t!==e))}else r([...n,e])};return(0,J.jsxs)(`span`,{role:`group`,"aria-label":e,className:`flex flex-wrap items-center gap-1`,children:[t.map(e=>{let t=n.includes(e),r=t&&a&&n.length<=1;return(0,J.jsxs)(`button`,{type:`button`,"aria-pressed":t,title:r?o:void 0,onClick:()=>c(e),className:[`inline-flex h-6 items-center gap-1 rounded-sm px-1.5 text-xs font-bold tracking-wider transition-colors`,`focus-visible:ring-2 focus-visible:ring-theme/40 focus-visible:outline-none`,t?Py(e):`bg-card text-ink-2 ring-1 ring-line-mid ring-inset hover:bg-warm hover:text-ink`,r?`cursor-not-allowed`:`cursor-pointer`].join(` `),children:[t?(0,J.jsx)(uu,{size:12,"aria-hidden":`true`}):null,e.toUpperCase()]},e)}),s.map(e=>(0,J.jsx)(`button`,{type:`button`,"aria-pressed":!0,title:i?.(e),onClick:()=>r(n.filter(t=>t!==e)),className:`inline-flex h-6 items-center gap-1 rounded-sm bg-seal-bg px-1.5 text-xs font-bold tracking-wider text-seal-deep ring-1 ring-seal/35 ring-inset transition-colors hover:bg-seal/15 focus-visible:ring-2 focus-visible:ring-seal/40 focus-visible:outline-none`,children:e.toUpperCase()},`blocked:${e}`))]})}var M4=new Set([`id`,`title`,`login`,`suites`,`writes`,`writes-note`,`envs`]),N4=e=>Array.isArray(e)?e.filter(e=>typeof e==`string`):[];function P4({doc:e,onChange:t,caseId:n,envs:r,suites:i}){let a=e.frontMatter;if(!a)return(0,J.jsx)(AG,{title:`Case settings`,help:`settings`,storage:`settings`,children:(0,J.jsx)(jG,{text:`This case has no front matter block. Add it in the source.`})});if(a.problem)return(0,J.jsx)(AG,{title:`Case settings`,help:`settings`,storage:`settings`,children:(0,J.jsxs)(`p`,{className:`flex items-start gap-1.5 px-3 py-2 text-sm text-seal-deep`,children:[(0,J.jsx)(Ml,{size:14,className:`mt-0.5 shrink-0`,"aria-hidden":`true`}),a.problem,` Fix it in the source; the form cannot read the keys.`]})});let o=a.data,s=typeof o.title==`string`?o.title:``,c=o.login===`none`?`none`:`required`,l=o.suites===void 0?o.priority===void 0?[]:[String(o.priority)]:N4(o.suites),u=N4(o.writes),d=o.envs===void 0?null:N4(o.envs),f=d===null?r:r.filter(e=>d.includes(e)),p=typeof o[`writes-note`]==`string`?o[`writes-note`]:``,m=Zv(n,o,r,`this case`).map(e=>e.replace(/^this case: /,``)),h=a.entries.filter(e=>!M4.has(e.key)),g=(n,r)=>t(Cy(e.text,n,r)),_=n=>{let r=Cy(e.text,`writes`,n);t(n.length>0&&o[`writes-note`]===void 0?Cy(r,`writes-note`,``):r)},v=n=>r.every(e=>n.includes(e))?t(wy(e.text,`envs`)):g(`envs`,r.filter(e=>n.includes(e))),y=`flex items-start gap-1 font-mono text-xs leading-snug text-ink-3`,b=`grid grid-cols-[8.5rem_1fr] items-start gap-2 border-t border-line px-3 py-2 first:border-t-0`,x=`text-xs text-ink-3`;return(0,J.jsx)(AG,{title:`Case settings`,help:`settings`,storage:`settings`,tone:m.length>0?`red`:`gray`,count:m.length>0?m.length:void 0,children:(0,J.jsxs)(`div`,{children:[m.length>0?(0,J.jsxs)(`p`,{className:`flex items-start gap-1.5 border-b border-seal/40 bg-seal-bg px-3 py-1.5 text-xs text-seal-deep`,children:[(0,J.jsx)(Ml,{size:14,className:`mt-0.5 shrink-0`,"aria-hidden":`true`}),m[0]]}):null,(0,J.jsxs)(`div`,{className:b,children:[(0,J.jsxs)(`span`,{className:y,children:[`id`,(0,J.jsx)(kG,{help:`field.id`})]}),(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-sm`,children:[(0,J.jsx)(`code`,{className:`font-mono`,children:n}),(0,J.jsx)(`span`,{className:`text-xs text-ink-3`,children:`rename or move it from the menu at the end of the tab strip`})]})]}),(0,J.jsxs)(`div`,{className:b,children:[(0,J.jsxs)(`span`,{className:y,children:[`title`,(0,J.jsx)(kG,{help:`field.title`})]}),(0,J.jsx)(H$,{value:s,onChange:e=>g(`title`,e),ariaLabel:`title`,placeholder:`One line: what this case proves`,singleLine:!0,maxHeight:80})]}),(0,J.jsxs)(`div`,{className:b,children:[(0,J.jsxs)(`span`,{className:y,children:[`login`,(0,J.jsx)(kG,{help:`field.login`})]}),(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,J.jsx)(`span`,{className:`flex overflow-hidden rounded ring-1 ring-line-mid`,children:[`required`,`none`].map(e=>(0,J.jsx)(`button`,{type:`button`,"aria-pressed":c===e,onClick:()=>g(`login`,e),className:`px-3 py-0.5 text-xs ${c===e?`bg-theme-btn text-white`:`bg-card text-ink-2 hover:bg-warm`}`,children:e},e))}),(0,J.jsx)(`span`,{className:`text-xs text-ink-3`,children:`none = public page, no saved session`})]})]}),(0,J.jsxs)(`div`,{className:b,children:[(0,J.jsxs)(`span`,{className:y,children:[`runs in`,(0,J.jsx)(kG,{help:`field.runs-in`})]}),(0,J.jsxs)(`div`,{className:`space-y-1`,children:[(0,J.jsx)(j4,{label:`runs in`,envs:r,selected:f,onChange:v,keepOne:!0,keepOneHint:`A case runs in at least one environment; press another one first.`}),(0,J.jsx)(`p`,{className:x,children:`All pressed means every environment, including ones added later.`})]})]}),(0,J.jsxs)(`div`,{className:b,children:[(0,J.jsxs)(`span`,{className:y,children:[`suites`,(0,J.jsx)(kG,{help:`field.suites`})]}),(0,J.jsxs)(`div`,{className:`space-y-1`,children:[(0,J.jsx)(A4,{label:`suites`,values:l,options:i,onChange:e=>g(`suites`,e),placeholder:`Add a suite…`,keepOne:!0,keepOneHint:`A case needs at least one suite; add another one first.`,emptyText:`No suite matches; a name uses lowercase letters, digits and dashes.`}),(0,J.jsx)(`p`,{className:x,children:`The case runs in every suite it lists.`})]})]}),(0,J.jsxs)(`div`,{className:b,children:[(0,J.jsxs)(`span`,{className:y,children:[`writes data in`,(0,J.jsx)(kG,{help:`field.writes`})]}),(0,J.jsxs)(`div`,{className:`space-y-1`,children:[(0,J.jsx)(j4,{label:`writes data in`,envs:f,selected:u,onChange:_,blockedHint:e=>`The case does not run in ${e}: press it under "runs in", or click to remove it here.`}),(0,J.jsx)(`p`,{className:x,children:`Nothing pressed means read-only: the case changes no test data.`})]})]}),u.length>0?(0,J.jsxs)(`div`,{className:b,children:[(0,J.jsxs)(`span`,{className:y,children:[`what it changes`,(0,J.jsx)(`span`,{className:`text-seal-deep`,children:`*`}),(0,J.jsx)(kG,{help:`field.writes-note`})]}),(0,J.jsxs)(`div`,{children:[(0,J.jsx)(H$,{value:p,onChange:e=>g(`writes-note`,e),ariaLabel:`writes-note`,placeholder:`What the case creates or changes, e.g. one [asrun] draft with the run stamp, deleted at the end.`,maxHeight:160}),(0,J.jsx)(`p`,{className:`mt-0.5 text-xs text-ink-3`,children:`Required once a write environment is pressed. Whoever confirms a run that writes data reads this first.`})]})]}):null,h.length>0?(0,J.jsxs)(`div`,{className:b,children:[(0,J.jsx)(`span`,{className:y,children:`other keys`}),(0,J.jsx)(`ul`,{className:`space-y-0.5`,children:h.map(e=>(0,J.jsxs)(`li`,{className:`font-mono text-xs text-ink-3`,children:[e.key,`: `,(0,J.jsx)(`span`,{className:`text-ink-2`,children:String(e.value)})]},e.key))})]}):null]})})}var F4=[`what`,`where`,`identified by`,`not`,`ready when`],I4={what:`What`,where:`Where`,"identified by":`Identified by`,not:`Not`,"ready when":`Ready when`},L4=e=>I4[e]??e,R4=e=>[...F4,...Object.keys(e.fields).filter(e=>!F4.includes(e))].filter(t=>e.fields[t]).map(t=>({label:L4(t),value:e.fields[t]}));function z4({profile:e,file:t,alt:n}){let[r,i]=(0,q.useState)(!1),a=bH(t);return(0,J.jsxs)(`figure`,{className:`min-w-0 space-y-1`,children:[(0,J.jsxs)(`figcaption`,{className:`text-xs text-ink-2`,children:[`Reference `,e,(0,J.jsx)(`span`,{className:`mt-0.5 block font-mono break-all text-[0.7rem] text-ink-3`,children:t})]}),a===null?null:r?(0,J.jsx)(`p`,{className:`rounded-sm border border-gold-deep/40 bg-gold-bg px-2 py-1 text-xs text-gold-deep`,children:`This screenshot is not on this machine (a fresh checkout has none).`}):(0,J.jsx)(`a`,{href:a,target:`_blank`,rel:`noreferrer`,className:`block`,title:`Open the screenshot at full size`,children:(0,J.jsx)(`img`,{src:a,alt:n,onError:()=>i(!0),className:`max-h-72 w-auto rounded-sm border border-line-mid bg-white object-contain`})})]})}function B4({id:e,card:t,onClose:n,onRevealLine:r}){let i=t?ev.filter(e=>!t.fields[e]):[],a=Object.entries(t?.references??{});return(0,J.jsx)(Zy,{wide:!0,title:(0,J.jsxs)(`span`,{className:`flex flex-wrap items-center gap-2`,children:[(0,J.jsx)(p4,{id:e,size:`md`}),(0,J.jsx)(`span`,{children:t?t.name===``?`unnamed target`:t.name:`no target card`})]}),onClose:n,footer:(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center justify-end gap-2`,children:[t?(0,J.jsx)(`button`,{type:`button`,className:X(),title:`Open this card in the editor to edit it`,onClick:()=>{r(t.line),n()},children:`Open in editor`}):null,(0,J.jsx)(`button`,{type:`button`,className:X(`primary`),onClick:n,autoFocus:!0,children:`Close`})]}),children:t?(0,J.jsxs)(`div`,{className:`space-y-4 text-sm`,children:[t.blocking||i.length>0?(0,J.jsxs)(`div`,{className:`flex flex-wrap gap-1.5`,children:[t.blocking?(0,J.jsx)(Ny,{tone:`red`,children:`an open question blocks this card`}):null,i.length>0?(0,J.jsxs)(Ny,{tone:`amber`,children:[`missing `,i.map(L4).join(`, `)]}):null]}):null,(0,J.jsx)(`dl`,{className:`grid grid-cols-[7rem_1fr] gap-x-3 gap-y-2`,children:R4(t).map(({label:e,value:t})=>(0,J.jsxs)(q.Fragment,{children:[(0,J.jsx)(`dt`,{className:`font-medium text-ink-2`,children:e}),(0,J.jsx)(`dd`,{className:e===`Not`?`text-seal-deep`:`text-ink`,children:(0,J.jsx)(DG,{text:t})})]},e))}),a.length===0?(0,J.jsx)(`p`,{className:`rounded-sm border border-gold-deep/40 bg-gold-bg px-2 py-1.5 text-xs text-gold-deep`,children:`No reference screenshot yet: nobody has looked at this element on a page.`}):(0,J.jsx)(`div`,{className:`grid grid-cols-1 gap-3 md:grid-cols-2`,children:a.map(([e,n])=>(0,J.jsx)(z4,{profile:e,file:n,alt:`What ${t.id} looks like on ${e}`},e))})]}):(0,J.jsxs)(`p`,{className:`text-sm text-seal-deep`,children:[`Nothing under Targets has the id `,e,`. Add the card, or remove the reference from the check that uses it.`]})})}function V4({doc:e,onChange:t,onRevealRange:n}){let r=e.questions.filter(e=>e.kind===`blocking`).length;return(0,J.jsx)(AG,{title:`Open questions`,count:e.questions.length,tone:r>0?`red`:`amber`,help:`questions`,children:e.questions.length===0?(0,J.jsx)(jG,{text:`No open question: every sentence of this case is confirmed.`}):(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`p`,{className:`border-b border-line bg-warm px-3 py-1.5 text-xs leading-5 text-ink-2`,children:[(0,J.jsx)(`span`,{className:`font-medium text-seal-deep`,children:`Must answer`}),` stops the spec until you answer.`,` `,(0,J.jsx)(`span`,{className:`font-medium text-gold-deep`,children:`Optional`}),`: the case text stays as it is unless you write an answer.`]}),(0,J.jsx)(`ul`,{className:`divide-y divide-line`,children:e.questions.map((r,i)=>(0,J.jsx)(U4,{question:r,doc:e,onChange:t,onRevealRange:n},`${r.line}-${i}`))})]})})}function H4({text:e,label:t,className:n=``,onJump:r}){return(0,J.jsxs)(`div`,{role:`button`,tabIndex:0,title:t,"aria-label":t,onClick:e=>{e.target.closest(`a`)||window.getSelection()?.isCollapsed!==!1&&r()},onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),r())},className:`group flex cursor-pointer items-start gap-1 rounded-sm px-1 transition-colors hover:bg-card/70 focus-visible:ring-2 focus-visible:ring-theme/40 focus-visible:outline-none ${n}`,children:[(0,J.jsx)(`span`,{className:`min-w-0 flex-1`,children:(0,J.jsx)(DG,{text:e})}),(0,J.jsx)(Jl,{size:12,className:`mt-0.5 shrink-0 text-ink-3 opacity-40 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100`,"aria-hidden":`true`})]})}function U4({question:e,doc:t,onChange:n,onRevealRange:r}){let i=e.kind===`blocking`,a=e.answer!==``,[o,s]=(0,q.useState)(!1),c=e.parent,l=()=>n(iy(t.text,e));return(0,J.jsxs)(`li`,{className:`px-3 py-3`,children:[(0,J.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-2`,children:[c?(0,J.jsx)(`span`,{className:`text-[11px] font-semibold tracking-wider text-ink-3 uppercase`,children:`The case says`}):null,(0,J.jsxs)(`span`,{className:`ml-auto text-xs text-ink-3`,children:[e.section||`the case`,` · line `,e.line]})]}),c?(0,J.jsx)(`div`,{className:`mt-1 rounded-sm border border-line bg-warm px-2 py-1.5`,children:(0,J.jsx)(H4,{text:c.text,label:`Open this sentence in the case file`,className:`text-sm text-ink`,onJump:()=>r(c.from,Math.max(c.from,e.blockRange.start-1))})}):(0,J.jsxs)(`p`,{className:`mt-1 flex items-start gap-1.5 rounded-sm border border-seal/40 bg-seal-bg px-2 py-1.5 text-xs text-seal-deep`,children:[(0,J.jsx)(Ml,{size:14,className:`mt-0.5 shrink-0`,"aria-hidden":`true`}),`This question has no sentence in the case. Nothing can be kept here: deleting the block would delete the claim it stands for. Fix the case in the source.`]}),(0,J.jsxs)(`div`,{className:`mt-2 rounded-sm border-l-4 px-2 py-1.5 ${i?`border-seal bg-seal-bg/35`:`border-gold bg-gold-bg/35`}`,children:[(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,J.jsx)(Ny,{tone:i?`red`:`amber`,children:i?`Must answer`:`Optional`}),a?(0,J.jsx)(Ny,{tone:`green`,children:`Answered`}):null]}),(0,J.jsx)(H4,{text:e.question,label:`Open this question in the case file`,className:`mt-1 text-sm font-medium text-ink`,onJump:()=>r(e.blockRange.start,e.region.end)}),e.evidence?(0,J.jsx)(`p`,{className:`mt-0.5 text-xs text-ink-3`,children:(0,J.jsx)(DG,{text:e.evidence})}):null]}),(0,J.jsxs)(`div`,{className:`mt-2 flex flex-wrap items-center gap-2`,children:[c!==null&&!a?(0,J.jsxs)(`button`,{className:`${X(`success`)} gap-1 py-1`,title:`Keeps this text and deletes the question block`,onClick:l,children:[(0,J.jsx)(uu,{size:14,"aria-hidden":`true`}),`Keep what the case says`]}):null,a?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`button`,{className:`${X()} py-1`,title:`Clears what you typed; the question stays open`,onClick:()=>n(ry(t.text,e,``)),children:`Clear my answer`}),(0,J.jsxs)(`button`,{className:`${X(`danger`)} gap-1 py-1`,title:`Deletes the question block together with the answer you typed`,onClick:l,children:[(0,J.jsx)(Gp,{size:14,"aria-hidden":`true`}),`Delete question and answer`]})]}):(0,J.jsx)(`button`,{className:`${X()} py-1`,onClick:()=>s(!o),children:o?`Hide the answer box`:`Write your answer`})]}),o||a?(0,J.jsxs)(`div`,{className:`mt-2`,children:[(0,J.jsx)(`p`,{className:`text-xs text-ink-2`,children:`Your answer`}),(0,J.jsx)(`div`,{className:`mt-2`,children:(0,J.jsx)(H$,{value:e.answer,onChange:r=>n(ry(t.text,e,r)),ariaLabel:`Answer to: ${e.question}`,placeholder:`Answer in your own words`,maxHeight:160,autoFocus:o&&!a})}),(0,J.jsx)(`p`,{className:`mt-1 text-xs text-ink-3`,children:`The AI folds it into the case text on its next run, and changes that text where they differ.`})]}):null]})}var W4={writes:`bg-seal text-white ring-seal`,input:`bg-gold-deep text-white ring-gold-deep`,email:`bg-qing-deep text-white ring-qing-deep`},G4={writes:`text-ink-3 ring-line-mid hover:text-seal-deep`,input:`text-ink-3 ring-line-mid hover:text-gold-deep`,email:`text-ink-3 ring-line-mid hover:text-qing-deep`};function K4({doc:e,targets:t,onOpenTarget:n,onChange:r}){let i=e.steps.filter(e=>e.tags.includes(`input`)||e.tags.includes(`writes`)),a=t=>t.recipes.length>0||e.inputs.some(e=>e.step===t.number),o=i.filter(e=>!a(e)).length;return(0,J.jsxs)(AG,{title:`Steps`,count:e.steps.length,tone:`blue`,help:`steps`,children:[e.steps.length===0?(0,J.jsx)(jG,{text:`This case has no "## Steps" section yet.`}):(0,J.jsx)(`ul`,{className:`divide-y divide-line`,children:e.steps.map((i,a)=>(0,J.jsx)(X4,{step:i,doc:e,targets:t,onOpenTarget:n,onChange:r},`${i.line}-${a}`))}),i.length>0?(0,J.jsxs)(`p`,{className:`border-t border-line px-3 py-1 text-xs ${o>0?`text-gold-deep`:`text-ink-3`}`,children:[i.length-o,` of `,i.length,` `,i.length===1?`step that a person does has`:`steps that a person does have`,` a recipe`,o>0?`; /gen-spec stops on the other ${o}`:``]}):null]})}function q4({textLabel:e,placeholder:t,withPhase:n=!1,onCancel:r,onAdd:i}){let[a,o]=(0,q.useState)(``),[s,c]=(0,q.useState)(``);return(0,J.jsxs)(`form`,{className:`mt-1 flex flex-wrap items-end gap-2 rounded-sm border border-line bg-warm px-2 py-1.5`,onSubmit:e=>{e.preventDefault(),s.trim()!==``&&i(a,s)},children:[n?(0,J.jsxs)(`label`,{className:`text-xs text-ink-2`,children:[`Phase (optional)`,(0,J.jsx)(`input`,{value:a,onChange:e=>o(e.target.value),placeholder:`start`,className:`mt-1 block w-24 ${Uy} py-1 text-xs`})]}):null,(0,J.jsxs)(`label`,{className:`min-w-40 flex-1 text-xs text-ink-2`,children:[e,(0,J.jsx)(H$,{value:s,onChange:c,ariaLabel:e,placeholder:t,maxHeight:140,singleLine:!0,autoFocus:!0,onEnter:()=>{s.trim()!==``&&i(a,s)}})]}),(0,J.jsxs)(`button`,{className:`${X(`primary`)} gap-1 py-1`,disabled:s.trim()===``,children:[(0,J.jsx)(Zf,{size:14,"aria-hidden":`true`}),`Add`]}),(0,J.jsx)(`button`,{type:`button`,className:`${X()} py-1`,onClick:r,children:`Cancel`})]})}function J4({recipe:e,doc:t,onChange:n}){let r=e.what?`Recipe ${e.what}`:`Recipe`;return(0,J.jsxs)(`li`,{className:`flex items-start gap-1`,children:[e.what?(0,J.jsx)(`span`,{className:`mt-1.5 shrink-0 rounded-sm bg-warm px-1.5 py-0.5 text-xs text-ink-3 ring-1 ring-line-mid ring-inset`,children:e.what}):null,(0,J.jsx)(H$,{value:e.text,onChange:r=>n(my(t.text,e,r)),ariaLabel:r,maxHeight:140,singleLine:!0}),(0,J.jsx)(`button`,{className:`${X(`danger`)} shrink-0 px-1.5 py-1`,title:`Delete this recipe line`,"aria-label":`Delete this recipe line`,onClick:()=>n(hy(t.text,e)),children:(0,J.jsx)(Gp,{size:14,"aria-hidden":`true`})})]})}function Y4({signal:e,step:t,doc:n,targets:r,onOpenTarget:i,onChange:a}){return(0,J.jsxs)(`li`,{className:`space-y-1`,children:[(0,J.jsxs)(`div`,{className:`flex items-start gap-1`,children:[(0,J.jsx)(`span`,{className:`mt-1.5 shrink-0 rounded-sm bg-qing-bg px-1.5 py-0.5 text-xs text-qing-deep ring-1 ring-qing/40 ring-inset`,title:`What proves that the content this step loads is really there`,children:`ready when`}),(0,J.jsx)(H$,{value:e.text,onChange:t=>a(_y(n.text,e,t)),ariaLabel:`Ready when, step ${t.number}`,maxHeight:140,singleLine:!0}),(0,J.jsx)(`button`,{className:`${X(`danger`)} shrink-0 px-1.5 py-1`,title:`Delete this readiness signal`,"aria-label":`Delete this readiness signal`,onClick:()=>a(vy(n.text,e)),children:(0,J.jsx)(Gp,{size:14,"aria-hidden":`true`})})]}),f4(e.text).length>0?(0,J.jsx)(`div`,{className:`flex flex-wrap gap-1 pl-6`,children:(0,J.jsx)(h4,{text:e.text,targets:r,onOpen:i})}):null]})}function X4({step:e,doc:t,targets:n,onOpenTarget:r,onChange:i}){let[a,o]=(0,q.useState)(null),s=e.tags.includes(`input`)||e.tags.includes(`writes`),c=t.inputs.some(t=>t.step===e.number),l=s&&e.recipes.length===0&&!c,u=f4(e.text);return(0,J.jsxs)(`li`,{className:`px-3 py-2`,children:[(0,J.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,J.jsx)(`span`,{className:`w-6 shrink-0 pt-1 text-right font-mono text-xs leading-5 text-ink-3`,children:e.number}),(0,J.jsx)(H$,{value:e.text,onChange:n=>i(Ty(t.text,e,n)),ariaLabel:`Step ${e.number}`,placeholder:`The step sentence`,maxHeight:180}),(0,J.jsx)(`span`,{className:`flex shrink-0 gap-1 pt-0.5`,role:`group`,"aria-label":`Tags of step ${e.number}`,children:$_.map(n=>{let r=e.tags.includes(n);return(0,J.jsx)(`button`,{"aria-pressed":r,title:r?`Remove [${n}] from step ${e.number}`:`Mark step ${e.number} as [${n}]`,onClick:()=>i(ey(t.text,e.number,n,!r)),className:`rounded-sm px-1.5 py-0.5 text-xs ring-1 ring-inset transition-colors ${r?W4[n]:G4[n]}`,children:n},n)})})]}),u.length>0?(0,J.jsx)(`div`,{className:`mt-1 flex flex-wrap gap-1 pl-8`,children:u.map(e=>(0,J.jsx)(m4,{id:e,card:n.get(e),onOpen:r},e))}):null,e.readiness.length>0?(0,J.jsx)(`ul`,{className:`mt-1 space-y-1 pl-8`,children:e.readiness.map((a,o)=>(0,J.jsx)(Y4,{signal:a,step:e,doc:t,targets:n,onOpenTarget:r,onChange:i},`${a.line}-${o}`))}):null,e.recipes.length>0?(0,J.jsx)(`ul`,{className:`mt-1 space-y-1 pl-8`,children:e.recipes.map((e,n)=>(0,J.jsx)(J4,{recipe:e,doc:t,onChange:i},`${e.line}-${n}`))}):null,l?(0,J.jsx)(`p`,{className:`mt-1 pl-8 text-xs text-gold-deep`,children:`No recipe: /gen-spec stops until one is recorded (run /explore-case --attended) or written here.`}):null,c&&e.recipes.length===0?(0,J.jsxs)(`p`,{className:`mt-1 pl-8 text-xs text-gold-deep`,children:[`The recipe is in the old Inputs section below; move it under this step as`,` `,(0,J.jsx)(`code`,{className:`rounded-sm bg-dai px-1 py-px font-mono`,children:`- Recipe:`}),`.`]}):null,!s&&e.recipes.length>0?(0,J.jsx)(`p`,{className:`mt-1 pl-8 text-xs text-ink-3`,children:`Recipe lines are used only on steps tagged input or writes.`}):null,a===`ready`?(0,J.jsx)(`div`,{className:`pl-8`,children:(0,J.jsx)(q4,{textLabel:`What shows that the content has loaded`,placeholder:`The feed list has its first row, and the logo image is loaded`,onCancel:()=>o(null),onAdd:(n,r)=>{o(null),i(yy(t.text,e.number,r))}})}):a===`recipe`?(0,J.jsx)(`div`,{className:`pl-8`,children:(0,J.jsx)(q4,{withPhase:!0,textLabel:`What the person does`,placeholder:`Positions (#1 to #3), created names (prefix + run stamp), control labels`,onCancel:()=>o(null),onAdd:(n,r)=>{o(null),i(by(t.text,e.number,n,r))}})}):(0,J.jsxs)(`div`,{className:`mt-1 flex flex-wrap gap-1 pl-8`,children:[(0,J.jsxs)(`button`,{className:`${X()} gap-1 px-1.5 py-0.5 text-xs`,title:`Say what proves that what this step loads is there: the test waits for it before it looks`,onClick:()=>o(`ready`),children:[(0,J.jsx)(Zf,{size:14,"aria-hidden":`true`}),`Add ready signal`]}),(0,J.jsxs)(`button`,{className:`${X()} gap-1 px-1.5 py-0.5 text-xs`,title:`Add a recipe line for this step (another phase, or a correction)`,onClick:()=>o(`recipe`),children:[(0,J.jsx)(Zf,{size:14,"aria-hidden":`true`}),`Add recipe`]})]})]})}function Z4({doc:e,onChange:t,profiles:n}){let[r,i]=(0,q.useState)(``),[a,o]=(0,q.useState)(``),[s,c]=(0,q.useState)(null),[l,u]=(0,q.useState)(``),[d,f]=(0,q.useState)([]),[p,m]=(0,q.useState)(null),h=e.values;if(!h)return(0,J.jsx)(AG,{title:`Values`,tone:`gray`,help:`values`,children:(0,J.jsx)(jG,{text:`This case has no "## Values" block: a spec cannot assert anything for any profile.`})});if(!h.hasBlock||h.problem)return(0,J.jsx)(AG,{title:`Values`,tone:`red`,help:`values`,children:(0,J.jsxs)(`p`,{className:`flex items-start gap-1.5 px-3 py-2 text-sm text-seal-deep`,children:[(0,J.jsx)(Ml,{size:14,className:`mt-0.5 shrink-0`,"aria-hidden":`true`}),h.problem??`The yaml block of "## Values" is incomplete.`]})});let g=Object.keys(h.values),_=n.map(e=>e.id),v=g.filter(e=>e!=="default"&&!_.includes(e)),y=new Set(v),b=[...new Set([`default`,..._,...g])],x=[...new Set(b.flatMap(e=>Object.keys(h.values[e]??{})))],S=new Map(n.map(e=>[e.id,e])),C=NF(n),w=b.filter(e=>{if(e==="default"||y.has(e))return!0;let t=S.get(e);return!t||(d.length===0||d.includes(t.env))&&MF(t,l)}),T=w.filter(e=>e!=="default"&&!y.has(e)).length,E=l.trim()!==``||d.length>0,D=p??(_.length>x.length?`profiles`:`keys`),O=_.length>3,k=_.length>1,A=()=>{u(``),f([])},j=new Map(C.map(e=>[e,n.filter(t=>t.env===e).length])),M=()=>{let n=r.trim();/^[A-Za-z][A-Za-z0-9]*$/.test(n)?x.includes(n)?c(`"${n}" is already in the table: edit its cells there.`):(c(null),t(dy(e.text,n,a)),i(``),o(``)):c(`Use letters and digits only, starting with a letter.`)},N=(n,r)=>{let i=h.values[n]?.[r],a=h.values.default?.[r],o=i==null?``:String(i);return(0,J.jsx)(`input`,{value:o,title:o===``?void 0:o,placeholder:n==="default"||a==null||a===``?`not set`:`default: ${String(a)}`,"aria-label":`${r} for ${n}`,onChange:i=>t(uy(e.text,n,r,i.target.value===``?null:i.target.value)),className:`${Uy} w-full min-w-0 py-1 font-mono text-xs`})},P=e=>{let t=S.get(e);return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`span`,{className:`block text-xs font-medium text-ink`,title:t?.name??e,children:t?.name??(e==="default"?`default`:e)}),(0,J.jsx)(`span`,{className:`mt-0.5 block font-mono text-[11px] text-ink-2 ${e==="default"?``:`break-all`}`,children:e==="default"?`fallback for every profile`:e}),t?(0,J.jsx)(`span`,{className:`mt-0.5 block`,children:(0,J.jsx)(Fy,{env:t.env})}):null,y.has(e)?(0,J.jsx)(`span`,{className:`mt-0.5 block text-[11px] font-medium text-seal-deep`,children:`(unknown)`}):null]})};return(0,J.jsxs)(AG,{title:`Values`,count:x.length,tone:`gray`,help:`values`,children:[x.length===0?(0,J.jsx)(jG,{text:`No value yet: add the first key below.`}):(0,J.jsxs)(J.Fragment,{children:[k?(0,J.jsxs)(`div`,{className:`space-y-2 border-b border-line bg-warm px-3 py-2`,children:[(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[O?(0,J.jsx)(OF,{className:`min-w-40 flex-1`,value:l,onChange:u,placeholder:`Search profiles...`,ariaLabel:`Search the profiles of this table`}):null,(0,J.jsxs)(`div`,{className:`ml-auto flex items-center gap-1.5`,children:[(0,J.jsx)(`span`,{className:`text-xs text-ink-3`,children:`Rows`}),(0,J.jsx)(`div`,{className:`flex overflow-hidden rounded ring-1 ring-line-mid`,role:`group`,"aria-label":`Rows of the values table`,children:[`keys`,`profiles`].map(e=>(0,J.jsx)(`button`,{type:`button`,"aria-pressed":D===e,title:e===`keys`?`One row per key, one column per profile`:`One row per profile, one column per key`,onClick:()=>m(e),className:`px-2 py-1 text-xs transition-colors ${D===e?`bg-theme-btn text-white`:`bg-card text-ink-2 hover:bg-warm`}`,children:e===`keys`?`Keys`:`Profiles`},e))})]})]}),O?(0,J.jsx)(DF,{label:`Env`,allCount:n.length,options:C.map(e=>({value:e,label:e.toUpperCase(),count:j.get(e)??0,tone:Py(e)})),selected:d,onChange:f}):null,E?(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-xs text-ink-2`,children:[(0,J.jsxs)(`span`,{children:[`Showing `,T,` of `,_.length,` profiles`]}),T===0?(0,J.jsx)(`span`,{className:`text-seal-deep`,children:`No profile matches.`}):null,(0,J.jsx)(`button`,{type:`button`,className:`underline underline-offset-2 hover:text-ink`,onClick:A,children:`Clear filters`})]}):null]}):null,D===`keys`?(0,J.jsx)(`div`,{className:`max-h-96 overflow-auto`,children:(0,J.jsxs)(`table`,{className:`w-full border-collapse text-sm`,children:[(0,J.jsx)(`thead`,{className:`sticky top-0 z-20`,children:(0,J.jsxs)(`tr`,{className:`bg-warm`,children:[(0,J.jsx)(`th`,{scope:`col`,className:`sticky left-0 z-10 min-w-32 bg-warm px-3 py-1.5 text-left align-bottom font-mono text-xs font-medium text-ink-2`,children:`key`}),w.map(e=>(0,J.jsx)(`th`,{scope:`col`,className:`min-w-32 border-l border-line px-1.5 py-1.5 text-left align-bottom`,children:P(e)},e))]})}),(0,J.jsx)(`tbody`,{children:x.map(e=>(0,J.jsxs)(`tr`,{className:`border-t border-line`,children:[(0,J.jsx)(`th`,{scope:`row`,className:`sticky left-0 z-10 min-w-32 truncate bg-card px-3 py-1 text-left align-middle font-mono text-xs font-normal text-ink-2`,title:e,children:e}),w.map(t=>(0,J.jsx)(`td`,{className:`min-w-32 border-l border-line px-1.5 py-1`,children:N(t,e)},t))]},e))})]})}):(0,J.jsx)(`div`,{className:`max-h-96 overflow-auto`,children:(0,J.jsxs)(`table`,{className:`w-full border-collapse text-sm`,children:[(0,J.jsx)(`thead`,{className:`sticky top-0 z-20`,children:(0,J.jsxs)(`tr`,{className:`bg-warm`,children:[(0,J.jsx)(`th`,{scope:`col`,className:`sticky left-0 z-10 min-w-52 bg-warm px-3 py-1.5 text-left text-xs font-medium text-ink-2`,children:`profile`}),x.map(e=>(0,J.jsx)(`th`,{scope:`col`,className:`min-w-32 border-l border-line px-1.5 py-1.5 text-left align-bottom font-mono text-xs font-medium text-ink-2`,title:e,children:e},e))]})}),(0,J.jsx)(`tbody`,{children:w.map(e=>{let t=S.get(e);return(0,J.jsxs)(`tr`,{className:`border-t border-line`,children:[(0,J.jsxs)(`th`,{scope:`row`,className:`sticky left-0 z-10 min-w-52 bg-card px-3 py-1 text-left align-middle`,children:[(0,J.jsx)(`span`,{className:`block text-xs font-medium text-ink`,title:t?.name??e,children:t?.name??(e==="default"?`default`:e)}),(0,J.jsxs)(`span`,{className:`mt-0.5 flex flex-wrap items-center gap-1`,children:[t?(0,J.jsx)(Fy,{env:t.env}):null,(0,J.jsx)(`span`,{className:`font-mono text-[11px] text-ink-2`,children:e==="default"?`fallback for every profile`:e}),y.has(e)?(0,J.jsx)(`span`,{className:`text-[11px] font-medium text-seal-deep`,children:`(unknown)`}):null]})]}),x.map(t=>(0,J.jsx)(`td`,{className:`min-w-32 border-l border-line px-1.5 py-1`,children:N(e,t)},t))]},e)})})]})})]}),v.length>0?(0,J.jsxs)(`p`,{className:`flex items-start gap-1.5 border-t border-line bg-seal-bg px-3 py-1.5 text-xs text-seal-deep`,children:[(0,J.jsx)(Ml,{size:14,className:`mt-0.5 shrink-0`,"aria-hidden":`true`}),v.join(`, `),` `,v.length===1?`is`:`are`,` not in profiles.yaml: a spec that runs on this case refuses these values.`]}):null,h.placeholders.length>0?(0,J.jsxs)(`p`,{className:`flex items-start gap-1.5 border-t border-line bg-gold-bg px-3 py-1.5 text-xs text-gold-deep`,children:[(0,J.jsx)(Ml,{size:14,className:`mt-0.5 shrink-0`,"aria-hidden":`true`}),`Empty or TODO: `,h.placeholders.join(`, `),`. The test refuses to run until `,h.placeholders.length===1?`it is`:`they are`,` filled in.`]}):null,(0,J.jsxs)(`form`,{className:`flex flex-wrap items-end gap-2 border-t border-line bg-warm px-3 py-2`,onSubmit:e=>{e.preventDefault(),M()},children:[(0,J.jsxs)(`label`,{className:`text-xs text-ink-2`,children:[`New key`,(0,J.jsx)(`input`,{value:r,onChange:e=>{i(e.target.value),c(null)},placeholder:`createButton`,className:`mt-1 block w-36 ${Uy} py-1 font-mono text-xs`})]}),(0,J.jsxs)(`label`,{className:`text-xs text-ink-2`,children:[`Value in default`,(0,J.jsx)(`input`,{value:a,onChange:e=>o(e.target.value),placeholder:`Create New`,className:`mt-1 block w-48 ${Uy} py-1 font-mono text-xs`})]}),(0,J.jsxs)(`button`,{className:`${X()} gap-1 py-1`,disabled:r.trim()===``,children:[(0,J.jsx)(Zf,{size:14,"aria-hidden":`true`}),`Add`]}),s?(0,J.jsx)(`p`,{className:`w-full text-xs text-seal-deep`,children:s}):null]})]})}function Q4({input:e,doc:t,onChange:n}){let r=e.step===null?`Note`:`Recipe for step ${e.step}${e.what?` ${e.what}`:``}`;return(0,J.jsxs)(`div`,{className:`mt-1 flex items-start gap-1`,children:[e.what?(0,J.jsx)(`span`,{className:`mt-1.5 shrink-0 rounded-sm bg-warm px-1.5 py-0.5 text-xs text-ink-3 ring-1 ring-line-mid ring-inset`,children:e.what}):null,(0,J.jsx)(H$,{value:e.recipe,onChange:r=>n(fy(t.text,e,r)),ariaLabel:r,maxHeight:140,singleLine:!0}),(0,J.jsx)(`button`,{className:`${X(`danger`)} shrink-0 px-1.5 py-1`,title:`Delete this line`,"aria-label":`Delete this line`,onClick:()=>n(py(t.text,e)),children:(0,J.jsx)(Gp,{size:14,"aria-hidden":`true`})})]})}function $4({doc:e,onChange:t}){return e.inputs.length===0?null:(0,J.jsxs)(AG,{title:`Inputs (old format)`,count:e.inputs.length,tone:`amber`,help:`inputs`,children:[(0,J.jsxs)(`p`,{className:`flex items-start gap-1.5 border-b border-line bg-gold-bg px-3 py-1.5 text-xs text-gold-deep`,children:[(0,J.jsx)(Ml,{size:14,className:`mt-0.5 shrink-0`,"aria-hidden":`true`}),`This case uses the old section. Move each line under its step as`,` `,(0,J.jsx)(`code`,{className:`rounded-sm bg-dai px-1 py-px font-mono`,children:`- Recipe (phase): ...`}),`; it keeps working until then.`]}),(0,J.jsx)(`ul`,{className:`divide-y divide-line`,children:e.inputs.map(n=>(0,J.jsxs)(`li`,{className:`px-3 py-1.5`,children:[(0,J.jsx)(`span`,{className:`mb-1 block font-mono text-xs text-ink-3`,children:n.step===null?`free note`:`step ${n.step}`}),(0,J.jsx)(Q4,{input:n,doc:e,onChange:t})]},`${n.line}-${n.step??`note`}`))})]})}var e3={confirm:`to confirm`,unseen:`not observed`};function t3({marker:e,doc:t,onChange:n,onRevealLine:r}){let i=Pv(t,e),a=e.evidence===null?null:bH(e.evidence),o=i.kind===`assertion`;return(0,J.jsxs)(`li`,{className:`px-3 py-2 ${o?`bg-gold-bg/40`:``}`,children:[(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,J.jsx)(Ny,{tone:o?`amber`:`blue`,children:e3[e.kind]}),(0,J.jsxs)(`span`,{className:`text-xs text-ink-3`,children:[e.section||`the case`,` · line `,e.line]}),o?(0,J.jsx)(`span`,{className:`rounded-sm bg-gold-bg px-1.5 py-0.5 text-[11px] font-medium text-gold-deep`,title:`A wrong reading here would pass silently, so only a person can settle it`,children:`changes an assertion`}):null,(0,J.jsxs)(`button`,{className:`${X()} ml-auto gap-1 py-0.5 text-xs`,title:`This line is right: remove the marker (Ctrl/Cmd+Z undoes it)`,onClick:()=>n(oy(t.text,e)),children:[(0,J.jsx)(uu,{size:14,"aria-hidden":`true`}),`Confirmed`]})]}),(0,J.jsx)(`button`,{type:`button`,className:`mt-1 block w-full rounded text-left text-sm text-ink-2 transition-colors hover:text-ink focus-visible:ring-2 focus-visible:ring-theme/40 focus-visible:outline-none`,title:`Show this line in the source`,onClick:()=>r(e.line),children:(0,J.jsx)(DG,{text:Iv(t.text,e)})}),e.detail?(0,J.jsxs)(`p`,{className:`mt-1 rounded border border-line-mid bg-warm px-2 py-1.5 text-xs text-ink-2`,children:[(0,J.jsx)(`span`,{className:`text-ink-3`,children:`Why it needs you: `}),e.detail]}):(0,J.jsx)(`p`,{className:`mt-1 text-xs text-gold-deep`,children:`No reason recorded: this marker predates the format, or the AI did not say what to decide.`}),(0,J.jsxs)(`p`,{className:`mt-1 text-xs text-ink-3`,children:[`Feeds: `,(0,J.jsx)(`span`,{className:`font-mono`,children:i.label})]}),a===null?null:(0,J.jsx)(`a`,{href:a,target:`_blank`,rel:`noreferrer`,className:`mt-1.5 block w-fit`,title:`The screenshot the exploration took: look here instead of opening the page again`,children:(0,J.jsx)(`img`,{src:a,alt:`Evidence for the marker on ${e.section} line ${e.line}`,className:`max-h-40 rounded border border-line-mid`})})]})}function n3({doc:e,onChange:t,onRevealLine:n}){let r=e.markers.filter(t=>Pv(e,t).kind===`assertion`);return(0,J.jsx)(AG,{title:`To confirm`,count:e.markers.length,tone:r.length>0?`amber`:`blue`,help:`markers`,children:e.markers.length===0?(0,J.jsx)(jG,{text:`Nothing waits for a person: every line is either checked by the run or settled.`}):(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 border-b border-line bg-warm px-3 py-1.5 text-xs text-ink-2`,children:[(0,J.jsxs)(`span`,{children:[e.markers.length,` marked`,r.length>0?`, ${r.length} change an assertion`:`: the run checks them all`]}),(0,J.jsxs)(`button`,{className:`${X()} ml-auto gap-1 py-0.5 text-xs`,title:`You have looked at every marked line: remove all markers in one step (Ctrl/Cmd+Z undoes it)`,onClick:()=>t(sy(e.text,e.markers)),children:[(0,J.jsx)(uu,{size:14,"aria-hidden":`true`}),`Confirm all `,e.markers.length]}),r.length>0&&r.length<e.markers.length?(0,J.jsxs)(`button`,{className:`${X()} gap-1 py-0.5 text-xs`,title:`Remove the markers on the lines that change an assertion, and keep the notes`,onClick:()=>t(sy(e.text,r)),children:[`Only the `,r.length,` assertions`]}):null]}),(0,J.jsx)(`ul`,{className:`divide-y divide-line`,children:e.markers.map((r,i)=>(0,J.jsx)(t3,{marker:r,doc:e,onChange:t,onRevealLine:n},`${r.line}-${r.kind}-${i}`))})]})})}function r3(e){let t=e.sections.find(e=>e.name===`Targets`),n=t?e.text.slice(0,t.headingStart)+e.text.slice(t.body.end):e.text,r=new Map;for(let e of n.matchAll(/\[(T\d+)\]/g))r.set(e[1],(r.get(e[1])??0)+1);return r}function i3(e){return ev.filter(t=>!e.fields[t])}function a3({doc:e,onOpenTarget:t,onRevealLine:n}){let r=r3(e),i=e.targets.filter(e=>e.blocking||i3(e).length>0).length;return(0,J.jsxs)(AG,{title:`Targets`,count:e.targets.length,tone:i>0?`amber`:`blue`,help:`targets`,defaultOpen:!1,children:[e.targets.length===0?(0,J.jsx)(jG,{text:`No card: no check names an image, an icon, a file, a PDF, a screenshot or repeated text.`}):(0,J.jsx)(`ul`,{className:`divide-y divide-line`,children:e.targets.map(e=>{let i=i3(e),a=r.get(e.id)??0;return(0,J.jsx)(`li`,{className:`px-3 py-1.5`,children:(0,J.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,J.jsxs)(`button`,{type:`button`,title:`Open this card`,onClick:()=>t(e.id),className:`flex min-w-0 flex-1 items-center gap-1.5 rounded text-left transition-colors hover:text-ink focus-visible:ring-2 focus-visible:ring-theme/40 focus-visible:outline-none`,children:[(0,J.jsx)(Jd,{size:14,className:`shrink-0 text-ink-3`,"aria-hidden":`true`}),(0,J.jsx)(p4,{id:e.id}),(0,J.jsx)(`span`,{className:`min-w-0 flex-1 text-sm text-ink`,children:e.name===``?`unnamed target`:e.name}),e.blocking?(0,J.jsx)(Ny,{tone:`red`,children:`open question`}):null,i.length>0?(0,J.jsxs)(Ny,{tone:`amber`,children:[`missing `,i.map(L4).join(`, `)]}):null,a===0?(0,J.jsx)(Ny,{tone:`gray`,children:`no check uses it`}):null]}),(0,J.jsxs)(`button`,{className:`${X()} shrink-0 gap-1 px-1.5 py-0.5 text-xs`,title:`Open this card in the editor to edit it`,onClick:()=>n(e.line),children:[(0,J.jsx)(Jl,{size:14,"aria-hidden":`true`}),`Open in editor`]})]})},e.id)})}),(0,J.jsx)(`p`,{className:`border-t border-line px-3 py-1 text-xs text-ink-3`,children:`Read-only here: use Open in editor to change a card. A [T1] in a step or a check is the link to its card: the chip opens it.`})]})}function o3({content:e,onChange:t,profiles:n,envs:r,suites:i,caseId:a,onRevealLine:o,onRevealRange:s}){let c=(0,q.useMemo)(()=>Qv(e),[e]),l=wG(),[u,d]=(0,q.useState)(null),f=(0,q.useMemo)(()=>new Map(c.targets.map(e=>[e.id,e])),[c]),p=c.questions.filter(e=>e.kind===`blocking`).length,m=c.questions.filter(e=>e.answer!==``).length;return(0,J.jsxs)(`div`,{ref:l,className:`flex flex-col gap-3 p-3`,children:[(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-2 gap-y-1 px-1 text-xs text-ink-2`,children:[(0,J.jsxs)(`span`,{children:[c.steps.length,` steps`]}),(0,J.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,J.jsxs)(`span`,{children:[c.questions.length,` open `,c.questions.length===1?`question`:`questions`,p>0?` (${p} must answer)`:``]}),c.markers.length>0?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,J.jsxs)(`span`,{children:[c.markers.length,` marked`,Fv(c)>0?` (${Fv(c)} affect an assertion)`:``]})]}):null,m>0?(0,J.jsxs)(Ny,{tone:`green`,children:[m,` answered`]}):null,(0,J.jsx)(`span`,{className:`ml-auto text-ink-3`,children:`Edits land in the source: Save writes them.`})]}),(0,J.jsx)(V4,{doc:c,onChange:t,onRevealRange:s}),(0,J.jsx)(n3,{doc:c,onChange:t,onRevealLine:o}),(0,J.jsx)(P4,{doc:c,onChange:t,caseId:a,envs:r,suites:i}),(0,J.jsx)(O4,{name:`Goal`,help:`goal`,doc:c,onRevealLine:o}),(0,J.jsx)(_4,{name:`Rules`,help:`rules`,doc:c,onOpenTarget:d,onChange:t}),(0,J.jsx)(K4,{doc:c,targets:f,onOpenTarget:d,onChange:t}),(0,J.jsx)(_4,{name:`Expected`,help:`expected`,doc:c,onOpenTarget:d,onChange:t}),(0,J.jsx)(Z4,{doc:c,onChange:t,profiles:n},a),(0,J.jsx)(_4,{name:`Visual checks`,help:`visual`,doc:c,onOpenTarget:d,onChange:t,defaultOpen:!1}),(0,J.jsx)(a3,{doc:c,onOpenTarget:d,onRevealLine:o}),(0,J.jsx)($4,{doc:c,onChange:t}),(0,J.jsx)(O4,{name:`Notes`,help:`notes`,doc:c,onRevealLine:o}),(0,J.jsx)(k4,{doc:c}),u===null?null:(0,J.jsx)(B4,{id:u,card:f.get(u),onClose:()=>d(null),onRevealLine:o})]})}function s3({env:e,envs:t,onChange:n,invalid:r=!1,title:i}){let a=(0,q.useRef)(null),o=(0,q.useRef)(null),s=(0,q.useRef)(null),c=(0,q.useId)(),l=(0,q.useId)(),[u,d]=(0,q.useState)(!1),[f,p]=(0,q.useState)(0),m=t.indexOf(e),h=e=>{d(!1),e&&o.current?.focus()},g=()=>{p(m===-1?0:m),d(!0)},_=e=>{n(e),h(!0)};(0,q.useEffect)(()=>{u&&s.current?.querySelector(`[data-row="${f}"]`)?.scrollIntoView({block:`nearest`})},[f,u]),(0,q.useEffect)(()=>{if(!u)return;let e=e=>{a.current?.contains(e.target)||d(!1)};return window.addEventListener(`mousedown`,e),()=>window.removeEventListener(`mousedown`,e)},[u]);let v=(e,n)=>{let r=e+n;return r>=0&&r<t.length?r:e};return(0,J.jsxs)(`div`,{ref:a,className:`relative inline-block`,children:[(0,J.jsxs)(`button`,{ref:o,type:`button`,role:`combobox`,"aria-label":`Environment the agent works in`,"aria-invalid":r||void 0,"aria-required":!0,"aria-expanded":u,"aria-controls":u?c:void 0,"aria-activedescendant":u&&t[f]!==void 0?`${c}-${f}`:void 0,title:i,onKeyDown:e=>{if(e.key===`ArrowDown`||e.key===`ArrowUp`)e.preventDefault(),u?p(t=>v(t,e.key===`ArrowDown`?1:-1)):g();else if(e.key===`Home`||e.key===`End`){if(!u)return;e.preventDefault(),p(e.key===`Home`?0:Math.max(0,t.length-1))}else if(e.key===`Enter`||e.key===` `)e.preventDefault(),u?t[f]!==void 0&&_(t[f]):g();else if(e.key===`Escape`){if(!u)return;e.preventDefault(),h(!0)}else e.key===`Tab`&&u&&h(!1)},onClick:()=>u?h(!0):g(),className:`${X(r?`invalid`:`secondary`)} h-8 gap-1.5`,children:[(0,J.jsxs)(`span`,{className:`truncate`,children:[`Env: `,e||`choose...`]}),(0,J.jsx)(mu,{size:14,className:`shrink-0`,"aria-hidden":`true`})]}),u?(0,J.jsxs)(`div`,{className:`card-popup absolute top-full left-0 z-30 mt-1 w-56 p-1`,children:[(0,J.jsx)(`p`,{id:l,className:`px-2 py-1 text-xs font-medium text-ink-2`,children:`Environment`}),(0,J.jsxs)(`div`,{ref:s,id:c,role:`listbox`,"aria-labelledby":l,className:`max-h-64 overflow-auto`,children:[t.length===0?(0,J.jsx)(`p`,{className:`px-2 py-1.5 text-sm text-ink-3`,children:`No environment yet: add one to profiles.yaml.`}):null,t.map((t,n)=>(0,J.jsxs)(`div`,{id:`${c}-${n}`,"data-row":n,role:`option`,"aria-selected":t===e,onMouseDown:e=>e.preventDefault(),onClick:()=>_(t),onMouseEnter:()=>p(n),className:[`flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm transition-colors duration-150`,n===f?`bg-theme-bg text-theme-ink`:`text-ink hover:bg-warm`].join(` `),children:[(0,J.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:t}),t===e?(0,J.jsx)(uu,{size:14,className:`shrink-0 text-theme-btn`,"aria-hidden":`true`}):null]},t))]})]}):null]})}var c3=e=>e.status===`ok`,l3=e=>e.status!==`missing`&&e.status!==`expired`,u3=e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.values(e).every(e=>Array.isArray(e)&&e.every(e=>typeof e==`string`));function d3(e,t){if(t===void 0)return e.filter(c3).map(e=>e.id);let n=new Set(e.filter(l3).map(e=>e.id));return t.filter(e=>n.has(e))}function f3({profiles:e,selected:t,onToggle:n}){return(0,J.jsx)(`ul`,{className:`space-y-1`,children:e.map(e=>(0,J.jsx)(`li`,{children:(0,J.jsxs)(`label`,{className:`flex items-center gap-2 ${l3(e)?``:`text-ink-3`}`,children:[(0,J.jsx)(`input`,{type:`checkbox`,checked:t.includes(e.id),disabled:!l3(e),onChange:()=>n(e.id)}),(0,J.jsx)(`span`,{className:`font-mono`,children:e.id}),(0,J.jsx)(By,{status:e.status})]})},e.id))})}function p3({env:e,profiles:t,selected:n,loading:r,pending:i,failed:a,onChange:o}){let s=(0,q.useRef)(null),c=(0,q.useId)(),[l,u]=(0,q.useState)(!1),d=t.filter(l3);(0,q.useEffect)(()=>{u(!1)},[e]),(0,q.useEffect)(()=>{if(!l)return;let e=e=>{s.current?.contains(e.target)||u(!1)},t=e=>{e.key===`Escape`&&u(!1)};return window.addEventListener(`mousedown`,e),window.addEventListener(`keydown`,t),()=>{window.removeEventListener(`mousedown`,e),window.removeEventListener(`keydown`,t)}},[l]);let f=e=>o(n.includes(e)?n.filter(t=>t!==e):[...n,e]),p=e===``,m=p||a?`Profiles`:`Profiles: ${n.length} of ${d.length}`,h=p?`# Profiles
|
|
322
322
|
Choose an environment first: the profiles belong to it.`:`# Profiles the agent opens
|
|
323
323
|
Only the ticked profiles are opened. Every profile that is logged in is ticked by default, and the list you tick is remembered for this environment.`;return(0,J.jsxs)(`div`,{ref:s,className:`relative`,children:[(0,J.jsxs)(`button`,{type:`button`,className:`${X()} h-8 gap-1.5`,...Wy(p&&!i),disabled:p,"aria-expanded":l,"aria-controls":c,title:h,onClick:()=>u(e=>!e),children:[(0,J.jsx)(Lp,{size:14,"aria-hidden":`true`}),m,(0,J.jsx)(mu,{size:14,"aria-hidden":`true`})]}),l?(0,J.jsxs)(`div`,{id:c,className:`card-popup absolute top-full left-0 z-30 mt-1 w-80 p-3`,role:`group`,"aria-label":`Profiles the agent opens`,children:[(0,J.jsx)(`p`,{className:`mb-2 text-xs font-medium text-ink-2`,children:`Profiles the agent opens`}),r?(0,J.jsx)(`p`,{className:`text-xs text-ink-3`,children:`Loading...`}):null,a?(0,J.jsx)(`p`,{className:`text-xs text-seal-deep`,children:`The profiles could not be read. Reload the page; until then the agent opens every profile that is logged in.`}):null,(0,J.jsx)(f3,{profiles:t,selected:n,onToggle:f}),!r&&!a&&t.length===0?(0,J.jsx)(`p`,{className:`text-xs text-seal-deep`,children:`No profile has this environment.`}):null,!r&&!a&&t.length>0&&n.length===0?(0,J.jsx)(`p`,{className:`mt-2 text-xs text-seal-deep`,children:`Tick at least one profile. Profiles that are not logged in are left out: log them in on the Profiles page.`}):null]}):null]})}var m3=`Optional. What failed, or what should change. For example:
|
|
324
324
|
- the logo selector changed on staging
|
|
@@ -334,7 +334,7 @@ Creates the spec from the case file (including its "## Values").
|
|
|
334
334
|
Does not run the tests: do that on the Run page.`},"heal-spec":{select:`border-seal/40 bg-seal-bg text-seal-deep focus:ring-theme/25`,dot:`bg-seal`,impact:`# Heal spec
|
|
335
335
|
Repairs a failing spec, or refines the case and the spec when you ask for an improvement (a passing run is not a reason to refuse).
|
|
336
336
|
It reads the last report and your request first, and runs the tests again only when it needs evidence, for profiles that are logged in.
|
|
337
|
-
A case it leaves with open questions comes back to you: review it and explore it again before the spec is generated.`}};function g6({caseId:e,caseDirty:t,specDirty:n,hasSpec:r}){let[i]=EP(),a=vP(i),[o,s]=(0,q.useState)(`explore-case`),[c,l]=Xs(),u=c.get(`ai`),[d,f]=(0,q.useState)(!1);(0,q.useEffect)(()=>{if(!u||!dc.includes(u))return;s(u),f(!0);let e=new URLSearchParams(c);e.delete(`ai`),l(e,{replace:!0})},[u,c,l]);let[p,m]=Jp(`asrun-ui.ai-env`,``,Yp),[h,g]=(0,q.useState)(!1),[_,v]=(0,q.useState)(!1),[y,b]=(0,q.useState)(!1),[x,S]=(0,q.useState)(!0),[C]=LP(),{startJob:w}=xl(),T=dl(),E=T.data?.envs??[],D=T.isLoading,O=E.includes(p)?p:``,k=O===``,A=o===`explore-case`&&O!==``,j=A&&x,M=o===`explore-case`,N=pl(),P=(0,q.useMemo)(()=>(N.data?.profiles??[]).filter(e=>e.env===O),[N.data,O]),[ee,F]=Jp(`asrun-ui.ai-profiles`,{},u3),I=M?d3(P,O===``?void 0:ee[O]):[],L=M&&I.length
|
|
337
|
+
A case it leaves with open questions comes back to you: review it and explore it again before the spec is generated.`}};function g6({caseId:e,caseDirty:t,specDirty:n,hasSpec:r}){let[i]=EP(),a=vP(i),[o,s]=(0,q.useState)(`explore-case`),[c,l]=Xs(),u=c.get(`ai`),[d,f]=(0,q.useState)(!1);(0,q.useEffect)(()=>{if(!u||!dc.includes(u))return;s(u),f(!0);let e=new URLSearchParams(c);e.delete(`ai`),l(e,{replace:!0})},[u,c,l]);let[p,m]=Jp(`asrun-ui.ai-env`,``,Yp),[h,g]=(0,q.useState)(!1),[_,v]=(0,q.useState)(!1),[y,b]=(0,q.useState)(!1),[x,S]=(0,q.useState)(!0),[C]=LP(),{startJob:w}=xl(),T=dl(),E=T.data?.envs??[],D=T.isLoading,O=E.includes(p)?p:``,k=O===``,A=o===`explore-case`&&O!==``,j=A&&x,M=o===`explore-case`,N=pl(),P=(0,q.useMemo)(()=>(N.data?.profiles??[]).filter(e=>e.env===O),[N.data,O]),[ee,F]=Jp(`asrun-ui.ai-profiles`,{},u3),I=M?d3(P,O===``?void 0:ee[O]):[],L=M&&I.length>0?I:void 0,te=M&&N.isLoading,R=M&&N.isSuccess&&I.length===0,z=t||n,B=t&&n?`both files`:t?`the case`:`the spec`,ne=z||k&&!D||R,re=`The AI reads the saved files, so save or discard ${B===`both files`?`them`:`it`} before running.`,ie=Dc(i,o,e,{env:O||`<env>`,attended:j,thinking:C,...a&&{model:a},...L&&{profiles:L}}),ae=o===`gen-spec`&&r,oe=t=>{f(!1),w({action:`ai`,tool:i,command:o,caseId:e,env:O,...t&&{force:t},...j&&{attended:j},thinking:C,...a&&{model:a},...L&&{profiles:L}})};return(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,J.jsx)(Yy,{value:o,onChange:e=>{s(e),f(!1)},tone:h6[o].select,dot:h6[o].dot,"aria-label":`AI command`,title:h6[o].impact,children:dc.map(e=>(0,J.jsx)(`option`,{value:e,"data-dot":h6[e].dot,children:fc[e]},e))}),(0,J.jsx)(s3,{env:O,envs:E,onChange:m,invalid:k,title:k?`# Choose an environment
|
|
338
338
|
The agent opens real pages there. There is no default.`:`# Environment\n${mc[o]}`}),M?(0,J.jsx)(p3,{env:O,profiles:P,selected:I,loading:N.isLoading,pending:D,failed:N.isError,onChange:e=>F({...ee,[O]:e})}):null,o===`explore-case`?(0,J.jsxs)(`label`,{className:`flex items-center gap-1.5 text-sm ${A?`text-ink-2`:`text-gold-deep`}`,title:A?`# Attended run
|
|
339
339
|
You stay at this computer. The browser opens, and for a step that writes data or needs your choice the agent pauses and shows a small card. Do the step in the browser, then click Done.
|
|
340
340
|
Untick it if nobody is at the machine. The agent then only reads.`:`# Attended run
|
|
@@ -364,7 +364,7 @@ footer-links`,"aria-label":`Case names, one per line`,spellCheck:!1,className:`w
|
|
|
364
364
|
Type at least one case name above, one per line.`:p>0?`# Fix the names first
|
|
365
365
|
The names marked in red cannot be created (a folder name too, if it is invalid).`:`Create the cases (Ctrl/Cmd+Enter)`,children:g.isPending?`Creating...`:f.length>1?`Create ${f.length}`:`Create`})]}),g.data&&g.data.failed.length>0?(0,J.jsx)(`ul`,{className:`space-y-0.5 text-xs text-seal-deep`,children:g.data.failed.map(e=>(0,J.jsxs)(`li`,{children:[(0,J.jsx)(`code`,{children:e.id}),`: `,e.message]},e.id))}):null]})]})})]})}function I6(e){let t=new Map;for(let n of e)t.set(n.group,[...t.get(n.group)??[],n]);return[...t.entries()].sort(([e],[t])=>e===null?-1:t===null?1:e.localeCompare(t)).map(([e,t])=>({group:e,items:t}))}function L6(e,t){let n=t.toLowerCase().split(/\s+/).filter(Boolean);if(n.length===0)return!0;let r=[e.id,e.title,...e.suites,e.login,e.writes.length>0?`writes ${e.writes.join(` `)}`:null,e.writesNote].filter(Boolean).join(`
|
|
366
366
|
`).toLowerCase();return n.every(e=>r.includes(e))}function R6({icon:e,label:t,aside:n,open:r,onToggle:i}){let a=`flex w-full items-center gap-2 border-y border-theme-btn bg-theme-btn px-3 py-2 text-left text-white`,o=(0,J.jsxs)(J.Fragment,{children:[e,(0,J.jsx)(`span`,{className:`eyebrow text-sm`,children:t}),n?(0,J.jsx)(`span`,{className:`ml-auto text-xs text-white/75`,children:n}):null,i?(0,J.jsx)(`span`,{className:`${n?``:`ml-auto `}flex h-6 w-6 shrink-0 items-center justify-center rounded bg-white/15 transition-colors group-hover:bg-white/30`,"aria-hidden":`true`,children:(0,J.jsx)(Eu,{size:16,className:`transition-transform duration-200 motion-reduce:transition-none ${r?``:`rotate-180`}`})}):null]});return i?(0,J.jsx)(`button`,{className:`${a} group`,onClick:i,"aria-expanded":r,children:o}):(0,J.jsx)(`h2`,{className:a,children:o})}function z6({value:e,onChange:t}){return(0,J.jsx)(`div`,{className:`border-b border-line-mid bg-card p-2`,children:(0,J.jsx)(OF,{value:e,onChange:t,placeholder:`Search name, title, suite...`,ariaLabel:`Search cases`})})}function B6(){let e=Ao()[`*`]||void 0,t=Eo(),n=ml(),[r,i]=(0,q.useState)(``),[a,o]=(0,q.useState)(``),s=a.trim()!==``,c=(0,q.useMemo)(()=>(n.data??[]).filter(e=>L6(e,a)),[n.data,a]),l=(0,q.useMemo)(()=>I6(c),[c]),[u,d]=Jp(`asrun-ui.cases.sidebar-width`,a6,Zp),[f,p]=(0,q.useState)(new Set),m=e=>p(t=>{let n=new Set(t);return n.delete(e)||n.add(e),n});return(0,J.jsxs)(`div`,{className:`flex h-full min-h-0`,children:[(0,J.jsxs)(`aside`,{className:`flex shrink-0 flex-col bg-card`,style:{width:Kp(u,o6,s6)},children:[(0,J.jsx)(`h1`,{className:`eyebrow border-l-4 border-theme px-3 py-3 text-sm`,children:`Cases`}),(0,J.jsx)(F6,{caseId:e,onCreated:e=>t(`/cases/${e}`)}),(0,J.jsx)(v6,{}),(0,J.jsx)(R6,{icon:(0,J.jsx)(nf,{size:14,"aria-hidden":`true`}),label:`Case list`,aside:s?`${c.length} / ${n.data?.length??0}`:n.data?.length??0}),(0,J.jsx)(z6,{value:a,onChange:o}),(0,J.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-auto`,children:[l.map(n=>(0,J.jsxs)(`div`,{children:[n.group===null?null:(0,J.jsxs)(`button`,{className:`flex w-full items-center gap-2 border-b border-line bg-warm px-3 py-1.5 text-left text-xs font-medium text-ink-2 hover:bg-line`,onClick:()=>m(n.group),"aria-expanded":s||!f.has(n.group),children:[(0,J.jsx)(mu,{size:14,className:`transition-transform duration-200 motion-reduce:transition-none ${!s&&f.has(n.group)?`-rotate-90`:``}`,"aria-hidden":`true`}),(0,J.jsx)(Id,{size:14,"aria-hidden":`true`}),(0,J.jsx)(`span`,{className:`font-mono`,children:n.group}),(0,J.jsx)(`span`,{className:`ml-auto text-ink-3`,children:n.items.length})]}),(0,J.jsx)($p,{open:n.group===null||s||!f.has(n.group),children:(0,J.jsx)(`ul`,{children:n.items.map(r=>(0,J.jsxs)(`li`,{className:`relative`,children:[(0,J.jsxs)(Ks,{to:`/cases/${r.id}`,className:`block border-b border-l-4 border-line py-2 pr-4 hover:bg-warm ${n.group===null?`pl-8`:`pl-12`} ${r.id===e?`border-l-theme bg-theme-bg`:`border-l-transparent`}`,children:[(0,J.jsx)(`div`,{className:`font-mono text-sm`,children:Z_(r.id).name}),r.title?(0,J.jsx)(`div`,{className:`truncate text-xs text-ink-2`,children:r.title}):null,r.writes.length>0||r.suites.length>0||r.problem||r.login?(0,J.jsxs)(`div`,{className:`mt-1 flex flex-wrap items-center gap-1`,children:[r.writes.length>0?(0,J.jsx)(Iy,{title:r.writesNote??void 0}):null,r.suites.map(e=>(0,J.jsx)(Ny,{tone:`blue`,children:e},e)),r.problem?(0,J.jsx)(Ny,{tone:`red`,children:`invalid front matter`}):null,r.login?(0,J.jsxs)(Ny,{tone:`gray`,children:[`login: `,r.login]}):null]}):null,(0,J.jsx)(`div`,{className:`mt-1 text-xs text-ink-3`,children:Xy(r.updatedAt)})]}),r.hasSpec?(0,J.jsx)(`button`,{className:`absolute top-2 left-2 flex h-5 w-5 items-center justify-center rounded-full bg-jade text-white transition-colors hover:bg-jade-btn focus-visible:ring-2 focus-visible:ring-theme/40 focus-visible:outline-none`,"aria-label":`Run case ${r.id}`,title:`# Run ${r.id}\nIts spec is generated: run it on the Run tests page.`,onClick:()=>t(`/run`,{state:{case:r.id}}),children:(0,J.jsx)(qf,{size:12,"aria-hidden":`true`})}):(0,J.jsx)(`span`,{className:`absolute top-2 left-2 flex h-5 w-5 items-center justify-center text-gold`,role:`img`,"aria-label":`No spec yet`,title:`# No spec yet
|
|
367
|
-
This case cannot run yet. Open it, choose Generate spec in its AI toolbar, then press Run AI.`,children:(0,J.jsx)(Ml,{size:15,"aria-hidden":`true`})})]},r.id))})})]},n.group??``)),n.isSuccess&&n.data.length===0?(0,J.jsx)(`p`,{className:`p-4 text-sm text-ink-2`,children:`No cases yet.`}):null,n.isSuccess&&n.data.length>0&&c.length===0?(0,J.jsxs)(`p`,{className:`p-4 text-sm text-ink-2`,children:[`No cases match "`,a.trim(),`".`]}):null]})]}),(0,J.jsx)(`div`,{role:`separator`,"aria-orientation":`vertical`,title:`Drag to resize the sidebar, double-click to reset`,className:`w-1.5 shrink-0 cursor-col-resize bg-line-mid transition-colors hover:bg-theme`,onPointerDown:e=>{let t=Kp(u,o6,s6);qp(e,e=>d(Kp(t+e,o6,s6)))},onDoubleClick:()=>d(a6)}),(0,J.jsx)(`section`,{className:`min-w-0 flex-1`,children:e===i6?(0,J.jsx)(N6,{memo:r,setMemo:i}):e?(0,J.jsx)(j6,{id:e},e):(0,J.jsx)(`div`,{className:`flex h-full items-center justify-center text-sm text-ink-2`,children:`Select a case to edit it, or write a memo and turn it into cases.`})})]})}var V6=[{command:`make-case`,title:`Start from raw notes`,optional:!0,what:`Turns a memo, a list of things to check or a pasted chat into case files. It writes them out as clear steps, marks the ones that change data or send email, and leaves a question in the case wherever a note was unclear. It never opens a browser and never writes a test.`,you:[`Paste your notes on Cases > From memo, then click Make cases.`,`Answer the questions it leaves in the new cases: keep the suggested sentence or write your own.`],next:[`Explore the new cases on the real pages (step 2). Until then they are drafts nobody has checked.`],cli:`A path is optional: the notes themselves can follow the command.`},{command:`explore-case`,title:`Explore a case`,what:`Checks the case against the real pages: it fixes the wording, writes down what each page shows, and leaves anything it cannot work out as a question in the case. It only edits the case file.`,you:[`Pick the environment to explore.`,`Tick the profiles to open: every profile that is logged in in that environment is ticked, and your choice is remembered per environment.`,`Stay at the computer with Attended ticked. When a step changes data, a card in the browser window asks you to do it yourself; click Done once you have finished.`,`Answer the questions it leaves in the case, or keep what the case says above one to drop the question block.`,`If a page needs special handling (a banner to dismiss first, an entry to avoid), write it under Rules in the case: every run reads it and never changes what it says.`],next:[`Generate the spec (step 3). It stops if a step that writes data or fills in a form has no recipe of what you did.`],cli:`Add --attended when a person is at the machine: steps that write data are then handed to them, instead of becoming blocking questions. Add --profiles a,b to open only those profiles; without it, every logged-in profile. Runs add up: a later run with other profiles records theirs. Add --hints <file> for what you know or want checked; a reusable instruction is saved under Rules.`},{command:`gen-spec`,title:`Generate the spec`,what:`Writes the spec (the test file) from the case. It is one test that runs once for each profile, with the values from the case's Values block. It does not run the test.`,you:[`Pick the environment to check the pages in; use staging while you try things out.`,`Log the profiles into the site first, on the Profiles page: the agent opens the pages with their saved sessions.`,`There is nothing to pick here: it covers every profile the case has information for, so explore a profile before generating for it.`,`If a spec already exists, you are asked before it is overwritten.`],next:[`Run the test on the Run tests page. If the spec has visual checks, tick Update baselines for the first run.`,`Read the result under Reports.`],cli:`An existing spec is left alone; add --force to regenerate it and overwrite it. Add --hints <file> for what you know or want changed; a reusable instruction is saved under Rules. There is no profile option: the profiles come from the case.`},{command:`heal-spec`,title:`Heal or refine the spec`,what:`Repairs a spec that fails after the product changed, and refines a case and its spec when you ask for an improvement, even if the last run passed. The agent reads the latest report and your request first and runs the case again only when that is not enough. Then it says what it changed, and whether it found a real product problem.`,you:[`Pick the environment where the failure happened, or where the pages should be checked.`,`Type what you know or want improved: what changed, which page, a check that is too weak, a step that no longer matches. Tick the profiles to run; only profiles that are logged in are run.`],next:[`If it left an open question or an unconfirmed line in the case, review the case and run Explore case again; the spec is generated after that.`,`Read its verdict: a real product difference is a finding for the product team, not a test to change.`,`If it deleted a baseline that showed the wrong thing, tick Update baselines on the next run and check the new image.`],cli:`Add --profiles a,b to choose the profiles and --hints <file> for what you know or want improved; without them, every logged-in profile is healed and no request is read.`}];function H6({label:e,children:t}){return(0,J.jsxs)(`section`,{className:`mt-3`,children:[(0,J.jsx)(`h3`,{className:`eyebrow text-xs text-theme-ink`,children:e}),(0,J.jsx)(`div`,{className:`mt-1 text-sm text-ink-2`,children:t})]})}function U6({items:e}){return(0,J.jsx)(`ul`,{className:`list-disc space-y-1 pl-5`,children:e.map(e=>(0,J.jsx)(`li`,{children:e},e))})}function W6(){let e=dl(),[t,n]=Xs(),[r]=EP(),i=e.data?.caseIds.filter(e=>!e.startsWith(`_`))??[],a=t.get(`case`),o=a&&i.includes(a)?a:i[0]??`<case-id>`,s=`<env>`,c=e.data?.root??`the workspace folder`;return(0,J.jsxs)(`div`,{className:`mx-auto max-w-3xl space-y-6 p-6`,children:[(0,J.jsxs)(`div`,{children:[(0,J.jsx)(`h1`,{className:`font-serif text-2xl tracking-wide border-l-4 border-theme pl-3`,children:`AI guide`}),(0,J.jsx)(`p`,{className:`mt-2 text-sm text-ink-2`,children:`The steps below are the AI work, in order: write a case, check it against the real pages, turn it into a test, and repair that test when the product changes.`}),(0,J.jsxs)(`p`,{className:`mt-2 text-sm text-ink-2`,children:[`In the Web UI you never type a command: choose the step in a case's toolbar (or paste notes on Cases > From memo) and click Run AI. AsRun starts the AI tool chosen in the top bar and streams the output to Jobs, so you can keep working. To drive that tool yourself, the same four commands are ready to copy at the`,` `,(0,J.jsx)(`a`,{href:`#commands`,className:`text-theme-ink underline`,children:`end of the page`}),`.`]})]}),(0,J.jsx)(`ol`,{className:`space-y-5`,children:V6.map((e,t)=>(0,J.jsxs)(`li`,{className:`card-paper p-4`,children:[(0,J.jsxs)(`h2`,{className:`flex flex-wrap items-baseline gap-x-2 gap-y-1 font-serif text-base`,children:[(0,J.jsxs)(`span`,{children:[t+1,`. `,e.title]}),(0,J.jsxs)(`code`,{className:`text-sm font-normal text-ink-2`,children:[`/`,e.command]}),e.optional?(0,J.jsx)(Ny,{tone:`gray`,children:`Optional`}):null]}),(0,J.jsx)(H6,{label:`What it does`,children:e.what}),(0,J.jsx)(H6,{label:`What you do`,children:(0,J.jsx)(U6,{items:e.you})}),(0,J.jsx)(H6,{label:`Next`,children:(0,J.jsx)(U6,{items:e.next})})]},e.command))}),(0,J.jsxs)(`section`,{className:`space-y-2 text-xs text-ink-2`,children:[(0,J.jsxs)(`p`,{children:[(0,J.jsx)(`b`,{className:`text-ink`,children:`Choosing the environment.`}),` Every step that opens real pages needs an environment, and none is picked for you: choose it in the toolbar. Use `,(0,J.jsx)(`code`,{children:`staging`}),` while you try things out. Explore also asks which profiles to open: every logged-in profile of that environment is ticked, and the list you tick is remembered for the next run there.`]}),(0,J.jsxs)(`p`,{children:[(0,J.jsx)(`b`,{className:`text-ink`,children:`If a job needs your input.`}),` When a step ends with Needs your input, open the job in the Jobs bar and click Answer: keep the suggested sentences or write your own, and the same conversation continues and folds them into the case. Job records are kept on disk: after the UI server restarts, a job that had already written its questions can still be answered, and a finished job has Run again with the same inputs.`]})]}),(0,J.jsxs)(`section`,{id:`commands`,className:`space-y-3 border-t-2 border-line-mid pt-6`,children:[(0,J.jsxs)(`div`,{children:[(0,J.jsx)(`h2`,{className:`font-serif text-lg`,children:`Run the commands yourself`}),(0,J.jsxs)(`p`,{className:`mt-2 text-sm text-ink-2`,children:[`Nothing above needs a terminal: the buttons hand each command to the AI tool for you. If you would rather work in that tool yourself (to answer in its own chat, to watch every step, or on a machine without this UI), open a terminal in `,(0,J.jsx)(`code`,{className:`text-xs`,children:c}),` and use the same commands.`,` `,(0,J.jsx)(`code`,{children:`<env>`}),` stands for one of your environments, for example `,(0,J.jsx)(`code`,{children:`staging`}),`. Each command comes twice: typed into a running tool, or as a one-shot line for the shell. A one-shot run cannot answer, so whatever the agent cannot decide goes into the case file as a question; run it again once you have answered.`]})]}),(0,J.jsxs)(`div`,{className:`card-paper p-4`,children:[(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,J.jsx)(`span`,{className:`text-sm text-ink-2`,children:`Case`}),(0,J.jsxs)(Yy,{value:o,onChange:e=>n({case:e}),"aria-label":`Case`,mono:!0,className:`align-middle`,children:[i.length===0?(0,J.jsx)(`option`,{children:`<case-id>`}):null,i.map(e=>(0,J.jsx)(`option`,{value:e,children:e},e))]})]}),(0,J.jsx)(`p`,{className:`mt-1.5 text-xs text-ink-3`,children:`The commands that take a case use this one.`})]}),(0,J.jsx)(`ol`,{className:`space-y-3`,children:V6.map((e,t)=>{let n=e.command;return(0,J.jsxs)(`li`,{className:`card-paper p-4`,children:[(0,J.jsxs)(`h3`,{className:`flex flex-wrap items-baseline gap-x-2 text-sm font-medium`,children:[(0,J.jsxs)(`span`,{children:[t+1,`. `,e.title]}),(0,J.jsxs)(`code`,{className:`font-normal text-ink-2`,children:[`/`,n]})]}),e.cli?(0,J.jsx)(`p`,{className:`mt-1 text-xs text-ink-2`,children:e.cli}):null,(0,J.jsxs)(`div`,{className:`mt-2 space-y-1.5`,children:[(0,J.jsxs)(`p`,{className:`text-xs text-ink-3`,children:[`Interactive: start `,(0,J.jsx)(`code`,{children:r}),`, then type`]}),(0,J.jsx)(UP,{text:n===`make-case`?`/make-case path/to/notes.md`:hc(n,o,{env:s})}),(0,J.jsx)(`p`,{className:`pt-1 text-xs text-ink-3`,children:`One-shot, from the shell`}),(0,J.jsx)(UP,{text:n===`make-case`?Pc(r,`path/to/notes.md`):Dc(r,n,o,{env:s})})]})]},n)})}),(0,J.jsxs)(`p`,{className:`text-xs text-ink-2`,children:[(0,J.jsx)(`b`,{className:`text-ink`,children:`About the one-shot lines.`}),` They cannot stop for permission, so each one allows up front what the agent needs`,r===`claude`?(0,J.jsxs)(J.Fragment,{children:[` `,`(`,(0,J.jsx)(`code`,{children:`--allowedTools`}),`, limited to the folders the command may change) and never allows`,` `,(0,J.jsx)(`code`,{children:`--allow-writes`}),`.`]}):(0,J.jsxs)(J.Fragment,{children:[` `,`(`,(0,J.jsx)(`code`,{children:`--auto`}),`), and `,(0,J.jsx)(`code`,{children:`--allow-writes`}),` is never added to it.`]}),` `,`Interactive mode asks you before each step instead.`]})]}),(0,J.jsx)(qP,{})]})}var G6=[{title:`Install and start`,command:`pnpm dlx @asrunjs/asrun init --install
|
|
367
|
+
This case cannot run yet. Open it, choose Generate spec in its AI toolbar, then press Run AI.`,children:(0,J.jsx)(Ml,{size:15,"aria-hidden":`true`})})]},r.id))})})]},n.group??``)),n.isSuccess&&n.data.length===0?(0,J.jsx)(`p`,{className:`p-4 text-sm text-ink-2`,children:`No cases yet.`}):null,n.isSuccess&&n.data.length>0&&c.length===0?(0,J.jsxs)(`p`,{className:`p-4 text-sm text-ink-2`,children:[`No cases match "`,a.trim(),`".`]}):null]})]}),(0,J.jsx)(`div`,{role:`separator`,"aria-orientation":`vertical`,title:`Drag to resize the sidebar, double-click to reset`,className:`w-1.5 shrink-0 cursor-col-resize bg-line-mid transition-colors hover:bg-theme`,onPointerDown:e=>{let t=Kp(u,o6,s6);qp(e,e=>d(Kp(t+e,o6,s6)))},onDoubleClick:()=>d(a6)}),(0,J.jsx)(`section`,{className:`min-w-0 flex-1`,children:e===i6?(0,J.jsx)(N6,{memo:r,setMemo:i}):e?(0,J.jsx)(j6,{id:e},e):(0,J.jsx)(`div`,{className:`flex h-full items-center justify-center text-sm text-ink-2`,children:`Select a case to edit it, or write a memo and turn it into cases.`})})]})}var V6=[{command:`make-case`,title:`Start from raw notes`,optional:!0,what:`Turns a memo, a list of things to check or a pasted chat into case files. It writes them out as clear steps, marks the ones that change data or send email, and leaves a question in the case wherever a note was unclear. It never opens a browser and never writes a test.`,you:[`Paste your notes on Cases > From memo, then click Make cases.`,`Answer the questions it leaves in the new cases: keep the suggested sentence or write your own.`],next:[`Explore the new cases on the real pages (step 2). Until then they are drafts nobody has checked.`],cli:`A path is optional: the notes themselves can follow the command.`},{command:`explore-case`,title:`Explore a case`,what:`Checks the case against the real pages: it fixes the wording, writes down what each page shows, and leaves anything it cannot work out as a question in the case. It only edits the case file.`,you:[`Pick the environment to explore.`,`Tick the profiles to open: every profile that is logged in in that environment is ticked, and your choice is remembered per environment.`,`Stay at the computer with Attended ticked. When a step changes data, a card in the browser window asks you to do it yourself; click Done once you have finished.`,`Answer the questions it leaves in the case, or keep the sentence a question is about to drop the question block.`,`If a page needs special handling (a banner to dismiss first, an entry to avoid), write it under Rules in the case: every run reads it and never changes what it says.`],next:[`Generate the spec (step 3). It stops if a step that writes data or fills in a form has no recipe of what you did.`],cli:`Add --attended when a person is at the machine: steps that write data are then handed to them, instead of becoming blocking questions. Add --profiles a,b to open only those profiles; without it, at least one logged-in profile per domain (two different hosts are two domains, even for the same product). Runs add up: a later run with other profiles records theirs. Add --hints <file> for what you know or want checked; a reusable instruction is saved under Rules.`},{command:`gen-spec`,title:`Generate the spec`,what:`Writes the spec (the test file) from the case. It is one test that runs once for each profile, with the values from the case's Values block. It does not run the test.`,you:[`Pick the environment to check the pages in; use staging while you try things out.`,`Log the profiles into the site first, on the Profiles page: the agent opens the pages with their saved sessions.`,`There is nothing to pick here: it covers every profile the case has information for, so explore a profile before generating for it.`,`If a spec already exists, you are asked before it is overwritten.`],next:[`Run the test on the Run tests page. If the spec has visual checks, tick Update baselines for the first run.`,`Read the result under Reports.`],cli:`An existing spec is left alone; add --force to regenerate it and overwrite it. Add --hints <file> for what you know or want changed; a reusable instruction is saved under Rules. There is no profile option: the profiles come from the case.`},{command:`heal-spec`,title:`Heal or refine the spec`,what:`Repairs a spec that fails after the product changed, and refines a case and its spec when you ask for an improvement, even if the last run passed. The agent reads the latest report and your request first and runs the case again only when that is not enough. Then it says what it changed, and whether it found a real product problem.`,you:[`Pick the environment where the failure happened, or where the pages should be checked.`,`Type what you know or want improved: what changed, which page, a check that is too weak, a step that no longer matches. Tick the profiles to run; only profiles that are logged in are run.`],next:[`If it left an open question or an unconfirmed line in the case, review the case and run Explore case again; the spec is generated after that.`,`Read its verdict: a real product difference is a finding for the product team, not a test to change.`,`If it deleted a baseline that showed the wrong thing, tick Update baselines on the next run and check the new image.`],cli:`Add --profiles a,b to choose the profiles and --hints <file> for what you know or want improved; without them, every logged-in profile is healed and no request is read.`}];function H6({label:e,children:t}){return(0,J.jsxs)(`section`,{className:`mt-3`,children:[(0,J.jsx)(`h3`,{className:`eyebrow text-xs text-theme-ink`,children:e}),(0,J.jsx)(`div`,{className:`mt-1 text-sm text-ink-2`,children:t})]})}function U6({items:e}){return(0,J.jsx)(`ul`,{className:`list-disc space-y-1 pl-5`,children:e.map(e=>(0,J.jsx)(`li`,{children:e},e))})}function W6(){let e=dl(),[t,n]=Xs(),[r]=EP(),i=e.data?.caseIds.filter(e=>!e.startsWith(`_`))??[],a=t.get(`case`),o=a&&i.includes(a)?a:i[0]??`<case-id>`,s=`<env>`,c=e.data?.root??`the workspace folder`;return(0,J.jsxs)(`div`,{className:`mx-auto max-w-3xl space-y-6 p-6`,children:[(0,J.jsxs)(`div`,{children:[(0,J.jsx)(`h1`,{className:`font-serif text-2xl tracking-wide border-l-4 border-theme pl-3`,children:`AI guide`}),(0,J.jsx)(`p`,{className:`mt-2 text-sm text-ink-2`,children:`The steps below are the AI work, in order: write a case, check it against the real pages, turn it into a test, and repair that test when the product changes.`}),(0,J.jsxs)(`p`,{className:`mt-2 text-sm text-ink-2`,children:[`In the Web UI you never type a command: choose the step in a case's toolbar (or paste notes on Cases > From memo) and click Run AI. AsRun starts the AI tool chosen in the top bar and streams the output to Jobs, so you can keep working. To drive that tool yourself, the same four commands are ready to copy at the`,` `,(0,J.jsx)(`a`,{href:`#commands`,className:`text-theme-ink underline`,children:`end of the page`}),`.`]})]}),(0,J.jsx)(`ol`,{className:`space-y-5`,children:V6.map((e,t)=>(0,J.jsxs)(`li`,{className:`card-paper p-4`,children:[(0,J.jsxs)(`h2`,{className:`flex flex-wrap items-baseline gap-x-2 gap-y-1 font-serif text-base`,children:[(0,J.jsxs)(`span`,{children:[t+1,`. `,e.title]}),(0,J.jsxs)(`code`,{className:`text-sm font-normal text-ink-2`,children:[`/`,e.command]}),e.optional?(0,J.jsx)(Ny,{tone:`gray`,children:`Optional`}):null]}),(0,J.jsx)(H6,{label:`What it does`,children:e.what}),(0,J.jsx)(H6,{label:`What you do`,children:(0,J.jsx)(U6,{items:e.you})}),(0,J.jsx)(H6,{label:`Next`,children:(0,J.jsx)(U6,{items:e.next})})]},e.command))}),(0,J.jsxs)(`section`,{className:`space-y-2 text-xs text-ink-2`,children:[(0,J.jsxs)(`p`,{children:[(0,J.jsx)(`b`,{className:`text-ink`,children:`Choosing the environment.`}),` Every step that opens real pages needs an environment, and none is picked for you: choose it in the toolbar. Use `,(0,J.jsx)(`code`,{children:`staging`}),` while you try things out. Explore also asks which profiles to open: every logged-in profile of that environment is ticked, and the list you tick is remembered for the next run there.`]}),(0,J.jsxs)(`p`,{children:[(0,J.jsx)(`b`,{className:`text-ink`,children:`If a job needs your input.`}),` When a step ends with Needs your input, open the job in the Jobs bar and click Answer: keep the suggested sentences or write your own, and the same conversation continues and folds them into the case. Job records are kept on disk: after the UI server restarts, a job that had already written its questions can still be answered, and a finished job has Run again with the same inputs.`]})]}),(0,J.jsxs)(`section`,{id:`commands`,className:`space-y-3 border-t-2 border-line-mid pt-6`,children:[(0,J.jsxs)(`div`,{children:[(0,J.jsx)(`h2`,{className:`font-serif text-lg`,children:`Run the commands yourself`}),(0,J.jsxs)(`p`,{className:`mt-2 text-sm text-ink-2`,children:[`Nothing above needs a terminal: the buttons hand each command to the AI tool for you. If you would rather work in that tool yourself (to answer in its own chat, to watch every step, or on a machine without this UI), open a terminal in `,(0,J.jsx)(`code`,{className:`text-xs`,children:c}),` and use the same commands.`,` `,(0,J.jsx)(`code`,{children:`<env>`}),` stands for one of your environments, for example `,(0,J.jsx)(`code`,{children:`staging`}),`. Each command comes twice: typed into a running tool, or as a one-shot line for the shell. A one-shot run cannot answer, so whatever the agent cannot decide goes into the case file as a question; run it again once you have answered.`]})]}),(0,J.jsxs)(`div`,{className:`card-paper p-4`,children:[(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,J.jsx)(`span`,{className:`text-sm text-ink-2`,children:`Case`}),(0,J.jsxs)(Yy,{value:o,onChange:e=>n({case:e}),"aria-label":`Case`,mono:!0,className:`align-middle`,children:[i.length===0?(0,J.jsx)(`option`,{children:`<case-id>`}):null,i.map(e=>(0,J.jsx)(`option`,{value:e,children:e},e))]})]}),(0,J.jsx)(`p`,{className:`mt-1.5 text-xs text-ink-3`,children:`The commands that take a case use this one.`})]}),(0,J.jsx)(`ol`,{className:`space-y-3`,children:V6.map((e,t)=>{let n=e.command;return(0,J.jsxs)(`li`,{className:`card-paper p-4`,children:[(0,J.jsxs)(`h3`,{className:`flex flex-wrap items-baseline gap-x-2 text-sm font-medium`,children:[(0,J.jsxs)(`span`,{children:[t+1,`. `,e.title]}),(0,J.jsxs)(`code`,{className:`font-normal text-ink-2`,children:[`/`,n]})]}),e.cli?(0,J.jsx)(`p`,{className:`mt-1 text-xs text-ink-2`,children:e.cli}):null,(0,J.jsxs)(`div`,{className:`mt-2 space-y-1.5`,children:[(0,J.jsxs)(`p`,{className:`text-xs text-ink-3`,children:[`Interactive: start `,(0,J.jsx)(`code`,{children:r}),`, then type`]}),(0,J.jsx)(UP,{text:n===`make-case`?`/make-case path/to/notes.md`:hc(n,o,{env:s})}),(0,J.jsx)(`p`,{className:`pt-1 text-xs text-ink-3`,children:`One-shot, from the shell`}),(0,J.jsx)(UP,{text:n===`make-case`?Pc(r,`path/to/notes.md`):Dc(r,n,o,{env:s})})]})]},n)})}),(0,J.jsxs)(`p`,{className:`text-xs text-ink-2`,children:[(0,J.jsx)(`b`,{className:`text-ink`,children:`About the one-shot lines.`}),` They cannot stop for permission, so each one allows up front what the agent needs`,r===`claude`?(0,J.jsxs)(J.Fragment,{children:[` `,`(`,(0,J.jsx)(`code`,{children:`--allowedTools`}),`, limited to the folders the command may change) and never allows`,` `,(0,J.jsx)(`code`,{children:`--allow-writes`}),`.`]}):(0,J.jsxs)(J.Fragment,{children:[` `,`(`,(0,J.jsx)(`code`,{children:`--auto`}),`), and `,(0,J.jsx)(`code`,{children:`--allow-writes`}),` is never added to it.`]}),` `,`Interactive mode asks you before each step instead.`]})]}),(0,J.jsx)(qP,{})]})}var G6=[{title:`Install and start`,command:`pnpm dlx @asrunjs/asrun init --install
|
|
368
368
|
pnpm go`,todo:[(0,J.jsx)(J.Fragment,{children:`Run both commands in your project folder. The first one adds AsRun and creates the workspace; the second one installs the browser, starts this UI and opens it in your browser.`}),(0,J.jsxs)(J.Fragment,{children:[`After the first time, `,(0,J.jsx)(`code`,{children:`pnpm go`}),` is enough.`]})]},{title:`Choose your AI tool`,todo:[(0,J.jsxs)(J.Fragment,{children:[`The top bar runs every AI command with `,(0,J.jsx)(`b`,{children:`Claude Code`}),` or `,(0,J.jsx)(`b`,{children:`OpenCode`}),`. Select the one installed and signed in on this machine.`]}),(0,J.jsx)(J.Fragment,{children:`Pick a model next to it, or keep the default. The choice is remembered in this browser.`})],image:{src:`/help/ai-tools.png`,alt:`The model picker and the AI tool switch in the top bar.`,caption:`The AI tool switch and the model picker in the top bar.`}},{title:`Add a profile`,to:`/profiles`,where:`Profiles > Add a new profile`,todo:[(0,J.jsxs)(J.Fragment,{children:[`Expand `,(0,J.jsx)(`b`,{children:`Add a new profile`}),` at the bottom of the page, fill in the form, then click `,(0,J.jsx)(`b`,{children:`Add profile`}),`.`]}),(0,J.jsx)(J.Fragment,{children:`A new workspace starts with an example profile. Edit it to point at your site, or remove it if you do not need it.`})],image:{src:`/help/profile-form.png`,alt:`The profile form with its fields, above the Add profile button.`,caption:`The profile form at the bottom of the Profiles page.`}},{title:`Log in`,to:`/profiles`,where:`Profiles`,todo:[(0,J.jsxs)(J.Fragment,{children:[`Click `,(0,J.jsx)(`b`,{children:`Login`}),` on the row of the profile. A browser window opens.`]}),(0,J.jsx)(J.Fragment,{children:`Sign in yourself, 2FA included.`}),(0,J.jsxs)(J.Fragment,{children:[`Click `,(0,J.jsx)(`b`,{children:`Done, save the session`}),` in the bottom-left corner of that window. The Login column then shows a green YES.`]})],note:(0,J.jsx)(J.Fragment,{children:`AsRun never types your credentials. A saved login stays on this machine and is as sensitive as a password.`}),image:{src:`/help/profiles-login.png`,alt:`The Profiles table with a Login button on each profile that is not signed in yet.`,caption:`Profiles: until you sign in, a row shows NO and a Login button.`}},{title:`Make cases from your notes`,to:`/cases/memo`,where:`Cases > From memo`,todo:[(0,J.jsxs)(J.Fragment,{children:[`Open `,(0,J.jsx)(`b`,{children:`Cases`}),` and switch to `,(0,J.jsx)(`b`,{children:`From memo`}),`.`]}),(0,J.jsxs)(J.Fragment,{children:[`Paste your notes as they are, then click `,(0,J.jsx)(`b`,{children:`Make cases`}),`.`]})],image:{src:`/help/cases-memo.png`,alt:`The From memo editor with the notes on the left and the rendered text on the right.`,caption:`From memo: write or paste your notes, then make cases.`}},{title:`Explore a case`,to:`/cases`,where:`Cases`,todo:[(0,J.jsxs)(J.Fragment,{children:[`Open a case and choose `,(0,J.jsx)(`b`,{children:`Explore case`}),` in the toolbar.`]}),(0,J.jsx)(J.Fragment,{children:`Pick the environment and the profiles to open. Every profile that is logged in is ticked, and your choice is remembered for that environment; the others are left alone.`}),(0,J.jsxs)(J.Fragment,{children:[`Click `,(0,J.jsx)(`b`,{children:`Run AI`}),`. Keep `,(0,J.jsx)(`b`,{children:`Attended`}),` ticked: you do the steps that change data, and the agent waits for you.`]}),(0,J.jsxs)(J.Fragment,{children:[`If the run ends with `,(0,J.jsx)(`b`,{children:`Needs your input`}),`, answer under the output, or edit the case and run it again.`]})],image:{src:`/help/case-explore.png`,alt:`The case toolbar with Explore case, the environment, the profile picker, Attended and Run AI.`,caption:`The case toolbar: command, environment, profiles and Run AI.`}},{title:`Generate the spec`,to:`/cases`,where:`Cases`,todo:[(0,J.jsxs)(J.Fragment,{children:[`Choose `,(0,J.jsx)(`b`,{children:`Generate spec`}),` in the same toolbar, pick the environment, then click `,(0,J.jsx)(`b`,{children:`Run AI`}),`.`]}),(0,J.jsx)(J.Fragment,{children:`There is nothing to pick for profiles: it covers every profile the case has information for, so explore a profile before generating for it.`}),(0,J.jsx)(J.Fragment,{children:`It writes the spec; it does not run the tests.`})],image:{src:`/help/case-generate.png`,alt:`The same case toolbar with Generate spec selected; there is no profile picker here.`,caption:`With Generate spec selected, Run AI writes the spec for every profile the case names.`}},{title:`Run the tests`,to:`/run`,where:`Run tests`,todo:[(0,J.jsxs)(J.Fragment,{children:[`Pick the environment, tick the profiles, then click `,(0,J.jsx)(`b`,{children:`Run tests`}),`. The output streams in the Jobs bar.`]}),(0,J.jsxs)(J.Fragment,{children:[`On a case with visual checks, tick `,(0,J.jsx)(`b`,{children:`Update baselines`}),` for the first run.`]})],note:(0,J.jsx)(J.Fragment,{children:`By default a test only reads the product: nothing is created or changed. A case that writes data runs only in the environments it allows.`}),image:{src:`/help/run-tests.png`,alt:`The Run tests page with an environment chosen, the profiles ticked and the Run tests button below.`,caption:`Run tests: one environment, then the profiles.`}},{title:`Read the report`,to:`/reports`,where:`Reports`,todo:[(0,J.jsx)(J.Fragment,{children:`The latest run comes first, with failed cases on top.`}),(0,J.jsxs)(J.Fragment,{children:[`Click a case to see the failed step, the error and the video. `,(0,J.jsx)(`b`,{children:`Full Playwright report`}),` has the traces.`]}),(0,J.jsxs)(J.Fragment,{children:[`After a product change breaks a test, or to refine a case and its spec, use `,(0,J.jsx)(`b`,{children:`Heal spec`}),` in the case toolbar.`]})],image:{src:`/help/reports.png`,alt:`A report with a failed case selected, showing the failed step, the error and the video.`,caption:`A failed case: the step, the error and the evidence.`}}];function K6(){return(0,J.jsxs)(`div`,{className:`mx-auto max-w-3xl space-y-6 p-6`,children:[(0,J.jsxs)(`div`,{children:[(0,J.jsx)(`h1`,{className:`font-serif text-2xl tracking-wide border-l-4 border-theme pl-3`,children:`How to start`}),(0,J.jsx)(`p`,{className:`mt-2 text-sm text-ink-2`,children:`AsRun turns plain-language test cases into Playwright tests, runs them for every profile and shows you the evidence. This guide takes you from a new project to a test report.`})]}),(0,J.jsxs)(`section`,{className:`card-paper p-4`,children:[(0,J.jsx)(`h2`,{className:`font-serif text-lg`,children:`Before you begin`}),(0,J.jsxs)(`ul`,{className:`mt-2 list-disc space-y-1 pl-5 text-sm text-ink-2`,children:[(0,J.jsxs)(`li`,{children:[(0,J.jsx)(`b`,{className:`text-ink`,children:`Node.js 22 or newer`}),` and `,(0,J.jsx)(`b`,{className:`text-ink`,children:`pnpm`}),`.`]}),(0,J.jsxs)(`li`,{children:[(0,J.jsx)(`b`,{className:`text-ink`,children:`Claude Code`}),` or `,(0,J.jsx)(`b`,{className:`text-ink`,children:`OpenCode`}),` for the AI steps. You can add one later: the other steps work without it.`]})]})]}),(0,J.jsx)(`ol`,{className:`space-y-5`,children:G6.map((e,t)=>(0,J.jsxs)(`li`,{className:`card-paper p-4`,children:[(0,J.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,J.jsx)(`span`,{className:`flex h-7 w-7 shrink-0 items-center justify-center rounded-sm bg-theme-btn font-serif text-white shadow-btn`,children:t+1}),(0,J.jsx)(`h2`,{className:`font-serif text-lg`,children:e.title}),e.to?(0,J.jsxs)(Ks,{to:e.to,className:`${X()} ml-auto gap-1.5`,children:[e.where,(0,J.jsx)(Bl,{size:14,"aria-hidden":`true`})]}):null]}),e.command?(0,J.jsx)(`div`,{className:`mt-3`,children:(0,J.jsx)(UP,{text:e.command})}):null,(0,J.jsx)(`ol`,{className:`mt-3 list-decimal space-y-1 pl-9 text-sm marker:font-medium marker:text-theme-ink`,children:e.todo.map((e,t)=>(0,J.jsx)(`li`,{children:e},t))}),e.image?(0,J.jsxs)(`figure`,{className:`mt-3`,children:[(0,J.jsx)(`a`,{href:e.image.src,target:`_blank`,rel:`noreferrer`,title:`Open the screenshot at full size`,className:`block`,children:(0,J.jsx)(`img`,{src:e.image.src,alt:e.image.alt,loading:`lazy`,className:`block max-w-full rounded border border-line-mid shadow-paper`})}),e.image.caption?(0,J.jsx)(`figcaption`,{className:`mt-1.5 text-xs text-ink-2`,children:e.image.caption}):null]}):null,e.note?(0,J.jsx)(`p`,{className:`mt-3 rounded-sm border border-line-mid bg-warm p-2 text-xs text-ink-2`,children:e.note}):null]},e.title))}),(0,J.jsxs)(`p`,{className:`text-xs text-ink-2`,children:[(0,J.jsx)(`b`,{className:`text-ink`,children:`What's next:`}),` the`,` `,(0,J.jsx)(Ks,{to:`/guide`,className:`text-qing-deep underline`,children:`AI guide`}),` `,`explains what each AI step does and has the same commands, ready to run in a terminal, and the `,(0,J.jsx)(`code`,{children:`docs`}),` `,`folder of the AsRun package explains profiles, values and baselines.`]}),(0,J.jsx)(qP,{})]})}var q6=`data-tip`,J6=`:is(button, input, select, textarea):disabled:is([title], [${q6}])`,Y6={theme:`tip`,placement:`top`,arrow:!0,maxWidth:320,offset:[0,8],touch:!1,appendTo:()=>document.body};function X6(e){let t=document.createElement(`div`);t.className=`tip-body`;for(let n of e.split(`
|
|
369
369
|
`)){if(n.trim()===``)continue;let e=document.createElement(`p`);n.startsWith(`# `)?(e.className=`tip-title`,e.textContent=n.slice(2)):e.textContent=n,t.append(e)}return t}function Z6(e){let t=e.getAttribute(`title`);return t!==null&&(e.setAttribute(q6,t),e.removeAttribute(`title`)),e.getAttribute(q6)??``}function Q6(){vG(document.body,{...Y6,target:`[title]:not(iframe):not(:disabled), [${q6}]:not(:disabled)`,delay:[300,0],onTrigger:e=>{Z6(e.reference)},onShow:e=>{let t=Z6(e.reference);if(t===``)return!1;e.setContent(X6(t))}});let e=document.createElement(`span`),t=null,n=hG(e,{...Y6,trigger:`manual`,getReferenceClientRect:()=>t??new DOMRect}),r=null,i,a=0,o=e=>{window.clearTimeout(i),e&&n.hide()},s=(e,a)=>{let s=[...document.querySelectorAll(J6)].find(t=>{let n=t.getBoundingClientRect();return e>=n.left&&e<=n.right&&a>=n.top&&a<=n.bottom})??null;s!==r&&(o(r),r=s,s&&(i=window.setTimeout(()=>{let e=Z6(s);e!==``&&(t=s.getBoundingClientRect(),n.setContent(X6(e)),n.show())},300)))};document.addEventListener(`mousemove`,e=>{cancelAnimationFrame(a),a=requestAnimationFrame(()=>s(e.clientX,e.clientY))}),document.addEventListener(`mouseleave`,()=>s(-1,-1)),document.addEventListener(`mousedown`,()=>{o(r),r=null})}function $6(){let{jobId:e}=Ao(),t=gl(),n=Eo(),{startError:r,clearStartError:i,markSeen:a}=xl(),o=t.data?.find(t=>t.id===e)??null;return nl(e??null,a,t.data),(0,J.jsxs)(`div`,{"data-theme":`dai`,className:`flex h-full flex-col text-ink`,children:[(0,J.jsxs)(`header`,{className:`flex items-center gap-4 border-b-2 border-ink bg-paper px-4 py-2 shadow-paper`,children:[(0,J.jsx)(`span`,{className:`seal`,children:`A`}),(0,J.jsx)(`span`,{className:`font-serif tracking-widest`,children:il}),(0,J.jsx)(Ks,{to:`/run`,className:`ml-auto text-sm text-ink-2 hover:text-ink`,children:`Back to the app`})]}),r?(0,J.jsxs)(`div`,{className:`flex items-center gap-3 border-b border-seal/40 bg-seal-bg px-3 py-2 text-sm text-seal-deep`,children:[(0,J.jsx)(`span`,{children:r}),(0,J.jsx)(`button`,{className:`ml-auto text-xs underline`,onClick:i,children:`dismiss`})]}):null,o?(0,J.jsx)(eP,{job:o,openJob:e=>n(`/jobs/${e}`)},o.id):(0,J.jsx)(`p`,{className:`p-6 text-sm text-ink-2`,children:t.isPending?`Loading...`:`This job does not exist (any more). Its record was removed with the other old job records.`})]})}function e8({request:e,label:t,description:n,disabledReason:r}){let{startJob:i}=xl(),a=gl().data?.some(e=>e.kind===`run`&&e.status===`running`)??!1,[o,s]=(0,q.useState)(null),[c,l]=(0,q.useState)(!1),u=Hn({mutationFn:async()=>{let t=await sc.previewRun({env:e.env,profiles:e.profiles,suites:e.suites,grep:e.grep,readOnly:e.readOnly});t.needsConfirmation?(l(!1),s({request:e,preview:t})):await i(e)}});return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`button`,{className:`${X(`success`)} gap-1.5`,...Wy(!!r),disabled:!!r||a||u.isPending,title:r?`# Cannot run again\n${r}`:a?`# A run is in progress
|
|
370
370
|
Wait for it to finish, or stop it in the jobs drawer.`:`# ${t}\n${n}`,onClick:()=>u.mutate(),children:[r?(0,J.jsx)(df,{size:14,"aria-hidden":`true`}):(0,J.jsx)(ap,{size:14,"aria-hidden":`true`}),t]}),u.isError?(0,J.jsx)(`span`,{className:`text-xs text-seal-deep`,children:u.error.message}):null,o?(0,J.jsxs)(Zy,{title:`Cases that write data in ${o.preview.env.toUpperCase()}`,onClose:()=>s(null),footer:(0,J.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,J.jsx)(`button`,{className:X(),onClick:()=>s(null),children:`Cancel`}),(0,J.jsxs)(`button`,{className:X(`danger`),disabled:!c,onClick:()=>{let e={...o.request,confirmWritesIn:o.preview.env};s(null),i(e)},children:[`Run in `,o.preview.env.toUpperCase()]})]}),children:[(0,J.jsx)(`ul`,{className:`mb-3 max-h-64 space-y-2 overflow-auto text-sm`,children:o.preview.writeCases.map(e=>(0,J.jsxs)(`li`,{className:`rounded-sm border border-seal/30 bg-seal-bg p-2`,children:[(0,J.jsx)(`div`,{className:`font-mono`,children:e.id}),(0,J.jsx)(`div`,{className:`text-ink-2`,children:e.note}),(0,J.jsxs)(`div`,{className:`text-xs text-ink-2`,children:[`Accounts: `,e.profiles.join(`, `)]})]},e.id))}),(0,J.jsx)(`p`,{className:`mb-3 text-xs text-ink-2`,children:`They only touch data of the test accounts and never send email in production.`}),o.preview.skippedWriteCases.length>0?(0,J.jsxs)(`p`,{className:`mb-3 text-xs text-ink-2`,children:[`Skipped, because they have no permission to write in `,o.preview.env.toUpperCase(),`:`,` `,o.preview.skippedWriteCases.map(e=>e.id).join(`, `),`.`]}):null,(0,J.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,J.jsx)(`input`,{type:`checkbox`,checked:c,onChange:e=>l(e.target.checked)}),`I confirm that these cases may write test data in `,o.preview.env.toUpperCase(),`.`]})]}):null]})}var t8=e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`),n8=e=>e.replace(/(?<!\\)\//g,`[\\\\/]`),r8=e=>`(?:^|\\s)${n8(t8(e))}\\.spec\\.ts`,i8={passed:{tone:`green`,label:`Passed`},failed:{tone:`red`,label:`Failed`},flaky:{tone:`amber`,label:`Flaky`},skipped:{tone:`gray`,label:`Skipped`}},a8={failed:0,flaky:1,skipped:2,passed:3},o8=({status:e})=>(0,J.jsx)(Ny,{tone:i8[e].tone,children:i8[e].label}),s8=e=>e<1e3?`${e} ms`:`${(e/1e3).toFixed(1)} s`,c8=e=>{let t=e.errors[0];return t?t.headline:null};function l8({result:e,action:t}){let[n,...r]=e.errors;if(!n)return null;let i=e.status===`flaky`;return(0,J.jsxs)(`div`,{className:`rounded border border-l-4 p-4 ${i?`border-gold-deep bg-gold-bg text-ink`:`border-seal bg-seal-bg text-ink`}`,children:[(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-x-3 gap-y-2`,children:[(0,J.jsx)(`div`,{className:`text-xs font-semibold tracking-wide uppercase`,children:i?`Failed on the first try, passed on retry`:`Why it failed`}),t]}),e.failedStep?(0,J.jsxs)(`div`,{className:`mt-1 text-sm`,children:[(0,J.jsx)(`span`,{className:`font-medium`,children:`Step:`}),` `,e.failedStep]}):null,(0,J.jsx)(`p`,{className:`mt-2 text-base font-semibold break-words whitespace-pre-wrap`,children:n.headline}),n.context?(0,J.jsx)(`pre`,{className:`mt-2 max-h-48 overflow-auto rounded-sm bg-white/70 p-2 font-mono text-xs break-words whitespace-pre-wrap`,children:n.context}):null,r.length>0?(0,J.jsx)(`ul`,{className:`mt-3 list-disc space-y-1 pl-5 text-sm`,children:r.map((e,t)=>(0,J.jsx)(`li`,{className:`break-words whitespace-pre-wrap`,children:e.headline},t))}):null]})}function u8({result:e}){let t=e.errors.flatMap((e,t)=>[{label:`Call log`,key:`log-${t}`,text:e.callLog},{label:`Code`,key:`code-${t}`,text:e.snippet},{label:`Stack trace`,key:`stack-${t}`,text:e.stack}]).filter(e=>e.text);return t.length===0?null:(0,J.jsxs)(`details`,{className:`card-paper`,children:[(0,J.jsx)(`summary`,{className:`cursor-pointer px-4 py-2 text-sm font-medium text-ink`,children:`Technical details (for developers)`}),(0,J.jsx)(`div`,{className:`space-y-3 border-t border-line-mid p-4`,children:t.map(e=>(0,J.jsxs)(`div`,{children:[(0,J.jsx)(`div`,{className:`mb-1 text-xs font-semibold tracking-widest text-ink-2 uppercase`,children:e.label}),(0,J.jsx)(`pre`,{className:`paper-grain max-h-64 overflow-auto rounded bg-dai-deep p-3 font-mono text-xs whitespace-pre-wrap text-paper`,children:e.text})]},e.key))})]})}var d8=/is not logged in to/,f8=e=>e.errors.some(e=>d8.test(e.headline));function p8({runId:e,result:t,env:n}){let[r,i]=(0,q.useState)(!1),[a]=EP(),o=dl().data?.caseIds.includes(t.caseId)??!1;return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`button`,{className:`${X(`danger`)} gap-1.5`,disabled:!o,title:o?`# Heal this failure
|